@builder.io/dev-tools 1.18.49 → 1.18.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- var goe=Object.create;var My=Object.defineProperty;var yoe=Object.getOwnPropertyDescriptor;var boe=Object.getOwnPropertyNames;var voe=Object.getPrototypeOf,xoe=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),By=(t,e)=>{for(var r in e)My(t,r,{get:e[r],enumerable:!0})},qN=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of boe(e))!xoe.call(t,i)&&i!==r&&My(t,i,{get:()=>e[i],enumerable:!(n=yoe(e,i))||n.enumerable});return t};var V=(t,e,r)=>(r=t!=null?goe(voe(t)):{},qN(e||!t||!t.__esModule?My(r,"default",{value:t,enumerable:!0}):r,t)),Doe=t=>qN(My({},"__esModule",{value:!0}),t);var m=N(()=>{{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"f267748abc25288441ccc9846f3d5fd4a549baed"}}});var GN=S((xje,zN)=>{m();function Bw(t){return t==null?[]:Array.isArray(t)?t:[t]}function woe(t,e,r,n){var i,s=t[e],o=~n.string.indexOf(e)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(e)?r==="false"?!1:r==="true"||(t._.push((i=+r,i*0===0?i:r)),!!r):(i=+r,i*0===0?i:r);t[e]=s==null?o:Array.isArray(s)?s.concat(o):[s,o]}zN.exports=function(t,e){t=t||[],e=e||{};var r,n,i,s,o,a={_:[]},c=0,u=0,l=0,p=t.length;let d=e.alias!==void 0,h=e.unknown!==void 0,f=e.default!==void 0;if(e.alias=e.alias||{},e.string=Bw(e.string),e.boolean=Bw(e.boolean),d)for(r in e.alias)for(n=e.alias[r]=Bw(e.alias[r]),c=0;c<n.length;c++)(e.alias[n[c]]=n.concat(r)).splice(c,1);for(c=e.boolean.length;c-- >0;)for(n=e.alias[e.boolean[c]]||[],u=n.length;u-- >0;)e.boolean.push(n[u]);for(c=e.string.length;c-- >0;)for(n=e.alias[e.string[c]]||[],u=n.length;u-- >0;)e.string.push(n[u]);if(f){for(r in e.default)if(s=typeof e.default[r],n=e.alias[r]=e.alias[r]||[],e[s]!==void 0)for(e[s].push(r),c=0;c<n.length;c++)e[s].push(n[c])}let g=h?Object.keys(e.alias):[];for(c=0;c<p;c++){if(i=t[c],i==="--"){a._=a._.concat(t.slice(++c));break}for(u=0;u<i.length&&i.charCodeAt(u)===45;u++);if(u===0)a._.push(i);else if(i.substring(u,u+3)==="no-"){if(s=i.substring(u+3),h&&!~g.indexOf(s))return e.unknown(i);a[s]=!1}else{for(l=u+1;l<i.length&&i.charCodeAt(l)!==61;l++);for(s=i.substring(u,l),o=i.substring(++l)||c+1===p||(""+t[c+1]).charCodeAt(0)===45||t[++c],n=u===2?[s]:s,l=0;l<n.length;l++){if(s=n[l],h&&!~g.indexOf(s))return e.unknown("-".repeat(u)+s);woe(a,s,l+1<n.length||o,e)}}}if(f)for(r in e.default)a[r]===void 0&&(a[r]=e.default[r]);if(d)for(r in a)for(n=e.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}});function Coe(t){let e=[],r=du.default.dirname(t);for(;r!==du.default.dirname(r);){let n=du.default.join(r,".prettierignore");$w.default.existsSync(n)&&e.push(n);let i=du.default.join(r,".git");if($w.default.existsSync(i))break;r=du.default.dirname(r)}return e}function Eoe(t){if(!t)return Lw.default;try{let r=(0,VN.createRequire)(t)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return Lw.default}}async function Ni(t,e,r,n){try{let i=du.default.resolve(t,n??"file.tsx"),s=Eoe(i);if(n){let a=Coe(i);if((await s.getFileInfo(i,{ignorePath:a.length>0?a:void 0})).ignored)return e}let o=await s.resolveConfig(i);return o?await s.format(e,{...o,filepath:n,parser:r}):await s.format(e,{filepath:n,parser:r})}catch{return e}}var Lw,VN,du,$w,Jf=N(()=>{"use strict";m();Lw=V(require("prettier"),1),VN=require("node:module"),du=V(require("node:path"),1),$w=V(require("node:fs"),1)});var jw,rp,Ly,$y,HN,fu,Uw,qw,mu,KN,np=N(()=>{"use strict";m();jw="preview-url",rp="framework",Ly="platform",$y="node",HN="/~builder-connect",fu="/~builder-connected",Uw="/~builder-dev-tools",qw="/~builder-dev-tools.js",mu="/~builder-dev-tools-close",KN="/mappings"});var jy=S((Tje,WN)=>{"use strict";m();var zw={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let r="";return t<0?r+=`\x1B[${-t}D`:t>0&&(r+=`\x1B[${t}C`),e<0?r+=`\x1B[${-e}A`:e>0&&(r+=`\x1B[${e}B`),r},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Soe={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},Toe={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?zw.up():"");return t&&(e+=zw.left),e}};WN.exports={cursor:zw,scroll:Soe,erase:Toe,beep:"\x07"}});var mr=S((Pje,Gw)=>{m();var qy=process||{},JN=qy.argv||[],Uy=qy.env||{},Aoe=!(Uy.NO_COLOR||JN.includes("--no-color"))&&(!!Uy.FORCE_COLOR||JN.includes("--color")||qy.platform==="win32"||(qy.stdout||{}).isTTY&&Uy.TERM!=="dumb"||!!Uy.CI),Poe=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+_oe(i,e,r,s)+e:t+i+e},_oe=(t,e,r,n)=>{let i="",s=0;do i+=t.substring(s,n)+r,s=n+e.length,n=t.indexOf(e,s);while(~n);return i+t.substring(s)},YN=(t=Aoe)=>{let e=t?Poe:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Gw.exports=YN();Gw.exports.createColors=YN});function Foe({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function aR(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(koe,"")}function cR(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Yf(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=aR(t),t.length===0))return 0;t=t.replace(Ooe()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Noe.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}function Loe(){let t=new Map;for(let[e,r]of Object.entries(or)){for(let[n,i]of Object.entries(r))or[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=or[n],t.set(i[0],i[1]);Object.defineProperty(or,e,{value:r,enumerable:!1})}return Object.defineProperty(or,"codes",{value:t,enumerable:!1}),or.color.close="\x1B[39m",or.bgColor.close="\x1B[49m",or.color.ansi=XN(),or.color.ansi256=ZN(),or.color.ansi16m=QN(),or.bgColor.ansi=XN(Vw),or.bgColor.ansi256=ZN(Vw),or.bgColor.ansi16m=QN(Vw),Object.defineProperties(or,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>or.rgbToAnsi256(...or.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>or.ansi256ToAnsi(or.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>or.ansi256ToAnsi(or.hexToAnsi256(e)),enumerable:!1}}),or}function rR(t,e,r){return String(t).normalize().replace(/\r\n/g,`
1
+ var goe=Object.create;var My=Object.defineProperty;var yoe=Object.getOwnPropertyDescriptor;var boe=Object.getOwnPropertyNames;var voe=Object.getPrototypeOf,xoe=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),By=(t,e)=>{for(var r in e)My(t,r,{get:e[r],enumerable:!0})},qN=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of boe(e))!xoe.call(t,i)&&i!==r&&My(t,i,{get:()=>e[i],enumerable:!(n=yoe(e,i))||n.enumerable});return t};var V=(t,e,r)=>(r=t!=null?goe(voe(t)):{},qN(e||!t||!t.__esModule?My(r,"default",{value:t,enumerable:!0}):r,t)),Doe=t=>qN(My({},"__esModule",{value:!0}),t);var m=N(()=>{{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"0d0d80648f6021e4c26b7c0ee71c254dad112282"}}});var GN=S((x5e,zN)=>{m();function Bw(t){return t==null?[]:Array.isArray(t)?t:[t]}function woe(t,e,r,n){var i,s=t[e],o=~n.string.indexOf(e)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(e)?r==="false"?!1:r==="true"||(t._.push((i=+r,i*0===0?i:r)),!!r):(i=+r,i*0===0?i:r);t[e]=s==null?o:Array.isArray(s)?s.concat(o):[s,o]}zN.exports=function(t,e){t=t||[],e=e||{};var r,n,i,s,o,a={_:[]},c=0,u=0,l=0,p=t.length;let d=e.alias!==void 0,h=e.unknown!==void 0,f=e.default!==void 0;if(e.alias=e.alias||{},e.string=Bw(e.string),e.boolean=Bw(e.boolean),d)for(r in e.alias)for(n=e.alias[r]=Bw(e.alias[r]),c=0;c<n.length;c++)(e.alias[n[c]]=n.concat(r)).splice(c,1);for(c=e.boolean.length;c-- >0;)for(n=e.alias[e.boolean[c]]||[],u=n.length;u-- >0;)e.boolean.push(n[u]);for(c=e.string.length;c-- >0;)for(n=e.alias[e.string[c]]||[],u=n.length;u-- >0;)e.string.push(n[u]);if(f){for(r in e.default)if(s=typeof e.default[r],n=e.alias[r]=e.alias[r]||[],e[s]!==void 0)for(e[s].push(r),c=0;c<n.length;c++)e[s].push(n[c])}let g=h?Object.keys(e.alias):[];for(c=0;c<p;c++){if(i=t[c],i==="--"){a._=a._.concat(t.slice(++c));break}for(u=0;u<i.length&&i.charCodeAt(u)===45;u++);if(u===0)a._.push(i);else if(i.substring(u,u+3)==="no-"){if(s=i.substring(u+3),h&&!~g.indexOf(s))return e.unknown(i);a[s]=!1}else{for(l=u+1;l<i.length&&i.charCodeAt(l)!==61;l++);for(s=i.substring(u,l),o=i.substring(++l)||c+1===p||(""+t[c+1]).charCodeAt(0)===45||t[++c],n=u===2?[s]:s,l=0;l<n.length;l++){if(s=n[l],h&&!~g.indexOf(s))return e.unknown("-".repeat(u)+s);woe(a,s,l+1<n.length||o,e)}}}if(f)for(r in e.default)a[r]===void 0&&(a[r]=e.default[r]);if(d)for(r in a)for(n=e.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}});function Coe(t){let e=[],r=du.default.dirname(t);for(;r!==du.default.dirname(r);){let n=du.default.join(r,".prettierignore");$w.default.existsSync(n)&&e.push(n);let i=du.default.join(r,".git");if($w.default.existsSync(i))break;r=du.default.dirname(r)}return e}function Eoe(t){if(!t)return Lw.default;try{let r=(0,VN.createRequire)(t)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return Lw.default}}async function Ni(t,e,r,n){try{let i=du.default.resolve(t,n??"file.tsx"),s=Eoe(i);if(n){let a=Coe(i);if((await s.getFileInfo(i,{ignorePath:a.length>0?a:void 0})).ignored)return e}let o=await s.resolveConfig(i);return o?await s.format(e,{...o,filepath:n,parser:r}):await s.format(e,{filepath:n,parser:r})}catch{return e}}var Lw,VN,du,$w,Jf=N(()=>{"use strict";m();Lw=V(require("prettier"),1),VN=require("node:module"),du=V(require("node:path"),1),$w=V(require("node:fs"),1)});var jw,rp,Ly,$y,HN,fu,Uw,qw,mu,KN,np=N(()=>{"use strict";m();jw="preview-url",rp="framework",Ly="platform",$y="node",HN="/~builder-connect",fu="/~builder-connected",Uw="/~builder-dev-tools",qw="/~builder-dev-tools.js",mu="/~builder-dev-tools-close",KN="/mappings"});var jy=S((T5e,WN)=>{"use strict";m();var zw={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let r="";return t<0?r+=`\x1B[${-t}D`:t>0&&(r+=`\x1B[${t}C`),e<0?r+=`\x1B[${-e}A`:e>0&&(r+=`\x1B[${e}B`),r},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Soe={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},Toe={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?zw.up():"");return t&&(e+=zw.left),e}};WN.exports={cursor:zw,scroll:Soe,erase:Toe,beep:"\x07"}});var mr=S((P5e,Gw)=>{m();var qy=process||{},JN=qy.argv||[],Uy=qy.env||{},Aoe=!(Uy.NO_COLOR||JN.includes("--no-color"))&&(!!Uy.FORCE_COLOR||JN.includes("--color")||qy.platform==="win32"||(qy.stdout||{}).isTTY&&Uy.TERM!=="dumb"||!!Uy.CI),Poe=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+_oe(i,e,r,s)+e:t+i+e},_oe=(t,e,r,n)=>{let i="",s=0;do i+=t.substring(s,n)+r,s=n+e.length,n=t.indexOf(e,s);while(~n);return i+t.substring(s)},YN=(t=Aoe)=>{let e=t?Poe:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Gw.exports=YN();Gw.exports.createColors=YN});function Foe({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function aR(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(koe,"")}function cR(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Yf(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=aR(t),t.length===0))return 0;t=t.replace(Ooe()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Noe.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}function Loe(){let t=new Map;for(let[e,r]of Object.entries(or)){for(let[n,i]of Object.entries(r))or[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=or[n],t.set(i[0],i[1]);Object.defineProperty(or,e,{value:r,enumerable:!1})}return Object.defineProperty(or,"codes",{value:t,enumerable:!1}),or.color.close="\x1B[39m",or.bgColor.close="\x1B[49m",or.color.ansi=XN(),or.color.ansi256=ZN(),or.color.ansi16m=QN(),or.bgColor.ansi=XN(Vw),or.bgColor.ansi256=ZN(Vw),or.bgColor.ansi16m=QN(Vw),Object.defineProperties(or,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>or.rgbToAnsi256(...or.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>or.ansi256ToAnsi(or.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>or.ansi256ToAnsi(or.hexToAnsi256(e)),enumerable:!1}}),or}function rR(t,e,r){return String(t).normalize().replace(/\r\n/g,`
2
2
  `).split(`
3
3
  `).map(n=>Goe(n,e,r)).join(`
4
4
  `)}function Xw(t,e){if(typeof t=="string")return Gy.aliases.get(t)===e;for(let r of t)if(r!==void 0&&Xw(r,e))return!0;return!1}function Hoe(t,e){if(t===e)return;let r=t.split(`
@@ -11,7 +11,7 @@ var goe=Object.create;var My=Object.defineProperty;var yoe=Object.getOwnProperty
11
11
  `).length-1;this.output.write(vn.cursor.move(-999,e*-1))}render(){let e=rR(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(vn.cursor.hide);else{let r=Hoe(this._prevFrame,e);if(this.restoreCursor(),r&&r?.length===1){let n=r[0];this.output.write(vn.cursor.move(0,n)),this.output.write(vn.erase.lines(1));let i=e.split(`
12
12
  `);this.output.write(i[n]),this._prevFrame=e,this.output.write(vn.cursor.move(0,i.length-n-1));return}if(r&&r?.length>1){let n=r[0];this.output.write(vn.cursor.move(0,n)),this.output.write(vn.erase.down());let i=e.split(`
13
13
  `).slice(n);this.output.write(i.join(`
14
- `)),this._prevFrame=e;return}this.output.write(vn.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}},Vy=class extends ip{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",r=>{this.output.write(vn.cursor.move(0,-1)),this.value=r,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};Yoe=new WeakMap;Xoe=Object.defineProperty,Zoe=(t,e,r)=>e in t?Xoe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nR=(t,e,r)=>(Zoe(t,typeof e!="symbol"?e+"":e,r),r),fR=class extends ip{constructor(t){super(t,!1),nR(this,"options"),nR(this,"cursor",0),this.options=t.options,this.value=[...t.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===t.cursorAt),0),this.on("key",e=>{e==="a"&&this.toggleAll()}),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let t=this.value.length===this.options.length;this.value=t?[]:this.options.map(e=>e.value)}toggleValue(){let t=this.value.includes(this._value);this.value=t?this.value.filter(e=>e!==this._value):[...this.value,this._value]}},Qoe=Object.defineProperty,eae=(t,e,r)=>e in t?Qoe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,iR=(t,e,r)=>(eae(t,typeof e!="symbol"?e+"":e,r),r),Hy=class extends ip{constructor(e){super(e,!1),iR(this,"options"),iR(this,"cursor",0),this.options=e.options,this.cursor=this.options.findIndex(({value:r})=>r===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}},Ky=class extends ip{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let e=this.value.slice(0,this.cursor),[r,...n]=this.value.slice(this.cursor);return`${e}${oR.default.inverse(r)}${n.join("")}`}get cursor(){return this._cursor}constructor(e){super(e),this.on("finalize",()=>{this.value||(this.value=e.defaultValue)})}}});function tae(){return Yi.default.platform!=="win32"?Yi.default.env.TERM!=="linux":!!Yi.default.env.CI||!!Yi.default.env.WT_SESSION||!!Yi.default.env.TERMINUS_SUBLIME||Yi.default.env.ConEmuTask==="{cmd::Cmder}"||Yi.default.env.TERM_PROGRAM==="Terminus-Sublime"||Yi.default.env.TERM_PROGRAM==="vscode"||Yi.default.env.TERM==="xterm-256color"||Yi.default.env.TERM==="alacritty"||Yi.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var hu,Yi,J,Jy,Qw,Cr,rae,yR,bR,Xf,nae,nt,rc,eC,tC,iae,mR,sae,Lje,hR,oae,aae,cae,vR,xR,DR,wR,Yy,rC,St,hr,xn,nc,Zf,ge,Tt,Ir,I,gR,tc,mo,Bt=N(()=>{m();hu=require("node:util");Zw();Zw();Yi=V(require("node:process"),1),J=V(mr(),1),Jy=V(jy(),1);Qw=tae(),Cr=(t,e)=>Qw?t:e,rae=Cr("\u25C6","*"),yR=Cr("\u25A0","x"),bR=Cr("\u25B2","x"),Xf=Cr("\u25C7","o"),nae=Cr("\u250C","T"),nt=Cr("\u2502","|"),rc=Cr("\u2514","\u2014"),eC=Cr("\u25CF",">"),tC=Cr("\u25CB"," "),iae=Cr("\u25FB","[\u2022]"),mR=Cr("\u25FC","[+]"),sae=Cr("\u25FB","[ ]"),Lje=Cr("\u25AA","\u2022"),hR=Cr("\u2500","-"),oae=Cr("\u256E","+"),aae=Cr("\u251C","+"),cae=Cr("\u256F","+"),vR=Cr("\u25CF","\u2022"),xR=Cr("\u25C6","*"),DR=Cr("\u25B2","!"),wR=Cr("\u25A0","x"),Yy=t=>{switch(t){case"initial":case"active":return J.default.cyan(rae);case"cancel":return J.default.red(yR);case"error":return J.default.yellow(bR);case"submit":return J.default.green(Xf)}},rC=t=>{let{cursor:e,options:r,style:n}=t,i=t.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),o=Math.min(s,Math.max(i,5)),a=0;e>=a+o-3?a=Math.max(Math.min(e-o+3,r.length-o),0):e<a+2&&(a=Math.max(e-2,0));let c=o<r.length&&a>0,u=o<r.length&&a+o<r.length;return r.slice(a,a+o).map((l,p,d)=>{let h=p===0&&c,f=p===d.length-1&&u;return h||f?J.default.dim("..."):n(l,p+a===e)})},St=t=>new Ky({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,render(){let e=`${J.default.gray(nt)}
14
+ `)),this._prevFrame=e;return}this.output.write(vn.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}},Vy=class extends ip{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",r=>{this.output.write(vn.cursor.move(0,-1)),this.value=r,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};Yoe=new WeakMap;Xoe=Object.defineProperty,Zoe=(t,e,r)=>e in t?Xoe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nR=(t,e,r)=>(Zoe(t,typeof e!="symbol"?e+"":e,r),r),fR=class extends ip{constructor(t){super(t,!1),nR(this,"options"),nR(this,"cursor",0),this.options=t.options,this.value=[...t.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===t.cursorAt),0),this.on("key",e=>{e==="a"&&this.toggleAll()}),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let t=this.value.length===this.options.length;this.value=t?[]:this.options.map(e=>e.value)}toggleValue(){let t=this.value.includes(this._value);this.value=t?this.value.filter(e=>e!==this._value):[...this.value,this._value]}},Qoe=Object.defineProperty,eae=(t,e,r)=>e in t?Qoe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,iR=(t,e,r)=>(eae(t,typeof e!="symbol"?e+"":e,r),r),Hy=class extends ip{constructor(e){super(e,!1),iR(this,"options"),iR(this,"cursor",0),this.options=e.options,this.cursor=this.options.findIndex(({value:r})=>r===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}},Ky=class extends ip{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let e=this.value.slice(0,this.cursor),[r,...n]=this.value.slice(this.cursor);return`${e}${oR.default.inverse(r)}${n.join("")}`}get cursor(){return this._cursor}constructor(e){super(e),this.on("finalize",()=>{this.value||(this.value=e.defaultValue)})}}});function tae(){return Yi.default.platform!=="win32"?Yi.default.env.TERM!=="linux":!!Yi.default.env.CI||!!Yi.default.env.WT_SESSION||!!Yi.default.env.TERMINUS_SUBLIME||Yi.default.env.ConEmuTask==="{cmd::Cmder}"||Yi.default.env.TERM_PROGRAM==="Terminus-Sublime"||Yi.default.env.TERM_PROGRAM==="vscode"||Yi.default.env.TERM==="xterm-256color"||Yi.default.env.TERM==="alacritty"||Yi.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var hu,Yi,J,Jy,Qw,Cr,rae,yR,bR,Xf,nae,nt,rc,eC,tC,iae,mR,sae,L5e,hR,oae,aae,cae,vR,xR,DR,wR,Yy,rC,St,hr,xn,nc,Zf,ge,Tt,Ir,I,gR,tc,mo,Bt=N(()=>{m();hu=require("node:util");Zw();Zw();Yi=V(require("node:process"),1),J=V(mr(),1),Jy=V(jy(),1);Qw=tae(),Cr=(t,e)=>Qw?t:e,rae=Cr("\u25C6","*"),yR=Cr("\u25A0","x"),bR=Cr("\u25B2","x"),Xf=Cr("\u25C7","o"),nae=Cr("\u250C","T"),nt=Cr("\u2502","|"),rc=Cr("\u2514","\u2014"),eC=Cr("\u25CF",">"),tC=Cr("\u25CB"," "),iae=Cr("\u25FB","[\u2022]"),mR=Cr("\u25FC","[+]"),sae=Cr("\u25FB","[ ]"),L5e=Cr("\u25AA","\u2022"),hR=Cr("\u2500","-"),oae=Cr("\u256E","+"),aae=Cr("\u251C","+"),cae=Cr("\u256F","+"),vR=Cr("\u25CF","\u2022"),xR=Cr("\u25C6","*"),DR=Cr("\u25B2","!"),wR=Cr("\u25A0","x"),Yy=t=>{switch(t){case"initial":case"active":return J.default.cyan(rae);case"cancel":return J.default.red(yR);case"error":return J.default.yellow(bR);case"submit":return J.default.green(Xf)}},rC=t=>{let{cursor:e,options:r,style:n}=t,i=t.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),o=Math.min(s,Math.max(i,5)),a=0;e>=a+o-3?a=Math.max(Math.min(e-o+3,r.length-o),0):e<a+2&&(a=Math.max(e-2,0));let c=o<r.length&&a>0,u=o<r.length&&a+o<r.length;return r.slice(a,a+o).map((l,p,d)=>{let h=p===0&&c,f=p===d.length-1&&u;return h||f?J.default.dim("..."):n(l,p+a===e)})},St=t=>new Ky({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,render(){let e=`${J.default.gray(nt)}
15
15
  ${Yy(this.state)} ${t.message}
16
16
  `,r=t.placeholder?J.default.inverse(t.placeholder[0])+J.default.dim(t.placeholder.slice(1)):J.default.inverse(J.default.hidden("_")),n=this.value?this.valueWithCursor:r;switch(this.state){case"error":return`${e.trim()}
17
17
  ${J.default.yellow(nt)} ${n}
@@ -72,8 +72,8 @@ ${gR}${n.trimStart()}`),r=3+(0,hu.stripVTControlCharacters)(n.trimStart()).lengt
72
72
  `):process.stdout.write(`${C} ${a}
73
73
  `),f(),i()};return{start:D,stop:w,message:(v="")=>{a=y(v??a)}}}});function pt(t,e=""){return t.ts.createSourceFile("module.tsx",typeof e=="string"?e:"",t.ts.ScriptTarget.Latest,void 0)}function Xy(t,e=""){let r=pt(t,e?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${e}`);return r.statements[0]}function Gr(t,e,r){if(e){let n=t.ts.createPrinter({newLine:t.ts.NewLineKind.LineFeed,removeComments:r});return t.ts.isSourceFile(e)?n.printFile(e).trim()+`
74
74
  `:n.printNode(t.ts.EmitHint.Unspecified,e,t.ts.createSourceFile("module.tsx","",t.ts.ScriptTarget.Latest)).trim()+`
75
- `}return""}var gr=N(()=>{"use strict";m()});var ER=S((Gje,CR)=>{"use strict";m();CR.exports=function(){if(process.env.npm_config_user_agent)return uae(process.env.npm_config_user_agent)};function uae(t){let e=t.split(" ")[0],r=e.lastIndexOf("/"),n=e.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:e.substring(r+1)}}});function Bn(t){return t.endsWith(".mapper.tsx")||t.endsWith(".mapper.jsx")||t.endsWith(".mapper.ts")||t.endsWith(".mapper.js")||t.endsWith(".mapper.mjs")}function dt(t,e,r){e=Ms(e),r=Ms(r),e=t.dirname(e);let n=t.basename(r,t.extname(r));r=t.dirname(r);let i;return n==="index"?i=t.relative(e,r):i=t.relative(e,t.join(r,n)),i=Ms(t.normalize(i)),i.startsWith(".")||(i="./"+i),i}function Ms(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}function gu(t,e){let r=t.extname(e),n=t.basename(e,r).split(/[\/\\]/),i=n[n.length-1];return SR(i==="index"?t.basename(t.dirname(e)):i)}function SR(t){return Kt(t).replace(/ /g,"")}function Xi(t,e){let r=t.extname(e),n=Ms(t.basename(e,r)).split("/").pop();return Kt(n==="index"?t.basename(t.dirname(e)):n)}function Wt(t,e){let r=Ms(t.relative(t.getAppRootDir(),e));r=r.split("/").filter(i=>i!=="."&&i!==".."&&i!=="").join("/"),r.endsWith(".tsx")||r.endsWith(".jsx")?r=r.slice(0,-4):(r.endsWith(".ts")||r.endsWith(".js"))&&(r=r.slice(0,-3));let n=t.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(i=>i.name.includes("next"))?"@/"+r:"~/"+r}function At(t,e){let r=e,n=[];for(let i=0;i<2;i++){let s=t.basename(r);if(!s||s==="components")break;n.unshift(s),r=t.dirname(r)}return n.join("/")}function Kt(t){for(t=t.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();t.includes(" ");)t=t.replace(/ /g," ");return t.split(" ").map(e=>e.length>2?e[0].toUpperCase()+e.slice(1):e).join("").trim()}function ci(t){return t.sort((e,r)=>e.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function zt(t,e,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${e}`);return n&&(e=n),e=t.normalize(e),(await t.hash(e+"#"+r)).substring(0,8)}async function AR(t){return(await t.hash(t.getAppRootDir())).substring(0,8)}function Qf(t){return typeof t=="number"}function op(t){return typeof t=="boolean"}function Ln(t){return typeof t=="string"}function ap(t){return typeof t=="string"?/^[A-Z][A-Za-z0-9]*$/.test(t):!1}function Oi(t){return JSON.parse(JSON.stringify(t))}function Zy(t,e,r){for(let n of e)if(t.dirname(r).includes(n))return!0;return!1}function PR(){try{let t=(0,TR.default)();if(t?.name)return t.name}catch{}return"npm"}function lae(){return process.platform.startsWith("win")}function Jt(){return lae()?'"@builder.io/dev-tools"':"builder.io"}function nC(t){return t.replace(/[^a-zA-Z0-9-_]/g,"_")}var TR,it=N(()=>{"use strict";m();TR=V(ER(),1)});function $n(t){let e=t.join(t.getAppRootDir(),"tsconfig.json");return t.exists(e)}async function ui(t,e){async function r(i,s){if(s>10)return;let o=await t.readdir(i);for(let a of o){if(pae.includes(a))continue;let c=t.join(i,a),u=await t.stat(c);if(u){if(u.isFile()&&a.startsWith("builder-registry."))return c;if(u.isDirectory()){let l=await r(c,s+1);if(l)return l}}}}let n=await r(t.getAppRootDir(),0);if(!n){let s=`builder-registry.${await $n(t)?"ts":"js"}`;return t.join(e,s)}return n}async function Bs(t,e){let r=t.resolve("/");for(let n=0;n<20;n++){let i=t.join(e,"package.json"),s=await t.readFile(i);if(s)return JSON.parse(s);if(e===r)break;e=t.dirname(e)}return null}async function _R(t,e){for(let r=0;r<20;r++){let n=t.dirname(e),i=t.join(n,"node_modules");if(await t.exists(i))return i;if(e===t.getAppRootDir())break;e=t.dirname(e)}return t.join(t.getAppRootDir(),"node_modules")}async function em(t,e,r){let n=await t.readdir(e);return n.includes(r)?t.join(e,r):(await Promise.all(n.map(async s=>{if(s.startsWith(".")||s==="node_modules")return;let o=t.join(e,s);if((await t.stat(o)).isDirectory()){let c=await em(t,o,r);if(c)return c}}))).find(s=>typeof s=="string")}var pae,Dn=N(()=>{"use strict";m();pae=["node_modules","dist","build","public"]});async function Lr(t,e,r){if(!Array.isArray(e)||e.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${e}`);let n=await _R(t,e[0]),i=t.join(n,"typescript","lib"),s=new Map,o={fileExists:a=>{if(a=t.normalize(a),a.includes("node_modules")){let c=tm.get(a);if(!c){try{t.statSync(a).isFile()?c={exists:!0,content:t.readFileSync(a)}:c={exists:!1}}catch{c={exists:!1}}tm.set(a,c)}return c.exists}if(!s.has(a))if(t.existsSync(a)){let u=t.statSync(a);s.set(a,u.isFile())}else s.set(a,!1);return s.get(a)},getCanonicalFileName:a=>t.normalize(a),getCurrentDirectory:()=>t.cwd(),getDefaultLibFileName:()=>t.join(i,"lib.d.ts"),getDefaultLibLocation:()=>i,getNewLine:()=>`
76
- `,getSourceFile:a=>{if(a=t.normalize(a),a.includes("node_modules")){let u=tm.get(a);if(u)return pt(t,u.content)}let c;try{c=t.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let u=t.basename(a),l=t.extname(u).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(c=kR.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new eb(u)}return a.includes("node_modules")&&(c?tm.set(a,{exists:!0,content:c}):tm.set(a,{exists:!1})),pt(t,c)},readFile:a=>{let c=t.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return dae(t,o,e,r)}catch(a){if(a instanceof eb){await fae(t,a.libName);continue}throw t.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${e[0]}`,{cause:a})}}function dae(t,e,r,n){let i={rootNames:[...r],host:e,options:{}},s=t.ts.findConfigFile(t.dirname(r[0]),o=>t.existsSync(o));if(s){let o=FR.get(s);if(!o){let a=t.ts.readConfigFile(s,c=>{let u=t.readFileSync(c);return typeof u=="string"?u:void 0});a.error?t.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(o=t.ts.parseJsonConfigFileContent(a.config,t.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(u,l)=>t.readdirSync(u),fileExists:u=>t.existsSync(u),readFile:u=>t.readFileSync(u)||void 0},t.dirname(s),void 0,s).options,FR.set(s,o))}o&&(i.options=Oi(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=t.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),t.ts.createProgram(i)}async function cp(t,e,r){r||(r=await Lr(t,[e]));let n=r.getSourceFile(e);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${e}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}async function fae(t,e){let r=`https://cdn.jsdelivr.net/npm/typescript@${t.ts.version}/lib/${e}`;Qy.has(e)||Qy.set(e,fetch(r).then(n=>n.text()).then(n=>{kR.set(e,n)})),await Qy.get(e),Qy.delete(e)}async function IR(t,e){let r=await t.readFile(e.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${e.filePath}`}],code:null,output:null}:iC(t,{code:r,filePath:e.filePath,compilerOptions:e.compilerOptions})}function iC(t,e){let r={diagnostics:[],code:e.code,output:null};try{let n=t.ts.transpileModule(e.code,{compilerOptions:e.compilerOptions,fileName:e.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(i=>{r.diagnostics.push({messageText:String(i.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var eb,kR,Qy,tm,FR,Zi=N(()=>{"use strict";m();gr();it();Dn();eb=class{libName;constructor(e){this.libName=e}};kR=new Map,Qy=new Map,tm=new Map,FR=new Map});var mae,Ve,Nr=N(()=>{"use strict";m();mae="1.18.49",Ve=process.env.OVERRIDE_VERSION??mae});async function yu(t){let e=[],r=await Bs(t,t.getRepoRootDir());if(r){let n=await RR(r,t);e.push(...n)}return e}async function RR(t,e){let r=[];if(t&&typeof t=="object"){let n=new Set(Object.keys({...t.dependencies,...t.devDependencies}));for(let i of hae)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};NR.has(i)&&(s.version=await NR.get(i)(e)),r.push(s)}}return r}function sC(t){let e=parseInt(t);return Number.isNaN(e)?void 0:e}var NR,hae,bu=N(()=>{"use strict";m();Dn();it();NR=new Map([["next",async t=>{if(!t.spawnSync)return;let e=PR(),r=e==="npm"?"npx":e,{stdout:n}=t.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let i=n.match(/(Next.js v)([\d.]+)/g);if(!i)return;let s=i[0].split("Next.js v")[1],[o,a,c]=s.split(".");return{major:sC(o),minor:sC(a),patch:sC(c)}}]]),hae=["@shopify/remix-oxygen","@shopify/hydrogen","@builder.io/qwik-city","@remix-run/react","@sveltejs/kit","astro","gatsby","next","nuxt","@builder.io/qwik","@angular/core","react","solid-js","svelte","vue"]});async function Qi(t){let e=OR(t),r=await t.readFile(e);return typeof r=="string"?JSON.parse(r):{}}async function es(t,e){e=typeof e=="object"&&e!=null?e:{};let r=OR(t);await t.writeFile(r,JSON.stringify(e??{},null,2))}function OR(t){let e=t.getAppRootDir();return t.join(e,"node_modules",".builder","builder-cache.json")}var vu=N(()=>{"use strict";m()});async function ho(t,e,r){let n={envKey:r,envValue:null,file:""};for(let i of e){let s=t.join(t.getAppRootDir(),i),o=await gae(t,s);if(o){let a=o[r];if(typeof a=="string"&&a.length>0&&a!=="YOUR_API_KEY")return n.envValue=a,n.file=s,n}}return n.file=t.join(t.getAppRootDir(),e[e.length-1]),n}async function gae(t,e){let r=await t.readFile(e);return typeof r=="string"?MR(r):null}function MR(t){let e={},r=t.replace(/\r\n?/gm,`
75
+ `}return""}var gr=N(()=>{"use strict";m()});var ER=S((G5e,CR)=>{"use strict";m();CR.exports=function(){if(process.env.npm_config_user_agent)return uae(process.env.npm_config_user_agent)};function uae(t){let e=t.split(" ")[0],r=e.lastIndexOf("/"),n=e.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:e.substring(r+1)}}});function Bn(t){return t.endsWith(".mapper.tsx")||t.endsWith(".mapper.jsx")||t.endsWith(".mapper.ts")||t.endsWith(".mapper.js")||t.endsWith(".mapper.mjs")}function dt(t,e,r){e=Ms(e),r=Ms(r),e=t.dirname(e);let n=t.basename(r,t.extname(r));r=t.dirname(r);let i;return n==="index"?i=t.relative(e,r):i=t.relative(e,t.join(r,n)),i=Ms(t.normalize(i)),i.startsWith(".")||(i="./"+i),i}function Ms(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}function gu(t,e){let r=t.extname(e),n=t.basename(e,r).split(/[\/\\]/),i=n[n.length-1];return SR(i==="index"?t.basename(t.dirname(e)):i)}function SR(t){return Kt(t).replace(/ /g,"")}function Xi(t,e){let r=t.extname(e),n=Ms(t.basename(e,r)).split("/").pop();return Kt(n==="index"?t.basename(t.dirname(e)):n)}function Wt(t,e){let r=Ms(t.relative(t.getAppRootDir(),e));r=r.split("/").filter(i=>i!=="."&&i!==".."&&i!=="").join("/"),r.endsWith(".tsx")||r.endsWith(".jsx")?r=r.slice(0,-4):(r.endsWith(".ts")||r.endsWith(".js"))&&(r=r.slice(0,-3));let n=t.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(i=>i.name.includes("next"))?"@/"+r:"~/"+r}function At(t,e){let r=e,n=[];for(let i=0;i<2;i++){let s=t.basename(r);if(!s||s==="components")break;n.unshift(s),r=t.dirname(r)}return n.join("/")}function Kt(t){for(t=t.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();t.includes(" ");)t=t.replace(/ /g," ");return t.split(" ").map(e=>e.length>2?e[0].toUpperCase()+e.slice(1):e).join("").trim()}function ci(t){return t.sort((e,r)=>e.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function zt(t,e,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${e}`);return n&&(e=n),e=t.normalize(e),(await t.hash(e+"#"+r)).substring(0,8)}async function AR(t){return(await t.hash(t.getAppRootDir())).substring(0,8)}function Qf(t){return typeof t=="number"}function op(t){return typeof t=="boolean"}function Ln(t){return typeof t=="string"}function ap(t){return typeof t=="string"?/^[A-Z][A-Za-z0-9]*$/.test(t):!1}function Oi(t){return JSON.parse(JSON.stringify(t))}function Zy(t,e,r){for(let n of e)if(t.dirname(r).includes(n))return!0;return!1}function PR(){try{let t=(0,TR.default)();if(t?.name)return t.name}catch{}return"npm"}function lae(){return process.platform.startsWith("win")}function Jt(){return lae()?'"@builder.io/dev-tools"':"builder.io"}function nC(t){return t.replace(/[^a-zA-Z0-9-_]/g,"_")}var TR,it=N(()=>{"use strict";m();TR=V(ER(),1)});function $n(t){let e=t.join(t.getAppRootDir(),"tsconfig.json");return t.exists(e)}async function ui(t,e){async function r(i,s){if(s>10)return;let o=await t.readdir(i);for(let a of o){if(pae.includes(a))continue;let c=t.join(i,a),u=await t.stat(c);if(u){if(u.isFile()&&a.startsWith("builder-registry."))return c;if(u.isDirectory()){let l=await r(c,s+1);if(l)return l}}}}let n=await r(t.getAppRootDir(),0);if(!n){let s=`builder-registry.${await $n(t)?"ts":"js"}`;return t.join(e,s)}return n}async function Bs(t,e){let r=t.resolve("/");for(let n=0;n<20;n++){let i=t.join(e,"package.json"),s=await t.readFile(i);if(s)return JSON.parse(s);if(e===r)break;e=t.dirname(e)}return null}async function _R(t,e){for(let r=0;r<20;r++){let n=t.dirname(e),i=t.join(n,"node_modules");if(await t.exists(i))return i;if(e===t.getAppRootDir())break;e=t.dirname(e)}return t.join(t.getAppRootDir(),"node_modules")}async function em(t,e,r){let n=await t.readdir(e);return n.includes(r)?t.join(e,r):(await Promise.all(n.map(async s=>{if(s.startsWith(".")||s==="node_modules")return;let o=t.join(e,s);if((await t.stat(o)).isDirectory()){let c=await em(t,o,r);if(c)return c}}))).find(s=>typeof s=="string")}var pae,Dn=N(()=>{"use strict";m();pae=["node_modules","dist","build","public"]});async function Lr(t,e,r){if(!Array.isArray(e)||e.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${e}`);let n=await _R(t,e[0]),i=t.join(n,"typescript","lib"),s=new Map,o={fileExists:a=>{if(a=t.normalize(a),a.includes("node_modules")){let c=tm.get(a);if(!c){try{t.statSync(a).isFile()?c={exists:!0,content:t.readFileSync(a)}:c={exists:!1}}catch{c={exists:!1}}tm.set(a,c)}return c.exists}if(!s.has(a))if(t.existsSync(a)){let u=t.statSync(a);s.set(a,u.isFile())}else s.set(a,!1);return s.get(a)},getCanonicalFileName:a=>t.normalize(a),getCurrentDirectory:()=>t.cwd(),getDefaultLibFileName:()=>t.join(i,"lib.d.ts"),getDefaultLibLocation:()=>i,getNewLine:()=>`
76
+ `,getSourceFile:a=>{if(a=t.normalize(a),a.includes("node_modules")){let u=tm.get(a);if(u)return pt(t,u.content)}let c;try{c=t.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let u=t.basename(a),l=t.extname(u).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(c=kR.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new eb(u)}return a.includes("node_modules")&&(c?tm.set(a,{exists:!0,content:c}):tm.set(a,{exists:!1})),pt(t,c)},readFile:a=>{let c=t.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return dae(t,o,e,r)}catch(a){if(a instanceof eb){await fae(t,a.libName);continue}throw t.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${e[0]}`,{cause:a})}}function dae(t,e,r,n){let i={rootNames:[...r],host:e,options:{}},s=t.ts.findConfigFile(t.dirname(r[0]),o=>t.existsSync(o));if(s){let o=FR.get(s);if(!o){let a=t.ts.readConfigFile(s,c=>{let u=t.readFileSync(c);return typeof u=="string"?u:void 0});a.error?t.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(o=t.ts.parseJsonConfigFileContent(a.config,t.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(u,l)=>t.readdirSync(u),fileExists:u=>t.existsSync(u),readFile:u=>t.readFileSync(u)||void 0},t.dirname(s),void 0,s).options,FR.set(s,o))}o&&(i.options=Oi(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=t.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),t.ts.createProgram(i)}async function cp(t,e,r){r||(r=await Lr(t,[e]));let n=r.getSourceFile(e);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${e}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}async function fae(t,e){let r=`https://cdn.jsdelivr.net/npm/typescript@${t.ts.version}/lib/${e}`;Qy.has(e)||Qy.set(e,fetch(r).then(n=>n.text()).then(n=>{kR.set(e,n)})),await Qy.get(e),Qy.delete(e)}async function IR(t,e){let r=await t.readFile(e.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${e.filePath}`}],code:null,output:null}:iC(t,{code:r,filePath:e.filePath,compilerOptions:e.compilerOptions})}function iC(t,e){let r={diagnostics:[],code:e.code,output:null};try{let n=t.ts.transpileModule(e.code,{compilerOptions:e.compilerOptions,fileName:e.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(i=>{r.diagnostics.push({messageText:String(i.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var eb,kR,Qy,tm,FR,Zi=N(()=>{"use strict";m();gr();it();Dn();eb=class{libName;constructor(e){this.libName=e}};kR=new Map,Qy=new Map,tm=new Map,FR=new Map});var mae,Ve,Nr=N(()=>{"use strict";m();mae="1.18.50",Ve=process.env.OVERRIDE_VERSION??mae});async function yu(t){let e=[],r=await Bs(t,t.getRepoRootDir());if(r){let n=await RR(r,t);e.push(...n)}return e}async function RR(t,e){let r=[];if(t&&typeof t=="object"){let n=new Set(Object.keys({...t.dependencies,...t.devDependencies}));for(let i of hae)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};NR.has(i)&&(s.version=await NR.get(i)(e)),r.push(s)}}return r}function sC(t){let e=parseInt(t);return Number.isNaN(e)?void 0:e}var NR,hae,bu=N(()=>{"use strict";m();Dn();it();NR=new Map([["next",async t=>{if(!t.spawnSync)return;let e=PR(),r=e==="npm"?"npx":e,{stdout:n}=t.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let i=n.match(/(Next.js v)([\d.]+)/g);if(!i)return;let s=i[0].split("Next.js v")[1],[o,a,c]=s.split(".");return{major:sC(o),minor:sC(a),patch:sC(c)}}]]),hae=["@shopify/remix-oxygen","@shopify/hydrogen","@builder.io/qwik-city","@remix-run/react","@sveltejs/kit","astro","gatsby","next","nuxt","@builder.io/qwik","@angular/core","react","solid-js","svelte","vue"]});async function Qi(t){let e=OR(t),r=await t.readFile(e);return typeof r=="string"?JSON.parse(r):{}}async function es(t,e){e=typeof e=="object"&&e!=null?e:{};let r=OR(t);await t.writeFile(r,JSON.stringify(e??{},null,2))}function OR(t){let e=t.getAppRootDir();return t.join(e,"node_modules",".builder","builder-cache.json")}var vu=N(()=>{"use strict";m()});async function ho(t,e,r){let n={envKey:r,envValue:null,file:""};for(let i of e){let s=t.join(t.getAppRootDir(),i),o=await gae(t,s);if(o){let a=o[r];if(typeof a=="string"&&a.length>0&&a!=="YOUR_API_KEY")return n.envValue=a,n.file=s,n}}return n.file=t.join(t.getAppRootDir(),e[e.length-1]),n}async function gae(t,e){let r=await t.readFile(e);return typeof r=="string"?MR(r):null}function MR(t){let e={},r=t.replace(/\r\n?/gm,`
77
77
  `),n;for(;(n=yae.exec(r))!=null;){let i=n[1],s=n[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
78
78
  `),s=s.replace(/\\r/g,"\r")),e[i]=s}return e}async function go(t,e,r,n){let i="# https://www.builder.io/c/docs/using-your-api-key",s=await t.readFile(e);try{if(s)if(s.includes(r))if(s.includes(n))t.debug(`"${r}" with "${n}" already set in ${e}`);else return t.debug(`Replace "${r}" in ${e}`),s=s.replace(new RegExp(`${r}=.*`),`${r}=${n}`),await t.writeFile(e,s),"update";else return t.debug(`Append "${r}" to ${e}`),s+=`
79
79
 
@@ -1106,7 +1106,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),G=$,U=H),se===void 0&&
1106
1106
  `:`
1107
1107
  `)+r,i=n+1,n=t.indexOf(`
1108
1108
  `,i)}while(n!==-1);return s+=t.slice(i),s}var WL=N(()=>{m()});function Am(t){return ZL(t)}var JL,YL,SE,Pp,Tm,XL,_p,cde,Ob,ZL,TE,ude,lde,AE,Mb,pde,yYe,bYe,QL=N(()=>{m();UL();VL();WL();({stdout:JL,stderr:YL}=GL),SE=Symbol("GENERATOR"),Pp=Symbol("STYLER"),Tm=Symbol("IS_EMPTY"),XL=["ansi","ansi","ansi256","ansi16m"],_p=Object.create(null),cde=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=JL?JL.level:0;t.level=e.level===void 0?r:e.level},Ob=class{constructor(e){return ZL(e)}},ZL=t=>{let e=(...r)=>r.join(" ");return cde(e,t),Object.setPrototypeOf(e,Am.prototype),e};Object.setPrototypeOf(Am.prototype,Function.prototype);for(let[t,e]of Object.entries(qs))_p[t]={get(){let r=Mb(this,AE(e.open,e.close,this[Pp]),this[Tm]);return Object.defineProperty(this,t,{value:r}),r}};_p.visible={get(){let t=Mb(this,this[Pp],!0);return Object.defineProperty(this,"visible",{value:t}),t}};TE=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?qs[r].ansi16m(...n):e==="ansi256"?qs[r].ansi256(qs.rgbToAnsi256(...n)):qs[r].ansi(qs.rgbToAnsi(...n)):t==="hex"?TE("rgb",e,r,...qs.hexToRgb(...n)):qs[r][t](...n),ude=["rgb","hex","ansi256"];for(let t of ude){_p[t]={get(){let{level:r}=this;return function(...n){let i=AE(TE(t,XL[r],"color",...n),qs.color.close,this[Pp]);return Mb(this,i,this[Tm])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);_p[e]={get(){let{level:r}=this;return function(...n){let i=AE(TE(t,XL[r],"bgColor",...n),qs.bgColor.close,this[Pp]);return Mb(this,i,this[Tm])}}}}lde=Object.defineProperties(()=>{},{..._p,level:{enumerable:!0,get(){return this[SE].level},set(t){this[SE].level=t}}}),AE=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},Mb=(t,e,r)=>{let n=(...i)=>pde(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,lde),n[SE]=t,n[Pp]=e,n[Tm]=r,n},pde=(t,e)=>{if(t.level<=0||!e)return t[Tm]?"":e;let r=t[Pp];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=HL(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
1109
- `);return s!==-1&&(e=KL(e,i,n,s)),n+e+i};Object.defineProperties(Am.prototype,_p);yYe=Am(),bYe=Am({level:YL?YL.level:0})});function Pm(t){let e=wE(t);return{highlight:r,highlightAuto:n,listLanguages:e.listLanguages,register:e.register,registerAlias:e.registerAlias,registered:e.registered};function r(i,s,o){let a=e.highlight(i,s),c=a.data;return{language:c.language,relevance:c.relevance,value:PE(o||e8,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let l=s;a={subset:l.subset},o=l.sheet}else o=s;let c=e.highlightAuto(i,a),u=c.data;return{language:u.language,relevance:u.relevance,value:PE(o||e8,c)}}}function PE(t,e){let r=new Set(e.type==="element"&&Array.isArray(e.properties.className)?e.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in t)if(Object.hasOwn(t,o)){let a=o.split(" "),c=t[o];r.has(a[0])?a.length===1?i=c:n[a.slice(1).join(" ")]=c:n[o]=c}return"value"in e?s=e.value:"children"in e&&(s=dde(n,e.children)),i&&(s=i(s)),s}function dde(t,e){let r=[],n=-1;for(;++n<e.length;)r.push(PE(t,e[n]));return r.join("")}var at,e8,t8=N(()=>{m();QL();CE();at=new Ob({level:2}),e8={comment:at.gray,quote:at.gray,keyword:at.green,"selector-tag":at.green,addition:at.green,number:at.cyan,string:at.cyan,"meta meta-string":at.cyan,literal:at.cyan,doctag:at.cyan,regexp:at.cyan,title:at.blue,section:at.blue,name:at.blue,"selector-id":at.blue,"selector-class":at.blue,attribute:at.yellow,attr:at.yellow,variable:at.yellow,"template-variable":at.yellow,"class title":at.yellow,type:at.yellow,symbol:at.magenta,bullet:at.magenta,subst:at.magenta,meta:at.magenta,"meta keyword":at.magenta,"selector-attr":at.magenta,"selector-pseudo":at.magenta,link:at.magenta,built_in:at.red,deletion:at.red,emphasis:at.italic,strong:at.bold,formula:at.inverse}});var _E=N(()=>{m();CE();t8()});async function pe(t){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([r8.flush(2e3),n8.flush().promise])}catch(e){console.error(e)}process.exit(t)}var r8,n8,is=N(()=>{"use strict";m();r8=V(require("@sentry/node"),1),n8=V(require("@amplitude/analytics-node"),1)});var Be,ln=N(()=>{"use strict";m();Be=process.env.AIR_HOST||"https://api.builder.io"});var s8,i8=N(()=>{s8="1.18.49"});var a8=S(FE=>{m();var o8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");FE.encode=function(t){if(0<=t&&t<o8.length)return o8[t];throw new TypeError("Must be between 0 and 63: "+t)};FE.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,c=47,u=26,l=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:s<=t&&t<=o?t-s+l:t==a?62:t==c?63:-1}});var NE=S(IE=>{m();var c8=a8(),kE=5,u8=1<<kE,l8=u8-1,p8=u8;function mde(t){return t<0?(-t<<1)+1:(t<<1)+0}function hde(t){var e=(t&1)===1,r=t>>1;return e?-r:r}IE.encode=function(e){var r="",n,i=mde(e);do n=i&l8,i>>>=kE,i>0&&(n|=p8),r+=c8.encode(n);while(i>0);return r};IE.decode=function(e,r,n){var i=e.length,s=0,o=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=c8.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&p8),c&=l8,s=s+(c<<o),o+=kE}while(a);n.value=hde(s),n.rest=r}});var kp=S(Wr=>{m();function gde(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Wr.getArg=gde;var d8=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,yde=/^data:.+\,.+$/;function _m(t){var e=t.match(d8);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Wr.urlParse=_m;function Fp(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Wr.urlGenerate=Fp;var bde=32;function vde(t){var e=[];return function(r){for(var n=0;n<e.length;n++)if(e[n].input===r){var i=e[0];return e[0]=e[n],e[n]=i,e[0].result}var s=t(r);return e.unshift({input:r,result:s}),e.length>bde&&e.pop(),s}}var RE=vde(function(e){var r=e,n=_m(e);if(n){if(!n.path)return e;r=n.path}for(var i=Wr.isAbsolute(r),s=[],o=0,a=0;;)if(o=a,a=r.indexOf("/",o),a===-1){s.push(r.slice(o));break}else for(s.push(r.slice(o,a));a<r.length&&r[a]==="/";)a++;for(var c,u=0,a=s.length-1;a>=0;a--)c=s[a],c==="."?s.splice(a,1):c===".."?u++:u>0&&(c===""?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,Fp(n)):r});Wr.normalize=RE;function f8(t,e){t===""&&(t="."),e===""&&(e=".");var r=_m(e),n=_m(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Fp(r);if(r||e.match(yde))return e;if(n&&!n.host&&!n.path)return n.host=e,Fp(n);var i=e.charAt(0)==="/"?e:RE(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Fp(n)):i}Wr.join=f8;Wr.isAbsolute=function(t){return t.charAt(0)==="/"||d8.test(t)};function xde(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Wr.relative=xde;var m8=(function(){var t=Object.create(null);return!("__proto__"in t)})();function h8(t){return t}function Dde(t){return g8(t)?"$"+t:t}Wr.toSetString=m8?h8:Dde;function wde(t){return g8(t)?t.slice(1):t}Wr.fromSetString=m8?h8:wde;function g8(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function Cde(t,e,r){var n=va(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:va(t.name,e.name)}Wr.compareByOriginalPositions=Cde;function Ede(t,e,r){var n;return n=t.originalLine-e.originalLine,n!==0||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:va(t.name,e.name)}Wr.compareByOriginalPositionsNoSource=Ede;function Sde(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=va(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:va(t.name,e.name)}Wr.compareByGeneratedPositionsDeflated=Sde;function Tde(t,e,r){var n=t.generatedColumn-e.generatedColumn;return n!==0||r||(n=va(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:va(t.name,e.name)}Wr.compareByGeneratedPositionsDeflatedNoLine=Tde;function va(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function Ade(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=va(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:va(t.name,e.name)}Wr.compareByGeneratedPositionsInflated=Ade;function Pde(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Wr.parseSourceMapInput=Pde;function _de(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=_m(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=f8(Fp(n),e)}return RE(e)}Wr.computeSourceURL=_de});var BE=S(y8=>{m();var OE=kp(),ME=Object.prototype.hasOwnProperty,ku=typeof Map<"u";function xa(){this._array=[],this._set=ku?new Map:Object.create(null)}xa.fromArray=function(e,r){for(var n=new xa,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};xa.prototype.size=function(){return ku?this._set.size:Object.getOwnPropertyNames(this._set).length};xa.prototype.add=function(e,r){var n=ku?e:OE.toSetString(e),i=ku?this.has(e):ME.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(ku?this._set.set(e,s):this._set[n]=s)};xa.prototype.has=function(e){if(ku)return this._set.has(e);var r=OE.toSetString(e);return ME.call(this._set,r)};xa.prototype.indexOf=function(e){if(ku){var r=this._set.get(e);if(r>=0)return r}else{var n=OE.toSetString(e);if(ME.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};xa.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};xa.prototype.toArray=function(){return this._array.slice()};y8.ArraySet=xa});var x8=S(v8=>{m();var b8=kp();function Fde(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||b8.compareByGeneratedPositionsInflated(t,e)<=0}function Bb(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Bb.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Bb.prototype.add=function(e){Fde(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Bb.prototype.toArray=function(){return this._sorted||(this._array.sort(b8.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};v8.MappingList=Bb});var LE=S(D8=>{m();var Fm=NE(),Er=kp(),Lb=BE().ArraySet,kde=x8().MappingList;function ss(t){t||(t={}),this._file=Er.getArg(t,"file",null),this._sourceRoot=Er.getArg(t,"sourceRoot",null),this._skipValidation=Er.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=Er.getArg(t,"ignoreInvalidMapping",!1),this._sources=new Lb,this._names=new Lb,this._mappings=new kde,this._sourcesContents=null}ss.prototype._version=3;ss.fromSourceMap=function(e,r){var n=e.sourceRoot,i=new ss(Object.assign(r||{},{file:e.file,sourceRoot:n}));return e.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,n!=null&&(o.source=Er.relative(n,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),i.addMapping(o)}),e.sources.forEach(function(s){var o=s;n!==null&&(o=Er.relative(n,s)),i._sources.has(o)||i._sources.add(o);var a=e.sourceContentFor(s);a!=null&&i.setSourceContent(s,a)}),i};ss.prototype.addMapping=function(e){var r=Er.getArg(e,"generated"),n=Er.getArg(e,"original",null),i=Er.getArg(e,"source",null),s=Er.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};ss.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Er.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Er.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Er.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ss.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=Er.relative(s,i));var o=new Lb,a=new Lb;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Er.join(n,c.source)),s!=null&&(c.source=Er.relative(s,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var l=c.source;l!=null&&!o.has(l)&&o.add(l);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=o,this._names=a,e.sources.forEach(function(c){var u=e.sourceContentFor(c);u!=null&&(n!=null&&(c=Er.join(n,c)),s!=null&&(c=Er.relative(s,c)),this.setSourceContent(c,u))},this)};ss.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};ss.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",c,u,l,p,d=this._mappings.toArray(),h=0,f=d.length;h<f;h++){if(u=d[h],c="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)c+=";",r++;else if(h>0){if(!Er.compareByGeneratedPositionsInflated(u,d[h-1]))continue;c+=","}c+=Fm.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),c+=Fm.encode(p-o),o=p,c+=Fm.encode(u.originalLine-1-i),i=u.originalLine-1,c+=Fm.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(l=this._names.indexOf(u.name),c+=Fm.encode(l-s),s=l)),a+=c}return a};ss.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Er.relative(r,n));var i=Er.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};ss.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};ss.prototype.toString=function(){return JSON.stringify(this.toJSON())};D8.SourceMapGenerator=ss});var w8=S(Iu=>{m();Iu.GREATEST_LOWER_BOUND=1;Iu.LEAST_UPPER_BOUND=2;function $E(t,e,r,n,i,s){var o=Math.floor((e-t)/2)+t,a=i(r,n[o],!0);return a===0?o:a>0?e-o>1?$E(o,e,r,n,i,s):s==Iu.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?$E(t,o,r,n,i,s):s==Iu.LEAST_UPPER_BOUND?o:t<0?-1:t}Iu.search=function(e,r,n,i){if(r.length===0)return-1;var s=$E(-1,r.length,e,r,n,i||Iu.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var S8=S(E8=>{m();function Ide(t){function e(i,s,o){var a=i[s];i[s]=i[o],i[o]=a}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,o,a){if(o<a){var c=r(o,a),u=o-1;e(i,c,a);for(var l=i[a],p=o;p<a;p++)s(i[p],l,!1)<=0&&(u+=1,e(i,u,p));e(i,u+1,p);var d=u+1;n(i,s,o,d-1),n(i,s,d+1,a)}}return n}function Nde(t){let e=Ide.toString();return new Function(`return ${e}`)()(t)}var C8=new WeakMap;E8.quickSort=function(t,e,r=0){let n=C8.get(e);n===void 0&&(n=Nde(e),C8.set(e,n)),n(t,e,r,t.length-1)}});var P8=S($b=>{m();var ye=kp(),UE=w8(),Ip=BE().ArraySet,Rde=NE(),km=S8().quickSort;function er(t,e){var r=t;return typeof t=="string"&&(r=ye.parseSourceMapInput(t)),r.sections!=null?new zs(r,e):new pn(r,e)}er.fromSourceMap=function(t,e){return pn.fromSourceMap(t,e)};er.prototype._version=3;er.prototype.__generatedMappings=null;Object.defineProperty(er.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});er.prototype.__originalMappings=null;Object.defineProperty(er.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});er.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};er.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};er.GENERATED_ORDER=1;er.ORIGINAL_ORDER=2;er.GREATEST_LOWER_BOUND=1;er.LEAST_UPPER_BOUND=2;er.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||er.GENERATED_ORDER,o;switch(s){case er.GENERATED_ORDER:o=this._generatedMappings;break;case er.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,c=e.bind(i),u=this._names,l=this._sources,p=this._sourceMapURL,d=0,h=o.length;d<h;d++){var f=o[d],g=f.source===null?null:l.at(f.source);g!==null&&(g=ye.computeSourceURL(a,g,p)),c({source:g,generatedLine:f.generatedLine,generatedColumn:f.generatedColumn,originalLine:f.originalLine,originalColumn:f.originalColumn,name:f.name===null?null:u.at(f.name)})}};er.prototype.allGeneratedPositionsFor=function(e){var r=ye.getArg(e,"line"),n={source:ye.getArg(e,"source"),originalLine:r,originalColumn:ye.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ye.compareByOriginalPositions,UE.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)i.push({line:ye.getArg(o,"generatedLine",null),column:ye.getArg(o,"generatedColumn",null),lastColumn:ye.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==c;)i.push({line:ye.getArg(o,"generatedLine",null),column:ye.getArg(o,"generatedColumn",null),lastColumn:ye.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};$b.SourceMapConsumer=er;function pn(t,e){var r=t;typeof t=="string"&&(r=ye.parseSourceMapInput(t));var n=ye.getArg(r,"version"),i=ye.getArg(r,"sources"),s=ye.getArg(r,"names",[]),o=ye.getArg(r,"sourceRoot",null),a=ye.getArg(r,"sourcesContent",null),c=ye.getArg(r,"mappings"),u=ye.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=ye.normalize(o)),i=i.map(String).map(ye.normalize).map(function(l){return o&&ye.isAbsolute(o)&&ye.isAbsolute(l)?ye.relative(o,l):l}),this._names=Ip.fromArray(s.map(String),!0),this._sources=Ip.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(l){return ye.computeSourceURL(o,l,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=u}pn.prototype=Object.create(er.prototype);pn.prototype.consumer=er;pn.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=ye.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};pn.fromSourceMap=function(e,r){var n=Object.create(pn.prototype),i=n._names=Ip.fromArray(e._names.toArray(),!0),s=n._sources=Ip.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(h){return ye.computeSourceURL(n.sourceRoot,h,r)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,l=o.length;u<l;u++){var p=o[u],d=new A8;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=s.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return km(n.__originalMappings,ye.compareByOriginalPositions),n};pn.prototype._version=3;Object.defineProperty(pn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function A8(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var jE=ye.compareByGeneratedPositionsDeflatedNoLine;function T8(t,e){let r=t.length,n=t.length-e;if(!(n<=1))if(n==2){let i=t[e],s=t[e+1];jE(i,s)>0&&(t[e]=s,t[e+1]=i)}else if(n<20)for(let i=e;i<r;i++)for(let s=i;s>e;s--){let o=t[s-1],a=t[s];if(jE(o,a)<=0)break;t[s-1]=a,t[s]=o}else km(t,jE,e)}pn.prototype._parseMappings=function(e,r){var n=1,i=0,s=0,o=0,a=0,c=0,u=e.length,l=0,p={},d={},h=[],f=[],g,y,b,D,w;let v=0;for(;l<u;)if(e.charAt(l)===";")n++,l++,i=0,T8(f,v),v=f.length;else if(e.charAt(l)===",")l++;else{for(g=new A8,g.generatedLine=n,D=l;D<u&&!this._charIsMappingSeparator(e,D);D++);for(y=e.slice(l,D),b=[];l<D;)Rde.decode(e,l,d),w=d.value,l=d.rest,b.push(w);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=i+b[0],i=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=s+b[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+b[3],o=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),f.push(g),typeof g.originalLine=="number"){let C=g.source;for(;h.length<=C;)h.push(null);h[C]===null&&(h[C]=[]),h[C].push(g)}}T8(f,v),this.__generatedMappings=f;for(var x=0;x<h.length;x++)h[x]!=null&&km(h[x],ye.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...h)};pn.prototype._findMapping=function(e,r,n,i,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return UE.search(e,r,s,o)};pn.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};pn.prototype.originalPositionFor=function(e){var r={generatedLine:ye.getArg(e,"line"),generatedColumn:ye.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",ye.compareByGeneratedPositionsDeflated,ye.getArg(e,"bias",er.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=ye.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=ye.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=ye.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:ye.getArg(i,"originalLine",null),column:ye.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};pn.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};pn.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=ye.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=ye.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};pn.prototype.generatedPositionFor=function(e){var r=ye.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:ye.getArg(e,"line"),originalColumn:ye.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ye.compareByOriginalPositions,ye.getArg(e,"bias",er.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:ye.getArg(s,"generatedLine",null),column:ye.getArg(s,"generatedColumn",null),lastColumn:ye.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};$b.BasicSourceMapConsumer=pn;function zs(t,e){var r=t;typeof t=="string"&&(r=ye.parseSourceMapInput(t));var n=ye.getArg(r,"version"),i=ye.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Ip,this._names=new Ip;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=ye.getArg(o,"offset"),c=ye.getArg(a,"line"),u=ye.getArg(a,"column");if(c<s.line||c===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new er(ye.getArg(o,"map"),e)}})}zs.prototype=Object.create(er.prototype);zs.prototype.constructor=er;zs.prototype._version=3;Object.defineProperty(zs.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});zs.prototype.originalPositionFor=function(e){var r={generatedLine:ye.getArg(e,"line"),generatedColumn:ye.getArg(e,"column")},n=UE.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};zs.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};zs.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};zs.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(ye.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};zs.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=i.consumer._sources.at(a.source);c!==null&&(c=ye.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var l={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(l),typeof l.originalLine=="number"&&this.__originalMappings.push(l)}km(this.__generatedMappings,ye.compareByGeneratedPositionsDeflated),km(this.__originalMappings,ye.compareByOriginalPositions)};$b.IndexedSourceMapConsumer=zs});var F8=S(_8=>{m();var Ode=LE().SourceMapGenerator,jb=kp(),Mde=/(\r?\n)/,Bde=10,Np="$$$isSourceNode$$$";function Bi(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[Np]=!0,n!=null&&this.add(n)}Bi.fromStringWithSourceMap=function(e,r,n){var i=new Bi,s=e.split(Mde),o=0,a=function(){var d=f(),h=f()||"";return d+h;function f(){return o<s.length?s[o++]:void 0}},c=1,u=0,l=null;return r.eachMapping(function(d){if(l!==null)if(c<d.generatedLine)p(l,a()),c++,u=0;else{var h=s[o]||"",f=h.substr(0,d.generatedColumn-u);s[o]=h.substr(d.generatedColumn-u),u=d.generatedColumn,p(l,f),l=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(u<d.generatedColumn){var h=s[o]||"";i.add(h.substr(0,d.generatedColumn)),s[o]=h.substr(d.generatedColumn),u=d.generatedColumn}l=d},this),o<s.length&&(l&&p(l,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(d){var h=r.sourceContentFor(d);h!=null&&(n!=null&&(d=jb.join(n,d)),i.setSourceContent(d,h))}),i;function p(d,h){if(d===null||d.source===void 0)i.add(h);else{var f=n?jb.join(n,d.source):d.source;i.add(new Bi(d.originalLine,d.originalColumn,f,h,d.name))}}};Bi.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Np]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Bi.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Np]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Bi.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Np]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Bi.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};Bi.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Np]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};Bi.prototype.setSourceContent=function(e,r){this.sourceContents[jb.toSetString(e)]=r};Bi.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Np]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(jb.fromSetString(i[r]),this.sourceContents[i[r]])};Bi.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Bi.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new Ode(e),i=!1,s=null,o=null,a=null,c=null;return this.walk(function(u,l){r.code+=u,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||c!==l.name)&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,c=l.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===Bde?(r.line++,r.column=0,p+1===d?(s=null,i=!1):i&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(u,l){n.setSourceContent(u,l)}),{code:r.code,map:n}};_8.SourceNode=Bi});var k8=S(Ub=>{m();Ub.SourceMapGenerator=LE().SourceMapGenerator;Ub.SourceMapConsumer=P8().SourceMapConsumer;Ub.SourceNode=F8().SourceNode});var c$=S(Um=>{"use strict";m();Object.defineProperty(Um,"__esModule",{value:!0});function Lde(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}var Fo=class{constructor(e,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=r,this.index=n}},Lp=class{constructor(e,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=r}};function zn(t,e){let{line:r,column:n,index:i}=t;return new Fo(r,n+e,i+e)}var I8="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",$de={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:I8},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:I8}},N8={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Gb=t=>t.type==="UpdateExpression"?N8.UpdateExpression[`${t.prefix}`]:N8[t.type],jde={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:t})=>`Missing initializer in ${t} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:t})=>`'import.${t}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
1109
+ `);return s!==-1&&(e=KL(e,i,n,s)),n+e+i};Object.defineProperties(Am.prototype,_p);yYe=Am(),bYe=Am({level:YL?YL.level:0})});function Pm(t){let e=wE(t);return{highlight:r,highlightAuto:n,listLanguages:e.listLanguages,register:e.register,registerAlias:e.registerAlias,registered:e.registered};function r(i,s,o){let a=e.highlight(i,s),c=a.data;return{language:c.language,relevance:c.relevance,value:PE(o||e8,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let l=s;a={subset:l.subset},o=l.sheet}else o=s;let c=e.highlightAuto(i,a),u=c.data;return{language:u.language,relevance:u.relevance,value:PE(o||e8,c)}}}function PE(t,e){let r=new Set(e.type==="element"&&Array.isArray(e.properties.className)?e.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in t)if(Object.hasOwn(t,o)){let a=o.split(" "),c=t[o];r.has(a[0])?a.length===1?i=c:n[a.slice(1).join(" ")]=c:n[o]=c}return"value"in e?s=e.value:"children"in e&&(s=dde(n,e.children)),i&&(s=i(s)),s}function dde(t,e){let r=[],n=-1;for(;++n<e.length;)r.push(PE(t,e[n]));return r.join("")}var at,e8,t8=N(()=>{m();QL();CE();at=new Ob({level:2}),e8={comment:at.gray,quote:at.gray,keyword:at.green,"selector-tag":at.green,addition:at.green,number:at.cyan,string:at.cyan,"meta meta-string":at.cyan,literal:at.cyan,doctag:at.cyan,regexp:at.cyan,title:at.blue,section:at.blue,name:at.blue,"selector-id":at.blue,"selector-class":at.blue,attribute:at.yellow,attr:at.yellow,variable:at.yellow,"template-variable":at.yellow,"class title":at.yellow,type:at.yellow,symbol:at.magenta,bullet:at.magenta,subst:at.magenta,meta:at.magenta,"meta keyword":at.magenta,"selector-attr":at.magenta,"selector-pseudo":at.magenta,link:at.magenta,built_in:at.red,deletion:at.red,emphasis:at.italic,strong:at.bold,formula:at.inverse}});var _E=N(()=>{m();CE();t8()});async function pe(t){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([r8.flush(2e3),n8.flush().promise])}catch(e){console.error(e)}process.exit(t)}var r8,n8,is=N(()=>{"use strict";m();r8=V(require("@sentry/node"),1),n8=V(require("@amplitude/analytics-node"),1)});var Be,ln=N(()=>{"use strict";m();Be=process.env.AIR_HOST||"https://api.builder.io"});var s8,i8=N(()=>{s8="1.18.50"});var a8=S(FE=>{m();var o8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");FE.encode=function(t){if(0<=t&&t<o8.length)return o8[t];throw new TypeError("Must be between 0 and 63: "+t)};FE.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,c=47,u=26,l=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:s<=t&&t<=o?t-s+l:t==a?62:t==c?63:-1}});var NE=S(IE=>{m();var c8=a8(),kE=5,u8=1<<kE,l8=u8-1,p8=u8;function mde(t){return t<0?(-t<<1)+1:(t<<1)+0}function hde(t){var e=(t&1)===1,r=t>>1;return e?-r:r}IE.encode=function(e){var r="",n,i=mde(e);do n=i&l8,i>>>=kE,i>0&&(n|=p8),r+=c8.encode(n);while(i>0);return r};IE.decode=function(e,r,n){var i=e.length,s=0,o=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=c8.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&p8),c&=l8,s=s+(c<<o),o+=kE}while(a);n.value=hde(s),n.rest=r}});var kp=S(Wr=>{m();function gde(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Wr.getArg=gde;var d8=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,yde=/^data:.+\,.+$/;function _m(t){var e=t.match(d8);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Wr.urlParse=_m;function Fp(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Wr.urlGenerate=Fp;var bde=32;function vde(t){var e=[];return function(r){for(var n=0;n<e.length;n++)if(e[n].input===r){var i=e[0];return e[0]=e[n],e[n]=i,e[0].result}var s=t(r);return e.unshift({input:r,result:s}),e.length>bde&&e.pop(),s}}var RE=vde(function(e){var r=e,n=_m(e);if(n){if(!n.path)return e;r=n.path}for(var i=Wr.isAbsolute(r),s=[],o=0,a=0;;)if(o=a,a=r.indexOf("/",o),a===-1){s.push(r.slice(o));break}else for(s.push(r.slice(o,a));a<r.length&&r[a]==="/";)a++;for(var c,u=0,a=s.length-1;a>=0;a--)c=s[a],c==="."?s.splice(a,1):c===".."?u++:u>0&&(c===""?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,Fp(n)):r});Wr.normalize=RE;function f8(t,e){t===""&&(t="."),e===""&&(e=".");var r=_m(e),n=_m(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Fp(r);if(r||e.match(yde))return e;if(n&&!n.host&&!n.path)return n.host=e,Fp(n);var i=e.charAt(0)==="/"?e:RE(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Fp(n)):i}Wr.join=f8;Wr.isAbsolute=function(t){return t.charAt(0)==="/"||d8.test(t)};function xde(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Wr.relative=xde;var m8=(function(){var t=Object.create(null);return!("__proto__"in t)})();function h8(t){return t}function Dde(t){return g8(t)?"$"+t:t}Wr.toSetString=m8?h8:Dde;function wde(t){return g8(t)?t.slice(1):t}Wr.fromSetString=m8?h8:wde;function g8(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function Cde(t,e,r){var n=va(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:va(t.name,e.name)}Wr.compareByOriginalPositions=Cde;function Ede(t,e,r){var n;return n=t.originalLine-e.originalLine,n!==0||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:va(t.name,e.name)}Wr.compareByOriginalPositionsNoSource=Ede;function Sde(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=va(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:va(t.name,e.name)}Wr.compareByGeneratedPositionsDeflated=Sde;function Tde(t,e,r){var n=t.generatedColumn-e.generatedColumn;return n!==0||r||(n=va(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:va(t.name,e.name)}Wr.compareByGeneratedPositionsDeflatedNoLine=Tde;function va(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function Ade(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=va(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:va(t.name,e.name)}Wr.compareByGeneratedPositionsInflated=Ade;function Pde(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Wr.parseSourceMapInput=Pde;function _de(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=_m(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=f8(Fp(n),e)}return RE(e)}Wr.computeSourceURL=_de});var BE=S(y8=>{m();var OE=kp(),ME=Object.prototype.hasOwnProperty,ku=typeof Map<"u";function xa(){this._array=[],this._set=ku?new Map:Object.create(null)}xa.fromArray=function(e,r){for(var n=new xa,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};xa.prototype.size=function(){return ku?this._set.size:Object.getOwnPropertyNames(this._set).length};xa.prototype.add=function(e,r){var n=ku?e:OE.toSetString(e),i=ku?this.has(e):ME.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(ku?this._set.set(e,s):this._set[n]=s)};xa.prototype.has=function(e){if(ku)return this._set.has(e);var r=OE.toSetString(e);return ME.call(this._set,r)};xa.prototype.indexOf=function(e){if(ku){var r=this._set.get(e);if(r>=0)return r}else{var n=OE.toSetString(e);if(ME.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};xa.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};xa.prototype.toArray=function(){return this._array.slice()};y8.ArraySet=xa});var x8=S(v8=>{m();var b8=kp();function Fde(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||b8.compareByGeneratedPositionsInflated(t,e)<=0}function Bb(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Bb.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Bb.prototype.add=function(e){Fde(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Bb.prototype.toArray=function(){return this._sorted||(this._array.sort(b8.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};v8.MappingList=Bb});var LE=S(D8=>{m();var Fm=NE(),Er=kp(),Lb=BE().ArraySet,kde=x8().MappingList;function ss(t){t||(t={}),this._file=Er.getArg(t,"file",null),this._sourceRoot=Er.getArg(t,"sourceRoot",null),this._skipValidation=Er.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=Er.getArg(t,"ignoreInvalidMapping",!1),this._sources=new Lb,this._names=new Lb,this._mappings=new kde,this._sourcesContents=null}ss.prototype._version=3;ss.fromSourceMap=function(e,r){var n=e.sourceRoot,i=new ss(Object.assign(r||{},{file:e.file,sourceRoot:n}));return e.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,n!=null&&(o.source=Er.relative(n,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),i.addMapping(o)}),e.sources.forEach(function(s){var o=s;n!==null&&(o=Er.relative(n,s)),i._sources.has(o)||i._sources.add(o);var a=e.sourceContentFor(s);a!=null&&i.setSourceContent(s,a)}),i};ss.prototype.addMapping=function(e){var r=Er.getArg(e,"generated"),n=Er.getArg(e,"original",null),i=Er.getArg(e,"source",null),s=Er.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};ss.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Er.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Er.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Er.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ss.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=Er.relative(s,i));var o=new Lb,a=new Lb;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Er.join(n,c.source)),s!=null&&(c.source=Er.relative(s,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var l=c.source;l!=null&&!o.has(l)&&o.add(l);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=o,this._names=a,e.sources.forEach(function(c){var u=e.sourceContentFor(c);u!=null&&(n!=null&&(c=Er.join(n,c)),s!=null&&(c=Er.relative(s,c)),this.setSourceContent(c,u))},this)};ss.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};ss.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",c,u,l,p,d=this._mappings.toArray(),h=0,f=d.length;h<f;h++){if(u=d[h],c="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)c+=";",r++;else if(h>0){if(!Er.compareByGeneratedPositionsInflated(u,d[h-1]))continue;c+=","}c+=Fm.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),c+=Fm.encode(p-o),o=p,c+=Fm.encode(u.originalLine-1-i),i=u.originalLine-1,c+=Fm.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(l=this._names.indexOf(u.name),c+=Fm.encode(l-s),s=l)),a+=c}return a};ss.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Er.relative(r,n));var i=Er.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};ss.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};ss.prototype.toString=function(){return JSON.stringify(this.toJSON())};D8.SourceMapGenerator=ss});var w8=S(Iu=>{m();Iu.GREATEST_LOWER_BOUND=1;Iu.LEAST_UPPER_BOUND=2;function $E(t,e,r,n,i,s){var o=Math.floor((e-t)/2)+t,a=i(r,n[o],!0);return a===0?o:a>0?e-o>1?$E(o,e,r,n,i,s):s==Iu.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?$E(t,o,r,n,i,s):s==Iu.LEAST_UPPER_BOUND?o:t<0?-1:t}Iu.search=function(e,r,n,i){if(r.length===0)return-1;var s=$E(-1,r.length,e,r,n,i||Iu.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var S8=S(E8=>{m();function Ide(t){function e(i,s,o){var a=i[s];i[s]=i[o],i[o]=a}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,o,a){if(o<a){var c=r(o,a),u=o-1;e(i,c,a);for(var l=i[a],p=o;p<a;p++)s(i[p],l,!1)<=0&&(u+=1,e(i,u,p));e(i,u+1,p);var d=u+1;n(i,s,o,d-1),n(i,s,d+1,a)}}return n}function Nde(t){let e=Ide.toString();return new Function(`return ${e}`)()(t)}var C8=new WeakMap;E8.quickSort=function(t,e,r=0){let n=C8.get(e);n===void 0&&(n=Nde(e),C8.set(e,n)),n(t,e,r,t.length-1)}});var P8=S($b=>{m();var ye=kp(),UE=w8(),Ip=BE().ArraySet,Rde=NE(),km=S8().quickSort;function er(t,e){var r=t;return typeof t=="string"&&(r=ye.parseSourceMapInput(t)),r.sections!=null?new zs(r,e):new pn(r,e)}er.fromSourceMap=function(t,e){return pn.fromSourceMap(t,e)};er.prototype._version=3;er.prototype.__generatedMappings=null;Object.defineProperty(er.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});er.prototype.__originalMappings=null;Object.defineProperty(er.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});er.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};er.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};er.GENERATED_ORDER=1;er.ORIGINAL_ORDER=2;er.GREATEST_LOWER_BOUND=1;er.LEAST_UPPER_BOUND=2;er.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||er.GENERATED_ORDER,o;switch(s){case er.GENERATED_ORDER:o=this._generatedMappings;break;case er.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,c=e.bind(i),u=this._names,l=this._sources,p=this._sourceMapURL,d=0,h=o.length;d<h;d++){var f=o[d],g=f.source===null?null:l.at(f.source);g!==null&&(g=ye.computeSourceURL(a,g,p)),c({source:g,generatedLine:f.generatedLine,generatedColumn:f.generatedColumn,originalLine:f.originalLine,originalColumn:f.originalColumn,name:f.name===null?null:u.at(f.name)})}};er.prototype.allGeneratedPositionsFor=function(e){var r=ye.getArg(e,"line"),n={source:ye.getArg(e,"source"),originalLine:r,originalColumn:ye.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ye.compareByOriginalPositions,UE.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)i.push({line:ye.getArg(o,"generatedLine",null),column:ye.getArg(o,"generatedColumn",null),lastColumn:ye.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==c;)i.push({line:ye.getArg(o,"generatedLine",null),column:ye.getArg(o,"generatedColumn",null),lastColumn:ye.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};$b.SourceMapConsumer=er;function pn(t,e){var r=t;typeof t=="string"&&(r=ye.parseSourceMapInput(t));var n=ye.getArg(r,"version"),i=ye.getArg(r,"sources"),s=ye.getArg(r,"names",[]),o=ye.getArg(r,"sourceRoot",null),a=ye.getArg(r,"sourcesContent",null),c=ye.getArg(r,"mappings"),u=ye.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=ye.normalize(o)),i=i.map(String).map(ye.normalize).map(function(l){return o&&ye.isAbsolute(o)&&ye.isAbsolute(l)?ye.relative(o,l):l}),this._names=Ip.fromArray(s.map(String),!0),this._sources=Ip.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(l){return ye.computeSourceURL(o,l,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=u}pn.prototype=Object.create(er.prototype);pn.prototype.consumer=er;pn.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=ye.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};pn.fromSourceMap=function(e,r){var n=Object.create(pn.prototype),i=n._names=Ip.fromArray(e._names.toArray(),!0),s=n._sources=Ip.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(h){return ye.computeSourceURL(n.sourceRoot,h,r)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,l=o.length;u<l;u++){var p=o[u],d=new A8;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=s.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return km(n.__originalMappings,ye.compareByOriginalPositions),n};pn.prototype._version=3;Object.defineProperty(pn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function A8(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var jE=ye.compareByGeneratedPositionsDeflatedNoLine;function T8(t,e){let r=t.length,n=t.length-e;if(!(n<=1))if(n==2){let i=t[e],s=t[e+1];jE(i,s)>0&&(t[e]=s,t[e+1]=i)}else if(n<20)for(let i=e;i<r;i++)for(let s=i;s>e;s--){let o=t[s-1],a=t[s];if(jE(o,a)<=0)break;t[s-1]=a,t[s]=o}else km(t,jE,e)}pn.prototype._parseMappings=function(e,r){var n=1,i=0,s=0,o=0,a=0,c=0,u=e.length,l=0,p={},d={},h=[],f=[],g,y,b,D,w;let v=0;for(;l<u;)if(e.charAt(l)===";")n++,l++,i=0,T8(f,v),v=f.length;else if(e.charAt(l)===",")l++;else{for(g=new A8,g.generatedLine=n,D=l;D<u&&!this._charIsMappingSeparator(e,D);D++);for(y=e.slice(l,D),b=[];l<D;)Rde.decode(e,l,d),w=d.value,l=d.rest,b.push(w);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=i+b[0],i=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=s+b[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+b[3],o=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),f.push(g),typeof g.originalLine=="number"){let C=g.source;for(;h.length<=C;)h.push(null);h[C]===null&&(h[C]=[]),h[C].push(g)}}T8(f,v),this.__generatedMappings=f;for(var x=0;x<h.length;x++)h[x]!=null&&km(h[x],ye.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...h)};pn.prototype._findMapping=function(e,r,n,i,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return UE.search(e,r,s,o)};pn.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};pn.prototype.originalPositionFor=function(e){var r={generatedLine:ye.getArg(e,"line"),generatedColumn:ye.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",ye.compareByGeneratedPositionsDeflated,ye.getArg(e,"bias",er.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=ye.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=ye.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=ye.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:ye.getArg(i,"originalLine",null),column:ye.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};pn.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};pn.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=ye.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=ye.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};pn.prototype.generatedPositionFor=function(e){var r=ye.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:ye.getArg(e,"line"),originalColumn:ye.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ye.compareByOriginalPositions,ye.getArg(e,"bias",er.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:ye.getArg(s,"generatedLine",null),column:ye.getArg(s,"generatedColumn",null),lastColumn:ye.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};$b.BasicSourceMapConsumer=pn;function zs(t,e){var r=t;typeof t=="string"&&(r=ye.parseSourceMapInput(t));var n=ye.getArg(r,"version"),i=ye.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Ip,this._names=new Ip;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=ye.getArg(o,"offset"),c=ye.getArg(a,"line"),u=ye.getArg(a,"column");if(c<s.line||c===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new er(ye.getArg(o,"map"),e)}})}zs.prototype=Object.create(er.prototype);zs.prototype.constructor=er;zs.prototype._version=3;Object.defineProperty(zs.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});zs.prototype.originalPositionFor=function(e){var r={generatedLine:ye.getArg(e,"line"),generatedColumn:ye.getArg(e,"column")},n=UE.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};zs.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};zs.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};zs.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(ye.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};zs.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=i.consumer._sources.at(a.source);c!==null&&(c=ye.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var l={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(l),typeof l.originalLine=="number"&&this.__originalMappings.push(l)}km(this.__generatedMappings,ye.compareByGeneratedPositionsDeflated),km(this.__originalMappings,ye.compareByOriginalPositions)};$b.IndexedSourceMapConsumer=zs});var F8=S(_8=>{m();var Ode=LE().SourceMapGenerator,jb=kp(),Mde=/(\r?\n)/,Bde=10,Np="$$$isSourceNode$$$";function Bi(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[Np]=!0,n!=null&&this.add(n)}Bi.fromStringWithSourceMap=function(e,r,n){var i=new Bi,s=e.split(Mde),o=0,a=function(){var d=f(),h=f()||"";return d+h;function f(){return o<s.length?s[o++]:void 0}},c=1,u=0,l=null;return r.eachMapping(function(d){if(l!==null)if(c<d.generatedLine)p(l,a()),c++,u=0;else{var h=s[o]||"",f=h.substr(0,d.generatedColumn-u);s[o]=h.substr(d.generatedColumn-u),u=d.generatedColumn,p(l,f),l=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(u<d.generatedColumn){var h=s[o]||"";i.add(h.substr(0,d.generatedColumn)),s[o]=h.substr(d.generatedColumn),u=d.generatedColumn}l=d},this),o<s.length&&(l&&p(l,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(d){var h=r.sourceContentFor(d);h!=null&&(n!=null&&(d=jb.join(n,d)),i.setSourceContent(d,h))}),i;function p(d,h){if(d===null||d.source===void 0)i.add(h);else{var f=n?jb.join(n,d.source):d.source;i.add(new Bi(d.originalLine,d.originalColumn,f,h,d.name))}}};Bi.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Np]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Bi.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Np]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Bi.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Np]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Bi.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};Bi.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Np]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};Bi.prototype.setSourceContent=function(e,r){this.sourceContents[jb.toSetString(e)]=r};Bi.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Np]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(jb.fromSetString(i[r]),this.sourceContents[i[r]])};Bi.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Bi.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new Ode(e),i=!1,s=null,o=null,a=null,c=null;return this.walk(function(u,l){r.code+=u,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||c!==l.name)&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,c=l.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===Bde?(r.line++,r.column=0,p+1===d?(s=null,i=!1):i&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(u,l){n.setSourceContent(u,l)}),{code:r.code,map:n}};_8.SourceNode=Bi});var k8=S(Ub=>{m();Ub.SourceMapGenerator=LE().SourceMapGenerator;Ub.SourceMapConsumer=P8().SourceMapConsumer;Ub.SourceNode=F8().SourceNode});var c$=S(Um=>{"use strict";m();Object.defineProperty(Um,"__esModule",{value:!0});function Lde(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}var Fo=class{constructor(e,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=r,this.index=n}},Lp=class{constructor(e,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=r}};function zn(t,e){let{line:r,column:n,index:i}=t;return new Fo(r,n+e,i+e)}var I8="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",$de={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:I8},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:I8}},N8={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Gb=t=>t.type==="UpdateExpression"?N8.UpdateExpression[`${t.prefix}`]:N8[t.type],jde={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:t})=>`Missing initializer in ${t} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:t})=>`'import.${t}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
1110
1110
  - Did you mean \`export { '${t}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:t})=>`'${t==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:t})=>`Unsyntactic ${t==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:t})=>`A string literal cannot be used as an imported binding.
1111
1111
  - Did you mean \`import { "${t}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:t})=>`\`import()\` requires exactly ${t===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${Gb(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${Gb(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${Gb(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:t})=>`Label '${t}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:t})=>`Unexpected keyword '${t}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:t})=>`Identifier '${t}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Ude={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},qde=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),zde={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${Gb({type:t})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},Gde=["message"];function R8(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:r})}function Vde({toMessage:t,code:e,reasonCode:r,syntaxPlugin:n}){let i=r==="MissingPlugin"||r==="MissingOneOfPlugins";{let s={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};s[r]&&(r=s[r])}return function s(o,a){let c=new SyntaxError;return c.code=e,c.reasonCode=r,c.loc=o,c.pos=o.index,c.syntaxPlugin=n,i&&(c.missingPlugin=a.missingPlugin),R8(c,"clone",function(l={}){var p;let{line:d,column:h,index:f}=(p=l.loc)!=null?p:o;return s(new Fo(d,h,f),Object.assign({},a,l.details))}),R8(c,"details",a),Object.defineProperty(c,"message",{configurable:!0,get(){let u=`${t(a)} (${o.line}:${o.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),c}}function Ea(t,e){if(Array.isArray(t))return n=>Ea(n,t[0]);let r={};for(let n of Object.keys(t)){let i=t[n],s=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:o}=s,a=Lde(s,Gde),c=typeof o=="string"?()=>o:o;r[n]=Vde(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:c},e?{syntaxPlugin:e}:{},a))}return r}var R=Object.assign({},Ea($de),Ea(jde),Ea(Ude),Ea`pipelineOperator`(zde)),{defineProperty:Hde}=Object,O8=(t,e)=>{t&&Hde(t,e,{enumerable:!1,value:t[e]})};function Im(t){return O8(t.loc.start,"index"),O8(t.loc.end,"index"),t}var Kde=t=>class extends t{parse(){let r=Im(super.parse());return this.options.tokens&&(r.tokens=r.tokens.map(Im)),r}parseRegExpLiteral({pattern:r,flags:n}){let i=null;try{i=new RegExp(r,n)}catch{}let s=this.estreeParseLiteral(i);return s.regex={pattern:r,flags:n},s}parseBigIntLiteral(r){let n;try{n=BigInt(r)}catch{n=null}let i=this.estreeParseLiteral(n);return i.bigint=String(i.value||r),i}parseDecimalLiteral(r){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||r),i}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}directiveToStmt(r){let n=r.value;delete r.value,n.type="Literal",n.raw=n.extra.raw,n.value=n.extra.expressionValue;let i=r;return i.type="ExpressionStatement",i.expression=n,i.directive=n.extra.rawValue,delete n.extra,i}initFunction(r,n){super.initFunction(r,n),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var n;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((n=r.expression.extra)!=null&&n.parenthesized)}parseBlockBody(r,n,i,s,o){super.parseBlockBody(r,n,i,s,o);let a=r.directives.map(c=>this.directiveToStmt(c));r.body=a.concat(r.body),delete r.directives}pushClassMethod(r,n,i,s,o,a){this.parseMethod(n,i,s,o,a,"ClassMethod",!0),n.typeParameters&&(n.value.typeParameters=n.typeParameters,delete n.typeParameters),r.body.push(n)}parsePrivateName(){let r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){let n=super.getPrivateNameSV(r);return r=r,delete r.id,r.name=n,r.type="PrivateIdentifier",r}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,n){let i=super.parseLiteral(r,n);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(r,n,i=!1){super.parseFunctionBody(r,n,i),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,n,i,s,o,a,c=!1){let u=this.startNode();return u.kind=r.kind,u=super.parseMethod(u,n,i,s,o,a,c),u.type="FunctionExpression",delete u.kind,r.value=u,a==="ClassPrivateMethod"&&(r.computed=!1),this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){let n=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition"),n}parseClassPrivateProperty(...r){let n=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition",n.computed=!1),n}parseObjectMethod(r,n,i,s,o){let a=super.parseObjectMethod(r,n,i,s,o);return a&&(a.type="Property",a.kind==="method"&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(r,n,i,s){let o=super.parseObjectProperty(r,n,i,s);return o&&(o.kind="init",o.type="Property"),o}isValidLVal(r,n,i){return r==="Property"?"value":super.isValidLVal(r,n,i)}isAssignable(r,n){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,n):super.isAssignable(r,n)}toAssignable(r,n=!1){if(r!=null&&this.isObjectProperty(r)){let{key:i,value:s}=r;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(s,n)}else super.toAssignable(r,n)}toAssignableObjectExpressionProp(r,n,i){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(R.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(R.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,n,i)}finishCallExpression(r,n){let i=super.finishCallExpression(r,n);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var s,o;i.options=(s=i.arguments[1])!=null?s:null,i.attributes=(o=i.arguments[1])!=null?o:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,n){let i=this.state.lastTokStartLoc,s=super.parseExport(r,n);switch(s.type){case"ExportAllDeclaration":s.exported=null;break;case"ExportNamedDeclaration":s.specifiers.length===1&&s.specifiers[0].type==="ExportNamespaceSpecifier"&&(s.type="ExportAllDeclaration",s.exported=s.specifiers[0].exported,delete s.specifiers);case"ExportDefaultDeclaration":{var o;let{declaration:a}=s;a?.type==="ClassDeclaration"&&((o=a.decorators)==null?void 0:o.length)>0&&a.start===s.start&&this.resetStartLocation(s,i)}break}return s}parseSubscript(r,n,i,s){let o=super.parseSubscript(r,n,i,s);if(s.optionalChainMember){if((o.type==="OptionalMemberExpression"||o.type==="OptionalCallExpression")&&(o.type=o.type.substring(8)),s.stop){let a=this.startNodeAtNode(o);return a.expression=o,this.finishNode(a,"ChainExpression")}}else(o.type==="MemberExpression"||o.type==="CallExpression")&&(o.optional=!1);return o}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}finishNodeAt(r,n,i){return Im(super.finishNodeAt(r,n,i))}resetStartLocation(r,n){super.resetStartLocation(r,n),Im(r)}resetEndLocation(r,n=this.state.lastTokEndLoc){super.resetEndLocation(r,n),Im(r)}},Ru=class{constructor(e,r){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!r}},Ot={brace:new Ru("{"),j_oTag:new Ru("<tag"),j_cTag:new Ru("</tag"),j_expr:new Ru("<tag>...</tag>",!0)};Ot.template=new Ru("`",!0);var Xe=!0,ae=!0,qE=!0,Nm=!0,fc=!0,Wde=!0,Kb=class{constructor(e,r={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},mS=new Map;function ct(t,e={}){e.keyword=t;let r=De(t,e);return mS.set(t,r),r}function qn(t,e){return De(t,{beforeExpr:Xe,binop:e})}var Bm=-1,wa=[],hS=[],gS=[],yS=[],bS=[],vS=[];function De(t,e={}){var r,n,i,s;return++Bm,hS.push(t),gS.push((r=e.binop)!=null?r:-1),yS.push((n=e.beforeExpr)!=null?n:!1),bS.push((i=e.startsExpr)!=null?i:!1),vS.push((s=e.prefix)!=null?s:!1),wa.push(new Kb(t,e)),Bm}function Ye(t,e={}){var r,n,i,s;return++Bm,mS.set(t,Bm),hS.push(t),gS.push((r=e.binop)!=null?r:-1),yS.push((n=e.beforeExpr)!=null?n:!1),bS.push((i=e.startsExpr)!=null?i:!1),vS.push((s=e.prefix)!=null?s:!1),wa.push(new Kb("name",e)),Bm}var Jde={bracketL:De("[",{beforeExpr:Xe,startsExpr:ae}),bracketHashL:De("#[",{beforeExpr:Xe,startsExpr:ae}),bracketBarL:De("[|",{beforeExpr:Xe,startsExpr:ae}),bracketR:De("]"),bracketBarR:De("|]"),braceL:De("{",{beforeExpr:Xe,startsExpr:ae}),braceBarL:De("{|",{beforeExpr:Xe,startsExpr:ae}),braceHashL:De("#{",{beforeExpr:Xe,startsExpr:ae}),braceR:De("}"),braceBarR:De("|}"),parenL:De("(",{beforeExpr:Xe,startsExpr:ae}),parenR:De(")"),comma:De(",",{beforeExpr:Xe}),semi:De(";",{beforeExpr:Xe}),colon:De(":",{beforeExpr:Xe}),doubleColon:De("::",{beforeExpr:Xe}),dot:De("."),question:De("?",{beforeExpr:Xe}),questionDot:De("?."),arrow:De("=>",{beforeExpr:Xe}),template:De("template"),ellipsis:De("...",{beforeExpr:Xe}),backQuote:De("`",{startsExpr:ae}),dollarBraceL:De("${",{beforeExpr:Xe,startsExpr:ae}),templateTail:De("...`",{startsExpr:ae}),templateNonTail:De("...${",{beforeExpr:Xe,startsExpr:ae}),at:De("@"),hash:De("#",{startsExpr:ae}),interpreterDirective:De("#!..."),eq:De("=",{beforeExpr:Xe,isAssign:Nm}),assign:De("_=",{beforeExpr:Xe,isAssign:Nm}),slashAssign:De("_=",{beforeExpr:Xe,isAssign:Nm}),xorAssign:De("_=",{beforeExpr:Xe,isAssign:Nm}),moduloAssign:De("_=",{beforeExpr:Xe,isAssign:Nm}),incDec:De("++/--",{prefix:fc,postfix:Wde,startsExpr:ae}),bang:De("!",{beforeExpr:Xe,prefix:fc,startsExpr:ae}),tilde:De("~",{beforeExpr:Xe,prefix:fc,startsExpr:ae}),doubleCaret:De("^^",{startsExpr:ae}),doubleAt:De("@@",{startsExpr:ae}),pipeline:qn("|>",0),nullishCoalescing:qn("??",1),logicalOR:qn("||",1),logicalAND:qn("&&",2),bitwiseOR:qn("|",3),bitwiseXOR:qn("^",4),bitwiseAND:qn("&",5),equality:qn("==/!=/===/!==",6),lt:qn("</>/<=/>=",7),gt:qn("</>/<=/>=",7),relational:qn("</>/<=/>=",7),bitShift:qn("<</>>/>>>",8),bitShiftL:qn("<</>>/>>>",8),bitShiftR:qn("<</>>/>>>",8),plusMin:De("+/-",{beforeExpr:Xe,binop:9,prefix:fc,startsExpr:ae}),modulo:De("%",{binop:10,startsExpr:ae}),star:De("*",{binop:10}),slash:qn("/",10),exponent:De("**",{beforeExpr:Xe,binop:11,rightAssociative:!0}),_in:ct("in",{beforeExpr:Xe,binop:7}),_instanceof:ct("instanceof",{beforeExpr:Xe,binop:7}),_break:ct("break"),_case:ct("case",{beforeExpr:Xe}),_catch:ct("catch"),_continue:ct("continue"),_debugger:ct("debugger"),_default:ct("default",{beforeExpr:Xe}),_else:ct("else",{beforeExpr:Xe}),_finally:ct("finally"),_function:ct("function",{startsExpr:ae}),_if:ct("if"),_return:ct("return",{beforeExpr:Xe}),_switch:ct("switch"),_throw:ct("throw",{beforeExpr:Xe,prefix:fc,startsExpr:ae}),_try:ct("try"),_var:ct("var"),_const:ct("const"),_with:ct("with"),_new:ct("new",{beforeExpr:Xe,startsExpr:ae}),_this:ct("this",{startsExpr:ae}),_super:ct("super",{startsExpr:ae}),_class:ct("class",{startsExpr:ae}),_extends:ct("extends",{beforeExpr:Xe}),_export:ct("export"),_import:ct("import",{startsExpr:ae}),_null:ct("null",{startsExpr:ae}),_true:ct("true",{startsExpr:ae}),_false:ct("false",{startsExpr:ae}),_typeof:ct("typeof",{beforeExpr:Xe,prefix:fc,startsExpr:ae}),_void:ct("void",{beforeExpr:Xe,prefix:fc,startsExpr:ae}),_delete:ct("delete",{beforeExpr:Xe,prefix:fc,startsExpr:ae}),_do:ct("do",{isLoop:qE,beforeExpr:Xe}),_for:ct("for",{isLoop:qE}),_while:ct("while",{isLoop:qE}),_as:Ye("as",{startsExpr:ae}),_assert:Ye("assert",{startsExpr:ae}),_async:Ye("async",{startsExpr:ae}),_await:Ye("await",{startsExpr:ae}),_defer:Ye("defer",{startsExpr:ae}),_from:Ye("from",{startsExpr:ae}),_get:Ye("get",{startsExpr:ae}),_let:Ye("let",{startsExpr:ae}),_meta:Ye("meta",{startsExpr:ae}),_of:Ye("of",{startsExpr:ae}),_sent:Ye("sent",{startsExpr:ae}),_set:Ye("set",{startsExpr:ae}),_source:Ye("source",{startsExpr:ae}),_static:Ye("static",{startsExpr:ae}),_using:Ye("using",{startsExpr:ae}),_yield:Ye("yield",{startsExpr:ae}),_asserts:Ye("asserts",{startsExpr:ae}),_checks:Ye("checks",{startsExpr:ae}),_exports:Ye("exports",{startsExpr:ae}),_global:Ye("global",{startsExpr:ae}),_implements:Ye("implements",{startsExpr:ae}),_intrinsic:Ye("intrinsic",{startsExpr:ae}),_infer:Ye("infer",{startsExpr:ae}),_is:Ye("is",{startsExpr:ae}),_mixins:Ye("mixins",{startsExpr:ae}),_proto:Ye("proto",{startsExpr:ae}),_require:Ye("require",{startsExpr:ae}),_satisfies:Ye("satisfies",{startsExpr:ae}),_keyof:Ye("keyof",{startsExpr:ae}),_readonly:Ye("readonly",{startsExpr:ae}),_unique:Ye("unique",{startsExpr:ae}),_abstract:Ye("abstract",{startsExpr:ae}),_declare:Ye("declare",{startsExpr:ae}),_enum:Ye("enum",{startsExpr:ae}),_module:Ye("module",{startsExpr:ae}),_namespace:Ye("namespace",{startsExpr:ae}),_interface:Ye("interface",{startsExpr:ae}),_type:Ye("type",{startsExpr:ae}),_opaque:Ye("opaque",{startsExpr:ae}),name:De("name",{startsExpr:ae}),string:De("string",{startsExpr:ae}),num:De("num",{startsExpr:ae}),bigint:De("bigint",{startsExpr:ae}),decimal:De("decimal",{startsExpr:ae}),regexp:De("regexp",{startsExpr:ae}),privateName:De("#name",{startsExpr:ae}),eof:De("eof"),jsxName:De("jsxName"),jsxText:De("jsxText",{beforeExpr:!0}),jsxTagStart:De("jsxTagStart",{startsExpr:!0}),jsxTagEnd:De("jsxTagEnd"),placeholder:De("%%",{startsExpr:!0})};function xt(t){return t>=93&&t<=132}function Yde(t){return t<=92}function Gs(t){return t>=58&&t<=132}function K8(t){return t>=58&&t<=136}function Xde(t){return yS[t]}function WE(t){return bS[t]}function Zde(t){return t>=29&&t<=33}function M8(t){return t>=129&&t<=131}function Qde(t){return t>=90&&t<=92}function xS(t){return t>=58&&t<=92}function efe(t){return t>=39&&t<=59}function tfe(t){return t===34}function rfe(t){return vS[t]}function nfe(t){return t>=121&&t<=123}function ife(t){return t>=124&&t<=130}function hc(t){return hS[t]}function Vb(t){return gS[t]}function sfe(t){return t===57}function Wb(t){return t>=24&&t<=25}function Da(t){return wa[t]}wa[8].updateContext=t=>{t.pop()},wa[5].updateContext=wa[7].updateContext=wa[23].updateContext=t=>{t.push(Ot.brace)},wa[22].updateContext=t=>{t[t.length-1]===Ot.template?t.pop():t.push(Ot.template)},wa[142].updateContext=t=>{t.push(Ot.j_expr,Ot.j_oTag)};var DS="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",W8="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",ofe=new RegExp("["+DS+"]"),afe=new RegExp("["+DS+W8+"]");DS=W8=null;var J8=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],cfe=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function JE(t,e){let r=65536;for(let n=0,i=e.length;n<i;n+=2){if(r+=e[n],r>t)return!1;if(r+=e[n+1],r>=t)return!0}return!1}function Ca(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&ofe.test(String.fromCharCode(t)):JE(t,J8)}function Op(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&afe.test(String.fromCharCode(t)):JE(t,J8)||JE(t,cfe)}var wS={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ufe=new Set(wS.keyword),lfe=new Set(wS.strict),pfe=new Set(wS.strictBind);function Y8(t,e){return e&&t==="await"||t==="enum"}function X8(t,e){return Y8(t,e)||lfe.has(t)}function Z8(t){return pfe.has(t)}function Q8(t,e){return X8(t,e)||Z8(t)}function dfe(t){return ufe.has(t)}function ffe(t,e,r){return t===64&&e===64&&Ca(r)}var mfe=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function hfe(t){return mfe.has(t)}var Lm=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}},$m=class{constructor(e,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&128)return!0;if(r&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Lm(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,r,n){let i=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(i,e,r,n);let s=i.names.get(e)||0;r&16?s=s|4:(i.firstLexicalName||(i.firstLexicalName=e),s=s|2),i.names.set(e,s),r&8&&this.maybeExportDefined(i,e)}else if(r&4)for(let s=this.scopeStack.length-1;s>=0&&(i=this.scopeStack[s],this.checkRedeclarationInScope(i,e,r,n),i.names.set(e,(i.names.get(e)||0)|1),this.maybeExportDefined(i,e),!(i.flags&387));--s);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,r){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(e,r,n,i){this.isRedeclaredInScope(e,r,n)&&this.parser.raise(R.VarRedeclaration,i,{identifierName:r})}isRedeclaredInScope(e,r,n){if(!(n&1))return!1;if(n&8)return e.names.has(r);let i=e.names.get(r);return n&16?(i&2)>0||!this.treatFunctionsAsVarInScope(e)&&(i&1)>0:(i&2)>0&&!(e.flags&8&&e.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(e)&&(i&4)>0}checkLocalExport(e){let{name:r}=e;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&387)return r}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&451&&!(r&4))return r}}},YE=class extends Lm{constructor(...e){super(...e),this.declareFunctions=new Set}},XE=class extends $m{createScope(e){return new YE(e)}declareName(e,r,n){let i=this.currentScope();if(r&2048){this.checkRedeclarationInScope(i,e,r,n),this.maybeExportDefined(i,e),i.declareFunctions.add(e);return}super.declareName(e,r,n)}isRedeclaredInScope(e,r,n){if(super.isRedeclaredInScope(e,r,n))return!0;if(n&2048&&!e.declareFunctions.has(r)){let i=e.names.get(r);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},ZE=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[r,n]=e;if(!this.hasPlugin(r))return!1;let i=this.plugins.get(r);for(let s of Object.keys(n))if(i?.[s]!==n[s])return!1;return!0}}getPluginOption(e,r){var n;return(n=this.plugins.get(e))==null?void 0:n[r]}};function e$(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function gfe(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function jm(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function Rm(t,e,r){let n=null,i=e.length;for(;n===null&&i>0;)n=e[--i];n===null||n.start>r.start?jm(t,r.comments):e$(n,r.comments)}var QE=class extends ZE{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let i=n-1,s=r[i];s.start===e.end&&(s.leadingNode=e,i--);let{start:o}=e;for(;i>=0;i--){let a=r[i],c=a.end;if(c>o)a.containingNode=e,this.finalizeComment(a),r.splice(i,1);else{c===o&&(a.trailingNode=e);break}}}finalizeComment(e){let{comments:r}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&e$(e.leadingNode,r),e.trailingNode!==null&&gfe(e.trailingNode,r);else{let{containingNode:n,start:i}=e;if(this.input.charCodeAt(i-1)===44)switch(n.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Rm(n,n.properties,e);break;case"CallExpression":case"OptionalCallExpression":Rm(n,n.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Rm(n,n.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Rm(n,n.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Rm(n,n.specifiers,e);break;default:jm(n,r)}else jm(n,r)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let r=e.length-1;r>=0;r--)this.finalizeComment(e[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:r}=this.state,{length:n}=r;if(n===0)return;let i=r[n-1];i.leadingNode===e&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(e){let{commentStack:r}=this.state,{length:n}=r;n!==0&&(r[n-1].trailingNode===e?r[n-1].trailingNode=null:n>=2&&r[n-2].trailingNode===e&&(r[n-2].trailingNode=null))}takeSurroundingComments(e,r,n){let{commentStack:i}=this.state,s=i.length;if(s===0)return;let o=s-1;for(;o>=0;o--){let a=i[o],c=a.end;if(a.start===n)a.leadingNode=e;else if(c===r)a.trailingNode=e;else if(c<r)break}}},yfe=/\r\n|[\r\n\u2028\u2029]/,qb=new RegExp(yfe.source,"g");function Mp(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function B8(t,e,r){for(let n=e;n<r;n++)if(Mp(t.charCodeAt(n)))return!0;return!1}var zE=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,GE=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function bfe(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var eS=class t{constructor(){this.flags=1024,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=139,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[Ot.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:r,startLine:n,startColumn:i}){this.strict=e===!1?!1:e===!0?!0:r==="module",this.curLine=n,this.lineStart=-i,this.startLoc=this.endLoc=new Fo(n,i,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new Fo(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let e=new t;return e.flags=this.flags,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},vfe=function(e){return e>=48&&e<=57},L8={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},zb={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function $8(t,e,r,n,i,s){let o=r,a=n,c=i,u="",l=null,p=r,{length:d}=e;for(;;){if(r>=d){s.unterminated(o,a,c),u+=e.slice(p,r);break}let h=e.charCodeAt(r);if(xfe(t,h,e,r)){u+=e.slice(p,r);break}if(h===92){u+=e.slice(p,r);let f=Dfe(e,r,n,i,t==="template",s);f.ch===null&&!l?l={pos:r,lineStart:n,curLine:i}:u+=f.ch,{pos:r,lineStart:n,curLine:i}=f,p=r}else h===8232||h===8233?(++r,++i,n=r):h===10||h===13?t==="template"?(u+=e.slice(p,r)+`
1112
1112
  `,++r,h===13&&e.charCodeAt(r)===10&&++r,++i,p=n=r):s.unterminated(o,a,c):++r}return{pos:r,str:u,firstInvalidLoc:l,lineStart:n,curLine:i,containsInvalid:!!l}}function xfe(t,e,r,n){return t==="template"?e===96||e===36&&r.charCodeAt(n+1)===123:e===(t==="double"?34:39)}function Dfe(t,e,r,n,i,s){let o=!i;e++;let a=u=>({pos:e,ch:u,lineStart:r,curLine:n}),c=t.charCodeAt(e++);switch(c){case 110:return a(`
@@ -1233,15 +1233,15 @@ The "grep_search" tool can be used to find the relevant part lines of a file.`)}
1233
1233
  Or make sure the command is copied correctly from the Figma plugin and the same builder space is being used.`),await pe(1);p&&({fileID:a,nodeId:c}=p)}if(!r)return[];let u=await $4(t,e,r,a,c),l=await Jhe(u[c],c);return l?[[o,l]]:[]}))).flat().filter(Xhe)}async function Jhe(t,e){let r=t.document;if(r.type!=="COMPONENT"&&r.type!=="COMPONENT_SET"){let i=`Seems like the pasted URL points to a ${r.type} node, not a COMPONENT or COMPONENT_SET.`;return r.type==="INSTANCE"&&(i+=`
1234
1234
  Double click and select "Go to main component", then copy the URL to the figma COMPONENT`),ge(i),await pe(1)}let n=t.components[e]?.key??t.componentSets[e]?.key;return n?(t.document.key=n,sh(t,e)):(ge("Pasted URL does not correspond to a component or component set"),await pe(1))}async function Cv(t,e,r,n,i){if(i.length>0){let s=await Yhe(t,e,r,i);for(let o of n)if(o.figmaUrl&&!o.figmaKey){let a=s[o.figmaUrl];a&&(o.figmaKey=a)}}}function Xhe(t){return t!=null}var L4,oh,Khe,No,$4,Whe,Yhe,Ev=N(()=>{"use strict";m();Bt();jr();is();L4=V(require("@sentry/node"),1);ln();Xr();ju();oh=t=>{try{let e=t.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\=/g,"=").replace(/\\\?/g,"?").replace(/\\\&/g,"&"),r=new URL(e);if(!r.hostname.includes("figma.com"))return console.log(`
1235
1235
  \u274C Not a Figma URL - hostname check failed`),null;let n=r.searchParams.get("node-id")?.replaceAll("-",":"),i=r.pathname.split("/")[2];return n&&i?{fileID:i,nodeId:n}:null}catch{return null}},Khe="https://api.figma.com/v1/",No=async(t,e,r,{auth:n,params:i})=>{let s=new URL(`${Khe}${r}`),o={};if(n.oauth?o.Authorization=`Bearer ${n.access_token}`:o["X-FIGMA-TOKEN"]=n.access_token,i)for(let c in i)i[c]!=null&&s.searchParams.set(c,i[c].toString());let a=await Pe(s,{headers:o});if(!a.ok){if(a.status===401){I.error("Seems like figma auth is expired or it's invalid, let's try to");let c=await jt(t,e,{force:!0,requireFigmaAuth:"always"});return No(t,e,r,{auth:c.figmaAuth,params:i})}throw new Error(`Figma REST ${a.statusText}: ${await a.text()}`)}return a.json()},$4=async(t,e,r,n,i,s)=>(await No(t,e,`files/${n}/nodes`,{auth:r,params:{ids:i,depth:s}})).nodes,Whe=/^[a-f0-9]{40}$/;Yhe=async(t,e,r,n)=>{if(!r)return{};let i=new Map,s={};return n.forEach(o=>{let a=oh(o);if(!a){t.Sentry?.captureException(new Error("Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection"),{extra:{figmaUrl:o},level:"warning"});return}let c=i.get(a.fileID);c||(c=[],i.set(a.fileID,c)),c.includes(a.nodeId)||c.push(a.nodeId),s[o]=`${a.fileID}/${a.nodeId}`}),await Promise.all(Array.from(i.entries()).map(async([o,a])=>{let c=await $4(t,e,r,o,a.join(","),0);for(let u of a){let l=c[u],p=l.components[u]?.key??l.componentSets[u]?.key;p||t.Sentry?.withScope(h=>{h.addAttachment({data:JSON.stringify(c,null,2),filename:`${o}.json`}),t.Sentry?.captureException(new Error("Cannot resolve figma component key for NodeID"),{extra:{nodeId:u,fileID:o},level:"warning"})});let d=`${o}/${u}`;for(let h of n)s[h]===d&&(s[h]=p)}})),s}});function s1(t){if(!Array.isArray(t))throw new TypeError(`Expected an array, got \`${typeof t}\`.`);for(let i of t)r1(i);let e=t.some(({readableObjectMode:i})=>i),r=Zhe(t,e),n=new t1({objectMode:e,writableHighWaterMark:r,readableHighWaterMark:r});for(let i of t)n.add(i);return t.length===0&&W4(n),n}var Tv,V4,i1,Zhe,t1,Qhe,ege,tge,r1,rge,H4,nge,ige,sge,K4,W4,n1,J4,oge,Sv,z4,G4,Y4=N(()=>{m();Tv=require("node:events"),V4=require("node:stream"),i1=require("node:stream/promises");Zhe=(t,e)=>{if(t.length===0)return 16384;let r=t.filter(({readableObjectMode:n})=>n===e).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},t1=class extends V4.PassThrough{#p=new Set([]);#g=new Set([]);#h=new Set([]);#a;add(e){r1(e),!this.#p.has(e)&&(this.#p.add(e),this.#a??=Qhe(this,this.#p),rge({passThroughStream:this,stream:e,streams:this.#p,ended:this.#g,aborted:this.#h,onFinished:this.#a}),e.pipe(this,{end:!1}))}remove(e){return r1(e),this.#p.has(e)?(e.unpipe(this),!0):!1}},Qhe=async(t,e)=>{Sv(t,z4);let r=new AbortController;try{await Promise.race([ege(t,r),tge(t,e,r)])}finally{r.abort(),Sv(t,-z4)}},ege=async(t,{signal:e})=>{await(0,i1.finished)(t,{signal:e,cleanup:!0})},tge=async(t,e,{signal:r})=>{for await(let[n]of(0,Tv.on)(t,"unpipe",{signal:r}))e.has(n)&&n.emit(K4)},r1=t=>{if(typeof t?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`)},rge=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,onFinished:s})=>{Sv(t,G4);let o=new AbortController;try{await Promise.race([nge(s,e),ige({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:o}),sge({stream:e,streams:r,ended:n,aborted:i,controller:o})])}finally{o.abort(),Sv(t,-G4)}r.size===n.size+i.size&&(n.size===0&&i.size>0?n1(t):W4(t))},H4=t=>t?.code==="ERR_STREAM_PREMATURE_CLOSE",nge=async(t,e)=>{try{await t,n1(e)}catch(r){H4(r)?n1(e):J4(e,r)}},ige=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:{signal:s}})=>{try{await(0,i1.finished)(e,{signal:s,cleanup:!0,readable:!0,writable:!1}),r.has(e)&&n.add(e)}catch(o){if(s.aborted||!r.has(e))return;H4(o)?i.add(e):J4(t,o)}},sge=async({stream:t,streams:e,ended:r,aborted:n,controller:{signal:i}})=>{await(0,Tv.once)(t,K4,{signal:i}),e.delete(t),r.delete(t),n.delete(t)},K4=Symbol("unpipe"),W4=t=>{t.writable&&t.end()},n1=t=>{(t.readable||t.writable)&&t.destroy()},J4=(t,e)=>{t.destroyed||(t.once("error",oge),t.destroy(e))},oge=()=>{},Sv=(t,e)=>{let r=t.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&t.setMaxListeners(r+e)},z4=2,G4=1});var X4=S(Yp=>{"use strict";m();Object.defineProperty(Yp,"__esModule",{value:!0});Yp.splitWhen=Yp.flatten=void 0;function age(t){return t.reduce((e,r)=>[].concat(e,r),[])}Yp.flatten=age;function cge(t,e){let r=[[]],n=0;for(let i of t)e(i)?(n++,r[n]=[]):r[n].push(i);return r}Yp.splitWhen=cge});var Z4=S(Av=>{"use strict";m();Object.defineProperty(Av,"__esModule",{value:!0});Av.isEnoentCodeError=void 0;function uge(t){return t.code==="ENOENT"}Av.isEnoentCodeError=uge});var Q4=S(Pv=>{"use strict";m();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.createDirentFromStats=void 0;var o1=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function lge(t,e){return new o1(t,e)}Pv.createDirentFromStats=lge});var n6=S(Mr=>{"use strict";m();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.convertPosixPathToPattern=Mr.convertWindowsPathToPattern=Mr.convertPathToPattern=Mr.escapePosixPath=Mr.escapeWindowsPath=Mr.escape=Mr.removeLeadingDotSegment=Mr.makeAbsolute=Mr.unixify=void 0;var pge=require("os"),dge=require("path"),e6=pge.platform()==="win32",fge=2,mge=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,hge=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,gge=/^\\\\([.?])/,yge=/\\(?![!()+@[\]{}])/g;function bge(t){return t.replace(/\\/g,"/")}Mr.unixify=bge;function vge(t,e){return dge.resolve(t,e)}Mr.makeAbsolute=vge;function xge(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(fge)}return t}Mr.removeLeadingDotSegment=xge;Mr.escape=e6?a1:c1;function a1(t){return t.replace(hge,"\\$2")}Mr.escapeWindowsPath=a1;function c1(t){return t.replace(mge,"\\$2")}Mr.escapePosixPath=c1;Mr.convertPathToPattern=e6?t6:r6;function t6(t){return a1(t).replace(gge,"//$1").replace(yge,"/")}Mr.convertWindowsPathToPattern=t6;function r6(t){return c1(t)}Mr.convertPosixPathToPattern=r6});var s6=S((AZe,i6)=>{m();i6.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var c6=S((_Ze,a6)=>{m();var Dge=s6(),o6={"{":"}","(":")","[":"]"},wge=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,n=-2,i=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||n!==-1&&t[e]==="["&&t[e+1]!=="]"&&(n<e&&(n=t.indexOf("]",e)),n>e&&(o===-1||o>n||(o=t.indexOf("\\",e),o===-1||o>n)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(o=t.indexOf("\\",e),o===-1||o>i))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var c=o6[a];if(c){var u=t.indexOf(c,e);u!==-1&&(e=u+1)}if(t[e]==="!")return!0}else e++}return!1},Cge=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var n=o6[r];if(n){var i=t.indexOf(n,e);i!==-1&&(e=i+1)}if(t[e]==="!")return!0}else e++}return!1};a6.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(Dge(e))return!0;var n=wge;return r&&r.strict===!1&&(n=Cge),n(e)}});var l6=S((kZe,u6)=>{"use strict";m();var Ege=c6(),Sge=require("path").posix.dirname,Tge=require("os").platform()==="win32",u1="/",Age=/\\/g,Pge=/[\{\[].*[\}\]]$/,_ge=/(^|[^\\])([\{\[]|\([^\)]+$)/,Fge=/\\([\!\*\?\|\[\]\(\)\{\}])/g;u6.exports=function(e,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&Tge&&e.indexOf(u1)<0&&(e=e.replace(Age,u1)),Pge.test(e)&&(e+=u1),e+="a";do e=Sge(e);while(Ege(e)||_ge.test(e));return e.replace(Fge,"$1")}});var _v=S(us=>{"use strict";m();us.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;us.find=(t,e)=>t.nodes.find(r=>r.type===e);us.exceedsLimit=(t,e,r=1,n)=>n===!1||!us.isInteger(t)||!us.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=n;us.escapeNode=(t,e=0,r)=>{let n=t.nodes[e];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};us.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;us.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;us.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;us.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);us.flatten=(...t)=>{let e=[],r=n=>{for(let i=0;i<n.length;i++){let s=n[i];if(Array.isArray(s)){r(s);continue}s!==void 0&&e.push(s)}return e};return r(t),e}});var Fv=S((OZe,d6)=>{"use strict";m();var p6=_v();d6.exports=(t,e={})=>{let r=(n,i={})=>{let s=e.escapeInvalid&&p6.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a="";if(n.value)return(s||o)&&p6.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=r(c);return a};return r(t)}});var m6=S((BZe,f6)=>{"use strict";m();f6.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var C6=S(($Ze,w6)=>{"use strict";m();var h6=m6(),Uu=(t,e,r)=>{if(h6(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(h6(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),c=t+":"+e+"="+i+s+o+a;if(Uu.cache.hasOwnProperty(c))return Uu.cache[c].result;let u=Math.min(t,e),l=Math.max(t,e);if(Math.abs(u-l)===1){let g=t+"|"+e;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let p=D6(t)||D6(e),d={min:t,max:e,a:u,b:l},h=[],f=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0){let g=l<0?Math.abs(l):1;f=g6(g,Math.abs(u),d,n),u=d.a=0}return l>=0&&(h=g6(u,l,d,n)),d.negatives=f,d.positives=h,d.result=kge(f,h,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&h.length+f.length>1&&(d.result=`(?:${d.result})`),Uu.cache[c]=d,d.result};function kge(t,e,r){let n=l1(t,e,"-",!1,r)||[],i=l1(e,t,"",!1,r)||[],s=l1(t,e,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function Ige(t,e){let r=1,n=1,i=b6(t,r),s=new Set([e]);for(;t<=i&&i<=e;)s.add(i),r+=1,i=b6(t,r);for(i=v6(e+1,n)-1;t<i&&i<=e;)s.add(i),n+=1,i=v6(e+1,n)-1;return s=[...s],s.sort(Oge),s}function Nge(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let n=Rge(t,e),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[c,u]=n[a];c===u?s+=c:c!=="0"||u!=="9"?s+=Mge(c,u,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function g6(t,e,r,n){let i=Ige(t,e),s=[],o=t,a;for(let c=0;c<i.length;c++){let u=i[c],l=Nge(String(o),String(u),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+x6(a.count),o=u+1;continue}r.isPadded&&(p=Bge(u,r,n)),l.string=p+l.pattern+x6(l.count),s.push(l),o=u+1,a=l}return s}function l1(t,e,r,n,i){let s=[];for(let o of t){let{string:a}=o;!n&&!y6(e,"string",a)&&s.push(r+a),n&&y6(e,"string",a)&&s.push(r+a)}return s}function Rge(t,e){let r=[];for(let n=0;n<t.length;n++)r.push([t[n],e[n]]);return r}function Oge(t,e){return t>e?1:e>t?-1:0}function y6(t,e,r){return t.some(n=>n[e]===r)}function b6(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function v6(t,e){return t-t%Math.pow(10,e)}function x6(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Mge(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function D6(t){return/^-?(0+)\d/.test(t)}function Bge(t,e,r){if(!e.isPadded)return t;let n=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}Uu.cache={};Uu.clearCache=()=>Uu.cache={};w6.exports=Uu});var f1=S((UZe,F6)=>{"use strict";m();var Lge=require("util"),S6=C6(),E6=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),$ge=t=>e=>t===!0?Number(e):String(e),p1=t=>typeof t=="number"||typeof t=="string"&&t!=="",ah=t=>Number.isInteger(+t),d1=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},jge=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,Uge=(t,e,r)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return r===!1?String(t):t},Iv=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},qge=(t,e,r)=>{t.negatives.sort((a,c)=>a<c?-1:a>c?1:0),t.positives.sort((a,c)=>a<c?-1:a>c?1:0);let n=e.capture?"":"?:",i="",s="",o;return t.positives.length&&(i=t.positives.map(a=>Iv(String(a),r)).join("|")),t.negatives.length&&(s=`-(${n}${t.negatives.map(a=>Iv(String(a),r)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,e.wrap?`(${n}${o})`:o},T6=(t,e,r,n)=>{if(r)return S6(t,e,{wrap:!1,...n});let i=String.fromCharCode(t);if(t===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},A6=(t,e,r)=>{if(Array.isArray(t)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${t.join("|")})`:t.join("|")}return S6(t,e,r)},P6=(...t)=>new RangeError("Invalid range arguments: "+Lge.inspect(...t)),_6=(t,e,r)=>{if(r.strictRanges===!0)throw P6([t,e]);return[]},zge=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},Gge=(t,e,r=1,n={})=>{let i=Number(t),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw P6([t,e]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(t),c=String(e),u=String(r);r=Math.max(Math.abs(r),1);let l=d1(a)||d1(c)||d1(u),p=l?Math.max(a.length,c.length,u.length):0,d=l===!1&&jge(t,e,n)===!1,h=n.transform||$ge(d);if(n.toRegex&&r===1)return T6(Iv(t,p),Iv(e,p),!0,n);let f={negatives:[],positives:[]},g=D=>f[D<0?"negatives":"positives"].push(Math.abs(D)),y=[],b=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?g(i):y.push(Uge(h(i,b),p,d)),i=o?i-r:i+r,b++;return n.toRegex===!0?r>1?qge(f,n,p):A6(y,null,{wrap:!1,...n}):y},Vge=(t,e,r=1,n={})=>{if(!ah(t)&&t.length>1||!ah(e)&&e.length>1)return _6(t,e,n);let i=n.transform||(d=>String.fromCharCode(d)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,c=Math.min(s,o),u=Math.max(s,o);if(n.toRegex&&r===1)return T6(c,u,!1,n);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?A6(l,null,{wrap:!1,options:n}):l},kv=(t,e,r,n={})=>{if(e==null&&p1(t))return[t];if(!p1(t)||!p1(e))return _6(t,e,n);if(typeof r=="function")return kv(t,e,1,{transform:r});if(E6(r))return kv(t,e,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,ah(r)?ah(t)&&ah(e)?Gge(t,e,r,i):Vge(t,e,Math.max(Math.abs(r),1),i):r!=null&&!E6(r)?zge(r,i):kv(t,e,1,r)};F6.exports=kv});var N6=S((zZe,I6)=>{"use strict";m();var Hge=f1(),k6=_v(),Kge=(t,e={})=>{let r=(n,i={})=>{let s=k6.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,c=e.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=k6.reduce(n.nodes),p=Hge(...l,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)u+=r(l,n);return u};return r(t)};I6.exports=Kge});var M6=S((VZe,O6)=>{"use strict";m();var Wge=f1(),R6=Fv(),Xp=_v(),qu=(t="",e="",r=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?Xp.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let s of i)n.push(qu(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?qu(i,s,r):i+s);return Xp.flatten(n)},Jge=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(qu(a.pop(),R6(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(qu(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=Xp.reduce(i.nodes);if(Xp.exceedsLimit(...p,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=Wge(...p,e);d.length===0&&(d=R6(i,e)),a.push(qu(a.pop(),d)),i.nodes=[];return}let c=Xp.encloseBrace(i),u=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,u=l.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&u.push(""),u.push("");continue}if(d.type==="close"){a.push(qu(a.pop(),u,c));continue}if(d.value&&d.type!=="open"){u.push(qu(u.pop(),d.value));continue}d.nodes&&n(d,i)}return u};return Xp.flatten(n(t))};O6.exports=Jge});var L6=S((KZe,B6)=>{"use strict";m();B6.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
1236
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var z6=S((JZe,q6)=>{"use strict";m();var Yge=Fv(),{MAX_LENGTH:$6,CHAR_BACKSLASH:m1,CHAR_BACKTICK:Xge,CHAR_COMMA:Zge,CHAR_DOT:Qge,CHAR_LEFT_PARENTHESES:eye,CHAR_RIGHT_PARENTHESES:tye,CHAR_LEFT_CURLY_BRACE:rye,CHAR_RIGHT_CURLY_BRACE:nye,CHAR_LEFT_SQUARE_BRACKET:j6,CHAR_RIGHT_SQUARE_BRACKET:U6,CHAR_DOUBLE_QUOTE:iye,CHAR_SINGLE_QUOTE:sye,CHAR_NO_BREAK_SPACE:oye,CHAR_ZERO_WIDTH_NOBREAK_SPACE:aye}=L6(),cye=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},n=typeof r.maxLength=="number"?Math.min($6,r.maxLength):$6;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let i={type:"root",input:t,nodes:[]},s=[i],o=i,a=i,c=0,u=t.length,l=0,p=0,d,h=()=>t[l++],f=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(f({type:"bos"});l<u;)if(o=s[s.length-1],d=h(),!(d===aye||d===oye)){if(d===m1){f({type:"text",value:(e.keepEscaping?d:"")+h()});continue}if(d===U6){f({type:"text",value:"\\"+d});continue}if(d===j6){c++;let g;for(;l<u&&(g=h());){if(d+=g,g===j6){c++;continue}if(g===m1){d+=h();continue}if(g===U6&&(c--,c===0))break}f({type:"text",value:d});continue}if(d===eye){o=f({type:"paren",nodes:[]}),s.push(o),f({type:"text",value:d});continue}if(d===tye){if(o.type!=="paren"){f({type:"text",value:d});continue}o=s.pop(),f({type:"text",value:d}),o=s[s.length-1];continue}if(d===iye||d===sye||d===Xge){let g=d,y;for(e.keepQuotes!==!0&&(d="");l<u&&(y=h());){if(y===m1){d+=y+h();continue}if(y===g){e.keepQuotes===!0&&(d+=y);break}d+=y}f({type:"text",value:d});continue}if(d===rye){p++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=f(y),s.push(o),f({type:"open",value:d});continue}if(d===nye){if(o.type!=="brace"){f({type:"text",value:d});continue}let g="close";o=s.pop(),o.close=!0,f({type:g,value:d}),p--,o=s[s.length-1];continue}if(d===Zge&&p>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:Yge(o)}]}f({type:"comma",value:d}),o.commas++;continue}if(d===Qge&&p>0&&o.commas===0){let g=o.nodes;if(p===0||g.length===0){f({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let y=g[g.length-1];y.value+=a.value+d,a=y,o.ranges--;continue}f({type:"dot",value:d});continue}f({type:"text",value:d})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let g=s[s.length-1],y=g.nodes.indexOf(o);g.nodes.splice(y,1,...o.nodes)}while(s.length>0);return f({type:"eos"}),i};q6.exports=cye});var H6=S((XZe,V6)=>{"use strict";m();var G6=Fv(),uye=N6(),lye=M6(),pye=z6(),Ui=(t,e={})=>{let r=[];if(Array.isArray(t))for(let n of t){let i=Ui.create(n,e);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(Ui.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Ui.parse=(t,e={})=>pye(t,e);Ui.stringify=(t,e={})=>G6(typeof t=="string"?Ui.parse(t,e):t,e);Ui.compile=(t,e={})=>(typeof t=="string"&&(t=Ui.parse(t,e)),uye(t,e));Ui.expand=(t,e={})=>{typeof t=="string"&&(t=Ui.parse(t,e));let r=lye(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};Ui.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Ui.compile(t,e):Ui.expand(t,e);V6.exports=Ui});var ch=S((QZe,X6)=>{"use strict";m();var dye=require("path"),Ro="\\\\/",K6=`[^${Ro}]`,Aa="\\.",fye="\\+",mye="\\?",Nv="\\/",hye="(?=.)",W6="[^/]",h1=`(?:${Nv}|$)`,J6=`(?:^|${Nv})`,g1=`${Aa}{1,2}${h1}`,gye=`(?!${Aa})`,yye=`(?!${J6}${g1})`,bye=`(?!${Aa}{0,1}${h1})`,vye=`(?!${g1})`,xye=`[^.${Nv}]`,Dye=`${W6}*?`,Y6={DOT_LITERAL:Aa,PLUS_LITERAL:fye,QMARK_LITERAL:mye,SLASH_LITERAL:Nv,ONE_CHAR:hye,QMARK:W6,END_ANCHOR:h1,DOTS_SLASH:g1,NO_DOT:gye,NO_DOTS:yye,NO_DOT_SLASH:bye,NO_DOTS_SLASH:vye,QMARK_NO_DOT:xye,STAR:Dye,START_ANCHOR:J6},wye={...Y6,SLASH_LITERAL:`[${Ro}]`,QMARK:K6,STAR:`${K6}*?`,DOTS_SLASH:`${Aa}{1,2}(?:[${Ro}]|$)`,NO_DOT:`(?!${Aa})`,NO_DOTS:`(?!(?:^|[${Ro}])${Aa}{1,2}(?:[${Ro}]|$))`,NO_DOT_SLASH:`(?!${Aa}{0,1}(?:[${Ro}]|$))`,NO_DOTS_SLASH:`(?!${Aa}{1,2}(?:[${Ro}]|$))`,QMARK_NO_DOT:`[^.${Ro}]`,START_ANCHOR:`(?:^|[${Ro}])`,END_ANCHOR:`(?:[${Ro}]|$)`},Cye={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};X6.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Cye,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:dye.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?wye:Y6}}});var uh=S(mi=>{"use strict";m();var Eye=require("path"),Sye=process.platform==="win32",{REGEX_BACKSLASH:Tye,REGEX_REMOVE_BACKSLASH:Aye,REGEX_SPECIAL_CHARS:Pye,REGEX_SPECIAL_CHARS_GLOBAL:_ye}=ch();mi.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);mi.hasRegexChars=t=>Pye.test(t);mi.isRegexChar=t=>t.length===1&&mi.hasRegexChars(t);mi.escapeRegex=t=>t.replace(_ye,"\\$1");mi.toPosixSlashes=t=>t.replace(Tye,"/");mi.removeBackslashes=t=>t.replace(Aye,e=>e==="\\"?"":e);mi.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};mi.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Sye===!0||Eye.sep==="\\";mi.escapeLast=(t,e,r)=>{let n=t.lastIndexOf(e,r);return n===-1?t:t[n-1]==="\\"?mi.escapeLast(t,e,n-1):`${t.slice(0,n)}\\${t.slice(n)}`};mi.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};mi.wrapOutput=(t,e={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${t})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var s9=S((nQe,i9)=>{"use strict";m();var Z6=uh(),{CHAR_ASTERISK:y1,CHAR_AT:Fye,CHAR_BACKWARD_SLASH:lh,CHAR_COMMA:kye,CHAR_DOT:b1,CHAR_EXCLAMATION_MARK:v1,CHAR_FORWARD_SLASH:n9,CHAR_LEFT_CURLY_BRACE:x1,CHAR_LEFT_PARENTHESES:D1,CHAR_LEFT_SQUARE_BRACKET:Iye,CHAR_PLUS:Nye,CHAR_QUESTION_MARK:Q6,CHAR_RIGHT_CURLY_BRACE:Rye,CHAR_RIGHT_PARENTHESES:e9,CHAR_RIGHT_SQUARE_BRACKET:Oye}=ch(),t9=t=>t===n9||t===lh,r9=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Mye=(t,e)=>{let r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],c=t,u=-1,l=0,p=0,d=!1,h=!1,f=!1,g=!1,y=!1,b=!1,D=!1,w=!1,v=!1,x=!1,C=0,E,A,F={value:"",depth:0,isGlob:!1},P=()=>u>=n,_=()=>c.charCodeAt(u+1),B=()=>(E=A,c.charCodeAt(++u));for(;u<n;){A=B();let $;if(A===lh){D=F.backslashes=!0,A=B(),A===x1&&(b=!0);continue}if(b===!0||A===x1){for(C++;P()!==!0&&(A=B());){if(A===lh){D=F.backslashes=!0,B();continue}if(A===x1){C++;continue}if(b!==!0&&A===b1&&(A=B())===b1){if(d=F.isBrace=!0,f=F.isGlob=!0,x=!0,i===!0)continue;break}if(b!==!0&&A===kye){if(d=F.isBrace=!0,f=F.isGlob=!0,x=!0,i===!0)continue;break}if(A===Rye&&(C--,C===0)){b=!1,d=F.isBrace=!0,x=!0;break}}if(i===!0)continue;break}if(A===n9){if(s.push(u),o.push(F),F={value:"",depth:0,isGlob:!1},x===!0)continue;if(E===b1&&u===l+1){l+=2;continue}p=u+1;continue}if(r.noext!==!0&&(A===Nye||A===Fye||A===y1||A===Q6||A===v1)===!0&&_()===D1){if(f=F.isGlob=!0,g=F.isExtglob=!0,x=!0,A===v1&&u===l&&(v=!0),i===!0){for(;P()!==!0&&(A=B());){if(A===lh){D=F.backslashes=!0,A=B();continue}if(A===e9){f=F.isGlob=!0,x=!0;break}}continue}break}if(A===y1){if(E===y1&&(y=F.isGlobstar=!0),f=F.isGlob=!0,x=!0,i===!0)continue;break}if(A===Q6){if(f=F.isGlob=!0,x=!0,i===!0)continue;break}if(A===Iye){for(;P()!==!0&&($=B());){if($===lh){D=F.backslashes=!0,B();continue}if($===Oye){h=F.isBracket=!0,f=F.isGlob=!0,x=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&A===v1&&u===l){w=F.negated=!0,l++;continue}if(r.noparen!==!0&&A===D1){if(f=F.isGlob=!0,i===!0){for(;P()!==!0&&(A=B());){if(A===D1){D=F.backslashes=!0,A=B();continue}if(A===e9){x=!0;break}}continue}break}if(f===!0){if(x=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,f=!1);let L=c,z="",k="";l>0&&(z=c.slice(0,l),c=c.slice(l),p-=l),L&&f===!0&&p>0?(L=c.slice(0,p),k=c.slice(p)):f===!0?(L="",k=c):L=c,L&&L!==""&&L!=="/"&&L!==c&&t9(L.charCodeAt(L.length-1))&&(L=L.slice(0,-1)),r.unescape===!0&&(k&&(k=Z6.removeBackslashes(k)),L&&D===!0&&(L=Z6.removeBackslashes(L)));let O={prefix:z,input:t,start:l,base:L,glob:k,isBrace:d,isBracket:h,isGlob:f,isExtglob:g,isGlobstar:y,negated:w,negatedExtglob:v};if(r.tokens===!0&&(O.maxDepth=0,t9(A)||o.push(F),O.tokens=o),r.parts===!0||r.tokens===!0){let $;for(let H=0;H<s.length;H++){let se=$?$+1:l,U=s[H],G=t.slice(se,U);r.tokens&&(H===0&&l!==0?(o[H].isPrefix=!0,o[H].value=z):o[H].value=G,r9(o[H]),O.maxDepth+=o[H].depth),(H!==0||G!=="")&&a.push(G),$=U}if($&&$+1<t.length){let H=t.slice($+1);a.push(H),r.tokens&&(o[o.length-1].value=H,r9(o[o.length-1]),O.maxDepth+=o[o.length-1].depth)}O.slashes=s,O.parts=a}return O};i9.exports=Mye});var c9=S((sQe,a9)=>{"use strict";m();var Rv=ch(),qi=uh(),{MAX_LENGTH:Ov,POSIX_REGEX_SOURCE:Bye,REGEX_NON_SPECIAL_CHARS:Lye,REGEX_SPECIAL_CHARS_BACKREF:$ye,REPLACEMENTS:o9}=Rv,jye=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>qi.escapeRegex(i)).join("..")}return r},Zp=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,w1=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=o9[t]||t;let r={...e},n=typeof r.maxLength=="number"?Math.min(Ov,r.maxLength):Ov,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",c=qi.isWindows(e),u=Rv.globChars(c),l=Rv.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:f,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:b,NO_DOTS_SLASH:D,QMARK:w,QMARK_NO_DOT:v,STAR:x,START_ANCHOR:C}=u,E=ie=>`(${a}(?:(?!${C}${ie.dot?g:p}).)*?)`,A=r.dot?"":y,F=r.dot?w:v,P=r.bash===!0?E(r):x;r.capture&&(P=`(${P})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let _={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=qi.removePrefix(t,_),i=t.length;let B=[],L=[],z=[],k=s,O,$=()=>_.index===i-1,H=_.peek=(ie=1)=>t[_.index+ie],se=_.advance=()=>t[++_.index]||"",U=()=>t.slice(_.index+1),G=(ie="",je=0)=>{_.consumed+=ie,_.index+=je},K=ie=>{_.output+=ie.output!=null?ie.output:ie.value,G(ie.value)},oe=()=>{let ie=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)se(),_.start++,ie++;return ie%2===0?!1:(_.negated=!0,_.start++,!0)},Ae=ie=>{_[ie]++,z.push(ie)},Y=ie=>{_[ie]--,z.pop()},ne=ie=>{if(k.type==="globstar"){let je=_.braces>0&&(ie.type==="comma"||ie.type==="brace"),ee=ie.extglob===!0||B.length&&(ie.type==="pipe"||ie.type==="paren");ie.type!=="slash"&&ie.type!=="paren"&&!je&&!ee&&(_.output=_.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=P,_.output+=k.output)}if(B.length&&ie.type!=="paren"&&(B[B.length-1].inner+=ie.value),(ie.value||ie.output)&&K(ie),k&&k.type==="text"&&ie.type==="text"){k.value+=ie.value,k.output=(k.output||"")+ie.value;return}ie.prev=k,o.push(ie),k=ie},vt=(ie,je)=>{let ee={...l[je],conditions:1,inner:""};ee.prev=k,ee.parens=_.parens,ee.output=_.output;let Se=(r.capture?"(":"")+ee.open;Ae("parens"),ne({type:ie,value:je,output:_.output?"":f}),ne({type:"paren",extglob:!0,value:se(),output:Se}),B.push(ee)},sr=ie=>{let je=ie.close+(r.capture?")":""),ee;if(ie.type==="negate"){let Se=P;if(ie.inner&&ie.inner.length>1&&ie.inner.includes("/")&&(Se=E(r)),(Se!==P||$()||/^\)+$/.test(U()))&&(je=ie.close=`)$))${Se}`),ie.inner.includes("*")&&(ee=U())&&/^\.[^\\/.]+$/.test(ee)){let fe=w1(ee,{...e,fastpaths:!1}).output;je=ie.close=`)${fe})${Se})`}ie.prev.type==="bos"&&(_.negatedExtglob=!0)}ne({type:"paren",extglob:!0,value:O,output:je}),Y("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let ie=!1,je=t.replace($ye,(ee,Se,fe,wt,rt,_r)=>wt==="\\"?(ie=!0,ee):wt==="?"?Se?Se+wt+(rt?w.repeat(rt.length):""):_r===0?F+(rt?w.repeat(rt.length):""):w.repeat(fe.length):wt==="."?p.repeat(fe.length):wt==="*"?Se?Se+wt+(rt?P:""):P:Se?ee:`\\${ee}`);return ie===!0&&(r.unescape===!0?je=je.replace(/\\/g,""):je=je.replace(/\\+/g,ee=>ee.length%2===0?"\\\\":ee?"\\":"")),je===t&&r.contains===!0?(_.output=t,_):(_.output=qi.wrapOutput(je,_,e),_)}for(;!$();){if(O=se(),O==="\0")continue;if(O==="\\"){let ee=H();if(ee==="/"&&r.bash!==!0||ee==="."||ee===";")continue;if(!ee){O+="\\",ne({type:"text",value:O});continue}let Se=/^\\+/.exec(U()),fe=0;if(Se&&Se[0].length>2&&(fe=Se[0].length,_.index+=fe,fe%2!==0&&(O+="\\")),r.unescape===!0?O=se():O+=se(),_.brackets===0){ne({type:"text",value:O});continue}}if(_.brackets>0&&(O!=="]"||k.value==="["||k.value==="[^")){if(r.posix!==!1&&O===":"){let ee=k.value.slice(1);if(ee.includes("[")&&(k.posix=!0,ee.includes(":"))){let Se=k.value.lastIndexOf("["),fe=k.value.slice(0,Se),wt=k.value.slice(Se+2),rt=Bye[wt];if(rt){k.value=fe+rt,_.backtrack=!0,se(),!s.output&&o.indexOf(k)===1&&(s.output=f);continue}}}(O==="["&&H()!==":"||O==="-"&&H()==="]")&&(O=`\\${O}`),O==="]"&&(k.value==="["||k.value==="[^")&&(O=`\\${O}`),r.posix===!0&&O==="!"&&k.value==="["&&(O="^"),k.value+=O,K({value:O});continue}if(_.quotes===1&&O!=='"'){O=qi.escapeRegex(O),k.value+=O,K({value:O});continue}if(O==='"'){_.quotes=_.quotes===1?0:1,r.keepQuotes===!0&&ne({type:"text",value:O});continue}if(O==="("){Ae("parens"),ne({type:"paren",value:O});continue}if(O===")"){if(_.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Zp("opening","("));let ee=B[B.length-1];if(ee&&_.parens===ee.parens+1){sr(B.pop());continue}ne({type:"paren",value:O,output:_.parens?")":"\\)"}),Y("parens");continue}if(O==="["){if(r.nobracket===!0||!U().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Zp("closing","]"));O=`\\${O}`}else Ae("brackets");ne({type:"bracket",value:O});continue}if(O==="]"){if(r.nobracket===!0||k&&k.type==="bracket"&&k.value.length===1){ne({type:"text",value:O,output:`\\${O}`});continue}if(_.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Zp("opening","["));ne({type:"text",value:O,output:`\\${O}`});continue}Y("brackets");let ee=k.value.slice(1);if(k.posix!==!0&&ee[0]==="^"&&!ee.includes("/")&&(O=`/${O}`),k.value+=O,K({value:O}),r.literalBrackets===!1||qi.hasRegexChars(ee))continue;let Se=qi.escapeRegex(k.value);if(_.output=_.output.slice(0,-k.value.length),r.literalBrackets===!0){_.output+=Se,k.value=Se;continue}k.value=`(${a}${Se}|${k.value})`,_.output+=k.value;continue}if(O==="{"&&r.nobrace!==!0){Ae("braces");let ee={type:"brace",value:O,output:"(",outputIndex:_.output.length,tokensIndex:_.tokens.length};L.push(ee),ne(ee);continue}if(O==="}"){let ee=L[L.length-1];if(r.nobrace===!0||!ee){ne({type:"text",value:O,output:O});continue}let Se=")";if(ee.dots===!0){let fe=o.slice(),wt=[];for(let rt=fe.length-1;rt>=0&&(o.pop(),fe[rt].type!=="brace");rt--)fe[rt].type!=="dots"&&wt.unshift(fe[rt].value);Se=jye(wt,r),_.backtrack=!0}if(ee.comma!==!0&&ee.dots!==!0){let fe=_.output.slice(0,ee.outputIndex),wt=_.tokens.slice(ee.tokensIndex);ee.value=ee.output="\\{",O=Se="\\}",_.output=fe;for(let rt of wt)_.output+=rt.output||rt.value}ne({type:"brace",value:O,output:Se}),Y("braces"),L.pop();continue}if(O==="|"){B.length>0&&B[B.length-1].conditions++,ne({type:"text",value:O});continue}if(O===","){let ee=O,Se=L[L.length-1];Se&&z[z.length-1]==="braces"&&(Se.comma=!0,ee="|"),ne({type:"comma",value:O,output:ee});continue}if(O==="/"){if(k.type==="dot"&&_.index===_.start+1){_.start=_.index+1,_.consumed="",_.output="",o.pop(),k=s;continue}ne({type:"slash",value:O,output:h});continue}if(O==="."){if(_.braces>0&&k.type==="dot"){k.value==="."&&(k.output=p);let ee=L[L.length-1];k.type="dots",k.output+=O,k.value+=O,ee.dots=!0;continue}if(_.braces+_.parens===0&&k.type!=="bos"&&k.type!=="slash"){ne({type:"text",value:O,output:p});continue}ne({type:"dot",value:O,output:p});continue}if(O==="?"){if(!(k&&k.value==="(")&&r.noextglob!==!0&&H()==="("&&H(2)!=="?"){vt("qmark",O);continue}if(k&&k.type==="paren"){let Se=H(),fe=O;if(Se==="<"&&!qi.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(k.value==="("&&!/[!=<:]/.test(Se)||Se==="<"&&!/<([!=]|\w+>)/.test(U()))&&(fe=`\\${O}`),ne({type:"text",value:O,output:fe});continue}if(r.dot!==!0&&(k.type==="slash"||k.type==="bos")){ne({type:"qmark",value:O,output:v});continue}ne({type:"qmark",value:O,output:w});continue}if(O==="!"){if(r.noextglob!==!0&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){vt("negate",O);continue}if(r.nonegate!==!0&&_.index===0){oe();continue}}if(O==="+"){if(r.noextglob!==!0&&H()==="("&&H(2)!=="?"){vt("plus",O);continue}if(k&&k.value==="("||r.regex===!1){ne({type:"plus",value:O,output:d});continue}if(k&&(k.type==="bracket"||k.type==="paren"||k.type==="brace")||_.parens>0){ne({type:"plus",value:O});continue}ne({type:"plus",value:d});continue}if(O==="@"){if(r.noextglob!==!0&&H()==="("&&H(2)!=="?"){ne({type:"at",extglob:!0,value:O,output:""});continue}ne({type:"text",value:O});continue}if(O!=="*"){(O==="$"||O==="^")&&(O=`\\${O}`);let ee=Lye.exec(U());ee&&(O+=ee[0],_.index+=ee[0].length),ne({type:"text",value:O});continue}if(k&&(k.type==="globstar"||k.star===!0)){k.type="star",k.star=!0,k.value+=O,k.output=P,_.backtrack=!0,_.globstar=!0,G(O);continue}let ie=U();if(r.noextglob!==!0&&/^\([^?]/.test(ie)){vt("star",O);continue}if(k.type==="star"){if(r.noglobstar===!0){G(O);continue}let ee=k.prev,Se=ee.prev,fe=ee.type==="slash"||ee.type==="bos",wt=Se&&(Se.type==="star"||Se.type==="globstar");if(r.bash===!0&&(!fe||ie[0]&&ie[0]!=="/")){ne({type:"star",value:O,output:""});continue}let rt=_.braces>0&&(ee.type==="comma"||ee.type==="brace"),_r=B.length&&(ee.type==="pipe"||ee.type==="paren");if(!fe&&ee.type!=="paren"&&!rt&&!_r){ne({type:"star",value:O,output:""});continue}for(;ie.slice(0,3)==="/**";){let un=t[_.index+4];if(un&&un!=="/")break;ie=ie.slice(3),G("/**",3)}if(ee.type==="bos"&&$()){k.type="globstar",k.value+=O,k.output=E(r),_.output=k.output,_.globstar=!0,G(O);continue}if(ee.type==="slash"&&ee.prev.type!=="bos"&&!wt&&$()){_.output=_.output.slice(0,-(ee.output+k.output).length),ee.output=`(?:${ee.output}`,k.type="globstar",k.output=E(r)+(r.strictSlashes?")":"|$)"),k.value+=O,_.globstar=!0,_.output+=ee.output+k.output,G(O);continue}if(ee.type==="slash"&&ee.prev.type!=="bos"&&ie[0]==="/"){let un=ie[1]!==void 0?"|$":"";_.output=_.output.slice(0,-(ee.output+k.output).length),ee.output=`(?:${ee.output}`,k.type="globstar",k.output=`${E(r)}${h}|${h}${un})`,k.value+=O,_.output+=ee.output+k.output,_.globstar=!0,G(O+se()),ne({type:"slash",value:"/",output:""});continue}if(ee.type==="bos"&&ie[0]==="/"){k.type="globstar",k.value+=O,k.output=`(?:^|${h}|${E(r)}${h})`,_.output=k.output,_.globstar=!0,G(O+se()),ne({type:"slash",value:"/",output:""});continue}_.output=_.output.slice(0,-k.output.length),k.type="globstar",k.output=E(r),k.value+=O,_.output+=k.output,_.globstar=!0,G(O);continue}let je={type:"star",value:O,output:P};if(r.bash===!0){je.output=".*?",(k.type==="bos"||k.type==="slash")&&(je.output=A+je.output),ne(je);continue}if(k&&(k.type==="bracket"||k.type==="paren")&&r.regex===!0){je.output=O,ne(je);continue}(_.index===_.start||k.type==="slash"||k.type==="dot")&&(k.type==="dot"?(_.output+=b,k.output+=b):r.dot===!0?(_.output+=D,k.output+=D):(_.output+=A,k.output+=A),H()!=="*"&&(_.output+=f,k.output+=f)),ne(je)}for(;_.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Zp("closing","]"));_.output=qi.escapeLast(_.output,"["),Y("brackets")}for(;_.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Zp("closing",")"));_.output=qi.escapeLast(_.output,"("),Y("parens")}for(;_.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Zp("closing","}"));_.output=qi.escapeLast(_.output,"{"),Y("braces")}if(r.strictSlashes!==!0&&(k.type==="star"||k.type==="bracket")&&ne({type:"maybe_slash",value:"",output:`${h}?`}),_.backtrack===!0){_.output="";for(let ie of _.tokens)_.output+=ie.output!=null?ie.output:ie.value,ie.suffix&&(_.output+=ie.suffix)}return _};w1.fastpaths=(t,e)=>{let r={...e},n=typeof r.maxLength=="number"?Math.min(Ov,r.maxLength):Ov,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=o9[t]||t;let s=qi.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:h,START_ANCHOR:f}=Rv.globChars(s),g=r.dot?p:l,y=r.dot?d:l,b=r.capture?"":"?:",D={negated:!1,prefix:""},w=r.bash===!0?".*?":h;r.capture&&(w=`(${w})`);let v=A=>A.noglobstar===!0?w:`(${b}(?:(?!${f}${A.dot?u:o}).)*?)`,x=A=>{switch(A){case"*":return`${g}${c}${w}`;case".*":return`${o}${c}${w}`;case"*.*":return`${g}${w}${o}${c}${w}`;case"*/*":return`${g}${w}${a}${c}${y}${w}`;case"**":return g+v(r);case"**/*":return`(?:${g}${v(r)}${a})?${y}${c}${w}`;case"**/*.*":return`(?:${g}${v(r)}${a})?${y}${w}${o}${c}${w}`;case"**/.*":return`(?:${g}${v(r)}${a})?${o}${c}${w}`;default:{let F=/^(.*?)\.(\w+)$/.exec(A);if(!F)return;let P=x(F[1]);return P?P+o+F[2]:void 0}}},C=qi.removePrefix(t,D),E=x(C);return E&&r.strictSlashes!==!0&&(E+=`${a}?`),E};a9.exports=w1});var l9=S((aQe,u9)=>{"use strict";m();var Uye=require("path"),qye=s9(),C1=c9(),E1=uh(),zye=ch(),Gye=t=>t&&typeof t=="object"&&!Array.isArray(t),Tr=(t,e,r=!1)=>{if(Array.isArray(t)){let l=t.map(d=>Tr(d,e,r));return d=>{for(let h of l){let f=h(d);if(f)return f}return!1}}let n=Gye(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=E1.isWindows(e),o=n?Tr.compileRe(t,e):Tr.makeRe(t,e,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};c=Tr(i.ignore,l,r)}let u=(l,p=!1)=>{let{isMatch:d,match:h,output:f}=Tr.test(l,o,e,{glob:t,posix:s}),g={glob:t,state:a,regex:o,posix:s,input:l,output:f,match:h,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===!1?(g.isMatch=!1,p?g:!1):c(l)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=!1,p?g:!1):(typeof i.onMatch=="function"&&i.onMatch(g),p?g:!0)};return r&&(u.state=a),u};Tr.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?E1.toPosixSlashes:null),a=t===n,c=a&&o?o(t):t;return a===!1&&(c=o?o(t):t,a=c===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Tr.matchBase(t,e,r,i):a=e.exec(c)),{isMatch:!!a,match:a,output:c}};Tr.matchBase=(t,e,r,n=E1.isWindows(r))=>(e instanceof RegExp?e:Tr.makeRe(e,r)).test(Uye.basename(t));Tr.isMatch=(t,e,r)=>Tr(e,r)(t);Tr.parse=(t,e)=>Array.isArray(t)?t.map(r=>Tr.parse(r,e)):C1(t,{...e,fastpaths:!1});Tr.scan=(t,e)=>qye(t,e);Tr.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let c=Tr.toRegex(a,e);return n===!0&&(c.state=t),c};Tr.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=C1.fastpaths(t,e)),i.output||(i=C1(t,e)),Tr.compileRe(i,e,r,n)};Tr.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Tr.constants=zye;u9.exports=Tr});var d9=S((uQe,p9)=>{"use strict";m();p9.exports=l9()});var Mv=S((pQe,y9)=>{"use strict";m();var m9=require("util"),h9=H6(),Oo=d9(),S1=uh(),f9=t=>t===""||t==="./",g9=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},rr=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,i=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<e.length;l++){let p=Oo(String(e[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let h of t){let f=p(h,!0);(d?!f.isMatch:f.isMatch)&&(d?n.add(f.output):(n.delete(f.output),i.add(f.output)))}}let u=(o===e.length?[...s]:[...i]).filter(l=>!n.has(l));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return u};rr.match=rr;rr.matcher=(t,e)=>Oo(t,e);rr.isMatch=(t,e,r)=>Oo(e,r)(t);rr.any=rr.isMatch;rr.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=new Set(rr(t,e,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};rr.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${m9.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>rr.contains(t,n,r));if(typeof e=="string"){if(f9(t)||f9(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return rr.isMatch(t,e,{...r,contains:!0})};rr.matchKeys=(t,e,r)=>{if(!S1.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=rr(Object.keys(t),e,r),i={};for(let s of n)i[s]=t[s];return i};rr.some=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=Oo(String(i),r);if(n.some(o=>s(o)))return!0}return!1};rr.every=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=Oo(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};rr.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${m9.inspect(t)}"`);return[].concat(e).every(n=>Oo(n,r)(t))};rr.capture=(t,e,r)=>{let n=S1.isWindows(r),s=Oo.makeRe(String(t),{...r,capture:!0}).exec(n?S1.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};rr.makeRe=(...t)=>Oo.makeRe(...t);rr.scan=(...t)=>Oo.scan(...t);rr.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let i of h9(String(n),e))r.push(Oo.parse(i,e));return r};rr.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!g9(t)?[t]:h9(t,e)};rr.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return rr.braces(t,{...e,expand:!0})};rr.hasBraces=g9;y9.exports=rr});var A9=S(Fe=>{"use strict";m();Object.defineProperty(Fe,"__esModule",{value:!0});Fe.isAbsolute=Fe.partitionAbsoluteAndRelative=Fe.removeDuplicateSlashes=Fe.matchAny=Fe.convertPatternsToRe=Fe.makeRe=Fe.getPatternParts=Fe.expandBraceExpansion=Fe.expandPatternsWithBraceExpansion=Fe.isAffectDepthOfReadingPattern=Fe.endsWithSlashGlobStar=Fe.hasGlobStar=Fe.getBaseDirectory=Fe.isPatternRelatedToParentDirectory=Fe.getPatternsOutsideCurrentDirectory=Fe.getPatternsInsideCurrentDirectory=Fe.getPositivePatterns=Fe.getNegativePatterns=Fe.isPositivePattern=Fe.isNegativePattern=Fe.convertToNegativePattern=Fe.convertToPositivePattern=Fe.isDynamicPattern=Fe.isStaticPattern=void 0;var b9=require("path"),Vye=l6(),T1=Mv(),v9="**",Hye="\\",Kye=/[*?]|^!/,Wye=/\[[^[]*]/,Jye=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Yye=/[!*+?@]\([^(]*\)/,Xye=/,|\.\./,Zye=/(?!^)\/{2,}/g;function x9(t,e={}){return!D9(t,e)}Fe.isStaticPattern=x9;function D9(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(Hye)||Kye.test(t)||Wye.test(t)||Jye.test(t)||e.extglob!==!1&&Yye.test(t)||e.braceExpansion!==!1&&Qye(t))}Fe.isDynamicPattern=D9;function Qye(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let n=t.slice(e,r);return Xye.test(n)}function ebe(t){return Bv(t)?t.slice(1):t}Fe.convertToPositivePattern=ebe;function tbe(t){return"!"+t}Fe.convertToNegativePattern=tbe;function Bv(t){return t.startsWith("!")&&t[1]!=="("}Fe.isNegativePattern=Bv;function w9(t){return!Bv(t)}Fe.isPositivePattern=w9;function rbe(t){return t.filter(Bv)}Fe.getNegativePatterns=rbe;function nbe(t){return t.filter(w9)}Fe.getPositivePatterns=nbe;function ibe(t){return t.filter(e=>!A1(e))}Fe.getPatternsInsideCurrentDirectory=ibe;function sbe(t){return t.filter(A1)}Fe.getPatternsOutsideCurrentDirectory=sbe;function A1(t){return t.startsWith("..")||t.startsWith("./..")}Fe.isPatternRelatedToParentDirectory=A1;function obe(t){return Vye(t,{flipBackslashes:!1})}Fe.getBaseDirectory=obe;function abe(t){return t.includes(v9)}Fe.hasGlobStar=abe;function C9(t){return t.endsWith("/"+v9)}Fe.endsWithSlashGlobStar=C9;function cbe(t){let e=b9.basename(t);return C9(t)||x9(e)}Fe.isAffectDepthOfReadingPattern=cbe;function ube(t){return t.reduce((e,r)=>e.concat(E9(r)),[])}Fe.expandPatternsWithBraceExpansion=ube;function E9(t){let e=T1.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,n)=>r.length-n.length),e.filter(r=>r!=="")}Fe.expandBraceExpansion=E9;function lbe(t,e){let{parts:r}=T1.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}Fe.getPatternParts=lbe;function S9(t,e){return T1.makeRe(t,e)}Fe.makeRe=S9;function pbe(t,e){return t.map(r=>S9(r,e))}Fe.convertPatternsToRe=pbe;function dbe(t,e){return e.some(r=>r.test(t))}Fe.matchAny=dbe;function fbe(t){return t.replace(Zye,"/")}Fe.removeDuplicateSlashes=fbe;function mbe(t){let e=[],r=[];for(let n of t)T9(n)?e.push(n):r.push(n);return[e,r]}Fe.partitionAbsoluteAndRelative=mbe;function T9(t){return b9.isAbsolute(t)}Fe.isAbsolute=T9});var k9=S((hQe,F9)=>{"use strict";m();var hbe=require("stream"),P9=hbe.PassThrough,gbe=Array.prototype.slice;F9.exports=ybe;function ybe(){let t=[],e=gbe.call(arguments),r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=P9(n);function a(){for(let l=0,p=arguments.length;l<p;l++)t.push(_9(arguments[l],n));return c(),this}function c(){if(r)return;r=!0;let l=t.shift();if(!l){process.nextTick(u);return}Array.isArray(l)||(l=[l]);let p=l.length+1;function d(){--p>0||(r=!1,c())}function h(f){function g(){f.removeListener("merge2UnpipeEnd",g),f.removeListener("end",g),s&&f.removeListener("error",y),d()}function y(b){o.emit("error",b)}if(f._readableState.endEmitted)return d();f.on("merge2UnpipeEnd",g),f.on("end",g),s&&f.on("error",y),f.pipe(o,{end:!1}),f.resume()}for(let f=0;f<l.length;f++)h(l[f]);d()}function u(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(l){l.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function _9(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=_9(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(P9(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var N9=S(Lv=>{"use strict";m();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.merge=void 0;var bbe=k9();function vbe(t){let e=bbe(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>I9(t)),e.once("end",()=>I9(t)),e}Lv.merge=vbe;function I9(t){t.forEach(e=>e.emit("close"))}});var R9=S(Qp=>{"use strict";m();Object.defineProperty(Qp,"__esModule",{value:!0});Qp.isEmpty=Qp.isString=void 0;function xbe(t){return typeof t=="string"}Qp.isString=xbe;function Dbe(t){return t===""}Qp.isEmpty=Dbe});var Pa=S(Pn=>{"use strict";m();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.string=Pn.stream=Pn.pattern=Pn.path=Pn.fs=Pn.errno=Pn.array=void 0;var wbe=X4();Pn.array=wbe;var Cbe=Z4();Pn.errno=Cbe;var Ebe=Q4();Pn.fs=Ebe;var Sbe=n6();Pn.path=Sbe;var Tbe=A9();Pn.pattern=Tbe;var Abe=N9();Pn.stream=Abe;var Pbe=R9();Pn.string=Pbe});var L9=S(_n=>{"use strict";m();Object.defineProperty(_n,"__esModule",{value:!0});_n.convertPatternGroupToTask=_n.convertPatternGroupsToTasks=_n.groupPatternsByBaseDirectory=_n.getNegativePatternsAsPositive=_n.getPositivePatterns=_n.convertPatternsToTasks=_n.generate=void 0;var Js=Pa();function _be(t,e){let r=O9(t,e),n=O9(e.ignore,e),i=M9(r),s=B9(r,n),o=i.filter(l=>Js.pattern.isStaticPattern(l,e)),a=i.filter(l=>Js.pattern.isDynamicPattern(l,e)),c=P1(o,s,!1),u=P1(a,s,!0);return c.concat(u)}_n.generate=_be;function O9(t,e){let r=t;return e.braceExpansion&&(r=Js.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>Js.pattern.removeDuplicateSlashes(n))}function P1(t,e,r){let n=[],i=Js.pattern.getPatternsOutsideCurrentDirectory(t),s=Js.pattern.getPatternsInsideCurrentDirectory(t),o=_1(i),a=_1(s);return n.push(...F1(o,e,r)),"."in a?n.push(k1(".",s,e,r)):n.push(...F1(a,e,r)),n}_n.convertPatternsToTasks=P1;function M9(t){return Js.pattern.getPositivePatterns(t)}_n.getPositivePatterns=M9;function B9(t,e){return Js.pattern.getNegativePatterns(t).concat(e).map(Js.pattern.convertToPositivePattern)}_n.getNegativePatternsAsPositive=B9;function _1(t){let e={};return t.reduce((r,n)=>{let i=Js.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},e)}_n.groupPatternsByBaseDirectory=_1;function F1(t,e,r){return Object.keys(t).map(n=>k1(n,t[n],e,r))}_n.convertPatternGroupsToTasks=F1;function k1(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Js.pattern.convertToNegativePattern))}}_n.convertPatternGroupToTask=k1});var j9=S($v=>{"use strict";m();Object.defineProperty($v,"__esModule",{value:!0});$v.read=void 0;function Fbe(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){$9(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){I1(r,i);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){$9(r,s);return}I1(r,i);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),I1(r,o)})})}$v.read=Fbe;function $9(t,e){t(e)}function I1(t,e){t(null,e)}});var U9=S(jv=>{"use strict";m();Object.defineProperty(jv,"__esModule",{value:!0});jv.read=void 0;function kbe(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}jv.read=kbe});var q9=S(vc=>{"use strict";m();Object.defineProperty(vc,"__esModule",{value:!0});vc.createFileSystemAdapter=vc.FILE_SYSTEM_ADAPTER=void 0;var Uv=require("fs");vc.FILE_SYSTEM_ADAPTER={lstat:Uv.lstat,stat:Uv.stat,lstatSync:Uv.lstatSync,statSync:Uv.statSync};function Ibe(t){return t===void 0?vc.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},vc.FILE_SYSTEM_ADAPTER),t)}vc.createFileSystemAdapter=Ibe});var z9=S(R1=>{"use strict";m();Object.defineProperty(R1,"__esModule",{value:!0});var Nbe=q9(),N1=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Nbe.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};R1.default=N1});var zu=S(xc=>{"use strict";m();Object.defineProperty(xc,"__esModule",{value:!0});xc.statSync=xc.stat=xc.Settings=void 0;var G9=j9(),Rbe=U9(),O1=z9();xc.Settings=O1.default;function Obe(t,e,r){if(typeof e=="function"){G9.read(t,M1(),e);return}G9.read(t,M1(e),r)}xc.stat=Obe;function Mbe(t,e){let r=M1(e);return Rbe.read(t,r)}xc.statSync=Mbe;function M1(t={}){return t instanceof O1.default?t:new O1.default(t)}});var K9=S((OQe,H9)=>{m();var V9;H9.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(V9||(V9=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var J9=S((BQe,W9)=>{m();W9.exports=Lbe;var Bbe=K9();function Lbe(t,e){let r,n,i,s=!0;Array.isArray(t)?(r=[],n=t.length):(i=Object.keys(t),r={},n=i.length);function o(c){function u(){e&&e(c,r),e=null}s?Bbe(u):u()}function a(c,u,l){r[c]=l,(--n===0||u)&&o(u)}n?i?i.forEach(function(c){t[c](function(u,l){a(c,u,l)})}):t.forEach(function(c,u){c(function(l,p){a(u,l,p)})}):o(null),s=!1}});var B1=S(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var qv=process.versions.node.split(".");if(qv[0]===void 0||qv[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var Y9=Number.parseInt(qv[0],10),$be=Number.parseInt(qv[1],10),X9=10,jbe=10,Ube=Y9>X9,qbe=Y9===X9&&$be>=jbe;zv.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Ube||qbe});var Z9=S(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.createDirentFromStats=void 0;var L1=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function zbe(t,e){return new L1(t,e)}Gv.createDirentFromStats=zbe});var $1=S(Vv=>{"use strict";m();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.fs=void 0;var Gbe=Z9();Vv.fs=Gbe});var j1=S(Hv=>{"use strict";m();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.joinPathSegments=void 0;function Vbe(t,e,r){return t.endsWith(r)?t+e:t+r+e}Hv.joinPathSegments=Vbe});var ij=S(Dc=>{"use strict";m();Object.defineProperty(Dc,"__esModule",{value:!0});Dc.readdir=Dc.readdirWithFileTypes=Dc.read=void 0;var Hbe=zu(),Q9=J9(),Kbe=B1(),ej=$1(),tj=j1();function Wbe(t,e,r){if(!e.stats&&Kbe.IS_SUPPORT_READDIR_WITH_FILE_TYPES){rj(t,e,r);return}nj(t,e,r)}Dc.read=Wbe;function rj(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){Kv(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:tj.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){U1(r,s);return}let o=s.map(a=>Jbe(a,e));Q9(o,(a,c)=>{if(a!==null){Kv(r,a);return}U1(r,c)})})}Dc.readdirWithFileTypes=rj;function Jbe(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=ej.fs.createDirentFromStats(t.name,i),r(null,t)})}}function nj(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){Kv(r,n);return}let s=i.map(o=>{let a=tj.joinPathSegments(t,o,e.pathSegmentSeparator);return c=>{Hbe.stat(a,e.fsStatSettings,(u,l)=>{if(u!==null){c(u);return}let p={name:o,path:a,dirent:ej.fs.createDirentFromStats(o,l)};e.stats&&(p.stats=l),c(null,p)})}});Q9(s,(o,a)=>{if(o!==null){Kv(r,o);return}U1(r,a)})})}Dc.readdir=nj;function Kv(t,e){t(e)}function U1(t,e){t(null,e)}});var uj=S(wc=>{"use strict";m();Object.defineProperty(wc,"__esModule",{value:!0});wc.readdir=wc.readdirWithFileTypes=wc.read=void 0;var Ybe=zu(),Xbe=B1(),sj=$1(),oj=j1();function Zbe(t,e){return!e.stats&&Xbe.IS_SUPPORT_READDIR_WITH_FILE_TYPES?aj(t,e):cj(t,e)}wc.read=Zbe;function aj(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:oj.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(i.path);i.dirent=sj.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}wc.readdirWithFileTypes=aj;function cj(t,e){return e.fs.readdirSync(t).map(n=>{let i=oj.joinPathSegments(t,n,e.pathSegmentSeparator),s=Ybe.statSync(i,e.fsStatSettings),o={name:n,path:i,dirent:sj.fs.createDirentFromStats(n,s)};return e.stats&&(o.stats=s),o})}wc.readdir=cj});var lj=S(Cc=>{"use strict";m();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.createFileSystemAdapter=Cc.FILE_SYSTEM_ADAPTER=void 0;var ed=require("fs");Cc.FILE_SYSTEM_ADAPTER={lstat:ed.lstat,stat:ed.stat,lstatSync:ed.lstatSync,statSync:ed.statSync,readdir:ed.readdir,readdirSync:ed.readdirSync};function Qbe(t){return t===void 0?Cc.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Cc.FILE_SYSTEM_ADAPTER),t)}Cc.createFileSystemAdapter=Qbe});var pj=S(z1=>{"use strict";m();Object.defineProperty(z1,"__esModule",{value:!0});var eve=require("path"),tve=zu(),rve=lj(),q1=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=rve.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,eve.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new tve.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};z1.default=q1});var Wv=S(Ec=>{"use strict";m();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.Settings=Ec.scandirSync=Ec.scandir=void 0;var dj=ij(),nve=uj(),G1=pj();Ec.Settings=G1.default;function ive(t,e,r){if(typeof e=="function"){dj.read(t,V1(),e);return}dj.read(t,V1(e),r)}Ec.scandir=ive;function sve(t,e){let r=V1(e);return nve.read(t,r)}Ec.scandirSync=sve;function V1(t={}){return t instanceof G1.default?t:new G1.default(t)}});var mj=S((net,fj)=>{"use strict";m();function ove(t){var e=new t,r=e;function n(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}fj.exports=ove});var gj=S((set,H1)=>{"use strict";m();var ave=mj();function hj(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=ave(cve),i=null,s=null,o=0,a=null,c={push:g,drain:ls,saturated:ls,pause:l,paused:!1,get concurrency(){return r},set concurrency(x){if(!(x>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=x,!c.paused)for(;i&&o<r;)o++,b()},running:u,resume:h,idle:f,length:p,getQueue:d,unshift:y,empty:ls,kill:D,killAndDrain:w,error:v};return c;function u(){return o}function l(){c.paused=!0}function p(){for(var x=i,C=0;x;)x=x.next,C++;return C}function d(){for(var x=i,C=[];x;)C.push(x.value),x=x.next;return C}function h(){if(c.paused){if(c.paused=!1,i===null){o++,b();return}for(;i&&o<r;)o++,b()}}function f(){return o===0&&c.length()===0}function g(x,C){var E=n.get();E.context=t,E.release=b,E.value=x,E.callback=C||ls,E.errorHandler=a,o>=r||c.paused?s?(s.next=E,s=E):(i=E,s=E,c.saturated()):(o++,e.call(t,E.value,E.worked))}function y(x,C){var E=n.get();E.context=t,E.release=b,E.value=x,E.callback=C||ls,E.errorHandler=a,o>=r||c.paused?i?(E.next=i,i=E):(i=E,s=E,c.saturated()):(o++,e.call(t,E.value,E.worked))}function b(x){x&&n.release(x);var C=i;C&&o<=r?c.paused?o--:(s===i&&(s=null),i=C.next,C.next=null,e.call(t,C.value,C.worked),s===null&&c.empty()):--o===0&&c.drain()}function D(){i=null,s=null,c.drain=ls}function w(){i=null,s=null,c.drain(),c.drain=ls}function v(x){a=x}}function ls(){}function cve(){this.value=null,this.callback=ls,this.next=null,this.release=ls,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var i=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=ls,t.errorHandler&&s(r,o),i.call(t.context,r,n),t.release(t)}}function uve(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(l,p){e.call(this,l).then(function(d){p(null,d)},p)}var i=hj(t,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=c,i.drained=u,i;function a(l){var p=new Promise(function(d,h){s(l,function(f,g){if(f){h(f);return}d(g)})});return p.catch(ls),p}function c(l){var p=new Promise(function(d,h){o(l,function(f,g){if(f){h(f);return}d(g)})});return p.catch(ls),p}function u(){var l=new Promise(function(p){process.nextTick(function(){if(i.idle())p();else{var d=i.drain;i.drain=function(){typeof d=="function"&&d(),p(),i.drain=d}}})});return l}}H1.exports=hj;H1.exports.promise=uve});var Jv=S(Mo=>{"use strict";m();Object.defineProperty(Mo,"__esModule",{value:!0});Mo.joinPathSegments=Mo.replacePathSegmentSeparator=Mo.isAppliedFilter=Mo.isFatalError=void 0;function lve(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}Mo.isFatalError=lve;function pve(t,e){return t===null||t(e)}Mo.isAppliedFilter=pve;function dve(t,e){return t.split(/[/\\]/).join(e)}Mo.replacePathSegmentSeparator=dve;function fve(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}Mo.joinPathSegments=fve});var J1=S(W1=>{"use strict";m();Object.defineProperty(W1,"__esModule",{value:!0});var mve=Jv(),K1=class{constructor(e,r){this._root=e,this._settings=r,this._root=mve.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};W1.default=K1});var Z1=S(X1=>{"use strict";m();Object.defineProperty(X1,"__esModule",{value:!0});var hve=require("events"),gve=Wv(),yve=gj(),Yv=Jv(),bve=J1(),Y1=class extends bve.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=gve.scandir,this._emitter=new hve.EventEmitter,this._queue=yve(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let n={directory:e,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(let s of i)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!Yv.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let n=e.path;r!==void 0&&(e.path=Yv.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Yv.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Yv.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};X1.default=Y1});var yj=S(eT=>{"use strict";m();Object.defineProperty(eT,"__esModule",{value:!0});var vve=Z1(),Q1=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new vve.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{xve(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Dve(e,this._storage)}),this._reader.read()}};eT.default=Q1;function xve(t,e){t(e)}function Dve(t,e){t(null,e)}});var bj=S(rT=>{"use strict";m();Object.defineProperty(rT,"__esModule",{value:!0});var wve=require("stream"),Cve=Z1(),tT=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Cve.default(this._root,this._settings),this._stream=new wve.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};rT.default=tT});var vj=S(iT=>{"use strict";m();Object.defineProperty(iT,"__esModule",{value:!0});var Eve=Wv(),Xv=Jv(),Sve=J1(),nT=class extends Sve.default{constructor(){super(...arguments),this._scandir=Eve.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(e){if(Xv.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let n=e.path;r!==void 0&&(e.path=Xv.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Xv.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Xv.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};iT.default=nT});var xj=S(oT=>{"use strict";m();Object.defineProperty(oT,"__esModule",{value:!0});var Tve=vj(),sT=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Tve.default(this._root,this._settings)}read(){return this._reader.read()}};oT.default=sT});var Dj=S(cT=>{"use strict";m();Object.defineProperty(cT,"__esModule",{value:!0});var Ave=require("path"),Pve=Wv(),aT=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Ave.sep),this.fsScandirSettings=new Pve.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};cT.default=aT});var Qv=S(Bo=>{"use strict";m();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.Settings=Bo.walkStream=Bo.walkSync=Bo.walk=void 0;var wj=yj(),_ve=bj(),Fve=xj(),uT=Dj();Bo.Settings=uT.default;function kve(t,e,r){if(typeof e=="function"){new wj.default(t,Zv()).read(e);return}new wj.default(t,Zv(e)).read(r)}Bo.walk=kve;function Ive(t,e){let r=Zv(e);return new Fve.default(t,r).read()}Bo.walkSync=Ive;function Nve(t,e){let r=Zv(e);return new _ve.default(t,r).read()}Bo.walkStream=Nve;function Zv(t={}){return t instanceof uT.default?t:new uT.default(t)}});var ex=S(pT=>{"use strict";m();Object.defineProperty(pT,"__esModule",{value:!0});var Rve=require("path"),Ove=zu(),Cj=Pa(),lT=class{constructor(e){this._settings=e,this._fsStatSettings=new Ove.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return Rve.resolve(this._settings.cwd,e)}_makeEntry(e,r){let n={name:r,path:r,dirent:Cj.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!Cj.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};pT.default=lT});var mT=S(fT=>{"use strict";m();Object.defineProperty(fT,"__esModule",{value:!0});var Mve=require("stream"),Bve=zu(),Lve=Qv(),$ve=ex(),dT=class extends $ve.default{constructor(){super(...arguments),this._walkStream=Lve.walkStream,this._stat=Bve.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let n=e.map(this._getFullEntryPath,this),i=new Mve.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],e[s],r).then(c=>{c!==null&&r.entryFilter(c)&&i.push(c),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,r,n){return this._getStat(e).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}};fT.default=dT});var Ej=S(gT=>{"use strict";m();Object.defineProperty(gT,"__esModule",{value:!0});var jve=Qv(),Uve=ex(),qve=mT(),hT=class extends Uve.default{constructor(){super(...arguments),this._walkAsync=jve.walk,this._readerStream=new qve.default(this._settings)}dynamic(e,r){return new Promise((n,i)=>{this._walkAsync(e,r,(s,o)=>{s===null?n(o):i(s)})})}async static(e,r){let n=[],i=this._readerStream.static(e,r);return new Promise((s,o)=>{i.once("error",o),i.on("data",a=>n.push(a)),i.once("end",()=>s(n))})}};gT.default=hT});var Sj=S(bT=>{"use strict";m();Object.defineProperty(bT,"__esModule",{value:!0});var ph=Pa(),yT=class{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:e,segments:r,sections:n})}}_getPatternSegments(e){return ph.pattern.getPatternParts(e,this._micromatchOptions).map(n=>ph.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:ph.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return ph.array.splitWhen(e,r=>r.dynamic&&ph.pattern.hasGlobStar(r.pattern))}};bT.default=yT});var Tj=S(xT=>{"use strict";m();Object.defineProperty(xT,"__esModule",{value:!0});var zve=Sj(),vT=class extends zve.default{match(e){let r=e.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||r.every((c,u)=>{let l=s.segments[u];return!!(l.dynamic&&l.patternRe.test(c)||!l.dynamic&&l.pattern===c)}))return!0}return!1}};xT.default=vT});var Aj=S(wT=>{"use strict";m();Object.defineProperty(wT,"__esModule",{value:!0});var tx=Pa(),Gve=Tj(),DT=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){let i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return o=>this._filter(e,o,i,s)}_getMatcher(e){return new Gve.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(tx.pattern.isAffectDepthOfReadingPattern);return tx.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=tx.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let n=r.split("/").length;if(e==="")return n;let i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!tx.pattern.matchAny(e,r)}};wT.default=DT});var Pj=S(ET=>{"use strict";m();Object.defineProperty(ET,"__esModule",{value:!0});var Sc=Pa(),CT=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let[n,i]=Sc.pattern.partitionAbsoluteAndRelative(r),s={positive:{all:Sc.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:Sc.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:Sc.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(e,r){let n=Sc.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let i=this._isMatchToPatternsSet(n,r,e.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(n),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,r,n){return!(!this._isMatchToPatterns(e,r.positive.all,n)||this._isMatchToPatterns(e,r.negative.relative,n)||this._isMatchToAbsoluteNegative(e,r.negative.absolute,n))}_isMatchToAbsoluteNegative(e,r,n){if(r.length===0)return!1;let i=Sc.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(i,r,n)}_isMatchToPatterns(e,r,n){if(r.length===0)return!1;let i=Sc.pattern.matchAny(e,r);return!i&&n?Sc.pattern.matchAny(e+"/",r):i}};ET.default=CT});var _j=S(TT=>{"use strict";m();Object.defineProperty(TT,"__esModule",{value:!0});var Vve=Pa(),ST=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return Vve.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};TT.default=ST});var kj=S(PT=>{"use strict";m();Object.defineProperty(PT,"__esModule",{value:!0});var Fj=Pa(),AT=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Fj.path.makeAbsolute(this._settings.cwd,r),r=Fj.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};PT.default=AT});var rx=S(FT=>{"use strict";m();Object.defineProperty(FT,"__esModule",{value:!0});var Hve=require("path"),Kve=Aj(),Wve=Pj(),Jve=_j(),Yve=kj(),_T=class{constructor(e){this._settings=e,this.errorFilter=new Jve.default(this._settings),this.entryFilter=new Wve.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Kve.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Yve.default(this._settings)}_getRootDirectory(e){return Hve.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};FT.default=_T});var Ij=S(IT=>{"use strict";m();Object.defineProperty(IT,"__esModule",{value:!0});var Xve=Ej(),Zve=rx(),kT=class extends Zve.default{constructor(){super(...arguments),this._reader=new Xve.default(this._settings)}async read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(r,e,n)).map(s=>n.transform(s))}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};IT.default=kT});var Nj=S(RT=>{"use strict";m();Object.defineProperty(RT,"__esModule",{value:!0});var Qve=require("stream"),exe=mT(),txe=rx(),NT=class extends txe.default{constructor(){super(...arguments),this._reader=new exe.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new Qve.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};RT.default=NT});var Rj=S(MT=>{"use strict";m();Object.defineProperty(MT,"__esModule",{value:!0});var rxe=zu(),nxe=Qv(),ixe=ex(),OT=class extends ixe.default{constructor(){super(...arguments),this._walkSync=nxe.walkSync,this._statSync=rxe.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let n=[];for(let i of e){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,r);o===null||!r.entryFilter(o)||n.push(o)}return n}_getEntry(e,r,n){try{let i=this._getStat(e);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};MT.default=OT});var Oj=S(LT=>{"use strict";m();Object.defineProperty(LT,"__esModule",{value:!0});var sxe=Rj(),oxe=rx(),BT=class extends oxe.default{constructor(){super(...arguments),this._reader=new sxe.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};LT.default=BT});var Mj=S(rd=>{"use strict";m();Object.defineProperty(rd,"__esModule",{value:!0});rd.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var td=require("fs"),axe=require("os"),cxe=Math.max(axe.cpus().length,1);rd.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:td.lstat,lstatSync:td.lstatSync,stat:td.stat,statSync:td.statSync,readdir:td.readdir,readdirSync:td.readdirSync};var $T=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,cxe),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},rd.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};rd.default=$T});var zT=S((ntt,Lj)=>{"use strict";m();var Bj=L9(),uxe=Ij(),lxe=Nj(),pxe=Oj(),jT=Mj(),ps=Pa();async function UT(t,e){Ys(t);let r=qT(t,uxe.default,e),n=await Promise.all(r);return ps.array.flatten(n)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(u,l){Ys(u);let p=qT(u,pxe.default,l);return ps.array.flatten(p)}t.sync=e;function r(u,l){Ys(u);let p=qT(u,lxe.default,l);return ps.stream.merge(p)}t.stream=r;function n(u,l){Ys(u);let p=[].concat(u),d=new jT.default(l);return Bj.generate(p,d)}t.generateTasks=n;function i(u,l){Ys(u);let p=new jT.default(l);return ps.pattern.isDynamicPattern(u,p)}t.isDynamicPattern=i;function s(u){return Ys(u),ps.path.escape(u)}t.escapePath=s;function o(u){return Ys(u),ps.path.convertPathToPattern(u)}t.convertPathToPattern=o;let a;(function(u){function l(d){return Ys(d),ps.path.escapePosixPath(d)}u.escapePath=l;function p(d){return Ys(d),ps.path.convertPosixPathToPattern(d)}u.convertPathToPattern=p})(a=t.posix||(t.posix={}));let c;(function(u){function l(d){return Ys(d),ps.path.escapeWindowsPath(d)}u.escapePath=l;function p(d){return Ys(d),ps.path.convertWindowsPathToPattern(d)}u.convertPathToPattern=p})(c=t.win32||(t.win32={}))})(UT||(UT={}));function qT(t,e,r){let n=[].concat(t),i=new jT.default(r),s=Bj.generate(n,i),o=new e(i);return s.map(o.read,o)}function Ys(t){if(![].concat(t).every(n=>ps.string.isString(n)&&!ps.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Lj.exports=UT});async function GT(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await jj.default[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function VT(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return $j.default[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var $j,jj,stt,Uj,ott,att,qj,ctt,zj=N(()=>{m();$j=V(require("node:fs"),1),jj=V(require("node:fs/promises"),1);stt=GT.bind(void 0,"stat","isFile"),Uj=GT.bind(void 0,"stat","isDirectory"),ott=GT.bind(void 0,"lstat","isSymbolicLink"),att=VT.bind(void 0,"statSync","isFile"),qj=VT.bind(void 0,"statSync","isDirectory"),ctt=VT.bind(void 0,"lstatSync","isSymbolicLink")});var Gj=N(()=>{m()});function dh(t){return t instanceof URL?(0,Hj.fileURLToPath)(t):t}var Vj,HT,Hj,ftt,mtt,KT=N(()=>{m();Vj=require("node:util"),HT=require("node:child_process"),Hj=require("node:url");Gj();ftt=(0,Vj.promisify)(HT.execFile);mtt=10*1024*1024});function nd(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}var Kj=N(()=>{m()});var fh,WT=N(()=>{m();fh=t=>t[0]==="!"});var Wj,Jj,Yj,Gu,JT,Xj,dxe,Zj,Qj,fxe,mxe,hxe,e5,t5,r5,n5,i5=N(()=>{m();Wj=V(require("node:process"),1),Jj=V(require("node:fs"),1),Yj=V(require("node:fs/promises"),1),Gu=V(require("node:path"),1),JT=V(zT(),1),Xj=V(require("ignore"),1);Kj();KT();WT();dxe=["**/node_modules","**/flow-typed","**/coverage","**/.git"],Zj={absolute:!0,dot:!0},Qj="**/.gitignore",fxe=(t,e)=>fh(t)?"!"+Gu.default.posix.join(e,t.slice(1)):Gu.default.posix.join(e,t),mxe=(t,e)=>{let r=nd(Gu.default.relative(e,Gu.default.dirname(t.filePath)));return t.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>fxe(n,r))},hxe=(t,e)=>{if(e=nd(e),Gu.default.isAbsolute(t)){if(nd(t).startsWith(e))return Gu.default.relative(e,t);throw new Error(`Path ${t} is not in cwd ${e}`)}return t},e5=(t,e)=>{let r=t.flatMap(i=>mxe(i,e)),n=(0,Xj.default)().add(r);return i=>(i=dh(i),i=hxe(i,e),i?n.ignores(nd(i)):!1)},t5=(t={})=>({cwd:dh(t.cwd)??Wj.default.cwd(),suppressErrors:!!t.suppressErrors,deep:typeof t.deep=="number"?t.deep:Number.POSITIVE_INFINITY,ignore:[...t.ignore??[],...dxe]}),r5=async(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=t5(e),o=await(0,JT.default)(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...Zj}),a=await Promise.all(o.map(async c=>({filePath:c,content:await Yj.default.readFile(c,"utf8")})));return e5(a,r)},n5=(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=t5(e),a=JT.default.sync(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...Zj}).map(c=>({filePath:c,content:Jj.default.readFileSync(c,"utf8")}));return e5(a,r)}});var YT,a5,Vu,id,gxe,c5,u5,s5,o5,XT,yxe,l5,p5,nx,d5,bxe,f5,m5,h5,g5,y5,b5,ZT,QT,Itt,Ntt,Rtt,Ott,Mtt,Btt,v5=N(()=>{m();YT=V(require("node:process"),1),a5=V(require("node:fs"),1),Vu=V(require("node:path"),1);Y4();id=V(zT(),1);zj();KT();i5();WT();gxe=t=>{if(t.some(e=>typeof e!="string"))throw new TypeError("Patterns must be a string or an array of strings")},c5=(t,e)=>{let r=fh(t)?t.slice(1):t;return Vu.default.isAbsolute(r)?r:Vu.default.join(e,r)},u5=({directoryPath:t,files:e,extensions:r})=>{let n=r?.length>0?`.${r.length>1?`{${r.join(",")}}`:r[0]}`:"";return e?e.map(i=>Vu.default.posix.join(t,`**/${Vu.default.extname(i)?i:`${i}${n}`}`)):[Vu.default.posix.join(t,`**${n?`/*${n}`:""}`)]},s5=async(t,{cwd:e=YT.default.cwd(),files:r,extensions:n}={})=>(await Promise.all(t.map(async s=>await Uj(c5(s,e))?u5({directoryPath:s,files:r,extensions:n}):s))).flat(),o5=(t,{cwd:e=YT.default.cwd(),files:r,extensions:n}={})=>t.flatMap(i=>qj(c5(i,e))?u5({directoryPath:i,files:r,extensions:n}):i),XT=t=>(t=[...new Set([t].flat())],gxe(t),t),yxe=t=>{if(!t)return;let e;try{e=a5.default.statSync(t)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},l5=(t={})=>(t={...t,ignore:t.ignore??[],expandDirectories:t.expandDirectories??!0,cwd:dh(t.cwd)},yxe(t.cwd),t),p5=t=>async(e,r)=>t(XT(e),l5(r)),nx=t=>(e,r)=>t(XT(e),l5(r)),d5=t=>{let{ignoreFiles:e,gitignore:r}=t,n=e?XT(e):[];return r&&n.push(Qj),n},bxe=async t=>{let e=d5(t);return m5(e.length>0&&await r5(e,t))},f5=t=>{let e=d5(t);return m5(e.length>0&&n5(e,t))},m5=t=>{let e=new Set;return r=>{let n=Vu.default.normalize(r.path??r);return e.has(n)||t&&t(n)?!1:(e.add(n),!0)}},h5=(t,e)=>t.flat().filter(r=>e(r)),g5=(t,e)=>{let r=[];for(;t.length>0;){let n=t.findIndex(s=>fh(s));if(n===-1){r.push({patterns:t,options:e});break}let i=t[n].slice(1);for(let s of r)s.options.ignore.push(i);n!==0&&r.push({patterns:t.slice(0,n),options:{...e,ignore:[...e.ignore,i]}}),t=t.slice(n+1)}return r},y5=(t,e)=>({...e?{cwd:e}:{},...Array.isArray(t)?{files:t}:t}),b5=async(t,e)=>{let r=g5(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=y5(i,n);return Promise.all(r.map(async o=>{let{patterns:a,options:c}=o;return[a,c.ignore]=await Promise.all([s5(a,s),s5(c.ignore,{cwd:n})]),{patterns:a,options:c}}))},ZT=(t,e)=>{let r=g5(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=y5(i,n);return r.map(o=>{let{patterns:a,options:c}=o;return a=o5(a,s),c.ignore=o5(c.ignore,{cwd:n}),{patterns:a,options:c}})},QT=p5(async(t,e)=>{let[r,n]=await Promise.all([b5(t,e),bxe(e)]),i=await Promise.all(r.map(s=>(0,id.default)(s.patterns,s.options)));return h5(i,n)}),Itt=nx((t,e)=>{let r=ZT(t,e),n=f5(e),i=r.map(s=>id.default.sync(s.patterns,s.options));return h5(i,n)}),Ntt=nx((t,e)=>{let r=ZT(t,e),n=f5(e),i=r.map(o=>id.default.stream(o.patterns,o.options));return s1(i).filter(o=>n(o))}),Rtt=nx((t,e)=>t.some(r=>id.default.isDynamicPattern(r,e))),Ott=p5(b5),Mtt=nx(ZT),{convertPathToPattern:Btt}=id.default});function sd(t){let e=Date.now();return new Promise((r,n)=>{let s=vxe(t.url)({protocol:t.url.protocol,host:t.url.host,port:t.url.port,path:t.url.pathname+t.url.search,method:t.method,headers:t.headers},o=>{let a="";o.on("data",c=>{a+=c}),o.on("end",()=>{if((0,x5.debug)(`${t.method} ${t.url.href}, duration: ${Date.now()-e}ms`),typeof o.statusCode=="number"&&o.statusCode>=200&&o.statusCode<300)if(typeof o.headers["content-type"]!="string"||!o.headers["content-type"].includes("application/json"))n(`Response from ${t.url.href} content-type is ${o.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(c){n(`Response from ${t.url.href} is not valid JSON: ${a}
1237
- ${c}`)}else n(`Request to ${t.url.href} failed with status ${o.statusCode}: ${a}`)})}).on("error",o=>{n(`Error fetching ${t.url.href}, ${o}`)});t.body&&(s.setHeader("Content-Type","application/json"),s.write(t.body)),s.end()})}function vxe(t){if(t.protocol==="https:")return w5.request;if(t.protocol==="http:")return D5.request;throw new Error(`Unsupported protocol ${t.protocol}`)}var x5,D5,w5,C5=N(()=>{"use strict";m();x5=require("node:console"),D5=require("node:http"),w5=require("node:https")});async function E5(t){let e=new URL(`https://cdn.builder.io/api/v3/query/${t.publicApiKey}/${t.model}`);return e.searchParams.set("omit","meta.componentsUsed"),e.searchParams.set("apiKey",t.publicApiKey),e.searchParams.set("userAttributes.urlPath",t.pageUrl),e.searchParams.set("options.page.model",`"${t.model}"`),e.searchParams.set("cachebust","true"),(await sd({url:e,method:"GET"}))[t.model]}async function S5(t,e){if(e.kind===im.VCP)return!0;let r=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
1236
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var z6=S((JZe,q6)=>{"use strict";m();var Yge=Fv(),{MAX_LENGTH:$6,CHAR_BACKSLASH:m1,CHAR_BACKTICK:Xge,CHAR_COMMA:Zge,CHAR_DOT:Qge,CHAR_LEFT_PARENTHESES:eye,CHAR_RIGHT_PARENTHESES:tye,CHAR_LEFT_CURLY_BRACE:rye,CHAR_RIGHT_CURLY_BRACE:nye,CHAR_LEFT_SQUARE_BRACKET:j6,CHAR_RIGHT_SQUARE_BRACKET:U6,CHAR_DOUBLE_QUOTE:iye,CHAR_SINGLE_QUOTE:sye,CHAR_NO_BREAK_SPACE:oye,CHAR_ZERO_WIDTH_NOBREAK_SPACE:aye}=L6(),cye=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},n=typeof r.maxLength=="number"?Math.min($6,r.maxLength):$6;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let i={type:"root",input:t,nodes:[]},s=[i],o=i,a=i,c=0,u=t.length,l=0,p=0,d,h=()=>t[l++],f=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(f({type:"bos"});l<u;)if(o=s[s.length-1],d=h(),!(d===aye||d===oye)){if(d===m1){f({type:"text",value:(e.keepEscaping?d:"")+h()});continue}if(d===U6){f({type:"text",value:"\\"+d});continue}if(d===j6){c++;let g;for(;l<u&&(g=h());){if(d+=g,g===j6){c++;continue}if(g===m1){d+=h();continue}if(g===U6&&(c--,c===0))break}f({type:"text",value:d});continue}if(d===eye){o=f({type:"paren",nodes:[]}),s.push(o),f({type:"text",value:d});continue}if(d===tye){if(o.type!=="paren"){f({type:"text",value:d});continue}o=s.pop(),f({type:"text",value:d}),o=s[s.length-1];continue}if(d===iye||d===sye||d===Xge){let g=d,y;for(e.keepQuotes!==!0&&(d="");l<u&&(y=h());){if(y===m1){d+=y+h();continue}if(y===g){e.keepQuotes===!0&&(d+=y);break}d+=y}f({type:"text",value:d});continue}if(d===rye){p++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=f(y),s.push(o),f({type:"open",value:d});continue}if(d===nye){if(o.type!=="brace"){f({type:"text",value:d});continue}let g="close";o=s.pop(),o.close=!0,f({type:g,value:d}),p--,o=s[s.length-1];continue}if(d===Zge&&p>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:Yge(o)}]}f({type:"comma",value:d}),o.commas++;continue}if(d===Qge&&p>0&&o.commas===0){let g=o.nodes;if(p===0||g.length===0){f({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let y=g[g.length-1];y.value+=a.value+d,a=y,o.ranges--;continue}f({type:"dot",value:d});continue}f({type:"text",value:d})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let g=s[s.length-1],y=g.nodes.indexOf(o);g.nodes.splice(y,1,...o.nodes)}while(s.length>0);return f({type:"eos"}),i};q6.exports=cye});var H6=S((XZe,V6)=>{"use strict";m();var G6=Fv(),uye=N6(),lye=M6(),pye=z6(),Ui=(t,e={})=>{let r=[];if(Array.isArray(t))for(let n of t){let i=Ui.create(n,e);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(Ui.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Ui.parse=(t,e={})=>pye(t,e);Ui.stringify=(t,e={})=>G6(typeof t=="string"?Ui.parse(t,e):t,e);Ui.compile=(t,e={})=>(typeof t=="string"&&(t=Ui.parse(t,e)),uye(t,e));Ui.expand=(t,e={})=>{typeof t=="string"&&(t=Ui.parse(t,e));let r=lye(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};Ui.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Ui.compile(t,e):Ui.expand(t,e);V6.exports=Ui});var ch=S((QZe,X6)=>{"use strict";m();var dye=require("path"),Ro="\\\\/",K6=`[^${Ro}]`,Aa="\\.",fye="\\+",mye="\\?",Nv="\\/",hye="(?=.)",W6="[^/]",h1=`(?:${Nv}|$)`,J6=`(?:^|${Nv})`,g1=`${Aa}{1,2}${h1}`,gye=`(?!${Aa})`,yye=`(?!${J6}${g1})`,bye=`(?!${Aa}{0,1}${h1})`,vye=`(?!${g1})`,xye=`[^.${Nv}]`,Dye=`${W6}*?`,Y6={DOT_LITERAL:Aa,PLUS_LITERAL:fye,QMARK_LITERAL:mye,SLASH_LITERAL:Nv,ONE_CHAR:hye,QMARK:W6,END_ANCHOR:h1,DOTS_SLASH:g1,NO_DOT:gye,NO_DOTS:yye,NO_DOT_SLASH:bye,NO_DOTS_SLASH:vye,QMARK_NO_DOT:xye,STAR:Dye,START_ANCHOR:J6},wye={...Y6,SLASH_LITERAL:`[${Ro}]`,QMARK:K6,STAR:`${K6}*?`,DOTS_SLASH:`${Aa}{1,2}(?:[${Ro}]|$)`,NO_DOT:`(?!${Aa})`,NO_DOTS:`(?!(?:^|[${Ro}])${Aa}{1,2}(?:[${Ro}]|$))`,NO_DOT_SLASH:`(?!${Aa}{0,1}(?:[${Ro}]|$))`,NO_DOTS_SLASH:`(?!${Aa}{1,2}(?:[${Ro}]|$))`,QMARK_NO_DOT:`[^.${Ro}]`,START_ANCHOR:`(?:^|[${Ro}])`,END_ANCHOR:`(?:[${Ro}]|$)`},Cye={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};X6.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Cye,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:dye.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?wye:Y6}}});var uh=S(mi=>{"use strict";m();var Eye=require("path"),Sye=process.platform==="win32",{REGEX_BACKSLASH:Tye,REGEX_REMOVE_BACKSLASH:Aye,REGEX_SPECIAL_CHARS:Pye,REGEX_SPECIAL_CHARS_GLOBAL:_ye}=ch();mi.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);mi.hasRegexChars=t=>Pye.test(t);mi.isRegexChar=t=>t.length===1&&mi.hasRegexChars(t);mi.escapeRegex=t=>t.replace(_ye,"\\$1");mi.toPosixSlashes=t=>t.replace(Tye,"/");mi.removeBackslashes=t=>t.replace(Aye,e=>e==="\\"?"":e);mi.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};mi.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Sye===!0||Eye.sep==="\\";mi.escapeLast=(t,e,r)=>{let n=t.lastIndexOf(e,r);return n===-1?t:t[n-1]==="\\"?mi.escapeLast(t,e,n-1):`${t.slice(0,n)}\\${t.slice(n)}`};mi.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};mi.wrapOutput=(t,e={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${t})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var s9=S((nQe,i9)=>{"use strict";m();var Z6=uh(),{CHAR_ASTERISK:y1,CHAR_AT:Fye,CHAR_BACKWARD_SLASH:lh,CHAR_COMMA:kye,CHAR_DOT:b1,CHAR_EXCLAMATION_MARK:v1,CHAR_FORWARD_SLASH:n9,CHAR_LEFT_CURLY_BRACE:x1,CHAR_LEFT_PARENTHESES:D1,CHAR_LEFT_SQUARE_BRACKET:Iye,CHAR_PLUS:Nye,CHAR_QUESTION_MARK:Q6,CHAR_RIGHT_CURLY_BRACE:Rye,CHAR_RIGHT_PARENTHESES:e9,CHAR_RIGHT_SQUARE_BRACKET:Oye}=ch(),t9=t=>t===n9||t===lh,r9=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Mye=(t,e)=>{let r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],c=t,u=-1,l=0,p=0,d=!1,h=!1,f=!1,g=!1,y=!1,b=!1,D=!1,w=!1,v=!1,x=!1,C=0,E,A,F={value:"",depth:0,isGlob:!1},P=()=>u>=n,_=()=>c.charCodeAt(u+1),B=()=>(E=A,c.charCodeAt(++u));for(;u<n;){A=B();let $;if(A===lh){D=F.backslashes=!0,A=B(),A===x1&&(b=!0);continue}if(b===!0||A===x1){for(C++;P()!==!0&&(A=B());){if(A===lh){D=F.backslashes=!0,B();continue}if(A===x1){C++;continue}if(b!==!0&&A===b1&&(A=B())===b1){if(d=F.isBrace=!0,f=F.isGlob=!0,x=!0,i===!0)continue;break}if(b!==!0&&A===kye){if(d=F.isBrace=!0,f=F.isGlob=!0,x=!0,i===!0)continue;break}if(A===Rye&&(C--,C===0)){b=!1,d=F.isBrace=!0,x=!0;break}}if(i===!0)continue;break}if(A===n9){if(s.push(u),o.push(F),F={value:"",depth:0,isGlob:!1},x===!0)continue;if(E===b1&&u===l+1){l+=2;continue}p=u+1;continue}if(r.noext!==!0&&(A===Nye||A===Fye||A===y1||A===Q6||A===v1)===!0&&_()===D1){if(f=F.isGlob=!0,g=F.isExtglob=!0,x=!0,A===v1&&u===l&&(v=!0),i===!0){for(;P()!==!0&&(A=B());){if(A===lh){D=F.backslashes=!0,A=B();continue}if(A===e9){f=F.isGlob=!0,x=!0;break}}continue}break}if(A===y1){if(E===y1&&(y=F.isGlobstar=!0),f=F.isGlob=!0,x=!0,i===!0)continue;break}if(A===Q6){if(f=F.isGlob=!0,x=!0,i===!0)continue;break}if(A===Iye){for(;P()!==!0&&($=B());){if($===lh){D=F.backslashes=!0,B();continue}if($===Oye){h=F.isBracket=!0,f=F.isGlob=!0,x=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&A===v1&&u===l){w=F.negated=!0,l++;continue}if(r.noparen!==!0&&A===D1){if(f=F.isGlob=!0,i===!0){for(;P()!==!0&&(A=B());){if(A===D1){D=F.backslashes=!0,A=B();continue}if(A===e9){x=!0;break}}continue}break}if(f===!0){if(x=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,f=!1);let L=c,z="",k="";l>0&&(z=c.slice(0,l),c=c.slice(l),p-=l),L&&f===!0&&p>0?(L=c.slice(0,p),k=c.slice(p)):f===!0?(L="",k=c):L=c,L&&L!==""&&L!=="/"&&L!==c&&t9(L.charCodeAt(L.length-1))&&(L=L.slice(0,-1)),r.unescape===!0&&(k&&(k=Z6.removeBackslashes(k)),L&&D===!0&&(L=Z6.removeBackslashes(L)));let O={prefix:z,input:t,start:l,base:L,glob:k,isBrace:d,isBracket:h,isGlob:f,isExtglob:g,isGlobstar:y,negated:w,negatedExtglob:v};if(r.tokens===!0&&(O.maxDepth=0,t9(A)||o.push(F),O.tokens=o),r.parts===!0||r.tokens===!0){let $;for(let H=0;H<s.length;H++){let se=$?$+1:l,U=s[H],G=t.slice(se,U);r.tokens&&(H===0&&l!==0?(o[H].isPrefix=!0,o[H].value=z):o[H].value=G,r9(o[H]),O.maxDepth+=o[H].depth),(H!==0||G!=="")&&a.push(G),$=U}if($&&$+1<t.length){let H=t.slice($+1);a.push(H),r.tokens&&(o[o.length-1].value=H,r9(o[o.length-1]),O.maxDepth+=o[o.length-1].depth)}O.slashes=s,O.parts=a}return O};i9.exports=Mye});var c9=S((sQe,a9)=>{"use strict";m();var Rv=ch(),qi=uh(),{MAX_LENGTH:Ov,POSIX_REGEX_SOURCE:Bye,REGEX_NON_SPECIAL_CHARS:Lye,REGEX_SPECIAL_CHARS_BACKREF:$ye,REPLACEMENTS:o9}=Rv,jye=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>qi.escapeRegex(i)).join("..")}return r},Zp=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,w1=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=o9[t]||t;let r={...e},n=typeof r.maxLength=="number"?Math.min(Ov,r.maxLength):Ov,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",c=qi.isWindows(e),u=Rv.globChars(c),l=Rv.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:f,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:b,NO_DOTS_SLASH:D,QMARK:w,QMARK_NO_DOT:v,STAR:x,START_ANCHOR:C}=u,E=ie=>`(${a}(?:(?!${C}${ie.dot?g:p}).)*?)`,A=r.dot?"":y,F=r.dot?w:v,P=r.bash===!0?E(r):x;r.capture&&(P=`(${P})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let _={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=qi.removePrefix(t,_),i=t.length;let B=[],L=[],z=[],k=s,O,$=()=>_.index===i-1,H=_.peek=(ie=1)=>t[_.index+ie],se=_.advance=()=>t[++_.index]||"",U=()=>t.slice(_.index+1),G=(ie="",je=0)=>{_.consumed+=ie,_.index+=je},K=ie=>{_.output+=ie.output!=null?ie.output:ie.value,G(ie.value)},oe=()=>{let ie=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)se(),_.start++,ie++;return ie%2===0?!1:(_.negated=!0,_.start++,!0)},Ae=ie=>{_[ie]++,z.push(ie)},Y=ie=>{_[ie]--,z.pop()},ne=ie=>{if(k.type==="globstar"){let je=_.braces>0&&(ie.type==="comma"||ie.type==="brace"),ee=ie.extglob===!0||B.length&&(ie.type==="pipe"||ie.type==="paren");ie.type!=="slash"&&ie.type!=="paren"&&!je&&!ee&&(_.output=_.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=P,_.output+=k.output)}if(B.length&&ie.type!=="paren"&&(B[B.length-1].inner+=ie.value),(ie.value||ie.output)&&K(ie),k&&k.type==="text"&&ie.type==="text"){k.value+=ie.value,k.output=(k.output||"")+ie.value;return}ie.prev=k,o.push(ie),k=ie},vt=(ie,je)=>{let ee={...l[je],conditions:1,inner:""};ee.prev=k,ee.parens=_.parens,ee.output=_.output;let Se=(r.capture?"(":"")+ee.open;Ae("parens"),ne({type:ie,value:je,output:_.output?"":f}),ne({type:"paren",extglob:!0,value:se(),output:Se}),B.push(ee)},sr=ie=>{let je=ie.close+(r.capture?")":""),ee;if(ie.type==="negate"){let Se=P;if(ie.inner&&ie.inner.length>1&&ie.inner.includes("/")&&(Se=E(r)),(Se!==P||$()||/^\)+$/.test(U()))&&(je=ie.close=`)$))${Se}`),ie.inner.includes("*")&&(ee=U())&&/^\.[^\\/.]+$/.test(ee)){let fe=w1(ee,{...e,fastpaths:!1}).output;je=ie.close=`)${fe})${Se})`}ie.prev.type==="bos"&&(_.negatedExtglob=!0)}ne({type:"paren",extglob:!0,value:O,output:je}),Y("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let ie=!1,je=t.replace($ye,(ee,Se,fe,wt,rt,_r)=>wt==="\\"?(ie=!0,ee):wt==="?"?Se?Se+wt+(rt?w.repeat(rt.length):""):_r===0?F+(rt?w.repeat(rt.length):""):w.repeat(fe.length):wt==="."?p.repeat(fe.length):wt==="*"?Se?Se+wt+(rt?P:""):P:Se?ee:`\\${ee}`);return ie===!0&&(r.unescape===!0?je=je.replace(/\\/g,""):je=je.replace(/\\+/g,ee=>ee.length%2===0?"\\\\":ee?"\\":"")),je===t&&r.contains===!0?(_.output=t,_):(_.output=qi.wrapOutput(je,_,e),_)}for(;!$();){if(O=se(),O==="\0")continue;if(O==="\\"){let ee=H();if(ee==="/"&&r.bash!==!0||ee==="."||ee===";")continue;if(!ee){O+="\\",ne({type:"text",value:O});continue}let Se=/^\\+/.exec(U()),fe=0;if(Se&&Se[0].length>2&&(fe=Se[0].length,_.index+=fe,fe%2!==0&&(O+="\\")),r.unescape===!0?O=se():O+=se(),_.brackets===0){ne({type:"text",value:O});continue}}if(_.brackets>0&&(O!=="]"||k.value==="["||k.value==="[^")){if(r.posix!==!1&&O===":"){let ee=k.value.slice(1);if(ee.includes("[")&&(k.posix=!0,ee.includes(":"))){let Se=k.value.lastIndexOf("["),fe=k.value.slice(0,Se),wt=k.value.slice(Se+2),rt=Bye[wt];if(rt){k.value=fe+rt,_.backtrack=!0,se(),!s.output&&o.indexOf(k)===1&&(s.output=f);continue}}}(O==="["&&H()!==":"||O==="-"&&H()==="]")&&(O=`\\${O}`),O==="]"&&(k.value==="["||k.value==="[^")&&(O=`\\${O}`),r.posix===!0&&O==="!"&&k.value==="["&&(O="^"),k.value+=O,K({value:O});continue}if(_.quotes===1&&O!=='"'){O=qi.escapeRegex(O),k.value+=O,K({value:O});continue}if(O==='"'){_.quotes=_.quotes===1?0:1,r.keepQuotes===!0&&ne({type:"text",value:O});continue}if(O==="("){Ae("parens"),ne({type:"paren",value:O});continue}if(O===")"){if(_.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Zp("opening","("));let ee=B[B.length-1];if(ee&&_.parens===ee.parens+1){sr(B.pop());continue}ne({type:"paren",value:O,output:_.parens?")":"\\)"}),Y("parens");continue}if(O==="["){if(r.nobracket===!0||!U().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Zp("closing","]"));O=`\\${O}`}else Ae("brackets");ne({type:"bracket",value:O});continue}if(O==="]"){if(r.nobracket===!0||k&&k.type==="bracket"&&k.value.length===1){ne({type:"text",value:O,output:`\\${O}`});continue}if(_.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Zp("opening","["));ne({type:"text",value:O,output:`\\${O}`});continue}Y("brackets");let ee=k.value.slice(1);if(k.posix!==!0&&ee[0]==="^"&&!ee.includes("/")&&(O=`/${O}`),k.value+=O,K({value:O}),r.literalBrackets===!1||qi.hasRegexChars(ee))continue;let Se=qi.escapeRegex(k.value);if(_.output=_.output.slice(0,-k.value.length),r.literalBrackets===!0){_.output+=Se,k.value=Se;continue}k.value=`(${a}${Se}|${k.value})`,_.output+=k.value;continue}if(O==="{"&&r.nobrace!==!0){Ae("braces");let ee={type:"brace",value:O,output:"(",outputIndex:_.output.length,tokensIndex:_.tokens.length};L.push(ee),ne(ee);continue}if(O==="}"){let ee=L[L.length-1];if(r.nobrace===!0||!ee){ne({type:"text",value:O,output:O});continue}let Se=")";if(ee.dots===!0){let fe=o.slice(),wt=[];for(let rt=fe.length-1;rt>=0&&(o.pop(),fe[rt].type!=="brace");rt--)fe[rt].type!=="dots"&&wt.unshift(fe[rt].value);Se=jye(wt,r),_.backtrack=!0}if(ee.comma!==!0&&ee.dots!==!0){let fe=_.output.slice(0,ee.outputIndex),wt=_.tokens.slice(ee.tokensIndex);ee.value=ee.output="\\{",O=Se="\\}",_.output=fe;for(let rt of wt)_.output+=rt.output||rt.value}ne({type:"brace",value:O,output:Se}),Y("braces"),L.pop();continue}if(O==="|"){B.length>0&&B[B.length-1].conditions++,ne({type:"text",value:O});continue}if(O===","){let ee=O,Se=L[L.length-1];Se&&z[z.length-1]==="braces"&&(Se.comma=!0,ee="|"),ne({type:"comma",value:O,output:ee});continue}if(O==="/"){if(k.type==="dot"&&_.index===_.start+1){_.start=_.index+1,_.consumed="",_.output="",o.pop(),k=s;continue}ne({type:"slash",value:O,output:h});continue}if(O==="."){if(_.braces>0&&k.type==="dot"){k.value==="."&&(k.output=p);let ee=L[L.length-1];k.type="dots",k.output+=O,k.value+=O,ee.dots=!0;continue}if(_.braces+_.parens===0&&k.type!=="bos"&&k.type!=="slash"){ne({type:"text",value:O,output:p});continue}ne({type:"dot",value:O,output:p});continue}if(O==="?"){if(!(k&&k.value==="(")&&r.noextglob!==!0&&H()==="("&&H(2)!=="?"){vt("qmark",O);continue}if(k&&k.type==="paren"){let Se=H(),fe=O;if(Se==="<"&&!qi.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(k.value==="("&&!/[!=<:]/.test(Se)||Se==="<"&&!/<([!=]|\w+>)/.test(U()))&&(fe=`\\${O}`),ne({type:"text",value:O,output:fe});continue}if(r.dot!==!0&&(k.type==="slash"||k.type==="bos")){ne({type:"qmark",value:O,output:v});continue}ne({type:"qmark",value:O,output:w});continue}if(O==="!"){if(r.noextglob!==!0&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){vt("negate",O);continue}if(r.nonegate!==!0&&_.index===0){oe();continue}}if(O==="+"){if(r.noextglob!==!0&&H()==="("&&H(2)!=="?"){vt("plus",O);continue}if(k&&k.value==="("||r.regex===!1){ne({type:"plus",value:O,output:d});continue}if(k&&(k.type==="bracket"||k.type==="paren"||k.type==="brace")||_.parens>0){ne({type:"plus",value:O});continue}ne({type:"plus",value:d});continue}if(O==="@"){if(r.noextglob!==!0&&H()==="("&&H(2)!=="?"){ne({type:"at",extglob:!0,value:O,output:""});continue}ne({type:"text",value:O});continue}if(O!=="*"){(O==="$"||O==="^")&&(O=`\\${O}`);let ee=Lye.exec(U());ee&&(O+=ee[0],_.index+=ee[0].length),ne({type:"text",value:O});continue}if(k&&(k.type==="globstar"||k.star===!0)){k.type="star",k.star=!0,k.value+=O,k.output=P,_.backtrack=!0,_.globstar=!0,G(O);continue}let ie=U();if(r.noextglob!==!0&&/^\([^?]/.test(ie)){vt("star",O);continue}if(k.type==="star"){if(r.noglobstar===!0){G(O);continue}let ee=k.prev,Se=ee.prev,fe=ee.type==="slash"||ee.type==="bos",wt=Se&&(Se.type==="star"||Se.type==="globstar");if(r.bash===!0&&(!fe||ie[0]&&ie[0]!=="/")){ne({type:"star",value:O,output:""});continue}let rt=_.braces>0&&(ee.type==="comma"||ee.type==="brace"),_r=B.length&&(ee.type==="pipe"||ee.type==="paren");if(!fe&&ee.type!=="paren"&&!rt&&!_r){ne({type:"star",value:O,output:""});continue}for(;ie.slice(0,3)==="/**";){let un=t[_.index+4];if(un&&un!=="/")break;ie=ie.slice(3),G("/**",3)}if(ee.type==="bos"&&$()){k.type="globstar",k.value+=O,k.output=E(r),_.output=k.output,_.globstar=!0,G(O);continue}if(ee.type==="slash"&&ee.prev.type!=="bos"&&!wt&&$()){_.output=_.output.slice(0,-(ee.output+k.output).length),ee.output=`(?:${ee.output}`,k.type="globstar",k.output=E(r)+(r.strictSlashes?")":"|$)"),k.value+=O,_.globstar=!0,_.output+=ee.output+k.output,G(O);continue}if(ee.type==="slash"&&ee.prev.type!=="bos"&&ie[0]==="/"){let un=ie[1]!==void 0?"|$":"";_.output=_.output.slice(0,-(ee.output+k.output).length),ee.output=`(?:${ee.output}`,k.type="globstar",k.output=`${E(r)}${h}|${h}${un})`,k.value+=O,_.output+=ee.output+k.output,_.globstar=!0,G(O+se()),ne({type:"slash",value:"/",output:""});continue}if(ee.type==="bos"&&ie[0]==="/"){k.type="globstar",k.value+=O,k.output=`(?:^|${h}|${E(r)}${h})`,_.output=k.output,_.globstar=!0,G(O+se()),ne({type:"slash",value:"/",output:""});continue}_.output=_.output.slice(0,-k.output.length),k.type="globstar",k.output=E(r),k.value+=O,_.output+=k.output,_.globstar=!0,G(O);continue}let je={type:"star",value:O,output:P};if(r.bash===!0){je.output=".*?",(k.type==="bos"||k.type==="slash")&&(je.output=A+je.output),ne(je);continue}if(k&&(k.type==="bracket"||k.type==="paren")&&r.regex===!0){je.output=O,ne(je);continue}(_.index===_.start||k.type==="slash"||k.type==="dot")&&(k.type==="dot"?(_.output+=b,k.output+=b):r.dot===!0?(_.output+=D,k.output+=D):(_.output+=A,k.output+=A),H()!=="*"&&(_.output+=f,k.output+=f)),ne(je)}for(;_.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Zp("closing","]"));_.output=qi.escapeLast(_.output,"["),Y("brackets")}for(;_.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Zp("closing",")"));_.output=qi.escapeLast(_.output,"("),Y("parens")}for(;_.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Zp("closing","}"));_.output=qi.escapeLast(_.output,"{"),Y("braces")}if(r.strictSlashes!==!0&&(k.type==="star"||k.type==="bracket")&&ne({type:"maybe_slash",value:"",output:`${h}?`}),_.backtrack===!0){_.output="";for(let ie of _.tokens)_.output+=ie.output!=null?ie.output:ie.value,ie.suffix&&(_.output+=ie.suffix)}return _};w1.fastpaths=(t,e)=>{let r={...e},n=typeof r.maxLength=="number"?Math.min(Ov,r.maxLength):Ov,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=o9[t]||t;let s=qi.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:h,START_ANCHOR:f}=Rv.globChars(s),g=r.dot?p:l,y=r.dot?d:l,b=r.capture?"":"?:",D={negated:!1,prefix:""},w=r.bash===!0?".*?":h;r.capture&&(w=`(${w})`);let v=A=>A.noglobstar===!0?w:`(${b}(?:(?!${f}${A.dot?u:o}).)*?)`,x=A=>{switch(A){case"*":return`${g}${c}${w}`;case".*":return`${o}${c}${w}`;case"*.*":return`${g}${w}${o}${c}${w}`;case"*/*":return`${g}${w}${a}${c}${y}${w}`;case"**":return g+v(r);case"**/*":return`(?:${g}${v(r)}${a})?${y}${c}${w}`;case"**/*.*":return`(?:${g}${v(r)}${a})?${y}${w}${o}${c}${w}`;case"**/.*":return`(?:${g}${v(r)}${a})?${o}${c}${w}`;default:{let F=/^(.*?)\.(\w+)$/.exec(A);if(!F)return;let P=x(F[1]);return P?P+o+F[2]:void 0}}},C=qi.removePrefix(t,D),E=x(C);return E&&r.strictSlashes!==!0&&(E+=`${a}?`),E};a9.exports=w1});var l9=S((aQe,u9)=>{"use strict";m();var Uye=require("path"),qye=s9(),C1=c9(),E1=uh(),zye=ch(),Gye=t=>t&&typeof t=="object"&&!Array.isArray(t),Tr=(t,e,r=!1)=>{if(Array.isArray(t)){let l=t.map(d=>Tr(d,e,r));return d=>{for(let h of l){let f=h(d);if(f)return f}return!1}}let n=Gye(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=E1.isWindows(e),o=n?Tr.compileRe(t,e):Tr.makeRe(t,e,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};c=Tr(i.ignore,l,r)}let u=(l,p=!1)=>{let{isMatch:d,match:h,output:f}=Tr.test(l,o,e,{glob:t,posix:s}),g={glob:t,state:a,regex:o,posix:s,input:l,output:f,match:h,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===!1?(g.isMatch=!1,p?g:!1):c(l)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=!1,p?g:!1):(typeof i.onMatch=="function"&&i.onMatch(g),p?g:!0)};return r&&(u.state=a),u};Tr.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?E1.toPosixSlashes:null),a=t===n,c=a&&o?o(t):t;return a===!1&&(c=o?o(t):t,a=c===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Tr.matchBase(t,e,r,i):a=e.exec(c)),{isMatch:!!a,match:a,output:c}};Tr.matchBase=(t,e,r,n=E1.isWindows(r))=>(e instanceof RegExp?e:Tr.makeRe(e,r)).test(Uye.basename(t));Tr.isMatch=(t,e,r)=>Tr(e,r)(t);Tr.parse=(t,e)=>Array.isArray(t)?t.map(r=>Tr.parse(r,e)):C1(t,{...e,fastpaths:!1});Tr.scan=(t,e)=>qye(t,e);Tr.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let c=Tr.toRegex(a,e);return n===!0&&(c.state=t),c};Tr.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=C1.fastpaths(t,e)),i.output||(i=C1(t,e)),Tr.compileRe(i,e,r,n)};Tr.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Tr.constants=zye;u9.exports=Tr});var d9=S((uQe,p9)=>{"use strict";m();p9.exports=l9()});var Mv=S((pQe,y9)=>{"use strict";m();var m9=require("util"),h9=H6(),Oo=d9(),S1=uh(),f9=t=>t===""||t==="./",g9=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},rr=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,i=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<e.length;l++){let p=Oo(String(e[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let h of t){let f=p(h,!0);(d?!f.isMatch:f.isMatch)&&(d?n.add(f.output):(n.delete(f.output),i.add(f.output)))}}let u=(o===e.length?[...s]:[...i]).filter(l=>!n.has(l));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return u};rr.match=rr;rr.matcher=(t,e)=>Oo(t,e);rr.isMatch=(t,e,r)=>Oo(e,r)(t);rr.any=rr.isMatch;rr.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=new Set(rr(t,e,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};rr.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${m9.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>rr.contains(t,n,r));if(typeof e=="string"){if(f9(t)||f9(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return rr.isMatch(t,e,{...r,contains:!0})};rr.matchKeys=(t,e,r)=>{if(!S1.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=rr(Object.keys(t),e,r),i={};for(let s of n)i[s]=t[s];return i};rr.some=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=Oo(String(i),r);if(n.some(o=>s(o)))return!0}return!1};rr.every=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=Oo(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};rr.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${m9.inspect(t)}"`);return[].concat(e).every(n=>Oo(n,r)(t))};rr.capture=(t,e,r)=>{let n=S1.isWindows(r),s=Oo.makeRe(String(t),{...r,capture:!0}).exec(n?S1.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};rr.makeRe=(...t)=>Oo.makeRe(...t);rr.scan=(...t)=>Oo.scan(...t);rr.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let i of h9(String(n),e))r.push(Oo.parse(i,e));return r};rr.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!g9(t)?[t]:h9(t,e)};rr.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return rr.braces(t,{...e,expand:!0})};rr.hasBraces=g9;y9.exports=rr});var A9=S(Fe=>{"use strict";m();Object.defineProperty(Fe,"__esModule",{value:!0});Fe.isAbsolute=Fe.partitionAbsoluteAndRelative=Fe.removeDuplicateSlashes=Fe.matchAny=Fe.convertPatternsToRe=Fe.makeRe=Fe.getPatternParts=Fe.expandBraceExpansion=Fe.expandPatternsWithBraceExpansion=Fe.isAffectDepthOfReadingPattern=Fe.endsWithSlashGlobStar=Fe.hasGlobStar=Fe.getBaseDirectory=Fe.isPatternRelatedToParentDirectory=Fe.getPatternsOutsideCurrentDirectory=Fe.getPatternsInsideCurrentDirectory=Fe.getPositivePatterns=Fe.getNegativePatterns=Fe.isPositivePattern=Fe.isNegativePattern=Fe.convertToNegativePattern=Fe.convertToPositivePattern=Fe.isDynamicPattern=Fe.isStaticPattern=void 0;var b9=require("path"),Vye=l6(),T1=Mv(),v9="**",Hye="\\",Kye=/[*?]|^!/,Wye=/\[[^[]*]/,Jye=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Yye=/[!*+?@]\([^(]*\)/,Xye=/,|\.\./,Zye=/(?!^)\/{2,}/g;function x9(t,e={}){return!D9(t,e)}Fe.isStaticPattern=x9;function D9(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(Hye)||Kye.test(t)||Wye.test(t)||Jye.test(t)||e.extglob!==!1&&Yye.test(t)||e.braceExpansion!==!1&&Qye(t))}Fe.isDynamicPattern=D9;function Qye(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let n=t.slice(e,r);return Xye.test(n)}function ebe(t){return Bv(t)?t.slice(1):t}Fe.convertToPositivePattern=ebe;function tbe(t){return"!"+t}Fe.convertToNegativePattern=tbe;function Bv(t){return t.startsWith("!")&&t[1]!=="("}Fe.isNegativePattern=Bv;function w9(t){return!Bv(t)}Fe.isPositivePattern=w9;function rbe(t){return t.filter(Bv)}Fe.getNegativePatterns=rbe;function nbe(t){return t.filter(w9)}Fe.getPositivePatterns=nbe;function ibe(t){return t.filter(e=>!A1(e))}Fe.getPatternsInsideCurrentDirectory=ibe;function sbe(t){return t.filter(A1)}Fe.getPatternsOutsideCurrentDirectory=sbe;function A1(t){return t.startsWith("..")||t.startsWith("./..")}Fe.isPatternRelatedToParentDirectory=A1;function obe(t){return Vye(t,{flipBackslashes:!1})}Fe.getBaseDirectory=obe;function abe(t){return t.includes(v9)}Fe.hasGlobStar=abe;function C9(t){return t.endsWith("/"+v9)}Fe.endsWithSlashGlobStar=C9;function cbe(t){let e=b9.basename(t);return C9(t)||x9(e)}Fe.isAffectDepthOfReadingPattern=cbe;function ube(t){return t.reduce((e,r)=>e.concat(E9(r)),[])}Fe.expandPatternsWithBraceExpansion=ube;function E9(t){let e=T1.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,n)=>r.length-n.length),e.filter(r=>r!=="")}Fe.expandBraceExpansion=E9;function lbe(t,e){let{parts:r}=T1.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}Fe.getPatternParts=lbe;function S9(t,e){return T1.makeRe(t,e)}Fe.makeRe=S9;function pbe(t,e){return t.map(r=>S9(r,e))}Fe.convertPatternsToRe=pbe;function dbe(t,e){return e.some(r=>r.test(t))}Fe.matchAny=dbe;function fbe(t){return t.replace(Zye,"/")}Fe.removeDuplicateSlashes=fbe;function mbe(t){let e=[],r=[];for(let n of t)T9(n)?e.push(n):r.push(n);return[e,r]}Fe.partitionAbsoluteAndRelative=mbe;function T9(t){return b9.isAbsolute(t)}Fe.isAbsolute=T9});var k9=S((hQe,F9)=>{"use strict";m();var hbe=require("stream"),P9=hbe.PassThrough,gbe=Array.prototype.slice;F9.exports=ybe;function ybe(){let t=[],e=gbe.call(arguments),r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=P9(n);function a(){for(let l=0,p=arguments.length;l<p;l++)t.push(_9(arguments[l],n));return c(),this}function c(){if(r)return;r=!0;let l=t.shift();if(!l){process.nextTick(u);return}Array.isArray(l)||(l=[l]);let p=l.length+1;function d(){--p>0||(r=!1,c())}function h(f){function g(){f.removeListener("merge2UnpipeEnd",g),f.removeListener("end",g),s&&f.removeListener("error",y),d()}function y(b){o.emit("error",b)}if(f._readableState.endEmitted)return d();f.on("merge2UnpipeEnd",g),f.on("end",g),s&&f.on("error",y),f.pipe(o,{end:!1}),f.resume()}for(let f=0;f<l.length;f++)h(l[f]);d()}function u(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(l){l.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function _9(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=_9(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(P9(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var N9=S(Lv=>{"use strict";m();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.merge=void 0;var bbe=k9();function vbe(t){let e=bbe(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>I9(t)),e.once("end",()=>I9(t)),e}Lv.merge=vbe;function I9(t){t.forEach(e=>e.emit("close"))}});var R9=S(Qp=>{"use strict";m();Object.defineProperty(Qp,"__esModule",{value:!0});Qp.isEmpty=Qp.isString=void 0;function xbe(t){return typeof t=="string"}Qp.isString=xbe;function Dbe(t){return t===""}Qp.isEmpty=Dbe});var Pa=S(Pn=>{"use strict";m();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.string=Pn.stream=Pn.pattern=Pn.path=Pn.fs=Pn.errno=Pn.array=void 0;var wbe=X4();Pn.array=wbe;var Cbe=Z4();Pn.errno=Cbe;var Ebe=Q4();Pn.fs=Ebe;var Sbe=n6();Pn.path=Sbe;var Tbe=A9();Pn.pattern=Tbe;var Abe=N9();Pn.stream=Abe;var Pbe=R9();Pn.string=Pbe});var L9=S(_n=>{"use strict";m();Object.defineProperty(_n,"__esModule",{value:!0});_n.convertPatternGroupToTask=_n.convertPatternGroupsToTasks=_n.groupPatternsByBaseDirectory=_n.getNegativePatternsAsPositive=_n.getPositivePatterns=_n.convertPatternsToTasks=_n.generate=void 0;var Js=Pa();function _be(t,e){let r=O9(t,e),n=O9(e.ignore,e),i=M9(r),s=B9(r,n),o=i.filter(l=>Js.pattern.isStaticPattern(l,e)),a=i.filter(l=>Js.pattern.isDynamicPattern(l,e)),c=P1(o,s,!1),u=P1(a,s,!0);return c.concat(u)}_n.generate=_be;function O9(t,e){let r=t;return e.braceExpansion&&(r=Js.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>Js.pattern.removeDuplicateSlashes(n))}function P1(t,e,r){let n=[],i=Js.pattern.getPatternsOutsideCurrentDirectory(t),s=Js.pattern.getPatternsInsideCurrentDirectory(t),o=_1(i),a=_1(s);return n.push(...F1(o,e,r)),"."in a?n.push(k1(".",s,e,r)):n.push(...F1(a,e,r)),n}_n.convertPatternsToTasks=P1;function M9(t){return Js.pattern.getPositivePatterns(t)}_n.getPositivePatterns=M9;function B9(t,e){return Js.pattern.getNegativePatterns(t).concat(e).map(Js.pattern.convertToPositivePattern)}_n.getNegativePatternsAsPositive=B9;function _1(t){let e={};return t.reduce((r,n)=>{let i=Js.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},e)}_n.groupPatternsByBaseDirectory=_1;function F1(t,e,r){return Object.keys(t).map(n=>k1(n,t[n],e,r))}_n.convertPatternGroupsToTasks=F1;function k1(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Js.pattern.convertToNegativePattern))}}_n.convertPatternGroupToTask=k1});var j9=S($v=>{"use strict";m();Object.defineProperty($v,"__esModule",{value:!0});$v.read=void 0;function Fbe(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){$9(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){I1(r,i);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){$9(r,s);return}I1(r,i);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),I1(r,o)})})}$v.read=Fbe;function $9(t,e){t(e)}function I1(t,e){t(null,e)}});var U9=S(jv=>{"use strict";m();Object.defineProperty(jv,"__esModule",{value:!0});jv.read=void 0;function kbe(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}jv.read=kbe});var q9=S(vc=>{"use strict";m();Object.defineProperty(vc,"__esModule",{value:!0});vc.createFileSystemAdapter=vc.FILE_SYSTEM_ADAPTER=void 0;var Uv=require("fs");vc.FILE_SYSTEM_ADAPTER={lstat:Uv.lstat,stat:Uv.stat,lstatSync:Uv.lstatSync,statSync:Uv.statSync};function Ibe(t){return t===void 0?vc.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},vc.FILE_SYSTEM_ADAPTER),t)}vc.createFileSystemAdapter=Ibe});var z9=S(R1=>{"use strict";m();Object.defineProperty(R1,"__esModule",{value:!0});var Nbe=q9(),N1=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Nbe.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};R1.default=N1});var zu=S(xc=>{"use strict";m();Object.defineProperty(xc,"__esModule",{value:!0});xc.statSync=xc.stat=xc.Settings=void 0;var G9=j9(),Rbe=U9(),O1=z9();xc.Settings=O1.default;function Obe(t,e,r){if(typeof e=="function"){G9.read(t,M1(),e);return}G9.read(t,M1(e),r)}xc.stat=Obe;function Mbe(t,e){let r=M1(e);return Rbe.read(t,r)}xc.statSync=Mbe;function M1(t={}){return t instanceof O1.default?t:new O1.default(t)}});var K9=S((OQe,H9)=>{m();var V9;H9.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(V9||(V9=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var J9=S((BQe,W9)=>{m();W9.exports=Lbe;var Bbe=K9();function Lbe(t,e){let r,n,i,s=!0;Array.isArray(t)?(r=[],n=t.length):(i=Object.keys(t),r={},n=i.length);function o(c){function u(){e&&e(c,r),e=null}s?Bbe(u):u()}function a(c,u,l){r[c]=l,(--n===0||u)&&o(u)}n?i?i.forEach(function(c){t[c](function(u,l){a(c,u,l)})}):t.forEach(function(c,u){c(function(l,p){a(u,l,p)})}):o(null),s=!1}});var B1=S(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var qv=process.versions.node.split(".");if(qv[0]===void 0||qv[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var Y9=Number.parseInt(qv[0],10),$be=Number.parseInt(qv[1],10),X9=10,jbe=10,Ube=Y9>X9,qbe=Y9===X9&&$be>=jbe;zv.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Ube||qbe});var Z9=S(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.createDirentFromStats=void 0;var L1=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function zbe(t,e){return new L1(t,e)}Gv.createDirentFromStats=zbe});var $1=S(Vv=>{"use strict";m();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.fs=void 0;var Gbe=Z9();Vv.fs=Gbe});var j1=S(Hv=>{"use strict";m();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.joinPathSegments=void 0;function Vbe(t,e,r){return t.endsWith(r)?t+e:t+r+e}Hv.joinPathSegments=Vbe});var i5=S(Dc=>{"use strict";m();Object.defineProperty(Dc,"__esModule",{value:!0});Dc.readdir=Dc.readdirWithFileTypes=Dc.read=void 0;var Hbe=zu(),Q9=J9(),Kbe=B1(),e5=$1(),t5=j1();function Wbe(t,e,r){if(!e.stats&&Kbe.IS_SUPPORT_READDIR_WITH_FILE_TYPES){r5(t,e,r);return}n5(t,e,r)}Dc.read=Wbe;function r5(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){Kv(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:t5.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){U1(r,s);return}let o=s.map(a=>Jbe(a,e));Q9(o,(a,c)=>{if(a!==null){Kv(r,a);return}U1(r,c)})})}Dc.readdirWithFileTypes=r5;function Jbe(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=e5.fs.createDirentFromStats(t.name,i),r(null,t)})}}function n5(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){Kv(r,n);return}let s=i.map(o=>{let a=t5.joinPathSegments(t,o,e.pathSegmentSeparator);return c=>{Hbe.stat(a,e.fsStatSettings,(u,l)=>{if(u!==null){c(u);return}let p={name:o,path:a,dirent:e5.fs.createDirentFromStats(o,l)};e.stats&&(p.stats=l),c(null,p)})}});Q9(s,(o,a)=>{if(o!==null){Kv(r,o);return}U1(r,a)})})}Dc.readdir=n5;function Kv(t,e){t(e)}function U1(t,e){t(null,e)}});var u5=S(wc=>{"use strict";m();Object.defineProperty(wc,"__esModule",{value:!0});wc.readdir=wc.readdirWithFileTypes=wc.read=void 0;var Ybe=zu(),Xbe=B1(),s5=$1(),o5=j1();function Zbe(t,e){return!e.stats&&Xbe.IS_SUPPORT_READDIR_WITH_FILE_TYPES?a5(t,e):c5(t,e)}wc.read=Zbe;function a5(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:o5.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(i.path);i.dirent=s5.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}wc.readdirWithFileTypes=a5;function c5(t,e){return e.fs.readdirSync(t).map(n=>{let i=o5.joinPathSegments(t,n,e.pathSegmentSeparator),s=Ybe.statSync(i,e.fsStatSettings),o={name:n,path:i,dirent:s5.fs.createDirentFromStats(n,s)};return e.stats&&(o.stats=s),o})}wc.readdir=c5});var l5=S(Cc=>{"use strict";m();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.createFileSystemAdapter=Cc.FILE_SYSTEM_ADAPTER=void 0;var ed=require("fs");Cc.FILE_SYSTEM_ADAPTER={lstat:ed.lstat,stat:ed.stat,lstatSync:ed.lstatSync,statSync:ed.statSync,readdir:ed.readdir,readdirSync:ed.readdirSync};function Qbe(t){return t===void 0?Cc.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Cc.FILE_SYSTEM_ADAPTER),t)}Cc.createFileSystemAdapter=Qbe});var p5=S(z1=>{"use strict";m();Object.defineProperty(z1,"__esModule",{value:!0});var eve=require("path"),tve=zu(),rve=l5(),q1=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=rve.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,eve.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new tve.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};z1.default=q1});var Wv=S(Ec=>{"use strict";m();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.Settings=Ec.scandirSync=Ec.scandir=void 0;var d5=i5(),nve=u5(),G1=p5();Ec.Settings=G1.default;function ive(t,e,r){if(typeof e=="function"){d5.read(t,V1(),e);return}d5.read(t,V1(e),r)}Ec.scandir=ive;function sve(t,e){let r=V1(e);return nve.read(t,r)}Ec.scandirSync=sve;function V1(t={}){return t instanceof G1.default?t:new G1.default(t)}});var m5=S((net,f5)=>{"use strict";m();function ove(t){var e=new t,r=e;function n(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}f5.exports=ove});var g5=S((set,H1)=>{"use strict";m();var ave=m5();function h5(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=ave(cve),i=null,s=null,o=0,a=null,c={push:g,drain:ls,saturated:ls,pause:l,paused:!1,get concurrency(){return r},set concurrency(x){if(!(x>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=x,!c.paused)for(;i&&o<r;)o++,b()},running:u,resume:h,idle:f,length:p,getQueue:d,unshift:y,empty:ls,kill:D,killAndDrain:w,error:v};return c;function u(){return o}function l(){c.paused=!0}function p(){for(var x=i,C=0;x;)x=x.next,C++;return C}function d(){for(var x=i,C=[];x;)C.push(x.value),x=x.next;return C}function h(){if(c.paused){if(c.paused=!1,i===null){o++,b();return}for(;i&&o<r;)o++,b()}}function f(){return o===0&&c.length()===0}function g(x,C){var E=n.get();E.context=t,E.release=b,E.value=x,E.callback=C||ls,E.errorHandler=a,o>=r||c.paused?s?(s.next=E,s=E):(i=E,s=E,c.saturated()):(o++,e.call(t,E.value,E.worked))}function y(x,C){var E=n.get();E.context=t,E.release=b,E.value=x,E.callback=C||ls,E.errorHandler=a,o>=r||c.paused?i?(E.next=i,i=E):(i=E,s=E,c.saturated()):(o++,e.call(t,E.value,E.worked))}function b(x){x&&n.release(x);var C=i;C&&o<=r?c.paused?o--:(s===i&&(s=null),i=C.next,C.next=null,e.call(t,C.value,C.worked),s===null&&c.empty()):--o===0&&c.drain()}function D(){i=null,s=null,c.drain=ls}function w(){i=null,s=null,c.drain(),c.drain=ls}function v(x){a=x}}function ls(){}function cve(){this.value=null,this.callback=ls,this.next=null,this.release=ls,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var i=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=ls,t.errorHandler&&s(r,o),i.call(t.context,r,n),t.release(t)}}function uve(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(l,p){e.call(this,l).then(function(d){p(null,d)},p)}var i=h5(t,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=c,i.drained=u,i;function a(l){var p=new Promise(function(d,h){s(l,function(f,g){if(f){h(f);return}d(g)})});return p.catch(ls),p}function c(l){var p=new Promise(function(d,h){o(l,function(f,g){if(f){h(f);return}d(g)})});return p.catch(ls),p}function u(){var l=new Promise(function(p){process.nextTick(function(){if(i.idle())p();else{var d=i.drain;i.drain=function(){typeof d=="function"&&d(),p(),i.drain=d}}})});return l}}H1.exports=h5;H1.exports.promise=uve});var Jv=S(Mo=>{"use strict";m();Object.defineProperty(Mo,"__esModule",{value:!0});Mo.joinPathSegments=Mo.replacePathSegmentSeparator=Mo.isAppliedFilter=Mo.isFatalError=void 0;function lve(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}Mo.isFatalError=lve;function pve(t,e){return t===null||t(e)}Mo.isAppliedFilter=pve;function dve(t,e){return t.split(/[/\\]/).join(e)}Mo.replacePathSegmentSeparator=dve;function fve(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}Mo.joinPathSegments=fve});var J1=S(W1=>{"use strict";m();Object.defineProperty(W1,"__esModule",{value:!0});var mve=Jv(),K1=class{constructor(e,r){this._root=e,this._settings=r,this._root=mve.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};W1.default=K1});var Z1=S(X1=>{"use strict";m();Object.defineProperty(X1,"__esModule",{value:!0});var hve=require("events"),gve=Wv(),yve=g5(),Yv=Jv(),bve=J1(),Y1=class extends bve.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=gve.scandir,this._emitter=new hve.EventEmitter,this._queue=yve(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let n={directory:e,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(let s of i)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!Yv.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let n=e.path;r!==void 0&&(e.path=Yv.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Yv.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Yv.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};X1.default=Y1});var y5=S(eT=>{"use strict";m();Object.defineProperty(eT,"__esModule",{value:!0});var vve=Z1(),Q1=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new vve.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{xve(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Dve(e,this._storage)}),this._reader.read()}};eT.default=Q1;function xve(t,e){t(e)}function Dve(t,e){t(null,e)}});var b5=S(rT=>{"use strict";m();Object.defineProperty(rT,"__esModule",{value:!0});var wve=require("stream"),Cve=Z1(),tT=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Cve.default(this._root,this._settings),this._stream=new wve.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};rT.default=tT});var v5=S(iT=>{"use strict";m();Object.defineProperty(iT,"__esModule",{value:!0});var Eve=Wv(),Xv=Jv(),Sve=J1(),nT=class extends Sve.default{constructor(){super(...arguments),this._scandir=Eve.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(e){if(Xv.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let n=e.path;r!==void 0&&(e.path=Xv.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Xv.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Xv.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};iT.default=nT});var x5=S(oT=>{"use strict";m();Object.defineProperty(oT,"__esModule",{value:!0});var Tve=v5(),sT=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Tve.default(this._root,this._settings)}read(){return this._reader.read()}};oT.default=sT});var D5=S(cT=>{"use strict";m();Object.defineProperty(cT,"__esModule",{value:!0});var Ave=require("path"),Pve=Wv(),aT=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Ave.sep),this.fsScandirSettings=new Pve.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};cT.default=aT});var Qv=S(Bo=>{"use strict";m();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.Settings=Bo.walkStream=Bo.walkSync=Bo.walk=void 0;var w5=y5(),_ve=b5(),Fve=x5(),uT=D5();Bo.Settings=uT.default;function kve(t,e,r){if(typeof e=="function"){new w5.default(t,Zv()).read(e);return}new w5.default(t,Zv(e)).read(r)}Bo.walk=kve;function Ive(t,e){let r=Zv(e);return new Fve.default(t,r).read()}Bo.walkSync=Ive;function Nve(t,e){let r=Zv(e);return new _ve.default(t,r).read()}Bo.walkStream=Nve;function Zv(t={}){return t instanceof uT.default?t:new uT.default(t)}});var ex=S(pT=>{"use strict";m();Object.defineProperty(pT,"__esModule",{value:!0});var Rve=require("path"),Ove=zu(),C5=Pa(),lT=class{constructor(e){this._settings=e,this._fsStatSettings=new Ove.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return Rve.resolve(this._settings.cwd,e)}_makeEntry(e,r){let n={name:r,path:r,dirent:C5.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!C5.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};pT.default=lT});var mT=S(fT=>{"use strict";m();Object.defineProperty(fT,"__esModule",{value:!0});var Mve=require("stream"),Bve=zu(),Lve=Qv(),$ve=ex(),dT=class extends $ve.default{constructor(){super(...arguments),this._walkStream=Lve.walkStream,this._stat=Bve.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let n=e.map(this._getFullEntryPath,this),i=new Mve.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],e[s],r).then(c=>{c!==null&&r.entryFilter(c)&&i.push(c),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,r,n){return this._getStat(e).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}};fT.default=dT});var E5=S(gT=>{"use strict";m();Object.defineProperty(gT,"__esModule",{value:!0});var jve=Qv(),Uve=ex(),qve=mT(),hT=class extends Uve.default{constructor(){super(...arguments),this._walkAsync=jve.walk,this._readerStream=new qve.default(this._settings)}dynamic(e,r){return new Promise((n,i)=>{this._walkAsync(e,r,(s,o)=>{s===null?n(o):i(s)})})}async static(e,r){let n=[],i=this._readerStream.static(e,r);return new Promise((s,o)=>{i.once("error",o),i.on("data",a=>n.push(a)),i.once("end",()=>s(n))})}};gT.default=hT});var S5=S(bT=>{"use strict";m();Object.defineProperty(bT,"__esModule",{value:!0});var ph=Pa(),yT=class{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:e,segments:r,sections:n})}}_getPatternSegments(e){return ph.pattern.getPatternParts(e,this._micromatchOptions).map(n=>ph.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:ph.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return ph.array.splitWhen(e,r=>r.dynamic&&ph.pattern.hasGlobStar(r.pattern))}};bT.default=yT});var T5=S(xT=>{"use strict";m();Object.defineProperty(xT,"__esModule",{value:!0});var zve=S5(),vT=class extends zve.default{match(e){let r=e.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||r.every((c,u)=>{let l=s.segments[u];return!!(l.dynamic&&l.patternRe.test(c)||!l.dynamic&&l.pattern===c)}))return!0}return!1}};xT.default=vT});var A5=S(wT=>{"use strict";m();Object.defineProperty(wT,"__esModule",{value:!0});var tx=Pa(),Gve=T5(),DT=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){let i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return o=>this._filter(e,o,i,s)}_getMatcher(e){return new Gve.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(tx.pattern.isAffectDepthOfReadingPattern);return tx.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=tx.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let n=r.split("/").length;if(e==="")return n;let i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!tx.pattern.matchAny(e,r)}};wT.default=DT});var P5=S(ET=>{"use strict";m();Object.defineProperty(ET,"__esModule",{value:!0});var Sc=Pa(),CT=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let[n,i]=Sc.pattern.partitionAbsoluteAndRelative(r),s={positive:{all:Sc.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:Sc.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:Sc.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(e,r){let n=Sc.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let i=this._isMatchToPatternsSet(n,r,e.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(n),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,r,n){return!(!this._isMatchToPatterns(e,r.positive.all,n)||this._isMatchToPatterns(e,r.negative.relative,n)||this._isMatchToAbsoluteNegative(e,r.negative.absolute,n))}_isMatchToAbsoluteNegative(e,r,n){if(r.length===0)return!1;let i=Sc.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(i,r,n)}_isMatchToPatterns(e,r,n){if(r.length===0)return!1;let i=Sc.pattern.matchAny(e,r);return!i&&n?Sc.pattern.matchAny(e+"/",r):i}};ET.default=CT});var _5=S(TT=>{"use strict";m();Object.defineProperty(TT,"__esModule",{value:!0});var Vve=Pa(),ST=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return Vve.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};TT.default=ST});var k5=S(PT=>{"use strict";m();Object.defineProperty(PT,"__esModule",{value:!0});var F5=Pa(),AT=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=F5.path.makeAbsolute(this._settings.cwd,r),r=F5.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};PT.default=AT});var rx=S(FT=>{"use strict";m();Object.defineProperty(FT,"__esModule",{value:!0});var Hve=require("path"),Kve=A5(),Wve=P5(),Jve=_5(),Yve=k5(),_T=class{constructor(e){this._settings=e,this.errorFilter=new Jve.default(this._settings),this.entryFilter=new Wve.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Kve.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Yve.default(this._settings)}_getRootDirectory(e){return Hve.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};FT.default=_T});var I5=S(IT=>{"use strict";m();Object.defineProperty(IT,"__esModule",{value:!0});var Xve=E5(),Zve=rx(),kT=class extends Zve.default{constructor(){super(...arguments),this._reader=new Xve.default(this._settings)}async read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(r,e,n)).map(s=>n.transform(s))}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};IT.default=kT});var N5=S(RT=>{"use strict";m();Object.defineProperty(RT,"__esModule",{value:!0});var Qve=require("stream"),exe=mT(),txe=rx(),NT=class extends txe.default{constructor(){super(...arguments),this._reader=new exe.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new Qve.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};RT.default=NT});var R5=S(MT=>{"use strict";m();Object.defineProperty(MT,"__esModule",{value:!0});var rxe=zu(),nxe=Qv(),ixe=ex(),OT=class extends ixe.default{constructor(){super(...arguments),this._walkSync=nxe.walkSync,this._statSync=rxe.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let n=[];for(let i of e){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,r);o===null||!r.entryFilter(o)||n.push(o)}return n}_getEntry(e,r,n){try{let i=this._getStat(e);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};MT.default=OT});var O5=S(LT=>{"use strict";m();Object.defineProperty(LT,"__esModule",{value:!0});var sxe=R5(),oxe=rx(),BT=class extends oxe.default{constructor(){super(...arguments),this._reader=new sxe.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};LT.default=BT});var M5=S(rd=>{"use strict";m();Object.defineProperty(rd,"__esModule",{value:!0});rd.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var td=require("fs"),axe=require("os"),cxe=Math.max(axe.cpus().length,1);rd.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:td.lstat,lstatSync:td.lstatSync,stat:td.stat,statSync:td.statSync,readdir:td.readdir,readdirSync:td.readdirSync};var $T=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,cxe),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},rd.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};rd.default=$T});var zT=S((ntt,L5)=>{"use strict";m();var B5=L9(),uxe=I5(),lxe=N5(),pxe=O5(),jT=M5(),ps=Pa();async function UT(t,e){Ys(t);let r=qT(t,uxe.default,e),n=await Promise.all(r);return ps.array.flatten(n)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(u,l){Ys(u);let p=qT(u,pxe.default,l);return ps.array.flatten(p)}t.sync=e;function r(u,l){Ys(u);let p=qT(u,lxe.default,l);return ps.stream.merge(p)}t.stream=r;function n(u,l){Ys(u);let p=[].concat(u),d=new jT.default(l);return B5.generate(p,d)}t.generateTasks=n;function i(u,l){Ys(u);let p=new jT.default(l);return ps.pattern.isDynamicPattern(u,p)}t.isDynamicPattern=i;function s(u){return Ys(u),ps.path.escape(u)}t.escapePath=s;function o(u){return Ys(u),ps.path.convertPathToPattern(u)}t.convertPathToPattern=o;let a;(function(u){function l(d){return Ys(d),ps.path.escapePosixPath(d)}u.escapePath=l;function p(d){return Ys(d),ps.path.convertPosixPathToPattern(d)}u.convertPathToPattern=p})(a=t.posix||(t.posix={}));let c;(function(u){function l(d){return Ys(d),ps.path.escapeWindowsPath(d)}u.escapePath=l;function p(d){return Ys(d),ps.path.convertWindowsPathToPattern(d)}u.convertPathToPattern=p})(c=t.win32||(t.win32={}))})(UT||(UT={}));function qT(t,e,r){let n=[].concat(t),i=new jT.default(r),s=B5.generate(n,i),o=new e(i);return s.map(o.read,o)}function Ys(t){if(![].concat(t).every(n=>ps.string.isString(n)&&!ps.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}L5.exports=UT});async function GT(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await j5.default[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function VT(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return $5.default[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var $5,j5,stt,U5,ott,att,q5,ctt,z5=N(()=>{m();$5=V(require("node:fs"),1),j5=V(require("node:fs/promises"),1);stt=GT.bind(void 0,"stat","isFile"),U5=GT.bind(void 0,"stat","isDirectory"),ott=GT.bind(void 0,"lstat","isSymbolicLink"),att=VT.bind(void 0,"statSync","isFile"),q5=VT.bind(void 0,"statSync","isDirectory"),ctt=VT.bind(void 0,"lstatSync","isSymbolicLink")});var G5=N(()=>{m()});function dh(t){return t instanceof URL?(0,H5.fileURLToPath)(t):t}var V5,HT,H5,ftt,mtt,KT=N(()=>{m();V5=require("node:util"),HT=require("node:child_process"),H5=require("node:url");G5();ftt=(0,V5.promisify)(HT.execFile);mtt=10*1024*1024});function nd(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}var K5=N(()=>{m()});var fh,WT=N(()=>{m();fh=t=>t[0]==="!"});var W5,J5,Y5,Gu,JT,X5,dxe,Z5,Q5,fxe,mxe,hxe,ej,tj,rj,nj,ij=N(()=>{m();W5=V(require("node:process"),1),J5=V(require("node:fs"),1),Y5=V(require("node:fs/promises"),1),Gu=V(require("node:path"),1),JT=V(zT(),1),X5=V(require("ignore"),1);K5();KT();WT();dxe=["**/node_modules","**/flow-typed","**/coverage","**/.git"],Z5={absolute:!0,dot:!0},Q5="**/.gitignore",fxe=(t,e)=>fh(t)?"!"+Gu.default.posix.join(e,t.slice(1)):Gu.default.posix.join(e,t),mxe=(t,e)=>{let r=nd(Gu.default.relative(e,Gu.default.dirname(t.filePath)));return t.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>fxe(n,r))},hxe=(t,e)=>{if(e=nd(e),Gu.default.isAbsolute(t)){if(nd(t).startsWith(e))return Gu.default.relative(e,t);throw new Error(`Path ${t} is not in cwd ${e}`)}return t},ej=(t,e)=>{let r=t.flatMap(i=>mxe(i,e)),n=(0,X5.default)().add(r);return i=>(i=dh(i),i=hxe(i,e),i?n.ignores(nd(i)):!1)},tj=(t={})=>({cwd:dh(t.cwd)??W5.default.cwd(),suppressErrors:!!t.suppressErrors,deep:typeof t.deep=="number"?t.deep:Number.POSITIVE_INFINITY,ignore:[...t.ignore??[],...dxe]}),rj=async(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=tj(e),o=await(0,JT.default)(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...Z5}),a=await Promise.all(o.map(async c=>({filePath:c,content:await Y5.default.readFile(c,"utf8")})));return ej(a,r)},nj=(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=tj(e),a=JT.default.sync(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...Z5}).map(c=>({filePath:c,content:J5.default.readFileSync(c,"utf8")}));return ej(a,r)}});var YT,aj,Vu,id,gxe,cj,uj,sj,oj,XT,yxe,lj,pj,nx,dj,bxe,fj,mj,hj,gj,yj,bj,ZT,QT,Itt,Ntt,Rtt,Ott,Mtt,Btt,vj=N(()=>{m();YT=V(require("node:process"),1),aj=V(require("node:fs"),1),Vu=V(require("node:path"),1);Y4();id=V(zT(),1);z5();KT();ij();WT();gxe=t=>{if(t.some(e=>typeof e!="string"))throw new TypeError("Patterns must be a string or an array of strings")},cj=(t,e)=>{let r=fh(t)?t.slice(1):t;return Vu.default.isAbsolute(r)?r:Vu.default.join(e,r)},uj=({directoryPath:t,files:e,extensions:r})=>{let n=r?.length>0?`.${r.length>1?`{${r.join(",")}}`:r[0]}`:"";return e?e.map(i=>Vu.default.posix.join(t,`**/${Vu.default.extname(i)?i:`${i}${n}`}`)):[Vu.default.posix.join(t,`**${n?`/*${n}`:""}`)]},sj=async(t,{cwd:e=YT.default.cwd(),files:r,extensions:n}={})=>(await Promise.all(t.map(async s=>await U5(cj(s,e))?uj({directoryPath:s,files:r,extensions:n}):s))).flat(),oj=(t,{cwd:e=YT.default.cwd(),files:r,extensions:n}={})=>t.flatMap(i=>q5(cj(i,e))?uj({directoryPath:i,files:r,extensions:n}):i),XT=t=>(t=[...new Set([t].flat())],gxe(t),t),yxe=t=>{if(!t)return;let e;try{e=aj.default.statSync(t)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},lj=(t={})=>(t={...t,ignore:t.ignore??[],expandDirectories:t.expandDirectories??!0,cwd:dh(t.cwd)},yxe(t.cwd),t),pj=t=>async(e,r)=>t(XT(e),lj(r)),nx=t=>(e,r)=>t(XT(e),lj(r)),dj=t=>{let{ignoreFiles:e,gitignore:r}=t,n=e?XT(e):[];return r&&n.push(Q5),n},bxe=async t=>{let e=dj(t);return mj(e.length>0&&await rj(e,t))},fj=t=>{let e=dj(t);return mj(e.length>0&&nj(e,t))},mj=t=>{let e=new Set;return r=>{let n=Vu.default.normalize(r.path??r);return e.has(n)||t&&t(n)?!1:(e.add(n),!0)}},hj=(t,e)=>t.flat().filter(r=>e(r)),gj=(t,e)=>{let r=[];for(;t.length>0;){let n=t.findIndex(s=>fh(s));if(n===-1){r.push({patterns:t,options:e});break}let i=t[n].slice(1);for(let s of r)s.options.ignore.push(i);n!==0&&r.push({patterns:t.slice(0,n),options:{...e,ignore:[...e.ignore,i]}}),t=t.slice(n+1)}return r},yj=(t,e)=>({...e?{cwd:e}:{},...Array.isArray(t)?{files:t}:t}),bj=async(t,e)=>{let r=gj(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=yj(i,n);return Promise.all(r.map(async o=>{let{patterns:a,options:c}=o;return[a,c.ignore]=await Promise.all([sj(a,s),sj(c.ignore,{cwd:n})]),{patterns:a,options:c}}))},ZT=(t,e)=>{let r=gj(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=yj(i,n);return r.map(o=>{let{patterns:a,options:c}=o;return a=oj(a,s),c.ignore=oj(c.ignore,{cwd:n}),{patterns:a,options:c}})},QT=pj(async(t,e)=>{let[r,n]=await Promise.all([bj(t,e),bxe(e)]),i=await Promise.all(r.map(s=>(0,id.default)(s.patterns,s.options)));return hj(i,n)}),Itt=nx((t,e)=>{let r=ZT(t,e),n=fj(e),i=r.map(s=>id.default.sync(s.patterns,s.options));return hj(i,n)}),Ntt=nx((t,e)=>{let r=ZT(t,e),n=fj(e),i=r.map(o=>id.default.stream(o.patterns,o.options));return s1(i).filter(o=>n(o))}),Rtt=nx((t,e)=>t.some(r=>id.default.isDynamicPattern(r,e))),Ott=pj(bj),Mtt=nx(ZT),{convertPathToPattern:Btt}=id.default});function sd(t){let e=Date.now();return new Promise((r,n)=>{let s=vxe(t.url)({protocol:t.url.protocol,host:t.url.host,port:t.url.port,path:t.url.pathname+t.url.search,method:t.method,headers:t.headers},o=>{let a="";o.on("data",c=>{a+=c}),o.on("end",()=>{if((0,xj.debug)(`${t.method} ${t.url.href}, duration: ${Date.now()-e}ms`),typeof o.statusCode=="number"&&o.statusCode>=200&&o.statusCode<300)if(typeof o.headers["content-type"]!="string"||!o.headers["content-type"].includes("application/json"))n(`Response from ${t.url.href} content-type is ${o.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(c){n(`Response from ${t.url.href} is not valid JSON: ${a}
1237
+ ${c}`)}else n(`Request to ${t.url.href} failed with status ${o.statusCode}: ${a}`)})}).on("error",o=>{n(`Error fetching ${t.url.href}, ${o}`)});t.body&&(s.setHeader("Content-Type","application/json"),s.write(t.body)),s.end()})}function vxe(t){if(t.protocol==="https:")return wj.request;if(t.protocol==="http:")return Dj.request;throw new Error(`Unsupported protocol ${t.protocol}`)}var xj,Dj,wj,Cj=N(()=>{"use strict";m();xj=require("node:console"),Dj=require("node:http"),wj=require("node:https")});async function Ej(t){let e=new URL(`https://cdn.builder.io/api/v3/query/${t.publicApiKey}/${t.model}`);return e.searchParams.set("omit","meta.componentsUsed"),e.searchParams.set("apiKey",t.publicApiKey),e.searchParams.set("userAttributes.urlPath",t.pageUrl),e.searchParams.set("options.page.model",`"${t.model}"`),e.searchParams.set("cachebust","true"),(await sd({url:e,method:"GET"}))[t.model]}async function Sj(t,e){if(e.kind===im.VCP)return!0;let r=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
1238
1238
  models {
1239
1239
  id
1240
1240
  name
1241
1241
  }
1242
- }`};t.debug(`Get model id for model name "${e.model}"`);let s=(await sd({url:r,method:"POST",headers:{Authorization:`Bearer ${e.privateAuthKey}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)})).data.models.find(c=>c.name===e.model);if(!s)return t.debug(`No model found for model name "${e.model}"`),!1;t.debug(`Data query, modelId: "${s.id}", urlPath: "${e.pageUrl}"`);let o=new URL("https://cdn.builder.io/api/v3/data");o.searchParams.set("limit","1"),o.searchParams.set("cachebust","true"),o.searchParams.set("collection","content"),o.searchParams.set("query.published.$ne","archived"),o.searchParams.set("query.query.$elemMatch.$and[0].property","urlPath"),o.searchParams.set("query.query.$elemMatch.$and[0].operator","is"),o.searchParams.set("query.query.$elemMatch.$and[0].value",e.pageUrl),o.searchParams.set("query.modelId",s.id),o.searchParams.set("apiKey",e.publicApiKey);let a=await sd({url:o,method:"GET"});return t.debug(`Data results (${a.results.length}): ${o.href}`),a.results.length>0}async function T5(t,e){let r=new URL(`https://cdn.builder.io/api/v3/content/${e.model}`);r.searchParams.set("apiKey",e.publicApiKey),r.searchParams.set("cachebust","true"),r.searchParams.set("cb",Date.now().toString()),e.pageUrl&&(r.searchParams.set("url",e.pageUrl),t.debug(`get model: "${e.model}", pageUrl: "${e.pageUrl}":`,r.href)),e.id&&(r.searchParams.set("query.id",e.id),t.debug(`get model: "${e.model}", id: "${e.id}":`,r.href));let n=await sd({url:r,method:"GET"});return t.debug(`get content results: ${n.results.length}`),n}async function A5(t,e){let r=new URL(`https://cdn.builder.io/api/v1/write/${e.model}`);t.debug(`writing "${e.model}" content:`,r.href),await sd({url:r,method:"POST",headers:{Authorization:`Bearer ${e.privateAuthKey}`},body:e.body})}var eA=N(()=>{"use strict";m();Vr();C5()});var od,P5,_5,tA=N(()=>{"use strict";m();od="page",P5="integration-welcome-screens",_5="8d9ee72a33344b4b867918b442ebd0af"});async function F5(t,e){let r=await T5(t,{model:P5,publicApiKey:_5,id:e.templateContentId});if(!Array.isArray(r?.results)||r.results.length===0||!r.results[0].data?.blocks)throw new Error(`No Builder content found for id ${e.templateContentId}`);let n=JSON.stringify(r.results[0].data.blocks),i=xxe(e.publicApiKey,e.pathname,e.title,n);await A5(t,{privateAuthKey:e.privateAuthKey,model:od,body:i})}function xxe(t,e,r,n){return JSON.stringify({name:r,ownerId:t,published:"published",query:[{property:"urlPath",value:[e],operator:"is"}],data:{title:r,blocksString:n}})}var k5=N(()=>{"use strict";m();eA();tA()});async function I5(t,e,r,n){t.debug(`connect builder with public key: ${e}`),t.publicApiKey=e;let i=t.closeAppServer(),s=await t.setPublicApiKey({publicApiKey:e});if(s.modifiedType==="permission-error")return t.debug("permission error, failed to set public api key"),{success:!1,pathname:""};t.debug(`set public key: process.env.${s.envKey}=${e}`),process.env[s.envKey]=e;let o=await t.builderPageOptions();t.debug(`builder model: ${od}, path: ${o.pathname}, template: ${o.templateContentId}`);let a=await S5(t,{model:od,pageUrl:o.pathname,publicApiKey:e,privateAuthKey:r,kind:n});if(!a){await F5(t,{templateContentId:o.templateContentId,pathname:o.pathname,title:o.title,publicApiKey:e,privateAuthKey:r});let l=5,p=0;for(;!a&&p<l;){await new Promise(h=>setTimeout(h,1e3));let d=await E5({model:od,pageUrl:o.pathname,publicApiKey:e,privateAuthKey:r});p++,d&&d.length>0&&(a=!0)}}await i,t.debug("ensure builder setup");let c=[];n===im.VCP?c=await t.ensureFigmaImportPage():c=await t.ensureBuilderSetup(),s.modifiedType&&c.push({filePath:s.file,modifiedType:s.modifiedType}),c.forEach(l=>{l.displayFilePath=t.relative(t.getAppRootDir(),l.filePath)}),c.sort((l,p)=>l.filePath.localeCompare(p.filePath)),c.length>0?(t.debug(`modified files: ${c.map(l=>l.displayFilePath).join(", ")}`),await t.restartAppServer(),await new Promise(l=>setTimeout(l,500))):t.debug("no modified files");let u={success:!0,pathname:o.localePathname||o.pathname,modifiedFiles:c,platform:t.platform(),kind:n};return n===im.VCP&&(u.pathname="/"),t.debug(`connected builder: ${u.pathname}`),u}async function N5(t){let e=await t.builderPageOptions();t.debug(`validateBuilder, pathname: ${e.pathname}, localePathname: ${e.localePathname}, isValid: ${t.isValid}`);let r={isValid:t.isValid,pathname:e.localePathname||e.pathname,platform:t.platform()};if(t.isValid)return r;let n=await t.getPublicApiKey();return n.envValue?(t.debug(`public api key: ${n.envValue}, ${n.file}`),t.publicApiKey=n.envValue,t.debug("builder connection is valid"),r.isValid=!0,t.isValid=!0,r):(t.debug("missing public api key"),r)}var R5=N(()=>{"use strict";m();Vr();k5();eA();tA()});async function O5(t,e){let r={type:e.type};switch(e.type){case"getCache":{r.data=await t.getCache();break}case"setCache":{await t.setCache(e.data);break}case"connectBuilder":{r.data=await I5(t,e.data.publicApiKey,e.data.privateAuthKey,e.data.kind);break}case"enableDevTools":{r.data=Cxe(t,e.data.enabled);break}case"getRegistry":{r.data=await t.getRegistry(e.data);break}case"launchEditor":{r.data=await t.launchEditor(e.data);break}case"validateBuilder":{r.data=await N5(t);break}case"loadComponent":{r.data=await t.loadComponent(e.data);break}case"getAllProjectFiles":{t.getAllProjectFiles?r.data=await t.getAllProjectFiles():r.errors=["getAllProjectFiles not implemented"];break}case"registerComponent":{r.data=await t.registerComponent(e.data),t.serverShouldRestart=!0;break}case"setComponentInfo":{r.data=await t.setRegisteredComponentInfo(e.data),t.serverShouldRestart=!0;break}case"setComponentInput":{r.data=await t.setRegisteredComponentInput(e.data),t.serverShouldRestart=!0;break}case"unregisterComponent":{r.data=await t.unregisterComponent(e.data),t.serverShouldRestart=!0;break}case"getFrameworks":{r.data=t.getFrameworks();break}case"readdir":{rA(t,e.path)?r.data=await t.readdir(e.path,!0):r.errors=[`Invalid file request: ${e.path}`];break}case"readFile":{rA(t,e.path)?r.data=await t.readFile(e.path):r.errors=[`Invalid file request: ${e.path}`];break}case"writeFile":{rA(t,e.path)?await t.writeFile(e.path,e.content):r.errors=[`Invalid file request: ${e.path}`];break}case"ensureFigmaImportPage":{r.data=await t.ensureFigmaImportPage();break}case"transileFile":{r.data=await IR(t,e);break}case"transileModule":{r.data=iC(t,e);break}case"getPastSyncInfo":{r.data=await t.getPastSyncInfo?.(e.data);break}case"resyncSnippet":{r.data=await t.resyncSnippet?.(e.data);break}case"localConfig":{r.data=await Jp();break}default:{r.errors=[`Unknown request type: ${JSON.stringify(e)}`];let n=e}}return r}function rA(t,e){if(!e||e.includes(".."))return!1;e=e.replace(/\\/g,"/");let r=e.split("/"),n=r[r.length-1];if(n.length>0){let i=n.split(".").pop();if(i&&(i=`.${i}`.toLocaleLowerCase(),i=i.split("?")[0],!wxe.includes(i)))return!1}return Dxe(t,e),!1}function Dxe(t,e){if(!e)return!1;e=t.normalize(t.resolve(e));let r=t.getAppRootDir();return!(!e.startsWith(r)&&!e.includes("node_modules"))}function Cxe(t,e){return!e&&t.serverShouldRestart&&setTimeout(()=>{console.log(`
1242
+ }`};t.debug(`Get model id for model name "${e.model}"`);let s=(await sd({url:r,method:"POST",headers:{Authorization:`Bearer ${e.privateAuthKey}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)})).data.models.find(c=>c.name===e.model);if(!s)return t.debug(`No model found for model name "${e.model}"`),!1;t.debug(`Data query, modelId: "${s.id}", urlPath: "${e.pageUrl}"`);let o=new URL("https://cdn.builder.io/api/v3/data");o.searchParams.set("limit","1"),o.searchParams.set("cachebust","true"),o.searchParams.set("collection","content"),o.searchParams.set("query.published.$ne","archived"),o.searchParams.set("query.query.$elemMatch.$and[0].property","urlPath"),o.searchParams.set("query.query.$elemMatch.$and[0].operator","is"),o.searchParams.set("query.query.$elemMatch.$and[0].value",e.pageUrl),o.searchParams.set("query.modelId",s.id),o.searchParams.set("apiKey",e.publicApiKey);let a=await sd({url:o,method:"GET"});return t.debug(`Data results (${a.results.length}): ${o.href}`),a.results.length>0}async function Tj(t,e){let r=new URL(`https://cdn.builder.io/api/v3/content/${e.model}`);r.searchParams.set("apiKey",e.publicApiKey),r.searchParams.set("cachebust","true"),r.searchParams.set("cb",Date.now().toString()),e.pageUrl&&(r.searchParams.set("url",e.pageUrl),t.debug(`get model: "${e.model}", pageUrl: "${e.pageUrl}":`,r.href)),e.id&&(r.searchParams.set("query.id",e.id),t.debug(`get model: "${e.model}", id: "${e.id}":`,r.href));let n=await sd({url:r,method:"GET"});return t.debug(`get content results: ${n.results.length}`),n}async function Aj(t,e){let r=new URL(`https://cdn.builder.io/api/v1/write/${e.model}`);t.debug(`writing "${e.model}" content:`,r.href),await sd({url:r,method:"POST",headers:{Authorization:`Bearer ${e.privateAuthKey}`},body:e.body})}var eA=N(()=>{"use strict";m();Vr();Cj()});var od,Pj,_j,tA=N(()=>{"use strict";m();od="page",Pj="integration-welcome-screens",_j="8d9ee72a33344b4b867918b442ebd0af"});async function Fj(t,e){let r=await Tj(t,{model:Pj,publicApiKey:_j,id:e.templateContentId});if(!Array.isArray(r?.results)||r.results.length===0||!r.results[0].data?.blocks)throw new Error(`No Builder content found for id ${e.templateContentId}`);let n=JSON.stringify(r.results[0].data.blocks),i=xxe(e.publicApiKey,e.pathname,e.title,n);await Aj(t,{privateAuthKey:e.privateAuthKey,model:od,body:i})}function xxe(t,e,r,n){return JSON.stringify({name:r,ownerId:t,published:"published",query:[{property:"urlPath",value:[e],operator:"is"}],data:{title:r,blocksString:n}})}var kj=N(()=>{"use strict";m();eA();tA()});async function Ij(t,e,r,n){t.debug(`connect builder with public key: ${e}`),t.publicApiKey=e;let i=t.closeAppServer(),s=await t.setPublicApiKey({publicApiKey:e});if(s.modifiedType==="permission-error")return t.debug("permission error, failed to set public api key"),{success:!1,pathname:""};t.debug(`set public key: process.env.${s.envKey}=${e}`),process.env[s.envKey]=e;let o=await t.builderPageOptions();t.debug(`builder model: ${od}, path: ${o.pathname}, template: ${o.templateContentId}`);let a=await Sj(t,{model:od,pageUrl:o.pathname,publicApiKey:e,privateAuthKey:r,kind:n});if(!a){await Fj(t,{templateContentId:o.templateContentId,pathname:o.pathname,title:o.title,publicApiKey:e,privateAuthKey:r});let l=5,p=0;for(;!a&&p<l;){await new Promise(h=>setTimeout(h,1e3));let d=await Ej({model:od,pageUrl:o.pathname,publicApiKey:e,privateAuthKey:r});p++,d&&d.length>0&&(a=!0)}}await i,t.debug("ensure builder setup");let c=[];n===im.VCP?c=await t.ensureFigmaImportPage():c=await t.ensureBuilderSetup(),s.modifiedType&&c.push({filePath:s.file,modifiedType:s.modifiedType}),c.forEach(l=>{l.displayFilePath=t.relative(t.getAppRootDir(),l.filePath)}),c.sort((l,p)=>l.filePath.localeCompare(p.filePath)),c.length>0?(t.debug(`modified files: ${c.map(l=>l.displayFilePath).join(", ")}`),await t.restartAppServer(),await new Promise(l=>setTimeout(l,500))):t.debug("no modified files");let u={success:!0,pathname:o.localePathname||o.pathname,modifiedFiles:c,platform:t.platform(),kind:n};return n===im.VCP&&(u.pathname="/"),t.debug(`connected builder: ${u.pathname}`),u}async function Nj(t){let e=await t.builderPageOptions();t.debug(`validateBuilder, pathname: ${e.pathname}, localePathname: ${e.localePathname}, isValid: ${t.isValid}`);let r={isValid:t.isValid,pathname:e.localePathname||e.pathname,platform:t.platform()};if(t.isValid)return r;let n=await t.getPublicApiKey();return n.envValue?(t.debug(`public api key: ${n.envValue}, ${n.file}`),t.publicApiKey=n.envValue,t.debug("builder connection is valid"),r.isValid=!0,t.isValid=!0,r):(t.debug("missing public api key"),r)}var Rj=N(()=>{"use strict";m();Vr();kj();eA();tA()});async function Oj(t,e){let r={type:e.type};switch(e.type){case"getCache":{r.data=await t.getCache();break}case"setCache":{await t.setCache(e.data);break}case"connectBuilder":{r.data=await Ij(t,e.data.publicApiKey,e.data.privateAuthKey,e.data.kind);break}case"enableDevTools":{r.data=Cxe(t,e.data.enabled);break}case"getRegistry":{r.data=await t.getRegistry(e.data);break}case"launchEditor":{r.data=await t.launchEditor(e.data);break}case"validateBuilder":{r.data=await Nj(t);break}case"loadComponent":{r.data=await t.loadComponent(e.data);break}case"getAllProjectFiles":{t.getAllProjectFiles?r.data=await t.getAllProjectFiles():r.errors=["getAllProjectFiles not implemented"];break}case"registerComponent":{r.data=await t.registerComponent(e.data),t.serverShouldRestart=!0;break}case"setComponentInfo":{r.data=await t.setRegisteredComponentInfo(e.data),t.serverShouldRestart=!0;break}case"setComponentInput":{r.data=await t.setRegisteredComponentInput(e.data),t.serverShouldRestart=!0;break}case"unregisterComponent":{r.data=await t.unregisterComponent(e.data),t.serverShouldRestart=!0;break}case"getFrameworks":{r.data=t.getFrameworks();break}case"readdir":{rA(t,e.path)?r.data=await t.readdir(e.path,!0):r.errors=[`Invalid file request: ${e.path}`];break}case"readFile":{rA(t,e.path)?r.data=await t.readFile(e.path):r.errors=[`Invalid file request: ${e.path}`];break}case"writeFile":{rA(t,e.path)?await t.writeFile(e.path,e.content):r.errors=[`Invalid file request: ${e.path}`];break}case"ensureFigmaImportPage":{r.data=await t.ensureFigmaImportPage();break}case"transileFile":{r.data=await IR(t,e);break}case"transileModule":{r.data=iC(t,e);break}case"getPastSyncInfo":{r.data=await t.getPastSyncInfo?.(e.data);break}case"resyncSnippet":{r.data=await t.resyncSnippet?.(e.data);break}case"localConfig":{r.data=await Jp();break}default:{r.errors=[`Unknown request type: ${JSON.stringify(e)}`];let n=e}}return r}function rA(t,e){if(!e||e.includes(".."))return!1;e=e.replace(/\\/g,"/");let r=e.split("/"),n=r[r.length-1];if(n.length>0){let i=n.split(".").pop();if(i&&(i=`.${i}`.toLocaleLowerCase(),i=i.split("?")[0],!wxe.includes(i)))return!1}return Dxe(t,e),!1}function Dxe(t,e){if(!e)return!1;e=t.normalize(t.resolve(e));let r=t.getAppRootDir();return!(!e.startsWith(r)&&!e.includes("node_modules"))}function Cxe(t,e){return!e&&t.serverShouldRestart&&setTimeout(()=>{console.log(`
1243
1243
  Restarting server after Builder Devtools update...
1244
- `),t.restartAppServer()},10),t.enableAppWatch(!e),{enabled:e,platform:t.platform()}}var wxe,M5=N(()=>{"use strict";m();Zi();nh();R5();wxe=[".js",".jsx",".ts",".tsx",".json",".css",".scss",".sass",".less",".html",".htm",".xml",".svg",".png",".jpg",".jpeg",".gif",".ico",".webp",".woff",".woff2",".ttf",".eot",".mp4",".webm",".ogg",".md",".txt",".csv",".pdf"]});async function B5(t){return $5(t,`"use strict";(()=>{var fi=Object.create;var Mt=Object.defineProperty;var mi=Object.getOwnPropertyDescriptor;var vi=Object.getOwnPropertyNames;var gi=Object.getPrototypeOf,hi=Object.prototype.hasOwnProperty;var yi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),bi=(t,e)=>{for(var r in e)Mt(t,r,{get:e[r],enumerable:!0})},Ei=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vi(e))!hi.call(t,i)&&i!==r&&Mt(t,i,{get:()=>e[i],enumerable:!(n=mi(e,i))||n.enumerable});return t};var _i=(t,e,r)=>(r=t!=null?fi(gi(t)):{},Ei(e||!t||!t.__esModule?Mt(r,"default",{value:t,enumerable:!0}):r,t));var jn=yi((Qe,Ct)=>{(function(t,e){"use strict";var r="0.7.33",n="",i="?",o="function",s="undefined",u="object",d="string",p="major",a="model",c="name",l="type",f="vendor",m="version",_="architecture",b="console",v="mobile",y="tablet",T="smarttv",L="wearable",k="embedded",w=350,C="Amazon",R="Apple",K="ASUS",z="BlackBerry",Q="Browser",P="Chrome",Ce="Edge",ce="Firefox",_e="Google",Me="Huawei",Re="LG",Oe="Microsoft",Be="Motorola",Te="Opera",we="Samsung",ke="Sharp",fe="Sony",me="Xiaomi",Ve="Zebra",U="Facebook",et=function(S,O){var I={};for(var q in S)O[q]&&O[q].length%2===0?I[q]=O[q].concat(S[q]):I[q]=S[q];return I},tt=function(S){for(var O={},I=0;I<S.length;I++)O[S[I].toUpperCase()]=S[I];return O},Pr=function(S,O){return typeof S===d?Fe(O).indexOf(Fe(S))!==-1:!1},Fe=function(S){return S.toLowerCase()},di=function(S){return typeof S===d?S.replace(/[^\\d\\.]/g,n).split(".")[0]:e},Nt=function(S,O){if(typeof S===d)return S=S.replace(/^\\s\\s*/,n),typeof O===s?S:S.substring(0,w)},He=function(S,O){for(var I=0,q,x,nt,D,qe,ie;I<O.length&&!qe;){var Or=O[I],kr=O[I+1];for(q=x=0;q<Or.length&&!qe;)if(qe=Or[q++].exec(S),qe)for(nt=0;nt<kr.length;nt++)ie=qe[++x],D=kr[nt],typeof D===u&&D.length>0?D.length===2?typeof D[1]==o?this[D[0]]=D[1].call(this,ie):this[D[0]]=D[1]:D.length===3?typeof D[1]===o&&!(D[1].exec&&D[1].test)?this[D[0]]=ie?D[1].call(this,ie,D[2]):e:this[D[0]]=ie?ie.replace(D[1],D[2]):e:D.length===4&&(this[D[0]]=ie?D[3].call(this,ie.replace(D[1],D[2])):e):this[D]=ie||e;I+=2}},Ut=function(S,O){for(var I in O)if(typeof O[I]===u&&O[I].length>0){for(var q=0;q<O[I].length;q++)if(Pr(O[I][q],S))return I===i?e:I}else if(Pr(O[I],S))return I===i?e:I;return S},pi={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Cr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Rr={browser:[[/\\b(?:crmo|crios)\\/([\\w\\.]+)/i],[m,[c,"Chrome"]],[/edg(?:e|ios|a)?\\/([\\w\\.]+)/i],[m,[c,"Edge"]],[/(opera mini)\\/([-\\w\\.]+)/i,/(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i,/(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i],[c,m],[/opios[\\/ ]+([\\w\\.]+)/i],[m,[c,Te+" Mini"]],[/\\bopr\\/([\\w\\.]+)/i],[m,[c,Te]],[/(kindle)\\/([\\w\\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\\/ ]?([\\w\\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\\/ ]?([\\w\\.]*)/i,/(ba?idubrowser)[\\/ ]?([\\w\\.]+)/i,/(?:ms|\\()(ie) ([\\w\\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\\/([-\\w\\.]+)/i,/(weibo)__([\\d\\.]+)/i],[c,m],[/(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i],[m,[c,"UC"+Q]],[/microm.+\\bqbcore\\/([\\w\\.]+)/i,/\\bqbcore\\/([\\w\\.]+).+microm/i],[m,[c,"WeChat(Win) Desktop"]],[/micromessenger\\/([\\w\\.]+)/i],[m,[c,"WeChat"]],[/konqueror\\/([\\w\\.]+)/i],[m,[c,"Konqueror"]],[/trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i],[m,[c,"IE"]],[/yabrowser\\/([\\w\\.]+)/i],[m,[c,"Yandex"]],[/(avast|avg)\\/([\\w\\.]+)/i],[[c,/(.+)/,"$1 Secure "+Q],m],[/\\bfocus\\/([\\w\\.]+)/i],[m,[c,ce+" Focus"]],[/\\bopt\\/([\\w\\.]+)/i],[m,[c,Te+" Touch"]],[/coc_coc\\w+\\/([\\w\\.]+)/i],[m,[c,"Coc Coc"]],[/dolfin\\/([\\w\\.]+)/i],[m,[c,"Dolphin"]],[/coast\\/([\\w\\.]+)/i],[m,[c,Te+" Coast"]],[/miuibrowser\\/([\\w\\.]+)/i],[m,[c,"MIUI "+Q]],[/fxios\\/([-\\w\\.]+)/i],[m,[c,ce]],[/\\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+Q]],[/(oculus|samsung|sailfish|huawei)browser\\/([\\w\\.]+)/i],[[c,/(.+)/,"$1 "+Q],m],[/(comodo_dragon)\\/([\\w\\.]+)/i],[[c,/_/g," "],m],[/(electron)\\/([\\w\\.]+) safari/i,/(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\\/ ]?([\\w\\.]+)/i],[c,m],[/(metasr)[\\/ ]?([\\w\\.]+)/i,/(lbbrowser)/i,/\\[(linkedin)app\\]/i],[c],[/((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i],[[c,U],m],[/safari (line)\\/([\\w\\.]+)/i,/\\b(line)\\/([\\w\\.]+)\\/iab/i,/(chromium|instagram)[\\/ ]([-\\w\\.]+)/i],[c,m],[/\\bgsa\\/([\\w\\.]+) .*safari\\//i],[m,[c,"GSA"]],[/headlesschrome(?:\\/([\\w\\.]+)| )/i],[m,[c,P+" Headless"]],[/ wv\\).+(chrome)\\/([\\w\\.]+)/i],[[c,P+" WebView"],m],[/droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i],[m,[c,"Android "+Q]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i],[c,m],[/version\\/([\\w\\.\\,]+) .*mobile\\/\\w+ (safari)/i],[m,[c,"Mobile Safari"]],[/version\\/([\\w(\\.|\\,)]+) .*(mobile ?safari|safari)/i],[m,c],[/webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i],[c,[m,Ut,pi]],[/(webkit|khtml)\\/([\\w\\.]+)/i],[c,m],[/(navigator|netscape\\d?)\\/([-\\w\\.]+)/i],[[c,"Netscape"],m],[/mobile vr; rv:([\\w\\.]+)\\).+firefox/i],[m,[c,ce+" Reality"]],[/ekiohf.+(flow)\\/([\\w\\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\/ ]?([\\w\\.\\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([-\\w\\.]+)$/i,/(firefox)\\/([\\w\\.]+)/i,/(mozilla)\\/([\\w\\.]+) .+rv\\:.+gecko\\/\\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\. ]?browser)[-\\/ ]?v?([\\w\\.]+)/i,/(links) \\(([\\w\\.]+)/i],[c,m],[/(cobalt)\\/([\\w\\.]+)/i],[c,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i],[[_,"amd64"]],[/(ia32(?=;))/i],[[_,Fe]],[/((?:i[346]|x)86)[;\\)]/i],[[_,"ia32"]],[/\\b(aarch64|arm(v?8e?l?|_?64))\\b/i],[[_,"arm64"]],[/\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i],[[_,"armhf"]],[/windows (ce|mobile); ppc;/i],[[_,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i],[[_,/ower/,n,Fe]],[/(sun4\\w)[;\\)]/i],[[_,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i],[[_,Fe]]],device:[[/\\b(sch-i[89]0\\d|shw-m380s|sm-[ptx]\\w{2,4}|gt-[pn]\\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[f,we],[l,y]],[/\\b((?:s[cgp]h|gt|sm)-\\w+|galaxy nexus)/i,/samsung[- ]([-\\w]+)/i,/sec-(sgh\\w+)/i],[a,[f,we],[l,v]],[/((ipod|iphone)\\d+,\\d+)/i],[a,[f,R],[l,v]],[/(ipad\\d+,\\d+)/i],[a,[f,R],[l,y]],[/\\((ip(?:hone|od)[\\w ]*);/i],[a,[f,R],[l,v]],[/\\((ipad);[-\\w\\),; ]+apple/i,/applecoremedia\\/[\\w\\.]+ \\((ipad)/i,/\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i],[a,[f,R],[l,y]],[/(macintosh);/i],[a,[f,R]],[/\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i],[a,[f,Me],[l,y]],[/(?:huawei|honor)([-\\w ]+)[;\\)]/i,/\\b(nexus 6p|\\w{2,4}e?-[atu]?[ln][\\dx][012359c][adn]?)\\b(?!.+d\\/s)/i],[a,[f,Me],[l,v]],[/\\b(poco[\\w ]+)(?: bui|\\))/i,/\\b; (\\w+) build\\/hm\\1/i,/\\b(hm[-_ ]?note?[_ ]?(?:\\d\\w)?) bui/i,/\\b(redmi[\\-_ ]?(?:note|k)?[\\w_ ]+)(?: bui|\\))/i,/\\b(mi[-_ ]?(?:a\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\d?\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\))/i],[[a,/_/g," "],[f,me],[l,v]],[/\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i],[[a,/_/g," "],[f,me],[l,y]],[/; (\\w+) bui.+ oppo/i,/\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007|a101op)\\b/i],[a,[f,"OPPO"],[l,v]],[/vivo (\\w+)(?: bui|\\))/i,/\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i],[a,[f,"Vivo"],[l,v]],[/\\b(rmx[12]\\d{3})(?: bui|;|\\))/i],[a,[f,"Realme"],[l,v]],[/\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\b[\\w ]+build\\//i,/\\bmot(?:orola)?[- ](\\w*)/i,/((?:moto[\\w\\(\\) ]+|xt\\d{3,4}|nexus 6)(?= bui|\\)))/i],[a,[f,Be],[l,v]],[/\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i],[a,[f,Be],[l,y]],[/((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[f,Re],[l,y]],[/(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,/\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,/\\blg-?([\\d\\w]+) bui/i],[a,[f,Re],[l,v]],[/(ideatab[-\\w ]+)/i,/lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i],[a,[f,"Lenovo"],[l,y]],[/(?:maemo|nokia).*(n900|lumia \\d+)/i,/nokia[-_ ]?([-\\w\\.]*)/i],[[a,/_/g," "],[f,"Nokia"],[l,v]],[/(pixel c)\\b/i],[a,[f,_e],[l,y]],[/droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i],[a,[f,_e],[l,v]],[/droid.+ (a?\\d[0-2]{2}so|[c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i],[a,[f,fe],[l,v]],[/sony tablet [ps]/i,/\\b(?:sony)?sgp\\w+(?: bui|\\))/i],[[a,"Xperia Tablet"],[f,fe],[l,y]],[/ (kb2005|in20[12]5|be20[12][59])\\b/i,/(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i],[a,[f,"OnePlus"],[l,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\\))/i,/(kf[a-z]+)( bui|\\)).+silk\\//i],[a,[f,C],[l,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i],[[a,/(.+)/g,"Fire Phone $1"],[f,C],[l,v]],[/(playbook);[-\\w\\),; ]+(rim)/i],[a,f,[l,y]],[/\\b((?:bb[a-f]|st[hv])100-\\d)/i,/\\(bb10; (\\w+)/i],[a,[f,z],[l,v]],[/(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i],[a,[f,K],[l,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i],[a,[f,K],[l,v]],[/(nexus 9)/i],[a,[f,"HTC"],[l,y]],[/(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i,/(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\\w]*)/i],[f,[a,/_/g," "],[l,v]],[/droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i],[a,[f,"Acer"],[l,y]],[/droid.+; (m[1-5] note) bui/i,/\\bmz-([-\\w]{2,})/i],[a,[f,"Meizu"],[l,v]],[/\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i],[a,[f,ke],[l,v]],[/(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\\w]*)/i,/(hp) ([\\w ]+\\w)/i,/(asus)-?(\\w+)/i,/(microsoft); (lumia[\\w ]+)/i,/(lenovo)[-_ ]?([-\\w]+)/i,/(jolla)/i,/(oppo) ?([\\w ]+) bui/i],[f,a,[l,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\\/([\\w\\.]+)/i,/(nook)[\\w ]+build\\/(\\w+)/i,/(dell) (strea[kpr\\d ]*[\\dko])/i,/(le[- ]+pan)[- ]+(\\w{1,9}) bui/i,/(trinity)[- ]*(t\\d{3}) bui/i,/(gigaset)[- ]+(q\\w{1,9}) bui/i,/(vodafone) ([\\w ]+)(?:\\)| bui)/i],[f,a,[l,y]],[/(surface duo)/i],[a,[f,Oe],[l,y]],[/droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i],[a,[f,"Fairphone"],[l,v]],[/(u304aa)/i],[a,[f,"AT&T"],[l,v]],[/\\bsie-(\\w*)/i],[a,[f,"Siemens"],[l,v]],[/\\b(rct\\w+) b/i],[a,[f,"RCA"],[l,y]],[/\\b(venue[\\d ]{2,7}) b/i],[a,[f,"Dell"],[l,y]],[/\\b(q(?:mv|ta)\\w+) b/i],[a,[f,"Verizon"],[l,y]],[/\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i],[a,[f,"Barnes & Noble"],[l,y]],[/\\b(tm\\d{3}\\w+) b/i],[a,[f,"NuVision"],[l,y]],[/\\b(k88) b/i],[a,[f,"ZTE"],[l,y]],[/\\b(nx\\d{3}j) b/i],[a,[f,"ZTE"],[l,v]],[/\\b(gen\\d{3}) b.+49h/i],[a,[f,"Swiss"],[l,v]],[/\\b(zur\\d{3}) b/i],[a,[f,"Swiss"],[l,y]],[/\\b((zeki)?tb.*\\b) b/i],[a,[f,"Zeki"],[l,y]],[/\\b([yr]\\d{2}) b/i,/\\b(dragon[- ]+touch |dt)(\\w{5}) b/i],[[f,"Dragon Touch"],a,[l,y]],[/\\b(ns-?\\w{0,9}) b/i],[a,[f,"Insignia"],[l,y]],[/\\b((nxa|next)-?\\w{0,9}) b/i],[a,[f,"NextBook"],[l,y]],[/\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],a,[l,v]],[/\\b(lvtel\\-)?(v1[12]) b/i],[[f,"LvTel"],a,[l,v]],[/\\b(ph-1) /i],[a,[f,"Essential"],[l,v]],[/\\b(v(100md|700na|7011|917g).*\\b) b/i],[a,[f,"Envizen"],[l,y]],[/\\b(trio[-\\w\\. ]+) b/i],[a,[f,"MachSpeed"],[l,y]],[/\\btu_(1491) b/i],[a,[f,"Rotor"],[l,y]],[/(shield[\\w ]+) b/i],[a,[f,"Nvidia"],[l,y]],[/(sprint) (\\w+)/i],[f,a,[l,v]],[/(kin\\.[onetw]{3})/i],[[a,/\\./g," "],[f,Oe],[l,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i],[a,[f,Ve],[l,y]],[/droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i],[a,[f,Ve],[l,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,a,[l,b]],[/droid.+; (shield) bui/i],[a,[f,"Nvidia"],[l,b]],[/(playstation [345portablevi]+)/i],[a,[f,fe],[l,b]],[/\\b(xbox(?: one)?(?!; xbox))[\\); ]/i],[a,[f,Oe],[l,b]],[/smart-tv.+(samsung)/i],[f,[l,T]],[/hbbtv.+maple;(\\d+)/i],[[a,/^/,"SmartTV"],[f,we],[l,T]],[/(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i],[[f,Re],[l,T]],[/(apple) ?tv/i],[f,[a,R+" TV"],[l,T]],[/crkey/i],[[a,P+"cast"],[f,_e],[l,T]],[/droid.+aft(\\w)( bui|\\))/i],[a,[f,C],[l,T]],[/\\(dtv[\\);].+(aquos)/i,/(aquos-tv[\\w ]+)\\)/i],[a,[f,ke],[l,T]],[/(bravia[\\w ]+)( bui|\\))/i],[a,[f,fe],[l,T]],[/(mitv-\\w{5}) bui/i],[a,[f,me],[l,T]],[/\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i,/hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w ]*; *(\\w[^;]*);([^;]*)/i],[[f,Nt],[a,Nt],[l,T]],[/\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i],[[l,T]],[/((pebble))app/i],[f,a,[l,L]],[/droid.+; (glass) \\d/i],[a,[f,_e],[l,L]],[/droid.+; (wt63?0{2,3})\\)/i],[a,[f,Ve],[l,L]],[/(quest( 2)?)/i],[a,[f,U],[l,L]],[/(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i],[f,[l,k]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+? mobile safari/i],[a,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i],[a,[l,y]],[/\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i],[[l,y]],[/(phone|mobile(?:[;\\/]| [ \\w\\/\\.]*safari)|pda(?=.+windows ce))/i],[[l,v]],[/(android[-\\w\\. ]{0,9});.+buil/i],[a,[f,"Generic"]]],engine:[[/windows.+ edge\\/([\\w\\.]+)/i],[m,[c,Ce+"HTML"]],[/webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i],[m,[c,"Blink"]],[/(presto)\\/([\\w\\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i,/ekioh(flow)\\/([\\w\\.]+)/i,/(khtml|tasman|links)[\\/ ]\\(?([\\w\\.]+)/i,/(icab)[\\/ ]([23]\\.[\\d\\.]+)/i],[c,m],[/rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i],[m,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,m],[/(windows) nt 6\\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i,/(windows)[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i],[c,[m,Ut,Cr]],[/(win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i],[[c,"Windows"],[m,Ut,Cr]],[/ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i,/cfnetwork\\/.+darwin/i],[[m,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\\w\\. ]*)/i,/(macintosh|mac_powerpc\\b)(?!.+haiku)/i],[[c,"Mac OS"],[m,/_/g,"."]],[/droid ([\\w\\.]+)\\b.+(android[- ]x86|harmonyos)/i],[m,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,/(blackberry)\\w*\\/([\\w\\.]*)/i,/(tizen|kaios)[\\/ ]([\\w\\.]+)/i,/\\((series40);/i],[c,m],[/\\(bb(10);/i],[m,[c,z]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i],[m,[c,"Symbian"]],[/mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i],[m,[c,ce+" OS"]],[/web0s;.+rt(tv)/i,/\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i],[m,[c,"webOS"]],[/crkey\\/([\\d\\.]+)/i],[m,[c,P+"cast"]],[/(cros) [\\w]+ ([\\w\\.]+\\w)/i],[[c,"Chromium OS"],m],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\\);]+)/i,/\\b(joli|palm)\\b ?(?:os)?\\/?([\\w\\.]*)/i,/(mint)[\\/\\(\\) ]?(\\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\/ ]?(?!chrom|package)([-\\w\\.]*)/i,/(hurd|linux) ?([\\w\\.]*)/i,/(gnu) ?([\\w\\.]*)/i,/\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\/ ]?(?!amd|[ix346]{1,2}86)([\\w\\.]*)/i,/(haiku) (\\w+)/i],[c,m],[/(sunos) ?([\\w\\.\\d]*)/i],[[c,"Solaris"],m],[/((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i,/(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i,/\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\\w\\.]*)/i],[c,m]]},Z=function(S,O){if(typeof S===u&&(O=S,S=e),!(this instanceof Z))return new Z(S,O).getResult();var I=S||(typeof t!==s&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:n),q=O?et(Rr,O):Rr;return this.getBrowser=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.browser),x.major=di(x.version),x},this.getCPU=function(){var x={};return x[_]=e,He.call(x,I,q.cpu),x},this.getDevice=function(){var x={};return x[f]=e,x[a]=e,x[l]=e,He.call(x,I,q.device),x},this.getEngine=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.engine),x},this.getOS=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.os),x},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return I},this.setUA=function(x){return I=typeof x===d&&x.length>w?Nt(x,w):x,this},this.setUA(I),this};Z.VERSION=r,Z.BROWSER=tt([c,m,p]),Z.CPU=tt([_]),Z.DEVICE=tt([a,f,l,b,v,T,y,L,k]),Z.ENGINE=Z.OS=tt([c,m]),typeof Qe!==s?(typeof Ct!==s&&Ct.exports&&(Qe=Ct.exports=Z),Qe.UAParser=Z):typeof define===o&&define.amd?define(function(){return Z}):typeof t!==s&&(t.UAParser=Z);var Ae=typeof t!==s&&(t.jQuery||t.Zepto);if(Ae&&!Ae.ua){var rt=new Z;Ae.ua=rt.getResult(),Ae.ua.get=function(){return rt.getUA()},Ae.ua.set=function(S){rt.setUA(S);var O=rt.getResult();for(var I in O)Ae.ua[I]=O[I]}}})(typeof window=="object"?window:Qe)});var oe=(t,e)=>{Vt(t);let r=t.querySelector("aside");r.dataset.view=e,r.classList.remove("section-ready"),setTimeout(()=>{r.classList.add("section-ready")},200)},Ar=t=>{Array.from(t.querySelectorAll(".back-button")).forEach(e=>{e.addEventListener("click",r=>{Vt(t),r.preventDefault(),r.stopPropagation();let n=r.target;oe(t,n?.dataset.back||"nav-home")})})},Bt=(t,e)=>{Vt(t);let r=t.querySelector("aside"),n=document.createElement("div");n.className="ui-toast",n.innerHTML=e,r.appendChild(n),setTimeout(()=>{n.classList.add("ui-toast-show"),setTimeout(()=>{n.classList.remove("ui-toast-show"),setTimeout(()=>{n.remove()},500)},4e3)},30)},Vt=t=>{let e=t.querySelector("aside");Array.from(e.querySelectorAll(".ui-toast")).forEach(n=>{n.classList.remove("ui-toast-show")})},it=()=>{let t=Dr();return localStorage.getItem(t)!=="true"},Ft=t=>{let e=Dr();t?localStorage.removeItem(e):localStorage.setItem(e,"true")},Dr=()=>Ti("disableEdit"),Ti=t=>\`builder.__LOCAL_APP_ID__.\${t}\`,Nr=()=>{let e=document.body.querySelector("[builder-content-id]")?.getAttribute("builder-content-id");return je(e)},je=(t,e)=>{let r="/content";t&&(r+="/"+t+"/edit");let n=new URL(r,"https://builder.io");t&&e&&n.searchParams.set("selectedBlock",e);let i=new URL(location.pathname,location.href);return n.searchParams.set("overridePreviewUrl",i.href),n.href},ot="__DEV_TOOLS_URL__",G={components:[],registryPath:"",registryDisplayPath:"",frameworks:[],dependencies:[],publicApiKey:void 0,devToolsVersion:""},le=t=>{G.components=t.components,G.registryPath=t.registryPath,G.registryDisplayPath=t.registryDisplayPath,G.dependencies=t.dependencies,G.publicApiKey=t.publicApiKey};function Ur(t){let e=null,r=document.querySelector("builder-dev-tools-menu"),n=()=>{t.hide()},i=u=>{let d=u.target;if(!d){n();return}if(d.closest("builder-dev-tools-edit"))return;let p=d.closest("[builder-content-id]"),a=d.closest("[builder-id]");if(!p||!a){t.hide();return}let c=t.show(p,a);!c||c===e||(r.highlightOpener(),e=c)};document.addEventListener("pointerover",i,{passive:!0}),document.addEventListener("pointerleave",n,{passive:!0}),document.addEventListener("pointercancel",n,{passive:!0}),document.addEventListener("visibilitychange",n,{passive:!0}),window.addEventListener("popstate",n,{passive:!0});let o=history.pushState;history.pushState=function(...u){t.hide(),o.apply(this,u)};let s=history.replaceState;history.replaceState=function(...u){t.hide(),s.apply(this,u)}}var st=class extends HTMLElement{openInBuilder=null;block=null;constructor(){super()}connectedCallback(){this.setAttribute("aria-hidden","true");let e=this.attachShadow({mode:"open"});e.innerHTML='<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}:host{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}#content-highlight,#block{position:absolute}#content-highlight{border:3px solid var(--primary-color);background-color:var(--primary-color-alpha)}a{position:absolute;top:-33px;left:0;display:block;padding:5px 10px 8px;pointer-events:auto;z-index:100;text-decoration:none}a:hover{text-decoration:none}a span{display:block;padding:3px 6px;font-size:10px;font-weight:300;border-radius:3px;text-align:center;text-decoration:none;pointer-events:none;background-color:var(--edit-color);color:var(--text-color);white-space:nowrap}a:hover span{background-color:var(--edit-color-highlight)}a:hover~.outline{border-color:var(--edit-color-highlight)}#open-in-editor{display:none}.outline{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid var(--edit-color);background-color:var(--edit-color-alpha)}</style><div id="block"> <a id="open-in-builder" target="builder"><span>Open In Builder</span></a> <a id="open-in-editor" href="#open-in-editor"><span>Open In Editor</span></a> <div class="outline"></div> </div>',this.openInBuilder=e.getElementById("open-in-builder"),this.block=e.getElementById("block"),Ur(this)}show(e,r){if(!it())return this.hide(),null;let n=e.getAttribute("builder-content-id"),i=r.getAttribute("builder-id");if(!n||!i)return this.hide(),null;let o=this.block,s=this.openInBuilder,u=r.getBoundingClientRect();o.style.top=u.top+window.scrollY-1+"px",o.style.left=u.left+window.scrollX+"px",o.style.width=u.width+"px",o.style.height=u.height+1+"px";let d=s.getBoundingClientRect();if(d.width>u.width){let p=d.width-u.width;s.style.left=p/2*-1+"px"}else s.style.left="";return s.href=je(n,i),this.style.display="block",i}hide(){this.style.display=""}};var Mr="preview-url";var Br="_b-uid";var Vr="/~builder-connect";var Fr="/~builder-dev-tools";var Hr="https://cdn.builder.io/api/v1/proxy-api?url=https://api2.amplitude.com/2/httpapi";var qr=()=>se({type:"validateBuilder"}),De=t=>se({type:"launchEditor",data:t}),jr=t=>se({type:"getRegistry",data:t}),Gr=t=>se({type:"loadComponent",data:t}),Kr=t=>se({type:"registerComponent",data:t}),Wr=t=>se({type:"setComponentInfo",data:t}),at=t=>se({type:"setComponentInput",data:t}),$r=t=>se({type:"unregisterComponent",data:t}),Yr=t=>se({type:"enableDevTools",data:{enabled:t}}),zr=()=>se({type:"localConfig"}),se=async t=>{let e=new URL(Fr,ot),r;try{r=await fetch(e,{method:"POST",body:JSON.stringify(t)})}catch(i){throw console.error(\`Devtools Fetch Error, \${e.href}\`,i),new Error("Builder Devtools Fetch Error")}if((r.headers.get("content-type")||"").includes("application/json")){let i=await r.json();if(r.ok)return i.data;if(Array.isArray(i.errors)&&i.errors.length>0)throw i.errors.forEach(o=>console.error(o)),new Error(\`Builder Devtools Fetch Error: \${i.errors[0]}\`)}throw new Error(\`Builder Devtools Fetch Error: \${r.status}, \${await r.text()}\`)};var Qr=[{value:"boolean",text:"boolean"},{value:"color",text:"color (provides a color in hex or rgb)"},{value:"date",text:"date (same format as the Date constructor)"},{value:"email",text:"email"},{value:"file",text:"file (uploads a file and provides a url)"},{value:"list",text:"list (collection of items)"},{value:"longText",text:"longText (multiline text editor)"},{value:"number",text:"number"},{value:"object",text:"object (set of specific names and values)"},{value:"richText",text:"richText (provides value as html)"},{value:"string",text:"string"}],ut=["color","date","email","file","longText","richText","string"],ct=["number"],lt=["boolean"],dt=["list"],pt=["object"];function ft(t){return ut.includes(t)?"string":ct.includes(t)?"number":lt.includes(t)?"boolean":dt.includes(t)?"array":pt.includes(t)?"object":"string"}var Io=new Set(["about","accessKey","accessKeyLabel","asChild","autoCapitalize","autoCorrect","autoFocus","autoSave","blur","contentEditable","contextMenu","dangerouslySetInnerHTML","datatype","defaultChecked","defaultValue","dir","draggable","enterKeyHint","focus","form","formAction","formEncType","formMethod","formNoValidate","formTarget","inlist","innerText","inputMode","is","isContentEditable","itemID","itemProp","itemRef","itemScope","itemType","lang","nonce","offsetHeight","offsetLeft","offsetTop","offsetWidth","outerText","prefix","property","radioGroup","rel","resource","results","rev","role","security","slot","spellCheck","suppressContentEditableWarning","suppressHydrationWarning","tabIndex","translate","typeof","unselectable","vocab"].map(t=>t.toLowerCase()));var Ht=function(t,e){return Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ht(t,e)};function ae(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ht(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var E=function(){return E=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},E.apply(this,arguments)};function Ge(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function g(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(a){try{p(n.next(a))}catch(c){s(c)}}function d(a){try{p(n.throw(a))}catch(c){s(c)}}function p(a){a.done?o(a.value):i(a.value).then(u,d)}p((n=n.apply(t,e||[])).next())})}function h(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(p){return function(a){return d([p,a])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,p[0]&&(r=0)),r;)try{if(n=1,i&&(o=p[0]&2?i.return:p[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,p[1])).done)return o;switch(i=0,o&&(p=[p[0]&2,o.value]),p[0]){case 0:case 1:o=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]<o[3])){r.label=p[1];break}if(p[0]===6&&r.label<o[1]){r.label=o[1],o=p;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(p);break}o[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(a){p=[6,a],i=0}finally{n=o=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}function J(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function ee(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}var mt={};bi(mt,{IdentifyOperation:()=>B,LogLevel:()=>Y,PluginType:()=>N,RevenueProperty:()=>re,ServerZone:()=>Se,SpecialEventType:()=>de,Status:()=>M,TransportType:()=>Ie});var B;(function(t){t.SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll"})(B||(B={}));var re;(function(t){t.REVENUE_PRODUCT_ID="$productId",t.REVENUE_QUANTITY="$quantity",t.REVENUE_PRICE="$price",t.REVENUE_TYPE="$revenueType",t.REVENUE_CURRENCY="$currency",t.REVENUE="$revenue"})(re||(re={}));var de;(function(t){t.IDENTIFY="$identify",t.GROUP_IDENTIFY="$groupidentify",t.REVENUE="revenue_amount"})(de||(de={}));var Y;(function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})(Y||(Y={}));var N;(function(t){t.BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})(N||(N={}));var Se;(function(t){t.US="US",t.EU="EU",t.STAGING="STAGING"})(Se||(Se={}));var M;(function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})(M||(M={}));var Ie;(function(t){t.XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})(Ie||(Ie={}));var qt="-",xe="AMP",jt="".concat(xe,"_unsent"),Gt="https://api2.amplitude.com/2/httpapi",Xr="https://api.eu.amplitude.com/2/httpapi",Zr="https://api2.amplitude.com/batch",Jr="https://api.eu.amplitude.com/batch";var wi=1e3,vt=function(t){if(Object.keys(t).length>wi)return!1;for(var e in t){var r=t[e];if(!Kt(e,r))return!1}return!0},Kt=function(t,e){var r,n;if(typeof t!="string")return!1;if(Array.isArray(e)){var i=!0;try{for(var o=J(e),s=o.next();!s.done;s=o.next()){var u=s.value;if(Array.isArray(u))return!1;if(typeof u=="object")i=i&&vt(u);else if(!["number","string"].includes(typeof u))return!1;if(!i)return!1}}catch(d){r={error:d}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else{if(e==null)return!1;if(typeof e=="object")return vt(e);if(!["number","string","boolean"].includes(typeof e))return!1}return!0};var ne=(function(){function t(){this._propertySet=new Set,this._properties={}}return t.prototype.getUserProperties=function(){return E({},this._properties)},t.prototype.set=function(e,r){return this._safeSet(B.SET,e,r),this},t.prototype.setOnce=function(e,r){return this._safeSet(B.SET_ONCE,e,r),this},t.prototype.append=function(e,r){return this._safeSet(B.APPEND,e,r),this},t.prototype.prepend=function(e,r){return this._safeSet(B.PREPEND,e,r),this},t.prototype.postInsert=function(e,r){return this._safeSet(B.POSTINSERT,e,r),this},t.prototype.preInsert=function(e,r){return this._safeSet(B.PREINSERT,e,r),this},t.prototype.remove=function(e,r){return this._safeSet(B.REMOVE,e,r),this},t.prototype.add=function(e,r){return this._safeSet(B.ADD,e,r),this},t.prototype.unset=function(e){return this._safeSet(B.UNSET,e,qt),this},t.prototype.clearAll=function(){return this._properties={},this._properties[B.CLEAR_ALL]=qt,this},t.prototype._safeSet=function(e,r,n){if(this._validate(e,r,n)){var i=this._properties[e];return i===void 0&&(i={},this._properties[e]=i),i[r]=n,this._propertySet.add(r),!0}return!1},t.prototype._validate=function(e,r,n){return this._properties[B.CLEAR_ALL]!==void 0||this._propertySet.has(r)?!1:e===B.ADD?typeof n=="number":e!==B.UNSET&&e!==B.REMOVE?Kt(r,n):!0},t})();var en=function(t,e,r){var n=typeof t=="string"?{event_type:t}:t;return E(E(E({},n),r),e&&{event_properties:e})},Ke=function(t,e){var r=E(E({},e),{event_type:de.IDENTIFY,user_properties:t.getUserProperties()});return r},tn=function(t,e,r,n){var i,o=E(E({},n),{event_type:de.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:(i={},i[t]=e,i)});return o},rn=function(t,e,r){var n,i=new ne;i.set(t,e);var o=E(E({},r),{event_type:de.IDENTIFY,user_properties:i.getUserProperties(),groups:(n={},n[t]=e,n)});return o},nn=function(t,e){return E(E({},e),{event_type:de.REVENUE,event_properties:t.getEventProperties()})};var ve=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=M.Unknown),{event:t,code:e,message:r}};var on=(function(){function t(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return t.prototype.register=function(e,r){return g(this,void 0,void 0,function(){return h(this,function(n){switch(n.label){case 0:return[4,e.setup(r,this.client)];case 1:return n.sent(),this.plugins.push(e),[2]}})})},t.prototype.deregister=function(e,r){var n;return g(this,void 0,void 0,function(){var i,o;return h(this,function(s){switch(s.label){case 0:return i=this.plugins.findIndex(function(u){return u.name===e}),i===-1?(r.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(o=this.plugins[i],this.plugins.splice(i,1),[4,(n=o.teardown)===null||n===void 0?void 0:n.call(o)]);case 1:return s.sent(),[2]}})})},t.prototype.reset=function(e){this.applying=!1;var r=this.plugins;r.map(function(n){var i;return(i=n.teardown)===null||i===void 0?void 0:i.call(n)}),this.plugins=[],this.client=e},t.prototype.push=function(e){var r=this;return new Promise(function(n){r.queue.push([e,n]),r.scheduleApply(0)})},t.prototype.scheduleApply=function(e){var r=this;this.applying||(this.applying=!0,setTimeout(function(){r.apply(r.queue.shift()).then(function(){r.applying=!1,r.queue.length>0&&r.scheduleApply(0)})},e))},t.prototype.apply=function(e){return g(this,void 0,void 0,function(){var r,n,i,o,s,u,d,f,m,p,a,c,l,f,m,_,b,v,y,T,L,k;return h(this,function(w){switch(w.label){case 0:if(!e)return[2];r=A(e,1),n=r[0],i=A(e,2),o=i[1],s=this.plugins.filter(function(C){return C.type===N.BEFORE}),w.label=1;case 1:w.trys.push([1,6,7,8]),u=J(s),d=u.next(),w.label=2;case 2:return d.done?[3,5]:(f=d.value,[4,f.execute(E({},n))]);case 3:if(m=w.sent(),m===null)return o({event:n,code:0,message:""}),[2];n=m,w.label=4;case 4:return d=u.next(),[3,2];case 5:return[3,8];case 6:return p=w.sent(),y={error:p},[3,8];case 7:try{d&&!d.done&&(T=u.return)&&T.call(u)}finally{if(y)throw y.error}return[7];case 8:a=this.plugins.filter(function(C){return C.type===N.ENRICHMENT}),w.label=9;case 9:w.trys.push([9,14,15,16]),c=J(a),l=c.next(),w.label=10;case 10:return l.done?[3,13]:(f=l.value,[4,f.execute(E({},n))]);case 11:if(m=w.sent(),m===null)return o({event:n,code:0,message:""}),[2];n=m,w.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return _=w.sent(),L={error:_},[3,16];case 15:try{l&&!l.done&&(k=c.return)&&k.call(c)}finally{if(L)throw L.error}return[7];case 16:return b=this.plugins.filter(function(C){return C.type===N.DESTINATION}),v=b.map(function(C){var R=E({},n);return C.execute(R).catch(function(K){return ve(R,0,String(K))})}),Promise.all(v).then(function(C){var R=A(C,1),K=R[0];o(K)}),[2]}})})},t.prototype.flush=function(){return g(this,void 0,void 0,function(){var e,r,n,i=this;return h(this,function(o){switch(o.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(s){return i.apply(s)}))];case 1:return o.sent(),r=this.plugins.filter(function(s){return s.type===N.DESTINATION}),n=r.map(function(s){return s.flush&&s.flush()}),[4,Promise.all(n)];case 2:return o.sent(),[2]}})})},t})();var sn="Event tracked successfully",an="Unexpected error occurred",un="Event rejected due to exceeded retry count",cn="Event skipped due to optOut config",ln="Event rejected due to missing API key",dn="Invalid API key",pn="Client not initialized";var X=function(t){return{promise:t||Promise.resolve()}};var Wt=(function(){function t(e){e===void 0&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new on(this),this.name=e}return t.prototype._init=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){switch(r.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return r.sent(),[2]}})})},t.prototype.runQueuedFunctions=function(e){return g(this,void 0,void 0,function(){var r,n,i,o,s,u,d;return h(this,function(p){switch(p.label){case 0:r=this[e],this[e]=[],p.label=1;case 1:p.trys.push([1,6,7,8]),n=J(r),i=n.next(),p.label=2;case 2:return i.done?[3,5]:(o=i.value,[4,o()]);case 3:p.sent(),p.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return s=p.sent(),u={error:s},[3,8];case 7:try{i&&!i.done&&(d=n.return)&&d.call(n)}finally{if(u)throw u.error}return[7];case 8:return[2]}})})},t.prototype.track=function(e,r,n){var i=en(e,r,n);return X(this.dispatch(i))},t.prototype.identify=function(e,r){var n=Ke(e,r);return X(this.dispatch(n))},t.prototype.groupIdentify=function(e,r,n,i){var o=tn(e,r,n,i);return X(this.dispatch(o))},t.prototype.setGroup=function(e,r,n){var i=rn(e,r,n);return X(this.dispatch(i))},t.prototype.revenue=function(e,r){var n=nn(e,r);return X(this.dispatch(n))},t.prototype.add=function(e){return this.config?X(this.timeline.register(e,this.config)):(this.q.push(this.add.bind(this,e)),X())},t.prototype.remove=function(e){return this.config?X(this.timeline.deregister(e,this.config)):(this.q.push(this.remove.bind(this,e)),X())},t.prototype.dispatchWithCallback=function(e,r){if(!this.config)return r(ve(e,0,pn));this.process(e).then(r)},t.prototype.dispatch=function(e){return g(this,void 0,void 0,function(){var r=this;return h(this,function(n){return this.config?[2,this.process(e)]:[2,new Promise(function(i){r.dispatchQ.push(r.dispatchWithCallback.bind(r,e,i))})]})})},t.prototype.process=function(e){return g(this,void 0,void 0,function(){var i,r,n,i;return h(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,ve(e,0,cn)]:[4,this.timeline.push(e)];case 1:return i=o.sent(),i.code===200?this.config.loggerProvider.log(i.message):this.config.loggerProvider.error(i.message),[2,i];case 2:return r=o.sent(),this.config.loggerProvider.error(r),n=String(r),i=ve(e,0,n),[2,i];case 3:return[2]}})})},t.prototype.setOptOut=function(e){if(!this.config){this.q.push(this.setOptOut.bind(this,!!e));return}this.config.optOut=!!e},t.prototype.flush=function(){return X(this.timeline.flush())},t})();var gt=(function(){function t(){this.productId="",this.quantity=1,this.price=0}return t.prototype.setProductId=function(e){return this.productId=e,this},t.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},t.prototype.setPrice=function(e){return this.price=e,this},t.prototype.setRevenueType=function(e){return this.revenueType=e,this},t.prototype.setCurrency=function(e){return this.currency=e,this},t.prototype.setRevenue=function(e){return this.revenue=e,this},t.prototype.setEventProperties=function(e){return vt(e)&&(this.properties=e),this},t.prototype.getEventProperties=function(){var e=this.properties?E({},this.properties):{};return e[re.REVENUE_PRODUCT_ID]=this.productId,e[re.REVENUE_QUANTITY]=this.quantity,e[re.REVENUE_PRICE]=this.price,e[re.REVENUE_TYPE]=this.revenueType,e[re.REVENUE_CURRENCY]=this.currency,e[re.REVENUE]=this.revenue,e},t})();var fn=function(t,e){var r=Math.max(e,1);return t.reduce(function(n,i,o){var s=Math.floor(o/r);return n[s]||(n[s]=[]),n[s].push(i),n},[])};var ht="Amplitude Logger ",mn=(function(){function t(){this.logLevel=Y.None}return t.prototype.disable=function(){this.logLevel=Y.None},t.prototype.enable=function(e){e===void 0&&(e=Y.Warn),this.logLevel=e},t.prototype.log=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Verbose||console.log("".concat(ht,"[Log]: ").concat(e.join(" ")))},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Warn||console.warn("".concat(ht,"[Warn]: ").concat(e.join(" ")))},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Error||console.error("".concat(ht,"[Error]: ").concat(e.join(" ")))},t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Debug||console.log("".concat(ht,"[Debug]: ").concat(e.join(" ")))},t})();var yt=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:Y.Warn,loggerProvider:new mn,optOut:!1,serverUrl:Gt,serverZone:Se.US,useBatch:!1}},$t=(function(){function t(e){var r,n,i,o;this._optOut=!1;var s=yt();this.apiKey=e.apiKey,this.flushIntervalMillis=(r=e.flushIntervalMillis)!==null&&r!==void 0?r:s.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||s.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||s.flushQueueSize,this.instanceName=e.instanceName||s.instanceName,this.loggerProvider=e.loggerProvider||s.loggerProvider,this.logLevel=(n=e.logLevel)!==null&&n!==void 0?n:s.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=(i=e.optOut)!==null&&i!==void 0?i:s.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||s.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=(o=e.useBatch)!==null&&o!==void 0?o:s.useBatch,this.loggerProvider.enable(this.logLevel);var u=Yt(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=u.serverZone,this.serverUrl=u.serverUrl}return Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t})();var Si=function(t,e){return t===Se.EU?e?Jr:Xr:e?Zr:Gt},Yt=function(t,e,r){if(t===void 0&&(t=""),e===void 0&&(e=yt().serverZone),r===void 0&&(r=yt().useBatch),t)return{serverUrl:t,serverZone:void 0};var n=["US","EU"].includes(e)?e:yt().serverZone;return{serverZone:n,serverUrl:Si(n,r)}};function Ii(t){return t instanceof Error?t.message:String(t)}function bt(t){var e="";try{"body"in t&&(e=JSON.stringify(t.body))}catch{}return e}var zt=(function(){function t(){this.name="amplitude",this.type=N.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return t.prototype.setup=function(e){var r;return g(this,void 0,void 0,function(){var n,i=this;return h(this,function(o){switch(o.label){case 0:return this.config=e,this.storageKey="".concat(jt,"_").concat(this.config.apiKey.substring(0,10)),[4,(r=this.config.storageProvider)===null||r===void 0?void 0:r.get(this.storageKey)];case 1:return n=o.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map(function(s){return i.execute(s)})).catch(),[2,Promise.resolve(void 0)]}})})},t.prototype.execute=function(e){var r=this;return new Promise(function(n){var i={event:e,attempts:0,callback:function(o){return n(o)},timeout:0};r.addToQueue(i)})},t.prototype.addToQueue=function(){for(var e=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=r.filter(function(o){return o.attempts<e.config.flushMaxRetries?(o.attempts+=1,!0):(e.fulfillRequest([o],500,un),!1)});i.forEach(function(o){if(e.queue=e.queue.concat(o),o.timeout===0){e.schedule(e.config.flushIntervalMillis);return}setTimeout(function(){o.timeout=0,e.schedule(0)},o.timeout)}),this.saveEvents()},t.prototype.schedule=function(e){var r=this;this.scheduled||(this.scheduled=setTimeout(function(){r.flush(!0).then(function(){r.queue.length>0&&r.schedule(e)})},e))},t.prototype.flush=function(e){return e===void 0&&(e=!1),g(this,void 0,void 0,function(){var r,n,i,o=this;return h(this,function(s){switch(s.label){case 0:return r=[],n=[],this.queue.forEach(function(u){return u.timeout===0?r.push(u):n.push(u)}),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=fn(r,this.config.flushQueueSize),[4,Promise.all(i.map(function(u){return o.send(u,e)}))];case 1:return s.sent(),[2]}})})},t.prototype.send=function(e,r){return r===void 0&&(r=!0),g(this,void 0,void 0,function(){var n,i,o,s,u;return h(this,function(d){switch(d.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,ln)];n={api_key:this.config.apiKey,events:e.map(function(p){var a=p.event,c=a.extra,l=Ge(a,["extra"]);return l}),options:{min_id_length:this.config.minIdLength}},d.label=1;case 1:return d.trys.push([1,3,,4]),i=Yt(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,n)];case 2:return o=d.sent(),o===null?(this.fulfillRequest(e,0,an),[2]):r?(this.handleResponse(o,e),[3,4]):("body"in o?this.fulfillRequest(e,o.statusCode,"".concat(o.status,": ").concat(bt(o))):this.fulfillRequest(e,o.statusCode,o.status),[2]);case 3:return s=d.sent(),this.config.loggerProvider.error(s),u=Ii(s),this.fulfillRequest(e,0,u),[3,4];case 4:return[2]}})})},t.prototype.handleResponse=function(e,r){var n=e.status;switch(n){case M.Success:{this.handleSuccessResponse(e,r);break}case M.Invalid:{this.handleInvalidResponse(e,r);break}case M.PayloadTooLarge:{this.handlePayloadTooLargeResponse(e,r);break}case M.RateLimit:{this.handleRateLimitResponse(e,r);break}default:{this.config.loggerProvider.warn(\`{code: 0, error: "Status '\`.concat(n,"' provided for ").concat(r.length,' events"}')),this.handleOtherResponse(r);break}}},t.prototype.handleSuccessResponse=function(e,r){this.fulfillRequest(r,e.statusCode,sn)},t.prototype.handleInvalidResponse=function(e,r){var n=this;if(e.body.missingField||e.body.error.startsWith(dn)){this.fulfillRequest(r,e.statusCode,e.body.error);return}var i=ee(ee(ee(ee([],A(Object.values(e.body.eventsWithInvalidFields)),!1),A(Object.values(e.body.eventsWithMissingFields)),!1),A(Object.values(e.body.eventsWithInvalidIdLengths)),!1),A(e.body.silencedEvents),!1).flat(),o=new Set(i),s=r.filter(function(u,d){if(o.has(d)){n.fulfillRequest([u],e.statusCode,e.body.error);return}return!0});s.length>0&&this.config.loggerProvider.warn(bt(e)),this.addToQueue.apply(this,ee([],A(s),!1))},t.prototype.handlePayloadTooLargeResponse=function(e,r){if(r.length===1){this.fulfillRequest(r,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(bt(e)),this.config.flushQueueSize/=2,this.addToQueue.apply(this,ee([],A(r),!1))},t.prototype.handleRateLimitResponse=function(e,r){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),s=e.body.throttledEvents,u=new Set(i),d=new Set(o),p=new Set(s),a=r.filter(function(c,l){if(c.event.user_id&&u.has(c.event.user_id)||c.event.device_id&&d.has(c.event.device_id)){n.fulfillRequest([c],e.statusCode,e.body.error);return}return p.has(l)&&(c.timeout=n.throttleTimeout),!0});a.length>0&&this.config.loggerProvider.warn(bt(e)),this.addToQueue.apply(this,ee([],A(a),!1))},t.prototype.handleOtherResponse=function(e){var r=this;this.addToQueue.apply(this,ee([],A(e.map(function(n){return n.timeout=n.attempts*r.retryTimeout,n})),!1))},t.prototype.fulfillRequest=function(e,r,n){this.saveEvents(),e.forEach(function(i){return i.callback(ve(i.event,r,n))})},t.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map(function(r){return r.event}));this.config.storageProvider.set(this.storageKey,e)}},t})();var xi=function(t){t===void 0&&(t=0);var e=new Error().stack||"";return e.split(\`
1244
+ `),t.restartAppServer()},10),t.enableAppWatch(!e),{enabled:e,platform:t.platform()}}var wxe,Mj=N(()=>{"use strict";m();Zi();nh();Rj();wxe=[".js",".jsx",".ts",".tsx",".json",".css",".scss",".sass",".less",".html",".htm",".xml",".svg",".png",".jpg",".jpeg",".gif",".ico",".webp",".woff",".woff2",".ttf",".eot",".mp4",".webm",".ogg",".md",".txt",".csv",".pdf"]});async function Bj(t){return $j(t,`"use strict";(()=>{var fi=Object.create;var Mt=Object.defineProperty;var mi=Object.getOwnPropertyDescriptor;var vi=Object.getOwnPropertyNames;var gi=Object.getPrototypeOf,hi=Object.prototype.hasOwnProperty;var yi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),bi=(t,e)=>{for(var r in e)Mt(t,r,{get:e[r],enumerable:!0})},Ei=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vi(e))!hi.call(t,i)&&i!==r&&Mt(t,i,{get:()=>e[i],enumerable:!(n=mi(e,i))||n.enumerable});return t};var _i=(t,e,r)=>(r=t!=null?fi(gi(t)):{},Ei(e||!t||!t.__esModule?Mt(r,"default",{value:t,enumerable:!0}):r,t));var jn=yi((Qe,Ct)=>{(function(t,e){"use strict";var r="0.7.33",n="",i="?",o="function",s="undefined",u="object",d="string",p="major",a="model",c="name",l="type",f="vendor",m="version",_="architecture",b="console",v="mobile",y="tablet",T="smarttv",L="wearable",k="embedded",w=350,C="Amazon",R="Apple",K="ASUS",z="BlackBerry",Q="Browser",P="Chrome",Ce="Edge",ce="Firefox",_e="Google",Me="Huawei",Re="LG",Oe="Microsoft",Be="Motorola",Te="Opera",we="Samsung",ke="Sharp",fe="Sony",me="Xiaomi",Ve="Zebra",U="Facebook",et=function(S,O){var I={};for(var q in S)O[q]&&O[q].length%2===0?I[q]=O[q].concat(S[q]):I[q]=S[q];return I},tt=function(S){for(var O={},I=0;I<S.length;I++)O[S[I].toUpperCase()]=S[I];return O},Pr=function(S,O){return typeof S===d?Fe(O).indexOf(Fe(S))!==-1:!1},Fe=function(S){return S.toLowerCase()},di=function(S){return typeof S===d?S.replace(/[^\\d\\.]/g,n).split(".")[0]:e},Nt=function(S,O){if(typeof S===d)return S=S.replace(/^\\s\\s*/,n),typeof O===s?S:S.substring(0,w)},He=function(S,O){for(var I=0,q,x,nt,D,qe,ie;I<O.length&&!qe;){var Or=O[I],kr=O[I+1];for(q=x=0;q<Or.length&&!qe;)if(qe=Or[q++].exec(S),qe)for(nt=0;nt<kr.length;nt++)ie=qe[++x],D=kr[nt],typeof D===u&&D.length>0?D.length===2?typeof D[1]==o?this[D[0]]=D[1].call(this,ie):this[D[0]]=D[1]:D.length===3?typeof D[1]===o&&!(D[1].exec&&D[1].test)?this[D[0]]=ie?D[1].call(this,ie,D[2]):e:this[D[0]]=ie?ie.replace(D[1],D[2]):e:D.length===4&&(this[D[0]]=ie?D[3].call(this,ie.replace(D[1],D[2])):e):this[D]=ie||e;I+=2}},Ut=function(S,O){for(var I in O)if(typeof O[I]===u&&O[I].length>0){for(var q=0;q<O[I].length;q++)if(Pr(O[I][q],S))return I===i?e:I}else if(Pr(O[I],S))return I===i?e:I;return S},pi={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Cr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Rr={browser:[[/\\b(?:crmo|crios)\\/([\\w\\.]+)/i],[m,[c,"Chrome"]],[/edg(?:e|ios|a)?\\/([\\w\\.]+)/i],[m,[c,"Edge"]],[/(opera mini)\\/([-\\w\\.]+)/i,/(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i,/(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i],[c,m],[/opios[\\/ ]+([\\w\\.]+)/i],[m,[c,Te+" Mini"]],[/\\bopr\\/([\\w\\.]+)/i],[m,[c,Te]],[/(kindle)\\/([\\w\\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\\/ ]?([\\w\\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\\/ ]?([\\w\\.]*)/i,/(ba?idubrowser)[\\/ ]?([\\w\\.]+)/i,/(?:ms|\\()(ie) ([\\w\\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\\/([-\\w\\.]+)/i,/(weibo)__([\\d\\.]+)/i],[c,m],[/(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i],[m,[c,"UC"+Q]],[/microm.+\\bqbcore\\/([\\w\\.]+)/i,/\\bqbcore\\/([\\w\\.]+).+microm/i],[m,[c,"WeChat(Win) Desktop"]],[/micromessenger\\/([\\w\\.]+)/i],[m,[c,"WeChat"]],[/konqueror\\/([\\w\\.]+)/i],[m,[c,"Konqueror"]],[/trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i],[m,[c,"IE"]],[/yabrowser\\/([\\w\\.]+)/i],[m,[c,"Yandex"]],[/(avast|avg)\\/([\\w\\.]+)/i],[[c,/(.+)/,"$1 Secure "+Q],m],[/\\bfocus\\/([\\w\\.]+)/i],[m,[c,ce+" Focus"]],[/\\bopt\\/([\\w\\.]+)/i],[m,[c,Te+" Touch"]],[/coc_coc\\w+\\/([\\w\\.]+)/i],[m,[c,"Coc Coc"]],[/dolfin\\/([\\w\\.]+)/i],[m,[c,"Dolphin"]],[/coast\\/([\\w\\.]+)/i],[m,[c,Te+" Coast"]],[/miuibrowser\\/([\\w\\.]+)/i],[m,[c,"MIUI "+Q]],[/fxios\\/([-\\w\\.]+)/i],[m,[c,ce]],[/\\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+Q]],[/(oculus|samsung|sailfish|huawei)browser\\/([\\w\\.]+)/i],[[c,/(.+)/,"$1 "+Q],m],[/(comodo_dragon)\\/([\\w\\.]+)/i],[[c,/_/g," "],m],[/(electron)\\/([\\w\\.]+) safari/i,/(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\\/ ]?([\\w\\.]+)/i],[c,m],[/(metasr)[\\/ ]?([\\w\\.]+)/i,/(lbbrowser)/i,/\\[(linkedin)app\\]/i],[c],[/((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i],[[c,U],m],[/safari (line)\\/([\\w\\.]+)/i,/\\b(line)\\/([\\w\\.]+)\\/iab/i,/(chromium|instagram)[\\/ ]([-\\w\\.]+)/i],[c,m],[/\\bgsa\\/([\\w\\.]+) .*safari\\//i],[m,[c,"GSA"]],[/headlesschrome(?:\\/([\\w\\.]+)| )/i],[m,[c,P+" Headless"]],[/ wv\\).+(chrome)\\/([\\w\\.]+)/i],[[c,P+" WebView"],m],[/droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i],[m,[c,"Android "+Q]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i],[c,m],[/version\\/([\\w\\.\\,]+) .*mobile\\/\\w+ (safari)/i],[m,[c,"Mobile Safari"]],[/version\\/([\\w(\\.|\\,)]+) .*(mobile ?safari|safari)/i],[m,c],[/webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i],[c,[m,Ut,pi]],[/(webkit|khtml)\\/([\\w\\.]+)/i],[c,m],[/(navigator|netscape\\d?)\\/([-\\w\\.]+)/i],[[c,"Netscape"],m],[/mobile vr; rv:([\\w\\.]+)\\).+firefox/i],[m,[c,ce+" Reality"]],[/ekiohf.+(flow)\\/([\\w\\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\/ ]?([\\w\\.\\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([-\\w\\.]+)$/i,/(firefox)\\/([\\w\\.]+)/i,/(mozilla)\\/([\\w\\.]+) .+rv\\:.+gecko\\/\\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\. ]?browser)[-\\/ ]?v?([\\w\\.]+)/i,/(links) \\(([\\w\\.]+)/i],[c,m],[/(cobalt)\\/([\\w\\.]+)/i],[c,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i],[[_,"amd64"]],[/(ia32(?=;))/i],[[_,Fe]],[/((?:i[346]|x)86)[;\\)]/i],[[_,"ia32"]],[/\\b(aarch64|arm(v?8e?l?|_?64))\\b/i],[[_,"arm64"]],[/\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i],[[_,"armhf"]],[/windows (ce|mobile); ppc;/i],[[_,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i],[[_,/ower/,n,Fe]],[/(sun4\\w)[;\\)]/i],[[_,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i],[[_,Fe]]],device:[[/\\b(sch-i[89]0\\d|shw-m380s|sm-[ptx]\\w{2,4}|gt-[pn]\\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[f,we],[l,y]],[/\\b((?:s[cgp]h|gt|sm)-\\w+|galaxy nexus)/i,/samsung[- ]([-\\w]+)/i,/sec-(sgh\\w+)/i],[a,[f,we],[l,v]],[/((ipod|iphone)\\d+,\\d+)/i],[a,[f,R],[l,v]],[/(ipad\\d+,\\d+)/i],[a,[f,R],[l,y]],[/\\((ip(?:hone|od)[\\w ]*);/i],[a,[f,R],[l,v]],[/\\((ipad);[-\\w\\),; ]+apple/i,/applecoremedia\\/[\\w\\.]+ \\((ipad)/i,/\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i],[a,[f,R],[l,y]],[/(macintosh);/i],[a,[f,R]],[/\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i],[a,[f,Me],[l,y]],[/(?:huawei|honor)([-\\w ]+)[;\\)]/i,/\\b(nexus 6p|\\w{2,4}e?-[atu]?[ln][\\dx][012359c][adn]?)\\b(?!.+d\\/s)/i],[a,[f,Me],[l,v]],[/\\b(poco[\\w ]+)(?: bui|\\))/i,/\\b; (\\w+) build\\/hm\\1/i,/\\b(hm[-_ ]?note?[_ ]?(?:\\d\\w)?) bui/i,/\\b(redmi[\\-_ ]?(?:note|k)?[\\w_ ]+)(?: bui|\\))/i,/\\b(mi[-_ ]?(?:a\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\d?\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\))/i],[[a,/_/g," "],[f,me],[l,v]],[/\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i],[[a,/_/g," "],[f,me],[l,y]],[/; (\\w+) bui.+ oppo/i,/\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007|a101op)\\b/i],[a,[f,"OPPO"],[l,v]],[/vivo (\\w+)(?: bui|\\))/i,/\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i],[a,[f,"Vivo"],[l,v]],[/\\b(rmx[12]\\d{3})(?: bui|;|\\))/i],[a,[f,"Realme"],[l,v]],[/\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\b[\\w ]+build\\//i,/\\bmot(?:orola)?[- ](\\w*)/i,/((?:moto[\\w\\(\\) ]+|xt\\d{3,4}|nexus 6)(?= bui|\\)))/i],[a,[f,Be],[l,v]],[/\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i],[a,[f,Be],[l,y]],[/((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[f,Re],[l,y]],[/(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,/\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,/\\blg-?([\\d\\w]+) bui/i],[a,[f,Re],[l,v]],[/(ideatab[-\\w ]+)/i,/lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i],[a,[f,"Lenovo"],[l,y]],[/(?:maemo|nokia).*(n900|lumia \\d+)/i,/nokia[-_ ]?([-\\w\\.]*)/i],[[a,/_/g," "],[f,"Nokia"],[l,v]],[/(pixel c)\\b/i],[a,[f,_e],[l,y]],[/droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i],[a,[f,_e],[l,v]],[/droid.+ (a?\\d[0-2]{2}so|[c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i],[a,[f,fe],[l,v]],[/sony tablet [ps]/i,/\\b(?:sony)?sgp\\w+(?: bui|\\))/i],[[a,"Xperia Tablet"],[f,fe],[l,y]],[/ (kb2005|in20[12]5|be20[12][59])\\b/i,/(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i],[a,[f,"OnePlus"],[l,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\\))/i,/(kf[a-z]+)( bui|\\)).+silk\\//i],[a,[f,C],[l,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i],[[a,/(.+)/g,"Fire Phone $1"],[f,C],[l,v]],[/(playbook);[-\\w\\),; ]+(rim)/i],[a,f,[l,y]],[/\\b((?:bb[a-f]|st[hv])100-\\d)/i,/\\(bb10; (\\w+)/i],[a,[f,z],[l,v]],[/(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i],[a,[f,K],[l,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i],[a,[f,K],[l,v]],[/(nexus 9)/i],[a,[f,"HTC"],[l,y]],[/(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i,/(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\\w]*)/i],[f,[a,/_/g," "],[l,v]],[/droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i],[a,[f,"Acer"],[l,y]],[/droid.+; (m[1-5] note) bui/i,/\\bmz-([-\\w]{2,})/i],[a,[f,"Meizu"],[l,v]],[/\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i],[a,[f,ke],[l,v]],[/(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\\w]*)/i,/(hp) ([\\w ]+\\w)/i,/(asus)-?(\\w+)/i,/(microsoft); (lumia[\\w ]+)/i,/(lenovo)[-_ ]?([-\\w]+)/i,/(jolla)/i,/(oppo) ?([\\w ]+) bui/i],[f,a,[l,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\\/([\\w\\.]+)/i,/(nook)[\\w ]+build\\/(\\w+)/i,/(dell) (strea[kpr\\d ]*[\\dko])/i,/(le[- ]+pan)[- ]+(\\w{1,9}) bui/i,/(trinity)[- ]*(t\\d{3}) bui/i,/(gigaset)[- ]+(q\\w{1,9}) bui/i,/(vodafone) ([\\w ]+)(?:\\)| bui)/i],[f,a,[l,y]],[/(surface duo)/i],[a,[f,Oe],[l,y]],[/droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i],[a,[f,"Fairphone"],[l,v]],[/(u304aa)/i],[a,[f,"AT&T"],[l,v]],[/\\bsie-(\\w*)/i],[a,[f,"Siemens"],[l,v]],[/\\b(rct\\w+) b/i],[a,[f,"RCA"],[l,y]],[/\\b(venue[\\d ]{2,7}) b/i],[a,[f,"Dell"],[l,y]],[/\\b(q(?:mv|ta)\\w+) b/i],[a,[f,"Verizon"],[l,y]],[/\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i],[a,[f,"Barnes & Noble"],[l,y]],[/\\b(tm\\d{3}\\w+) b/i],[a,[f,"NuVision"],[l,y]],[/\\b(k88) b/i],[a,[f,"ZTE"],[l,y]],[/\\b(nx\\d{3}j) b/i],[a,[f,"ZTE"],[l,v]],[/\\b(gen\\d{3}) b.+49h/i],[a,[f,"Swiss"],[l,v]],[/\\b(zur\\d{3}) b/i],[a,[f,"Swiss"],[l,y]],[/\\b((zeki)?tb.*\\b) b/i],[a,[f,"Zeki"],[l,y]],[/\\b([yr]\\d{2}) b/i,/\\b(dragon[- ]+touch |dt)(\\w{5}) b/i],[[f,"Dragon Touch"],a,[l,y]],[/\\b(ns-?\\w{0,9}) b/i],[a,[f,"Insignia"],[l,y]],[/\\b((nxa|next)-?\\w{0,9}) b/i],[a,[f,"NextBook"],[l,y]],[/\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],a,[l,v]],[/\\b(lvtel\\-)?(v1[12]) b/i],[[f,"LvTel"],a,[l,v]],[/\\b(ph-1) /i],[a,[f,"Essential"],[l,v]],[/\\b(v(100md|700na|7011|917g).*\\b) b/i],[a,[f,"Envizen"],[l,y]],[/\\b(trio[-\\w\\. ]+) b/i],[a,[f,"MachSpeed"],[l,y]],[/\\btu_(1491) b/i],[a,[f,"Rotor"],[l,y]],[/(shield[\\w ]+) b/i],[a,[f,"Nvidia"],[l,y]],[/(sprint) (\\w+)/i],[f,a,[l,v]],[/(kin\\.[onetw]{3})/i],[[a,/\\./g," "],[f,Oe],[l,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i],[a,[f,Ve],[l,y]],[/droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i],[a,[f,Ve],[l,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,a,[l,b]],[/droid.+; (shield) bui/i],[a,[f,"Nvidia"],[l,b]],[/(playstation [345portablevi]+)/i],[a,[f,fe],[l,b]],[/\\b(xbox(?: one)?(?!; xbox))[\\); ]/i],[a,[f,Oe],[l,b]],[/smart-tv.+(samsung)/i],[f,[l,T]],[/hbbtv.+maple;(\\d+)/i],[[a,/^/,"SmartTV"],[f,we],[l,T]],[/(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i],[[f,Re],[l,T]],[/(apple) ?tv/i],[f,[a,R+" TV"],[l,T]],[/crkey/i],[[a,P+"cast"],[f,_e],[l,T]],[/droid.+aft(\\w)( bui|\\))/i],[a,[f,C],[l,T]],[/\\(dtv[\\);].+(aquos)/i,/(aquos-tv[\\w ]+)\\)/i],[a,[f,ke],[l,T]],[/(bravia[\\w ]+)( bui|\\))/i],[a,[f,fe],[l,T]],[/(mitv-\\w{5}) bui/i],[a,[f,me],[l,T]],[/\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i,/hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w ]*; *(\\w[^;]*);([^;]*)/i],[[f,Nt],[a,Nt],[l,T]],[/\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i],[[l,T]],[/((pebble))app/i],[f,a,[l,L]],[/droid.+; (glass) \\d/i],[a,[f,_e],[l,L]],[/droid.+; (wt63?0{2,3})\\)/i],[a,[f,Ve],[l,L]],[/(quest( 2)?)/i],[a,[f,U],[l,L]],[/(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i],[f,[l,k]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+? mobile safari/i],[a,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i],[a,[l,y]],[/\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i],[[l,y]],[/(phone|mobile(?:[;\\/]| [ \\w\\/\\.]*safari)|pda(?=.+windows ce))/i],[[l,v]],[/(android[-\\w\\. ]{0,9});.+buil/i],[a,[f,"Generic"]]],engine:[[/windows.+ edge\\/([\\w\\.]+)/i],[m,[c,Ce+"HTML"]],[/webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i],[m,[c,"Blink"]],[/(presto)\\/([\\w\\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i,/ekioh(flow)\\/([\\w\\.]+)/i,/(khtml|tasman|links)[\\/ ]\\(?([\\w\\.]+)/i,/(icab)[\\/ ]([23]\\.[\\d\\.]+)/i],[c,m],[/rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i],[m,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,m],[/(windows) nt 6\\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i,/(windows)[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i],[c,[m,Ut,Cr]],[/(win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i],[[c,"Windows"],[m,Ut,Cr]],[/ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i,/cfnetwork\\/.+darwin/i],[[m,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\\w\\. ]*)/i,/(macintosh|mac_powerpc\\b)(?!.+haiku)/i],[[c,"Mac OS"],[m,/_/g,"."]],[/droid ([\\w\\.]+)\\b.+(android[- ]x86|harmonyos)/i],[m,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,/(blackberry)\\w*\\/([\\w\\.]*)/i,/(tizen|kaios)[\\/ ]([\\w\\.]+)/i,/\\((series40);/i],[c,m],[/\\(bb(10);/i],[m,[c,z]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i],[m,[c,"Symbian"]],[/mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i],[m,[c,ce+" OS"]],[/web0s;.+rt(tv)/i,/\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i],[m,[c,"webOS"]],[/crkey\\/([\\d\\.]+)/i],[m,[c,P+"cast"]],[/(cros) [\\w]+ ([\\w\\.]+\\w)/i],[[c,"Chromium OS"],m],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\\);]+)/i,/\\b(joli|palm)\\b ?(?:os)?\\/?([\\w\\.]*)/i,/(mint)[\\/\\(\\) ]?(\\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\/ ]?(?!chrom|package)([-\\w\\.]*)/i,/(hurd|linux) ?([\\w\\.]*)/i,/(gnu) ?([\\w\\.]*)/i,/\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\/ ]?(?!amd|[ix346]{1,2}86)([\\w\\.]*)/i,/(haiku) (\\w+)/i],[c,m],[/(sunos) ?([\\w\\.\\d]*)/i],[[c,"Solaris"],m],[/((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i,/(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i,/\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\\w\\.]*)/i],[c,m]]},Z=function(S,O){if(typeof S===u&&(O=S,S=e),!(this instanceof Z))return new Z(S,O).getResult();var I=S||(typeof t!==s&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:n),q=O?et(Rr,O):Rr;return this.getBrowser=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.browser),x.major=di(x.version),x},this.getCPU=function(){var x={};return x[_]=e,He.call(x,I,q.cpu),x},this.getDevice=function(){var x={};return x[f]=e,x[a]=e,x[l]=e,He.call(x,I,q.device),x},this.getEngine=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.engine),x},this.getOS=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.os),x},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return I},this.setUA=function(x){return I=typeof x===d&&x.length>w?Nt(x,w):x,this},this.setUA(I),this};Z.VERSION=r,Z.BROWSER=tt([c,m,p]),Z.CPU=tt([_]),Z.DEVICE=tt([a,f,l,b,v,T,y,L,k]),Z.ENGINE=Z.OS=tt([c,m]),typeof Qe!==s?(typeof Ct!==s&&Ct.exports&&(Qe=Ct.exports=Z),Qe.UAParser=Z):typeof define===o&&define.amd?define(function(){return Z}):typeof t!==s&&(t.UAParser=Z);var Ae=typeof t!==s&&(t.jQuery||t.Zepto);if(Ae&&!Ae.ua){var rt=new Z;Ae.ua=rt.getResult(),Ae.ua.get=function(){return rt.getUA()},Ae.ua.set=function(S){rt.setUA(S);var O=rt.getResult();for(var I in O)Ae.ua[I]=O[I]}}})(typeof window=="object"?window:Qe)});var oe=(t,e)=>{Vt(t);let r=t.querySelector("aside");r.dataset.view=e,r.classList.remove("section-ready"),setTimeout(()=>{r.classList.add("section-ready")},200)},Ar=t=>{Array.from(t.querySelectorAll(".back-button")).forEach(e=>{e.addEventListener("click",r=>{Vt(t),r.preventDefault(),r.stopPropagation();let n=r.target;oe(t,n?.dataset.back||"nav-home")})})},Bt=(t,e)=>{Vt(t);let r=t.querySelector("aside"),n=document.createElement("div");n.className="ui-toast",n.innerHTML=e,r.appendChild(n),setTimeout(()=>{n.classList.add("ui-toast-show"),setTimeout(()=>{n.classList.remove("ui-toast-show"),setTimeout(()=>{n.remove()},500)},4e3)},30)},Vt=t=>{let e=t.querySelector("aside");Array.from(e.querySelectorAll(".ui-toast")).forEach(n=>{n.classList.remove("ui-toast-show")})},it=()=>{let t=Dr();return localStorage.getItem(t)!=="true"},Ft=t=>{let e=Dr();t?localStorage.removeItem(e):localStorage.setItem(e,"true")},Dr=()=>Ti("disableEdit"),Ti=t=>\`builder.__LOCAL_APP_ID__.\${t}\`,Nr=()=>{let e=document.body.querySelector("[builder-content-id]")?.getAttribute("builder-content-id");return je(e)},je=(t,e)=>{let r="/content";t&&(r+="/"+t+"/edit");let n=new URL(r,"https://builder.io");t&&e&&n.searchParams.set("selectedBlock",e);let i=new URL(location.pathname,location.href);return n.searchParams.set("overridePreviewUrl",i.href),n.href},ot="__DEV_TOOLS_URL__",G={components:[],registryPath:"",registryDisplayPath:"",frameworks:[],dependencies:[],publicApiKey:void 0,devToolsVersion:""},le=t=>{G.components=t.components,G.registryPath=t.registryPath,G.registryDisplayPath=t.registryDisplayPath,G.dependencies=t.dependencies,G.publicApiKey=t.publicApiKey};function Ur(t){let e=null,r=document.querySelector("builder-dev-tools-menu"),n=()=>{t.hide()},i=u=>{let d=u.target;if(!d){n();return}if(d.closest("builder-dev-tools-edit"))return;let p=d.closest("[builder-content-id]"),a=d.closest("[builder-id]");if(!p||!a){t.hide();return}let c=t.show(p,a);!c||c===e||(r.highlightOpener(),e=c)};document.addEventListener("pointerover",i,{passive:!0}),document.addEventListener("pointerleave",n,{passive:!0}),document.addEventListener("pointercancel",n,{passive:!0}),document.addEventListener("visibilitychange",n,{passive:!0}),window.addEventListener("popstate",n,{passive:!0});let o=history.pushState;history.pushState=function(...u){t.hide(),o.apply(this,u)};let s=history.replaceState;history.replaceState=function(...u){t.hide(),s.apply(this,u)}}var st=class extends HTMLElement{openInBuilder=null;block=null;constructor(){super()}connectedCallback(){this.setAttribute("aria-hidden","true");let e=this.attachShadow({mode:"open"});e.innerHTML='<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}:host{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}#content-highlight,#block{position:absolute}#content-highlight{border:3px solid var(--primary-color);background-color:var(--primary-color-alpha)}a{position:absolute;top:-33px;left:0;display:block;padding:5px 10px 8px;pointer-events:auto;z-index:100;text-decoration:none}a:hover{text-decoration:none}a span{display:block;padding:3px 6px;font-size:10px;font-weight:300;border-radius:3px;text-align:center;text-decoration:none;pointer-events:none;background-color:var(--edit-color);color:var(--text-color);white-space:nowrap}a:hover span{background-color:var(--edit-color-highlight)}a:hover~.outline{border-color:var(--edit-color-highlight)}#open-in-editor{display:none}.outline{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid var(--edit-color);background-color:var(--edit-color-alpha)}</style><div id="block"> <a id="open-in-builder" target="builder"><span>Open In Builder</span></a> <a id="open-in-editor" href="#open-in-editor"><span>Open In Editor</span></a> <div class="outline"></div> </div>',this.openInBuilder=e.getElementById("open-in-builder"),this.block=e.getElementById("block"),Ur(this)}show(e,r){if(!it())return this.hide(),null;let n=e.getAttribute("builder-content-id"),i=r.getAttribute("builder-id");if(!n||!i)return this.hide(),null;let o=this.block,s=this.openInBuilder,u=r.getBoundingClientRect();o.style.top=u.top+window.scrollY-1+"px",o.style.left=u.left+window.scrollX+"px",o.style.width=u.width+"px",o.style.height=u.height+1+"px";let d=s.getBoundingClientRect();if(d.width>u.width){let p=d.width-u.width;s.style.left=p/2*-1+"px"}else s.style.left="";return s.href=je(n,i),this.style.display="block",i}hide(){this.style.display=""}};var Mr="preview-url";var Br="_b-uid";var Vr="/~builder-connect";var Fr="/~builder-dev-tools";var Hr="https://cdn.builder.io/api/v1/proxy-api?url=https://api2.amplitude.com/2/httpapi";var qr=()=>se({type:"validateBuilder"}),De=t=>se({type:"launchEditor",data:t}),jr=t=>se({type:"getRegistry",data:t}),Gr=t=>se({type:"loadComponent",data:t}),Kr=t=>se({type:"registerComponent",data:t}),Wr=t=>se({type:"setComponentInfo",data:t}),at=t=>se({type:"setComponentInput",data:t}),$r=t=>se({type:"unregisterComponent",data:t}),Yr=t=>se({type:"enableDevTools",data:{enabled:t}}),zr=()=>se({type:"localConfig"}),se=async t=>{let e=new URL(Fr,ot),r;try{r=await fetch(e,{method:"POST",body:JSON.stringify(t)})}catch(i){throw console.error(\`Devtools Fetch Error, \${e.href}\`,i),new Error("Builder Devtools Fetch Error")}if((r.headers.get("content-type")||"").includes("application/json")){let i=await r.json();if(r.ok)return i.data;if(Array.isArray(i.errors)&&i.errors.length>0)throw i.errors.forEach(o=>console.error(o)),new Error(\`Builder Devtools Fetch Error: \${i.errors[0]}\`)}throw new Error(\`Builder Devtools Fetch Error: \${r.status}, \${await r.text()}\`)};var Qr=[{value:"boolean",text:"boolean"},{value:"color",text:"color (provides a color in hex or rgb)"},{value:"date",text:"date (same format as the Date constructor)"},{value:"email",text:"email"},{value:"file",text:"file (uploads a file and provides a url)"},{value:"list",text:"list (collection of items)"},{value:"longText",text:"longText (multiline text editor)"},{value:"number",text:"number"},{value:"object",text:"object (set of specific names and values)"},{value:"richText",text:"richText (provides value as html)"},{value:"string",text:"string"}],ut=["color","date","email","file","longText","richText","string"],ct=["number"],lt=["boolean"],dt=["list"],pt=["object"];function ft(t){return ut.includes(t)?"string":ct.includes(t)?"number":lt.includes(t)?"boolean":dt.includes(t)?"array":pt.includes(t)?"object":"string"}var Io=new Set(["about","accessKey","accessKeyLabel","asChild","autoCapitalize","autoCorrect","autoFocus","autoSave","blur","contentEditable","contextMenu","dangerouslySetInnerHTML","datatype","defaultChecked","defaultValue","dir","draggable","enterKeyHint","focus","form","formAction","formEncType","formMethod","formNoValidate","formTarget","inlist","innerText","inputMode","is","isContentEditable","itemID","itemProp","itemRef","itemScope","itemType","lang","nonce","offsetHeight","offsetLeft","offsetTop","offsetWidth","outerText","prefix","property","radioGroup","rel","resource","results","rev","role","security","slot","spellCheck","suppressContentEditableWarning","suppressHydrationWarning","tabIndex","translate","typeof","unselectable","vocab"].map(t=>t.toLowerCase()));var Ht=function(t,e){return Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ht(t,e)};function ae(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ht(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var E=function(){return E=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},E.apply(this,arguments)};function Ge(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function g(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(a){try{p(n.next(a))}catch(c){s(c)}}function d(a){try{p(n.throw(a))}catch(c){s(c)}}function p(a){a.done?o(a.value):i(a.value).then(u,d)}p((n=n.apply(t,e||[])).next())})}function h(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(p){return function(a){return d([p,a])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,p[0]&&(r=0)),r;)try{if(n=1,i&&(o=p[0]&2?i.return:p[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,p[1])).done)return o;switch(i=0,o&&(p=[p[0]&2,o.value]),p[0]){case 0:case 1:o=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]<o[3])){r.label=p[1];break}if(p[0]===6&&r.label<o[1]){r.label=o[1],o=p;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(p);break}o[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(a){p=[6,a],i=0}finally{n=o=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}function J(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function ee(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}var mt={};bi(mt,{IdentifyOperation:()=>B,LogLevel:()=>Y,PluginType:()=>N,RevenueProperty:()=>re,ServerZone:()=>Se,SpecialEventType:()=>de,Status:()=>M,TransportType:()=>Ie});var B;(function(t){t.SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll"})(B||(B={}));var re;(function(t){t.REVENUE_PRODUCT_ID="$productId",t.REVENUE_QUANTITY="$quantity",t.REVENUE_PRICE="$price",t.REVENUE_TYPE="$revenueType",t.REVENUE_CURRENCY="$currency",t.REVENUE="$revenue"})(re||(re={}));var de;(function(t){t.IDENTIFY="$identify",t.GROUP_IDENTIFY="$groupidentify",t.REVENUE="revenue_amount"})(de||(de={}));var Y;(function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})(Y||(Y={}));var N;(function(t){t.BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})(N||(N={}));var Se;(function(t){t.US="US",t.EU="EU",t.STAGING="STAGING"})(Se||(Se={}));var M;(function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})(M||(M={}));var Ie;(function(t){t.XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})(Ie||(Ie={}));var qt="-",xe="AMP",jt="".concat(xe,"_unsent"),Gt="https://api2.amplitude.com/2/httpapi",Xr="https://api.eu.amplitude.com/2/httpapi",Zr="https://api2.amplitude.com/batch",Jr="https://api.eu.amplitude.com/batch";var wi=1e3,vt=function(t){if(Object.keys(t).length>wi)return!1;for(var e in t){var r=t[e];if(!Kt(e,r))return!1}return!0},Kt=function(t,e){var r,n;if(typeof t!="string")return!1;if(Array.isArray(e)){var i=!0;try{for(var o=J(e),s=o.next();!s.done;s=o.next()){var u=s.value;if(Array.isArray(u))return!1;if(typeof u=="object")i=i&&vt(u);else if(!["number","string"].includes(typeof u))return!1;if(!i)return!1}}catch(d){r={error:d}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else{if(e==null)return!1;if(typeof e=="object")return vt(e);if(!["number","string","boolean"].includes(typeof e))return!1}return!0};var ne=(function(){function t(){this._propertySet=new Set,this._properties={}}return t.prototype.getUserProperties=function(){return E({},this._properties)},t.prototype.set=function(e,r){return this._safeSet(B.SET,e,r),this},t.prototype.setOnce=function(e,r){return this._safeSet(B.SET_ONCE,e,r),this},t.prototype.append=function(e,r){return this._safeSet(B.APPEND,e,r),this},t.prototype.prepend=function(e,r){return this._safeSet(B.PREPEND,e,r),this},t.prototype.postInsert=function(e,r){return this._safeSet(B.POSTINSERT,e,r),this},t.prototype.preInsert=function(e,r){return this._safeSet(B.PREINSERT,e,r),this},t.prototype.remove=function(e,r){return this._safeSet(B.REMOVE,e,r),this},t.prototype.add=function(e,r){return this._safeSet(B.ADD,e,r),this},t.prototype.unset=function(e){return this._safeSet(B.UNSET,e,qt),this},t.prototype.clearAll=function(){return this._properties={},this._properties[B.CLEAR_ALL]=qt,this},t.prototype._safeSet=function(e,r,n){if(this._validate(e,r,n)){var i=this._properties[e];return i===void 0&&(i={},this._properties[e]=i),i[r]=n,this._propertySet.add(r),!0}return!1},t.prototype._validate=function(e,r,n){return this._properties[B.CLEAR_ALL]!==void 0||this._propertySet.has(r)?!1:e===B.ADD?typeof n=="number":e!==B.UNSET&&e!==B.REMOVE?Kt(r,n):!0},t})();var en=function(t,e,r){var n=typeof t=="string"?{event_type:t}:t;return E(E(E({},n),r),e&&{event_properties:e})},Ke=function(t,e){var r=E(E({},e),{event_type:de.IDENTIFY,user_properties:t.getUserProperties()});return r},tn=function(t,e,r,n){var i,o=E(E({},n),{event_type:de.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:(i={},i[t]=e,i)});return o},rn=function(t,e,r){var n,i=new ne;i.set(t,e);var o=E(E({},r),{event_type:de.IDENTIFY,user_properties:i.getUserProperties(),groups:(n={},n[t]=e,n)});return o},nn=function(t,e){return E(E({},e),{event_type:de.REVENUE,event_properties:t.getEventProperties()})};var ve=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=M.Unknown),{event:t,code:e,message:r}};var on=(function(){function t(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return t.prototype.register=function(e,r){return g(this,void 0,void 0,function(){return h(this,function(n){switch(n.label){case 0:return[4,e.setup(r,this.client)];case 1:return n.sent(),this.plugins.push(e),[2]}})})},t.prototype.deregister=function(e,r){var n;return g(this,void 0,void 0,function(){var i,o;return h(this,function(s){switch(s.label){case 0:return i=this.plugins.findIndex(function(u){return u.name===e}),i===-1?(r.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(o=this.plugins[i],this.plugins.splice(i,1),[4,(n=o.teardown)===null||n===void 0?void 0:n.call(o)]);case 1:return s.sent(),[2]}})})},t.prototype.reset=function(e){this.applying=!1;var r=this.plugins;r.map(function(n){var i;return(i=n.teardown)===null||i===void 0?void 0:i.call(n)}),this.plugins=[],this.client=e},t.prototype.push=function(e){var r=this;return new Promise(function(n){r.queue.push([e,n]),r.scheduleApply(0)})},t.prototype.scheduleApply=function(e){var r=this;this.applying||(this.applying=!0,setTimeout(function(){r.apply(r.queue.shift()).then(function(){r.applying=!1,r.queue.length>0&&r.scheduleApply(0)})},e))},t.prototype.apply=function(e){return g(this,void 0,void 0,function(){var r,n,i,o,s,u,d,f,m,p,a,c,l,f,m,_,b,v,y,T,L,k;return h(this,function(w){switch(w.label){case 0:if(!e)return[2];r=A(e,1),n=r[0],i=A(e,2),o=i[1],s=this.plugins.filter(function(C){return C.type===N.BEFORE}),w.label=1;case 1:w.trys.push([1,6,7,8]),u=J(s),d=u.next(),w.label=2;case 2:return d.done?[3,5]:(f=d.value,[4,f.execute(E({},n))]);case 3:if(m=w.sent(),m===null)return o({event:n,code:0,message:""}),[2];n=m,w.label=4;case 4:return d=u.next(),[3,2];case 5:return[3,8];case 6:return p=w.sent(),y={error:p},[3,8];case 7:try{d&&!d.done&&(T=u.return)&&T.call(u)}finally{if(y)throw y.error}return[7];case 8:a=this.plugins.filter(function(C){return C.type===N.ENRICHMENT}),w.label=9;case 9:w.trys.push([9,14,15,16]),c=J(a),l=c.next(),w.label=10;case 10:return l.done?[3,13]:(f=l.value,[4,f.execute(E({},n))]);case 11:if(m=w.sent(),m===null)return o({event:n,code:0,message:""}),[2];n=m,w.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return _=w.sent(),L={error:_},[3,16];case 15:try{l&&!l.done&&(k=c.return)&&k.call(c)}finally{if(L)throw L.error}return[7];case 16:return b=this.plugins.filter(function(C){return C.type===N.DESTINATION}),v=b.map(function(C){var R=E({},n);return C.execute(R).catch(function(K){return ve(R,0,String(K))})}),Promise.all(v).then(function(C){var R=A(C,1),K=R[0];o(K)}),[2]}})})},t.prototype.flush=function(){return g(this,void 0,void 0,function(){var e,r,n,i=this;return h(this,function(o){switch(o.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(s){return i.apply(s)}))];case 1:return o.sent(),r=this.plugins.filter(function(s){return s.type===N.DESTINATION}),n=r.map(function(s){return s.flush&&s.flush()}),[4,Promise.all(n)];case 2:return o.sent(),[2]}})})},t})();var sn="Event tracked successfully",an="Unexpected error occurred",un="Event rejected due to exceeded retry count",cn="Event skipped due to optOut config",ln="Event rejected due to missing API key",dn="Invalid API key",pn="Client not initialized";var X=function(t){return{promise:t||Promise.resolve()}};var Wt=(function(){function t(e){e===void 0&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new on(this),this.name=e}return t.prototype._init=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){switch(r.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return r.sent(),[2]}})})},t.prototype.runQueuedFunctions=function(e){return g(this,void 0,void 0,function(){var r,n,i,o,s,u,d;return h(this,function(p){switch(p.label){case 0:r=this[e],this[e]=[],p.label=1;case 1:p.trys.push([1,6,7,8]),n=J(r),i=n.next(),p.label=2;case 2:return i.done?[3,5]:(o=i.value,[4,o()]);case 3:p.sent(),p.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return s=p.sent(),u={error:s},[3,8];case 7:try{i&&!i.done&&(d=n.return)&&d.call(n)}finally{if(u)throw u.error}return[7];case 8:return[2]}})})},t.prototype.track=function(e,r,n){var i=en(e,r,n);return X(this.dispatch(i))},t.prototype.identify=function(e,r){var n=Ke(e,r);return X(this.dispatch(n))},t.prototype.groupIdentify=function(e,r,n,i){var o=tn(e,r,n,i);return X(this.dispatch(o))},t.prototype.setGroup=function(e,r,n){var i=rn(e,r,n);return X(this.dispatch(i))},t.prototype.revenue=function(e,r){var n=nn(e,r);return X(this.dispatch(n))},t.prototype.add=function(e){return this.config?X(this.timeline.register(e,this.config)):(this.q.push(this.add.bind(this,e)),X())},t.prototype.remove=function(e){return this.config?X(this.timeline.deregister(e,this.config)):(this.q.push(this.remove.bind(this,e)),X())},t.prototype.dispatchWithCallback=function(e,r){if(!this.config)return r(ve(e,0,pn));this.process(e).then(r)},t.prototype.dispatch=function(e){return g(this,void 0,void 0,function(){var r=this;return h(this,function(n){return this.config?[2,this.process(e)]:[2,new Promise(function(i){r.dispatchQ.push(r.dispatchWithCallback.bind(r,e,i))})]})})},t.prototype.process=function(e){return g(this,void 0,void 0,function(){var i,r,n,i;return h(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,ve(e,0,cn)]:[4,this.timeline.push(e)];case 1:return i=o.sent(),i.code===200?this.config.loggerProvider.log(i.message):this.config.loggerProvider.error(i.message),[2,i];case 2:return r=o.sent(),this.config.loggerProvider.error(r),n=String(r),i=ve(e,0,n),[2,i];case 3:return[2]}})})},t.prototype.setOptOut=function(e){if(!this.config){this.q.push(this.setOptOut.bind(this,!!e));return}this.config.optOut=!!e},t.prototype.flush=function(){return X(this.timeline.flush())},t})();var gt=(function(){function t(){this.productId="",this.quantity=1,this.price=0}return t.prototype.setProductId=function(e){return this.productId=e,this},t.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},t.prototype.setPrice=function(e){return this.price=e,this},t.prototype.setRevenueType=function(e){return this.revenueType=e,this},t.prototype.setCurrency=function(e){return this.currency=e,this},t.prototype.setRevenue=function(e){return this.revenue=e,this},t.prototype.setEventProperties=function(e){return vt(e)&&(this.properties=e),this},t.prototype.getEventProperties=function(){var e=this.properties?E({},this.properties):{};return e[re.REVENUE_PRODUCT_ID]=this.productId,e[re.REVENUE_QUANTITY]=this.quantity,e[re.REVENUE_PRICE]=this.price,e[re.REVENUE_TYPE]=this.revenueType,e[re.REVENUE_CURRENCY]=this.currency,e[re.REVENUE]=this.revenue,e},t})();var fn=function(t,e){var r=Math.max(e,1);return t.reduce(function(n,i,o){var s=Math.floor(o/r);return n[s]||(n[s]=[]),n[s].push(i),n},[])};var ht="Amplitude Logger ",mn=(function(){function t(){this.logLevel=Y.None}return t.prototype.disable=function(){this.logLevel=Y.None},t.prototype.enable=function(e){e===void 0&&(e=Y.Warn),this.logLevel=e},t.prototype.log=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Verbose||console.log("".concat(ht,"[Log]: ").concat(e.join(" ")))},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Warn||console.warn("".concat(ht,"[Warn]: ").concat(e.join(" ")))},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Error||console.error("".concat(ht,"[Error]: ").concat(e.join(" ")))},t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Debug||console.log("".concat(ht,"[Debug]: ").concat(e.join(" ")))},t})();var yt=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:Y.Warn,loggerProvider:new mn,optOut:!1,serverUrl:Gt,serverZone:Se.US,useBatch:!1}},$t=(function(){function t(e){var r,n,i,o;this._optOut=!1;var s=yt();this.apiKey=e.apiKey,this.flushIntervalMillis=(r=e.flushIntervalMillis)!==null&&r!==void 0?r:s.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||s.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||s.flushQueueSize,this.instanceName=e.instanceName||s.instanceName,this.loggerProvider=e.loggerProvider||s.loggerProvider,this.logLevel=(n=e.logLevel)!==null&&n!==void 0?n:s.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=(i=e.optOut)!==null&&i!==void 0?i:s.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||s.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=(o=e.useBatch)!==null&&o!==void 0?o:s.useBatch,this.loggerProvider.enable(this.logLevel);var u=Yt(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=u.serverZone,this.serverUrl=u.serverUrl}return Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t})();var Si=function(t,e){return t===Se.EU?e?Jr:Xr:e?Zr:Gt},Yt=function(t,e,r){if(t===void 0&&(t=""),e===void 0&&(e=yt().serverZone),r===void 0&&(r=yt().useBatch),t)return{serverUrl:t,serverZone:void 0};var n=["US","EU"].includes(e)?e:yt().serverZone;return{serverZone:n,serverUrl:Si(n,r)}};function Ii(t){return t instanceof Error?t.message:String(t)}function bt(t){var e="";try{"body"in t&&(e=JSON.stringify(t.body))}catch{}return e}var zt=(function(){function t(){this.name="amplitude",this.type=N.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return t.prototype.setup=function(e){var r;return g(this,void 0,void 0,function(){var n,i=this;return h(this,function(o){switch(o.label){case 0:return this.config=e,this.storageKey="".concat(jt,"_").concat(this.config.apiKey.substring(0,10)),[4,(r=this.config.storageProvider)===null||r===void 0?void 0:r.get(this.storageKey)];case 1:return n=o.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map(function(s){return i.execute(s)})).catch(),[2,Promise.resolve(void 0)]}})})},t.prototype.execute=function(e){var r=this;return new Promise(function(n){var i={event:e,attempts:0,callback:function(o){return n(o)},timeout:0};r.addToQueue(i)})},t.prototype.addToQueue=function(){for(var e=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=r.filter(function(o){return o.attempts<e.config.flushMaxRetries?(o.attempts+=1,!0):(e.fulfillRequest([o],500,un),!1)});i.forEach(function(o){if(e.queue=e.queue.concat(o),o.timeout===0){e.schedule(e.config.flushIntervalMillis);return}setTimeout(function(){o.timeout=0,e.schedule(0)},o.timeout)}),this.saveEvents()},t.prototype.schedule=function(e){var r=this;this.scheduled||(this.scheduled=setTimeout(function(){r.flush(!0).then(function(){r.queue.length>0&&r.schedule(e)})},e))},t.prototype.flush=function(e){return e===void 0&&(e=!1),g(this,void 0,void 0,function(){var r,n,i,o=this;return h(this,function(s){switch(s.label){case 0:return r=[],n=[],this.queue.forEach(function(u){return u.timeout===0?r.push(u):n.push(u)}),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=fn(r,this.config.flushQueueSize),[4,Promise.all(i.map(function(u){return o.send(u,e)}))];case 1:return s.sent(),[2]}})})},t.prototype.send=function(e,r){return r===void 0&&(r=!0),g(this,void 0,void 0,function(){var n,i,o,s,u;return h(this,function(d){switch(d.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,ln)];n={api_key:this.config.apiKey,events:e.map(function(p){var a=p.event,c=a.extra,l=Ge(a,["extra"]);return l}),options:{min_id_length:this.config.minIdLength}},d.label=1;case 1:return d.trys.push([1,3,,4]),i=Yt(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,n)];case 2:return o=d.sent(),o===null?(this.fulfillRequest(e,0,an),[2]):r?(this.handleResponse(o,e),[3,4]):("body"in o?this.fulfillRequest(e,o.statusCode,"".concat(o.status,": ").concat(bt(o))):this.fulfillRequest(e,o.statusCode,o.status),[2]);case 3:return s=d.sent(),this.config.loggerProvider.error(s),u=Ii(s),this.fulfillRequest(e,0,u),[3,4];case 4:return[2]}})})},t.prototype.handleResponse=function(e,r){var n=e.status;switch(n){case M.Success:{this.handleSuccessResponse(e,r);break}case M.Invalid:{this.handleInvalidResponse(e,r);break}case M.PayloadTooLarge:{this.handlePayloadTooLargeResponse(e,r);break}case M.RateLimit:{this.handleRateLimitResponse(e,r);break}default:{this.config.loggerProvider.warn(\`{code: 0, error: "Status '\`.concat(n,"' provided for ").concat(r.length,' events"}')),this.handleOtherResponse(r);break}}},t.prototype.handleSuccessResponse=function(e,r){this.fulfillRequest(r,e.statusCode,sn)},t.prototype.handleInvalidResponse=function(e,r){var n=this;if(e.body.missingField||e.body.error.startsWith(dn)){this.fulfillRequest(r,e.statusCode,e.body.error);return}var i=ee(ee(ee(ee([],A(Object.values(e.body.eventsWithInvalidFields)),!1),A(Object.values(e.body.eventsWithMissingFields)),!1),A(Object.values(e.body.eventsWithInvalidIdLengths)),!1),A(e.body.silencedEvents),!1).flat(),o=new Set(i),s=r.filter(function(u,d){if(o.has(d)){n.fulfillRequest([u],e.statusCode,e.body.error);return}return!0});s.length>0&&this.config.loggerProvider.warn(bt(e)),this.addToQueue.apply(this,ee([],A(s),!1))},t.prototype.handlePayloadTooLargeResponse=function(e,r){if(r.length===1){this.fulfillRequest(r,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(bt(e)),this.config.flushQueueSize/=2,this.addToQueue.apply(this,ee([],A(r),!1))},t.prototype.handleRateLimitResponse=function(e,r){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),s=e.body.throttledEvents,u=new Set(i),d=new Set(o),p=new Set(s),a=r.filter(function(c,l){if(c.event.user_id&&u.has(c.event.user_id)||c.event.device_id&&d.has(c.event.device_id)){n.fulfillRequest([c],e.statusCode,e.body.error);return}return p.has(l)&&(c.timeout=n.throttleTimeout),!0});a.length>0&&this.config.loggerProvider.warn(bt(e)),this.addToQueue.apply(this,ee([],A(a),!1))},t.prototype.handleOtherResponse=function(e){var r=this;this.addToQueue.apply(this,ee([],A(e.map(function(n){return n.timeout=n.attempts*r.retryTimeout,n})),!1))},t.prototype.fulfillRequest=function(e,r,n){this.saveEvents(),e.forEach(function(i){return i.callback(ve(i.event,r,n))})},t.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map(function(r){return r.event}));this.config.storageProvider.set(this.storageKey,e)}},t})();var xi=function(t){t===void 0&&(t=0);var e=new Error().stack||"";return e.split(\`
1245
1245
  \`).slice(2+t).map(function(r){return r.trim()})},V=function(t){return function(){var e=E({},t.config),r=e.loggerProvider,n=e.logLevel;return{logger:r,logLevel:n}}},Li=function(t,e){var r,n;e=e.replace(/\\[(\\w+)\\]/g,".$1"),e=e.replace(/^\\./,"");try{for(var i=J(e.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(s in t)t=t[s];else return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return t},F=function(t,e){return function(){var r,n,i={};try{for(var o=J(e),s=o.next();!s.done;s=o.next()){var u=s.value;i[u]=Li(t,u)}}catch(d){r={error:d}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}},H=function(t,e,r,n,i){return i===void 0&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var u=r(),d=u.logger,p=u.logLevel;if(p&&p<Y.Debug||!p||!d)return t.apply(i,o);var a={type:"invoke public method",name:e,args:o,stacktrace:xi(1),time:{start:new Date().toISOString()},states:{}};n&&a.states&&(a.states.before=n());var c=t.apply(i,o);return c&&c.promise?c.promise.then(function(){n&&a.states&&(a.states.after=n()),a.time&&(a.time.end=new Date().toISOString()),d.debug(JSON.stringify(a,null,2))}):(n&&a.states&&(a.states.after=n()),a.time&&(a.time.end=new Date().toISOString()),d.debug(JSON.stringify(a,null,2))),c}};var ge=function(t){return t?(t^Math.random()*16>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,ge)};var Et=(function(){function t(){this.memoryStorage=new Map}return t.prototype.isEnabled=function(){return g(this,void 0,void 0,function(){return h(this,function(e){return[2,!0]})})},t.prototype.get=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){return[2,this.memoryStorage.get(e)]})})},t.prototype.getRaw=function(e){return g(this,void 0,void 0,function(){var r;return h(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return r=n.sent(),[2,r?JSON.stringify(r):void 0]}})})},t.prototype.set=function(e,r){return g(this,void 0,void 0,function(){return h(this,function(n){return this.memoryStorage.set(e,r),[2]})})},t.prototype.remove=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){return this.memoryStorage.delete(e),[2]})})},t.prototype.reset=function(){return g(this,void 0,void 0,function(){return h(this,function(e){return this.memoryStorage.clear(),[2]})})},t})();var Le=(function(){function t(){}return t.prototype.send=function(e,r){return Promise.resolve(null)},t.prototype.buildResponse=function(e){var r,n,i,o,s,u,d,p,a,c,l,f,m,_,b,v,y,T,L,k,w,C;if(typeof e!="object")return null;var R=e.code||0,K=this.buildStatus(R);switch(K){case M.Success:return{status:K,statusCode:R,body:{eventsIngested:(r=e.events_ingested)!==null&&r!==void 0?r:0,payloadSizeBytes:(n=e.payload_size_bytes)!==null&&n!==void 0?n:0,serverUploadTime:(i=e.server_upload_time)!==null&&i!==void 0?i:0}};case M.Invalid:return{status:K,statusCode:R,body:{error:(o=e.error)!==null&&o!==void 0?o:"",missingField:(s=e.missing_field)!==null&&s!==void 0?s:"",eventsWithInvalidFields:(u=e.events_with_invalid_fields)!==null&&u!==void 0?u:{},eventsWithMissingFields:(d=e.events_with_missing_fields)!==null&&d!==void 0?d:{},eventsWithInvalidIdLengths:(p=e.events_with_invalid_id_lengths)!==null&&p!==void 0?p:{},epsThreshold:(a=e.eps_threshold)!==null&&a!==void 0?a:0,exceededDailyQuotaDevices:(c=e.exceeded_daily_quota_devices)!==null&&c!==void 0?c:{},silencedDevices:(l=e.silenced_devices)!==null&&l!==void 0?l:[],silencedEvents:(f=e.silenced_events)!==null&&f!==void 0?f:[],throttledDevices:(m=e.throttled_devices)!==null&&m!==void 0?m:{},throttledEvents:(_=e.throttled_events)!==null&&_!==void 0?_:[]}};case M.PayloadTooLarge:return{status:K,statusCode:R,body:{error:(b=e.error)!==null&&b!==void 0?b:""}};case M.RateLimit:return{status:K,statusCode:R,body:{error:(v=e.error)!==null&&v!==void 0?v:"",epsThreshold:(y=e.eps_threshold)!==null&&y!==void 0?y:0,throttledDevices:(T=e.throttled_devices)!==null&&T!==void 0?T:{},throttledUsers:(L=e.throttled_users)!==null&&L!==void 0?L:{},exceededDailyQuotaDevices:(k=e.exceeded_daily_quota_devices)!==null&&k!==void 0?k:{},exceededDailyQuotaUsers:(w=e.exceeded_daily_quota_users)!==null&&w!==void 0?w:{},throttledEvents:(C=e.throttled_events)!==null&&C!==void 0?C:[]}};case M.Timeout:default:return{status:K,statusCode:R}}},t.prototype.buildStatus=function(e){return e>=200&&e<300?M.Success:e===429?M.RateLimit:e===413?M.PayloadTooLarge:e===408?M.Timeout:e>=400&&e<500?M.Invalid:e>=500?M.Failed:M.Unknown},t})();var Pi=(function(){function t(){}return t.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:Ci(),platform:"Web",os:void 0,deviceModel:void 0}},t})(),Ci=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},Ri=(function(){function t(){this.queue=[]}return t.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},t.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(r){e(r)}),this.queue=[])},t})(),he=function(){return he=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},he.apply(this,arguments)};function _t(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function vn(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}var Tt=function(t,e){var r,n,i=["string","number","boolean","undefined"],o=typeof t,s=typeof e;if(o!==s)return!1;try{for(var u=_t(i),d=u.next();!d.done;d=u.next()){var p=d.value;if(p===o)return t===e}}catch(b){r={error:b}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(t==null&&e==null)return!0;if(t==null||e==null||t.length!==e.length)return!1;var a=Array.isArray(t),c=Array.isArray(e);if(a!==c)return!1;if(a&&c){for(var l=0;l<t.length;l++)if(!Tt(t[l],e[l]))return!1}else{var f=Object.keys(t).sort(),m=Object.keys(e).sort();if(!Tt(f,m))return!1;var _=!0;return Object.keys(t).forEach(function(b){Tt(t[b],e[b])||(_=!1)}),_}return!0},Oi="$set",ki="$unset",Ai="$clearAll";Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),r=e.length,n=new Array(r);r--;)n[r]=[e[r],t[e[r]]];return n});var Di=(function(){function t(){this.identity={userProperties:{}},this.listeners=new Set}return t.prototype.editIdentity=function(){var e=this,r=he({},this.identity.userProperties),n=he(he({},this.identity),{userProperties:r});return{setUserId:function(i){return n.userId=i,this},setDeviceId:function(i){return n.deviceId=i,this},setUserProperties:function(i){return n.userProperties=i,this},setOptOut:function(i){return n.optOut=i,this},updateUserProperties:function(i){var o,s,u,d,p,a,c=n.userProperties||{};try{for(var l=_t(Object.entries(i)),f=l.next();!f.done;f=l.next()){var m=vn(f.value,2),_=m[0],b=m[1];switch(_){case Oi:try{for(var v=(u=void 0,_t(Object.entries(b))),y=v.next();!y.done;y=v.next()){var T=vn(y.value,2),L=T[0],k=T[1];c[L]=k}}catch(R){u={error:R}}finally{try{y&&!y.done&&(d=v.return)&&d.call(v)}finally{if(u)throw u.error}}break;case ki:try{for(var w=(p=void 0,_t(Object.keys(b))),C=w.next();!C.done;C=w.next()){var L=C.value;delete c[L]}}catch(R){p={error:R}}finally{try{C&&!C.done&&(a=w.return)&&a.call(w)}finally{if(p)throw p.error}}break;case Ai:c={};break}}}catch(R){o={error:R}}finally{try{f&&!f.done&&(s=l.return)&&s.call(l)}finally{if(o)throw o.error}}return n.userProperties=c,this},commit:function(){return e.setIdentity(n),this}}},t.prototype.getIdentity=function(){return he({},this.identity)},t.prototype.setIdentity=function(e){var r=he({},this.identity);this.identity=he({},e),Tt(r,this.identity)||this.listeners.forEach(function(n){n(e)})},t.prototype.addIdentityListener=function(e){this.listeners.add(e)},t.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},t})(),We=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,gn=(function(){function t(){this.identityStore=new Di,this.eventBridge=new Ri,this.applicationContextProvider=new Pi}return t.getInstance=function(e){return We.analyticsConnectorInstances||(We.analyticsConnectorInstances={}),We.analyticsConnectorInstances[e]||(We.analyticsConnectorInstances[e]=new t),We.analyticsConnectorInstances[e]},t})();var pe=function(t){return t===void 0&&(t="$default_instance"),gn.getInstance(t)},Qt=function(t,e){pe(e).identityStore.editIdentity().setUserId(t).commit()},Xt=function(t,e){pe(e).identityStore.editIdentity().setDeviceId(t).commit()},Zt=function(t,e){pe(e).identityStore.editIdentity().setOptOut(t).commit()};var $=function(){if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global};var Ne=function(){var t,e=$();if(!(!((t=e?.location)===null||t===void 0)&&t.search))return{};var r=e.location.search.substring(1).split("&").filter(Boolean),n=r.reduce(function(i,o){var s=o.split("=",2),u=hn(s[0]),d=hn(s[1]);return d&&(i[u]=d),i},{});return n},hn=function(t){t===void 0&&(t="");try{return decodeURIComponent(t)}catch{return""}};var yn="utm_campaign",bn="utm_content",En="utm_id",_n="utm_medium",Tn="utm_source",wn="utm_term",Jt="dclid",er="fbclid",tr="gbraid",rr="gclid",nr="ko_click_id",ir="li_fat_id",or="msclkid",sr="rtd_cid",ar="ttclid",ur="twclid",cr="wbraid";var Pe={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0};var $e=(function(){function t(){}return t.prototype.parse=function(){return g(this,void 0,void 0,function(){return h(this,function(e){return[2,E(E(E(E({},Pe),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},t.prototype.getUtmParam=function(){var e=Ne(),r=e[yn],n=e[bn],i=e[En],o=e[_n],s=e[Tn],u=e[wn];return{utm_campaign:r,utm_content:n,utm_id:i,utm_medium:o,utm_source:s,utm_term:u}},t.prototype.getReferrer=function(){var e,r,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=(r=(e=n.referrer)===null||e===void 0?void 0:e.split("/")[2])!==null&&r!==void 0?r:void 0}catch{}return n},t.prototype.getClickIds=function(){var e,r=Ne();return e={},e[Jt]=r[Jt],e[er]=r[er],e[tr]=r[tr],e[rr]=r[rr],e[nr]=r[nr],e[ir]=r[ir],e[or]=r[or],e[sr]=r[sr],e[ar]=r[ar],e[ur]=r[ur],e[cr]=r[cr],e},t})();var Ye=function(t,e,r){return e===void 0&&(e=""),r===void 0&&(r=10),[xe,e,t.substring(0,r)].filter(Boolean).join("_")},lr=function(t){return"".concat(xe.toLowerCase(),"_").concat(t.substring(0,6))};var dr=function(t){return typeof t=="boolean"?t:!!t?.fileDownloads},pr=function(t){return typeof t=="boolean"?t:!!t?.formInteractions},Sn=function(t){return typeof t=="boolean"?t:!!(t?.pageViews===!0||t?.pageViews&&typeof t.pageViews=="object")},fr=function(t){return typeof t=="boolean"?t:!!t?.sessions},mr=function(t){var e,r=!((e=t.attribution)===null||e===void 0)&&e.trackPageViews?"attribution":function(){return!1},n=void 0,i="Page View",o=Sn(t.defaultTracking);return o&&(r=void 0,i=void 0,t.defaultTracking&&typeof t.defaultTracking=="object"&&t.defaultTracking.pageViews&&typeof t.defaultTracking.pageViews=="object"&&("trackOn"in t.defaultTracking.pageViews&&(r=t.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in t.defaultTracking.pageViews&&(n=t.defaultTracking.pageViews.trackHistoryChanges),"eventType"in t.defaultTracking.pageViews&&t.defaultTracking.pageViews.eventType&&(i=t.defaultTracking.pageViews.eventType))),{trackOn:r,trackHistoryChanges:n,eventType:i}};var vr=function(){var t,e,r,n;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return(n=(r=(e=(t=navigator.languages)===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:navigator.language)!==null&&r!==void 0?r:i)!==null&&n!==void 0?n:""};var gr=(function(){function t(){this.name="identity",this.type=N.BEFORE,this.identityStore=pe().identityStore}return t.prototype.execute=function(e){return g(this,void 0,void 0,function(){var r;return h(this,function(n){return r=e.user_properties,r&&this.identityStore.editIdentity().updateUserProperties(r).commit(),[2,e]})})},t.prototype.setup=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){return e.instanceName&&(this.identityStore=pe(e.instanceName).identityStore),[2]})})},t})();var ze=(function(){function t(e){this.options=E({},e)}return t.prototype.isEnabled=function(){return g(this,void 0,void 0,function(){var e,r,n,i;return h(this,function(o){switch(o.label){case 0:if(!$())return[2,!1];t.testValue=String(Date.now()),e=new t(this.options),r="AMP_TEST",o.label=1;case 1:return o.trys.push([1,4,5,7]),[4,e.set(r,t.testValue)];case 2:return o.sent(),[4,e.get(r)];case 3:return n=o.sent(),[2,n===t.testValue];case 4:return i=o.sent(),[2,!1];case 5:return[4,e.remove(r)];case 6:return o.sent(),[7];case 7:return[2]}})})},t.prototype.get=function(e){return g(this,void 0,void 0,function(){var r;return h(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(r=n.sent(),!r)return[2,void 0];try{try{r=decodeURIComponent(atob(r))}catch{}return[2,JSON.parse(r)]}catch{return[2,void 0]}return[2]}})})},t.prototype.getRaw=function(e){var r;return g(this,void 0,void 0,function(){var n,i,o;return h(this,function(s){return n=$(),i=(r=n?.document.cookie.split("; "))!==null&&r!==void 0?r:[],o=i.find(function(u){return u.indexOf(e+"=")===0}),o?[2,o.substring(e.length+1)]:[2,void 0]})})},t.prototype.set=function(e,r){var n;return g(this,void 0,void 0,function(){var i,o,s,u,d,p;return h(this,function(a){try{i=(n=this.options.expirationDays)!==null&&n!==void 0?n:0,o=r!==null?i:-1,s=void 0,o&&(u=new Date,u.setTime(u.getTime()+o*24*60*60*1e3),s=u),d="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(r)))),s&&(d+="; expires=".concat(s.toUTCString())),d+="; path=/",this.options.domain&&(d+="; domain=".concat(this.options.domain)),this.options.secure&&(d+="; Secure"),this.options.sameSite&&(d+="; SameSite=".concat(this.options.sameSite)),p=$(),p&&(p.document.cookie=d)}catch{}return[2]})})},t.prototype.remove=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){switch(r.label){case 0:return[4,this.set(e,null)];case 1:return r.sent(),[2]}})})},t.prototype.reset=function(){return g(this,void 0,void 0,function(){return h(this,function(e){return[2]})})},t})();var hr=(function(t){ae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.send=function(r,n){return g(this,void 0,void 0,function(){var i,o,s;return h(this,function(u){switch(u.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return i={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(n),method:"POST"},[4,fetch(r,i)];case 1:return o=u.sent(),[4,o.text()];case 2:s=u.sent();try{return[2,this.buildResponse(JSON.parse(s))]}catch{return[2,this.buildResponse({code:o.status})]}return[2]}})})},e})(Le);var In=function(t){var e={};for(var r in t){var n=t[r];n&&(e[r]=n)}return e};var yr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r,n={},i=$(),o=void 0,s,u=A(t,2),d=u[0],p=u[1];d&&"init"in d?(r=d,p&&(n=p)):d&&(n=d);var a=function(){return g(void 0,void 0,void 0,function(){var b,v,y;return h(this,function(T){switch(T.label){case 0:return v={event_type:(y=n.eventType)!==null&&y!==void 0?y:"Page View"},b=[{}],[4,Ni()];case 1:return[2,(v.event_properties=E.apply(void 0,[E.apply(void 0,b.concat([T.sent()])),{page_domain:typeof location<"u"&&location.hostname||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||"",page_title:typeof document<"u"&&document.title||"",page_url:typeof location<"u"&&location.href.split("?")[0]||""}]),v)]}})})},c=function(){return typeof n.trackOn>"u"||typeof n.trackOn=="function"&&n.trackOn()},l=typeof location<"u"?location.href:null,f=function(){return g(void 0,void 0,void 0,function(){var b,v,y,T,L;return h(this,function(k){switch(k.label){case 0:return b=location.href,v=Mi(n.trackHistoryChanges,b,l||"")&&c(),l=b,v?(o?.log("Tracking page view event"),r!=null?[3,1]:(y=void 0,[3,3])):[3,4];case 1:return L=(T=r).track,[4,a()];case 2:y=L.apply(T,[k.sent()]),k.label=3;case 3:k.label=4;case 4:return[2]}})})},m=function(){f()},_={name:"page-view-tracking",type:N.ENRICHMENT,setup:function(b,v){return g(void 0,void 0,void 0,function(){var y,T,L,k,w;return h(this,function(C){switch(C.label){case 0:return r=r??v,r?(o=b.loggerProvider,o.log("Installing @amplitude/plugin-page-view-tracking-browser"),n.trackOn=!((k=b.attribution)===null||k===void 0)&&k.trackPageViews?"attribution":n.trackOn,!v&&(!((w=b.attribution)===null||w===void 0)&&w.trackPageViews)&&(o.warn("@amplitude/plugin-page-view-tracking-browser overrides page view tracking behavior defined in @amplitude/analytics-browser. Resolve by disabling page view tracking in @amplitude/analytics-browser."),b.attribution.trackPageViews=!1),n.trackHistoryChanges&&i&&(i.addEventListener("popstate",m),s=i.history.pushState,i.history.pushState=new Proxy(i.history.pushState,{apply:function(R,K,z){var Q=A(z,3),P=Q[0],Ce=Q[1],ce=Q[2];R.apply(K,[P,Ce,ce]),f()}})),c()?(o.log("Tracking page view event"),L=(T=r).track,[4,a()]):[3,2]):(y=d?"Options":"undefined",b.loggerProvider.error("Argument of type '".concat(y,"' is not assignable to parameter of type 'BrowserClient'.")),[2]);case 1:L.apply(T,[C.sent()]),C.label=2;case 2:return[2]}})})},execute:function(b){return g(void 0,void 0,void 0,function(){var v;return h(this,function(y){switch(y.label){case 0:return n.trackOn==="attribution"&&Ui(b)?(o?.log("Enriching campaign event to page view event with campaign parameters"),[4,a()]):[3,2];case 1:v=y.sent(),b.event_type=v.event_type,b.event_properties=E(E({},b.event_properties),v.event_properties),y.label=2;case 2:return[2,b]}})})},teardown:function(){return g(void 0,void 0,void 0,function(){return h(this,function(b){return i&&(i.removeEventListener("popstate",m),s&&(i.history.pushState=s)),[2]})})}};return _.__trackHistoryPageView=f,_},Ni=function(){return g(void 0,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return t=In,[4,new $e().parse()];case 1:return[2,t.apply(void 0,[e.sent()])]}})})},Ui=function(t){if(t.event_type==="$identify"&&t.user_properties){var e=t.user_properties,r=e[B.SET]||{},n=e[B.UNSET]||{},i=ee(ee([],A(Object.keys(r)),!1),A(Object.keys(n)),!1);return Object.keys(Pe).every(function(o){return i.includes(o)})}return!1},Mi=function(t,e,r){switch(t){case"pathOnly":return e.split("?")[0]!==r.split("?")[0];default:return e!==r}};var Ln=function(t,e,r){return e===void 0&&(e=""),r===void 0&&(r=10),[xe,e,t.substring(0,r)].filter(Boolean).join("_")},xn=function(t){var e=t.split(".");return e.length<=2?t:e.slice(e.length-2,e.length).join(".")},Pn=function(t,e,r){var n,i=t.referrer,o=t.referring_domain,s=Ge(t,["referrer","referring_domain"]),u=e||{},d=u.referrer,p=u.referring_domain,a=Ge(u,["referrer","referring_domain"]);if(t.referring_domain&&(!((n=r.excludeReferrers)===null||n===void 0)&&n.includes(t.referring_domain)))return!1;var c=JSON.stringify(s)!==JSON.stringify(a),l=xn(o||"")!==xn(p||"");return!e||c||l},Cn=function(t,e){var r=E(E({},Pe),t),n=Object.entries(r).reduce(function(i,o){var s,u=A(o,2),d=u[0],p=u[1];return i.setOnce("initial_".concat(d),(s=p??e.initialEmptyValue)!==null&&s!==void 0?s:"EMPTY"),p?i.set(d,p):i.unset(d)},new ne);return Ke(n)};var br=function(){for(var t=this,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i,o={},s=A(r,2),u=s[0],d=s[1];u&&"init"in u?(i=u,d&&(o=d)):u&&(o=u);var p=(e=o.excludeReferrers)!==null&&e!==void 0?e:[];typeof location<"u"&&p.unshift(location.hostname),o=E(E({disabled:!1,initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1},o),{excludeReferrers:p});var a={name:"web-attribution",type:N.BEFORE,setup:function(c,l){var f;return g(this,void 0,void 0,function(){var m,_,b,v,y,T,L,k;return h(this,function(w){switch(w.label){case 0:return i=i??l,i?o.disabled?(c.loggerProvider.log("@amplitude/plugin-web-attribution-browser is disabled. Attribution is not tracked."),[2]):(c.loggerProvider.log("Installing @amplitude/plugin-web-attribution-browser."),!l&&!(!((f=c.attribution)===null||f===void 0)&&f.disabled)&&(c.loggerProvider.warn("@amplitude/plugin-web-attribution-browser overrides web attribution behavior defined in @amplitude/analytics-browser. Resolve by disabling web attribution tracking in @amplitude/analytics-browser."),c.attribution={disabled:!0}),_=c.cookieStorage,b=Ln(c.apiKey,"MKTG"),[4,Promise.all([new $e().parse(),_.get(b)])]):(m=u?"Options":"undefined",c.loggerProvider.error("Argument of type '".concat(m,"' is not assignable to parameter of type 'BrowserClient'.")),[2]);case 1:return v=A.apply(void 0,[w.sent(),2]),y=v[0],T=v[1],L=this.__pluginEnabledOverride,(L??Pn(y,T,o))&&(o.resetSessionOnNewCampaign&&(i.setSessionId(Date.now()),c.loggerProvider.log("Created a new session for new campaign.")),c.loggerProvider.log("Tracking attribution."),k=Cn(y,o),i.track(k),_.set(b,y)),[2]}})})},execute:function(c){return g(t,void 0,void 0,function(){return h(this,function(l){return[2,c]})})}};return a.__pluginEnabledOverride=void 0,a};var wt=1e3,Er=(function(){function t(e){this.loggerProvider=e?.loggerProvider}return t.prototype.isEnabled=function(){return g(this,void 0,void 0,function(){var e,r,n,i,o;return h(this,function(s){switch(s.label){case 0:if(!$())return[2,!1];e=String(Date.now()),r=new t,n="AMP_TEST",s.label=1;case 1:return s.trys.push([1,4,5,7]),[4,r.set(n,e)];case 2:return s.sent(),[4,r.get(n)];case 3:return i=s.sent(),[2,i===e];case 4:return o=s.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return s.sent(),[7];case 7:return[2]}})})},t.prototype.get=function(e){return g(this,void 0,void 0,function(){var r,n;return h(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return r=i.sent(),r?[2,JSON.parse(r)]:[2,void 0];case 2:return n=i.sent(),[2,void 0];case 3:return[2]}})})},t.prototype.getRaw=function(e){var r;return g(this,void 0,void 0,function(){return h(this,function(n){return[2,((r=$())===null||r===void 0?void 0:r.localStorage.getItem(e))||void 0]})})},t.prototype.set=function(e,r){var n,i;return g(this,void 0,void 0,function(){var o,s,u;return h(this,function(d){o=Array.isArray(r)&&r.length>wt;try{s=JSON.stringify(o?r.slice(0,wt):r),(n=$())===null||n===void 0||n.localStorage.setItem(e,s)}catch{}return o&&(u=r.length-wt,(i=this.loggerProvider)===null||i===void 0||i.error("Failed to save ".concat(u," events because the queue length exceeded ").concat(wt,"."))),[2]})})},t.prototype.remove=function(e){var r;return g(this,void 0,void 0,function(){return h(this,function(n){try{(r=$())===null||r===void 0||r.localStorage.removeItem(e)}catch{}return[2]})})},t.prototype.reset=function(){var e;return g(this,void 0,void 0,function(){return h(this,function(r){try{(e=$())===null||e===void 0||e.localStorage.clear()}catch{}return[2]})})},t})();var Rn=(function(t){ae(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.state={done:4},r}return e.prototype.send=function(r,n){return g(this,void 0,void 0,function(){var i=this;return h(this,function(o){return[2,new Promise(function(s,u){typeof XMLHttpRequest>"u"&&u(new Error("XHRTransport is not supported."));var d=new XMLHttpRequest;d.open("POST",r,!0),d.onreadystatechange=function(){if(d.readyState===i.state.done)try{var p=d.responseText,a=JSON.parse(p),c=i.buildResponse(a);s(c)}catch(l){u(l)}},d.setRequestHeader("Content-Type","application/json"),d.setRequestHeader("Accept","*/*"),d.send(JSON.stringify(n))})]})})},e})(Le);var On=(function(t){ae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.send=function(r,n){return g(this,void 0,void 0,function(){var i=this;return h(this,function(o){return[2,new Promise(function(s,u){var d=$();if(!d?.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var p=JSON.stringify(n),a=d.navigator.sendBeacon(r,JSON.stringify(n));return s(a?i.buildResponse({code:200,events_ingested:n.events.length,payload_size_bytes:p.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(c){u(c)}})]})})},e})(Le);var Ue=function(){var t=new Et,e={deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0};return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:t,cookieUpgrade:!0,disableCookies:!1,domain:"",sessionTimeout:1800*1e3,trackingOptions:e,transportProvider:new hr}},kn=(function(t){ae(e,t);function e(r,n){var i=this,o,s,u,d,p,a,c,l,f,m=Ue();return i=t.call(this,E(E({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30,transportProvider:m.transportProvider},n),{apiKey:r}))||this,i._optOut=!1,i.cookieStorage=(o=n?.cookieStorage)!==null&&o!==void 0?o:m.cookieStorage,i.deviceId=n?.deviceId,i.lastEventId=n?.lastEventId,i.lastEventTime=n?.lastEventTime,i.optOut=!!n?.optOut,i.sessionId=n?.sessionId,i.userId=n?.userId,i.appVersion=n?.appVersion,i.attribution=n?.attribution,i.cookieExpiration=(s=n?.cookieExpiration)!==null&&s!==void 0?s:m.cookieExpiration,i.cookieSameSite=(u=n?.cookieSameSite)!==null&&u!==void 0?u:m.cookieSameSite,i.cookieSecure=(d=n?.cookieSecure)!==null&&d!==void 0?d:m.cookieSecure,i.cookieUpgrade=(p=n?.cookieUpgrade)!==null&&p!==void 0?p:m.cookieUpgrade,i.defaultTracking=n?.defaultTracking,i.disableCookies=(a=n?.disableCookies)!==null&&a!==void 0?a:m.disableCookies,i.defaultTracking=n?.defaultTracking,i.domain=(c=n?.domain)!==null&&c!==void 0?c:m.domain,i.partnerId=n?.partnerId,i.sessionTimeout=(l=n?.sessionTimeout)!==null&&l!==void 0?l:m.sessionTimeout,i.trackingOptions=(f=n?.trackingOptions)!==null&&f!==void 0?f:m.trackingOptions,i}return Object.defineProperty(e.prototype,"deviceId",{get:function(){return this._deviceId},set:function(r){this._deviceId!==r&&(this._deviceId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userId",{get:function(){return this._userId},set:function(r){this._userId!==r&&(this._userId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionId",{get:function(){return this._sessionId},set:function(r){this._sessionId!==r&&(this._sessionId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(r){this._optOut!==r&&(this._optOut=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(r){this._lastEventTime!==r&&(this._lastEventTime=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(r){this._lastEventId!==r&&(this._lastEventId=r,this.updateStorage())},enumerable:!1,configurable:!0}),e.prototype.updateStorage=function(){var r,n={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId};(r=this.cookieStorage)===null||r===void 0||r.set(Ye(this.apiKey),n)},e})($t);var An=function(t,e){return g(void 0,void 0,void 0,function(){var r,n,i,o,s,u,d,p,a,c,l,f,m,_,b;return h(this,function(v){switch(v.label){case 0:return r=Ue(),n=(_=e?.deviceId)!==null&&_!==void 0?_:ge(),i=e?.lastEventId,o=e?.lastEventTime,s=e?.optOut,u=e?.sessionId,d=e?.userId,p=e?.cookieStorage,a=e?.domain,c=kn.bind,l=[void 0,t],f=[E({},e)],m={cookieStorage:p,deviceId:n,domain:a,lastEventId:i,lastEventTime:o,optOut:s,sessionId:u},[4,Vi(e)];case 1:return[2,new(c.apply(kn,l.concat([E.apply(void 0,f.concat([(m.storageProvider=v.sent(),m.trackingOptions=E(E({},r.trackingOptions),e?.trackingOptions),m.transportProvider=(b=e?.transportProvider)!==null&&b!==void 0?b:_r(e?.transport),m.userId=d,m)]))])))]}})})},St=function(t,e){return e===void 0&&(e=Ue()),g(void 0,void 0,void 0,function(){var r,n,i;return h(this,function(o){switch(o.label){case 0:return r=E(E({},e),t),n=t?.cookieStorage,i=!n,i?[3,2]:[4,n.isEnabled()];case 1:i=!o.sent(),o.label=2;case 2:return i?[2,Bi(r)]:[2,n]}})})},Bi=function(t){return g(void 0,void 0,void 0,function(){var e,r;return h(this,function(n){switch(n.label){case 0:return e=new ze({domain:t.domain,expirationDays:t.cookieExpiration,sameSite:t.cookieSameSite,secure:t.cookieSecure}),r=t.disableCookies,r?[3,2]:[4,e.isEnabled()];case 1:r=!n.sent(),n.label=2;case 2:return r?(e=new Er,[4,e.isEnabled()]):[3,4];case 3:n.sent()||(e=new Et),n.label=4;case 4:return[2,e]}})})},Vi=function(t){return g(void 0,void 0,void 0,function(){var e,r,n,i,o,s,u,d,p;return h(this,function(a){switch(a.label){case 0:if(e=t&&Object.prototype.hasOwnProperty.call(t,"storageProvider"),r=t&&t.loggerProvider,!(!e||t.storageProvider))return[3,9];a.label=1;case 1:a.trys.push([1,7,8,9]),n=J([t?.storageProvider,new Er({loggerProvider:r})]),i=n.next(),a.label=2;case 2:return i.done?[3,6]:(o=i.value,s=o,s?[4,o.isEnabled()]:[3,4]);case 3:s=a.sent(),a.label=4;case 4:if(s)return[2,o];a.label=5;case 5:return i=n.next(),[3,2];case 6:return[3,9];case 7:return u=a.sent(),d={error:u},[3,9];case 8:try{i&&!i.done&&(p=n.return)&&p.call(n)}finally{if(d)throw d.error}return[7];case 9:return[2,void 0]}})})},_r=function(t){return t===Ie.XHR?new Rn:t===Ie.SendBeacon?new On:Ue().transportProvider},Dn=function(t){return g(void 0,void 0,void 0,function(){var e,r,n,i,o,o,s,u,d,p;return h(this,function(a){switch(a.label){case 0:return[4,new ze().isEnabled()];case 1:if(!a.sent()||!t&&typeof location>"u")return[2,""];for(e=t??location.hostname,r=e.split("."),n=[],i="AMP_TLDTEST",o=r.length-2;o>=0;--o)n.push(r.slice(o).join("."));o=0,a.label=2;case 2:return o<n.length?(s=n[o],u={domain:"."+s},d=new ze(u),[4,d.set(i,1)]):[3,7];case 3:return a.sent(),[4,d.get(i)];case 4:return p=a.sent(),p?[4,d.remove(i)]:[3,6];case 5:return a.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}})})};var W="[Amplitude]",It="".concat(W," Page Viewed"),Tr="".concat(W," Form Started"),Nn="".concat(W," Form Submitted"),Un="".concat(W," File Downloaded"),wr="session_start",Sr="session_end",Mn="".concat(W," File Extension"),Bn="".concat(W," File Name"),Vn="".concat(W," Link ID"),Fn="".concat(W," Link Text"),Hn="".concat(W," Link URL"),xt="".concat(W," Form ID"),Lt="".concat(W," Form Name"),Pt="".concat(W," Form Destination");var qn=function(t,e){return g(void 0,void 0,void 0,function(){var r,n,i,o,s,u,d,p,a,c,l;return h(this,function(f){switch(f.label){case 0:return[4,St(e)];case 1:return r=f.sent(),n=lr(t),[4,r.getRaw(n)];case 2:return i=f.sent(),i?((l=e.cookieUpgrade)!==null&&l!==void 0?l:Ue().cookieUpgrade)?[4,r.remove(n)]:[3,4]:[2,{optOut:!1}];case 3:f.sent(),f.label=4;case 4:return o=A(i.split("."),6),s=o[0],u=o[1],d=o[2],p=o[3],a=o[4],c=o[5],[2,{deviceId:s,userId:Fi(u),sessionId:Ir(p),lastEventId:Ir(c),lastEventTime:Ir(a),optOut:!!d}]}})})},Ir=function(t){var e=parseInt(t,32);if(!isNaN(e))return e},Fi=function(t){if(!(!atob||!escape||!t))try{return decodeURIComponent(escape(atob(t)))}catch{return}};var Kn=_i(jn());var Gn="1.13.4";var Hi="Web",qi="$remote",Wn=(function(){function t(){this.name="context",this.type=N.BEFORE,this.library="amplitude-ts/".concat(Gn),typeof navigator<"u"&&(this.userAgent=navigator.userAgent),this.uaResult=new Kn.default(this.userAgent).getResult()}return t.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},t.prototype.execute=function(e){var r,n;return g(this,void 0,void 0,function(){var i,o,s,u,d,p,a,c;return h(this,function(l){return i=new Date().getTime(),o=this.uaResult.browser.name,s=this.uaResult.browser.version,u=this.uaResult.device.model||this.uaResult.os.name,d=this.uaResult.device.vendor,p=(r=this.config.lastEventId)!==null&&r!==void 0?r:-1,a=(n=e.event_id)!==null&&n!==void 0?n:p+1,this.config.lastEventId=a,e.time||(this.config.lastEventTime=i),c=E(E(E(E(E(E(E(E(E(E(E(E({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:Hi}),this.config.trackingOptions.osName&&{os_name:o}),this.config.trackingOptions.osVersion&&{os_version:s}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:d}),this.config.trackingOptions.deviceModel&&{device_model:u}),this.config.trackingOptions.language&&{language:vr()}),this.config.trackingOptions.ipAddress&&{ip:qi}),{insert_id:ge(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:a,library:this.library,user_agent:this.userAgent}),[2,c]})})},t})();var ji={page_domain:"".concat(W," Page Domain"),page_location:"".concat(W," Page Location"),page_path:"".concat(W," Page Path"),page_title:"".concat(W," Page Title"),page_url:"".concat(W," Page URL")},$n=function(){var t="@amplitude/plugin-default-page-view-event-enrichment-browser",e=N.ENRICHMENT,r=function(){return g(void 0,void 0,void 0,function(){return h(this,function(i){return[2,void 0]})})},n=function(i){return g(void 0,void 0,void 0,function(){return h(this,function(o){return i.event_type===It&&i.event_properties&&(i.event_properties=Object.entries(i.event_properties).reduce(function(s,u){var d=A(u,2),p=d[0],a=d[1],c=ji[p];return c?s[c]=a:s[p]=a,s},{})),[2,i]})})};return{name:t,type:e,setup:r,execute:n}};var Yn=function(){var t,e=[],r=function(p,a,c){p.addEventListener(a,c),e.push({element:p,type:a,handler:c})},n=function(){e.forEach(function(p){var a=p.element,c=p.type,l=p.handler;a?.removeEventListener(c,l)}),e=[]},i="@amplitude/plugin-file-download-tracking-browser",o=N.ENRICHMENT,s=function(p,a){return g(void 0,void 0,void 0,function(){var c,l,f;return h(this,function(m){return a?typeof document>"u"?[2]:(c=function(_){var b;try{b=new URL(_.href,window.location.href)}catch{return}var v=l.exec(b.href),y=v?.[1];y&&r(_,"click",function(){var T;y&&a.track(Un,(T={},T[Mn]=y,T[Bn]=b.pathname,T[Vn]=_.id,T[Fn]=_.text,T[Hn]=_.href,T))})},l=/\\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)$/,f=Array.from(document.getElementsByTagName("a")),f.forEach(c),typeof MutationObserver<"u"&&(t=new MutationObserver(function(_){_.forEach(function(b){b.addedNodes.forEach(function(v){v.nodeName==="A"&&c(v),"querySelectorAll"in v&&typeof v.querySelectorAll=="function"&&Array.from(v.querySelectorAll("a")).map(c)})})}),t.observe(document.body,{subtree:!0,childList:!0})),[2]):(p.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked."),[2])})})},u=function(p){return g(void 0,void 0,void 0,function(){return h(this,function(a){return[2,p]})})},d=function(){return g(void 0,void 0,void 0,function(){return h(this,function(p){return t?.disconnect(),n(),[2]})})};return{name:i,type:o,setup:s,execute:u,teardown:d}};var zn=function(){var t,e=[],r=function(p,a,c){p.addEventListener(a,c),e.push({element:p,type:a,handler:c})},n=function(){e.forEach(function(p){var a=p.element,c=p.type,l=p.handler;a?.removeEventListener(c,l)}),e=[]},i="@amplitude/plugin-form-interaction-tracking-browser",o=N.ENRICHMENT,s=function(p,a){return g(void 0,void 0,void 0,function(){var c,l;return h(this,function(f){return a?typeof document>"u"?[2]:(c=function(m){var _=!1;r(m,"change",function(){var b;_||a.track(Tr,(b={},b[xt]=m.id,b[Lt]=m.name,b[Pt]=m.action,b)),_=!0}),r(m,"submit",function(){var b,v;_||a.track(Tr,(b={},b[xt]=m.id,b[Lt]=m.name,b[Pt]=m.action,b)),a.track(Nn,(v={},v[xt]=m.id,v[Lt]=m.name,v[Pt]=m.action,v)),_=!1})},l=Array.from(document.getElementsByTagName("form")),l.forEach(c),typeof MutationObserver<"u"&&(t=new MutationObserver(function(m){m.forEach(function(_){_.addedNodes.forEach(function(b){b.nodeName==="FORM"&&c(b),"querySelectorAll"in b&&typeof b.querySelectorAll=="function"&&Array.from(b.querySelectorAll("form")).map(c)})})}),t.observe(document.body,{subtree:!0,childList:!0})),[2]):(p.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked."),[2])})})},u=function(p){return g(void 0,void 0,void 0,function(){return h(this,function(a){return[2,p]})})},d=function(){return g(void 0,void 0,void 0,function(){return h(this,function(p){return t?.disconnect(),n(),[2]})})};return{name:i,type:o,setup:s,execute:u,teardown:d}};var Rt=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=n.name,o=n.args,s=n.resolve,u=t&&t[i];if(typeof u=="function"){var d=u.apply(t,o);typeof s=="function"&&s(d?.promise)}}return t},Ot=function(t){var e=t;return e&&e._q!==void 0};var Qn=(function(t){ae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i){return r===void 0&&(r=""),X(this._init(E(E({},i),{userId:n,apiKey:r})))},e.prototype._init=function(r){var n,i,o,s,u,d,p,a,c,l,f,m,_,b,v,y,T,L,k,w;return g(this,void 0,void 0,function(){var C,R,K,z,Q,P,Ce,ce,_e,Me,Re,Oe,Be,Te,we,ke,fe,me,Ve=this;return h(this,function(U){switch(U.label){case 0:return this.initializing?[2]:(this.initializing=!0,C=r,r.disableCookies?(R="",[3,5]):[3,1]);case 1:return(n=r.domain)!==null&&n!==void 0?(K=n,[3,4]):[3,2];case 2:return[4,Dn()];case 3:K=U.sent(),U.label=4;case 4:R=K,U.label=5;case 5:return C.domain=R,[4,qn(r.apiKey,r)];case 6:return z=U.sent(),[4,St(r)];case 7:return Q=U.sent(),[4,Q.get(Ye(r.apiKey))];case 8:return P=U.sent(),Ce=Ne(),ce=(s=(o=(i=r.deviceId)!==null&&i!==void 0?i:Ce.deviceId)!==null&&o!==void 0?o:P?.deviceId)!==null&&s!==void 0?s:z.deviceId,_e=(u=P?.sessionId)!==null&&u!==void 0?u:z.sessionId,Me=(p=(d=r.optOut)!==null&&d!==void 0?d:P?.optOut)!==null&&p!==void 0?p:z.optOut,Re=(a=P?.lastEventId)!==null&&a!==void 0?a:z.lastEventId,Oe=(c=P?.lastEventTime)!==null&&c!==void 0?c:z.lastEventTime,Be=(f=(l=r.userId)!==null&&l!==void 0?l:P?.userId)!==null&&f!==void 0?f:z.userId,this.previousSessionDeviceId=(m=P?.deviceId)!==null&&m!==void 0?m:z.deviceId,this.previousSessionUserId=(_=P?.userId)!==null&&_!==void 0?_:z.userId,[4,An(r.apiKey,E(E({},r),{deviceId:ce,sessionId:_e,optOut:Me,lastEventId:Re,lastEventTime:Oe,userId:Be,cookieStorage:Q}))];case 9:return Te=U.sent(),[4,t.prototype._init.call(this,Te)];case 10:return U.sent(),we=!1,(!this.config.lastEventTime||!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId((v=(b=r.sessionId)!==null&&b!==void 0?b:this.config.sessionId)!==null&&v!==void 0?v:Date.now()),we=!0),ke=pe(r.instanceName),ke.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new zt).promise];case 11:return U.sent(),[4,this.add(new Wn).promise];case 12:return U.sent(),[4,this.add(new gr).promise];case 13:return U.sent(),dr(this.config.defaultTracking)?[4,this.add(Yn()).promise]:[3,15];case 14:U.sent(),U.label=15;case 15:return pr(this.config.defaultTracking)?[4,this.add(zn()).promise]:[3,17];case 16:U.sent(),U.label=17;case 17:return!((y=this.config.attribution)===null||y===void 0)&&y.disabled?[3,19]:(fe=br({excludeReferrers:(T=this.config.attribution)===null||T===void 0?void 0:T.excludeReferrers,initialEmptyValue:(L=this.config.attribution)===null||L===void 0?void 0:L.initialEmptyValue,resetSessionOnNewCampaign:(k=this.config.attribution)===null||k===void 0?void 0:k.resetSessionOnNewCampaign}),fe.__pluginEnabledOverride=we||!((w=this.config.attribution)===null||w===void 0)&&w.trackNewCampaigns?void 0:!1,[4,this.add(fe).promise]);case 18:U.sent(),U.label=19;case 19:return me=mr(this.config),me.eventType=me.eventType||It,[4,this.add(yr(me)).promise];case 20:return U.sent(),[4,this.add($n()).promise];case 21:return U.sent(),this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 22:return U.sent(),ke.eventBridge.setEventReceiver(function(et){Ve.track(et.eventType,et.eventProperties)}),[2]}})})},e.prototype.getUserId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.userId},e.prototype.setUserId=function(r){if(!this.config){this.q.push(this.setUserId.bind(this,r));return}(r!==this.config.userId||r===void 0)&&(this.config.userId=r,Qt(r,this.config.instanceName))},e.prototype.getDeviceId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.deviceId},e.prototype.setDeviceId=function(r){if(!this.config){this.q.push(this.setDeviceId.bind(this,r));return}this.config.deviceId=r,Xt(r,this.config.instanceName)},e.prototype.setOptOut=function(r){Zt(r,this.config.instanceName),t.prototype.setOptOut.call(this,r)},e.prototype.reset=function(){this.setDeviceId(ge()),this.setUserId(void 0)},e.prototype.getSessionId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.sessionId},e.prototype.setSessionId=function(r){var n;if(!this.config){this.q.push(this.setSessionId.bind(this,r));return}if(r!==this.config.sessionId){var i=this.getSessionId(),o=this.config.lastEventTime,s=(n=this.config.lastEventId)!==null&&n!==void 0?n:-1;this.config.sessionId=r,this.config.lastEventTime=void 0,fr(this.config.defaultTracking)&&(i&&o&&this.track(Sr,void 0,{device_id:this.previousSessionDeviceId,event_id:++s,session_id:i,time:o+1,user_id:this.previousSessionUserId}),this.config.lastEventTime=this.config.sessionId,this.track(wr,void 0,{event_id:++s,session_id:this.config.sessionId,time:this.config.lastEventTime})),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId}},e.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},e.prototype.setTransport=function(r){if(!this.config){this.q.push(this.setTransport.bind(this,r));return}this.config.transportProvider=_r(r)},e.prototype.identify=function(r,n){if(Ot(r)){var i=r._q;r._q=[],r=Rt(new ne,i)}return n?.user_id&&this.setUserId(n.user_id),n?.device_id&&this.setDeviceId(n.device_id),t.prototype.identify.call(this,r,n)},e.prototype.groupIdentify=function(r,n,i,o){if(Ot(i)){var s=i._q;i._q=[],i=Rt(new ne,s)}return t.prototype.groupIdentify.call(this,r,n,i,o)},e.prototype.revenue=function(r,n){if(Ot(r)){var i=r._q;r._q=[],r=Rt(new gt,i)}return t.prototype.revenue.call(this,r,n)},e.prototype.process=function(r){return g(this,void 0,void 0,function(){var n,i,o;return h(this,function(s){return n=Date.now(),i=this.config.lastEventTime||Date.now(),o=n-i,r.event_type!==wr&&r.event_type!==Sr&&(!r.session_id||r.session_id===this.getSessionId())&&o>this.config.sessionTimeout&&this.setSessionId(n),[2,t.prototype.process.call(this,r)]})})},e})(Wt);var Gi=function(){var t=new Qn;return{init:H(t.init.bind(t),"init",V(t),F(t,["config"])),add:H(t.add.bind(t),"add",V(t),F(t,["config.apiKey","timeline.plugins"])),remove:H(t.remove.bind(t),"remove",V(t),F(t,["config.apiKey","timeline.plugins"])),track:H(t.track.bind(t),"track",V(t),F(t,["config.apiKey","timeline.queue.length"])),logEvent:H(t.logEvent.bind(t),"logEvent",V(t),F(t,["config.apiKey","timeline.queue.length"])),identify:H(t.identify.bind(t),"identify",V(t),F(t,["config.apiKey","timeline.queue.length"])),groupIdentify:H(t.groupIdentify.bind(t),"groupIdentify",V(t),F(t,["config.apiKey","timeline.queue.length"])),setGroup:H(t.setGroup.bind(t),"setGroup",V(t),F(t,["config.apiKey","timeline.queue.length"])),revenue:H(t.revenue.bind(t),"revenue",V(t),F(t,["config.apiKey","timeline.queue.length"])),flush:H(t.flush.bind(t),"flush",V(t),F(t,["config.apiKey","timeline.queue.length"])),getUserId:H(t.getUserId.bind(t),"getUserId",V(t),F(t,["config","config.userId"])),setUserId:H(t.setUserId.bind(t),"setUserId",V(t),F(t,["config","config.userId"])),getDeviceId:H(t.getDeviceId.bind(t),"getDeviceId",V(t),F(t,["config","config.deviceId"])),setDeviceId:H(t.setDeviceId.bind(t),"setDeviceId",V(t),F(t,["config","config.deviceId"])),reset:H(t.reset.bind(t),"reset",V(t),F(t,["config","config.userId","config.deviceId"])),getSessionId:H(t.getSessionId.bind(t),"getSessionId",V(t),F(t,["config"])),setSessionId:H(t.setSessionId.bind(t),"setSessionId",V(t),F(t,["config"])),extendSession:H(t.extendSession.bind(t),"extendSession",V(t),F(t,["config"])),setOptOut:H(t.setOptOut.bind(t),"setOptOut",V(t),F(t,["config"])),setTransport:H(t.setTransport.bind(t),"setTransport",V(t),F(t,["config"]))}},j=Gi();var cc=j.add,lc=j.extendSession,dc=j.flush,pc=j.getDeviceId,fc=j.getSessionId,mc=j.getUserId,vc=j.groupIdentify,Xn=j.identify,Zn=j.init,gc=j.logEvent,hc=j.remove,yc=j.reset,bc=j.revenue,Ec=j.setDeviceId,_c=j.setGroup,Tc=j.setOptOut,wc=j.setSessionId,Sc=j.setTransport,Ic=j.setUserId,ye=j.track;var te=t=>{window.dispatchEvent(new CustomEvent("builderdevtools",{detail:{eventName:t}}))};async function Ki(){return zr()}var Jn=async()=>{let t=new URL(window.location.href),e=t.hash,r=\`#\${Br}=\`,n=Math.random().toString(36).substring(2,15),i=await Ki();Zn("f1d2eb79aecd01b28c8a371ea5d1751c",i?.userId||n,{logLevel:mt.LogLevel.None,serverUrl:Hr,flushIntervalMillis:500});let o=new ne;Xn(o,{device_id:i?.deviceId,user_id:i?.userId||n});let s="anonymous";e.startsWith(r)&&(s=e.slice(r.length),s&&(Wi(s),t.hash="",window.history.replaceState({},"",t.href))),te("init")};var Wi=t=>{if(typeof t=="string"&&t.length>0){let e=Ze();Xe({...e,builderUserId:t})}},Ze=()=>{let t=localStorage.getItem(ei);if(t)try{let e=JSON.parse(t);return(!e.ctas||typeof e.ctas!="object")&&(e=Xe({...e,ctas:{}})),e.menuOpenedTs&&(e=Xe({...e,ctas:{...e.ctas,menuOpened:e.menuOpenedTs}}),delete e.menuOpenedTs),e}catch(e){console.error(e)}return Xe({firstVisitTs:Date.now(),ctas:{},builderUserId:""})},Xe=t=>{try{localStorage.setItem(ei,JSON.stringify(t))}catch(e){console.error(e)}return t},xr=t=>!!Ze().ctas[t],Lr=t=>{let e=Ze();return Xe({...e,ctas:{...e.ctas,[t]:Date.now()}})},ei="builderDevtools";function ti(t){$i(t),Yi(t),zi(t),Qi(t)}function $i(t){let e=t.getElementById("input-register");e.addEventListener("change",async r=>{r.stopPropagation();let n=t.getElementById("input-name"),i=t.querySelector(".nav-cmp-input");i.classList.add("input-loading"),i.classList.remove("input-enabled");let o=n.dataset.id,s=n.dataset.prop,u=await at({cmpId:o,name:s,registerInput:e.checked});te("registryUpdate"),le(u),Je(t,o,s),be(t,o),i.classList.remove("input-loading")})}function Yi(t){t.getElementById("input-open-source").addEventListener("click",r=>{r.preventDefault(),r.stopPropagation();let n=r.target,i=G.components.find(o=>o.id===n?.dataset.id);i&&De({filePath:i.filePath})})}function zi(t){let e=t.getElementById("input-name"),r=e.closest(".ui-text-input"),n="",i;e.addEventListener("focus",o=>{clearTimeout(i),r.classList.remove("saved"),o.stopPropagation(),n=e.value}),e.addEventListener("blur",async o=>{if(o.stopPropagation(),clearTimeout(i),r.classList.remove("saved"),e.value!==n){if(e.value.trim().length<3){e.value=n;return}r.classList.add("saved"),i=setTimeout(()=>{r.classList.remove("saved")},3e3);let s=e.dataset.id,u=e.dataset.prop,d=await at({cmpId:s,name:u,friendlyName:e.value});te("registryUpdate"),le(d),ue(t),be(t,s),Je(t,s,u)}}),e.addEventListener("keyup",o=>{o.stopPropagation(),clearTimeout(i),r.classList.remove("saved"),o.key==="Escape"?(e.value=n,e.blur()):o.key==="Enter"&&e.blur()})}function Qi(t){let e=t.getElementById("input-type");e.addEventListener("change",async r=>{r.stopPropagation();let n=e.dataset.id,i=e.dataset.prop,o=await at({cmpId:n,name:i,type:e.value});te("registryUpdate"),le(o),ue(t),be(t,n),Je(t,n,i)})}function Je(t,e,r){let n=G.components.find(l=>l.id===e);if(!n)return null;let i=n.inputs.find(l=>l.name===r);if(!i)return null;let o=t.querySelector(".nav-cmp-input");i.isRegistered?o.classList.add("input-enabled"):o.classList.remove("input-enabled");let s=t.getElementById("input-register");s.checked=!!i.isRegistered;let u=t.getElementById("cmp-input-title");u.innerText=n.name+": "+(i.friendlyName||i.name);let d=t.getElementById("input-open-source");d.innerText=\`Open \${n.displayFilePath}\`,d.dataset.id=n.id;let p=t.getElementById("cmp-prop-name");p.innerText=i.name;let a=t.getElementById("cmp-prop-type");a.innerText=ft(i.type);let c=t.getElementById("input-name");return c.dataset.id=n.id,c.dataset.prop=i.name,c.value=i.friendlyName||i.name,Xi(t,n,i),i}function Xi(t,e,r){let n=t.getElementById("input-type");n.dataset.id=e.id,n.dataset.prop=r.name,n.innerHTML="";let i=r.type,o=ut.includes(i),s=ct.includes(i),u=lt.includes(i),d=dt.includes(i),p=pt.includes(i);Qr.forEach(a=>{let c=document.createElement("option");c.value=a.value,c.innerText=a.text,c.disabled=ut.includes(a.value)&&!o||ct.includes(a.value)&&!s||lt.includes(a.value)&&!u||dt.includes(a.value)&&!d||pt.includes(a.value)&&!p,n.appendChild(c)}),n.value=i}function ri(t){Zi(t),Ji(t),eo(t),ro(t),to(t)}function Zi(t){t.getElementById("cmp-register").addEventListener("change",r=>{r.stopPropagation(),kt(t,"update")})}async function kt(t,e){let r=t.querySelector(".nav-cmp-detail"),n=t.getElementById("cmp-error"),i=t.getElementById("cmp-register"),o=i.closest(".ui-switch");r.classList.remove("cmp-enabled"),i.checked&&r.classList.add("cmp-loading");try{let s=i.dataset.id,u;e==="load"?u=await Gr({cmpId:s}):i.checked?(u=await Kr({cmpId:s}),te("registryUpdate"),ye("interaction",{type:"click",name:"register component",detail:s})):(u=await $r({cmpId:s}),te("registryUpdate"),ye("interaction",{type:"click",name:"unregister component",detail:s})),le(u),ue(t);let d=be(t,s);e==="update"&&d&&(i.checked?(r.classList.add("cmp-enabled"),Bt(t,\`<strong>\${d.name}</strong> is now registered in <strong>\${G.registryDisplayPath}</strong> and available for use in the Builder Visual Editor\`)):Bt(t,\`<strong>\${d.name}</strong> has been unregistered from <strong>\${G.registryDisplayPath}</strong> and removed from the Builder Visual Editor\`))}catch(s){console.error(s),n.innerHTML=\`<p class="error">Error loading components</p><p class="error">\${s.message||s}</p>\`,o.style.display="none"}r.classList.remove("cmp-loading")}function Ji(t){let e=t.getElementById("cmp-name"),r=e.closest(".ui-text-input"),n="",i;e.addEventListener("focus",o=>{clearTimeout(i),r.classList.remove("saved"),o.stopPropagation(),n=e.value}),e.addEventListener("blur",async o=>{if(o.stopPropagation(),clearTimeout(i),r.classList.remove("saved"),e.value!==n){if(e.value.trim().length<3){e.value=n;return}r.classList.add("saved"),i=setTimeout(()=>{r.classList.remove("saved")},3e3);let s=e.dataset.id,u=await Wr({cmpId:s,name:e.value});te("registryUpdate"),le(u),ue(t),be(t,s)}}),e.addEventListener("keyup",o=>{o.stopPropagation(),clearTimeout(i),r.classList.remove("saved"),o.key==="Escape"?(e.value=n,e.blur()):o.key==="Enter"&&e.blur()})}function be(t,e){let r=G.components.find(a=>a.id===e);if(!r)return null;let n=t.getElementById("cmp-register"),i=t.getElementById("cmp-error"),o=n.closest(".ui-switch");o.style.display="",i.innerHTML="",n.dataset.id=r.id,n.checked=!!r.isRegistered;let s=t.querySelector(".nav-cmp-detail");r.isRegistered?s.classList.add("cmp-enabled"):s.classList.remove("cmp-enabled");let u=t.getElementById("cmp-name");u.dataset.id=r.id,u.value=r.name;let d=t.getElementById("cmp-open-source");d.innerText=\`Open \${r.displayFilePath}\`,d.dataset.id=r.id;let p=t.getElementById("cmp-detail-title");return p.innerText=\`\${r.name} Component\`,no(t,r),r}function eo(t){t.getElementById("cmp-open-source").addEventListener("click",r=>{r.preventDefault(),r.stopPropagation();let n=r.target,i=G.components.find(o=>o.id===n?.dataset.id);i&&(De({filePath:i.filePath}),ye("interaction",{type:"click",name:"open component source file",detail:i.filePath}))})}function to(t){t.getElementById("btn-inputs-reload").addEventListener("click",r=>{r.preventDefault(),r.stopPropagation(),kt(t,"load")})}function ro(t){t.getElementById("cmp-detail-inputs").addEventListener("click",r=>{r.preventDefault(),r.stopPropagation();let i=r.target?.closest("button"),o=i?.dataset.id,s=i?.dataset.propName;Je(t,o,s)&&oe(t,"nav-cmp-input")})}function no(t,e){let r=t.getElementById("cmp-detail-inputs"),n=e.inputs.filter(i=>!i.hideFromUI);n.length>0?(r.innerHTML="",n.forEach(i=>{r.appendChild(io(e,i))})):r.innerHTML=\`<p class="cmp-inputs-empty">\${e.name} component does not have any props</p>\`}function io(t,e){let r=document.createElement("button");r.dataset.id=t.id,r.dataset.propName=e.name,r.className="cmp-input-item nav-list-item",e.isRegistered||r.classList.add("cmp-input-item-unregistered");let n=document.createElement("span"),i=ft(e.type);n.className=\`nav-list-item-icon input-icon input-icon-\${i}\`,r.appendChild(n);let o=document.createElement("span");o.innerText=e.friendlyName||e.name,r.appendChild(o);let s=document.createElement("span");return s.className="nav-list-item-note",s.innerText=e.type,r.appendChild(s),r}function oi(t){t.getElementById("open-builder-registry").addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),De({filePath:G.registryPath,line:1,column:1})}),t.getElementById("cmp-list").addEventListener("click",o=>{o.preventDefault(),o.stopPropagation();let u=o.target?.dataset.id,d=G.components.find(p=>p.id===u);if(d){let p=t.querySelector(".nav-cmp-detail .section-content");p.scrollTop=0,be(t,d.id),oe(t,"nav-cmp-detail"),d.isRegistered&&kt(t,"load")}});let n=t.getElementById("component-search"),i=t.getElementById("clear-search");n?.addEventListener("input",o=>{let s=o.target.value.toLowerCase(),u=s?G.components.filter(d=>d.name.toLowerCase().includes(s)||d.displayFilePath?.toLowerCase().includes(s)):G.components;ue(t,u),i.style.display=s?"flex":"none"}),i?.addEventListener("click",()=>{n.value="",ue(t),i.style.display="none"}),n?.addEventListener("keydown",o=>{o.key==="Escape"&&(n.value="",ue(t),i.style.display="none")})}function si(t){let e=jr();oo(t,e)}async function oo(t,e){let r=t.getElementById("cmp-list"),n=t.querySelector(".nav-cmp-list");n.classList.add("nav-loading");let i=t.getElementById("open-builder-registry");try{let o=await e;le(o),ue(t),G.registryDisplayPath?i.innerText="Open "+o.registryDisplayPath:i.innerText=""}catch(o){r.innerHTML=\`<p class="error">Error loading components</p><p class="error">\${o.message||o}</p>\`,console.error(o)}n.classList.remove("nav-loading")}function ue(t,e){let r=t.getElementById("cmp-list");r.innerHTML="";let n=e||G.components,i=n.filter(s=>s.isRegistered),o=n.filter(s=>!s.isRegistered);if(e&&e.length===0){let s=document.createElement("p");s.className="no-results",s.innerText="No matching components found",r.appendChild(s);return}ni(r,"Registered Components",i),ni(r,"Unregistered Components",o)}function ni(t,e,r){if(r.length>0){let n=document.createElement("h4");n.innerText=e,t.appendChild(n),r.forEach(i=>{t.appendChild(so(i))})}}function so(t){let e=document.getElementById("component-search")?.value.toLowerCase(),r=document.createElement("button");r.dataset.id=t.id,r.className="cmp-item nav-list-item",t.isRegistered&&r.classList.add("registered");let n=document.createElement("span");n.className="nav-list-item-icon",t.image&&(n.style.backgroundImage=\`url(\${t.image})\`),r.appendChild(n);let i=document.createElement("span");i.className="nav-list-item-name",i.innerHTML=ii(t.name,e),r.appendChild(i);let o=document.createElement("span");return o.className="nav-list-item-note",o.innerHTML=ii(t.displayFilePath||"",e),r.appendChild(o),r}function ii(t,e){if(!e)return t;let r=new RegExp(\`(\${e})\`,"gi");return t.replace(r,'<span class="search-highlight">$1</span>')}var ai=t=>{t.querySelector(".menu-toggle").addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),Ee(t,!0)}),t.getElementById("close").addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),Ee(t,!1)}),t.getElementById("hit").addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),Ee(t,!1)}),Ar(t),t.addEventListener("click",e=>e.stopPropagation()),ao(t)},Ee=(t,e)=>{e?(document.body.classList.add("builder-no-scroll"),t.host.classList.add("show-builder-menu"),te("menuOpen"),Lr("menuOpened"),ye("interaction",{type:"click",name:"open dev-tools menu"})):(document.body.classList.remove("builder-no-scroll"),t.host.classList.remove("show-builder-menu"),te("menuClose"),setTimeout(()=>{oe(t,"nav-home")},300)),Yr(e)},ao=t=>{if(!xr("menuOpened")){uo(t);return}let e=Ze();if(!((Date.now()-e.firstVisitTs)/1e3/60<10)&&!xr("feedback")){Lr("feedback"),co(t);return}},uo=t=>{let e=document.createElement("a");e.classList.add("menu-toggle-tooltip"),e.href="#open-dev-tools",e.innerHTML=\`
1246
1246
  <div class="menu-toggle-tooltip-content">
1247
1247
  <h3>Open Builder Devtools</h3>
@@ -1252,7 +1252,7 @@ Restarting server after Builder Devtools update...
1252
1252
  <h3>How's Devtools working for you?</h3>
1253
1253
  <p>We'd love your feedback!</p>
1254
1254
  </div>
1255
- \`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.18.49"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
1255
+ \`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.18.50"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
1256
1256
  </style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
1257
1257
  <aside>
1258
1258
  <div class="logo"></div>
@@ -1291,7 +1291,7 @@ Restarting server after Builder Devtools update...
1291
1291
  </nav>
1292
1292
  </section>
1293
1293
  </main>
1294
- \`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.18.49"),document.body.appendChild(t));let e=document.querySelector("builder-dev-tools-edit");e||(e=document.createElement("builder-dev-tools-edit"),document.body.appendChild(e));let r=document.getElementById("builder-dev-tools-style");r||(r=document.createElement("style"),r.id="builder-dev-tools-style",r.innerHTML=".builder-no-scroll{overflow:hidden !important}",document.head.appendChild(r)),li(),Jn()}catch(t){console.error("Builder Devtools:",t)}};window.location===window.parent.location&&(console.debug("Builder.io Devtools v1.18.49"),mo());})();`)}async function L5(t){return $5(t,`<!doctype html>
1294
+ \`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.18.50"),document.body.appendChild(t));let e=document.querySelector("builder-dev-tools-edit");e||(e=document.createElement("builder-dev-tools-edit"),document.body.appendChild(e));let r=document.getElementById("builder-dev-tools-style");r||(r=document.createElement("style"),r.id="builder-dev-tools-style",r.innerHTML=".builder-no-scroll{overflow:hidden !important}",document.head.appendChild(r)),li(),Jn()}catch(t){console.error("Builder Devtools:",t)}};window.location===window.parent.location&&(console.debug("Builder.io Devtools v1.18.50"),mo());})();`)}async function Lj(t){return $j(t,`<!doctype html>
1295
1295
  <html lang="en" dir="ltr">
1296
1296
  <head>
1297
1297
  <meta charset="utf-8" />
@@ -1457,13 +1457,13 @@ Restarting server after Builder Devtools update...
1457
1457
  </script>
1458
1458
  </body>
1459
1459
  </html>
1460
- `)}async function $5(t,e){let r=await AR(t),n=t.getFrameworks();return e.replace(/__LOCAL_APP_ID__/g,r).replace(/__DEV_TOOLS_URL__/g,t.devToolsServerUrl).replace(/__CLIENT_ID__/g,t.getClientId()).replace(/__FRAMEWORK__/g,n.length?n[0].name:"")}var j5=N(()=>{"use strict";m();it()});async function q5(t,e){let r=new URL("/cli-auth","https://builder.io");r.searchParams.set("client_id",t.getClientId()),r.searchParams.set("host",await t.getDeviceId()),r.searchParams.set("response_type","code"),r.searchParams.set("cli","true");let n=new URL(fu,t.devToolsServerUrl);n.searchParams.set(Ly,(0,U5.platform)()),n.searchParams.set($y,process.versions.node);let i=t.getFrameworks();return i.length>0&&(r.searchParams.set(rp,i[0].name),n.searchParams.set(rp,i[0].name)),r.searchParams.set("redirect_url",n.href),r.searchParams.set("preview_url",e),r.href}var U5,z5=N(()=>{"use strict";m();np();U5=require("node:os")});async function V5(t,e,r,n){try{if(!t)return ad(r,n,400,"Builder context closed");let i=Pxe(r);if(i.pathname===Uw){if(r.method==="POST"){let s=await Axe(r);if(s)try{let o=await O5(t,JSON.parse(s));return G5(r,n,200,o)}catch(o){t.debug("Dev API Error",o.stack||o.message||o);let a={errors:[String(o.message||o)]};return G5(r,n,500,a)}}else if(r.method==="OPTIONS"){let s={"Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control, X-Builder-Devtools-Version, sentry-trace, baggage"},o=r.headers.origin;o&&o!=="null"?H5(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return ad(r,n,405,`${Uw} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(i.pathname===qw)return Exe(r,n,200,await B5(t));if(i.pathname===HN){let s=i.searchParams.get(jw);return s?Txe(n,302,await q5(t,s)):ad(r,n,400,`Missing ${jw} querystring`)}if(i.pathname===fu)return Sxe(r,n,200,await L5(t));if(i.pathname===KN){await jt(t,{_:[]},{});let s=await Hu(t),{figmaBuilderLinks:o,diagnostics:a}=await hh({mappingFiles:s,sys:t});return mh(r,n,200,"application/json",JSON.stringify({figmaBuilderLinks:o,foundErrors:a.length>0,diagnostics:a,version:2,local:!0},null,2))}return i.pathname===mu?(t.debug(`Close Dev Tools Server Requested: ${i.href}`),setTimeout(()=>{try{e.close(s=>{t.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){t.debug(`Error closing devtools server: ${s}`)}},20),ad(r,n,200,"Closing Dev Tools Server")):ad(r,n,404,"Not found")}catch(i){return t?.Sentry?.captureException(i),ad(r,n,500,`Dev Server Error: ${i}`)}}function G5(t,e,r,n){mh(t,e,r,"application/json",JSON.stringify(n))}function Exe(t,e,r,n){mh(t,e,r,"application/javascript",n)}function Sxe(t,e,r,n){mh(t,e,r,"text/html",n)}function ad(t,e,r,n){mh(t,e,r,"text/plain",n)}function mh(t,e,r,n,i){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":Ve},o=t.headers.origin;o&&o!=="null"?H5(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",e.writeHead(r,s),e.end(i)}function H5(t){return t.hostname==="localhost"||t.origin==="https://builder.io"||t.origin==="https://www.builder.io"||t.origin.endsWith(".builder.io")?!0:t.port===""?!1:t.port!=="80"&&t.port!=="443"}function Txe(t,e,r){t.writeHead(e,{Location:r}),t.end()}async function Axe(t){let e="";for await(let r of t)e+=r;return e}function Pxe(t){let e=t.url||"/";return new URL(e,`http://${t.headers.host}`)}var K5=N(()=>{"use strict";m();np();M5();j5();z5();Xr();cd();Nr()});async function W5(t){if(globalThis.__builderDevToolsServer)return t.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(t),globalThis.__builderDevToolsServer;let e=await _xe(t),r=(0,ix.createServer)((i,s)=>{V5(t,r,i,s)}),n=()=>new Promise((i,s)=>{r.listening?(t.debug(`closing devtools server on port ${e}`),r.close(o=>{t=null,o?(t.debug(`error closing devtools server on port ${e}`),s(o)):(t&&t.debug(`closed devtools server on port ${e}`),i())})):(t.debug(`devtools server on port ${e} not listening`),i())});return process.once("SIGTERM",n),process.once("SIGINT",n),process.env.CI!=="true"&&process.stdin.on("end",n),globalThis.__builderDevToolsServer={url:new URL(`http://localhost:${e}`).href,port:e,setContext:i=>{t.debug(`set devtools context on server ${e}`),t=i},close:async()=>{globalThis.__builderDevToolsServer=null,await n()}},new Promise(i=>{r.listen(e,()=>{t.debug(`started devtools server on port ${e}`),i(globalThis.__builderDevToolsServer)})})}function _xe(t){return new Promise(e=>{let r=t.port;try{(0,ix.request)({hostname:"localhost",port:r,path:mu,method:"GET"},i=>{i.on("end",()=>{t.debug(`${mu} - Response ended`),e(r)})}).on("error",i=>{t.debug(`${mu} - No response ${i}`),e(r)}).end()}catch(n){t.debug(`${mu} - Error ${n}`),e(r)}})}var ix,J5=N(()=>{"use strict";m();ix=require("node:http");K5();np()});async function nA(t){let e={...t,devToolsServerUrl:"",isValid:!1,serverShouldRestart:!1,publicApiKey:"",port:t.port||5273,ignoreMissingConfig:!1,getAllProjectFiles:t.getAllProjectFiles||(()=>Promise.resolve([]))},r=t.getFrameworks().map(s=>s.name).join(", ");e.debug(`create devtools ${X5} [${r}]`);let n=await W5(e);return e.devToolsServerUrl=n.url,e.port=n.port,{getUrl:()=>e.devToolsServerUrl}}var Y5=N(()=>{"use strict";m();J5();iA()});var X5,iA=N(()=>{"use strict";m();Nr();Y5();X5=Ve});async function Z5(t){if(console.log(""),Tt((0,Tc.bgCyan)((0,Tc.bold)((0,Tc.white)(" add ")))+" "+(0,Tc.dim)(Ve)),!t.path&&!process.stdout.isTTY&&process.env.FORCE_TTY!=="1")return ge(`This command requires a TTY-enabled terminal.
1461
- If you are using Windows Git Bash, try a different terminal or wrap the command with winpty.`),await pe(1);let e=t.snippetId;if(!e&&!t.snippet)return ge("SnippetId expected. npx builder.io add <snippetId>"),await pe(1);let r=mo(),n=t.snippet||null;if(!n&&e&&(r.start(`Fetching snippet ${e}`),n=await sA(e),r.stop(`Fetched snippet ${e}`)),!n)return ge(`No snippet found for id ${e}`),await pe(1);let i=process.cwd(),s=rh(i)??i;if(n.files?.length>0){let o=oA(s,n.framework||"react"),a=t.path||await St({message:"Where should we copy the files?",initialValue:o,validate(u){if(u.length===0)return"File path is required!";if(u[0]!==".")return"Please enter a relative path."}});if(xe(a))return ge("Cancelled sync"),await pe(0);let c=await sx(s,n,n.files,a,!1);return I.success("All files have been written successfully."),{snippet:n,pathInput:a,writtenFiles:c,timeStamp:Date.now()}}else{let{code:o,suggestedName:a,framework:c}=n;c&&(a=await kxe(s,c,o)),a??="./src/components/MyComponent.jsx";let u=Q5(n,Fxe(n.code),n.framework);try{n.framework==="html"?u=await Ni(s,u,"html",void 0):n.framework==="angular"?u=await Ni(s,u,"angular",void 0):n.framework==="vue"?u=await Ni(s,u,"vue",void 0):n.framework==="svelte"?u=await Ni(s,u,"svelte",void 0):u=await Ni(s,u,"typescript",void 0)}catch{}let l=t.path;if(!l){try{let h=(await p4({cwd:process.cwd()})).getFrameworks();if(h.length>0){let f;if(h.some(g=>g.name.includes("qwik"))?f="qwik":h.some(g=>g.name.includes("react"))?f="react":f=h[0].name,n.framework&&n.framework!==f){let g=await hr({message:`This snippet is for ${n.framework}, but you are using ${f}. Continue?`,initialValue:!1});if(xe(g)||!g)return console.log("Please go back to builder and change the output framework to match your project."),console.log(),await pe(0)}}}catch{}if(l=await St({message:"Where should we copy the code?",initialValue:a?.startsWith("./")?a:`./${a}`,validate(d){if(d.length===0)return"File path is required!";if(d[0]!==".")return"Please enter a relative path."}}),xe(l))return console.log(""),await pe(0)}let p=(0,Xs.resolve)(s,l);I.info(`Writing code to ${p}`),(0,fn.mkdirSync)((0,Xs.dirname)(p),{recursive:!0}),(0,fn.writeFileSync)(p,u)}}function sA(t){return Pe(`https://cdn.builder.io/api/v1/snippet/${t}`).then(e=>e.status===404?null:e.json())}function Fxe(t){return t.replace(/^```jsx\s?|\s?```$/g,"").trim()}function Q5(t,e,r,n=!1){if(!r)return e;let i="This code was generated by Builder.io",s=n?`https://builder.io/content/${t.contentId}?codeSession=${t.sessionKey}&sid=${t.id}`:"",o=["vue","html","svelte"].includes(r.toLowerCase()),a=[i,s].filter(Boolean);return`${o?a.map(u=>`<!-- ${u} -->`).join(`
1460
+ `)}async function $j(t,e){let r=await AR(t),n=t.getFrameworks();return e.replace(/__LOCAL_APP_ID__/g,r).replace(/__DEV_TOOLS_URL__/g,t.devToolsServerUrl).replace(/__CLIENT_ID__/g,t.getClientId()).replace(/__FRAMEWORK__/g,n.length?n[0].name:"")}var jj=N(()=>{"use strict";m();it()});async function qj(t,e){let r=new URL("/cli-auth","https://builder.io");r.searchParams.set("client_id",t.getClientId()),r.searchParams.set("host",await t.getDeviceId()),r.searchParams.set("response_type","code"),r.searchParams.set("cli","true");let n=new URL(fu,t.devToolsServerUrl);n.searchParams.set(Ly,(0,Uj.platform)()),n.searchParams.set($y,process.versions.node);let i=t.getFrameworks();return i.length>0&&(r.searchParams.set(rp,i[0].name),n.searchParams.set(rp,i[0].name)),r.searchParams.set("redirect_url",n.href),r.searchParams.set("preview_url",e),r.href}var Uj,zj=N(()=>{"use strict";m();np();Uj=require("node:os")});async function Vj(t,e,r,n){try{if(!t)return ad(r,n,400,"Builder context closed");let i=Pxe(r);if(i.pathname===Uw){if(r.method==="POST"){let s=await Axe(r);if(s)try{let o=await Oj(t,JSON.parse(s));return Gj(r,n,200,o)}catch(o){t.debug("Dev API Error",o.stack||o.message||o);let a={errors:[String(o.message||o)]};return Gj(r,n,500,a)}}else if(r.method==="OPTIONS"){let s={"Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control, X-Builder-Devtools-Version, sentry-trace, baggage"},o=r.headers.origin;o&&o!=="null"?Hj(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return ad(r,n,405,`${Uw} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(i.pathname===qw)return Exe(r,n,200,await Bj(t));if(i.pathname===HN){let s=i.searchParams.get(jw);return s?Txe(n,302,await qj(t,s)):ad(r,n,400,`Missing ${jw} querystring`)}if(i.pathname===fu)return Sxe(r,n,200,await Lj(t));if(i.pathname===KN){await jt(t,{_:[]},{});let s=await Hu(t),{figmaBuilderLinks:o,diagnostics:a}=await hh({mappingFiles:s,sys:t});return mh(r,n,200,"application/json",JSON.stringify({figmaBuilderLinks:o,foundErrors:a.length>0,diagnostics:a,version:2,local:!0},null,2))}return i.pathname===mu?(t.debug(`Close Dev Tools Server Requested: ${i.href}`),setTimeout(()=>{try{e.close(s=>{t.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){t.debug(`Error closing devtools server: ${s}`)}},20),ad(r,n,200,"Closing Dev Tools Server")):ad(r,n,404,"Not found")}catch(i){return t?.Sentry?.captureException(i),ad(r,n,500,`Dev Server Error: ${i}`)}}function Gj(t,e,r,n){mh(t,e,r,"application/json",JSON.stringify(n))}function Exe(t,e,r,n){mh(t,e,r,"application/javascript",n)}function Sxe(t,e,r,n){mh(t,e,r,"text/html",n)}function ad(t,e,r,n){mh(t,e,r,"text/plain",n)}function mh(t,e,r,n,i){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":Ve},o=t.headers.origin;o&&o!=="null"?Hj(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",e.writeHead(r,s),e.end(i)}function Hj(t){return t.hostname==="localhost"||t.origin==="https://builder.io"||t.origin==="https://www.builder.io"||t.origin.endsWith(".builder.io")?!0:t.port===""?!1:t.port!=="80"&&t.port!=="443"}function Txe(t,e,r){t.writeHead(e,{Location:r}),t.end()}async function Axe(t){let e="";for await(let r of t)e+=r;return e}function Pxe(t){let e=t.url||"/";return new URL(e,`http://${t.headers.host}`)}var Kj=N(()=>{"use strict";m();np();Mj();jj();zj();Xr();cd();Nr()});async function Wj(t){if(globalThis.__builderDevToolsServer)return t.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(t),globalThis.__builderDevToolsServer;let e=await _xe(t),r=(0,ix.createServer)((i,s)=>{Vj(t,r,i,s)}),n=()=>new Promise((i,s)=>{r.listening?(t.debug(`closing devtools server on port ${e}`),r.close(o=>{t=null,o?(t.debug(`error closing devtools server on port ${e}`),s(o)):(t&&t.debug(`closed devtools server on port ${e}`),i())})):(t.debug(`devtools server on port ${e} not listening`),i())});return process.once("SIGTERM",n),process.once("SIGINT",n),process.env.CI!=="true"&&process.stdin.on("end",n),globalThis.__builderDevToolsServer={url:new URL(`http://localhost:${e}`).href,port:e,setContext:i=>{t.debug(`set devtools context on server ${e}`),t=i},close:async()=>{globalThis.__builderDevToolsServer=null,await n()}},new Promise(i=>{r.listen(e,()=>{t.debug(`started devtools server on port ${e}`),i(globalThis.__builderDevToolsServer)})})}function _xe(t){return new Promise(e=>{let r=t.port;try{(0,ix.request)({hostname:"localhost",port:r,path:mu,method:"GET"},i=>{i.on("end",()=>{t.debug(`${mu} - Response ended`),e(r)})}).on("error",i=>{t.debug(`${mu} - No response ${i}`),e(r)}).end()}catch(n){t.debug(`${mu} - Error ${n}`),e(r)}})}var ix,Jj=N(()=>{"use strict";m();ix=require("node:http");Kj();np()});async function nA(t){let e={...t,devToolsServerUrl:"",isValid:!1,serverShouldRestart:!1,publicApiKey:"",port:t.port||5273,ignoreMissingConfig:!1,getAllProjectFiles:t.getAllProjectFiles||(()=>Promise.resolve([]))},r=t.getFrameworks().map(s=>s.name).join(", ");e.debug(`create devtools ${Xj} [${r}]`);let n=await Wj(e);return e.devToolsServerUrl=n.url,e.port=n.port,{getUrl:()=>e.devToolsServerUrl}}var Yj=N(()=>{"use strict";m();Jj();iA()});var Xj,iA=N(()=>{"use strict";m();Nr();Yj();Xj=Ve});async function Zj(t){if(console.log(""),Tt((0,Tc.bgCyan)((0,Tc.bold)((0,Tc.white)(" add ")))+" "+(0,Tc.dim)(Ve)),!t.path&&!process.stdout.isTTY&&process.env.FORCE_TTY!=="1")return ge(`This command requires a TTY-enabled terminal.
1461
+ If you are using Windows Git Bash, try a different terminal or wrap the command with winpty.`),await pe(1);let e=t.snippetId;if(!e&&!t.snippet)return ge("SnippetId expected. npx builder.io add <snippetId>"),await pe(1);let r=mo(),n=t.snippet||null;if(!n&&e&&(r.start(`Fetching snippet ${e}`),n=await sA(e),r.stop(`Fetched snippet ${e}`)),!n)return ge(`No snippet found for id ${e}`),await pe(1);let i=process.cwd(),s=rh(i)??i;if(n.files?.length>0){let o=oA(s,n.framework||"react"),a=t.path||await St({message:"Where should we copy the files?",initialValue:o,validate(u){if(u.length===0)return"File path is required!";if(u[0]!==".")return"Please enter a relative path."}});if(xe(a))return ge("Cancelled sync"),await pe(0);let c=await sx(s,n,n.files,a,!1);return I.success("All files have been written successfully."),{snippet:n,pathInput:a,writtenFiles:c,timeStamp:Date.now()}}else{let{code:o,suggestedName:a,framework:c}=n;c&&(a=await kxe(s,c,o)),a??="./src/components/MyComponent.jsx";let u=Qj(n,Fxe(n.code),n.framework);try{n.framework==="html"?u=await Ni(s,u,"html",void 0):n.framework==="angular"?u=await Ni(s,u,"angular",void 0):n.framework==="vue"?u=await Ni(s,u,"vue",void 0):n.framework==="svelte"?u=await Ni(s,u,"svelte",void 0):u=await Ni(s,u,"typescript",void 0)}catch{}let l=t.path;if(!l){try{let h=(await p4({cwd:process.cwd()})).getFrameworks();if(h.length>0){let f;if(h.some(g=>g.name.includes("qwik"))?f="qwik":h.some(g=>g.name.includes("react"))?f="react":f=h[0].name,n.framework&&n.framework!==f){let g=await hr({message:`This snippet is for ${n.framework}, but you are using ${f}. Continue?`,initialValue:!1});if(xe(g)||!g)return console.log("Please go back to builder and change the output framework to match your project."),console.log(),await pe(0)}}}catch{}if(l=await St({message:"Where should we copy the code?",initialValue:a?.startsWith("./")?a:`./${a}`,validate(d){if(d.length===0)return"File path is required!";if(d[0]!==".")return"Please enter a relative path."}}),xe(l))return console.log(""),await pe(0)}let p=(0,Xs.resolve)(s,l);I.info(`Writing code to ${p}`),(0,fn.mkdirSync)((0,Xs.dirname)(p),{recursive:!0}),(0,fn.writeFileSync)(p,u)}}function sA(t){return Pe(`https://cdn.builder.io/api/v1/snippet/${t}`).then(e=>e.status===404?null:e.json())}function Fxe(t){return t.replace(/^```jsx\s?|\s?```$/g,"").trim()}function Qj(t,e,r,n=!1){if(!r)return e;let i="This code was generated by Builder.io",s=n?`https://builder.io/content/${t.contentId}?codeSession=${t.sessionKey}&sid=${t.id}`:"",o=["vue","html","svelte"].includes(r.toLowerCase()),a=[i,s].filter(Boolean);return`${o?a.map(u=>`<!-- ${u} -->`).join(`
1462
1462
  `):`/**
1463
1463
  ${a.map(u=>` * ${u}`).join(`
1464
1464
  `)}
1465
1465
  */`}
1466
- ${e}`}async function kxe(t,e,r){let n,i=Nxe(r,e.toLowerCase());switch(e.toLowerCase()){case"react":let s=await Ixe(t);n=`components/${i||"MyComponent"}.${s?"tsx":"jsx"}`;break;case"angular":n=`app/components/${i||"my-component"}.component.ts`;break;case"vue":n=`components/${i||"MyComponent"}.vue`;break;case"svelte":n=`components/${i||"MyComponent"}.svelte`;break;case"html":n=`${i||"my-design"}.html`;break;case"qwik":n=`components/${i||"MyComponent"}.tsx`;break;default:n=`components/${i||"MyComponent"}.tsx`}return n=(0,fn.existsSync)("./src")?`./src/${n}`:`./${n}`,n}async function Ixe(t){if((0,fn.existsSync)((0,Xs.join)(t,"./tsconfig.json")))return!0;let e=HS(t);return e&&(0,fn.existsSync)((0,Xs.join)(e,"./package.json"))?(0,fn.readFileSync)((0,Xs.join)(e,"./package.json"),"utf-8").includes("typescript"):!1}function Nxe(t,e){let r={vue:/name:\s*'([^']+)'/,react:/function (\w+)\([\w\W]+\)/,qwik:/export const (\w+) = component\$/,angular:/selector:\s*'([^']+)'/};if(!r[e])return null;let n=t.match(r[e]);return e==="react"&&!n?.[1]?t.match(/const (\w+)[\w\W]+=\s*\(/)?.[1]||null:n?.[1]||null}async function sx(t,e,r,n,i){let s=[];for(let o of r){let a=Rxe(n,o.path),c=(0,Xs.resolve)(t,a);if("code"in o){let u=await Mxe(t,e,o.code,Oxe(o.path),i);(0,fn.existsSync)(c)||(0,fn.mkdirSync)((0,Xs.dirname)(c),{recursive:!0}),(0,fn.writeFileSync)(c,u),s.push({...o,path:a,code:u,timestamp:(0,fn.statSync)(c).mtime.getTime()}),I.info(`Writing file to ${c}`)}else(0,fn.mkdirSync)(c,{recursive:!0}),s=s.concat(await sx(t,e,o.files,a,i))}return s}function Rxe(t,e){let r=t.replace(/^\.?\/+|\/+$/g,""),n=e.replace(/^\.?\/+|\/+$/g,""),i=r.split("/").filter(Boolean),s=n.split("/").filter(Boolean),o=-1;for(let c=0;c<i.length;c++){let u=s.indexOf(i[c]);u!==-1&&(o=u)}return[...i,...s.slice(o+1)].join("/")}function Oxe(t){switch(t.split(".").pop()?.toLowerCase()){case"html":case"svelte":return"html";case"vue":return"vue";case"ts":case"tsx":case"js":case"jsx":return"typescript";case"css":return"css";case"json":return"json";default:return"typescript"}}async function Mxe(t,e,r,n,i){let s=r;try{s=await Ni(t,r,n,void 0)}catch{}return i?Q5(e,s,n,i):s}function oA(t,e){let n=(0,fn.existsSync)((0,Xs.join)(t,"src"))?"src/":"";switch(e.toLowerCase()){case"angular":return`./${n}app/components/`;case"html":return"./";default:return`./${n}components/`}}var Xs,fn,Tc,aA=N(()=>{"use strict";m();Bt();Xs=require("node:path"),fn=require("node:fs");nh();Jf();Tc=V(mr(),1);is();jr();Nr()});function iU(t){let e=t.match(/builder\.io\/content\/([^?]+)\?codeSession=([^&]+)&sid=([^\s]+)/);return e?{contentId:e[1],sessionKey:e[2],snippetId:e[3]}:{}}async function Ku({basePath:t,globPattern:e="**/*",extraIgnorePatterns:r,dot:n,deep:i=12,gitignore:s,sys:o}){let a=Array.isArray(e)?[...e]:[e],c=[...uA,...r||[]],u=a.findIndex(l=>l.includes("node_modules"));u>-1?a.splice(u,0,"!**/node_modules"):c.push("**/node_modules");try{return await QT(a,{cwd:t,ignoreFiles:cA,ignore:c,absolute:!1,onlyFiles:!0,dot:n,gitignore:s,suppressErrors:!0,deep:i})}catch(l){throw o?.Sentry?.captureException(l,{tags:{errorType:"filesystem_permission",component:"getAllProjectFiles"},extra:{basePath:t,patterns:a,errorCode:l.code}}),l}}async function Bxe(t,e,r){let n=await QT("**/*",{cwd:t,ignoreFiles:cA,ignore:uA}),i=[];for(let s of n){let o=(0,hi.resolve)(t,s);try{let a=(0,gi.readFileSync)(o,"utf-8");if(a.includes("This code was generated by Builder.io")){let c=iU(a);if(e&&r&&(c.contentId!==e||c.sessionKey!==r))continue;i.push({path:s,code:ox(a),name:s.split("/").pop()||"",timestamp:(0,gi.statSync)(o).mtime.getTime(),snippetId:c.snippetId})}}catch(a){console.error(`Error reading file ${o}:`,a)}}return i}function Lxe(t,e){let r=iU(t);return r.contentId===e.contentId&&r.sessionKey===e.sessionKey}function sU(t){return t.filter(e=>(e=e.toLowerCase(),!e.endsWith(".png")&&!e.endsWith(".jpg")&&!e.endsWith(".jpeg")&&!e.endsWith(".gif")&&!e.endsWith(".ico")&&!e.endsWith(".webp")&&!e.includes(".mapper.")))}function lA(t){let e=(0,nU.default)().add(uA);function r(n){try{let i=(0,hi.resolve)(t,n);if((0,gi.existsSync)(i)){let s=(0,gi.readFileSync)(i,"utf8");e.add(s)}}catch(i){console.debug(`No ${n} found or error reading it:`,i)}}for(let n of cA)r(n);return n=>{let i=n.split(hi.sep).join("/");return e.ignores(i)}}function eU(t,e,r){let n=lA(t),i=rU.default.watch(t,{ignored:n,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:500,pollInterval:600},ignorePermissionErrors:!0,followSymlinks:!1,atomic:600}),s=async a=>{let c=(0,hi.relative)(t,a);try{let u=(0,gi.readFileSync)(a,"utf-8");if(Lxe(u,e.snippet)){let l=e.writtenFiles.find(p=>p.path===c);l?(l.code=ox(u),l.timestamp=Date.now()):e.writtenFiles.push({path:c,code:ox(u),timestamp:Date.now(),name:c.split("/").pop()||""}),e.timeStamp=Date.now(),r(e)}}catch(u){console.debug(`Error reading file ${a}:`,u)}};i.on("add",async a=>{I.info(`File added: ${a}`),await s(a)}).on("change",async a=>{I.info(`File changed: ${a}`),await s(a)}).on("unlink",a=>{I.info(`File deleted: ${a}`);let c=(0,hi.relative)(t,a);e.writtenFiles=e.writtenFiles.filter(u=>u.path!==c),e.timeStamp=Date.now(),r(e)}).on("unlinkDir",a=>{I.info(`Folder deleted: ${a}`);let c=(0,hi.relative)(t,a);e.writtenFiles=e.writtenFiles.filter(u=>!u.path.startsWith(c)),e.timeStamp=Date.now(),r(e)}).on("ready",()=>{console.debug("Initial scan complete. Ready for changes.")}).on("error",a=>{console.error(`Watcher error: ${a}`)}),i.on("raw",async(a,c,u)=>{if(a==="rename"){I.info(`File renamed: ${u?.oldPath} -> ${c}`);let l=u?.oldPath?(0,hi.relative)(t,u.oldPath):void 0,p=c?(0,hi.relative)(t,c):void 0;if(l&&p){let d=e.writtenFiles.find(h=>h.path===l);d&&(d.path=p,e.timeStamp=Date.now(),r(e))}}});let o=async()=>{await i.close()};return process.on("SIGINT",o),process.on("SIGTERM",o),o}async function oU(t,e){console.log(""),Tt((0,Ac.bgMagenta)((0,Ac.bold)((0,Ac.white)(" sync server ")))+" "+(0,Ac.dim)(Ve)),t.debug("builder sync server init");let r=await pc(t),n=e,i=()=>Promise.resolve();n&&setTimeout(()=>{i=eU(t.getAppRootDir(),n,s=>{n=s})},1e3),await nA({...r,ensureFigmaImportPage:()=>Promise.reject("Not supported"),getPastSyncInfo:({sessionKey:s,since:o})=>!n||s!==n.snippet.sessionKey?null:{...n,hasChanged:n.timeStamp>o},resyncSnippet:async s=>{await i();let o=await pA({path:n?.pathInput,snippet:s.snippet,cwd:t.getAppRootDir()});return o&&(n=o,i=eU(t.getAppRootDir(),n,a=>{n=a})),n},getClientId:()=>"builder-sync-cli",closeAppServer:async()=>{await i()},restartAppServer:async()=>{t.debug("restart server")},enableAppWatch:async s=>s,...t})}async function pA(t){let e=t.snippetId,r=t.snippet||null;if(!r&&e&&(r=await sA(e)),!r)return ge(`No snippet found for id ${e}`),await pe(1);let n=process.cwd(),i=rh(n)??n,s=await Bxe(i,r.contentId,r.sessionKey),o=s.filter(p=>p.snippetId===r.id);if(I.info(`Found ${o.length} matching files for snippet ${r.id} in existing files ${s.length}`),o.length>0){let p=Math.max(...o.map(d=>d.timestamp||0));return{snippet:r,writtenFiles:o,pathInput:tU(o.map(d=>d.path)),timeStamp:p}}let a=oA(i,r.framework||"react"),c=t.path||tU(s.map(p=>p.path))||await St({message:"Where should we copy the files?",initialValue:a,validate(p){if(p.length===0)return"File path is required!";if(p[0]!==".")return"Please enter a relative path."}});xe(c)&&(ge("Cancelled sync"),process.exit(0));for(let p of s){let d=(0,hi.resolve)(i,p.path);try{(0,gi.unlinkSync)(d),I.info(`Deleted old file: ${d}`);let h=(0,hi.dirname)(d);(0,gi.readdirSync)(h).length===0&&((0,gi.rmdirSync)(h),I.info(`Deleted empty folder: ${h}`))}catch(h){I.error(`Error cleaning up file ${d}: ${h}`)}}let u=await sx(i,r,r.files,c,!0);I.success("All files have been written successfully.");let l=Math.max(...u.map(p=>p.timestamp||0));return{snippet:r,writtenFiles:u.map(p=>({...p,code:ox(p.code)})),pathInput:c,timeStamp:l||Date.now()}}function ox(t){if(!t)return t;let e=/<!--\s*This code was generated by Builder\.io\s*-->\s*(?:<!--\s*https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*-->\s*)?/,r=/\/\*\*\s*\n\s*\* This code was generated by Builder\.io\s*\n\s*\* https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*\n\s*\*\/\s*/,n=t.replace(e,"").replace(r,"");return n=n.replace(/^\n+/,""),n}function tU(t){if(t.length===0)return"";if(t.length===1)return`./${t[0].slice(0,t[0].lastIndexOf("/")+1)}`;let e=t.map(i=>i.split("/")),r=Math.min(...e.map(i=>i.length)),n=[];for(let i=0;i<r;i++){let s=e[0][i];if(e.every(o=>o[i]===s))n.push(s);else break}return`./${n.join("/")}`}var hi,gi,Ac,rU,nU,cA,uA,gh=N(()=>{"use strict";m();hi=require("node:path"),gi=require("node:fs"),Ac=V(mr(),1);v5();Cm();iA();aA();Bt();rU=V(require("chokidar"),1),nU=V(require("ignore"),1);is();nh();Nr();cA=[".gitignore",".builderignore"],uA=["**/*.snap","**/*.liquid","**/.git","**/dist","**/*.pyc","**/.DS_Store","**/.vscode","**/__pycache__","**/coverage","**/.next","**/coverage","**/example","**/__snapshots__","**/.gradle","**/xcuserdata","**/.build","**/*.zip","**/*.pem","**/*.key","**/*.p12","**/*.pfx","**/*.cer","**/*.crt","**/*.der","**/*.p7b","**/*.p7c","**/*.jks","**/*.keystore","**/id_rsa","**/id_rsa.*","**/id_dsa","**/id_dsa.*","**/id_ecdsa","**/id_ecdsa.*","**/id_ed25519","**/id_ed25519.*","**/.ssh/**","**/known_hosts","**/authorized_keys","**/.aws/**","**/credentials","**/.gcp/**","**/.azure/**","**/gcloud/**","**/google-credentials.json","**/gcp-key.json","**/service-account*.json","**/.pypirc","**/.dockercfg","**/.docker/config.json","**/token.json","**/tokens.json","**/secrets.json","**/secret.json","**/api-keys.json","**/apikeys.json","**/*.sql","**/*.sqlite","**/*.sqlite3","**/*.db","**/*.dump","**/*.bak","**/passwd","**/.htpasswd","**/shadow","**/.git-credentials","**/.gitconfig","**/.netrc","**/kubeconfig","**/.kube/**","**/k8s-secrets.yaml","**/k8s-secrets.yml","**/*.tfstate","**/*.tfstate.*","**/.terraform/**","**/.history","**/.bash_history","**/.zsh_history","**/wallet.dat","**/.gnupg/**","**/private.xml","**/signing.properties","**/*.ovpn","**/wp-config.php","**/config.inc.php","**/local_settings.py","**/database.yml","**/secrets.yml","**/.tox/**","**/firebase-adminsdk*.json","**/firebaseConfig.json","**/google-services.json","**/GoogleService-Info.plist"]});function Zs(t){switch(qe("cli help",{subcommand:t}),console.log(""),Tt((0,j.bgCyan)((0,j.bold)((0,j.white)(" help ")))+" "+(0,j.dim)(Ve)),t){case"add":case"generate":case"gen":case"g":Tt(`${(0,j.cyan)("\u2192")} ${(0,j.bold)("Generate Figma Components")}
1466
+ ${e}`}async function kxe(t,e,r){let n,i=Nxe(r,e.toLowerCase());switch(e.toLowerCase()){case"react":let s=await Ixe(t);n=`components/${i||"MyComponent"}.${s?"tsx":"jsx"}`;break;case"angular":n=`app/components/${i||"my-component"}.component.ts`;break;case"vue":n=`components/${i||"MyComponent"}.vue`;break;case"svelte":n=`components/${i||"MyComponent"}.svelte`;break;case"html":n=`${i||"my-design"}.html`;break;case"qwik":n=`components/${i||"MyComponent"}.tsx`;break;default:n=`components/${i||"MyComponent"}.tsx`}return n=(0,fn.existsSync)("./src")?`./src/${n}`:`./${n}`,n}async function Ixe(t){if((0,fn.existsSync)((0,Xs.join)(t,"./tsconfig.json")))return!0;let e=HS(t);return e&&(0,fn.existsSync)((0,Xs.join)(e,"./package.json"))?(0,fn.readFileSync)((0,Xs.join)(e,"./package.json"),"utf-8").includes("typescript"):!1}function Nxe(t,e){let r={vue:/name:\s*'([^']+)'/,react:/function (\w+)\([\w\W]+\)/,qwik:/export const (\w+) = component\$/,angular:/selector:\s*'([^']+)'/};if(!r[e])return null;let n=t.match(r[e]);return e==="react"&&!n?.[1]?t.match(/const (\w+)[\w\W]+=\s*\(/)?.[1]||null:n?.[1]||null}async function sx(t,e,r,n,i){let s=[];for(let o of r){let a=Rxe(n,o.path),c=(0,Xs.resolve)(t,a);if("code"in o){let u=await Mxe(t,e,o.code,Oxe(o.path),i);(0,fn.existsSync)(c)||(0,fn.mkdirSync)((0,Xs.dirname)(c),{recursive:!0}),(0,fn.writeFileSync)(c,u),s.push({...o,path:a,code:u,timestamp:(0,fn.statSync)(c).mtime.getTime()}),I.info(`Writing file to ${c}`)}else(0,fn.mkdirSync)(c,{recursive:!0}),s=s.concat(await sx(t,e,o.files,a,i))}return s}function Rxe(t,e){let r=t.replace(/^\.?\/+|\/+$/g,""),n=e.replace(/^\.?\/+|\/+$/g,""),i=r.split("/").filter(Boolean),s=n.split("/").filter(Boolean),o=-1;for(let c=0;c<i.length;c++){let u=s.indexOf(i[c]);u!==-1&&(o=u)}return[...i,...s.slice(o+1)].join("/")}function Oxe(t){switch(t.split(".").pop()?.toLowerCase()){case"html":case"svelte":return"html";case"vue":return"vue";case"ts":case"tsx":case"js":case"jsx":return"typescript";case"css":return"css";case"json":return"json";default:return"typescript"}}async function Mxe(t,e,r,n,i){let s=r;try{s=await Ni(t,r,n,void 0)}catch{}return i?Qj(e,s,n,i):s}function oA(t,e){let n=(0,fn.existsSync)((0,Xs.join)(t,"src"))?"src/":"";switch(e.toLowerCase()){case"angular":return`./${n}app/components/`;case"html":return"./";default:return`./${n}components/`}}var Xs,fn,Tc,aA=N(()=>{"use strict";m();Bt();Xs=require("node:path"),fn=require("node:fs");nh();Jf();Tc=V(mr(),1);is();jr();Nr()});function iU(t){let e=t.match(/builder\.io\/content\/([^?]+)\?codeSession=([^&]+)&sid=([^\s]+)/);return e?{contentId:e[1],sessionKey:e[2],snippetId:e[3]}:{}}async function Ku({basePath:t,globPattern:e="**/*",extraIgnorePatterns:r,dot:n,deep:i=12,gitignore:s,sys:o}){let a=Array.isArray(e)?[...e]:[e],c=[...uA,...r||[]],u=a.findIndex(l=>l.includes("node_modules"));u>-1?a.splice(u,0,"!**/node_modules"):c.push("**/node_modules");try{return await QT(a,{cwd:t,ignoreFiles:cA,ignore:c,absolute:!1,onlyFiles:!0,dot:n,gitignore:s,suppressErrors:!0,deep:i})}catch(l){throw o?.Sentry?.captureException(l,{tags:{errorType:"filesystem_permission",component:"getAllProjectFiles"},extra:{basePath:t,patterns:a,errorCode:l.code}}),l}}async function Bxe(t,e,r){let n=await QT("**/*",{cwd:t,ignoreFiles:cA,ignore:uA}),i=[];for(let s of n){let o=(0,hi.resolve)(t,s);try{let a=(0,gi.readFileSync)(o,"utf-8");if(a.includes("This code was generated by Builder.io")){let c=iU(a);if(e&&r&&(c.contentId!==e||c.sessionKey!==r))continue;i.push({path:s,code:ox(a),name:s.split("/").pop()||"",timestamp:(0,gi.statSync)(o).mtime.getTime(),snippetId:c.snippetId})}}catch(a){console.error(`Error reading file ${o}:`,a)}}return i}function Lxe(t,e){let r=iU(t);return r.contentId===e.contentId&&r.sessionKey===e.sessionKey}function sU(t){return t.filter(e=>(e=e.toLowerCase(),!e.endsWith(".png")&&!e.endsWith(".jpg")&&!e.endsWith(".jpeg")&&!e.endsWith(".gif")&&!e.endsWith(".ico")&&!e.endsWith(".webp")&&!e.includes(".mapper.")))}function lA(t){let e=(0,nU.default)().add(uA);function r(n){try{let i=(0,hi.resolve)(t,n);if((0,gi.existsSync)(i)){let s=(0,gi.readFileSync)(i,"utf8");e.add(s)}}catch(i){console.debug(`No ${n} found or error reading it:`,i)}}for(let n of cA)r(n);return n=>{let i=n.split(hi.sep).join("/");return e.ignores(i)}}function eU(t,e,r){let n=lA(t),i=rU.default.watch(t,{ignored:n,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:500,pollInterval:600},ignorePermissionErrors:!0,followSymlinks:!1,atomic:600}),s=async a=>{let c=(0,hi.relative)(t,a);try{let u=(0,gi.readFileSync)(a,"utf-8");if(Lxe(u,e.snippet)){let l=e.writtenFiles.find(p=>p.path===c);l?(l.code=ox(u),l.timestamp=Date.now()):e.writtenFiles.push({path:c,code:ox(u),timestamp:Date.now(),name:c.split("/").pop()||""}),e.timeStamp=Date.now(),r(e)}}catch(u){console.debug(`Error reading file ${a}:`,u)}};i.on("add",async a=>{I.info(`File added: ${a}`),await s(a)}).on("change",async a=>{I.info(`File changed: ${a}`),await s(a)}).on("unlink",a=>{I.info(`File deleted: ${a}`);let c=(0,hi.relative)(t,a);e.writtenFiles=e.writtenFiles.filter(u=>u.path!==c),e.timeStamp=Date.now(),r(e)}).on("unlinkDir",a=>{I.info(`Folder deleted: ${a}`);let c=(0,hi.relative)(t,a);e.writtenFiles=e.writtenFiles.filter(u=>!u.path.startsWith(c)),e.timeStamp=Date.now(),r(e)}).on("ready",()=>{console.debug("Initial scan complete. Ready for changes.")}).on("error",a=>{console.error(`Watcher error: ${a}`)}),i.on("raw",async(a,c,u)=>{if(a==="rename"){I.info(`File renamed: ${u?.oldPath} -> ${c}`);let l=u?.oldPath?(0,hi.relative)(t,u.oldPath):void 0,p=c?(0,hi.relative)(t,c):void 0;if(l&&p){let d=e.writtenFiles.find(h=>h.path===l);d&&(d.path=p,e.timeStamp=Date.now(),r(e))}}});let o=async()=>{await i.close()};return process.on("SIGINT",o),process.on("SIGTERM",o),o}async function oU(t,e){console.log(""),Tt((0,Ac.bgMagenta)((0,Ac.bold)((0,Ac.white)(" sync server ")))+" "+(0,Ac.dim)(Ve)),t.debug("builder sync server init");let r=await pc(t),n=e,i=()=>Promise.resolve();n&&setTimeout(()=>{i=eU(t.getAppRootDir(),n,s=>{n=s})},1e3),await nA({...r,ensureFigmaImportPage:()=>Promise.reject("Not supported"),getPastSyncInfo:({sessionKey:s,since:o})=>!n||s!==n.snippet.sessionKey?null:{...n,hasChanged:n.timeStamp>o},resyncSnippet:async s=>{await i();let o=await pA({path:n?.pathInput,snippet:s.snippet,cwd:t.getAppRootDir()});return o&&(n=o,i=eU(t.getAppRootDir(),n,a=>{n=a})),n},getClientId:()=>"builder-sync-cli",closeAppServer:async()=>{await i()},restartAppServer:async()=>{t.debug("restart server")},enableAppWatch:async s=>s,...t})}async function pA(t){let e=t.snippetId,r=t.snippet||null;if(!r&&e&&(r=await sA(e)),!r)return ge(`No snippet found for id ${e}`),await pe(1);let n=process.cwd(),i=rh(n)??n,s=await Bxe(i,r.contentId,r.sessionKey),o=s.filter(p=>p.snippetId===r.id);if(I.info(`Found ${o.length} matching files for snippet ${r.id} in existing files ${s.length}`),o.length>0){let p=Math.max(...o.map(d=>d.timestamp||0));return{snippet:r,writtenFiles:o,pathInput:tU(o.map(d=>d.path)),timeStamp:p}}let a=oA(i,r.framework||"react"),c=t.path||tU(s.map(p=>p.path))||await St({message:"Where should we copy the files?",initialValue:a,validate(p){if(p.length===0)return"File path is required!";if(p[0]!==".")return"Please enter a relative path."}});xe(c)&&(ge("Cancelled sync"),process.exit(0));for(let p of s){let d=(0,hi.resolve)(i,p.path);try{(0,gi.unlinkSync)(d),I.info(`Deleted old file: ${d}`);let h=(0,hi.dirname)(d);(0,gi.readdirSync)(h).length===0&&((0,gi.rmdirSync)(h),I.info(`Deleted empty folder: ${h}`))}catch(h){I.error(`Error cleaning up file ${d}: ${h}`)}}let u=await sx(i,r,r.files,c,!0);I.success("All files have been written successfully.");let l=Math.max(...u.map(p=>p.timestamp||0));return{snippet:r,writtenFiles:u.map(p=>({...p,code:ox(p.code)})),pathInput:c,timeStamp:l||Date.now()}}function ox(t){if(!t)return t;let e=/<!--\s*This code was generated by Builder\.io\s*-->\s*(?:<!--\s*https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*-->\s*)?/,r=/\/\*\*\s*\n\s*\* This code was generated by Builder\.io\s*\n\s*\* https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*\n\s*\*\/\s*/,n=t.replace(e,"").replace(r,"");return n=n.replace(/^\n+/,""),n}function tU(t){if(t.length===0)return"";if(t.length===1)return`./${t[0].slice(0,t[0].lastIndexOf("/")+1)}`;let e=t.map(i=>i.split("/")),r=Math.min(...e.map(i=>i.length)),n=[];for(let i=0;i<r;i++){let s=e[0][i];if(e.every(o=>o[i]===s))n.push(s);else break}return`./${n.join("/")}`}var hi,gi,Ac,rU,nU,cA,uA,gh=N(()=>{"use strict";m();hi=require("node:path"),gi=require("node:fs"),Ac=V(mr(),1);vj();Cm();iA();aA();Bt();rU=V(require("chokidar"),1),nU=V(require("ignore"),1);is();nh();Nr();cA=[".gitignore",".builderignore"],uA=["**/*.snap","**/*.liquid","**/.git","**/dist","**/*.pyc","**/.DS_Store","**/.vscode","**/__pycache__","**/coverage","**/.next","**/coverage","**/example","**/__snapshots__","**/.gradle","**/xcuserdata","**/.build","**/*.zip","**/*.pem","**/*.key","**/*.p12","**/*.pfx","**/*.cer","**/*.crt","**/*.der","**/*.p7b","**/*.p7c","**/*.jks","**/*.keystore","**/id_rsa","**/id_rsa.*","**/id_dsa","**/id_dsa.*","**/id_ecdsa","**/id_ecdsa.*","**/id_ed25519","**/id_ed25519.*","**/.ssh/**","**/known_hosts","**/authorized_keys","**/.aws/**","**/credentials","**/.gcp/**","**/.azure/**","**/gcloud/**","**/google-credentials.json","**/gcp-key.json","**/service-account*.json","**/.pypirc","**/.dockercfg","**/.docker/config.json","**/token.json","**/tokens.json","**/secrets.json","**/secret.json","**/api-keys.json","**/apikeys.json","**/*.sql","**/*.sqlite","**/*.sqlite3","**/*.db","**/*.dump","**/*.bak","**/passwd","**/.htpasswd","**/shadow","**/.git-credentials","**/.gitconfig","**/.netrc","**/kubeconfig","**/.kube/**","**/k8s-secrets.yaml","**/k8s-secrets.yml","**/*.tfstate","**/*.tfstate.*","**/.terraform/**","**/.history","**/.bash_history","**/.zsh_history","**/wallet.dat","**/.gnupg/**","**/private.xml","**/signing.properties","**/*.ovpn","**/wp-config.php","**/config.inc.php","**/local_settings.py","**/database.yml","**/secrets.yml","**/.tox/**","**/firebase-adminsdk*.json","**/firebaseConfig.json","**/google-services.json","**/GoogleService-Info.plist"]});function Zs(t){switch(qe("cli help",{subcommand:t}),console.log(""),Tt((0,j.bgCyan)((0,j.bold)((0,j.white)(" help ")))+" "+(0,j.dim)(Ve)),t){case"add":case"generate":case"gen":case"g":Tt(`${(0,j.cyan)("\u2192")} ${(0,j.bold)("Generate Figma Components")}
1467
1467
 
1468
1468
  ${(0,j.bgGreen)((0,j.white)(` npx ${Jt()} figma generate URL [URL ...] `))}
1469
1469
 
@@ -2017,7 +2017,7 @@ ${b}
2017
2017
  `),C.write(F)),y=C}let b=Date.now(),D={terminalId:n,title:e?.title||`Terminal ${this.#d.size+1}`,cwd:f,createdAt:b,lastWrittenAt:b,createdBy:e?.createdBy||"unknown",readonly:e?.readonly??!1,initialCommand:e?.initialCommand,builtIn:!1,state:g,exitCode:void 0};return this.#d.set(n,{...D,pty:y,onDataListeners:s,onExitListeners:o,disposeFns:p,env:e?.env,shell:a,inheritCredentials:e?.inheritCredentials}),(e?.emitTerminals??!0)&&this.emitTerminals(),D}#me(){let e=this.getSessionContext(),r=Array.from(this.#d.values()).map(i=>({terminalId:i.terminalId,title:i.title,cwd:i.cwd,createdAt:i.createdAt,lastWrittenAt:i.lastWrittenAt,createdBy:i.createdBy,readonly:i.readonly,builtIn:i.builtIn,exitCode:i.exitCode,state:i.state}));this.#S?.includes("Bash")&&r.unshift({terminalId:"bash-tools",title:"Bash",cwd:this.#m,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!0,builtIn:!0,exitCode:void 0,state:"running"});let n=this.#t?.devServerOrchestrator;if(n){let i=Date.now();if(n.validateCommandState!=="unset"){let s;switch(n.validateCommandState){case"running":s="running";break;case"success":s="exited";break;case"failure":s="error";break;case"stopped":s="exited";break}r.unshift({terminalId:"validate-command",title:"Validate Command",cwd:this.#m,createdAt:e.createdUnixTime,lastWrittenAt:i,createdBy:"fusion",readonly:!0,builtIn:!0,state:s,exitCode:void 0})}r.unshift({terminalId:"dev-command",title:"Dev Command",cwd:this.#m,createdAt:e.createdUnixTime,lastWrittenAt:i,createdBy:"fusion",readonly:!n.devCommandProcess?.write,builtIn:!0,state:n.devState==="running"?"running":"exited",exitCode:void 0},{terminalId:"setup-command",title:"Setup Command",cwd:this.#m,createdAt:e.createdUnixTime,lastWrittenAt:i,createdBy:"fusion",readonly:!0,builtIn:!0,state:n.setupState==="installing"?"running":"exited",exitCode:void 0})}return r}emitTerminals(){this.#n.emit("step",{type:"terminals",terminals:this.#me()})}updateTerminal({terminalId:e,cols:r,rows:n,title:i}){if(e==="dev-command"){if(r||n){let o=this.#t?.devServerOrchestrator;if(o?.devCommandProcess?.resize)return o.devCommandProcess.resize(r,n),!0}return!1}let s=this.#d.get(e);return s?("resize"in s.pty&&(r||n)&&s.pty.resize(r??s.pty.cols,n??s.pty.rows),i&&(s.title=i,this.emitTerminals()),!0):!1}writeTerminal({terminalId:e,data:r}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;return i?.devCommandProcess?.write?(i.devCommandProcess.write(r),!0):!1}let n=this.#d.get(e);return!n||n.readonly?!1:("write"in n.pty&&n.pty.write(r),n.lastWrittenAt=Date.now(),!0)}signalTerminal({terminalId:e,signal:r}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;return i?.devCommandProcess?.kill?(i.devCommandProcess.kill(r),!0):!1}let n=this.#d.get(e);if(!n||n.readonly)return!1;try{"write"in n.pty?process.platform==="win32"?n.pty.kill():(r==="SIGINT"&&n.pty.write(""),n.pty.kill(r)):n.pty.kill(r)}catch{}return!0}disposeTerminal({terminalId:e,emitTerminals:r=!0}){let n=this.#d.get(e);if(!n)return!1;try{n.pty.kill()}catch{}return n.disposeFns.forEach(i=>{try{i()}catch{}}),n.onDataListeners.clear(),n.onExitListeners.clear(),n.disposeFns=[],this.#d.delete(e),r&&this.emitTerminals(),!0}async restartTerminal({terminalId:e}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;if(i)try{return await i.restart(),!0}catch(s){return this.#e.Sentry?.captureException(s),!1}return!1}if(e==="setup-command"){let i=this.#t?.devServerOrchestrator;if(i)try{return await i.runSetupCommand(),!0}catch(s){return this.#e.Sentry?.captureException(s),!1}return!1}if(e==="validate-command"){let i=this.#t?.devServerOrchestrator;if(i)try{return await i.runValidateCommand(),!0}catch(s){return this.#e.Sentry?.captureException(s),!1}return!1}if(e==="bash-tools")return!1;let r=this.#d.get(e);return r?(await this.createTerminal({terminalId:e,title:r.title,cwd:r.cwd,env:r.env,shell:r.shell,cols:"cols"in r.pty?r.pty.cols:void 0,rows:"rows"in r.pty?r.pty.rows:void 0,createdBy:r.createdBy,emitTerminals:!1,initialCommand:r.initialCommand,readonly:r.readonly,inheritCredentials:r.inheritCredentials,force:!0}),this.#d.get(e)?(this.emitTerminals(),!0):!1):!1}subscribeTerminal({terminalId:e,onData:r,onExit:n}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;if(i){let s=i.getDevWrite();return s&&r(s),i.emitter.on("stdout",r),i.emitter.on("stderr",r),()=>{i.emitter.off("stdout",r),i.emitter.off("stderr",r)}}}else if(e==="setup-command"){let i=this.#t?.devServerOrchestrator;if(i){let s=i.getSetupOutput();return s&&r(s),i.emitter.on("installStdout",r),i.emitter.on("installStderr",r),()=>{i.emitter.off("installStdout",r),i.emitter.off("installStderr",r)}}}else if(e==="validate-command"){let i=this.#t?.devServerOrchestrator;if(i){let s=i.getValidateOutput();return s&&r(s),i.emitter.on("validateStdout",r),i.emitter.on("validateStderr",r),()=>{i.emitter.off("validateStdout",r),i.emitter.off("validateStderr",r)}}}else if(e==="bash-tools"){let i=s=>{s.type==="stdio"&&s.source==="tool-command"&&r(s.content)};return this.#n.on("step",i),()=>{this.#n.off("step",i)}}else{let i=this.#d.get(e);if(!i)throw new Error("Terminal not found");return i.onDataListeners.add(r),n&&i.onExitListeners.add(n),"write"in i.pty&&i.pty.write(`clear
2018
2018
  `),()=>{i.onDataListeners.delete(r),n&&i.onExitListeners.delete(n)}}}async getAllFiles(e={}){let{getDotFiles:r=!1,globbyPattern:n="**/*",includePattern:i,gitignore:s,deep:o,truncate:a}=e,c=this.#r?.accessControl,u=c?.entries?.filter(h=>h.action==="allow"&&h.permissions.includes("list")).map(h=>h.resource)??[];if(!this.#o?.folders?.length){let h=await Ku({basePath:this.#s,globPattern:[i??n,...u],extraIgnorePatterns:wx(c).deny,dot:r,gitignore:s,sys:this.#e,deep:o});return qA(h,a)}let l=[],p=await this.#e.readdir(this.#s);for(let h of p)_A(h)&&l.push(h);!l.includes("AGENTS.md")&&this.#o.agentsMD&&l.push("AGENTS.md");for(let h of this.#o.folders){let f=this.#e.resolve(this.#s,h.path),g=await Ku({basePath:f,globPattern:[n,...u],dot:r,gitignore:s,sys:this.#e,deep:o}),y=this.#E()?".":h.name||this.#e.basename(f);for(let b of g)y!=="."?l.push(this.#e.join(y,b)):l.push(b)}let d=yd({files:l,policy:c,filterPattern:i,getDotFiles:r});return qA(d,a)}async searchFiles(e){let{query:r,caseInsensitive:n=!0,includeGlob:i,excludeGlob:s,maxResults:o=1e3,contextBefore:a=0,contextAfter:c=0}=e,u=await jx(this.#e),l=["--path-separator","/","--json","--line-number","--column","--max-columns","500"];return n&&l.push("-i"),a>0&&l.push("-B",a.toString()),c>0&&l.push("-A",c.toString()),i&&l.push("--glob",i),s&&l.push("--glob",`!${s}`),l.push("--ignore-file",".builderignore"),l.push("--",r),new Promise(p=>{let d=hd({command:u,args:l,options:{env:process.env,cwd:this.#m,stdio:["ignore","pipe","pipe"]}}),h=new mn(5e4);d.stdout.on("data",f=>{h.write(f.toString())}),d.on("error",()=>{p({matches:[],totalMatches:0,filesWithMatches:0,truncated:!1})}),d.on("close",f=>{if(f!==0)p({matches:[],totalMatches:0,filesWithMatches:0,truncated:!1});else{let g=[],y=new Set,D=h.getContent().split(`
2019
2019
  `),w=[],v=null;for(let C of D)if(C.trim())try{let E=JSON.parse(C);if(E.type==="match"){let A=E.data.path.text,F=E.data.line_number,P=E.data.lines.text.trimEnd(),_=E.data.submatches||[],B,L;_.length>0&&(B=_[0].start,L=_[0].end),y.add(A);let z={filePath:A,lineNumber:F,lineContent:P,columnStart:B,columnEnd:L,contextBefore:w,contextAfter:[]};if(w=[],v=z,g.push(z),g.length>=o)break}else if(E.type==="context"){let A=E.data.line_number,F=E.data.lines.text.trimEnd();v&&A>v.lineNumber?v.contextAfter.push(F):w.push(F)}}catch{continue}let x=g.length>=o;p({matches:g,totalMatches:g.length,filesWithMatches:y.size,truncated:x})}})})}async searchFileTree(e){let{query:r,excludeGlob:n,maxResults:i=100}=e,s=await jx(this.#e),o=["--files","--path-separator","/"],a=this.#Ye(r);a&&o.push("--glob",a),n&&o.push("--glob",`!${n}`);let c=this.#r?.accessControl,u=wx(c).deny;for(let p of u)o.push("--glob",`!${p}`);o.push("--ignore-file",".builderignore");let l=r.toLowerCase();return new Promise(p=>{let d=hd({command:s,args:o,options:{env:process.env,cwd:this.#m,stdio:["ignore","pipe","pipe"]}}),h=new mn(1e5);d.stdout.on("data",f=>{h.write(f.toString())}),d.on("error",()=>{p({matches:[],totalMatches:0,truncated:!1})}),d.on("close",f=>{if(f!==0&&f!==1){p({matches:[],totalMatches:0,truncated:!1});return}let g=h.getContent(),y=[...new Set(g.split(`
2020
- `).filter(w=>w.trim()))];y=yd({files:y,policy:c,getDotFiles:!0});let b=[];for(let w of y){let v=w.lastIndexOf("/"),x=v>=0?w.slice(v+1):w,C=v>=0?w.slice(0,v):"",E=this.#We(l,w.toLowerCase()),A=this.#Je(l,w,E);b.push({filePath:w,fileName:x,parentPath:C,matchIndices:E,score:A})}b.sort((w,v)=>v.score-w.score);let D=b.slice(0,i).map(({score:w,...v})=>v);p({matches:D,totalMatches:y.length,truncated:y.length>i})})})}#We(e,r){let n=e.toLowerCase(),i=r.toLowerCase(),s=r.lastIndexOf("/"),o=s>=0?s+1:0;if(e.includes("/")){let c=i.indexOf(n);return c>=0?Array.from({length:n.length},(u,l)=>c+l):this.#W(n,i,0,r.length)}let a=this.#W(n,i,o,r.length);if(a.length===n.length)return a;if(a.length>0){let c=a.length,u=n.slice(0,n.length-c),l=this.#W(u,i,0,o);if(l.length+c===n.length){let p=n.slice(l.length),d=this.#W(p,i,o,r.length);return[...l,...d]}}return this.#W(n,i,0,r.length)}#W(e,r,n,i){let s=[],o=0;for(let a=n;a<i&&o<e.length;a++){let c=e[o];r[a]===c?(s.push(a),o++):/[a-zA-Z0-9.\-_]/.test(c)||(o++,a--)}for(;o<e.length&&!/[a-zA-Z0-9.\-_]/.test(e[o]);)o++;return s}#Je(e,r,n){if(n.length===0)return 0;let i=0,s=e.toLowerCase(),o=r.toLowerCase(),a=r.lastIndexOf("/"),c=a>=0?a+1:0,l=o.slice(c).replace(/\.[^.]+$/,"");if(l===s)i+=200;else if(l.startsWith(s)){let f=s.length/l.length;f>=.9?i+=150:f>=.7?i+=120:i+=100}else l.includes(s)&&(i+=50);let p=n.filter(f=>f>=c);if(p.length===n.length&&(i+=30),p.length>0){let f=p.length/l.length;f>=.9?i+=60:f>=.7?i+=40:f>=.5&&(i+=20)}let d=0;for(let f=1;f<n.length;f++)n[f]===n[f-1]+1&&(d+=10);i+=d;let h=new Set(["/","-","_","."]);for(let f of n)(f===0||h.has(o[f-1]))&&(i+=5);if(i+=p.length*3,n[0]===c&&(i+=20),i-=Math.floor(r.length/20),n.length>1){let f=n[n.length-1]-n[0],g=n.length-1,y=f-g;i-=Math.floor(y/5)}return i}#Ye(e){if(!e)return"";let r=e.lastIndexOf("/");if(r===-1)return"**/"+this.#he(e,!0)+"*";let n=e.slice(0,r),i=e.slice(r+1),s="**/",o=n.split("/");for(let a=0;a<o.length;a++){let c=o[a];c&&(s+=this.#he(c,!1)),s+="/**/"}return i?s+=this.#he(i,!0)+"*":s+="*",s}#he(e,r){let n="";for(let i=0;i<e.length;i++){let s=e[i];/[a-zA-Z]/.test(s)?(n+=`[${s.toLowerCase()}${s.toUpperCase()}]`,r&&(n+="*")):/[0-9]/.test(s)||s==="."||s==="-"||s==="_"?(n+=s,r&&(n+="*")):["*","?","[","]","{","}"].includes(s)?n+=`[${s}]`:n+="*"}return n}async collectRepoMetrics(e={}){let{collectRepoMetrics:r}=await Promise.resolve().then(()=>(YK(),JK)),n=this.#u;return e.rootPath&&(n=this.#e.join(this.#u,e.rootPath)),r(this.#e,n)}getSessionId(){return this.getSessionContext().sessionId}getSpaceId(){return this.#l.builderPublicKey}async revertToCommitHash(e){this.#w=!1,await this.abortMerge(!1),await this.git(["revert","--no-commit",`${e}..HEAD`]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Revert changes"]);let n=(await this.emitGitStatus())?.currentCommit;if(!n){this.#e.Sentry?.captureException(new Error("Failed to get current commit hash after revert"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"}});return}this.requestRefresh(),await this.#L({lastCommit:n})}async resetToCommitHash(e){if(this.#w=!1,await this.abortMerge(!1),await this.git(["reset","--quiet","--hard",e]),(await this.emitGitStatus())?.currentCommit!==e)throw new Error("Failed to reset commit hash");this.requestRefresh()}async restore({location:e,predicate:r,revert:n=!1,dryRun:i=!1,forceReplay:s=!1,debug:o}){let a=this.getSessionContext(),c=a.turns.length,u=null;for(let f=c-1;f>=-1;f--)if(r(f>=0?a.turns[f]:null,f)){u=f;break}if(u===null)return{undone:null,message:"Could not find the target to restore to, the completion id could be wrong"};n||await this.abort({cleanCurrentMessage:!0});let l=new Map,p=!!this.#t?.git,d=a.turns,h=Math.max(0,e==="before"?u:u+1);for(let f=d.length-1;f>=h;f--){let g=d[f];for(let y of g.applyResults)l.set(y.filePath,y.oldContent??"")}if(!i){let f;if(p){u===-1?a.beforeCommit?f=a.beforeCommit:d.length>0&&(f=d[0].beforeCommit):u<d.length&&(e==="after"?(f=d[u].afterCommit,!f&&u+1<d.length&&(f=d[u+1].beforeCommit)):f=d[u].beforeCommit);let D={commitHash:f,sessionId:a.sessionId,sessionBeforeCommit:a.beforeCommit,turnsLength:d.length,targetIndex:u,currentTurn:d[d.length-1],targetTurn:d[u],targetTurnNext:d[u+1],location:e,forceReplay:s,dryRun:i,debug:o};if(!f)return this.#e.Sentry?.captureException(new Error("No commit hash found for restore"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Could not find the target to restore to, the git history is missing"};try{n?await this.revertToCommitHash(f):await this.resetToCommitHash(f)}catch(w){return this.#e.Sentry?.captureException(new Error("Error resetting git",{cause:w}),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Failed to reset/restore, the file history is missing"}}}else for(let[D,w]of l.entries())try{w?await this.writeFile(D,w):await this.deleteFile(D)}catch{}if(n)return{undone:[],message:"The revert operation was successful"};let g=d.splice(h,d.length-h),y=$o(d);y&&y?.afterCommit!==f&&(this.#e.Sentry?.captureException(new Error("Reset After commit hash mismatch"),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},extra:{lastTurn:y,commitHash:f}}),y.lastCommit=f,await this.#L({completionId:y.completionId,lastCommit:f}));let b=y?.completionId;if(g.length>0&&(await PA(this.#e,this.#l,{lastCompletionId:b,sessionId:a.sessionId},!!this.#i),a.updatedUnixTime=Date.now()),s){let D=a.state;this.#n.emit("step",{type:"batch",steps:[{type:"state",newState:"replay",abortable:!1,previousState:D},...this.#Re(),{type:"restore",files:Array.from(l.keys()),lastCompletionId:b,location:e},{type:"state",newState:D,abortable:!1,previousState:"replay"}]})}else g.length>0&&this.#n.emit("step",{type:"restore",files:Array.from(l.keys()),lastCompletionId:b,location:e})}return await this.#ke(),{undone:Array.from(l.keys()),message:"The restore operation was successful"}}async#ke(e){return await this.#t?.devServerOrchestrator?.ensureDevCommand(e)}async restoreFromCompletionId({location:e,completionId:r,forceReplay:n}){let i=this.getSessionContext();return i.turns.find(o=>o.completionId===r)?this.restore({location:e,predicate:o=>o?.completionId===r,forceReplay:n,debug:`restore to: ${r}`}):(await this.#z,i.turns=[],i.canLoadMore=!0,await PA(this.#e,this.#l,{sessionId:i.sessionId,lastCompletionId:r},!!this.#i),await this.loadMoreTurns(),this.restore({location:e,predicate:()=>!0,forceReplay:!0,debug:"restore after history"}))}async restoreBeforeCompletionId(e){return this.restoreFromCompletionId({location:"before",completionId:e,forceReplay:!1})}async undoLastUserMessage(e=!1){return this.restore({location:"before",predicate:r=>r?.user.role==="user",dryRun:e})}getLastUserCompletionId(){let e=this.getSessionContext();return RU(e)?.completionId}getLastCompletionId(){let e=this.getSessionContext();return TA(e)?.completionId}getCurrentState(){return this.getSessionContext().state}getLastApplyResultsTurn(){let e=this.getSessionContext();return OU(e)}getLastTurn(){let e=this.getSessionContext();return TA(e)}getNextUrl(){return this.getLastTurn()?.nextUrl}async sendFeedback(e){if(process.env.NODE_ENV==="test")return;qe("quality code feedback given",{spaceId:this.#l.builderPublicKey,sentiment:e.feedbackSentiment,mode:"cli"});let r=e.id??this.getLastCompletionId();r&&await this.#Xe({...e,id:r})}#L(e){let r=e.completionId;if(!r){let i=this.getLastTurn();i&&e.lastCommit&&(i.lastCommit=e.lastCommit),r=i?.completionId}let n=AA(this.#e,this.#l,"/codegen/finalize",{completionId:r,projectId:this.#r?.projectId,branchName:this.#r?.branchName,userCompletionId:this.getLastUserCompletionId(),sessionId:this.getSessionId(),metadata:this.#C,...e});return this.#P(n)}#Xe(e){let r=AA(this.#e,this.#l,"/codegen/feedback",e);return this.#P(r)}#P(e,r=!1){return this.#B.push(e),r&&this.#re.push(e),e.finally(()=>{let n=this.#re.indexOf(e);n!==-1&&this.#re.splice(n,1);let i=this.#B.indexOf(e);i!==-1&&this.#B.splice(i,1)})}async lastTurnHasChanges(){let e=await this.undoLastUserMessage(!0);return e.undone?e.undone.length>0:!1}#v(e){let r=this.getSessionContext(),n=r.state;n!==e&&(r.state=e,this.#n.emit("step",{type:"state",abortable:e==="generating",previousState:n,newState:e}))}waitUntilState(e,r=1e4){return new Promise(n=>{if(this.getSessionContext().state===e){n();return}let s,o=a=>{a.type==="state"&&a.newState===e&&(clearTimeout(s),this.#n.removeListener("step",o),n())};s=setTimeout(()=>{this.#n.removeListener("step",o),n()},r),this.#n.on("step",o)})}async clearSession(){let e=this.getSessionContext();e.turns=[],e.customInstructions=await this.#ne(),this.#ee=!0,this.#w=!1,this.#C={},this.#Z=!1,this.clearMessageQueue()}async clearMessageQueue(e=!1){let r=[];if(e)for(let n of this.#a)n.user&&r.push({type:"user",displayPrompt:n.displayPrompt,user:n.user,role:n.user.role,compacting:!1,idempotencyKey:n.idempotencyKey});this.#a.length=0,this.#ge(),r.length>0&&this.#n.emit("step",{type:"batch",steps:r})}updateMessage(e){if(e.type==="delete"){let r=this.#a.findIndex(n=>n.idempotencyKey===e.idempotencyKey);r>=0&&this.#a.splice(r,1)}else if(e.type==="move"){let r=this.#a.findIndex(n=>n.idempotencyKey===e.idempotencyKey);r>=0&&JU(this.#a,r,r+e.delta)}this.#ge()}async flushMessageQueue(){await this.abort({cleanCurrentMessage:!1,flushMessageQueue:!0}),this.#h&&this.#h()}#Ie(e){let r=e.idempotencyKey;if(r){let n=this.#a.findIndex(i=>i.idempotencyKey===r);if(n>=0)return this.#a[n]=e,!1}else e.idempotencyKey=(0,W0.randomUUID)();if(e.userPrompt==="___BROWSER_AUTOMATION_PROMPT___"){let n=this.#t?.devServerOrchestrator;e.userPrompt=SU(this.#H??n?.proxyTarget)}return this.#a.push(e),!0}async sendMessage(e){this.#Z=!1;let r=!1;if(Array.isArray(e))for(let i of e)r=this.#Ie(i)||r;else r=this.#Ie(e);if(!r)return null;this.#ge();let n=this.#a[this.#a.length-1];return n?(this.#w=!1,this.cancelAllPendingToolFulfilments(),n.queue?this.#h&&this.#h():await this.flushMessageQueue(),await kc(),n.idempotencyKey):null}#Ze(){let e=this.#a;if(e.length!==0)return this.#f=FA(e),this.clearMessageQueue(!0),this.#f}#Qe(){let e=this.#a.length===0||this.#Z,r=new Promise(n=>{e?this.#h=n:n()}).then(()=>{let n=this.#a;if(n.length===0)return;let i=FA(n);return!i.dropAbortedPrompt&&this.#f&&(i=gx(this.#f,i)),this.clearMessageQueue(!0),this.#f=i,i});return{shouldWait:e,promise:r}}#ge(){this.#n.emit("step",{type:"message-queue",queue:this.#a.map(e=>({idempotencyKey:e.idempotencyKey,displayPrompt:e.displayPrompt,user:e.user}))})}#et(e,r=!1){r&&(this.#C={}),Object.assign(this.#C,e),this.#n.emit("step",{type:"metadata",...this.#C})}async spawnAgent(e){let{prompt:r,user:n,onStep:i,signal:s,maxCompletions:o=50,sessionId:a,tools:c=["Read","LS","Glob","ReadRule","Grep","WebSearch","ExplorationMetadata"],model:u="opa5-mini",mode:l="quality-v4-agent",systemPrompt:p,subagent_type:d,includeMemories:h,needDevServer:f,needValidation:g}=e,y=this.#t?.devServerOrchestrator;if(f){if(!y)return{success:!1,response:`The ${d} agent can not be used on this session. Do no try again.`,metadata:{important_files:[]}};if(y.httpServerState.state==="stopped"||y.httpServerState.state==="connecting"||y.httpServerState.state==="error-fetch")try{if(y.state==="not-installed")throw new Error(`The ${d} agent can not be used until the setupCommand finish successfully. However, the dev server is not installed.`);if(y.state==="install-failed")throw new Error(`The ${d} agent can not be used until the setupCommand finish successfully. However, last time we try to run the install script, it failed.`);if(y.state==="install-aborted")throw new Error(`The ${d} agent can not be used until the setupCommand finish successfully. However, last time we try to run the install script, it was aborted.`);y.state==="installing"&&await Dh(y.setupCommandPromise,s),await y.ensureDevCommand(s)}catch(P){return{success:!1,response:P instanceof Error?P.message:String(P),metadata:{important_files:[]}}}if(g&&y.hasValidateCommand&&this.#T){let P=await y.runValidateCommand(void 0,s);if(P.status==="failure")return{success:!1,response:`The Agent could not start yet, because the validate command failed:
2020
+ `).filter(w=>w.trim()))];y=yd({files:y,policy:c,getDotFiles:!0});let b=[];for(let w of y){let v=w.lastIndexOf("/"),x=v>=0?w.slice(v+1):w,C=v>=0?w.slice(0,v):"",E=this.#We(l,w.toLowerCase()),A=this.#Je(l,w,E);b.push({filePath:w,fileName:x,parentPath:C,matchIndices:E,score:A})}b.sort((w,v)=>v.score-w.score);let D=b.slice(0,i).map(({score:w,...v})=>v);p({matches:D,totalMatches:y.length,truncated:y.length>i})})})}#We(e,r){let n=e.toLowerCase(),i=r.toLowerCase(),s=r.lastIndexOf("/"),o=s>=0?s+1:0;if(e.includes("/")){let c=i.indexOf(n);return c>=0?Array.from({length:n.length},(u,l)=>c+l):this.#W(n,i,0,r.length)}let a=this.#W(n,i,o,r.length);if(a.length===n.length)return a;if(a.length>0){let c=a.length,u=n.slice(0,n.length-c),l=this.#W(u,i,0,o);if(l.length+c===n.length){let p=n.slice(l.length),d=this.#W(p,i,o,r.length);return[...l,...d]}}return this.#W(n,i,0,r.length)}#W(e,r,n,i){let s=[],o=0;for(let a=n;a<i&&o<e.length;a++){let c=e[o];r[a]===c?(s.push(a),o++):/[a-zA-Z0-9.\-_]/.test(c)||(o++,a--)}for(;o<e.length&&!/[a-zA-Z0-9.\-_]/.test(e[o]);)o++;return s}#Je(e,r,n){if(n.length===0)return 0;let i=0,s=e.toLowerCase(),o=r.toLowerCase(),a=r.lastIndexOf("/"),c=a>=0?a+1:0,l=o.slice(c).replace(/\.[^.]+$/,"");if(l===s)i+=200;else if(l.startsWith(s)){let f=s.length/l.length;f>=.9?i+=150:f>=.7?i+=120:i+=100}else l.includes(s)&&(i+=50);let p=n.filter(f=>f>=c);if(p.length===n.length&&(i+=30),p.length>0){let f=p.length/l.length;f>=.9?i+=60:f>=.7?i+=40:f>=.5&&(i+=20)}let d=0;for(let f=1;f<n.length;f++)n[f]===n[f-1]+1&&(d+=10);i+=d;let h=new Set(["/","-","_","."]);for(let f of n)(f===0||h.has(o[f-1]))&&(i+=5);if(i+=p.length*3,n[0]===c&&(i+=20),i-=Math.floor(r.length/20),n.length>1){let f=n[n.length-1]-n[0],g=n.length-1,y=f-g;i-=Math.floor(y/5)}return i}#Ye(e){if(!e)return"";let r=e.lastIndexOf("/");if(r===-1)return"**/"+this.#he(e,!0)+"*";let n=e.slice(0,r),i=e.slice(r+1),s="**/",o=n.split("/");for(let a=0;a<o.length;a++){let c=o[a];c&&(s+=this.#he(c,!1)),s+="/**/"}return i?s+=this.#he(i,!0)+"*":s+="*",s}#he(e,r){let n="";for(let i=0;i<e.length;i++){let s=e[i];/[a-zA-Z]/.test(s)?(n+=`[${s.toLowerCase()}${s.toUpperCase()}]`,r&&(n+="*")):/[0-9]/.test(s)||s==="."||s==="-"||s==="_"?(n+=s,r&&(n+="*")):["*","?","[","]","{","}"].includes(s)?n+=`[${s}]`:n+="*"}return n}async collectRepoMetrics(e={}){let{collectRepoMetrics:r}=await Promise.resolve().then(()=>(YK(),JK)),n=this.#u;return e.rootPath&&(n=this.#e.join(this.#u,e.rootPath)),r(this.#e,n)}getSessionId(){return this.getSessionContext().sessionId}getSpaceId(){return this.#l.builderPublicKey}async revertToCommitHash(e){this.#w=!1,await this.abortMerge(!1),await this.git(["revert","--no-commit",`${e}..HEAD`]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Revert changes"]);let n=(await this.emitGitStatus())?.currentCommit;if(!n){this.#e.Sentry?.captureException(new Error("Failed to get current commit hash after revert"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"}});return}this.requestRefresh(),await this.#L({lastCommit:n})}async resetToCommitHash(e){if(this.#w=!1,await this.abortMerge(!1),await this.git(["reset","--quiet","--hard",e]),(await this.emitGitStatus())?.currentCommit!==e)throw new Error("Failed to reset commit hash");this.requestRefresh()}async restore({location:e,predicate:r,revert:n=!1,dryRun:i=!1,forceReplay:s=!1,debug:o}){let a=this.getSessionContext(),c=a.turns.length,u=null;for(let f=c-1;f>=-1;f--)if(r(f>=0?a.turns[f]:null,f)){u=f;break}if(u===null)return{undone:null,message:"Could not find the target to restore to, the completion id could be wrong"};n||await this.abort({cleanCurrentMessage:!0});let l=new Map,p=!!this.#t?.git,d=a.turns,h=Math.max(0,e==="before"?u:u+1);for(let f=d.length-1;f>=h;f--){let g=d[f];for(let y of g.applyResults)l.set(y.filePath,y.oldContent??"")}if(!i){let f;if(p){u===-1?a.beforeCommit?f=a.beforeCommit:d.length>0&&(f=d[0].beforeCommit):u<d.length&&(e==="after"?(f=d[u].afterCommit,!f&&u+1<d.length&&(f=d[u+1].beforeCommit)):f=d[u].beforeCommit);let D={commitHash:f,sessionId:a.sessionId,sessionBeforeCommit:a.beforeCommit,turnsLength:d.length,targetIndex:u,currentTurn:d[d.length-1],targetTurn:d[u],targetTurnNext:d[u+1],location:e,forceReplay:s,dryRun:i,debug:o};if(!f)return this.#e.Sentry?.captureException(new Error("No commit hash found for restore"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Could not find the target to restore to, the git history is missing"};try{n?await this.revertToCommitHash(f):await this.resetToCommitHash(f)}catch(w){return this.#e.Sentry?.captureException(new Error("Error resetting git",{cause:w}),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Failed to reset/restore, the file history is missing"}}}else for(let[D,w]of l.entries())try{w?await this.writeFile(D,w):await this.deleteFile(D)}catch{}if(n)return{undone:[],message:"The revert operation was successful"};let g=d.splice(h,d.length-h),y=$o(d);y&&y?.afterCommit!==f&&(this.#e.Sentry?.captureException(new Error("Reset After commit hash mismatch"),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},extra:{lastTurn:y,commitHash:f}}),y.lastCommit=f,await this.#L({completionId:y.completionId,lastCommit:f}));let b=y?.completionId;if(g.length>0&&(await PA(this.#e,this.#l,{lastCompletionId:b,sessionId:a.sessionId},!!this.#i),a.updatedUnixTime=Date.now()),s){let D=a.state;this.#n.emit("step",{type:"batch",steps:[{type:"state",newState:"replay",abortable:!1,previousState:D},...this.#Re(),{type:"restore",files:Array.from(l.keys()),lastCompletionId:b,location:e},{type:"state",newState:D,abortable:!1,previousState:"replay"}]})}else g.length>0&&this.#n.emit("step",{type:"restore",files:Array.from(l.keys()),lastCompletionId:b,location:e})}return await this.#ke(),{undone:Array.from(l.keys()),message:"The restore operation was successful"}}async#ke(e){return await this.#t?.devServerOrchestrator?.ensureDevCommand(e)}async restoreFromCompletionId({location:e,completionId:r,forceReplay:n}){let i=this.getSessionContext();return i.turns.find(o=>o.completionId===r)?this.restore({location:e,predicate:o=>o?.completionId===r,forceReplay:n,debug:`restore to: ${r}`}):(await this.#z,i.turns=[],i.canLoadMore=!0,await PA(this.#e,this.#l,{sessionId:i.sessionId,lastCompletionId:r},!!this.#i),await this.loadMoreTurns(),this.restore({location:e,predicate:()=>!0,forceReplay:!0,debug:"restore after history"}))}async restoreBeforeCompletionId(e){return this.restoreFromCompletionId({location:"before",completionId:e,forceReplay:!1})}async undoLastUserMessage(e=!1){return this.restore({location:"before",predicate:r=>r?.user.role==="user",dryRun:e})}getLastUserCompletionId(){let e=this.getSessionContext();return RU(e)?.completionId}getLastCompletionId(){let e=this.getSessionContext();return TA(e)?.completionId}getCurrentState(){return this.getSessionContext().state}getLastApplyResultsTurn(){let e=this.getSessionContext();return OU(e)}getLastTurn(){let e=this.getSessionContext();return TA(e)}getNextUrl(){return this.getLastTurn()?.nextUrl}async sendFeedback(e){if(process.env.NODE_ENV==="test")return;qe("quality code feedback given",{spaceId:this.#l.builderPublicKey,sentiment:e.feedbackSentiment,mode:"cli"});let r=e.id??this.getLastCompletionId();r&&await this.#Xe({...e,id:r})}#L(e){let r=e.completionId;if(!r){let i=this.getLastTurn();i&&e.lastCommit&&(i.lastCommit=e.lastCommit),r=i?.completionId}let n=AA(this.#e,this.#l,"/codegen/finalize",{completionId:r,projectId:this.#r?.projectId,branchName:this.#r?.branchName,userCompletionId:this.getLastUserCompletionId(),sessionId:this.getSessionId(),metadata:this.#C,...e});return this.#P(n)}#Xe(e){let r=AA(this.#e,this.#l,"/codegen/feedback",e);return this.#P(r)}#P(e,r=!1){return this.#B.push(e),r&&this.#re.push(e),e.finally(()=>{let n=this.#re.indexOf(e);n!==-1&&this.#re.splice(n,1);let i=this.#B.indexOf(e);i!==-1&&this.#B.splice(i,1)})}async lastTurnHasChanges(){let e=await this.undoLastUserMessage(!0);return e.undone?e.undone.length>0:!1}#v(e){let r=this.getSessionContext(),n=r.state;n!==e&&(r.state=e,this.#n.emit("step",{type:"state",abortable:e==="generating",previousState:n,newState:e}))}waitUntilState(e,r=1e4){return new Promise(n=>{if(this.getSessionContext().state===e){n();return}let s,o=a=>{a.type==="state"&&a.newState===e&&(clearTimeout(s),this.#n.removeListener("step",o),n())};s=setTimeout(()=>{this.#n.removeListener("step",o),n()},r),this.#n.on("step",o)})}async clearSession(){let e=this.getSessionContext();e.turns=[],e.customInstructions=await this.#ne(),this.#ee=!0,this.#w=!1,this.#C={},this.#Z=!1,this.clearMessageQueue()}async clearMessageQueue(e=!1){let r=[];if(e)for(let n of this.#a)n.user&&r.push({type:"user",displayPrompt:n.displayPrompt,user:n.user,role:n.user.role,compacting:!1,idempotencyKey:n.idempotencyKey});this.#a.length=0,this.#ge(),r.length>0&&this.#n.emit("step",{type:"batch",steps:r})}updateMessage(e){if(e.type==="delete"){let r=this.#a.findIndex(n=>n.idempotencyKey===e.idempotencyKey);r>=0&&this.#a.splice(r,1)}else if(e.type==="move"){let r=this.#a.findIndex(n=>n.idempotencyKey===e.idempotencyKey);r>=0&&JU(this.#a,r,r+e.delta)}this.#ge()}async flushMessageQueue(){await this.abort({cleanCurrentMessage:!1,flushMessageQueue:!0}),this.#h&&this.#h()}#Ie(e){let r=e.idempotencyKey;if(r){let n=this.#a.findIndex(i=>i.idempotencyKey===r);if(n>=0)return this.#a[n]=e,!1}else e.idempotencyKey=(0,W0.randomUUID)();if(e.userPrompt==="___BROWSER_AUTOMATION_PROMPT___"){let n=this.#t?.devServerOrchestrator;e.userPrompt=SU(this.#H??n?.proxyTarget)}return this.#a.push(e),!0}async sendMessage(e){this.#Z=!1;let r=!1;if(Array.isArray(e))for(let i of e)r=this.#Ie(i)||r;else r=this.#Ie(e);if(!r)return null;this.#ge();let n=this.#a[this.#a.length-1];return n?(this.#w=!1,this.cancelAllPendingToolFulfilments(),n.queue?this.#h&&this.#h():await this.flushMessageQueue(),await kc(),n.idempotencyKey):null}#Ze(){let e=this.#a;if(e.length!==0)return this.#f=FA(e),this.clearMessageQueue(!0),this.#f}#Qe(){let e=this.#a.length===0||this.#Z,r=new Promise(n=>{e?this.#h=n:n()}).then(()=>{let n=this.#a;if(n.length===0)return;let i=FA(n);if(!i.dropAbortedPrompt&&this.#f){let s=i.idempotencyKey;i=gx(this.#f,i),i.idempotencyKey=s}return this.clearMessageQueue(!0),this.#f=i,i});return{shouldWait:e,promise:r}}#ge(){this.#n.emit("step",{type:"message-queue",queue:this.#a.map(e=>({idempotencyKey:e.idempotencyKey,displayPrompt:e.displayPrompt,user:e.user}))})}#et(e,r=!1){r&&(this.#C={}),Object.assign(this.#C,e),this.#n.emit("step",{type:"metadata",...this.#C})}async spawnAgent(e){let{prompt:r,user:n,onStep:i,signal:s,maxCompletions:o=50,sessionId:a,tools:c=["Read","LS","Glob","ReadRule","Grep","WebSearch","ExplorationMetadata"],model:u="opa5-mini",mode:l="quality-v4-agent",systemPrompt:p,subagent_type:d,includeMemories:h,needDevServer:f,needValidation:g}=e,y=this.#t?.devServerOrchestrator;if(f){if(!y)return{success:!1,response:`The ${d} agent can not be used on this session. Do no try again.`,metadata:{important_files:[]}};if(y.httpServerState.state==="stopped"||y.httpServerState.state==="connecting"||y.httpServerState.state==="error-fetch")try{if(y.state==="not-installed")throw new Error(`The ${d} agent can not be used until the setupCommand finish successfully. However, the dev server is not installed.`);if(y.state==="install-failed")throw new Error(`The ${d} agent can not be used until the setupCommand finish successfully. However, last time we try to run the install script, it failed.`);if(y.state==="install-aborted")throw new Error(`The ${d} agent can not be used until the setupCommand finish successfully. However, last time we try to run the install script, it was aborted.`);y.state==="installing"&&await Dh(y.setupCommandPromise,s),await y.ensureDevCommand(s)}catch(P){return{success:!1,response:P instanceof Error?P.message:String(P),metadata:{important_files:[]}}}if(g&&y.hasValidateCommand&&this.#T){let P=await y.runValidateCommand(void 0,s);if(P.status==="failure")return{success:!1,response:`The Agent could not start yet, because the validate command failed:
2021
2021
  <command>
2022
2022
  ${P.command}
2023
2023
  </command>
@@ -2416,7 +2416,7 @@ Please see the 3.x to 4.x migration guide for details on how to update your app.
2416
2416
  `)+`\r
2417
2417
  \r
2418
2418
  `+r)}function Jl(t,e,r,n,i,s){if(t.listenerCount("wsClientError")){let o=new Error(i);Error.captureStackTrace(o,Jl),t.emit("wsClientError",o,r,e)}else Fy(r,n,i,s)}});var bie=S((Y0t,yie)=>{m();var EN=class{constructor(e,r,n){this.etaBufferLength=e||100,this.valueBuffer=[n],this.timeBuffer=[r],this.eta="0"}update(e,r,n){this.valueBuffer.push(r),this.timeBuffer.push(e),this.calculate(n-r)}getTime(){return this.eta}calculate(e){let r=this.valueBuffer.length,n=Math.min(this.etaBufferLength,r),i=this.valueBuffer[r-1]-this.valueBuffer[r-n],s=this.timeBuffer[r-1]-this.timeBuffer[r-n],o=i/s;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let a=Math.ceil(e/o/1e3);isNaN(a)?this.eta="NULL":isFinite(a)?a>1e7?this.eta="INF":a<0?this.eta=0:this.eta=a:this.eta="INF"}};yie.exports=EN});var TN=S((Z0t,vie)=>{m();var Yl=require("readline"),SN=class{constructor(e){this.stream=e,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(e){this.stream.isTTY&&(e?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(e=null,r=null){this.stream.isTTY&&Yl.cursorTo(this.stream,e,r)}cursorRelative(e=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,Yl.moveCursor(this.stream,e,r))}cursorRelativeReset(){this.stream.isTTY&&(Yl.moveCursor(this.stream,0,-this.dy),Yl.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&Yl.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&Yl.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&Yl.clearScreenDown(this.stream)}newline(){this.stream.write(`
2419
- `),this.dy++}write(e,r=!1){this.linewrap===!0&&r===!1?this.stream.write(e.substr(0,this.getWidth())):this.stream.write(e)}lineWrapping(e){this.stream.isTTY&&(this.linewrap=e,e?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};vie.exports=SN});var Die=S((eDt,xie)=>{"use strict";m();xie.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var Cie=S((rDt,wie)=>{"use strict";m();var c9e=Die();wie.exports=t=>typeof t=="string"?t.replace(c9e(),""):t});var Sie=S((iDt,AN)=>{"use strict";m();var Eie=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);AN.exports=Eie;AN.exports.default=Eie});var Aie=S((oDt,Tie)=>{"use strict";m();Tie.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var _ie=S((cDt,PN)=>{"use strict";m();var u9e=Cie(),l9e=Sie(),p9e=Aie(),Pie=t=>{if(typeof t!="string"||t.length===0||(t=u9e(t),t.length===0))return 0;t=t.replace(p9e()," ");let e=0;for(let r=0;r<t.length;r++){let n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=l9e(n)?2:1)}return e};PN.exports=Pie;PN.exports.default=Pie});var _N=S((lDt,Fie)=>{m();Fie.exports=function(e,r,n){if(r.autopadding!==!0)return e;function i(s,o){return(r.autopaddingChar+s).slice(-o)}switch(n){case"percentage":return i(e,3);default:return e}}});var FN=S((dDt,kie)=>{m();kie.exports=function(e,r){let n=Math.round(e*r.barsize),i=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,i)}});var kN=S((mDt,Iie)=>{m();Iie.exports=function(e,r,n){function i(o){return n?n*Math.round(o/n):o}function s(o){return(r.autopaddingChar+o).slice(-2)}return e>3600?s(Math.floor(e/3600))+"h"+s(i(e%3600/60))+"m":e>60?s(Math.floor(e/60))+"m"+s(i(e%60))+"s":e>10?s(i(e))+"s":s(e)+"s"}});var IN=S((gDt,Nie)=>{m();var d9e=_ie(),f9e=_N(),m9e=FN(),h9e=kN();Nie.exports=function(e,r,n){let i=e.format,s=e.formatTime||h9e,o=e.formatValue||f9e,a=e.formatBar||m9e,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),p=Object.assign({},n,{bar:a(r.progress,e),percentage:o(c,e,"percentage"),total:o(r.total,e,"total"),value:o(r.value,e,"value"),eta:o(r.eta,e,"eta"),eta_formatted:s(r.eta,e,5),duration:o(l,e,"duration"),duration_formatted:s(l,e,1)});i=i.replace(/\{(\w+)\}/g,function(f,g){return typeof p[g]<"u"?p[g]:f});let d=Math.max(0,r.maxWidth-d9e(i)-2),h=Math.floor(d/2);switch(e.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=h>0?" ".repeat(h)+i:i;break;case"left":default:break}return i}});var Pw=S((bDt,Rie)=>{m();function Ht(t,e){return typeof t>"u"||t===null?e:t}Rie.exports={parse:function(e,r){let n={},i=Object.assign({},r,e);return n.throttleTime=1e3/Ht(i.fps,10),n.stream=Ht(i.stream,process.stderr),n.terminal=Ht(i.terminal,null),n.clearOnComplete=Ht(i.clearOnComplete,!1),n.stopOnComplete=Ht(i.stopOnComplete,!1),n.barsize=Ht(i.barsize,40),n.align=Ht(i.align,"left"),n.hideCursor=Ht(i.hideCursor,!1),n.linewrap=Ht(i.linewrap,!1),n.barGlue=Ht(i.barGlue,""),n.barCompleteChar=Ht(i.barCompleteChar,"="),n.barIncompleteChar=Ht(i.barIncompleteChar,"-"),n.format=Ht(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Ht(i.formatTime,null),n.formatValue=Ht(i.formatValue,null),n.formatBar=Ht(i.formatBar,null),n.etaBufferLength=Ht(i.etaBuffer,10),n.etaAsynchronousUpdate=Ht(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Ht(i.progressCalculationRelative,!1),n.synchronousUpdate=Ht(i.synchronousUpdate,!0),n.noTTYOutput=Ht(i.noTTYOutput,!1),n.notTTYSchedule=Ht(i.notTTYSchedule,2e3),n.emptyOnZero=Ht(i.emptyOnZero,!1),n.forceRedraw=Ht(i.forceRedraw,!1),n.autopadding=Ht(i.autopadding,!1),n.gracefulExit=Ht(i.gracefulExit,!1),n},assignDerivedOptions:function(e){return e.barCompleteString=e.barCompleteChar.repeat(e.barsize+1),e.barIncompleteString=e.barIncompleteChar.repeat(e.barsize+1),e.autopaddingChar=e.autopadding?Ht(e.autopaddingChar," "):"",e}}});var NN=S((DDt,Mie)=>{m();var Oie=bie(),g9e=TN(),y9e=IN(),b9e=Pw(),v9e=require("events");Mie.exports=class extends v9e{constructor(e){super(),this.options=b9e.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new g9e(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Oie(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:y9e}render(e=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(e||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(e,r,n){this.value=r||0,this.total=typeof e<"u"&&e>=0?e:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Oie(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",e,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(e,r={}){typeof e=="number"&&(this.value=e,this.eta.update(Date.now(),e,this.total));let n=(typeof e=="object"?e:r)||{};this.emit("update",this.total,this.value);for(let i in n)this.payload[i]=n[i];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let e=this.value/this.total;return this.options.progressCalculationRelative&&(e=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(e)&&(e=this.options&&this.options.emptyOnZero?0:1),e=Math.min(Math.max(e,0),1),e}increment(e=1,r={}){typeof e=="object"?this.update(this.value+1,e):this.update(this.value+e,r)}getTotal(){return this.total}setTotal(e){typeof e<"u"&&e>=0&&(this.total=e)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var Lie=S((EDt,Bie)=>{m();var x9e=NN(),D9e=Pw();Bie.exports=class extends x9e{constructor(e,r){super(D9e.parse(e,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(e,r){this.timer&&(super.update(e,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(e,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(e,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var jie=S((ADt,$ie)=>{m();var w9e=TN(),C9e=NN(),E9e=Pw(),S9e=require("events");$ie.exports=class extends S9e{constructor(e,r){super(),this.bars=[],this.options=E9e.parse(e,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new w9e(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(e,r,n,i={}){let s=new C9e(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(s),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,s.start(e,r,n),this.emit("start")),s}remove(e){let r=this.bars.indexOf(e);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(e=>e.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render(),this.bars[e].stop();this.terminal.newline()}this.emit("stop")}log(e){this.loggingBuffer.push(e)}}});var qie=S((_Dt,Uie)=>{m();Uie.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Gie=S((kDt,zie)=>{m();zie.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Hie=S((NDt,Vie)=>{m();Vie.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Wie=S((ODt,Kie)=>{m();Kie.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var Yie=S((BDt,Jie)=>{m();var T9e=qie(),A9e=Gie(),P9e=Hie(),_9e=Wie();Jie.exports={legacy:T9e,shades_classic:A9e,shades_grey:P9e,rect:_9e}});var Qie=S(($Dt,Zie)=>{m();var Xie=Lie(),F9e=jie(),k9e=Yie(),I9e=IN(),N9e=_N(),R9e=FN(),O9e=kN();Zie.exports={Bar:Xie,SingleBar:Xie,MultiBar:F9e,Presets:k9e,Format:{Formatter:I9e,BarFormat:R9e,ValueFormat:N9e,TimeFormat:O9e}}});var sse=S((KDt,ise)=>{m();ise.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var yje={};By(yje,{default:()=>gje});module.exports=Doe(yje);m();m();try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4a075efd-6097-46ea-8e08-242e7c2212b9",t._sentryDebugIdIdentifier="sentry-dbid-4a075efd-6097-46ea-8e08-242e7c2212b9")}catch{}m();var poe=require("../core/index.cjs"),doe=require("../node/index.cjs"),foe=require("../server/index.cjs"),moe=V(GN(),1);m();m();var iD=require("fs/promises");Jf();Xr();cd();Bt();var ur=V(mr(),1),cf=require("node:path");is();ji();jr();Nr();ju();var Pke="https://cdn.builder.io",AW=async(t,e)=>{console.log(""),Tt((0,ur.bgCyan)((0,ur.bold)((0,ur.white)(" figma migrate ")))+" "+(0,ur.dim)(Ve));let{builderPrivateKey:r,builderPublicKey:n}=await jt(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0});await qe("figma publish started",{spaceId:n});let i=await Hu(t);if(i.length>0){await qe("figma migrate with existing files",{spaceId:n}),I.warning(`${(0,ur.yellow)("This repo already has figma mappings in:")}
2419
+ `),this.dy++}write(e,r=!1){this.linewrap===!0&&r===!1?this.stream.write(e.substr(0,this.getWidth())):this.stream.write(e)}lineWrapping(e){this.stream.isTTY&&(this.linewrap=e,e?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};vie.exports=SN});var Die=S((eDt,xie)=>{"use strict";m();xie.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var Cie=S((rDt,wie)=>{"use strict";m();var c9e=Die();wie.exports=t=>typeof t=="string"?t.replace(c9e(),""):t});var Sie=S((iDt,AN)=>{"use strict";m();var Eie=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);AN.exports=Eie;AN.exports.default=Eie});var Aie=S((oDt,Tie)=>{"use strict";m();Tie.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var _ie=S((cDt,PN)=>{"use strict";m();var u9e=Cie(),l9e=Sie(),p9e=Aie(),Pie=t=>{if(typeof t!="string"||t.length===0||(t=u9e(t),t.length===0))return 0;t=t.replace(p9e()," ");let e=0;for(let r=0;r<t.length;r++){let n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=l9e(n)?2:1)}return e};PN.exports=Pie;PN.exports.default=Pie});var _N=S((lDt,Fie)=>{m();Fie.exports=function(e,r,n){if(r.autopadding!==!0)return e;function i(s,o){return(r.autopaddingChar+s).slice(-o)}switch(n){case"percentage":return i(e,3);default:return e}}});var FN=S((dDt,kie)=>{m();kie.exports=function(e,r){let n=Math.round(e*r.barsize),i=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,i)}});var kN=S((mDt,Iie)=>{m();Iie.exports=function(e,r,n){function i(o){return n?n*Math.round(o/n):o}function s(o){return(r.autopaddingChar+o).slice(-2)}return e>3600?s(Math.floor(e/3600))+"h"+s(i(e%3600/60))+"m":e>60?s(Math.floor(e/60))+"m"+s(i(e%60))+"s":e>10?s(i(e))+"s":s(e)+"s"}});var IN=S((gDt,Nie)=>{m();var d9e=_ie(),f9e=_N(),m9e=FN(),h9e=kN();Nie.exports=function(e,r,n){let i=e.format,s=e.formatTime||h9e,o=e.formatValue||f9e,a=e.formatBar||m9e,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),p=Object.assign({},n,{bar:a(r.progress,e),percentage:o(c,e,"percentage"),total:o(r.total,e,"total"),value:o(r.value,e,"value"),eta:o(r.eta,e,"eta"),eta_formatted:s(r.eta,e,5),duration:o(l,e,"duration"),duration_formatted:s(l,e,1)});i=i.replace(/\{(\w+)\}/g,function(f,g){return typeof p[g]<"u"?p[g]:f});let d=Math.max(0,r.maxWidth-d9e(i)-2),h=Math.floor(d/2);switch(e.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=h>0?" ".repeat(h)+i:i;break;case"left":default:break}return i}});var Pw=S((bDt,Rie)=>{m();function Ht(t,e){return typeof t>"u"||t===null?e:t}Rie.exports={parse:function(e,r){let n={},i=Object.assign({},r,e);return n.throttleTime=1e3/Ht(i.fps,10),n.stream=Ht(i.stream,process.stderr),n.terminal=Ht(i.terminal,null),n.clearOnComplete=Ht(i.clearOnComplete,!1),n.stopOnComplete=Ht(i.stopOnComplete,!1),n.barsize=Ht(i.barsize,40),n.align=Ht(i.align,"left"),n.hideCursor=Ht(i.hideCursor,!1),n.linewrap=Ht(i.linewrap,!1),n.barGlue=Ht(i.barGlue,""),n.barCompleteChar=Ht(i.barCompleteChar,"="),n.barIncompleteChar=Ht(i.barIncompleteChar,"-"),n.format=Ht(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Ht(i.formatTime,null),n.formatValue=Ht(i.formatValue,null),n.formatBar=Ht(i.formatBar,null),n.etaBufferLength=Ht(i.etaBuffer,10),n.etaAsynchronousUpdate=Ht(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Ht(i.progressCalculationRelative,!1),n.synchronousUpdate=Ht(i.synchronousUpdate,!0),n.noTTYOutput=Ht(i.noTTYOutput,!1),n.notTTYSchedule=Ht(i.notTTYSchedule,2e3),n.emptyOnZero=Ht(i.emptyOnZero,!1),n.forceRedraw=Ht(i.forceRedraw,!1),n.autopadding=Ht(i.autopadding,!1),n.gracefulExit=Ht(i.gracefulExit,!1),n},assignDerivedOptions:function(e){return e.barCompleteString=e.barCompleteChar.repeat(e.barsize+1),e.barIncompleteString=e.barIncompleteChar.repeat(e.barsize+1),e.autopaddingChar=e.autopadding?Ht(e.autopaddingChar," "):"",e}}});var NN=S((DDt,Mie)=>{m();var Oie=bie(),g9e=TN(),y9e=IN(),b9e=Pw(),v9e=require("events");Mie.exports=class extends v9e{constructor(e){super(),this.options=b9e.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new g9e(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Oie(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:y9e}render(e=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(e||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(e,r,n){this.value=r||0,this.total=typeof e<"u"&&e>=0?e:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Oie(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",e,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(e,r={}){typeof e=="number"&&(this.value=e,this.eta.update(Date.now(),e,this.total));let n=(typeof e=="object"?e:r)||{};this.emit("update",this.total,this.value);for(let i in n)this.payload[i]=n[i];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let e=this.value/this.total;return this.options.progressCalculationRelative&&(e=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(e)&&(e=this.options&&this.options.emptyOnZero?0:1),e=Math.min(Math.max(e,0),1),e}increment(e=1,r={}){typeof e=="object"?this.update(this.value+1,e):this.update(this.value+e,r)}getTotal(){return this.total}setTotal(e){typeof e<"u"&&e>=0&&(this.total=e)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var Lie=S((EDt,Bie)=>{m();var x9e=NN(),D9e=Pw();Bie.exports=class extends x9e{constructor(e,r){super(D9e.parse(e,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(e,r){this.timer&&(super.update(e,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(e,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(e,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var jie=S((ADt,$ie)=>{m();var w9e=TN(),C9e=NN(),E9e=Pw(),S9e=require("events");$ie.exports=class extends S9e{constructor(e,r){super(),this.bars=[],this.options=E9e.parse(e,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new w9e(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(e,r,n,i={}){let s=new C9e(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(s),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,s.start(e,r,n),this.emit("start")),s}remove(e){let r=this.bars.indexOf(e);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(e=>e.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render(),this.bars[e].stop();this.terminal.newline()}this.emit("stop")}log(e){this.loggingBuffer.push(e)}}});var qie=S((_Dt,Uie)=>{m();Uie.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Gie=S((kDt,zie)=>{m();zie.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Hie=S((NDt,Vie)=>{m();Vie.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Wie=S((ODt,Kie)=>{m();Kie.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var Yie=S((BDt,Jie)=>{m();var T9e=qie(),A9e=Gie(),P9e=Hie(),_9e=Wie();Jie.exports={legacy:T9e,shades_classic:A9e,shades_grey:P9e,rect:_9e}});var Qie=S(($Dt,Zie)=>{m();var Xie=Lie(),F9e=jie(),k9e=Yie(),I9e=IN(),N9e=_N(),R9e=FN(),O9e=kN();Zie.exports={Bar:Xie,SingleBar:Xie,MultiBar:F9e,Presets:k9e,Format:{Formatter:I9e,BarFormat:R9e,ValueFormat:N9e,TimeFormat:O9e}}});var sse=S((KDt,ise)=>{m();ise.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var y5e={};By(y5e,{default:()=>g5e});module.exports=Doe(y5e);m();m();try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="9f57c4c3-aaa7-451f-bbae-fa05a95e9d14",t._sentryDebugIdIdentifier="sentry-dbid-9f57c4c3-aaa7-451f-bbae-fa05a95e9d14")}catch{}m();var poe=require("../core/index.cjs"),doe=require("../node/index.cjs"),foe=require("../server/index.cjs"),moe=V(GN(),1);m();m();var iD=require("fs/promises");Jf();Xr();cd();Bt();var ur=V(mr(),1),cf=require("node:path");is();ji();jr();Nr();ju();var Pke="https://cdn.builder.io",AW=async(t,e)=>{console.log(""),Tt((0,ur.bgCyan)((0,ur.bold)((0,ur.white)(" figma migrate ")))+" "+(0,ur.dim)(Ve));let{builderPrivateKey:r,builderPublicKey:n}=await jt(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0});await qe("figma publish started",{spaceId:n});let i=await Hu(t);if(i.length>0){await qe("figma migrate with existing files",{spaceId:n}),I.warning(`${(0,ur.yellow)("This repo already has figma mappings in:")}
2420
2420
 
2421
2421
  ${i.map(u=>` - ${(0,cf.relative)(t.getAppRootDir(),u)}`).join(`
2422
2422
  `)}
@@ -4198,6 +4198,7 @@ Act as an expert QA tester performing comprehensive feature validation using Chr
4198
4198
  - Actions where the visual change is negligible
4199
4199
  - **Quality over quantity**: 4-8 well-chosen screenshots are more valuable than 20 redundant ones
4200
4200
  - Use screenshots to validate UI state and catch visual regressions
4201
+ - Use "mcp__chrome__take_screenshot" without "filePath" parameter.
4201
4202
 
4202
4203
  3. **Proactive Error Monitoring**
4203
4204
 
@@ -4311,6 +4312,7 @@ Act as an expert QA tester performing comprehensive feature validation using Chr
4311
4312
  - Use **Chrome MCP** for browser automation, console monitoring, and network analysis
4312
4313
  - Use **Computer Use MCP** for taking screenshots and interacting with the browser UI
4313
4314
  - Combine both tools seamlessly to create comprehensive test reports with visual evidence
4315
+ - Prefer "mcp__chrome__take_screenshot" without "filePath" parameter, so the screenshot is included in the response.
4314
4316
 
4315
4317
  Use tools proactively without waiting for explicit instructions. For screenshots, think "timelapse": capture enough keyframes to prove the test flow, but skip redundant intermediate states.
4316
4318
 
@@ -4783,7 +4785,7 @@ Steps:
4783
4785
  5. Verify the installation is complete
4784
4786
 
4785
4787
  Make sure to follow all the instructions in the installation.md document carefully.`,h=new URL("/projects/branch",Be);h.searchParams.set("apiKey",t.builderPublicKey);let f=await Pe(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`},body:JSON.stringify({projectId:p,userMessage:{userPrompt:d,maxCompletions:200},actor:"repo-indexing"})});if(!f.ok){let D=await f.text();I.warn(`Failed to spawn background agent: ${D}. Project created but agent not started.`),n.stop(),await qe("fusion example project agent failed",{designSystemName:e,projectId:p,userId:t.userId,spaceId:t.builderPublicKey,success:!1,error:`Agent spawn failed: ${D}`,projectCreated:!0});return}let g;if(f.body){let D=f.body.getReader(),w=new TextDecoder,v="";try{for(;;){let{done:x,value:C}=await D.read();if(x)break;v+=w.decode(C,{stream:!0});let E=v.split(`
4786
- `);v=E.pop()||"";for(let A of E)if(A.trim())try{let F=JSON.parse(A.trim());switch(F.type){case"validating-project":case"creating-branch":case"setting-up-container":case"sending-initial-message":n.message(F.message),F.branchName&&(g=F.branchName);break;case"branch-created":g=F.branchName,n.message(F.message);break;case"error":I.error(`Error: ${F.error||F.message}`);break;case"ai":r.debug&&F.event&&I.info(`AI event: ${F.event.type}`);break;case"ensure-container":r.debug&&F.event&&I.info(`Container event: ${F.event.type||"update"}`);break}}catch{r.debug&&I.warn(`Failed to parse JSONL line: ${A}`)}}}finally{D.releaseLock()}}n.stop(),I.success("\u2713 Background agent spawned to install design system");let y=g||o,b=`https://builder.io/app/projects/${p}/${y}`;I.info(`Project URL: ${(0,po.cyan)(b)}`),await qe("fusion example project creation completed",{designSystemName:e,projectId:p,branchName:y,userId:t.userId,spaceId:t.builderPublicKey,success:!0})}catch(i){n.stop();let s=i instanceof Error?i.message:String(i);I.error(`Failed to create fusion example project: ${s}`),r.debug&&console.error(i),await qe("fusion example project creation error",{designSystemName:e,userId:t.userId,spaceId:t.builderPublicKey,success:!1,error:s})}}var eje=t=>t?t.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],tje=(t,e,r,n=[],i=!1,s,o,a=0,c=[],u=[],l=[])=>{let d=Date.now()-r,h=Math.floor(d/6e4),f=Math.floor(d%6e4/1e3),g=`${h}m ${f}s`,y=u.length-l.length,b=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),D=i||e.length<t.length||a>0||y>0,w=D?"Component Library updated":"Component Library created",v=D?"Updated on":"Created On";if(e.length===0&&t.length>0&&n.length===0&&!i&&a===0&&y===0){I.info(`
4788
+ `);v=E.pop()||"";for(let A of E)if(A.trim())try{let F=JSON.parse(A.trim());switch(F.type){case"validating-project":case"creating-branch":case"setting-up-container":case"sending-initial-message":n.message(F.message),F.branchName&&(g=F.branchName);break;case"branch-created":g=F.branchName,n.message(F.message);break;case"error":I.error(`Error: ${F.error||F.message}`);break;case"ai":r.debug&&F.event&&I.info(`AI event: ${F.event.type}`);break;case"ensure-container":r.debug&&F.event&&I.info(`Container event: ${F.event.type||"update"}`);break}}catch{r.debug&&I.warn(`Failed to parse JSONL line: ${A}`)}}}finally{D.releaseLock()}}n.stop(),I.success("\u2713 Background agent spawned to install design system");let y=g||o,b=`https://builder.io/app/projects/${p}/${y}`;I.info(`Project URL: ${(0,po.cyan)(b)}`),await qe("fusion example project creation completed",{designSystemName:e,projectId:p,branchName:y,userId:t.userId,spaceId:t.builderPublicKey,success:!0})}catch(i){n.stop();let s=i instanceof Error?i.message:String(i);I.error(`Failed to create fusion example project: ${s}`),r.debug&&console.error(i),await qe("fusion example project creation error",{designSystemName:e,userId:t.userId,spaceId:t.builderPublicKey,success:!1,error:s})}}var e5e=t=>t?t.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],t5e=(t,e,r,n=[],i=!1,s,o,a=0,c=[],u=[],l=[])=>{let d=Date.now()-r,h=Math.floor(d/6e4),f=Math.floor(d%6e4/1e3),g=`${h}m ${f}s`,y=u.length-l.length,b=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),D=i||e.length<t.length||a>0||y>0,w=D?"Component Library updated":"Component Library created",v=D?"Updated on":"Created On";if(e.length===0&&t.length>0&&n.length===0&&!i&&a===0&&y===0){I.info(`
4787
4789
  \u{1F4CB} This Repository is already fully indexed, if you want to overwrite use --force.`);return}if(I.info(`\u{1F4CB} ${w}
4788
4790
  ${v}: ${b}
4789
4791
  Components indexed: ${e.length} of ${t.length} total components
@@ -4798,18 +4800,18 @@ ${l.join(", ")}
4798
4800
  Re-run your command and try again. If this problem persists, please contact us at support@builder.io.`,I.warn(x);return}I.info(`Add "${s}" to your "builder.config.json" file to use your design system with code generation.
4799
4801
 
4800
4802
  Learn more at https://www.builder.io/c/docs/component-indexing#generating-code.
4801
- `)},jN=async(t,e)=>{let{designSystemPackage:r,skipDetailedGrouping:n,force:i,skipHeader:s,listIndexedRepos:o,components:a,include:c,exclude:u,instructions:l,uploadCustomDocs:p}=e,{designSystemName:d}=e,h=L=>!t.existsSync(L)||!t.statSync(L).isDirectory()?(I.error(`Directory ${L} does not exist. Please provide a valid directory.`),!1):!0,f=Date.now();Ql.getCurrentScope().setTag("operation","repo-indexing"),Ql.getCurrentScope().setTag("designSystemPackage",r||"none"),s||(console.log(),Tt((0,po.bgCyan)((0,po.bold)((0,po.white)(" repository indexing ")))+" "+(0,po.dim)(Ve)));let g=await jt(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0}),y=await hse(g);if(o){let L=await af(g);if(L.length===0){console.log("No indexed repositories found");return}console.log("Indexed repositories:"),L.forEach((z,k)=>{console.log(`${k+1}. ${z.designSystemName}`)});return}if(e.testFusionExample){let L=d;if(!L){let z=await af(g);if(z.length===0){I.error("No indexed design systems found. Please index a design system first.");return}let k=await xn({message:"Select a design system to test fusion example project creation:",options:z.map(O=>({value:O.designSystemName,label:O.designSystemName}))});if(xe(k)){ge("Test cancelled");return}L=k}await $se(g,L,e);return}let b=Ow.default.randomUUID().slice(0,8);Ql.getCurrentScope().setTag("sessionId",b);try{let L=await ije(g,e.debug);L.isAllowed||(I.error(`Error: ${L.reason||"Access denied for repository indexing"}`),process.exit(1))}catch(L){if(L instanceof ht){Yr(L);return}I.error("Error: We were unable to determine if your subscription is an enterprise subscription. Contact support@builder.io for more information."),process.exit(1)}let D={folders:[{path:t.getCwdDir()}]};e.includeDirectories&&e.includeDirectories.split(",").forEach(z=>{let k=z.trim();k.length>0&&(h(k)||process.exit(1),D.folders.push({path:k}))}),e.addDirectory&&(Array.isArray(e.addDirectory)?e.addDirectory:[e.addDirectory]).forEach(z=>{let k=z.trim();k.length>0&&(h(k)||process.exit(1),D.folders.push({path:k}))});let w=await oW(t,r),v=w.version,x=w.name,C=await af(g,{onlyEditAccess:!0}),E,A;try{if(d===void 0){let L=[...C.map(k=>({value:k.id,label:k.designSystemName+" ("+k.scope+")"+(e.debug?` - ${k.id}`:"")}))],z="new";if(L.length>0&&(z=await xn({message:"Which design system would you like to index? You can bypass this by re-running this command with the --designSystemName flag.",options:[...L,{value:"new",label:"Create a new design system"}]}),xe(z)))return;if(z==="new"){let k=await yk(g,y);if(!k)return;A=k;let O=await St({message:"What is your design system name?",initialValue:x,validate($){if($.trim().length===0)return"A design system name is required"}});if(xe(O))return;if(d=O,E=cW(g,d,A,C),E){if(A==="organization"&&E.spaceId!==g.builderPublicKey){I.warn("A design system with this name already exists within your organization, but you do not have permission to re-index it.");return}if(!e.yes){let $=await hr({message:`A design system with the name "${d}" already exists in your ${A}. Would you like to proceed with this design system?`});if(xe($)||!$)return}}}else{if(E=C.find(k=>k.id===z),A=E.scope,A==="organization"&&(E.spaceId!==g.builderPublicKey||!y?.isAdminInOrganization)){I.warn("A design system with this name already exists within your organization, but you do not have permission to re-index it.");return}d=E.designSystemName}}else if(E=aW(d,C),E){if(A=E.scope,A==="organization"&&(E.spaceId!==g.builderPublicKey||!y?.isAdminInOrganization)){I.warn("A design system with this name already exists within your organization, but you do not have permission to re-index it.");return}}else{if(!e.yes){let z=await hr({message:`No indexed design system named "${d}" exists. Would you like to proceed with creating a new design system index?`});if(xe(z)||!z)return}let L=await yk(g,y,e.scope);if(!L)return;A=L}}catch(L){let z=new gt("Failed to select a design system",{cause:L});Ql.captureException(z,{tags:{operation:"repo-indexing",sessionId:b,designSystemPackage:r||"none"}}),console.log("Sorry, we encountered a problem when selecting a design system to index. Please try again. If the issue persists, contact support@builder.io.");return}let F=mo();if(r)if((0,Use.isAbsolute)(r))h(r)||process.exit(1),D.folders.push({path:r});else{let L=t.join(t.getAppRootDir(),`node_modules/${r}`);await t.exists(L)||(I.error(`Design system package ${r} is not installed. Please install it first.`),process.exit(1))}e.debug&&console.log("Workspace config",D);let P=E?.id||"",_=!E&&d;if(_){let L=await Nw(t);P=await uW(g,{designSystemName:d,designSystemVersion:v,designSystemPackage:r,status:"in-progress",scope:A,gitOriginUrl:L?.originUrl,gitRelativePath:L?.recommendedRoot,cliArgs:process.argv.slice(2)})}let B=null;try{if(p){F.start("Processing custom documentation"),await t.exists(p)||(I.error(`${p} does not exist`),process.exit(1));let{validDocs:L,invalidFiles:z}=await rje(t,p);if(L.length===0&&(I.error(`No valid files found in ${p}`),process.exit(1)),!_){I.warn("This design system already exists");let Y=await hr({message:"Are you sure you want to fully replace the existing files?"});(xe(Y)||!Y)&&(I.info("Aborting..."),process.exit(1))}await qe("repo indexing started",{sessionId:b,commandString:process.argv.slice(2).join(" "),forceBoolean:e.force||!1,currentDirectory:t.getCwdDir(),designSystemPackage:r||"none",designSystemPackageName:x||"none",designSystemVersion:v||"none",designSystemId:P||"none",userId:g.userId,spaceId:g.builderPublicKey,source:"custom"}),F.message("Uploading custom documentation files");let k=[],O=[],$=[],H=[],se=[],U=[],G=0;for(let Y of L)if(Wu(Y.document))k.push({name:Y.document.name,description:Y.document.description,relatedComponents:Y.document.relatedComponents,relevantFiles:Y.document.relevantFiles,hash:Y.document.hash,type:"component"});else if(Pc(Y.document)){let ne={name:Y.document.name,type:"token",relevantFiles:Y.document.relevantFiles,tokens:[],hash:Y.document.hash};H.push(ne)}for(let Y of L)try{if(await nje(t,g,Y,{designSystemId:P,designSystemPackage:r,designSystemVersion:v,sessionId:`${b}-custom-doc-${Y.document.name}`,debug:e.debug}),Wu(Y.document))O.push({name:Y.document.name,description:Y.document.description,relatedComponents:Y.document.relatedComponents,relevantFiles:Y.document.relevantFiles,hash:Y.document.hash,type:"component"});else if(pd(Y.document))G++;else if(Pc(Y.document)){let ne={name:Y.document.name,type:"token",relevantFiles:Y.document.relevantFiles,tokens:[],hash:Y.document.hash};se.push(ne)}}catch(ne){Wu(Y.document)?$.push(Y.document.name):Pc(Y.document)?U.push(Y.document.name):$.push(Y.document.name),e.debug&&console.error(`Failed to process ${Y.document.name}:`,ne)}if(O.length>0){F.message("Creating agent documentation");try{await BN(t,g,O,{designSystemId:P,debug:e.debug,hasIcons:G>0,hasDesignTokens:H.length>0})}catch(Y){I.warn(`Failed to create agent documentation: ${Y instanceof Error?Y.message:String(Y)}`)}}let K=await jse(g,P,e.debug),oe=O.map(Y=>({name:Y.name,type:"component",description:Y.description,relevantFiles:Y.relevantFiles,relatedComponents:Y.relatedComponents,hash:Y.hash}));L.forEach(Y=>{pd(Y.document)?oe.push({name:Y.document.name,type:"icon"}):Pc(Y.document)?oe.push({name:Y.document.name,type:"token",relevantFiles:Y.document.relevantFiles,tokens:[],hash:Y.document.hash}):ax(Y.document)&&oe.push({name:Y.document.name,type:"installation",relevantFiles:[],hash:Y.document.hash})}),F.stop("Custom documentation collected"),await qe("repo indexing completed",{sessionId:b,commandString:process.argv.slice(2).join(" "),forceBoolean:e.force,designSystemPackage:r||"none",designSystemId:P||"none",userId:g.userId,spaceId:g.builderPublicKey,source:"custom"});let Ae=[...z,...$];B={componentsToCheck:oe,storedComponentDocs:K,source:"custom",summaryData:{indexedComponents:O,discoveredComponents:k,failedComponents:Ae,failedTokens:U,numIconsIndexed:G,discoveredTokenGroups:H,tokenGroupsToIndex:se}}}else{if(await lW(t)){if(I.warn(Ny(`\u26A0\uFE0F Warning: Existing ${gk} folder found.
4803
+ `)},jN=async(t,e)=>{let{designSystemPackage:r,skipDetailedGrouping:n,force:i,skipHeader:s,listIndexedRepos:o,components:a,include:c,exclude:u,instructions:l,uploadCustomDocs:p}=e,{designSystemName:d}=e,h=L=>!t.existsSync(L)||!t.statSync(L).isDirectory()?(I.error(`Directory ${L} does not exist. Please provide a valid directory.`),!1):!0,f=Date.now();Ql.getCurrentScope().setTag("operation","repo-indexing"),Ql.getCurrentScope().setTag("designSystemPackage",r||"none"),s||(console.log(),Tt((0,po.bgCyan)((0,po.bold)((0,po.white)(" repository indexing ")))+" "+(0,po.dim)(Ve)));let g=await jt(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0}),y=await hse(g);if(o){let L=await af(g);if(L.length===0){console.log("No indexed repositories found");return}console.log("Indexed repositories:"),L.forEach((z,k)=>{console.log(`${k+1}. ${z.designSystemName}`)});return}if(e.testFusionExample){let L=d;if(!L){let z=await af(g);if(z.length===0){I.error("No indexed design systems found. Please index a design system first.");return}let k=await xn({message:"Select a design system to test fusion example project creation:",options:z.map(O=>({value:O.designSystemName,label:O.designSystemName}))});if(xe(k)){ge("Test cancelled");return}L=k}await $se(g,L,e);return}let b=Ow.default.randomUUID().slice(0,8);Ql.getCurrentScope().setTag("sessionId",b);try{let L=await i5e(g,e.debug);L.isAllowed||(I.error(`Error: ${L.reason||"Access denied for repository indexing"}`),process.exit(1))}catch(L){if(L instanceof ht){Yr(L);return}I.error("Error: We were unable to determine if your subscription is an enterprise subscription. Contact support@builder.io for more information."),process.exit(1)}let D={folders:[{path:t.getCwdDir()}]};e.includeDirectories&&e.includeDirectories.split(",").forEach(z=>{let k=z.trim();k.length>0&&(h(k)||process.exit(1),D.folders.push({path:k}))}),e.addDirectory&&(Array.isArray(e.addDirectory)?e.addDirectory:[e.addDirectory]).forEach(z=>{let k=z.trim();k.length>0&&(h(k)||process.exit(1),D.folders.push({path:k}))});let w=await oW(t,r),v=w.version,x=w.name,C=await af(g,{onlyEditAccess:!0}),E,A;try{if(d===void 0){let L=[...C.map(k=>({value:k.id,label:k.designSystemName+" ("+k.scope+")"+(e.debug?` - ${k.id}`:"")}))],z="new";if(L.length>0&&(z=await xn({message:"Which design system would you like to index? You can bypass this by re-running this command with the --designSystemName flag.",options:[...L,{value:"new",label:"Create a new design system"}]}),xe(z)))return;if(z==="new"){let k=await yk(g,y);if(!k)return;A=k;let O=await St({message:"What is your design system name?",initialValue:x,validate($){if($.trim().length===0)return"A design system name is required"}});if(xe(O))return;if(d=O,E=cW(g,d,A,C),E){if(A==="organization"&&E.spaceId!==g.builderPublicKey){I.warn("A design system with this name already exists within your organization, but you do not have permission to re-index it.");return}if(!e.yes){let $=await hr({message:`A design system with the name "${d}" already exists in your ${A}. Would you like to proceed with this design system?`});if(xe($)||!$)return}}}else{if(E=C.find(k=>k.id===z),A=E.scope,A==="organization"&&(E.spaceId!==g.builderPublicKey||!y?.isAdminInOrganization)){I.warn("A design system with this name already exists within your organization, but you do not have permission to re-index it.");return}d=E.designSystemName}}else if(E=aW(d,C),E){if(A=E.scope,A==="organization"&&(E.spaceId!==g.builderPublicKey||!y?.isAdminInOrganization)){I.warn("A design system with this name already exists within your organization, but you do not have permission to re-index it.");return}}else{if(!e.yes){let z=await hr({message:`No indexed design system named "${d}" exists. Would you like to proceed with creating a new design system index?`});if(xe(z)||!z)return}let L=await yk(g,y,e.scope);if(!L)return;A=L}}catch(L){let z=new gt("Failed to select a design system",{cause:L});Ql.captureException(z,{tags:{operation:"repo-indexing",sessionId:b,designSystemPackage:r||"none"}}),console.log("Sorry, we encountered a problem when selecting a design system to index. Please try again. If the issue persists, contact support@builder.io.");return}let F=mo();if(r)if((0,Use.isAbsolute)(r))h(r)||process.exit(1),D.folders.push({path:r});else{let L=t.join(t.getAppRootDir(),`node_modules/${r}`);await t.exists(L)||(I.error(`Design system package ${r} is not installed. Please install it first.`),process.exit(1))}e.debug&&console.log("Workspace config",D);let P=E?.id||"",_=!E&&d;if(_){let L=await Nw(t);P=await uW(g,{designSystemName:d,designSystemVersion:v,designSystemPackage:r,status:"in-progress",scope:A,gitOriginUrl:L?.originUrl,gitRelativePath:L?.recommendedRoot,cliArgs:process.argv.slice(2)})}let B=null;try{if(p){F.start("Processing custom documentation"),await t.exists(p)||(I.error(`${p} does not exist`),process.exit(1));let{validDocs:L,invalidFiles:z}=await r5e(t,p);if(L.length===0&&(I.error(`No valid files found in ${p}`),process.exit(1)),!_){I.warn("This design system already exists");let Y=await hr({message:"Are you sure you want to fully replace the existing files?"});(xe(Y)||!Y)&&(I.info("Aborting..."),process.exit(1))}await qe("repo indexing started",{sessionId:b,commandString:process.argv.slice(2).join(" "),forceBoolean:e.force||!1,currentDirectory:t.getCwdDir(),designSystemPackage:r||"none",designSystemPackageName:x||"none",designSystemVersion:v||"none",designSystemId:P||"none",userId:g.userId,spaceId:g.builderPublicKey,source:"custom"}),F.message("Uploading custom documentation files");let k=[],O=[],$=[],H=[],se=[],U=[],G=0;for(let Y of L)if(Wu(Y.document))k.push({name:Y.document.name,description:Y.document.description,relatedComponents:Y.document.relatedComponents,relevantFiles:Y.document.relevantFiles,hash:Y.document.hash,type:"component"});else if(Pc(Y.document)){let ne={name:Y.document.name,type:"token",relevantFiles:Y.document.relevantFiles,tokens:[],hash:Y.document.hash};H.push(ne)}for(let Y of L)try{if(await n5e(t,g,Y,{designSystemId:P,designSystemPackage:r,designSystemVersion:v,sessionId:`${b}-custom-doc-${Y.document.name}`,debug:e.debug}),Wu(Y.document))O.push({name:Y.document.name,description:Y.document.description,relatedComponents:Y.document.relatedComponents,relevantFiles:Y.document.relevantFiles,hash:Y.document.hash,type:"component"});else if(pd(Y.document))G++;else if(Pc(Y.document)){let ne={name:Y.document.name,type:"token",relevantFiles:Y.document.relevantFiles,tokens:[],hash:Y.document.hash};se.push(ne)}}catch(ne){Wu(Y.document)?$.push(Y.document.name):Pc(Y.document)?U.push(Y.document.name):$.push(Y.document.name),e.debug&&console.error(`Failed to process ${Y.document.name}:`,ne)}if(O.length>0){F.message("Creating agent documentation");try{await BN(t,g,O,{designSystemId:P,debug:e.debug,hasIcons:G>0,hasDesignTokens:H.length>0})}catch(Y){I.warn(`Failed to create agent documentation: ${Y instanceof Error?Y.message:String(Y)}`)}}let K=await jse(g,P,e.debug),oe=O.map(Y=>({name:Y.name,type:"component",description:Y.description,relevantFiles:Y.relevantFiles,relatedComponents:Y.relatedComponents,hash:Y.hash}));L.forEach(Y=>{pd(Y.document)?oe.push({name:Y.document.name,type:"icon"}):Pc(Y.document)?oe.push({name:Y.document.name,type:"token",relevantFiles:Y.document.relevantFiles,tokens:[],hash:Y.document.hash}):ax(Y.document)&&oe.push({name:Y.document.name,type:"installation",relevantFiles:[],hash:Y.document.hash})}),F.stop("Custom documentation collected"),await qe("repo indexing completed",{sessionId:b,commandString:process.argv.slice(2).join(" "),forceBoolean:e.force,designSystemPackage:r||"none",designSystemId:P||"none",userId:g.userId,spaceId:g.builderPublicKey,source:"custom"});let Ae=[...z,...$];B={componentsToCheck:oe,storedComponentDocs:K,source:"custom",summaryData:{indexedComponents:O,discoveredComponents:k,failedComponents:Ae,failedTokens:U,numIconsIndexed:G,discoveredTokenGroups:H,tokenGroupsToIndex:se}}}else{if(await lW(t)){if(I.warn(Ny(`\u26A0\uFE0F Warning: Existing ${gk} folder found.
4802
4804
 
4803
- For best results, please delete the repo-indexing folder in your project before running this command. Indexed component documentation can be viewed at https://builder.io/app/design-system-intelligence after completion.`,(process.stdout.columns||80)-4)),!e.yes){let te=await hr({message:"Continue with existing files?"});if(typeof te=="symbol"||!te){I.info("Repository indexing canceled.");return}}F=mo()}F.start("Indexing repository");let z={sessionId:b,commandString:process.argv.slice(2).join(" "),forceBoolean:e.force||!1,currentDirectory:t.getCwdDir(),skipDetailedGroupingBoolean:e.skipDetailedGrouping,designSystemPackage:r||"none",designSystemPackageName:x||"none",designSystemVersion:v||"none",designSystemId:P||"none",workspaceConfig:D,includeDirectories:e.includeDirectories||"none",addDirectory:e.addDirectory,debugBoolean:e.debug||!1,listIndexedReposBoolean:o||!1,userId:g.userId,spaceId:g.builderPublicKey,instructions:l};await qe("repo indexing started",z),F.message("Looking for components");let k=await jse(g,P,e.debug),O=k.find(te=>pd(te)),$=k.filter(te=>Pc(te)),H=k.filter(te=>Wu(te)),se=eje(a),U=se.length>0,[G,K,oe,Ae]=await Promise.all([vse(t,g,`${b}-component-discovery`,H,{designSystemPackage:r,designSystemVersion:v,workspaceConfig:D,debug:e.debug,force:i,specificComponents:se,include:c,exclude:u,instructions:l}),Pse(t,g,`${b}-installation-discovery`,{designSystemId:P,designSystemPackage:r,designSystemVersion:v,workspaceConfig:D,debug:e.debug,include:c,exclude:u,instructions:l}),!U&&wse(t,g,`${b}-icon-discovery`,{designSystemPackage:r,workspaceConfig:D,debug:e.debug,include:c,exclude:u,instructions:l})||void 0,!U&&Sse(t,g,`${b}-token-discovery`,$,{designSystemPackage:r,workspaceConfig:D,debug:e.debug,force:i,include:c,exclude:u,instructions:l})]),{numComponentsFound:Y,componentsToIndex:ne,discoveredComponents:vt}=G,{tokenGroupsToIndex:sr,discoveredTokenGroups:ie}=Ae||{tokenGroupsToIndex:[],discoveredTokenGroups:[]};if(se.length>0&&ne.length===0){I.info("No changes detected for the specified components. Use --force to reindex anyway.");return}let je=!U&&(i||!O||O.hash!==oe?.hash),ee=!U&&sr.length>0;if(Y===0&&!je&&!ee&&(I.warn(Ny("We were unable to index your repository because no components were found. If your components are a dependency of your project be sure to specify the package name using --designSystemPackage when re-running this command.",(process.stdout.columns||80)-4)),process.exit(1)),ne.length===0&&!je&&!ee){I.info(Ny("Component index is up to date!",(process.stdout.columns||80)-4));return}if(n)return;let Se=k.find(te=>mA(te));if(i){let te=H.length;if(F.stop(`${Y} new and ${te} existing component docs found`),te>0){let le=await hr({message:"Using --force will remove existing component documents. Continue?"});if(typeof le=="symbol"||!le){F.stop("Canceled");return}}F.start("")}let fe=0,wt=[];F.stop("Started indexing component docs:");let rt=new $N.default.MultiBar({clearOnComplete:!1,hideCursor:!0},$N.default.Presets.shades_grey);rt.log(""),rt.log(`Indexing in progress with ${Ry} workers...`);let _r=rt.create(ne.length+sr.length,fe,{name:"Total"},{format:`${(0,po.cyan)("{bar}")} | {name} | {percentage}% | (Step {value}/{total})`}),un={};for(let te=0;te<Ry;te++)un[te]={statusBar:rt.create(1,0,{name:"Starting..."},{format:"{name}"}),name:"Starting..."};let fo=(te,le)=>{le?un[te].name=`Indexing: ${le}`:un[te].name=Rw,_r.update(fe)},Re=async(te,le)=>{let Le=[],ot=[],wr=[...te],Ii=async ue=>{for(;wr.length>0;){let Z=wr.shift();if(!Z)break;switch(fo(ue,Z.name),Z.type){case"token":try{await Tse(t,g,`${b}-${Z.name}-doc`,Z,{designSystemId:P,designSystemPackage:r,designSystemVersion:v,workspaceConfig:D,debug:e.debug,include:c,exclude:u,instructions:l}),fe++}catch{ot.push(Z.name)}break;case"component":try{await Ise(t,g,`${b}-${Z.name}-doc`,Z,{designSystemId:P,designSystemPackage:r,designSystemVersion:v,workspaceConfig:D,debug:e.debug,include:c,exclude:u,instructions:l}),F.message(`Component docs stored for ${Z.name}`),wt.push(Z),fe++}catch{Le.push(Z.name)}break}}fo(ue,"")},tp=Array.from({length:le},(ue,Z)=>Ii(Z)),q=0,Q=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],me=setInterval(()=>{for(let ue=0;ue<Ry;ue++)un[ue].name!==Rw?un[ue].statusBar.update(0,{name:`${un[ue].name} ${Q[q]}`}):un[ue].statusBar.update(0,{name:Rw});q=(q+1)%Q.length},100);await Promise.all(tp),clearInterval(me);for(let ue=0;ue<Ry;ue++)un[ue].statusBar.update(0,{name:Rw});return rt.stop(),{failedComponents:Le,failedTokens:ot}},Qa=vt.some(te=>!H.find(le=>le.name===te.name)),[Fr,Ct,la]=await Promise.all([(async()=>!Se||i||Qa||je||ee?(F.message("Summarizing component library"),await BN(t,g,vt,{designSystemId:P,debug:e.debug,hasIcons:!U&&(oe?.icons.length||0)>0,hasDesignTokens:!U&&ie.length>0}),F.message("Agent docs stored"),{success:!0}):{success:!0})(),oe&&Cse(g,oe,{designSystemId:P,debug:e.debug,sessionId:`${b}-icon-discovery`,previousHash:O?.hash,force:i}),Re(U?ne:[...ne,...sr],Ry)]),{failedComponents:Ji,failedTokens:pa}=la,da=[...vt,...U?[]:ie];(oe?.icons.length||0)>0&&da.push({name:of,type:"icon"}),K?.hash&&da.push({name:Q0,type:"installation",hash:K.hash,relevantFiles:K.relevantFiles}),B={componentsToCheck:da,storedComponentDocs:k,source:"auto",specificComponentNames:se,summaryData:{indexedComponents:wt,discoveredComponents:vt,failedComponents:Ji,failedTokens:pa,numIconsIndexed:U?0:Ct&&oe?.icons.length||0,discoveredTokenGroups:ie,tokenGroupsToIndex:sr}},await qe("repo indexing completed",{sessionId:b,commandString:process.argv.slice(2).join(" "),forceBoolean:e.force,skipDetailedGroupingBoolean:e.skipDetailedGrouping,designSystemPackage:r||"none",designSystemId:P||"none",userId:g.userId,spaceId:g.builderPublicKey}),e.createFusionExample&&await $se(g,d,e)}}catch(L){throw I.error(L instanceof Error?L.message:String(L)),Ql.captureException(L,{tags:{operation:"repo-indexing",sessionId:b,designSystemPackage:r||"none",source:p?"custom":"auto"},extra:{skipDetailedGrouping:n,force:i,uploadCustomDocs:p}}),e.debug&&console.error(`
4804
- Stack trace:`,L instanceof Error?L.stack:""),P&&await bk(g,{id:P,designSystemName:d,designSystemPackage:r,designSystemVersion:v,status:"failed",scope:A,source:p?"custom":"auto"}),L}if(B&&B.summaryData){let L=B.storedComponentDocs.filter(z=>mA(z)?!1:B.specificComponentNames&&B.specificComponentNames.length>0?B.specificComponentNames.includes(z.name):!0);await Nse(g,B.componentsToCheck,L),tje(B.summaryData.discoveredComponents,B.summaryData.indexedComponents,f,B.summaryData.failedComponents,i,d,P,B.summaryData.numIconsIndexed,B.summaryData.discoveredTokenGroups,B.summaryData.tokenGroupsToIndex,B.summaryData.failedTokens),P&&await bk(g,{id:P,designSystemName:d,designSystemPackage:r,designSystemVersion:v,status:"completed",scope:A,source:B.source})}},jse=async(t,e,r)=>{let n=new URL(`/design-systems/v1/${e}/docs`,Be);n.searchParams.set("apiKey",t.builderPublicKey),n.searchParams.set("userId",t.userId);let i=await Pe(n,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`}});if(!i.ok){let s=await i.text();return r&&console.error("API request failed:",i.status,s),[]}return await i.json()},LN=t=>{if(Array.isArray(t))return t.map(n=>String(n).trim()).filter(n=>n.length>0);if(typeof t!="string")return[];let e=t.trim();if(e===""||e==="[]")return[];let r=e;return r=r.replace(/^\[|\]$/g,""),r=r.replace(/['"]/g,""),r.split(",").map(n=>n.trim()).filter(n=>n.length>0)},rje=async(t,e)=>{(await t.stat(e)).isDirectory()||(I.error(`${e} is not a valid directory`),process.exit(1));let i=(await t.readdir(e)).filter(l=>l.endsWith(".md")||l.endsWith(".mdx"));i.length===0&&(I.error(`No .md or .mdx files found in ${e}`),process.exit(1));let s=["name","description","type"],o=["token","icon","component","installation"],a=[],c=[],u=new Set;for(let l of i){let p=t.join(e,l),d=await t.readFile(p),h;try{h=dd(d||"")}catch{a.push(l);continue}let{frontmatter:f,body:g}=h;if(!f||typeof f!="object"||!s.every(w=>!!f[w])){a.push(l);continue}if(typeof f.type!="string"||!o.includes(f.type)){a.push(l);continue}let y=f.name.toLowerCase();if(u.has(y)){a.push(l);continue}if(u.add(y),!g||g.trim()===""){a.push(l);continue}let b={name:f.name,description:f.description,content:g,designSystemId:""},D;switch(f.type){case"component":{D={...b,type:"component",relatedComponents:LN(f.relatedComponents),relevantFiles:LN(f.relevantFiles),hash:""};break}case"token":{D={...b,type:"token",relevantFiles:LN(f.relevantFiles),hash:""};break}case"icon":{D={...b,type:"icon",hash:""};break}case"installation":{D={...b,type:"installation",hash:""};break}default:a.push(l);continue}c.push({document:D,filePath:p,frontmatter:f,body:g||""})}return I.info(`Found ${c.length} valid files`),a.length>0&&(I.warn(`Files: [${a.join(", ")}] will be excluded because they have invalid or duplicate frontmatter`),I.warn(["---","name: example","description: example text","type: token | icon | component | installation","(optional) relevantFiles: [file1, file2]","(optional) relatedComponents: [component1, component2]","---"].join(`
4805
- `))),{validDocs:c,invalidFiles:a}},nje=async(t,e,r,n)=>{let{document:i,body:s}=r,{designSystemId:o,designSystemPackage:a,designSystemVersion:c,sessionId:u,debug:l}=n,p;if(Wu(i)||Pc(i)){let d=i.relevantFiles||[];d.length>0?p=await Zl(t,d):p=Ow.default.createHash("sha256").update(s).digest("hex")}else(pd(i)||ax(i))&&(p=Ow.default.createHash("sha256").update(s).digest("hex"));try{if(Wu(i)){let d={...i,sessionId:u,hash:p||i.hash,designSystemId:o,...c&&{designSystemVersion:c},...a&&{designSystemPackage:a}};await Ti(e,d,l)}else if(Pc(i)){let d={...i,sessionId:u,hash:p||i.hash,designSystemId:o,...c&&{designSystemVersion:c},...a&&{designSystemPackage:a}};await Ti(e,d,l)}else if(pd(i)){let d={...i,sessionId:u,hash:p||i.hash,designSystemId:o,...c&&{designSystemVersion:c},...a&&{designSystemPackage:a}};await Ti(e,d,l)}else if(ax(i)){let d={...i,sessionId:u,hash:p||i.hash,designSystemId:o,...c&&{designSystemVersion:c},...a&&{designSystemPackage:a}};await Ti(e,d,l)}}catch(d){throw new gt(`Failed to process custom doc: ${i.name}`,{cause:d})}},ije=async(t,e)=>{let r=new URL("/allow-feature",Be);r.searchParams.set("feature","repo-indexing"),r.searchParams.set("apiKey",t.builderPublicKey),r.searchParams.set("userId",t.userId);let n=await Pe(r,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`}});if(!n.ok){let s=await n.text();return e&&console.error("API request failed:",n.status,s),{isAllowed:!1,reason:s||"Unable to verify permissions"}}let i=await n.json();return{isAllowed:i.isAllowed,reason:i.reason}};m();m();Xr();var Mw=V(mr(),1);Bt();Kn();var qse=(t,e)=>{try{let{builderPublicKey:r,userId:n,spaceName:i}=Sk(t,e);if(r===void 0){I.message((0,Mw.red)("\u2717 Not Authenticated to Builder.io")),I.message('Re-run this with the "auth" command to authenticate with Builder.io.');return}I.message((0,Mw.green)("\u2713 Authenticated to Builder.io")),i!==void 0&&I.message(`Space Name: ${i}`),r!==void 0&&I.message(`Space ID: ${r}`),n!==void 0&&I.message(`User ID: ${n}`)}catch(r){let n=t.Sentry?.captureException(new gt("Failed to read credentials",{cause:r}));I.error(`Sorry, we ran into a problem while checking authentication. Please try again. If this issue persists, contact support@builder.io, and provide the error ID: ${n}`)}};Xr();Bt();var qr=V(mr(),1);Nr();ji();var zse=async(t,e,r)=>{if(e==="status"){qse(t,r);return}if(r.reset){console.log(""),Tt((0,qr.bgCyan)((0,qr.bold)((0,qr.white)(" auth reset ")))+" "+(0,qr.dim)(Ve)),EW(t)?(I.success("Credentials have been cleared successfully"),await qe("auth reset",{})):I.info("No credentials found to clear"),Ir((0,qr.bgGreen)((0,qr.bold)((0,qr.white)(" Done! \u{1F389} "))));return}console.log(""),Tt((0,qr.bgCyan)((0,qr.bold)((0,qr.white)(" auth ")))+" "+(0,qr.dim)(Ve));let n=!1,{builderPublicKey:i}=await jt(t,r,{builderPrivateKey:!0,builderPublicKey:!0,force:!0,requireFigmaAuth:n?"always":void 0});await qe("auth",{spaceId:i}),Ir((0,qr.bgGreen)((0,qr.bold)((0,qr.white)(" Done! \u{1F389} "))))};m();Bt();var zr=V(mr(),1);Nr();sf();Xr();jr();ln();wg();var coe=require("child_process"),uoe=require("util");m();var Gse=require("child_process"),Vse=require("util"),Wf=(0,Vse.promisify)(Gse.exec);async function Hse(){let t={};try{let{stdout:e}=await Wf("node --version");t.node=e.trim().replace(/^v/,"")}catch{}try{let{stdout:e}=await Wf("npm --version");t.npm=e.trim()}catch{}try{let{stdout:e}=await Wf("pnpm --version");t.pnpm=e.trim()}catch{}try{let{stdout:e}=await Wf("yarn --version");t.yarn=e.trim()}catch{}try{let{stdout:e}=await Wf("bun --version");t.bun=e.trim()}catch{}try{let{stdout:e}=await Wf("deno --version"),r=e.match(/deno (\d+\.\d+\.\d+)/);r&&(t.deno=r[1])}catch{}return t}function Kse(t){let e=[];return t.node&&e.push({key:"node",type:"mise",tool:"node",version:t.node}),t.npm&&e.push({key:"npm",type:"mise",tool:"npm",version:t.npm}),t.pnpm&&e.push({key:"pnpm",type:"mise",tool:"pnpm",version:t.pnpm}),t.yarn&&e.push({key:"yarn",type:"mise",tool:"yarn",version:t.yarn}),t.bun&&e.push({key:"bun",type:"mise",tool:"bun",version:t.bun}),t.deno&&e.push({key:"deno",type:"mise",tool:"deno",version:t.deno}),e}function Wse(t){let e=[];return t.node&&e.push(`node v${t.node}`),t.npm&&e.push(`npm ${t.npm}`),t.pnpm&&e.push(`pnpm ${t.pnpm}`),t.yarn&&e.push(`yarn ${t.yarn}`),t.bun&&e.push(`bun ${t.bun}`),t.deno&&e.push(`deno ${t.deno}`),e.join(", ")}m();Bt();var Zse=V(rk(),1),Qse=require("path"),eoe=require("fs"),sje=new Set(["PATH","HOME","SHELL","USER","LOGNAME","TMPDIR","TEMP","TMP","PWD","OLDPWD","TERM","TERM_PROGRAM","TERM_PROGRAM_VERSION","TERM_SESSION_ID","LANG","LC_ALL","LC_CTYPE","LC_COLLATE","LC_TIME","LC_NUMERIC","LC_MONETARY","LC_MESSAGES","SHLVL","_","DISPLAY","COLORTERM","XDG_CONFIG_HOME","XDG_DATA_HOME","XDG_CACHE_HOME","XDG_RUNTIME_DIR","SSH_AUTH_SOCK","SSH_AGENT_PID","MANPATH","INFOPATH","HOMEBREW_PREFIX","HOMEBREW_CELLAR","HOMEBREW_REPOSITORY","COMMAND_MODE","__CFBundleIdentifier","__CF_USER_TEXT_ENCODING","Apple_PubSub_Socket_Render","SUDO_COMMAND","SUDO_USER","SUDO_UID","SUDO_GID","ORIGINAL_XDG_CURRENT_DESKTOP","EDITOR","VISUAL","PAGER","LESS","LESSOPEN","NODE","NODE_PATH","NODE_OPTIONS","CLAUDE_CODE_SSE_PORT","COLOR","CURSOR_TRACE_ID","ENABLE_IDE_INTEGRATION","GIT_ASKPASS","VSCODE_GIT_ASKPASS_EXTRA_ARGS","VSCODE_GIT_ASKPASS_MAIN","VSCODE_GIT_ASKPASS_NODE","VSCODE_GIT_IPC_HANDLE","VSCODE_INJECTION","VSCODE_INSPECTOR_OPTIONS","INIT_CWD","MallocNanoZone","OSLogRateLimit","XPC_FLAGS","XPC_SERVICE_NAME","PNPM_HOME"]),oje=[/^npm_config_/,/^npm_command$/,/^npm_execpath$/,/^npm_lifecycle_/,/^npm_node_execpath$/,/^npm_package_/];function Jse(t){return sje.has(t)?!0:oje.some(e=>e.test(t))}var Yse={"Build & Development":[/^NODE_ENV$/,/^CI$/,/^NODE_OPTIONS$/,/^DEBUG$/,/^PORT$/,/^HOST$/,/^ENVIRONMENT$/,/^ENV$/,/^BUILD_/,/^DEV_/],"NPM & Package Managers":[/^NPM_/,/^YARN_/,/^PNPM_/,/^BUN_/],"Framework Specific":[/^NEXT_/,/^REACT_/,/^VITE_/,/^NUXT_/,/^VUE_/,/^ANGULAR_/,/^SVELTE_/,/^GATSBY_/,/^REMIX_/],"Public Variables":[/^PUBLIC_/,/^NEXT_PUBLIC_/,/^REACT_APP_/,/^VITE_/],"API & Services":[/^API_/,/^DATABASE_/,/^DB_/,/^REDIS_/,/^AWS_/,/^GCP_/,/^AZURE_/,/^STRIPE_/,/^SENTRY_/,/^VERCEL_/,/^NETLIFY_/],Custom:[]},Xse=[/TOKEN/i,/KEY/i,/SECRET/i,/PASSWORD/i,/PASS/i,/AUTH/i,/PRIVATE/i,/CREDENTIAL/i],aje=new Set(["NODE_ENV","CI","PORT","HOST","ENVIRONMENT"]);async function cje(t,e){let r=[".env",".env.local",".env.development",".env.development.local"],n={};for(let i of r){let s=(0,Qse.join)(e,i);if((0,eoe.existsSync)(s))try{let o=(0,Zse.config)({path:s});o.parsed&&Object.assign(n,o.parsed)}catch{}}return n}function uje(t){let e=[];if(t)for(let[n,i]of Object.entries(t)){if(!i||Jse(n))continue;let s="Custom";for(let[a,c]of Object.entries(Yse))if(c.some(u=>u.test(n))){s=a;break}let o=Xse.some(a=>a.test(n));e.push({key:n,value:i,category:s==="Custom"?".env Variables":s,isSecret:o,shouldPreselect:!0,fromDotEnv:!0})}let r=new Set(t?Object.keys(t):[]);for(let[n,i]of Object.entries(process.env)){if(r.has(n)||Jse(n)||i===void 0)continue;let s="Custom";for(let[c,u]of Object.entries(Yse))if(u.some(l=>l.test(n))){s=c;break}let o=Xse.some(c=>c.test(n)),a=aje.has(n)||n.startsWith("NEXT_PUBLIC_")||n.startsWith("REACT_APP_")||n.startsWith("VITE_")||n.startsWith("PUBLIC_")||n==="NODE_ENV"||n==="CI";e.push({key:n,value:i,category:s,isSecret:o,shouldPreselect:a})}return e.sort((n,i)=>n.category!==i.category?n.category.localeCompare(i.category):n.key.localeCompare(i.key)),e}async function toe(t,e){let r=await cje(t,e),n=uje(r);if(n.length===0)return[];let i=new Map;for(let f of n)i.has(f.category)||i.set(f.category,[]),i.get(f.category).push(f);let s=[];for(let[f,g]of i){s.push({value:`__category_${f}__`,label:`
4806
- ${f} (${g.length})`,hint:""});for(let y of g){let b=y.isSecret?"***":y.value.length>50?`${y.value.substring(0,47)}...`:y.value;s.push({value:y.key,label:` ${y.key}`,hint:b})}}let o=n.filter(f=>f.shouldPreselect).map(f=>f.key),a=o.length,c=n.length,u=n.filter(f=>f.fromDotEnv).length,l=u>0?`Select environment variables (${u} from .env, ${a} pre-selected)`:`Select environment variables (${a} of ${c} pre-selected)`,p=await nc({message:l,options:s.filter(f=>!f.value.startsWith("__category_")),initialValues:o,required:!1});if(xe(p))return null;let d=new Set(p),h=[];for(let f of n)d.has(f.key)&&h.push({key:f.key,value:f.value,isSecret:f.isSecret});return h}function roe(t){let e=t.filter(n=>n.isSecret).length,r=t.length-e;return{total:t.length,secrets:e,public:r}}m();var UN=require("path"),noe=require("os");Bt();async function ioe(t,e){let r={},n=(0,UN.join)(e,".npmrc");try{let o=await t.readFile(n);o&&(r.projectNpmrc={path:n,content:o})}catch{}let i=(0,UN.join)((0,noe.homedir)(),".npmrc");try{let o=await t.readFile(i);o&&(r.userNpmrc={path:i,content:o})}catch{}let s="/etc/hosts";try{let o=await t.readFile(s);o&&(r.etcHosts={path:s,content:o})}catch{}return r}async function soe(t){let e=[];if(t.projectNpmrc&&e.push({key:"projectNpmrc",displayName:".npmrc (project)",path:"./.npmrc",content:t.projectNpmrc.content,hint:"NPM configuration for project"}),t.userNpmrc&&e.push({key:"userNpmrc",displayName:".npmrc (user)",path:"~/.npmrc",content:t.userNpmrc.content,hint:"Your user NPM configuration"}),t.etcHosts&&e.push({key:"etcHosts",displayName:"/etc/hosts",path:"/etc/hosts",content:t.etcHosts.content,hint:"System hosts file"}),e.length===0)return[];let r=e.map(a=>({value:a.key,label:a.displayName,hint:a.hint})),n=e.map(a=>a.key),i=await nc({message:`Select configuration files to include (${e.length} found)`,options:r,initialValues:n,required:!1});if(xe(i))return null;let s=new Set(i),o=[];for(let a of e)s.has(a.key)&&o.push({path:a.path,content:a.content});return o}m();var ooe=require("child_process");Bt();var ep=V(mr(),1);async function aoe(t,e){let n=0,i=e;for(;n<3;){if(n++,i)I.info(`Working directory: ${t}`);else{I.info(`Working directory: ${t}`);let o=await St({message:"Enter install command",placeholder:"npm install",defaultValue:"npm install",validate:a=>{if(!a||a.trim().length===0)return"Command cannot be empty"}});if(xe(o))return{success:!1,command:"",skipped:!0};i=o}let s=await lje(i,t);if(s.success)return I.success((0,ep.green)("\u2713 Install completed successfully!")),{success:!0,command:i,exitCode:0,skipped:!1};if(I.error((0,ep.red)(`\u2717 Install failed with exit code ${s.exitCode}`)),n<3){let o=await xn({message:"Try again with a different command?",options:[{value:"retry",label:"Yes, try again"},{value:"skip",label:"No, skip and continue anyway"}]});if(xe(o)||o==="skip")return I.warn((0,ep.yellow)("\u26A0 Skipping install step")),{success:!1,command:i,exitCode:s.exitCode,skipped:!0};i=void 0}else{I.warn((0,ep.yellow)("\u26A0 Maximum retry attempts reached"));let o=await xn({message:"Continue without successful install?",options:[{value:"yes",label:"Yes, continue anyway"},{value:"no",label:"No, exit"}]});return xe(o)||o==="no"?{success:!1,command:i,exitCode:s.exitCode,skipped:!1}:{success:!1,command:i,exitCode:s.exitCode,skipped:!0}}}return{success:!1,command:i||"",skipped:!0}}function lje(t,e){return new Promise(r=>{let n=t.trim().split(/\s+/),i=n[0],s=n.slice(1),o=(0,ooe.spawn)(i,s,{cwd:e,stdio:"inherit",shell:!0});o.on("error",a=>{I.error(`Failed to execute command: ${a.message}`),r({success:!1,exitCode:1})}),o.on("exit",a=>{let c=a??1;r({success:c===0,exitCode:c})})})}var pje=(0,uoe.promisify)(coe.exec);function dje(t){let e=t.replace(/\.git$/,"");return e.startsWith("git@")&&(e=e.replace(/^git@/,"https://").replace(/:([^/])/,"/$1")),!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`https://${e}`),e}async function loe(t,e){console.log(""),Tt((0,zr.bgCyan)((0,zr.bold)((0,zr.white)(" connect-repo ")))+" "+(0,zr.dim)(Ve));try{I.step("Detecting git repository...");let r=await Nw(t);if(!r){ge("No git repository detected. Please run this command from within a git repository.");return}let n=Lse(r);Zf(n.join(`
4807
- `),"Repository Detected");let i=await St({message:"Project name",initialValue:r.projectName,validate:f=>{if(!f||f.trim().length===0)return"Project name cannot be empty"}});if(xe(i)){ge("Project creation cancelled");return}let s=i.trim(),o=await aoe(r.gitRoot,e.installCommand);if(!o.success&&!o.skipped){ge("Installation failed. Cannot continue.");return}I.step("Collecting environment variables...");let a=await toe(t,r.gitRoot);if(a===null){ge("Environment variable selection cancelled");return}let c=roe(a);I.info(`\u2713 Selected ${c.total} variables (${c.secrets} secret, ${c.public} public)`),I.step("Collecting configuration files...");let u=await ioe(t,r.gitRoot),l=await soe(u);if(l===null){ge("Configuration file selection cancelled");return}l.length>0?I.info(`\u2713 Selected ${l.length} configuration file(s)`):I.info("\u25CB No configuration files selected"),I.step("Detecting tool versions...");let p=Xn();p.start("Checking installed tools");let d=await Hse(),h=Kse(d);p.stop(),I.info(`\u2713 Detected: ${Wse(d)}`),await fje(t,e,r,s,o.command,h,a,l)}catch(r){throw t.Sentry?.captureException(r),I.error(r instanceof Error?r.message:String(r)),ge("Command failed"),r}}async function fje(t,e,r,n,i,s,o,a){I.step("Creating Fusion project...");let c=[`Project: ${(0,zr.bold)(n)}`,`Provider: ${r.repoProvider} (${r.isPrivate?"private":"public"})`];r.recommendedRoot&&c.push(`Recommended root: ${r.recommendedRoot}`),c.push(`Environment: ${o.length} variables`,`Config files: ${a.length} files`,`Tools: ${s.length} dependencies`),Zf(c.join(`
4808
- `),"Summary");let u=Xn();u.start("Authenticating");let l=await jt(t,e,{builderPublicKey:!0,builderPrivateKey:!0});u.stop(),I.success(`\u2713 Authenticated as ${l.userId} (Space: ${l.spaceName||l.builderPublicKey})`);let p=await xn({message:`Create project "${(0,zr.bold)(n)}" in space "${(0,zr.bold)(l.spaceName||l.builderPublicKey)}"?`,options:[{value:"confirm",label:"Confirm",hint:"Create the project"},{value:"changeSpace",label:"Choose Different Space",hint:"Switch to another space"},{value:"cancel",label:"Cancel",hint:"Cancel project creation"}]});if(xe(p)){ge("Project creation cancelled");return}if(p==="cancel"){ge("Project creation cancelled");return}p==="changeSpace"&&(l=await jt(t,e,{builderPublicKey:!0,builderPrivateKey:!0,force:!0}));let d;try{let{stdout:D}=await pje("git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null || git remote show origin | grep 'HEAD branch' | cut -d' ' -f5",{cwd:r.gitRoot});d=D.trim().replace("refs/remotes/origin/","")}catch{I.warning("Could not determine main branch name")}let h=dje(r.originUrl),f={name:n,repoFullName:r.repoFullName,repoProvider:r.repoProvider,repoProtocol:r.repoProvider==="github"?void 0:"https",repoUrl:h,repoPrivate:r.isPrivate,needSetup:!0,settings:{installCommand:i,setupDependencies:s,recommendedRoot:r.recommendedRoot,environmentVariables:o,fileOverrides:a,mainBranchName:d}},g="happy-cli",y={name:g,createdBy:l.userId,friendlyName:g,isDefault:!0,isPublic:!1,lockedFusionEnvironment:"cloud"},b={...f,branchData:y};if(e.dryrun){u.stop(),I.info("Dry run mode - project will not be created"),Zf(`API Endpoint: POST ${Be}/projects?apiKey=${l.builderPublicKey}&userId=${l.userId}
4805
+ For best results, please delete the repo-indexing folder in your project before running this command. Indexed component documentation can be viewed at https://builder.io/app/design-system-intelligence after completion.`,(process.stdout.columns||80)-4)),!e.yes){let te=await hr({message:"Continue with existing files?"});if(typeof te=="symbol"||!te){I.info("Repository indexing canceled.");return}}F=mo()}F.start("Indexing repository");let z={sessionId:b,commandString:process.argv.slice(2).join(" "),forceBoolean:e.force||!1,currentDirectory:t.getCwdDir(),skipDetailedGroupingBoolean:e.skipDetailedGrouping,designSystemPackage:r||"none",designSystemPackageName:x||"none",designSystemVersion:v||"none",designSystemId:P||"none",workspaceConfig:D,includeDirectories:e.includeDirectories||"none",addDirectory:e.addDirectory,debugBoolean:e.debug||!1,listIndexedReposBoolean:o||!1,userId:g.userId,spaceId:g.builderPublicKey,instructions:l};await qe("repo indexing started",z),F.message("Looking for components");let k=await jse(g,P,e.debug),O=k.find(te=>pd(te)),$=k.filter(te=>Pc(te)),H=k.filter(te=>Wu(te)),se=e5e(a),U=se.length>0,[G,K,oe,Ae]=await Promise.all([vse(t,g,`${b}-component-discovery`,H,{designSystemPackage:r,designSystemVersion:v,workspaceConfig:D,debug:e.debug,force:i,specificComponents:se,include:c,exclude:u,instructions:l}),Pse(t,g,`${b}-installation-discovery`,{designSystemId:P,designSystemPackage:r,designSystemVersion:v,workspaceConfig:D,debug:e.debug,include:c,exclude:u,instructions:l}),!U&&wse(t,g,`${b}-icon-discovery`,{designSystemPackage:r,workspaceConfig:D,debug:e.debug,include:c,exclude:u,instructions:l})||void 0,!U&&Sse(t,g,`${b}-token-discovery`,$,{designSystemPackage:r,workspaceConfig:D,debug:e.debug,force:i,include:c,exclude:u,instructions:l})]),{numComponentsFound:Y,componentsToIndex:ne,discoveredComponents:vt}=G,{tokenGroupsToIndex:sr,discoveredTokenGroups:ie}=Ae||{tokenGroupsToIndex:[],discoveredTokenGroups:[]};if(se.length>0&&ne.length===0){I.info("No changes detected for the specified components. Use --force to reindex anyway.");return}let je=!U&&(i||!O||O.hash!==oe?.hash),ee=!U&&sr.length>0;if(Y===0&&!je&&!ee&&(I.warn(Ny("We were unable to index your repository because no components were found. If your components are a dependency of your project be sure to specify the package name using --designSystemPackage when re-running this command.",(process.stdout.columns||80)-4)),process.exit(1)),ne.length===0&&!je&&!ee){I.info(Ny("Component index is up to date!",(process.stdout.columns||80)-4));return}if(n)return;let Se=k.find(te=>mA(te));if(i){let te=H.length;if(F.stop(`${Y} new and ${te} existing component docs found`),te>0){let le=await hr({message:"Using --force will remove existing component documents. Continue?"});if(typeof le=="symbol"||!le){F.stop("Canceled");return}}F.start("")}let fe=0,wt=[];F.stop("Started indexing component docs:");let rt=new $N.default.MultiBar({clearOnComplete:!1,hideCursor:!0},$N.default.Presets.shades_grey);rt.log(""),rt.log(`Indexing in progress with ${Ry} workers...`);let _r=rt.create(ne.length+sr.length,fe,{name:"Total"},{format:`${(0,po.cyan)("{bar}")} | {name} | {percentage}% | (Step {value}/{total})`}),un={};for(let te=0;te<Ry;te++)un[te]={statusBar:rt.create(1,0,{name:"Starting..."},{format:"{name}"}),name:"Starting..."};let fo=(te,le)=>{le?un[te].name=`Indexing: ${le}`:un[te].name=Rw,_r.update(fe)},Re=async(te,le)=>{let Le=[],ot=[],wr=[...te],Ii=async ue=>{for(;wr.length>0;){let Z=wr.shift();if(!Z)break;switch(fo(ue,Z.name),Z.type){case"token":try{await Tse(t,g,`${b}-${Z.name}-doc`,Z,{designSystemId:P,designSystemPackage:r,designSystemVersion:v,workspaceConfig:D,debug:e.debug,include:c,exclude:u,instructions:l}),fe++}catch{ot.push(Z.name)}break;case"component":try{await Ise(t,g,`${b}-${Z.name}-doc`,Z,{designSystemId:P,designSystemPackage:r,designSystemVersion:v,workspaceConfig:D,debug:e.debug,include:c,exclude:u,instructions:l}),F.message(`Component docs stored for ${Z.name}`),wt.push(Z),fe++}catch{Le.push(Z.name)}break}}fo(ue,"")},tp=Array.from({length:le},(ue,Z)=>Ii(Z)),q=0,Q=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],me=setInterval(()=>{for(let ue=0;ue<Ry;ue++)un[ue].name!==Rw?un[ue].statusBar.update(0,{name:`${un[ue].name} ${Q[q]}`}):un[ue].statusBar.update(0,{name:Rw});q=(q+1)%Q.length},100);await Promise.all(tp),clearInterval(me);for(let ue=0;ue<Ry;ue++)un[ue].statusBar.update(0,{name:Rw});return rt.stop(),{failedComponents:Le,failedTokens:ot}},Qa=vt.some(te=>!H.find(le=>le.name===te.name)),[Fr,Ct,la]=await Promise.all([(async()=>!Se||i||Qa||je||ee?(F.message("Summarizing component library"),await BN(t,g,vt,{designSystemId:P,debug:e.debug,hasIcons:!U&&(oe?.icons.length||0)>0,hasDesignTokens:!U&&ie.length>0}),F.message("Agent docs stored"),{success:!0}):{success:!0})(),oe&&Cse(g,oe,{designSystemId:P,debug:e.debug,sessionId:`${b}-icon-discovery`,previousHash:O?.hash,force:i}),Re(U?ne:[...ne,...sr],Ry)]),{failedComponents:Ji,failedTokens:pa}=la,da=[...vt,...U?[]:ie];(oe?.icons.length||0)>0&&da.push({name:of,type:"icon"}),K?.hash&&da.push({name:Q0,type:"installation",hash:K.hash,relevantFiles:K.relevantFiles}),B={componentsToCheck:da,storedComponentDocs:k,source:"auto",specificComponentNames:se,summaryData:{indexedComponents:wt,discoveredComponents:vt,failedComponents:Ji,failedTokens:pa,numIconsIndexed:U?0:Ct&&oe?.icons.length||0,discoveredTokenGroups:ie,tokenGroupsToIndex:sr}},await qe("repo indexing completed",{sessionId:b,commandString:process.argv.slice(2).join(" "),forceBoolean:e.force,skipDetailedGroupingBoolean:e.skipDetailedGrouping,designSystemPackage:r||"none",designSystemId:P||"none",userId:g.userId,spaceId:g.builderPublicKey}),e.createFusionExample&&await $se(g,d,e)}}catch(L){throw I.error(L instanceof Error?L.message:String(L)),Ql.captureException(L,{tags:{operation:"repo-indexing",sessionId:b,designSystemPackage:r||"none",source:p?"custom":"auto"},extra:{skipDetailedGrouping:n,force:i,uploadCustomDocs:p}}),e.debug&&console.error(`
4806
+ Stack trace:`,L instanceof Error?L.stack:""),P&&await bk(g,{id:P,designSystemName:d,designSystemPackage:r,designSystemVersion:v,status:"failed",scope:A,source:p?"custom":"auto"}),L}if(B&&B.summaryData){let L=B.storedComponentDocs.filter(z=>mA(z)?!1:B.specificComponentNames&&B.specificComponentNames.length>0?B.specificComponentNames.includes(z.name):!0);await Nse(g,B.componentsToCheck,L),t5e(B.summaryData.discoveredComponents,B.summaryData.indexedComponents,f,B.summaryData.failedComponents,i,d,P,B.summaryData.numIconsIndexed,B.summaryData.discoveredTokenGroups,B.summaryData.tokenGroupsToIndex,B.summaryData.failedTokens),P&&await bk(g,{id:P,designSystemName:d,designSystemPackage:r,designSystemVersion:v,status:"completed",scope:A,source:B.source})}},jse=async(t,e,r)=>{let n=new URL(`/design-systems/v1/${e}/docs`,Be);n.searchParams.set("apiKey",t.builderPublicKey),n.searchParams.set("userId",t.userId);let i=await Pe(n,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`}});if(!i.ok){let s=await i.text();return r&&console.error("API request failed:",i.status,s),[]}return await i.json()},LN=t=>{if(Array.isArray(t))return t.map(n=>String(n).trim()).filter(n=>n.length>0);if(typeof t!="string")return[];let e=t.trim();if(e===""||e==="[]")return[];let r=e;return r=r.replace(/^\[|\]$/g,""),r=r.replace(/['"]/g,""),r.split(",").map(n=>n.trim()).filter(n=>n.length>0)},r5e=async(t,e)=>{(await t.stat(e)).isDirectory()||(I.error(`${e} is not a valid directory`),process.exit(1));let i=(await t.readdir(e)).filter(l=>l.endsWith(".md")||l.endsWith(".mdx"));i.length===0&&(I.error(`No .md or .mdx files found in ${e}`),process.exit(1));let s=["name","description","type"],o=["token","icon","component","installation"],a=[],c=[],u=new Set;for(let l of i){let p=t.join(e,l),d=await t.readFile(p),h;try{h=dd(d||"")}catch{a.push(l);continue}let{frontmatter:f,body:g}=h;if(!f||typeof f!="object"||!s.every(w=>!!f[w])){a.push(l);continue}if(typeof f.type!="string"||!o.includes(f.type)){a.push(l);continue}let y=f.name.toLowerCase();if(u.has(y)){a.push(l);continue}if(u.add(y),!g||g.trim()===""){a.push(l);continue}let b={name:f.name,description:f.description,content:g,designSystemId:""},D;switch(f.type){case"component":{D={...b,type:"component",relatedComponents:LN(f.relatedComponents),relevantFiles:LN(f.relevantFiles),hash:""};break}case"token":{D={...b,type:"token",relevantFiles:LN(f.relevantFiles),hash:""};break}case"icon":{D={...b,type:"icon",hash:""};break}case"installation":{D={...b,type:"installation",hash:""};break}default:a.push(l);continue}c.push({document:D,filePath:p,frontmatter:f,body:g||""})}return I.info(`Found ${c.length} valid files`),a.length>0&&(I.warn(`Files: [${a.join(", ")}] will be excluded because they have invalid or duplicate frontmatter`),I.warn(["---","name: example","description: example text","type: token | icon | component | installation","(optional) relevantFiles: [file1, file2]","(optional) relatedComponents: [component1, component2]","---"].join(`
4807
+ `))),{validDocs:c,invalidFiles:a}},n5e=async(t,e,r,n)=>{let{document:i,body:s}=r,{designSystemId:o,designSystemPackage:a,designSystemVersion:c,sessionId:u,debug:l}=n,p;if(Wu(i)||Pc(i)){let d=i.relevantFiles||[];d.length>0?p=await Zl(t,d):p=Ow.default.createHash("sha256").update(s).digest("hex")}else(pd(i)||ax(i))&&(p=Ow.default.createHash("sha256").update(s).digest("hex"));try{if(Wu(i)){let d={...i,sessionId:u,hash:p||i.hash,designSystemId:o,...c&&{designSystemVersion:c},...a&&{designSystemPackage:a}};await Ti(e,d,l)}else if(Pc(i)){let d={...i,sessionId:u,hash:p||i.hash,designSystemId:o,...c&&{designSystemVersion:c},...a&&{designSystemPackage:a}};await Ti(e,d,l)}else if(pd(i)){let d={...i,sessionId:u,hash:p||i.hash,designSystemId:o,...c&&{designSystemVersion:c},...a&&{designSystemPackage:a}};await Ti(e,d,l)}else if(ax(i)){let d={...i,sessionId:u,hash:p||i.hash,designSystemId:o,...c&&{designSystemVersion:c},...a&&{designSystemPackage:a}};await Ti(e,d,l)}}catch(d){throw new gt(`Failed to process custom doc: ${i.name}`,{cause:d})}},i5e=async(t,e)=>{let r=new URL("/allow-feature",Be);r.searchParams.set("feature","repo-indexing"),r.searchParams.set("apiKey",t.builderPublicKey),r.searchParams.set("userId",t.userId);let n=await Pe(r,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`}});if(!n.ok){let s=await n.text();return e&&console.error("API request failed:",n.status,s),{isAllowed:!1,reason:s||"Unable to verify permissions"}}let i=await n.json();return{isAllowed:i.isAllowed,reason:i.reason}};m();m();Xr();var Mw=V(mr(),1);Bt();Kn();var qse=(t,e)=>{try{let{builderPublicKey:r,userId:n,spaceName:i}=Sk(t,e);if(r===void 0){I.message((0,Mw.red)("\u2717 Not Authenticated to Builder.io")),I.message('Re-run this with the "auth" command to authenticate with Builder.io.');return}I.message((0,Mw.green)("\u2713 Authenticated to Builder.io")),i!==void 0&&I.message(`Space Name: ${i}`),r!==void 0&&I.message(`Space ID: ${r}`),n!==void 0&&I.message(`User ID: ${n}`)}catch(r){let n=t.Sentry?.captureException(new gt("Failed to read credentials",{cause:r}));I.error(`Sorry, we ran into a problem while checking authentication. Please try again. If this issue persists, contact support@builder.io, and provide the error ID: ${n}`)}};Xr();Bt();var qr=V(mr(),1);Nr();ji();var zse=async(t,e,r)=>{if(e==="status"){qse(t,r);return}if(r.reset){console.log(""),Tt((0,qr.bgCyan)((0,qr.bold)((0,qr.white)(" auth reset ")))+" "+(0,qr.dim)(Ve)),EW(t)?(I.success("Credentials have been cleared successfully"),await qe("auth reset",{})):I.info("No credentials found to clear"),Ir((0,qr.bgGreen)((0,qr.bold)((0,qr.white)(" Done! \u{1F389} "))));return}console.log(""),Tt((0,qr.bgCyan)((0,qr.bold)((0,qr.white)(" auth ")))+" "+(0,qr.dim)(Ve));let n=!1,{builderPublicKey:i}=await jt(t,r,{builderPrivateKey:!0,builderPublicKey:!0,force:!0,requireFigmaAuth:n?"always":void 0});await qe("auth",{spaceId:i}),Ir((0,qr.bgGreen)((0,qr.bold)((0,qr.white)(" Done! \u{1F389} "))))};m();Bt();var zr=V(mr(),1);Nr();sf();Xr();jr();ln();wg();var coe=require("child_process"),uoe=require("util");m();var Gse=require("child_process"),Vse=require("util"),Wf=(0,Vse.promisify)(Gse.exec);async function Hse(){let t={};try{let{stdout:e}=await Wf("node --version");t.node=e.trim().replace(/^v/,"")}catch{}try{let{stdout:e}=await Wf("npm --version");t.npm=e.trim()}catch{}try{let{stdout:e}=await Wf("pnpm --version");t.pnpm=e.trim()}catch{}try{let{stdout:e}=await Wf("yarn --version");t.yarn=e.trim()}catch{}try{let{stdout:e}=await Wf("bun --version");t.bun=e.trim()}catch{}try{let{stdout:e}=await Wf("deno --version"),r=e.match(/deno (\d+\.\d+\.\d+)/);r&&(t.deno=r[1])}catch{}return t}function Kse(t){let e=[];return t.node&&e.push({key:"node",type:"mise",tool:"node",version:t.node}),t.npm&&e.push({key:"npm",type:"mise",tool:"npm",version:t.npm}),t.pnpm&&e.push({key:"pnpm",type:"mise",tool:"pnpm",version:t.pnpm}),t.yarn&&e.push({key:"yarn",type:"mise",tool:"yarn",version:t.yarn}),t.bun&&e.push({key:"bun",type:"mise",tool:"bun",version:t.bun}),t.deno&&e.push({key:"deno",type:"mise",tool:"deno",version:t.deno}),e}function Wse(t){let e=[];return t.node&&e.push(`node v${t.node}`),t.npm&&e.push(`npm ${t.npm}`),t.pnpm&&e.push(`pnpm ${t.pnpm}`),t.yarn&&e.push(`yarn ${t.yarn}`),t.bun&&e.push(`bun ${t.bun}`),t.deno&&e.push(`deno ${t.deno}`),e.join(", ")}m();Bt();var Zse=V(rk(),1),Qse=require("path"),eoe=require("fs"),s5e=new Set(["PATH","HOME","SHELL","USER","LOGNAME","TMPDIR","TEMP","TMP","PWD","OLDPWD","TERM","TERM_PROGRAM","TERM_PROGRAM_VERSION","TERM_SESSION_ID","LANG","LC_ALL","LC_CTYPE","LC_COLLATE","LC_TIME","LC_NUMERIC","LC_MONETARY","LC_MESSAGES","SHLVL","_","DISPLAY","COLORTERM","XDG_CONFIG_HOME","XDG_DATA_HOME","XDG_CACHE_HOME","XDG_RUNTIME_DIR","SSH_AUTH_SOCK","SSH_AGENT_PID","MANPATH","INFOPATH","HOMEBREW_PREFIX","HOMEBREW_CELLAR","HOMEBREW_REPOSITORY","COMMAND_MODE","__CFBundleIdentifier","__CF_USER_TEXT_ENCODING","Apple_PubSub_Socket_Render","SUDO_COMMAND","SUDO_USER","SUDO_UID","SUDO_GID","ORIGINAL_XDG_CURRENT_DESKTOP","EDITOR","VISUAL","PAGER","LESS","LESSOPEN","NODE","NODE_PATH","NODE_OPTIONS","CLAUDE_CODE_SSE_PORT","COLOR","CURSOR_TRACE_ID","ENABLE_IDE_INTEGRATION","GIT_ASKPASS","VSCODE_GIT_ASKPASS_EXTRA_ARGS","VSCODE_GIT_ASKPASS_MAIN","VSCODE_GIT_ASKPASS_NODE","VSCODE_GIT_IPC_HANDLE","VSCODE_INJECTION","VSCODE_INSPECTOR_OPTIONS","INIT_CWD","MallocNanoZone","OSLogRateLimit","XPC_FLAGS","XPC_SERVICE_NAME","PNPM_HOME"]),o5e=[/^npm_config_/,/^npm_command$/,/^npm_execpath$/,/^npm_lifecycle_/,/^npm_node_execpath$/,/^npm_package_/];function Jse(t){return s5e.has(t)?!0:o5e.some(e=>e.test(t))}var Yse={"Build & Development":[/^NODE_ENV$/,/^CI$/,/^NODE_OPTIONS$/,/^DEBUG$/,/^PORT$/,/^HOST$/,/^ENVIRONMENT$/,/^ENV$/,/^BUILD_/,/^DEV_/],"NPM & Package Managers":[/^NPM_/,/^YARN_/,/^PNPM_/,/^BUN_/],"Framework Specific":[/^NEXT_/,/^REACT_/,/^VITE_/,/^NUXT_/,/^VUE_/,/^ANGULAR_/,/^SVELTE_/,/^GATSBY_/,/^REMIX_/],"Public Variables":[/^PUBLIC_/,/^NEXT_PUBLIC_/,/^REACT_APP_/,/^VITE_/],"API & Services":[/^API_/,/^DATABASE_/,/^DB_/,/^REDIS_/,/^AWS_/,/^GCP_/,/^AZURE_/,/^STRIPE_/,/^SENTRY_/,/^VERCEL_/,/^NETLIFY_/],Custom:[]},Xse=[/TOKEN/i,/KEY/i,/SECRET/i,/PASSWORD/i,/PASS/i,/AUTH/i,/PRIVATE/i,/CREDENTIAL/i],a5e=new Set(["NODE_ENV","CI","PORT","HOST","ENVIRONMENT"]);async function c5e(t,e){let r=[".env",".env.local",".env.development",".env.development.local"],n={};for(let i of r){let s=(0,Qse.join)(e,i);if((0,eoe.existsSync)(s))try{let o=(0,Zse.config)({path:s});o.parsed&&Object.assign(n,o.parsed)}catch{}}return n}function u5e(t){let e=[];if(t)for(let[n,i]of Object.entries(t)){if(!i||Jse(n))continue;let s="Custom";for(let[a,c]of Object.entries(Yse))if(c.some(u=>u.test(n))){s=a;break}let o=Xse.some(a=>a.test(n));e.push({key:n,value:i,category:s==="Custom"?".env Variables":s,isSecret:o,shouldPreselect:!0,fromDotEnv:!0})}let r=new Set(t?Object.keys(t):[]);for(let[n,i]of Object.entries(process.env)){if(r.has(n)||Jse(n)||i===void 0)continue;let s="Custom";for(let[c,u]of Object.entries(Yse))if(u.some(l=>l.test(n))){s=c;break}let o=Xse.some(c=>c.test(n)),a=a5e.has(n)||n.startsWith("NEXT_PUBLIC_")||n.startsWith("REACT_APP_")||n.startsWith("VITE_")||n.startsWith("PUBLIC_")||n==="NODE_ENV"||n==="CI";e.push({key:n,value:i,category:s,isSecret:o,shouldPreselect:a})}return e.sort((n,i)=>n.category!==i.category?n.category.localeCompare(i.category):n.key.localeCompare(i.key)),e}async function toe(t,e){let r=await c5e(t,e),n=u5e(r);if(n.length===0)return[];let i=new Map;for(let f of n)i.has(f.category)||i.set(f.category,[]),i.get(f.category).push(f);let s=[];for(let[f,g]of i){s.push({value:`__category_${f}__`,label:`
4808
+ ${f} (${g.length})`,hint:""});for(let y of g){let b=y.isSecret?"***":y.value.length>50?`${y.value.substring(0,47)}...`:y.value;s.push({value:y.key,label:` ${y.key}`,hint:b})}}let o=n.filter(f=>f.shouldPreselect).map(f=>f.key),a=o.length,c=n.length,u=n.filter(f=>f.fromDotEnv).length,l=u>0?`Select environment variables (${u} from .env, ${a} pre-selected)`:`Select environment variables (${a} of ${c} pre-selected)`,p=await nc({message:l,options:s.filter(f=>!f.value.startsWith("__category_")),initialValues:o,required:!1});if(xe(p))return null;let d=new Set(p),h=[];for(let f of n)d.has(f.key)&&h.push({key:f.key,value:f.value,isSecret:f.isSecret});return h}function roe(t){let e=t.filter(n=>n.isSecret).length,r=t.length-e;return{total:t.length,secrets:e,public:r}}m();var UN=require("path"),noe=require("os");Bt();async function ioe(t,e){let r={},n=(0,UN.join)(e,".npmrc");try{let o=await t.readFile(n);o&&(r.projectNpmrc={path:n,content:o})}catch{}let i=(0,UN.join)((0,noe.homedir)(),".npmrc");try{let o=await t.readFile(i);o&&(r.userNpmrc={path:i,content:o})}catch{}let s="/etc/hosts";try{let o=await t.readFile(s);o&&(r.etcHosts={path:s,content:o})}catch{}return r}async function soe(t){let e=[];if(t.projectNpmrc&&e.push({key:"projectNpmrc",displayName:".npmrc (project)",path:"./.npmrc",content:t.projectNpmrc.content,hint:"NPM configuration for project"}),t.userNpmrc&&e.push({key:"userNpmrc",displayName:".npmrc (user)",path:"~/.npmrc",content:t.userNpmrc.content,hint:"Your user NPM configuration"}),t.etcHosts&&e.push({key:"etcHosts",displayName:"/etc/hosts",path:"/etc/hosts",content:t.etcHosts.content,hint:"System hosts file"}),e.length===0)return[];let r=e.map(a=>({value:a.key,label:a.displayName,hint:a.hint})),n=e.map(a=>a.key),i=await nc({message:`Select configuration files to include (${e.length} found)`,options:r,initialValues:n,required:!1});if(xe(i))return null;let s=new Set(i),o=[];for(let a of e)s.has(a.key)&&o.push({path:a.path,content:a.content});return o}m();var ooe=require("child_process");Bt();var ep=V(mr(),1);async function aoe(t,e){let n=0,i=e;for(;n<3;){if(n++,i)I.info(`Working directory: ${t}`);else{I.info(`Working directory: ${t}`);let o=await St({message:"Enter install command",placeholder:"npm install",defaultValue:"npm install",validate:a=>{if(!a||a.trim().length===0)return"Command cannot be empty"}});if(xe(o))return{success:!1,command:"",skipped:!0};i=o}let s=await l5e(i,t);if(s.success)return I.success((0,ep.green)("\u2713 Install completed successfully!")),{success:!0,command:i,exitCode:0,skipped:!1};if(I.error((0,ep.red)(`\u2717 Install failed with exit code ${s.exitCode}`)),n<3){let o=await xn({message:"Try again with a different command?",options:[{value:"retry",label:"Yes, try again"},{value:"skip",label:"No, skip and continue anyway"}]});if(xe(o)||o==="skip")return I.warn((0,ep.yellow)("\u26A0 Skipping install step")),{success:!1,command:i,exitCode:s.exitCode,skipped:!0};i=void 0}else{I.warn((0,ep.yellow)("\u26A0 Maximum retry attempts reached"));let o=await xn({message:"Continue without successful install?",options:[{value:"yes",label:"Yes, continue anyway"},{value:"no",label:"No, exit"}]});return xe(o)||o==="no"?{success:!1,command:i,exitCode:s.exitCode,skipped:!1}:{success:!1,command:i,exitCode:s.exitCode,skipped:!0}}}return{success:!1,command:i||"",skipped:!0}}function l5e(t,e){return new Promise(r=>{let n=t.trim().split(/\s+/),i=n[0],s=n.slice(1),o=(0,ooe.spawn)(i,s,{cwd:e,stdio:"inherit",shell:!0});o.on("error",a=>{I.error(`Failed to execute command: ${a.message}`),r({success:!1,exitCode:1})}),o.on("exit",a=>{let c=a??1;r({success:c===0,exitCode:c})})})}var p5e=(0,uoe.promisify)(coe.exec);function d5e(t){let e=t.replace(/\.git$/,"");return e.startsWith("git@")&&(e=e.replace(/^git@/,"https://").replace(/:([^/])/,"/$1")),!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`https://${e}`),e}async function loe(t,e){console.log(""),Tt((0,zr.bgCyan)((0,zr.bold)((0,zr.white)(" connect-repo ")))+" "+(0,zr.dim)(Ve));try{I.step("Detecting git repository...");let r=await Nw(t);if(!r){ge("No git repository detected. Please run this command from within a git repository.");return}let n=Lse(r);Zf(n.join(`
4809
+ `),"Repository Detected");let i=await St({message:"Project name",initialValue:r.projectName,validate:f=>{if(!f||f.trim().length===0)return"Project name cannot be empty"}});if(xe(i)){ge("Project creation cancelled");return}let s=i.trim(),o=await aoe(r.gitRoot,e.installCommand);if(!o.success&&!o.skipped){ge("Installation failed. Cannot continue.");return}I.step("Collecting environment variables...");let a=await toe(t,r.gitRoot);if(a===null){ge("Environment variable selection cancelled");return}let c=roe(a);I.info(`\u2713 Selected ${c.total} variables (${c.secrets} secret, ${c.public} public)`),I.step("Collecting configuration files...");let u=await ioe(t,r.gitRoot),l=await soe(u);if(l===null){ge("Configuration file selection cancelled");return}l.length>0?I.info(`\u2713 Selected ${l.length} configuration file(s)`):I.info("\u25CB No configuration files selected"),I.step("Detecting tool versions...");let p=Xn();p.start("Checking installed tools");let d=await Hse(),h=Kse(d);p.stop(),I.info(`\u2713 Detected: ${Wse(d)}`),await f5e(t,e,r,s,o.command,h,a,l)}catch(r){throw t.Sentry?.captureException(r),I.error(r instanceof Error?r.message:String(r)),ge("Command failed"),r}}async function f5e(t,e,r,n,i,s,o,a){I.step("Creating Fusion project...");let c=[`Project: ${(0,zr.bold)(n)}`,`Provider: ${r.repoProvider} (${r.isPrivate?"private":"public"})`];r.recommendedRoot&&c.push(`Recommended root: ${r.recommendedRoot}`),c.push(`Environment: ${o.length} variables`,`Config files: ${a.length} files`,`Tools: ${s.length} dependencies`),Zf(c.join(`
4810
+ `),"Summary");let u=Xn();u.start("Authenticating");let l=await jt(t,e,{builderPublicKey:!0,builderPrivateKey:!0});u.stop(),I.success(`\u2713 Authenticated as ${l.userId} (Space: ${l.spaceName||l.builderPublicKey})`);let p=await xn({message:`Create project "${(0,zr.bold)(n)}" in space "${(0,zr.bold)(l.spaceName||l.builderPublicKey)}"?`,options:[{value:"confirm",label:"Confirm",hint:"Create the project"},{value:"changeSpace",label:"Choose Different Space",hint:"Switch to another space"},{value:"cancel",label:"Cancel",hint:"Cancel project creation"}]});if(xe(p)){ge("Project creation cancelled");return}if(p==="cancel"){ge("Project creation cancelled");return}p==="changeSpace"&&(l=await jt(t,e,{builderPublicKey:!0,builderPrivateKey:!0,force:!0}));let d;try{let{stdout:D}=await p5e("git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null || git remote show origin | grep 'HEAD branch' | cut -d' ' -f5",{cwd:r.gitRoot});d=D.trim().replace("refs/remotes/origin/","")}catch{I.warning("Could not determine main branch name")}let h=d5e(r.originUrl),f={name:n,repoFullName:r.repoFullName,repoProvider:r.repoProvider,repoProtocol:r.repoProvider==="github"?void 0:"https",repoUrl:h,repoPrivate:r.isPrivate,needSetup:!0,settings:{installCommand:i,setupDependencies:s,recommendedRoot:r.recommendedRoot,environmentVariables:o,fileOverrides:a,mainBranchName:d}},g="happy-cli",y={name:g,createdBy:l.userId,friendlyName:g,isDefault:!0,isPublic:!1,lockedFusionEnvironment:"cloud"},b={...f,branchData:y};if(e.dryrun){u.stop(),I.info("Dry run mode - project will not be created"),Zf(`API Endpoint: POST ${Be}/projects?apiKey=${l.builderPublicKey}&userId=${l.userId}
4809
4811
 
4810
4812
  Request Body:
4811
4813
  ${JSON.stringify(b,void 0,2)}`,"Dry Run Configuration"),Ir((0,zr.green)("Dry run complete! \u{1F3AF}"));return}u.start("Creating project on Builder.io");try{let D=await Pe(`${Be}/projects?apiKey=${l.builderPublicKey}&userId=${l.userId}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${l.builderPrivateKey}`},body:JSON.stringify(b)});if(u.stop(),!D.ok){let E=await D.text(),A;try{let F=JSON.parse(E);A=F.message||F.error||E}catch{A=E}throw new Error(`Failed to create project: ${A}`)}let w=await D.json();I.success((0,zr.green)("\u2713 Project created successfully")),I.success((0,zr.green)("\u2713 Default branch created"));let x=`${e.app||e.nativeApp?"builder://":e.dev?"http://localhost:1234":"https://builder.io"}/app/projects/${w.project.id}/${g}`;Ir((0,zr.green)("\u{1F389} Project created successfully!")),Zf([`${(0,zr.cyan)(x)}`,"","Next steps:","1. Configure your dev server command in project settings","2. Set up any required secrets","3. Launch your development environment"].join(`
4812
- `),"Project URL");let C=await hr({message:"Open project in browser?",initialValue:!0});if(!xe(C)&&C){let E=Xn();E.start("Opening browser"),await Yc(x),E.stop("Browser opened")}Ir((0,zr.green)("Done! \u{1F680}"))}catch(D){throw u.stop(),D}}async function mje(t,e){console.log(""),Tt((0,lu.bgMagenta)((0,lu.bold)((0,lu.white)(" dev-tools server ")))+" "+(0,lu.dim)(Ve)),t.debug("builder dev tools cli init");let r=await(0,poe.createDevTools)(t,e.nativeApp);await(0,foe.createDevToolsServer)({...r,getClientId:()=>"builder-dev-tools-cli",closeAppServer:async()=>{},restartAppServer:async()=>{t.debug("restart server")},enableAppWatch:async n=>n,...t})}Xne();async function hje(){let t=(0,moe.default)(process.argv.slice(2),{string:["figmaToken","privateKey","spaceId","cwd","prompt","mode","token","url","command","c","serverUrl","builderPublicKey","builderPrivateKey","builderUserId","repoFullName","branchName","installCommand","projectId","configJson","configPath","workspace","enabledTools","disabledTools","designSystemPackage","includeDirectories","addDirectory","scope","components","include","exclude","instructions","uploadCustomDocs"],boolean:["help","ci","force","verbose","fusionInit","debug","dryrun","yes","skipInstallation","skipDetailedGrouping","noAuth","auth","dev","app","noOpen","open","silent","interactive","jsonOutput","local","clearMappings","index","listIndexedRepos","disableMcp","reset","privacyMode","nativeApp","acceptSelfSigned","chat","createFusionExample","testFusionExample"],alias:{p:"port",c:"command",json:"jsonOutput",native:"nativeApp",y:"yes",add:"addDirectory",i:"include",e:"exclude"},default:{interactive:!1,fusionInit:!1}});t.cwd&&process.chdir(t.cwd),t.acceptSelfSigned&&(process.env.FUSION_REJECT_UNAUTHORIZED="0");let e=await w4(!!(t.verbose||t.debug));await e.withScope(async r=>{try{let n=await(0,doe.createDevToolsNodeSys)({cwd:process.cwd(),ignoreMissingConfig:!0});n.Sentry?.setTag("cli-command",t._.join(" ")),n.Sentry?.setContext("flags-args",{...t});let{builderPublicKey:i}=await jt(n,t,{});if(n.Sentry?.setTag("spaceId",i),t.help)return Zs(t._[t._.length-1]),await pe(0);let s=t._[0];if(s==="figma"){let o=t._[1];try{return await LW(n,o,t),await pe(0)}catch(a){return n.Sentry?.captureException(a),a instanceof ht&&(Yr(a),ge()),await pe(1)}}else if(s==="code"){let o=t._[1];try{t.index&&(t.skipDetailedGrouping=!0,t.skipHeader=!0,await jN(n,t)),await mW(n,o,t)}catch(a){return n.Sentry?.captureException(a),a instanceof ht&&(Yr(a),ge()),await pe(1)}}else if(s==="index-repo"||s==="repo-index")try{return await jN(n,t),await pe(0)}catch(o){return n.Sentry?.captureException(o),o instanceof ht&&(Yr(o),ge()),await pe(1)}else if(s==="launch"||s==="fusion")try{await gie({sys:n,args:t})}catch(o){return n.Sentry?.captureException(o),o instanceof ht&&(Yr(o),ge()),await pe(1)}else if(s==="add"){let o=Pk(n.getAppRootDir(),process.argv.slice(2));return await Z5(o),await pe(0)}else if(s==="sync"){let o=Pk(n.getAppRootDir(),process.argv.slice(2)),a=await pA(o);await oU(n,a).then(()=>{I.success("Builder dev tools is running")}).catch(c=>(I.error("Cannot start builder dev tools"),n.Sentry?.captureException(c),pe(1)))}else if(s==="auth"){let o=t._[1];try{return await zse(n,o,t),await pe(0)}catch(a){return n.Sentry?.captureException(a),a instanceof ht&&(Yr(a),ge()),await pe(1)}}else if(s==="connect-repo"||s==="repo-connect")try{return await loe(n,t),await pe(0)}catch(o){return n.Sentry?.captureException(o),o instanceof ht&&(Yr(o),ge()),await pe(1)}else{if(s==="help")return Zs(t._[1]),await pe(0);if(s==="publish"||s==="migrate"||s==="generate")return ge("Command not found, do you mean `npx "+Jt()+" figma "+s+"`?"),await pe(1);mje(n,t).then(()=>{I.success("Builder dev tools is running")}).catch(o=>(I.error("Cannot start builder dev tools"),e.captureException(o),pe(1)))}}catch(n){return e.captureException(n),n instanceof ht&&(Yr(n),ge("Cannot start builder dev tools due to network error")),await pe(1)}})}hje();var gje=void 0;
4814
+ `),"Project URL");let C=await hr({message:"Open project in browser?",initialValue:!0});if(!xe(C)&&C){let E=Xn();E.start("Opening browser"),await Yc(x),E.stop("Browser opened")}Ir((0,zr.green)("Done! \u{1F680}"))}catch(D){throw u.stop(),D}}async function m5e(t,e){console.log(""),Tt((0,lu.bgMagenta)((0,lu.bold)((0,lu.white)(" dev-tools server ")))+" "+(0,lu.dim)(Ve)),t.debug("builder dev tools cli init");let r=await(0,poe.createDevTools)(t,e.nativeApp);await(0,foe.createDevToolsServer)({...r,getClientId:()=>"builder-dev-tools-cli",closeAppServer:async()=>{},restartAppServer:async()=>{t.debug("restart server")},enableAppWatch:async n=>n,...t})}Xne();async function h5e(){let t=(0,moe.default)(process.argv.slice(2),{string:["figmaToken","privateKey","spaceId","cwd","prompt","mode","token","url","command","c","serverUrl","builderPublicKey","builderPrivateKey","builderUserId","repoFullName","branchName","installCommand","projectId","configJson","configPath","workspace","enabledTools","disabledTools","designSystemPackage","includeDirectories","addDirectory","scope","components","include","exclude","instructions","uploadCustomDocs"],boolean:["help","ci","force","verbose","fusionInit","debug","dryrun","yes","skipInstallation","skipDetailedGrouping","noAuth","auth","dev","app","noOpen","open","silent","interactive","jsonOutput","local","clearMappings","index","listIndexedRepos","disableMcp","reset","privacyMode","nativeApp","acceptSelfSigned","chat","createFusionExample","testFusionExample"],alias:{p:"port",c:"command",json:"jsonOutput",native:"nativeApp",y:"yes",add:"addDirectory",i:"include",e:"exclude"},default:{interactive:!1,fusionInit:!1}});t.cwd&&process.chdir(t.cwd),t.acceptSelfSigned&&(process.env.FUSION_REJECT_UNAUTHORIZED="0");let e=await w4(!!(t.verbose||t.debug));await e.withScope(async r=>{try{let n=await(0,doe.createDevToolsNodeSys)({cwd:process.cwd(),ignoreMissingConfig:!0});n.Sentry?.setTag("cli-command",t._.join(" ")),n.Sentry?.setContext("flags-args",{...t});let{builderPublicKey:i}=await jt(n,t,{});if(n.Sentry?.setTag("spaceId",i),t.help)return Zs(t._[t._.length-1]),await pe(0);let s=t._[0];if(s==="figma"){let o=t._[1];try{return await LW(n,o,t),await pe(0)}catch(a){return n.Sentry?.captureException(a),a instanceof ht&&(Yr(a),ge()),await pe(1)}}else if(s==="code"){let o=t._[1];try{t.index&&(t.skipDetailedGrouping=!0,t.skipHeader=!0,await jN(n,t)),await mW(n,o,t)}catch(a){return n.Sentry?.captureException(a),a instanceof ht&&(Yr(a),ge()),await pe(1)}}else if(s==="index-repo"||s==="repo-index")try{return await jN(n,t),await pe(0)}catch(o){return n.Sentry?.captureException(o),o instanceof ht&&(Yr(o),ge()),await pe(1)}else if(s==="launch"||s==="fusion")try{await gie({sys:n,args:t})}catch(o){return n.Sentry?.captureException(o),o instanceof ht&&(Yr(o),ge()),await pe(1)}else if(s==="add"){let o=Pk(n.getAppRootDir(),process.argv.slice(2));return await Zj(o),await pe(0)}else if(s==="sync"){let o=Pk(n.getAppRootDir(),process.argv.slice(2)),a=await pA(o);await oU(n,a).then(()=>{I.success("Builder dev tools is running")}).catch(c=>(I.error("Cannot start builder dev tools"),n.Sentry?.captureException(c),pe(1)))}else if(s==="auth"){let o=t._[1];try{return await zse(n,o,t),await pe(0)}catch(a){return n.Sentry?.captureException(a),a instanceof ht&&(Yr(a),ge()),await pe(1)}}else if(s==="connect-repo"||s==="repo-connect")try{return await loe(n,t),await pe(0)}catch(o){return n.Sentry?.captureException(o),o instanceof ht&&(Yr(o),ge()),await pe(1)}else{if(s==="help")return Zs(t._[1]),await pe(0);if(s==="publish"||s==="migrate"||s==="generate")return ge("Command not found, do you mean `npx "+Jt()+" figma "+s+"`?"),await pe(1);m5e(n,t).then(()=>{I.success("Builder dev tools is running")}).catch(o=>(I.error("Cannot start builder dev tools"),e.captureException(o),pe(1)))}}catch(n){return e.captureException(n),n instanceof ht&&(Yr(n),ge("Cannot start builder dev tools due to network error")),await pe(1)}})}h5e();var g5e=void 0;
4813
4815
  /*! Bundled license information:
4814
4816
 
4815
4817
  is-extglob/index.js: