builder.io 1.18.33 → 1.18.35
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 +594 -592
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +3 -3
- package/server/index.cjs +90 -90
- package/server/index.mjs +96 -96
- package/types/cli/launch/dev-server-orchestrator.d.ts +1 -1
- package/types/cli/launch/proxy.d.ts +4 -1
- package/types/tsconfig.tsbuildinfo +1 -1
- package/types/types/proxy-middleware.d.ts +7 -2
- package/types/cli/utils/dev-server-url-parser.d.ts +0 -12
- package/types/cli/utils/dev-server-url-parser.test.d.ts +0 -1
package/server/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
var
|
|
2
|
+
var cP=Object.create;var Ba=Object.defineProperty;var lP=Object.getOwnPropertyDescriptor;var dP=Object.getOwnPropertyNames;var pP=Object.getPrototypeOf,fP=Object.prototype.hasOwnProperty;var mP=(e,t,r)=>t in e?Ba(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Q=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gP=(e,t)=>{for(var r in t)Ba(e,r,{get:t[r],enumerable:!0})},hP=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of dP(t))!fP.call(e,o)&&o!==r&&Ba(e,o,{get:()=>t[o],enumerable:!(n=lP(t,o))||n.enumerable});return e};var Me=(e,t,r)=>(r=e!=null?cP(pP(e)):{},hP(t||!e||!e.__esModule?Ba(r,"default",{value:e,enumerable:!0}):r,e));var qe=(e,t,r)=>mP(e,typeof t!="symbol"?t+"":t,r);var yP,qt,Fr=v(()=>{"use strict";yP="1.18.35",qt=process.env.OVERRIDE_VERSION??yP});var Wc,Qo,Ma,La,dg,to,Jc,Yc,ro,pg,Zo=v(()=>{"use strict";Wc="preview-url",Qo="framework",Ma="platform",La="node",dg="/~builder-connect",to="/~builder-connected",Jc="/~builder-dev-tools",Yc="/~builder-dev-tools.js",ro="/~builder-dev-tools-close",pg="/mappings"});function le(e,t=""){return e.ts.createSourceFile("module.tsx",typeof t=="string"?t:"",e.ts.ScriptTarget.Latest,void 0)}function ja(e,t=""){let r=le(e,t?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${t}`);return r.statements[0]}function Ke(e,t,r){if(t){let n=e.ts.createPrinter({newLine:e.ts.NewLineKind.LineFeed,removeComments:r});return e.ts.isSourceFile(t)?n.printFile(t).trim()+`
|
|
3
3
|
`:n.printNode(e.ts.EmitHint.Unspecified,t,e.ts.createSourceFile("module.tsx","",e.ts.ScriptTarget.Latest)).trim()+`
|
|
4
|
-
`}return""}var Oe=v(()=>{"use strict"});var mg=E((
|
|
5
|
-
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let c=
|
|
6
|
-
${u}`)}else n(`Request to ${e.url.href} failed with status ${i.statusCode}: ${a}`)})}).on("error",i=>{n(`Error fetching ${e.url.href}, ${i}`)});e.body&&(s.setHeader("Content-Type","application/json"),s.write(e.body)),s.end()})}function
|
|
4
|
+
`}return""}var Oe=v(()=>{"use strict"});var mg=E((s8,fg)=>{"use strict";fg.exports=function(){if(process.env.npm_config_user_agent)return DP(process.env.npm_config_user_agent)};function DP(e){let t=e.split(" ")[0],r=t.lastIndexOf("/"),n=t.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:t.substring(r+1)}}});function Kt(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function de(e,t,r){t=mr(t),r=mr(r),t=e.dirname(t);let n=e.basename(r,e.extname(r));r=e.dirname(r);let o;return n==="index"?o=e.relative(t,r):o=e.relative(t,e.join(r,n)),o=mr(e.normalize(o)),o.startsWith(".")||(o="./"+o),o}function mr(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function no(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),o=n[n.length-1];return gg(o==="index"?e.basename(e.dirname(t)):o)}function gg(e){return Ee(e).replace(/ /g,"")}function Wt(e,t){let r=e.extname(t),n=mr(e.basename(t,r)).split("/").pop();return Ee(n==="index"?e.basename(e.dirname(t)):n)}function Pe(e,t){let r=mr(e.relative(e.getAppRootDir(),t));r=r.split("/").filter(o=>o!=="."&&o!==".."&&o!=="").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=e.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(o=>o.name.includes("next"))?"@/"+r:"~/"+r}function Ce(e,t){let r=t,n=[];for(let o=0;o<2;o++){let s=e.basename(r);if(!s||s==="components")break;n.unshift(s),r=e.dirname(r)}return n.join("/")}function Ee(e){for(e=e.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();e.includes(" ");)e=e.replace(/ /g," ");return e.split(" ").map(t=>t.length>2?t[0].toUpperCase()+t.slice(1):t).join("").trim()}function bt(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function we(e,t,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${t}`);return n&&(t=n),t=e.normalize(t),(await e.hash(t+"#"+r)).substring(0,8)}async function yg(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function as(e){return typeof e=="number"}function Xo(e){return typeof e=="boolean"}function ft(e){return typeof e=="string"}function ei(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function Bt(e){return JSON.parse(JSON.stringify(e))}function Ua(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function Dg(){try{let e=(0,hg.default)();if(e?.name)return e.name}catch{}return"npm"}function vP(){return process.platform.startsWith("win")}function Be(){return vP()?'"@builder.io/dev-tools"':"builder.io"}var hg,me=v(()=>{"use strict";hg=Me(mg(),1)});function mt(e){let t=e.join(e.getAppRootDir(),"tsconfig.json");return e.exists(t)}async function xt(e,t){async function r(o,s){if(s>10)return;let i=await e.readdir(o);for(let a of i){if(CP.includes(a))continue;let u=e.join(o,a),c=await e.stat(u);if(c){if(c.isFile()&&a.startsWith("builder-registry."))return u;if(c.isDirectory()){let l=await r(u,s+1);if(l)return l}}}}let n=await r(e.getAppRootDir(),0);if(!n){let s=`builder-registry.${await mt(e)?"ts":"js"}`;return e.join(t,s)}return n}async function An(e,t){let r=e.resolve("/");for(let n=0;n<20;n++){let o=e.join(t,"package.json"),s=await e.readFile(o);if(s)return JSON.parse(s);if(t===r)break;t=e.dirname(t)}return null}async function vg(e,t){for(let r=0;r<20;r++){let n=e.dirname(t),o=e.join(n,"node_modules");if(await e.exists(o))return o;if(t===e.getAppRootDir())break;t=e.dirname(t)}return e.join(e.getAppRootDir(),"node_modules")}async function us(e,t,r){let n=await e.readdir(t);return n.includes(r)?e.join(t,r):(await Promise.all(n.map(async s=>{if(s.startsWith(".")||s==="node_modules")return;let i=e.join(t,s);if((await e.stat(i)).isDirectory()){let u=await us(e,i,r);if(u)return u}}))).find(s=>typeof s=="string")}var CP,gt=v(()=>{"use strict";CP=["node_modules","dist","build","public"]});async function Ge(e,t,r){if(!Array.isArray(t)||t.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${t}`);let n=await vg(e,t[0]),o=e.join(n,"typescript","lib"),s=new Map,i={fileExists:a=>{if(a=e.normalize(a),a.includes("node_modules")){let u=cs.get(a);if(!u){try{e.statSync(a).isFile()?u={exists:!0,content:e.readFileSync(a)}:u={exists:!1}}catch{u={exists:!1}}cs.set(a,u)}return u.exists}if(!s.has(a))if(e.existsSync(a)){let c=e.statSync(a);s.set(a,c.isFile())}else s.set(a,!1);return s.get(a)},getCanonicalFileName:a=>e.normalize(a),getCurrentDirectory:()=>e.cwd(),getDefaultLibFileName:()=>e.join(o,"lib.d.ts"),getDefaultLibLocation:()=>o,getNewLine:()=>`
|
|
5
|
+
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let c=cs.get(a);if(c)return le(e,c.content)}let u;try{u=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),u==null}if(u==null){let c=e.basename(a),l=e.extname(c).toLowerCase();if(a.startsWith(o)&&l===".ts"&&(u=bg.get(c),u==null&&typeof self<"u"&&typeof fetch=="function"))throw new Ha(c)}return a.includes("node_modules")&&(u?cs.set(a,{exists:!0,content:u}):cs.set(a,{exists:!1})),le(e,u)},readFile:a=>{let u=e.readFileSync(a);return typeof u=="string"?u:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return bP(e,i,t,r)}catch(a){if(a instanceof Ha){await xP(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function bP(e,t,r,n){let o={rootNames:[...r],host:t,options:{}},s=e.ts.findConfigFile(e.dirname(r[0]),i=>e.existsSync(i));if(s){let i=Cg.get(s);if(!i){let a=e.ts.readConfigFile(s,u=>{let c=e.readFileSync(u);return typeof c=="string"?c:void 0});a.error?e.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(i=e.ts.parseJsonConfigFileContent(a.config,e.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(c,l)=>e.readdirSync(c),fileExists:c=>e.existsSync(c),readFile:c=>e.readFileSync(c)||void 0},e.dirname(s),void 0,s).options,Cg.set(s,i))}i&&(o.options=Bt(i))}return o.options.noEmit=!0,o.options.isolatedModules=!1,o.options.strict=!1,o.options.jsx=e.ts.JsxEmit.Preserve,o.options.allowJs=!0,Object.assign(o.options,n),e.ts.createProgram(o)}async function ti(e,t,r){r||(r=await Ge(e,[t]));let n=r.getSourceFile(t);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${t}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}async function xP(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;Va.has(t)||Va.set(t,fetch(r).then(n=>n.text()).then(n=>{bg.set(t,n)})),await Va.get(t),Va.delete(t)}async function xg(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:Qc(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function Qc(e,t){let r={diagnostics:[],code:t.code,output:null};try{let n=e.ts.transpileModule(t.code,{compilerOptions:t.compilerOptions,fileName:t.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(o=>{r.diagnostics.push({messageText:String(o.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var Ha,bg,Va,cs,Cg,Jt=v(()=>{"use strict";Oe();me();gt();Ha=class{constructor(t){qe(this,"libName");this.libName=t}};bg=new Map,Va=new Map,cs=new Map,Cg=new Map});var Zc=v(()=>{"use strict"});async function ri(e){let t=[],r=await An(e,e.getRepoRootDir());if(r){let n=await Sg(r,e);t.push(...n)}return t}async function Sg(e,t){let r=[];if(e&&typeof e=="object"){let n=new Set(Object.keys({...e.dependencies,...e.devDependencies}));for(let o of wP)if(n.has(o)&&!r.some(s=>s.name===o)){let s={name:o};wg.has(o)&&(s.version=await wg.get(o)(t)),r.push(s)}}return r}function Xc(e){let t=parseInt(e);return Number.isNaN(t)?void 0:t}var wg,wP,oo=v(()=>{"use strict";gt();me();wg=new Map([["next",async e=>{if(!e.spawnSync)return;let t=Dg(),r=t==="npm"?"npx":t,{stdout:n}=e.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let o=n.match(/(Next.js v)([\d.]+)/g);if(!o)return;let s=o[0].split("Next.js v")[1],[i,a,u]=s.split(".");return{major:Xc(i),minor:Xc(a),patch:Xc(u)}}]]),wP=["@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"]});import{access as b8,mkdir as EP,readdir as x8,readFile as PP,stat as w8,unlink as S8,writeFile as AP}from"node:fs/promises";import{homedir as TP,hostname as P8}from"node:os";import Eg from"node:path";import F8 from"typescript";import R8 from"launch-editor";import*as FP from"@sentry/node";import N8 from"prettier";function Pg(){let e=TP();return Eg.join(e,".config","builder","dev-tools.json")}function el(e,t){return typeof e=="object"&&e!=null&&t in e}async function ni(){let e=Pg();try{let t=await PP(e,"utf-8");if(typeof t=="string")return JSON.parse(t)}catch(t){if(t.code==="ENOENT")return null}return null}async function tl(e){let t=Pg();e=typeof e=="object"&&e!=null?e:{},await EP(Eg.dirname(t),{recursive:!0}),await AP(t,JSON.stringify(e??{},null,2))}var ls=v(()=>{"use strict";Zc();oo();Fr()});var z,ds,We=v(()=>{"use strict";z={gen1:"Gen 1",gen2:"Gen 2"},ds={CMS:"cms",VCP:"vcp",HYBRID:"hybrid"}});import{debug as _P}from"node:console";import{request as RP}from"node:http";import{request as IP}from"node:https";function oi(e){let t=Date.now();return new Promise((r,n)=>{let s=kP(e.url)({protocol:e.url.protocol,host:e.url.host,port:e.url.port,path:e.url.pathname+e.url.search,method:e.method,headers:e.headers},i=>{let a="";i.on("data",u=>{a+=u}),i.on("end",()=>{if(_P(`${e.method} ${e.url.href}, duration: ${Date.now()-t}ms`),typeof i.statusCode=="number"&&i.statusCode>=200&&i.statusCode<300)if(typeof i.headers["content-type"]!="string"||!i.headers["content-type"].includes("application/json"))n(`Response from ${e.url.href} content-type is ${i.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(u){n(`Response from ${e.url.href} is not valid JSON: ${a}
|
|
6
|
+
${u}`)}else n(`Request to ${e.url.href} failed with status ${i.statusCode}: ${a}`)})}).on("error",i=>{n(`Error fetching ${e.url.href}, ${i}`)});e.body&&(s.setHeader("Content-Type","application/json"),s.write(e.body)),s.end()})}function kP(e){if(e.protocol==="https:")return IP;if(e.protocol==="http:")return RP;throw new Error(`Unsupported protocol ${e.protocol}`)}var Ag=v(()=>{"use strict"});async function Tg(e){let t=new URL(`https://cdn.builder.io/api/v3/query/${e.publicApiKey}/${e.model}`);return t.searchParams.set("omit","meta.componentsUsed"),t.searchParams.set("apiKey",e.publicApiKey),t.searchParams.set("userAttributes.urlPath",e.pageUrl),t.searchParams.set("options.page.model",`"${e.model}"`),t.searchParams.set("cachebust","true"),(await oi({url:t,method:"GET"}))[e.model]}async function Fg(e,t){if(t.kind===ds.VCP)return!0;let r=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
|
|
7
7
|
models {
|
|
8
8
|
id
|
|
9
9
|
name
|
|
10
10
|
}
|
|
11
|
-
}`};e.debug(`Get model id for model name "${t.model}"`);let s=(await oi({url:r,method:"POST",headers:{Authorization:`Bearer ${t.privateAuthKey}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)})).data.models.find(u=>u.name===t.model);if(!s)return e.debug(`No model found for model name "${t.model}"`),!1;e.debug(`Data query, modelId: "${s.id}", urlPath: "${t.pageUrl}"`);let i=new URL("https://cdn.builder.io/api/v3/data");i.searchParams.set("limit","1"),i.searchParams.set("cachebust","true"),i.searchParams.set("collection","content"),i.searchParams.set("query.published.$ne","archived"),i.searchParams.set("query.query.$elemMatch.$and[0].property","urlPath"),i.searchParams.set("query.query.$elemMatch.$and[0].operator","is"),i.searchParams.set("query.query.$elemMatch.$and[0].value",t.pageUrl),i.searchParams.set("query.modelId",s.id),i.searchParams.set("apiKey",t.publicApiKey);let a=await oi({url:i,method:"GET"});return e.debug(`Data results (${a.results.length}): ${i.href}`),a.results.length>0}async function _g(e,t){let r=new URL(`https://cdn.builder.io/api/v3/content/${t.model}`);r.searchParams.set("apiKey",t.publicApiKey),r.searchParams.set("cachebust","true"),r.searchParams.set("cb",Date.now().toString()),t.pageUrl&&(r.searchParams.set("url",t.pageUrl),e.debug(`get model: "${t.model}", pageUrl: "${t.pageUrl}":`,r.href)),t.id&&(r.searchParams.set("query.id",t.id),e.debug(`get model: "${t.model}", id: "${t.id}":`,r.href));let n=await oi({url:r,method:"GET"});return e.debug(`get content results: ${n.results.length}`),n}async function Rg(e,t){let r=new URL(`https://cdn.builder.io/api/v1/write/${t.model}`);e.debug(`writing "${t.model}" content:`,r.href),await oi({url:r,method:"POST",headers:{Authorization:`Bearer ${t.privateAuthKey}`},body:t.body})}var
|
|
11
|
+
}`};e.debug(`Get model id for model name "${t.model}"`);let s=(await oi({url:r,method:"POST",headers:{Authorization:`Bearer ${t.privateAuthKey}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)})).data.models.find(u=>u.name===t.model);if(!s)return e.debug(`No model found for model name "${t.model}"`),!1;e.debug(`Data query, modelId: "${s.id}", urlPath: "${t.pageUrl}"`);let i=new URL("https://cdn.builder.io/api/v3/data");i.searchParams.set("limit","1"),i.searchParams.set("cachebust","true"),i.searchParams.set("collection","content"),i.searchParams.set("query.published.$ne","archived"),i.searchParams.set("query.query.$elemMatch.$and[0].property","urlPath"),i.searchParams.set("query.query.$elemMatch.$and[0].operator","is"),i.searchParams.set("query.query.$elemMatch.$and[0].value",t.pageUrl),i.searchParams.set("query.modelId",s.id),i.searchParams.set("apiKey",t.publicApiKey);let a=await oi({url:i,method:"GET"});return e.debug(`Data results (${a.results.length}): ${i.href}`),a.results.length>0}async function _g(e,t){let r=new URL(`https://cdn.builder.io/api/v3/content/${t.model}`);r.searchParams.set("apiKey",t.publicApiKey),r.searchParams.set("cachebust","true"),r.searchParams.set("cb",Date.now().toString()),t.pageUrl&&(r.searchParams.set("url",t.pageUrl),e.debug(`get model: "${t.model}", pageUrl: "${t.pageUrl}":`,r.href)),t.id&&(r.searchParams.set("query.id",t.id),e.debug(`get model: "${t.model}", id: "${t.id}":`,r.href));let n=await oi({url:r,method:"GET"});return e.debug(`get content results: ${n.results.length}`),n}async function Rg(e,t){let r=new URL(`https://cdn.builder.io/api/v1/write/${t.model}`);e.debug(`writing "${t.model}" content:`,r.href),await oi({url:r,method:"POST",headers:{Authorization:`Bearer ${t.privateAuthKey}`},body:t.body})}var rl=v(()=>{"use strict";We();Ag()});var ii,Ig,kg,nl=v(()=>{"use strict";ii="page",Ig="integration-welcome-screens",kg="8d9ee72a33344b4b867918b442ebd0af"});async function $g(e,t){let r=await _g(e,{model:Ig,publicApiKey:kg,id:t.templateContentId});if(!Array.isArray(r?.results)||r.results.length===0||!r.results[0].data?.blocks)throw new Error(`No Builder content found for id ${t.templateContentId}`);let n=JSON.stringify(r.results[0].data.blocks),o=$P(t.publicApiKey,t.pathname,t.title,n);await Rg(e,{privateAuthKey:t.privateAuthKey,model:ii,body:o})}function $P(e,t,r,n){return JSON.stringify({name:r,ownerId:e,published:"published",query:[{property:"urlPath",value:[t],operator:"is"}],data:{title:r,blocksString:n}})}var Ng=v(()=>{"use strict";rl();nl()});async function Og(e,t,r,n){e.debug(`connect builder with public key: ${t}`),e.publicApiKey=t;let o=e.closeAppServer(),s=await e.setPublicApiKey({publicApiKey:t});if(s.modifiedType==="permission-error")return e.debug("permission error, failed to set public api key"),{success:!1,pathname:""};e.debug(`set public key: process.env.${s.envKey}=${t}`),process.env[s.envKey]=t;let i=await e.builderPageOptions();e.debug(`builder model: ${ii}, path: ${i.pathname}, template: ${i.templateContentId}`);let a=await Fg(e,{model:ii,pageUrl:i.pathname,publicApiKey:t,privateAuthKey:r,kind:n});if(!a){await $g(e,{templateContentId:i.templateContentId,pathname:i.pathname,title:i.title,publicApiKey:t,privateAuthKey:r});let l=5,d=0;for(;!a&&d<l;){await new Promise(h=>setTimeout(h,1e3));let p=await Tg({model:ii,pageUrl:i.pathname,publicApiKey:t,privateAuthKey:r});d++,p&&p.length>0&&(a=!0)}}await o,e.debug("ensure builder setup");let u=[];n===ds.VCP?u=await e.ensureFigmaImportPage():u=await e.ensureBuilderSetup(),s.modifiedType&&u.push({filePath:s.file,modifiedType:s.modifiedType}),u.forEach(l=>{l.displayFilePath=e.relative(e.getAppRootDir(),l.filePath)}),u.sort((l,d)=>l.filePath.localeCompare(d.filePath)),u.length>0?(e.debug(`modified files: ${u.map(l=>l.displayFilePath).join(", ")}`),await e.restartAppServer(),await new Promise(l=>setTimeout(l,500))):e.debug("no modified files");let c={success:!0,pathname:i.localePathname||i.pathname,modifiedFiles:u,platform:e.platform(),kind:n};return n===ds.VCP&&(c.pathname="/"),e.debug(`connected builder: ${c.pathname}`),c}async function Bg(e){let t=await e.builderPageOptions();e.debug(`validateBuilder, pathname: ${t.pathname}, localePathname: ${t.localePathname}, isValid: ${e.isValid}`);let r={isValid:e.isValid,pathname:t.localePathname||t.pathname,platform:e.platform()};if(e.isValid)return r;let n=await e.getPublicApiKey();return n.envValue?(e.debug(`public api key: ${n.envValue}, ${n.file}`),e.publicApiKey=n.envValue,e.debug("builder connection is valid"),r.isValid=!0,e.isValid=!0,r):(e.debug("missing public api key"),r)}var Mg=v(()=>{"use strict";We();Ng();rl();nl()});async function Lg(e,t){let r={type:t.type};switch(t.type){case"getCache":{r.data=await e.getCache();break}case"setCache":{await e.setCache(t.data);break}case"connectBuilder":{r.data=await Og(e,t.data.publicApiKey,t.data.privateAuthKey,t.data.kind);break}case"enableDevTools":{r.data=BP(e,t.data.enabled);break}case"getRegistry":{r.data=await e.getRegistry(t.data);break}case"launchEditor":{r.data=await e.launchEditor(t.data);break}case"validateBuilder":{r.data=await Bg(e);break}case"loadComponent":{r.data=await e.loadComponent(t.data);break}case"getAllProjectFiles":{e.getAllProjectFiles?r.data=await e.getAllProjectFiles():r.errors=["getAllProjectFiles not implemented"];break}case"registerComponent":{r.data=await e.registerComponent(t.data),e.serverShouldRestart=!0;break}case"setComponentInfo":{r.data=await e.setRegisteredComponentInfo(t.data),e.serverShouldRestart=!0;break}case"setComponentInput":{r.data=await e.setRegisteredComponentInput(t.data),e.serverShouldRestart=!0;break}case"unregisterComponent":{r.data=await e.unregisterComponent(t.data),e.serverShouldRestart=!0;break}case"getFrameworks":{r.data=e.getFrameworks();break}case"readdir":{ol(e,t.path)?r.data=await e.readdir(t.path,!0):r.errors=[`Invalid file request: ${t.path}`];break}case"readFile":{ol(e,t.path)?r.data=await e.readFile(t.path):r.errors=[`Invalid file request: ${t.path}`];break}case"writeFile":{ol(e,t.path)?await e.writeFile(t.path,t.content):r.errors=[`Invalid file request: ${t.path}`];break}case"ensureFigmaImportPage":{r.data=await e.ensureFigmaImportPage();break}case"transileFile":{r.data=await xg(e,t);break}case"transileModule":{r.data=Qc(e,t);break}case"getPastSyncInfo":{r.data=await e.getPastSyncInfo?.(t.data);break}case"resyncSnippet":{r.data=await e.resyncSnippet?.(t.data);break}case"localConfig":{r.data=await ni();break}default:{r.errors=[`Unknown request type: ${JSON.stringify(t)}`];let n=t}}return r}function ol(e,t){if(!t||t.includes(".."))return!1;t=t.replace(/\\/g,"/");let r=t.split("/"),n=r[r.length-1];if(n.length>0){let o=n.split(".").pop();if(o&&(o=`.${o}`.toLocaleLowerCase(),o=o.split("?")[0],!OP.includes(o)))return!1}return NP(e,t),!1}function NP(e,t){if(!t)return!1;t=e.normalize(e.resolve(t));let r=e.getAppRootDir();return!(!t.startsWith(r)&&!t.includes("node_modules"))}function BP(e,t){return!t&&e.serverShouldRestart&&setTimeout(()=>{console.log(`
|
|
12
12
|
Restarting server after Builder Devtools update...
|
|
13
|
-
`),e.restartAppServer()},10),e.enableAppWatch(!t),{enabled:t,platform:e.platform()}}var $P,jg=v(()=>{"use strict";Jt();cs();Mg();$P=[".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 Ug(e){return Gg(e,`"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(\`
|
|
13
|
+
`),e.restartAppServer()},10),e.enableAppWatch(!t),{enabled:t,platform:e.platform()}}var OP,jg=v(()=>{"use strict";Jt();ls();Mg();OP=[".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 Ug(e){return Hg(e,`"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(\`
|
|
14
14
|
\`).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=\`
|
|
15
15
|
<div class="menu-toggle-tooltip-content">
|
|
16
16
|
<h3>Open Builder Devtools</h3>
|
|
@@ -21,7 +21,7 @@ Restarting server after Builder Devtools update...
|
|
|
21
21
|
<h3>How's Devtools working for you?</h3>
|
|
22
22
|
<p>We'd love your feedback!</p>
|
|
23
23
|
</div>
|
|
24
|
-
\`,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.33"}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)}
|
|
24
|
+
\`,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.35"}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)}
|
|
25
25
|
</style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
|
|
26
26
|
<aside>
|
|
27
27
|
<div class="logo"></div>
|
|
@@ -60,7 +60,7 @@ Restarting server after Builder Devtools update...
|
|
|
60
60
|
</nav>
|
|
61
61
|
</section>
|
|
62
62
|
</main>
|
|
63
|
-
\`,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.
|
|
63
|
+
\`,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.35"),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.35"),mo());})();`)}async function Vg(e){return Hg(e,`<!doctype html>
|
|
64
64
|
<html lang="en" dir="ltr">
|
|
65
65
|
<head>
|
|
66
66
|
<meta charset="utf-8" />
|
|
@@ -226,41 +226,41 @@ Restarting server after Builder Devtools update...
|
|
|
226
226
|
</script>
|
|
227
227
|
</body>
|
|
228
228
|
</html>
|
|
229
|
-
`)}async function
|
|
229
|
+
`)}async function Hg(e,t){let r=await yg(e),n=e.getFrameworks();return t.replace(/__LOCAL_APP_ID__/g,r).replace(/__DEV_TOOLS_URL__/g,e.devToolsServerUrl).replace(/__CLIENT_ID__/g,e.getClientId()).replace(/__FRAMEWORK__/g,n.length?n[0].name:"")}var Gg=v(()=>{"use strict";me()});import{platform as MP}from"node:os";async function zg(e,t){let r=new URL("/cli-auth","https://builder.io");r.searchParams.set("client_id",e.getClientId()),r.searchParams.set("host",await e.getDeviceId()),r.searchParams.set("response_type","code"),r.searchParams.set("cli","true");let n=new URL(to,e.devToolsServerUrl);n.searchParams.set(Ma,MP()),n.searchParams.set(La,process.versions.node);let o=e.getFrameworks();return o.length>0&&(r.searchParams.set(Qo,o[0].name),n.searchParams.set(Qo,o[0].name)),r.searchParams.set("redirect_url",n.href),r.searchParams.set("preview_url",t),r.href}var qg=v(()=>{"use strict";Zo()});var Ga=E((c9,Kg)=>{"use strict";var il={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let r="";return e<0?r+=`\x1B[${-e}D`:e>0&&(r+=`\x1B[${e}C`),t<0?r+=`\x1B[${-t}A`:t>0&&(r+=`\x1B[${t}B`),r},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},LP={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},jP={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?il.up():"");return e&&(t+=il.left),t}};Kg.exports={cursor:il,scroll:LP,erase:jP,beep:"\x07"}});var io=E((l9,sl)=>{var qa=process||{},Wg=qa.argv||[],za=qa.env||{},UP=!(za.NO_COLOR||Wg.includes("--no-color"))&&(!!za.FORCE_COLOR||Wg.includes("--color")||qa.platform==="win32"||(qa.stdout||{}).isTTY&&za.TERM!=="dumb"||!!za.CI),VP=(e,t,r=e)=>n=>{let o=""+n,s=o.indexOf(t,e.length);return~s?e+HP(o,t,r,s)+t:e+o+t},HP=(e,t,r,n)=>{let o="",s=0;do o+=e.substring(s,n)+r,s=n+t.length,n=e.indexOf(t,s);while(~n);return o+e.substring(s)},Jg=(e=UP)=>{let t=e?VP:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};sl.exports=Jg();sl.exports.createColors=Jg});import{stdin as GP,stdout as zP}from"node:process";import Yg from"node:readline";import{Writable as qP}from"node:stream";function KP({onlyFirst:e=!1}={}){let t=["[\\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(t,e?void 0:"g")}function ih(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(WP,"")}function sh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ps(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=ih(e),e.length===0))return 0;e=e.replace(ZP()," ");let r=t.ambiguousIsNarrow?1:2,n=0;for(let o of e){let s=o.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(YP.eastAsianWidth(o)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}function tA(){let e=new Map;for(let[t,r]of Object.entries(ke)){for(let[n,o]of Object.entries(r))ke[n]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},r[n]=ke[n],e.set(o[0],o[1]);Object.defineProperty(ke,t,{value:r,enumerable:!1})}return Object.defineProperty(ke,"codes",{value:e,enumerable:!1}),ke.color.close="\x1B[39m",ke.bgColor.close="\x1B[49m",ke.color.ansi=Qg(),ke.color.ansi256=Zg(),ke.color.ansi16m=Xg(),ke.bgColor.ansi=Qg(al),ke.bgColor.ansi256=Zg(al),ke.bgColor.ansi16m=Xg(al),Object.defineProperties(ke,{rgbToAnsi256:{value:(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let o=Number.parseInt(n,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>ke.rgbToAnsi256(...ke.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,o;if(t>=232)r=((t-232)*10+8)/255,n=r,o=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,o=a%6/5}let s=Math.max(r,n,o)*2;if(s===0)return 30;let i=30+(Math.round(o)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>ke.ansi256ToAnsi(ke.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>ke.ansi256ToAnsi(ke.hexToAnsi256(t)),enumerable:!1}}),ke}function rh(e,t,r){return String(e).normalize().replace(/\r\n/g,`
|
|
230
230
|
`).split(`
|
|
231
|
-
`).map(n=>
|
|
232
|
-
`)}function lh(e,t){if(typeof e=="string")return
|
|
231
|
+
`).map(n=>aA(n,t,r)).join(`
|
|
232
|
+
`)}function lh(e,t){if(typeof e=="string")return Wa.aliases.get(e)===t;for(let r of e)if(r!==void 0&&lh(r,t))return!0;return!1}function cA(e,t){if(e===t)return;let r=e.split(`
|
|
233
233
|
`),n=t.split(`
|
|
234
|
-
`),o=[];for(let s=0;s<Math.max(r.length,n.length);s++)r[s]!==n[s]&&o.push(s);return o}function za(e,t){let r=e;r.isTTY&&r.setRawMode(t)}var Yt,zP,ah,KP,WP,JP,YP,sl,Qg,Zg,Xg,ke,QP,ZP,eA,Ja,tA,cl,uh,rA,ch,ll,eh,th,nA,al,oA,iA,sA,Ka,p9,nh,uA,cA,Mt,ul,lA,dA,pA,oh,Wa,dl=v(()=>{Yt=Me(Ga(),1);zP=qP();ah={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var o=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,i=o;return 55296<=o&&o<=56319&&56320<=s&&s<=57343&&(o&=1023,s&=1023,i=o<<10|s,i+=65536),i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510?"F":i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518?"H":4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141?"W":32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630?"Na":i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109?"A":"N"},t.characterLength=function(n){var o=this.eastAsianWidth(n);return o=="F"||o=="W"||o=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var o=r(n),s=0,i=0;i<o.length;i++)s=s+this.characterLength(o[i]);return s},t.slice=function(n,o,s){textLen=t.length(n),o=o||0,s=s||1,o<0&&(o=textLen+o),s<0&&(s=textLen+s);for(var i="",a=0,u=r(n),c=0;c<u.length;c++){var l=u[c],d=t.length(l);if(a>=o-(d==2?1:0))if(a+d<=s)i+=l;else break;a+=d}return i}})(ah);KP=ah.exports,WP=sh(KP),JP=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},YP=sh(JP);sl=10,Qg=(e=0)=>t=>`\x1B[${t+e}m`,Zg=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Xg=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,ke={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ke.modifier);QP=Object.keys(ke.color),ZP=Object.keys(ke.bgColor);[...QP,...ZP];eA=XP(),Ja=new Set(["\x1B","\x9B"]),tA=39,cl="\x07",uh="[",rA="]",ch="m",ll=`${rA}8;;`,eh=e=>`${Ja.values().next().value}${uh}${e}${ch}`,th=e=>`${Ja.values().next().value}${ll}${e}${cl}`,nA=e=>e.split(" ").map(t=>ds(t)),al=(e,t,r)=>{let n=[...t],o=!1,s=!1,i=ds(ih(e[e.length-1]));for(let[a,u]of n.entries()){let c=ds(u);if(i+c<=r?e[e.length-1]+=u:(e.push(u),i=0),Ja.has(u)&&(o=!0,s=n.slice(a+1).join("").startsWith(ll)),o){s?u===cl&&(o=!1,s=!1):u===ch&&(o=!1);continue}i+=c,i===r&&a<n.length-1&&(e.push(""),i=0)}!i&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},oA=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(ds(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},iA=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",o,s,i=nA(e),a=[""];for(let[c,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=ds(a[a.length-1]);if(c!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),d=0),(d>0||r.trim===!1)&&(a[a.length-1]+=" ",d++)),r.hard&&i[c]>t){let p=t-d,h=1+Math.floor((i[c]-p-1)/t);Math.floor((i[c]-1)/t)<h&&a.push(""),al(a,l,t);continue}if(d+i[c]>t&&d>0&&i[c]>0){if(r.wordWrap===!1&&d<t){al(a,l,t);continue}a.push("")}if(d+i[c]>t&&r.wordWrap===!1){al(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(c=>oA(c)));let u=[...a.join(`
|
|
235
|
-
`)];for(let[c,l]of u.entries()){if(n+=l,
|
|
234
|
+
`),o=[];for(let s=0;s<Math.max(r.length,n.length);s++)r[s]!==n[s]&&o.push(s);return o}function Ka(e,t){let r=e;r.isTTY&&r.setRawMode(t)}var Yt,WP,ah,JP,YP,QP,ZP,al,Qg,Zg,Xg,ke,XP,eA,rA,Ya,nA,ll,uh,oA,ch,dl,eh,th,iA,ul,sA,aA,uA,Wa,m9,nh,lA,dA,Mt,cl,pA,fA,mA,oh,Ja,pl=v(()=>{Yt=Me(Ga(),1);WP=KP();ah={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var o=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,i=o;return 55296<=o&&o<=56319&&56320<=s&&s<=57343&&(o&=1023,s&=1023,i=o<<10|s,i+=65536),i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510?"F":i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518?"H":4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141?"W":32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630?"Na":i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109?"A":"N"},t.characterLength=function(n){var o=this.eastAsianWidth(n);return o=="F"||o=="W"||o=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var o=r(n),s=0,i=0;i<o.length;i++)s=s+this.characterLength(o[i]);return s},t.slice=function(n,o,s){textLen=t.length(n),o=o||0,s=s||1,o<0&&(o=textLen+o),s<0&&(s=textLen+s);for(var i="",a=0,u=r(n),c=0;c<u.length;c++){var l=u[c],d=t.length(l);if(a>=o-(d==2?1:0))if(a+d<=s)i+=l;else break;a+=d}return i}})(ah);JP=ah.exports,YP=sh(JP),QP=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},ZP=sh(QP);al=10,Qg=(e=0)=>t=>`\x1B[${t+e}m`,Zg=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Xg=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,ke={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ke.modifier);XP=Object.keys(ke.color),eA=Object.keys(ke.bgColor);[...XP,...eA];rA=tA(),Ya=new Set(["\x1B","\x9B"]),nA=39,ll="\x07",uh="[",oA="]",ch="m",dl=`${oA}8;;`,eh=e=>`${Ya.values().next().value}${uh}${e}${ch}`,th=e=>`${Ya.values().next().value}${dl}${e}${ll}`,iA=e=>e.split(" ").map(t=>ps(t)),ul=(e,t,r)=>{let n=[...t],o=!1,s=!1,i=ps(ih(e[e.length-1]));for(let[a,u]of n.entries()){let c=ps(u);if(i+c<=r?e[e.length-1]+=u:(e.push(u),i=0),Ya.has(u)&&(o=!0,s=n.slice(a+1).join("").startsWith(dl)),o){s?u===ll&&(o=!1,s=!1):u===ch&&(o=!1);continue}i+=c,i===r&&a<n.length-1&&(e.push(""),i=0)}!i&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},sA=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(ps(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},aA=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",o,s,i=iA(e),a=[""];for(let[c,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=ps(a[a.length-1]);if(c!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),d=0),(d>0||r.trim===!1)&&(a[a.length-1]+=" ",d++)),r.hard&&i[c]>t){let p=t-d,h=1+Math.floor((i[c]-p-1)/t);Math.floor((i[c]-1)/t)<h&&a.push(""),ul(a,l,t);continue}if(d+i[c]>t&&d>0&&i[c]>0){if(r.wordWrap===!1&&d<t){ul(a,l,t);continue}a.push("")}if(d+i[c]>t&&r.wordWrap===!1){ul(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(c=>sA(c)));let u=[...a.join(`
|
|
235
|
+
`)];for(let[c,l]of u.entries()){if(n+=l,Ya.has(l)){let{groups:p}=new RegExp(`(?:\\${uh}(?<code>\\d+)m|\\${dl}(?<uri>.*)${ll})`).exec(u.slice(c).join(""))||{groups:{}};if(p.code!==void 0){let h=Number.parseFloat(p.code);o=h===nA?void 0:h}else p.uri!==void 0&&(s=p.uri.length===0?void 0:p.uri)}let d=rA.codes.get(Number(o));u[c+1]===`
|
|
236
236
|
`?(s&&(n+=th("")),o&&d&&(n+=eh(d))):l===`
|
|
237
|
-
`&&(o&&d&&(n+=eh(o)),s&&(n+=th(s)))}return n};
|
|
238
|
-
`),
|
|
239
|
-
`).length-1;this.output.write(Yt.cursor.move(-999,t*-1))}render(){let t=rh(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(Yt.cursor.hide);else{let r=
|
|
237
|
+
`&&(o&&d&&(n+=eh(o)),s&&(n+=th(s)))}return n};uA=["up","down","left","right","space","enter","cancel"],Wa={actions:new Set(uA),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};m9=globalThis.process.platform.startsWith("win"),nh=Symbol("clack:cancel");lA=Object.defineProperty,dA=(e,t,r)=>t in e?lA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mt=(e,t,r)=>(dA(e,typeof t!="symbol"?t+"":t,r),r),cl=class{constructor(t,r=!0){Mt(this,"input"),Mt(this,"output"),Mt(this,"_abortSignal"),Mt(this,"rl"),Mt(this,"opts"),Mt(this,"_render"),Mt(this,"_track",!1),Mt(this,"_prevFrame",""),Mt(this,"_subscribers",new Map),Mt(this,"_cursor",0),Mt(this,"state","initial"),Mt(this,"error",""),Mt(this,"value");let{input:n=GP,output:o=zP,render:s,signal:i,...a}=t;this.opts=a,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=r,this._abortSignal=i,this.input=n,this.output=o}unsubscribe(){this._subscribers.clear()}setSubscriber(t,r){let n=this._subscribers.get(t)??[];n.push(r),this._subscribers.set(t,n)}on(t,r){this.setSubscriber(t,{cb:r})}once(t,r){this.setSubscriber(t,{cb:r,once:!0})}emit(t,...r){let n=this._subscribers.get(t)??[],o=[];for(let s of n)s.cb(...r),s.once&&o.push(()=>n.splice(n.indexOf(s),1));for(let s of o)s()}prompt(){return new Promise((t,r)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(nh);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let n=new qP;n._write=(o,s,i)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),i()},this.input.pipe(n),this.rl=Yg.createInterface({input:this.input,output:n,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),Yg.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),Ka(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(Yt.cursor.show),this.output.off("resize",this.render),Ka(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(Yt.cursor.show),this.output.off("resize",this.render),Ka(this.input,!1),t(nh)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&Wa.aliases.has(r.name)&&this.emit("cursor",Wa.aliases.get(r.name)),Wa.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(!this.value&&this.opts.placeholder&&(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder)),this.opts.validate){let n=this.opts.validate(this.value);n&&(this.error=n instanceof Error?n.message:n,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}lh([t,r?.name,r?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
238
|
+
`),Ka(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=rh(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
239
|
+
`).length-1;this.output.write(Yt.cursor.move(-999,t*-1))}render(){let t=rh(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(Yt.cursor.hide);else{let r=cA(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let n=r[0];this.output.write(Yt.cursor.move(0,n)),this.output.write(Yt.erase.lines(1));let o=t.split(`
|
|
240
240
|
`);this.output.write(o[n]),this._prevFrame=t,this.output.write(Yt.cursor.move(0,o.length-n-1));return}if(r&&r?.length>1){let n=r[0];this.output.write(Yt.cursor.move(0,n)),this.output.write(Yt.erase.down());let o=t.split(`
|
|
241
241
|
`).slice(n);this.output.write(o.join(`
|
|
242
|
-
`)),this._prevFrame=t;return}this.output.write(Yt.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};
|
|
243
|
-
${
|
|
242
|
+
`)),this._prevFrame=t;return}this.output.write(Yt.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};pA=new WeakMap;fA=Object.defineProperty,mA=(e,t,r)=>t in e?fA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oh=(e,t,r)=>(mA(e,typeof t!="symbol"?t+"":t,r),r),Ja=class extends cl{constructor(t){super(t,!1),oh(this,"options"),oh(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:r})=>r===t.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}}});import gr from"node:process";function gA(){return gr.platform!=="win32"?gr.env.TERM!=="linux":!!gr.env.CI||!!gr.env.WT_SESSION||!!gr.env.TERMINUS_SUBLIME||gr.env.ConEmuTask==="{cmd::Cmder}"||gr.env.TERM_PROGRAM==="Terminus-Sublime"||gr.env.TERM_PROGRAM==="vscode"||gr.env.TERM==="xterm-256color"||gr.env.TERM==="alacritty"||gr.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ve,dh,hA,Le,yA,DA,vA,ph,CA,hr,fh,bA,xA,P9,A9,T9,F9,_9,R9,I9,k9,wA,SA,EA,PA,AA,TA,fs,Tn,Qa,pe,$9,Lt=v(()=>{pl();pl();ve=Me(io(),1),dh=Me(Ga(),1);hA=gA(),Le=(e,t)=>hA?e:t,yA=Le("\u25C6","*"),DA=Le("\u25A0","x"),vA=Le("\u25B2","x"),ph=Le("\u25C7","o"),CA=Le("\u250C","T"),hr=Le("\u2502","|"),fh=Le("\u2514","\u2014"),bA=Le("\u25CF",">"),xA=Le("\u25CB"," "),P9=Le("\u25FB","[\u2022]"),A9=Le("\u25FC","[+]"),T9=Le("\u25FB","[ ]"),F9=Le("\u25AA","\u2022"),_9=Le("\u2500","-"),R9=Le("\u256E","+"),I9=Le("\u251C","+"),k9=Le("\u256F","+"),wA=Le("\u25CF","\u2022"),SA=Le("\u25C6","*"),EA=Le("\u25B2","!"),PA=Le("\u25A0","x"),AA=e=>{switch(e){case"initial":case"active":return ve.default.cyan(yA);case"cancel":return ve.default.red(DA);case"error":return ve.default.yellow(vA);case"submit":return ve.default.green(ph)}},TA=e=>{let{cursor:t,options:r,style:n}=e,o=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),i=Math.min(s,Math.max(o,5)),a=0;t>=a+i-3?a=Math.max(Math.min(t-i+3,r.length-i),0):t<a+2&&(a=Math.max(t-2,0));let u=i<r.length&&a>0,c=i<r.length&&a+i<r.length;return r.slice(a,a+i).map((l,d,p)=>{let h=d===0&&u,g=d===p.length-1&&c;return h||g?ve.default.dim("..."):n(l,d+a===t)})},fs=e=>{let t=(r,n)=>{let o=r.label??String(r.value);switch(n){case"selected":return`${ve.default.dim(o)}`;case"active":return`${ve.default.green(bA)} ${o} ${r.hint?ve.default.dim(`(${r.hint})`):""}`;case"cancelled":return`${ve.default.strikethrough(ve.default.dim(o))}`;default:return`${ve.default.dim(xA)} ${ve.default.dim(o)}`}};return new Ja({options:e.options,initialValue:e.initialValue,render(){let r=`${ve.default.gray(hr)}
|
|
243
|
+
${AA(this.state)} ${e.message}
|
|
244
244
|
`;switch(this.state){case"submit":return`${r}${ve.default.gray(hr)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${r}${ve.default.gray(hr)} ${t(this.options[this.cursor],"cancelled")}
|
|
245
|
-
${ve.default.gray(hr)}`;default:return`${r}${ve.default.cyan(hr)} ${
|
|
245
|
+
${ve.default.gray(hr)}`;default:return`${r}${ve.default.cyan(hr)} ${TA({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(n,o)=>t(n,o?"active":"inactive")}).join(`
|
|
246
246
|
${ve.default.cyan(hr)} `)}
|
|
247
247
|
${ve.default.cyan(fh)}
|
|
248
|
-
`}}}).prompt()},Tn=(e="")=>{process.stdout.write(`${ve.default.gray(
|
|
249
|
-
`)},
|
|
248
|
+
`}}}).prompt()},Tn=(e="")=>{process.stdout.write(`${ve.default.gray(CA)} ${e}
|
|
249
|
+
`)},Qa=(e="")=>{process.stdout.write(`${ve.default.gray(hr)}
|
|
250
250
|
${ve.default.gray(fh)} ${e}
|
|
251
251
|
|
|
252
252
|
`)},pe={message:(e="",{symbol:t=ve.default.gray(hr)}={})=>{let r=[`${ve.default.gray(hr)}`];if(e){let[n,...o]=e.split(`
|
|
253
253
|
`);r.push(`${t} ${n}`,...o.map(s=>`${ve.default.gray(hr)} ${s}`))}process.stdout.write(`${r.join(`
|
|
254
254
|
`)}
|
|
255
|
-
`)},info:e=>{pe.message(e,{symbol:ve.default.blue(
|
|
256
|
-
`),n;for(;(n=
|
|
255
|
+
`)},info:e=>{pe.message(e,{symbol:ve.default.blue(wA)})},success:e=>{pe.message(e,{symbol:ve.default.green(SA)})},step:e=>{pe.message(e,{symbol:ve.default.green(ph)})},warn:e=>{pe.message(e,{symbol:ve.default.yellow(EA)})},warning:e=>{pe.warn(e)},error:e=>{pe.message(e,{symbol:ve.default.red(PA)})}},$9=`${ve.default.gray(hr)} `});async function Qt(e){let t=mh(e),r=await e.readFile(t);return typeof r=="string"?JSON.parse(r):{}}async function Zt(e,t){t=typeof t=="object"&&t!=null?t:{};let r=mh(e);await e.writeFile(r,JSON.stringify(t??{},null,2))}function mh(e){let t=e.getAppRootDir();return e.join(t,"node_modules",".builder","builder-cache.json")}var ao=v(()=>{"use strict"});async function _r(e,t,r){let n={envKey:r,envValue:null,file:""};for(let o of t){let s=e.join(e.getAppRootDir(),o),i=await FA(e,s);if(i){let a=i[r];if(typeof a=="string"&&a.length>0&&a!=="YOUR_API_KEY")return n.envValue=a,n.file=s,n}}return n.file=e.join(e.getAppRootDir(),t[t.length-1]),n}async function FA(e,t){let r=await e.readFile(t);return typeof r=="string"?gh(r):null}function gh(e){let t={},r=e.replace(/\r\n?/gm,`
|
|
256
|
+
`),n;for(;(n=_A.exec(r))!=null;){let o=n[1],s=n[2]||"";s=s.trim();let i=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),i==='"'&&(s=s.replace(/\\n/g,`
|
|
257
257
|
`),s=s.replace(/\\r/g,"\r")),t[o]=s}return t}async function Rr(e,t,r,n){let o="# https://www.builder.io/c/docs/using-your-api-key",s=await e.readFile(t);try{if(s)if(s.includes(r))if(s.includes(n))e.debug(`"${r}" with "${n}" already set in ${t}`);else return e.debug(`Replace "${r}" in ${t}`),s=s.replace(new RegExp(`${r}=.*`),`${r}=${n}`),await e.writeFile(t,s),"update";else return e.debug(`Append "${r}" to ${t}`),s+=`
|
|
258
258
|
|
|
259
259
|
${o}
|
|
260
260
|
${r}=${n}
|
|
261
261
|
|
|
262
262
|
`,await e.writeFile(t,s),"update";else return e.debug(`Creating new .env file with "${r}" at ${t}`),s=[o,`${r}=${n}`,""].join(`
|
|
263
|
-
`),await e.writeFile(t,s),"create"}catch(i){if(i&&String(i).includes("EACCES"))return e.debug(`Permssion denied, failed to create or modify .env file with "${r}=${n}" at ${t}`),"permission-error";e.Sentry?.captureException(i)}return null}var TA,uo=v(()=>{"use strict";TA=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm});async function fs(e){return await _r(e,[".env.local",".env.development.local",".env.production.local",".env.development",".env.production",".env"],Ir)}async function hh(e,t){let r=await fs(e),n=await Rr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Ir,ms=v(()=>{"use strict";uo();Ir="NEXT_PUBLIC_BUILDER_API_KEY"});function si(e,t,r,n,o=!0){let s=t.properties.filter(a=>e.ts.isPropertyAssignment(a)),i=FA(e,t,r);return i>-1?n==null&&o?e.ts.factory.updateObjectLiteralExpression(t,s.filter((a,u)=>u!==i)):(s[i]=e.ts.factory.updatePropertyAssignment(s[i],s[i].name,gs(e,n)),e.ts.factory.updateObjectLiteralExpression(t,s)):(n!=null&&s.push(e.ts.factory.createPropertyAssignment(r,gs(e,n))),e.ts.factory.updateObjectLiteralExpression(t,s))}function FA(e,t,r){return t.properties.findIndex(n=>be(e,n)===r)}function hs(e,t){switch(t.kind){case e.ts.SyntaxKind.ArrayLiteralExpression:return RA(e,t);case e.ts.SyntaxKind.ObjectLiteralExpression:return _A(e,t);case e.ts.SyntaxKind.StringLiteral:return t.text;case e.ts.SyntaxKind.NumericLiteral:return Number(t.text);case e.ts.SyntaxKind.NoSubstitutionTemplateLiteral:return t.text;case e.ts.SyntaxKind.TrueKeyword:return!0;case e.ts.SyntaxKind.FalseKeyword:return!1;case e.ts.SyntaxKind.Identifier:switch(t.escapedText){case"undefined":return;case"null":return null;case"String":return String;case"Number":return Number;case"Boolean":return Boolean;case"NaN":return NaN}}}function _A(e,t){let r={};if(t&&e.ts.isObjectLiteralExpression(t)){for(let n of t.properties)if(e.ts.isPropertyAssignment(n)){let o=be(e,n);o&&(r[o]=hs(e,n.initializer))}}return r}function RA(e,t){return t&&e.ts.isArrayLiteralExpression(t)?t.elements.map(r=>hs(e,r)):[]}function be(e,t){if(t&&e.ts.isPropertyAssignment(t)){let r=t.name;switch(r.kind){case e.ts.SyntaxKind.Identifier:return r.text;case e.ts.SyntaxKind.StringLiteral:case e.ts.SyntaxKind.NumericLiteral:return r.text;case e.ts.SyntaxKind.ComputedPropertyName:let n=r.expression;if(e.ts.isStringLiteral(n)||e.ts.isNumericLiteral(n))return r.expression.text}}}function gs(e,t){return pl(e,t,new WeakSet)}function pl(e,t,r){return t===void 0?e.ts.factory.createIdentifier("undefined"):t===null?e.ts.factory.createIdentifier("null"):typeof t=="string"?e.ts.factory.createStringLiteral(t):typeof t=="number"?isNaN(t)?e.ts.factory.createIdentifier("NaN"):e.ts.factory.createNumericLiteral(t):t===!0?e.ts.factory.createTrue():t===!1?e.ts.factory.createFalse():t===String?e.ts.factory.createIdentifier("String"):t===Number?e.ts.factory.createIdentifier("Number"):t===Boolean?e.ts.factory.createIdentifier("Boolean"):Array.isArray(t)?IA(e,t,r):typeof t=="object"?kA(e,t,r):e.ts.factory.createIdentifier(t)}function IA(e,t,r){let n=t.map(o=>pl(e,o,r));return e.ts.factory.createArrayLiteralExpression(n,!0)}function kA(e,t,r){if(r.has(t))return e.ts.factory.createIdentifier("undefined");r.add(t);let n=Object.keys(t).map(o=>e.ts.factory.createPropertyAssignment(o,pl(e,t[o],r)));return e.ts.factory.createObjectLiteralExpression(n,!0)}var kr=v(()=>{"use strict"});function co(e,t,r){let n=[];if(!r)return n;let o=null;if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r)){let s=r.parameters;if(s.length>0){let i=s[0],a=t.getTypeAtLocation(i);a.aliasTypeArguments&&a.aliasTypeArguments.length>0&&(a=a.aliasTypeArguments[0]),!!(a.flags&e.ts.TypeFlags.Object)&&(o=a.getProperties())}}else if(e.ts.isIdentifier(r)){let s=t.getTypeAtLocation(r),i=s.symbol?.valueDeclaration;if(i&&e.ts.isClassDeclaration(i)){let u=i.heritageClauses?.find(c=>c.token===e.ts.SyntaxKind.ExtendsKeyword)?.types;if(u){for(let c of u)if(t.getSymbolAtLocation(c.expression)?.name==="Component"){if(e.ts.isExpressionWithTypeArguments(c)){let d=c.typeArguments;if(d){let p=d[0];o=t.getTypeFromTypeNode(p).getProperties()}}break}}}if(!o){let a=s.getCallSignatures();if(a.length>0){let u=a[0].getParameters();u.length>0&&(o=t.getTypeOfSymbolAtLocation(u[0],r).getProperties())}}}else if(e.ts.isExportSpecifier(r)){let s=t.getSymbolAtLocation(r.name);if(s){let a=t.getTypeOfSymbolAtLocation(s,r).getCallSignatures();if(a.length>0){let u=a[0].getParameters();u.length>0&&(o=t.getTypeOfSymbolAtLocation(u[0],r).getProperties())}}}if(o)for(let s of o){let i=$A(e,t,s);i&&n.push(i)}return n=n.filter(Dh),n.length>0?n:NA(e,r)}function $A(e,t,r){let n=r.valueDeclaration,o=r.getName();if(n||(n=r.getDeclarations()?.[0]),n&&e.ts.isPropertySignature(n)){if(o!=="children"&&n.getSourceFile().fileName.includes("node_modules/@types/"))return null;let s="string",i;if(n?.type){let u=t.getTypeFromTypeNode(n.type),c=t.typeToString(u),l=fl(c);l.knownType?s=l.builderType:BA(c)||u.flags&e.ts.TypeFlags.StringLike?s="string":u.flags&e.ts.TypeFlags.NumberLike?s="number":u.flags&e.ts.TypeFlags.IndexedAccess?s="list":u.flags&e.ts.TypeFlags.Object||u.isUnion()&&u.types.every(d=>d.flags&e.ts.TypeFlags.Object)||u.isIntersection()&&u.types.some(d=>d.flags&e.ts.TypeFlags.Object)?s="object":s="string",c!==s&&(i=c)}let a={name:o,type:s,isRegistered:!1};if(i&&n.type){let u=UA(e,t,t.getTypeFromTypeNode(n.type));a.meta=a.meta||{},u&&u.length>0&&a.type==="string"&&u.every(LA)?a.enum=u.map(jA):a.meta.ts=i}return n.questionToken||(a.required=!0),a}return null}function NA(e,t){let r=[],n=e.ts.getJSDocCommentsAndTags(t);for(let o of n)if(!(!e.ts.isJSDoc(o)||!o.tags))for(let s of o.tags){if(!e.ts.isJSDocParameterTag(s)||s.tagName.text!=="param")continue;let a=s.typeExpression?.type;if(!a||!e.ts.isJSDocTypeLiteral(a))continue;let u=a.jsDocPropertyTags;if(u)for(let c of u){if(!e.ts.isJSDocPropertyLikeTag(c))continue;let l=c.name;if(!e.ts.isQualifiedName(l))continue;let d=c.typeExpression;if(!d)continue;let p="";switch(d.type.kind){case e.ts.SyntaxKind.StringKeyword:{p="string";break}case e.ts.SyntaxKind.NumberKeyword:{p="number";break}case e.ts.SyntaxKind.BooleanKeyword:{p="boolean";break}default:continue}let m={name:l.right.text,type:p,isRegistered:!1};r.push(m)}}return r.filter(Dh)}function BA(e){return typeof e!="string"?!1:!!OA.some(t=>e.includes(t))}function fl(e){return typeof e=="string"&&(e=e.trim(),MA.some(t=>t.value===e))?{builderType:e,knownType:!0}:{builderType:"string",knownType:!1}}function LA(e){return/^['"].*['"]$/.test(e)}function jA(e){return(e.startsWith('"')||e.startsWith("'"))&&(e.endsWith('"')||e.endsWith("'"))?e.slice(1,-1):e}function Dh(e){let t=e?.name;if(typeof t!="string"||t===""||t.startsWith("aria")||t.startsWith("data-"))return!1;if(t.startsWith("on")&&t.length>2){let r=t.charAt(2);if(r.toUpperCase()===r)return!1}return!GA.has(t.toLowerCase())}var OA,MA,UA,VA,yh,GA,ys=v(()=>{"use strict";OA=["ClassicComponent","FunctionComponent","IntrinsicElements","JSX","ReactNode","ReactElement","ReactPortal"];MA=[{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"}];UA=(e,t,r)=>{let n=new Set;yh(e,t,r,n);let o=n.delete("true"),s=n.delete("false");(o||s)&&n.add("boolean");let i=Array.from(n.keys()).sort();if(i.length>1&&(i=i.map(a=>a.indexOf("=>")>=0?`(${a})`:a)),!(i.length>20))return i},VA=(e,t,r)=>{let n=e.ts.TypeFormatFlags.InElementType|e.ts.TypeFormatFlags.NoTruncation;return t.typeToString(r,void 0,n)},yh=(e,t,r,n)=>{if(r.isUnion())r.types.forEach(o=>{yh(e,t,o,n)});else if(r.isLiteral()){let o=VA(e,t,r);n.add(o)}};GA=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(e=>e.toLowerCase()))});function wt(e,t,r){for(let n of r.properties){if(!e.ts.isPropertyAssignment(n))continue;let o=be(e,n);if(o==="name"&&e.ts.isStringLiteral(n.initializer)){t.name=n.initializer.text;continue}if(o==="description"&&e.ts.isStringLiteral(n.initializer)){t.description=n.initializer.text;continue}if(o==="image"&&e.ts.isStringLiteral(n.initializer)){t.image=n.initializer.text;continue}if(o==="inputs"&&e.ts.isArrayLiteralExpression(n.initializer)){let s=HA(e,n.initializer);jt(t,s);continue}if(o==="meta"&&e.ts.isObjectLiteralExpression(n.initializer)){let s=hs(e,n.initializer);s&&typeof s=="object"&&(t.meta=s);continue}}return t}function HA(e,t){let r=[];for(let n of t.elements)e.ts.isObjectLiteralExpression(n)&&r.push(qA(e,n));return r}function qA(e,t){let r=hs(e,t),n=ZA(r);return n.isRegistered=!0,n}function qe(e,t,r){let n=KA(r);return t=si(e,t,"name",n.name,!1),t=si(e,t,"description",n.description),t=si(e,t,"image",n.image),t=si(e,t,"meta",n.meta),t=zA(e,t,n),XA(e,t)}function zA(e,t,r){let n=null,o=t.properties.filter(a=>e.ts.isPropertyAssignment(a)&&e.ts.isIdentifier(a.name)),s=o.findIndex(a=>e.ts.isIdentifier(a.name)&&a.name.text==="inputs"),i=[...r.inputs??[]];if(s>-1){if(i.length===0)return si(e,t,"inputs",null);let a=o[s];e.ts.isPropertyAssignment(a)&&e.ts.isArrayLiteralExpression(a.initializer)&&(n=a.initializer)}return i.length===0?t:(n=JA(e,n||e.ts.factory.createArrayLiteralExpression(),i),s>-1?o[s]=e.ts.factory.updatePropertyAssignment(o[s],o[s].name,n):o.push(e.ts.factory.createPropertyAssignment("inputs",n)),e.ts.factory.updateObjectLiteralExpression(t,o))}function KA(e){return{name:e.name,description:e.description,image:e.image,inputs:(e.inputs||[]).filter(r=>r.isRegistered).map(WA),...e.meta?{meta:{...e.meta}}:{}}}function WA(e){let t={name:e.name,type:e.type};return(ft(e.defaultValue)||ss(e.defaultValue)||Xo(e.defaultValue))&&(t.defaultValue=e.defaultValue),ft(e.friendlyName)&&(t.friendlyName=e.friendlyName),ft(e.helperText)&&(t.helperText=e.helperText),e.required===!0&&(t.required=!0),Array.isArray(e.enum)&&(t.enum=e.enum),e.hideFromUI===!0&&(t.hideFromUI=!0),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(t.meta=e.meta),t}function JA(e,t,r){let n=t.elements.filter(o=>{if(!e.ts.isObjectLiteralExpression(o))return!1;let s=o.properties.find(a=>be(e,a)==="name");if(!s)return!1;let i=s.initializer;return e.ts.isStringLiteral(i)?r.some(a=>a.name===i.text):!1});for(let o of r)n=YA(e,n,o);return n.sort((o,s)=>{let i=o.properties.find(p=>be(e,p)==="name"),a=s.properties.find(p=>be(e,p)==="name"),u=i?.initializer,c=a?.initializer,l=u&&e.ts.isStringLiteral(u)?u.text:"zz",d=c&&e.ts.isStringLiteral(c)?c.text:"zz";return l.toLowerCase().localeCompare(d.toLowerCase())}),e.ts.factory.updateArrayLiteralExpression(t,n)}function YA(e,t,r){let n=t.findIndex(o=>o.properties.some(s=>{let i=be(e,s);return e.ts.isPropertyAssignment(s)&&i==="name"&&e.ts.isStringLiteral(s.initializer)&&s.initializer.text===r.name}));if(n>-1)t[n]=vh(e,t[n],r);else{let o=vh(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("name",e.ts.factory.createStringLiteral(r.name))],!0),r);t.push(o)}return t}function vh(e,t,r){let n=t.properties.filter(s=>e.ts.isPropertyAssignment(s)),o=Object.keys(r).filter(s=>s!=="isRegistered");for(let s of o)n=QA(e,n,r,s);return n=eT(e,n.filter(s=>{let i=be(e,s);return o.includes(i)})),e.ts.factory.updateObjectLiteralExpression(t,n)}function QA(e,t,r,n){let o=t.findIndex(s=>e.ts.isIdentifier(s.name)&&s.name.text===n);return o>-1?t[o]=e.ts.factory.updatePropertyAssignment(t[o],t[o].name,gs(e,r[n])):t.push(e.ts.factory.createPropertyAssignment(n,gs(e,r[n]))),t}function jt(e,t){for(let r of t){let n=e.inputs.findIndex(o=>o.name===r.name);n>-1?(r.isRegistered||!e.inputs[n].isRegistered)&&(e.inputs[n]=r):e.inputs.push(r)}e.acceptsChildren=ml(e)}function ZA(e){let t=fl(e.type),r={name:e.name.trim(),type:t.builderType};return ft(e.friendlyName)&&e.friendlyName.trim()!==e.name.trim()&&(r.friendlyName=e.friendlyName),(ft(e.defaultValue)||ss(e.defaultValue)||Xo(e.defaultValue))&&(r.defaultValue=e.defaultValue),ft(e.helperText)&&(r.helperText=e.helperText),Xo(e.required)&&(r.required=e.required),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(r.meta=e.meta),Array.isArray(e.enum)&&e.enum.length>0&&(r.enum=e.enum),e.hideFromUI===!0&&(r.hideFromUI=!0),gl(r)}function ml(e){let t=e.inputs.some(n=>n.name==="children"),r=e.inputs.some(n=>n.meta?.ts==="ReactNode");return!!(t||r||e.acceptsChildren===!0)}function gl(e){if(e.name==="children"&&(e.hideFromUI=!0,delete e.required),e.type==="object"&&e.defaultValue==null&&(e.hideFromUI=!0),e.type==="list"&&e.defaultValue==null&&(e.hideFromUI=!0),e.meta){let t=e.meta.ts;typeof t=="string"&&(t=t.trim(),t.endsWith("ReactNode")&&(t="ReactNode"),e.meta.ts=t,t==="ReactNode"&&(e.hideFromUI=!0))}return e}function XA(e,t){let r=[...t.properties].sort((n,o)=>{let s=be(e,n)||"zz",i=be(e,o)||"zz";if(s==="inputs")return 1;let a=Ch.indexOf(s),u=Ch.indexOf(i);return a>-1?u>-1&&a>u?1:-1:u>-1?a>-1&&u<a?-1:1:s.localeCompare(i)});return e.ts.factory.updateObjectLiteralExpression(t,r)}function eT(e,t){return[...t].sort((n,o)=>{let s=be(e,n)||"zz",i=be(e,o)||"zz",a=bh.indexOf(s),u=bh.indexOf(i);return a>-1?u>-1&&a>u?1:-1:u>-1?a>-1&&u<a?-1:1:s.localeCompare(i)})}function ai(e,t){for(let r of t.properties){if(!e.ts.isPropertyAssignment(r)||!e.ts.isIdentifier(r.name))continue;if(be(e,r)==="canHaveChildren"){let{initializer:o}=r;return o.kind===e.ts.SyntaxKind.TrueKeyword}}return!1}var Ch,bh,ht=v(()=>{"use strict";kr();ys();me();Ch=["component","name","description"];bh=["name","type"]});function xh(e,t){let r=`Builder.registerComponent(
|
|
263
|
+
`),await e.writeFile(t,s),"create"}catch(i){if(i&&String(i).includes("EACCES"))return e.debug(`Permssion denied, failed to create or modify .env file with "${r}=${n}" at ${t}`),"permission-error";e.Sentry?.captureException(i)}return null}var _A,uo=v(()=>{"use strict";_A=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm});async function ms(e){return await _r(e,[".env.local",".env.development.local",".env.production.local",".env.development",".env.production",".env"],Ir)}async function hh(e,t){let r=await ms(e),n=await Rr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Ir,gs=v(()=>{"use strict";uo();Ir="NEXT_PUBLIC_BUILDER_API_KEY"});function si(e,t,r,n,o=!0){let s=t.properties.filter(a=>e.ts.isPropertyAssignment(a)),i=RA(e,t,r);return i>-1?n==null&&o?e.ts.factory.updateObjectLiteralExpression(t,s.filter((a,u)=>u!==i)):(s[i]=e.ts.factory.updatePropertyAssignment(s[i],s[i].name,hs(e,n)),e.ts.factory.updateObjectLiteralExpression(t,s)):(n!=null&&s.push(e.ts.factory.createPropertyAssignment(r,hs(e,n))),e.ts.factory.updateObjectLiteralExpression(t,s))}function RA(e,t,r){return t.properties.findIndex(n=>be(e,n)===r)}function ys(e,t){switch(t.kind){case e.ts.SyntaxKind.ArrayLiteralExpression:return kA(e,t);case e.ts.SyntaxKind.ObjectLiteralExpression:return IA(e,t);case e.ts.SyntaxKind.StringLiteral:return t.text;case e.ts.SyntaxKind.NumericLiteral:return Number(t.text);case e.ts.SyntaxKind.NoSubstitutionTemplateLiteral:return t.text;case e.ts.SyntaxKind.TrueKeyword:return!0;case e.ts.SyntaxKind.FalseKeyword:return!1;case e.ts.SyntaxKind.Identifier:switch(t.escapedText){case"undefined":return;case"null":return null;case"String":return String;case"Number":return Number;case"Boolean":return Boolean;case"NaN":return NaN}}}function IA(e,t){let r={};if(t&&e.ts.isObjectLiteralExpression(t)){for(let n of t.properties)if(e.ts.isPropertyAssignment(n)){let o=be(e,n);o&&(r[o]=ys(e,n.initializer))}}return r}function kA(e,t){return t&&e.ts.isArrayLiteralExpression(t)?t.elements.map(r=>ys(e,r)):[]}function be(e,t){if(t&&e.ts.isPropertyAssignment(t)){let r=t.name;switch(r.kind){case e.ts.SyntaxKind.Identifier:return r.text;case e.ts.SyntaxKind.StringLiteral:case e.ts.SyntaxKind.NumericLiteral:return r.text;case e.ts.SyntaxKind.ComputedPropertyName:let n=r.expression;if(e.ts.isStringLiteral(n)||e.ts.isNumericLiteral(n))return r.expression.text}}}function hs(e,t){return fl(e,t,new WeakSet)}function fl(e,t,r){return t===void 0?e.ts.factory.createIdentifier("undefined"):t===null?e.ts.factory.createIdentifier("null"):typeof t=="string"?e.ts.factory.createStringLiteral(t):typeof t=="number"?isNaN(t)?e.ts.factory.createIdentifier("NaN"):e.ts.factory.createNumericLiteral(t):t===!0?e.ts.factory.createTrue():t===!1?e.ts.factory.createFalse():t===String?e.ts.factory.createIdentifier("String"):t===Number?e.ts.factory.createIdentifier("Number"):t===Boolean?e.ts.factory.createIdentifier("Boolean"):Array.isArray(t)?$A(e,t,r):typeof t=="object"?NA(e,t,r):e.ts.factory.createIdentifier(t)}function $A(e,t,r){let n=t.map(o=>fl(e,o,r));return e.ts.factory.createArrayLiteralExpression(n,!0)}function NA(e,t,r){if(r.has(t))return e.ts.factory.createIdentifier("undefined");r.add(t);let n=Object.keys(t).map(o=>e.ts.factory.createPropertyAssignment(o,fl(e,t[o],r)));return e.ts.factory.createObjectLiteralExpression(n,!0)}var kr=v(()=>{"use strict"});function co(e,t,r){let n=[];if(!r)return n;let o=null;if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r)){let s=r.parameters;if(s.length>0){let i=s[0],a=t.getTypeAtLocation(i);a.aliasTypeArguments&&a.aliasTypeArguments.length>0&&(a=a.aliasTypeArguments[0]),!!(a.flags&e.ts.TypeFlags.Object)&&(o=a.getProperties())}}else if(e.ts.isIdentifier(r)){let s=t.getTypeAtLocation(r),i=s.symbol?.valueDeclaration;if(i&&e.ts.isClassDeclaration(i)){let u=i.heritageClauses?.find(c=>c.token===e.ts.SyntaxKind.ExtendsKeyword)?.types;if(u){for(let c of u)if(t.getSymbolAtLocation(c.expression)?.name==="Component"){if(e.ts.isExpressionWithTypeArguments(c)){let d=c.typeArguments;if(d){let p=d[0];o=t.getTypeFromTypeNode(p).getProperties()}}break}}}if(!o){let a=s.getCallSignatures();if(a.length>0){let u=a[0].getParameters();u.length>0&&(o=t.getTypeOfSymbolAtLocation(u[0],r).getProperties())}}}else if(e.ts.isExportSpecifier(r)){let s=t.getSymbolAtLocation(r.name);if(s){let a=t.getTypeOfSymbolAtLocation(s,r).getCallSignatures();if(a.length>0){let u=a[0].getParameters();u.length>0&&(o=t.getTypeOfSymbolAtLocation(u[0],r).getProperties())}}}if(o)for(let s of o){let i=OA(e,t,s);i&&n.push(i)}return n=n.filter(Dh),n.length>0?n:BA(e,r)}function OA(e,t,r){let n=r.valueDeclaration,o=r.getName();if(n||(n=r.getDeclarations()?.[0]),n&&e.ts.isPropertySignature(n)){if(o!=="children"&&n.getSourceFile().fileName.includes("node_modules/@types/"))return null;let s="string",i;if(n?.type){let u=t.getTypeFromTypeNode(n.type),c=t.typeToString(u),l=ml(c);l.knownType?s=l.builderType:LA(c)||u.flags&e.ts.TypeFlags.StringLike?s="string":u.flags&e.ts.TypeFlags.NumberLike?s="number":u.flags&e.ts.TypeFlags.IndexedAccess?s="list":u.flags&e.ts.TypeFlags.Object||u.isUnion()&&u.types.every(d=>d.flags&e.ts.TypeFlags.Object)||u.isIntersection()&&u.types.some(d=>d.flags&e.ts.TypeFlags.Object)?s="object":s="string",c!==s&&(i=c)}let a={name:o,type:s,isRegistered:!1};if(i&&n.type){let u=HA(e,t,t.getTypeFromTypeNode(n.type));a.meta=a.meta||{},u&&u.length>0&&a.type==="string"&&u.every(UA)?a.enum=u.map(VA):a.meta.ts=i}return n.questionToken||(a.required=!0),a}return null}function BA(e,t){let r=[],n=e.ts.getJSDocCommentsAndTags(t);for(let o of n)if(!(!e.ts.isJSDoc(o)||!o.tags))for(let s of o.tags){if(!e.ts.isJSDocParameterTag(s)||s.tagName.text!=="param")continue;let a=s.typeExpression?.type;if(!a||!e.ts.isJSDocTypeLiteral(a))continue;let u=a.jsDocPropertyTags;if(u)for(let c of u){if(!e.ts.isJSDocPropertyLikeTag(c))continue;let l=c.name;if(!e.ts.isQualifiedName(l))continue;let d=c.typeExpression;if(!d)continue;let p="";switch(d.type.kind){case e.ts.SyntaxKind.StringKeyword:{p="string";break}case e.ts.SyntaxKind.NumberKeyword:{p="number";break}case e.ts.SyntaxKind.BooleanKeyword:{p="boolean";break}default:continue}let g={name:l.right.text,type:p,isRegistered:!1};r.push(g)}}return r.filter(Dh)}function LA(e){return typeof e!="string"?!1:!!MA.some(t=>e.includes(t))}function ml(e){return typeof e=="string"&&(e=e.trim(),jA.some(t=>t.value===e))?{builderType:e,knownType:!0}:{builderType:"string",knownType:!1}}function UA(e){return/^['"].*['"]$/.test(e)}function VA(e){return(e.startsWith('"')||e.startsWith("'"))&&(e.endsWith('"')||e.endsWith("'"))?e.slice(1,-1):e}function Dh(e){let t=e?.name;if(typeof t!="string"||t===""||t.startsWith("aria")||t.startsWith("data-"))return!1;if(t.startsWith("on")&&t.length>2){let r=t.charAt(2);if(r.toUpperCase()===r)return!1}return!zA.has(t.toLowerCase())}var MA,jA,HA,GA,yh,zA,Ds=v(()=>{"use strict";MA=["ClassicComponent","FunctionComponent","IntrinsicElements","JSX","ReactNode","ReactElement","ReactPortal"];jA=[{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"}];HA=(e,t,r)=>{let n=new Set;yh(e,t,r,n);let o=n.delete("true"),s=n.delete("false");(o||s)&&n.add("boolean");let i=Array.from(n.keys()).sort();if(i.length>1&&(i=i.map(a=>a.indexOf("=>")>=0?`(${a})`:a)),!(i.length>20))return i},GA=(e,t,r)=>{let n=e.ts.TypeFormatFlags.InElementType|e.ts.TypeFormatFlags.NoTruncation;return t.typeToString(r,void 0,n)},yh=(e,t,r,n)=>{if(r.isUnion())r.types.forEach(o=>{yh(e,t,o,n)});else if(r.isLiteral()){let o=GA(e,t,r);n.add(o)}};zA=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(e=>e.toLowerCase()))});function wt(e,t,r){for(let n of r.properties){if(!e.ts.isPropertyAssignment(n))continue;let o=be(e,n);if(o==="name"&&e.ts.isStringLiteral(n.initializer)){t.name=n.initializer.text;continue}if(o==="description"&&e.ts.isStringLiteral(n.initializer)){t.description=n.initializer.text;continue}if(o==="image"&&e.ts.isStringLiteral(n.initializer)){t.image=n.initializer.text;continue}if(o==="inputs"&&e.ts.isArrayLiteralExpression(n.initializer)){let s=qA(e,n.initializer);jt(t,s);continue}if(o==="meta"&&e.ts.isObjectLiteralExpression(n.initializer)){let s=ys(e,n.initializer);s&&typeof s=="object"&&(t.meta=s);continue}}return t}function qA(e,t){let r=[];for(let n of t.elements)e.ts.isObjectLiteralExpression(n)&&r.push(KA(e,n));return r}function KA(e,t){let r=ys(e,t),n=eT(r);return n.isRegistered=!0,n}function ze(e,t,r){let n=JA(r);return t=si(e,t,"name",n.name,!1),t=si(e,t,"description",n.description),t=si(e,t,"image",n.image),t=si(e,t,"meta",n.meta),t=WA(e,t,n),tT(e,t)}function WA(e,t,r){let n=null,o=t.properties.filter(a=>e.ts.isPropertyAssignment(a)&&e.ts.isIdentifier(a.name)),s=o.findIndex(a=>e.ts.isIdentifier(a.name)&&a.name.text==="inputs"),i=[...r.inputs??[]];if(s>-1){if(i.length===0)return si(e,t,"inputs",null);let a=o[s];e.ts.isPropertyAssignment(a)&&e.ts.isArrayLiteralExpression(a.initializer)&&(n=a.initializer)}return i.length===0?t:(n=QA(e,n||e.ts.factory.createArrayLiteralExpression(),i),s>-1?o[s]=e.ts.factory.updatePropertyAssignment(o[s],o[s].name,n):o.push(e.ts.factory.createPropertyAssignment("inputs",n)),e.ts.factory.updateObjectLiteralExpression(t,o))}function JA(e){return{name:e.name,description:e.description,image:e.image,inputs:(e.inputs||[]).filter(r=>r.isRegistered).map(YA),...e.meta?{meta:{...e.meta}}:{}}}function YA(e){let t={name:e.name,type:e.type};return(ft(e.defaultValue)||as(e.defaultValue)||Xo(e.defaultValue))&&(t.defaultValue=e.defaultValue),ft(e.friendlyName)&&(t.friendlyName=e.friendlyName),ft(e.helperText)&&(t.helperText=e.helperText),e.required===!0&&(t.required=!0),Array.isArray(e.enum)&&(t.enum=e.enum),e.hideFromUI===!0&&(t.hideFromUI=!0),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(t.meta=e.meta),t}function QA(e,t,r){let n=t.elements.filter(o=>{if(!e.ts.isObjectLiteralExpression(o))return!1;let s=o.properties.find(a=>be(e,a)==="name");if(!s)return!1;let i=s.initializer;return e.ts.isStringLiteral(i)?r.some(a=>a.name===i.text):!1});for(let o of r)n=ZA(e,n,o);return n.sort((o,s)=>{let i=o.properties.find(p=>be(e,p)==="name"),a=s.properties.find(p=>be(e,p)==="name"),u=i?.initializer,c=a?.initializer,l=u&&e.ts.isStringLiteral(u)?u.text:"zz",d=c&&e.ts.isStringLiteral(c)?c.text:"zz";return l.toLowerCase().localeCompare(d.toLowerCase())}),e.ts.factory.updateArrayLiteralExpression(t,n)}function ZA(e,t,r){let n=t.findIndex(o=>o.properties.some(s=>{let i=be(e,s);return e.ts.isPropertyAssignment(s)&&i==="name"&&e.ts.isStringLiteral(s.initializer)&&s.initializer.text===r.name}));if(n>-1)t[n]=vh(e,t[n],r);else{let o=vh(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("name",e.ts.factory.createStringLiteral(r.name))],!0),r);t.push(o)}return t}function vh(e,t,r){let n=t.properties.filter(s=>e.ts.isPropertyAssignment(s)),o=Object.keys(r).filter(s=>s!=="isRegistered");for(let s of o)n=XA(e,n,r,s);return n=rT(e,n.filter(s=>{let i=be(e,s);return o.includes(i)})),e.ts.factory.updateObjectLiteralExpression(t,n)}function XA(e,t,r,n){let o=t.findIndex(s=>e.ts.isIdentifier(s.name)&&s.name.text===n);return o>-1?t[o]=e.ts.factory.updatePropertyAssignment(t[o],t[o].name,hs(e,r[n])):t.push(e.ts.factory.createPropertyAssignment(n,hs(e,r[n]))),t}function jt(e,t){for(let r of t){let n=e.inputs.findIndex(o=>o.name===r.name);n>-1?(r.isRegistered||!e.inputs[n].isRegistered)&&(e.inputs[n]=r):e.inputs.push(r)}e.acceptsChildren=gl(e)}function eT(e){let t=ml(e.type),r={name:e.name.trim(),type:t.builderType};return ft(e.friendlyName)&&e.friendlyName.trim()!==e.name.trim()&&(r.friendlyName=e.friendlyName),(ft(e.defaultValue)||as(e.defaultValue)||Xo(e.defaultValue))&&(r.defaultValue=e.defaultValue),ft(e.helperText)&&(r.helperText=e.helperText),Xo(e.required)&&(r.required=e.required),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(r.meta=e.meta),Array.isArray(e.enum)&&e.enum.length>0&&(r.enum=e.enum),e.hideFromUI===!0&&(r.hideFromUI=!0),hl(r)}function gl(e){let t=e.inputs.some(n=>n.name==="children"),r=e.inputs.some(n=>n.meta?.ts==="ReactNode");return!!(t||r||e.acceptsChildren===!0)}function hl(e){if(e.name==="children"&&(e.hideFromUI=!0,delete e.required),e.type==="object"&&e.defaultValue==null&&(e.hideFromUI=!0),e.type==="list"&&e.defaultValue==null&&(e.hideFromUI=!0),e.meta){let t=e.meta.ts;typeof t=="string"&&(t=t.trim(),t.endsWith("ReactNode")&&(t="ReactNode"),e.meta.ts=t,t==="ReactNode"&&(e.hideFromUI=!0))}return e}function tT(e,t){let r=[...t.properties].sort((n,o)=>{let s=be(e,n)||"zz",i=be(e,o)||"zz";if(s==="inputs")return 1;let a=Ch.indexOf(s),u=Ch.indexOf(i);return a>-1?u>-1&&a>u?1:-1:u>-1?a>-1&&u<a?-1:1:s.localeCompare(i)});return e.ts.factory.updateObjectLiteralExpression(t,r)}function rT(e,t){return[...t].sort((n,o)=>{let s=be(e,n)||"zz",i=be(e,o)||"zz",a=bh.indexOf(s),u=bh.indexOf(i);return a>-1?u>-1&&a>u?1:-1:u>-1?a>-1&&u<a?-1:1:s.localeCompare(i)})}function ai(e,t){for(let r of t.properties){if(!e.ts.isPropertyAssignment(r)||!e.ts.isIdentifier(r.name))continue;if(be(e,r)==="canHaveChildren"){let{initializer:o}=r;return o.kind===e.ts.SyntaxKind.TrueKeyword}}return!1}var Ch,bh,ht=v(()=>{"use strict";kr();Ds();me();Ch=["component","name","description"];bh=["name","type"]});function xh(e,t){let r=`Builder.registerComponent(
|
|
264
264
|
`;if(e.appDir)t.acceptsChildren?r+=` withChildren(${t.importName}),
|
|
265
265
|
`:r+=` ${t.importName},
|
|
266
266
|
`;else{let o=t.externalImportPath?t.externalImportPath:de(e,e.registryPath,t.filePath);t.exportName==="default"?t.acceptsChildren?r+=` withChildren(dynamic(() => import(${JSON.stringify(o)}))),
|
|
@@ -270,7 +270,7 @@ ${r}=${n}
|
|
|
270
270
|
`}r+=` {
|
|
271
271
|
name: "${t.name}",
|
|
272
272
|
}
|
|
273
|
-
`,r+=");";let n=La(e,r);return hl(e,n,t)}function hl(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;r.acceptsChildren?e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"||(o[0]=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[o[0]])):e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"&&(o[0]=o[0].arguments[0]);let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=qe(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}var wh=v(()=>{"use strict";Oe();me();ht()});function ge(e,t,r,n="esm"){return Array.isArray(r.namedImports)&&r.namedImports.forEach(o=>{t=tT(e,t,o,r.importPath,!!r.isTypeOnly,n)}),typeof r.defaultImport=="string"&&(t=rT(e,t,r.defaultImport,r.importPath,n)),t}function tT(e,t,r,n,o,s){return s==="cjs"?Eh(e,t,null,r,n):Sh(e,t,null,r,n,o)}function rT(e,t,r,n,o){return o==="cjs"?Eh(e,t,r,null,n):Sh(e,t,r,null,n,!1)}function Sh(e,t,r,n,o,s){let i=[...t.statements],a=0,u=!1,c=!1;for(let h=0;h<i.length;h++){let m=i[h];if(!e.ts.isImportDeclaration(m)||(a=h,!m.moduleSpecifier||!e.ts.isStringLiteral(m.moduleSpecifier))||m.moduleSpecifier.text!==o||!!m.importClause?.isTypeOnly!==s)continue;let g=[],y=m.importClause?.namedBindings;if(y&&e.ts.isNamedImports(y)&&y.elements&&g.push(...y.elements),typeof n=="string"){if(g.some(S=>S.name.text===n))return t;g.push(e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))),g.sort((S,w)=>S.name.text.localeCompare(w.name.text)),u=!0}let D=m.importClause?m.importClause.name:void 0;if(typeof r=="string"){if(D&&D.text===r)return t;D=e.ts.factory.createIdentifier(r),c=!0}if(u||c)return i[h]=e.ts.factory.updateImportDeclaration(m,void 0,e.ts.factory.createImportClause(s,D,e.ts.factory.createNamedImports(g)),m.moduleSpecifier,void 0),e.ts.factory.updateSourceFile(t,i)}let l,d;typeof r=="string"&&(l=e.ts.factory.createIdentifier(r)),typeof n=="string"&&(d=e.ts.factory.createNamedImports([e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))]));let p=e.ts.factory.createImportDeclaration(void 0,e.ts.factory.createImportClause(s,l,d),e.ts.factory.createStringLiteral(o));return i.splice(a,0,p),e.ts.factory.updateSourceFile(t,i)}function Eh(e,t,r,n,o){let s=[...t.statements],i=0;for(let a=0;a<s.length;a++){let u=s[a];if(e.ts.isVariableStatement(u))for(let c=0;c<u.declarationList.declarations.length;c++){let l=[...u.declarationList.declarations],d=l[c],p=d.initializer;if(!p||!e.ts.isCallExpression(p))continue;let h=p.expression;if(!e.ts.isIdentifier(h)||h.text!=="require"||p.arguments.length!==1)continue;let m=p.arguments[0];if(e.ts.isStringLiteral(m)&&(i=a,m.text===o)){if(e.ts.isIdentifier(d.name)&&typeof r=="string")return d.name.text===r?t:(l[c]=e.ts.factory.updateVariableDeclaration(d,e.ts.factory.createIdentifier(r),d.exclamationToken,d.type,d.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s));if(e.ts.isObjectBindingPattern(d.name)&&typeof n=="string"){let g=[...d.name.elements];return g.some(D=>!e.ts.isBindingElement(D)||!e.ts.isIdentifier(D.name)?!1:D.name.text===n)?t:(g.push(e.ts.factory.createBindingElement(void 0,void 0,n)),g.sort((D,S)=>!e.ts.isBindingElement(D)||!e.ts.isIdentifier(D.name)||!e.ts.isBindingElement(S)||!e.ts.isIdentifier(S.name)?0:D.name.text.localeCompare(S.name.text)),l[c]=e.ts.factory.updateVariableDeclaration(d,e.ts.factory.createObjectBindingPattern(g),d.exclamationToken,d.type,d.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s))}}}}if(typeof r=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(r,void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}if(typeof n=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(e.ts.factory.createObjectBindingPattern([e.ts.factory.createBindingElement(void 0,void 0,n)]),void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}return t}var yr=v(()=>{"use strict"});function lo(e,t,r="esm"){return r==="cjs"?oT(e,t):nT(e,t)}function nT(e,t){let r=[];for(let n of t.statements){if(e.ts.isExportDeclaration(n)){if(n.exportClause&&e.ts.isNamedExports(n.exportClause)){for(let o of n.exportClause.elements)if(n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:o}),e.ts.isIdentifier(o.name)){let s=o.name.text;for(let i of t.statements)if(e.ts.isVariableStatement(i))for(let a of i.declarationList.declarations)e.ts.isIdentifier(a.name)&&a.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i});else e.ts.isFunctionDeclaration(i)&&i.name&&i.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i})}}else!n.exportClause&&n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:n});continue}if(e.ts.isExportAssignment(n)){let o=n.flags===e.ts.NodeFlags.None,s=n.expression;if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements){if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:o,statement:a,node:a});e.ts.isFunctionDeclaration(a)&&a.name?.text===i&&r.push({isDefaultExport:o,statement:a,node:a})}}else(e.ts.isArrowFunction(s)||e.ts.isCallExpression(s)||e.ts.isFunctionDeclaration(s)||e.ts.isObjectLiteralExpression(s))&&r.push({isDefaultExport:o,statement:n,node:s});continue}if((e.ts.isVariableStatement(n)||e.ts.isFunctionDeclaration(n))&&n.modifiers&&n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.ExportKeyword)){r.push({isDefaultExport:n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.DefaultKeyword),statement:n,node:n});continue}}return r}function oT(e,t){let r=[];for(let n of t.statements)if(e.ts.isExpressionStatement(n)&&e.ts.isBinaryExpression(n.expression)&&e.ts.isPropertyAccessExpression(n.expression.left)){let o=n.expression.left,s=n.expression.right;if(!e.ts.isIdentifier(o.expression))continue;if(o.expression.text==="module"&&o.name.text==="exports"){if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements)if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a});else e.ts.isFunctionDeclaration(a)&&a.name&&a.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a})}else r.push({isDefaultExport:!0,statement:n,node:s});continue}}return r}var ui=v(()=>{"use strict"});function iT(e,t,r){for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&n.importClause){if(n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings)){for(let o of n.importClause.namedBindings.elements)if(e.ts.isIdentifier(o.name)&&o.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"named"}}if(n.importClause.name&&n.importClause.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"default"}}return null}async function $r(e,t,r,n){let o=iT(e,r,n);if(o){let s=await Ds(e,e.normalize(e.resolve(e.dirname(t),o.importPath))),i=e.relative(e.getAppRootDir(),s);return{displayFilePath:Ce(e,s),filePath:s,relFilePath:i,importPath:o.importPath,exportType:o.exportType}}return null}function ci(e,t,r){for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(e.ts.isVariableStatement(o)){for(let s of o.declarationList.declarations)if(e.ts.isIdentifier(s.name)&&s.name.text===r)return{statement:o,statementIndex:n}}}return null}function Ve(e,t,r){let n=ci(e,t,r);if(n&&n.statement.declarationList.declarations.length>0){let o=n.statement.declarationList.declarations[0];if(o.initializer&&e.ts.isArrayLiteralExpression(o.initializer))return{statement:n.statement,statementIndex:n.statementIndex,variableDeclaration:o,arrayLiteralExp:o.initializer}}return null}function Qa(e,t){if(t){if(sT(e,t))return!0;let r=!1;if(t.forEachChild(n=>{Qa(e,n)&&(r=!0)}),r)return!0}return!1}function sT(e,t){return e.ts.isJsxElement(t)||e.ts.isJsxOpeningElement(t)||e.ts.isJsxOpeningFragment(t)||e.ts.isJsxSelfClosingElement(t)||e.ts.isJsxFragment(t)||e.ts.isJsxChild(t)}async function Ds(e,t){let r=e.extname(t).toLowerCase();if(r===""||!yl.includes(r)){for(let n of yl){let o=t+n;if(await e.exists(o))return o}for(let n of yl){let o=e.join(t,"index"+n);if(await e.exists(o))return o}}return t}var yl,St=v(()=>{"use strict";me();yl=[".tsx",".jsx",".ts",".js"]});function li(e,t,r){if(!r||!t)return;let n=t.getSymbolAtLocation(r);if(!n)return;let o=n.valueDeclaration;if(!o)return;let s=o.getSourceFile().fileName,i=aT(e,s);return i?[{name:i}]:void 0}function aT(e,t){if(typeof t=="string"){t=e.normalize(mr(t));let r=t.split("/"),n=r.lastIndexOf("node_modules");if(n>-1){let o=r.slice(n+1),s=o[0];if(s)return s.startsWith("@")&&o[1]&&(s+="/"+o[1]),s}}}function Xt(e){let t=[];for(let r of e)if(r.dependencies)for(let n of r.dependencies)t.some(o=>o.name===n.name)||t.push({...n});return t.sort((r,n)=>r.name.localeCompare(n.name))}var Fn=v(()=>{"use strict";me()});function Ph(e,t,r="esm"){return r==="cjs"?lT(e,t):cT(e,t)}function cT(e,t){let r=[];for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&e.ts.isLiteralExpression(n.moduleSpecifier)){if(!uT.test(n.moduleSpecifier.text)||n.importClause?.isTypeOnly)continue;if(n.importClause&&n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings))for(let o of n.importClause.namedBindings.elements)o.isTypeOnly||r.push({isDefaultExport:!1,statement:n,node:o.name});n.importClause&&n.importClause.name&&r.push({isDefaultExport:!0,statement:n,node:n.importClause.name})}return r}function lT(e,t){return[]}var uT,Ah=v(()=>{"use strict";uT=/^(@\w|\w)/});async function di(e,t){if(!t.some(i=>!i.isRegistered))return t;let n=await He(e,t.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(t.map(async i=>{let a=n.getSourceFile(i.filePath);if(a){let c=(await _n(e,o,i.filePath,a,!1)).find(l=>l.cmpInfo.id===i.id);c&&(i.inputs=co(e,o,c.node.fnNode))}return i}))}async function pi(e,t,r,n){if(t.node.fnNode){let{sourceFile:o,typeChecker:s}=await ti(e,t.cmpInfo.filePath,r),a=(await _n(e,s,t.cmpInfo.filePath,o,n)).find(u=>u.cmpInfo.id===t.cmpInfo.id);if(!a)throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return co(e,s,a.node.fnNode)}return[]}async function Fh(e,t,r){let n=e.extname(t).toLowerCase();if(n===".tsx"||n===".jsx"||n===".ts"||n===".js"){let o=await e.readFile(t);if(o)return dT(e,t,o,r)}return null}function dT(e,t,r,n=!1){let o=le(e,r);return _n(e,null,t,o,n)}async function _n(e,t,r,n,o){let s=[];for(let a of n.statements)if(e.ts.isExpressionStatement(a)&&e.ts.isStringLiteral(a.expression)&&a.expression.text==="use server")return s;let i=lo(e,n);return o&&i.push(...Ph(e,n)),r=e.normalize(r),await Promise.all(i.map(async a=>{let u=await pT(e,t,r,a);s.push(...u)})),s}async function pT(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Pe(e,r);if(e.ts.isVariableStatement(n.node)){for(let a of n.node.declarationList.declarations){if(!e.ts.isIdentifier(a.name)||!ei(a.name.text))continue;let u=an(e,t,a.initializer);if(u){let c=u.name||a.name.text,l=n.isDefaultExport?"default":c,d=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:Ce(e,r),name:Ee(c),inputs:[],exportName:l,exportType:d,importName:c,filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}}return o}if(e.ts.isArrowFunction(n.node)){let a=an(e,t,n.node);if(a){let u=Wt(e,r),c=n.isDefaultExport?"default":u,l=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,c),displayFilePath:Ce(e,r),name:u,inputs:[],exportName:c,exportType:l,importName:no(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:a.deps,framework:"react"},node:a})}return o}if(e.ts.isFunctionExpression(n.node)||e.ts.isFunctionDeclaration(n.node)){let a=n.node.name?.text;if(a&&!ei(a))return o;let u=an(e,t,n.node);if(u){let c=u.name||Wt(e,r),l=n.isDefaultExport||!u.name?"default":u.name,d=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:Ce(e,r),name:c,inputs:[],exportName:l,exportType:d,importName:u.name||no(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}return o}if((e.ts.isExportSpecifier(n.node)||e.ts.isIdentifier(n.node))&&ei(n.node.getText())){let a,u=an(e,t,n.node);if(u){let c=u.name||Wt(e,r),l=n.isDefaultExport||!u.name?"default":u.name,d=n.isDefaultExport?"default":"named",p=fT(e,n.node)?.moduleSpecifier??mT(e,n.node)?.moduleSpecifier;if(p&&e.ts.isStringLiteral(p)){let h=t?.getSymbolAtLocation(p);if(h&&h.declarations&&h.declarations.length>0){let m=h.declarations[0];(!e.ts.isSourceFile(m)||e.ts.isSourceFile(m)&&m.fileName.includes("node_modules"))&&(a=p.text)}}o.push({cmpInfo:{id:await we(e,r,l,a),displayFilePath:Ce(e,r),name:c,inputs:[],exportName:l,exportType:d,importName:u.name||no(e,r),filePath:r,relFilePath:s,importPath:a||i,externalImportPath:a,dependencies:u.deps,framework:"react"},node:u})}return o}if(e.ts.isExportDeclaration(n.node)&&n.node.exportClause===void 0){let a=n.node.moduleSpecifier;if(a&&e.ts.isStringLiteral(a)){let u=await hT(e,t,r,a);o.push(...u)}return o}return o}function fT(e,t){for(;t;){if(e.ts.isExportDeclaration(t))return t;t=t.parent}return null}function mT(e,t){for(;t;){if(e.ts.isImportDeclaration(t))return t;t=t.parent}return null}function an(e,t,r){if(!r)return null;if(e.ts.isArrowFunction(r))return Qa(e,r.body)?{name:"",fnNode:r,deps:li(e,t,r)}:null;if(e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r))return Qa(e,r.body)?{name:r.name?.text||"",fnNode:r,deps:li(e,t,r)}:null;if(e.ts.isCallExpression(r)){let n=r.expression;if(e.ts.isPropertyAccessExpression(n)){let o=r.arguments;if(o.length===0)return null;let s=n.expression;if(!e.ts.isIdentifier(s)||s.text!=="React")return null;let i=n.name;return!e.ts.isIdentifier(i)||i.text!=="forwardRef"?null:an(e,t,o[0])}else if(e.ts.isIdentifier(n)&&(n.text==="observer"||n.text==="forwardRef")){let o=r.arguments;return o.length===0?null:an(e,t,o[0])}return null}if(!t)return null;if(e.ts.isPropertyAccessExpression(r)){let n=r.expression,o=r.name;if(!e.ts.isIdentifier(n)||!e.ts.isIdentifier(o)||!ei(o.text))return null;let i=t.getTypeAtLocation(o).getCallSignatures();if(i.length>0&&i[0].getParameters().length>0)return{name:"",fnNode:o,deps:li(e,t,o)}}if(e.ts.isExportSpecifier(r)){let n=r.name;return{name:n.text||"",fnNode:n,deps:li(e,t,n)}}if(e.ts.isIdentifier(r))return{name:r.text||"",fnNode:r,deps:li(e,t,r)};if(e.ts.isExpressionStatement(r)){let n=r.expression;if(e.ts.isAsExpression(n)&&e.ts.isIdentifier(n.type)&&n.type.text==="default")return an(e,t,n.expression)}if(e.ts.isVariableStatement(r)){for(let n of r.declarationList.declarations)if(n.initializer&&e.ts.isAsExpression(n.initializer)){let o=n.initializer;if(e.ts.isIdentifier(o.type)&&o.type.text==="default"){let s=an(e,t,o.expression);if(s&&e.ts.isIdentifier(n.name))return{name:n.name.text,fnNode:s.fnNode,deps:s.deps}}}}return null}async function _h(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.normalize(s.fileName);if(ja(e,gT,s.fileName)||i===e.reactConfigPath||i===e.builderComponentPath)return;let a=await _n(e,o,i,s,i===e.registryPath);r.push(...a)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}async function hT(e,t,r,n){let o=[],s=n.text;if(!t)return o;try{let i=t.getSymbolAtLocation(n);if(!i)return o;let a=t.getExportsOfModule(i);for(let u of a){let c=u.valueDeclaration||u.declarations?.[0];if(!c)continue;let l=u.name;if(!ei(l)&&l!=="default"||!Rh(e,t,c))continue;let d=an(e,t,c);if(d){let p=u.name,h=p==="default"?"default":"named",m=Ee(p),g=p==="default"?no(e,r):p;o.push({cmpInfo:{id:await we(e,r,p,s),displayFilePath:Ce(e,r),name:m,inputs:[],exportName:p,exportType:h,importName:g,filePath:r,relFilePath:e.relative(e.getAppRootDir(),r),importPath:s,externalImportPath:s,dependencies:d.deps,framework:"react"},node:d})}}}catch(i){e.Sentry?.captureException(new Error(`Error processing module ${s}:`,{cause:i}),{extra:{modulePath:s,filePath:r}})}return o}function Rh(e,t,r){if(e.ts.isInterfaceDeclaration(r)||e.ts.isTypeAliasDeclaration(r))return!1;if(e.ts.isExportSpecifier(r)){let n=t.getSymbolAtLocation(r.name);if(n){let s=t.getAliasedSymbol(n).declarations?.[0];if(s)return Rh(e,t,s)}return!1}if(e.ts.isFunctionDeclaration(r)||e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)){let n=t.getSignatureFromDeclaration(r);if(n){let o=t.getReturnTypeOfSignature(n);return Th(o,t)}}return e.ts.isClassDeclaration(r)?r.heritageClauses?.some(o=>o.types.some(s=>s.expression.getText()==="React.Component"||s.expression.getText()==="Component"))??!1:e.ts.isVariableDeclaration(r)?t.getTypeAtLocation(r).getCallSignatures().some(s=>Th(t.getReturnTypeOfSignature(s),t)):!1}function Th(e,t){let r=t.typeToString(e);return r==="JSX.Element"||r==="Element"||r.includes("ReactElement")||r.includes("React.ReactElement")||r.includes("ReactNode")}var gT,Rn=v(()=>{"use strict";Oe();me();ui();St();Jt();ys();Fn();Ah();gT=new Set(["node_modules","dist"])});async function Ih(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(e.appDir&&yT.has(i)||e.dirname(s.fileName).includes("node_modules"))return;let a=e.normalize(s.fileName);if(a===e.nextConfigPath||a===e.builderComponentPath)return;let u=await _n(e,o,a,s,a===e.registryPath||Kt(a));r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}var yT,kh=v(()=>{"use strict";Rn();me();yT=new Set(["default.tsx","default.ts","default.jsx","default.js","error.tsx","error.ts","error.jsx","error.js","layout.tsx","layout.ts","layout.jsx","layout.js","loading.tsx","loading.ts","loading.jsx","loading.js","not-found.tsx","not-found.ts","not-found.jsx","not-found.js","page.tsx","page.ts","page.jsx","page.js","route.tsx","route.ts","route.jsx","route.js","template.tsx","template.ts","template.jsx","template.js"])});function Nr(e,t){let r=[],n=[],o=[],s=[];for(let i of t.statements){if(e.ts.isImportDeclaration(i)){if(e.ts.isStringLiteral(i.moduleSpecifier)){let u=i.moduleSpecifier.text;if(!u.startsWith(".")&&!u.startsWith("/")){r.push(i);continue}}let a=i.importClause;if(a){if(a.namedBindings){n.push(i);continue}if(a.name){n.push(i);continue}}o.push(i);continue}s.push(i)}return e.ts.factory.updateSourceFile(t,[...Dl(e,r),...Dl(e,n),...Dl(e,o),...s])}function Dr(e){let t=e.split(`
|
|
273
|
+
`,r+=");";let n=ja(e,r);return yl(e,n,t)}function yl(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;r.acceptsChildren?e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"||(o[0]=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[o[0]])):e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"&&(o[0]=o[0].arguments[0]);let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=ze(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}var wh=v(()=>{"use strict";Oe();me();ht()});function ge(e,t,r,n="esm"){return Array.isArray(r.namedImports)&&r.namedImports.forEach(o=>{t=nT(e,t,o,r.importPath,!!r.isTypeOnly,n)}),typeof r.defaultImport=="string"&&(t=oT(e,t,r.defaultImport,r.importPath,n)),t}function nT(e,t,r,n,o,s){return s==="cjs"?Eh(e,t,null,r,n):Sh(e,t,null,r,n,o)}function oT(e,t,r,n,o){return o==="cjs"?Eh(e,t,r,null,n):Sh(e,t,r,null,n,!1)}function Sh(e,t,r,n,o,s){let i=[...t.statements],a=0,u=!1,c=!1;for(let h=0;h<i.length;h++){let g=i[h];if(!e.ts.isImportDeclaration(g)||(a=h,!g.moduleSpecifier||!e.ts.isStringLiteral(g.moduleSpecifier))||g.moduleSpecifier.text!==o||!!g.importClause?.isTypeOnly!==s)continue;let m=[],y=g.importClause?.namedBindings;if(y&&e.ts.isNamedImports(y)&&y.elements&&m.push(...y.elements),typeof n=="string"){if(m.some(w=>w.name.text===n))return t;m.push(e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))),m.sort((w,S)=>w.name.text.localeCompare(S.name.text)),u=!0}let D=g.importClause?g.importClause.name:void 0;if(typeof r=="string"){if(D&&D.text===r)return t;D=e.ts.factory.createIdentifier(r),c=!0}if(u||c)return i[h]=e.ts.factory.updateImportDeclaration(g,void 0,e.ts.factory.createImportClause(s,D,e.ts.factory.createNamedImports(m)),g.moduleSpecifier,void 0),e.ts.factory.updateSourceFile(t,i)}let l,d;typeof r=="string"&&(l=e.ts.factory.createIdentifier(r)),typeof n=="string"&&(d=e.ts.factory.createNamedImports([e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))]));let p=e.ts.factory.createImportDeclaration(void 0,e.ts.factory.createImportClause(s,l,d),e.ts.factory.createStringLiteral(o));return i.splice(a,0,p),e.ts.factory.updateSourceFile(t,i)}function Eh(e,t,r,n,o){let s=[...t.statements],i=0;for(let a=0;a<s.length;a++){let u=s[a];if(e.ts.isVariableStatement(u))for(let c=0;c<u.declarationList.declarations.length;c++){let l=[...u.declarationList.declarations],d=l[c],p=d.initializer;if(!p||!e.ts.isCallExpression(p))continue;let h=p.expression;if(!e.ts.isIdentifier(h)||h.text!=="require"||p.arguments.length!==1)continue;let g=p.arguments[0];if(e.ts.isStringLiteral(g)&&(i=a,g.text===o)){if(e.ts.isIdentifier(d.name)&&typeof r=="string")return d.name.text===r?t:(l[c]=e.ts.factory.updateVariableDeclaration(d,e.ts.factory.createIdentifier(r),d.exclamationToken,d.type,d.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s));if(e.ts.isObjectBindingPattern(d.name)&&typeof n=="string"){let m=[...d.name.elements];return m.some(D=>!e.ts.isBindingElement(D)||!e.ts.isIdentifier(D.name)?!1:D.name.text===n)?t:(m.push(e.ts.factory.createBindingElement(void 0,void 0,n)),m.sort((D,w)=>!e.ts.isBindingElement(D)||!e.ts.isIdentifier(D.name)||!e.ts.isBindingElement(w)||!e.ts.isIdentifier(w.name)?0:D.name.text.localeCompare(w.name.text)),l[c]=e.ts.factory.updateVariableDeclaration(d,e.ts.factory.createObjectBindingPattern(m),d.exclamationToken,d.type,d.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s))}}}}if(typeof r=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(r,void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}if(typeof n=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(e.ts.factory.createObjectBindingPattern([e.ts.factory.createBindingElement(void 0,void 0,n)]),void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}return t}var yr=v(()=>{"use strict"});function lo(e,t,r="esm"){return r==="cjs"?sT(e,t):iT(e,t)}function iT(e,t){let r=[];for(let n of t.statements){if(e.ts.isExportDeclaration(n)){if(n.exportClause&&e.ts.isNamedExports(n.exportClause)){for(let o of n.exportClause.elements)if(n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:o}),e.ts.isIdentifier(o.name)){let s=o.name.text;for(let i of t.statements)if(e.ts.isVariableStatement(i))for(let a of i.declarationList.declarations)e.ts.isIdentifier(a.name)&&a.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i});else e.ts.isFunctionDeclaration(i)&&i.name&&i.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i})}}else!n.exportClause&&n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:n});continue}if(e.ts.isExportAssignment(n)){let o=n.flags===e.ts.NodeFlags.None,s=n.expression;if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements){if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:o,statement:a,node:a});e.ts.isFunctionDeclaration(a)&&a.name?.text===i&&r.push({isDefaultExport:o,statement:a,node:a})}}else(e.ts.isArrowFunction(s)||e.ts.isCallExpression(s)||e.ts.isFunctionDeclaration(s)||e.ts.isObjectLiteralExpression(s))&&r.push({isDefaultExport:o,statement:n,node:s});continue}if((e.ts.isVariableStatement(n)||e.ts.isFunctionDeclaration(n))&&n.modifiers&&n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.ExportKeyword)){r.push({isDefaultExport:n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.DefaultKeyword),statement:n,node:n});continue}}return r}function sT(e,t){let r=[];for(let n of t.statements)if(e.ts.isExpressionStatement(n)&&e.ts.isBinaryExpression(n.expression)&&e.ts.isPropertyAccessExpression(n.expression.left)){let o=n.expression.left,s=n.expression.right;if(!e.ts.isIdentifier(o.expression))continue;if(o.expression.text==="module"&&o.name.text==="exports"){if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements)if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a});else e.ts.isFunctionDeclaration(a)&&a.name&&a.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a})}else r.push({isDefaultExport:!0,statement:n,node:s});continue}}return r}var ui=v(()=>{"use strict"});function aT(e,t,r){for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&n.importClause){if(n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings)){for(let o of n.importClause.namedBindings.elements)if(e.ts.isIdentifier(o.name)&&o.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"named"}}if(n.importClause.name&&n.importClause.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"default"}}return null}async function $r(e,t,r,n){let o=aT(e,r,n);if(o){let s=await vs(e,e.normalize(e.resolve(e.dirname(t),o.importPath))),i=e.relative(e.getAppRootDir(),s);return{displayFilePath:Ce(e,s),filePath:s,relFilePath:i,importPath:o.importPath,exportType:o.exportType}}return null}function ci(e,t,r){for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(e.ts.isVariableStatement(o)){for(let s of o.declarationList.declarations)if(e.ts.isIdentifier(s.name)&&s.name.text===r)return{statement:o,statementIndex:n}}}return null}function Ve(e,t,r){let n=ci(e,t,r);if(n&&n.statement.declarationList.declarations.length>0){let o=n.statement.declarationList.declarations[0];if(o.initializer&&e.ts.isArrayLiteralExpression(o.initializer))return{statement:n.statement,statementIndex:n.statementIndex,variableDeclaration:o,arrayLiteralExp:o.initializer}}return null}function Za(e,t){if(t){if(uT(e,t))return!0;let r=!1;if(t.forEachChild(n=>{Za(e,n)&&(r=!0)}),r)return!0}return!1}function uT(e,t){return e.ts.isJsxElement(t)||e.ts.isJsxOpeningElement(t)||e.ts.isJsxOpeningFragment(t)||e.ts.isJsxSelfClosingElement(t)||e.ts.isJsxFragment(t)||e.ts.isJsxChild(t)}async function vs(e,t){let r=e.extname(t).toLowerCase();if(r===""||!Dl.includes(r)){for(let n of Dl){let o=t+n;if(await e.exists(o))return o}for(let n of Dl){let o=e.join(t,"index"+n);if(await e.exists(o))return o}}return t}var Dl,St=v(()=>{"use strict";me();Dl=[".tsx",".jsx",".ts",".js"]});function li(e,t,r){if(!r||!t)return;let n=t.getSymbolAtLocation(r);if(!n)return;let o=n.valueDeclaration;if(!o)return;let s=o.getSourceFile().fileName,i=cT(e,s);return i?[{name:i}]:void 0}function cT(e,t){if(typeof t=="string"){t=e.normalize(mr(t));let r=t.split("/"),n=r.lastIndexOf("node_modules");if(n>-1){let o=r.slice(n+1),s=o[0];if(s)return s.startsWith("@")&&o[1]&&(s+="/"+o[1]),s}}}function Xt(e){let t=[];for(let r of e)if(r.dependencies)for(let n of r.dependencies)t.some(o=>o.name===n.name)||t.push({...n});return t.sort((r,n)=>r.name.localeCompare(n.name))}var Fn=v(()=>{"use strict";me()});function Ph(e,t,r="esm"){return r==="cjs"?pT(e,t):dT(e,t)}function dT(e,t){let r=[];for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&e.ts.isLiteralExpression(n.moduleSpecifier)){if(!lT.test(n.moduleSpecifier.text)||n.importClause?.isTypeOnly)continue;if(n.importClause&&n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings))for(let o of n.importClause.namedBindings.elements)o.isTypeOnly||r.push({isDefaultExport:!1,statement:n,node:o.name});n.importClause&&n.importClause.name&&r.push({isDefaultExport:!0,statement:n,node:n.importClause.name})}return r}function pT(e,t){return[]}var lT,Ah=v(()=>{"use strict";lT=/^(@\w|\w)/});async function di(e,t){if(!t.some(i=>!i.isRegistered))return t;let n=await Ge(e,t.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(t.map(async i=>{let a=n.getSourceFile(i.filePath);if(a){let c=(await _n(e,o,i.filePath,a,!1)).find(l=>l.cmpInfo.id===i.id);c&&(i.inputs=co(e,o,c.node.fnNode))}return i}))}async function pi(e,t,r,n){if(t.node.fnNode){let{sourceFile:o,typeChecker:s}=await ti(e,t.cmpInfo.filePath,r),a=(await _n(e,s,t.cmpInfo.filePath,o,n)).find(u=>u.cmpInfo.id===t.cmpInfo.id);if(!a)throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return co(e,s,a.node.fnNode)}return[]}async function Fh(e,t,r){let n=e.extname(t).toLowerCase();if(n===".tsx"||n===".jsx"||n===".ts"||n===".js"){let o=await e.readFile(t);if(o)return fT(e,t,o,r)}return null}function fT(e,t,r,n=!1){let o=le(e,r);return _n(e,null,t,o,n)}async function _n(e,t,r,n,o){let s=[];for(let a of n.statements)if(e.ts.isExpressionStatement(a)&&e.ts.isStringLiteral(a.expression)&&a.expression.text==="use server")return s;let i=lo(e,n);return o&&i.push(...Ph(e,n)),r=e.normalize(r),await Promise.all(i.map(async a=>{let u=await mT(e,t,r,a);s.push(...u)})),s}async function mT(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Pe(e,r);if(e.ts.isVariableStatement(n.node)){for(let a of n.node.declarationList.declarations){if(!e.ts.isIdentifier(a.name)||!ei(a.name.text))continue;let u=an(e,t,a.initializer);if(u){let c=u.name||a.name.text,l=n.isDefaultExport?"default":c,d=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:Ce(e,r),name:Ee(c),inputs:[],exportName:l,exportType:d,importName:c,filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}}return o}if(e.ts.isArrowFunction(n.node)){let a=an(e,t,n.node);if(a){let u=Wt(e,r),c=n.isDefaultExport?"default":u,l=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,c),displayFilePath:Ce(e,r),name:u,inputs:[],exportName:c,exportType:l,importName:no(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:a.deps,framework:"react"},node:a})}return o}if(e.ts.isFunctionExpression(n.node)||e.ts.isFunctionDeclaration(n.node)){let a=n.node.name?.text;if(a&&!ei(a))return o;let u=an(e,t,n.node);if(u){let c=u.name||Wt(e,r),l=n.isDefaultExport||!u.name?"default":u.name,d=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:Ce(e,r),name:c,inputs:[],exportName:l,exportType:d,importName:u.name||no(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}return o}if((e.ts.isExportSpecifier(n.node)||e.ts.isIdentifier(n.node))&&ei(n.node.getText())){let a,u=an(e,t,n.node);if(u){let c=u.name||Wt(e,r),l=n.isDefaultExport||!u.name?"default":u.name,d=n.isDefaultExport?"default":"named",p=gT(e,n.node)?.moduleSpecifier??hT(e,n.node)?.moduleSpecifier;if(p&&e.ts.isStringLiteral(p)){let h=t?.getSymbolAtLocation(p);if(h&&h.declarations&&h.declarations.length>0){let g=h.declarations[0];(!e.ts.isSourceFile(g)||e.ts.isSourceFile(g)&&g.fileName.includes("node_modules"))&&(a=p.text)}}o.push({cmpInfo:{id:await we(e,r,l,a),displayFilePath:Ce(e,r),name:c,inputs:[],exportName:l,exportType:d,importName:u.name||no(e,r),filePath:r,relFilePath:s,importPath:a||i,externalImportPath:a,dependencies:u.deps,framework:"react"},node:u})}return o}if(e.ts.isExportDeclaration(n.node)&&n.node.exportClause===void 0){let a=n.node.moduleSpecifier;if(a&&e.ts.isStringLiteral(a)){let u=await DT(e,t,r,a);o.push(...u)}return o}return o}function gT(e,t){for(;t;){if(e.ts.isExportDeclaration(t))return t;t=t.parent}return null}function hT(e,t){for(;t;){if(e.ts.isImportDeclaration(t))return t;t=t.parent}return null}function an(e,t,r){if(!r)return null;if(e.ts.isArrowFunction(r))return Za(e,r.body)?{name:"",fnNode:r,deps:li(e,t,r)}:null;if(e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r))return Za(e,r.body)?{name:r.name?.text||"",fnNode:r,deps:li(e,t,r)}:null;if(e.ts.isCallExpression(r)){let n=r.expression;if(e.ts.isPropertyAccessExpression(n)){let o=r.arguments;if(o.length===0)return null;let s=n.expression;if(!e.ts.isIdentifier(s)||s.text!=="React")return null;let i=n.name;return!e.ts.isIdentifier(i)||i.text!=="forwardRef"?null:an(e,t,o[0])}else if(e.ts.isIdentifier(n)&&(n.text==="observer"||n.text==="forwardRef")){let o=r.arguments;return o.length===0?null:an(e,t,o[0])}return null}if(!t)return null;if(e.ts.isPropertyAccessExpression(r)){let n=r.expression,o=r.name;if(!e.ts.isIdentifier(n)||!e.ts.isIdentifier(o)||!ei(o.text))return null;let i=t.getTypeAtLocation(o).getCallSignatures();if(i.length>0&&i[0].getParameters().length>0)return{name:"",fnNode:o,deps:li(e,t,o)}}if(e.ts.isExportSpecifier(r)){let n=r.name;return{name:n.text||"",fnNode:n,deps:li(e,t,n)}}if(e.ts.isIdentifier(r))return{name:r.text||"",fnNode:r,deps:li(e,t,r)};if(e.ts.isExpressionStatement(r)){let n=r.expression;if(e.ts.isAsExpression(n)&&e.ts.isIdentifier(n.type)&&n.type.text==="default")return an(e,t,n.expression)}if(e.ts.isVariableStatement(r)){for(let n of r.declarationList.declarations)if(n.initializer&&e.ts.isAsExpression(n.initializer)){let o=n.initializer;if(e.ts.isIdentifier(o.type)&&o.type.text==="default"){let s=an(e,t,o.expression);if(s&&e.ts.isIdentifier(n.name))return{name:n.name.text,fnNode:s.fnNode,deps:s.deps}}}}return null}async function _h(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.normalize(s.fileName);if(Ua(e,yT,s.fileName)||i===e.reactConfigPath||i===e.builderComponentPath)return;let a=await _n(e,o,i,s,i===e.registryPath);r.push(...a)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}async function DT(e,t,r,n){let o=[],s=n.text;if(!t)return o;try{let i=t.getSymbolAtLocation(n);if(!i)return o;let a=t.getExportsOfModule(i);for(let u of a){let c=u.valueDeclaration||u.declarations?.[0];if(!c)continue;let l=u.name;if(!ei(l)&&l!=="default"||!Rh(e,t,c))continue;let d=an(e,t,c);if(d){let p=u.name,h=p==="default"?"default":"named",g=Ee(p),m=p==="default"?no(e,r):p;o.push({cmpInfo:{id:await we(e,r,p,s),displayFilePath:Ce(e,r),name:g,inputs:[],exportName:p,exportType:h,importName:m,filePath:r,relFilePath:e.relative(e.getAppRootDir(),r),importPath:s,externalImportPath:s,dependencies:d.deps,framework:"react"},node:d})}}}catch(i){e.Sentry?.captureException(new Error(`Error processing module ${s}:`,{cause:i}),{extra:{modulePath:s,filePath:r}})}return o}function Rh(e,t,r){if(e.ts.isInterfaceDeclaration(r)||e.ts.isTypeAliasDeclaration(r))return!1;if(e.ts.isExportSpecifier(r)){let n=t.getSymbolAtLocation(r.name);if(n){let s=t.getAliasedSymbol(n).declarations?.[0];if(s)return Rh(e,t,s)}return!1}if(e.ts.isFunctionDeclaration(r)||e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)){let n=t.getSignatureFromDeclaration(r);if(n){let o=t.getReturnTypeOfSignature(n);return Th(o,t)}}return e.ts.isClassDeclaration(r)?r.heritageClauses?.some(o=>o.types.some(s=>s.expression.getText()==="React.Component"||s.expression.getText()==="Component"))??!1:e.ts.isVariableDeclaration(r)?t.getTypeAtLocation(r).getCallSignatures().some(s=>Th(t.getReturnTypeOfSignature(s),t)):!1}function Th(e,t){let r=t.typeToString(e);return r==="JSX.Element"||r==="Element"||r.includes("ReactElement")||r.includes("React.ReactElement")||r.includes("ReactNode")}var yT,Rn=v(()=>{"use strict";Oe();me();ui();St();Jt();Ds();Fn();Ah();yT=new Set(["node_modules","dist"])});async function Ih(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(e.appDir&&vT.has(i)||e.dirname(s.fileName).includes("node_modules"))return;let a=e.normalize(s.fileName);if(a===e.nextConfigPath||a===e.builderComponentPath)return;let u=await _n(e,o,a,s,a===e.registryPath||Kt(a));r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}var vT,kh=v(()=>{"use strict";Rn();me();vT=new Set(["default.tsx","default.ts","default.jsx","default.js","error.tsx","error.ts","error.jsx","error.js","layout.tsx","layout.ts","layout.jsx","layout.js","loading.tsx","loading.ts","loading.jsx","loading.js","not-found.tsx","not-found.ts","not-found.jsx","not-found.js","page.tsx","page.ts","page.jsx","page.js","route.tsx","route.ts","route.jsx","route.js","template.tsx","template.ts","template.jsx","template.js"])});function Nr(e,t){let r=[],n=[],o=[],s=[];for(let i of t.statements){if(e.ts.isImportDeclaration(i)){if(e.ts.isStringLiteral(i.moduleSpecifier)){let u=i.moduleSpecifier.text;if(!u.startsWith(".")&&!u.startsWith("/")){r.push(i);continue}}let a=i.importClause;if(a){if(a.namedBindings){n.push(i);continue}if(a.name){n.push(i);continue}}o.push(i);continue}s.push(i)}return e.ts.factory.updateSourceFile(t,[...vl(e,r),...vl(e,n),...vl(e,o),...s])}function Dr(e){let t=e.split(`
|
|
274
274
|
`).map(n=>n.trimEnd());e="";let r=!1;for(let n=t.length-1;n>=0;n--){let o=t[n];!r&&o.startsWith("import ")&&(r=!0,o=o+`
|
|
275
275
|
`),/^builder.init(.*)$/.test(o)&&(o=o+`
|
|
276
276
|
`),t[n-1]&&!t[n-1].includes("*/")&&(o.trim().startsWith("Builder.registerComponent")&&(o=`
|
|
@@ -279,8 +279,8 @@ ${r}=${n}
|
|
|
279
279
|
`+o),o.trim().startsWith("export ")&&(o=`
|
|
280
280
|
`+o)),e=o+`
|
|
281
281
|
`+e}return e.trim()+`
|
|
282
|
-
`}function
|
|
283
|
-
${e}`),e}function Bh(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function Or(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let o=Nh(e,r),s=Nh(e,n);return o.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function Nh(e,t){let r=t.properties.find(n=>be(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}var po=v(()=>{"use strict";kr()});async function Mh(e){let t=await e.readFile(e.registryPath);return t?DT(e,t):{components:[],sourceFile:le(e,"")}}async function DT(e,t){let r=le(e,t);return e.sdkVersion===q.gen2?CT(e,r):vT(e,r)}async function vT(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let d=c[0];if(e.ts.isCallExpression(d)){let p=e.ts.isIdentifier(d.expression)&&d.expression.text;if(p==="withChildren"){let m=bl(e,d.arguments[0]);if(e.ts.isCallExpression(m)){let g=await vl(e,n,m,l,!0);g&&r.push(g)}else{let g=m;if(e.ts.isIdentifier(g)){let y=await Cl(e,t,n,g,l,!0);y&&r.push(y)}}continue}if(p==="dynamic"){let m=await vl(e,n,d,l,!1);m&&r.push(m);continue}let h=bl(e,d.arguments[0]);if(e.ts.isCallExpression(h)&&e.ts.isIdentifier(h.expression)&&h.expression.text==="dynamic"){let m=await vl(e,n,h,l,!1);m&&r.push(m);continue}if(e.ts.isIdentifier(h)){let m=await Cl(e,t,n,h,l,!1);m&&r.push(m);continue}continue}if(e.ts.isIdentifier(d)){let p=await Cl(e,t,n,d,l,!1);p&&r.push(p);continue}}return{sourceFile:t,components:bt(r)}}function bl(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:bl(e,t.arguments[0]):t}async function vl(e,t,r,n,o){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:o,framework:"react"},i=r.arguments;if(i.length===0)return null;let a=i[0];if(!e.ts.isArrowFunction(a))return null;let u=a.body;if(e.ts.isCallExpression(u)){if(u.expression.kind!==e.ts.SyntaxKind.ImportKeyword||u.arguments.length!==1)return null;let l=u.arguments[0];if(!e.ts.isStringLiteral(l))return null;let d=l.text,p=await fi(e,d);s.filePath=p,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(p)?s.importPath=Pe(e,s.filePath):(s.externalImportPath=d,s.importPath=s.externalImportPath),s.name=Wt(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(u)){let c=u.expression;if(!e.ts.isParenthesizedExpression(c))return null;let l=c.expression;if(!e.ts.isAwaitExpression(l))return null;let d=l.expression;if(!e.ts.isCallExpression(d)||d.expression.kind!==e.ts.SyntaxKind.ImportKeyword||d.arguments.length!==1)return null;let h=d.arguments[0];if(!e.ts.isStringLiteral(h)||!e.ts.isIdentifier(u.name))return null;let m=h.text,g=await fi(e,m);s.filePath=g,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(g)?s.importPath=Pe(e,s.filePath):(s.externalImportPath=m,s.importPath=s.externalImportPath),s.name=Ee(u.name.text),s.importName=u.name.text,s.exportName=u.name.text,s.exportType="named"}else return null;return s=wt(e,s,n),s.displayFilePath=Ce(e,s.filePath),s.filePath&&s.exportName&&(s.id=await we(e,s.filePath,s.exportName,s.externalImportPath)),s}async function Cl(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;let l=await fi(e,c.text);i.filePath=l,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(l)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=c.text,i.importPath=i.externalImportPath),i.name=Wt(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(p=>!p.importClause||!p.importClause.namedBindings||!e.ts.isNamedImports(p.importClause.namedBindings)?!1:p.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let d=await fi(e,l.text);i.filePath=d,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(d)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Ee(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=wt(e,i,o),i.displayFilePath=Ce(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function fi(e,t){return Ds(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function Lh(e,t,r){let n=!1,o=0,s=[...t.statements];for(let c=0;c<s.length;c++){let l=s[c];if(e.ts.isImportDeclaration(l)){o=c;continue}if(!e.ts.isExpressionStatement(l))continue;let d=l.expression;if(!e.ts.isCallExpression(d))continue;let p=d.expression;if(!e.ts.isPropertyAccessExpression(p))continue;let h=p.expression;if(!e.ts.isIdentifier(h)||h.text!=="builder")continue;if(p.name.text=="init"){n=!0;break}else continue}if(n)return t;let i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier(Ir)),a=r?e.ts.factory.createNonNullExpression(i):i,u=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(o+1,0,u),e.ts.factory.updateSourceFile(t,s)}async function CT(e,t){let r=[],n=Ve(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await xl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function xl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};ai(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(be(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isCallExpression(u)&&(e.ts.isIdentifier(u.expression)&&u.expression.text)==="dynamic"){let h=u.arguments;if(h.length===0)return null;let m=h[0];if(!e.ts.isArrowFunction(m))return null;let g=m.body;if(e.ts.isCallExpression(g)){if(g.expression.kind!==e.ts.SyntaxKind.ImportKeyword||g.arguments.length!==1)return null;let D=g.arguments[0];if(!e.ts.isStringLiteral(D))return null;let S=D.text,w=await fi(e,S);n.filePath=w,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(w)?n.importPath=Pe(e,n.filePath):(n.externalImportPath=S,n.importPath=n.externalImportPath),n.name=Wt(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(g)){let y=g.expression;if(!e.ts.isParenthesizedExpression(y))return null;let D=y.expression;if(!e.ts.isAwaitExpression(D))return null;let S=D.expression;if(!e.ts.isCallExpression(S)||S.expression.kind!==e.ts.SyntaxKind.ImportKeyword||S.arguments.length!==1)return null;let F=S.arguments[0];if(!e.ts.isStringLiteral(F)||!e.ts.isIdentifier(g.name))return null;let A=F.text,_=await fi(e,A);n.filePath=_,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(_)?n.importPath=Pe(e,n.filePath):(n.externalImportPath=A,n.importPath=n.externalImportPath),n.name=Ee(g.name.text),n.importName=g.name.text,n.exportName=g.name.text,n.exportType="named"}else return null;return n=wt(e,n,r),n.displayFilePath=Ce(e,n.filePath),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Ee(a)),n.importName=a;let c=await $r(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Pe(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.importPath=Pe(e,c.filePath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(p=>e.ts.isImportDeclaration(p)),d=l.find(p=>p.importClause&&p.importClause.name?.text===a);if(d){let p=d.moduleSpecifier;if(!e.ts.isStringLiteral(p))return null;n.exportName="default"}else{let p=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(g=>g.name.text===a));if(!p)return null;let h=p.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var jh=v(()=>{"use strict";We();Oe();St();me();kr();ht();ms()});function Br(e,t){let r=[...t.statements],n=!1;for(let o=t.statements.length-1;o>=0;o--){let s=t.statements[o];if(e.ts.isImportDeclaration(s)&&s.importClause){let i=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let u=[...a.elements];for(let c=u.length-1;c>=0;c--){let l=u[c];if(e.ts.isImportSpecifier(l)){let d=l.name;if(d&&e.ts.isIdentifier(d)){let p=d.text;Uh(e,t,p)||u.splice(c,1)}}}if(u.length===0)i=!0;else if(a.elements.length!==u.length){let c=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(u)),l=e.ts.factory.updateImportDeclaration(s,void 0,c,s.moduleSpecifier,void 0);r[o]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let u=s.importClause.name.text;Uh(e,t,u)||(i=!0)}i&&(r.splice(o,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function Uh(e,t,r){let n=!1;function o(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,o)}}return e.ts.forEachChild(t,o),n}var mi=v(()=>{"use strict"});function Mr(e,t,r,n,o,s,i){let a=null,u=null,c=null,l=-1;t=Bt(t),r=Bt(r);let d=t.find(h=>h.id===e),p=r.find(h=>h.id===e);if(n)p||(a={...Bt(d),inputs:Bt(d.inputs).map(h=>(h.isRegistered=!0,h))},l=r.length,r.push(a));else if(typeof p?.nodeIndex=="number"&&p.nodeIndex>-1){if(o)l=p.nodeIndex,u=Bt(p),r=r.filter(h=>h.id!==e);else if(s!=null)bT(p,s),l=p.nodeIndex,c=p;else if(i!=null){let h=p.inputs.find(m=>m.name===i.name);h&&(i.registerInput===!1?h.isRegistered=!1:(xT(h,i),h.isRegistered=!0),c=p,l=p.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:u,updateRegisteredCmp:c,nodeIndex:l,components:vr(t,r)}}function vr(e,t){let r=bt([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(o=>o.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(gl),n.inputs.sort((i,a)=>i.name.toLowerCase().localeCompare(a.name.toLowerCase()));let o=t.find(i=>i.id===n.id);o&&(o.acceptsChildren=ml(n));let s=e.find(i=>i.id===n.id&&i.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function bT(e,t){ft(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),ft(t.description)?e.description=t.description:t.description===null&&delete e.description,ft(t.image)?e.image=t.image:t.image===null&&delete e.image}function xT(e,t){ft(t.type)&&(e.type=t.type),ft(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,ft(t.defaultValue)||ss(t.defaultValue)||Xo(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,ft(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}var gi=v(()=>{"use strict";me();ht()});async function In(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".jsx"||u===".ts"||u===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await He(e,[...t])}var vs=v(()=>{"use strict";Jt()});function Lr(e,t,r){return ci(e,t,r.variableName)?t:wT(e,t,r)}function wT(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,o=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,o),i=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),u=e.ts.factory.createVariableStatement([a],i),c=[...t.statements,u];return e.ts.factory.updateSourceFile(t,c)}var hi=v(()=>{"use strict";St()});async function jr(e,t,r,n,o,s,i,a){let u=await In(e),[c,l,d,p]=await Promise.all([Ih(e,u),Mh(e),mt(e),fs(e)]),h=c.map(w=>w.cmpInfo),m=l.components,g={components:vr(h,m),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(h),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await di(e,g.components),g;let y=!1,D=l.sourceFile,S=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(S.length>0){let w=S.map(_=>{let k=c.find(O=>O.cmpInfo.id===_);if(!k)throw new Error(`Component ${_} not found`);return k}),F=Array.from(new Set(w.map(_=>_.cmpInfo.filePath))),A=await He(e,F);for(let _ of w){let k=g.components.find(C=>C.id===_.cmpInfo.id),O=await pi(e,_,A,e.registryPath===_.cmpInfo.filePath||Kt(_.cmpInfo.filePath));jt(k,O);let $=h.findIndex(C=>C.id===_.cmpInfo.id);h[$].inputs=O;let R=Mr(_.cmpInfo.id,h,m,r,n,o,s);if(e.sdkVersion===q.gen2){let{elements:C,elmIndex:U,statementIndex:H,statement:K,variableDeclaration:x}=await PT(e,D,_);if(R.addCmpToRegistry)C.push(ET(e,R.addCmpToRegistry)),y=!0;else if(R.removeCmpFromRegistry)C.splice(U,1),y=!0;else if(R.updateRegisteredCmp){let P=qe(e,C[U],R.updateRegisteredCmp);C[U]=e.ts.factory.updateObjectLiteralExpression(P,[Gh(e,R.updateRegisteredCmp),...P.properties.slice(1)]),y=!0}if(y&&i){let P=[...D.statements];P[H]=e.ts.factory.updateVariableStatement(K,K.modifiers,e.ts.factory.updateVariableDeclarationList(K.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Or(e,C)))])),D=e.ts.factory.updateSourceFile(D,P),D=Vh(e,R,D),D=ge(e,D,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),D=Lr(e,D,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=R.components,m=R.components.filter($e=>$e.isRegistered)}}else{let C=[...D.statements];R.addCmpToRegistry?(C.push(xh(e,R.addCmpToRegistry)),y=!0):R.removeCmpFromRegistry?(C.splice(R.nodeIndex,1),y=!0):R.updateRegisteredCmp&&(C[R.nodeIndex]=hl(e,C[R.nodeIndex],R.updateRegisteredCmp),y=!0),y&&i&&(D=e.ts.factory.updateSourceFile(D,C),D=ge(e,D,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),D=Lh(e,D,d),D=Vh(e,R,D),k?.acceptsChildren&&(D=ge(e,D,{namedImports:["withChildren"],importPath:"@builder.io/react"})),g.components=R.components,m=R.components.filter(U=>U.isRegistered))}}}if(y&&i){D=Br(e,D),D=Nr(e,D),e.appDir&&(D=Bh(e,D));let w=Ke(e,D);w=Dr(w),e.appDir&&(w=Oh(w)),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return g}function Gh(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",AT(e,t))}function ST(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function ET(e,t){return qe(e,e.ts.factory.createObjectLiteralExpression([Gh(e,t),...t.acceptsChildren?[ST(e)]:[]],!0),t)}async function PT(e,t,r){let n=Ve(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await xl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function Vh(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:de(e,e.registryPath,n.filePath);n.exportType==="default"?r=ge(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ge(e,r,{namedImports:[n.importName],importPath:o}))}}else r=ge(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function AT(e,t){let r=t.externalImportPath?t.externalImportPath:de(e,e.registryPath,t.filePath),n=t.exportName!=="default",o;n?o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):o=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),o);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}var wl=v(()=>{"use strict";We();wh();Jt();yr();Oe();kh();me();po();jh();Rn();mi();gi();ht();vs();Fn();ms();St();hi();gt()});async function qh(e){let t=[],r=await IT(e,t);return await Yh(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await FT(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await _T(e,e.pagesDir,t)),t}async function zh(e){let t=[];return await Yh(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await TT(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await RT(e,e.pagesDir,t)),t}async function TT(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"figma-imports",n);if(!await e.exists(o)){let s=await e.formatCode(o,Wh({sys:e,routePath:o,modelName:"figma-imports"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Kh(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function FT(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"[...page]",n);if(!await e.exists(o)){let s=await e.formatCode(o,Wh({sys:e,routePath:o,modelName:"page"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Kh(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function Kh(e){let t=e.typescriptEnabled;return e.sdkVersion===q.gen2?`
|
|
282
|
+
`}function vl(e,t){return t.sort((r,n)=>{let o=$h(e,r),s=$h(e,n);return o.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())})}function $h(e,t){let r=t.importClause;if(r){let n=r.namedBindings;if(n&&e.ts.isNamedImports(n)&&n.elements.length>0)return n.elements[0].name.text;if(r.name)return r.name.text}return t.moduleSpecifier&&e.ts.isStringLiteral(t.moduleSpecifier)?t.moduleSpecifier.text:""}function Oh(e){return typeof e=="string"&&!e.includes("'use client'")&&!e.includes(`"use client"'`)&&(e=`"use client"
|
|
283
|
+
${e}`),e}function Bh(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function Or(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let o=Nh(e,r),s=Nh(e,n);return o.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function Nh(e,t){let r=t.properties.find(n=>be(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}var po=v(()=>{"use strict";kr()});async function Mh(e){let t=await e.readFile(e.registryPath);return t?CT(e,t):{components:[],sourceFile:le(e,"")}}async function CT(e,t){let r=le(e,t);return e.sdkVersion===z.gen2?xT(e,r):bT(e,r)}async function bT(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let d=c[0];if(e.ts.isCallExpression(d)){let p=e.ts.isIdentifier(d.expression)&&d.expression.text;if(p==="withChildren"){let g=xl(e,d.arguments[0]);if(e.ts.isCallExpression(g)){let m=await Cl(e,n,g,l,!0);m&&r.push(m)}else{let m=g;if(e.ts.isIdentifier(m)){let y=await bl(e,t,n,m,l,!0);y&&r.push(y)}}continue}if(p==="dynamic"){let g=await Cl(e,n,d,l,!1);g&&r.push(g);continue}let h=xl(e,d.arguments[0]);if(e.ts.isCallExpression(h)&&e.ts.isIdentifier(h.expression)&&h.expression.text==="dynamic"){let g=await Cl(e,n,h,l,!1);g&&r.push(g);continue}if(e.ts.isIdentifier(h)){let g=await bl(e,t,n,h,l,!1);g&&r.push(g);continue}continue}if(e.ts.isIdentifier(d)){let p=await bl(e,t,n,d,l,!1);p&&r.push(p);continue}}return{sourceFile:t,components:bt(r)}}function xl(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:xl(e,t.arguments[0]):t}async function Cl(e,t,r,n,o){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:o,framework:"react"},i=r.arguments;if(i.length===0)return null;let a=i[0];if(!e.ts.isArrowFunction(a))return null;let u=a.body;if(e.ts.isCallExpression(u)){if(u.expression.kind!==e.ts.SyntaxKind.ImportKeyword||u.arguments.length!==1)return null;let l=u.arguments[0];if(!e.ts.isStringLiteral(l))return null;let d=l.text,p=await fi(e,d);s.filePath=p,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(p)?s.importPath=Pe(e,s.filePath):(s.externalImportPath=d,s.importPath=s.externalImportPath),s.name=Wt(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(u)){let c=u.expression;if(!e.ts.isParenthesizedExpression(c))return null;let l=c.expression;if(!e.ts.isAwaitExpression(l))return null;let d=l.expression;if(!e.ts.isCallExpression(d)||d.expression.kind!==e.ts.SyntaxKind.ImportKeyword||d.arguments.length!==1)return null;let h=d.arguments[0];if(!e.ts.isStringLiteral(h)||!e.ts.isIdentifier(u.name))return null;let g=h.text,m=await fi(e,g);s.filePath=m,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(m)?s.importPath=Pe(e,s.filePath):(s.externalImportPath=g,s.importPath=s.externalImportPath),s.name=Ee(u.name.text),s.importName=u.name.text,s.exportName=u.name.text,s.exportType="named"}else return null;return s=wt(e,s,n),s.displayFilePath=Ce(e,s.filePath),s.filePath&&s.exportName&&(s.id=await we(e,s.filePath,s.exportName,s.externalImportPath)),s}async function bl(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;let l=await fi(e,c.text);i.filePath=l,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(l)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=c.text,i.importPath=i.externalImportPath),i.name=Wt(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(p=>!p.importClause||!p.importClause.namedBindings||!e.ts.isNamedImports(p.importClause.namedBindings)?!1:p.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let d=await fi(e,l.text);i.filePath=d,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(d)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Ee(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=wt(e,i,o),i.displayFilePath=Ce(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function fi(e,t){return vs(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function Lh(e,t,r){let n=!1,o=0,s=[...t.statements];for(let c=0;c<s.length;c++){let l=s[c];if(e.ts.isImportDeclaration(l)){o=c;continue}if(!e.ts.isExpressionStatement(l))continue;let d=l.expression;if(!e.ts.isCallExpression(d))continue;let p=d.expression;if(!e.ts.isPropertyAccessExpression(p))continue;let h=p.expression;if(!e.ts.isIdentifier(h)||h.text!=="builder")continue;if(p.name.text=="init"){n=!0;break}else continue}if(n)return t;let i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier(Ir)),a=r?e.ts.factory.createNonNullExpression(i):i,u=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(o+1,0,u),e.ts.factory.updateSourceFile(t,s)}async function xT(e,t){let r=[],n=Ve(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await wl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function wl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};ai(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(be(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isCallExpression(u)&&(e.ts.isIdentifier(u.expression)&&u.expression.text)==="dynamic"){let h=u.arguments;if(h.length===0)return null;let g=h[0];if(!e.ts.isArrowFunction(g))return null;let m=g.body;if(e.ts.isCallExpression(m)){if(m.expression.kind!==e.ts.SyntaxKind.ImportKeyword||m.arguments.length!==1)return null;let D=m.arguments[0];if(!e.ts.isStringLiteral(D))return null;let w=D.text,S=await fi(e,w);n.filePath=S,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(S)?n.importPath=Pe(e,n.filePath):(n.externalImportPath=w,n.importPath=n.externalImportPath),n.name=Wt(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(m)){let y=m.expression;if(!e.ts.isParenthesizedExpression(y))return null;let D=y.expression;if(!e.ts.isAwaitExpression(D))return null;let w=D.expression;if(!e.ts.isCallExpression(w)||w.expression.kind!==e.ts.SyntaxKind.ImportKeyword||w.arguments.length!==1)return null;let F=w.arguments[0];if(!e.ts.isStringLiteral(F)||!e.ts.isIdentifier(m.name))return null;let A=F.text,_=await fi(e,A);n.filePath=_,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(_)?n.importPath=Pe(e,n.filePath):(n.externalImportPath=A,n.importPath=n.externalImportPath),n.name=Ee(m.name.text),n.importName=m.name.text,n.exportName=m.name.text,n.exportType="named"}else return null;return n=wt(e,n,r),n.displayFilePath=Ce(e,n.filePath),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Ee(a)),n.importName=a;let c=await $r(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Pe(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.importPath=Pe(e,c.filePath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(p=>e.ts.isImportDeclaration(p)),d=l.find(p=>p.importClause&&p.importClause.name?.text===a);if(d){let p=d.moduleSpecifier;if(!e.ts.isStringLiteral(p))return null;n.exportName="default"}else{let p=l.find(g=>!g.importClause||!g.importClause.namedBindings||!e.ts.isNamedImports(g.importClause.namedBindings)?!1:g.importClause.namedBindings.elements.some(m=>m.name.text===a));if(!p)return null;let h=p.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var jh=v(()=>{"use strict";We();Oe();St();me();kr();ht();gs()});function Br(e,t){let r=[...t.statements],n=!1;for(let o=t.statements.length-1;o>=0;o--){let s=t.statements[o];if(e.ts.isImportDeclaration(s)&&s.importClause){let i=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let u=[...a.elements];for(let c=u.length-1;c>=0;c--){let l=u[c];if(e.ts.isImportSpecifier(l)){let d=l.name;if(d&&e.ts.isIdentifier(d)){let p=d.text;Uh(e,t,p)||u.splice(c,1)}}}if(u.length===0)i=!0;else if(a.elements.length!==u.length){let c=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(u)),l=e.ts.factory.updateImportDeclaration(s,void 0,c,s.moduleSpecifier,void 0);r[o]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let u=s.importClause.name.text;Uh(e,t,u)||(i=!0)}i&&(r.splice(o,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function Uh(e,t,r){let n=!1;function o(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,o)}}return e.ts.forEachChild(t,o),n}var mi=v(()=>{"use strict"});function Mr(e,t,r,n,o,s,i){let a=null,u=null,c=null,l=-1;t=Bt(t),r=Bt(r);let d=t.find(h=>h.id===e),p=r.find(h=>h.id===e);if(n)p||(a={...Bt(d),inputs:Bt(d.inputs).map(h=>(h.isRegistered=!0,h))},l=r.length,r.push(a));else if(typeof p?.nodeIndex=="number"&&p.nodeIndex>-1){if(o)l=p.nodeIndex,u=Bt(p),r=r.filter(h=>h.id!==e);else if(s!=null)wT(p,s),l=p.nodeIndex,c=p;else if(i!=null){let h=p.inputs.find(g=>g.name===i.name);h&&(i.registerInput===!1?h.isRegistered=!1:(ST(h,i),h.isRegistered=!0),c=p,l=p.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:u,updateRegisteredCmp:c,nodeIndex:l,components:vr(t,r)}}function vr(e,t){let r=bt([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(o=>o.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(hl),n.inputs.sort((i,a)=>i.name.toLowerCase().localeCompare(a.name.toLowerCase()));let o=t.find(i=>i.id===n.id);o&&(o.acceptsChildren=gl(n));let s=e.find(i=>i.id===n.id&&i.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function wT(e,t){ft(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),ft(t.description)?e.description=t.description:t.description===null&&delete e.description,ft(t.image)?e.image=t.image:t.image===null&&delete e.image}function ST(e,t){ft(t.type)&&(e.type=t.type),ft(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,ft(t.defaultValue)||as(t.defaultValue)||Xo(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,ft(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}var gi=v(()=>{"use strict";me();ht()});async function In(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".jsx"||u===".ts"||u===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await Ge(e,[...t])}var Cs=v(()=>{"use strict";Jt()});function Lr(e,t,r){return ci(e,t,r.variableName)?t:ET(e,t,r)}function ET(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,o=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,o),i=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),u=e.ts.factory.createVariableStatement([a],i),c=[...t.statements,u];return e.ts.factory.updateSourceFile(t,c)}var hi=v(()=>{"use strict";St()});async function jr(e,t,r,n,o,s,i,a){let u=await In(e),[c,l,d,p]=await Promise.all([Ih(e,u),Mh(e),mt(e),ms(e)]),h=c.map(S=>S.cmpInfo),g=l.components,m={components:vr(h,g),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(h),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await di(e,m.components),m;let y=!1,D=l.sourceFile,w=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(w.length>0){let S=w.map(_=>{let k=c.find(O=>O.cmpInfo.id===_);if(!k)throw new Error(`Component ${_} not found`);return k}),F=Array.from(new Set(S.map(_=>_.cmpInfo.filePath))),A=await Ge(e,F);for(let _ of S){let k=m.components.find(C=>C.id===_.cmpInfo.id),O=await pi(e,_,A,e.registryPath===_.cmpInfo.filePath||Kt(_.cmpInfo.filePath));jt(k,O);let $=h.findIndex(C=>C.id===_.cmpInfo.id);h[$].inputs=O;let R=Mr(_.cmpInfo.id,h,g,r,n,o,s);if(e.sdkVersion===z.gen2){let{elements:C,elmIndex:U,statementIndex:G,statement:K,variableDeclaration:x}=await TT(e,D,_);if(R.addCmpToRegistry)C.push(AT(e,R.addCmpToRegistry)),y=!0;else if(R.removeCmpFromRegistry)C.splice(U,1),y=!0;else if(R.updateRegisteredCmp){let P=ze(e,C[U],R.updateRegisteredCmp);C[U]=e.ts.factory.updateObjectLiteralExpression(P,[Hh(e,R.updateRegisteredCmp),...P.properties.slice(1)]),y=!0}if(y&&i){let P=[...D.statements];P[G]=e.ts.factory.updateVariableStatement(K,K.modifiers,e.ts.factory.updateVariableDeclarationList(K.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Or(e,C)))])),D=e.ts.factory.updateSourceFile(D,P),D=Vh(e,R,D),D=ge(e,D,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),D=Lr(e,D,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=R.components,g=R.components.filter($e=>$e.isRegistered)}}else{let C=[...D.statements];R.addCmpToRegistry?(C.push(xh(e,R.addCmpToRegistry)),y=!0):R.removeCmpFromRegistry?(C.splice(R.nodeIndex,1),y=!0):R.updateRegisteredCmp&&(C[R.nodeIndex]=yl(e,C[R.nodeIndex],R.updateRegisteredCmp),y=!0),y&&i&&(D=e.ts.factory.updateSourceFile(D,C),D=ge(e,D,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),D=Lh(e,D,d),D=Vh(e,R,D),k?.acceptsChildren&&(D=ge(e,D,{namedImports:["withChildren"],importPath:"@builder.io/react"})),m.components=R.components,g=R.components.filter(U=>U.isRegistered))}}}if(y&&i){D=Br(e,D),D=Nr(e,D),e.appDir&&(D=Bh(e,D));let S=Ke(e,D);S=Dr(S),e.appDir&&(S=Oh(S)),S=await e.formatCode(e.registryPath,S),await e.writeFile(e.registryPath,S)}return m}function Hh(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",FT(e,t))}function PT(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function AT(e,t){return ze(e,e.ts.factory.createObjectLiteralExpression([Hh(e,t),...t.acceptsChildren?[PT(e)]:[]],!0),t)}async function TT(e,t,r){let n=Ve(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await wl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function Vh(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:de(e,e.registryPath,n.filePath);n.exportType==="default"?r=ge(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ge(e,r,{namedImports:[n.importName],importPath:o}))}}else r=ge(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function FT(e,t){let r=t.externalImportPath?t.externalImportPath:de(e,e.registryPath,t.filePath),n=t.exportName!=="default",o;n?o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):o=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),o);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}var Sl=v(()=>{"use strict";We();wh();Jt();yr();Oe();kh();me();po();jh();Rn();mi();gi();ht();Cs();Fn();gs();St();hi();gt()});async function zh(e){let t=[],r=await $T(e,t);return await Yh(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await RT(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await IT(e,e.pagesDir,t)),t}async function qh(e){let t=[];return await Yh(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await _T(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await kT(e,e.pagesDir,t)),t}async function _T(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"figma-imports",n);if(!await e.exists(o)){let s=await e.formatCode(o,Wh({sys:e,routePath:o,modelName:"figma-imports"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Kh(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function RT(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"[...page]",n);if(!await e.exists(o)){let s=await e.formatCode(o,Wh({sys:e,routePath:o,modelName:"page"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Kh(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function Kh(e){let t=e.typescriptEnabled;return e.sdkVersion===z.gen2?`
|
|
284
284
|
"use client";
|
|
285
285
|
import { ${t?"BuilderContent, ":""} isPreviewing, Content } from "@builder.io/sdk-react";
|
|
286
286
|
import DefaultErrorPage from "next/error";
|
|
@@ -339,7 +339,7 @@ export function RenderBuilderContent({ content, model }${t?": BuilderPageProps":
|
|
|
339
339
|
// DefaultErrorPage with a 404.
|
|
340
340
|
return <DefaultErrorPage statusCode={404} />;
|
|
341
341
|
}
|
|
342
|
-
`.trimStart()}function
|
|
342
|
+
`.trimStart()}function Gh(e){return e.features.asyncParams?`
|
|
343
343
|
interface PageProps {
|
|
344
344
|
params: Promise<{
|
|
345
345
|
page: string[];
|
|
@@ -349,14 +349,14 @@ interface PageProps {
|
|
|
349
349
|
params: {
|
|
350
350
|
page: string[];
|
|
351
351
|
};
|
|
352
|
-
}`}function Wh({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,o=de(e,t,e.builderComponentPath);return e.sdkVersion===
|
|
352
|
+
}`}function Wh({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,o=de(e,t,e.builderComponentPath);return e.sdkVersion===z.gen2?`
|
|
353
353
|
import { fetchOneEntry } from "@builder.io/sdk-react";
|
|
354
354
|
import { RenderBuilderContent } from ${JSON.stringify(o)};
|
|
355
355
|
|
|
356
356
|
// Builder Public API Key set in .env file
|
|
357
357
|
const PUBLIC_API_KEY = process.env.${Ir}${n?"!":""};
|
|
358
358
|
|
|
359
|
-
${n?
|
|
359
|
+
${n?Gh(e):""}
|
|
360
360
|
|
|
361
361
|
export default async function Page(props${n?": PageProps":""}) {
|
|
362
362
|
const builderModelName = "${r}";
|
|
@@ -384,7 +384,7 @@ import { RenderBuilderContent } from ${JSON.stringify(o)};
|
|
|
384
384
|
|
|
385
385
|
// Builder Public API Key set in .env file
|
|
386
386
|
builder.init(process.env.${Ir}${n?"!":""});
|
|
387
|
-
${n?
|
|
387
|
+
${n?Gh(e):""}
|
|
388
388
|
|
|
389
389
|
export default async function Page(props${n?": PageProps":""}) {
|
|
390
390
|
const builderModelName = "${r}";
|
|
@@ -407,7 +407,7 @@ export default async function Page(props${n?": PageProps":""}) {
|
|
|
407
407
|
</>
|
|
408
408
|
);
|
|
409
409
|
}
|
|
410
|
-
`.trimStart()}async function
|
|
410
|
+
`.trimStart()}async function IT(e,t,r){let n=`[...page].${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,n);if(!await e.exists(o)){let s=await e.formatCode(o,Jh({sys:e,routePath:o,modelName:"page"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}}async function kT(e,t,r){let n=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,n);if(!await e.exists(o)){let s=await e.formatCode(o,Jh({sys:e,routePath:o,modelName:"figma-imports"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}}function Jh({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled;return e.sdkVersion===z.gen2?`
|
|
411
411
|
import React from "react";
|
|
412
412
|
import { useRouter } from "next/router";
|
|
413
413
|
${n?'import type { BuilderContent } from "@builder.io/sdk-react";':""}
|
|
@@ -571,7 +571,7 @@ export default function Page({ page }${n?": { page: BuilderContent | null }":""}
|
|
|
571
571
|
</>
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
|
-
`.trimStart()}async function
|
|
574
|
+
`.trimStart()}async function $T(e,t){let n=e.typescriptEnabled?"tsx":"jsx",o=e.join(e.componentsDir,"Counter"),s=e.join(o,`Counter.${n}`),i=e.join(o,"styles.module.css"),{component:a,styles:u}=NT(e);if(!await e.exists(s)){let c=await e.formatCode(s,a);await e.writeFile(s,c),t.push({filePath:s,modifiedType:"create"})}return await e.exists(i)||(await e.writeFile(i,u),t.push({filePath:i,modifiedType:"create"})),s}function NT(e){let t=e.typescriptEnabled,r=`
|
|
575
575
|
"use client"
|
|
576
576
|
import React, { useState } from "react";
|
|
577
577
|
import styles from "./styles.module.css";
|
|
@@ -634,18 +634,18 @@ export default Counter;
|
|
|
634
634
|
font-size: 42px;
|
|
635
635
|
text-align: center;
|
|
636
636
|
}
|
|
637
|
-
`.trimStart();return{component:r,styles:n}}async function Yh(e,t,r){if(!await e.exists(e.registryPath)){if(e.sdkVersion===
|
|
637
|
+
`.trimStart();return{component:r,styles:n}}async function Yh(e,t,r){if(!await e.exists(e.registryPath)){if(e.sdkVersion===z.gen2){let s=OT(e);await e.writeFile(e.registryPath,s)}else await e.writeFile(e.registryPath,"");t.push({filePath:e.registryPath,modifiedType:"create"})}if(!r)return;let o=(await jr(e,null,!1,!1,null,null,!1,!1)).components.find(s=>s.filePath===r);o&&await jr(e,o.id,!0,!1,null,null,!0,!1)}function OT(e){return e.typescriptEnabled?`import type { RegisteredComponent } from "@builder.io/sdk-react";
|
|
638
638
|
|
|
639
639
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
640
640
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
641
641
|
];
|
|
642
|
-
`}var Qh=v(()=>{"use strict";We();me();
|
|
642
|
+
`}var Qh=v(()=>{"use strict";We();me();gs();Sl()});async function yi(e){let t=await An(e,e.getRepoRootDir());if(t&&typeof t=="object"){let r=new Set(Object.keys({...t.dependencies,...t.devDependencies}));if(r.has("@builder.io/sdk-react"))return z.gen2;if(r.has("@builder.io/react"))return z.gen1}return null}var Xa=v(()=>{"use strict";We();gt()});async function Zh(e){let t=await BT(e);return{builderPageOptions:async()=>({templateContentId:"3de2f13211234071a4b19a17b4fbc5a7",pathname:"/builder-demo",title:"Builder + Next.js Demo Page"}),ensureBuilderSetup:()=>zh(t),ensureFigmaImportPage:()=>qh(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>jr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await jr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>jr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>jr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>jr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>jr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>ms(t),setPublicApiKey:n=>hh(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===z.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Qt(t),setCache:n=>Zt(t,n)}}async function BT(e){let t=e.getAppRootDir(),r=e.join(t,"src"),n=await MT(e),o=await mt(e),s=e.getFrameworks().find(c=>c.name==="next"),i={asyncParams:s?.version?.major!==void 0&&s.version.major>=15},a={},u={...e,addExternalPackage:c=>{a[e.join(t,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>a[c]??e.readFileSync(c),existsSync:c=>!!a[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===t?[...l,...Object.keys(a).map(d=>d.slice(t.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===t?[...l,...Object.keys(a).map(d=>d.slice(t.length+1))]:l},appDir:null,pagesDir:null,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",nextConfigPath:n,typescriptEnabled:o,features:i};if(e.sdkVersion?u.sdkVersion=e.sdkVersion:u.sdkVersion=await yi(u),await e.exists(r)){u.srcDir=r,u.componentsDir=e.join(r,"components");let c=e.join(r,"app");await e.exists(c)&&(u.appDir=c);let l=e.join(r,"pages");await e.exists(l)&&(u.pagesDir=l),u.registryPath=await xt(e,r)}else u.componentsDir=e.join(t,"components"),u.registryPath=await xt(e,t);if(u.builderComponentPath=e.join(u.componentsDir,`builder.${o?"tsx":"jsx"}`),!u.appDir){let c=e.join(t,"app");await e.exists(c)&&(u.appDir=c)}if(!u.pagesDir){let c=e.join(t,"pages");await e.exists(c)&&(u.pagesDir=c)}if(!u.appDir&&!u.pagesDir&&!e.ignoreMissingConfig)throw new Error(`Could not find Next.js "app" or "pages" directory. Searched in "${t}".`);return u}async function MT(e){let t=e.join(e.getAppRootDir(),"next.config.ts");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"next.config.mjs");if(await e.exists(r))return r;let n=e.join(e.getAppRootDir(),"next.config.js");if(await e.exists(n))return n;throw new Error(`Could not find Next.js config file. Searched for "next.config.ts", "next.config.mjs" and "next.config.js" in "${e.getAppRootDir()}".`)}var Xh=v(()=>{"use strict";ao();gs();Sl();Qh();We();Xa();gt()});async function bs(e){return await _r(e,[".env"],ty)}async function ey(e,t){LT(t);let r=await bs(e),n=await Rr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}function LT(e){typeof process<"u"&&(process.env[ty]=e)}var ty,El=v(()=>{"use strict";uo();ty="PUBLIC_BUILDER_API_KEY"});function ry(e,t,r){if(r.length===0)return e;let n=e.split(`
|
|
643
643
|
`),o=n.findIndex(a=>a.includes(r));if(o===-1||n.some(a=>a.includes(t[0])))return e;let i=["/**",...t.map(a=>` * ${a.trim()}`)," */"];return n.splice(o,0,...i),n.join(`
|
|
644
|
-
`)}var ny=v(()=>{"use strict"});async function iy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(i.startsWith(".")||
|
|
644
|
+
`)}var ny=v(()=>{"use strict"});async function iy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(i.startsWith(".")||VT.has(i))return;let a=e.normalize(s.fileName);if(a===e.registryPath)return;let u=await eu(e,o,a,s);r.push(...u)})),r}async function sy(e,t){if(e.extname(t).toLowerCase()===".tsx"){let n=await e.readFile(t);if(n)return jT(e,t,n)}return null}function jT(e,t,r){let n=le(e,r);return eu(e,null,t,n)}async function eu(e,t,r,n){r=e.normalize(r);let o=[],s=lo(e,n);return await Promise.all(s.map(async i=>{let a=await UT(e,t,r,i);a&&o.push(a)})),o}async function UT(e,t,r,n){let o=e.relative(e.getAppRootDir(),r),s=Pe(e,r);if(e.ts.isVariableStatement(n.node))for(let i of n.node.declarationList.declarations){let a=oy(e,i.initializer);if(a&&e.ts.isIdentifier(i.name)){let u=i.name.text;return{cmpInfo:{id:await we(e,r,u),displayFilePath:Ce(e,r),name:Ee(u),inputs:[],exportName:n.isDefaultExport?"default":u,exportType:n.isDefaultExport?"default":"named",importName:u,filePath:r,relFilePath:o,importPath:s,framework:"qwik"},node:a}}}else if(e.ts.isCallExpression(n.node)){let i=oy(e,n.node);if(i)return{cmpInfo:{id:await we(e,r,"default"),displayFilePath:Ce(e,r),name:Wt(e,r),inputs:[],exportName:"default",exportType:"default",importName:no(e,r),filePath:r,relFilePath:o,importPath:s,framework:"qwik"},node:i}}return null}function oy(e,t){if(t&&e.ts.isCallExpression(t)&&e.ts.isIdentifier(t.expression)&&t.expression.text==="component$"&&t.arguments.length>0){let r=t.arguments[0];if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))return{callExpression:t,fnNode:r}}return null}var VT,tu=v(()=>{"use strict";Oe();me();ui();VT=new Set(["node_modules","layout.tsx","404.tsx","router-head.tsx"])});async function ay(e,t){let r=t.node.fnNode;if((e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))&&r.parameters.length>0){let{sourceFile:o,typeChecker:s}=await ti(e,t.cmpInfo.filePath,null);if(!(await eu(e,s,t.cmpInfo.filePath,o)).find(u=>u.cmpInfo.id===t.cmpInfo.id))throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return co(e,s,r)}return[]}var uy=v(()=>{"use strict";tu();Jt();Ds()});async function cy(e){return Pl(e)}async function Pl(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,HT),t.push({filePath:e.registryPath,modifiedType:"create"})),t}var HT,Al=v(()=>{"use strict";HT=`import type { RegisteredComponent } from "@builder.io/sdk-qwik";
|
|
645
645
|
|
|
646
646
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
647
647
|
];
|
|
648
|
-
`});async function ly(e){await El(e);let t=await e.readFile(e.registryPath);return t?VT(e,t):{components:[],sourceFile:le(e,"")}}async function VT(e,t){let r=le(e,t);return GT(e,r)}async function GT(e,t){let r=[],n=Ve(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Al(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Al(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"qwik"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"&&e.ts.isIdentifier(o.initializer)){let i=o.initializer.text;n.name===""&&(n.name=Ee(i)),n.importName=i;let a=await $r(e,e.registryPath,t,i);if(!a)continue;n.filePath=a.filePath,n.relFilePath=a.relFilePath,n.importPath=Pe(e,a.filePath),n.displayFilePath=a.displayFilePath,n.exportType=a.exportType;let u=await sy(e,a.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let c=u.find(l=>l.cmpInfo.exportName===i);c&&(n.exportName=c.cmpInfo.exportName)}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName)),n}var Tl=v(()=>{"use strict";Oe();St();me();eu();kr();ht();Pl()});async function dy(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".ts"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await He(e,[...t])}var py=v(()=>{"use strict";Jt()});async function fo(e,t,r,n,o,s,i,a){let u=await dy(e),[c,l,d]=await Promise.all([iy(e,u),ly(e),Cs(e)]),p=c.map(g=>g.cmpInfo),h=l.components,m={components:vr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return m;if(t!=null){let g=c.find(R=>R.cmpInfo.id===t);if(!g)throw new Error(`Component ${t} not found`);let y=l.sourceFile,D=m.components.find(R=>R.id===t),S=await ay(e,g);jt(D,S),t=Array.isArray(t)?t[0]:t;let w=Mr(t,p,h,r,n,o,s),{elements:F,elmIndex:A,statementIndex:_,statement:k,variableDeclaration:O}=await qT(e,y,g),$=!1;if(w.addCmpToRegistry?(F.push(HT(e,w.addCmpToRegistry)),$=!0):w.removeCmpFromRegistry?(F.splice(A,1),$=!0):w.updateRegisteredCmp&&(F[A]=qe(e,F[A],w.updateRegisteredCmp),$=!0),$&&i){let R=[...y.statements];R[_]=e.ts.factory.updateVariableStatement(k,k.modifiers,e.ts.factory.updateVariableDeclarationList(k.declarationList,[e.ts.factory.updateVariableDeclaration(O,O.name,O.exclamationToken,O.type,e.ts.factory.createArrayLiteralExpression(Or(e,F)))])),y=e.ts.factory.updateSourceFile(y,R),D.exportType==="named"?y=ge(e,y,{namedImports:[D.importName],importPath:de(e,e.registryPath,D.filePath)}):y=ge(e,y,{defaultImport:D.importName,importPath:de(e,e.registryPath,D.filePath)}),y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-qwik",isTypeOnly:!0}),y=Lr(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),y=Br(e,y),y=Nr(e,y);let C=Ke(e,y);C=Dr(C),C=ry(C,zT,"CUSTOM_COMPONENTS"),C=await e.formatCode(e.registryPath,C),await e.writeFile(e.registryPath,C)}m.components=w.components}return m}function HT(e,t){return qe(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName))],!0),t)}async function qT(e,t,r){let n=Ve(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Al(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var zT,fy=v(()=>{"use strict";ny();yr();hi();St();me();eu();gi();po();uy();Tl();Tl();mi();Oe();ht();py();Fn();Sl();zT=["This array is used to integrate custom components within Builder.","https://www.builder.io/c/docs/custom-components-intro","",'These components will be found the "Custom Components"',"section of Builder's visual editor.",'You can also turn on "components only mode" to limit',"editing to only these components.","https://www.builder.io/c/docs/guides/components-only-mode"]});async function my(e){let t=await KT(e);return{builderPageOptions:async()=>({templateContentId:"dc70f1d979ad416d8fd357137eb9ddfb",pathname:"/",title:"Builder + Qwik Demo Page"}),ensureBuilderSetup:()=>cy(t),ensureFigmaImportPage:async()=>[],getRegistryPath:()=>t.registryPath,getRegistry:n=>fo(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{},loadComponent:async n=>{let o=await fo(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>fo(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>fo(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>fo(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>fo(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Cs(t),setPublicApiKey:n=>ey(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-qwik"}],getDevRunCommand:()=>"dev",getCache:()=>Qt(t),setCache:n=>Zt(t,n)}}async function KT(e){let t=await as(e,e.getAppRootDir(),"components");if(!t)throw new Error(`Could not find components directory within project: ${e.getAppRootDir()}`);let r=await xt(e,t),n=e.join(e.getAppRootDir(),".env");return{...e,componentsDir:t,registryPath:r,envPath:n}}var gy=v(()=>{"use strict";ao();Sl();fy();Pl();gt()});async function bs(e){return await _r(e,[".env"],xs)}async function hy(e,t){let r=await bs(e),n=await Rr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var xs,tu=v(()=>{"use strict";uo();xs="PUBLIC_BUILDER_KEY"});async function yy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker(),s=e.join(e.getAppRootDir(),"build");return await Promise.all(n.map(async i=>{let a=e.basename(i.fileName);if(a.startsWith(".")||a==="node_modules"||ja(e,WT,i.fileName)||JT.has(a)||a.includes("$."))return;let u=e.normalize(i.fileName);if(u===e.remixConfigPath||u===s)return;let c=await _n(e,o,u,i,u===e.registryPath);r.push(...c)})),r}var WT,JT,Dy=v(()=>{"use strict";Rn();me();WT=new Set(["dist","node_modules"]);JT=new Set(["root.tsx","root.ts","root.jsx","root.js","_index.tsx","_index.jsx","_index.ts","_index.js"])});async function vy(e){await ru(e);let t=await e.readFile(e.registryPath);return t?YT(e,t):{components:[],sourceFile:le(e,"")}}async function YT(e,t){let r=le(e,t);return QT(e,r)}async function QT(e,t){let r=[],n=Ve(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Fl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Fl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};e.sdkVersion===q.gen2&&ai(e,r)&&(n.acceptsChildren=!0);for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){(e.ts.isIdentifier(a.expression)&&a.expression.text)==="withChildren"&&(n.acceptsChildren=!0);let l=a.arguments[0];e.ts.isIdentifier(l)&&(i=l.text)}if(!i)continue;n.name===""&&(n.name=Ee(i)),n.importName=i;let u=await $r(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Pe(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Fh(e,u.filePath,e.registryPath===u.filePath||Kt(u.filePath));if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(d=>d.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var Cy=v(()=>{"use strict";We();Oe();St();me();kr();ht();_l();Rn()});async function Ur(e,t,r,n,o,s,i,a){let u=await In(e),[c,l,d]=await Promise.all([yy(e,u),vy(e),bs(e)]),p=c.map(S=>S.cmpInfo),h=l.components,m={components:vr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await di(e,m.components),m;let g=!1,y=l.sourceFile,D=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(D.length>0){let S=D.map(A=>{let _=c.find(k=>k.cmpInfo.id===A);if(!_)throw new Error(`Component ${A} not found`);return _}),w=Array.from(new Set(S.map(A=>A.cmpInfo.filePath))),F=await He(e,w);for(let A of S){let _=m.components.find(x=>x.id===A.cmpInfo.id),k=await pi(e,A,F,e.registryPath===A.cmpInfo.filePath||Kt(A.cmpInfo.filePath));jt(_,k);let O=p.findIndex(x=>x.id===A.cmpInfo.id);p[O].inputs=k;let $=Mr(A.cmpInfo.id,p,h,r,n,o,s),{elements:R,elmIndex:C,statementIndex:U,statement:H,variableDeclaration:K}=await XT(e,y,A);if($.addCmpToRegistry)R.push(ZT(e,$.addCmpToRegistry)),g=!0;else if($.removeCmpFromRegistry)R.splice(C,1),g=!0;else if($.updateRegisteredCmp){let x=qe(e,R[C],$.updateRegisteredCmp);R[C]=e.ts.factory.updateObjectLiteralExpression(x,[by(e,$.updateRegisteredCmp),...x.properties.slice(1)]),g=!0}if(g&&i){let x=[...y.statements];x[U]=e.ts.factory.updateVariableStatement(H,H.modifiers,e.ts.factory.updateVariableDeclarationList(H.declarationList,[e.ts.factory.updateVariableDeclaration(K,K.name,K.exclamationToken,K.type,e.ts.factory.createArrayLiteralExpression(Or(e,R)))])),y=e.ts.factory.updateSourceFile(y,x),_.exportType==="named"?y=ge(e,y,{namedImports:[_.importName],importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}):y=ge(e,y,{defaultImport:_.importName,importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)});let P=e.sdkVersion===q.gen2?"@builder.io/sdk-react":"@builder.io/react";y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:P,isTypeOnly:!0}),_.acceptsChildren&&e.sdkVersion!==q.gen2&&(y=ge(e,y,{namedImports:["withChildren"],importPath:"@builder.io/react"})),y=Lr(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=$.components,h=$.components.filter($e=>$e.isRegistered)}}}if(g&&i){y=Br(e,y),y=Nr(e,y);let S=Ke(e,y);S=Dr(S),S=await e.formatCode(e.registryPath,S),await e.writeFile(e.registryPath,S)}return m}function by(e,t){if(e.sdkVersion===q.gen2)return e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName));let r=e.ts.factory.createIdentifier(t.importName),n=t.acceptsChildren?e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[r]):r;return e.ts.factory.createPropertyAssignment("component",n)}function ZT(e,t){return qe(e,e.ts.factory.createObjectLiteralExpression([by(e,t),...t.acceptsChildren&&e.sdkVersion===q.gen2?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}async function XT(e,t,r){let n=Ve(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Fl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var Rl=v(()=>{"use strict";We();Jt();yr();Oe();Dy();me();po();Cy();mi();gi();ht();Rn();St();hi();vs();Fn();tu()});async function xy(e){let t=[],r=await rF(e,t);return t.push(...await ru(e)),await oF(e,r),await tF(e,t),t}async function wy(e){let t=[];return t.push(...await ru(e)),await eF(e,t),t}async function eF(e,t){let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureFigmaImportRoute, hasLocaleParam"),r=`($locale).${r}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureFigmaImportRoute, hasRoute: ${o}`);let s=await e.formatCode(n,Sy({sys:e,routePath:n,modelName:"figma-imports"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}async function tF(e,t){let r=`$.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureAppRoute, hasLocaleParam"),r=`($locale).${r}`),e.sdkVersion===q.gen2&&(r=`($slug)._index.${e.typescriptEnabled?"tsx":"jsx"}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureAppRoute, hasRoute: ${o}`);let s=await e.formatCode(n,Sy({sys:e,routePath:n,modelName:"page"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}function Sy({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,o=de(e,t,e.registryPath),s="",i="";n&&(s="import type { LoaderArgs } from '@remix-run/server-runtime';",i=": LoaderArgs");let a=`process.env.${xs}`,u="";return e.getFrameworks().some(c=>c.name==="@shopify/remix-oxygen")&&(a=`context.env.${xs}`,u=", context"),n&&(a+="!"),e.sdkVersion===q.gen2?`
|
|
648
|
+
`});async function ly(e){await Pl(e);let t=await e.readFile(e.registryPath);return t?GT(e,t):{components:[],sourceFile:le(e,"")}}async function GT(e,t){let r=le(e,t);return zT(e,r)}async function zT(e,t){let r=[],n=Ve(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Tl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Tl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"qwik"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"&&e.ts.isIdentifier(o.initializer)){let i=o.initializer.text;n.name===""&&(n.name=Ee(i)),n.importName=i;let a=await $r(e,e.registryPath,t,i);if(!a)continue;n.filePath=a.filePath,n.relFilePath=a.relFilePath,n.importPath=Pe(e,a.filePath),n.displayFilePath=a.displayFilePath,n.exportType=a.exportType;let u=await sy(e,a.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let c=u.find(l=>l.cmpInfo.exportName===i);c&&(n.exportName=c.cmpInfo.exportName)}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName)),n}var Fl=v(()=>{"use strict";Oe();St();me();tu();kr();ht();Al()});async function dy(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".ts"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await Ge(e,[...t])}var py=v(()=>{"use strict";Jt()});async function fo(e,t,r,n,o,s,i,a){let u=await dy(e),[c,l,d]=await Promise.all([iy(e,u),ly(e),bs(e)]),p=c.map(m=>m.cmpInfo),h=l.components,g={components:vr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g;if(t!=null){let m=c.find(R=>R.cmpInfo.id===t);if(!m)throw new Error(`Component ${t} not found`);let y=l.sourceFile,D=g.components.find(R=>R.id===t),w=await ay(e,m);jt(D,w),t=Array.isArray(t)?t[0]:t;let S=Mr(t,p,h,r,n,o,s),{elements:F,elmIndex:A,statementIndex:_,statement:k,variableDeclaration:O}=await KT(e,y,m),$=!1;if(S.addCmpToRegistry?(F.push(qT(e,S.addCmpToRegistry)),$=!0):S.removeCmpFromRegistry?(F.splice(A,1),$=!0):S.updateRegisteredCmp&&(F[A]=ze(e,F[A],S.updateRegisteredCmp),$=!0),$&&i){let R=[...y.statements];R[_]=e.ts.factory.updateVariableStatement(k,k.modifiers,e.ts.factory.updateVariableDeclarationList(k.declarationList,[e.ts.factory.updateVariableDeclaration(O,O.name,O.exclamationToken,O.type,e.ts.factory.createArrayLiteralExpression(Or(e,F)))])),y=e.ts.factory.updateSourceFile(y,R),D.exportType==="named"?y=ge(e,y,{namedImports:[D.importName],importPath:de(e,e.registryPath,D.filePath)}):y=ge(e,y,{defaultImport:D.importName,importPath:de(e,e.registryPath,D.filePath)}),y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-qwik",isTypeOnly:!0}),y=Lr(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),y=Br(e,y),y=Nr(e,y);let C=Ke(e,y);C=Dr(C),C=ry(C,WT,"CUSTOM_COMPONENTS"),C=await e.formatCode(e.registryPath,C),await e.writeFile(e.registryPath,C)}g.components=S.components}return g}function qT(e,t){return ze(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName))],!0),t)}async function KT(e,t,r){let n=Ve(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Tl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var WT,fy=v(()=>{"use strict";ny();yr();hi();St();me();tu();gi();po();uy();Fl();Fl();mi();Oe();ht();py();Fn();El();WT=["This array is used to integrate custom components within Builder.","https://www.builder.io/c/docs/custom-components-intro","",'These components will be found the "Custom Components"',"section of Builder's visual editor.",'You can also turn on "components only mode" to limit',"editing to only these components.","https://www.builder.io/c/docs/guides/components-only-mode"]});async function my(e){let t=await JT(e);return{builderPageOptions:async()=>({templateContentId:"dc70f1d979ad416d8fd357137eb9ddfb",pathname:"/",title:"Builder + Qwik Demo Page"}),ensureBuilderSetup:()=>cy(t),ensureFigmaImportPage:async()=>[],getRegistryPath:()=>t.registryPath,getRegistry:n=>fo(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{},loadComponent:async n=>{let o=await fo(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>fo(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>fo(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>fo(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>fo(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>bs(t),setPublicApiKey:n=>ey(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-qwik"}],getDevRunCommand:()=>"dev",getCache:()=>Qt(t),setCache:n=>Zt(t,n)}}async function JT(e){let t=await us(e,e.getAppRootDir(),"components");if(!t)throw new Error(`Could not find components directory within project: ${e.getAppRootDir()}`);let r=await xt(e,t),n=e.join(e.getAppRootDir(),".env");return{...e,componentsDir:t,registryPath:r,envPath:n}}var gy=v(()=>{"use strict";ao();El();fy();Al();gt()});async function xs(e){return await _r(e,[".env"],ws)}async function hy(e,t){let r=await xs(e),n=await Rr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var ws,ru=v(()=>{"use strict";uo();ws="PUBLIC_BUILDER_KEY"});async function yy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker(),s=e.join(e.getAppRootDir(),"build");return await Promise.all(n.map(async i=>{let a=e.basename(i.fileName);if(a.startsWith(".")||a==="node_modules"||Ua(e,YT,i.fileName)||QT.has(a)||a.includes("$."))return;let u=e.normalize(i.fileName);if(u===e.remixConfigPath||u===s)return;let c=await _n(e,o,u,i,u===e.registryPath);r.push(...c)})),r}var YT,QT,Dy=v(()=>{"use strict";Rn();me();YT=new Set(["dist","node_modules"]);QT=new Set(["root.tsx","root.ts","root.jsx","root.js","_index.tsx","_index.jsx","_index.ts","_index.js"])});async function vy(e){await nu(e);let t=await e.readFile(e.registryPath);return t?ZT(e,t):{components:[],sourceFile:le(e,"")}}async function ZT(e,t){let r=le(e,t);return XT(e,r)}async function XT(e,t){let r=[],n=Ve(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await _l(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function _l(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};e.sdkVersion===z.gen2&&ai(e,r)&&(n.acceptsChildren=!0);for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){(e.ts.isIdentifier(a.expression)&&a.expression.text)==="withChildren"&&(n.acceptsChildren=!0);let l=a.arguments[0];e.ts.isIdentifier(l)&&(i=l.text)}if(!i)continue;n.name===""&&(n.name=Ee(i)),n.importName=i;let u=await $r(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Pe(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Fh(e,u.filePath,e.registryPath===u.filePath||Kt(u.filePath));if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(d=>d.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var Cy=v(()=>{"use strict";We();Oe();St();me();kr();ht();Rl();Rn()});async function Ur(e,t,r,n,o,s,i,a){let u=await In(e),[c,l,d]=await Promise.all([yy(e,u),vy(e),xs(e)]),p=c.map(w=>w.cmpInfo),h=l.components,g={components:vr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await di(e,g.components),g;let m=!1,y=l.sourceFile,D=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(D.length>0){let w=D.map(A=>{let _=c.find(k=>k.cmpInfo.id===A);if(!_)throw new Error(`Component ${A} not found`);return _}),S=Array.from(new Set(w.map(A=>A.cmpInfo.filePath))),F=await Ge(e,S);for(let A of w){let _=g.components.find(x=>x.id===A.cmpInfo.id),k=await pi(e,A,F,e.registryPath===A.cmpInfo.filePath||Kt(A.cmpInfo.filePath));jt(_,k);let O=p.findIndex(x=>x.id===A.cmpInfo.id);p[O].inputs=k;let $=Mr(A.cmpInfo.id,p,h,r,n,o,s),{elements:R,elmIndex:C,statementIndex:U,statement:G,variableDeclaration:K}=await tF(e,y,A);if($.addCmpToRegistry)R.push(eF(e,$.addCmpToRegistry)),m=!0;else if($.removeCmpFromRegistry)R.splice(C,1),m=!0;else if($.updateRegisteredCmp){let x=ze(e,R[C],$.updateRegisteredCmp);R[C]=e.ts.factory.updateObjectLiteralExpression(x,[by(e,$.updateRegisteredCmp),...x.properties.slice(1)]),m=!0}if(m&&i){let x=[...y.statements];x[U]=e.ts.factory.updateVariableStatement(G,G.modifiers,e.ts.factory.updateVariableDeclarationList(G.declarationList,[e.ts.factory.updateVariableDeclaration(K,K.name,K.exclamationToken,K.type,e.ts.factory.createArrayLiteralExpression(Or(e,R)))])),y=e.ts.factory.updateSourceFile(y,x),_.exportType==="named"?y=ge(e,y,{namedImports:[_.importName],importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}):y=ge(e,y,{defaultImport:_.importName,importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)});let P=e.sdkVersion===z.gen2?"@builder.io/sdk-react":"@builder.io/react";y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:P,isTypeOnly:!0}),_.acceptsChildren&&e.sdkVersion!==z.gen2&&(y=ge(e,y,{namedImports:["withChildren"],importPath:"@builder.io/react"})),y=Lr(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=$.components,h=$.components.filter($e=>$e.isRegistered)}}}if(m&&i){y=Br(e,y),y=Nr(e,y);let w=Ke(e,y);w=Dr(w),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return g}function by(e,t){if(e.sdkVersion===z.gen2)return e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName));let r=e.ts.factory.createIdentifier(t.importName),n=t.acceptsChildren?e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[r]):r;return e.ts.factory.createPropertyAssignment("component",n)}function eF(e,t){return ze(e,e.ts.factory.createObjectLiteralExpression([by(e,t),...t.acceptsChildren&&e.sdkVersion===z.gen2?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}async function tF(e,t,r){let n=Ve(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await _l(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var Il=v(()=>{"use strict";We();Jt();yr();Oe();Dy();me();po();Cy();mi();gi();ht();Rn();St();hi();Cs();Fn();ru()});async function xy(e){let t=[],r=await oF(e,t);return t.push(...await nu(e)),await sF(e,r),await nF(e,t),t}async function wy(e){let t=[];return t.push(...await nu(e)),await rF(e,t),t}async function rF(e,t){let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureFigmaImportRoute, hasLocaleParam"),r=`($locale).${r}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureFigmaImportRoute, hasRoute: ${o}`);let s=await e.formatCode(n,Sy({sys:e,routePath:n,modelName:"figma-imports"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}async function nF(e,t){let r=`$.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureAppRoute, hasLocaleParam"),r=`($locale).${r}`),e.sdkVersion===z.gen2&&(r=`($slug)._index.${e.typescriptEnabled?"tsx":"jsx"}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureAppRoute, hasRoute: ${o}`);let s=await e.formatCode(n,Sy({sys:e,routePath:n,modelName:"page"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}function Sy({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,o=de(e,t,e.registryPath),s="",i="";n&&(s="import type { LoaderArgs } from '@remix-run/server-runtime';",i=": LoaderArgs");let a=`process.env.${ws}`,u="";return e.getFrameworks().some(c=>c.name==="@shopify/remix-oxygen")&&(a=`context.env.${ws}`,u=", context"),n&&(a+="!"),e.sdkVersion===z.gen2?`
|
|
649
649
|
|
|
650
650
|
import {
|
|
651
651
|
Content,
|
|
@@ -751,11 +751,11 @@ export default function Page() {
|
|
|
751
751
|
${n?`
|
|
752
752
|
declare global {
|
|
753
753
|
interface Env {
|
|
754
|
-
${
|
|
754
|
+
${ws}: string;
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
757
|
`:""}
|
|
758
|
-
`}async function
|
|
758
|
+
`}async function oF(e,t){let n=e.typescriptEnabled?"tsx":"jsx",o=e.join(e.componentsDir,"Counter"),s=e.join(o,`Counter.${n}`),i=e.join(o,"styles.module.css"),{component:a,styles:u}=iF(e),c=await e.exists(s);if(e.debug(`remixEnsureCounterComponent, hasCounterCmp: ${c}`),!c){let d=await e.formatCode(s,a);await e.writeFile(s,d),t.push({filePath:s,modifiedType:"create"})}let l=await e.exists(i);return e.debug(`remixEnsureCounterComponent, hasCounterStyles: ${l}`),l||(await e.writeFile(i,u),t.push({filePath:i,modifiedType:"create"})),s}function iF(e){let t=e.typescriptEnabled,r=`
|
|
759
759
|
import { useState } from "react";
|
|
760
760
|
import styles from "./styles.module.css";
|
|
761
761
|
${t?`
|
|
@@ -818,17 +818,17 @@ export default Counter;
|
|
|
818
818
|
font-size: 42px;
|
|
819
819
|
text-align: center;
|
|
820
820
|
}
|
|
821
|
-
`.trimStart();return{component:r,styles:n}}async function
|
|
821
|
+
`.trimStart();return{component:r,styles:n}}async function sF(e,t){let n=(await Ur(e,null,!1,!1,null,null,!1,!1)).components.find(o=>o.filePath===t);n&&await Ur(e,n.id,!0,!1,null,null,!0,!1)}async function nu(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,aF(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function aF(e){let t=e.sdkVersion===z.gen2;return e.typescriptEnabled?`import type { RegisteredComponent } from ${t?'"@builder.io/sdk-react"':'"@builder.io/react"'};
|
|
822
822
|
|
|
823
823
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
824
824
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
825
825
|
];
|
|
826
|
-
`}var
|
|
826
|
+
`}var Rl=v(()=>{"use strict";We();Il();ru();me()});async function Ey(e){let t=await uF(e);return{builderPageOptions:async()=>{let n="/builder-demo",o=t.hasLocaleParam?`/en-us${n}`:void 0;return{templateContentId:"a5c9eef7909d4fc99554264a17de22c9",pathname:n,localePathname:o,title:"Builder + Remix Demo Page"}},ensureBuilderSetup:()=>xy(t),ensureFigmaImportPage:()=>wy(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Ur(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Ur(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Ur(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Ur(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Ur(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Ur(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>xs(t),setPublicApiKey:n=>hy(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===z.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Qt(t),setCache:n=>Zt(t,n)}}async function uF(e){let t=await lF(e),r=e.getAppRootDir(),n=await dF(e),o=e.dirname(n),s=e.join(o,"components"),i=await mt(e),a=await xt(e,o),u={},c={...e,registryPath:a,remixConfigPath:t,typescriptEnabled:i,appDir:o,componentsDir:s,routesDir:n,hasLocaleParam:await cF(e,n),addExternalPackage:l=>{u[e.join(r,l,"index.ts")]=`export * from "${l}";`},readFileSync:l=>u[l]??e.readFileSync(l),existsSync:l=>!!u[l]||e.existsSync(l),readdirSync:l=>{let d=e.readdirSync(l);return l===r?[...d,...Object.keys(u).map(p=>p.slice(r.length+1))]:d},readdir:async l=>{let d=await e.readdir(l);return l===r?[...d,...Object.keys(u).map(p=>p.slice(r.length+1))]:d}};return e.sdkVersion?c.sdkVersion=e.sdkVersion:c.sdkVersion=await yi(c),c}async function cF(e,t){return(await e.readdir(t)).some(n=>n.startsWith("($locale)."))}async function lF(e){let t=["remix.config.ts","remix.config.js","vite.config.ts","vite.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Remix config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function dF(e){let t=await us(e,e.getAppRootDir(),"routes");if(t)return t;throw new Error(`Could not find Remix "routes" directory in "${e.getAppRootDir()}". Please ensure this command is ran from within your Remix project's directory.`)}var Py=v(()=>{"use strict";ao();ru();gt();Rl();Il();We();Xa()});async function Ss(e){let t=[".env"],r=e.configType==="vite"?Es:ou;return await _r(e,t,r)}async function Ay(e,t){let r=await Ss(e),n=await Rr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Es,ou,Ps=v(()=>{"use strict";uo();Es="VITE_PUBLIC_BUILDER_KEY",ou="PUBLIC_BUILDER_KEY"});function Ty(e,t){let r=`Builder.registerComponent(
|
|
827
827
|
`;r+=` ${t.importName},
|
|
828
828
|
`,r+=` {
|
|
829
829
|
name: "${t.name}",
|
|
830
830
|
}
|
|
831
|
-
`,r+=");";let n=
|
|
831
|
+
`,r+=");";let n=ja(e,r);return kl(e,n,t)}function kl(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=ze(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}var Fy=v(()=>{"use strict";Oe();ht()});async function _y(e){let t=await e.readFile(e.registryPath);return t?pF(e,t):{components:[],sourceFile:le(e,"")}}async function pF(e,t){let r=le(e,t);return e.sdkVersion===z.gen2?gF(e,r):fF(e,r)}async function fF(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let d=c[0];if(e.ts.isIdentifier(d)){let p=await mF(e,t,n,d,l,!1);p&&r.push(p);continue}}return{sourceFile:t,components:bt(r)}}async function mF(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;i.filePath=await $l(e,c.text),i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),i.importPath=Pe(e,i.filePath),i.name=Wt(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(p=>!p.importClause||!p.importClause.namedBindings||!e.ts.isNamedImports(p.importClause.namedBindings)?!1:p.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let d=await $l(e,l.text);i.filePath=await $l(e,l.text),i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(d)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Ee(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=wt(e,i,o),i.displayFilePath=Ce(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function $l(e,t){return vs(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}async function gF(e,t){let r=[],n=Ve(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Nl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Nl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};ai(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(be(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Ee(a)),n.importName=a;let c=await $r(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Pe(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(p=>e.ts.isImportDeclaration(p)),d=l.find(p=>p.importClause&&p.importClause.name?.text===a);if(d){let p=d.moduleSpecifier;if(!e.ts.isStringLiteral(p))return null;n.exportName="default"}else{let p=l.find(g=>!g.importClause||!g.importClause.namedBindings||!e.ts.isNamedImports(g.importClause.namedBindings)?!1:g.importClause.namedBindings.elements.some(m=>m.name.text===a));if(!p)return null;let h=p.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var Ry=v(()=>{"use strict";We();Oe();St();me();kr();ht();Ps()});async function Vr(e,t,r,n,o,s,i,a){let u=await In(e),[c,l,d,p]=await Promise.all([_h(e,u),_y(e),mt(e),Ss(e)]),h=c.map(S=>S.cmpInfo),g=l.components,m={components:vr(h,g),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(h),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await di(e,m.components),m;let y=!1,D=l.sourceFile,w=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(w.length>0){let S=w.map(_=>{let k=c.find(O=>O.cmpInfo.id===_);if(!k)throw new Error(`Component ${_} not found`);return k}),F=Array.from(new Set(S.map(_=>_.cmpInfo.filePath))),A=await Ge(e,F);for(let _ of S){let k=m.components.find(C=>C.id===_.cmpInfo.id),O=await pi(e,_,A,e.registryPath===_.cmpInfo.filePath||Kt(_.cmpInfo.filePath));jt(k,O);let $=h.findIndex(C=>C.id===_.cmpInfo.id);h[$].inputs=O;let R=Mr(_.cmpInfo.id,h,g,r,n,o,s);if(e.sdkVersion===z.gen2){let{elements:C,elmIndex:U,statementIndex:G,statement:K,variableDeclaration:x}=await hF(e,D,_);if(R.addCmpToRegistry)C.push(yF(e,R.addCmpToRegistry)),y=!0;else if(R.removeCmpFromRegistry)C.splice(U,1),y=!0;else if(R.updateRegisteredCmp){let P=ze(e,C[U],R.updateRegisteredCmp),$e=e.ts.factory.createIdentifier(R.updateRegisteredCmp.importName);C[U]=e.ts.factory.updateObjectLiteralExpression(P,[e.ts.factory.createPropertyAssignment("component",$e),...P.properties.slice(1)]),y=!0}if(y&&i){let P=[...D.statements];P[G]=e.ts.factory.updateVariableStatement(K,K.modifiers,e.ts.factory.updateVariableDeclarationList(K.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Or(e,C)))])),D=e.ts.factory.updateSourceFile(D,P),D=Iy(e,R,D),D=ge(e,D,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),D=Lr(e,D,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=R.components,g=R.components.filter($e=>$e.isRegistered)}}else{let C=[...D.statements];R.addCmpToRegistry?(C.push(Ty(e,R.addCmpToRegistry)),y=!0):R.removeCmpFromRegistry?(C.splice(R.nodeIndex,1),y=!0):R.updateRegisteredCmp&&(C[R.nodeIndex]=kl(e,C[R.nodeIndex],R.updateRegisteredCmp),y=!0),y&&i&&(D=e.ts.factory.updateSourceFile(D,C),D=ge(e,D,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),D=Iy(e,R,D),k?.acceptsChildren&&(D=ge(e,D,{namedImports:["withChildren"],importPath:"@builder.io/react"})),m.components=R.components,g=R.components.filter(U=>U.isRegistered))}}}if(y&&i){D=Br(e,D),D=Nr(e,D);let S=Ke(e,D);S=Dr(S),S=await e.formatCode(e.registryPath,S),await e.writeFile(e.registryPath,S)}return m}async function hF(e,t,r){let n=Ve(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Nl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function yF(e,t){let r=e.ts.factory.createIdentifier(t.importName);return ze(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",r),...t.acceptsChildren?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}function Iy(e,t,r){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:de(e,e.registryPath,n.filePath);n.exportType==="default"?r=ge(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ge(e,r,{namedImports:[n.importName],importPath:o}))}return r}var Ol=v(()=>{"use strict";We();Fy();Jt();yr();Oe();St();Rn();me();po();Ry();Rn();mi();gi();ht();Cs();Fn();Ps();hi();gt()});async function ky(e){let t=[],r=await DF(e,t);if(await Oy(e,t,r),!await e.exists(e.builderComponentPath)){let n=await e.formatCode(e.builderComponentPath,Ny(e,e.builderComponentPath));await e.writeFile(e.builderComponentPath,n),t.push({filePath:e.builderComponentPath,modifiedType:"create"})}return t}async function $y(e){let t=[];await Oy(e,t);let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`,n=e.join(e.componentsDir,r);if(!await e.exists(n)){let o=await e.formatCode(n,Ny(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}function Ny(e,t,r="page"){let n=e.typescriptEnabled;return e.sdkVersion===z.gen2?`
|
|
832
832
|
import React from "react";
|
|
833
833
|
import {
|
|
834
834
|
Content,
|
|
@@ -840,7 +840,7 @@ export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
|
840
840
|
import { CUSTOM_COMPONENTS } from ${JSON.stringify(de(e,t,e.registryPath))};
|
|
841
841
|
|
|
842
842
|
// Builder Public API Key set in .env file
|
|
843
|
-
const BUILDER_API_KEY = ${e.configType==="vite"?`import.meta.env.${
|
|
843
|
+
const BUILDER_API_KEY = ${e.configType==="vite"?`import.meta.env.${Es};`:`${ou};`}
|
|
844
844
|
const MODEL_NAME = "${r}";
|
|
845
845
|
|
|
846
846
|
export default function BuilderPage() {
|
|
@@ -893,7 +893,7 @@ import { BuilderComponent, builder, useIsPreviewing } from "@builder.io/react";
|
|
|
893
893
|
import ${JSON.stringify(de(e,t,e.registryPath))};
|
|
894
894
|
|
|
895
895
|
// Builder Public API Key set in .env file
|
|
896
|
-
${e.configType==="vite"?`builder.init(import.meta.env.${
|
|
896
|
+
${e.configType==="vite"?`builder.init(import.meta.env.${Es}${n?"!":""})`:`builder.init("${ou}")`}
|
|
897
897
|
|
|
898
898
|
export default function BuilderPage() {
|
|
899
899
|
const isPreviewingInBuilder = useIsPreviewing();
|
|
@@ -938,7 +938,7 @@ export default function BuilderPage() {
|
|
|
938
938
|
</>
|
|
939
939
|
);
|
|
940
940
|
}
|
|
941
|
-
`.trimStart()}async function Oy(e,t,r){if(!await e.exists(e.registryPath)){if(e.sdkVersion===
|
|
941
|
+
`.trimStart()}async function Oy(e,t,r){if(!await e.exists(e.registryPath)){if(e.sdkVersion===z.gen2){let s=CF(e);await e.writeFile(e.registryPath,s)}else await e.writeFile(e.registryPath,"");t.push({filePath:e.registryPath,modifiedType:"create"})}if(!r)return;let o=(await Vr(e,null,!1,!1,null,null,!1,!1)).components.find(s=>s.filePath===r);o&&await Vr(e,o.id,!0,!1,null,null,!0,!1)}async function DF(e,t){let n=e.typescriptEnabled?"tsx":"jsx",o=e.join(e.componentsDir,"Counter"),s=e.join(o,`Counter.${n}`),i=e.join(o,"styles.module.css"),{component:a,styles:u}=vF(e);if(!await e.exists(s)){let c=await e.formatCode(s,a);await e.writeFile(s,c),t.push({filePath:s,modifiedType:"create"})}return await e.exists(i)||(await e.writeFile(i,u),t.push({filePath:i,modifiedType:"create"})),s}function vF(e){let t=e.typescriptEnabled,r=`
|
|
942
942
|
"use client"
|
|
943
943
|
import React, { useState } from "react";
|
|
944
944
|
import styles from "./styles.module.css";
|
|
@@ -1001,31 +1001,31 @@ export default Counter;
|
|
|
1001
1001
|
font-size: 42px;
|
|
1002
1002
|
text-align: center;
|
|
1003
1003
|
}
|
|
1004
|
-
`.trimStart();return{component:r,styles:n}}function
|
|
1004
|
+
`.trimStart();return{component:r,styles:n}}function CF(e){return e.typescriptEnabled?`import type { RegisteredComponent } from "@builder.io/sdk-react";
|
|
1005
1005
|
|
|
1006
1006
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
1007
1007
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
1008
1008
|
];
|
|
1009
|
-
`}var By=v(()=>{"use strict";We();
|
|
1009
|
+
`}var By=v(()=>{"use strict";We();Ol();me();Ps()});async function Bl(e){let t=await bF(e);return{builderPageOptions:async()=>({templateContentId:"2e36438034894a8abf279ea9e6d3596f",pathname:"/builder-demo",title:"Builder + React Demo Page"}),ensureBuilderSetup:()=>ky(t),ensureFigmaImportPage:()=>$y(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Vr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Vr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Vr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Vr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Vr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Vr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Ss(t),setPublicApiKey:n=>Ay(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===z.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Qt(t),setCache:n=>Zt(t,n)}}async function bF(e){let t=await xF(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await mt(e),s={},i={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",reactConfigPath:t,typescriptEnabled:o,configType:"",addExternalPackage:a=>{s[e.join(r,a,"index.ts")]=`export * from "${a}";`},readFileSync:a=>s[a]??e.readFileSync(a),existsSync:a=>!!s[a]||e.existsSync(a),readdirSync:a=>{let u=e.readdirSync(a);return a===r?[...u,...Object.keys(s).map(c=>c.slice(r.length+1))]:u},readdir:async a=>{let u=await e.readdir(a);return a===r?[...u,...Object.keys(s).map(c=>c.slice(r.length+1))]:u}};return e.sdkVersion?i.sdkVersion=e.sdkVersion:i.sdkVersion=await yi(i),t.includes("webpack.config")&&(i.configType="webpack"),t.includes("vite.config")&&(i.configType="vite"),await e.exists(n)?(i.srcDir=n,i.componentsDir=e.join(n,"components"),i.registryPath=await xt(e,n),i.builderComponentPath=e.join(i.srcDir,`builder-page.${o?"tsx":"jsx"}`)):(i.componentsDir=e.join(r,"components"),i.registryPath=await xt(e,r),i.builderComponentPath=e.join(r,`builder-page.${o?"tsx":"jsx"}`)),i}async function xF(e){let t=["vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find React config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}var My=v(()=>{"use strict";ao();Ps();Ol();By();We();Xa();gt()});async function As(e){return await wF(e,["environment.ts"],iu)}async function Ly(e,t){let r=await As(e),n=await AF(e,r.file,r.envKey,t);return{...r,modifiedType:n}}async function wF(e,t,r){let n={envKey:r,envValue:null,file:""};for(let o of t){let s=e.join(e.getAppRootDir(),"src","environments",o),i=await SF(e,s);if(typeof i=="string"&&i.length>0&&i!=="YOUR_API_KEY")return n.envValue=i,n.file=s,n}return n.file=e.join(e.getAppRootDir(),"src","environments",t[t.length-1]),n}async function SF(e,t){let r=await e.readFile(t);return r?EF(e,r):""}function EF(e,t){let r=le(e,t),n="",s=ci(e,r,"environment");if(s&&s.statement.declarationList.declarations.length>0){let a=s.statement.declarationList.declarations[0].initializer;a&&e.ts.isObjectLiteralExpression(a)&&a.properties.forEach(u=>{e.ts.isPropertyAssignment(u)&&e.ts.isIdentifier(u.name)&&u.name.text===iu&&e.ts.isStringLiteral(u.initializer)&&(n=u.initializer.text)})}return n}async function PF(e,t,r,n){let o=le(e,t),i=ci(e,o,"environment");if(i&&i.statement.declarationList.declarations.length>0){let a=i.statement.declarationList,u=a.declarations[0],c=u.initializer;if(c&&e.ts.isObjectLiteralExpression(c)){let l=e.ts.factory.createPropertyAssignment(e.ts.factory.createIdentifier(r),e.ts.factory.createStringLiteral(n)),d=e.ts.factory.createNodeArray([...c.properties,l]),p=e.ts.factory.updateObjectLiteralExpression(c,d),h=e.ts.factory.updateVariableDeclaration(u,u.name,u.exclamationToken,u.type,p),g=e.ts.factory.updateVariableDeclarationList(a,[h]);return e.ts.factory.updateVariableStatement(i.statement,i.statement.modifiers,g)}return null}return null}async function AF(e,t,r,n){let o=await e.readFile(t);if(o)if(o.includes(r))e.debug(`"${r}" already set in ${t}`);else{e.debug(`Add "${r}" to ${t}`);let s=await PF(e,o,r,n);if(s){let i=Ke(e,s),a=await e.formatCode(t,i);await e.writeFile(t,a)}return"update"}else{e.debug(`Creating new env file with "${r}" at ${t}`);let s=`
|
|
1010
1010
|
// https://www.builder.io/c/docs/using-your-api-key
|
|
1011
1011
|
export const environment = {
|
|
1012
1012
|
production: false,
|
|
1013
1013
|
builderApiKey: "${n}",
|
|
1014
1014
|
};
|
|
1015
|
-
`.trimStart(),i=await e.formatCode(t,s);return await e.writeFile(t,i),"create"}return null}var ou,iu=v(()=>{"use strict";Oe();St();ou="builderApiKey"});async function Uy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(TF(e,s.fileName)||i.startsWith(".")||i==="node_modules"||PF.has(i))return;let a=e.normalize(s.fileName);if(a===e.registryPath)return;let u=await su(e,o,a,s);r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}function TF(e,t){for(let r of AF)if(e.dirname(t).includes(r))return!0;return!1}async function Vy(e,t){let r=e.extname(t).toLowerCase();if(r===".tsx"||r===".jsx"||r===".ts"||r===".js"){let n=await e.readFile(t);if(n)return FF(e,t,n)}return null}function FF(e,t,r){let n=le(e,r);return su(e,null,t,n)}async function su(e,t,r,n){let o=[],s={};r=e.normalize(r);let i=n.statements.filter(l=>e.ts.isClassDeclaration(l)&&$F(e,l)),a=n.statements.find(l=>e.ts.isImportDeclaration(l)&&e.ts.isStringLiteral(l.moduleSpecifier)&&l.moduleSpecifier.text==="@angular/core");if(a&&e.ts.isImportDeclaration(a)){let l=a.importClause?.namedBindings;if(l&&e.ts.isNamedImports(l)){let d=l.elements.find(p=>(p.propertyName??p.name).text==="input");d&&(s.inputSignalImportName=d.name.text)}}let u=await RF(e,t,r,n),c=NF(e,n);return await Promise.all(i.map(async l=>{let d=await _F(e,t,r,l,c,s);o.push(...d)})),o.push(...u),o}async function Bl(e,t,r){if(t.node.fnNode){let{sourceFile:n,typeChecker:o}=await ti(e,t.cmpInfo.filePath,r),i=(await su(e,o,t.cmpInfo.filePath,n)).find(a=>a.cmpInfo.id===t.cmpInfo.id);if(!i)throw new Error(`Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return i.cmpInfo.inputs}return[]}async function Gy(e,t,r){let n=await He(e,r.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(r.filter(i=>!(i.name.endsWith("Page")||i.name.endsWith("Module")||i.name==="AppComponent")).map(async i=>{if(!i.isRegistered){let a=n.getSourceFile(i.filePath);if(a){let c=(await su(e,o,i.filePath,a)).find(l=>l.cmpInfo.id===i.id);if(c){i.inputs=co(e,o,c.node.fnNode);let l=t.find(d=>d.cmpInfo.id===i.id);if(l){let d=await Bl(e,l,n);jt(i,d)}}}}return i}))}async function _F(e,t,r,n,o,s){let i=[],a=e.relative(e.getAppRootDir(),r),u=Pe(e,r),c=n.name?.text;if(!c)return i;let l=!1;n.modifiers&&(l=n.modifiers.some(m=>m.kind===e.ts.SyntaxKind.DefaultKeyword));let d=l?"default":c,p=l?"default":"named",h=[];return n.members.forEach(m=>{if(e.ts.isPropertyDeclaration(m)||e.ts.isGetAccessor(m)||e.ts.isSetAccessor(m)){let D=(e.ts.getDecorators(m)??[]).find(w=>IF(e,w))!==void 0&&e.ts.isIdentifier(m.name),S=s?.inputSignalImportName!==void 0&&e.ts.isIdentifier(m.name)&&kF(e,m,s.inputSignalImportName);if(D||S){let w="any";if(e.ts.isSetAccessor(m))w=jy(e,m.parameters[0].type);else if(m.type&&t){let A=t.getTypeAtLocation(m.type);w=t.typeToString(A)}else w=jy(e,m.type);let F={name:m.name.text,type:o[w]?"string":w};o[w]&&(F.enum=o[w]),h.push(F)}}}),i.push({cmpInfo:{id:await we(e,r,c),displayFilePath:Ce(e,r),name:Ee(c),inputs:h,exportName:d,exportType:p,importName:c,filePath:r,relFilePath:a,importPath:u,meta:{...BF(e,n)},framework:"angular"},node:{name:c,fnNode:n,deps:void 0}}),i}async function RF(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Pe(e,r);for(let a of n.statements)if(e.ts.isExportDeclaration(a)&&a.exportClause&&e.ts.isNamedExports(a.exportClause))for(let u of a.exportClause.elements){let c=u.name?.text;if(!c)continue;let l=c,d="named",p=[];if(t){let g=t.getSymbolAtLocation(u.name);if(g){let y=t.getDeclaredTypeOfSymbol(g);t.getPropertiesOfType(y).forEach(S=>{let w=S.getDeclarations();w&&w.forEach(F=>{if(e.ts.isPropertyDeclaration(F)){let A=t.getTypeAtLocation(F),_={name:S.getName(),type:OF(e,t,A)};p.push(_)}})})}}let h=e.ts.isExportSpecifier(u)&&u.parent?u.parent.parent:void 0,m;if(h){let g=h.moduleSpecifier;if(g&&e.ts.isStringLiteral(g)){let y=t?.getSymbolAtLocation(g);if(y&&y.declarations&&y.declarations.length>0){let D=y.declarations[0];(!e.ts.isSourceFile(D)||e.ts.isSourceFile(D)&&D.fileName.includes("node_modules"))&&(m=g.text)}}}o.push({cmpInfo:{id:await we(e,r,c,m),displayFilePath:Ce(e,r),name:Ee(c),inputs:p,exportName:l,exportType:d,importName:c,filePath:r,relFilePath:s,importPath:m||i,externalImportPath:m,framework:"angular"},node:{name:c,fnNode:u,deps:void 0}})}else if(e.ts.isExportDeclaration(a)&&!a.exportClause&&a.moduleSpecifier&&e.ts.isStringLiteral(a.moduleSpecifier)){let u=a.moduleSpecifier.text;if(t)try{let c=t.getSymbolAtLocation(a.moduleSpecifier);if(c&&c.exports){let l=t.getExportsOfModule(c);for(let d of l)if(d.flags&e.ts.SymbolFlags.Class){let p=d.getName();if(p.startsWith("_"))continue;o.push({cmpInfo:{id:await we(e,r,p,u),displayFilePath:Ce(e,r),name:Ee(p),inputs:[],exportName:p,exportType:"named",importName:p,filePath:r,relFilePath:s,importPath:u,externalImportPath:u,framework:"angular"},node:{name:p,fnNode:a,deps:void 0}})}}}catch(c){console.warn(`Error processing star export from ${u}:`,c)}}return o}function IF(e,t){return Hy(e,t,"Input")}function kF(e,t,r){return e.ts.isPropertyDeclaration(t)&&t.initializer!==void 0&&e.ts.isCallExpression(t.initializer)&&e.ts.isIdentifier(t.initializer.expression)&&t.initializer.expression.text===r}function Hy(e,t,r){if(e.ts.isCallExpression(t.expression)){let n=t.expression;if(e.ts.isIdentifier(n.expression))return n.expression?.text===r}return!1}function $F(e,t){return!!e.ts.getDecorators(t)?.some(o=>e.ts.isCallExpression(o.expression)&&e.ts.isIdentifier(o.expression.expression)&&o.expression.expression.text==="Component")}function jy(e,t){if(!t)return"any";let r="any";switch(t.kind){case e.ts.SyntaxKind.StringKeyword:r="string";break;case e.ts.SyntaxKind.NumberKeyword:r="number";break;case e.ts.SyntaxKind.BooleanKeyword:r="boolean";break;case e.ts.SyntaxKind.TypeReference:e.ts.isTypeReferenceNode(t)&&e.ts.isIdentifier(t.typeName)&&(r=t.typeName.text);break}return r.includes("|")?"string":r}function NF(e,t){let r={};return e.ts.forEachChild(t,n=>{e.ts.isTypeAliasDeclaration(n)&&e.ts.isUnionTypeNode(n.type)&&n.type.types.every(o=>e.ts.isLiteralTypeNode(o)&&e.ts.isStringLiteral(o.literal))&&(r[n.name.text]=n.type.types.map(o=>o.literal.text))}),r}function OF(e,t,r){let n=t.typeToString(r);if(n==="any"){let o=r.getSymbol();if(o){let s=o.getDeclarations();if(s&&s.length>0){let i=s[0];if(e.ts.isVariableDeclaration(i)){let a=i.type;a&&(n=t.typeToString(t.getTypeAtLocation(a)))}}}}return n}function BF(e,t){let{getDecorators:r,isCallExpression:n,isIdentifier:o,isObjectLiteralExpression:s,isPropertyAssignment:i,isStringLiteral:a,SyntaxKind:u}=e.ts,c,l;return r(t)?.forEach(p=>{if(Hy(e,p,"Component")){let{expression:h}=p;if(n(h)){let[m]=h.arguments;s(m)&&m.properties.forEach(g=>{i(g)&&o(g.name)&&(g.name.escapedText==="selector"&&a(g.initializer)&&(c=g.initializer.text),g.name.escapedText==="standalone"&&(l=g.initializer.kind===u.TrueKeyword))})}}}),{selector:c,standalone:l}}var PF,AF,au=v(()=>{"use strict";Oe();me();Jt();ys();ht();PF=new Set([]),AF=new Set(["node_modules"])});async function uu(e,t,r){let n=e.typescriptEnabled?".ts":".js",o=`app.module${n}`,s=e.join(e.appDir,o),i=await e.readFile(s);if(!i){e.Sentry?.captureException(new Error(`Unable to read app.module.${n} at ${s}`),{extra:{appModuleCode:i,appModulePath:s}});return}let a=await MF(e,s,t,r,i);if(!a){e.Sentry?.captureException(new Error(`Unable to update app.module.${n} at ${s}`),{extra:{appModuleCode:i,appModulePath:s}});return}return await e.writeFile(s,a),s}async function MF(e,t,r,n,o){let s=o,i=le(e,o),a=de(e,t,n);i=ge(e,i,{namedImports:[r],importPath:a}),i=ge(e,i,{namedImports:["Content"],importPath:"@builder.io/sdk-angular"});let u=[];for(let c of i.statements)if(e.ts.isClassDeclaration(c)&&c.name?.text==="AppModule"){let l=LF(e,r,c);u.push(l)}else u.push(c);return i=e.ts.factory.updateSourceFile(i,u),s=Ke(e,i),s}function LF(e,t,r){let n=e.ts.getDecorators(r);if(n){for(let o of n)if(e.ts.isCallExpression(o.expression)&&e.ts.isIdentifier(o.expression.expression)&&o.expression.expression.text==="NgModule"){let s=o.expression.arguments;if(s.length===1&&e.ts.isObjectLiteralExpression(s[0])){let i=qy(e,s[0],"declarations",t);if(i){let a=qy(e,i,"imports","Content");if(a&&(i=a),i){let u=e.ts.factory.updateDecorator(o,e.ts.factory.updateCallExpression(o.expression,o.expression.expression,o.expression.typeArguments,[i])),l=[...n.map(d=>d===o?u:d),...e.ts.getModifiers(r)||[]];return e.ts.factory.updateClassDeclaration(r,l,r.name,r.typeParameters,r.heritageClauses,r.members)}}}}}return r}function qy(e,t,r,n){let o=[...t.properties],s=o.findIndex(a=>be(e,a)===r);if(s>-1){let a=o[s];if(e.ts.isPropertyAssignment(a)&&a.initializer&&e.ts.isArrayLiteralExpression(a.initializer)){let u=zy(e,a.initializer,n);return u?(o[s]=e.ts.factory.updatePropertyAssignment(a,a.name,u),e.ts.factory.updateObjectLiteralExpression(t,o)):null}return null}let i=zy(e,e.ts.factory.createArrayLiteralExpression([],!0),n);return i?e.ts.factory.updateObjectLiteralExpression(t,[...o,e.ts.factory.createPropertyAssignment(r,i)]):null}function zy(e,t,r){return t.elements.some(o=>e.ts.isIdentifier(o)?o.text===r:!1)?null:e.ts.factory.updateArrayLiteralExpression(t,[...t.elements,e.ts.factory.createIdentifier(r)])}var Ky=v(()=>{"use strict";Oe();yr();me();kr()});async function Ml(e,t,r,n){let s=`app.routes${e.typescriptEnabled?".ts":".js"}`,i=e.join(e.appDir,s);try{if(e.magicast){let a=await e.magicast.loadFile(i);Object.keys(a.exports).length===0&&(a.exports.routes=[]);let c=Object.keys(a.exports)[0],l=a.exports[c];if(l.find(p=>p.path===t))return;let d=e.magicast.builders.raw("{}");if(d.path=t,d.component=e.magicast.builders.raw(r),l.push(d),a.imports.$items.find(p=>p.imported===r))return;a.imports.$append({imported:r,from:n}),await e.magicast.writeFile(a,i)}}catch(a){let u=null;try{u=e.readFileSync(i)}catch(c){e.Sentry?.captureException(c,{level:"warning"})}e.Sentry?.captureException(a,{extra:{content:u,appRoutesPath:i,componentName:r,componentPath:n}})}}var Wy=v(()=>{"use strict"});var Jy=E((o7,cu)=>{cu.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;cu.exports.ID_Start=/[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;cu.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\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\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var jl=E((i7,Yy)=>{var Ll=Jy();Yy.exports={isSpaceSeparator(e){return typeof e=="string"&&Ll.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Ll.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||Ll.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}}});var tD=E((s7,eD)=>{var Je=jl(),Vl,yt,cn,du,kn,Cr,Ye,ql,Ts;eD.exports=function(t,r){Vl=String(t),yt="start",cn=[],du=0,kn=1,Cr=0,Ye=void 0,ql=void 0,Ts=void 0;do Ye=jF(),GF[yt]();while(Ye.type!=="eof");return typeof r=="function"?Gl({"":Ts},"",r):Ts};function Gl(e,t,r){let n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let o=0;o<n.length;o++){let s=String(o),i=Gl(n,s,r);i===void 0?delete n[s]:Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(let o in n){let s=Gl(n,o,r);s===void 0?delete n[o]:Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}var X,J,As,un,ue;function jF(){for(X="default",J="",As=!1,un=1;;){ue=ln();let e=Zy[X]();if(e)return e}}function ln(){if(Vl[du])return String.fromCodePoint(Vl.codePointAt(du))}function T(){let e=ln();return e===`
|
|
1016
|
-
`?(kn++,Cr=0):e?Cr+=e.length:Cr++,e&&(
|
|
1017
|
-
`:case"\r":case"\u2028":case"\u2029":T();return;case"/":T(),
|
|
1018
|
-
`:case"\r":case"\u2028":case"\u2029":T(),
|
|
1019
|
-
`:case"\r":throw Fe(T());case"\u2028":case"\u2029":
|
|
1020
|
-
`;case"r":return T(),"\r";case"t":return T()," ";case"v":return T(),"\v";case"0":if(T(),Je.isDigit(ln()))throw Fe(T());return"\0";case"x":return T(),
|
|
1015
|
+
`.trimStart(),i=await e.formatCode(t,s);return await e.writeFile(t,i),"create"}return null}var iu,su=v(()=>{"use strict";Oe();St();iu="builderApiKey"});async function Uy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(_F(e,s.fileName)||i.startsWith(".")||i==="node_modules"||TF.has(i))return;let a=e.normalize(s.fileName);if(a===e.registryPath)return;let u=await au(e,o,a,s);r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}function _F(e,t){for(let r of FF)if(e.dirname(t).includes(r))return!0;return!1}async function Vy(e,t){let r=e.extname(t).toLowerCase();if(r===".tsx"||r===".jsx"||r===".ts"||r===".js"){let n=await e.readFile(t);if(n)return RF(e,t,n)}return null}function RF(e,t,r){let n=le(e,r);return au(e,null,t,n)}async function au(e,t,r,n){let o=[],s={};r=e.normalize(r);let i=n.statements.filter(l=>e.ts.isClassDeclaration(l)&&OF(e,l)),a=n.statements.find(l=>e.ts.isImportDeclaration(l)&&e.ts.isStringLiteral(l.moduleSpecifier)&&l.moduleSpecifier.text==="@angular/core");if(a&&e.ts.isImportDeclaration(a)){let l=a.importClause?.namedBindings;if(l&&e.ts.isNamedImports(l)){let d=l.elements.find(p=>(p.propertyName??p.name).text==="input");d&&(s.inputSignalImportName=d.name.text)}}let u=await kF(e,t,r,n),c=BF(e,n);return await Promise.all(i.map(async l=>{let d=await IF(e,t,r,l,c,s);o.push(...d)})),o.push(...u),o}async function Ml(e,t,r){if(t.node.fnNode){let{sourceFile:n,typeChecker:o}=await ti(e,t.cmpInfo.filePath,r),i=(await au(e,o,t.cmpInfo.filePath,n)).find(a=>a.cmpInfo.id===t.cmpInfo.id);if(!i)throw new Error(`Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return i.cmpInfo.inputs}return[]}async function Hy(e,t,r){let n=await Ge(e,r.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(r.filter(i=>!(i.name.endsWith("Page")||i.name.endsWith("Module")||i.name==="AppComponent")).map(async i=>{if(!i.isRegistered){let a=n.getSourceFile(i.filePath);if(a){let c=(await au(e,o,i.filePath,a)).find(l=>l.cmpInfo.id===i.id);if(c){i.inputs=co(e,o,c.node.fnNode);let l=t.find(d=>d.cmpInfo.id===i.id);if(l){let d=await Ml(e,l,n);jt(i,d)}}}}return i}))}async function IF(e,t,r,n,o,s){let i=[],a=e.relative(e.getAppRootDir(),r),u=Pe(e,r),c=n.name?.text;if(!c)return i;let l=!1;n.modifiers&&(l=n.modifiers.some(g=>g.kind===e.ts.SyntaxKind.DefaultKeyword));let d=l?"default":c,p=l?"default":"named",h=[];return n.members.forEach(g=>{if(e.ts.isPropertyDeclaration(g)||e.ts.isGetAccessor(g)||e.ts.isSetAccessor(g)){let D=(e.ts.getDecorators(g)??[]).find(S=>$F(e,S))!==void 0&&e.ts.isIdentifier(g.name),w=s?.inputSignalImportName!==void 0&&e.ts.isIdentifier(g.name)&&NF(e,g,s.inputSignalImportName);if(D||w){let S="any";if(e.ts.isSetAccessor(g))S=jy(e,g.parameters[0].type);else if(g.type&&t){let A=t.getTypeAtLocation(g.type);S=t.typeToString(A)}else S=jy(e,g.type);let F={name:g.name.text,type:o[S]?"string":S};o[S]&&(F.enum=o[S]),h.push(F)}}}),i.push({cmpInfo:{id:await we(e,r,c),displayFilePath:Ce(e,r),name:Ee(c),inputs:h,exportName:d,exportType:p,importName:c,filePath:r,relFilePath:a,importPath:u,meta:{...LF(e,n)},framework:"angular"},node:{name:c,fnNode:n,deps:void 0}}),i}async function kF(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Pe(e,r);for(let a of n.statements)if(e.ts.isExportDeclaration(a)&&a.exportClause&&e.ts.isNamedExports(a.exportClause))for(let u of a.exportClause.elements){let c=u.name?.text;if(!c)continue;let l=c,d="named",p=[];if(t){let m=t.getSymbolAtLocation(u.name);if(m){let y=t.getDeclaredTypeOfSymbol(m);t.getPropertiesOfType(y).forEach(w=>{let S=w.getDeclarations();S&&S.forEach(F=>{if(e.ts.isPropertyDeclaration(F)){let A=t.getTypeAtLocation(F),_={name:w.getName(),type:MF(e,t,A)};p.push(_)}})})}}let h=e.ts.isExportSpecifier(u)&&u.parent?u.parent.parent:void 0,g;if(h){let m=h.moduleSpecifier;if(m&&e.ts.isStringLiteral(m)){let y=t?.getSymbolAtLocation(m);if(y&&y.declarations&&y.declarations.length>0){let D=y.declarations[0];(!e.ts.isSourceFile(D)||e.ts.isSourceFile(D)&&D.fileName.includes("node_modules"))&&(g=m.text)}}}o.push({cmpInfo:{id:await we(e,r,c,g),displayFilePath:Ce(e,r),name:Ee(c),inputs:p,exportName:l,exportType:d,importName:c,filePath:r,relFilePath:s,importPath:g||i,externalImportPath:g,framework:"angular"},node:{name:c,fnNode:u,deps:void 0}})}else if(e.ts.isExportDeclaration(a)&&!a.exportClause&&a.moduleSpecifier&&e.ts.isStringLiteral(a.moduleSpecifier)){let u=a.moduleSpecifier.text;if(t)try{let c=t.getSymbolAtLocation(a.moduleSpecifier);if(c&&c.exports){let l=t.getExportsOfModule(c);for(let d of l)if(d.flags&e.ts.SymbolFlags.Class){let p=d.getName();if(p.startsWith("_"))continue;o.push({cmpInfo:{id:await we(e,r,p,u),displayFilePath:Ce(e,r),name:Ee(p),inputs:[],exportName:p,exportType:"named",importName:p,filePath:r,relFilePath:s,importPath:u,externalImportPath:u,framework:"angular"},node:{name:p,fnNode:a,deps:void 0}})}}}catch(c){console.warn(`Error processing star export from ${u}:`,c)}}return o}function $F(e,t){return Gy(e,t,"Input")}function NF(e,t,r){return e.ts.isPropertyDeclaration(t)&&t.initializer!==void 0&&e.ts.isCallExpression(t.initializer)&&e.ts.isIdentifier(t.initializer.expression)&&t.initializer.expression.text===r}function Gy(e,t,r){if(e.ts.isCallExpression(t.expression)){let n=t.expression;if(e.ts.isIdentifier(n.expression))return n.expression?.text===r}return!1}function OF(e,t){return!!e.ts.getDecorators(t)?.some(o=>e.ts.isCallExpression(o.expression)&&e.ts.isIdentifier(o.expression.expression)&&o.expression.expression.text==="Component")}function jy(e,t){if(!t)return"any";let r="any";switch(t.kind){case e.ts.SyntaxKind.StringKeyword:r="string";break;case e.ts.SyntaxKind.NumberKeyword:r="number";break;case e.ts.SyntaxKind.BooleanKeyword:r="boolean";break;case e.ts.SyntaxKind.TypeReference:e.ts.isTypeReferenceNode(t)&&e.ts.isIdentifier(t.typeName)&&(r=t.typeName.text);break}return r.includes("|")?"string":r}function BF(e,t){let r={};return e.ts.forEachChild(t,n=>{e.ts.isTypeAliasDeclaration(n)&&e.ts.isUnionTypeNode(n.type)&&n.type.types.every(o=>e.ts.isLiteralTypeNode(o)&&e.ts.isStringLiteral(o.literal))&&(r[n.name.text]=n.type.types.map(o=>o.literal.text))}),r}function MF(e,t,r){let n=t.typeToString(r);if(n==="any"){let o=r.getSymbol();if(o){let s=o.getDeclarations();if(s&&s.length>0){let i=s[0];if(e.ts.isVariableDeclaration(i)){let a=i.type;a&&(n=t.typeToString(t.getTypeAtLocation(a)))}}}}return n}function LF(e,t){let{getDecorators:r,isCallExpression:n,isIdentifier:o,isObjectLiteralExpression:s,isPropertyAssignment:i,isStringLiteral:a,SyntaxKind:u}=e.ts,c,l;return r(t)?.forEach(p=>{if(Gy(e,p,"Component")){let{expression:h}=p;if(n(h)){let[g]=h.arguments;s(g)&&g.properties.forEach(m=>{i(m)&&o(m.name)&&(m.name.escapedText==="selector"&&a(m.initializer)&&(c=m.initializer.text),m.name.escapedText==="standalone"&&(l=m.initializer.kind===u.TrueKeyword))})}}}),{selector:c,standalone:l}}var TF,FF,uu=v(()=>{"use strict";Oe();me();Jt();Ds();ht();TF=new Set([]),FF=new Set(["node_modules"])});async function cu(e,t,r){let n=e.typescriptEnabled?".ts":".js",o=`app.module${n}`,s=e.join(e.appDir,o),i=await e.readFile(s);if(!i){e.Sentry?.captureException(new Error(`Unable to read app.module.${n} at ${s}`),{extra:{appModuleCode:i,appModulePath:s}});return}let a=await jF(e,s,t,r,i);if(!a){e.Sentry?.captureException(new Error(`Unable to update app.module.${n} at ${s}`),{extra:{appModuleCode:i,appModulePath:s}});return}return await e.writeFile(s,a),s}async function jF(e,t,r,n,o){let s=o,i=le(e,o),a=de(e,t,n);i=ge(e,i,{namedImports:[r],importPath:a}),i=ge(e,i,{namedImports:["Content"],importPath:"@builder.io/sdk-angular"});let u=[];for(let c of i.statements)if(e.ts.isClassDeclaration(c)&&c.name?.text==="AppModule"){let l=UF(e,r,c);u.push(l)}else u.push(c);return i=e.ts.factory.updateSourceFile(i,u),s=Ke(e,i),s}function UF(e,t,r){let n=e.ts.getDecorators(r);if(n){for(let o of n)if(e.ts.isCallExpression(o.expression)&&e.ts.isIdentifier(o.expression.expression)&&o.expression.expression.text==="NgModule"){let s=o.expression.arguments;if(s.length===1&&e.ts.isObjectLiteralExpression(s[0])){let i=zy(e,s[0],"declarations",t);if(i){let a=zy(e,i,"imports","Content");if(a&&(i=a),i){let u=e.ts.factory.updateDecorator(o,e.ts.factory.updateCallExpression(o.expression,o.expression.expression,o.expression.typeArguments,[i])),l=[...n.map(d=>d===o?u:d),...e.ts.getModifiers(r)||[]];return e.ts.factory.updateClassDeclaration(r,l,r.name,r.typeParameters,r.heritageClauses,r.members)}}}}}return r}function zy(e,t,r,n){let o=[...t.properties],s=o.findIndex(a=>be(e,a)===r);if(s>-1){let a=o[s];if(e.ts.isPropertyAssignment(a)&&a.initializer&&e.ts.isArrayLiteralExpression(a.initializer)){let u=qy(e,a.initializer,n);return u?(o[s]=e.ts.factory.updatePropertyAssignment(a,a.name,u),e.ts.factory.updateObjectLiteralExpression(t,o)):null}return null}let i=qy(e,e.ts.factory.createArrayLiteralExpression([],!0),n);return i?e.ts.factory.updateObjectLiteralExpression(t,[...o,e.ts.factory.createPropertyAssignment(r,i)]):null}function qy(e,t,r){return t.elements.some(o=>e.ts.isIdentifier(o)?o.text===r:!1)?null:e.ts.factory.updateArrayLiteralExpression(t,[...t.elements,e.ts.factory.createIdentifier(r)])}var Ky=v(()=>{"use strict";Oe();yr();me();kr()});async function Ll(e,t,r,n){let s=`app.routes${e.typescriptEnabled?".ts":".js"}`,i=e.join(e.appDir,s);try{if(e.magicast){let a=await e.magicast.loadFile(i);Object.keys(a.exports).length===0&&(a.exports.routes=[]);let c=Object.keys(a.exports)[0],l=a.exports[c];if(l.find(p=>p.path===t))return;let d=e.magicast.builders.raw("{}");if(d.path=t,d.component=e.magicast.builders.raw(r),l.push(d),a.imports.$items.find(p=>p.imported===r))return;a.imports.$append({imported:r,from:n}),await e.magicast.writeFile(a,i)}}catch(a){let u=null;try{u=e.readFileSync(i)}catch(c){e.Sentry?.captureException(c,{level:"warning"})}e.Sentry?.captureException(a,{extra:{content:u,appRoutesPath:i,componentName:r,componentPath:n}})}}var Wy=v(()=>{"use strict"});var Jy=E((s7,lu)=>{lu.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;lu.exports.ID_Start=/[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;lu.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\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\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var Ul=E((a7,Yy)=>{var jl=Jy();Yy.exports={isSpaceSeparator(e){return typeof e=="string"&&jl.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||jl.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||jl.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}}});var tD=E((u7,eD)=>{var Je=Ul(),Hl,yt,cn,pu,kn,Cr,Ye,ql,Fs;eD.exports=function(t,r){Hl=String(t),yt="start",cn=[],pu=0,kn=1,Cr=0,Ye=void 0,ql=void 0,Fs=void 0;do Ye=VF(),zF[yt]();while(Ye.type!=="eof");return typeof r=="function"?Gl({"":Fs},"",r):Fs};function Gl(e,t,r){let n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let o=0;o<n.length;o++){let s=String(o),i=Gl(n,s,r);i===void 0?delete n[s]:Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(let o in n){let s=Gl(n,o,r);s===void 0?delete n[o]:Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}var ee,J,Ts,un,ue;function VF(){for(ee="default",J="",Ts=!1,un=1;;){ue=ln();let e=Zy[ee]();if(e)return e}}function ln(){if(Hl[pu])return String.fromCodePoint(Hl.codePointAt(pu))}function T(){let e=ln();return e===`
|
|
1016
|
+
`?(kn++,Cr=0):e?Cr+=e.length:Cr++,e&&(pu+=e.length),e}var Zy={default(){switch(ue){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
1017
|
+
`:case"\r":case"\u2028":case"\u2029":T();return;case"/":T(),ee="comment";return;case void 0:return T(),Te("eof")}if(Je.isSpaceSeparator(ue)){T();return}return Zy[yt]()},comment(){switch(ue){case"*":T(),ee="multiLineComment";return;case"/":T(),ee="singleLineComment";return}throw Fe(T())},multiLineComment(){switch(ue){case"*":T(),ee="multiLineCommentAsterisk";return;case void 0:throw Fe(T())}T()},multiLineCommentAsterisk(){switch(ue){case"*":T();return;case"/":T(),ee="default";return;case void 0:throw Fe(T())}T(),ee="multiLineComment"},singleLineComment(){switch(ue){case`
|
|
1018
|
+
`:case"\r":case"\u2028":case"\u2029":T(),ee="default";return;case void 0:return T(),Te("eof")}T()},value(){switch(ue){case"{":case"[":return Te("punctuator",T());case"n":return T(),mo("ull"),Te("null",null);case"t":return T(),mo("rue"),Te("boolean",!0);case"f":return T(),mo("alse"),Te("boolean",!1);case"-":case"+":T()==="-"&&(un=-1),ee="sign";return;case".":J=T(),ee="decimalPointLeading";return;case"0":J=T(),ee="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":J=T(),ee="decimalInteger";return;case"I":return T(),mo("nfinity"),Te("numeric",1/0);case"N":return T(),mo("aN"),Te("numeric",NaN);case'"':case"'":Ts=T()==='"',J="",ee="string";return}throw Fe(T())},identifierNameStartEscape(){if(ue!=="u")throw Fe(T());T();let e=zl();switch(e){case"$":case"_":break;default:if(!Je.isIdStartChar(e))throw Qy();break}J+=e,ee="identifierName"},identifierName(){switch(ue){case"$":case"_":case"\u200C":case"\u200D":J+=T();return;case"\\":T(),ee="identifierNameEscape";return}if(Je.isIdContinueChar(ue)){J+=T();return}return Te("identifier",J)},identifierNameEscape(){if(ue!=="u")throw Fe(T());T();let e=zl();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Je.isIdContinueChar(e))throw Qy();break}J+=e,ee="identifierName"},sign(){switch(ue){case".":J=T(),ee="decimalPointLeading";return;case"0":J=T(),ee="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":J=T(),ee="decimalInteger";return;case"I":return T(),mo("nfinity"),Te("numeric",un*(1/0));case"N":return T(),mo("aN"),Te("numeric",NaN)}throw Fe(T())},zero(){switch(ue){case".":J+=T(),ee="decimalPoint";return;case"e":case"E":J+=T(),ee="decimalExponent";return;case"x":case"X":J+=T(),ee="hexadecimal";return}return Te("numeric",un*0)},decimalInteger(){switch(ue){case".":J+=T(),ee="decimalPoint";return;case"e":case"E":J+=T(),ee="decimalExponent";return}if(Je.isDigit(ue)){J+=T();return}return Te("numeric",un*Number(J))},decimalPointLeading(){if(Je.isDigit(ue)){J+=T(),ee="decimalFraction";return}throw Fe(T())},decimalPoint(){switch(ue){case"e":case"E":J+=T(),ee="decimalExponent";return}if(Je.isDigit(ue)){J+=T(),ee="decimalFraction";return}return Te("numeric",un*Number(J))},decimalFraction(){switch(ue){case"e":case"E":J+=T(),ee="decimalExponent";return}if(Je.isDigit(ue)){J+=T();return}return Te("numeric",un*Number(J))},decimalExponent(){switch(ue){case"+":case"-":J+=T(),ee="decimalExponentSign";return}if(Je.isDigit(ue)){J+=T(),ee="decimalExponentInteger";return}throw Fe(T())},decimalExponentSign(){if(Je.isDigit(ue)){J+=T(),ee="decimalExponentInteger";return}throw Fe(T())},decimalExponentInteger(){if(Je.isDigit(ue)){J+=T();return}return Te("numeric",un*Number(J))},hexadecimal(){if(Je.isHexDigit(ue)){J+=T(),ee="hexadecimalInteger";return}throw Fe(T())},hexadecimalInteger(){if(Je.isHexDigit(ue)){J+=T();return}return Te("numeric",un*Number(J))},string(){switch(ue){case"\\":T(),J+=HF();return;case'"':if(Ts)return T(),Te("string",J);J+=T();return;case"'":if(!Ts)return T(),Te("string",J);J+=T();return;case`
|
|
1019
|
+
`:case"\r":throw Fe(T());case"\u2028":case"\u2029":qF(ue);break;case void 0:throw Fe(T())}J+=T()},start(){switch(ue){case"{":case"[":return Te("punctuator",T())}ee="value"},beforePropertyName(){switch(ue){case"$":case"_":J=T(),ee="identifierName";return;case"\\":T(),ee="identifierNameStartEscape";return;case"}":return Te("punctuator",T());case'"':case"'":Ts=T()==='"',ee="string";return}if(Je.isIdStartChar(ue)){J+=T(),ee="identifierName";return}throw Fe(T())},afterPropertyName(){if(ue===":")return Te("punctuator",T());throw Fe(T())},beforePropertyValue(){ee="value"},afterPropertyValue(){switch(ue){case",":case"}":return Te("punctuator",T())}throw Fe(T())},beforeArrayValue(){if(ue==="]")return Te("punctuator",T());ee="value"},afterArrayValue(){switch(ue){case",":case"]":return Te("punctuator",T())}throw Fe(T())},end(){throw Fe(T())}};function Te(e,t){return{type:e,value:t,line:kn,column:Cr}}function mo(e){for(let t of e){if(ln()!==t)throw Fe(T());T()}}function HF(){switch(ln()){case"b":return T(),"\b";case"f":return T(),"\f";case"n":return T(),`
|
|
1020
|
+
`;case"r":return T(),"\r";case"t":return T()," ";case"v":return T(),"\v";case"0":if(T(),Je.isDigit(ln()))throw Fe(T());return"\0";case"x":return T(),GF();case"u":return T(),zl();case`
|
|
1021
1021
|
`:case"\u2028":case"\u2029":return T(),"";case"\r":return T(),ln()===`
|
|
1022
|
-
`&&T(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Fe(T());case void 0:throw Fe(T())}return T()}function
|
|
1023
|
-
`+s;F=
|
|
1022
|
+
`&&T(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Fe(T());case void 0:throw Fe(T())}return T()}function GF(){let e="",t=ln();if(!Je.isHexDigit(t)||(e+=T(),t=ln(),!Je.isHexDigit(t)))throw Fe(T());return e+=T(),String.fromCodePoint(parseInt(e,16))}function zl(){let e="",t=4;for(;t-- >0;){let r=ln();if(!Je.isHexDigit(r))throw Fe(T());e+=T()}return String.fromCodePoint(parseInt(e,16))}var zF={start(){if(Ye.type==="eof")throw go();Vl()},beforePropertyName(){switch(Ye.type){case"identifier":case"string":ql=Ye.value,yt="afterPropertyName";return;case"punctuator":du();return;case"eof":throw go()}},afterPropertyName(){if(Ye.type==="eof")throw go();yt="beforePropertyValue"},beforePropertyValue(){if(Ye.type==="eof")throw go();Vl()},beforeArrayValue(){if(Ye.type==="eof")throw go();if(Ye.type==="punctuator"&&Ye.value==="]"){du();return}Vl()},afterPropertyValue(){if(Ye.type==="eof")throw go();switch(Ye.value){case",":yt="beforePropertyName";return;case"}":du()}},afterArrayValue(){if(Ye.type==="eof")throw go();switch(Ye.value){case",":yt="beforeArrayValue";return;case"]":du()}},end(){}};function Vl(){let e;switch(Ye.type){case"punctuator":switch(Ye.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=Ye.value;break}if(Fs===void 0)Fs=e;else{let t=cn[cn.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,ql,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")cn.push(e),Array.isArray(e)?yt="beforeArrayValue":yt="beforePropertyName";else{let t=cn[cn.length-1];t==null?yt="end":Array.isArray(t)?yt="afterArrayValue":yt="afterPropertyValue"}}function du(){cn.pop();let e=cn[cn.length-1];e==null?yt="end":Array.isArray(e)?yt="afterArrayValue":yt="afterPropertyValue"}function Fe(e){return fu(e===void 0?`JSON5: invalid end of input at ${kn}:${Cr}`:`JSON5: invalid character '${Xy(e)}' at ${kn}:${Cr}`)}function go(){return fu(`JSON5: invalid end of input at ${kn}:${Cr}`)}function Qy(){return Cr-=5,fu(`JSON5: invalid identifier character at ${kn}:${Cr}`)}function qF(e){console.warn(`JSON5: '${Xy(e)}' in strings is not valid ECMAScript; consider escaping`)}function Xy(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function fu(e){let t=new SyntaxError(e);return t.lineNumber=kn,t.columnNumber=Cr,t}});var nD=E((c7,rD)=>{var Kl=Ul();rD.exports=function(t,r,n){let o=[],s="",i,a,u="",c;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,c=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){i=[];for(let m of r){let y;typeof m=="string"?y=m:(typeof m=="number"||m instanceof String||m instanceof Number)&&(y=String(m)),y!==void 0&&i.indexOf(y)<0&&i.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),u=" ".substr(0,n)):typeof n=="string"&&(u=n.substr(0,10)),l("",{"":t});function l(m,y){let D=y[m];switch(D!=null&&(typeof D.toJSON5=="function"?D=D.toJSON5(m):typeof D.toJSON=="function"&&(D=D.toJSON(m))),a&&(D=a.call(y,m,D)),D instanceof Number?D=Number(D):D instanceof String?D=String(D):D instanceof Boolean&&(D=D.valueOf()),D){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof D=="string")return d(D,!1);if(typeof D=="number")return String(D);if(typeof D=="object")return Array.isArray(D)?g(D):p(D)}function d(m){let y={"'":.1,'"':.2},D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},w="";for(let F=0;F<m.length;F++){let A=m[F];switch(A){case"'":case'"':y[A]++,w+=A;continue;case"\0":if(Kl.isDigit(m[F+1])){w+="\\x00";continue}}if(D[A]){w+=D[A];continue}if(A<" "){let _=A.charCodeAt(0).toString(16);w+="\\x"+("00"+_).substring(_.length);continue}w+=A}let S=c||Object.keys(y).reduce((F,A)=>y[F]<y[A]?F:A);return w=w.replace(new RegExp(S,"g"),D[S]),S+w+S}function p(m){if(o.indexOf(m)>=0)throw TypeError("Converting circular structure to JSON5");o.push(m);let y=s;s=s+u;let D=i||Object.keys(m),w=[];for(let F of D){let A=l(F,m);if(A!==void 0){let _=h(F)+":";u!==""&&(_+=" "),_+=A,w.push(_)}}let S;if(w.length===0)S="{}";else{let F;if(u==="")F=w.join(","),S="{"+F+"}";else{let A=`,
|
|
1023
|
+
`+s;F=w.join(A),S=`{
|
|
1024
1024
|
`+s+F+`,
|
|
1025
|
-
`+y+"}"}}return o.pop(),s=y,
|
|
1026
|
-
`+s,F=D.join(
|
|
1025
|
+
`+y+"}"}}return o.pop(),s=y,S}function h(m){if(m.length===0)return d(m,!0);let y=String.fromCodePoint(m.codePointAt(0));if(!Kl.isIdStartChar(y))return d(m,!0);for(let D=y.length;D<m.length;D++)if(!Kl.isIdContinueChar(String.fromCodePoint(m.codePointAt(D))))return d(m,!0);return m}function g(m){if(o.indexOf(m)>=0)throw TypeError("Converting circular structure to JSON5");o.push(m);let y=s;s=s+u;let D=[];for(let S=0;S<m.length;S++){let F=l(String(S),m);D.push(F!==void 0?F:"null")}let w;if(D.length===0)w="[]";else if(u==="")w="["+D.join(",")+"]";else{let S=`,
|
|
1026
|
+
`+s,F=D.join(S);w=`[
|
|
1027
1027
|
`+s+F+`,
|
|
1028
|
-
`+y+"]"}return o.pop(),s=y,
|
|
1028
|
+
`+y+"]"}return o.pop(),s=y,w}}});var iD=E((l7,oD)=>{var KF=tD(),WF=nD(),JF={parse:KF,stringify:WF};oD.exports=JF});async function aD(e){let t=e.ts.findConfigFile(e.getAppRootDir(),e.existsSync);if(t){let r=await e.readFile(t);if(!r)return;let n=sD.default.parse(r);if(!n||typeof n!="object"||Array.isArray(n))return;let o=n.compilerOptions;if(!o||typeof o!="object"||Array.isArray(o))return;let s=o.paths;(!s||typeof s!="object"||Array.isArray(s))&&(o.paths={},s=o.paths),Object.assign(o.paths,{"~/*":["./src/*"]}),await e.writeFile(t,JSON.stringify(n,null,2))}}var sD,uD=v(()=>{"use strict";sD=Me(iD(),1)});async function cD(e){let t=[],r=await ZF(e,t);t.push(...await mu(e)),await YF(e,r);let n="BuilderPage";if(!await e.exists(e.builderPageComponentPath)){let o=await e.formatCode(e.builderPageComponentPath,dD(e,n,e.builderPageComponentPath,"builder-page","page",!0));await e.writeFile(e.builderPageComponentPath,o),t.push({filePath:e.builderPageComponentPath,modifiedType:"create"})}if(e.hasAppModule){await cu(e,"Counter",r);let o=await cu(e,n,e.builderPageComponentPath);o&&t.push({filePath:o,modifiedType:"update"})}return await Ll(e,"**",n,"./components/builder-page.component"),t}async function lD(e){let t=[];t.push(...await mu(e));let r="FigmaImportsPage",n="figma-imports.component",o=e.join(e.componentsDir,`${n}.${e.typescriptEnabled?"ts":"js"}`);if(!await e.exists(o)){let s=await e.formatCode(o,dD(e,r,o,"figma-imports","figma-imports",!1));await e.writeFile(o,s),t.push({filePath:o,modifiedType:"create"})}if(e.hasAppModule){let s=await cu(e,r,o);s&&t.push({filePath:s,modifiedType:"update"})}return await Ll(e,"figma-imports",r,`./components/${n}`),await aD(e),t}async function mu(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,QF(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}async function YF(e,t){let n=(await Hr(e,null,!1,!1,null,null,!1,!1)).components.find(o=>o.filePath===t);n&&await Hr(e,n.id,!0,!1,null,null,!0,!1)}function dD(e,t,r,n,o,s){let i=!e.hasAppModule,a=de(e,r,e.registryPath),u=e.join(e.getAppRootDir(),"src","environments","environment.ts"),c=de(e,r,u),l=s?` <ng-container *ngIf="content || isPreviewing; else notFound">
|
|
1029
1029
|
<builder-content
|
|
1030
1030
|
[model]="model"
|
|
1031
1031
|
[content]="content"
|
|
@@ -1063,7 +1063,7 @@ export class ${t} {
|
|
|
1063
1063
|
`:""}
|
|
1064
1064
|
@Input() model = '${o}';
|
|
1065
1065
|
|
|
1066
|
-
apiKey = environment.${
|
|
1066
|
+
apiKey = environment.${iu};
|
|
1067
1067
|
${e.typescriptEnabled?`
|
|
1068
1068
|
content: BuilderContent | null = null;
|
|
1069
1069
|
`:`
|
|
@@ -1091,12 +1091,12 @@ export class ${t} {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
|
-
`.trimStart()}function
|
|
1094
|
+
`.trimStart()}function QF(e){return e.typescriptEnabled?`import type { RegisteredComponent } from "@builder.io/sdk-angular";
|
|
1095
1095
|
|
|
1096
1096
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
1097
1097
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
1098
1098
|
];
|
|
1099
|
-
`}async function
|
|
1099
|
+
`}async function ZF(e,t){let n=e.typescriptEnabled?"ts":"js",o=e.join(e.componentsDir,`counter.component.${n}`),s=await e.exists(o);e.debug(`angularEnsureCounterComponent, hasCounterCmp: ${s}`);let i=XF(e);if(!s){let a=await e.formatCode(o,i);await e.writeFile(o,a),t.push({filePath:o,modifiedType:"create"})}return o}function XF(e){return`
|
|
1100
1100
|
import { Component, Input } from '@angular/core';
|
|
1101
1101
|
|
|
1102
1102
|
@Component({
|
|
@@ -1164,7 +1164,7 @@ export class Counter {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
|
-
`.trimStart()}var Kl=v(()=>{"use strict";Wl();me();iu();Ky();Wy();uD()});async function pD(e){await fu(e);let t=await e.readFile(e.registryPath);return t?ZF(e,t):{components:[],sourceFile:le(e,"")}}async function ZF(e,t){let r=le(e,t);return XF(e,r)}async function XF(e,t){let r=[],n=Ve(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Jl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Jl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){let c=a.arguments[0];e.ts.isIdentifier(c)&&(i=c.text)}if(!i)continue;n.name===""&&(n.name=Ee(i)),n.importName=i;let u=await $r(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Pe(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Vy(e,u.filePath);if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(d=>d.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var fD=v(()=>{"use strict";Oe();St();me();kr();ht();Kl();au()});async function Gr(e,t,r,n,o,s,i,a){let u=await In(e),[c,l,d]=await Promise.all([Uy(e,u),pD(e),Ps(e)]),p=c.map(S=>S.cmpInfo),h=l.components,m={components:vr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await Gy(e,c,m.components),m;let g=!1,y=l.sourceFile,D=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(D.length>0){let S=D.map(A=>{let _=c.find(k=>k.cmpInfo.id===A);if(!_)throw new Error(`Component ${A} not found`);return _}),w=Array.from(new Set(S.map(A=>A.cmpInfo.filePath))),F=await He(e,w);for(let A of S){let _=m.components.find(x=>x.id===A.cmpInfo.id),k=await Bl(e,A,F);jt(_,k);let O=p.findIndex(x=>x.id===A.cmpInfo.id);p[O].inputs=k;let $=Mr(A.cmpInfo.id,p,h,r,n,o,s),{elements:R,elmIndex:C,statementIndex:U,statement:H,variableDeclaration:K}=await t_(e,y,A);if($.addCmpToRegistry)R.push(e_(e,$.addCmpToRegistry)),g=!0;else if($.removeCmpFromRegistry)R.splice(C,1),g=!0;else if($.updateRegisteredCmp){let x=qe(e,R[C],$.updateRegisteredCmp);R[C]=e.ts.factory.updateObjectLiteralExpression(x,[mD(e,$.updateRegisteredCmp),...x.properties.slice(1)]),g=!0}if(g&&i){let x=[...y.statements];x[U]=e.ts.factory.updateVariableStatement(H,H.modifiers,e.ts.factory.updateVariableDeclarationList(H.declarationList,[e.ts.factory.updateVariableDeclaration(K,K.name,K.exclamationToken,K.type,e.ts.factory.createArrayLiteralExpression(Or(e,R)))])),y=e.ts.factory.updateSourceFile(y,x),_.exportType==="named"?y=ge(e,y,{namedImports:[_.importName],importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}):y=ge(e,y,{defaultImport:_.importName,importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}),y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),y=Lr(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=$.components,h=$.components.filter(P=>P.isRegistered)}}}if(g&&i){y=Br(e,y),y=Nr(e,y);let S=Ke(e,y);S=Dr(S),S=await e.formatCode(e.registryPath,S),await e.writeFile(e.registryPath,S)}return m}function mD(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function e_(e,t){return qe(e,e.ts.factory.createObjectLiteralExpression([mD(e,t)],!0),t)}async function t_(e,t,r){let n=Ve(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Jl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var Wl=v(()=>{"use strict";Jt();yr();Oe();au();me();po();fD();mi();gi();ht();au();St();hi();vs();Fn();iu()});async function gD(e){let t=await r_(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>cD(t),ensureFigmaImportPage:()=>lD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Gr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Gr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Gr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Gr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Gr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Gr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Ps(t),setPublicApiKey:n=>Ly(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>Qt(t),setCache:n=>Zt(t,n)}}async function r_(e){let t=await n_(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await mt(e),s=e.join(n,"app"),i=await xt(e,s),a={},u={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:i,angularConfigPath:t,typescriptEnabled:o,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:d=>{a[e.join(r,d,"index.ts")]=`export * from "${d}";`},readFileSync:d=>a[d]??e.readFileSync(d),existsSync:d=>!!a[d]||e.existsSync(d),readdirSync:d=>{let p=e.readdirSync(d);return d===r?[...p,...Object.keys(a).map(h=>h.slice(r.length+1))]:p},readdir:async d=>{let p=await e.readdir(d);return d===r?[...p,...Object.keys(a).map(h=>h.slice(r.length+1))]:p}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);u.srcDir=n,u.appDir=s,u.componentsDir=e.join(u.appDir,"components"),u.builderPageComponentPath=e.join(u.componentsDir,`builder-page.component.${o?"ts":"js"}`);let c=`app.module.${o?"ts":"js"}`,l=e.join(u.appDir,c);return await e.exists(l)&&(u.hasAppModule=!0),u}async function n_(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}var hD=v(()=>{"use strict";ao();iu();Wl();Kl();gt()});async function Fs(e){let t=e.configType==="vite"?o_:i_;return await _r(e,[".env"],t)}async function yD(e,t){let r=await Fs(e),n=await Rr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var o_,i_,Yl=v(()=>{"use strict";uo();o_="VITE_PUBLIC_BUILDER_KEY",i_="PUBLIC_BUILDER_KEY"});async function vD(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let o=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",i=c_(s),a=a_(n,r),u=s_(n);return{id:l_(t),name:i,filePath:o,relFilePath:o,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:i,importPath:o,vueApiType:u}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function s_(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function a_(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let u of n){let c;for(;(c=u.exec(e))!==null;){let l=c[1];l.includes(":")?r.push(...Ql(l)):r.push(...DD(l))}}let o=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=o.exec(e))!==null;){let u=s[1];if(u.startsWith("{")){let c=u.slice(1,-1);r.push(...Ql(c))}else{let c=u.slice(1,-1);r.push(...DD(c))}}let i=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=i.exec(e))!==null;)a[1]&&r.push(...Ql(a[1]));return u_(r)}function Ql(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,i,a]=n;t.push({name:i.trim(),type:Zl(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let o=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=o.exec(e))!==null;){let[,i,a]=n,u=a.match(/type\s*:\s*(\w+)/),c=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:i.trim(),type:u?Zl(u[1]):"any",required:c?c[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,i,a]=n;t.some(u=>u.name===i.trim())||t.push({name:i.trim(),type:Zl(a.trim()),required:!1})}return t}function DD(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function Zl(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function u_(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function c_(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function l_(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}var CD=v(()=>{"use strict"});async function ho(e,t){let r=await d_(e,t.readAllInputTypes),n=await Fs(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function d_(e,t){let r=[],n=await p_(e,e.getAppRootDir());for(let o of n){let s=await vD(e,o,t);s&&r.push(s)}return r}async function p_(e,t){let r=[],n=async s=>{try{let i=await e.readdir(s);for(let a of i){let u=e.join(s,a);(await e.stat(u)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(u):a.endsWith(".vue")&&r.push(u)}}catch{}};await n(t);let o=["components","pages","layouts"];for(let s of o){let i=e.join(t,s);try{(await e.stat(i)).isDirectory()&&await n(i)}catch{}}return r}var bD=v(()=>{"use strict";CD();Yl();Fn()});async function xD(e){let t={errors:[]};try{await SD(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function wD(e){let t=[];t.push(...await SD(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let o=await e.formatCode(n,f_(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}async function SD(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,g_(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function f_(e,t,r="page"){let n=de(e,t,e.registryPath),o=e.typescriptEnabled;return e.isNuxt?`<template>
|
|
1167
|
+
`.trimStart()}var Wl=v(()=>{"use strict";Jl();me();su();Ky();Wy();uD()});async function pD(e){await mu(e);let t=await e.readFile(e.registryPath);return t?e_(e,t):{components:[],sourceFile:le(e,"")}}async function e_(e,t){let r=le(e,t);return t_(e,r)}async function t_(e,t){let r=[],n=Ve(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Yl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Yl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){let c=a.arguments[0];e.ts.isIdentifier(c)&&(i=c.text)}if(!i)continue;n.name===""&&(n.name=Ee(i)),n.importName=i;let u=await $r(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Pe(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Vy(e,u.filePath);if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(d=>d.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var fD=v(()=>{"use strict";Oe();St();me();kr();ht();Wl();uu()});async function Hr(e,t,r,n,o,s,i,a){let u=await In(e),[c,l,d]=await Promise.all([Uy(e,u),pD(e),As(e)]),p=c.map(w=>w.cmpInfo),h=l.components,g={components:vr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await Hy(e,c,g.components),g;let m=!1,y=l.sourceFile,D=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(D.length>0){let w=D.map(A=>{let _=c.find(k=>k.cmpInfo.id===A);if(!_)throw new Error(`Component ${A} not found`);return _}),S=Array.from(new Set(w.map(A=>A.cmpInfo.filePath))),F=await Ge(e,S);for(let A of w){let _=g.components.find(x=>x.id===A.cmpInfo.id),k=await Ml(e,A,F);jt(_,k);let O=p.findIndex(x=>x.id===A.cmpInfo.id);p[O].inputs=k;let $=Mr(A.cmpInfo.id,p,h,r,n,o,s),{elements:R,elmIndex:C,statementIndex:U,statement:G,variableDeclaration:K}=await n_(e,y,A);if($.addCmpToRegistry)R.push(r_(e,$.addCmpToRegistry)),m=!0;else if($.removeCmpFromRegistry)R.splice(C,1),m=!0;else if($.updateRegisteredCmp){let x=ze(e,R[C],$.updateRegisteredCmp);R[C]=e.ts.factory.updateObjectLiteralExpression(x,[mD(e,$.updateRegisteredCmp),...x.properties.slice(1)]),m=!0}if(m&&i){let x=[...y.statements];x[U]=e.ts.factory.updateVariableStatement(G,G.modifiers,e.ts.factory.updateVariableDeclarationList(G.declarationList,[e.ts.factory.updateVariableDeclaration(K,K.name,K.exclamationToken,K.type,e.ts.factory.createArrayLiteralExpression(Or(e,R)))])),y=e.ts.factory.updateSourceFile(y,x),_.exportType==="named"?y=ge(e,y,{namedImports:[_.importName],importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}):y=ge(e,y,{defaultImport:_.importName,importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}),y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),y=Lr(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=$.components,h=$.components.filter(P=>P.isRegistered)}}}if(m&&i){y=Br(e,y),y=Nr(e,y);let w=Ke(e,y);w=Dr(w),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return g}function mD(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function r_(e,t){return ze(e,e.ts.factory.createObjectLiteralExpression([mD(e,t)],!0),t)}async function n_(e,t,r){let n=Ve(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Yl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var Jl=v(()=>{"use strict";Jt();yr();Oe();uu();me();po();fD();mi();gi();ht();uu();St();hi();Cs();Fn();su()});async function gD(e){let t=await o_(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>cD(t),ensureFigmaImportPage:()=>lD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Hr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Hr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Hr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Hr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Hr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Hr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>As(t),setPublicApiKey:n=>Ly(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>Qt(t),setCache:n=>Zt(t,n)}}async function o_(e){let t=await i_(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await mt(e),s=e.join(n,"app"),i=await xt(e,s),a={},u={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:i,angularConfigPath:t,typescriptEnabled:o,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:d=>{a[e.join(r,d,"index.ts")]=`export * from "${d}";`},readFileSync:d=>a[d]??e.readFileSync(d),existsSync:d=>!!a[d]||e.existsSync(d),readdirSync:d=>{let p=e.readdirSync(d);return d===r?[...p,...Object.keys(a).map(h=>h.slice(r.length+1))]:p},readdir:async d=>{let p=await e.readdir(d);return d===r?[...p,...Object.keys(a).map(h=>h.slice(r.length+1))]:p}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);u.srcDir=n,u.appDir=s,u.componentsDir=e.join(u.appDir,"components"),u.builderPageComponentPath=e.join(u.componentsDir,`builder-page.component.${o?"ts":"js"}`);let c=`app.module.${o?"ts":"js"}`,l=e.join(u.appDir,c);return await e.exists(l)&&(u.hasAppModule=!0),u}async function i_(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}var hD=v(()=>{"use strict";ao();su();Jl();Wl();gt()});async function _s(e){let t=e.configType==="vite"?s_:a_;return await _r(e,[".env"],t)}async function yD(e,t){let r=await _s(e),n=await Rr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var s_,a_,Ql=v(()=>{"use strict";uo();s_="VITE_PUBLIC_BUILDER_KEY",a_="PUBLIC_BUILDER_KEY"});async function vD(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let o=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",i=d_(s),a=c_(n,r),u=u_(n);return{id:p_(t),name:i,filePath:o,relFilePath:o,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:i,importPath:o,vueApiType:u}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function u_(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function c_(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let u of n){let c;for(;(c=u.exec(e))!==null;){let l=c[1];l.includes(":")?r.push(...Zl(l)):r.push(...DD(l))}}let o=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=o.exec(e))!==null;){let u=s[1];if(u.startsWith("{")){let c=u.slice(1,-1);r.push(...Zl(c))}else{let c=u.slice(1,-1);r.push(...DD(c))}}let i=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=i.exec(e))!==null;)a[1]&&r.push(...Zl(a[1]));return l_(r)}function Zl(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,i,a]=n;t.push({name:i.trim(),type:Xl(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let o=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=o.exec(e))!==null;){let[,i,a]=n,u=a.match(/type\s*:\s*(\w+)/),c=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:i.trim(),type:u?Xl(u[1]):"any",required:c?c[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,i,a]=n;t.some(u=>u.name===i.trim())||t.push({name:i.trim(),type:Xl(a.trim()),required:!1})}return t}function DD(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function Xl(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function l_(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function d_(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function p_(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}var CD=v(()=>{"use strict"});async function ho(e,t){let r=await f_(e,t.readAllInputTypes),n=await _s(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:Xt(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function f_(e,t){let r=[],n=await m_(e,e.getAppRootDir());for(let o of n){let s=await vD(e,o,t);s&&r.push(s)}return r}async function m_(e,t){let r=[],n=async s=>{try{let i=await e.readdir(s);for(let a of i){let u=e.join(s,a);(await e.stat(u)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(u):a.endsWith(".vue")&&r.push(u)}}catch{}};await n(t);let o=["components","pages","layouts"];for(let s of o){let i=e.join(t,s);try{(await e.stat(i)).isDirectory()&&await n(i)}catch{}}return r}var bD=v(()=>{"use strict";CD();Ql();Fn()});async function xD(e){let t={errors:[]};try{await SD(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function wD(e){let t=[];t.push(...await SD(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let o=await e.formatCode(n,g_(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}async function SD(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,y_(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function g_(e,t,r="page"){let n=de(e,t,e.registryPath),o=e.typescriptEnabled;return e.isNuxt?`<template>
|
|
1168
1168
|
<div>
|
|
1169
1169
|
<div v-if="pending">Loading...</div>
|
|
1170
1170
|
<div v-else-if="error">Error loading content</div>
|
|
@@ -1220,7 +1220,7 @@ export default defineComponent({
|
|
|
1220
1220
|
},
|
|
1221
1221
|
setup() {
|
|
1222
1222
|
const model = '${r}'
|
|
1223
|
-
const apiKey = ${
|
|
1223
|
+
const apiKey = ${h_(e)}
|
|
1224
1224
|
const content = ref${o?"<any>":""}(null)
|
|
1225
1225
|
const loading = ref(true)
|
|
1226
1226
|
const customComponents = CUSTOM_COMPONENTS
|
|
@@ -1253,7 +1253,7 @@ export default defineComponent({
|
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
})
|
|
1256
|
-
</script>`}function
|
|
1256
|
+
</script>`}function h_(e){return e.isNuxt?"useRuntimeConfig().public.builderApiKey":e.configType==="vite"?"import.meta.env.VITE_BUILDER_API_KEY":"process.env.VUE_APP_BUILDER_API_KEY"}function y_(e){return`import type { RegisteredComponent } from "@builder.io/sdk-vue";
|
|
1257
1257
|
|
|
1258
1258
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
1259
1259
|
// Add your Vue components here
|
|
@@ -1270,13 +1270,13 @@ export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
|
1270
1270
|
// ]
|
|
1271
1271
|
// }
|
|
1272
1272
|
];
|
|
1273
|
-
`}var ED=v(()=>{"use strict";me()});async function PD(e){let t=await h_(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await xD(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>wD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>ho(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await ho(t,{readAllInputTypes:!1}),s=o.components.find(i=>i.id===n.cmpId);return{...o,component:s}},registerComponent:async n=>ho(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>ho(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>ho(t,{readAllInputTypes:!1}),unregisterComponent:async n=>ho(t,{readAllInputTypes:!1}),getPublicApiKey:()=>Fs(t),setPublicApiKey:n=>yD(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===q.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Qt(t),setCache:n=>Zt(t,n)}}async function h_(e){let t=await y_(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await mt(e),s={},i={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",vueConfigPath:t,typescriptEnabled:o,configType:"",isNuxt:await D_(e),addExternalPackage:c=>{s[e.join(r,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>s[c]??e.readFileSync(c),existsSync:c=>!!s[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===r?[...l,...Object.keys(s).map(d=>d.slice(r.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===r?[...l,...Object.keys(s).map(d=>d.slice(r.length+1))]:l}};t.includes("webpack.config")&&(i.configType="webpack"),(t.includes("vite.config")||t.includes("nuxt.config"))&&(i.configType="vite");let a=await e.exists(n);i.srcDir=a?n:null;let u=[e.join(r,"components"),e.join(r,"src","components"),e.join(r,"app","components")];for(let c of u)if(await e.exists(c)){i.componentsDir=c;break}return i.componentsDir||(i.componentsDir=a?e.join(n,"components"):e.join(r,"components")),i.registryPath=await xt(e,i.componentsDir),i}async function y_(e){let t=["nuxt.config.ts","nuxt.config.js","vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts","vue.config.js","vue.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Vue config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function D_(e){let t=["nuxt.config.ts","nuxt.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return!0}try{let r=e.join(e.getAppRootDir(),"package.json");if(await e.exists(r)){let n=JSON.parse(await e.readFile(r)||"{}"),o={...n.dependencies,...n.devDependencies};return!!(o.nuxt||o["@nuxt/kit"]||o.nuxt3)}}catch{}return!1}var AD=v(()=>{"use strict";ao();Yl();bD();We();gt();ED()});var Xl=E($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.throwUnsupportedData=$n.throwUnknownDataType=$n.getType=void 0;function TD(e){return Object.prototype.toString.call(e)}$n.getType=TD;function v_(e){throw new TypeError("unsupported data type: "+TD(e))}$n.throwUnknownDataType=v_;function C_(e){throw new TypeError("unsupported data type: "+e)}$n.throwUnsupportedData=C_});var od=E(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.s_to_num=ot.int_str_to_s=ot.num_to_s=ot.big_int_to_s=ot.int_to_s=ot.s_to_big_int=ot.s_to_int=void 0;var dn="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);dn+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);dn+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);dn+=t}var Di=dn.length,td={};for(let e=0;e<Di;e++){let t=dn[e];td[t]=e}function rd(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let o=e[n],s=td[o];s*=r,t+=s,r*=Di}return t}ot.s_to_int=rd;function FD(e){let t=BigInt(0),r=BigInt(1),n=BigInt(Di);for(let o=e.length-1;o>=0;o--){let s=e[o],i=BigInt(td[s]);i*=r,t+=i,r*=n}return t}ot.s_to_big_int=FD;function nd(e){if(e===0)return dn[0];let t=[];for(;e!==0;){let r=e%Di,n=dn[r];t.push(n),e-=r,e/=Di}return t.reverse().join("")}ot.int_to_s=nd;function _D(e){let t=BigInt(0),r=BigInt(Di);if(e===t)return dn[0];let n=[];for(;e!==t;){let o=e%r,s=dn[Number(o)];n.push(s),e/=r}return n.reverse().join("")}ot.big_int_to_s=_D;function RD(e){return e.split("").reverse().join("")}function ID(e){if(e<0)return"-"+ID(-e);let[t,r]=e.toString().split(".");if(!r)if(t.includes("e")){let[s,i]=t.split("e");t=s,r="0e"+i}else return nd(e);let n;r&&([r,n]=r.split("e")),t=mu(t),r=RD(r),r=mu(r);let o=t+"."+r;if(n){switch(o+=".",n[0]){case"+":n=n.slice(1);break;case"-":o+="-",n=n.slice(1);break}n=mu(n),o+=n}return o}ot.num_to_s=ID;function mu(e){let t=+e;return t.toString()===e&&t+1!==t&&t-1!==t?nd(t):":"+_D(BigInt(e))}ot.int_str_to_s=mu;function ed(e){return e[0]===":"?FD(e.substring(1)).toString():rd(e).toString()}function kD(e){if(e[0]==="-")return-kD(e.substr(1));let[t,r,n]=e.split(".");if(!r)return rd(t);t=ed(t),r=ed(r),r=RD(r);let o=t+"."+r;if(n){o+="e";let s=!1;n[0]==="-"&&(s=!0,n=n.slice(1)),n=ed(n),o+=s?-n:+n}return+o}ot.s_to_num=kD});var sd=E(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.decodeStr=it.encodeStr=it.decodeBool=it.encodeBool=it.decodeKey=it.decodeNum=it.encodeNum=void 0;var id=od();function b_(e){return"n|"+(0,id.num_to_s)(e)}it.encodeNum=b_;function x_(e){return e=e.replace("n|",""),(0,id.s_to_num)(e)}it.decodeNum=x_;function w_(e){return typeof e=="number"?e:(0,id.s_to_int)(e)}it.decodeKey=w_;function S_(e){return e?"b|T":"b|F"}it.encodeBool=S_;function E_(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}it.decodeBool=E_;function P_(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}it.encodeStr=P_;function A_(e){return e[0]+e[1]==="s|"?e.substr(2):e}it.decodeStr=A_});var ad=E(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.config=void 0;gu.config={sort_key:!1,error_on_nan:!1,error_on_infinite:!1}});var dd=E(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.addValue=er.makeInMemoryMemory=er.makeInMemoryCache=er.makeInMemoryStore=er.memToValues=void 0;var ld=ad(),ud=Xl(),cd=sd(),T_=od();function F_(e){return e.store.toArray()}er.memToValues=F_;function $D(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}er.makeInMemoryStore=$D;function ND(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,o]of Object.entries(e))if(r(n,o)==="break")return},forEachSchema(r){for(let[n,o]of Object.entries(t))if(r(n,o)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}er.makeInMemoryCache=ND;function __(){return{store:$D(),cache:ND(),keyCount:0}}er.makeInMemoryMemory=__;function yo(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=(0,T_.num_to_s)(r);return e.store.add(t),e.cache.setValue(t,n),n}function R_(e,t){ld.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=_s(e,t,void 0);return e.cache.setSchema(r,n),n}function _s(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return _s(e,null,r);break;case"object":if(t===null)return yo(e,null);if(Array.isArray(t)){let n="a";for(let o=0;o<t.length;o++){let s=t[o],i=s===null?"_":_s(e,s,t);n+="|"+i}return n==="a"&&(n="a|"),yo(e,n)}else{let n=Object.keys(t);if(n.length===0)return yo(e,"o|");let o="o",s=R_(e,n);o+="|"+s;for(let i of n){let a=t[i],u=_s(e,a,t);o+="|"+u}return yo(e,o)}case"boolean":return yo(e,(0,cd.encodeBool)(t));case"number":return Number.isNaN(t)?(ld.config.error_on_nan&&(0,ud.throwUnsupportedData)("[number NaN]"),""):Number.POSITIVE_INFINITY===t||Number.NEGATIVE_INFINITY===t?(ld.config.error_on_infinite&&(0,ud.throwUnsupportedData)("[number Infinity]"),""):yo(e,(0,cd.encodeNum)(t));case"string":return yo(e,(0,cd.encodeStr)(t))}return(0,ud.throwUnknownDataType)(t)}er.addValue=_s});var fd=E(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.decompress=Nn.decode=Nn.compress=void 0;var I_=Xl(),hu=sd(),pd=dd();function k_(e){let t=(0,pd.makeInMemoryMemory)(),r=(0,pd.addValue)(t,e,void 0);return[(0,pd.memToValues)(t),r]}Nn.compress=k_;function $_(e,t){if(t==="o|")return{};let r={},n=t.split("|"),o=n[1],s=Rs(e,o),i=n.length;i-2===1&&!Array.isArray(s)&&(s=[s]);for(let a=2;a<i;a++){let u=s[a-2],c=n[a];c=Rs(e,c),r[u]=c}return r}function N_(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,o=new Array(n);for(let s=0;s<n;s++){let i=r[s+1];i=Rs(e,i),o[s]=i}return o}function Rs(e,t){if(t===""||t==="_")return null;let r=(0,hu.decodeKey)(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return(0,hu.decodeBool)(n);case"o|":return $_(e,n);case"n|":return(0,hu.decodeNum)(n);case"a|":return N_(e,n);default:return(0,hu.decodeStr)(n)}}return(0,I_.throwUnknownDataType)(n)}Nn.decode=Rs;function O_(e){let[t,r]=e;return Rs(t,r)}Nn.decompress=O_});var BD=E(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.trimUndefinedRecursively=vi.trimUndefined=void 0;function B_(e){for(let t in e)e[t]===void 0&&delete e[t]}vi.trimUndefined=B_;function M_(e){OD(e,new Set)}vi.trimUndefinedRecursively=M_;function OD(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&OD(n,t)}}});var jD=E(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.config=st.trimUndefinedRecursively=st.trimUndefined=st.addValue=st.decode=st.decompress=st.compress=void 0;var MD=fd();Object.defineProperty(st,"compress",{enumerable:!0,get:function(){return MD.compress}});Object.defineProperty(st,"decompress",{enumerable:!0,get:function(){return MD.decompress}});var L_=fd();Object.defineProperty(st,"decode",{enumerable:!0,get:function(){return L_.decode}});var j_=dd();Object.defineProperty(st,"addValue",{enumerable:!0,get:function(){return j_.addValue}});var LD=BD();Object.defineProperty(st,"trimUndefined",{enumerable:!0,get:function(){return LD.trimUndefined}});Object.defineProperty(st,"trimUndefinedRecursively",{enumerable:!0,get:function(){return LD.trimUndefinedRecursively}});var U_=ad();Object.defineProperty(st,"config",{enumerable:!0,get:function(){return U_.config}})});async function UD(e,t){let n={components:(await t.getRegistry()).components.filter(s=>s.isRegistered).map(s=>{let i={filePath:mr(e.relative(e.getAppRootDir(),s.filePath)),name:s.name,image:s.image,description:s.description,exportName:s.exportName,inputs:Bt(s.inputs)};return Bt(i)}),version:1};e.debug("exporting registry components:",n.components.length);let o=(0,yu.compress)(n);return btoa(JSON.stringify(o))}async function VD(e,t,r){if(typeof r!="string")throw new Error("Invalid registry to import");let n=await t.getRegistry(),o=JSON.parse(atob(r)),s=(0,yu.decompress)(o),i=Bt(n);e.debug("importing registry components:",s.components.length);for(let a of s.components){let u=mr(e.normalize(a.filePath)),c=n.components.find(d=>mr(d.filePath).endsWith(u)&&d.exportName===a.exportName);if(!c){console.error(`Could not find component to register: ${a.filePath}, ${a.exportName}`);continue}e.debug(`register (${c.id})`,c.filePath),await t.registerComponent({cmpId:c.id});for(let d of a.inputs)e.debug(`set input (${c.id})`),await t.setRegisteredComponentInput({cmpId:c.id,name:d.name,type:d.type,required:d.required,defaultValue:d.defaultValue,friendlyName:d.friendlyName,helperText:d.helperText});e.debug(`set input (${c.id}) info`);let l=await t.setRegisteredComponentInfo({cmpId:c.id,name:a.name,image:a.image,description:a.description});i=Bt(l)}return i}var yu,GD=v(()=>{"use strict";me();yu=Me(jD(),1)});var Et,bV,HD=v(()=>{"use strict";We();Et={react:"react",remix:"remix",angular:"angular",next:"next",qwik:"qwik",vue:"vue",native:"native"},bV={[Et.react]:[{version:q.gen1,recommended:!0},{version:q.gen2,recommended:!1}],[Et.remix]:[{version:q.gen1,recommended:!1},{version:q.gen2,recommended:!0}],[Et.angular]:[{version:q.gen2,recommended:!0}],[Et.next]:[{version:q.gen1,recommended:!0},{version:q.gen2,recommended:!1}],[Et.qwik]:[{version:q.gen2,recommended:!0}],[Et.vue]:[{version:q.gen1,recommended:!0},{version:q.gen2,recommended:!1}]}});async function qD(e,t){let r=[],n=new Set;async function o(s){let i=e.join(s,"package.json");try{if(!await e.exists(i))return null;let u=await e.readFile(i);if(u===null)throw new Error(`Failed to read package.json at ${i}`);let c=JSON.parse(u);if(typeof c.name!="string"||c.name.trim()===""||n.has(c.name))return null;n.add(c.name);let l={name:c.name,subPackages:[]},d=await e.readdir(s);for(let p of d)p!=="node_modules"&&(await e.stat(e.join(s,p))).isDirectory()&&l.subPackages.push(p);return r.push(l),l}catch(a){return e.Sentry?.captureException(a,{level:"warning"}),null}}try{let s=e.join(t,"package.json");if(await e.exists(s)){let a=await e.readFile(s);if(a!==null){let u=JSON.parse(a),c={...u.dependencies,...u.devDependencies};for(let l of Object.keys(c)){let d=e.join(t,"node_modules",l);await o(d)}if(Array.isArray(u.workspaces))for(let l of u.workspaces){let d=await e.readdir(e.join(t,l));for(let p of d){let h=e.join(t,l,p);await o(h)}}}}}catch(s){e.Sentry?.captureException(s,{level:"warning"})}return r}var zD=v(()=>{"use strict"});async function Du(e,t=!1){if(!e.ts)throw new Error("createDevTools() requires a TypeScript instance passed to the 'ts' option");if((!e.frameworks||e.frameworks.length===0)&&(e.frameworks=await ri(e)),e.frameworks.length===0&&t&&e.frameworks.push({name:"native"}),e.frameworks.length===0)throw new Error("Supported Devtools framework for not found");for(let r of e.frameworks){let n=V_[r.name];if(n)try{let o=await n(e);return{...o,exportRegistry:()=>UD(e,o),importRegistry:i=>VD(e,o,i),framework:G_[r.name],findAllDependencies:async()=>await qD(e,e.getRepoRootDir())}}catch(o){e.Sentry?.captureException(o,{level:"warning"})}}throw new Error(`Devtools framework not found for ${e.getAppRootDir()}, ${JSON.stringify(e.frameworks,null,2)}`)}var V_,G_,KD=v(()=>{"use strict";oo();Xh();gy();Py();My();hD();AD();GD();HD();zD();V_={"@builder.io/qwik-city":my,next:Zh,"@remix-run/react":Ey,react:Ol,"@angular/core":gD,vue:PD,native:Ol},G_={"@builder.io/qwik-city":Et.qwik,next:Et.next,"@remix-run/react":Et.remix,react:Et.react,"@angular/core":Et.angular,vue:Et.vue,native:Et.native}});var WD=v(()=>{"use strict"});var JD=v(()=>{"use strict";Qc();WD();oo()});var YD=v(()=>{"use strict";Oe();ui();yr();oo()});var QD=v(()=>{"use strict";Oe();ui();yr();kr()});var ZD=v(()=>{"use strict";Oe();yr();ui()});var XD=v(()=>{"use strict"});var ev=v(()=>{"use strict";yr();Oe()});var DG,tv=v(()=>{"use strict";oo();po();YD();QD();ZD();XD();ev();DG=`
|
|
1273
|
+
`}var ED=v(()=>{"use strict";me()});async function PD(e){let t=await D_(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await xD(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>wD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>ho(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await ho(t,{readAllInputTypes:!1}),s=o.components.find(i=>i.id===n.cmpId);return{...o,component:s}},registerComponent:async n=>ho(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>ho(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>ho(t,{readAllInputTypes:!1}),unregisterComponent:async n=>ho(t,{readAllInputTypes:!1}),getPublicApiKey:()=>_s(t),setPublicApiKey:n=>yD(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===z.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Qt(t),setCache:n=>Zt(t,n)}}async function D_(e){let t=await v_(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await mt(e),s={},i={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",vueConfigPath:t,typescriptEnabled:o,configType:"",isNuxt:await C_(e),addExternalPackage:c=>{s[e.join(r,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>s[c]??e.readFileSync(c),existsSync:c=>!!s[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===r?[...l,...Object.keys(s).map(d=>d.slice(r.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===r?[...l,...Object.keys(s).map(d=>d.slice(r.length+1))]:l}};t.includes("webpack.config")&&(i.configType="webpack"),(t.includes("vite.config")||t.includes("nuxt.config"))&&(i.configType="vite");let a=await e.exists(n);i.srcDir=a?n:null;let u=[e.join(r,"components"),e.join(r,"src","components"),e.join(r,"app","components")];for(let c of u)if(await e.exists(c)){i.componentsDir=c;break}return i.componentsDir||(i.componentsDir=a?e.join(n,"components"):e.join(r,"components")),i.registryPath=await xt(e,i.componentsDir),i}async function v_(e){let t=["nuxt.config.ts","nuxt.config.js","vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts","vue.config.js","vue.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Vue config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function C_(e){let t=["nuxt.config.ts","nuxt.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return!0}try{let r=e.join(e.getAppRootDir(),"package.json");if(await e.exists(r)){let n=JSON.parse(await e.readFile(r)||"{}"),o={...n.dependencies,...n.devDependencies};return!!(o.nuxt||o["@nuxt/kit"]||o.nuxt3)}}catch{}return!1}var AD=v(()=>{"use strict";ao();Ql();bD();We();gt();ED()});var ed=E($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.throwUnsupportedData=$n.throwUnknownDataType=$n.getType=void 0;function TD(e){return Object.prototype.toString.call(e)}$n.getType=TD;function b_(e){throw new TypeError("unsupported data type: "+TD(e))}$n.throwUnknownDataType=b_;function x_(e){throw new TypeError("unsupported data type: "+e)}$n.throwUnsupportedData=x_});var id=E(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.s_to_num=ot.int_str_to_s=ot.num_to_s=ot.big_int_to_s=ot.int_to_s=ot.s_to_big_int=ot.s_to_int=void 0;var dn="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);dn+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);dn+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);dn+=t}var Di=dn.length,rd={};for(let e=0;e<Di;e++){let t=dn[e];rd[t]=e}function nd(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let o=e[n],s=rd[o];s*=r,t+=s,r*=Di}return t}ot.s_to_int=nd;function FD(e){let t=BigInt(0),r=BigInt(1),n=BigInt(Di);for(let o=e.length-1;o>=0;o--){let s=e[o],i=BigInt(rd[s]);i*=r,t+=i,r*=n}return t}ot.s_to_big_int=FD;function od(e){if(e===0)return dn[0];let t=[];for(;e!==0;){let r=e%Di,n=dn[r];t.push(n),e-=r,e/=Di}return t.reverse().join("")}ot.int_to_s=od;function _D(e){let t=BigInt(0),r=BigInt(Di);if(e===t)return dn[0];let n=[];for(;e!==t;){let o=e%r,s=dn[Number(o)];n.push(s),e/=r}return n.reverse().join("")}ot.big_int_to_s=_D;function RD(e){return e.split("").reverse().join("")}function ID(e){if(e<0)return"-"+ID(-e);let[t,r]=e.toString().split(".");if(!r)if(t.includes("e")){let[s,i]=t.split("e");t=s,r="0e"+i}else return od(e);let n;r&&([r,n]=r.split("e")),t=gu(t),r=RD(r),r=gu(r);let o=t+"."+r;if(n){switch(o+=".",n[0]){case"+":n=n.slice(1);break;case"-":o+="-",n=n.slice(1);break}n=gu(n),o+=n}return o}ot.num_to_s=ID;function gu(e){let t=+e;return t.toString()===e&&t+1!==t&&t-1!==t?od(t):":"+_D(BigInt(e))}ot.int_str_to_s=gu;function td(e){return e[0]===":"?FD(e.substring(1)).toString():nd(e).toString()}function kD(e){if(e[0]==="-")return-kD(e.substr(1));let[t,r,n]=e.split(".");if(!r)return nd(t);t=td(t),r=td(r),r=RD(r);let o=t+"."+r;if(n){o+="e";let s=!1;n[0]==="-"&&(s=!0,n=n.slice(1)),n=td(n),o+=s?-n:+n}return+o}ot.s_to_num=kD});var ad=E(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.decodeStr=it.encodeStr=it.decodeBool=it.encodeBool=it.decodeKey=it.decodeNum=it.encodeNum=void 0;var sd=id();function w_(e){return"n|"+(0,sd.num_to_s)(e)}it.encodeNum=w_;function S_(e){return e=e.replace("n|",""),(0,sd.s_to_num)(e)}it.decodeNum=S_;function E_(e){return typeof e=="number"?e:(0,sd.s_to_int)(e)}it.decodeKey=E_;function P_(e){return e?"b|T":"b|F"}it.encodeBool=P_;function A_(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}it.decodeBool=A_;function T_(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}it.encodeStr=T_;function F_(e){return e[0]+e[1]==="s|"?e.substr(2):e}it.decodeStr=F_});var ud=E(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.config=void 0;hu.config={sort_key:!1,error_on_nan:!1,error_on_infinite:!1}});var pd=E(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.addValue=er.makeInMemoryMemory=er.makeInMemoryCache=er.makeInMemoryStore=er.memToValues=void 0;var dd=ud(),cd=ed(),ld=ad(),__=id();function R_(e){return e.store.toArray()}er.memToValues=R_;function $D(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}er.makeInMemoryStore=$D;function ND(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,o]of Object.entries(e))if(r(n,o)==="break")return},forEachSchema(r){for(let[n,o]of Object.entries(t))if(r(n,o)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}er.makeInMemoryCache=ND;function I_(){return{store:$D(),cache:ND(),keyCount:0}}er.makeInMemoryMemory=I_;function yo(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=(0,__.num_to_s)(r);return e.store.add(t),e.cache.setValue(t,n),n}function k_(e,t){dd.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=Rs(e,t,void 0);return e.cache.setSchema(r,n),n}function Rs(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return Rs(e,null,r);break;case"object":if(t===null)return yo(e,null);if(Array.isArray(t)){let n="a";for(let o=0;o<t.length;o++){let s=t[o],i=s===null?"_":Rs(e,s,t);n+="|"+i}return n==="a"&&(n="a|"),yo(e,n)}else{let n=Object.keys(t);if(n.length===0)return yo(e,"o|");let o="o",s=k_(e,n);o+="|"+s;for(let i of n){let a=t[i],u=Rs(e,a,t);o+="|"+u}return yo(e,o)}case"boolean":return yo(e,(0,ld.encodeBool)(t));case"number":return Number.isNaN(t)?(dd.config.error_on_nan&&(0,cd.throwUnsupportedData)("[number NaN]"),""):Number.POSITIVE_INFINITY===t||Number.NEGATIVE_INFINITY===t?(dd.config.error_on_infinite&&(0,cd.throwUnsupportedData)("[number Infinity]"),""):yo(e,(0,ld.encodeNum)(t));case"string":return yo(e,(0,ld.encodeStr)(t))}return(0,cd.throwUnknownDataType)(t)}er.addValue=Rs});var md=E(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.decompress=Nn.decode=Nn.compress=void 0;var $_=ed(),yu=ad(),fd=pd();function N_(e){let t=(0,fd.makeInMemoryMemory)(),r=(0,fd.addValue)(t,e,void 0);return[(0,fd.memToValues)(t),r]}Nn.compress=N_;function O_(e,t){if(t==="o|")return{};let r={},n=t.split("|"),o=n[1],s=Is(e,o),i=n.length;i-2===1&&!Array.isArray(s)&&(s=[s]);for(let a=2;a<i;a++){let u=s[a-2],c=n[a];c=Is(e,c),r[u]=c}return r}function B_(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,o=new Array(n);for(let s=0;s<n;s++){let i=r[s+1];i=Is(e,i),o[s]=i}return o}function Is(e,t){if(t===""||t==="_")return null;let r=(0,yu.decodeKey)(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return(0,yu.decodeBool)(n);case"o|":return O_(e,n);case"n|":return(0,yu.decodeNum)(n);case"a|":return B_(e,n);default:return(0,yu.decodeStr)(n)}}return(0,$_.throwUnknownDataType)(n)}Nn.decode=Is;function M_(e){let[t,r]=e;return Is(t,r)}Nn.decompress=M_});var BD=E(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.trimUndefinedRecursively=vi.trimUndefined=void 0;function L_(e){for(let t in e)e[t]===void 0&&delete e[t]}vi.trimUndefined=L_;function j_(e){OD(e,new Set)}vi.trimUndefinedRecursively=j_;function OD(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&OD(n,t)}}});var jD=E(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.config=st.trimUndefinedRecursively=st.trimUndefined=st.addValue=st.decode=st.decompress=st.compress=void 0;var MD=md();Object.defineProperty(st,"compress",{enumerable:!0,get:function(){return MD.compress}});Object.defineProperty(st,"decompress",{enumerable:!0,get:function(){return MD.decompress}});var U_=md();Object.defineProperty(st,"decode",{enumerable:!0,get:function(){return U_.decode}});var V_=pd();Object.defineProperty(st,"addValue",{enumerable:!0,get:function(){return V_.addValue}});var LD=BD();Object.defineProperty(st,"trimUndefined",{enumerable:!0,get:function(){return LD.trimUndefined}});Object.defineProperty(st,"trimUndefinedRecursively",{enumerable:!0,get:function(){return LD.trimUndefinedRecursively}});var H_=ud();Object.defineProperty(st,"config",{enumerable:!0,get:function(){return H_.config}})});async function UD(e,t){let n={components:(await t.getRegistry()).components.filter(s=>s.isRegistered).map(s=>{let i={filePath:mr(e.relative(e.getAppRootDir(),s.filePath)),name:s.name,image:s.image,description:s.description,exportName:s.exportName,inputs:Bt(s.inputs)};return Bt(i)}),version:1};e.debug("exporting registry components:",n.components.length);let o=(0,Du.compress)(n);return btoa(JSON.stringify(o))}async function VD(e,t,r){if(typeof r!="string")throw new Error("Invalid registry to import");let n=await t.getRegistry(),o=JSON.parse(atob(r)),s=(0,Du.decompress)(o),i=Bt(n);e.debug("importing registry components:",s.components.length);for(let a of s.components){let u=mr(e.normalize(a.filePath)),c=n.components.find(d=>mr(d.filePath).endsWith(u)&&d.exportName===a.exportName);if(!c){console.error(`Could not find component to register: ${a.filePath}, ${a.exportName}`);continue}e.debug(`register (${c.id})`,c.filePath),await t.registerComponent({cmpId:c.id});for(let d of a.inputs)e.debug(`set input (${c.id})`),await t.setRegisteredComponentInput({cmpId:c.id,name:d.name,type:d.type,required:d.required,defaultValue:d.defaultValue,friendlyName:d.friendlyName,helperText:d.helperText});e.debug(`set input (${c.id}) info`);let l=await t.setRegisteredComponentInfo({cmpId:c.id,name:a.name,image:a.image,description:a.description});i=Bt(l)}return i}var Du,HD=v(()=>{"use strict";me();Du=Me(jD(),1)});var Et,wV,GD=v(()=>{"use strict";We();Et={react:"react",remix:"remix",angular:"angular",next:"next",qwik:"qwik",vue:"vue",native:"native"},wV={[Et.react]:[{version:z.gen1,recommended:!0},{version:z.gen2,recommended:!1}],[Et.remix]:[{version:z.gen1,recommended:!1},{version:z.gen2,recommended:!0}],[Et.angular]:[{version:z.gen2,recommended:!0}],[Et.next]:[{version:z.gen1,recommended:!0},{version:z.gen2,recommended:!1}],[Et.qwik]:[{version:z.gen2,recommended:!0}],[Et.vue]:[{version:z.gen1,recommended:!0},{version:z.gen2,recommended:!1}]}});async function zD(e,t){let r=[],n=new Set;async function o(s){let i=e.join(s,"package.json");try{if(!await e.exists(i))return null;let u=await e.readFile(i);if(u===null)throw new Error(`Failed to read package.json at ${i}`);let c=JSON.parse(u);if(typeof c.name!="string"||c.name.trim()===""||n.has(c.name))return null;n.add(c.name);let l={name:c.name,subPackages:[]},d=await e.readdir(s);for(let p of d)p!=="node_modules"&&(await e.stat(e.join(s,p))).isDirectory()&&l.subPackages.push(p);return r.push(l),l}catch(a){return e.Sentry?.captureException(a,{level:"warning"}),null}}try{let s=e.join(t,"package.json");if(await e.exists(s)){let a=await e.readFile(s);if(a!==null){let u=JSON.parse(a),c={...u.dependencies,...u.devDependencies};for(let l of Object.keys(c)){let d=e.join(t,"node_modules",l);await o(d)}if(Array.isArray(u.workspaces))for(let l of u.workspaces){let d=await e.readdir(e.join(t,l));for(let p of d){let h=e.join(t,l,p);await o(h)}}}}}catch(s){e.Sentry?.captureException(s,{level:"warning"})}return r}var qD=v(()=>{"use strict"});async function vu(e,t=!1){if(!e.ts)throw new Error("createDevTools() requires a TypeScript instance passed to the 'ts' option");if((!e.frameworks||e.frameworks.length===0)&&(e.frameworks=await ri(e)),e.frameworks.length===0&&t&&e.frameworks.push({name:"native"}),e.frameworks.length===0)throw new Error("Supported Devtools framework for not found");for(let r of e.frameworks){let n=G_[r.name];if(n)try{let o=await n(e);return{...o,exportRegistry:()=>UD(e,o),importRegistry:i=>VD(e,o,i),framework:z_[r.name],findAllDependencies:async()=>await zD(e,e.getRepoRootDir())}}catch(o){e.Sentry?.captureException(o,{level:"warning"})}}throw new Error(`Devtools framework not found for ${e.getAppRootDir()}, ${JSON.stringify(e.frameworks,null,2)}`)}var G_,z_,KD=v(()=>{"use strict";oo();Xh();gy();Py();My();hD();AD();HD();GD();qD();G_={"@builder.io/qwik-city":my,next:Zh,"@remix-run/react":Ey,react:Bl,"@angular/core":gD,vue:PD,native:Bl},z_={"@builder.io/qwik-city":Et.qwik,next:Et.next,"@remix-run/react":Et.remix,react:Et.react,"@angular/core":Et.angular,vue:Et.vue,native:Et.native}});var WD=v(()=>{"use strict"});var JD=v(()=>{"use strict";Zc();WD();oo()});var YD=v(()=>{"use strict";Oe();ui();yr();oo()});var QD=v(()=>{"use strict";Oe();ui();yr();kr()});var ZD=v(()=>{"use strict";Oe();yr();ui()});var XD=v(()=>{"use strict"});var ev=v(()=>{"use strict";yr();Oe()});var CH,tv=v(()=>{"use strict";oo();po();YD();QD();ZD();XD();ev();CH=`
|
|
1274
1274
|
/** @type {import('next').NextConfig} */
|
|
1275
1275
|
const nextConfig = {
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
1278
|
module.exports = nextConfig
|
|
1279
|
-
`.trimStart()});var rv=v(()=>{"use strict";Zo();
|
|
1279
|
+
`.trimStart()});var rv=v(()=>{"use strict";Zo();Cu()});var Cu=v(()=>{"use strict";Fr();KD();JD();oo();tv();rv();uo()});import*as nv from"@sentry/node";import*as ov from"@amplitude/analytics-node";async function pn(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([nv.flush(2e3),ov.flush().promise])}catch(t){console.error(t)}process.exit(e)}var Do=v(()=>{"use strict"});var On,fn=v(()=>{"use strict";On=process.env.AIR_HOST||"https://api.builder.io"});function iv(e,t=0){return(et[e[t+0]]+et[e[t+1]]+et[e[t+2]]+et[e[t+3]]+"-"+et[e[t+4]]+et[e[t+5]]+"-"+et[e[t+6]]+et[e[t+7]]+"-"+et[e[t+8]]+et[e[t+9]]+"-"+et[e[t+10]]+et[e[t+11]]+et[e[t+12]]+et[e[t+13]]+et[e[t+14]]+et[e[t+15]]).toLowerCase()}var et,sv=v(()=>{et=[];for(let e=0;e<256;++e)et.push((e+256).toString(16).slice(1))});import q_ from"node:crypto";function gd(){return bu>xu.length-16&&(q_.randomFillSync(xu),bu=0),xu.slice(bu,bu+=16)}var xu,bu,av=v(()=>{xu=new Uint8Array(256),bu=xu.length});import K_ from"node:crypto";var hd,uv=v(()=>{hd={randomUUID:K_.randomUUID}});function W_(e,t,r){if(hd.randomUUID&&!t&&!e)return hd.randomUUID();e=e||{};let n=e.random||(e.rng||gd)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return iv(n)}var yd,cv=v(()=>{uv();av();sv();yd=W_});var lv=v(()=>{cv()});function Dd(e,t,r){switch(e.code){case"ECONNREFUSED":return new Ut({type:"connection_refused",cause:e,message:`Connection refused to ${t}${r?`:${r}`:""}. The server may be down or unreachable.`,suggestions:["Check your internet connection","Try again in a few minutes - the service may be temporarily unavailable","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ECONNREFUSED"});case"ETIMEDOUT":return new Ut({type:"connection_timeout",cause:e,message:`Connection timed out to ${t}${r?`:${r}`:""}. The request took too long to complete.`,suggestions:["Check your internet connection speed","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ETIMEDOUT"});case"ENOTFOUND":return new Ut({type:"dns_not_found",cause:e,message:`Cannot resolve ${t}. The server address could not be found.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,errorCode:"ENOTFOUND"});default:return new Ut({type:"unknown",cause:e,message:`Network error connecting to ${t}: ${e.message}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r})}}var Bn,Ut,vo=v(()=>{"use strict";Lt();Bn=class extends Error{},Ut=class extends Bn{constructor({type:r,cause:n,message:o,suggestions:s=[],hostname:i,port:a,statusCode:u,errorCode:c}){super(o,{cause:n});qe(this,"type");qe(this,"suggestions");qe(this,"hostname");qe(this,"port");qe(this,"statusCode");qe(this,"errorCode");this.name="NetworkError",this.type=r,this.suggestions=s,this.hostname=i,this.port=a,this.statusCode=u,this.errorCode=c}}});import*as Ci from"@amplitude/analytics-node";import*as ks from"@sentry/node";async function $s(e,t){let r={...t,app:"dev-tools-cli",package:"cli"},n=await J_(),o=await Y_();return await Ci.track(e,r,{user_id:n,device_id:o}).promise}async function dv(e){wu=e;let t=await ni();await tl({...t,userId:e})}async function J_(){if(wu)return wu;let e=await ni(),t;return el(e,"userId")&&(t=e.userId),wu=t,t}async function Y_(){if(vd)return vd;let e=await ni(),t=yd();return el(e,"deviceId")?t=e.deviceId:await tl({...e,deviceId:t}),vd=t,t}var wu,vd,bi=v(()=>{"use strict";ls();lv();vo()});var fv,pv=v(()=>{fv="0.0.0"});var Mn,Ns=v(()=>{"use strict";Mn=class extends Error{constructor(r,n,o){super(r,o);qe(this,"code");this.name="CodeGenError",this.code=n}}});import{fetch as Z_,Agent as X_}from"undici";import bd from"node:process";import*as mv from"@sentry/node";function eR(){let e=bd.env.FUSION_REJECT_UNAUTHORIZED==="0";return Cd||(Cd=new X_({connect:{rejectUnauthorized:e}})),Cd}function tR(){let t={darwin:"Macintosh",win32:"Windows NT",linux:"Linux",android:"Android",ios:"iPhone"}[bd.platform]||"Unknown",r=bd.platform==="win32"?"10.0":"";return{"User-Agent":`Mozilla/5.0 (${t}${r?"; "+r:""}) builder-cli/${fv}`,"Sec-Ch-Ua-Platform":t}}var Cd,Gr,zr=v(()=>{"use strict";pv();vo();Ns();fn();Gr=async(e,t)=>{let r=new URL(e),n=r.hostname,o=r.port?parseInt(r.port):void 0;try{let s=mv.getTraceData(),i=await Z_(e,{...t,dispatcher:eR(),headers:{...t?.headers,...tR(),...s}});if(!i.ok){if(i.status===402){let a=await i.json(),u=a.code??"credits-limit-daily",c=a.message??"You've reached the DAY AI credits limit for your current plan.";throw new Mn(c,u)}else if(i.status===429){let a=await i.json(),u=a.code??"credits-limit-other",c=a.message??"Rate limit exceeded. Please try again later.";throw new Mn(c,u)}if(i.status>=500){let a;try{let u=await i.text();if(u)try{let c=JSON.parse(u);a=c.message||c.error||u}catch{a=u}}catch{}throw new Ut({type:"server_error",cause:a?new Error(a):void 0,message:`Server error from ${n} (HTTP ${i.status}). The server encountered an internal error.`,suggestions:["Try again in a few minutes - this may be a temporary issue","Contact support if the problem persists"],hostname:n,statusCode:i.status})}}return i}catch(s){if(s instanceof Ut||s instanceof Mn||s instanceof Error&&s.name==="AbortError")throw s;if(s instanceof Error){if(s.name==="TypeError"&&s.cause instanceof Error){let c=s.cause;if(c.code)throw Dd(c,n,o)}if(s.code)throw Dd(s,n,o);if(s.message?.includes("SSL")||s.message?.includes("TLS")||s.message?.includes("certificate")||s.message?.includes("CERT"))throw new Ut({type:"ssl_error",cause:s,message:`SSL/TLS error connecting to ${n}. The connection could not be secured.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support@builder.io if the issue persists"],hostname:n})}let i=t?.method||"GET",a=s instanceof Error?s.message:String(s);throw new Ut({type:"unknown",cause:s instanceof Error?s:new Error(String(s)),message:`Network error for ${i} ${r.toString()}: ${a}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:n,port:o})}}});var Su=v(()=>{"use strict"});import*as rR from"@sentry/node";var gv=v(()=>{"use strict";Lt();zr();Do();fn();Ln();Su()});import EG from"prettier";var xd=v(()=>{"use strict"});var yv=v(()=>{"use strict";Lt();ls();xd();Do();zr();Fr()});import GG from"chokidar";import qG from"ignore";var Sd=v(()=>{"use strict";Cu();Ed();yv();Lt();Do();ls();Fr()});function Pd(e){switch($s("cli help",{subcommand:e}),console.log(""),Tn((0,b.bgCyan)((0,b.bold)((0,b.white)(" help ")))+" "+(0,b.dim)(qt)),e){case"add":case"generate":case"gen":case"g":Tn(`${(0,b.cyan)("\u2192")} ${(0,b.bold)("Generate Figma Components")}
|
|
1280
1280
|
|
|
1281
1281
|
${(0,b.bgGreen)((0,b.white)(` npx ${Be()} figma generate URL [URL ...] `))}
|
|
1282
1282
|
|
|
@@ -1479,37 +1479,37 @@ ${(0,b.yellow)("Note:")}
|
|
|
1479
1479
|
- Use --dryrun to preview the configuration without creating the project`);break;default:pe.info(`${(0,b.bold)("Available Commands:")}
|
|
1480
1480
|
`),[{command:"generate URL [URL ...]",description:"Start the auto-mapping wizard for Figma Component URLs"},{command:"publish",description:"Publish your Figma Mappings to Builder.io"},{command:"migrate",description:"Migrate existing Figma Mappings into the repo as local files"},{command:"auth",description:"Authenticate with Builder.io"},{command:"auth status",description:"Check authentication status and user information"},{command:"code",description:"Generate or modify code based on Figma designs"},{command:"indexing",description:"Index your codebase to improve code generation results"},{command:"index-repo",description:"Index your entire repository to improve code generation results"},{command:"code-server",description:"Start a development server that provides project file information and code analysis"},{command:"launch",description:"Launch a development server"},{command:"connect-repo",description:"Connect your git repository to Builder.io Fusion"}].forEach(({command:r,description:n})=>{pe.info(`${(0,b.cyan)("\u2192")} ${(0,b.bgGreen)((0,b.white)(` npx ${Be()} figma ${r} `))}
|
|
1481
1481
|
${(0,b.dim)(n)}
|
|
1482
|
-
`)}),pe.info(`Use ${(0,b.cyan)(`npx ${Be()} figma help <command>`)} for detailed help about a command`)}
|
|
1483
|
-
`));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var o=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};
|
|
1484
|
-
`).filter(Boolean);if(s.length===0){Object.keys(r).length===0&&n();return}s.forEach(function(i){let a=parseInt(i,10);isNaN(a)||(t[e].push(a),t[a]=[],r[a]=1,Vv(a,t,r,n))})}catch{delete r[e],Object.keys(r).length===0&&n()}}});import*as yR from"@sentry/node";function DR(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}async function Au(e,t,r,n=5e3){if(typeof t!="number"&&(!t||($d(t)?t.getExitCode()!==null:t.exitCode!==null)))return null;if(r?.aborted)return Pu();let o=new Promise((a,u)=>{r?.addEventListener("abort",()=>{u(new Error("killProcess aborted by the user"))},{once:!0})}),s,i;if(typeof t=="number"?s=t:(i=t,s=$d(i)?i.getPid():i.pid),!s){if(e?.Sentry?.captureMessage("killProcess: no pid (process never spawned or already exited)",{level:"info",extra:{procType:i?$d(i)?"DevCommandProcess":"ChildProcess":"number"}}),i)try{i.kill("SIGKILL")}catch{}return null}try{return await Promise.race([await new Promise((a,u)=>(0,Nd.default)(s,"SIGTERM",c=>{c?u(c):a()})),new Promise((a,u)=>setTimeout(()=>u(new Error("SIGTERM killProcess timeout")),n)),o]),null}catch(a){if(a.code==="ESRCH")return null;e?.Sentry?.captureException(a,{level:"warning"});try{return await Promise.race([await new Promise((u,c)=>(0,Nd.default)(s,"SIGKILL",l=>{l?c(l):u()})),new Promise((u,c)=>setTimeout(()=>c(new Error("SIGKILL killProcess timeout")),n)),o]),null}catch(u){return u.code==="ESRCH"||!DR(s)?null:(e?.Sentry?.captureException(u,{level:"warning"}),u instanceof Error?u:new Error("killProcess: failed to kill process: "+String(u)))}}finally{i&&i.removeAllListeners()}}var Nd,Od,qq,$d,wi=v(()=>{"use strict";Nd=Me(Hv(),1);xi();Od=class{constructor(){ze(this,"processes",new Set);ze(this,"cleanupHandlersRegistered",!1);this.registerCleanupHandlers()}track(t){this.processes.add(t),t.on("exit",()=>{this.processes.delete(t)})}untrack(t){this.processes.delete(t)}async killAll(t){if(this.processes.size===0)return;let r=[];for(let n of this.processes)n.pid&&n.exitCode===null&&r.push(Au(t,n));await Promise.all(r),this.processes.clear()}registerCleanupHandlers(){if(this.cleanupHandlersRegistered)return;this.cleanupHandlersRegistered=!0;let t=async r=>{try{await this.killAll()}catch(n){console.error("[ProcessTracker] Error during cleanup:",n)}};process.on("SIGINT",()=>t("SIGINT")),process.on("SIGTERM",()=>t("SIGTERM")),process.on("SIGHUP",()=>t("SIGHUP")),process.on("exit",()=>{for(let r of this.processes)if(r.pid&&r.exitCode===null)try{process.kill(r.pid,"SIGKILL")}catch{}})}get count(){return this.processes.size}},qq=new Od;$d=e=>"type"in e});var Bd=v(()=>{"use strict";xi();wi();fn();qr()});var qv=v(()=>{"use strict";fn();qr();Su();Bd()});var Tu=v(()=>{"use strict"});var Md=v(()=>{"use strict"});var Fu=E(tr=>{"use strict";tr.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;tr.find=(e,t)=>e.nodes.find(r=>r.type===t);tr.exceedsLimit=(e,t,r=1,n)=>n===!1||!tr.isInteger(e)||!tr.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;tr.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};tr.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;tr.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;tr.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;tr.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);tr.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let s=n[o];if(Array.isArray(s)){r(s);continue}s!==void 0&&t.push(s)}return t};return r(e),t}});var _u=E((uz,Kv)=>{"use strict";var zv=Fu();Kv.exports=(e,t={})=>{let r=(n,o={})=>{let s=t.escapeInvalid&&zv.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||i)&&zv.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var Jv=E((cz,Wv)=>{"use strict";Wv.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var oC=E((lz,nC)=>{"use strict";var Yv=Jv(),Co=(e,t,r)=>{if(Yv(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(Yv(t)===!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 o=String(n.relaxZeros),s=String(n.shorthand),i=String(n.capture),a=String(n.wrap),u=e+":"+t+"="+o+s+i+a;if(Co.cache.hasOwnProperty(u))return Co.cache[u].result;let c=Math.min(e,t),l=Math.max(e,t);if(Math.abs(c-l)===1){let g=e+"|"+t;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let d=rC(e)||rC(t),p={min:e,max:t,a:c,b:l},h=[],m=[];if(d&&(p.isPadded=d,p.maxLen=String(p.max).length),c<0){let g=l<0?Math.abs(l):1;m=Qv(g,Math.abs(c),p,n),c=p.a=0}return l>=0&&(h=Qv(c,l,p,n)),p.negatives=m,p.positives=h,p.result=bR(m,h,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&h.length+m.length>1&&(p.result=`(?:${p.result})`),Co.cache[u]=p,p.result};function bR(e,t,r){let n=Ld(e,t,"-",!1,r)||[],o=Ld(t,e,"",!1,r)||[],s=Ld(e,t,"-?",!0,r)||[];return n.concat(s).concat(o).join("|")}function xR(e,t){let r=1,n=1,o=Xv(e,r),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),r+=1,o=Xv(e,r);for(o=eC(t+1,n)-1;e<o&&o<=t;)s.add(o),n+=1,o=eC(t+1,n)-1;return s=[...s],s.sort(ER),s}function wR(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=SR(e,t),o=n.length,s="",i=0;for(let a=0;a<o;a++){let[u,c]=n[a];u===c?s+=u:u!=="0"||c!=="9"?s+=PR(u,c,r):i++}return i&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function Qv(e,t,r,n){let o=xR(e,t),s=[],i=e,a;for(let u=0;u<o.length;u++){let c=o[u],l=wR(String(i),String(c),n),d="";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+tC(a.count),i=c+1;continue}r.isPadded&&(d=AR(c,r,n)),l.string=d+l.pattern+tC(l.count),s.push(l),i=c+1,a=l}return s}function Ld(e,t,r,n,o){let s=[];for(let i of e){let{string:a}=i;!n&&!Zv(t,"string",a)&&s.push(r+a),n&&Zv(t,"string",a)&&s.push(r+a)}return s}function SR(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function ER(e,t){return e>t?1:t>e?-1:0}function Zv(e,t,r){return e.some(n=>n[t]===r)}function Xv(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function eC(e,t){return e-e%Math.pow(10,t)}function tC(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function PR(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function rC(e){return/^-?(0+)\d/.test(e)}function AR(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}Co.cache={};Co.clearCache=()=>Co.cache={};nC.exports=Co});var Vd=E((dz,dC)=>{"use strict";var TR=re("util"),sC=oC(),iC=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),FR=e=>t=>e===!0?Number(t):String(t),jd=e=>typeof e=="number"||typeof e=="string"&&e!=="",Ls=e=>Number.isInteger(+e),Ud=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},_R=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,RR=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},Iu=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},IR=(e,t,r)=>{e.negatives.sort((a,u)=>a<u?-1:a>u?1:0),e.positives.sort((a,u)=>a<u?-1:a>u?1:0);let n=t.capture?"":"?:",o="",s="",i;return e.positives.length&&(o=e.positives.map(a=>Iu(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>Iu(String(a),r)).join("|")})`),o&&s?i=`${o}|${s}`:i=o||s,t.wrap?`(${n}${i})`:i},aC=(e,t,r,n)=>{if(r)return sC(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let s=String.fromCharCode(t);return`[${o}-${s}]`},uC=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return sC(e,t,r)},cC=(...e)=>new RangeError("Invalid range arguments: "+TR.inspect(...e)),lC=(e,t,r)=>{if(r.strictRanges===!0)throw cC([e,t]);return[]},kR=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},$R=(e,t,r=1,n={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(n.strictRanges===!0)throw cC([e,t]);return[]}o===0&&(o=0),s===0&&(s=0);let i=o>s,a=String(e),u=String(t),c=String(r);r=Math.max(Math.abs(r),1);let l=Ud(a)||Ud(u)||Ud(c),d=l?Math.max(a.length,u.length,c.length):0,p=l===!1&&_R(e,t,n)===!1,h=n.transform||FR(p);if(n.toRegex&&r===1)return aC(Iu(e,d),Iu(t,d),!0,n);let m={negatives:[],positives:[]},g=S=>m[S<0?"negatives":"positives"].push(Math.abs(S)),y=[],D=0;for(;i?o>=s:o<=s;)n.toRegex===!0&&r>1?g(o):y.push(RR(h(o,D),d,p)),o=i?o-r:o+r,D++;return n.toRegex===!0?r>1?IR(m,n,d):uC(y,null,{wrap:!1,...n}):y},NR=(e,t,r=1,n={})=>{if(!Ls(e)&&e.length>1||!Ls(t)&&t.length>1)return lC(e,t,n);let o=n.transform||(p=>String.fromCharCode(p)),s=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),a=s>i,u=Math.min(s,i),c=Math.max(s,i);if(n.toRegex&&r===1)return aC(u,c,!1,n);let l=[],d=0;for(;a?s>=i:s<=i;)l.push(o(s,d)),s=a?s-r:s+r,d++;return n.toRegex===!0?uC(l,null,{wrap:!1,options:n}):l},Ru=(e,t,r,n={})=>{if(t==null&&jd(e))return[e];if(!jd(e)||!jd(t))return lC(e,t,n);if(typeof r=="function")return Ru(e,t,1,{transform:r});if(iC(r))return Ru(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,Ls(r)?Ls(e)&&Ls(t)?$R(e,t,r,o):NR(e,t,Math.max(Math.abs(r),1),o):r!=null&&!iC(r)?kR(r,o):Ru(e,t,1,r)};dC.exports=Ru});var mC=E((pz,fC)=>{"use strict";var OR=Vd(),pC=Fu(),BR=(e,t={})=>{let r=(n,o={})=>{let s=pC.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||i===!0,u=t.escapeInvalid===!0?"\\":"",c="";if(n.isOpen===!0)return u+n.value;if(n.isClose===!0)return console.log("node.isClose",u,n.value),u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+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=pC.reduce(n.nodes),d=OR(...l,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(d.length!==0)return l.length>1&&d.length>1?`(${d})`:d}if(n.nodes)for(let l of n.nodes)c+=r(l,n);return c};return r(e)};fC.exports=BR});var yC=E((fz,hC)=>{"use strict";var MR=Vd(),gC=_u(),Si=Fu(),bo=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?Si.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let s of o)n.push(bo(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?bo(o,s,r):o+s);return Si.flatten(n)},LR=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(o,s={})=>{o.queue=[];let i=s,a=s.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,a=i.queue;if(o.invalid||o.dollar){a.push(bo(a.pop(),gC(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(bo(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let d=Si.reduce(o.nodes);if(Si.exceedsLimit(...d,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=MR(...d,t);p.length===0&&(p=gC(o,t)),a.push(bo(a.pop(),p)),o.nodes=[];return}let u=Si.encloseBrace(o),c=o.queue,l=o;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,c=l.queue;for(let d=0;d<o.nodes.length;d++){let p=o.nodes[d];if(p.type==="comma"&&o.type==="brace"){d===1&&c.push(""),c.push("");continue}if(p.type==="close"){a.push(bo(a.pop(),c,u));continue}if(p.value&&p.type!=="open"){c.push(bo(c.pop(),p.value));continue}p.nodes&&n(p,o)}return c};return Si.flatten(n(e))};hC.exports=LR});var vC=E((mz,DC)=>{"use strict";DC.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:`
|
|
1485
|
-
`,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 SC=E((gz,wC)=>{"use strict";var jR=_u(),{MAX_LENGTH:CC,CHAR_BACKSLASH:Gd,CHAR_BACKTICK:UR,CHAR_COMMA:VR,CHAR_DOT:GR,CHAR_LEFT_PARENTHESES:HR,CHAR_RIGHT_PARENTHESES:qR,CHAR_LEFT_CURLY_BRACE:zR,CHAR_RIGHT_CURLY_BRACE:KR,CHAR_LEFT_SQUARE_BRACKET:bC,CHAR_RIGHT_SQUARE_BRACKET:xC,CHAR_DOUBLE_QUOTE:WR,CHAR_SINGLE_QUOTE:JR,CHAR_NO_BREAK_SPACE:YR,CHAR_ZERO_WIDTH_NOBREAK_SPACE:QR}=vC(),ZR=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(CC,r.maxLength):CC;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let o={type:"root",input:e,nodes:[]},s=[o],i=o,a=o,u=0,c=e.length,l=0,d=0,p,h=()=>e[l++],m=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return i.nodes.push(g),g.parent=i,g.prev=a,a=g,g};for(m({type:"bos"});l<c;)if(i=s[s.length-1],p=h(),!(p===QR||p===YR)){if(p===Gd){m({type:"text",value:(t.keepEscaping?p:"")+h()});continue}if(p===xC){m({type:"text",value:"\\"+p});continue}if(p===bC){u++;let g;for(;l<c&&(g=h());){if(p+=g,g===bC){u++;continue}if(g===Gd){p+=h();continue}if(g===xC&&(u--,u===0))break}m({type:"text",value:p});continue}if(p===HR){i=m({type:"paren",nodes:[]}),s.push(i),m({type:"text",value:p});continue}if(p===qR){if(i.type!=="paren"){m({type:"text",value:p});continue}i=s.pop(),m({type:"text",value:p}),i=s[s.length-1];continue}if(p===WR||p===JR||p===UR){let g=p,y;for(t.keepQuotes!==!0&&(p="");l<c&&(y=h());){if(y===Gd){p+=y+h();continue}if(y===g){t.keepQuotes===!0&&(p+=y);break}p+=y}m({type:"text",value:p});continue}if(p===zR){d++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||i.dollar===!0,depth:d,commas:0,ranges:0,nodes:[]};i=m(y),s.push(i),m({type:"open",value:p});continue}if(p===KR){if(i.type!=="brace"){m({type:"text",value:p});continue}let g="close";i=s.pop(),i.close=!0,m({type:g,value:p}),d--,i=s[s.length-1];continue}if(p===VR&&d>0){if(i.ranges>0){i.ranges=0;let g=i.nodes.shift();i.nodes=[g,{type:"text",value:jR(i)}]}m({type:"comma",value:p}),i.commas++;continue}if(p===GR&&d>0&&i.commas===0){let g=i.nodes;if(d===0||g.length===0){m({type:"text",value:p});continue}if(a.type==="dot"){if(i.range=[],a.value+=p,a.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,a.type="text";continue}i.ranges++,i.args=[];continue}if(a.type==="range"){g.pop();let y=g[g.length-1];y.value+=a.value+p,a=y,i.ranges--;continue}m({type:"dot",value:p});continue}m({type:"text",value:p})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(D=>{D.nodes||(D.type==="open"&&(D.isOpen=!0),D.type==="close"&&(D.isClose=!0),D.nodes||(D.type="text"),D.invalid=!0)});let g=s[s.length-1],y=g.nodes.indexOf(i);g.nodes.splice(y,1,...i.nodes)}while(s.length>0);return m({type:"eos"}),o};wC.exports=ZR});var AC=E((hz,PC)=>{"use strict";var EC=_u(),XR=mC(),eI=yC(),tI=SC(),Vt=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=Vt.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(Vt.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Vt.parse=(e,t={})=>tI(e,t);Vt.stringify=(e,t={})=>EC(typeof e=="string"?Vt.parse(e,t):e,t);Vt.compile=(e,t={})=>(typeof e=="string"&&(e=Vt.parse(e,t)),XR(e,t));Vt.expand=(e,t={})=>{typeof e=="string"&&(e=Vt.parse(e,t));let r=eI(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Vt.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Vt.compile(e,t):Vt.expand(e,t);PC.exports=Vt});var js=E((yz,IC)=>{"use strict";var rI=re("path"),zr="\\\\/",TC=`[^${zr}]`,gn="\\.",nI="\\+",oI="\\?",ku="\\/",iI="(?=.)",FC="[^/]",Hd=`(?:${ku}|$)`,_C=`(?:^|${ku})`,qd=`${gn}{1,2}${Hd}`,sI=`(?!${gn})`,aI=`(?!${_C}${qd})`,uI=`(?!${gn}{0,1}${Hd})`,cI=`(?!${qd})`,lI=`[^.${ku}]`,dI=`${FC}*?`,RC={DOT_LITERAL:gn,PLUS_LITERAL:nI,QMARK_LITERAL:oI,SLASH_LITERAL:ku,ONE_CHAR:iI,QMARK:FC,END_ANCHOR:Hd,DOTS_SLASH:qd,NO_DOT:sI,NO_DOTS:aI,NO_DOT_SLASH:uI,NO_DOTS_SLASH:cI,QMARK_NO_DOT:lI,STAR:dI,START_ANCHOR:_C},pI={...RC,SLASH_LITERAL:`[${zr}]`,QMARK:TC,STAR:`${TC}*?`,DOTS_SLASH:`${gn}{1,2}(?:[${zr}]|$)`,NO_DOT:`(?!${gn})`,NO_DOTS:`(?!(?:^|[${zr}])${gn}{1,2}(?:[${zr}]|$))`,NO_DOT_SLASH:`(?!${gn}{0,1}(?:[${zr}]|$))`,NO_DOTS_SLASH:`(?!${gn}{1,2}(?:[${zr}]|$))`,QMARK_NO_DOT:`[^.${zr}]`,START_ANCHOR:`(?:^|[${zr}])`,END_ANCHOR:`(?:[${zr}]|$)`},fI={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"};IC.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:fI,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:rI.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?pI:RC}}});var Us=E(Pt=>{"use strict";var mI=re("path"),gI=process.platform==="win32",{REGEX_BACKSLASH:hI,REGEX_REMOVE_BACKSLASH:yI,REGEX_SPECIAL_CHARS:DI,REGEX_SPECIAL_CHARS_GLOBAL:vI}=js();Pt.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Pt.hasRegexChars=e=>DI.test(e);Pt.isRegexChar=e=>e.length===1&&Pt.hasRegexChars(e);Pt.escapeRegex=e=>e.replace(vI,"\\$1");Pt.toPosixSlashes=e=>e.replace(hI,"/");Pt.removeBackslashes=e=>e.replace(yI,t=>t==="\\"?"":t);Pt.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Pt.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:gI===!0||mI.sep==="\\";Pt.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Pt.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Pt.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Pt.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",s=`${n}(?:${e})${o}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var jC=E((vz,LC)=>{"use strict";var kC=Us(),{CHAR_ASTERISK:zd,CHAR_AT:CI,CHAR_BACKWARD_SLASH:Vs,CHAR_COMMA:bI,CHAR_DOT:Kd,CHAR_EXCLAMATION_MARK:Wd,CHAR_FORWARD_SLASH:MC,CHAR_LEFT_CURLY_BRACE:Jd,CHAR_LEFT_PARENTHESES:Yd,CHAR_LEFT_SQUARE_BRACKET:xI,CHAR_PLUS:wI,CHAR_QUESTION_MARK:$C,CHAR_RIGHT_CURLY_BRACE:SI,CHAR_RIGHT_PARENTHESES:NC,CHAR_RIGHT_SQUARE_BRACKET:EI}=js(),OC=e=>e===MC||e===Vs,BC=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},PI=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,s=[],i=[],a=[],u=e,c=-1,l=0,d=0,p=!1,h=!1,m=!1,g=!1,y=!1,D=!1,S=!1,w=!1,F=!1,A=!1,_=0,k,O,$={value:"",depth:0,isGlob:!1},R=()=>c>=n,C=()=>u.charCodeAt(c+1),U=()=>(k=O,u.charCodeAt(++c));for(;c<n;){O=U();let $e;if(O===Vs){S=$.backslashes=!0,O=U(),O===Jd&&(D=!0);continue}if(D===!0||O===Jd){for(_++;R()!==!0&&(O=U());){if(O===Vs){S=$.backslashes=!0,U();continue}if(O===Jd){_++;continue}if(D!==!0&&O===Kd&&(O=U())===Kd){if(p=$.isBrace=!0,m=$.isGlob=!0,A=!0,o===!0)continue;break}if(D!==!0&&O===bI){if(p=$.isBrace=!0,m=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===SI&&(_--,_===0)){D=!1,p=$.isBrace=!0,A=!0;break}}if(o===!0)continue;break}if(O===MC){if(s.push(c),i.push($),$={value:"",depth:0,isGlob:!1},A===!0)continue;if(k===Kd&&c===l+1){l+=2;continue}d=c+1;continue}if(r.noext!==!0&&(O===wI||O===CI||O===zd||O===$C||O===Wd)===!0&&C()===Yd){if(m=$.isGlob=!0,g=$.isExtglob=!0,A=!0,O===Wd&&c===l&&(F=!0),o===!0){for(;R()!==!0&&(O=U());){if(O===Vs){S=$.backslashes=!0,O=U();continue}if(O===NC){m=$.isGlob=!0,A=!0;break}}continue}break}if(O===zd){if(k===zd&&(y=$.isGlobstar=!0),m=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===$C){if(m=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===xI){for(;R()!==!0&&($e=U());){if($e===Vs){S=$.backslashes=!0,U();continue}if($e===EI){h=$.isBracket=!0,m=$.isGlob=!0,A=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&O===Wd&&c===l){w=$.negated=!0,l++;continue}if(r.noparen!==!0&&O===Yd){if(m=$.isGlob=!0,o===!0){for(;R()!==!0&&(O=U());){if(O===Yd){S=$.backslashes=!0,O=U();continue}if(O===NC){A=!0;break}}continue}break}if(m===!0){if(A=!0,o===!0)continue;break}}r.noext===!0&&(g=!1,m=!1);let H=u,K="",x="";l>0&&(K=u.slice(0,l),u=u.slice(l),d-=l),H&&m===!0&&d>0?(H=u.slice(0,d),x=u.slice(d)):m===!0?(H="",x=u):H=u,H&&H!==""&&H!=="/"&&H!==u&&OC(H.charCodeAt(H.length-1))&&(H=H.slice(0,-1)),r.unescape===!0&&(x&&(x=kC.removeBackslashes(x)),H&&S===!0&&(H=kC.removeBackslashes(H)));let P={prefix:K,input:e,start:l,base:H,glob:x,isBrace:p,isBracket:h,isGlob:m,isExtglob:g,isGlobstar:y,negated:w,negatedExtglob:F};if(r.tokens===!0&&(P.maxDepth=0,OC(O)||i.push($),P.tokens=i),r.parts===!0||r.tokens===!0){let $e;for(let De=0;De<s.length;De++){let Ar=$e?$e+1:l,Tr=s[De],Ot=e.slice(Ar,Tr);r.tokens&&(De===0&&l!==0?(i[De].isPrefix=!0,i[De].value=K):i[De].value=Ot,BC(i[De]),P.maxDepth+=i[De].depth),(De!==0||Ot!=="")&&a.push(Ot),$e=Tr}if($e&&$e+1<e.length){let De=e.slice($e+1);a.push(De),r.tokens&&(i[i.length-1].value=De,BC(i[i.length-1]),P.maxDepth+=i[i.length-1].depth)}P.slashes=s,P.parts=a}return P};LC.exports=PI});var GC=E((Cz,VC)=>{"use strict";var $u=js(),Gt=Us(),{MAX_LENGTH:Nu,POSIX_REGEX_SOURCE:AI,REGEX_NON_SPECIAL_CHARS:TI,REGEX_SPECIAL_CHARS_BACKREF:FI,REPLACEMENTS:UC}=$u,_I=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(o=>Gt.escapeRegex(o)).join("..")}return r},Ei=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Qd=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=UC[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(Nu,r.maxLength):Nu,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},i=[s],a=r.capture?"":"?:",u=Gt.isWindows(t),c=$u.globChars(u),l=$u.extglobChars(c),{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:D,NO_DOTS_SLASH:S,QMARK:w,QMARK_NO_DOT:F,STAR:A,START_ANCHOR:_}=c,k=L=>`(${a}(?:(?!${_}${L.dot?g:d}).)*?)`,O=r.dot?"":y,$=r.dot?w:F,R=r.bash===!0?k(r):A;r.capture&&(R=`(${R})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let C={input:e,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:i};e=Gt.removePrefix(e,C),o=e.length;let U=[],H=[],K=[],x=s,P,$e=()=>C.index===o-1,De=C.peek=(L=1)=>e[C.index+L],Ar=C.advance=()=>e[++C.index]||"",Tr=()=>e.slice(C.index+1),Ot=(L="",Ae=0)=>{C.consumed+=L,C.index+=Ae},Ia=L=>{C.output+=L.output!=null?L.output:L.value,Ot(L.value)},iP=()=>{let L=1;for(;De()==="!"&&(De(2)!=="("||De(3)==="?");)Ar(),C.start++,L++;return L%2===0?!1:(C.negated=!0,C.start++,!0)},ka=L=>{C[L]++,K.push(L)},eo=L=>{C[L]--,K.pop()},ae=L=>{if(x.type==="globstar"){let Ae=C.braces>0&&(L.type==="comma"||L.type==="brace"),N=L.extglob===!0||U.length&&(L.type==="pipe"||L.type==="paren");L.type!=="slash"&&L.type!=="paren"&&!Ae&&!N&&(C.output=C.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=R,C.output+=x.output)}if(U.length&&L.type!=="paren"&&(U[U.length-1].inner+=L.value),(L.value||L.output)&&Ia(L),x&&x.type==="text"&&L.type==="text"){x.value+=L.value,x.output=(x.output||"")+L.value;return}L.prev=x,i.push(L),x=L},$a=(L,Ae)=>{let N={...l[Ae],conditions:1,inner:""};N.prev=x,N.parens=C.parens,N.output=C.output;let oe=(r.capture?"(":"")+N.open;ka("parens"),ae({type:L,value:Ae,output:C.output?"":m}),ae({type:"paren",extglob:!0,value:Ar(),output:oe}),U.push(N)},sP=L=>{let Ae=L.close+(r.capture?")":""),N;if(L.type==="negate"){let oe=R;if(L.inner&&L.inner.length>1&&L.inner.includes("/")&&(oe=k(r)),(oe!==R||$e()||/^\)+$/.test(Tr()))&&(Ae=L.close=`)$))${oe}`),L.inner.includes("*")&&(N=Tr())&&/^\.[^\\/.]+$/.test(N)){let Ne=Qd(N,{...t,fastpaths:!1}).output;Ae=L.close=`)${Ne})${oe})`}L.prev.type==="bos"&&(C.negatedExtglob=!0)}ae({type:"paren",extglob:!0,value:P,output:Ae}),eo("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let L=!1,Ae=e.replace(FI,(N,oe,Ne,pt,Ge,zc)=>pt==="\\"?(L=!0,N):pt==="?"?oe?oe+pt+(Ge?w.repeat(Ge.length):""):zc===0?$+(Ge?w.repeat(Ge.length):""):w.repeat(Ne.length):pt==="."?d.repeat(Ne.length):pt==="*"?oe?oe+pt+(Ge?R:""):R:oe?N:`\\${N}`);return L===!0&&(r.unescape===!0?Ae=Ae.replace(/\\/g,""):Ae=Ae.replace(/\\+/g,N=>N.length%2===0?"\\\\":N?"\\":"")),Ae===e&&r.contains===!0?(C.output=e,C):(C.output=Gt.wrapOutput(Ae,C,t),C)}for(;!$e();){if(P=Ar(),P==="\0")continue;if(P==="\\"){let N=De();if(N==="/"&&r.bash!==!0||N==="."||N===";")continue;if(!N){P+="\\",ae({type:"text",value:P});continue}let oe=/^\\+/.exec(Tr()),Ne=0;if(oe&&oe[0].length>2&&(Ne=oe[0].length,C.index+=Ne,Ne%2!==0&&(P+="\\")),r.unescape===!0?P=Ar():P+=Ar(),C.brackets===0){ae({type:"text",value:P});continue}}if(C.brackets>0&&(P!=="]"||x.value==="["||x.value==="[^")){if(r.posix!==!1&&P===":"){let N=x.value.slice(1);if(N.includes("[")&&(x.posix=!0,N.includes(":"))){let oe=x.value.lastIndexOf("["),Ne=x.value.slice(0,oe),pt=x.value.slice(oe+2),Ge=AI[pt];if(Ge){x.value=Ne+Ge,C.backtrack=!0,Ar(),!s.output&&i.indexOf(x)===1&&(s.output=m);continue}}}(P==="["&&De()!==":"||P==="-"&&De()==="]")&&(P=`\\${P}`),P==="]"&&(x.value==="["||x.value==="[^")&&(P=`\\${P}`),r.posix===!0&&P==="!"&&x.value==="["&&(P="^"),x.value+=P,Ia({value:P});continue}if(C.quotes===1&&P!=='"'){P=Gt.escapeRegex(P),x.value+=P,Ia({value:P});continue}if(P==='"'){C.quotes=C.quotes===1?0:1,r.keepQuotes===!0&&ae({type:"text",value:P});continue}if(P==="("){ka("parens"),ae({type:"paren",value:P});continue}if(P===")"){if(C.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Ei("opening","("));let N=U[U.length-1];if(N&&C.parens===N.parens+1){sP(U.pop());continue}ae({type:"paren",value:P,output:C.parens?")":"\\)"}),eo("parens");continue}if(P==="["){if(r.nobracket===!0||!Tr().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Ei("closing","]"));P=`\\${P}`}else ka("brackets");ae({type:"bracket",value:P});continue}if(P==="]"){if(r.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){ae({type:"text",value:P,output:`\\${P}`});continue}if(C.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Ei("opening","["));ae({type:"text",value:P,output:`\\${P}`});continue}eo("brackets");let N=x.value.slice(1);if(x.posix!==!0&&N[0]==="^"&&!N.includes("/")&&(P=`/${P}`),x.value+=P,Ia({value:P}),r.literalBrackets===!1||Gt.hasRegexChars(N))continue;let oe=Gt.escapeRegex(x.value);if(C.output=C.output.slice(0,-x.value.length),r.literalBrackets===!0){C.output+=oe,x.value=oe;continue}x.value=`(${a}${oe}|${x.value})`,C.output+=x.value;continue}if(P==="{"&&r.nobrace!==!0){ka("braces");let N={type:"brace",value:P,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};H.push(N),ae(N);continue}if(P==="}"){let N=H[H.length-1];if(r.nobrace===!0||!N){ae({type:"text",value:P,output:P});continue}let oe=")";if(N.dots===!0){let Ne=i.slice(),pt=[];for(let Ge=Ne.length-1;Ge>=0&&(i.pop(),Ne[Ge].type!=="brace");Ge--)Ne[Ge].type!=="dots"&&pt.unshift(Ne[Ge].value);oe=_I(pt,r),C.backtrack=!0}if(N.comma!==!0&&N.dots!==!0){let Ne=C.output.slice(0,N.outputIndex),pt=C.tokens.slice(N.tokensIndex);N.value=N.output="\\{",P=oe="\\}",C.output=Ne;for(let Ge of pt)C.output+=Ge.output||Ge.value}ae({type:"brace",value:P,output:oe}),eo("braces"),H.pop();continue}if(P==="|"){U.length>0&&U[U.length-1].conditions++,ae({type:"text",value:P});continue}if(P===","){let N=P,oe=H[H.length-1];oe&&K[K.length-1]==="braces"&&(oe.comma=!0,N="|"),ae({type:"comma",value:P,output:N});continue}if(P==="/"){if(x.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",i.pop(),x=s;continue}ae({type:"slash",value:P,output:h});continue}if(P==="."){if(C.braces>0&&x.type==="dot"){x.value==="."&&(x.output=d);let N=H[H.length-1];x.type="dots",x.output+=P,x.value+=P,N.dots=!0;continue}if(C.braces+C.parens===0&&x.type!=="bos"&&x.type!=="slash"){ae({type:"text",value:P,output:d});continue}ae({type:"dot",value:P,output:d});continue}if(P==="?"){if(!(x&&x.value==="(")&&r.noextglob!==!0&&De()==="("&&De(2)!=="?"){$a("qmark",P);continue}if(x&&x.type==="paren"){let oe=De(),Ne=P;if(oe==="<"&&!Gt.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(Tr()))&&(Ne=`\\${P}`),ae({type:"text",value:P,output:Ne});continue}if(r.dot!==!0&&(x.type==="slash"||x.type==="bos")){ae({type:"qmark",value:P,output:F});continue}ae({type:"qmark",value:P,output:w});continue}if(P==="!"){if(r.noextglob!==!0&&De()==="("&&(De(2)!=="?"||!/[!=<:]/.test(De(3)))){$a("negate",P);continue}if(r.nonegate!==!0&&C.index===0){iP();continue}}if(P==="+"){if(r.noextglob!==!0&&De()==="("&&De(2)!=="?"){$a("plus",P);continue}if(x&&x.value==="("||r.regex===!1){ae({type:"plus",value:P,output:p});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||C.parens>0){ae({type:"plus",value:P});continue}ae({type:"plus",value:p});continue}if(P==="@"){if(r.noextglob!==!0&&De()==="("&&De(2)!=="?"){ae({type:"at",extglob:!0,value:P,output:""});continue}ae({type:"text",value:P});continue}if(P!=="*"){(P==="$"||P==="^")&&(P=`\\${P}`);let N=TI.exec(Tr());N&&(P+=N[0],C.index+=N[0].length),ae({type:"text",value:P});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=P,x.output=R,C.backtrack=!0,C.globstar=!0,Ot(P);continue}let L=Tr();if(r.noextglob!==!0&&/^\([^?]/.test(L)){$a("star",P);continue}if(x.type==="star"){if(r.noglobstar===!0){Ot(P);continue}let N=x.prev,oe=N.prev,Ne=N.type==="slash"||N.type==="bos",pt=oe&&(oe.type==="star"||oe.type==="globstar");if(r.bash===!0&&(!Ne||L[0]&&L[0]!=="/")){ae({type:"star",value:P,output:""});continue}let Ge=C.braces>0&&(N.type==="comma"||N.type==="brace"),zc=U.length&&(N.type==="pipe"||N.type==="paren");if(!Ne&&N.type!=="paren"&&!Ge&&!zc){ae({type:"star",value:P,output:""});continue}for(;L.slice(0,3)==="/**";){let Na=e[C.index+4];if(Na&&Na!=="/")break;L=L.slice(3),Ot("/**",3)}if(N.type==="bos"&&$e()){x.type="globstar",x.value+=P,x.output=k(r),C.output=x.output,C.globstar=!0,Ot(P);continue}if(N.type==="slash"&&N.prev.type!=="bos"&&!pt&&$e()){C.output=C.output.slice(0,-(N.output+x.output).length),N.output=`(?:${N.output}`,x.type="globstar",x.output=k(r)+(r.strictSlashes?")":"|$)"),x.value+=P,C.globstar=!0,C.output+=N.output+x.output,Ot(P);continue}if(N.type==="slash"&&N.prev.type!=="bos"&&L[0]==="/"){let Na=L[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(N.output+x.output).length),N.output=`(?:${N.output}`,x.type="globstar",x.output=`${k(r)}${h}|${h}${Na})`,x.value+=P,C.output+=N.output+x.output,C.globstar=!0,Ot(P+Ar()),ae({type:"slash",value:"/",output:""});continue}if(N.type==="bos"&&L[0]==="/"){x.type="globstar",x.value+=P,x.output=`(?:^|${h}|${k(r)}${h})`,C.output=x.output,C.globstar=!0,Ot(P+Ar()),ae({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-x.output.length),x.type="globstar",x.output=k(r),x.value+=P,C.output+=x.output,C.globstar=!0,Ot(P);continue}let Ae={type:"star",value:P,output:R};if(r.bash===!0){Ae.output=".*?",(x.type==="bos"||x.type==="slash")&&(Ae.output=O+Ae.output),ae(Ae);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&r.regex===!0){Ae.output=P,ae(Ae);continue}(C.index===C.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?(C.output+=D,x.output+=D):r.dot===!0?(C.output+=S,x.output+=S):(C.output+=O,x.output+=O),De()!=="*"&&(C.output+=m,x.output+=m)),ae(Ae)}for(;C.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ei("closing","]"));C.output=Gt.escapeLast(C.output,"["),eo("brackets")}for(;C.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ei("closing",")"));C.output=Gt.escapeLast(C.output,"("),eo("parens")}for(;C.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ei("closing","}"));C.output=Gt.escapeLast(C.output,"{"),eo("braces")}if(r.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&ae({type:"maybe_slash",value:"",output:`${h}?`}),C.backtrack===!0){C.output="";for(let L of C.tokens)C.output+=L.output!=null?L.output:L.value,L.suffix&&(C.output+=L.suffix)}return C};Qd.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(Nu,r.maxLength):Nu,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=UC[e]||e;let s=Gt.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:h,START_ANCHOR:m}=$u.globChars(s),g=r.dot?d:l,y=r.dot?p:l,D=r.capture?"":"?:",S={negated:!1,prefix:""},w=r.bash===!0?".*?":h;r.capture&&(w=`(${w})`);let F=O=>O.noglobstar===!0?w:`(${D}(?:(?!${m}${O.dot?c:i}).)*?)`,A=O=>{switch(O){case"*":return`${g}${u}${w}`;case".*":return`${i}${u}${w}`;case"*.*":return`${g}${w}${i}${u}${w}`;case"*/*":return`${g}${w}${a}${u}${y}${w}`;case"**":return g+F(r);case"**/*":return`(?:${g}${F(r)}${a})?${y}${u}${w}`;case"**/*.*":return`(?:${g}${F(r)}${a})?${y}${w}${i}${u}${w}`;case"**/.*":return`(?:${g}${F(r)}${a})?${i}${u}${w}`;default:{let $=/^(.*?)\.(\w+)$/.exec(O);if(!$)return;let R=A($[1]);return R?R+i+$[2]:void 0}}},_=Gt.removePrefix(e,S),k=A(_);return k&&r.strictSlashes!==!0&&(k+=`${a}?`),k};VC.exports=Qd});var qC=E((bz,HC)=>{"use strict";var RI=re("path"),II=jC(),Zd=GC(),Xd=Us(),kI=js(),$I=e=>e&&typeof e=="object"&&!Array.isArray(e),je=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(p=>je(p,t,r));return p=>{for(let h of l){let m=h(p);if(m)return m}return!1}}let n=$I(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},s=Xd.isWindows(t),i=n?je.compileRe(e,t):je.makeRe(e,t,!1,!0),a=i.state;delete i.state;let u=()=>!1;if(o.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};u=je(o.ignore,l,r)}let c=(l,d=!1)=>{let{isMatch:p,match:h,output:m}=je.test(l,i,t,{glob:e,posix:s}),g={glob:e,state:a,regex:i,posix:s,input:l,output:m,match:h,isMatch:p};return typeof o.onResult=="function"&&o.onResult(g),p===!1?(g.isMatch=!1,d?g:!1):u(l)?(typeof o.onIgnore=="function"&&o.onIgnore(g),g.isMatch=!1,d?g:!1):(typeof o.onMatch=="function"&&o.onMatch(g),d?g:!0)};return r&&(c.state=a),c};je.test=(e,t,r,{glob:n,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},i=s.format||(o?Xd.toPosixSlashes:null),a=e===n,u=a&&i?i(e):e;return a===!1&&(u=i?i(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=je.matchBase(e,t,r,o):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};je.matchBase=(e,t,r,n=Xd.isWindows(r))=>(t instanceof RegExp?t:je.makeRe(t,r)).test(RI.basename(e));je.isMatch=(e,t,r)=>je(t,r)(e);je.parse=(e,t)=>Array.isArray(e)?e.map(r=>je.parse(r,t)):Zd(e,{...t,fastpaths:!1});je.scan=(e,t)=>II(e,t);je.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let o=t||{},s=o.contains?"":"^",i=o.contains?"":"$",a=`${s}(?:${e.output})${i}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=je.toRegex(a,t);return n===!0&&(u.state=e),u};je.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=Zd.fastpaths(e,t)),o.output||(o=Zd(e,t)),je.compileRe(o,t,r,n)};je.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};je.constants=kI;HC.exports=je});var KC=E((xz,zC)=>{"use strict";zC.exports=qC()});var tp=E((wz,ZC)=>{"use strict";var JC=re("util"),YC=AC(),Kr=KC(),ep=Us(),WC=e=>e===""||e==="./",QC=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},_e=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,s=new Set,i=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let d=Kr(String(t[l]),{...r,onResult:a},!0),p=d.state.negated||d.state.negatedExtglob;p&&i++;for(let h of e){let m=d(h,!0);(p?!m.isMatch:m.isMatch)&&(p?n.add(m.output):(n.delete(m.output),o.add(m.output)))}}let c=(i===t.length?[...s]:[...o]).filter(l=>!n.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return c};_e.match=_e;_e.matcher=(e,t)=>Kr(e,t);_e.isMatch=(e,t,r)=>Kr(t,r)(e);_e.any=_e.isMatch;_e.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],s=a=>{r.onResult&&r.onResult(a),o.push(a.output)},i=new Set(_e(e,t,{...r,onResult:s}));for(let a of o)i.has(a)||n.add(a);return[...n]};_e.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${JC.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>_e.contains(e,n,r));if(typeof t=="string"){if(WC(e)||WC(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return _e.isMatch(e,t,{...r,contains:!0})};_e.matchKeys=(e,t,r)=>{if(!ep.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=_e(Object.keys(e),t,r),o={};for(let s of n)o[s]=e[s];return o};_e.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Kr(String(o),r);if(n.some(i=>s(i)))return!0}return!1};_e.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Kr(String(o),r);if(!n.every(i=>s(i)))return!1}return!0};_e.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${JC.inspect(e)}"`);return[].concat(t).every(n=>Kr(n,r)(e))};_e.capture=(e,t,r)=>{let n=ep.isWindows(r),s=Kr.makeRe(String(e),{...r,capture:!0}).exec(n?ep.toPosixSlashes(t):t);if(s)return s.slice(1).map(i=>i===void 0?"":i)};_e.makeRe=(...e)=>Kr.makeRe(...e);_e.scan=(...e)=>Kr.scan(...e);_e.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of YC(String(n),t))r.push(Kr.parse(o,t));return r};_e.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!QC(e)?[e]:YC(e,t)};_e.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return _e.braces(e,{...t,expand:!0})};_e.hasBraces=QC;ZC.exports=_e});var NI,rp=v(()=>{"use strict";NI=Me(tp(),1)});var BI,XC=v(()=>{"use strict";BI=Me(tp(),1);rp()});var eb=v(()=>{"use strict"});var Ou=v(()=>{"use strict"});var tb=v(()=>{"use strict";wi()});var Gs=E(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.isSSL=void 0;Ht.setupOutgoing=VI;Ht.setupSocket=GI;Ht.getPort=HI;Ht.hasEncryptedConnection=nb;Ht.urlJoin=ob;Ht.rewriteCookieProperty=ib;Ht.toURL=sb;var MI=re("node:tls"),LI=/(^|,)\s*upgrade\s*($|,)/i;Ht.isSSL=/^https|wss/;var jI="trailer",UI=[":method",":path",":scheme",":authority"];function VI(e,t,r,n){let o=t[n||"target"];e.port=+(o.port??(o.protocol!==void 0&&Ht.isSSL.test(o.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=o[a];e.method=t.method||r.method,e.headers={...r.headers},t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(jI==a.toLowerCase()){delete e.headers[a];break}if(r.httpVersionMajor>1)for(let a of UI)delete e.headers[a];t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),o.protocol!==void 0&&Ht.isSSL.test(o.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!LI.test(e.headers.connection))&&(e.headers.connection="close"));let s=o&&t.prependPath!==!1&&"pathname"in o?rb(`${o.pathname}${o.search??""}`):"/",i=t.toProxy?r.url:rb(r.url);return i=t.ignorePath?"":i,e.path=ob(s,i??""),t.changeOrigin&&(e.headers.host=o.protocol!==void 0&&zI(e.port,o.protocol)&&!qI(e.host)?e.host+":"+e.port:e.host),e}function GI(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function HI(e){let t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:nb(e)?"443":"80"}function nb(e){let t=e.connection;return t instanceof MI.TLSSocket&&t.encrypted||!!t.pair}function ob(...e){let t=[],r="";e.forEach((o,s)=>{let i=o.indexOf("?");i!==-1&&(t.push(o.substring(i+1)),e[s]=o.substring(0,i))}),r=t.filter(Boolean).join("&");let n="";for(let o of e)o&&(n.endsWith("/")?o.startsWith("/")?n+=o.slice(1):n+=o:o.startsWith("/")?n+=o:n+="/"+o);return r?n+"?"+r:n}function ib(e,t,r){return Array.isArray(e)?e.map(n=>ib(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,o,s)=>{let i;if(s in t)i=t[s];else if("*"in t)i=t["*"];else return n;return i?o+i:""})}function qI(e){return!!~e.indexOf(":")}function rb(e){if(e===""||e?.startsWith("?"))return e;let t=sb(e);return`${t.pathname??""}${t.search??""}`}function sb(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://base.invalid${e}`),new URL(e,"http://base.invalid"))}function zI(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var np=E(Dt=>{"use strict";var KI=Dt&&Dt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),WI=Dt&&Dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),JI=Dt&&Dt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&KI(r,t,n[o]);return WI(r,t),r}})();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.OUTGOING_PASSES=void 0;Dt.removeChunked=ab;Dt.setConnection=ub;Dt.setRedirectHostRewrite=cb;Dt.writeHeaders=lb;Dt.writeStatusCode=db;var Bu=JI(Gs()),YI=/^201|30(1|2|7|8)$/;function ab(e,t,r){delete r.headers["transfer-encoding"]}function ub(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function cb(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&YI.test(`${r.statusCode}`)){let o=Bu.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let i=Bu.toURL(s);if(o.host!=i.host)return;n.hostRewrite?i.host=n.hostRewrite:n.autoRewrite&&(i.host=e.headers.host??""),n.protocolRewrite&&(i.protocol=n.protocolRewrite),r.headers.location=i.toString()}}function lb(e,t,r,n){let o=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,i=n.preserveHeaderKeyCase,a=(c,l)=>{l!=null&&(o&&c.toLowerCase()==="set-cookie"&&(l=Bu.rewriteCookieProperty(l,o,"domain")),s&&c.toLowerCase()==="set-cookie"&&(l=Bu.rewriteCookieProperty(l,s,"path")),t.setHeader(String(c).trim(),l))},u;if(i&&r.rawHeaders!=null){u={};for(let c=0;c<r.rawHeaders.length;c+=2){let l=r.rawHeaders[c];u[l.toLowerCase()]=l}}for(let c in r.headers){let l=c;if(e.httpVersionMajor>1&&l==="connection")continue;let d=r.headers[l];i&&u&&(l=u[l]??l),a(l,d)}}function db(e,t,r){t.statusCode=r.statusCode,r.statusMessage&&e.httpVersionMajor===1&&(t.statusMessage=r.statusMessage)}Dt.OUTGOING_PASSES={removeChunked:ab,setConnection:ub,setRedirectHostRewrite:cb,writeHeaders:lb,writeStatusCode:db}});var fb=E((Nz,pb)=>{var Pi=1e3,Ai=Pi*60,Ti=Ai*60,xo=Ti*24,QI=xo*7,ZI=xo*365.25;pb.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return XI(e);if(r==="number"&&isFinite(e))return t.long?t1(e):e1(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function XI(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ZI;case"weeks":case"week":case"w":return r*QI;case"days":case"day":case"d":return r*xo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ti;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ai;case"seconds":case"second":case"secs":case"sec":case"s":return r*Pi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function e1(e){var t=Math.abs(e);return t>=xo?Math.round(e/xo)+"d":t>=Ti?Math.round(e/Ti)+"h":t>=Ai?Math.round(e/Ai)+"m":t>=Pi?Math.round(e/Pi)+"s":e+"ms"}function t1(e){var t=Math.abs(e);return t>=xo?Mu(e,t,xo,"day"):t>=Ti?Mu(e,t,Ti,"hour"):t>=Ai?Mu(e,t,Ai,"minute"):t>=Pi?Mu(e,t,Pi,"second"):e+" ms"}function Mu(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var op=E((Oz,mb)=>{function r1(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=a,r.humanize=fb(),r.destroy=c,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let d=0;for(let p=0;p<l.length;p++)d=(d<<5)-d+l.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(l){let d,p=null,h,m;function g(...y){if(!g.enabled)return;let D=g,S=Number(new Date),w=S-(d||S);D.diff=w,D.prev=d,D.curr=S,d=S,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let F=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(_,k)=>{if(_==="%%")return"%";F++;let O=r.formatters[k];if(typeof O=="function"){let $=y[F];_=O.call(D,$),y.splice(F,1),F--}return _}),r.formatArgs.call(D,y),(D.log||r.log).apply(D,y)}return g.namespace=l,g.useColors=r.useColors(),g.color=r.selectColor(l),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==r.namespaces&&(h=r.namespaces,m=r.enabled(l)),m),set:y=>{p=y}}),typeof r.init=="function"&&r.init(g),g}function n(l,d){let p=r(this.namespace+(typeof d>"u"?":":d)+l);return p.log=this.log,p}function o(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let d=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let p of d)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function s(l,d){let p=0,h=0,m=-1,g=0;for(;p<l.length;)if(h<d.length&&(d[h]===l[p]||d[h]==="*"))d[h]==="*"?(m=h,g=p,h++):(p++,h++);else if(m!==-1)h=m+1,g++,p=g;else return!1;for(;h<d.length&&d[h]==="*";)h++;return h===d.length}function i(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function a(l){for(let d of r.skips)if(s(l,d))return!1;for(let d of r.names)if(s(l,d))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}mb.exports=r1});var gb=E((qt,Lu)=>{qt.formatArgs=o1;qt.save=i1;qt.load=s1;qt.useColors=n1;qt.storage=a1();qt.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();qt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n1(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o1(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Lu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}qt.log=console.debug||console.log||(()=>{});function i1(e){try{e?qt.storage.setItem("debug",e):qt.storage.removeItem("debug")}catch{}}function s1(){let e;try{e=qt.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function a1(){try{return localStorage}catch{}}Lu.exports=op()(qt);var{formatters:u1}=Lu.exports;u1.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var yb=E((Bz,hb)=>{"use strict";hb.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var Cb=E((Mz,vb)=>{"use strict";var c1=re("os"),Db=re("tty"),rr=yb(),{env:Qe}=process,jn;rr("no-color")||rr("no-colors")||rr("color=false")||rr("color=never")?jn=0:(rr("color")||rr("colors")||rr("color=true")||rr("color=always"))&&(jn=1);"FORCE_COLOR"in Qe&&(Qe.FORCE_COLOR==="true"?jn=1:Qe.FORCE_COLOR==="false"?jn=0:jn=Qe.FORCE_COLOR.length===0?1:Math.min(parseInt(Qe.FORCE_COLOR,10),3));function ip(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function sp(e,t){if(jn===0)return 0;if(rr("color=16m")||rr("color=full")||rr("color=truecolor"))return 3;if(rr("color=256"))return 2;if(e&&!t&&jn===void 0)return 0;let r=jn||0;if(Qe.TERM==="dumb")return r;if(process.platform==="win32"){let n=c1.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Qe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Qe)||Qe.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Qe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Qe.TEAMCITY_VERSION)?1:0;if(Qe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Qe){let n=parseInt((Qe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Qe.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Qe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Qe.TERM)||"COLORTERM"in Qe?1:r}function l1(e){let t=sp(e,e&&e.isTTY);return ip(t)}vb.exports={supportsColor:l1,stdout:ip(sp(!0,Db.isatty(1))),stderr:ip(sp(!0,Db.isatty(2)))}});var xb=E((Ze,Uu)=>{var d1=re("tty"),ju=re("util");Ze.init=D1;Ze.log=g1;Ze.formatArgs=f1;Ze.save=h1;Ze.load=y1;Ze.useColors=p1;Ze.destroy=ju.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ze.colors=[6,2,3,4,5,1];try{let e=Cb();e&&(e.stderr||e).level>=2&&(Ze.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ze.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function p1(){return"colors"in Ze.inspectOpts?!!Ze.inspectOpts.colors:d1.isatty(process.stderr.fd)}function f1(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
|
|
1482
|
+
`)}),pe.info(`Use ${(0,b.cyan)(`npx ${Be()} figma help <command>`)} for detailed help about a command`)}Qa("bye \u{1F44B}")}var b,Ad=v(()=>{"use strict";Lt();b=Me(io(),1);me();bi();Fr()});var vv=v(()=>{"use strict"});var Cv=v(()=>{"use strict"});var bv=v(()=>{"use strict"});var xv=v(()=>{"use strict"});var wv=v(()=>{"use strict"});var Sv=v(()=>{"use strict"});var sR,aR,Td,oz,Ev=v(()=>{"use strict";sR=["steve8708/mui-vite","steve8708/carbon-vite","steve8708/vite-react-shopify-polaris","steve8708/cloudscape-demos","BuilderIO/fusion-angular-tailwind-starter","BuilderIO/fusion-svelte-tailwind-starter","BuilderIO/fusion-vue-tailwind-starter"],aR="BuilderIO/fusion-starter",Td=[...sR,aR],oz=Td.map(e=>`https://github.com/${e}`)});var Pv=v(()=>{"use strict"});var Av=v(()=>{"use strict"});var Tv=v(()=>{"use strict"});var Eu=v(()=>{"use strict";vv();Cv();bv();xv();wv();Sv();Ev();Pv();Av();Tv()});function mn(){}function uR(e,t,r,n,o){for(var s=[],i;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();for(var a=0,u=s.length,c=0,l=0;a<u;a++){var d=s[a];if(d.removed){if(d.value=e.join(n.slice(l,l+d.count)),l+=d.count,a&&s[a-1].added){var h=s[a-1];s[a-1]=s[a],s[a]=h}}else{if(!d.added&&o){var p=r.slice(c,c+d.count);p=p.map(function(m,y){var D=n[l+y];return D.length>m.length?D:m}),d.value=e.join(p)}else d.value=e.join(r.slice(c,c+d.count));c+=d.count,d.added||(l+=d.count)}}var g=s[u-1];return u>1&&typeof g.value=="string"&&(g.added||g.removed)&&e.equals("",g.value)&&(s[u-2].value+=g.value,s.pop()),s}function Pu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pu=function(t){return typeof t}:Pu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(e)}function Fd(e,t,r,n,o){t=t||[],r=r||[],n&&(e=n(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return r[s];var i;if(dR.call(e)==="[object Array]"){for(t.push(e),i=new Array(e.length),r.push(i),s=0;s<e.length;s+=1)i[s]=Fd(e[s],t,r,n,o);return t.pop(),r.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),Pu(e)==="object"&&e!==null){t.push(e),i={},r.push(i);var a=[],u;for(u in e)e.hasOwnProperty(u)&&a.push(u);for(a.sort(),s=0;s<a.length;s+=1)u=a[s],i[u]=Fd(e[u],t,r,n,u);t.pop(),r.pop()}else i=e;return i}var Dz,Fv,_v,Rv,Iv,cR,lR,dR,Ms,_d,kv=v(()=>{mn.prototype={diff:function(t,r){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.callback;typeof o=="function"&&(s=o,o={}),this.options=o;var i=this;function a(F){return s?(setTimeout(function(){s(void 0,F)},0),!0):F}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var u=r.length,c=t.length,l=1,d=u+c;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var p=(n=o.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+p,g=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(g[0],r,t,0);if(g[0].oldPos+1>=c&&m+1>=u)return a([{value:this.join(r),count:r.length}]);var y=-1/0,D=1/0;function w(){for(var F=Math.max(y,-l);F<=Math.min(D,l);F+=2){var A=void 0,_=g[F-1],k=g[F+1];_&&(g[F-1]=void 0);var O=!1;if(k){var $=k.oldPos-F;O=k&&0<=$&&$<u}var R=_&&_.oldPos+1<c;if(!O&&!R){g[F]=void 0;continue}if(!R||O&&_.oldPos+1<k.oldPos?A=i.addToPath(k,!0,void 0,0):A=i.addToPath(_,void 0,!0,1),m=i.extractCommon(A,r,t,F),A.oldPos+1>=c&&m+1>=u)return a(uR(i,A.lastComponent,r,t,i.useLongestToken));g[F]=A,A.oldPos+1>=c&&(D=Math.min(D,F-1)),m+1>=u&&(y=Math.max(y,F+1))}l++}if(s)(function F(){setTimeout(function(){if(l>d||Date.now()>h)return s();w()||F()},0)})();else for(;l<=d&&Date.now()<=h;){var S=w();if(S)return S}},addToPath:function(t,r,n,o){var s=t.lastComponent;return s&&s.added===r&&s.removed===n?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,o){for(var s=r.length,i=n.length,a=t.oldPos,u=a-o,c=0;u+1<s&&a+1<i&&this.equals(r[u+1],n[a+1]);)u++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=a,u},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};Dz=new mn,Fv=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,_v=/\S/,Rv=new mn;Rv.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!_v.test(e)&&!_v.test(t)};Rv.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&Fv.test(t[r])&&Fv.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};Iv=new mn;Iv.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1483
|
+
`));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var o=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};cR=new mn;cR.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};lR=new mn;lR.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};dR=Object.prototype.toString,Ms=new mn;Ms.useLongestToken=!0;Ms.tokenize=Iv.tokenize;Ms.castInput=function(e){var t=this.options,r=t.undefinedReplacement,n=t.stringifyReplacer,o=n===void 0?function(s,i){return typeof i>"u"?r:i}:n;return typeof e=="string"?e:JSON.stringify(Fd(e,null,null,o),o," ")};Ms.equals=function(e,t){return mn.prototype.equals.call(Ms,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};_d=new mn;_d.tokenize=function(e){return e.slice()};_d.join=_d.removeEmpty=function(e){return e}});var Rd=v(()=>{"use strict"});var $v=v(()=>{"use strict"});var Nv=v(()=>{"use strict"});var Ov=v(()=>{"use strict"});var Id=v(()=>{"use strict"});var Bv=v(()=>{"use strict";Id()});var kd=v(()=>{"use strict";Bv()});var Ls=v(()=>{"use strict"});function Au(){let e=new Error("AbortError");return e.name="AbortError",e}var xi=v(()=>{"use strict";Ln();fn();zr();Nv();vo();Ov();kd();Ls();Ns()});var Gv=E((zz,Hv)=>{"use strict";var jv=Q("child_process"),yR=jv.spawn,DR=jv.exec;Hv.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},o={};switch(n[e]=[],o[e]=1,process.platform){case"win32":DR("taskkill /pid "+e+" /T /F",r);break;case"darwin":Vv(e,n,o,function(){Mv(n,t,r)});break;default:Uv(e,n,o,function(s){return yR("ps",["-o","pid","--no-headers","--ppid",s])},function(){Mv(n,t,r)});break}};function Mv(e,t,r){var n={};try{Object.keys(e).forEach(function(o){e[o].forEach(function(s){n[s]||(Lv(s,t),n[s]=1)}),n[o]||(Lv(o,t),n[o]=1)})}catch(o){if(r)return r(o);throw o}if(r)return r()}function Lv(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function Uv(e,t,r,n,o){var s=n(e),i="";s.stdout.on("data",function(c){var c=c.toString("ascii");i+=c});var a=function(u){if(delete r[e],u!=0){Object.keys(r).length==0&&o();return}i.match(/\d+/g).forEach(function(c){c=parseInt(c,10),t[e].push(c),t[c]=[],r[c]=1,Uv(c,t,r,n,o)})};s.on("close",a)}function Vv(e,t,r,n){try{let o="";try{o=execSync("pgrep -P "+e,{encoding:"utf8",timeout:2e3,maxBuffer:1024*1024})}catch(i){if(i.status!==1)throw i}delete r[e];let s=o.trim().split(`
|
|
1484
|
+
`).filter(Boolean);if(s.length===0){Object.keys(r).length===0&&n();return}s.forEach(function(i){let a=parseInt(i,10);isNaN(a)||(t[e].push(a),t[a]=[],r[a]=1,Vv(a,t,r,n))})}catch{delete r[e],Object.keys(r).length===0&&n()}}});import*as vR from"@sentry/node";function CR(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}async function Tu(e,t,r,n=5e3){if(typeof t!="number"&&(!t||(Nd(t)?t.getExitCode()!==null:t.exitCode!==null)))return null;if(r?.aborted)return Au();let o=new Promise((a,u)=>{r?.addEventListener("abort",()=>{u(new Error("killProcess aborted by the user"))},{once:!0})}),s,i;if(typeof t=="number"?s=t:(i=t,s=Nd(i)?i.getPid():i.pid),!s){if(e?.Sentry?.captureMessage("killProcess: no pid (process never spawned or already exited)",{level:"info",extra:{procType:i?Nd(i)?"DevCommandProcess":"ChildProcess":"number"}}),i)try{i.kill("SIGKILL")}catch{}return null}try{return await Promise.race([await new Promise((a,u)=>(0,Od.default)(s,"SIGTERM",c=>{c?u(c):a()})),new Promise((a,u)=>setTimeout(()=>u(new Error("SIGTERM killProcess timeout")),n)),o]),null}catch(a){if(a.code==="ESRCH")return null;e?.Sentry?.captureException(a,{level:"warning"});try{return await Promise.race([await new Promise((u,c)=>(0,Od.default)(s,"SIGKILL",l=>{l?c(l):u()})),new Promise((u,c)=>setTimeout(()=>c(new Error("SIGKILL killProcess timeout")),n)),o]),null}catch(u){return u.code==="ESRCH"||!CR(s)?null:(e?.Sentry?.captureException(u,{level:"warning"}),u instanceof Error?u:new Error("killProcess: failed to kill process: "+String(u)))}}finally{i&&i.removeAllListeners()}}var Od,Bd,Kz,Nd,wi=v(()=>{"use strict";Od=Me(Gv(),1);xi();Bd=class{constructor(){qe(this,"processes",new Set);qe(this,"cleanupHandlersRegistered",!1);this.registerCleanupHandlers()}track(t){this.processes.add(t),t.on("exit",()=>{this.processes.delete(t)})}untrack(t){this.processes.delete(t)}async killAll(t){if(this.processes.size===0)return;let r=[];for(let n of this.processes)n.pid&&n.exitCode===null&&r.push(Tu(t,n));await Promise.all(r),this.processes.clear()}registerCleanupHandlers(){if(this.cleanupHandlersRegistered)return;this.cleanupHandlersRegistered=!0;let t=async r=>{try{await this.killAll()}catch(n){console.error("[ProcessTracker] Error during cleanup:",n)}};process.on("SIGINT",()=>t("SIGINT")),process.on("SIGTERM",()=>t("SIGTERM")),process.on("SIGHUP",()=>t("SIGHUP")),process.on("exit",()=>{for(let r of this.processes)if(r.pid&&r.exitCode===null)try{process.kill(r.pid,"SIGKILL")}catch{}})}get count(){return this.processes.size}},Kz=new Bd;Nd=e=>"type"in e});var Md=v(()=>{"use strict";xi();wi();fn();zr()});var zv=v(()=>{"use strict";fn();zr();Eu();Md()});var Fu=v(()=>{"use strict"});var Ld=v(()=>{"use strict"});var _u=E(tr=>{"use strict";tr.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;tr.find=(e,t)=>e.nodes.find(r=>r.type===t);tr.exceedsLimit=(e,t,r=1,n)=>n===!1||!tr.isInteger(e)||!tr.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;tr.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};tr.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;tr.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;tr.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;tr.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);tr.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let s=n[o];if(Array.isArray(s)){r(s);continue}s!==void 0&&t.push(s)}return t};return r(e),t}});var Ru=E((lq,Kv)=>{"use strict";var qv=_u();Kv.exports=(e,t={})=>{let r=(n,o={})=>{let s=t.escapeInvalid&&qv.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||i)&&qv.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var Jv=E((dq,Wv)=>{"use strict";Wv.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var oC=E((pq,nC)=>{"use strict";var Yv=Jv(),Co=(e,t,r)=>{if(Yv(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(Yv(t)===!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 o=String(n.relaxZeros),s=String(n.shorthand),i=String(n.capture),a=String(n.wrap),u=e+":"+t+"="+o+s+i+a;if(Co.cache.hasOwnProperty(u))return Co.cache[u].result;let c=Math.min(e,t),l=Math.max(e,t);if(Math.abs(c-l)===1){let m=e+"|"+t;return n.capture?`(${m})`:n.wrap===!1?m:`(?:${m})`}let d=rC(e)||rC(t),p={min:e,max:t,a:c,b:l},h=[],g=[];if(d&&(p.isPadded=d,p.maxLen=String(p.max).length),c<0){let m=l<0?Math.abs(l):1;g=Qv(m,Math.abs(c),p,n),c=p.a=0}return l>=0&&(h=Qv(c,l,p,n)),p.negatives=g,p.positives=h,p.result=wR(g,h,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&h.length+g.length>1&&(p.result=`(?:${p.result})`),Co.cache[u]=p,p.result};function wR(e,t,r){let n=jd(e,t,"-",!1,r)||[],o=jd(t,e,"",!1,r)||[],s=jd(e,t,"-?",!0,r)||[];return n.concat(s).concat(o).join("|")}function SR(e,t){let r=1,n=1,o=Xv(e,r),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),r+=1,o=Xv(e,r);for(o=eC(t+1,n)-1;e<o&&o<=t;)s.add(o),n+=1,o=eC(t+1,n)-1;return s=[...s],s.sort(AR),s}function ER(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=PR(e,t),o=n.length,s="",i=0;for(let a=0;a<o;a++){let[u,c]=n[a];u===c?s+=u:u!=="0"||c!=="9"?s+=TR(u,c,r):i++}return i&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function Qv(e,t,r,n){let o=SR(e,t),s=[],i=e,a;for(let u=0;u<o.length;u++){let c=o[u],l=ER(String(i),String(c),n),d="";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+tC(a.count),i=c+1;continue}r.isPadded&&(d=FR(c,r,n)),l.string=d+l.pattern+tC(l.count),s.push(l),i=c+1,a=l}return s}function jd(e,t,r,n,o){let s=[];for(let i of e){let{string:a}=i;!n&&!Zv(t,"string",a)&&s.push(r+a),n&&Zv(t,"string",a)&&s.push(r+a)}return s}function PR(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function AR(e,t){return e>t?1:t>e?-1:0}function Zv(e,t,r){return e.some(n=>n[t]===r)}function Xv(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function eC(e,t){return e-e%Math.pow(10,t)}function tC(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function TR(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function rC(e){return/^-?(0+)\d/.test(e)}function FR(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}Co.cache={};Co.clearCache=()=>Co.cache={};nC.exports=Co});var Hd=E((fq,dC)=>{"use strict";var _R=Q("util"),sC=oC(),iC=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),RR=e=>t=>e===!0?Number(t):String(t),Ud=e=>typeof e=="number"||typeof e=="string"&&e!=="",js=e=>Number.isInteger(+e),Vd=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},IR=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,kR=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},ku=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},$R=(e,t,r)=>{e.negatives.sort((a,u)=>a<u?-1:a>u?1:0),e.positives.sort((a,u)=>a<u?-1:a>u?1:0);let n=t.capture?"":"?:",o="",s="",i;return e.positives.length&&(o=e.positives.map(a=>ku(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>ku(String(a),r)).join("|")})`),o&&s?i=`${o}|${s}`:i=o||s,t.wrap?`(${n}${i})`:i},aC=(e,t,r,n)=>{if(r)return sC(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let s=String.fromCharCode(t);return`[${o}-${s}]`},uC=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return sC(e,t,r)},cC=(...e)=>new RangeError("Invalid range arguments: "+_R.inspect(...e)),lC=(e,t,r)=>{if(r.strictRanges===!0)throw cC([e,t]);return[]},NR=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},OR=(e,t,r=1,n={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(n.strictRanges===!0)throw cC([e,t]);return[]}o===0&&(o=0),s===0&&(s=0);let i=o>s,a=String(e),u=String(t),c=String(r);r=Math.max(Math.abs(r),1);let l=Vd(a)||Vd(u)||Vd(c),d=l?Math.max(a.length,u.length,c.length):0,p=l===!1&&IR(e,t,n)===!1,h=n.transform||RR(p);if(n.toRegex&&r===1)return aC(ku(e,d),ku(t,d),!0,n);let g={negatives:[],positives:[]},m=w=>g[w<0?"negatives":"positives"].push(Math.abs(w)),y=[],D=0;for(;i?o>=s:o<=s;)n.toRegex===!0&&r>1?m(o):y.push(kR(h(o,D),d,p)),o=i?o-r:o+r,D++;return n.toRegex===!0?r>1?$R(g,n,d):uC(y,null,{wrap:!1,...n}):y},BR=(e,t,r=1,n={})=>{if(!js(e)&&e.length>1||!js(t)&&t.length>1)return lC(e,t,n);let o=n.transform||(p=>String.fromCharCode(p)),s=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),a=s>i,u=Math.min(s,i),c=Math.max(s,i);if(n.toRegex&&r===1)return aC(u,c,!1,n);let l=[],d=0;for(;a?s>=i:s<=i;)l.push(o(s,d)),s=a?s-r:s+r,d++;return n.toRegex===!0?uC(l,null,{wrap:!1,options:n}):l},Iu=(e,t,r,n={})=>{if(t==null&&Ud(e))return[e];if(!Ud(e)||!Ud(t))return lC(e,t,n);if(typeof r=="function")return Iu(e,t,1,{transform:r});if(iC(r))return Iu(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,js(r)?js(e)&&js(t)?OR(e,t,r,o):BR(e,t,Math.max(Math.abs(r),1),o):r!=null&&!iC(r)?NR(r,o):Iu(e,t,1,r)};dC.exports=Iu});var mC=E((mq,fC)=>{"use strict";var MR=Hd(),pC=_u(),LR=(e,t={})=>{let r=(n,o={})=>{let s=pC.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||i===!0,u=t.escapeInvalid===!0?"\\":"",c="";if(n.isOpen===!0)return u+n.value;if(n.isClose===!0)return console.log("node.isClose",u,n.value),u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+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=pC.reduce(n.nodes),d=MR(...l,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(d.length!==0)return l.length>1&&d.length>1?`(${d})`:d}if(n.nodes)for(let l of n.nodes)c+=r(l,n);return c};return r(e)};fC.exports=LR});var yC=E((gq,hC)=>{"use strict";var jR=Hd(),gC=Ru(),Si=_u(),bo=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?Si.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let s of o)n.push(bo(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?bo(o,s,r):o+s);return Si.flatten(n)},UR=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(o,s={})=>{o.queue=[];let i=s,a=s.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,a=i.queue;if(o.invalid||o.dollar){a.push(bo(a.pop(),gC(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(bo(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let d=Si.reduce(o.nodes);if(Si.exceedsLimit(...d,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=jR(...d,t);p.length===0&&(p=gC(o,t)),a.push(bo(a.pop(),p)),o.nodes=[];return}let u=Si.encloseBrace(o),c=o.queue,l=o;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,c=l.queue;for(let d=0;d<o.nodes.length;d++){let p=o.nodes[d];if(p.type==="comma"&&o.type==="brace"){d===1&&c.push(""),c.push("");continue}if(p.type==="close"){a.push(bo(a.pop(),c,u));continue}if(p.value&&p.type!=="open"){c.push(bo(c.pop(),p.value));continue}p.nodes&&n(p,o)}return c};return Si.flatten(n(e))};hC.exports=UR});var vC=E((hq,DC)=>{"use strict";DC.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:`
|
|
1485
|
+
`,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 SC=E((yq,wC)=>{"use strict";var VR=Ru(),{MAX_LENGTH:CC,CHAR_BACKSLASH:Gd,CHAR_BACKTICK:HR,CHAR_COMMA:GR,CHAR_DOT:zR,CHAR_LEFT_PARENTHESES:qR,CHAR_RIGHT_PARENTHESES:KR,CHAR_LEFT_CURLY_BRACE:WR,CHAR_RIGHT_CURLY_BRACE:JR,CHAR_LEFT_SQUARE_BRACKET:bC,CHAR_RIGHT_SQUARE_BRACKET:xC,CHAR_DOUBLE_QUOTE:YR,CHAR_SINGLE_QUOTE:QR,CHAR_NO_BREAK_SPACE:ZR,CHAR_ZERO_WIDTH_NOBREAK_SPACE:XR}=vC(),eI=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(CC,r.maxLength):CC;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let o={type:"root",input:e,nodes:[]},s=[o],i=o,a=o,u=0,c=e.length,l=0,d=0,p,h=()=>e[l++],g=m=>{if(m.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&m.type==="text"){a.value+=m.value;return}return i.nodes.push(m),m.parent=i,m.prev=a,a=m,m};for(g({type:"bos"});l<c;)if(i=s[s.length-1],p=h(),!(p===XR||p===ZR)){if(p===Gd){g({type:"text",value:(t.keepEscaping?p:"")+h()});continue}if(p===xC){g({type:"text",value:"\\"+p});continue}if(p===bC){u++;let m;for(;l<c&&(m=h());){if(p+=m,m===bC){u++;continue}if(m===Gd){p+=h();continue}if(m===xC&&(u--,u===0))break}g({type:"text",value:p});continue}if(p===qR){i=g({type:"paren",nodes:[]}),s.push(i),g({type:"text",value:p});continue}if(p===KR){if(i.type!=="paren"){g({type:"text",value:p});continue}i=s.pop(),g({type:"text",value:p}),i=s[s.length-1];continue}if(p===YR||p===QR||p===HR){let m=p,y;for(t.keepQuotes!==!0&&(p="");l<c&&(y=h());){if(y===Gd){p+=y+h();continue}if(y===m){t.keepQuotes===!0&&(p+=y);break}p+=y}g({type:"text",value:p});continue}if(p===WR){d++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||i.dollar===!0,depth:d,commas:0,ranges:0,nodes:[]};i=g(y),s.push(i),g({type:"open",value:p});continue}if(p===JR){if(i.type!=="brace"){g({type:"text",value:p});continue}let m="close";i=s.pop(),i.close=!0,g({type:m,value:p}),d--,i=s[s.length-1];continue}if(p===GR&&d>0){if(i.ranges>0){i.ranges=0;let m=i.nodes.shift();i.nodes=[m,{type:"text",value:VR(i)}]}g({type:"comma",value:p}),i.commas++;continue}if(p===zR&&d>0&&i.commas===0){let m=i.nodes;if(d===0||m.length===0){g({type:"text",value:p});continue}if(a.type==="dot"){if(i.range=[],a.value+=p,a.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,a.type="text";continue}i.ranges++,i.args=[];continue}if(a.type==="range"){m.pop();let y=m[m.length-1];y.value+=a.value+p,a=y,i.ranges--;continue}g({type:"dot",value:p});continue}g({type:"text",value:p})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(D=>{D.nodes||(D.type==="open"&&(D.isOpen=!0),D.type==="close"&&(D.isClose=!0),D.nodes||(D.type="text"),D.invalid=!0)});let m=s[s.length-1],y=m.nodes.indexOf(i);m.nodes.splice(y,1,...i.nodes)}while(s.length>0);return g({type:"eos"}),o};wC.exports=eI});var AC=E((Dq,PC)=>{"use strict";var EC=Ru(),tI=mC(),rI=yC(),nI=SC(),Vt=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=Vt.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(Vt.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Vt.parse=(e,t={})=>nI(e,t);Vt.stringify=(e,t={})=>EC(typeof e=="string"?Vt.parse(e,t):e,t);Vt.compile=(e,t={})=>(typeof e=="string"&&(e=Vt.parse(e,t)),tI(e,t));Vt.expand=(e,t={})=>{typeof e=="string"&&(e=Vt.parse(e,t));let r=rI(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Vt.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Vt.compile(e,t):Vt.expand(e,t);PC.exports=Vt});var Us=E((vq,IC)=>{"use strict";var oI=Q("path"),qr="\\\\/",TC=`[^${qr}]`,gn="\\.",iI="\\+",sI="\\?",$u="\\/",aI="(?=.)",FC="[^/]",zd=`(?:${$u}|$)`,_C=`(?:^|${$u})`,qd=`${gn}{1,2}${zd}`,uI=`(?!${gn})`,cI=`(?!${_C}${qd})`,lI=`(?!${gn}{0,1}${zd})`,dI=`(?!${qd})`,pI=`[^.${$u}]`,fI=`${FC}*?`,RC={DOT_LITERAL:gn,PLUS_LITERAL:iI,QMARK_LITERAL:sI,SLASH_LITERAL:$u,ONE_CHAR:aI,QMARK:FC,END_ANCHOR:zd,DOTS_SLASH:qd,NO_DOT:uI,NO_DOTS:cI,NO_DOT_SLASH:lI,NO_DOTS_SLASH:dI,QMARK_NO_DOT:pI,STAR:fI,START_ANCHOR:_C},mI={...RC,SLASH_LITERAL:`[${qr}]`,QMARK:TC,STAR:`${TC}*?`,DOTS_SLASH:`${gn}{1,2}(?:[${qr}]|$)`,NO_DOT:`(?!${gn})`,NO_DOTS:`(?!(?:^|[${qr}])${gn}{1,2}(?:[${qr}]|$))`,NO_DOT_SLASH:`(?!${gn}{0,1}(?:[${qr}]|$))`,NO_DOTS_SLASH:`(?!${gn}{1,2}(?:[${qr}]|$))`,QMARK_NO_DOT:`[^.${qr}]`,START_ANCHOR:`(?:^|[${qr}])`,END_ANCHOR:`(?:[${qr}]|$)`},gI={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"};IC.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:gI,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:oI.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?mI:RC}}});var Vs=E(Pt=>{"use strict";var hI=Q("path"),yI=process.platform==="win32",{REGEX_BACKSLASH:DI,REGEX_REMOVE_BACKSLASH:vI,REGEX_SPECIAL_CHARS:CI,REGEX_SPECIAL_CHARS_GLOBAL:bI}=Us();Pt.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Pt.hasRegexChars=e=>CI.test(e);Pt.isRegexChar=e=>e.length===1&&Pt.hasRegexChars(e);Pt.escapeRegex=e=>e.replace(bI,"\\$1");Pt.toPosixSlashes=e=>e.replace(DI,"/");Pt.removeBackslashes=e=>e.replace(vI,t=>t==="\\"?"":t);Pt.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Pt.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:yI===!0||hI.sep==="\\";Pt.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Pt.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Pt.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Pt.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",s=`${n}(?:${e})${o}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var jC=E((bq,LC)=>{"use strict";var kC=Vs(),{CHAR_ASTERISK:Kd,CHAR_AT:xI,CHAR_BACKWARD_SLASH:Hs,CHAR_COMMA:wI,CHAR_DOT:Wd,CHAR_EXCLAMATION_MARK:Jd,CHAR_FORWARD_SLASH:MC,CHAR_LEFT_CURLY_BRACE:Yd,CHAR_LEFT_PARENTHESES:Qd,CHAR_LEFT_SQUARE_BRACKET:SI,CHAR_PLUS:EI,CHAR_QUESTION_MARK:$C,CHAR_RIGHT_CURLY_BRACE:PI,CHAR_RIGHT_PARENTHESES:NC,CHAR_RIGHT_SQUARE_BRACKET:AI}=Us(),OC=e=>e===MC||e===Hs,BC=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},TI=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,s=[],i=[],a=[],u=e,c=-1,l=0,d=0,p=!1,h=!1,g=!1,m=!1,y=!1,D=!1,w=!1,S=!1,F=!1,A=!1,_=0,k,O,$={value:"",depth:0,isGlob:!1},R=()=>c>=n,C=()=>u.charCodeAt(c+1),U=()=>(k=O,u.charCodeAt(++c));for(;c<n;){O=U();let $e;if(O===Hs){w=$.backslashes=!0,O=U(),O===Yd&&(D=!0);continue}if(D===!0||O===Yd){for(_++;R()!==!0&&(O=U());){if(O===Hs){w=$.backslashes=!0,U();continue}if(O===Yd){_++;continue}if(D!==!0&&O===Wd&&(O=U())===Wd){if(p=$.isBrace=!0,g=$.isGlob=!0,A=!0,o===!0)continue;break}if(D!==!0&&O===wI){if(p=$.isBrace=!0,g=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===PI&&(_--,_===0)){D=!1,p=$.isBrace=!0,A=!0;break}}if(o===!0)continue;break}if(O===MC){if(s.push(c),i.push($),$={value:"",depth:0,isGlob:!1},A===!0)continue;if(k===Wd&&c===l+1){l+=2;continue}d=c+1;continue}if(r.noext!==!0&&(O===EI||O===xI||O===Kd||O===$C||O===Jd)===!0&&C()===Qd){if(g=$.isGlob=!0,m=$.isExtglob=!0,A=!0,O===Jd&&c===l&&(F=!0),o===!0){for(;R()!==!0&&(O=U());){if(O===Hs){w=$.backslashes=!0,O=U();continue}if(O===NC){g=$.isGlob=!0,A=!0;break}}continue}break}if(O===Kd){if(k===Kd&&(y=$.isGlobstar=!0),g=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===$C){if(g=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===SI){for(;R()!==!0&&($e=U());){if($e===Hs){w=$.backslashes=!0,U();continue}if($e===AI){h=$.isBracket=!0,g=$.isGlob=!0,A=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&O===Jd&&c===l){S=$.negated=!0,l++;continue}if(r.noparen!==!0&&O===Qd){if(g=$.isGlob=!0,o===!0){for(;R()!==!0&&(O=U());){if(O===Qd){w=$.backslashes=!0,O=U();continue}if(O===NC){A=!0;break}}continue}break}if(g===!0){if(A=!0,o===!0)continue;break}}r.noext===!0&&(m=!1,g=!1);let G=u,K="",x="";l>0&&(K=u.slice(0,l),u=u.slice(l),d-=l),G&&g===!0&&d>0?(G=u.slice(0,d),x=u.slice(d)):g===!0?(G="",x=u):G=u,G&&G!==""&&G!=="/"&&G!==u&&OC(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),r.unescape===!0&&(x&&(x=kC.removeBackslashes(x)),G&&w===!0&&(G=kC.removeBackslashes(G)));let P={prefix:K,input:e,start:l,base:G,glob:x,isBrace:p,isBracket:h,isGlob:g,isExtglob:m,isGlobstar:y,negated:S,negatedExtglob:F};if(r.tokens===!0&&(P.maxDepth=0,OC(O)||i.push($),P.tokens=i),r.parts===!0||r.tokens===!0){let $e;for(let De=0;De<s.length;De++){let Ar=$e?$e+1:l,Tr=s[De],Ot=e.slice(Ar,Tr);r.tokens&&(De===0&&l!==0?(i[De].isPrefix=!0,i[De].value=K):i[De].value=Ot,BC(i[De]),P.maxDepth+=i[De].depth),(De!==0||Ot!=="")&&a.push(Ot),$e=Tr}if($e&&$e+1<e.length){let De=e.slice($e+1);a.push(De),r.tokens&&(i[i.length-1].value=De,BC(i[i.length-1]),P.maxDepth+=i[i.length-1].depth)}P.slashes=s,P.parts=a}return P};LC.exports=TI});var HC=E((xq,VC)=>{"use strict";var Nu=Us(),Ht=Vs(),{MAX_LENGTH:Ou,POSIX_REGEX_SOURCE:FI,REGEX_NON_SPECIAL_CHARS:_I,REGEX_SPECIAL_CHARS_BACKREF:RI,REPLACEMENTS:UC}=Nu,II=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(o=>Ht.escapeRegex(o)).join("..")}return r},Ei=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Zd=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=UC[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(Ou,r.maxLength):Ou,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},i=[s],a=r.capture?"":"?:",u=Ht.isWindows(t),c=Nu.globChars(u),l=Nu.extglobChars(c),{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:g,DOTS_SLASH:m,NO_DOT:y,NO_DOT_SLASH:D,NO_DOTS_SLASH:w,QMARK:S,QMARK_NO_DOT:F,STAR:A,START_ANCHOR:_}=c,k=L=>`(${a}(?:(?!${_}${L.dot?m:d}).)*?)`,O=r.dot?"":y,$=r.dot?S:F,R=r.bash===!0?k(r):A;r.capture&&(R=`(${R})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let C={input:e,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:i};e=Ht.removePrefix(e,C),o=e.length;let U=[],G=[],K=[],x=s,P,$e=()=>C.index===o-1,De=C.peek=(L=1)=>e[C.index+L],Ar=C.advance=()=>e[++C.index]||"",Tr=()=>e.slice(C.index+1),Ot=(L="",Ae=0)=>{C.consumed+=L,C.index+=Ae},ka=L=>{C.output+=L.output!=null?L.output:L.value,Ot(L.value)},aP=()=>{let L=1;for(;De()==="!"&&(De(2)!=="("||De(3)==="?");)Ar(),C.start++,L++;return L%2===0?!1:(C.negated=!0,C.start++,!0)},$a=L=>{C[L]++,K.push(L)},eo=L=>{C[L]--,K.pop()},ae=L=>{if(x.type==="globstar"){let Ae=C.braces>0&&(L.type==="comma"||L.type==="brace"),N=L.extglob===!0||U.length&&(L.type==="pipe"||L.type==="paren");L.type!=="slash"&&L.type!=="paren"&&!Ae&&!N&&(C.output=C.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=R,C.output+=x.output)}if(U.length&&L.type!=="paren"&&(U[U.length-1].inner+=L.value),(L.value||L.output)&&ka(L),x&&x.type==="text"&&L.type==="text"){x.value+=L.value,x.output=(x.output||"")+L.value;return}L.prev=x,i.push(L),x=L},Na=(L,Ae)=>{let N={...l[Ae],conditions:1,inner:""};N.prev=x,N.parens=C.parens,N.output=C.output;let oe=(r.capture?"(":"")+N.open;$a("parens"),ae({type:L,value:Ae,output:C.output?"":g}),ae({type:"paren",extglob:!0,value:Ar(),output:oe}),U.push(N)},uP=L=>{let Ae=L.close+(r.capture?")":""),N;if(L.type==="negate"){let oe=R;if(L.inner&&L.inner.length>1&&L.inner.includes("/")&&(oe=k(r)),(oe!==R||$e()||/^\)+$/.test(Tr()))&&(Ae=L.close=`)$))${oe}`),L.inner.includes("*")&&(N=Tr())&&/^\.[^\\/.]+$/.test(N)){let Ne=Zd(N,{...t,fastpaths:!1}).output;Ae=L.close=`)${Ne})${oe})`}L.prev.type==="bos"&&(C.negatedExtglob=!0)}ae({type:"paren",extglob:!0,value:P,output:Ae}),eo("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let L=!1,Ae=e.replace(RI,(N,oe,Ne,pt,He,Kc)=>pt==="\\"?(L=!0,N):pt==="?"?oe?oe+pt+(He?S.repeat(He.length):""):Kc===0?$+(He?S.repeat(He.length):""):S.repeat(Ne.length):pt==="."?d.repeat(Ne.length):pt==="*"?oe?oe+pt+(He?R:""):R:oe?N:`\\${N}`);return L===!0&&(r.unescape===!0?Ae=Ae.replace(/\\/g,""):Ae=Ae.replace(/\\+/g,N=>N.length%2===0?"\\\\":N?"\\":"")),Ae===e&&r.contains===!0?(C.output=e,C):(C.output=Ht.wrapOutput(Ae,C,t),C)}for(;!$e();){if(P=Ar(),P==="\0")continue;if(P==="\\"){let N=De();if(N==="/"&&r.bash!==!0||N==="."||N===";")continue;if(!N){P+="\\",ae({type:"text",value:P});continue}let oe=/^\\+/.exec(Tr()),Ne=0;if(oe&&oe[0].length>2&&(Ne=oe[0].length,C.index+=Ne,Ne%2!==0&&(P+="\\")),r.unescape===!0?P=Ar():P+=Ar(),C.brackets===0){ae({type:"text",value:P});continue}}if(C.brackets>0&&(P!=="]"||x.value==="["||x.value==="[^")){if(r.posix!==!1&&P===":"){let N=x.value.slice(1);if(N.includes("[")&&(x.posix=!0,N.includes(":"))){let oe=x.value.lastIndexOf("["),Ne=x.value.slice(0,oe),pt=x.value.slice(oe+2),He=FI[pt];if(He){x.value=Ne+He,C.backtrack=!0,Ar(),!s.output&&i.indexOf(x)===1&&(s.output=g);continue}}}(P==="["&&De()!==":"||P==="-"&&De()==="]")&&(P=`\\${P}`),P==="]"&&(x.value==="["||x.value==="[^")&&(P=`\\${P}`),r.posix===!0&&P==="!"&&x.value==="["&&(P="^"),x.value+=P,ka({value:P});continue}if(C.quotes===1&&P!=='"'){P=Ht.escapeRegex(P),x.value+=P,ka({value:P});continue}if(P==='"'){C.quotes=C.quotes===1?0:1,r.keepQuotes===!0&&ae({type:"text",value:P});continue}if(P==="("){$a("parens"),ae({type:"paren",value:P});continue}if(P===")"){if(C.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Ei("opening","("));let N=U[U.length-1];if(N&&C.parens===N.parens+1){uP(U.pop());continue}ae({type:"paren",value:P,output:C.parens?")":"\\)"}),eo("parens");continue}if(P==="["){if(r.nobracket===!0||!Tr().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Ei("closing","]"));P=`\\${P}`}else $a("brackets");ae({type:"bracket",value:P});continue}if(P==="]"){if(r.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){ae({type:"text",value:P,output:`\\${P}`});continue}if(C.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Ei("opening","["));ae({type:"text",value:P,output:`\\${P}`});continue}eo("brackets");let N=x.value.slice(1);if(x.posix!==!0&&N[0]==="^"&&!N.includes("/")&&(P=`/${P}`),x.value+=P,ka({value:P}),r.literalBrackets===!1||Ht.hasRegexChars(N))continue;let oe=Ht.escapeRegex(x.value);if(C.output=C.output.slice(0,-x.value.length),r.literalBrackets===!0){C.output+=oe,x.value=oe;continue}x.value=`(${a}${oe}|${x.value})`,C.output+=x.value;continue}if(P==="{"&&r.nobrace!==!0){$a("braces");let N={type:"brace",value:P,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};G.push(N),ae(N);continue}if(P==="}"){let N=G[G.length-1];if(r.nobrace===!0||!N){ae({type:"text",value:P,output:P});continue}let oe=")";if(N.dots===!0){let Ne=i.slice(),pt=[];for(let He=Ne.length-1;He>=0&&(i.pop(),Ne[He].type!=="brace");He--)Ne[He].type!=="dots"&&pt.unshift(Ne[He].value);oe=II(pt,r),C.backtrack=!0}if(N.comma!==!0&&N.dots!==!0){let Ne=C.output.slice(0,N.outputIndex),pt=C.tokens.slice(N.tokensIndex);N.value=N.output="\\{",P=oe="\\}",C.output=Ne;for(let He of pt)C.output+=He.output||He.value}ae({type:"brace",value:P,output:oe}),eo("braces"),G.pop();continue}if(P==="|"){U.length>0&&U[U.length-1].conditions++,ae({type:"text",value:P});continue}if(P===","){let N=P,oe=G[G.length-1];oe&&K[K.length-1]==="braces"&&(oe.comma=!0,N="|"),ae({type:"comma",value:P,output:N});continue}if(P==="/"){if(x.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",i.pop(),x=s;continue}ae({type:"slash",value:P,output:h});continue}if(P==="."){if(C.braces>0&&x.type==="dot"){x.value==="."&&(x.output=d);let N=G[G.length-1];x.type="dots",x.output+=P,x.value+=P,N.dots=!0;continue}if(C.braces+C.parens===0&&x.type!=="bos"&&x.type!=="slash"){ae({type:"text",value:P,output:d});continue}ae({type:"dot",value:P,output:d});continue}if(P==="?"){if(!(x&&x.value==="(")&&r.noextglob!==!0&&De()==="("&&De(2)!=="?"){Na("qmark",P);continue}if(x&&x.type==="paren"){let oe=De(),Ne=P;if(oe==="<"&&!Ht.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(Tr()))&&(Ne=`\\${P}`),ae({type:"text",value:P,output:Ne});continue}if(r.dot!==!0&&(x.type==="slash"||x.type==="bos")){ae({type:"qmark",value:P,output:F});continue}ae({type:"qmark",value:P,output:S});continue}if(P==="!"){if(r.noextglob!==!0&&De()==="("&&(De(2)!=="?"||!/[!=<:]/.test(De(3)))){Na("negate",P);continue}if(r.nonegate!==!0&&C.index===0){aP();continue}}if(P==="+"){if(r.noextglob!==!0&&De()==="("&&De(2)!=="?"){Na("plus",P);continue}if(x&&x.value==="("||r.regex===!1){ae({type:"plus",value:P,output:p});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||C.parens>0){ae({type:"plus",value:P});continue}ae({type:"plus",value:p});continue}if(P==="@"){if(r.noextglob!==!0&&De()==="("&&De(2)!=="?"){ae({type:"at",extglob:!0,value:P,output:""});continue}ae({type:"text",value:P});continue}if(P!=="*"){(P==="$"||P==="^")&&(P=`\\${P}`);let N=_I.exec(Tr());N&&(P+=N[0],C.index+=N[0].length),ae({type:"text",value:P});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=P,x.output=R,C.backtrack=!0,C.globstar=!0,Ot(P);continue}let L=Tr();if(r.noextglob!==!0&&/^\([^?]/.test(L)){Na("star",P);continue}if(x.type==="star"){if(r.noglobstar===!0){Ot(P);continue}let N=x.prev,oe=N.prev,Ne=N.type==="slash"||N.type==="bos",pt=oe&&(oe.type==="star"||oe.type==="globstar");if(r.bash===!0&&(!Ne||L[0]&&L[0]!=="/")){ae({type:"star",value:P,output:""});continue}let He=C.braces>0&&(N.type==="comma"||N.type==="brace"),Kc=U.length&&(N.type==="pipe"||N.type==="paren");if(!Ne&&N.type!=="paren"&&!He&&!Kc){ae({type:"star",value:P,output:""});continue}for(;L.slice(0,3)==="/**";){let Oa=e[C.index+4];if(Oa&&Oa!=="/")break;L=L.slice(3),Ot("/**",3)}if(N.type==="bos"&&$e()){x.type="globstar",x.value+=P,x.output=k(r),C.output=x.output,C.globstar=!0,Ot(P);continue}if(N.type==="slash"&&N.prev.type!=="bos"&&!pt&&$e()){C.output=C.output.slice(0,-(N.output+x.output).length),N.output=`(?:${N.output}`,x.type="globstar",x.output=k(r)+(r.strictSlashes?")":"|$)"),x.value+=P,C.globstar=!0,C.output+=N.output+x.output,Ot(P);continue}if(N.type==="slash"&&N.prev.type!=="bos"&&L[0]==="/"){let Oa=L[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(N.output+x.output).length),N.output=`(?:${N.output}`,x.type="globstar",x.output=`${k(r)}${h}|${h}${Oa})`,x.value+=P,C.output+=N.output+x.output,C.globstar=!0,Ot(P+Ar()),ae({type:"slash",value:"/",output:""});continue}if(N.type==="bos"&&L[0]==="/"){x.type="globstar",x.value+=P,x.output=`(?:^|${h}|${k(r)}${h})`,C.output=x.output,C.globstar=!0,Ot(P+Ar()),ae({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-x.output.length),x.type="globstar",x.output=k(r),x.value+=P,C.output+=x.output,C.globstar=!0,Ot(P);continue}let Ae={type:"star",value:P,output:R};if(r.bash===!0){Ae.output=".*?",(x.type==="bos"||x.type==="slash")&&(Ae.output=O+Ae.output),ae(Ae);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&r.regex===!0){Ae.output=P,ae(Ae);continue}(C.index===C.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?(C.output+=D,x.output+=D):r.dot===!0?(C.output+=w,x.output+=w):(C.output+=O,x.output+=O),De()!=="*"&&(C.output+=g,x.output+=g)),ae(Ae)}for(;C.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ei("closing","]"));C.output=Ht.escapeLast(C.output,"["),eo("brackets")}for(;C.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ei("closing",")"));C.output=Ht.escapeLast(C.output,"("),eo("parens")}for(;C.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ei("closing","}"));C.output=Ht.escapeLast(C.output,"{"),eo("braces")}if(r.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&ae({type:"maybe_slash",value:"",output:`${h}?`}),C.backtrack===!0){C.output="";for(let L of C.tokens)C.output+=L.output!=null?L.output:L.value,L.suffix&&(C.output+=L.suffix)}return C};Zd.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(Ou,r.maxLength):Ou,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=UC[e]||e;let s=Ht.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:h,START_ANCHOR:g}=Nu.globChars(s),m=r.dot?d:l,y=r.dot?p:l,D=r.capture?"":"?:",w={negated:!1,prefix:""},S=r.bash===!0?".*?":h;r.capture&&(S=`(${S})`);let F=O=>O.noglobstar===!0?S:`(${D}(?:(?!${g}${O.dot?c:i}).)*?)`,A=O=>{switch(O){case"*":return`${m}${u}${S}`;case".*":return`${i}${u}${S}`;case"*.*":return`${m}${S}${i}${u}${S}`;case"*/*":return`${m}${S}${a}${u}${y}${S}`;case"**":return m+F(r);case"**/*":return`(?:${m}${F(r)}${a})?${y}${u}${S}`;case"**/*.*":return`(?:${m}${F(r)}${a})?${y}${S}${i}${u}${S}`;case"**/.*":return`(?:${m}${F(r)}${a})?${i}${u}${S}`;default:{let $=/^(.*?)\.(\w+)$/.exec(O);if(!$)return;let R=A($[1]);return R?R+i+$[2]:void 0}}},_=Ht.removePrefix(e,w),k=A(_);return k&&r.strictSlashes!==!0&&(k+=`${a}?`),k};VC.exports=Zd});var zC=E((wq,GC)=>{"use strict";var kI=Q("path"),$I=jC(),Xd=HC(),ep=Vs(),NI=Us(),OI=e=>e&&typeof e=="object"&&!Array.isArray(e),je=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(p=>je(p,t,r));return p=>{for(let h of l){let g=h(p);if(g)return g}return!1}}let n=OI(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},s=ep.isWindows(t),i=n?je.compileRe(e,t):je.makeRe(e,t,!1,!0),a=i.state;delete i.state;let u=()=>!1;if(o.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};u=je(o.ignore,l,r)}let c=(l,d=!1)=>{let{isMatch:p,match:h,output:g}=je.test(l,i,t,{glob:e,posix:s}),m={glob:e,state:a,regex:i,posix:s,input:l,output:g,match:h,isMatch:p};return typeof o.onResult=="function"&&o.onResult(m),p===!1?(m.isMatch=!1,d?m:!1):u(l)?(typeof o.onIgnore=="function"&&o.onIgnore(m),m.isMatch=!1,d?m:!1):(typeof o.onMatch=="function"&&o.onMatch(m),d?m:!0)};return r&&(c.state=a),c};je.test=(e,t,r,{glob:n,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},i=s.format||(o?ep.toPosixSlashes:null),a=e===n,u=a&&i?i(e):e;return a===!1&&(u=i?i(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=je.matchBase(e,t,r,o):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};je.matchBase=(e,t,r,n=ep.isWindows(r))=>(t instanceof RegExp?t:je.makeRe(t,r)).test(kI.basename(e));je.isMatch=(e,t,r)=>je(t,r)(e);je.parse=(e,t)=>Array.isArray(e)?e.map(r=>je.parse(r,t)):Xd(e,{...t,fastpaths:!1});je.scan=(e,t)=>$I(e,t);je.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let o=t||{},s=o.contains?"":"^",i=o.contains?"":"$",a=`${s}(?:${e.output})${i}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=je.toRegex(a,t);return n===!0&&(u.state=e),u};je.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=Xd.fastpaths(e,t)),o.output||(o=Xd(e,t)),je.compileRe(o,t,r,n)};je.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};je.constants=NI;GC.exports=je});var KC=E((Sq,qC)=>{"use strict";qC.exports=zC()});var rp=E((Eq,ZC)=>{"use strict";var JC=Q("util"),YC=AC(),Kr=KC(),tp=Vs(),WC=e=>e===""||e==="./",QC=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},_e=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,s=new Set,i=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let d=Kr(String(t[l]),{...r,onResult:a},!0),p=d.state.negated||d.state.negatedExtglob;p&&i++;for(let h of e){let g=d(h,!0);(p?!g.isMatch:g.isMatch)&&(p?n.add(g.output):(n.delete(g.output),o.add(g.output)))}}let c=(i===t.length?[...s]:[...o]).filter(l=>!n.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return c};_e.match=_e;_e.matcher=(e,t)=>Kr(e,t);_e.isMatch=(e,t,r)=>Kr(t,r)(e);_e.any=_e.isMatch;_e.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],s=a=>{r.onResult&&r.onResult(a),o.push(a.output)},i=new Set(_e(e,t,{...r,onResult:s}));for(let a of o)i.has(a)||n.add(a);return[...n]};_e.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${JC.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>_e.contains(e,n,r));if(typeof t=="string"){if(WC(e)||WC(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return _e.isMatch(e,t,{...r,contains:!0})};_e.matchKeys=(e,t,r)=>{if(!tp.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=_e(Object.keys(e),t,r),o={};for(let s of n)o[s]=e[s];return o};_e.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Kr(String(o),r);if(n.some(i=>s(i)))return!0}return!1};_e.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Kr(String(o),r);if(!n.every(i=>s(i)))return!1}return!0};_e.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${JC.inspect(e)}"`);return[].concat(t).every(n=>Kr(n,r)(e))};_e.capture=(e,t,r)=>{let n=tp.isWindows(r),s=Kr.makeRe(String(e),{...r,capture:!0}).exec(n?tp.toPosixSlashes(t):t);if(s)return s.slice(1).map(i=>i===void 0?"":i)};_e.makeRe=(...e)=>Kr.makeRe(...e);_e.scan=(...e)=>Kr.scan(...e);_e.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of YC(String(n),t))r.push(Kr.parse(o,t));return r};_e.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!QC(e)?[e]:YC(e,t)};_e.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return _e.braces(e,{...t,expand:!0})};_e.hasBraces=QC;ZC.exports=_e});var BI,np=v(()=>{"use strict";BI=Me(rp(),1)});var LI,XC=v(()=>{"use strict";LI=Me(rp(),1);np()});var eb=v(()=>{"use strict"});var Bu=v(()=>{"use strict"});var tb=v(()=>{"use strict";wi()});var rb=v(()=>{"use strict"});var Oq,nb=v(()=>{"use strict";Oq=process.platform==="win32"?"C:\\Windows\\System32\\drivers\\etc\\hosts":"/etc/hosts"});var ob=v(()=>{"use strict"});var ib=v(()=>{"use strict"});var ab=E((jq,sb)=>{var Pi=1e3,Ai=Pi*60,Ti=Ai*60,xo=Ti*24,jI=xo*7,UI=xo*365.25;sb.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return VI(e);if(r==="number"&&isFinite(e))return t.long?GI(e):HI(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function VI(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*UI;case"weeks":case"week":case"w":return r*jI;case"days":case"day":case"d":return r*xo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ti;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ai;case"seconds":case"second":case"secs":case"sec":case"s":return r*Pi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function HI(e){var t=Math.abs(e);return t>=xo?Math.round(e/xo)+"d":t>=Ti?Math.round(e/Ti)+"h":t>=Ai?Math.round(e/Ai)+"m":t>=Pi?Math.round(e/Pi)+"s":e+"ms"}function GI(e){var t=Math.abs(e);return t>=xo?Mu(e,t,xo,"day"):t>=Ti?Mu(e,t,Ti,"hour"):t>=Ai?Mu(e,t,Ai,"minute"):t>=Pi?Mu(e,t,Pi,"second"):e+" ms"}function Mu(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var op=E((Uq,ub)=>{function zI(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=a,r.humanize=ab(),r.destroy=c,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let d=0;for(let p=0;p<l.length;p++)d=(d<<5)-d+l.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(l){let d,p=null,h,g;function m(...y){if(!m.enabled)return;let D=m,w=Number(new Date),S=w-(d||w);D.diff=S,D.prev=d,D.curr=w,d=w,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let F=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(_,k)=>{if(_==="%%")return"%";F++;let O=r.formatters[k];if(typeof O=="function"){let $=y[F];_=O.call(D,$),y.splice(F,1),F--}return _}),r.formatArgs.call(D,y),(D.log||r.log).apply(D,y)}return m.namespace=l,m.useColors=r.useColors(),m.color=r.selectColor(l),m.extend=n,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(l)),g),set:y=>{p=y}}),typeof r.init=="function"&&r.init(m),m}function n(l,d){let p=r(this.namespace+(typeof d>"u"?":":d)+l);return p.log=this.log,p}function o(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let d=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let p of d)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function s(l,d){let p=0,h=0,g=-1,m=0;for(;p<l.length;)if(h<d.length&&(d[h]===l[p]||d[h]==="*"))d[h]==="*"?(g=h,m=p,h++):(p++,h++);else if(g!==-1)h=g+1,m++,p=m;else return!1;for(;h<d.length&&d[h]==="*";)h++;return h===d.length}function i(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function a(l){for(let d of r.skips)if(s(l,d))return!1;for(let d of r.names)if(s(l,d))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}ub.exports=zI});var cb=E((Gt,Lu)=>{Gt.formatArgs=KI;Gt.save=WI;Gt.load=JI;Gt.useColors=qI;Gt.storage=YI();Gt.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Gt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function qI(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function KI(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Lu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}Gt.log=console.debug||console.log||(()=>{});function WI(e){try{e?Gt.storage.setItem("debug",e):Gt.storage.removeItem("debug")}catch{}}function JI(){let e;try{e=Gt.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function YI(){try{return localStorage}catch{}}Lu.exports=op()(Gt);var{formatters:QI}=Lu.exports;QI.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var db=E((Vq,lb)=>{"use strict";lb.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var mb=E((Hq,fb)=>{"use strict";var ZI=Q("os"),pb=Q("tty"),rr=db(),{env:Qe}=process,jn;rr("no-color")||rr("no-colors")||rr("color=false")||rr("color=never")?jn=0:(rr("color")||rr("colors")||rr("color=true")||rr("color=always"))&&(jn=1);"FORCE_COLOR"in Qe&&(Qe.FORCE_COLOR==="true"?jn=1:Qe.FORCE_COLOR==="false"?jn=0:jn=Qe.FORCE_COLOR.length===0?1:Math.min(parseInt(Qe.FORCE_COLOR,10),3));function ip(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function sp(e,t){if(jn===0)return 0;if(rr("color=16m")||rr("color=full")||rr("color=truecolor"))return 3;if(rr("color=256"))return 2;if(e&&!t&&jn===void 0)return 0;let r=jn||0;if(Qe.TERM==="dumb")return r;if(process.platform==="win32"){let n=ZI.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Qe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Qe)||Qe.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Qe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Qe.TEAMCITY_VERSION)?1:0;if(Qe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Qe){let n=parseInt((Qe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Qe.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Qe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Qe.TERM)||"COLORTERM"in Qe?1:r}function XI(e){let t=sp(e,e&&e.isTTY);return ip(t)}fb.exports={supportsColor:XI,stdout:ip(sp(!0,pb.isatty(1))),stderr:ip(sp(!0,pb.isatty(2)))}});var hb=E((Ze,Uu)=>{var e1=Q("tty"),ju=Q("util");Ze.init=a1;Ze.log=o1;Ze.formatArgs=r1;Ze.save=i1;Ze.load=s1;Ze.useColors=t1;Ze.destroy=ju.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ze.colors=[6,2,3,4,5,1];try{let e=mb();e&&(e.stderr||e).level>=2&&(Ze.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ze.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function t1(){return"colors"in Ze.inspectOpts?!!Ze.inspectOpts.colors:e1.isatty(process.stderr.fd)}function r1(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
|
|
1486
1486
|
`).join(`
|
|
1487
|
-
`+s),e.push(o+"m+"+Uu.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=
|
|
1488
|
-
`)}function
|
|
1489
|
-
`).map(t=>t.trim()).join(" ")};bb.O=function(e){return this.inspectOpts.colors=this.useColors,ju.inspect(e,this.inspectOpts)}});var Vu=E((Lz,ap)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ap.exports=gb():ap.exports=xb()});var Sb=E((jz,wb)=>{var Hs;wb.exports=function(){if(!Hs){try{Hs=Vu()("follow-redirects")}catch{}typeof Hs!="function"&&(Hs=function(){})}Hs.apply(null,arguments)}});var Fb=E((Uz,vp)=>{var zs=re("url"),qs=zs.URL,v1=re("http"),C1=re("https"),pp=re("stream").Writable,fp=re("assert"),Eb=Sb();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=So(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var mp=!1;try{fp(new qs(""))}catch(e){mp=e.code==="ERR_INVALID_URL"}var b1=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],gp=["abort","aborted","connect","error","socket","timeout"],hp=Object.create(null);gp.forEach(function(e){hp[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var cp=Ks("ERR_INVALID_URL","Invalid URL",TypeError),lp=Ks("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),x1=Ks("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",lp),w1=Ks("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),S1=Ks("ERR_STREAM_WRITE_AFTER_END","write after end"),E1=pp.prototype.destroy||Ab;function At(e,t){pp.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(o){r.emit("error",o instanceof lp?o:new lp({cause:o}))}},this._performRequest()}At.prototype=Object.create(pp.prototype);At.prototype.abort=function(){Dp(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};At.prototype.destroy=function(e){return Dp(this._currentRequest,e),E1.call(this,e),this};At.prototype.write=function(e,t,r){if(this._ending)throw new S1;if(!wo(e)&&!T1(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(So(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new w1),this.abort())};At.prototype.end=function(e,t,r){if(So(e)?(r=e,e=t=null):So(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,o=this._currentRequest;this.write(e,t,function(){n._ended=!0,o.end(null,null,r)}),this._ending=!0}};At.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};At.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};At.prototype.setTimeout=function(e,t){var r=this;function n(i){i.setTimeout(e),i.removeListener("timeout",i.destroy),i.addListener("timeout",i.destroy)}function o(i){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),n(i)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){At.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(At.prototype,e,{get:function(){return this._currentRequest[e]}})});At.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};At.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var o of gp)n.on(o,hp[o]);if(this._currentUrl=/^\//.test(this._options.path)?zs.format(this._options):this._options.path,this._isRedirect){var s=0,i=this,a=this._requestBodyBuffers;(function u(c){if(n===i._currentRequest)if(c)i.emit("error",c);else if(s<a.length){var l=a[s++];n.finished||n.write(l.data,l.encoding,u)}else i._ended&&n.end()})()}};At.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Dp(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new x1;var n,o=this._options.beforeRedirect;o&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],up(/^content-/i,this._options.headers));var i=up(/^host$/i,this._options.headers),a=yp(this._currentUrl),u=i||a.host,c=/^\w+:/.test(r)?this._currentUrl:zs.format(Object.assign(a,{host:u})),l=P1(r,c);if(Eb("redirecting to",l.href),this._isRedirect=!0,dp(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!A1(l.host,u))&&up(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),So(o)){var d={headers:e.headers,statusCode:t},p={url:c,method:s,headers:n};o(this._options,d,p),this._sanitizeOptions(this._options)}this._performRequest()};function Pb(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var o=n+":",s=r[o]=e[n],i=t[n]=Object.create(s);function a(c,l,d){return F1(c)?c=dp(c):wo(c)?c=dp(yp(c)):(d=l,l=Tb(c),c={protocol:o}),So(l)&&(d=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,l),l.nativeProtocols=r,!wo(l.host)&&!wo(l.hostname)&&(l.hostname="::1"),fp.equal(l.protocol,o,"protocol mismatch"),Eb("options",l),new At(l,d)}function u(c,l,d){var p=i.request(c,l,d);return p.end(),p}Object.defineProperties(i,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function Ab(){}function yp(e){var t;if(mp)t=new qs(e);else if(t=Tb(zs.parse(e)),!wo(t.protocol))throw new cp({input:e});return t}function P1(e,t){return mp?new qs(e,t):yp(zs.resolve(t,e))}function Tb(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new cp({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new cp({input:e.href||e});return e}function dp(e,t){var r=t||{};for(var n of b1)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function up(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Ks(e,t,r){function n(o){So(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function Dp(e,t){for(var r of gp)e.removeListener(r,hp[r]);e.on("error",Ab),e.destroy(t)}function A1(e,t){fp(wo(e)&&wo(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function wo(e){return typeof e=="string"||e instanceof String}function So(e){return typeof e=="function"}function T1(e){return typeof e=="object"&&"length"in e}function F1(e){return qs&&e instanceof qs}vp.exports=Pb({http:v1,https:C1});vp.exports.wrap=Pb});var $b=E(Tt=>{"use strict";var _1=Tt&&Tt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),R1=Tt&&Tt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hu=Tt&&Tt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&_1(r,t,n[o]);return R1(r,t),r}})();Object.defineProperty(Tt,"__esModule",{value:!0});Tt.WEB_PASSES=void 0;Tt.deleteLength=_b;Tt.timeout=Rb;Tt.XHeaders=Ib;Tt.stream=kb;var I1=Hu(re("node:http")),k1=Hu(re("node:https")),$1=np(),Gu=Hu(Gs()),N1=Hu(Fb()),O1=Object.values($1.OUTGOING_PASSES),B1={http:I1,https:k1};function _b(e){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])}function Rb(e,t,r){r.timeout&&e.socket.setTimeout(r.timeout)}function Ib(e,t,r){if(!r.xfwd)return;let n=Gu.hasEncryptedConnection(e),o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Gu.getPort(e),proto:n?"https":"http"};for(let s of["for","port","proto"])e.headers["x-forwarded-"+s]=(e.headers["x-forwarded-"+s]||"")+(e.headers["x-forwarded-"+s]?",":"")+o[s];e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers.host||""}function kb(e,t,r,n,o,s){o.emit("start",e,t,r.target||r.forward);let i=r.followRedirects?N1:B1,a=i.http,u=i.https;if(r.forward){let m=r.forward.protocol==="https:"?u:a,g=Gu.setupOutgoing(r.ssl||{},r,e,"forward"),y=m.request(g),D=h(y,r.forward);if(e.on("error",D),y.on("error",D),(r.buffer||e).pipe(y),!r.target)return t.end()}let c=r.target.protocol==="https:"?u:a,l=Gu.setupOutgoing(r.ssl||{},r,e),d=c.request(l);d.on("socket",m=>{o&&!d.getHeader("expect")&&o.emit("proxyReq",d,e,t,r,m)}),r.proxyTimeout&&d.setTimeout(r.proxyTimeout,()=>{d.destroy()}),t.on("close",()=>{!t.writableFinished&&d.destroy()});let p=h(d,r.target);e.on("error",p),d.on("error",p);function h(m,g){return y=>{if(e.socket.destroyed&&y.code==="ECONNRESET"){o.emit("econnreset",y,e,t,g),m.destroy();return}s?s(y,e,t,g):o.emit("error",y,e,t,g)}}(r.buffer||e).pipe(d),d.on("response",m=>{if(o?.emit("proxyRes",m,e,t),!t.headersSent&&!r.selfHandleResponse)for(let g of O1)g(e,t,m,r);t.finished?o?.emit("end",e,t,m):(m.on("end",()=>{o?.emit("end",e,t,m)}),r.selfHandleResponse||m.pipe(t))})}Tt.WEB_PASSES={deleteLength:_b,timeout:Rb,XHeaders:Ib,stream:kb}});var Sp=E(at=>{"use strict";var M1=at&&at.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),L1=at&&at.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wp=at&&at.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&M1(r,t,n[o]);return L1(r,t),r}})(),j1=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});at.WS_PASSES=void 0;at.numOpenSockets=z1;at.checkMethodAndHeader=Ob;at.XHeaders=Bb;at.stream=Mb;var U1=wp(re("node:http")),V1=wp(re("node:https")),Fi=wp(Gs()),G1=np(),H1=j1(Vu()),_i=(0,H1.default)("http-proxy-3:ws-incoming"),q1=Object.values(G1.OUTGOING_PASSES);function Nb(e){let t=new Set;return({add:r,rm:n}={})=>(r&&(r.id||(r.id=Math.random()),t.has(r.id)||t.add(r.id)),n&&(n.id||(n.id=Math.random()),t.has(n.id)&&t.delete(n.id)),_i("socket counter:",{[e]:t.size},r?"add":n?"rm":""),t.size)}var Cp=Nb("socket"),bp=Nb("proxySocket"),xp=class{constructor(){this.headers={},this.statusCode=200,this.statusMessage=""}setHeader(t,r){return this.headers[t]=r,this}};function z1(){return Cp()+bp()}function Ob(e,t){if(_i("websocket: checkMethodAndHeader"),e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0}function Bb(e,t,r){if(!r.xfwd)return;_i("websocket: XHeaders");let n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Fi.getPort(e),proto:Fi.hasEncryptedConnection(e)?"wss":"ws"};for(let o of["for","port","proto"])e.headers["x-forwarded-"+o]=(e.headers["x-forwarded-"+o]||"")+(e.headers["x-forwarded-"+o]?",":"")+n[o]}function Mb(e,t,r,n,o,s){_i("websocket: new stream");let i=[];Cp({add:t});let a=()=>{for(let h of i)h.end()};t.on("close",()=>{Cp({rm:t}),a()}),t.on("error",a);let u=(h,m)=>Object.keys(m).reduce((g,y)=>{let D=m[y];if(!Array.isArray(D))return g.push(y+": "+D),g;for(let S=0;S<D.length;S++)g.push(y+": "+D[S]);return g},[h]).join(`\r
|
|
1487
|
+
`+s),e.push(o+"m+"+Uu.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=n1()+t+" "+e[0]}function n1(){return Ze.inspectOpts.hideDate?"":new Date().toISOString()+" "}function o1(...e){return process.stderr.write(ju.formatWithOptions(Ze.inspectOpts,...e)+`
|
|
1488
|
+
`)}function i1(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function s1(){return process.env.DEBUG}function a1(e){e.inspectOpts={};let t=Object.keys(Ze.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Ze.inspectOpts[t[r]]}Uu.exports=op()(Ze);var{formatters:gb}=Uu.exports;gb.o=function(e){return this.inspectOpts.colors=this.useColors,ju.inspect(e,this.inspectOpts).split(`
|
|
1489
|
+
`).map(t=>t.trim()).join(" ")};gb.O=function(e){return this.inspectOpts.colors=this.useColors,ju.inspect(e,this.inspectOpts)}});var Vu=E((Gq,ap)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ap.exports=cb():ap.exports=hb()});var Db=E((zq,yb)=>{var Gs;yb.exports=function(){if(!Gs){try{Gs=Vu()("follow-redirects")}catch{}typeof Gs!="function"&&(Gs=function(){})}Gs.apply(null,arguments)}});var wb=E((qq,vp)=>{var qs=Q("url"),zs=qs.URL,u1=Q("http"),c1=Q("https"),pp=Q("stream").Writable,fp=Q("assert"),vb=Db();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=So(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var mp=!1;try{fp(new zs(""))}catch(e){mp=e.code==="ERR_INVALID_URL"}var l1=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],gp=["abort","aborted","connect","error","socket","timeout"],hp=Object.create(null);gp.forEach(function(e){hp[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var cp=Ks("ERR_INVALID_URL","Invalid URL",TypeError),lp=Ks("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),d1=Ks("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",lp),p1=Ks("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),f1=Ks("ERR_STREAM_WRITE_AFTER_END","write after end"),m1=pp.prototype.destroy||bb;function At(e,t){pp.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(o){r.emit("error",o instanceof lp?o:new lp({cause:o}))}},this._performRequest()}At.prototype=Object.create(pp.prototype);At.prototype.abort=function(){Dp(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};At.prototype.destroy=function(e){return Dp(this._currentRequest,e),m1.call(this,e),this};At.prototype.write=function(e,t,r){if(this._ending)throw new f1;if(!wo(e)&&!y1(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(So(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new p1),this.abort())};At.prototype.end=function(e,t,r){if(So(e)?(r=e,e=t=null):So(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,o=this._currentRequest;this.write(e,t,function(){n._ended=!0,o.end(null,null,r)}),this._ending=!0}};At.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};At.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};At.prototype.setTimeout=function(e,t){var r=this;function n(i){i.setTimeout(e),i.removeListener("timeout",i.destroy),i.addListener("timeout",i.destroy)}function o(i){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),n(i)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){At.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(At.prototype,e,{get:function(){return this._currentRequest[e]}})});At.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};At.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var o of gp)n.on(o,hp[o]);if(this._currentUrl=/^\//.test(this._options.path)?qs.format(this._options):this._options.path,this._isRedirect){var s=0,i=this,a=this._requestBodyBuffers;(function u(c){if(n===i._currentRequest)if(c)i.emit("error",c);else if(s<a.length){var l=a[s++];n.finished||n.write(l.data,l.encoding,u)}else i._ended&&n.end()})()}};At.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Dp(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new d1;var n,o=this._options.beforeRedirect;o&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],up(/^content-/i,this._options.headers));var i=up(/^host$/i,this._options.headers),a=yp(this._currentUrl),u=i||a.host,c=/^\w+:/.test(r)?this._currentUrl:qs.format(Object.assign(a,{host:u})),l=g1(r,c);if(vb("redirecting to",l.href),this._isRedirect=!0,dp(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!h1(l.host,u))&&up(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),So(o)){var d={headers:e.headers,statusCode:t},p={url:c,method:s,headers:n};o(this._options,d,p),this._sanitizeOptions(this._options)}this._performRequest()};function Cb(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var o=n+":",s=r[o]=e[n],i=t[n]=Object.create(s);function a(c,l,d){return D1(c)?c=dp(c):wo(c)?c=dp(yp(c)):(d=l,l=xb(c),c={protocol:o}),So(l)&&(d=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,l),l.nativeProtocols=r,!wo(l.host)&&!wo(l.hostname)&&(l.hostname="::1"),fp.equal(l.protocol,o,"protocol mismatch"),vb("options",l),new At(l,d)}function u(c,l,d){var p=i.request(c,l,d);return p.end(),p}Object.defineProperties(i,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function bb(){}function yp(e){var t;if(mp)t=new zs(e);else if(t=xb(qs.parse(e)),!wo(t.protocol))throw new cp({input:e});return t}function g1(e,t){return mp?new zs(e,t):yp(qs.resolve(t,e))}function xb(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new cp({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new cp({input:e.href||e});return e}function dp(e,t){var r=t||{};for(var n of l1)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function up(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Ks(e,t,r){function n(o){So(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function Dp(e,t){for(var r of gp)e.removeListener(r,hp[r]);e.on("error",bb),e.destroy(t)}function h1(e,t){fp(wo(e)&&wo(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function wo(e){return typeof e=="string"||e instanceof String}function So(e){return typeof e=="function"}function y1(e){return typeof e=="object"&&"length"in e}function D1(e){return zs&&e instanceof zs}vp.exports=Cb({http:u1,https:c1});vp.exports.wrap=Cb});var Ws=E(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.isSSL=void 0;zt.setupOutgoing=x1;zt.setupSocket=w1;zt.getPort=S1;zt.hasEncryptedConnection=Pb;zt.urlJoin=Ab;zt.rewriteCookieProperty=Tb;zt.toURL=Fb;var v1=Q("node:tls"),C1=/(^|,)\s*upgrade\s*($|,)/i;zt.isSSL=/^https|wss/;var b1="trailer",Sb=[":method",":path",":scheme",":authority","connection","keep-alive"];function x1(e,t,r,n){let o=t[n||"target"];e.port=+(o.port??(o.protocol!==void 0&&zt.isSSL.test(o.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=o[a];e.method=t.method||r.method,e.headers={...r.headers},r.headers?.[":authority"]&&(e.headers.host=r.headers[":authority"]),t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(b1==a.toLowerCase()){delete e.headers[a];break}if(r.httpVersionMajor>1)for(let a of Sb)delete e.headers[a];t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),o.protocol!==void 0&&zt.isSSL.test(o.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!C1.test(e.headers.connection))&&(e.headers.connection="close"));let s=o&&t.prependPath!==!1&&"pathname"in o?Eb(`${o.pathname}${o.search??""}`):"/",i=t.toProxy?r.url:Eb(r.url);if(i=t.ignorePath?"":i,e.path=Ab(s,i??""),t.changeOrigin&&(e.headers.host=o.protocol!==void 0&&P1(e.port,o.protocol)&&!E1(e.host)?e.host+":"+e.port:e.host),e.url="href"in o&&o.href||(o.protocol==="https"?"https":"http")+"://"+e.host+(e.port?":"+e.port:""),r.httpVersionMajor>1)for(let a of Sb)delete e.headers[a];return e}function w1(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function S1(e){let t=e.headers[":authority"]||e.headers.host,r=t?t.match(/:(\d+)/):"";return r?r[1]:Pb(e)?"443":"80"}function Pb(e){let t=e.connection;return t instanceof v1.TLSSocket&&t.encrypted||!!t.pair}function Ab(...e){let t=[],r="";e.forEach((o,s)=>{let i=o.indexOf("?");i!==-1&&(t.push(o.substring(i+1)),e[s]=o.substring(0,i))}),r=t.filter(Boolean).join("&");let n="";for(let o of e)o&&(n.endsWith("/")?o.startsWith("/")?n+=o.slice(1):n+=o:o.startsWith("/")?n+=o:n+="/"+o);return r?n+"?"+r:n}function Tb(e,t,r){return Array.isArray(e)?e.map(n=>Tb(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,o,s)=>{let i;if(s in t)i=t[s];else if("*"in t)i=t["*"];else return n;return i?o+i:""})}function E1(e){return!!~e.indexOf(":")}function Eb(e){if(e===""||e?.startsWith("?"))return e;let t=Fb(e);return`${t.pathname??""}${t.search??""}`}function Fb(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://base.invalid${e}`),new URL(e,"http://base.invalid"))}function P1(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var Cp=E(Dt=>{"use strict";var A1=Dt&&Dt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),T1=Dt&&Dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),F1=Dt&&Dt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&A1(r,t,n[o]);return T1(r,t),r}})();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.OUTGOING_PASSES=void 0;Dt.removeChunked=_b;Dt.setConnection=Rb;Dt.setRedirectHostRewrite=Ib;Dt.writeHeaders=kb;Dt.writeStatusCode=$b;var Hu=F1(Ws()),_1=/^201|30(1|2|7|8)$/;function _b(e,t,r){delete r.headers["transfer-encoding"]}function Rb(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function Ib(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&_1.test(`${r.statusCode}`)){let o=Hu.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let i=Hu.toURL(s);if(o.host!=i.host)return;n.hostRewrite?i.host=n.hostRewrite:n.autoRewrite&&(i.host=e.headers[":authority"]??e.headers.host??""),n.protocolRewrite&&(i.protocol=n.protocolRewrite),r.headers.location=i.toString()}}function kb(e,t,r,n){let o=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,i=n.preserveHeaderKeyCase,a=(c,l)=>{l!=null&&(o&&c.toLowerCase()==="set-cookie"&&(l=Hu.rewriteCookieProperty(l,o,"domain")),s&&c.toLowerCase()==="set-cookie"&&(l=Hu.rewriteCookieProperty(l,s,"path")),t.setHeader(String(c).trim(),l))},u;if(i&&r.rawHeaders!=null){u={};for(let c=0;c<r.rawHeaders.length;c+=2){let l=r.rawHeaders[c];u[l.toLowerCase()]=l}}for(let c in r.headers){let l=c;if(e.httpVersionMajor>1&&(l==="connection"||l==="keep-alive"))continue;let d=r.headers[l];i&&u&&(l=u[l]??l),a(l,d)}}function $b(e,t,r){t.statusCode=r.statusCode,r.statusMessage&&e.httpVersionMajor===1&&(t.statusMessage=r.statusMessage)}Dt.OUTGOING_PASSES={removeChunked:_b,setConnection:Rb,setRedirectHostRewrite:Ib,writeHeaders:kb,writeStatusCode:$b}});var jb=E(Tt=>{"use strict";var R1=Tt&&Tt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),I1=Tt&&Tt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Gu=Tt&&Tt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&R1(r,t,n[o]);return I1(r,t),r}})();Object.defineProperty(Tt,"__esModule",{value:!0});Tt.WEB_PASSES=void 0;Tt.deleteLength=Ob;Tt.timeout=Bb;Tt.XHeaders=Mb;Tt.stream=Lb;var k1=Gu(Q("node:http")),$1=Gu(Q("node:https")),N1=Gu(wb()),Fi=Gu(Ws()),O1=Cp(),B1=Q("node:stream"),Nb=Object.values(O1.OUTGOING_PASSES),M1={http:k1,https:$1};function Ob(e){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])}function Bb(e,t,r){r.timeout&&e.socket.setTimeout(r.timeout)}function Mb(e,t,r){if(!r.xfwd)return;let n=Fi.hasEncryptedConnection(e),o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Fi.getPort(e),proto:n?"https":"http"};for(let s of["for","port","proto"])e.headers["x-forwarded-"+s]=(e.headers["x-forwarded-"+s]||"")+(e.headers["x-forwarded-"+s]?",":"")+o[s];e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers[":authority"]||e.headers.host||""}function Lb(e,t,r,n,o,s){if(o.emit("start",e,t,r.target||r.forward),r.fetch||r.fetchOptions||process.env.FORCE_FETCH_PATH==="true")return L1(e,t,r,n,o,s);let i=r.followRedirects?N1:M1,a=i.http,u=i.https;if(r.forward){let g=r.forward.protocol==="https:"?u:a,m=Fi.setupOutgoing(r.ssl||{},r,e,"forward"),y=g.request(m),D=h(y,r.forward);if(e.on("error",D),y.on("error",D),(r.buffer||e).pipe(y),!r.target)return t.end()}let c=r.target.protocol==="https:"?u:a,l=Fi.setupOutgoing(r.ssl||{},r,e),d=c.request(l);d.on("socket",g=>{o&&!d.getHeader("expect")&&o.emit("proxyReq",d,e,t,r,g)}),r.proxyTimeout&&d.setTimeout(r.proxyTimeout,()=>{d.destroy()}),t.on("close",()=>{!t.writableFinished&&d.destroy()});let p=h(d,r.target);e.on("error",p),d.on("error",p);function h(g,m){return y=>{if(e.socket.destroyed&&y.code==="ECONNRESET"){o.emit("econnreset",y,e,t,m),g.destroy();return}s?s(y,e,t,m):o.emit("error",y,e,t,m)}}(r.buffer||e).pipe(d),d.on("response",g=>{if(o?.emit("proxyRes",g,e,t),!t.headersSent&&!r.selfHandleResponse)for(let m of Nb)m(e,t,g,r);t.finished?o?.emit("end",e,t,g):(g.on("end",()=>{o?.emit("end",e,t,g)}),r.selfHandleResponse||g.pipe(t))})}async function L1(e,t,r,n,o,s){let i=(h,g)=>{let m=h;m.code===void 0&&m.cause?.code&&(m.code=m.cause.code),s?s(h,e,t,g):o.emit("error",h,e,t,g)};e.on("error",h=>{if(e.socket.destroyed&&h.code==="ECONNRESET"){let g=r.target||r.forward;g&&o.emit("econnreset",h,e,t,g);return}i(h)});let a=r.fetch||fetch,u=r.fetchOptions??{},c=h=>{let g={method:h.method,...u.requestOptions},m=new Headers(u.requestOptions?.headers);if(!u.requestOptions?.headers&&h.headers){for(let[y,D]of Object.entries(h.headers))if(typeof y=="string")if(Array.isArray(D))for(let w of D)m.append(y,w);else D!=null&&m.append(y,D)}return r.auth&&m.set("authorization",`Basic ${Buffer.from(r.auth).toString("base64")}`),r.proxyTimeout&&(g.signal=AbortSignal.timeout(r.proxyTimeout)),g.headers=m,r.buffer?g.body=r.buffer:e.method!=="GET"&&e.method!=="HEAD"&&(g.body=e,g.duplex="half"),g};if(r.forward){let h=Fi.setupOutgoing(r.ssl||{},r,e,"forward"),g=c(h),m=new URL(h.url).origin+h.path;if(m.startsWith("ws")&&(m=m.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(g,e,t,r)}catch(y){i(y,r.forward);return}try{let y=await a(m,g);if(u.onAfterResponse)try{await u.onAfterResponse(y,e,t,r)}catch(D){i(D,r.forward);return}}catch(y){i(y,r.forward)}if(!r.target)return t.end()}let l=Fi.setupOutgoing(r.ssl||{},r,e),d=c(l),p=new URL(l.url).origin+l.path;if(p.startsWith("ws")&&(p=p.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(d,e,t,r)}catch(h){i(h,r.target);return}try{let h=await a(p,d);if(u.onAfterResponse)try{await u.onAfterResponse(h,e,t,r)}catch(m){i(m,r.target);return}let g={statusCode:h.status,statusMessage:h.statusText,headers:Object.fromEntries(h.headers.entries()),rawHeaders:Object.entries(h.headers).flatMap(([m,y])=>Array.isArray(y)?y.flatMap(D=>D!=null?[m,D]:[]):y!=null?[m,y]:[])};if(o?.emit("proxyRes",g,e,t),!t.headersSent&&!r.selfHandleResponse)for(let m of Nb)m(e,t,g,r);if(t.writableEnded)o?.emit("end",e,t,g);else{let m=h.body?B1.Readable.from(h.body):null;m?(m.on("error",y=>{i(y,r.target)}),m.on("end",()=>{o?.emit("end",e,t,g)}),r.selfHandleResponse?m.resume():m.pipe(t,{end:!0})):o?.emit("end",e,t,g)}}catch(h){i(h,r.target)}}Tt.WEB_PASSES={deleteLength:Ob,timeout:Bb,XHeaders:Mb,stream:Lb}});var Ep=E(at=>{"use strict";var j1=at&&at.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),U1=at&&at.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sp=at&&at.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&j1(r,t,n[o]);return U1(r,t),r}})(),V1=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});at.WS_PASSES=void 0;at.numOpenSockets=W1;at.checkMethodAndHeader=Vb;at.XHeaders=Hb;at.stream=Gb;var H1=Sp(Q("node:http")),G1=Sp(Q("node:https")),_i=Sp(Ws()),z1=Cp(),q1=V1(Vu()),Ri=(0,q1.default)("http-proxy-3:ws-incoming"),K1=Object.values(z1.OUTGOING_PASSES);function Ub(e){let t=new Set;return({add:r,rm:n}={})=>(r&&(r.id||(r.id=Math.random()),t.has(r.id)||t.add(r.id)),n&&(n.id||(n.id=Math.random()),t.has(n.id)&&t.delete(n.id)),Ri("socket counter:",{[e]:t.size},r?"add":n?"rm":""),t.size)}var bp=Ub("socket"),xp=Ub("proxySocket"),wp=class{constructor(){this.headers={},this.statusCode=200,this.statusMessage=""}setHeader(t,r){return this.headers[t]=r,this}};function W1(){return bp()+xp()}function Vb(e,t){if(Ri("websocket: checkMethodAndHeader"),e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0}function Hb(e,t,r){if(!r.xfwd)return;Ri("websocket: XHeaders");let n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:_i.getPort(e),proto:_i.hasEncryptedConnection(e)?"wss":"ws"};for(let o of["for","port","proto"])e.headers["x-forwarded-"+o]=(e.headers["x-forwarded-"+o]||"")+(e.headers["x-forwarded-"+o]?",":"")+n[o]}function Gb(e,t,r,n,o,s){Ri("websocket: new stream");let i=[];bp({add:t});let a=()=>{for(let h of i)h.end()};t.on("close",()=>{bp({rm:t}),a()}),t.on("error",a);let u=(h,g)=>Object.keys(g).reduce((m,y)=>{let D=g[y];if(!Array.isArray(D))return m.push(y+": "+D),m;for(let w=0;w<D.length;w++)m.push(y+": "+D[w]);return m},[h]).join(`\r
|
|
1490
1490
|
`)+`\r
|
|
1491
1491
|
\r
|
|
1492
|
-
`;
|
|
1492
|
+
`;_i.setupSocket(t),n&&n.length&&t.unshift(n);let c=_i.isSSL.test(r.target.protocol)?G1:H1,l=_i.setupOutgoing(r.ssl||{},r,e),d=c.request(l);o&&o.emit("proxyReqWs",d,e,t,r,n),d.on("error",p),d.on("upgrade",(h,g,m)=>{Ri("upgrade"),xp({add:g}),i.push(g),g.on("close",()=>{xp({rm:g})}),g.on("error",p),g.on("end",()=>{o.emit("close",h,g,m)}),g.on("close",()=>{t.end()}),_i.setupSocket(g),m&&m.length&&g.unshift(m),t.write(u("HTTP/1.1 101 Switching Protocols",h.headers)),g.pipe(t).pipe(g),o.emit("open",g)});function p(h){s?s(h,e,t):o.emit("error",h,e,t),t.destroySoon()}d.on("response",h=>{Ri("got non-ws HTTP response",{statusCode:h.statusCode,statusMessage:h.statusMessage});let g=new wp;for(let D of K1)D(e,g,h,r);let m=D=>{t.write(D)};e.httpVersion==="1.1"&&h.headers["content-length"]===void 0&&(g.headers["transfer-encoding"]="chunked",m=D=>{t.write(D.length.toString(16)),t.write(`\r
|
|
1493
1493
|
`),t.write(D),t.write(`\r
|
|
1494
|
-
`)});let y=u(`HTTP/${e.httpVersion} ${h.statusCode} ${h.statusMessage}`,m.headers);t.destroyed?h.resume():(t.write(y),h.on("data",D=>{g(D)}),h.on("end",()=>{g(""),t.destroySoon()}))}),d.end()}at.WS_PASSES={checkMethodAndHeader:Ob,XHeaders:Bb,stream:Mb}});var jb=E(nr=>{"use strict";var K1=nr&&nr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),W1=nr&&nr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lb=nr&&nr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&K1(r,t,n[o]);return W1(r,t),r}})(),J1=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nr,"__esModule",{value:!0});nr.ProxyServer=void 0;var Y1=Lb(re("node:http")),Q1=Lb(re("node:http2")),Z1=$b(),X1=Sp(),ek=re("node:events"),tk=J1(Vu()),rk=Gs(),qu=(0,tk.default)("http-proxy-3"),Ep=class e extends ek.EventEmitter{constructor(t={}){super(),this.createRightProxy=r=>(qu("createRightProxy",{type:r}),n=>(...o)=>{let s=o[0];qu("proxy: ",{type:r,path:s.url});let i=o[1],a=r==="ws"?this.wsPasses:this.webPasses;r=="ws"&&i.on("error",p=>{this.emit("error",p,s,i)});let u=o.length-1,c,l;typeof o[u]=="function"&&(l=o[u],u--);let d;!(o[u]instanceof Buffer)&&o[u]!==i?(d={...n,...o[u]},u--):d={...n},o[u]instanceof Buffer&&(c=o[u]);for(let p of["target","forward"])typeof d[p]=="string"&&(d[p]=(0,rk.toURL)(d[p]));if(!d.target&&!d.forward){this.emit("error",new Error("Must set target or forward"),s,i);return}for(let p of a)if(p(s,i,d,c,this,l))break}),this.onError=r=>{if(this.listeners("error").length===1)throw r},this.listen=(r,n)=>{qu("listen",{port:r,hostname:n});let o=(s,i)=>{this.web(s,i)};return this._server=this.options.ssl?Q1.createSecureServer({...this.options.ssl,allowHTTP1:!0},o):Y1.createServer(o),this.options.ws&&this._server.on("upgrade",(s,i,a)=>{this.ws(s,i,a)}),this._server.listen(r,n),this},this.address=()=>this._server?.address(),this.close=r=>{if(this._server==null){r?.();return}this._server.close(n=>{this._server=null,r?.(n)})},this.before=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i,0,o)},this.after=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i++,0,o)},qu("creating a ProxyServer",t),t.prependPath=t.prependPath!==!1,this.options=t,this.web=this.createRightProxy("web")(t),this.ws=this.createRightProxy("ws")(t),this.webPasses=Object.values(Z1.WEB_PASSES),this.wsPasses=Object.values(X1.WS_PASSES),this.on("error",this.onError)}static createProxyServer(t){return new e(t)}static createServer(t){return new e(t)}static createProxy(t){return new e(t)}};nr.ProxyServer=Ep});var Ub=E(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.numOpenSockets=Wr.ProxyServer=void 0;Wr.createProxyServer=Ap;Wr.createServer=Ap;Wr.createProxy=Ap;var Pp=jb();Object.defineProperty(Wr,"ProxyServer",{enumerable:!0,get:function(){return Pp.ProxyServer}});var nk=Sp();Object.defineProperty(Wr,"numOpenSockets",{enumerable:!0,get:function(){return nk.numOpenSockets}});function Ap(e={}){return new Pp.ProxyServer(e)}Wr.default=Pp.ProxyServer});var Hb=E(Tp=>{"use strict";Tp.parse=lk;Tp.serialize=dk;var ok=Object.prototype.toString,ik=Object.prototype.hasOwnProperty,sk=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,ak=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,uk=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,ck=/^[\u0020-\u003A\u003D-\u007E]*$/;function lk(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var o=t&&t.decode||pk,s=0,i=0,a=0;do{if(i=e.indexOf("=",s),i===-1)break;if(a=e.indexOf(";",s),a===-1)a=n;else if(i>a){s=e.lastIndexOf(";",i-1)+1;continue}var u=Vb(e,s,i),c=Gb(e,i,u),l=e.slice(u,c);if(!ik.call(r,l)){var d=Vb(e,i+1,a),p=Gb(e,a,d);e.charCodeAt(d)===34&&e.charCodeAt(p-1)===34&&(d++,p--);var h=e.slice(d,p);r[l]=mk(h,o)}s=a+1}while(s<n);return r}function Vb(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function Gb(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function dk(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!sk.test(e))throw new TypeError("argument name is invalid");var o=n(t);if(!ak.test(o))throw new TypeError("argument val is invalid");var s=e+"="+o;if(!r)return s;if(r.maxAge!=null){var i=Math.floor(r.maxAge);if(!isFinite(i))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+i}if(r.domain){if(!uk.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!ck.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var a=r.expires;if(!fk(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+a.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.partitioned&&(s+="; Partitioned"),r.priority){var u=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(u){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var c=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function pk(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function fk(e){return ok.call(e)==="[object Date]"}function mk(e,t){try{return t(e)}catch{return e}}});var Kb=E(zu=>{var zb=re("crypto");zu.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");return e+"."+zb.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};zu.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=zu.sign(r,t);return qb(n)==qb(e)?r:!1};function qb(e){return zb.createHash("sha1").update(e).digest("hex")}});var Qb=E((Wz,Ri)=>{"use strict";var gk=Hb(),hk=Kb();Ri.exports=yk;Ri.exports.JSONCookie=Wb;Ri.exports.JSONCookies=Fp;Ri.exports.signedCookie=Jb;Ri.exports.signedCookies=Yb;function yk(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(o,s,i){if(o.cookies)return i();var a=o.headers.cookie;if(o.secret=r[0],o.cookies=Object.create(null),o.signedCookies=Object.create(null),!a)return i();o.cookies=gk.parse(a,t),r.length!==0&&(o.signedCookies=Yb(o.cookies,r),o.signedCookies=Fp(o.signedCookies)),o.cookies=Fp(o.cookies),i()}}function Wb(e){if(!(typeof e!="string"||e.substr(0,2)!=="j:"))try{return JSON.parse(e.slice(2))}catch{return}}function Fp(e){for(var t=Object.keys(e),r,n,o=0;o<t.length;o++)r=t[o],n=Wb(e[r]),n&&(e[r]=n);return e}function Jb(e,t){if(typeof e=="string"){if(e.substr(0,2)!=="s:")return e;for(var r=!t||Array.isArray(t)?t||[]:[t],n=0;n<r.length;n++){var o=hk.unsign(e.slice(2),r[n]);if(o!==!1)return o}return!1}}function Yb(e,t){for(var r=Object.keys(e),n,o,s=Object.create(null),i,a=0;a<r.length;a++)o=r[a],i=e[o],n=Jb(i,t),i!==n&&(s[o]=n,delete e[o]);return s}});var Dk,Zb,Jz,Xb=v(()=>{"use strict";Dk=Me(Qb(),1),Zb="/_builder.io",Jz=Zb+"/api"});var vk,ex=v(()=>{"use strict";vk=Me(Ub(),1);Xb()});var tx=v(()=>{"use strict"});var eK,rx=v(()=>{"use strict";eK=process.platform==="win32"?"C:\\Windows\\System32\\drivers\\etc\\hosts":"/etc/hosts"});var nx=v(()=>{"use strict"});var ox=v(()=>{"use strict"});var _p=v(()=>{"use strict";wi();tb();Ou();ex();Ms();tx();Lt();rx();nx();ox();xi()});import*as wk from"@sentry/node";var ax=v(()=>{"use strict";Tu();Tu();Md();XC();wi();eb();$s();Ou();_p();Ku();Ms();vo()});var Rp=v(()=>{"use strict";Rd()});var ux=v(()=>{"use strict";Rp()});var Ip=v(()=>{"use strict"});var cx=v(()=>{"use strict"});var se,kp,M,Jr,Ws=v(()=>{(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let s={};for(let i of o)s[i]=i;return s},e.getValidEnumValues=o=>{let s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(let a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(let i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=n,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(se||(se={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(kp||(kp={}));M=se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jr=e=>{switch(typeof e){case"undefined":return M.undefined;case"string":return M.string;case"number":return Number.isNaN(e)?M.nan:M.number;case"boolean":return M.boolean;case"function":return M.function;case"bigint":return M.bigint;case"symbol":return M.symbol;case"object":return Array.isArray(e)?M.array:e===null?M.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?M.promise:typeof Map<"u"&&e instanceof Map?M.map:typeof Set<"u"&&e instanceof Set?M.set:typeof Date<"u"&&e instanceof Date?M.date:M.object;default:return M.unknown}}});var I,Sk,Ft,Wu=v(()=>{Ws();I=se.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Sk=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Ft=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(let i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,u=0;for(;u<i.path.length;){let c=i.path[u];u===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(i))):a[c]=a[c]||{_errors:[]},a=a[c],u++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,se.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ft.create=e=>new Ft(e)});var Ek,hn,$p=v(()=>{Wu();Ws();Ek=(e,t)=>{let r;switch(e.code){case I.invalid_type:e.received===M.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,se.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:r=`Unrecognized key(s) in object: ${se.joinValues(e.keys,", ")}`;break;case I.invalid_union:r="Invalid input";break;case I.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${se.joinValues(e.options)}`;break;case I.invalid_enum_value:r=`Invalid enum value. Expected ${se.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:r="Invalid function arguments";break;case I.invalid_return_type:r="Invalid function return type";break;case I.invalid_date:r="Invalid date";break;case I.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:se.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case I.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case I.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case I.custom:r="Invalid input";break;case I.invalid_intersection_types:r="Intersection results could not be merged";break;case I.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:r="Number must be finite";break;default:r=t.defaultError,se.assertNever(e)}return{message:r}},hn=Ek});function Pk(e){lx=e}function Ii(){return lx}var lx,Ju=v(()=>{$p();lx=hn});function B(e,t){let r=Ii(),n=Js({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===hn?void 0:hn].filter(o=>!!o)});e.common.issues.push(n)}var Js,Ak,tt,G,Eo,ut,Yu,Qu,Un,ki,Np=v(()=>{Ju();$p();Js=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,s=[...r,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},Ak=[];tt=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return G;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let s=await o.key,i=await o.value;n.push({key:s,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return G;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[s.value]=i.value)}return{status:t.value,value:n}}},G=Object.freeze({status:"aborted"}),Eo=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),Yu=e=>e.status==="aborted",Qu=e=>e.status==="dirty",Un=e=>e.status==="valid",ki=e=>typeof Promise<"u"&&e instanceof Promise});var dx=v(()=>{});var j,px=v(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(j||(j={}))});function Y(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{let{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:u??r??a.defaultError}},description:o}}function hx(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Hk(e){return new RegExp(`^${hx(e)}$`)}function yx(e){let t=`${gx}T${hx(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function qk(e,t){return!!((t==="v4"||!t)&&Bk.test(e)||(t==="v6"||!t)&&Lk.test(e))}function zk(e,t){if(!kk.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function Kk(e,t){return!!((t==="v4"||!t)&&Mk.test(e)||(t==="v6"||!t)&&jk.test(e))}function Wk(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),i=Number.parseInt(t.toFixed(o).replace(".",""));return s%i/10**o}function $i(e){if(e instanceof _t){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=or.create($i(n))}return new _t({...e._def,shape:()=>t})}else return e instanceof vn?new vn({...e._def,type:$i(e.element)}):e instanceof or?or.create($i(e.unwrap())):e instanceof Qr?Qr.create($i(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>$i(t))):e}function Bp(e,t){let r=Jr(e),n=Jr(t);if(e===t)return{valid:!0,data:e};if(r===M.object&&n===M.object){let o=se.objectKeys(t),s=se.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(let a of s){let u=Bp(e[a],t[a]);if(!u.valid)return{valid:!1};i[a]=u.data}return{valid:!0,data:i}}else if(r===M.array&&n===M.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let s=0;s<e.length;s++){let i=e[s],a=t[s],u=Bp(i,a);if(!u.valid)return{valid:!1};o.push(u.data)}return{valid:!0,data:o}}else return r===M.date&&n===M.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function Dx(e,t){return new Oo({values:e,typeName:z.ZodEnum,...Y(t)})}function mx(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function vx(e,t={},r){return e?Gn.create().superRefine((n,o)=>{let s=e(n);if(s instanceof Promise)return s.then(i=>{if(!i){let a=mx(t,n),u=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:u})}});if(!s){let i=mx(t,n),a=i.fatal??r??!0;o.addIssue({code:"custom",...i,fatal:a})}}):Gn.create()}var ir,fx,ee,Tk,Fk,_k,Rk,Ik,kk,$k,Nk,Ok,Op,Bk,Mk,Lk,jk,Uk,Vk,gx,Gk,Vn,Po,Ao,To,Fo,Ni,_o,Ro,Gn,Dn,br,Oi,vn,_t,Io,yn,Zu,ko,Yr,Xu,Bi,Mi,ec,$o,No,Oo,Bo,Hn,sr,or,Qr,Mo,Lo,Li,Jk,Ys,Qs,jo,Yk,z,Qk,Cx,bx,Zk,Xk,xx,e$,t$,r$,n$,o$,i$,s$,a$,u$,c$,l$,d$,p$,f$,m$,g$,h$,y$,D$,v$,C$,b$,x$,w$,S$,E$,P$,A$,T$,F$,_$,R$,I$,k$,wx=v(()=>{Wu();Ju();px();Np();Ws();ir=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},fx=(e,t)=>{if(Un(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Ft(e.common.issues);return this._error=r,this._error}}};ee=class{get description(){return this._def.description}_getType(t){return Jr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new tt,ctx:{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(ki(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},o=this._parseSync({data:t,path:n.path,parent:n});return fx(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Un(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Un(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},o=this._parse({data:t,path:n.path,parent:n}),s=await(ki(o)?o:Promise.resolve(o));return fx(n,s)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let i=t(o),a=()=>s.addIssue({code:I.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new sr({schema:this,typeName:z.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return or.create(this,this._def)}nullable(){return Qr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return vn.create(this)}promise(){return Hn.create(this,this._def)}or(t){return Io.create([this,t],this._def)}and(t){return ko.create(this,t,this._def)}transform(t){return new sr({...Y(this._def),schema:this,typeName:z.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Mo({...Y(this._def),innerType:this,defaultValue:r,typeName:z.ZodDefault})}brand(){return new Ys({typeName:z.ZodBranded,type:this,...Y(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Lo({...Y(this._def),innerType:this,catchValue:r,typeName:z.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Qs.create(this,t)}readonly(){return jo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Tk=/^c[^\s-]{8,}$/i,Fk=/^[0-9a-z]+$/,_k=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Rk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ik=/^[a-z0-9_-]{21}$/i,kk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$k=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Nk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ok="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Bk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Lk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,jk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Uk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Vk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gx="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Gk=new RegExp(`^${gx}$`);Vn=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==M.string){let s=this._getOrReturnCtx(t);return B(s,{code:I.invalid_type,expected:M.string,received:s.parsedType}),G}let n=new tt,o;for(let s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),B(o,{code:I.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),B(o,{code:I.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?B(o,{code:I.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&B(o,{code:I.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Nk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"email",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Op||(Op=new RegExp(Ok,"u")),Op.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"emoji",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Rk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"uuid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Ik.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"nanoid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Tk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"cuid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Fk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"cuid2",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")_k.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"ulid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),B(o,{validation:"url",code:I.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"regex",code:I.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?yx(s).test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Gk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Hk(s).test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?$k.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"duration",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?qk(t.data,s.version)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"ip",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?zk(t.data,s.alg)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"jwt",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Kk(t.data,s.version)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"cidr",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Uk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"base64",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Vk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"base64url",code:I.invalid_string,message:s.message}),n.dirty()):se.assertNever(s);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:I.invalid_string,...j.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...j.errToObj(t)})}url(t){return this._addCheck({kind:"url",...j.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...j.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...j.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...j.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...j.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...j.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...j.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...j.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...j.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...j.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...j.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...j.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...j.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...j.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...j.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...j.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...j.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...j.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...j.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...j.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...j.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...j.errToObj(r)})}nonempty(t){return this.min(1,j.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Vn.create=e=>new Vn({checks:[],typeName:z.ZodString,coerce:e?.coerce??!1,...Y(e)});Po=class e extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==M.number){let s=this._getOrReturnCtx(t);return B(s,{code:I.invalid_type,expected:M.number,received:s.parsedType}),G}let n,o=new tt;for(let s of this._def.checks)s.kind==="int"?se.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),B(n,{code:I.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Wk(t.data,s.value)!==0&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),B(n,{code:I.not_finite,message:s.message}),o.dirty()):se.assertNever(s);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,j.toString(r))}gt(t,r){return this.setLimit("min",t,!1,j.toString(r))}lte(t,r){return this.setLimit("max",t,!0,j.toString(r))}lt(t,r){return this.setLimit("max",t,!1,j.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:j.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:j.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:j.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&se.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Po.create=e=>new Po({checks:[],typeName:z.ZodNumber,coerce:e?.coerce||!1,...Y(e)});Ao=class e extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==M.bigint)return this._getInvalidInput(t);let n,o=new tt;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):se.assertNever(s);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:M.bigint,received:r.parsedType}),G}gte(t,r){return this.setLimit("min",t,!0,j.toString(r))}gt(t,r){return this.setLimit("min",t,!1,j.toString(r))}lte(t,r){return this.setLimit("max",t,!0,j.toString(r))}lt(t,r){return this.setLimit("max",t,!1,j.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:j.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ao.create=e=>new Ao({checks:[],typeName:z.ZodBigInt,coerce:e?.coerce??!1,...Y(e)});To=class extends ee{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==M.boolean){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.boolean,received:n.parsedType}),G}return ut(t.data)}};To.create=e=>new To({typeName:z.ZodBoolean,coerce:e?.coerce||!1,...Y(e)});Fo=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==M.date){let s=this._getOrReturnCtx(t);return B(s,{code:I.invalid_type,expected:M.date,received:s.parsedType}),G}if(Number.isNaN(t.data.getTime())){let s=this._getOrReturnCtx(t);return B(s,{code:I.invalid_date}),G}let n=new tt,o;for(let s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),B(o,{code:I.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),B(o,{code:I.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):se.assertNever(s);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:j.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:j.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Fo.create=e=>new Fo({checks:[],coerce:e?.coerce||!1,typeName:z.ZodDate,...Y(e)});Ni=class extends ee{_parse(t){if(this._getType(t)!==M.symbol){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.symbol,received:n.parsedType}),G}return ut(t.data)}};Ni.create=e=>new Ni({typeName:z.ZodSymbol,...Y(e)});_o=class extends ee{_parse(t){if(this._getType(t)!==M.undefined){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.undefined,received:n.parsedType}),G}return ut(t.data)}};_o.create=e=>new _o({typeName:z.ZodUndefined,...Y(e)});Ro=class extends ee{_parse(t){if(this._getType(t)!==M.null){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.null,received:n.parsedType}),G}return ut(t.data)}};Ro.create=e=>new Ro({typeName:z.ZodNull,...Y(e)});Gn=class extends ee{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}};Gn.create=e=>new Gn({typeName:z.ZodAny,...Y(e)});Dn=class extends ee{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}};Dn.create=e=>new Dn({typeName:z.ZodUnknown,...Y(e)});br=class extends ee{_parse(t){let r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:M.never,received:r.parsedType}),G}};br.create=e=>new br({typeName:z.ZodNever,...Y(e)});Oi=class extends ee{_parse(t){if(this._getType(t)!==M.undefined){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.void,received:n.parsedType}),G}return ut(t.data)}};Oi.create=e=>new Oi({typeName:z.ZodVoid,...Y(e)});vn=class e extends ee{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==M.array)return B(r,{code:I.invalid_type,expected:M.array,received:r.parsedType}),G;if(o.exactLength!==null){let i=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(i||a)&&(B(r,{code:i?I.too_big:I.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(B(r,{code:I.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(B(r,{code:I.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>o.type._parseAsync(new ir(r,i,r.path,a)))).then(i=>tt.mergeArray(n,i));let s=[...r.data].map((i,a)=>o.type._parseSync(new ir(r,i,r.path,a)));return tt.mergeArray(n,s)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:j.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:j.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:j.toString(r)}})}nonempty(t){return this.min(1,t)}};vn.create=(e,t)=>new vn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:z.ZodArray,...Y(t)});_t=class e extends ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=se.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==M.object){let c=this._getOrReturnCtx(t);return B(c,{code:I.invalid_type,expected:M.object,received:c.parsedType}),G}let{status:n,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof br&&this._def.unknownKeys==="strip"))for(let c in o.data)i.includes(c)||a.push(c);let u=[];for(let c of i){let l=s[c],d=o.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ir(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof br){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of a)u.push({key:{status:"valid",value:l},value:{status:"valid",value:o.data[l]}});else if(c==="strict")a.length>0&&(B(o,{code:I.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of a){let d=o.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ir(o,d,o.path,l)),alwaysSet:l in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let d=await l.key,p=await l.value;c.push({key:d,value:p,alwaysSet:l.alwaysSet})}return c}).then(c=>tt.mergeObjectSync(n,c)):tt.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return j.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:j.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:z.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of se.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of se.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return $i(this)}partial(t){let r={};for(let n of se.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of se.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof or;)s=s._def.innerType;r[n]=s}return new e({...this._def,shape:()=>r})}keyof(){return Dx(se.objectKeys(this.shape))}};_t.create=(e,t)=>new _t({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:z.ZodObject,...Y(t)});_t.strictCreate=(e,t)=>new _t({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:z.ZodObject,...Y(t)});_t.lazycreate=(e,t)=>new _t({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:z.ZodObject,...Y(t)});Io=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=s.map(a=>new Ft(a.ctx.common.issues));return B(r,{code:I.invalid_union,unionErrors:i}),G}if(r.common.async)return Promise.all(n.map(async s=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let s,i=[];for(let u of n){let c={...r,common:{...r.common,issues:[]},parent:null},l=u._parseSync({data:r.data,path:r.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(u=>new Ft(u));return B(r,{code:I.invalid_union,unionErrors:a}),G}}get options(){return this._def.options}};Io.create=(e,t)=>new Io({options:e,typeName:z.ZodUnion,...Y(t)});yn=e=>e instanceof $o?yn(e.schema):e instanceof sr?yn(e.innerType()):e instanceof No?[e.value]:e instanceof Oo?e.options:e instanceof Bo?se.objectValues(e.enum):e instanceof Mo?yn(e._def.innerType):e instanceof _o?[void 0]:e instanceof Ro?[null]:e instanceof or?[void 0,...yn(e.unwrap())]:e instanceof Qr?[null,...yn(e.unwrap())]:e instanceof Ys||e instanceof jo?yn(e.unwrap()):e instanceof Lo?yn(e._def.innerType):[],Zu=class e extends ee{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==M.object)return B(r,{code:I.invalid_type,expected:M.object,received:r.parsedType}),G;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(B(r,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),G)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let s of r){let i=yn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new e({typeName:z.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...Y(n)})}};ko=class extends ee{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(s,i)=>{if(Yu(s)||Yu(i))return G;let a=Bp(s.value,i.value);return a.valid?((Qu(s)||Qu(i))&&r.dirty(),{status:r.value,value:a.data}):(B(n,{code:I.invalid_intersection_types}),G)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};ko.create=(e,t,r)=>new ko({left:e,right:t,typeName:z.ZodIntersection,...Y(r)});Yr=class e extends ee{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==M.array)return B(n,{code:I.invalid_type,expected:M.array,received:n.parsedType}),G;if(n.data.length<this._def.items.length)return B(n,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&n.data.length>this._def.items.length&&(B(n,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((i,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new ir(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>tt.mergeArray(r,i)):tt.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:e,typeName:z.ZodTuple,rest:null,...Y(t)})};Xu=class e extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==M.object)return B(n,{code:I.invalid_type,expected:M.object,received:n.parsedType}),G;let o=[],s=this._def.keyType,i=this._def.valueType;for(let a in n.data)o.push({key:s._parse(new ir(n,a,n.path,a)),value:i._parse(new ir(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?tt.mergeObjectAsync(r,o):tt.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof ee?new e({keyType:t,valueType:r,typeName:z.ZodRecord,...Y(n)}):new e({keyType:Vn.create(),valueType:t,typeName:z.ZodRecord,...Y(r)})}},Bi=class extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==M.map)return B(n,{code:I.invalid_type,expected:M.map,received:n.parsedType}),G;let o=this._def.keyType,s=this._def.valueType,i=[...n.data.entries()].map(([a,u],c)=>({key:o._parse(new ir(n,a,n.path,[c,"key"])),value:s._parse(new ir(n,u,n.path,[c,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of i){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return G;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(c.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of i){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return G;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(c.value,l.value)}return{status:r.value,value:a}}}};Bi.create=(e,t,r)=>new Bi({valueType:t,keyType:e,typeName:z.ZodMap,...Y(r)});Mi=class e extends ee{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==M.set)return B(n,{code:I.invalid_type,expected:M.set,received:n.parsedType}),G;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(B(n,{code:I.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(B(n,{code:I.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function i(u){let c=new Set;for(let l of u){if(l.status==="aborted")return G;l.status==="dirty"&&r.dirty(),c.add(l.value)}return{status:r.value,value:c}}let a=[...n.data.values()].map((u,c)=>s._parse(new ir(n,u,n.path,c)));return n.common.async?Promise.all(a).then(u=>i(u)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:j.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:j.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Mi.create=(e,t)=>new Mi({valueType:e,minSize:null,maxSize:null,typeName:z.ZodSet,...Y(t)});ec=class e extends ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==M.function)return B(r,{code:I.invalid_type,expected:M.function,received:r.parsedType}),G;function n(a,u){return Js({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ii(),hn].filter(c=>!!c),issueData:{code:I.invalid_arguments,argumentsError:u}})}function o(a,u){return Js({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ii(),hn].filter(c=>!!c),issueData:{code:I.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof Hn){let a=this;return ut(async function(...u){let c=new Ft([]),l=await a._def.args.parseAsync(u,s).catch(h=>{throw c.addIssue(n(u,h)),c}),d=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{let a=this;return ut(function(...u){let c=a._def.args.safeParse(u,s);if(!c.success)throw new Ft([n(u,c.error)]);let l=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(l,s);if(!d.success)throw new Ft([o(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Yr.create(t).rest(Dn.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Yr.create([]).rest(Dn.create()),returns:r||Dn.create(),typeName:z.ZodFunction,...Y(n)})}},$o=class extends ee{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};$o.create=(e,t)=>new $o({getter:e,typeName:z.ZodLazy,...Y(t)});No=class extends ee{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return B(r,{received:r.data,code:I.invalid_literal,expected:this._def.value}),G}return{status:"valid",value:t.data}}get value(){return this._def.value}};No.create=(e,t)=>new No({value:e,typeName:z.ZodLiteral,...Y(t)});Oo=class e extends ee{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return B(r,{expected:se.joinValues(n),received:r.parsedType,code:I.invalid_type}),G}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return B(r,{received:r.data,code:I.invalid_enum_value,options:n}),G}return ut(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Oo.create=Dx;Bo=class extends ee{_parse(t){let r=se.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==M.string&&n.parsedType!==M.number){let o=se.objectValues(r);return B(n,{expected:se.joinValues(o),received:n.parsedType,code:I.invalid_type}),G}if(this._cache||(this._cache=new Set(se.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=se.objectValues(r);return B(n,{received:n.data,code:I.invalid_enum_value,options:o}),G}return ut(t.data)}get enum(){return this._def.values}};Bo.create=(e,t)=>new Bo({values:e,typeName:z.ZodNativeEnum,...Y(t)});Hn=class extends ee{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==M.promise&&r.common.async===!1)return B(r,{code:I.invalid_type,expected:M.promise,received:r.parsedType}),G;let n=r.parsedType===M.promise?r.data:Promise.resolve(r.data);return ut(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Hn.create=(e,t)=>new Hn({type:e,typeName:z.ZodPromise,...Y(t)});sr=class extends ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{B(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let i=o.transform(n.data,s);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return G;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?G:u.status==="dirty"?Eo(u.value):r.value==="dirty"?Eo(u.value):u});{if(r.value==="aborted")return G;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?G:a.status==="dirty"?Eo(a.value):r.value==="dirty"?Eo(a.value):a}}if(o.type==="refinement"){let i=a=>{let u=o.refinement(a,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?G:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?G:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Un(i))return G;let a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Un(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:r.value,value:a})):G);se.assertNever(o)}};sr.create=(e,t,r)=>new sr({schema:e,typeName:z.ZodEffects,effect:t,...Y(r)});sr.createWithPreprocess=(e,t,r)=>new sr({schema:t,effect:{type:"preprocess",transform:e},typeName:z.ZodEffects,...Y(r)});or=class extends ee{_parse(t){return this._getType(t)===M.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};or.create=(e,t)=>new or({innerType:e,typeName:z.ZodOptional,...Y(t)});Qr=class extends ee{_parse(t){return this._getType(t)===M.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Qr.create=(e,t)=>new Qr({innerType:e,typeName:z.ZodNullable,...Y(t)});Mo=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===M.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Mo.create=(e,t)=>new Mo({innerType:e,typeName:z.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Y(t)});Lo=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ki(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Lo.create=(e,t)=>new Lo({innerType:e,typeName:z.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Y(t)});Li=class extends ee{_parse(t){if(this._getType(t)!==M.nan){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.nan,received:n.parsedType}),G}return{status:"valid",value:t.data}}};Li.create=e=>new Li({typeName:z.ZodNaN,...Y(e)});Jk=Symbol("zod_brand"),Ys=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Qs=class e extends ee{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?G:s.status==="dirty"?(r.dirty(),Eo(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?G:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:z.ZodPipeline})}},jo=class extends ee{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Un(o)&&(o.value=Object.freeze(o.value)),o);return ki(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};jo.create=(e,t)=>new jo({innerType:e,typeName:z.ZodReadonly,...Y(t)});Yk={object:_t.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(z||(z={}));Qk=(e,t={message:`Input not instance of ${e.name}`})=>vx(r=>r instanceof e,t),Cx=Vn.create,bx=Po.create,Zk=Li.create,Xk=Ao.create,xx=To.create,e$=Fo.create,t$=Ni.create,r$=_o.create,n$=Ro.create,o$=Gn.create,i$=Dn.create,s$=br.create,a$=Oi.create,u$=vn.create,c$=_t.create,l$=_t.strictCreate,d$=Io.create,p$=Zu.create,f$=ko.create,m$=Yr.create,g$=Xu.create,h$=Bi.create,y$=Mi.create,D$=ec.create,v$=$o.create,C$=No.create,b$=Oo.create,x$=Bo.create,w$=Hn.create,S$=sr.create,E$=or.create,P$=Qr.create,A$=sr.createWithPreprocess,T$=Qs.create,F$=()=>Cx().optional(),_$=()=>bx().optional(),R$=()=>xx().optional(),I$={string:(e=>Vn.create({...e,coerce:!0})),number:(e=>Po.create({...e,coerce:!0})),boolean:(e=>To.create({...e,coerce:!0})),bigint:(e=>Ao.create({...e,coerce:!0})),date:(e=>Fo.create({...e,coerce:!0}))},k$=G});var f={};fP(f,{BRAND:()=>Jk,DIRTY:()=>Eo,EMPTY_PATH:()=>Ak,INVALID:()=>G,NEVER:()=>k$,OK:()=>ut,ParseStatus:()=>tt,Schema:()=>ee,ZodAny:()=>Gn,ZodArray:()=>vn,ZodBigInt:()=>Ao,ZodBoolean:()=>To,ZodBranded:()=>Ys,ZodCatch:()=>Lo,ZodDate:()=>Fo,ZodDefault:()=>Mo,ZodDiscriminatedUnion:()=>Zu,ZodEffects:()=>sr,ZodEnum:()=>Oo,ZodError:()=>Ft,ZodFirstPartyTypeKind:()=>z,ZodFunction:()=>ec,ZodIntersection:()=>ko,ZodIssueCode:()=>I,ZodLazy:()=>$o,ZodLiteral:()=>No,ZodMap:()=>Bi,ZodNaN:()=>Li,ZodNativeEnum:()=>Bo,ZodNever:()=>br,ZodNull:()=>Ro,ZodNullable:()=>Qr,ZodNumber:()=>Po,ZodObject:()=>_t,ZodOptional:()=>or,ZodParsedType:()=>M,ZodPipeline:()=>Qs,ZodPromise:()=>Hn,ZodReadonly:()=>jo,ZodRecord:()=>Xu,ZodSchema:()=>ee,ZodSet:()=>Mi,ZodString:()=>Vn,ZodSymbol:()=>Ni,ZodTransformer:()=>sr,ZodTuple:()=>Yr,ZodType:()=>ee,ZodUndefined:()=>_o,ZodUnion:()=>Io,ZodUnknown:()=>Dn,ZodVoid:()=>Oi,addIssueToContext:()=>B,any:()=>o$,array:()=>u$,bigint:()=>Xk,boolean:()=>xx,coerce:()=>I$,custom:()=>vx,date:()=>e$,datetimeRegex:()=>yx,defaultErrorMap:()=>hn,discriminatedUnion:()=>p$,effect:()=>S$,enum:()=>b$,function:()=>D$,getErrorMap:()=>Ii,getParsedType:()=>Jr,instanceof:()=>Qk,intersection:()=>f$,isAborted:()=>Yu,isAsync:()=>ki,isDirty:()=>Qu,isValid:()=>Un,late:()=>Yk,lazy:()=>v$,literal:()=>C$,makeIssue:()=>Js,map:()=>h$,nan:()=>Zk,nativeEnum:()=>x$,never:()=>s$,null:()=>n$,nullable:()=>P$,number:()=>bx,object:()=>c$,objectUtil:()=>kp,oboolean:()=>R$,onumber:()=>_$,optional:()=>E$,ostring:()=>F$,pipeline:()=>T$,preprocess:()=>A$,promise:()=>w$,quotelessJson:()=>Sk,record:()=>g$,set:()=>y$,setErrorMap:()=>Pk,strictObject:()=>l$,string:()=>Cx,symbol:()=>t$,transformer:()=>S$,tuple:()=>m$,undefined:()=>r$,union:()=>d$,unknown:()=>i$,util:()=>se,void:()=>a$});var Mp=v(()=>{Ju();Np();dx();Ws();wx();Wu()});var Sx=v(()=>{Mp();Mp()});var rc,Ex,Px,$$,ar,Rt,Zs,Zr,ur,nc,N$,O$,B$,tc,M$,L$,Lp,jp,j$,Xs,ea,Ax,U$,V$,G$,Tx,H$,Up,q$,Vp,oc,ic,Fx,_x,Gp,Rx,Ix,z$,K$,kx,W$,$x,J$,Nx,Y$,Q$,Z$,X$,eN,tN,rN,Ox,nN,Hp,qp,zp,oN,iN,Bx,sN,Mx,aN,uN,cN,lN,Lx,Kp,AW,dN,pN,jx,fN,mN,gN,hN,yN,DN,vN,CN,bN,xN,wN,SN,EN,PN,AN,TN,FN,Ux,_N,RN,IN,kN,TW,FW,_W,RW,IW,kW,sc=v(()=>{Sx();rc="2.0",Ex=f.union([f.string(),f.number().int()]),Px=f.string(),$$=f.object({progressToken:f.optional(Ex)}).passthrough(),ar=f.object({_meta:f.optional($$)}).passthrough(),Rt=f.object({method:f.string(),params:f.optional(ar)}),Zs=f.object({_meta:f.optional(f.object({}).passthrough())}).passthrough(),Zr=f.object({method:f.string(),params:f.optional(Zs)}),ur=f.object({_meta:f.optional(f.object({}).passthrough())}).passthrough(),nc=f.union([f.string(),f.number().int()]),N$=f.object({jsonrpc:f.literal(rc),id:nc}).merge(Rt).strict(),O$=f.object({jsonrpc:f.literal(rc)}).merge(Zr).strict(),B$=f.object({jsonrpc:f.literal(rc),id:nc,result:ur}).strict();(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(tc||(tc={}));M$=f.object({jsonrpc:f.literal(rc),id:nc,error:f.object({code:f.number().int(),message:f.string(),data:f.optional(f.unknown())})}).strict(),L$=f.union([N$,O$,B$,M$]),Lp=ur.strict(),jp=Zr.extend({method:f.literal("notifications/cancelled"),params:Zs.extend({requestId:nc,reason:f.string().optional()})}),j$=f.object({src:f.string(),mimeType:f.optional(f.string()),sizes:f.optional(f.array(f.string()))}).passthrough(),Xs=f.object({icons:f.array(j$).optional()}).passthrough(),ea=f.object({name:f.string(),title:f.optional(f.string())}).passthrough(),Ax=ea.extend({version:f.string(),websiteUrl:f.optional(f.string())}).merge(Xs),U$=f.object({experimental:f.optional(f.object({}).passthrough()),sampling:f.optional(f.object({}).passthrough()),elicitation:f.optional(f.object({}).passthrough()),roots:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough())}).passthrough(),V$=Rt.extend({method:f.literal("initialize"),params:ar.extend({protocolVersion:f.string(),capabilities:U$,clientInfo:Ax})}),G$=f.object({experimental:f.optional(f.object({}).passthrough()),logging:f.optional(f.object({}).passthrough()),completions:f.optional(f.object({}).passthrough()),prompts:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough()),resources:f.optional(f.object({subscribe:f.optional(f.boolean()),listChanged:f.optional(f.boolean())}).passthrough()),tools:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough())}).passthrough(),Tx=ur.extend({protocolVersion:f.string(),capabilities:G$,serverInfo:Ax,instructions:f.optional(f.string())}),H$=Zr.extend({method:f.literal("notifications/initialized")}),Up=Rt.extend({method:f.literal("ping")}),q$=f.object({progress:f.number(),total:f.optional(f.number()),message:f.optional(f.string())}).passthrough(),Vp=Zr.extend({method:f.literal("notifications/progress"),params:Zs.merge(q$).extend({progressToken:Ex})}),oc=Rt.extend({params:ar.extend({cursor:f.optional(Px)}).optional()}),ic=ur.extend({nextCursor:f.optional(Px)}),Fx=f.object({uri:f.string(),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).passthrough(),_x=Fx.extend({text:f.string()}),Gp=f.string().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Rx=Fx.extend({blob:Gp}),Ix=ea.extend({uri:f.string(),description:f.optional(f.string()),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).merge(Xs),z$=ea.extend({uriTemplate:f.string(),description:f.optional(f.string()),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).merge(Xs),K$=oc.extend({method:f.literal("resources/list")}),kx=ic.extend({resources:f.array(Ix)}),W$=oc.extend({method:f.literal("resources/templates/list")}),$x=ic.extend({resourceTemplates:f.array(z$)}),J$=Rt.extend({method:f.literal("resources/read"),params:ar.extend({uri:f.string()})}),Nx=ur.extend({contents:f.array(f.union([_x,Rx]))}),Y$=Zr.extend({method:f.literal("notifications/resources/list_changed")}),Q$=Rt.extend({method:f.literal("resources/subscribe"),params:ar.extend({uri:f.string()})}),Z$=Rt.extend({method:f.literal("resources/unsubscribe"),params:ar.extend({uri:f.string()})}),X$=Zr.extend({method:f.literal("notifications/resources/updated"),params:Zs.extend({uri:f.string()})}),eN=f.object({name:f.string(),description:f.optional(f.string()),required:f.optional(f.boolean())}).passthrough(),tN=ea.extend({description:f.optional(f.string()),arguments:f.optional(f.array(eN)),_meta:f.optional(f.object({}).passthrough())}).merge(Xs),rN=oc.extend({method:f.literal("prompts/list")}),Ox=ic.extend({prompts:f.array(tN)}),nN=Rt.extend({method:f.literal("prompts/get"),params:ar.extend({name:f.string(),arguments:f.optional(f.record(f.string()))})}),Hp=f.object({type:f.literal("text"),text:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),qp=f.object({type:f.literal("image"),data:Gp,mimeType:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),zp=f.object({type:f.literal("audio"),data:Gp,mimeType:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),oN=f.object({type:f.literal("resource"),resource:f.union([_x,Rx]),_meta:f.optional(f.object({}).passthrough())}).passthrough(),iN=Ix.extend({type:f.literal("resource_link")}),Bx=f.union([Hp,qp,zp,iN,oN]),sN=f.object({role:f.enum(["user","assistant"]),content:Bx}).passthrough(),Mx=ur.extend({description:f.optional(f.string()),messages:f.array(sN)}),aN=Zr.extend({method:f.literal("notifications/prompts/list_changed")}),uN=f.object({title:f.optional(f.string()),readOnlyHint:f.optional(f.boolean()),destructiveHint:f.optional(f.boolean()),idempotentHint:f.optional(f.boolean()),openWorldHint:f.optional(f.boolean())}).passthrough(),cN=ea.extend({description:f.optional(f.string()),inputSchema:f.object({type:f.literal("object"),properties:f.optional(f.object({}).passthrough()),required:f.optional(f.array(f.string()))}).passthrough(),outputSchema:f.optional(f.object({type:f.literal("object"),properties:f.optional(f.object({}).passthrough()),required:f.optional(f.array(f.string()))}).passthrough()),annotations:f.optional(uN),_meta:f.optional(f.object({}).passthrough())}).merge(Xs),lN=oc.extend({method:f.literal("tools/list")}),Lx=ic.extend({tools:f.array(cN)}),Kp=ur.extend({content:f.array(Bx).default([]),structuredContent:f.object({}).passthrough().optional(),isError:f.optional(f.boolean())}),AW=Kp.or(ur.extend({toolResult:f.unknown()})),dN=Rt.extend({method:f.literal("tools/call"),params:ar.extend({name:f.string(),arguments:f.optional(f.record(f.unknown()))})}),pN=Zr.extend({method:f.literal("notifications/tools/list_changed")}),jx=f.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),fN=Rt.extend({method:f.literal("logging/setLevel"),params:ar.extend({level:jx})}),mN=Zr.extend({method:f.literal("notifications/message"),params:Zs.extend({level:jx,logger:f.optional(f.string()),data:f.unknown()})}),gN=f.object({name:f.string().optional()}).passthrough(),hN=f.object({hints:f.optional(f.array(gN)),costPriority:f.optional(f.number().min(0).max(1)),speedPriority:f.optional(f.number().min(0).max(1)),intelligencePriority:f.optional(f.number().min(0).max(1))}).passthrough(),yN=f.object({role:f.enum(["user","assistant"]),content:f.union([Hp,qp,zp])}).passthrough(),DN=Rt.extend({method:f.literal("sampling/createMessage"),params:ar.extend({messages:f.array(yN),systemPrompt:f.optional(f.string()),includeContext:f.optional(f.enum(["none","thisServer","allServers"])),temperature:f.optional(f.number()),maxTokens:f.number().int(),stopSequences:f.optional(f.array(f.string())),metadata:f.optional(f.object({}).passthrough()),modelPreferences:f.optional(hN)})}),vN=ur.extend({model:f.string(),stopReason:f.optional(f.enum(["endTurn","stopSequence","maxTokens"]).or(f.string())),role:f.enum(["user","assistant"]),content:f.discriminatedUnion("type",[Hp,qp,zp])}),CN=f.object({type:f.literal("boolean"),title:f.optional(f.string()),description:f.optional(f.string()),default:f.optional(f.boolean())}).passthrough(),bN=f.object({type:f.literal("string"),title:f.optional(f.string()),description:f.optional(f.string()),minLength:f.optional(f.number()),maxLength:f.optional(f.number()),format:f.optional(f.enum(["email","uri","date","date-time"]))}).passthrough(),xN=f.object({type:f.enum(["number","integer"]),title:f.optional(f.string()),description:f.optional(f.string()),minimum:f.optional(f.number()),maximum:f.optional(f.number())}).passthrough(),wN=f.object({type:f.literal("string"),title:f.optional(f.string()),description:f.optional(f.string()),enum:f.array(f.string()),enumNames:f.optional(f.array(f.string()))}).passthrough(),SN=f.union([CN,bN,xN,wN]),EN=Rt.extend({method:f.literal("elicitation/create"),params:ar.extend({message:f.string(),requestedSchema:f.object({type:f.literal("object"),properties:f.record(f.string(),SN),required:f.optional(f.array(f.string()))}).passthrough()})}),PN=ur.extend({action:f.enum(["accept","decline","cancel"]),content:f.optional(f.record(f.string(),f.unknown()))}),AN=f.object({type:f.literal("ref/resource"),uri:f.string()}).passthrough(),TN=f.object({type:f.literal("ref/prompt"),name:f.string()}).passthrough(),FN=Rt.extend({method:f.literal("completion/complete"),params:ar.extend({ref:f.union([TN,AN]),argument:f.object({name:f.string(),value:f.string()}).passthrough(),context:f.optional(f.object({arguments:f.optional(f.record(f.string(),f.string()))}))})}),Ux=ur.extend({completion:f.object({values:f.array(f.string()).max(100),total:f.optional(f.number().int()),hasMore:f.optional(f.boolean())}).passthrough()}),_N=f.object({uri:f.string().startsWith("file://"),name:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).passthrough(),RN=Rt.extend({method:f.literal("roots/list")}),IN=ur.extend({roots:f.array(_N)}),kN=Zr.extend({method:f.literal("notifications/roots/list_changed")}),TW=f.union([Up,V$,FN,fN,nN,rN,K$,W$,J$,Q$,Z$,dN,lN]),FW=f.union([jp,Vp,H$,kN]),_W=f.union([Lp,vN,PN,IN]),RW=f.union([Up,DN,EN,RN]),IW=f.union([jp,Vp,mN,X$,Y$,pN,aN]),kW=f.union([Lp,Tx,Ux,Mx,Ox,kx,$x,Nx,Kp,Lx])});var Vx=v(()=>{sc()});var na=E(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.regexpCode=he.getEsmExportName=he.getProperty=he.safeStringify=he.stringify=he.strConcat=he.addCodeArg=he.str=he._=he.nil=he._Code=he.Name=he.IDENTIFIER=he._CodeOrName=void 0;var ta=class{};he._CodeOrName=ta;he.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Uo=class extends ta{constructor(t){if(super(),!he.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};he.Name=Uo;var cr=class extends ta{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Uo&&(r[n.str]=(r[n.str]||0)+1),r),{})}};he._Code=cr;he.nil=new cr("");function Gx(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Jp(r,t[n]),r.push(e[++n]);return new cr(r)}he._=Gx;var Wp=new cr("+");function Hx(e,...t){let r=[ra(e[0])],n=0;for(;n<t.length;)r.push(Wp),Jp(r,t[n]),r.push(Wp,ra(e[++n]));return NN(r),new cr(r)}he.str=Hx;function Jp(e,t){t instanceof cr?e.push(...t._items):t instanceof Uo?e.push(t):e.push(MN(t))}he.addCodeArg=Jp;function NN(e){let t=1;for(;t<e.length-1;){if(e[t]===Wp){let r=ON(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function ON(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Uo||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Uo))return`"${e}${t.slice(1)}`}function BN(e,t){return t.emptyStr()?e:e.emptyStr()?t:Hx`${e}${t}`}he.strConcat=BN;function MN(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ra(Array.isArray(e)?e.join(","):e)}function LN(e){return new cr(ra(e))}he.stringify=LN;function ra(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}he.safeStringify=ra;function jN(e){return typeof e=="string"&&he.IDENTIFIER.test(e)?new cr(`.${e}`):Gx`[${e}]`}he.getProperty=jN;function UN(e){if(typeof e=="string"&&he.IDENTIFIER.test(e))return new cr(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}he.getEsmExportName=UN;function VN(e){return new cr(e.toString())}he.regexpCode=VN});var Zp=E(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.ValueScope=kt.ValueScopeName=kt.Scope=kt.varKinds=kt.UsedValueState=void 0;var It=na(),Yp=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},ac;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(ac||(kt.UsedValueState=ac={}));kt.varKinds={const:new It.Name("const"),let:new It.Name("let"),var:new It.Name("var")};var uc=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof It.Name?t:this.name(t)}name(t){return new It.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};kt.Scope=uc;var cc=class extends It.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,It._)`.${new It.Name(r)}[${n}]`}};kt.ValueScopeName=cc;var GN=(0,It._)`\n`,Qp=class extends uc{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?GN:It.nil}}get(){return this._scope}name(t){return new cc(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:s}=o,i=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let l=a.get(i);if(l)return l}else a=this._values[s]=new Map;a.set(i,o);let u=this._scope[s]||(this._scope[s]=[]),c=u.length;return u[c]=r.ref,o.setValue(r,{property:s,itemIndex:c}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,It._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let s=It.nil;for(let i in t){let a=t[i];if(!a)continue;let u=n[i]=n[i]||new Map;a.forEach(c=>{if(u.has(c))return;u.set(c,ac.Started);let l=r(c);if(l){let d=this.opts.es5?kt.varKinds.var:kt.varKinds.const;s=(0,It._)`${s}${d} ${c} = ${l};${this.opts._n}`}else if(l=o?.(c))s=(0,It._)`${s}${l}${this.opts._n}`;else throw new Yp(c);u.set(c,ac.Completed)})}return s}};kt.ValueScope=Qp});var te=E(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var ce=na(),xr=Zp(),qn=na();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return qn._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return qn.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return qn.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return qn.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return qn.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return qn.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return qn.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return qn.Name}});var fc=Zp();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return fc.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return fc.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return fc.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return fc.varKinds}});ne.operators={GT:new ce._Code(">"),GTE:new ce._Code(">="),LT:new ce._Code("<"),LTE:new ce._Code("<="),EQ:new ce._Code("==="),NEQ:new ce._Code("!=="),NOT:new ce._Code("!"),OR:new ce._Code("||"),AND:new ce._Code("&&"),ADD:new ce._Code("+")};var Cn=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Xp=class extends Cn{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?xr.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Ui(this.rhs,t,r)),this}get names(){return this.rhs instanceof ce._CodeOrName?this.rhs.names:{}}},lc=class extends Cn{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ce.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Ui(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ce.Name?{}:{...this.lhs.names};return pc(t,this.rhs)}},ef=class extends lc{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},tf=class extends Cn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},rf=class extends Cn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},nf=class extends Cn{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},of=class extends Cn{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Ui(this.code,t,r),this}get names(){return this.code instanceof ce._CodeOrName?this.code.names:{}}},oa=class extends Cn{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let s=n[o];s.optimizeNames(t,r)||(HN(t,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Ho(t,r.names),{})}},bn=class extends oa{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},sf=class extends oa{},ji=class extends bn{};ji.kind="else";var Vo=class e extends bn{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new ji(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(qx(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Ui(this.condition,t,r),this}get names(){let t=super.names;return pc(t,this.condition),this.else&&Ho(t,this.else.names),t}};Vo.kind="if";var Go=class extends bn{};Go.kind="for";var af=class extends Go{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Ui(this.iteration,t,r),this}get names(){return Ho(super.names,this.iteration.names)}},uf=class extends Go{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?xr.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${r} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=pc(super.names,this.from);return pc(t,this.to)}},dc=class extends Go{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Ui(this.iterable,t,r),this}get names(){return Ho(super.names,this.iterable.names)}},ia=class extends bn{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ia.kind="func";var sa=class extends oa{render(t){return"return "+super.render(t)}};sa.kind="return";var cf=class extends bn{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Ho(t,this.catch.names),this.finally&&Ho(t,this.finally.names),t}},aa=class extends bn{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};aa.kind="catch";var ua=class extends bn{render(t){return"finally"+super.render(t)}};ua.kind="finally";var lf=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
1495
|
-
`:""},this._extScope=t,this._scope=new xr.Scope({parent:t}),this._nodes=[new sf]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let s=this._scope.toName(r);return n!==void 0&&o&&(this._constants[s.str]=n),this._leafNode(new Xp(t,s,n)),s}const(t,r,n){return this._def(xr.varKinds.const,t,r,n)}let(t,r,n){return this._def(xr.varKinds.let,t,r,n)}var(t,r,n){return this._def(xr.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new lc(t,r,n))}add(t,r){return this._leafNode(new ef(t,ne.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ce.nil&&this._leafNode(new of(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ce.addCodeArg)(r,o));return r.push("}"),new ce._Code(r)}if(t,r,n){if(this._blockNode(new Vo(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Vo(t))}else(){return this._elseNode(new ji)}endIf(){return this._endBlockNode(Vo,ji)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new af(t),r)}forRange(t,r,n,o,s=this.opts.es5?xr.varKinds.var:xr.varKinds.let){let i=this._scope.toName(t);return this._for(new uf(s,i,r,n),()=>o(i))}forOf(t,r,n,o=xr.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let i=r instanceof ce.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ce._)`${i}.length`,a=>{this.var(s,(0,ce._)`${i}[${a}]`),n(s)})}return this._for(new dc("of",o,s,r),()=>n(s))}forIn(t,r,n,o=this.opts.es5?xr.varKinds.var:xr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ce._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new dc("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(Go)}label(t){return this._leafNode(new tf(t))}break(t){return this._leafNode(new rf(t))}return(t){let r=new sa;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(sa)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new cf;if(this._blockNode(o),this.code(t),r){let s=this.name("e");this._currNode=o.catch=new aa(s),r(s)}return n&&(this._currNode=o.finally=new ua,this.code(n)),this._endBlockNode(aa,ua)}throw(t){return this._leafNode(new nf(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ce.nil,n,o){return this._blockNode(new ia(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(ia)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Vo))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};ne.CodeGen=lf;function Ho(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function pc(e,t){return t instanceof ce._CodeOrName?Ho(e,t.names):e}function Ui(e,t,r){if(e instanceof ce.Name)return n(e);if(!o(e))return e;return new ce._Code(e._items.reduce((s,i)=>(i instanceof ce.Name&&(i=n(i)),i instanceof ce._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||t[s.str]!==1?s:(delete t[s.str],i)}function o(s){return s instanceof ce._Code&&s._items.some(i=>i instanceof ce.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function HN(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function qx(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ce._)`!${df(e)}`}ne.not=qx;var qN=zx(ne.operators.AND);function zN(...e){return e.reduce(qN)}ne.and=zN;var KN=zx(ne.operators.OR);function WN(...e){return e.reduce(KN)}ne.or=WN;function zx(e){return(t,r)=>t===ce.nil?r:r===ce.nil?t:(0,ce._)`${df(t)} ${e} ${df(r)}`}function df(e){return e instanceof ce.Name?e:(0,ce._)`(${e})`}});var ye=E(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.checkStrictMode=ie.getErrorPath=ie.Type=ie.useFunc=ie.setEvaluated=ie.evaluatedPropsToName=ie.mergeEvaluated=ie.eachItem=ie.unescapeJsonPointer=ie.escapeJsonPointer=ie.escapeFragment=ie.unescapeFragment=ie.schemaRefOrVal=ie.schemaHasRulesButRef=ie.schemaHasRules=ie.checkUnknownRules=ie.alwaysValidSchema=ie.toHash=void 0;var Se=te(),JN=na();function YN(e){let t={};for(let r of e)t[r]=!0;return t}ie.toHash=YN;function QN(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Jx(e,t),!Yx(t,e.self.RULES.all))}ie.alwaysValidSchema=QN;function Jx(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let s in t)o[s]||Xx(e,`unknown keyword: "${s}"`)}ie.checkUnknownRules=Jx;function Yx(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ie.schemaHasRules=Yx;function ZN(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ie.schemaHasRulesButRef=ZN;function XN({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Se._)`${r}`}return(0,Se._)`${e}${t}${(0,Se.getProperty)(n)}`}ie.schemaRefOrVal=XN;function e2(e){return Qx(decodeURIComponent(e))}ie.unescapeFragment=e2;function t2(e){return encodeURIComponent(ff(e))}ie.escapeFragment=t2;function ff(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ie.escapeJsonPointer=ff;function Qx(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ie.unescapeJsonPointer=Qx;function r2(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ie.eachItem=r2;function Kx({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let u=i===void 0?s:i instanceof Se.Name?(s instanceof Se.Name?e(o,s,i):t(o,s,i),i):s instanceof Se.Name?(t(o,i,s),s):r(s,i);return a===Se.Name&&!(u instanceof Se.Name)?n(o,u):u}}ie.mergeEvaluated={props:Kx({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Se._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Se._)`${r} || {}`).code((0,Se._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Se._)`${r} || {}`),mf(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Zx}),items:Kx({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Se._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Se._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Zx(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Se._)`{}`);return t!==void 0&&mf(e,r,t),r}ie.evaluatedPropsToName=Zx;function mf(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Se._)`${t}${(0,Se.getProperty)(n)}`,!0))}ie.setEvaluated=mf;var Wx={};function n2(e,t){return e.scopeValue("func",{ref:t,code:Wx[t.code]||(Wx[t.code]=new JN._Code(t.code))})}ie.useFunc=n2;var pf;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(pf||(ie.Type=pf={}));function o2(e,t,r){if(e instanceof Se.Name){let n=t===pf.Num;return r?n?(0,Se._)`"[" + ${e} + "]"`:(0,Se._)`"['" + ${e} + "']"`:n?(0,Se._)`"/" + ${e}`:(0,Se._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Se.getProperty)(e).toString():"/"+ff(e)}ie.getErrorPath=o2;function Xx(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ie.checkStrictMode=Xx});var xn=E(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var ct=te(),i2={data:new ct.Name("data"),valCxt:new ct.Name("valCxt"),instancePath:new ct.Name("instancePath"),parentData:new ct.Name("parentData"),parentDataProperty:new ct.Name("parentDataProperty"),rootData:new ct.Name("rootData"),dynamicAnchors:new ct.Name("dynamicAnchors"),vErrors:new ct.Name("vErrors"),errors:new ct.Name("errors"),this:new ct.Name("this"),self:new ct.Name("self"),scope:new ct.Name("scope"),json:new ct.Name("json"),jsonPos:new ct.Name("jsonPos"),jsonLen:new ct.Name("jsonLen"),jsonPart:new ct.Name("jsonPart")};gf.default=i2});var ca=E(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.extendErrors=lt.resetErrorsCount=lt.reportExtraError=lt.reportError=lt.keyword$DataError=lt.keywordError=void 0;var fe=te(),mc=ye(),vt=xn();lt.keywordError={message:({keyword:e})=>(0,fe.str)`must pass "${e}" keyword validation`};lt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,fe.str)`"${e}" keyword must be ${t} ($data)`:(0,fe.str)`"${e}" keyword is invalid ($data)`};function s2(e,t=lt.keywordError,r,n){let{it:o}=e,{gen:s,compositeRule:i,allErrors:a}=o,u=r0(e,t,r);n??(i||a)?e0(s,u):t0(o,(0,fe._)`[${u}]`)}lt.reportError=s2;function a2(e,t=lt.keywordError,r){let{it:n}=e,{gen:o,compositeRule:s,allErrors:i}=n,a=r0(e,t,r);e0(o,a),s||i||t0(n,vt.default.vErrors)}lt.reportExtraError=a2;function u2(e,t){e.assign(vt.default.errors,t),e.if((0,fe._)`${vt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,fe._)`${vt.default.vErrors}.length`,t),()=>e.assign(vt.default.vErrors,null)))}lt.resetErrorsCount=u2;function c2({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw new Error("ajv implementation error");let i=e.name("err");e.forRange("i",o,vt.default.errors,a=>{e.const(i,(0,fe._)`${vt.default.vErrors}[${a}]`),e.if((0,fe._)`${i}.instancePath === undefined`,()=>e.assign((0,fe._)`${i}.instancePath`,(0,fe.strConcat)(vt.default.instancePath,s.errorPath))),e.assign((0,fe._)`${i}.schemaPath`,(0,fe.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,fe._)`${i}.schema`,r),e.assign((0,fe._)`${i}.data`,n))})}lt.extendErrors=c2;function e0(e,t){let r=e.const("err",t);e.if((0,fe._)`${vt.default.vErrors} === null`,()=>e.assign(vt.default.vErrors,(0,fe._)`[${r}]`),(0,fe._)`${vt.default.vErrors}.push(${r})`),e.code((0,fe._)`${vt.default.errors}++`)}function t0(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,fe._)`new ${e.ValidationError}(${t})`):(r.assign((0,fe._)`${n}.errors`,t),r.return(!1))}var qo={keyword:new fe.Name("keyword"),schemaPath:new fe.Name("schemaPath"),params:new fe.Name("params"),propertyName:new fe.Name("propertyName"),message:new fe.Name("message"),schema:new fe.Name("schema"),parentSchema:new fe.Name("parentSchema")};function r0(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,fe._)`{}`:l2(e,t,r)}function l2(e,t,r={}){let{gen:n,it:o}=e,s=[d2(o,r),p2(e,r)];return f2(e,t,s),n.object(...s)}function d2({errorPath:e},{instancePath:t}){let r=t?(0,fe.str)`${e}${(0,mc.getErrorPath)(t,mc.Type.Str)}`:e;return[vt.default.instancePath,(0,fe.strConcat)(vt.default.instancePath,r)]}function p2({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,fe.str)`${t}/${e}`;return r&&(o=(0,fe.str)`${o}${(0,mc.getErrorPath)(r,mc.Type.Str)}`),[qo.schemaPath,o]}function f2(e,{params:t,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=e,{opts:u,propertyName:c,topSchemaRef:l,schemaPath:d}=a;n.push([qo.keyword,o],[qo.params,typeof t=="function"?t(e):t||(0,fe._)`{}`]),u.messages&&n.push([qo.message,typeof r=="function"?r(e):r]),u.verbose&&n.push([qo.schema,i],[qo.parentSchema,(0,fe._)`${l}${d}`],[vt.default.data,s]),c&&n.push([qo.propertyName,c])}});var o0=E(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.boolOrEmptySchema=Vi.topBoolOrEmptySchema=void 0;var m2=ca(),g2=te(),h2=xn(),y2={message:"boolean schema is false"};function D2(e){let{gen:t,schema:r,validateName:n}=e;r===!1?n0(e,!1):typeof r=="object"&&r.$async===!0?t.return(h2.default.data):(t.assign((0,g2._)`${n}.errors`,null),t.return(!0))}Vi.topBoolOrEmptySchema=D2;function v2(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),n0(e)):r.var(t,!0)}Vi.boolOrEmptySchema=v2;function n0(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,m2.reportError)(o,y2,void 0,t)}});var hf=E(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.getRules=Gi.isJSONType=void 0;var C2=["string","number","integer","boolean","null","object","array"],b2=new Set(C2);function x2(e){return typeof e=="string"&&b2.has(e)}Gi.isJSONType=x2;function w2(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Gi.getRules=w2});var yf=E(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.shouldUseRule=zn.shouldUseGroup=zn.schemaHasRulesForType=void 0;function S2({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&i0(e,n)}zn.schemaHasRulesForType=S2;function i0(e,t){return t.rules.some(r=>s0(e,r))}zn.shouldUseGroup=i0;function s0(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}zn.shouldUseRule=s0});var la=E(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.reportTypeError=dt.checkDataTypes=dt.checkDataType=dt.coerceAndCheckDataType=dt.getJSONTypes=dt.getSchemaTypes=dt.DataType=void 0;var E2=hf(),P2=yf(),A2=ca(),Q=te(),a0=ye(),Hi;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Hi||(dt.DataType=Hi={}));function T2(e){let t=u0(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}dt.getSchemaTypes=T2;function u0(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(E2.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}dt.getJSONTypes=u0;function F2(e,t){let{gen:r,data:n,opts:o}=e,s=_2(t,o.coerceTypes),i=t.length>0&&!(s.length===0&&t.length===1&&(0,P2.schemaHasRulesForType)(e,t[0]));if(i){let a=vf(t,n,o.strictNumbers,Hi.Wrong);r.if(a,()=>{s.length?R2(e,t,s):Cf(e)})}return i}dt.coerceAndCheckDataType=F2;var c0=new Set(["string","number","integer","boolean","null"]);function _2(e,t){return t?e.filter(r=>c0.has(r)||t==="array"&&r==="array"):[]}function R2(e,t,r){let{gen:n,data:o,opts:s}=e,i=n.let("dataType",(0,Q._)`typeof ${o}`),a=n.let("coerced",(0,Q._)`undefined`);s.coerceTypes==="array"&&n.if((0,Q._)`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,Q._)`${o}[0]`).assign(i,(0,Q._)`typeof ${o}`).if(vf(t,o,s.strictNumbers),()=>n.assign(a,o))),n.if((0,Q._)`${a} !== undefined`);for(let c of r)(c0.has(c)||c==="array"&&s.coerceTypes==="array")&&u(c);n.else(),Cf(e),n.endIf(),n.if((0,Q._)`${a} !== undefined`,()=>{n.assign(o,a),I2(e,a)});function u(c){switch(c){case"string":n.elseIf((0,Q._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,Q._)`"" + ${o}`).elseIf((0,Q._)`${o} === null`).assign(a,(0,Q._)`""`);return;case"number":n.elseIf((0,Q._)`${i} == "boolean" || ${o} === null
|
|
1496
|
-
|| (${i} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,
|
|
1497
|
-
|| (${i} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,
|
|
1498
|
-
|| ${i} === "boolean" || ${o} === null`).assign(a,(0,Q._)`[${o}]`)}}}function I2({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Q._)`${t} !== undefined`,()=>e.assign((0,Q._)`${t}[${r}]`,n))}function Df(e,t,r,n=Hi.Correct){let o=n===Hi.Correct?Q.operators.EQ:Q.operators.NEQ,s;switch(e){case"null":return(0,Q._)`${t} ${o} null`;case"array":s=(0,Q._)`Array.isArray(${t})`;break;case"object":s=(0,Q._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=i((0,Q._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=i();break;default:return(0,Q._)`typeof ${t} ${o} ${e}`}return n===Hi.Correct?s:(0,Q.not)(s);function i(a=Q.nil){return(0,Q.and)((0,Q._)`typeof ${t} == "number"`,a,r?(0,Q._)`isFinite(${t})`:Q.nil)}}dt.checkDataType=Df;function vf(e,t,r,n){if(e.length===1)return Df(e[0],t,r,n);let o,s=(0,a0.toHash)(e);if(s.array&&s.object){let i=(0,Q._)`typeof ${t} != "object"`;o=s.null?i:(0,Q._)`!${t} || ${i}`,delete s.null,delete s.array,delete s.object}else o=Q.nil;s.number&&delete s.integer;for(let i in s)o=(0,Q.and)(o,Df(i,t,r,n));return o}dt.checkDataTypes=vf;var k2={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Q._)`{type: ${e}}`:(0,Q._)`{type: ${t}}`};function Cf(e){let t=$2(e);(0,A2.reportError)(t,k2)}dt.reportTypeError=Cf;function $2(e){let{gen:t,data:r,schema:n}=e,o=(0,a0.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var d0=E(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.assignDefaults=void 0;var qi=te(),N2=ye();function O2(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)l0(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,s)=>l0(e,s,o.default))}gc.assignDefaults=O2;function l0(e,t,r){let{gen:n,compositeRule:o,data:s,opts:i}=e;if(r===void 0)return;let a=(0,qi._)`${s}${(0,qi.getProperty)(t)}`;if(o){(0,N2.checkStrictMode)(e,`default is ignored for: ${a}`);return}let u=(0,qi._)`${a} === undefined`;i.useDefaults==="empty"&&(u=(0,qi._)`${u} || ${a} === null || ${a} === ""`),n.if(u,(0,qi._)`${a} = ${(0,qi.stringify)(r)}`)}});var lr=E(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.validateUnion=xe.validateArray=xe.usePattern=xe.callValidateCode=xe.schemaProperties=xe.allSchemaProperties=xe.noPropertyInData=xe.propertyInData=xe.isOwnProperty=xe.hasPropFunc=xe.reportMissingProp=xe.checkMissingProp=xe.checkReportMissingProp=void 0;var Re=te(),bf=ye(),Kn=xn(),B2=ye();function M2(e,t){let{gen:r,data:n,it:o}=e;r.if(wf(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Re._)`${t}`},!0),e.error()})}xe.checkReportMissingProp=M2;function L2({gen:e,data:t,it:{opts:r}},n,o){return(0,Re.or)(...n.map(s=>(0,Re.and)(wf(e,t,s,r.ownProperties),(0,Re._)`${o} = ${s}`)))}xe.checkMissingProp=L2;function j2(e,t){e.setParams({missingProperty:t},!0),e.error()}xe.reportMissingProp=j2;function p0(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Re._)`Object.prototype.hasOwnProperty`})}xe.hasPropFunc=p0;function xf(e,t,r){return(0,Re._)`${p0(e)}.call(${t}, ${r})`}xe.isOwnProperty=xf;function U2(e,t,r,n){let o=(0,Re._)`${t}${(0,Re.getProperty)(r)} !== undefined`;return n?(0,Re._)`${o} && ${xf(e,t,r)}`:o}xe.propertyInData=U2;function wf(e,t,r,n){let o=(0,Re._)`${t}${(0,Re.getProperty)(r)} === undefined`;return n?(0,Re.or)(o,(0,Re.not)(xf(e,t,r))):o}xe.noPropertyInData=wf;function f0(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}xe.allSchemaProperties=f0;function V2(e,t){return f0(t).filter(r=>!(0,bf.alwaysValidSchema)(e,t[r]))}xe.schemaProperties=V2;function G2({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,u,c){let l=c?(0,Re._)`${e}, ${t}, ${n}${o}`:t,d=[[Kn.default.instancePath,(0,Re.strConcat)(Kn.default.instancePath,s)],[Kn.default.parentData,i.parentData],[Kn.default.parentDataProperty,i.parentDataProperty],[Kn.default.rootData,Kn.default.rootData]];i.opts.dynamicRef&&d.push([Kn.default.dynamicAnchors,Kn.default.dynamicAnchors]);let p=(0,Re._)`${l}, ${r.object(...d)}`;return u!==Re.nil?(0,Re._)`${a}.call(${u}, ${p})`:(0,Re._)`${a}(${p})`}xe.callValidateCode=G2;var H2=(0,Re._)`new RegExp`;function q2({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Re._)`${o.code==="new RegExp"?H2:(0,B2.useFunc)(e,o)}(${r}, ${n})`})}xe.usePattern=q2;function z2(e){let{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(s,!0),i(()=>t.break()),s;function i(a){let u=t.const("len",(0,Re._)`${r}.length`);t.forRange("i",0,u,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:bf.Type.Num},s),t.if((0,Re.not)(s),a)})}}xe.validateArray=z2;function K2(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,bf.alwaysValidSchema)(o,u))&&!o.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((u,c)=>{let l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(i,(0,Re._)`${i} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Re.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}xe.validateUnion=K2});var h0=E(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.validateKeywordUsage=Xr.validSchemaType=Xr.funcKeywordCode=Xr.macroKeywordCode=void 0;var Ct=te(),zo=xn(),W2=lr(),J2=ca();function Y2(e,t){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),u=g0(r,n,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let c=r.name("valid");e.subschema({schema:a,schemaPath:Ct.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}Xr.macroKeywordCode=Y2;function Q2(e,t){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:u}=e;X2(u,t);let c=!a&&t.compile?t.compile.call(u.self,s,i,u):t.validate,l=g0(n,o,c),d=n.let("valid");e.block$data(d,p),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function p(){if(t.errors===!1)g(),t.modifying&&m0(e),y(()=>e.error());else{let D=t.async?h():m();t.modifying&&m0(e),y(()=>Z2(e,D))}}function h(){let D=n.let("ruleErrs",null);return n.try(()=>g((0,Ct._)`await `),S=>n.assign(d,!1).if((0,Ct._)`${S} instanceof ${u.ValidationError}`,()=>n.assign(D,(0,Ct._)`${S}.errors`),()=>n.throw(S))),D}function m(){let D=(0,Ct._)`${l}.errors`;return n.assign(D,null),g(Ct.nil),D}function g(D=t.async?(0,Ct._)`await `:Ct.nil){let S=u.opts.passContext?zo.default.this:zo.default.self,w=!("compile"in t&&!a||t.schema===!1);n.assign(d,(0,Ct._)`${D}${(0,W2.callValidateCode)(e,l,S,w)}`,t.modifying)}function y(D){var S;n.if((0,Ct.not)((S=t.valid)!==null&&S!==void 0?S:d),D)}}Xr.funcKeywordCode=Q2;function m0(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Ct._)`${n.parentData}[${n.parentDataProperty}]`))}function Z2(e,t){let{gen:r}=e;r.if((0,Ct._)`Array.isArray(${t})`,()=>{r.assign(zo.default.vErrors,(0,Ct._)`${zo.default.vErrors} === null ? ${t} : ${zo.default.vErrors}.concat(${t})`).assign(zo.default.errors,(0,Ct._)`${zo.default.vErrors}.length`),(0,J2.extendErrors)(e)},()=>e.error())}function X2({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function g0(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ct.stringify)(r)})}function eO(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Xr.validSchemaType=eO;function tO({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");let i=o.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[s])){let u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}Xr.validateKeywordUsage=tO});var D0=E(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.extendSubschemaMode=Wn.extendSubschemaData=Wn.getSubschema=void 0;var en=te(),y0=ye();function rO(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,en._)`${e.schemaPath}${(0,en.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,en._)`${e.schemaPath}${(0,en.getProperty)(t)}${(0,en.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,y0.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Wn.getSubschema=rO;function nO(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:c,dataPathArr:l,opts:d}=t,p=a.let("data",(0,en._)`${t.data}${(0,en.getProperty)(r)}`,!0);u(p),e.errorPath=(0,en.str)`${c}${(0,y0.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,en._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(o!==void 0){let c=o instanceof en.Name?o:a.let("data",o,!0);u(c),i!==void 0&&(e.propertyName=i)}s&&(e.dataTypes=s);function u(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}Wn.extendSubschemaData=nO;function oO(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}Wn.extendSubschemaMode=oO});var Sf=E((tJ,v0)=>{"use strict";v0.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var b0=E((rJ,C0)=>{"use strict";var Jn=C0.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};hc(t,n,o,e,"",e)};Jn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Jn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Jn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Jn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function hc(e,t,r,n,o,s,i,a,u,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,s,i,a,u,c);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in Jn.arrayKeywords)for(var p=0;p<d.length;p++)hc(e,t,r,d[p],o+"/"+l+"/"+p,s,o,l,n,p)}else if(l in Jn.propsKeywords){if(d&&typeof d=="object")for(var h in d)hc(e,t,r,d[h],o+"/"+l+"/"+iO(h),s,o,l,n,h)}else(l in Jn.keywords||e.allKeys&&!(l in Jn.skipKeywords))&&hc(e,t,r,d,o+"/"+l,s,o,l,n)}r(n,o,s,i,a,u,c)}}function iO(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var da=E($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.getSchemaRefs=$t.resolveUrl=$t.normalizeId=$t._getFullPath=$t.getFullPath=$t.inlineRef=void 0;var sO=ye(),aO=Sf(),uO=b0(),cO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function lO(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Ef(e):t?x0(e)<=t:!1}$t.inlineRef=lO;var dO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ef(e){for(let t in e){if(dO.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Ef)||typeof r=="object"&&Ef(r))return!0}return!1}function x0(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!cO.has(r)&&(typeof e[r]=="object"&&(0,sO.eachItem)(e[r],n=>t+=x0(n)),t===1/0))return 1/0}return t}function w0(e,t="",r){r!==!1&&(t=zi(t));let n=e.parse(t);return S0(e,n)}$t.getFullPath=w0;function S0(e,t){return e.serialize(t).split("#")[0]+"#"}$t._getFullPath=S0;var pO=/#\/?$/;function zi(e){return e?e.replace(pO,""):""}$t.normalizeId=zi;function fO(e,t,r){return r=zi(r),e.resolve(t,r)}$t.resolveUrl=fO;var mO=/^[a-z_][-a-z0-9._]*$/i;function gO(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=zi(e[r]||t),s={"":o},i=w0(n,o,!1),a={},u=new Set;return uO(e,{allKeys:!0},(d,p,h,m)=>{if(m===void 0)return;let g=i+p,y=s[m];typeof d[r]=="string"&&(y=D.call(this,d[r])),S.call(this,d.$anchor),S.call(this,d.$dynamicAnchor),s[p]=y;function D(w){let F=this.opts.uriResolver.resolve;if(w=zi(y?F(y,w):w),u.has(w))throw l(w);u.add(w);let A=this.refs[w];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?c(d,A.schema,w):w!==zi(g)&&(w[0]==="#"?(c(d,a[w],w),a[w]=d):this.refs[w]=g),w}function S(w){if(typeof w=="string"){if(!mO.test(w))throw new Error(`invalid anchor "${w}"`);D.call(this,`#${w}`)}}}),a;function c(d,p,h){if(p!==void 0&&!aO(d,p))throw l(h)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}$t.getSchemaRefs=gO});var ma=E(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.getData=Yn.KeywordCxt=Yn.validateFunctionCode=void 0;var F0=o0(),E0=la(),Af=yf(),yc=la(),hO=d0(),fa=h0(),Pf=D0(),V=te(),W=xn(),yO=da(),wn=ye(),pa=ca();function DO(e){if(I0(e)&&(k0(e),R0(e))){bO(e);return}_0(e,()=>(0,F0.topBoolOrEmptySchema)(e))}Yn.validateFunctionCode=DO;function _0({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,(0,V._)`${W.default.data}, ${W.default.valCxt}`,n.$async,()=>{e.code((0,V._)`"use strict"; ${P0(r,o)}`),CO(e,o),e.code(s)}):e.func(t,(0,V._)`${W.default.data}, ${vO(o)}`,n.$async,()=>e.code(P0(r,o)).code(s))}function vO(e){return(0,V._)`{${W.default.instancePath}="", ${W.default.parentData}, ${W.default.parentDataProperty}, ${W.default.rootData}=${W.default.data}${e.dynamicRef?(0,V._)`, ${W.default.dynamicAnchors}={}`:V.nil}}={}`}function CO(e,t){e.if(W.default.valCxt,()=>{e.var(W.default.instancePath,(0,V._)`${W.default.valCxt}.${W.default.instancePath}`),e.var(W.default.parentData,(0,V._)`${W.default.valCxt}.${W.default.parentData}`),e.var(W.default.parentDataProperty,(0,V._)`${W.default.valCxt}.${W.default.parentDataProperty}`),e.var(W.default.rootData,(0,V._)`${W.default.valCxt}.${W.default.rootData}`),t.dynamicRef&&e.var(W.default.dynamicAnchors,(0,V._)`${W.default.valCxt}.${W.default.dynamicAnchors}`)},()=>{e.var(W.default.instancePath,(0,V._)`""`),e.var(W.default.parentData,(0,V._)`undefined`),e.var(W.default.parentDataProperty,(0,V._)`undefined`),e.var(W.default.rootData,W.default.data),t.dynamicRef&&e.var(W.default.dynamicAnchors,(0,V._)`{}`)})}function bO(e){let{schema:t,opts:r,gen:n}=e;_0(e,()=>{r.$comment&&t.$comment&&N0(e),PO(e),n.let(W.default.vErrors,null),n.let(W.default.errors,0),r.unevaluated&&xO(e),$0(e),FO(e)})}function xO(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,V._)`${r}.evaluated`),t.if((0,V._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,V._)`${e.evaluated}.props`,(0,V._)`undefined`)),t.if((0,V._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,V._)`${e.evaluated}.items`,(0,V._)`undefined`))}function P0(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,V._)`/*# sourceURL=${r} */`:V.nil}function wO(e,t){if(I0(e)&&(k0(e),R0(e))){SO(e,t);return}(0,F0.boolOrEmptySchema)(e,t)}function R0({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function I0(e){return typeof e.schema!="boolean"}function SO(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&N0(e),AO(e),TO(e);let s=n.const("_errs",W.default.errors);$0(e,s),n.var(t,(0,V._)`${s} === ${W.default.errors}`)}function k0(e){(0,wn.checkUnknownRules)(e),EO(e)}function $0(e,t){if(e.opts.jtd)return A0(e,[],!1,t);let r=(0,E0.getSchemaTypes)(e.schema),n=(0,E0.coerceAndCheckDataType)(e,r);A0(e,r,!n,t)}function EO(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,wn.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function PO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,wn.checkStrictMode)(e,"default is ignored in the schema root")}function AO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,yO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function TO(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function N0({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)e.code((0,V._)`${W.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=(0,V.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,V._)`${W.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function FO(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if((0,V._)`${W.default.errors} === 0`,()=>t.return(W.default.data),()=>t.throw((0,V._)`new ${o}(${W.default.vErrors})`)):(t.assign((0,V._)`${n}.errors`,W.default.vErrors),s.unevaluated&&_O(e),t.return((0,V._)`${W.default.errors} === 0`))}function _O({gen:e,evaluated:t,props:r,items:n}){r instanceof V.Name&&e.assign((0,V._)`${t}.props`,r),n instanceof V.Name&&e.assign((0,V._)`${t}.items`,n)}function A0(e,t,r,n){let{gen:o,schema:s,data:i,allErrors:a,opts:u,self:c}=e,{RULES:l}=c;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,wn.schemaHasRulesButRef)(s,l))){o.block(()=>B0(e,"$ref",l.all.$ref.definition));return}u.jtd||RO(e,t),o.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,Af.shouldUseGroup)(s,p)&&(p.type?(o.if((0,yc.checkDataType)(p.type,i,u.strictNumbers)),T0(e,p),t.length===1&&t[0]===p.type&&r&&(o.else(),(0,yc.reportTypeError)(e)),o.endIf()):T0(e,p),a||o.if((0,V._)`${W.default.errors} === ${n||0}`))}}function T0(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,hO.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,Af.shouldUseRule)(n,s)&&B0(e,s.keyword,s.definition,t.type)})}function RO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(IO(e,t),e.opts.allowUnionTypes||kO(e,t),$O(e,e.dataTypes))}function IO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{O0(e.dataTypes,r)||Tf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),OO(e,t)}}function kO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Tf(e,"use allowUnionTypes to allow union type keyword")}function $O(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Af.shouldUseRule)(e.schema,o)){let{type:s}=o.definition;s.length&&!s.some(i=>NO(t,i))&&Tf(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function NO(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function O0(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function OO(e,t){let r=[];for(let n of e.dataTypes)O0(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Tf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,wn.checkStrictMode)(e,t,e.opts.strictTypes)}var Dc=class{constructor(t,r,n){if((0,fa.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,wn.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",M0(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,fa.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",W.default.errors))}result(t,r,n){this.failResult((0,V.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,V.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,V._)`${r} !== undefined && (${(0,V.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?pa.reportExtraError:pa.reportError)(this,this.def.error,r)}$dataError(){(0,pa.reportError)(this,this.def.$dataError||pa.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,pa.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=V.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=V.nil,r=V.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:i}=this;n.if((0,V.or)((0,V._)`${o} === undefined`,r)),t!==V.nil&&n.assign(t,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==V.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,V.or)(i(),a());function i(){if(n.length){if(!(r instanceof V.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,V._)`${(0,yc.checkDataTypes)(u,r,s.opts.strictNumbers,yc.DataType.Wrong)}`}return V.nil}function a(){if(o.validateSchema){let u=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,V._)`!${u}(${r})`}return V.nil}}subschema(t,r){let n=(0,Pf.getSubschema)(this.it,t);(0,Pf.extendSubschemaData)(n,this.it,t),(0,Pf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return wO(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=wn.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=wn.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,V.Name)),!0}};Yn.KeywordCxt=Dc;function B0(e,t,r,n){let o=new Dc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,fa.funcKeywordCode)(o,r):"macro"in r?(0,fa.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,fa.funcKeywordCode)(o,r)}var BO=/^\/(?:[^~]|~0|~1)*$/,MO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function M0(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(e==="")return W.default.rootData;if(e[0]==="/"){if(!BO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=W.default.rootData}else{let c=MO.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+c[1];if(o=c[2],o==="#"){if(l>=t)throw new Error(u("property/index",l));return n[t-l]}if(l>t)throw new Error(u("data",l));if(s=r[t-l],!o)return s}let i=s,a=o.split("/");for(let c of a)c&&(s=(0,V._)`${s}${(0,V.getProperty)((0,wn.unescapeJsonPointer)(c))}`,i=(0,V._)`${i} && ${s}`);return i;function u(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}Yn.getData=M0});var vc=E(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var Ff=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};_f.default=Ff});var ga=E(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var Rf=da(),If=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Rf.resolveUrl)(t,r,n),this.missingSchema=(0,Rf.normalizeId)((0,Rf.getFullPath)(t,this.missingRef))}};kf.default=If});var bc=E(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.resolveSchema=dr.getCompilingSchema=dr.resolveRef=dr.compileSchema=dr.SchemaEnv=void 0;var wr=te(),LO=vc(),Ko=xn(),Sr=da(),L0=ye(),jO=ma(),Ki=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Sr.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};dr.SchemaEnv=Ki;function Nf(e){let t=j0.call(this,e);if(t)return t;let r=(0,Sr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new wr.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;e.$async&&(a=i.scopeValue("Error",{ref:LO.default,code:(0,wr._)`require("ajv/dist/runtime/validation_error").default`}));let u=i.scopeName("validate");e.validateName=u;let c={gen:i,allErrors:this.opts.allErrors,data:Ko.default.data,parentData:Ko.default.parentData,parentDataProperty:Ko.default.parentDataProperty,dataNames:[Ko.default.data],dataPathArr:[wr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,wr.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:wr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,wr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,jO.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);let d=i.toString();l=`${i.scopeRefs(Ko.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let h=new Function(`${Ko.default.self}`,`${Ko.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:u,validateCode:d,scopeValues:i._values}),this.opts.unevaluated){let{props:m,items:g}=c;h.evaluated={props:m instanceof wr.Name?void 0:m,items:g instanceof wr.Name?void 0:g,dynamicProps:m instanceof wr.Name,dynamicItems:g instanceof wr.Name},h.source&&(h.source.evaluated=(0,wr.stringify)(h.evaluated))}return e.validate=h,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}dr.compileSchema=Nf;function UO(e,t,r){var n;r=(0,Sr.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let s=HO.call(this,e,r);if(s===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;i&&(s=new Ki({schema:i,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=VO.call(this,s)}dr.resolveRef=UO;function VO(e){return(0,Sr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Nf.call(this,e)}function j0(e){for(let t of this._compilations)if(GO(t,e))return t}dr.getCompilingSchema=j0;function GO(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function HO(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Cc.call(this,e,t)}function Cc(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Sr._getFullPath)(this.opts.uriResolver,r),o=(0,Sr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return $f.call(this,r,e);let s=(0,Sr.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=Cc.call(this,e,i);return typeof a?.schema!="object"?void 0:$f.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Nf.call(this,i),s===(0,Sr.normalizeId)(t)){let{schema:a}=i,{schemaId:u}=this.opts,c=a[u];return c&&(o=(0,Sr.resolveUrl)(this.opts.uriResolver,o,c)),new Ki({schema:a,schemaId:u,root:e,baseId:o})}return $f.call(this,r,i)}}dr.resolveSchema=Cc;var qO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function $f(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,L0.unescapeFragment)(a)];if(u===void 0)return;r=u;let c=typeof r=="object"&&r[this.opts.schemaId];!qO.has(a)&&c&&(t=(0,Sr.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,L0.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Sr.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=Cc.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new Ki({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema)return s}});var U0=E((uJ,zO)=>{zO.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var G0=E((cJ,V0)=>{"use strict";var KO={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};V0.exports={HEX:KO}});var Q0=E((lJ,Y0)=>{"use strict";var{HEX:WO}=G0(),JO=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function K0(e){if(J0(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(JO)||[],[r]=t;return r?{host:QO(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function Of(e,t=!1){let r="",n=!0;for(let o of e){if(WO[o]===void 0)return;o!=="0"&&n===!0&&(n=!1),n||(r+=o)}return t&&r.length===0&&(r="0"),r}function YO(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],s=!1,i=!1,a=!1;function u(){if(o.length){if(s===!1){let c=Of(o);if(c!==void 0)n.push(c);else return r.error=!0,!1}o.length=0}return!0}for(let c=0;c<e.length;c++){let l=e[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(a=!0),!u())break;if(t++,n.push(":"),t>7){r.error=!0;break}c-1>=0&&e[c-1]===":"&&(i=!0);continue}else if(l==="%"){if(!u())break;s=!0}else{o.push(l);continue}}return o.length&&(s?r.zone=o.join(""):a?n.push(o.join("")):n.push(Of(o))),r.address=n.join(""),r}function W0(e){if(J0(e,":")<2)return{host:e,isIPV6:!1};let t=YO(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}function QO(e,t){let r="",n=!0,o=e.length;for(let s=0;s<o;s++){let i=e[s];i==="0"&&n?(s+1<=o&&e[s+1]===t||s+1===o)&&(r+=i,n=!1):(i===t?n=!0:n=!1,r+=i)}return r}function J0(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}var H0=/^\.\.?\//u,q0=/^\/\.(?:\/|$)/u,z0=/^\/\.\.(?:\/|$)/u,ZO=/^\/?(?:.|\n)*?(?=\/|$)/u;function XO(e){let t=[];for(;e.length;)if(e.match(H0))e=e.replace(H0,"");else if(e.match(q0))e=e.replace(q0,"/");else if(e.match(z0))e=e.replace(z0,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(ZO);if(r){let n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function eB(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function tB(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host),n=K0(r);if(n.isIPV4)r=n.host;else{let o=W0(n.host);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}Y0.exports={recomposeAuthority:tB,normalizeComponentEncoding:eB,removeDotSegments:XO,normalizeIPv4:K0,normalizeIPv6:W0,stringArrayToHexStripped:Of}});var nw=E((dJ,rw)=>{"use strict";var rB=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,nB=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Z0(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function X0(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function ew(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function oB(e){return e.secure=Z0(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function iB(e){if((e.port===(Z0(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function sB(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(nB);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,s=Bf[o];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function aB(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,s=Bf[o];s&&(e=s.serialize(e,t));let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function uB(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!rB.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function cB(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var tw={scheme:"http",domainHost:!0,parse:X0,serialize:ew},lB={scheme:"https",domainHost:tw.domainHost,parse:X0,serialize:ew},xc={scheme:"ws",domainHost:!0,parse:oB,serialize:iB},dB={scheme:"wss",domainHost:xc.domainHost,parse:xc.parse,serialize:xc.serialize},pB={scheme:"urn",parse:sB,serialize:aB,skipNormalize:!0},fB={scheme:"urn:uuid",parse:uB,serialize:cB,skipNormalize:!0},Bf={http:tw,https:lB,ws:xc,wss:dB,urn:pB,"urn:uuid":fB};rw.exports=Bf});var iw=E((pJ,Sc)=>{"use strict";var{normalizeIPv6:mB,normalizeIPv4:gB,removeDotSegments:ha,recomposeAuthority:hB,normalizeComponentEncoding:wc}=Q0(),Mf=nw();function yB(e,t){return typeof e=="string"?e=tn(Sn(e,t),t):typeof e=="object"&&(e=Sn(tn(e,t),t)),e}function DB(e,t,r){let n=Object.assign({scheme:"null"},r),o=ow(Sn(e,n),Sn(t,n),n,!0);return tn(o,{...n,skipEscape:!0})}function ow(e,t,r,n){let o={};return n||(e=Sn(tn(e,r),r),t=Sn(tn(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=ha(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=ha(t.path||""),o.query=t.query):(t.path?(t.path.charAt(0)==="/"?o.path=ha(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=ha(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function vB(e,t,r){return typeof e=="string"?(e=unescape(e),e=tn(wc(Sn(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=tn(wc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=tn(wc(Sn(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=tn(wc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function tn(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],s=Mf[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let i=hB(r);if(i!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(i),r.path&&r.path.charAt(0)!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=ha(a)),i===void 0&&(a=a.replace(/^\/\//u,"/%2F")),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var CB=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function bB(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||CB[t])return!0;return!1}var xB=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Sn(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=e.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let i=e.match(xB);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let u=gB(n.host);if(u.isIPV4===!1){let c=mB(u.host);n.host=c.host.toLowerCase(),s=c.isIPV6}else n.host=u.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=Mf[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&s===!1&&bB(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!a||a&&!a.skipNormalize)&&(o&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),o&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Lf={SCHEMES:Mf,normalize:yB,resolve:DB,resolveComponents:ow,equal:vB,serialize:tn,parse:Sn};Sc.exports=Lf;Sc.exports.default=Lf;Sc.exports.fastUri=Lf});var aw=E(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var sw=iw();sw.code='require("ajv/dist/runtime/uri").default';jf.default=sw});var gw=E(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.CodeGen=rt.Name=rt.nil=rt.stringify=rt.str=rt._=rt.KeywordCxt=void 0;var wB=ma();Object.defineProperty(rt,"KeywordCxt",{enumerable:!0,get:function(){return wB.KeywordCxt}});var Wi=te();Object.defineProperty(rt,"_",{enumerable:!0,get:function(){return Wi._}});Object.defineProperty(rt,"str",{enumerable:!0,get:function(){return Wi.str}});Object.defineProperty(rt,"stringify",{enumerable:!0,get:function(){return Wi.stringify}});Object.defineProperty(rt,"nil",{enumerable:!0,get:function(){return Wi.nil}});Object.defineProperty(rt,"Name",{enumerable:!0,get:function(){return Wi.Name}});Object.defineProperty(rt,"CodeGen",{enumerable:!0,get:function(){return Wi.CodeGen}});var SB=vc(),pw=ga(),EB=hf(),ya=bc(),PB=te(),Da=da(),Ec=la(),Vf=ye(),uw=U0(),AB=aw(),fw=(e,t)=>new RegExp(e,t);fw.code="new RegExp";var TB=["removeAdditional","useDefaults","coerceTypes"],FB=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_B={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},RB={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},cw=200;function IB(e){var t,r,n,o,s,i,a,u,c,l,d,p,h,m,g,y,D,S,w,F,A,_,k,O,$;let R=e.strict,C=(t=e.code)===null||t===void 0?void 0:t.optimize,U=C===!0||C===void 0?1:C||0,H=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:fw,K=(o=e.uriResolver)!==null&&o!==void 0?o:AB.default;return{strictSchema:(i=(s=e.strictSchema)!==null&&s!==void 0?s:R)!==null&&i!==void 0?i:!0,strictNumbers:(u=(a=e.strictNumbers)!==null&&a!==void 0?a:R)!==null&&u!==void 0?u:!0,strictTypes:(l=(c=e.strictTypes)!==null&&c!==void 0?c:R)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=e.strictTuples)!==null&&d!==void 0?d:R)!==null&&p!==void 0?p:"log",strictRequired:(m=(h=e.strictRequired)!==null&&h!==void 0?h:R)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:U,regExp:H}:{optimize:U,regExp:H},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:cw,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:cw,meta:(D=e.meta)!==null&&D!==void 0?D:!0,messages:(S=e.messages)!==null&&S!==void 0?S:!0,inlineRefs:(w=e.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(F=e.schemaId)!==null&&F!==void 0?F:"$id",addUsedSchema:(A=e.addUsedSchema)!==null&&A!==void 0?A:!0,validateSchema:(_=e.validateSchema)!==null&&_!==void 0?_:!0,validateFormats:(k=e.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:(O=e.unicodeRegExp)!==null&&O!==void 0?O:!0,int32range:($=e.int32range)!==null&&$!==void 0?$:!0,uriResolver:K}}var va=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...IB(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new PB.ValueScope({scope:{},prefixes:FB,es5:r,lines:n}),this.logger=MB(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,EB.getRules)(),lw.call(this,_B,t,"NOT SUPPORTED"),lw.call(this,RB,t,"DEPRECATED","warn"),this._metaOpts=OB.call(this),t.formats&&$B.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&NB.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),kB.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=uw;n==="id"&&(o={...uw},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(l,d){await s.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||i.call(this,p)}async function s(l){l&&!this.getSchema(l)&&await o.call(this,{$ref:l},!0)}async function i(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof pw.default))throw d;return a.call(this,d),await u.call(this,d.missingSchema),i.call(this,l)}}function a({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function u(l){let d=await c.call(this,l);this.refs[l]||await s.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let i of t)this.addSchema(i,void 0,n,o);return this}let s;if(typeof t=="object"){let{schemaId:i}=this.opts;if(s=t[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return r=(0,Da.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return o}getSchema(t){let r;for(;typeof(r=dw.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new ya.SchemaEnv({schema:{},schemaId:n});if(r=ya.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=dw.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,Da.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(jB.call(this,n,r),!r)return(0,Vf.eachItem)(n,s=>Uf.call(this,s)),this;VB.call(this,r);let o={...r,type:(0,Ec.getJSONTypes)(r.type),schemaType:(0,Ec.getJSONTypes)(r.schemaType)};return(0,Vf.eachItem)(n,o.type.length===0?s=>Uf.call(this,s,o):s=>o.type.forEach(i=>Uf.call(this,s,o,i))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(s=>s.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,s)=>o+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let s=o.split("/").slice(1),i=t;for(let a of s)i=i[a];for(let a in n){let u=n[a];if(typeof u!="object")continue;let{$data:c}=u.definition,l=i[a];c&&l&&(i[a]=mw(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof t=="object")i=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==void 0)return u;n=(0,Da.normalizeId)(i||n);let c=Da.getSchemaRefs.call(this,t,n);return u=new ya.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:c}),this._cache.set(u.schema,u),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),o&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):ya.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{ya.compileSchema.call(this,t)}finally{this.opts=r}}};va.ValidationError=SB.default;va.MissingRefError=pw.default;rt.default=va;function lw(e,t,r,n="error"){for(let o in e){let s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function dw(e){return e=(0,Da.normalizeId)(e),this.schemas[e]||this.refs[e]}function kB(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function $B(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function NB(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function OB(){let e={...this.opts};for(let t of TB)delete e[t];return e}var BB={log(){},warn(){},error(){}};function MB(e){if(e===!1)return BB;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var LB=/^[a-z_$][a-z0-9_$:-]*$/i;function jB(e,t){let{RULES:r}=this;if((0,Vf.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!LB.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Uf(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=o?s.post:s.rules.find(({type:u})=>u===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,Ec.getJSONTypes)(t.type),schemaType:(0,Ec.getJSONTypes)(t.schemaType)}};t.before?UB.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function UB(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function VB(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=mw(t)),e.validateSchema=this.compile(t,!0))}var GB={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function mw(e){return{anyOf:[e,GB]}}});var hw=E(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});var HB={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Gf.default=HB});var Cw=E(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.callRef=Wo.getValidate=void 0;var qB=ga(),yw=lr(),Nt=te(),Ji=xn(),Dw=bc(),Pc=ye(),zB={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:u}=n,{root:c}=s;if((r==="#"||r==="#/")&&o===c.baseId)return d();let l=Dw.resolveRef.call(u,c,o,r);if(l===void 0)throw new qB.default(n.opts.uriResolver,o,r);if(l instanceof Dw.SchemaEnv)return p(l);return h(l);function d(){if(s===c)return Ac(e,i,s,s.$async);let m=t.scopeValue("root",{ref:c});return Ac(e,(0,Nt._)`${m}.validate`,c,c.$async)}function p(m){let g=vw(e,m);Ac(e,g,m,m.$async)}function h(m){let g=t.scopeValue("schema",a.code.source===!0?{ref:m,code:(0,Nt.stringify)(m)}:{ref:m}),y=t.name("valid"),D=e.subschema({schema:m,dataTypes:[],schemaPath:Nt.nil,topSchemaRef:g,errSchemaPath:r},y);e.mergeEvaluated(D),e.ok(y)}}};function vw(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Nt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Wo.getValidate=vw;function Ac(e,t,r,n){let{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:u}=s,c=u.passContext?Ji.default.this:Nt.nil;n?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let m=o.let("valid");o.try(()=>{o.code((0,Nt._)`await ${(0,yw.callValidateCode)(e,t,c)}`),h(t),i||o.assign(m,!0)},g=>{o.if((0,Nt._)`!(${g} instanceof ${s.ValidationError})`,()=>o.throw(g)),p(g),i||o.assign(m,!1)}),e.ok(m)}function d(){e.result((0,yw.callValidateCode)(e,t,c),()=>h(t),()=>p(t))}function p(m){let g=(0,Nt._)`${m}.errors`;o.assign(Ji.default.vErrors,(0,Nt._)`${Ji.default.vErrors} === null ? ${g} : ${Ji.default.vErrors}.concat(${g})`),o.assign(Ji.default.errors,(0,Nt._)`${Ji.default.vErrors}.length`)}function h(m){var g;if(!s.opts.unevaluated)return;let y=(g=r?.validate)===null||g===void 0?void 0:g.evaluated;if(s.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(s.props=Pc.mergeEvaluated.props(o,y.props,s.props));else{let D=o.var("props",(0,Nt._)`${m}.evaluated.props`);s.props=Pc.mergeEvaluated.props(o,D,s.props,Nt.Name)}if(s.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(s.items=Pc.mergeEvaluated.items(o,y.items,s.items));else{let D=o.var("items",(0,Nt._)`${m}.evaluated.items`);s.items=Pc.mergeEvaluated.items(o,D,s.items,Nt.Name)}}}Wo.callRef=Ac;Wo.default=zB});var bw=E(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var KB=hw(),WB=Cw(),JB=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",KB.default,WB.default];Hf.default=JB});var xw=E(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var Tc=te(),Qn=Tc.operators,Fc={maximum:{okStr:"<=",ok:Qn.LTE,fail:Qn.GT},minimum:{okStr:">=",ok:Qn.GTE,fail:Qn.LT},exclusiveMaximum:{okStr:"<",ok:Qn.LT,fail:Qn.GTE},exclusiveMinimum:{okStr:">",ok:Qn.GT,fail:Qn.LTE}},YB={message:({keyword:e,schemaCode:t})=>(0,Tc.str)`must be ${Fc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Tc._)`{comparison: ${Fc[e].okStr}, limit: ${t}}`},QB={keyword:Object.keys(Fc),type:"number",schemaType:"number",$data:!0,error:YB,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Tc._)`${r} ${Fc[t].fail} ${n} || isNaN(${r})`)}};qf.default=QB});var ww=E(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var Ca=te(),ZB={message:({schemaCode:e})=>(0,Ca.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ca._)`{multipleOf: ${e}}`},XB={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:ZB,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?(0,Ca._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,Ca._)`${i} !== parseInt(${i})`;e.fail$data((0,Ca._)`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};zf.default=XB});var Ew=E(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});function Sw(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}Kf.default=Sw;Sw.code='require("ajv/dist/runtime/ucs2length").default'});var Pw=E(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var Jo=te(),eM=ye(),tM=Ew(),rM={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Jo.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Jo._)`{limit: ${e}}`},nM={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:rM,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,s=t==="maxLength"?Jo.operators.GT:Jo.operators.LT,i=o.opts.unicode===!1?(0,Jo._)`${r}.length`:(0,Jo._)`${(0,eM.useFunc)(e.gen,tM.default)}(${r})`;e.fail$data((0,Jo._)`${i} ${s} ${n}`)}};Wf.default=nM});var Aw=E(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});var oM=lr(),_c=te(),iM={message:({schemaCode:e})=>(0,_c.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,_c._)`{pattern: ${e}}`},sM={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:iM,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:s}=e,i=s.opts.unicodeRegExp?"u":"",a=r?(0,_c._)`(new RegExp(${o}, ${i}))`:(0,oM.usePattern)(e,n);e.fail$data((0,_c._)`!${a}.test(${t})`)}};Jf.default=sM});var Tw=E(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var ba=te(),aM={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,ba.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,ba._)`{limit: ${e}}`},uM={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:aM,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?ba.operators.GT:ba.operators.LT;e.fail$data((0,ba._)`Object.keys(${r}).length ${o} ${n}`)}};Yf.default=uM});var Fw=E(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var xa=lr(),wa=te(),cM=ye(),lM={message:({params:{missingProperty:e}})=>(0,wa.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,wa._)`{missingProperty: ${e}}`},dM={keyword:"required",type:"object",schemaType:"array",$data:!0,error:lM,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&r.length===0)return;let u=r.length>=a.loopRequired;if(i.allErrors?c():l(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:m}=e.it;for(let g of r)if(h?.[g]===void 0&&!m.has(g)){let y=i.schemaEnv.baseId+i.errSchemaPath,D=`required property "${g}" is not defined at "${y}" (strictRequired)`;(0,cM.checkStrictMode)(i,D,i.opts.strictRequired)}}function c(){if(u||s)e.block$data(wa.nil,d);else for(let h of r)(0,xa.checkReportMissingProp)(e,h)}function l(){let h=t.let("missing");if(u||s){let m=t.let("valid",!0);e.block$data(m,()=>p(h,m)),e.ok(m)}else t.if((0,xa.checkMissingProp)(e,r,h)),(0,xa.reportMissingProp)(e,h),t.else()}function d(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,xa.noPropertyInData)(t,o,h,a.ownProperties),()=>e.error())})}function p(h,m){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(m,(0,xa.propertyInData)(t,o,h,a.ownProperties)),t.if((0,wa.not)(m),()=>{e.error(),t.break()})},wa.nil)}}};Qf.default=dM});var _w=E(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var Sa=te(),pM={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Sa.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Sa._)`{limit: ${e}}`},fM={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:pM,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?Sa.operators.GT:Sa.operators.LT;e.fail$data((0,Sa._)`${r}.length ${o} ${n}`)}};Zf.default=fM});var Rc=E(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var Rw=Sf();Rw.code='require("ajv/dist/runtime/equal").default';Xf.default=Rw});var Iw=E(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var em=la(),nt=te(),mM=ye(),gM=Rc(),hM={message:({params:{i:e,j:t}})=>(0,nt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,nt._)`{i: ${e}, j: ${t}}`},yM={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:hM,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;let u=t.let("valid"),c=s.items?(0,em.getSchemaTypes)(s.items):[];e.block$data(u,l,(0,nt._)`${i} === false`),e.ok(u);function l(){let m=t.let("i",(0,nt._)`${r}.length`),g=t.let("j");e.setParams({i:m,j:g}),t.assign(u,!0),t.if((0,nt._)`${m} > 1`,()=>(d()?p:h)(m,g))}function d(){return c.length>0&&!c.some(m=>m==="object"||m==="array")}function p(m,g){let y=t.name("item"),D=(0,em.checkDataTypes)(c,y,a.opts.strictNumbers,em.DataType.Wrong),S=t.const("indices",(0,nt._)`{}`);t.for((0,nt._)`;${m}--;`,()=>{t.let(y,(0,nt._)`${r}[${m}]`),t.if(D,(0,nt._)`continue`),c.length>1&&t.if((0,nt._)`typeof ${y} == "string"`,(0,nt._)`${y} += "_"`),t.if((0,nt._)`typeof ${S}[${y}] == "number"`,()=>{t.assign(g,(0,nt._)`${S}[${y}]`),e.error(),t.assign(u,!1).break()}).code((0,nt._)`${S}[${y}] = ${m}`)})}function h(m,g){let y=(0,mM.useFunc)(t,gM.default),D=t.name("outer");t.label(D).for((0,nt._)`;${m}--;`,()=>t.for((0,nt._)`${g} = ${m}; ${g}--;`,()=>t.if((0,nt._)`${y}(${r}[${m}], ${r}[${g}])`,()=>{e.error(),t.assign(u,!1).break(D)})))}}};tm.default=yM});var kw=E(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var rm=te(),DM=ye(),vM=Rc(),CM={message:"must be equal to constant",params:({schemaCode:e})=>(0,rm._)`{allowedValue: ${e}}`},bM={keyword:"const",$data:!0,error:CM,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,rm._)`!${(0,DM.useFunc)(t,vM.default)}(${r}, ${o})`):e.fail((0,rm._)`${s} !== ${r}`)}};nm.default=bM});var $w=E(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var Ea=te(),xM=ye(),wM=Rc(),SM={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Ea._)`{allowedValues: ${e}}`},EM={keyword:"enum",schemaType:"array",$data:!0,error:SM,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=i.opts.loopEnum,u,c=()=>u??(u=(0,xM.useFunc)(t,wM.default)),l;if(a||n)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=t.const("vSchema",s);l=(0,Ea.or)(...o.map((m,g)=>p(h,g)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",s,h=>t.if((0,Ea._)`${c()}(${r}, ${h})`,()=>t.assign(l,!0).break()))}function p(h,m){let g=o[m];return typeof g=="object"&&g!==null?(0,Ea._)`${c()}(${r}, ${h}[${m}])`:(0,Ea._)`${r} === ${g}`}}};om.default=EM});var Nw=E(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var PM=xw(),AM=ww(),TM=Pw(),FM=Aw(),_M=Tw(),RM=Fw(),IM=_w(),kM=Iw(),$M=kw(),NM=$w(),OM=[PM.default,AM.default,TM.default,FM.default,_M.default,RM.default,IM.default,kM.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},$M.default,NM.default];im.default=OM});var am=E(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.validateAdditionalItems=void 0;var Yo=te(),sm=ye(),BM={message:({params:{len:e}})=>(0,Yo.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Yo._)`{limit: ${e}}`},MM={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:BM,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,sm.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Ow(e,n)}};function Ow(e,t){let{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;let a=r.const("len",(0,Yo._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Yo._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,sm.alwaysValidSchema)(i,n)){let c=r.var("valid",(0,Yo._)`${a} <= ${t.length}`);r.if((0,Yo.not)(c),()=>u(c)),e.ok(c)}function u(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:sm.Type.Num},c),i.allErrors||r.if((0,Yo.not)(c),()=>r.break())})}}Pa.validateAdditionalItems=Ow;Pa.default=MM});var um=E(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.validateTuple=void 0;var Bw=te(),Ic=ye(),LM=lr(),jM={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Mw(e,"additionalItems",t);r.items=!0,!(0,Ic.alwaysValidSchema)(r,t)&&e.ok((0,LM.validateArray)(e))}};function Mw(e,t,r=e.schema){let{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;l(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Ic.mergeEvaluated.items(n,r.length,a.items));let u=n.name("valid"),c=n.const("len",(0,Bw._)`${s}.length`);r.forEach((d,p)=>{(0,Ic.alwaysValidSchema)(a,d)||(n.if((0,Bw._)`${c} > ${p}`,()=>e.subschema({keyword:i,schemaProp:p,dataProp:p},u)),e.ok(u))});function l(d){let{opts:p,errSchemaPath:h}=a,m=r.length,g=m===d.minItems&&(m===d.maxItems||d[t]===!1);if(p.strictTuples&&!g){let y=`"${i}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,Ic.checkStrictMode)(a,y,p.strictTuples)}}}Aa.validateTuple=Mw;Aa.default=jM});var Lw=E(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var UM=um(),VM={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,UM.validateTuple)(e,"items")};cm.default=VM});var Uw=E(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var jw=te(),GM=ye(),HM=lr(),qM=am(),zM={message:({params:{len:e}})=>(0,jw.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,jw._)`{limit: ${e}}`},KM={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:zM,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,GM.alwaysValidSchema)(n,t)&&(o?(0,qM.validateAdditionalItems)(e,o):e.ok((0,HM.validateArray)(e)))}};lm.default=KM});var Vw=E(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var pr=te(),kc=ye(),WM={message:({params:{min:e,max:t}})=>t===void 0?(0,pr.str)`must contain at least ${e} valid item(s)`:(0,pr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,pr._)`{minContains: ${e}}`:(0,pr._)`{minContains: ${e}, maxContains: ${t}}`},JM={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:WM,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e,i,a,{minContains:u,maxContains:c}=n;s.opts.next?(i=u===void 0?1:u,a=c):i=1;let l=t.const("len",(0,pr._)`${o}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){(0,kc.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,kc.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,kc.alwaysValidSchema)(s,r)){let g=(0,pr._)`${l} >= ${i}`;a!==void 0&&(g=(0,pr._)`${g} && ${l} <= ${a}`),e.pass(g);return}s.items=!0;let d=t.name("valid");a===void 0&&i===1?h(d,()=>t.if(d,()=>t.break())):i===0?(t.let(d,!0),a!==void 0&&t.if((0,pr._)`${o}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){let g=t.name("_valid"),y=t.let("count",0);h(g,()=>t.if(g,()=>m(y)))}function h(g,y){t.forRange("i",0,l,D=>{e.subschema({keyword:"contains",dataProp:D,dataPropType:kc.Type.Num,compositeRule:!0},g),y()})}function m(g){t.code((0,pr._)`${g}++`),a===void 0?t.if((0,pr._)`${g} >= ${i}`,()=>t.assign(d,!0).break()):(t.if((0,pr._)`${g} > ${a}`,()=>t.assign(d,!1).break()),i===1?t.assign(d,!0):t.if((0,pr._)`${g} >= ${i}`,()=>t.assign(d,!0)))}}};dm.default=JM});var qw=E(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.validateSchemaDeps=rn.validatePropertyDeps=rn.error=void 0;var pm=te(),YM=ye(),Ta=lr();rn.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,pm.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,pm._)`{property: ${e},
|
|
1494
|
+
`)});let y=u(`HTTP/${e.httpVersion} ${h.statusCode} ${h.statusMessage}`,g.headers);t.destroyed?h.resume():(t.write(y),h.on("data",D=>{m(D)}),h.on("end",()=>{m(""),t.destroySoon()}))}),d.end()}at.WS_PASSES={checkMethodAndHeader:Vb,XHeaders:Hb,stream:Gb}});var qb=E(nr=>{"use strict";var J1=nr&&nr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Y1=nr&&nr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),zb=nr&&nr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&J1(r,t,n[o]);return Y1(r,t),r}})(),Q1=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nr,"__esModule",{value:!0});nr.ProxyServer=void 0;var Z1=zb(Q("node:http")),X1=zb(Q("node:http2")),ek=jb(),tk=Ep(),rk=Q("node:events"),nk=Q1(Vu()),ok=Ws(),zu=(0,nk.default)("http-proxy-3"),Pp=class e extends rk.EventEmitter{constructor(t={}){super(),this.createRightProxy=r=>(zu("createRightProxy",{type:r}),n=>(...o)=>{let s=o[0];zu("proxy: ",{type:r,path:s.url});let i=o[1],a=r==="ws"?this.wsPasses:this.webPasses;r=="ws"&&i.on("error",p=>{this.emit("error",p,s,i)});let u=o.length-1,c,l;typeof o[u]=="function"&&(l=o[u],u--);let d;!(o[u]instanceof Buffer)&&o[u]!==i?(d={...n,...o[u]},u--):d={...n},o[u]instanceof Buffer&&(c=o[u]);for(let p of["target","forward"])typeof d[p]=="string"&&(d[p]=(0,ok.toURL)(d[p]));if(!d.target&&!d.forward){this.emit("error",new Error("Must set target or forward"),s,i);return}for(let p of a)if(p(s,i,d,c,this,l))break}),this.onError=r=>{if(this.listeners("error").length===1)throw r},this.listen=(r,n)=>{zu("listen",{port:r,hostname:n});let o=(s,i)=>{this.web(s,i)};return this._server=this.options.ssl?X1.createSecureServer({...this.options.ssl,allowHTTP1:!0},o):Z1.createServer(o),this.options.ws&&this._server.on("upgrade",(s,i,a)=>{this.ws(s,i,a)}),this._server.listen(r,n),this},this.address=()=>this._server?.address(),this.close=r=>{if(this._server==null){r?.();return}this._server.close(n=>{this._server=null,r?.(n)})},this.before=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i,0,o)},this.after=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i++,0,o)},zu("creating a ProxyServer",t),t.prependPath=t.prependPath!==!1,this.options=t,this.web=this.createRightProxy("web")(t),this.ws=this.createRightProxy("ws")(t),this.webPasses=Object.values(ek.WEB_PASSES),this.wsPasses=Object.values(tk.WS_PASSES),this.on("error",this.onError)}static createProxyServer(t){return new e(t)}static createServer(t){return new e(t)}static createProxy(t){return new e(t)}};nr.ProxyServer=Pp});var Kb=E(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.numOpenSockets=Wr.ProxyServer=void 0;Wr.createProxyServer=Tp;Wr.createServer=Tp;Wr.createProxy=Tp;var Ap=qb();Object.defineProperty(Wr,"ProxyServer",{enumerable:!0,get:function(){return Ap.ProxyServer}});var ik=Ep();Object.defineProperty(Wr,"numOpenSockets",{enumerable:!0,get:function(){return ik.numOpenSockets}});function Tp(e={}){return new Ap.ProxyServer(e)}Wr.default=Ap.ProxyServer});var Yb=E(Fp=>{"use strict";Fp.parse=pk;Fp.serialize=fk;var sk=Object.prototype.toString,ak=Object.prototype.hasOwnProperty,uk=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,ck=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,lk=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,dk=/^[\u0020-\u003A\u003D-\u007E]*$/;function pk(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var o=t&&t.decode||mk,s=0,i=0,a=0;do{if(i=e.indexOf("=",s),i===-1)break;if(a=e.indexOf(";",s),a===-1)a=n;else if(i>a){s=e.lastIndexOf(";",i-1)+1;continue}var u=Wb(e,s,i),c=Jb(e,i,u),l=e.slice(u,c);if(!ak.call(r,l)){var d=Wb(e,i+1,a),p=Jb(e,a,d);e.charCodeAt(d)===34&&e.charCodeAt(p-1)===34&&(d++,p--);var h=e.slice(d,p);r[l]=hk(h,o)}s=a+1}while(s<n);return r}function Wb(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function Jb(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function fk(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!uk.test(e))throw new TypeError("argument name is invalid");var o=n(t);if(!ck.test(o))throw new TypeError("argument val is invalid");var s=e+"="+o;if(!r)return s;if(r.maxAge!=null){var i=Math.floor(r.maxAge);if(!isFinite(i))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+i}if(r.domain){if(!lk.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!dk.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var a=r.expires;if(!gk(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+a.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.partitioned&&(s+="; Partitioned"),r.priority){var u=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(u){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var c=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function mk(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function gk(e){return sk.call(e)==="[object Date]"}function hk(e,t){try{return t(e)}catch{return e}}});var Xb=E(qu=>{var Zb=Q("crypto");qu.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");return e+"."+Zb.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};qu.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=qu.sign(r,t);return Qb(n)==Qb(e)?r:!1};function Qb(e){return Zb.createHash("sha1").update(e).digest("hex")}});var nx=E((tK,Ii)=>{"use strict";var yk=Yb(),Dk=Xb();Ii.exports=vk;Ii.exports.JSONCookie=ex;Ii.exports.JSONCookies=_p;Ii.exports.signedCookie=tx;Ii.exports.signedCookies=rx;function vk(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(o,s,i){if(o.cookies)return i();var a=o.headers.cookie;if(o.secret=r[0],o.cookies=Object.create(null),o.signedCookies=Object.create(null),!a)return i();o.cookies=yk.parse(a,t),r.length!==0&&(o.signedCookies=rx(o.cookies,r),o.signedCookies=_p(o.signedCookies)),o.cookies=_p(o.cookies),i()}}function ex(e){if(!(typeof e!="string"||e.substr(0,2)!=="j:"))try{return JSON.parse(e.slice(2))}catch{return}}function _p(e){for(var t=Object.keys(e),r,n,o=0;o<t.length;o++)r=t[o],n=ex(e[r]),n&&(e[r]=n);return e}function tx(e,t){if(typeof e=="string"){if(e.substr(0,2)!=="s:")return e;for(var r=!t||Array.isArray(t)?t||[]:[t],n=0;n<r.length;n++){var o=Dk.unsign(e.slice(2),r[n]);if(o!==!1)return o}return!1}}function rx(e,t){for(var r=Object.keys(e),n,o,s=Object.create(null),i,a=0;a<r.length;a++)o=r[a],i=e[o],n=tx(i,t),i!==n&&(s[o]=n,delete e[o]);return s}});var Ck,ox,rK,ix=v(()=>{"use strict";Ck=Me(nx(),1),ox="/_builder.io",rK=ox+"/api"});var bk,sK,sx=v(()=>{"use strict";bk=Me(Kb(),1);ix();Ku();sK=new(Q("https")).Agent({rejectUnauthorized:!1})});var Ku=v(()=>{"use strict";wi();tb();Bu();Ls();rb();Lt();nb();ob();ib();xi();sx()});import*as Ek from"@sentry/node";var cx=v(()=>{"use strict";Fu();Fu();Ld();XC();wi();eb();Ns();Bu();Ku();Wu();Ls();vo()});var Rp=v(()=>{"use strict";Id()});var lx=v(()=>{"use strict";Rp()});var Ip=v(()=>{"use strict"});var dx=v(()=>{"use strict"});var se,kp,M,Jr,Js=v(()=>{(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let s={};for(let i of o)s[i]=i;return s},e.getValidEnumValues=o=>{let s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(let a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(let i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=n,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(se||(se={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(kp||(kp={}));M=se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jr=e=>{switch(typeof e){case"undefined":return M.undefined;case"string":return M.string;case"number":return Number.isNaN(e)?M.nan:M.number;case"boolean":return M.boolean;case"function":return M.function;case"bigint":return M.bigint;case"symbol":return M.symbol;case"object":return Array.isArray(e)?M.array:e===null?M.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?M.promise:typeof Map<"u"&&e instanceof Map?M.map:typeof Set<"u"&&e instanceof Set?M.set:typeof Date<"u"&&e instanceof Date?M.date:M.object;default:return M.unknown}}});var I,Pk,Ft,Ju=v(()=>{Js();I=se.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Pk=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Ft=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(let i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,u=0;for(;u<i.path.length;){let c=i.path[u];u===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(i))):a[c]=a[c]||{_errors:[]},a=a[c],u++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,se.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ft.create=e=>new Ft(e)});var Ak,hn,$p=v(()=>{Ju();Js();Ak=(e,t)=>{let r;switch(e.code){case I.invalid_type:e.received===M.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,se.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:r=`Unrecognized key(s) in object: ${se.joinValues(e.keys,", ")}`;break;case I.invalid_union:r="Invalid input";break;case I.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${se.joinValues(e.options)}`;break;case I.invalid_enum_value:r=`Invalid enum value. Expected ${se.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:r="Invalid function arguments";break;case I.invalid_return_type:r="Invalid function return type";break;case I.invalid_date:r="Invalid date";break;case I.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:se.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case I.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case I.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case I.custom:r="Invalid input";break;case I.invalid_intersection_types:r="Intersection results could not be merged";break;case I.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:r="Number must be finite";break;default:r=t.defaultError,se.assertNever(e)}return{message:r}},hn=Ak});function Tk(e){px=e}function ki(){return px}var px,Yu=v(()=>{$p();px=hn});function B(e,t){let r=ki(),n=Ys({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===hn?void 0:hn].filter(o=>!!o)});e.common.issues.push(n)}var Ys,Fk,tt,H,Eo,ut,Qu,Zu,Un,$i,Np=v(()=>{Yu();$p();Ys=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,s=[...r,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},Fk=[];tt=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return H;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let s=await o.key,i=await o.value;n.push({key:s,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return H;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[s.value]=i.value)}return{status:t.value,value:n}}},H=Object.freeze({status:"aborted"}),Eo=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),Qu=e=>e.status==="aborted",Zu=e=>e.status==="dirty",Un=e=>e.status==="valid",$i=e=>typeof Promise<"u"&&e instanceof Promise});var fx=v(()=>{});var j,mx=v(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(j||(j={}))});function Y(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{let{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:u??r??a.defaultError}},description:o}}function Dx(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function qk(e){return new RegExp(`^${Dx(e)}$`)}function vx(e){let t=`${yx}T${Dx(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Kk(e,t){return!!((t==="v4"||!t)&&Lk.test(e)||(t==="v6"||!t)&&Uk.test(e))}function Wk(e,t){if(!Nk.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function Jk(e,t){return!!((t==="v4"||!t)&&jk.test(e)||(t==="v6"||!t)&&Vk.test(e))}function Yk(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),i=Number.parseInt(t.toFixed(o).replace(".",""));return s%i/10**o}function Ni(e){if(e instanceof _t){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=or.create(Ni(n))}return new _t({...e._def,shape:()=>t})}else return e instanceof vn?new vn({...e._def,type:Ni(e.element)}):e instanceof or?or.create(Ni(e.unwrap())):e instanceof Qr?Qr.create(Ni(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>Ni(t))):e}function Bp(e,t){let r=Jr(e),n=Jr(t);if(e===t)return{valid:!0,data:e};if(r===M.object&&n===M.object){let o=se.objectKeys(t),s=se.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(let a of s){let u=Bp(e[a],t[a]);if(!u.valid)return{valid:!1};i[a]=u.data}return{valid:!0,data:i}}else if(r===M.array&&n===M.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let s=0;s<e.length;s++){let i=e[s],a=t[s],u=Bp(i,a);if(!u.valid)return{valid:!1};o.push(u.data)}return{valid:!0,data:o}}else return r===M.date&&n===M.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function Cx(e,t){return new Oo({values:e,typeName:q.ZodEnum,...Y(t)})}function hx(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function bx(e,t={},r){return e?Hn.create().superRefine((n,o)=>{let s=e(n);if(s instanceof Promise)return s.then(i=>{if(!i){let a=hx(t,n),u=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:u})}});if(!s){let i=hx(t,n),a=i.fatal??r??!0;o.addIssue({code:"custom",...i,fatal:a})}}):Hn.create()}var ir,gx,te,_k,Rk,Ik,kk,$k,Nk,Ok,Bk,Mk,Op,Lk,jk,Uk,Vk,Hk,Gk,yx,zk,Vn,Po,Ao,To,Fo,Oi,_o,Ro,Hn,Dn,br,Bi,vn,_t,Io,yn,Xu,ko,Yr,ec,Mi,Li,tc,$o,No,Oo,Bo,Gn,sr,or,Qr,Mo,Lo,ji,Qk,Qs,Zs,jo,Zk,q,Xk,xx,wx,e$,t$,Sx,r$,n$,o$,i$,s$,a$,u$,c$,l$,d$,p$,f$,m$,g$,h$,y$,D$,v$,C$,b$,x$,w$,S$,E$,P$,A$,T$,F$,_$,R$,I$,k$,$$,N$,Ex=v(()=>{Ju();Yu();mx();Np();Js();ir=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},gx=(e,t)=>{if(Un(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Ft(e.common.issues);return this._error=r,this._error}}};te=class{get description(){return this._def.description}_getType(t){return Jr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new tt,ctx:{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if($i(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},o=this._parseSync({data:t,path:n.path,parent:n});return gx(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Un(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Un(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},o=this._parse({data:t,path:n.path,parent:n}),s=await($i(o)?o:Promise.resolve(o));return gx(n,s)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let i=t(o),a=()=>s.addIssue({code:I.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new sr({schema:this,typeName:q.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return or.create(this,this._def)}nullable(){return Qr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return vn.create(this)}promise(){return Gn.create(this,this._def)}or(t){return Io.create([this,t],this._def)}and(t){return ko.create(this,t,this._def)}transform(t){return new sr({...Y(this._def),schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Mo({...Y(this._def),innerType:this,defaultValue:r,typeName:q.ZodDefault})}brand(){return new Qs({typeName:q.ZodBranded,type:this,...Y(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Lo({...Y(this._def),innerType:this,catchValue:r,typeName:q.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Zs.create(this,t)}readonly(){return jo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},_k=/^c[^\s-]{8,}$/i,Rk=/^[0-9a-z]+$/,Ik=/^[0-9A-HJKMNP-TV-Z]{26}$/i,kk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$k=/^[a-z0-9_-]{21}$/i,Nk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ok=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Bk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Mk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Lk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Uk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Vk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Gk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yx="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",zk=new RegExp(`^${yx}$`);Vn=class e extends te{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==M.string){let s=this._getOrReturnCtx(t);return B(s,{code:I.invalid_type,expected:M.string,received:s.parsedType}),H}let n=new tt,o;for(let s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),B(o,{code:I.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),B(o,{code:I.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?B(o,{code:I.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&B(o,{code:I.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Bk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"email",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Op||(Op=new RegExp(Mk,"u")),Op.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"emoji",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")kk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"uuid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")$k.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"nanoid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")_k.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"cuid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Rk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"cuid2",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Ik.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"ulid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),B(o,{validation:"url",code:I.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"regex",code:I.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?vx(s).test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?zk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?qk(s).test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{code:I.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Ok.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"duration",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Kk(t.data,s.version)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"ip",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Wk(t.data,s.alg)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"jwt",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Jk(t.data,s.version)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"cidr",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Hk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"base64",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Gk.test(t.data)||(o=this._getOrReturnCtx(t,o),B(o,{validation:"base64url",code:I.invalid_string,message:s.message}),n.dirty()):se.assertNever(s);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:I.invalid_string,...j.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...j.errToObj(t)})}url(t){return this._addCheck({kind:"url",...j.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...j.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...j.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...j.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...j.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...j.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...j.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...j.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...j.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...j.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...j.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...j.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...j.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...j.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...j.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...j.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...j.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...j.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...j.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...j.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...j.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...j.errToObj(r)})}nonempty(t){return this.min(1,j.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Vn.create=e=>new Vn({checks:[],typeName:q.ZodString,coerce:e?.coerce??!1,...Y(e)});Po=class e extends te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==M.number){let s=this._getOrReturnCtx(t);return B(s,{code:I.invalid_type,expected:M.number,received:s.parsedType}),H}let n,o=new tt;for(let s of this._def.checks)s.kind==="int"?se.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),B(n,{code:I.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Yk(t.data,s.value)!==0&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),B(n,{code:I.not_finite,message:s.message}),o.dirty()):se.assertNever(s);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,j.toString(r))}gt(t,r){return this.setLimit("min",t,!1,j.toString(r))}lte(t,r){return this.setLimit("max",t,!0,j.toString(r))}lt(t,r){return this.setLimit("max",t,!1,j.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:j.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:j.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:j.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&se.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Po.create=e=>new Po({checks:[],typeName:q.ZodNumber,coerce:e?.coerce||!1,...Y(e)});Ao=class e extends te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==M.bigint)return this._getInvalidInput(t);let n,o=new tt;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),B(n,{code:I.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):se.assertNever(s);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:M.bigint,received:r.parsedType}),H}gte(t,r){return this.setLimit("min",t,!0,j.toString(r))}gt(t,r){return this.setLimit("min",t,!1,j.toString(r))}lte(t,r){return this.setLimit("max",t,!0,j.toString(r))}lt(t,r){return this.setLimit("max",t,!1,j.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:j.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ao.create=e=>new Ao({checks:[],typeName:q.ZodBigInt,coerce:e?.coerce??!1,...Y(e)});To=class extends te{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==M.boolean){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.boolean,received:n.parsedType}),H}return ut(t.data)}};To.create=e=>new To({typeName:q.ZodBoolean,coerce:e?.coerce||!1,...Y(e)});Fo=class e extends te{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==M.date){let s=this._getOrReturnCtx(t);return B(s,{code:I.invalid_type,expected:M.date,received:s.parsedType}),H}if(Number.isNaN(t.data.getTime())){let s=this._getOrReturnCtx(t);return B(s,{code:I.invalid_date}),H}let n=new tt,o;for(let s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),B(o,{code:I.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),B(o,{code:I.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):se.assertNever(s);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:j.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:j.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Fo.create=e=>new Fo({checks:[],coerce:e?.coerce||!1,typeName:q.ZodDate,...Y(e)});Oi=class extends te{_parse(t){if(this._getType(t)!==M.symbol){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.symbol,received:n.parsedType}),H}return ut(t.data)}};Oi.create=e=>new Oi({typeName:q.ZodSymbol,...Y(e)});_o=class extends te{_parse(t){if(this._getType(t)!==M.undefined){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.undefined,received:n.parsedType}),H}return ut(t.data)}};_o.create=e=>new _o({typeName:q.ZodUndefined,...Y(e)});Ro=class extends te{_parse(t){if(this._getType(t)!==M.null){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.null,received:n.parsedType}),H}return ut(t.data)}};Ro.create=e=>new Ro({typeName:q.ZodNull,...Y(e)});Hn=class extends te{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}};Hn.create=e=>new Hn({typeName:q.ZodAny,...Y(e)});Dn=class extends te{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}};Dn.create=e=>new Dn({typeName:q.ZodUnknown,...Y(e)});br=class extends te{_parse(t){let r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:M.never,received:r.parsedType}),H}};br.create=e=>new br({typeName:q.ZodNever,...Y(e)});Bi=class extends te{_parse(t){if(this._getType(t)!==M.undefined){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.void,received:n.parsedType}),H}return ut(t.data)}};Bi.create=e=>new Bi({typeName:q.ZodVoid,...Y(e)});vn=class e extends te{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==M.array)return B(r,{code:I.invalid_type,expected:M.array,received:r.parsedType}),H;if(o.exactLength!==null){let i=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(i||a)&&(B(r,{code:i?I.too_big:I.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(B(r,{code:I.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(B(r,{code:I.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>o.type._parseAsync(new ir(r,i,r.path,a)))).then(i=>tt.mergeArray(n,i));let s=[...r.data].map((i,a)=>o.type._parseSync(new ir(r,i,r.path,a)));return tt.mergeArray(n,s)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:j.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:j.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:j.toString(r)}})}nonempty(t){return this.min(1,t)}};vn.create=(e,t)=>new vn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...Y(t)});_t=class e extends te{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=se.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==M.object){let c=this._getOrReturnCtx(t);return B(c,{code:I.invalid_type,expected:M.object,received:c.parsedType}),H}let{status:n,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof br&&this._def.unknownKeys==="strip"))for(let c in o.data)i.includes(c)||a.push(c);let u=[];for(let c of i){let l=s[c],d=o.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ir(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof br){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of a)u.push({key:{status:"valid",value:l},value:{status:"valid",value:o.data[l]}});else if(c==="strict")a.length>0&&(B(o,{code:I.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of a){let d=o.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ir(o,d,o.path,l)),alwaysSet:l in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let d=await l.key,p=await l.value;c.push({key:d,value:p,alwaysSet:l.alwaysSet})}return c}).then(c=>tt.mergeObjectSync(n,c)):tt.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return j.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:j.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:q.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of se.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of se.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Ni(this)}partial(t){let r={};for(let n of se.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of se.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof or;)s=s._def.innerType;r[n]=s}return new e({...this._def,shape:()=>r})}keyof(){return Cx(se.objectKeys(this.shape))}};_t.create=(e,t)=>new _t({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:q.ZodObject,...Y(t)});_t.strictCreate=(e,t)=>new _t({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:q.ZodObject,...Y(t)});_t.lazycreate=(e,t)=>new _t({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:q.ZodObject,...Y(t)});Io=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=s.map(a=>new Ft(a.ctx.common.issues));return B(r,{code:I.invalid_union,unionErrors:i}),H}if(r.common.async)return Promise.all(n.map(async s=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let s,i=[];for(let u of n){let c={...r,common:{...r.common,issues:[]},parent:null},l=u._parseSync({data:r.data,path:r.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(u=>new Ft(u));return B(r,{code:I.invalid_union,unionErrors:a}),H}}get options(){return this._def.options}};Io.create=(e,t)=>new Io({options:e,typeName:q.ZodUnion,...Y(t)});yn=e=>e instanceof $o?yn(e.schema):e instanceof sr?yn(e.innerType()):e instanceof No?[e.value]:e instanceof Oo?e.options:e instanceof Bo?se.objectValues(e.enum):e instanceof Mo?yn(e._def.innerType):e instanceof _o?[void 0]:e instanceof Ro?[null]:e instanceof or?[void 0,...yn(e.unwrap())]:e instanceof Qr?[null,...yn(e.unwrap())]:e instanceof Qs||e instanceof jo?yn(e.unwrap()):e instanceof Lo?yn(e._def.innerType):[],Xu=class e extends te{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==M.object)return B(r,{code:I.invalid_type,expected:M.object,received:r.parsedType}),H;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(B(r,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),H)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let s of r){let i=yn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new e({typeName:q.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...Y(n)})}};ko=class extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(s,i)=>{if(Qu(s)||Qu(i))return H;let a=Bp(s.value,i.value);return a.valid?((Zu(s)||Zu(i))&&r.dirty(),{status:r.value,value:a.data}):(B(n,{code:I.invalid_intersection_types}),H)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};ko.create=(e,t,r)=>new ko({left:e,right:t,typeName:q.ZodIntersection,...Y(r)});Yr=class e extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==M.array)return B(n,{code:I.invalid_type,expected:M.array,received:n.parsedType}),H;if(n.data.length<this._def.items.length)return B(n,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),H;!this._def.rest&&n.data.length>this._def.items.length&&(B(n,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((i,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new ir(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>tt.mergeArray(r,i)):tt.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:e,typeName:q.ZodTuple,rest:null,...Y(t)})};ec=class e extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==M.object)return B(n,{code:I.invalid_type,expected:M.object,received:n.parsedType}),H;let o=[],s=this._def.keyType,i=this._def.valueType;for(let a in n.data)o.push({key:s._parse(new ir(n,a,n.path,a)),value:i._parse(new ir(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?tt.mergeObjectAsync(r,o):tt.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof te?new e({keyType:t,valueType:r,typeName:q.ZodRecord,...Y(n)}):new e({keyType:Vn.create(),valueType:t,typeName:q.ZodRecord,...Y(r)})}},Mi=class extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==M.map)return B(n,{code:I.invalid_type,expected:M.map,received:n.parsedType}),H;let o=this._def.keyType,s=this._def.valueType,i=[...n.data.entries()].map(([a,u],c)=>({key:o._parse(new ir(n,a,n.path,[c,"key"])),value:s._parse(new ir(n,u,n.path,[c,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of i){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return H;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(c.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of i){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return H;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(c.value,l.value)}return{status:r.value,value:a}}}};Mi.create=(e,t,r)=>new Mi({valueType:t,keyType:e,typeName:q.ZodMap,...Y(r)});Li=class e extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==M.set)return B(n,{code:I.invalid_type,expected:M.set,received:n.parsedType}),H;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(B(n,{code:I.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(B(n,{code:I.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function i(u){let c=new Set;for(let l of u){if(l.status==="aborted")return H;l.status==="dirty"&&r.dirty(),c.add(l.value)}return{status:r.value,value:c}}let a=[...n.data.values()].map((u,c)=>s._parse(new ir(n,u,n.path,c)));return n.common.async?Promise.all(a).then(u=>i(u)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:j.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:j.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Li.create=(e,t)=>new Li({valueType:e,minSize:null,maxSize:null,typeName:q.ZodSet,...Y(t)});tc=class e extends te{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==M.function)return B(r,{code:I.invalid_type,expected:M.function,received:r.parsedType}),H;function n(a,u){return Ys({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ki(),hn].filter(c=>!!c),issueData:{code:I.invalid_arguments,argumentsError:u}})}function o(a,u){return Ys({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ki(),hn].filter(c=>!!c),issueData:{code:I.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof Gn){let a=this;return ut(async function(...u){let c=new Ft([]),l=await a._def.args.parseAsync(u,s).catch(h=>{throw c.addIssue(n(u,h)),c}),d=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{let a=this;return ut(function(...u){let c=a._def.args.safeParse(u,s);if(!c.success)throw new Ft([n(u,c.error)]);let l=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(l,s);if(!d.success)throw new Ft([o(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Yr.create(t).rest(Dn.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Yr.create([]).rest(Dn.create()),returns:r||Dn.create(),typeName:q.ZodFunction,...Y(n)})}},$o=class extends te{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};$o.create=(e,t)=>new $o({getter:e,typeName:q.ZodLazy,...Y(t)});No=class extends te{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return B(r,{received:r.data,code:I.invalid_literal,expected:this._def.value}),H}return{status:"valid",value:t.data}}get value(){return this._def.value}};No.create=(e,t)=>new No({value:e,typeName:q.ZodLiteral,...Y(t)});Oo=class e extends te{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return B(r,{expected:se.joinValues(n),received:r.parsedType,code:I.invalid_type}),H}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return B(r,{received:r.data,code:I.invalid_enum_value,options:n}),H}return ut(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Oo.create=Cx;Bo=class extends te{_parse(t){let r=se.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==M.string&&n.parsedType!==M.number){let o=se.objectValues(r);return B(n,{expected:se.joinValues(o),received:n.parsedType,code:I.invalid_type}),H}if(this._cache||(this._cache=new Set(se.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=se.objectValues(r);return B(n,{received:n.data,code:I.invalid_enum_value,options:o}),H}return ut(t.data)}get enum(){return this._def.values}};Bo.create=(e,t)=>new Bo({values:e,typeName:q.ZodNativeEnum,...Y(t)});Gn=class extends te{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==M.promise&&r.common.async===!1)return B(r,{code:I.invalid_type,expected:M.promise,received:r.parsedType}),H;let n=r.parsedType===M.promise?r.data:Promise.resolve(r.data);return ut(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Gn.create=(e,t)=>new Gn({type:e,typeName:q.ZodPromise,...Y(t)});sr=class extends te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{B(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let i=o.transform(n.data,s);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return H;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?H:u.status==="dirty"?Eo(u.value):r.value==="dirty"?Eo(u.value):u});{if(r.value==="aborted")return H;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?H:a.status==="dirty"?Eo(a.value):r.value==="dirty"?Eo(a.value):a}}if(o.type==="refinement"){let i=a=>{let u=o.refinement(a,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?H:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?H:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Un(i))return H;let a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Un(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:r.value,value:a})):H);se.assertNever(o)}};sr.create=(e,t,r)=>new sr({schema:e,typeName:q.ZodEffects,effect:t,...Y(r)});sr.createWithPreprocess=(e,t,r)=>new sr({schema:t,effect:{type:"preprocess",transform:e},typeName:q.ZodEffects,...Y(r)});or=class extends te{_parse(t){return this._getType(t)===M.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};or.create=(e,t)=>new or({innerType:e,typeName:q.ZodOptional,...Y(t)});Qr=class extends te{_parse(t){return this._getType(t)===M.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Qr.create=(e,t)=>new Qr({innerType:e,typeName:q.ZodNullable,...Y(t)});Mo=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===M.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Mo.create=(e,t)=>new Mo({innerType:e,typeName:q.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Y(t)});Lo=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return $i(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Lo.create=(e,t)=>new Lo({innerType:e,typeName:q.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Y(t)});ji=class extends te{_parse(t){if(this._getType(t)!==M.nan){let n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:M.nan,received:n.parsedType}),H}return{status:"valid",value:t.data}}};ji.create=e=>new ji({typeName:q.ZodNaN,...Y(e)});Qk=Symbol("zod_brand"),Qs=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Zs=class e extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?H:s.status==="dirty"?(r.dirty(),Eo(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?H:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:q.ZodPipeline})}},jo=class extends te{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Un(o)&&(o.value=Object.freeze(o.value)),o);return $i(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};jo.create=(e,t)=>new jo({innerType:e,typeName:q.ZodReadonly,...Y(t)});Zk={object:_t.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(q||(q={}));Xk=(e,t={message:`Input not instance of ${e.name}`})=>bx(r=>r instanceof e,t),xx=Vn.create,wx=Po.create,e$=ji.create,t$=Ao.create,Sx=To.create,r$=Fo.create,n$=Oi.create,o$=_o.create,i$=Ro.create,s$=Hn.create,a$=Dn.create,u$=br.create,c$=Bi.create,l$=vn.create,d$=_t.create,p$=_t.strictCreate,f$=Io.create,m$=Xu.create,g$=ko.create,h$=Yr.create,y$=ec.create,D$=Mi.create,v$=Li.create,C$=tc.create,b$=$o.create,x$=No.create,w$=Oo.create,S$=Bo.create,E$=Gn.create,P$=sr.create,A$=or.create,T$=Qr.create,F$=sr.createWithPreprocess,_$=Zs.create,R$=()=>xx().optional(),I$=()=>wx().optional(),k$=()=>Sx().optional(),$$={string:(e=>Vn.create({...e,coerce:!0})),number:(e=>Po.create({...e,coerce:!0})),boolean:(e=>To.create({...e,coerce:!0})),bigint:(e=>Ao.create({...e,coerce:!0})),date:(e=>Fo.create({...e,coerce:!0}))},N$=H});var f={};gP(f,{BRAND:()=>Qk,DIRTY:()=>Eo,EMPTY_PATH:()=>Fk,INVALID:()=>H,NEVER:()=>N$,OK:()=>ut,ParseStatus:()=>tt,Schema:()=>te,ZodAny:()=>Hn,ZodArray:()=>vn,ZodBigInt:()=>Ao,ZodBoolean:()=>To,ZodBranded:()=>Qs,ZodCatch:()=>Lo,ZodDate:()=>Fo,ZodDefault:()=>Mo,ZodDiscriminatedUnion:()=>Xu,ZodEffects:()=>sr,ZodEnum:()=>Oo,ZodError:()=>Ft,ZodFirstPartyTypeKind:()=>q,ZodFunction:()=>tc,ZodIntersection:()=>ko,ZodIssueCode:()=>I,ZodLazy:()=>$o,ZodLiteral:()=>No,ZodMap:()=>Mi,ZodNaN:()=>ji,ZodNativeEnum:()=>Bo,ZodNever:()=>br,ZodNull:()=>Ro,ZodNullable:()=>Qr,ZodNumber:()=>Po,ZodObject:()=>_t,ZodOptional:()=>or,ZodParsedType:()=>M,ZodPipeline:()=>Zs,ZodPromise:()=>Gn,ZodReadonly:()=>jo,ZodRecord:()=>ec,ZodSchema:()=>te,ZodSet:()=>Li,ZodString:()=>Vn,ZodSymbol:()=>Oi,ZodTransformer:()=>sr,ZodTuple:()=>Yr,ZodType:()=>te,ZodUndefined:()=>_o,ZodUnion:()=>Io,ZodUnknown:()=>Dn,ZodVoid:()=>Bi,addIssueToContext:()=>B,any:()=>s$,array:()=>l$,bigint:()=>t$,boolean:()=>Sx,coerce:()=>$$,custom:()=>bx,date:()=>r$,datetimeRegex:()=>vx,defaultErrorMap:()=>hn,discriminatedUnion:()=>m$,effect:()=>P$,enum:()=>w$,function:()=>C$,getErrorMap:()=>ki,getParsedType:()=>Jr,instanceof:()=>Xk,intersection:()=>g$,isAborted:()=>Qu,isAsync:()=>$i,isDirty:()=>Zu,isValid:()=>Un,late:()=>Zk,lazy:()=>b$,literal:()=>x$,makeIssue:()=>Ys,map:()=>D$,nan:()=>e$,nativeEnum:()=>S$,never:()=>u$,null:()=>i$,nullable:()=>T$,number:()=>wx,object:()=>d$,objectUtil:()=>kp,oboolean:()=>k$,onumber:()=>I$,optional:()=>A$,ostring:()=>R$,pipeline:()=>_$,preprocess:()=>F$,promise:()=>E$,quotelessJson:()=>Pk,record:()=>y$,set:()=>v$,setErrorMap:()=>Tk,strictObject:()=>p$,string:()=>xx,symbol:()=>n$,transformer:()=>P$,tuple:()=>h$,undefined:()=>o$,union:()=>f$,unknown:()=>a$,util:()=>se,void:()=>c$});var Mp=v(()=>{Yu();Np();fx();Js();Ex();Ju()});var Px=v(()=>{Mp();Mp()});var nc,Ax,Tx,O$,ar,Rt,Xs,Zr,ur,oc,B$,M$,L$,rc,j$,U$,Lp,jp,V$,ea,ta,Fx,H$,G$,z$,_x,q$,Up,K$,Vp,ic,sc,Rx,Ix,Hp,kx,$x,W$,J$,Nx,Y$,Ox,Q$,Bx,Z$,X$,eN,tN,rN,nN,oN,Mx,iN,Gp,zp,qp,sN,aN,Lx,uN,jx,cN,lN,dN,pN,Ux,Kp,IW,fN,mN,Vx,gN,hN,yN,DN,vN,CN,bN,xN,wN,SN,EN,PN,AN,TN,FN,_N,RN,Hx,IN,kN,$N,NN,kW,$W,NW,OW,BW,MW,ac=v(()=>{Px();nc="2.0",Ax=f.union([f.string(),f.number().int()]),Tx=f.string(),O$=f.object({progressToken:f.optional(Ax)}).passthrough(),ar=f.object({_meta:f.optional(O$)}).passthrough(),Rt=f.object({method:f.string(),params:f.optional(ar)}),Xs=f.object({_meta:f.optional(f.object({}).passthrough())}).passthrough(),Zr=f.object({method:f.string(),params:f.optional(Xs)}),ur=f.object({_meta:f.optional(f.object({}).passthrough())}).passthrough(),oc=f.union([f.string(),f.number().int()]),B$=f.object({jsonrpc:f.literal(nc),id:oc}).merge(Rt).strict(),M$=f.object({jsonrpc:f.literal(nc)}).merge(Zr).strict(),L$=f.object({jsonrpc:f.literal(nc),id:oc,result:ur}).strict();(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(rc||(rc={}));j$=f.object({jsonrpc:f.literal(nc),id:oc,error:f.object({code:f.number().int(),message:f.string(),data:f.optional(f.unknown())})}).strict(),U$=f.union([B$,M$,L$,j$]),Lp=ur.strict(),jp=Zr.extend({method:f.literal("notifications/cancelled"),params:Xs.extend({requestId:oc,reason:f.string().optional()})}),V$=f.object({src:f.string(),mimeType:f.optional(f.string()),sizes:f.optional(f.array(f.string()))}).passthrough(),ea=f.object({icons:f.array(V$).optional()}).passthrough(),ta=f.object({name:f.string(),title:f.optional(f.string())}).passthrough(),Fx=ta.extend({version:f.string(),websiteUrl:f.optional(f.string())}).merge(ea),H$=f.object({experimental:f.optional(f.object({}).passthrough()),sampling:f.optional(f.object({}).passthrough()),elicitation:f.optional(f.object({}).passthrough()),roots:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough())}).passthrough(),G$=Rt.extend({method:f.literal("initialize"),params:ar.extend({protocolVersion:f.string(),capabilities:H$,clientInfo:Fx})}),z$=f.object({experimental:f.optional(f.object({}).passthrough()),logging:f.optional(f.object({}).passthrough()),completions:f.optional(f.object({}).passthrough()),prompts:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough()),resources:f.optional(f.object({subscribe:f.optional(f.boolean()),listChanged:f.optional(f.boolean())}).passthrough()),tools:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough())}).passthrough(),_x=ur.extend({protocolVersion:f.string(),capabilities:z$,serverInfo:Fx,instructions:f.optional(f.string())}),q$=Zr.extend({method:f.literal("notifications/initialized")}),Up=Rt.extend({method:f.literal("ping")}),K$=f.object({progress:f.number(),total:f.optional(f.number()),message:f.optional(f.string())}).passthrough(),Vp=Zr.extend({method:f.literal("notifications/progress"),params:Xs.merge(K$).extend({progressToken:Ax})}),ic=Rt.extend({params:ar.extend({cursor:f.optional(Tx)}).optional()}),sc=ur.extend({nextCursor:f.optional(Tx)}),Rx=f.object({uri:f.string(),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).passthrough(),Ix=Rx.extend({text:f.string()}),Hp=f.string().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),kx=Rx.extend({blob:Hp}),$x=ta.extend({uri:f.string(),description:f.optional(f.string()),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).merge(ea),W$=ta.extend({uriTemplate:f.string(),description:f.optional(f.string()),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).merge(ea),J$=ic.extend({method:f.literal("resources/list")}),Nx=sc.extend({resources:f.array($x)}),Y$=ic.extend({method:f.literal("resources/templates/list")}),Ox=sc.extend({resourceTemplates:f.array(W$)}),Q$=Rt.extend({method:f.literal("resources/read"),params:ar.extend({uri:f.string()})}),Bx=ur.extend({contents:f.array(f.union([Ix,kx]))}),Z$=Zr.extend({method:f.literal("notifications/resources/list_changed")}),X$=Rt.extend({method:f.literal("resources/subscribe"),params:ar.extend({uri:f.string()})}),eN=Rt.extend({method:f.literal("resources/unsubscribe"),params:ar.extend({uri:f.string()})}),tN=Zr.extend({method:f.literal("notifications/resources/updated"),params:Xs.extend({uri:f.string()})}),rN=f.object({name:f.string(),description:f.optional(f.string()),required:f.optional(f.boolean())}).passthrough(),nN=ta.extend({description:f.optional(f.string()),arguments:f.optional(f.array(rN)),_meta:f.optional(f.object({}).passthrough())}).merge(ea),oN=ic.extend({method:f.literal("prompts/list")}),Mx=sc.extend({prompts:f.array(nN)}),iN=Rt.extend({method:f.literal("prompts/get"),params:ar.extend({name:f.string(),arguments:f.optional(f.record(f.string()))})}),Gp=f.object({type:f.literal("text"),text:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),zp=f.object({type:f.literal("image"),data:Hp,mimeType:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),qp=f.object({type:f.literal("audio"),data:Hp,mimeType:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),sN=f.object({type:f.literal("resource"),resource:f.union([Ix,kx]),_meta:f.optional(f.object({}).passthrough())}).passthrough(),aN=$x.extend({type:f.literal("resource_link")}),Lx=f.union([Gp,zp,qp,aN,sN]),uN=f.object({role:f.enum(["user","assistant"]),content:Lx}).passthrough(),jx=ur.extend({description:f.optional(f.string()),messages:f.array(uN)}),cN=Zr.extend({method:f.literal("notifications/prompts/list_changed")}),lN=f.object({title:f.optional(f.string()),readOnlyHint:f.optional(f.boolean()),destructiveHint:f.optional(f.boolean()),idempotentHint:f.optional(f.boolean()),openWorldHint:f.optional(f.boolean())}).passthrough(),dN=ta.extend({description:f.optional(f.string()),inputSchema:f.object({type:f.literal("object"),properties:f.optional(f.object({}).passthrough()),required:f.optional(f.array(f.string()))}).passthrough(),outputSchema:f.optional(f.object({type:f.literal("object"),properties:f.optional(f.object({}).passthrough()),required:f.optional(f.array(f.string()))}).passthrough()),annotations:f.optional(lN),_meta:f.optional(f.object({}).passthrough())}).merge(ea),pN=ic.extend({method:f.literal("tools/list")}),Ux=sc.extend({tools:f.array(dN)}),Kp=ur.extend({content:f.array(Lx).default([]),structuredContent:f.object({}).passthrough().optional(),isError:f.optional(f.boolean())}),IW=Kp.or(ur.extend({toolResult:f.unknown()})),fN=Rt.extend({method:f.literal("tools/call"),params:ar.extend({name:f.string(),arguments:f.optional(f.record(f.unknown()))})}),mN=Zr.extend({method:f.literal("notifications/tools/list_changed")}),Vx=f.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),gN=Rt.extend({method:f.literal("logging/setLevel"),params:ar.extend({level:Vx})}),hN=Zr.extend({method:f.literal("notifications/message"),params:Xs.extend({level:Vx,logger:f.optional(f.string()),data:f.unknown()})}),yN=f.object({name:f.string().optional()}).passthrough(),DN=f.object({hints:f.optional(f.array(yN)),costPriority:f.optional(f.number().min(0).max(1)),speedPriority:f.optional(f.number().min(0).max(1)),intelligencePriority:f.optional(f.number().min(0).max(1))}).passthrough(),vN=f.object({role:f.enum(["user","assistant"]),content:f.union([Gp,zp,qp])}).passthrough(),CN=Rt.extend({method:f.literal("sampling/createMessage"),params:ar.extend({messages:f.array(vN),systemPrompt:f.optional(f.string()),includeContext:f.optional(f.enum(["none","thisServer","allServers"])),temperature:f.optional(f.number()),maxTokens:f.number().int(),stopSequences:f.optional(f.array(f.string())),metadata:f.optional(f.object({}).passthrough()),modelPreferences:f.optional(DN)})}),bN=ur.extend({model:f.string(),stopReason:f.optional(f.enum(["endTurn","stopSequence","maxTokens"]).or(f.string())),role:f.enum(["user","assistant"]),content:f.discriminatedUnion("type",[Gp,zp,qp])}),xN=f.object({type:f.literal("boolean"),title:f.optional(f.string()),description:f.optional(f.string()),default:f.optional(f.boolean())}).passthrough(),wN=f.object({type:f.literal("string"),title:f.optional(f.string()),description:f.optional(f.string()),minLength:f.optional(f.number()),maxLength:f.optional(f.number()),format:f.optional(f.enum(["email","uri","date","date-time"]))}).passthrough(),SN=f.object({type:f.enum(["number","integer"]),title:f.optional(f.string()),description:f.optional(f.string()),minimum:f.optional(f.number()),maximum:f.optional(f.number())}).passthrough(),EN=f.object({type:f.literal("string"),title:f.optional(f.string()),description:f.optional(f.string()),enum:f.array(f.string()),enumNames:f.optional(f.array(f.string()))}).passthrough(),PN=f.union([xN,wN,SN,EN]),AN=Rt.extend({method:f.literal("elicitation/create"),params:ar.extend({message:f.string(),requestedSchema:f.object({type:f.literal("object"),properties:f.record(f.string(),PN),required:f.optional(f.array(f.string()))}).passthrough()})}),TN=ur.extend({action:f.enum(["accept","decline","cancel"]),content:f.optional(f.record(f.string(),f.unknown()))}),FN=f.object({type:f.literal("ref/resource"),uri:f.string()}).passthrough(),_N=f.object({type:f.literal("ref/prompt"),name:f.string()}).passthrough(),RN=Rt.extend({method:f.literal("completion/complete"),params:ar.extend({ref:f.union([_N,FN]),argument:f.object({name:f.string(),value:f.string()}).passthrough(),context:f.optional(f.object({arguments:f.optional(f.record(f.string(),f.string()))}))})}),Hx=ur.extend({completion:f.object({values:f.array(f.string()).max(100),total:f.optional(f.number().int()),hasMore:f.optional(f.boolean())}).passthrough()}),IN=f.object({uri:f.string().startsWith("file://"),name:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).passthrough(),kN=Rt.extend({method:f.literal("roots/list")}),$N=ur.extend({roots:f.array(IN)}),NN=Zr.extend({method:f.literal("notifications/roots/list_changed")}),kW=f.union([Up,G$,RN,gN,iN,oN,J$,Y$,Q$,X$,eN,fN,pN]),$W=f.union([jp,Vp,q$,NN]),NW=f.union([Lp,bN,TN,$N]),OW=f.union([Up,CN,AN,kN]),BW=f.union([jp,Vp,hN,tN,Z$,mN,cN]),MW=f.union([Lp,_x,Hx,jx,Mx,Nx,Ox,Bx,Kp,Ux])});var Gx=v(()=>{ac()});var oa=E(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.regexpCode=he.getEsmExportName=he.getProperty=he.safeStringify=he.stringify=he.strConcat=he.addCodeArg=he.str=he._=he.nil=he._Code=he.Name=he.IDENTIFIER=he._CodeOrName=void 0;var ra=class{};he._CodeOrName=ra;he.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Uo=class extends ra{constructor(t){if(super(),!he.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};he.Name=Uo;var cr=class extends ra{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Uo&&(r[n.str]=(r[n.str]||0)+1),r),{})}};he._Code=cr;he.nil=new cr("");function zx(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Jp(r,t[n]),r.push(e[++n]);return new cr(r)}he._=zx;var Wp=new cr("+");function qx(e,...t){let r=[na(e[0])],n=0;for(;n<t.length;)r.push(Wp),Jp(r,t[n]),r.push(Wp,na(e[++n]));return BN(r),new cr(r)}he.str=qx;function Jp(e,t){t instanceof cr?e.push(...t._items):t instanceof Uo?e.push(t):e.push(jN(t))}he.addCodeArg=Jp;function BN(e){let t=1;for(;t<e.length-1;){if(e[t]===Wp){let r=MN(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function MN(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Uo||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Uo))return`"${e}${t.slice(1)}`}function LN(e,t){return t.emptyStr()?e:e.emptyStr()?t:qx`${e}${t}`}he.strConcat=LN;function jN(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:na(Array.isArray(e)?e.join(","):e)}function UN(e){return new cr(na(e))}he.stringify=UN;function na(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}he.safeStringify=na;function VN(e){return typeof e=="string"&&he.IDENTIFIER.test(e)?new cr(`.${e}`):zx`[${e}]`}he.getProperty=VN;function HN(e){if(typeof e=="string"&&he.IDENTIFIER.test(e))return new cr(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}he.getEsmExportName=HN;function GN(e){return new cr(e.toString())}he.regexpCode=GN});var Zp=E(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.ValueScope=kt.ValueScopeName=kt.Scope=kt.varKinds=kt.UsedValueState=void 0;var It=oa(),Yp=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},uc;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(uc||(kt.UsedValueState=uc={}));kt.varKinds={const:new It.Name("const"),let:new It.Name("let"),var:new It.Name("var")};var cc=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof It.Name?t:this.name(t)}name(t){return new It.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};kt.Scope=cc;var lc=class extends It.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,It._)`.${new It.Name(r)}[${n}]`}};kt.ValueScopeName=lc;var zN=(0,It._)`\n`,Qp=class extends cc{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?zN:It.nil}}get(){return this._scope}name(t){return new lc(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:s}=o,i=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let l=a.get(i);if(l)return l}else a=this._values[s]=new Map;a.set(i,o);let u=this._scope[s]||(this._scope[s]=[]),c=u.length;return u[c]=r.ref,o.setValue(r,{property:s,itemIndex:c}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,It._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let s=It.nil;for(let i in t){let a=t[i];if(!a)continue;let u=n[i]=n[i]||new Map;a.forEach(c=>{if(u.has(c))return;u.set(c,uc.Started);let l=r(c);if(l){let d=this.opts.es5?kt.varKinds.var:kt.varKinds.const;s=(0,It._)`${s}${d} ${c} = ${l};${this.opts._n}`}else if(l=o?.(c))s=(0,It._)`${s}${l}${this.opts._n}`;else throw new Yp(c);u.set(c,uc.Completed)})}return s}};kt.ValueScope=Qp});var re=E(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var ce=oa(),xr=Zp(),zn=oa();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return zn._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return zn.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return zn.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return zn.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return zn.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return zn.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return zn.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return zn.Name}});var mc=Zp();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return mc.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return mc.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return mc.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return mc.varKinds}});ne.operators={GT:new ce._Code(">"),GTE:new ce._Code(">="),LT:new ce._Code("<"),LTE:new ce._Code("<="),EQ:new ce._Code("==="),NEQ:new ce._Code("!=="),NOT:new ce._Code("!"),OR:new ce._Code("||"),AND:new ce._Code("&&"),ADD:new ce._Code("+")};var Cn=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Xp=class extends Cn{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?xr.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Vi(this.rhs,t,r)),this}get names(){return this.rhs instanceof ce._CodeOrName?this.rhs.names:{}}},dc=class extends Cn{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ce.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Vi(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ce.Name?{}:{...this.lhs.names};return fc(t,this.rhs)}},ef=class extends dc{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},tf=class extends Cn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},rf=class extends Cn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},nf=class extends Cn{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},of=class extends Cn{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Vi(this.code,t,r),this}get names(){return this.code instanceof ce._CodeOrName?this.code.names:{}}},ia=class extends Cn{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let s=n[o];s.optimizeNames(t,r)||(qN(t,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Go(t,r.names),{})}},bn=class extends ia{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},sf=class extends ia{},Ui=class extends bn{};Ui.kind="else";var Vo=class e extends bn{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Ui(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(Kx(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Vi(this.condition,t,r),this}get names(){let t=super.names;return fc(t,this.condition),this.else&&Go(t,this.else.names),t}};Vo.kind="if";var Ho=class extends bn{};Ho.kind="for";var af=class extends Ho{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Vi(this.iteration,t,r),this}get names(){return Go(super.names,this.iteration.names)}},uf=class extends Ho{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?xr.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${r} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=fc(super.names,this.from);return fc(t,this.to)}},pc=class extends Ho{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Vi(this.iterable,t,r),this}get names(){return Go(super.names,this.iterable.names)}},sa=class extends bn{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};sa.kind="func";var aa=class extends ia{render(t){return"return "+super.render(t)}};aa.kind="return";var cf=class extends bn{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Go(t,this.catch.names),this.finally&&Go(t,this.finally.names),t}},ua=class extends bn{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};ua.kind="catch";var ca=class extends bn{render(t){return"finally"+super.render(t)}};ca.kind="finally";var lf=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
1495
|
+
`:""},this._extScope=t,this._scope=new xr.Scope({parent:t}),this._nodes=[new sf]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let s=this._scope.toName(r);return n!==void 0&&o&&(this._constants[s.str]=n),this._leafNode(new Xp(t,s,n)),s}const(t,r,n){return this._def(xr.varKinds.const,t,r,n)}let(t,r,n){return this._def(xr.varKinds.let,t,r,n)}var(t,r,n){return this._def(xr.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new dc(t,r,n))}add(t,r){return this._leafNode(new ef(t,ne.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ce.nil&&this._leafNode(new of(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ce.addCodeArg)(r,o));return r.push("}"),new ce._Code(r)}if(t,r,n){if(this._blockNode(new Vo(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Vo(t))}else(){return this._elseNode(new Ui)}endIf(){return this._endBlockNode(Vo,Ui)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new af(t),r)}forRange(t,r,n,o,s=this.opts.es5?xr.varKinds.var:xr.varKinds.let){let i=this._scope.toName(t);return this._for(new uf(s,i,r,n),()=>o(i))}forOf(t,r,n,o=xr.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let i=r instanceof ce.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ce._)`${i}.length`,a=>{this.var(s,(0,ce._)`${i}[${a}]`),n(s)})}return this._for(new pc("of",o,s,r),()=>n(s))}forIn(t,r,n,o=this.opts.es5?xr.varKinds.var:xr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ce._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new pc("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(Ho)}label(t){return this._leafNode(new tf(t))}break(t){return this._leafNode(new rf(t))}return(t){let r=new aa;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(aa)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new cf;if(this._blockNode(o),this.code(t),r){let s=this.name("e");this._currNode=o.catch=new ua(s),r(s)}return n&&(this._currNode=o.finally=new ca,this.code(n)),this._endBlockNode(ua,ca)}throw(t){return this._leafNode(new nf(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ce.nil,n,o){return this._blockNode(new sa(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(sa)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Vo))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};ne.CodeGen=lf;function Go(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function fc(e,t){return t instanceof ce._CodeOrName?Go(e,t.names):e}function Vi(e,t,r){if(e instanceof ce.Name)return n(e);if(!o(e))return e;return new ce._Code(e._items.reduce((s,i)=>(i instanceof ce.Name&&(i=n(i)),i instanceof ce._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||t[s.str]!==1?s:(delete t[s.str],i)}function o(s){return s instanceof ce._Code&&s._items.some(i=>i instanceof ce.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function qN(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Kx(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ce._)`!${df(e)}`}ne.not=Kx;var KN=Wx(ne.operators.AND);function WN(...e){return e.reduce(KN)}ne.and=WN;var JN=Wx(ne.operators.OR);function YN(...e){return e.reduce(JN)}ne.or=YN;function Wx(e){return(t,r)=>t===ce.nil?r:r===ce.nil?t:(0,ce._)`${df(t)} ${e} ${df(r)}`}function df(e){return e instanceof ce.Name?e:(0,ce._)`(${e})`}});var ye=E(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.checkStrictMode=ie.getErrorPath=ie.Type=ie.useFunc=ie.setEvaluated=ie.evaluatedPropsToName=ie.mergeEvaluated=ie.eachItem=ie.unescapeJsonPointer=ie.escapeJsonPointer=ie.escapeFragment=ie.unescapeFragment=ie.schemaRefOrVal=ie.schemaHasRulesButRef=ie.schemaHasRules=ie.checkUnknownRules=ie.alwaysValidSchema=ie.toHash=void 0;var Se=re(),QN=oa();function ZN(e){let t={};for(let r of e)t[r]=!0;return t}ie.toHash=ZN;function XN(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Qx(e,t),!Zx(t,e.self.RULES.all))}ie.alwaysValidSchema=XN;function Qx(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let s in t)o[s]||t0(e,`unknown keyword: "${s}"`)}ie.checkUnknownRules=Qx;function Zx(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ie.schemaHasRules=Zx;function e2(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ie.schemaHasRulesButRef=e2;function t2({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Se._)`${r}`}return(0,Se._)`${e}${t}${(0,Se.getProperty)(n)}`}ie.schemaRefOrVal=t2;function r2(e){return Xx(decodeURIComponent(e))}ie.unescapeFragment=r2;function n2(e){return encodeURIComponent(ff(e))}ie.escapeFragment=n2;function ff(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ie.escapeJsonPointer=ff;function Xx(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ie.unescapeJsonPointer=Xx;function o2(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ie.eachItem=o2;function Jx({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let u=i===void 0?s:i instanceof Se.Name?(s instanceof Se.Name?e(o,s,i):t(o,s,i),i):s instanceof Se.Name?(t(o,i,s),s):r(s,i);return a===Se.Name&&!(u instanceof Se.Name)?n(o,u):u}}ie.mergeEvaluated={props:Jx({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Se._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Se._)`${r} || {}`).code((0,Se._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Se._)`${r} || {}`),mf(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:e0}),items:Jx({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Se._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Se._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function e0(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Se._)`{}`);return t!==void 0&&mf(e,r,t),r}ie.evaluatedPropsToName=e0;function mf(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Se._)`${t}${(0,Se.getProperty)(n)}`,!0))}ie.setEvaluated=mf;var Yx={};function i2(e,t){return e.scopeValue("func",{ref:t,code:Yx[t.code]||(Yx[t.code]=new QN._Code(t.code))})}ie.useFunc=i2;var pf;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(pf||(ie.Type=pf={}));function s2(e,t,r){if(e instanceof Se.Name){let n=t===pf.Num;return r?n?(0,Se._)`"[" + ${e} + "]"`:(0,Se._)`"['" + ${e} + "']"`:n?(0,Se._)`"/" + ${e}`:(0,Se._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Se.getProperty)(e).toString():"/"+ff(e)}ie.getErrorPath=s2;function t0(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ie.checkStrictMode=t0});var xn=E(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var ct=re(),a2={data:new ct.Name("data"),valCxt:new ct.Name("valCxt"),instancePath:new ct.Name("instancePath"),parentData:new ct.Name("parentData"),parentDataProperty:new ct.Name("parentDataProperty"),rootData:new ct.Name("rootData"),dynamicAnchors:new ct.Name("dynamicAnchors"),vErrors:new ct.Name("vErrors"),errors:new ct.Name("errors"),this:new ct.Name("this"),self:new ct.Name("self"),scope:new ct.Name("scope"),json:new ct.Name("json"),jsonPos:new ct.Name("jsonPos"),jsonLen:new ct.Name("jsonLen"),jsonPart:new ct.Name("jsonPart")};gf.default=a2});var la=E(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.extendErrors=lt.resetErrorsCount=lt.reportExtraError=lt.reportError=lt.keyword$DataError=lt.keywordError=void 0;var fe=re(),gc=ye(),vt=xn();lt.keywordError={message:({keyword:e})=>(0,fe.str)`must pass "${e}" keyword validation`};lt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,fe.str)`"${e}" keyword must be ${t} ($data)`:(0,fe.str)`"${e}" keyword is invalid ($data)`};function u2(e,t=lt.keywordError,r,n){let{it:o}=e,{gen:s,compositeRule:i,allErrors:a}=o,u=o0(e,t,r);n??(i||a)?r0(s,u):n0(o,(0,fe._)`[${u}]`)}lt.reportError=u2;function c2(e,t=lt.keywordError,r){let{it:n}=e,{gen:o,compositeRule:s,allErrors:i}=n,a=o0(e,t,r);r0(o,a),s||i||n0(n,vt.default.vErrors)}lt.reportExtraError=c2;function l2(e,t){e.assign(vt.default.errors,t),e.if((0,fe._)`${vt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,fe._)`${vt.default.vErrors}.length`,t),()=>e.assign(vt.default.vErrors,null)))}lt.resetErrorsCount=l2;function d2({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw new Error("ajv implementation error");let i=e.name("err");e.forRange("i",o,vt.default.errors,a=>{e.const(i,(0,fe._)`${vt.default.vErrors}[${a}]`),e.if((0,fe._)`${i}.instancePath === undefined`,()=>e.assign((0,fe._)`${i}.instancePath`,(0,fe.strConcat)(vt.default.instancePath,s.errorPath))),e.assign((0,fe._)`${i}.schemaPath`,(0,fe.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,fe._)`${i}.schema`,r),e.assign((0,fe._)`${i}.data`,n))})}lt.extendErrors=d2;function r0(e,t){let r=e.const("err",t);e.if((0,fe._)`${vt.default.vErrors} === null`,()=>e.assign(vt.default.vErrors,(0,fe._)`[${r}]`),(0,fe._)`${vt.default.vErrors}.push(${r})`),e.code((0,fe._)`${vt.default.errors}++`)}function n0(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,fe._)`new ${e.ValidationError}(${t})`):(r.assign((0,fe._)`${n}.errors`,t),r.return(!1))}var zo={keyword:new fe.Name("keyword"),schemaPath:new fe.Name("schemaPath"),params:new fe.Name("params"),propertyName:new fe.Name("propertyName"),message:new fe.Name("message"),schema:new fe.Name("schema"),parentSchema:new fe.Name("parentSchema")};function o0(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,fe._)`{}`:p2(e,t,r)}function p2(e,t,r={}){let{gen:n,it:o}=e,s=[f2(o,r),m2(e,r)];return g2(e,t,s),n.object(...s)}function f2({errorPath:e},{instancePath:t}){let r=t?(0,fe.str)`${e}${(0,gc.getErrorPath)(t,gc.Type.Str)}`:e;return[vt.default.instancePath,(0,fe.strConcat)(vt.default.instancePath,r)]}function m2({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,fe.str)`${t}/${e}`;return r&&(o=(0,fe.str)`${o}${(0,gc.getErrorPath)(r,gc.Type.Str)}`),[zo.schemaPath,o]}function g2(e,{params:t,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=e,{opts:u,propertyName:c,topSchemaRef:l,schemaPath:d}=a;n.push([zo.keyword,o],[zo.params,typeof t=="function"?t(e):t||(0,fe._)`{}`]),u.messages&&n.push([zo.message,typeof r=="function"?r(e):r]),u.verbose&&n.push([zo.schema,i],[zo.parentSchema,(0,fe._)`${l}${d}`],[vt.default.data,s]),c&&n.push([zo.propertyName,c])}});var s0=E(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.boolOrEmptySchema=Hi.topBoolOrEmptySchema=void 0;var h2=la(),y2=re(),D2=xn(),v2={message:"boolean schema is false"};function C2(e){let{gen:t,schema:r,validateName:n}=e;r===!1?i0(e,!1):typeof r=="object"&&r.$async===!0?t.return(D2.default.data):(t.assign((0,y2._)`${n}.errors`,null),t.return(!0))}Hi.topBoolOrEmptySchema=C2;function b2(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),i0(e)):r.var(t,!0)}Hi.boolOrEmptySchema=b2;function i0(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,h2.reportError)(o,v2,void 0,t)}});var hf=E(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.getRules=Gi.isJSONType=void 0;var x2=["string","number","integer","boolean","null","object","array"],w2=new Set(x2);function S2(e){return typeof e=="string"&&w2.has(e)}Gi.isJSONType=S2;function E2(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Gi.getRules=E2});var yf=E(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.shouldUseRule=qn.shouldUseGroup=qn.schemaHasRulesForType=void 0;function P2({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&a0(e,n)}qn.schemaHasRulesForType=P2;function a0(e,t){return t.rules.some(r=>u0(e,r))}qn.shouldUseGroup=a0;function u0(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}qn.shouldUseRule=u0});var da=E(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.reportTypeError=dt.checkDataTypes=dt.checkDataType=dt.coerceAndCheckDataType=dt.getJSONTypes=dt.getSchemaTypes=dt.DataType=void 0;var A2=hf(),T2=yf(),F2=la(),Z=re(),c0=ye(),zi;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(zi||(dt.DataType=zi={}));function _2(e){let t=l0(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}dt.getSchemaTypes=_2;function l0(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(A2.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}dt.getJSONTypes=l0;function R2(e,t){let{gen:r,data:n,opts:o}=e,s=I2(t,o.coerceTypes),i=t.length>0&&!(s.length===0&&t.length===1&&(0,T2.schemaHasRulesForType)(e,t[0]));if(i){let a=vf(t,n,o.strictNumbers,zi.Wrong);r.if(a,()=>{s.length?k2(e,t,s):Cf(e)})}return i}dt.coerceAndCheckDataType=R2;var d0=new Set(["string","number","integer","boolean","null"]);function I2(e,t){return t?e.filter(r=>d0.has(r)||t==="array"&&r==="array"):[]}function k2(e,t,r){let{gen:n,data:o,opts:s}=e,i=n.let("dataType",(0,Z._)`typeof ${o}`),a=n.let("coerced",(0,Z._)`undefined`);s.coerceTypes==="array"&&n.if((0,Z._)`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,Z._)`${o}[0]`).assign(i,(0,Z._)`typeof ${o}`).if(vf(t,o,s.strictNumbers),()=>n.assign(a,o))),n.if((0,Z._)`${a} !== undefined`);for(let c of r)(d0.has(c)||c==="array"&&s.coerceTypes==="array")&&u(c);n.else(),Cf(e),n.endIf(),n.if((0,Z._)`${a} !== undefined`,()=>{n.assign(o,a),$2(e,a)});function u(c){switch(c){case"string":n.elseIf((0,Z._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,Z._)`"" + ${o}`).elseIf((0,Z._)`${o} === null`).assign(a,(0,Z._)`""`);return;case"number":n.elseIf((0,Z._)`${i} == "boolean" || ${o} === null
|
|
1496
|
+
|| (${i} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,Z._)`+${o}`);return;case"integer":n.elseIf((0,Z._)`${i} === "boolean" || ${o} === null
|
|
1497
|
+
|| (${i} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,Z._)`+${o}`);return;case"boolean":n.elseIf((0,Z._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,Z._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf((0,Z._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf((0,Z._)`${i} === "string" || ${i} === "number"
|
|
1498
|
+
|| ${i} === "boolean" || ${o} === null`).assign(a,(0,Z._)`[${o}]`)}}}function $2({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Z._)`${t} !== undefined`,()=>e.assign((0,Z._)`${t}[${r}]`,n))}function Df(e,t,r,n=zi.Correct){let o=n===zi.Correct?Z.operators.EQ:Z.operators.NEQ,s;switch(e){case"null":return(0,Z._)`${t} ${o} null`;case"array":s=(0,Z._)`Array.isArray(${t})`;break;case"object":s=(0,Z._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=i((0,Z._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=i();break;default:return(0,Z._)`typeof ${t} ${o} ${e}`}return n===zi.Correct?s:(0,Z.not)(s);function i(a=Z.nil){return(0,Z.and)((0,Z._)`typeof ${t} == "number"`,a,r?(0,Z._)`isFinite(${t})`:Z.nil)}}dt.checkDataType=Df;function vf(e,t,r,n){if(e.length===1)return Df(e[0],t,r,n);let o,s=(0,c0.toHash)(e);if(s.array&&s.object){let i=(0,Z._)`typeof ${t} != "object"`;o=s.null?i:(0,Z._)`!${t} || ${i}`,delete s.null,delete s.array,delete s.object}else o=Z.nil;s.number&&delete s.integer;for(let i in s)o=(0,Z.and)(o,Df(i,t,r,n));return o}dt.checkDataTypes=vf;var N2={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Z._)`{type: ${e}}`:(0,Z._)`{type: ${t}}`};function Cf(e){let t=O2(e);(0,F2.reportError)(t,N2)}dt.reportTypeError=Cf;function O2(e){let{gen:t,data:r,schema:n}=e,o=(0,c0.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var f0=E(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.assignDefaults=void 0;var qi=re(),B2=ye();function M2(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)p0(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,s)=>p0(e,s,o.default))}hc.assignDefaults=M2;function p0(e,t,r){let{gen:n,compositeRule:o,data:s,opts:i}=e;if(r===void 0)return;let a=(0,qi._)`${s}${(0,qi.getProperty)(t)}`;if(o){(0,B2.checkStrictMode)(e,`default is ignored for: ${a}`);return}let u=(0,qi._)`${a} === undefined`;i.useDefaults==="empty"&&(u=(0,qi._)`${u} || ${a} === null || ${a} === ""`),n.if(u,(0,qi._)`${a} = ${(0,qi.stringify)(r)}`)}});var lr=E(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.validateUnion=xe.validateArray=xe.usePattern=xe.callValidateCode=xe.schemaProperties=xe.allSchemaProperties=xe.noPropertyInData=xe.propertyInData=xe.isOwnProperty=xe.hasPropFunc=xe.reportMissingProp=xe.checkMissingProp=xe.checkReportMissingProp=void 0;var Re=re(),bf=ye(),Kn=xn(),L2=ye();function j2(e,t){let{gen:r,data:n,it:o}=e;r.if(wf(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Re._)`${t}`},!0),e.error()})}xe.checkReportMissingProp=j2;function U2({gen:e,data:t,it:{opts:r}},n,o){return(0,Re.or)(...n.map(s=>(0,Re.and)(wf(e,t,s,r.ownProperties),(0,Re._)`${o} = ${s}`)))}xe.checkMissingProp=U2;function V2(e,t){e.setParams({missingProperty:t},!0),e.error()}xe.reportMissingProp=V2;function m0(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Re._)`Object.prototype.hasOwnProperty`})}xe.hasPropFunc=m0;function xf(e,t,r){return(0,Re._)`${m0(e)}.call(${t}, ${r})`}xe.isOwnProperty=xf;function H2(e,t,r,n){let o=(0,Re._)`${t}${(0,Re.getProperty)(r)} !== undefined`;return n?(0,Re._)`${o} && ${xf(e,t,r)}`:o}xe.propertyInData=H2;function wf(e,t,r,n){let o=(0,Re._)`${t}${(0,Re.getProperty)(r)} === undefined`;return n?(0,Re.or)(o,(0,Re.not)(xf(e,t,r))):o}xe.noPropertyInData=wf;function g0(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}xe.allSchemaProperties=g0;function G2(e,t){return g0(t).filter(r=>!(0,bf.alwaysValidSchema)(e,t[r]))}xe.schemaProperties=G2;function z2({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,u,c){let l=c?(0,Re._)`${e}, ${t}, ${n}${o}`:t,d=[[Kn.default.instancePath,(0,Re.strConcat)(Kn.default.instancePath,s)],[Kn.default.parentData,i.parentData],[Kn.default.parentDataProperty,i.parentDataProperty],[Kn.default.rootData,Kn.default.rootData]];i.opts.dynamicRef&&d.push([Kn.default.dynamicAnchors,Kn.default.dynamicAnchors]);let p=(0,Re._)`${l}, ${r.object(...d)}`;return u!==Re.nil?(0,Re._)`${a}.call(${u}, ${p})`:(0,Re._)`${a}(${p})`}xe.callValidateCode=z2;var q2=(0,Re._)`new RegExp`;function K2({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Re._)`${o.code==="new RegExp"?q2:(0,L2.useFunc)(e,o)}(${r}, ${n})`})}xe.usePattern=K2;function W2(e){let{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(s,!0),i(()=>t.break()),s;function i(a){let u=t.const("len",(0,Re._)`${r}.length`);t.forRange("i",0,u,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:bf.Type.Num},s),t.if((0,Re.not)(s),a)})}}xe.validateArray=W2;function J2(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,bf.alwaysValidSchema)(o,u))&&!o.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((u,c)=>{let l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(i,(0,Re._)`${i} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Re.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}xe.validateUnion=J2});var D0=E(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.validateKeywordUsage=Xr.validSchemaType=Xr.funcKeywordCode=Xr.macroKeywordCode=void 0;var Ct=re(),qo=xn(),Y2=lr(),Q2=la();function Z2(e,t){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),u=y0(r,n,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let c=r.name("valid");e.subschema({schema:a,schemaPath:Ct.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}Xr.macroKeywordCode=Z2;function X2(e,t){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:u}=e;tO(u,t);let c=!a&&t.compile?t.compile.call(u.self,s,i,u):t.validate,l=y0(n,o,c),d=n.let("valid");e.block$data(d,p),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function p(){if(t.errors===!1)m(),t.modifying&&h0(e),y(()=>e.error());else{let D=t.async?h():g();t.modifying&&h0(e),y(()=>eO(e,D))}}function h(){let D=n.let("ruleErrs",null);return n.try(()=>m((0,Ct._)`await `),w=>n.assign(d,!1).if((0,Ct._)`${w} instanceof ${u.ValidationError}`,()=>n.assign(D,(0,Ct._)`${w}.errors`),()=>n.throw(w))),D}function g(){let D=(0,Ct._)`${l}.errors`;return n.assign(D,null),m(Ct.nil),D}function m(D=t.async?(0,Ct._)`await `:Ct.nil){let w=u.opts.passContext?qo.default.this:qo.default.self,S=!("compile"in t&&!a||t.schema===!1);n.assign(d,(0,Ct._)`${D}${(0,Y2.callValidateCode)(e,l,w,S)}`,t.modifying)}function y(D){var w;n.if((0,Ct.not)((w=t.valid)!==null&&w!==void 0?w:d),D)}}Xr.funcKeywordCode=X2;function h0(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Ct._)`${n.parentData}[${n.parentDataProperty}]`))}function eO(e,t){let{gen:r}=e;r.if((0,Ct._)`Array.isArray(${t})`,()=>{r.assign(qo.default.vErrors,(0,Ct._)`${qo.default.vErrors} === null ? ${t} : ${qo.default.vErrors}.concat(${t})`).assign(qo.default.errors,(0,Ct._)`${qo.default.vErrors}.length`),(0,Q2.extendErrors)(e)},()=>e.error())}function tO({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function y0(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ct.stringify)(r)})}function rO(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Xr.validSchemaType=rO;function nO({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");let i=o.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[s])){let u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}Xr.validateKeywordUsage=nO});var C0=E(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.extendSubschemaMode=Wn.extendSubschemaData=Wn.getSubschema=void 0;var en=re(),v0=ye();function oO(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,en._)`${e.schemaPath}${(0,en.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,en._)`${e.schemaPath}${(0,en.getProperty)(t)}${(0,en.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,v0.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Wn.getSubschema=oO;function iO(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:c,dataPathArr:l,opts:d}=t,p=a.let("data",(0,en._)`${t.data}${(0,en.getProperty)(r)}`,!0);u(p),e.errorPath=(0,en.str)`${c}${(0,v0.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,en._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(o!==void 0){let c=o instanceof en.Name?o:a.let("data",o,!0);u(c),i!==void 0&&(e.propertyName=i)}s&&(e.dataTypes=s);function u(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}Wn.extendSubschemaData=iO;function sO(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}Wn.extendSubschemaMode=sO});var Sf=E((sJ,b0)=>{"use strict";b0.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var w0=E((aJ,x0)=>{"use strict";var Jn=x0.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};yc(t,n,o,e,"",e)};Jn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Jn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Jn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Jn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function yc(e,t,r,n,o,s,i,a,u,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,s,i,a,u,c);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in Jn.arrayKeywords)for(var p=0;p<d.length;p++)yc(e,t,r,d[p],o+"/"+l+"/"+p,s,o,l,n,p)}else if(l in Jn.propsKeywords){if(d&&typeof d=="object")for(var h in d)yc(e,t,r,d[h],o+"/"+l+"/"+aO(h),s,o,l,n,h)}else(l in Jn.keywords||e.allKeys&&!(l in Jn.skipKeywords))&&yc(e,t,r,d,o+"/"+l,s,o,l,n)}r(n,o,s,i,a,u,c)}}function aO(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var pa=E($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.getSchemaRefs=$t.resolveUrl=$t.normalizeId=$t._getFullPath=$t.getFullPath=$t.inlineRef=void 0;var uO=ye(),cO=Sf(),lO=w0(),dO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function pO(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Ef(e):t?S0(e)<=t:!1}$t.inlineRef=pO;var fO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ef(e){for(let t in e){if(fO.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Ef)||typeof r=="object"&&Ef(r))return!0}return!1}function S0(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!dO.has(r)&&(typeof e[r]=="object"&&(0,uO.eachItem)(e[r],n=>t+=S0(n)),t===1/0))return 1/0}return t}function E0(e,t="",r){r!==!1&&(t=Ki(t));let n=e.parse(t);return P0(e,n)}$t.getFullPath=E0;function P0(e,t){return e.serialize(t).split("#")[0]+"#"}$t._getFullPath=P0;var mO=/#\/?$/;function Ki(e){return e?e.replace(mO,""):""}$t.normalizeId=Ki;function gO(e,t,r){return r=Ki(r),e.resolve(t,r)}$t.resolveUrl=gO;var hO=/^[a-z_][-a-z0-9._]*$/i;function yO(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Ki(e[r]||t),s={"":o},i=E0(n,o,!1),a={},u=new Set;return lO(e,{allKeys:!0},(d,p,h,g)=>{if(g===void 0)return;let m=i+p,y=s[g];typeof d[r]=="string"&&(y=D.call(this,d[r])),w.call(this,d.$anchor),w.call(this,d.$dynamicAnchor),s[p]=y;function D(S){let F=this.opts.uriResolver.resolve;if(S=Ki(y?F(y,S):S),u.has(S))throw l(S);u.add(S);let A=this.refs[S];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?c(d,A.schema,S):S!==Ki(m)&&(S[0]==="#"?(c(d,a[S],S),a[S]=d):this.refs[S]=m),S}function w(S){if(typeof S=="string"){if(!hO.test(S))throw new Error(`invalid anchor "${S}"`);D.call(this,`#${S}`)}}}),a;function c(d,p,h){if(p!==void 0&&!cO(d,p))throw l(h)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}$t.getSchemaRefs=yO});var ga=E(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.getData=Yn.KeywordCxt=Yn.validateFunctionCode=void 0;var R0=s0(),A0=da(),Af=yf(),Dc=da(),DO=f0(),ma=D0(),Pf=C0(),V=re(),W=xn(),vO=pa(),wn=ye(),fa=la();function CO(e){if($0(e)&&(N0(e),k0(e))){wO(e);return}I0(e,()=>(0,R0.topBoolOrEmptySchema)(e))}Yn.validateFunctionCode=CO;function I0({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,(0,V._)`${W.default.data}, ${W.default.valCxt}`,n.$async,()=>{e.code((0,V._)`"use strict"; ${T0(r,o)}`),xO(e,o),e.code(s)}):e.func(t,(0,V._)`${W.default.data}, ${bO(o)}`,n.$async,()=>e.code(T0(r,o)).code(s))}function bO(e){return(0,V._)`{${W.default.instancePath}="", ${W.default.parentData}, ${W.default.parentDataProperty}, ${W.default.rootData}=${W.default.data}${e.dynamicRef?(0,V._)`, ${W.default.dynamicAnchors}={}`:V.nil}}={}`}function xO(e,t){e.if(W.default.valCxt,()=>{e.var(W.default.instancePath,(0,V._)`${W.default.valCxt}.${W.default.instancePath}`),e.var(W.default.parentData,(0,V._)`${W.default.valCxt}.${W.default.parentData}`),e.var(W.default.parentDataProperty,(0,V._)`${W.default.valCxt}.${W.default.parentDataProperty}`),e.var(W.default.rootData,(0,V._)`${W.default.valCxt}.${W.default.rootData}`),t.dynamicRef&&e.var(W.default.dynamicAnchors,(0,V._)`${W.default.valCxt}.${W.default.dynamicAnchors}`)},()=>{e.var(W.default.instancePath,(0,V._)`""`),e.var(W.default.parentData,(0,V._)`undefined`),e.var(W.default.parentDataProperty,(0,V._)`undefined`),e.var(W.default.rootData,W.default.data),t.dynamicRef&&e.var(W.default.dynamicAnchors,(0,V._)`{}`)})}function wO(e){let{schema:t,opts:r,gen:n}=e;I0(e,()=>{r.$comment&&t.$comment&&B0(e),TO(e),n.let(W.default.vErrors,null),n.let(W.default.errors,0),r.unevaluated&&SO(e),O0(e),RO(e)})}function SO(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,V._)`${r}.evaluated`),t.if((0,V._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,V._)`${e.evaluated}.props`,(0,V._)`undefined`)),t.if((0,V._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,V._)`${e.evaluated}.items`,(0,V._)`undefined`))}function T0(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,V._)`/*# sourceURL=${r} */`:V.nil}function EO(e,t){if($0(e)&&(N0(e),k0(e))){PO(e,t);return}(0,R0.boolOrEmptySchema)(e,t)}function k0({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function $0(e){return typeof e.schema!="boolean"}function PO(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&B0(e),FO(e),_O(e);let s=n.const("_errs",W.default.errors);O0(e,s),n.var(t,(0,V._)`${s} === ${W.default.errors}`)}function N0(e){(0,wn.checkUnknownRules)(e),AO(e)}function O0(e,t){if(e.opts.jtd)return F0(e,[],!1,t);let r=(0,A0.getSchemaTypes)(e.schema),n=(0,A0.coerceAndCheckDataType)(e,r);F0(e,r,!n,t)}function AO(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,wn.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function TO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,wn.checkStrictMode)(e,"default is ignored in the schema root")}function FO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,vO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function _O(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function B0({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)e.code((0,V._)`${W.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=(0,V.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,V._)`${W.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function RO(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if((0,V._)`${W.default.errors} === 0`,()=>t.return(W.default.data),()=>t.throw((0,V._)`new ${o}(${W.default.vErrors})`)):(t.assign((0,V._)`${n}.errors`,W.default.vErrors),s.unevaluated&&IO(e),t.return((0,V._)`${W.default.errors} === 0`))}function IO({gen:e,evaluated:t,props:r,items:n}){r instanceof V.Name&&e.assign((0,V._)`${t}.props`,r),n instanceof V.Name&&e.assign((0,V._)`${t}.items`,n)}function F0(e,t,r,n){let{gen:o,schema:s,data:i,allErrors:a,opts:u,self:c}=e,{RULES:l}=c;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,wn.schemaHasRulesButRef)(s,l))){o.block(()=>L0(e,"$ref",l.all.$ref.definition));return}u.jtd||kO(e,t),o.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,Af.shouldUseGroup)(s,p)&&(p.type?(o.if((0,Dc.checkDataType)(p.type,i,u.strictNumbers)),_0(e,p),t.length===1&&t[0]===p.type&&r&&(o.else(),(0,Dc.reportTypeError)(e)),o.endIf()):_0(e,p),a||o.if((0,V._)`${W.default.errors} === ${n||0}`))}}function _0(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,DO.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,Af.shouldUseRule)(n,s)&&L0(e,s.keyword,s.definition,t.type)})}function kO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||($O(e,t),e.opts.allowUnionTypes||NO(e,t),OO(e,e.dataTypes))}function $O(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{M0(e.dataTypes,r)||Tf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),MO(e,t)}}function NO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Tf(e,"use allowUnionTypes to allow union type keyword")}function OO(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Af.shouldUseRule)(e.schema,o)){let{type:s}=o.definition;s.length&&!s.some(i=>BO(t,i))&&Tf(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function BO(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function M0(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function MO(e,t){let r=[];for(let n of e.dataTypes)M0(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Tf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,wn.checkStrictMode)(e,t,e.opts.strictTypes)}var vc=class{constructor(t,r,n){if((0,ma.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,wn.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",j0(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,ma.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",W.default.errors))}result(t,r,n){this.failResult((0,V.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,V.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,V._)`${r} !== undefined && (${(0,V.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?fa.reportExtraError:fa.reportError)(this,this.def.error,r)}$dataError(){(0,fa.reportError)(this,this.def.$dataError||fa.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,fa.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=V.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=V.nil,r=V.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:i}=this;n.if((0,V.or)((0,V._)`${o} === undefined`,r)),t!==V.nil&&n.assign(t,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==V.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,V.or)(i(),a());function i(){if(n.length){if(!(r instanceof V.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,V._)`${(0,Dc.checkDataTypes)(u,r,s.opts.strictNumbers,Dc.DataType.Wrong)}`}return V.nil}function a(){if(o.validateSchema){let u=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,V._)`!${u}(${r})`}return V.nil}}subschema(t,r){let n=(0,Pf.getSubschema)(this.it,t);(0,Pf.extendSubschemaData)(n,this.it,t),(0,Pf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return EO(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=wn.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=wn.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,V.Name)),!0}};Yn.KeywordCxt=vc;function L0(e,t,r,n){let o=new vc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,ma.funcKeywordCode)(o,r):"macro"in r?(0,ma.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,ma.funcKeywordCode)(o,r)}var LO=/^\/(?:[^~]|~0|~1)*$/,jO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function j0(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(e==="")return W.default.rootData;if(e[0]==="/"){if(!LO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=W.default.rootData}else{let c=jO.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+c[1];if(o=c[2],o==="#"){if(l>=t)throw new Error(u("property/index",l));return n[t-l]}if(l>t)throw new Error(u("data",l));if(s=r[t-l],!o)return s}let i=s,a=o.split("/");for(let c of a)c&&(s=(0,V._)`${s}${(0,V.getProperty)((0,wn.unescapeJsonPointer)(c))}`,i=(0,V._)`${i} && ${s}`);return i;function u(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}Yn.getData=j0});var Cc=E(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var Ff=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};_f.default=Ff});var ha=E(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var Rf=pa(),If=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Rf.resolveUrl)(t,r,n),this.missingSchema=(0,Rf.normalizeId)((0,Rf.getFullPath)(t,this.missingRef))}};kf.default=If});var xc=E(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.resolveSchema=dr.getCompilingSchema=dr.resolveRef=dr.compileSchema=dr.SchemaEnv=void 0;var wr=re(),UO=Cc(),Ko=xn(),Sr=pa(),U0=ye(),VO=ga(),Wi=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Sr.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};dr.SchemaEnv=Wi;function Nf(e){let t=V0.call(this,e);if(t)return t;let r=(0,Sr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new wr.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;e.$async&&(a=i.scopeValue("Error",{ref:UO.default,code:(0,wr._)`require("ajv/dist/runtime/validation_error").default`}));let u=i.scopeName("validate");e.validateName=u;let c={gen:i,allErrors:this.opts.allErrors,data:Ko.default.data,parentData:Ko.default.parentData,parentDataProperty:Ko.default.parentDataProperty,dataNames:[Ko.default.data],dataPathArr:[wr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,wr.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:wr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,wr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,VO.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);let d=i.toString();l=`${i.scopeRefs(Ko.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let h=new Function(`${Ko.default.self}`,`${Ko.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:u,validateCode:d,scopeValues:i._values}),this.opts.unevaluated){let{props:g,items:m}=c;h.evaluated={props:g instanceof wr.Name?void 0:g,items:m instanceof wr.Name?void 0:m,dynamicProps:g instanceof wr.Name,dynamicItems:m instanceof wr.Name},h.source&&(h.source.evaluated=(0,wr.stringify)(h.evaluated))}return e.validate=h,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}dr.compileSchema=Nf;function HO(e,t,r){var n;r=(0,Sr.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let s=qO.call(this,e,r);if(s===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;i&&(s=new Wi({schema:i,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=GO.call(this,s)}dr.resolveRef=HO;function GO(e){return(0,Sr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Nf.call(this,e)}function V0(e){for(let t of this._compilations)if(zO(t,e))return t}dr.getCompilingSchema=V0;function zO(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function qO(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||bc.call(this,e,t)}function bc(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Sr._getFullPath)(this.opts.uriResolver,r),o=(0,Sr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return $f.call(this,r,e);let s=(0,Sr.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=bc.call(this,e,i);return typeof a?.schema!="object"?void 0:$f.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Nf.call(this,i),s===(0,Sr.normalizeId)(t)){let{schema:a}=i,{schemaId:u}=this.opts,c=a[u];return c&&(o=(0,Sr.resolveUrl)(this.opts.uriResolver,o,c)),new Wi({schema:a,schemaId:u,root:e,baseId:o})}return $f.call(this,r,i)}}dr.resolveSchema=bc;var KO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function $f(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,U0.unescapeFragment)(a)];if(u===void 0)return;r=u;let c=typeof r=="object"&&r[this.opts.schemaId];!KO.has(a)&&c&&(t=(0,Sr.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,U0.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Sr.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=bc.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new Wi({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema)return s}});var H0=E((fJ,WO)=>{WO.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var z0=E((mJ,G0)=>{"use strict";var JO={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};G0.exports={HEX:JO}});var X0=E((gJ,Z0)=>{"use strict";var{HEX:YO}=z0(),QO=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function J0(e){if(Q0(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(QO)||[],[r]=t;return r?{host:XO(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function Of(e,t=!1){let r="",n=!0;for(let o of e){if(YO[o]===void 0)return;o!=="0"&&n===!0&&(n=!1),n||(r+=o)}return t&&r.length===0&&(r="0"),r}function ZO(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],s=!1,i=!1,a=!1;function u(){if(o.length){if(s===!1){let c=Of(o);if(c!==void 0)n.push(c);else return r.error=!0,!1}o.length=0}return!0}for(let c=0;c<e.length;c++){let l=e[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(a=!0),!u())break;if(t++,n.push(":"),t>7){r.error=!0;break}c-1>=0&&e[c-1]===":"&&(i=!0);continue}else if(l==="%"){if(!u())break;s=!0}else{o.push(l);continue}}return o.length&&(s?r.zone=o.join(""):a?n.push(o.join("")):n.push(Of(o))),r.address=n.join(""),r}function Y0(e){if(Q0(e,":")<2)return{host:e,isIPV6:!1};let t=ZO(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}function XO(e,t){let r="",n=!0,o=e.length;for(let s=0;s<o;s++){let i=e[s];i==="0"&&n?(s+1<=o&&e[s+1]===t||s+1===o)&&(r+=i,n=!1):(i===t?n=!0:n=!1,r+=i)}return r}function Q0(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}var q0=/^\.\.?\//u,K0=/^\/\.(?:\/|$)/u,W0=/^\/\.\.(?:\/|$)/u,eB=/^\/?(?:.|\n)*?(?=\/|$)/u;function tB(e){let t=[];for(;e.length;)if(e.match(q0))e=e.replace(q0,"");else if(e.match(K0))e=e.replace(K0,"/");else if(e.match(W0))e=e.replace(W0,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(eB);if(r){let n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function rB(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function nB(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host),n=J0(r);if(n.isIPV4)r=n.host;else{let o=Y0(n.host);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}Z0.exports={recomposeAuthority:nB,normalizeComponentEncoding:rB,removeDotSegments:tB,normalizeIPv4:J0,normalizeIPv6:Y0,stringArrayToHexStripped:Of}});var iw=E((hJ,ow)=>{"use strict";var oB=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,iB=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function ew(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function tw(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function rw(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function sB(e){return e.secure=ew(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function aB(e){if((e.port===(ew(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function uB(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(iB);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,s=Bf[o];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function cB(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,s=Bf[o];s&&(e=s.serialize(e,t));let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function lB(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!oB.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function dB(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var nw={scheme:"http",domainHost:!0,parse:tw,serialize:rw},pB={scheme:"https",domainHost:nw.domainHost,parse:tw,serialize:rw},wc={scheme:"ws",domainHost:!0,parse:sB,serialize:aB},fB={scheme:"wss",domainHost:wc.domainHost,parse:wc.parse,serialize:wc.serialize},mB={scheme:"urn",parse:uB,serialize:cB,skipNormalize:!0},gB={scheme:"urn:uuid",parse:lB,serialize:dB,skipNormalize:!0},Bf={http:nw,https:pB,ws:wc,wss:fB,urn:mB,"urn:uuid":gB};ow.exports=Bf});var aw=E((yJ,Ec)=>{"use strict";var{normalizeIPv6:hB,normalizeIPv4:yB,removeDotSegments:ya,recomposeAuthority:DB,normalizeComponentEncoding:Sc}=X0(),Mf=iw();function vB(e,t){return typeof e=="string"?e=tn(Sn(e,t),t):typeof e=="object"&&(e=Sn(tn(e,t),t)),e}function CB(e,t,r){let n=Object.assign({scheme:"null"},r),o=sw(Sn(e,n),Sn(t,n),n,!0);return tn(o,{...n,skipEscape:!0})}function sw(e,t,r,n){let o={};return n||(e=Sn(tn(e,r),r),t=Sn(tn(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=ya(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=ya(t.path||""),o.query=t.query):(t.path?(t.path.charAt(0)==="/"?o.path=ya(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=ya(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function bB(e,t,r){return typeof e=="string"?(e=unescape(e),e=tn(Sc(Sn(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=tn(Sc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=tn(Sc(Sn(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=tn(Sc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function tn(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],s=Mf[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let i=DB(r);if(i!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(i),r.path&&r.path.charAt(0)!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=ya(a)),i===void 0&&(a=a.replace(/^\/\//u,"/%2F")),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var xB=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function wB(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||xB[t])return!0;return!1}var SB=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Sn(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=e.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let i=e.match(SB);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let u=yB(n.host);if(u.isIPV4===!1){let c=hB(u.host);n.host=c.host.toLowerCase(),s=c.isIPV6}else n.host=u.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=Mf[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&s===!1&&wB(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!a||a&&!a.skipNormalize)&&(o&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),o&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Lf={SCHEMES:Mf,normalize:vB,resolve:CB,resolveComponents:sw,equal:bB,serialize:tn,parse:Sn};Ec.exports=Lf;Ec.exports.default=Lf;Ec.exports.fastUri=Lf});var cw=E(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var uw=aw();uw.code='require("ajv/dist/runtime/uri").default';jf.default=uw});var yw=E(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.CodeGen=rt.Name=rt.nil=rt.stringify=rt.str=rt._=rt.KeywordCxt=void 0;var EB=ga();Object.defineProperty(rt,"KeywordCxt",{enumerable:!0,get:function(){return EB.KeywordCxt}});var Ji=re();Object.defineProperty(rt,"_",{enumerable:!0,get:function(){return Ji._}});Object.defineProperty(rt,"str",{enumerable:!0,get:function(){return Ji.str}});Object.defineProperty(rt,"stringify",{enumerable:!0,get:function(){return Ji.stringify}});Object.defineProperty(rt,"nil",{enumerable:!0,get:function(){return Ji.nil}});Object.defineProperty(rt,"Name",{enumerable:!0,get:function(){return Ji.Name}});Object.defineProperty(rt,"CodeGen",{enumerable:!0,get:function(){return Ji.CodeGen}});var PB=Cc(),mw=ha(),AB=hf(),Da=xc(),TB=re(),va=pa(),Pc=da(),Vf=ye(),lw=H0(),FB=cw(),gw=(e,t)=>new RegExp(e,t);gw.code="new RegExp";var _B=["removeAdditional","useDefaults","coerceTypes"],RB=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),IB={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},kB={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},dw=200;function $B(e){var t,r,n,o,s,i,a,u,c,l,d,p,h,g,m,y,D,w,S,F,A,_,k,O,$;let R=e.strict,C=(t=e.code)===null||t===void 0?void 0:t.optimize,U=C===!0||C===void 0?1:C||0,G=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:gw,K=(o=e.uriResolver)!==null&&o!==void 0?o:FB.default;return{strictSchema:(i=(s=e.strictSchema)!==null&&s!==void 0?s:R)!==null&&i!==void 0?i:!0,strictNumbers:(u=(a=e.strictNumbers)!==null&&a!==void 0?a:R)!==null&&u!==void 0?u:!0,strictTypes:(l=(c=e.strictTypes)!==null&&c!==void 0?c:R)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=e.strictTuples)!==null&&d!==void 0?d:R)!==null&&p!==void 0?p:"log",strictRequired:(g=(h=e.strictRequired)!==null&&h!==void 0?h:R)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:U,regExp:G}:{optimize:U,regExp:G},loopRequired:(m=e.loopRequired)!==null&&m!==void 0?m:dw,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:dw,meta:(D=e.meta)!==null&&D!==void 0?D:!0,messages:(w=e.messages)!==null&&w!==void 0?w:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(F=e.schemaId)!==null&&F!==void 0?F:"$id",addUsedSchema:(A=e.addUsedSchema)!==null&&A!==void 0?A:!0,validateSchema:(_=e.validateSchema)!==null&&_!==void 0?_:!0,validateFormats:(k=e.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:(O=e.unicodeRegExp)!==null&&O!==void 0?O:!0,int32range:($=e.int32range)!==null&&$!==void 0?$:!0,uriResolver:K}}var Ca=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...$B(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new TB.ValueScope({scope:{},prefixes:RB,es5:r,lines:n}),this.logger=jB(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,AB.getRules)(),pw.call(this,IB,t,"NOT SUPPORTED"),pw.call(this,kB,t,"DEPRECATED","warn"),this._metaOpts=MB.call(this),t.formats&&OB.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&BB.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),NB.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=lw;n==="id"&&(o={...lw},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(l,d){await s.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||i.call(this,p)}async function s(l){l&&!this.getSchema(l)&&await o.call(this,{$ref:l},!0)}async function i(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof mw.default))throw d;return a.call(this,d),await u.call(this,d.missingSchema),i.call(this,l)}}function a({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function u(l){let d=await c.call(this,l);this.refs[l]||await s.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let i of t)this.addSchema(i,void 0,n,o);return this}let s;if(typeof t=="object"){let{schemaId:i}=this.opts;if(s=t[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return r=(0,va.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return o}getSchema(t){let r;for(;typeof(r=fw.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Da.SchemaEnv({schema:{},schemaId:n});if(r=Da.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=fw.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,va.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(VB.call(this,n,r),!r)return(0,Vf.eachItem)(n,s=>Uf.call(this,s)),this;GB.call(this,r);let o={...r,type:(0,Pc.getJSONTypes)(r.type),schemaType:(0,Pc.getJSONTypes)(r.schemaType)};return(0,Vf.eachItem)(n,o.type.length===0?s=>Uf.call(this,s,o):s=>o.type.forEach(i=>Uf.call(this,s,o,i))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(s=>s.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,s)=>o+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let s=o.split("/").slice(1),i=t;for(let a of s)i=i[a];for(let a in n){let u=n[a];if(typeof u!="object")continue;let{$data:c}=u.definition,l=i[a];c&&l&&(i[a]=hw(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof t=="object")i=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==void 0)return u;n=(0,va.normalizeId)(i||n);let c=va.getSchemaRefs.call(this,t,n);return u=new Da.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:c}),this._cache.set(u.schema,u),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),o&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Da.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Da.compileSchema.call(this,t)}finally{this.opts=r}}};Ca.ValidationError=PB.default;Ca.MissingRefError=mw.default;rt.default=Ca;function pw(e,t,r,n="error"){for(let o in e){let s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function fw(e){return e=(0,va.normalizeId)(e),this.schemas[e]||this.refs[e]}function NB(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function OB(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function BB(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function MB(){let e={...this.opts};for(let t of _B)delete e[t];return e}var LB={log(){},warn(){},error(){}};function jB(e){if(e===!1)return LB;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var UB=/^[a-z_$][a-z0-9_$:-]*$/i;function VB(e,t){let{RULES:r}=this;if((0,Vf.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!UB.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Uf(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=o?s.post:s.rules.find(({type:u})=>u===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,Pc.getJSONTypes)(t.type),schemaType:(0,Pc.getJSONTypes)(t.schemaType)}};t.before?HB.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function HB(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function GB(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=hw(t)),e.validateSchema=this.compile(t,!0))}var zB={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function hw(e){return{anyOf:[e,zB]}}});var Dw=E(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var qB={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Hf.default=qB});var xw=E(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.callRef=Wo.getValidate=void 0;var KB=ha(),vw=lr(),Nt=re(),Yi=xn(),Cw=xc(),Ac=ye(),WB={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:u}=n,{root:c}=s;if((r==="#"||r==="#/")&&o===c.baseId)return d();let l=Cw.resolveRef.call(u,c,o,r);if(l===void 0)throw new KB.default(n.opts.uriResolver,o,r);if(l instanceof Cw.SchemaEnv)return p(l);return h(l);function d(){if(s===c)return Tc(e,i,s,s.$async);let g=t.scopeValue("root",{ref:c});return Tc(e,(0,Nt._)`${g}.validate`,c,c.$async)}function p(g){let m=bw(e,g);Tc(e,m,g,g.$async)}function h(g){let m=t.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Nt.stringify)(g)}:{ref:g}),y=t.name("valid"),D=e.subschema({schema:g,dataTypes:[],schemaPath:Nt.nil,topSchemaRef:m,errSchemaPath:r},y);e.mergeEvaluated(D),e.ok(y)}}};function bw(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Nt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Wo.getValidate=bw;function Tc(e,t,r,n){let{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:u}=s,c=u.passContext?Yi.default.this:Nt.nil;n?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=o.let("valid");o.try(()=>{o.code((0,Nt._)`await ${(0,vw.callValidateCode)(e,t,c)}`),h(t),i||o.assign(g,!0)},m=>{o.if((0,Nt._)`!(${m} instanceof ${s.ValidationError})`,()=>o.throw(m)),p(m),i||o.assign(g,!1)}),e.ok(g)}function d(){e.result((0,vw.callValidateCode)(e,t,c),()=>h(t),()=>p(t))}function p(g){let m=(0,Nt._)`${g}.errors`;o.assign(Yi.default.vErrors,(0,Nt._)`${Yi.default.vErrors} === null ? ${m} : ${Yi.default.vErrors}.concat(${m})`),o.assign(Yi.default.errors,(0,Nt._)`${Yi.default.vErrors}.length`)}function h(g){var m;if(!s.opts.unevaluated)return;let y=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(s.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(s.props=Ac.mergeEvaluated.props(o,y.props,s.props));else{let D=o.var("props",(0,Nt._)`${g}.evaluated.props`);s.props=Ac.mergeEvaluated.props(o,D,s.props,Nt.Name)}if(s.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(s.items=Ac.mergeEvaluated.items(o,y.items,s.items));else{let D=o.var("items",(0,Nt._)`${g}.evaluated.items`);s.items=Ac.mergeEvaluated.items(o,D,s.items,Nt.Name)}}}Wo.callRef=Tc;Wo.default=WB});var ww=E(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});var JB=Dw(),YB=xw(),QB=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",JB.default,YB.default];Gf.default=QB});var Sw=E(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var Fc=re(),Qn=Fc.operators,_c={maximum:{okStr:"<=",ok:Qn.LTE,fail:Qn.GT},minimum:{okStr:">=",ok:Qn.GTE,fail:Qn.LT},exclusiveMaximum:{okStr:"<",ok:Qn.LT,fail:Qn.GTE},exclusiveMinimum:{okStr:">",ok:Qn.GT,fail:Qn.LTE}},ZB={message:({keyword:e,schemaCode:t})=>(0,Fc.str)`must be ${_c[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Fc._)`{comparison: ${_c[e].okStr}, limit: ${t}}`},XB={keyword:Object.keys(_c),type:"number",schemaType:"number",$data:!0,error:ZB,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Fc._)`${r} ${_c[t].fail} ${n} || isNaN(${r})`)}};zf.default=XB});var Ew=E(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var ba=re(),eM={message:({schemaCode:e})=>(0,ba.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,ba._)`{multipleOf: ${e}}`},tM={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:eM,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?(0,ba._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,ba._)`${i} !== parseInt(${i})`;e.fail$data((0,ba._)`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};qf.default=tM});var Aw=E(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});function Pw(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}Kf.default=Pw;Pw.code='require("ajv/dist/runtime/ucs2length").default'});var Tw=E(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var Jo=re(),rM=ye(),nM=Aw(),oM={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Jo.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Jo._)`{limit: ${e}}`},iM={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:oM,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,s=t==="maxLength"?Jo.operators.GT:Jo.operators.LT,i=o.opts.unicode===!1?(0,Jo._)`${r}.length`:(0,Jo._)`${(0,rM.useFunc)(e.gen,nM.default)}(${r})`;e.fail$data((0,Jo._)`${i} ${s} ${n}`)}};Wf.default=iM});var Fw=E(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});var sM=lr(),Rc=re(),aM={message:({schemaCode:e})=>(0,Rc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Rc._)`{pattern: ${e}}`},uM={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:aM,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:s}=e,i=s.opts.unicodeRegExp?"u":"",a=r?(0,Rc._)`(new RegExp(${o}, ${i}))`:(0,sM.usePattern)(e,n);e.fail$data((0,Rc._)`!${a}.test(${t})`)}};Jf.default=uM});var _w=E(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var xa=re(),cM={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,xa.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,xa._)`{limit: ${e}}`},lM={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:cM,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?xa.operators.GT:xa.operators.LT;e.fail$data((0,xa._)`Object.keys(${r}).length ${o} ${n}`)}};Yf.default=lM});var Rw=E(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var wa=lr(),Sa=re(),dM=ye(),pM={message:({params:{missingProperty:e}})=>(0,Sa.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Sa._)`{missingProperty: ${e}}`},fM={keyword:"required",type:"object",schemaType:"array",$data:!0,error:pM,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&r.length===0)return;let u=r.length>=a.loopRequired;if(i.allErrors?c():l(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:g}=e.it;for(let m of r)if(h?.[m]===void 0&&!g.has(m)){let y=i.schemaEnv.baseId+i.errSchemaPath,D=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,dM.checkStrictMode)(i,D,i.opts.strictRequired)}}function c(){if(u||s)e.block$data(Sa.nil,d);else for(let h of r)(0,wa.checkReportMissingProp)(e,h)}function l(){let h=t.let("missing");if(u||s){let g=t.let("valid",!0);e.block$data(g,()=>p(h,g)),e.ok(g)}else t.if((0,wa.checkMissingProp)(e,r,h)),(0,wa.reportMissingProp)(e,h),t.else()}function d(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,wa.noPropertyInData)(t,o,h,a.ownProperties),()=>e.error())})}function p(h,g){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(g,(0,wa.propertyInData)(t,o,h,a.ownProperties)),t.if((0,Sa.not)(g),()=>{e.error(),t.break()})},Sa.nil)}}};Qf.default=fM});var Iw=E(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var Ea=re(),mM={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Ea.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Ea._)`{limit: ${e}}`},gM={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:mM,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?Ea.operators.GT:Ea.operators.LT;e.fail$data((0,Ea._)`${r}.length ${o} ${n}`)}};Zf.default=gM});var Ic=E(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var kw=Sf();kw.code='require("ajv/dist/runtime/equal").default';Xf.default=kw});var $w=E(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var em=da(),nt=re(),hM=ye(),yM=Ic(),DM={message:({params:{i:e,j:t}})=>(0,nt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,nt._)`{i: ${e}, j: ${t}}`},vM={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:DM,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;let u=t.let("valid"),c=s.items?(0,em.getSchemaTypes)(s.items):[];e.block$data(u,l,(0,nt._)`${i} === false`),e.ok(u);function l(){let g=t.let("i",(0,nt._)`${r}.length`),m=t.let("j");e.setParams({i:g,j:m}),t.assign(u,!0),t.if((0,nt._)`${g} > 1`,()=>(d()?p:h)(g,m))}function d(){return c.length>0&&!c.some(g=>g==="object"||g==="array")}function p(g,m){let y=t.name("item"),D=(0,em.checkDataTypes)(c,y,a.opts.strictNumbers,em.DataType.Wrong),w=t.const("indices",(0,nt._)`{}`);t.for((0,nt._)`;${g}--;`,()=>{t.let(y,(0,nt._)`${r}[${g}]`),t.if(D,(0,nt._)`continue`),c.length>1&&t.if((0,nt._)`typeof ${y} == "string"`,(0,nt._)`${y} += "_"`),t.if((0,nt._)`typeof ${w}[${y}] == "number"`,()=>{t.assign(m,(0,nt._)`${w}[${y}]`),e.error(),t.assign(u,!1).break()}).code((0,nt._)`${w}[${y}] = ${g}`)})}function h(g,m){let y=(0,hM.useFunc)(t,yM.default),D=t.name("outer");t.label(D).for((0,nt._)`;${g}--;`,()=>t.for((0,nt._)`${m} = ${g}; ${m}--;`,()=>t.if((0,nt._)`${y}(${r}[${g}], ${r}[${m}])`,()=>{e.error(),t.assign(u,!1).break(D)})))}}};tm.default=vM});var Nw=E(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var rm=re(),CM=ye(),bM=Ic(),xM={message:"must be equal to constant",params:({schemaCode:e})=>(0,rm._)`{allowedValue: ${e}}`},wM={keyword:"const",$data:!0,error:xM,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,rm._)`!${(0,CM.useFunc)(t,bM.default)}(${r}, ${o})`):e.fail((0,rm._)`${s} !== ${r}`)}};nm.default=wM});var Ow=E(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var Pa=re(),SM=ye(),EM=Ic(),PM={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Pa._)`{allowedValues: ${e}}`},AM={keyword:"enum",schemaType:"array",$data:!0,error:PM,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=i.opts.loopEnum,u,c=()=>u??(u=(0,SM.useFunc)(t,EM.default)),l;if(a||n)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=t.const("vSchema",s);l=(0,Pa.or)(...o.map((g,m)=>p(h,m)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",s,h=>t.if((0,Pa._)`${c()}(${r}, ${h})`,()=>t.assign(l,!0).break()))}function p(h,g){let m=o[g];return typeof m=="object"&&m!==null?(0,Pa._)`${c()}(${r}, ${h}[${g}])`:(0,Pa._)`${r} === ${m}`}}};om.default=AM});var Bw=E(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var TM=Sw(),FM=Ew(),_M=Tw(),RM=Fw(),IM=_w(),kM=Rw(),$M=Iw(),NM=$w(),OM=Nw(),BM=Ow(),MM=[TM.default,FM.default,_M.default,RM.default,IM.default,kM.default,$M.default,NM.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},OM.default,BM.default];im.default=MM});var am=E(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.validateAdditionalItems=void 0;var Yo=re(),sm=ye(),LM={message:({params:{len:e}})=>(0,Yo.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Yo._)`{limit: ${e}}`},jM={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:LM,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,sm.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Mw(e,n)}};function Mw(e,t){let{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;let a=r.const("len",(0,Yo._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Yo._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,sm.alwaysValidSchema)(i,n)){let c=r.var("valid",(0,Yo._)`${a} <= ${t.length}`);r.if((0,Yo.not)(c),()=>u(c)),e.ok(c)}function u(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:sm.Type.Num},c),i.allErrors||r.if((0,Yo.not)(c),()=>r.break())})}}Aa.validateAdditionalItems=Mw;Aa.default=jM});var um=E(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.validateTuple=void 0;var Lw=re(),kc=ye(),UM=lr(),VM={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return jw(e,"additionalItems",t);r.items=!0,!(0,kc.alwaysValidSchema)(r,t)&&e.ok((0,UM.validateArray)(e))}};function jw(e,t,r=e.schema){let{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;l(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=kc.mergeEvaluated.items(n,r.length,a.items));let u=n.name("valid"),c=n.const("len",(0,Lw._)`${s}.length`);r.forEach((d,p)=>{(0,kc.alwaysValidSchema)(a,d)||(n.if((0,Lw._)`${c} > ${p}`,()=>e.subschema({keyword:i,schemaProp:p,dataProp:p},u)),e.ok(u))});function l(d){let{opts:p,errSchemaPath:h}=a,g=r.length,m=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(p.strictTuples&&!m){let y=`"${i}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,kc.checkStrictMode)(a,y,p.strictTuples)}}}Ta.validateTuple=jw;Ta.default=VM});var Uw=E(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var HM=um(),GM={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,HM.validateTuple)(e,"items")};cm.default=GM});var Hw=E(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var Vw=re(),zM=ye(),qM=lr(),KM=am(),WM={message:({params:{len:e}})=>(0,Vw.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Vw._)`{limit: ${e}}`},JM={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:WM,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,zM.alwaysValidSchema)(n,t)&&(o?(0,KM.validateAdditionalItems)(e,o):e.ok((0,qM.validateArray)(e)))}};lm.default=JM});var Gw=E(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var pr=re(),$c=ye(),YM={message:({params:{min:e,max:t}})=>t===void 0?(0,pr.str)`must contain at least ${e} valid item(s)`:(0,pr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,pr._)`{minContains: ${e}}`:(0,pr._)`{minContains: ${e}, maxContains: ${t}}`},QM={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:YM,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e,i,a,{minContains:u,maxContains:c}=n;s.opts.next?(i=u===void 0?1:u,a=c):i=1;let l=t.const("len",(0,pr._)`${o}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){(0,$c.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,$c.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,$c.alwaysValidSchema)(s,r)){let m=(0,pr._)`${l} >= ${i}`;a!==void 0&&(m=(0,pr._)`${m} && ${l} <= ${a}`),e.pass(m);return}s.items=!0;let d=t.name("valid");a===void 0&&i===1?h(d,()=>t.if(d,()=>t.break())):i===0?(t.let(d,!0),a!==void 0&&t.if((0,pr._)`${o}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){let m=t.name("_valid"),y=t.let("count",0);h(m,()=>t.if(m,()=>g(y)))}function h(m,y){t.forRange("i",0,l,D=>{e.subschema({keyword:"contains",dataProp:D,dataPropType:$c.Type.Num,compositeRule:!0},m),y()})}function g(m){t.code((0,pr._)`${m}++`),a===void 0?t.if((0,pr._)`${m} >= ${i}`,()=>t.assign(d,!0).break()):(t.if((0,pr._)`${m} > ${a}`,()=>t.assign(d,!1).break()),i===1?t.assign(d,!0):t.if((0,pr._)`${m} >= ${i}`,()=>t.assign(d,!0)))}}};dm.default=QM});var Kw=E(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.validateSchemaDeps=rn.validatePropertyDeps=rn.error=void 0;var pm=re(),ZM=ye(),Fa=lr();rn.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,pm.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,pm._)`{property: ${e},
|
|
1499
1499
|
missingProperty: ${n},
|
|
1500
1500
|
depsCount: ${t},
|
|
1501
|
-
deps: ${r}}`};var QM={keyword:"dependencies",type:"object",schemaType:"object",error:rn.error,code(e){let[t,r]=ZM(e);Gw(e,t),Hw(e,r)}};function ZM({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function Gw(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let u=(0,Ta.propertyInData)(r,n,i,o.opts.ownProperties);e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(u,()=>{for(let c of a)(0,Ta.checkReportMissingProp)(e,c)}):(r.if((0,pm._)`${u} && (${(0,Ta.checkMissingProp)(e,a,s)})`),(0,Ta.reportMissingProp)(e,s),r.else())}}rn.validatePropertyDeps=Gw;function Hw(e,t=e.schema){let{gen:r,data:n,keyword:o,it:s}=e,i=r.name("valid");for(let a in t)(0,YM.alwaysValidSchema)(s,t[a])||(r.if((0,Ta.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let u=e.subschema({keyword:o,schemaProp:a},i);e.mergeValidEvaluated(u,i)},()=>r.var(i,!0)),e.ok(i))}rn.validateSchemaDeps=Hw;rn.default=QM});var Kw=E(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var zw=te(),XM=ye(),eL={message:"property name must be valid",params:({params:e})=>(0,zw._)`{propertyName: ${e.propertyName}}`},tL={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:eL,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,XM.alwaysValidSchema)(o,r))return;let s=t.name("valid");t.forIn("key",n,i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),t.if((0,zw.not)(s),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(s)}};fm.default=tL});var gm=E(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var $c=lr(),Er=te(),rL=xn(),Nc=ye(),nL={message:"must NOT have additional properties",params:({params:e})=>(0,Er._)`{additionalProperty: ${e.additionalProperty}}`},oL={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:nL,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,Nc.alwaysValidSchema)(i,r))return;let c=(0,$c.allSchemaProperties)(n.properties),l=(0,$c.allSchemaProperties)(n.patternProperties);d(),e.ok((0,Er._)`${s} === ${rL.default.errors}`);function d(){t.forIn("key",o,y=>{!c.length&&!l.length?m(y):t.if(p(y),()=>m(y))})}function p(y){let D;if(c.length>8){let S=(0,Nc.schemaRefOrVal)(i,n.properties,"properties");D=(0,$c.isOwnProperty)(t,S,y)}else c.length?D=(0,Er.or)(...c.map(S=>(0,Er._)`${y} === ${S}`)):D=Er.nil;return l.length&&(D=(0,Er.or)(D,...l.map(S=>(0,Er._)`${(0,$c.usePattern)(e,S)}.test(${y})`))),(0,Er.not)(D)}function h(y){t.code((0,Er._)`delete ${o}[${y}]`)}function m(y){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){h(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Nc.alwaysValidSchema)(i,r)){let D=t.name("valid");u.removeAdditional==="failing"?(g(y,D,!1),t.if((0,Er.not)(D),()=>{e.reset(),h(y)})):(g(y,D),a||t.if((0,Er.not)(D),()=>t.break()))}}function g(y,D,S){let w={keyword:"additionalProperties",dataProp:y,dataPropType:Nc.Type.Str};S===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(w,D)}}};mm.default=oL});var Yw=E(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var iL=ma(),Ww=lr(),hm=ye(),Jw=gm(),sL={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Jw.default.code(new iL.KeywordCxt(s,Jw.default,"additionalProperties"));let i=(0,Ww.allSchemaProperties)(r);for(let d of i)s.definedProperties.add(d);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=hm.mergeEvaluated.props(t,(0,hm.toHash)(i),s.props));let a=i.filter(d=>!(0,hm.alwaysValidSchema)(s,r[d]));if(a.length===0)return;let u=t.name("valid");for(let d of a)c(d)?l(d):(t.if((0,Ww.propertyInData)(t,o,d,s.opts.ownProperties)),l(d),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(u);function c(d){return s.opts.useDefaults&&!s.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},u)}}};ym.default=sL});var eS=E(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var Qw=lr(),Oc=te(),Zw=ye(),Xw=ye(),aL={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=(0,Qw.allSchemaProperties)(r),u=a.filter(g=>(0,Zw.alwaysValidSchema)(s,r[g]));if(a.length===0||u.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let c=i.strictSchema&&!i.allowMatchingProperties&&o.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof Oc.Name)&&(s.props=(0,Xw.evaluatedPropsToName)(t,s.props));let{props:d}=s;p();function p(){for(let g of a)c&&h(g),s.allErrors?m(g):(t.var(l,!0),m(g),t.if(l))}function h(g){for(let y in c)new RegExp(g).test(y)&&(0,Zw.checkStrictMode)(s,`property ${y} matches pattern ${g} (use allowMatchingProperties)`)}function m(g){t.forIn("key",n,y=>{t.if((0,Oc._)`${(0,Qw.usePattern)(e,g)}.test(${y})`,()=>{let D=u.includes(g);D||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:y,dataPropType:Xw.Type.Str},l),s.opts.unevaluated&&d!==!0?t.assign((0,Oc._)`${d}[${y}]`,!0):!D&&!s.allErrors&&t.if((0,Oc.not)(l),()=>t.break())})})}}};Dm.default=aL});var tS=E(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var uL=ye(),cL={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,uL.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};vm.default=cL});var rS=E(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var lL=lr(),dL={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:lL.validateUnion,error:{message:"must match a schema in anyOf"}};Cm.default=dL});var nS=E(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var Bc=te(),pL=ye(),fL={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Bc._)`{passingSchemas: ${e.passing}}`},mL={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:fL,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,i=t.let("valid",!1),a=t.let("passing",null),u=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(i,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,d)=>{let p;(0,pL.alwaysValidSchema)(o,l)?t.var(u,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},u),d>0&&t.if((0,Bc._)`${u} && ${i}`).assign(i,!1).assign(a,(0,Bc._)`[${a}, ${d}]`).else(),t.if(u,()=>{t.assign(i,!0),t.assign(a,d),p&&e.mergeEvaluated(p,Bc.Name)})})}}};bm.default=mL});var oS=E(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var gL=ye(),hL={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((s,i)=>{if((0,gL.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:i},o);e.ok(o),e.mergeEvaluated(a)})}};xm.default=hL});var aS=E(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});var Mc=te(),sS=ye(),yL={message:({params:e})=>(0,Mc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Mc._)`{failingKeyword: ${e.ifClause}}`},DL={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:yL,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,sS.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=iS(n,"then"),s=iS(n,"else");if(!o&&!s)return;let i=t.let("valid",!0),a=t.name("_valid");if(u(),e.reset(),o&&s){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else o?t.if(a,c("then")):t.if((0,Mc.not)(a),c("else"));e.pass(i,()=>e.error(!0));function u(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,d){return()=>{let p=e.subschema({keyword:l},a);t.assign(i,a),e.mergeValidEvaluated(p,i),d?t.assign(d,(0,Mc._)`${l}`):e.setParams({ifClause:l})}}}};function iS(e,t){let r=e.schema[t];return r!==void 0&&!(0,sS.alwaysValidSchema)(e,r)}wm.default=DL});var uS=E(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var vL=ye(),CL={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,vL.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Sm.default=CL});var cS=E(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var bL=am(),xL=Lw(),wL=um(),SL=Uw(),EL=Vw(),PL=qw(),AL=Kw(),TL=gm(),FL=Yw(),_L=eS(),RL=tS(),IL=rS(),kL=nS(),$L=oS(),NL=aS(),OL=uS();function BL(e=!1){let t=[RL.default,IL.default,kL.default,$L.default,NL.default,OL.default,AL.default,TL.default,PL.default,FL.default,_L.default];return e?t.push(xL.default,SL.default):t.push(bL.default,wL.default),t.push(EL.default),t}Em.default=BL});var lS=E(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var Ue=te(),ML={message:({schemaCode:e})=>(0,Ue.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ue._)`{format: ${e}}`},LL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:ML,code(e,t){let{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:u,errSchemaPath:c,schemaEnv:l,self:d}=a;if(!u.validateFormats)return;o?p():h();function p(){let m=r.scopeValue("formats",{ref:d.formats,code:u.code.formats}),g=r.const("fDef",(0,Ue._)`${m}[${i}]`),y=r.let("fType"),D=r.let("format");r.if((0,Ue._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(y,(0,Ue._)`${g}.type || "string"`).assign(D,(0,Ue._)`${g}.validate`),()=>r.assign(y,(0,Ue._)`"string"`).assign(D,g)),e.fail$data((0,Ue.or)(S(),w()));function S(){return u.strictSchema===!1?Ue.nil:(0,Ue._)`${i} && !${D}`}function w(){let F=l.$async?(0,Ue._)`(${g}.async ? await ${D}(${n}) : ${D}(${n}))`:(0,Ue._)`${D}(${n})`,A=(0,Ue._)`(typeof ${D} == "function" ? ${F} : ${D}.test(${n}))`;return(0,Ue._)`${D} && ${D} !== true && ${y} === ${t} && !${A}`}}function h(){let m=d.formats[s];if(!m){S();return}if(m===!0)return;let[g,y,D]=w(m);g===t&&e.pass(F());function S(){if(u.strictSchema===!1){d.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function w(A){let _=A instanceof RegExp?(0,Ue.regexpCode)(A):u.code.formats?(0,Ue._)`${u.code.formats}${(0,Ue.getProperty)(s)}`:void 0,k=r.scopeValue("formats",{key:s,ref:A,code:_});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,Ue._)`${k}.validate`]:["string",A,k]}function F(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ue._)`await ${D}(${n})`}return typeof y=="function"?(0,Ue._)`${D}(${n})`:(0,Ue._)`${D}.test(${n})`}}}};Pm.default=LL});var dS=E(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var jL=lS(),UL=[jL.default];Am.default=UL});var pS=E(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.contentVocabulary=Yi.metadataVocabulary=void 0;Yi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Yi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var mS=E(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var VL=bw(),GL=Nw(),HL=cS(),qL=dS(),fS=pS(),zL=[VL.default,GL.default,(0,HL.default)(),qL.default,fS.metadataVocabulary,fS.contentVocabulary];Tm.default=zL});var hS=E(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.DiscrError=void 0;var gS;(function(e){e.Tag="tag",e.Mapping="mapping"})(gS||(Lc.DiscrError=gS={}))});var DS=E(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var Qi=te(),Fm=hS(),yS=bc(),KL=ga(),WL=ye(),JL={message:({params:{discrError:e,tagName:t}})=>e===Fm.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Qi._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},YL={keyword:"discriminator",type:"object",schemaType:"object",error:JL,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let u=t.let("valid",!1),c=t.const("tag",(0,Qi._)`${r}${(0,Qi.getProperty)(a)}`);t.if((0,Qi._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:Fm.DiscrError.Tag,tag:c,tagName:a})),e.ok(u);function l(){let h=p();t.if(!1);for(let m in h)t.elseIf((0,Qi._)`${c} === ${m}`),t.assign(u,d(h[m]));t.else(),e.error(!1,{discrError:Fm.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function d(h){let m=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:h},m);return e.mergeEvaluated(g,Qi.Name),m}function p(){var h;let m={},g=D(o),y=!0;for(let F=0;F<i.length;F++){let A=i[F];if(A?.$ref&&!(0,WL.schemaHasRulesButRef)(A,s.self.RULES)){let k=A.$ref;if(A=yS.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,k),A instanceof yS.SchemaEnv&&(A=A.schema),A===void 0)throw new KL.default(s.opts.uriResolver,s.baseId,k)}let _=(h=A?.properties)===null||h===void 0?void 0:h[a];if(typeof _!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(g||D(A)),S(_,F)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return m;function D({required:F}){return Array.isArray(F)&&F.includes(a)}function S(F,A){if(F.const)w(F.const,A);else if(F.enum)for(let _ of F.enum)w(_,A);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(F,A){if(typeof F!="string"||F in m)throw new Error(`discriminator: "${a}" values must be unique strings`);m[F]=A}}}};_m.default=YL});var vS=E((eY,QL)=>{QL.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Im=E((Ie,Rm)=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.MissingRefError=Ie.ValidationError=Ie.CodeGen=Ie.Name=Ie.nil=Ie.stringify=Ie.str=Ie._=Ie.KeywordCxt=Ie.Ajv=void 0;var ZL=gw(),XL=mS(),e3=DS(),CS=vS(),t3=["/properties"],jc="http://json-schema.org/draft-07/schema",Zi=class extends ZL.default{_addVocabularies(){super._addVocabularies(),XL.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(e3.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(CS,t3):CS;this.addMetaSchema(t,jc,!1),this.refs["http://json-schema.org/schema"]=jc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(jc)?jc:void 0)}};Ie.Ajv=Zi;Rm.exports=Ie=Zi;Rm.exports.Ajv=Zi;Object.defineProperty(Ie,"__esModule",{value:!0});Ie.default=Zi;var r3=ma();Object.defineProperty(Ie,"KeywordCxt",{enumerable:!0,get:function(){return r3.KeywordCxt}});var Xi=te();Object.defineProperty(Ie,"_",{enumerable:!0,get:function(){return Xi._}});Object.defineProperty(Ie,"str",{enumerable:!0,get:function(){return Xi.str}});Object.defineProperty(Ie,"stringify",{enumerable:!0,get:function(){return Xi.stringify}});Object.defineProperty(Ie,"nil",{enumerable:!0,get:function(){return Xi.nil}});Object.defineProperty(Ie,"Name",{enumerable:!0,get:function(){return Xi.Name}});Object.defineProperty(Ie,"CodeGen",{enumerable:!0,get:function(){return Xi.CodeGen}});var n3=vc();Object.defineProperty(Ie,"ValidationError",{enumerable:!0,get:function(){return n3.default}});var o3=ga();Object.defineProperty(Ie,"MissingRefError",{enumerable:!0,get:function(){return o3.default}})});var TS=E(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.formatNames=on.fastFormats=on.fullFormats=void 0;function nn(e,t){return{validate:e,compare:t}}on.fullFormats={date:nn(SS,Om),time:nn($m(!0),Bm),"date-time":nn(bS(!0),PS),"iso-time":nn($m(),ES),"iso-date-time":nn(bS(),AS),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:l3,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:y3,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:d3,int32:{type:"number",validate:m3},int64:{type:"number",validate:g3},float:{type:"number",validate:wS},double:{type:"number",validate:wS},password:!0,binary:!0};on.fastFormats={...on.fullFormats,date:nn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Om),time:nn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Bm),"date-time":nn(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,PS),"iso-time":nn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ES),"iso-date-time":nn(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,AS),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};on.formatNames=Object.keys(on.fullFormats);function i3(e){return e%4===0&&(e%100!==0||e%400===0)}var s3=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,a3=[0,31,28,31,30,31,30,31,31,30,31,30,31];function SS(e){let t=s3.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&i3(r)?29:a3[n])}function Om(e,t){if(e&&t)return e>t?1:e<t?-1:0}var km=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function $m(e){return function(r){let n=km.exec(r);if(!n)return!1;let o=+n[1],s=+n[2],i=+n[3],a=n[4],u=n[5]==="-"?-1:1,c=+(n[6]||0),l=+(n[7]||0);if(c>23||l>59||e&&!a)return!1;if(o<=23&&s<=59&&i<60)return!0;let d=s-l*u,p=o-c*u-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&i<61}}function Bm(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function ES(e,t){if(!(e&&t))return;let r=km.exec(e),n=km.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var Nm=/t|\s/i;function bS(e){let t=$m(e);return function(n){let o=n.split(Nm);return o.length===2&&SS(o[0])&&t(o[1])}}function PS(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function AS(e,t){if(!(e&&t))return;let[r,n]=e.split(Nm),[o,s]=t.split(Nm),i=Om(r,o);if(i!==void 0)return i||Bm(n,s)}var u3=/\/|:/,c3=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function l3(e){return u3.test(e)&&c3.test(e)}var xS=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function d3(e){return xS.lastIndex=0,xS.test(e)}var p3=-(2**31),f3=2**31-1;function m3(e){return Number.isInteger(e)&&e<=f3&&e>=p3}function g3(e){return Number.isInteger(e)}function wS(){return!0}var h3=/[^\\]\\Z/;function y3(e){if(h3.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var FS=E(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.formatLimitDefinition=void 0;var D3=Im(),Pr=te(),Zn=Pr.operators,Uc={formatMaximum:{okStr:"<=",ok:Zn.LTE,fail:Zn.GT},formatMinimum:{okStr:">=",ok:Zn.GTE,fail:Zn.LT},formatExclusiveMaximum:{okStr:"<",ok:Zn.LT,fail:Zn.GTE},formatExclusiveMinimum:{okStr:">",ok:Zn.GT,fail:Zn.LTE}},v3={message:({keyword:e,schemaCode:t})=>(0,Pr.str)`should be ${Uc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Pr._)`{comparison: ${Uc[e].okStr}, limit: ${t}}`};es.formatLimitDefinition={keyword:Object.keys(Uc),type:"string",schemaType:"string",$data:!0,error:v3,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:s}=e,{opts:i,self:a}=s;if(!i.validateFormats)return;let u=new D3.KeywordCxt(s,a.RULES.all.format.definition,"format");u.$data?c():l();function c(){let p=t.scopeValue("formats",{ref:a.formats,code:i.code.formats}),h=t.const("fmt",(0,Pr._)`${p}[${u.schemaCode}]`);e.fail$data((0,Pr.or)((0,Pr._)`typeof ${h} != "object"`,(0,Pr._)`${h} instanceof RegExp`,(0,Pr._)`typeof ${h}.compare != "function"`,d(h)))}function l(){let p=u.schema,h=a.formats[p];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${p}" does not define "compare" function`);let m=t.scopeValue("formats",{key:p,ref:h,code:i.code.formats?(0,Pr._)`${i.code.formats}${(0,Pr.getProperty)(p)}`:void 0});e.fail$data(d(m))}function d(p){return(0,Pr._)`${p}.compare(${r}, ${n}) ${Uc[o].fail} 0`}},dependencies:["format"]};var C3=e=>(e.addKeyword(es.formatLimitDefinition),e);es.default=C3});var kS=E((Fa,IS)=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});var ts=TS(),b3=FS(),Mm=te(),_S=new Mm.Name("fullFormats"),x3=new Mm.Name("fastFormats"),Lm=(e,t={keywords:!0})=>{if(Array.isArray(t))return RS(e,t,ts.fullFormats,_S),e;let[r,n]=t.mode==="fast"?[ts.fastFormats,x3]:[ts.fullFormats,_S],o=t.formats||ts.formatNames;return RS(e,o,r,n),t.keywords&&(0,b3.default)(e),e};Lm.get=(e,t="full")=>{let n=(t==="fast"?ts.fastFormats:ts.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function RS(e,t,r,n){var o,s;(o=(s=e.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,Mm._)`require("ajv-formats/dist/formats").${n}`);for(let i of t)e.addFormat(i,r[i])}IS.exports=Fa=Lm;Object.defineProperty(Fa,"__esModule",{value:!0});Fa.default=Lm});var w3,S3,$S=v(()=>{w3=Me(Im(),1),S3=Me(kS(),1)});var NS=v(()=>{Vx();sc();$S()});var jS=E((fY,LS)=>{LS.exports=MS;MS.sync=P3;var OS=re("fs");function E3(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function BS(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:E3(t,r)}function MS(e,t,r){OS.stat(e,function(n,o){r(n,n?!1:BS(o,e,t))})}function P3(e,t){return BS(OS.statSync(e),e,t)}});var qS=E((mY,HS)=>{HS.exports=VS;VS.sync=A3;var US=re("fs");function VS(e,t,r){US.stat(e,function(n,o){r(n,n?!1:GS(o,t))})}function A3(e,t){return GS(US.statSync(e),t)}function GS(e,t){return e.isFile()&&T3(e,t)}function T3(e,t){var r=e.mode,n=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),l=a|u,d=r&c||r&u&&o===i||r&a&&n===s||r&l&&s===0;return d}});var KS=E((hY,zS)=>{var gY=re("fs"),Vc;process.platform==="win32"||global.TESTING_WINDOWS?Vc=jS():Vc=qS();zS.exports=jm;jm.sync=F3;function jm(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){jm(e,t||{},function(s,i){s?o(s):n(i)})})}Vc(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function F3(e,t){try{return Vc.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var eE=E((yY,XS)=>{var rs=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",WS=re("path"),_3=rs?";":":",JS=KS(),YS=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),QS=(e,t)=>{let r=t.colon||_3,n=e.match(/\//)||rs&&e.match(/\\/)?[""]:[...rs?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=rs?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=rs?o.split(r):[""];return rs&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:o}},ZS=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:s}=QS(e,t),i=[],a=c=>new Promise((l,d)=>{if(c===n.length)return t.all&&i.length?l(i):d(YS(e));let p=n[c],h=/^".*"$/.test(p)?p.slice(1,-1):p,m=WS.join(h,e),g=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+m:m;l(u(g,c,0))}),u=(c,l,d)=>new Promise((p,h)=>{if(d===o.length)return p(a(l+1));let m=o[d];JS(c+m,{pathExt:s},(g,y)=>{if(!g&&y)if(t.all)i.push(c+m);else return p(c+m);return p(u(c,l,d+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},R3=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=QS(e,t),s=[];for(let i=0;i<r.length;i++){let a=r[i],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=WS.join(u,e),l=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let d=0;d<n.length;d++){let p=l+n[d];try{if(JS.sync(p,{pathExt:o}))if(t.all)s.push(p);else return p}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw YS(e)};XS.exports=ZS;ZS.sync=R3});var rE=E((DY,Um)=>{"use strict";var tE=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Um.exports=tE;Um.exports.default=tE});var sE=E((vY,iE)=>{"use strict";var nE=re("path"),I3=eE(),k3=rE();function oE(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=I3.sync(e.command,{path:r[k3({env:r})],pathExt:t?nE.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return i&&(i=nE.resolve(o?e.options.cwd:"",i)),i}function $3(e){return oE(e)||oE(e,!0)}iE.exports=$3});var aE=E((CY,Gm)=>{"use strict";var Vm=/([()\][%!^"`<>&|;, *?])/g;function N3(e){return e=e.replace(Vm,"^$1"),e}function O3(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Vm,"^$1"),t&&(e=e.replace(Vm,"^$1")),e}Gm.exports.command=N3;Gm.exports.argument=O3});var cE=E((bY,uE)=>{"use strict";uE.exports=/^#!(.*)/});var dE=E((xY,lE)=>{"use strict";var B3=cE();lE.exports=(e="")=>{let t=e.match(B3);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var fE=E((wY,pE)=>{"use strict";var Hm=re("fs"),M3=dE();function L3(e){let r=Buffer.alloc(150),n;try{n=Hm.openSync(e,"r"),Hm.readSync(n,r,0,150,0),Hm.closeSync(n)}catch{}return M3(r.toString())}pE.exports=L3});var yE=E((SY,hE)=>{"use strict";var j3=re("path"),mE=sE(),gE=aE(),U3=fE(),V3=process.platform==="win32",G3=/\.(?:com|exe)$/i,H3=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function q3(e){e.file=mE(e);let t=e.file&&U3(e.file);return t?(e.args.unshift(e.file),e.command=t,mE(e)):e.file}function z3(e){if(!V3)return e;let t=q3(e),r=!G3.test(t);if(e.options.forceShell||r){let n=H3.test(t);e.command=j3.normalize(e.command),e.command=gE.command(e.command),e.args=e.args.map(s=>gE.argument(s,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function K3(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:z3(n)}hE.exports=K3});var CE=E((EY,vE)=>{"use strict";var qm=process.platform==="win32";function zm(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function W3(e,t){if(!qm)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let s=DE(o,t);if(s)return r.call(e,"error",s)}return r.apply(e,arguments)}}function DE(e,t){return qm&&e===1&&!t.file?zm(t.original,"spawn"):null}function J3(e,t){return qm&&e===1&&!t.file?zm(t.original,"spawnSync"):null}vE.exports={hookChildProcess:W3,verifyENOENT:DE,verifyENOENTSync:J3,notFoundError:zm}});var wE=E((PY,ns)=>{"use strict";var bE=re("child_process"),Km=yE(),Wm=CE();function xE(e,t,r){let n=Km(e,t,r),o=bE.spawn(n.command,n.args,n.options);return Wm.hookChildProcess(o,n),o}function Y3(e,t,r){let n=Km(e,t,r),o=bE.spawnSync(n.command,n.args,n.options);return o.error=o.error||Wm.verifyENOENTSync(o.status,n),o}ns.exports=xE;ns.exports.spawn=xE;ns.exports.sync=Y3;ns.exports._parse=Km;ns.exports._enoent=Wm});var SE=v(()=>{sc()});import Z3 from"node:process";var Q3,kY,EE=v(()=>{Q3=Me(wE(),1);SE();kY=Z3.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"]});var PE=E((NY,X3)=>{X3.exports={name:"dotenv",version:"16.3.2",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var _E=E((OY,En)=>{var AE=re("fs"),Jm=re("path"),ej=re("os"),tj=re("crypto"),rj=PE(),Ym=rj.version,nj=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function oj(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
|
|
1502
|
-
`);let n;for(;(n=
|
|
1503
|
-
`),s=s.replace(/\\r/g,"\r")),t[o]=s}return t}function
|
|
1504
|
-
`);let D=0,
|
|
1505
|
-
`).length+1)),process.stdout.write(
|
|
1506
|
-
`).length));let A=`${
|
|
1507
|
-
`).length+1)),process.stdout.write(
|
|
1508
|
-
`).length)),process.stdout.write(`${
|
|
1509
|
-
`),i=o,d()};return{start:p,stop:h,message:(y="")=>{o=y??o},extra:(y="")=>{s=y}}},Xm=Qm(),
|
|
1510
|
-
`+(0,sn.dim)("ESC to interrupt")});import*as fr from"typescript";function og(e){return!(e.category!==fr.DiagnosticCategory.Error||!e.file||e.code===6133||e.code===6138||e.code===6305||e.code===6196||e.code===6192||e.code===6198||e.code===6199||e.code===6205||e.code===1449||e.code===2578||e.code===7006||e.code===5074||e.code===7026||e.code===2503||e.code===2695||e.code===2322)}var
|
|
1511
|
-
|
|
1512
|
-
${
|
|
1501
|
+
deps: ${r}}`};var XM={keyword:"dependencies",type:"object",schemaType:"object",error:rn.error,code(e){let[t,r]=eL(e);zw(e,t),qw(e,r)}};function eL({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function zw(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let u=(0,Fa.propertyInData)(r,n,i,o.opts.ownProperties);e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(u,()=>{for(let c of a)(0,Fa.checkReportMissingProp)(e,c)}):(r.if((0,pm._)`${u} && (${(0,Fa.checkMissingProp)(e,a,s)})`),(0,Fa.reportMissingProp)(e,s),r.else())}}rn.validatePropertyDeps=zw;function qw(e,t=e.schema){let{gen:r,data:n,keyword:o,it:s}=e,i=r.name("valid");for(let a in t)(0,ZM.alwaysValidSchema)(s,t[a])||(r.if((0,Fa.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let u=e.subschema({keyword:o,schemaProp:a},i);e.mergeValidEvaluated(u,i)},()=>r.var(i,!0)),e.ok(i))}rn.validateSchemaDeps=qw;rn.default=XM});var Jw=E(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var Ww=re(),tL=ye(),rL={message:"property name must be valid",params:({params:e})=>(0,Ww._)`{propertyName: ${e.propertyName}}`},nL={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:rL,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,tL.alwaysValidSchema)(o,r))return;let s=t.name("valid");t.forIn("key",n,i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),t.if((0,Ww.not)(s),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(s)}};fm.default=nL});var gm=E(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var Nc=lr(),Er=re(),oL=xn(),Oc=ye(),iL={message:"must NOT have additional properties",params:({params:e})=>(0,Er._)`{additionalProperty: ${e.additionalProperty}}`},sL={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:iL,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,Oc.alwaysValidSchema)(i,r))return;let c=(0,Nc.allSchemaProperties)(n.properties),l=(0,Nc.allSchemaProperties)(n.patternProperties);d(),e.ok((0,Er._)`${s} === ${oL.default.errors}`);function d(){t.forIn("key",o,y=>{!c.length&&!l.length?g(y):t.if(p(y),()=>g(y))})}function p(y){let D;if(c.length>8){let w=(0,Oc.schemaRefOrVal)(i,n.properties,"properties");D=(0,Nc.isOwnProperty)(t,w,y)}else c.length?D=(0,Er.or)(...c.map(w=>(0,Er._)`${y} === ${w}`)):D=Er.nil;return l.length&&(D=(0,Er.or)(D,...l.map(w=>(0,Er._)`${(0,Nc.usePattern)(e,w)}.test(${y})`))),(0,Er.not)(D)}function h(y){t.code((0,Er._)`delete ${o}[${y}]`)}function g(y){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){h(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Oc.alwaysValidSchema)(i,r)){let D=t.name("valid");u.removeAdditional==="failing"?(m(y,D,!1),t.if((0,Er.not)(D),()=>{e.reset(),h(y)})):(m(y,D),a||t.if((0,Er.not)(D),()=>t.break()))}}function m(y,D,w){let S={keyword:"additionalProperties",dataProp:y,dataPropType:Oc.Type.Str};w===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,D)}}};mm.default=sL});var Zw=E(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var aL=ga(),Yw=lr(),hm=ye(),Qw=gm(),uL={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Qw.default.code(new aL.KeywordCxt(s,Qw.default,"additionalProperties"));let i=(0,Yw.allSchemaProperties)(r);for(let d of i)s.definedProperties.add(d);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=hm.mergeEvaluated.props(t,(0,hm.toHash)(i),s.props));let a=i.filter(d=>!(0,hm.alwaysValidSchema)(s,r[d]));if(a.length===0)return;let u=t.name("valid");for(let d of a)c(d)?l(d):(t.if((0,Yw.propertyInData)(t,o,d,s.opts.ownProperties)),l(d),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(u);function c(d){return s.opts.useDefaults&&!s.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},u)}}};ym.default=uL});var rS=E(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var Xw=lr(),Bc=re(),eS=ye(),tS=ye(),cL={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=(0,Xw.allSchemaProperties)(r),u=a.filter(m=>(0,eS.alwaysValidSchema)(s,r[m]));if(a.length===0||u.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let c=i.strictSchema&&!i.allowMatchingProperties&&o.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof Bc.Name)&&(s.props=(0,tS.evaluatedPropsToName)(t,s.props));let{props:d}=s;p();function p(){for(let m of a)c&&h(m),s.allErrors?g(m):(t.var(l,!0),g(m),t.if(l))}function h(m){for(let y in c)new RegExp(m).test(y)&&(0,eS.checkStrictMode)(s,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function g(m){t.forIn("key",n,y=>{t.if((0,Bc._)`${(0,Xw.usePattern)(e,m)}.test(${y})`,()=>{let D=u.includes(m);D||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:tS.Type.Str},l),s.opts.unevaluated&&d!==!0?t.assign((0,Bc._)`${d}[${y}]`,!0):!D&&!s.allErrors&&t.if((0,Bc.not)(l),()=>t.break())})})}}};Dm.default=cL});var nS=E(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var lL=ye(),dL={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,lL.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};vm.default=dL});var oS=E(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var pL=lr(),fL={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:pL.validateUnion,error:{message:"must match a schema in anyOf"}};Cm.default=fL});var iS=E(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var Mc=re(),mL=ye(),gL={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Mc._)`{passingSchemas: ${e.passing}}`},hL={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:gL,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,i=t.let("valid",!1),a=t.let("passing",null),u=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(i,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,d)=>{let p;(0,mL.alwaysValidSchema)(o,l)?t.var(u,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},u),d>0&&t.if((0,Mc._)`${u} && ${i}`).assign(i,!1).assign(a,(0,Mc._)`[${a}, ${d}]`).else(),t.if(u,()=>{t.assign(i,!0),t.assign(a,d),p&&e.mergeEvaluated(p,Mc.Name)})})}}};bm.default=hL});var sS=E(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var yL=ye(),DL={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((s,i)=>{if((0,yL.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:i},o);e.ok(o),e.mergeEvaluated(a)})}};xm.default=DL});var cS=E(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});var Lc=re(),uS=ye(),vL={message:({params:e})=>(0,Lc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Lc._)`{failingKeyword: ${e.ifClause}}`},CL={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:vL,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,uS.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=aS(n,"then"),s=aS(n,"else");if(!o&&!s)return;let i=t.let("valid",!0),a=t.name("_valid");if(u(),e.reset(),o&&s){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else o?t.if(a,c("then")):t.if((0,Lc.not)(a),c("else"));e.pass(i,()=>e.error(!0));function u(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,d){return()=>{let p=e.subschema({keyword:l},a);t.assign(i,a),e.mergeValidEvaluated(p,i),d?t.assign(d,(0,Lc._)`${l}`):e.setParams({ifClause:l})}}}};function aS(e,t){let r=e.schema[t];return r!==void 0&&!(0,uS.alwaysValidSchema)(e,r)}wm.default=CL});var lS=E(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var bL=ye(),xL={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,bL.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Sm.default=xL});var dS=E(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var wL=am(),SL=Uw(),EL=um(),PL=Hw(),AL=Gw(),TL=Kw(),FL=Jw(),_L=gm(),RL=Zw(),IL=rS(),kL=nS(),$L=oS(),NL=iS(),OL=sS(),BL=cS(),ML=lS();function LL(e=!1){let t=[kL.default,$L.default,NL.default,OL.default,BL.default,ML.default,FL.default,_L.default,TL.default,RL.default,IL.default];return e?t.push(SL.default,PL.default):t.push(wL.default,EL.default),t.push(AL.default),t}Em.default=LL});var pS=E(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var Ue=re(),jL={message:({schemaCode:e})=>(0,Ue.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ue._)`{format: ${e}}`},UL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:jL,code(e,t){let{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:u,errSchemaPath:c,schemaEnv:l,self:d}=a;if(!u.validateFormats)return;o?p():h();function p(){let g=r.scopeValue("formats",{ref:d.formats,code:u.code.formats}),m=r.const("fDef",(0,Ue._)`${g}[${i}]`),y=r.let("fType"),D=r.let("format");r.if((0,Ue._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,Ue._)`${m}.type || "string"`).assign(D,(0,Ue._)`${m}.validate`),()=>r.assign(y,(0,Ue._)`"string"`).assign(D,m)),e.fail$data((0,Ue.or)(w(),S()));function w(){return u.strictSchema===!1?Ue.nil:(0,Ue._)`${i} && !${D}`}function S(){let F=l.$async?(0,Ue._)`(${m}.async ? await ${D}(${n}) : ${D}(${n}))`:(0,Ue._)`${D}(${n})`,A=(0,Ue._)`(typeof ${D} == "function" ? ${F} : ${D}.test(${n}))`;return(0,Ue._)`${D} && ${D} !== true && ${y} === ${t} && !${A}`}}function h(){let g=d.formats[s];if(!g){w();return}if(g===!0)return;let[m,y,D]=S(g);m===t&&e.pass(F());function w(){if(u.strictSchema===!1){d.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function S(A){let _=A instanceof RegExp?(0,Ue.regexpCode)(A):u.code.formats?(0,Ue._)`${u.code.formats}${(0,Ue.getProperty)(s)}`:void 0,k=r.scopeValue("formats",{key:s,ref:A,code:_});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,Ue._)`${k}.validate`]:["string",A,k]}function F(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ue._)`await ${D}(${n})`}return typeof y=="function"?(0,Ue._)`${D}(${n})`:(0,Ue._)`${D}.test(${n})`}}}};Pm.default=UL});var fS=E(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var VL=pS(),HL=[VL.default];Am.default=HL});var mS=E(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.contentVocabulary=Qi.metadataVocabulary=void 0;Qi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Qi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var hS=E(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var GL=ww(),zL=Bw(),qL=dS(),KL=fS(),gS=mS(),WL=[GL.default,zL.default,(0,qL.default)(),KL.default,gS.metadataVocabulary,gS.contentVocabulary];Tm.default=WL});var DS=E(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.DiscrError=void 0;var yS;(function(e){e.Tag="tag",e.Mapping="mapping"})(yS||(jc.DiscrError=yS={}))});var CS=E(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var Zi=re(),Fm=DS(),vS=xc(),JL=ha(),YL=ye(),QL={message:({params:{discrError:e,tagName:t}})=>e===Fm.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Zi._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},ZL={keyword:"discriminator",type:"object",schemaType:"object",error:QL,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let u=t.let("valid",!1),c=t.const("tag",(0,Zi._)`${r}${(0,Zi.getProperty)(a)}`);t.if((0,Zi._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:Fm.DiscrError.Tag,tag:c,tagName:a})),e.ok(u);function l(){let h=p();t.if(!1);for(let g in h)t.elseIf((0,Zi._)`${c} === ${g}`),t.assign(u,d(h[g]));t.else(),e.error(!1,{discrError:Fm.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function d(h){let g=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:h},g);return e.mergeEvaluated(m,Zi.Name),g}function p(){var h;let g={},m=D(o),y=!0;for(let F=0;F<i.length;F++){let A=i[F];if(A?.$ref&&!(0,YL.schemaHasRulesButRef)(A,s.self.RULES)){let k=A.$ref;if(A=vS.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,k),A instanceof vS.SchemaEnv&&(A=A.schema),A===void 0)throw new JL.default(s.opts.uriResolver,s.baseId,k)}let _=(h=A?.properties)===null||h===void 0?void 0:h[a];if(typeof _!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(m||D(A)),w(_,F)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return g;function D({required:F}){return Array.isArray(F)&&F.includes(a)}function w(F,A){if(F.const)S(F.const,A);else if(F.enum)for(let _ of F.enum)S(_,A);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(F,A){if(typeof F!="string"||F in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[F]=A}}}};_m.default=ZL});var bS=E((iY,XL)=>{XL.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Im=E((Ie,Rm)=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.MissingRefError=Ie.ValidationError=Ie.CodeGen=Ie.Name=Ie.nil=Ie.stringify=Ie.str=Ie._=Ie.KeywordCxt=Ie.Ajv=void 0;var e3=yw(),t3=hS(),r3=CS(),xS=bS(),n3=["/properties"],Uc="http://json-schema.org/draft-07/schema",Xi=class extends e3.default{_addVocabularies(){super._addVocabularies(),t3.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(r3.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(xS,n3):xS;this.addMetaSchema(t,Uc,!1),this.refs["http://json-schema.org/schema"]=Uc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Uc)?Uc:void 0)}};Ie.Ajv=Xi;Rm.exports=Ie=Xi;Rm.exports.Ajv=Xi;Object.defineProperty(Ie,"__esModule",{value:!0});Ie.default=Xi;var o3=ga();Object.defineProperty(Ie,"KeywordCxt",{enumerable:!0,get:function(){return o3.KeywordCxt}});var es=re();Object.defineProperty(Ie,"_",{enumerable:!0,get:function(){return es._}});Object.defineProperty(Ie,"str",{enumerable:!0,get:function(){return es.str}});Object.defineProperty(Ie,"stringify",{enumerable:!0,get:function(){return es.stringify}});Object.defineProperty(Ie,"nil",{enumerable:!0,get:function(){return es.nil}});Object.defineProperty(Ie,"Name",{enumerable:!0,get:function(){return es.Name}});Object.defineProperty(Ie,"CodeGen",{enumerable:!0,get:function(){return es.CodeGen}});var i3=Cc();Object.defineProperty(Ie,"ValidationError",{enumerable:!0,get:function(){return i3.default}});var s3=ha();Object.defineProperty(Ie,"MissingRefError",{enumerable:!0,get:function(){return s3.default}})});var _S=E(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.formatNames=on.fastFormats=on.fullFormats=void 0;function nn(e,t){return{validate:e,compare:t}}on.fullFormats={date:nn(PS,Om),time:nn($m(!0),Bm),"date-time":nn(wS(!0),TS),"iso-time":nn($m(),AS),"iso-date-time":nn(wS(),FS),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p3,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:v3,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:f3,int32:{type:"number",validate:h3},int64:{type:"number",validate:y3},float:{type:"number",validate:ES},double:{type:"number",validate:ES},password:!0,binary:!0};on.fastFormats={...on.fullFormats,date:nn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Om),time:nn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Bm),"date-time":nn(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,TS),"iso-time":nn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,AS),"iso-date-time":nn(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,FS),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};on.formatNames=Object.keys(on.fullFormats);function a3(e){return e%4===0&&(e%100!==0||e%400===0)}var u3=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,c3=[0,31,28,31,30,31,30,31,31,30,31,30,31];function PS(e){let t=u3.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&a3(r)?29:c3[n])}function Om(e,t){if(e&&t)return e>t?1:e<t?-1:0}var km=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function $m(e){return function(r){let n=km.exec(r);if(!n)return!1;let o=+n[1],s=+n[2],i=+n[3],a=n[4],u=n[5]==="-"?-1:1,c=+(n[6]||0),l=+(n[7]||0);if(c>23||l>59||e&&!a)return!1;if(o<=23&&s<=59&&i<60)return!0;let d=s-l*u,p=o-c*u-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&i<61}}function Bm(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function AS(e,t){if(!(e&&t))return;let r=km.exec(e),n=km.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var Nm=/t|\s/i;function wS(e){let t=$m(e);return function(n){let o=n.split(Nm);return o.length===2&&PS(o[0])&&t(o[1])}}function TS(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function FS(e,t){if(!(e&&t))return;let[r,n]=e.split(Nm),[o,s]=t.split(Nm),i=Om(r,o);if(i!==void 0)return i||Bm(n,s)}var l3=/\/|:/,d3=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function p3(e){return l3.test(e)&&d3.test(e)}var SS=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function f3(e){return SS.lastIndex=0,SS.test(e)}var m3=-(2**31),g3=2**31-1;function h3(e){return Number.isInteger(e)&&e<=g3&&e>=m3}function y3(e){return Number.isInteger(e)}function ES(){return!0}var D3=/[^\\]\\Z/;function v3(e){if(D3.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var RS=E(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.formatLimitDefinition=void 0;var C3=Im(),Pr=re(),Zn=Pr.operators,Vc={formatMaximum:{okStr:"<=",ok:Zn.LTE,fail:Zn.GT},formatMinimum:{okStr:">=",ok:Zn.GTE,fail:Zn.LT},formatExclusiveMaximum:{okStr:"<",ok:Zn.LT,fail:Zn.GTE},formatExclusiveMinimum:{okStr:">",ok:Zn.GT,fail:Zn.LTE}},b3={message:({keyword:e,schemaCode:t})=>(0,Pr.str)`should be ${Vc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Pr._)`{comparison: ${Vc[e].okStr}, limit: ${t}}`};ts.formatLimitDefinition={keyword:Object.keys(Vc),type:"string",schemaType:"string",$data:!0,error:b3,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:s}=e,{opts:i,self:a}=s;if(!i.validateFormats)return;let u=new C3.KeywordCxt(s,a.RULES.all.format.definition,"format");u.$data?c():l();function c(){let p=t.scopeValue("formats",{ref:a.formats,code:i.code.formats}),h=t.const("fmt",(0,Pr._)`${p}[${u.schemaCode}]`);e.fail$data((0,Pr.or)((0,Pr._)`typeof ${h} != "object"`,(0,Pr._)`${h} instanceof RegExp`,(0,Pr._)`typeof ${h}.compare != "function"`,d(h)))}function l(){let p=u.schema,h=a.formats[p];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${p}" does not define "compare" function`);let g=t.scopeValue("formats",{key:p,ref:h,code:i.code.formats?(0,Pr._)`${i.code.formats}${(0,Pr.getProperty)(p)}`:void 0});e.fail$data(d(g))}function d(p){return(0,Pr._)`${p}.compare(${r}, ${n}) ${Vc[o].fail} 0`}},dependencies:["format"]};var x3=e=>(e.addKeyword(ts.formatLimitDefinition),e);ts.default=x3});var NS=E((_a,$S)=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var rs=_S(),w3=RS(),Mm=re(),IS=new Mm.Name("fullFormats"),S3=new Mm.Name("fastFormats"),Lm=(e,t={keywords:!0})=>{if(Array.isArray(t))return kS(e,t,rs.fullFormats,IS),e;let[r,n]=t.mode==="fast"?[rs.fastFormats,S3]:[rs.fullFormats,IS],o=t.formats||rs.formatNames;return kS(e,o,r,n),t.keywords&&(0,w3.default)(e),e};Lm.get=(e,t="full")=>{let n=(t==="fast"?rs.fastFormats:rs.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function kS(e,t,r,n){var o,s;(o=(s=e.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,Mm._)`require("ajv-formats/dist/formats").${n}`);for(let i of t)e.addFormat(i,r[i])}$S.exports=_a=Lm;Object.defineProperty(_a,"__esModule",{value:!0});_a.default=Lm});var E3,P3,OS=v(()=>{E3=Me(Im(),1),P3=Me(NS(),1)});var BS=v(()=>{Gx();ac();OS()});var VS=E((DY,US)=>{US.exports=jS;jS.sync=T3;var MS=Q("fs");function A3(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function LS(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:A3(t,r)}function jS(e,t,r){MS.stat(e,function(n,o){r(n,n?!1:LS(o,e,t))})}function T3(e,t){return LS(MS.statSync(e),e,t)}});var KS=E((vY,qS)=>{qS.exports=GS;GS.sync=F3;var HS=Q("fs");function GS(e,t,r){HS.stat(e,function(n,o){r(n,n?!1:zS(o,t))})}function F3(e,t){return zS(HS.statSync(e),t)}function zS(e,t){return e.isFile()&&_3(e,t)}function _3(e,t){var r=e.mode,n=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),l=a|u,d=r&c||r&u&&o===i||r&a&&n===s||r&l&&s===0;return d}});var JS=E((bY,WS)=>{var CY=Q("fs"),Hc;process.platform==="win32"||global.TESTING_WINDOWS?Hc=VS():Hc=KS();WS.exports=jm;jm.sync=R3;function jm(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){jm(e,t||{},function(s,i){s?o(s):n(i)})})}Hc(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function R3(e,t){try{return Hc.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var rE=E((xY,tE)=>{var ns=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",YS=Q("path"),I3=ns?";":":",QS=JS(),ZS=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),XS=(e,t)=>{let r=t.colon||I3,n=e.match(/\//)||ns&&e.match(/\\/)?[""]:[...ns?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=ns?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=ns?o.split(r):[""];return ns&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:o}},eE=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:s}=XS(e,t),i=[],a=c=>new Promise((l,d)=>{if(c===n.length)return t.all&&i.length?l(i):d(ZS(e));let p=n[c],h=/^".*"$/.test(p)?p.slice(1,-1):p,g=YS.join(h,e),m=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;l(u(m,c,0))}),u=(c,l,d)=>new Promise((p,h)=>{if(d===o.length)return p(a(l+1));let g=o[d];QS(c+g,{pathExt:s},(m,y)=>{if(!m&&y)if(t.all)i.push(c+g);else return p(c+g);return p(u(c,l,d+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},k3=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=XS(e,t),s=[];for(let i=0;i<r.length;i++){let a=r[i],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=YS.join(u,e),l=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let d=0;d<n.length;d++){let p=l+n[d];try{if(QS.sync(p,{pathExt:o}))if(t.all)s.push(p);else return p}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw ZS(e)};tE.exports=eE;eE.sync=k3});var oE=E((wY,Um)=>{"use strict";var nE=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Um.exports=nE;Um.exports.default=nE});var uE=E((SY,aE)=>{"use strict";var iE=Q("path"),$3=rE(),N3=oE();function sE(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=$3.sync(e.command,{path:r[N3({env:r})],pathExt:t?iE.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return i&&(i=iE.resolve(o?e.options.cwd:"",i)),i}function O3(e){return sE(e)||sE(e,!0)}aE.exports=O3});var cE=E((EY,Hm)=>{"use strict";var Vm=/([()\][%!^"`<>&|;, *?])/g;function B3(e){return e=e.replace(Vm,"^$1"),e}function M3(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Vm,"^$1"),t&&(e=e.replace(Vm,"^$1")),e}Hm.exports.command=B3;Hm.exports.argument=M3});var dE=E((PY,lE)=>{"use strict";lE.exports=/^#!(.*)/});var fE=E((AY,pE)=>{"use strict";var L3=dE();pE.exports=(e="")=>{let t=e.match(L3);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var gE=E((TY,mE)=>{"use strict";var Gm=Q("fs"),j3=fE();function U3(e){let r=Buffer.alloc(150),n;try{n=Gm.openSync(e,"r"),Gm.readSync(n,r,0,150,0),Gm.closeSync(n)}catch{}return j3(r.toString())}mE.exports=U3});var vE=E((FY,DE)=>{"use strict";var V3=Q("path"),hE=uE(),yE=cE(),H3=gE(),G3=process.platform==="win32",z3=/\.(?:com|exe)$/i,q3=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function K3(e){e.file=hE(e);let t=e.file&&H3(e.file);return t?(e.args.unshift(e.file),e.command=t,hE(e)):e.file}function W3(e){if(!G3)return e;let t=K3(e),r=!z3.test(t);if(e.options.forceShell||r){let n=q3.test(t);e.command=V3.normalize(e.command),e.command=yE.command(e.command),e.args=e.args.map(s=>yE.argument(s,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function J3(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:W3(n)}DE.exports=J3});var xE=E((_Y,bE)=>{"use strict";var zm=process.platform==="win32";function qm(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Y3(e,t){if(!zm)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let s=CE(o,t);if(s)return r.call(e,"error",s)}return r.apply(e,arguments)}}function CE(e,t){return zm&&e===1&&!t.file?qm(t.original,"spawn"):null}function Q3(e,t){return zm&&e===1&&!t.file?qm(t.original,"spawnSync"):null}bE.exports={hookChildProcess:Y3,verifyENOENT:CE,verifyENOENTSync:Q3,notFoundError:qm}});var EE=E((RY,os)=>{"use strict";var wE=Q("child_process"),Km=vE(),Wm=xE();function SE(e,t,r){let n=Km(e,t,r),o=wE.spawn(n.command,n.args,n.options);return Wm.hookChildProcess(o,n),o}function Z3(e,t,r){let n=Km(e,t,r),o=wE.spawnSync(n.command,n.args,n.options);return o.error=o.error||Wm.verifyENOENTSync(o.status,n),o}os.exports=SE;os.exports.spawn=SE;os.exports.sync=Z3;os.exports._parse=Km;os.exports._enoent=Wm});var PE=v(()=>{ac()});import ej from"node:process";var X3,MY,AE=v(()=>{X3=Me(EE(),1);PE();MY=ej.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"]});var TE=E((jY,tj)=>{tj.exports={name:"dotenv",version:"16.3.2",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var IE=E((UY,En)=>{var FE=Q("fs"),Jm=Q("path"),rj=Q("os"),nj=Q("crypto"),oj=TE(),Ym=oj.version,ij=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function sj(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
|
|
1502
|
+
`);let n;for(;(n=ij.exec(r))!=null;){let o=n[1],s=n[2]||"";s=s.trim();let i=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),i==='"'&&(s=s.replace(/\\n/g,`
|
|
1503
|
+
`),s=s.replace(/\\r/g,"\r")),t[o]=s}return t}function aj(e){let t=RE(e),r=Xe.configDotenv({path:t});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let n=_E(e).split(","),o=n.length,s;for(let i=0;i<o;i++)try{let a=n[i].trim(),u=lj(r,a);s=Xe.decrypt(u.ciphertext,u.key);break}catch(a){if(i+1>=o)throw a}return Xe.parse(s)}function uj(e){console.log(`[dotenv@${Ym}][INFO] ${e}`)}function cj(e){console.log(`[dotenv@${Ym}][WARN] ${e}`)}function Gc(e){console.log(`[dotenv@${Ym}][DEBUG] ${e}`)}function _E(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function lj(e,t){let r;try{r=new URL(t)}catch(a){throw a.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):a}let n=r.password;if(!n)throw new Error("INVALID_DOTENV_KEY: Missing key part");let o=r.searchParams.get("environment");if(!o)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);return{ciphertext:i,key:n}}function RE(e){let t=Jm.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}function dj(e){return e[0]==="~"?Jm.join(rj.homedir(),e.slice(1)):e}function pj(e){uj("Loading env from encrypted .env.vault");let t=Xe._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Xe.populate(r,t,e),{parsed:t}}function fj(e){let t=Jm.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&(e.path!=null&&(t=dj(e.path)),e.encoding!=null?r=e.encoding:n&&Gc("No encoding is specified. UTF-8 is used by default"));try{let o=Xe.parse(FE.readFileSync(t,{encoding:r})),s=process.env;return e&&e.processEnv!=null&&(s=e.processEnv),Xe.populate(s,o,e),{parsed:o}}catch(o){return n&&Gc(`Failed to load ${t} ${o.message}`),{error:o}}}function mj(e){let t=RE(e);return _E(e).length===0?Xe.configDotenv(e):FE.existsSync(t)?Xe._configVault(e):(cj(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Xe.configDotenv(e))}function gj(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),o=n.subarray(0,12),s=n.subarray(-16);n=n.subarray(12,-16);try{let i=nj.createDecipheriv("aes-256-gcm",r,o);return i.setAuthTag(s),`${i.update(n)}${i.final()}`}catch(i){let a=i instanceof RangeError,u=i.message==="Invalid key length",c=i.message==="Unsupported state or unable to authenticate data";if(a||u){let l="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(l)}else if(c){let l="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(l)}else throw console.error("Error: ",i.code),console.error("Error: ",i.message),i}}function hj(e,t,r={}){let n=!!(r&&r.debug),o=!!(r&&r.override);if(typeof t!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let s of Object.keys(t))Object.prototype.hasOwnProperty.call(e,s)?(o===!0&&(e[s]=t[s]),n&&Gc(o===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):e[s]=t[s]}var Xe={configDotenv:fj,_configVault:pj,_parseVault:aj,config:mj,decrypt:gj,parse:sj,populate:hj};En.exports.configDotenv=Xe.configDotenv;En.exports._configVault=Xe._configVault;En.exports._parseVault=Xe._parseVault;En.exports.config=Xe.config;En.exports.decrypt=Xe.decrypt;En.exports.parse=Xe.parse;En.exports.populate=Xe.populate;En.exports=Xe});import*as vj from"@sentry/node";var Cj,kE=v(()=>{"use strict";BS();AE();Su();Cj=Me(IE(),1);Rd()});var $E=v(()=>{"use strict"});var NE=v(()=>{"use strict"});var bj,XY,OE=v(()=>{"use strict";NE();bj=()=>{if(typeof globalThis<"u"&&globalThis.crypto)return globalThis.crypto;if(typeof Q<"u")try{let e=Q("crypto");if(e.webcrypto)return e.webcrypto}catch{}throw new Error("Web Crypto API is not available. Requires Node.js 15+ or a browser environment.")},XY=bj()});var BE=v(()=>{"use strict"});import hZ from"prettier";import DZ from"chokidar";var Wu=v(()=>{"use strict";Sd();kv();Ln();bi();fn();zr();Rd();$v();vo();zv();cx();lx();kd();Lt();xd();Ls();Ip();dx();np();Fu();Ns();kE();Md();$E();OE();BE();Ld();Ku();xi();wi();Bu();Rp()});import ME from"node:process";function Qm(){let{env:e}=ME,{TERM:t,TERM_PROGRAM:r}=e;return ME.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var LE=v(()=>{});var Zm,is,Ra,eg,Xm,zc,Sj,Ej,Pj,Aj,tg=v(()=>{"use strict";LE();Zm=Me(io(),1),is=Me(Ga(),1),Ra=Me(io(),1),eg=()=>{let e=Xm?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=Xm?80:120,r,n=!1,o="",s="",i="",a=y=>{let D=y>1?"Something went wrong":"Canceled";n&&h(D,y)},u=(y,D)=>{console.error(D,y),a(2)},c=()=>a(1),l=()=>{process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",a)},d=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",a)},p=(y="")=>{n=!0,o=y.replace(/\.+$/,""),process.stdout.write(`${Zm.default.gray(Sj)}
|
|
1504
|
+
`);let D=0,w=0;l(),process.env.CI||(r=setInterval(()=>{let S=Zm.default.magenta(e[D]),F=".".repeat(Math.floor(w)).slice(0,3);process.stdout.write(is.cursor.move(-999,-i.split(`
|
|
1505
|
+
`).length+1)),process.stdout.write(is.erase.down(i.split(`
|
|
1506
|
+
`).length));let A=`${S} ${o}${F}${s}`;process.stdout.write(A),D=D+1<e.length?D+1:0,w=w<e.length?w+.125:0,i=A},t))},h=(y,D=0)=>{o=y??o,n=!1,clearInterval(r);let w=D===0?(0,Ra.green)(Aj):D===1?(0,Ra.red)(Ej):(0,Ra.red)(Pj);process.stdout.write(is.cursor.move(-999,-i.split(`
|
|
1507
|
+
`).length+1)),process.stdout.write(is.erase.down(i.split(`
|
|
1508
|
+
`).length)),process.stdout.write(`${w} ${o}
|
|
1509
|
+
`),i=o,d()};return{start:p,stop:h,message:(y="")=>{o=y??o},extra:(y="")=>{s=y}}},Xm=Qm(),zc=(e,t)=>Xm?e:t,Sj=zc("\u2502","|"),Ej=zc("\u25A0","x"),Pj=zc("\u25B2","x"),Aj=zc("\u25C7","o")});async function rg(e){let{default:t}=await import("open");await t(e)}var ng=v(()=>{"use strict"});var jE=v(()=>{"use strict";Eu();Lt();Ip()});import*as Fj from"@sentry/node";var UE=v(()=>{"use strict";gt();Wu();Ln();fn();zr();vo();Lt()});var sn,TX,VE=v(()=>{"use strict";sn=Me(io(),1);Sd();Lt();Ln();bi();Ad();gt();Fr();Eu();Wu();xi();tg();Do();ng();jE();UE();TX=`
|
|
1510
|
+
`+(0,sn.dim)("ESC to interrupt")});import*as fr from"typescript";function og(e){return!(e.category!==fr.DiagnosticCategory.Error||!e.file||e.code===6133||e.code===6138||e.code===6305||e.code===6196||e.code===6192||e.code===6198||e.code===6199||e.code===6205||e.code===1449||e.code===2578||e.code===7006||e.code===5074||e.code===7026||e.code===2503||e.code===2695||e.code===2322)}var HE=v(()=>{"use strict"});import X from"typescript";async function _j(e,t,r){let n=[],o=[t],s=e.relative(e.getAppRootDir(),t.fileName);for(;o.length>0;){let i=o.shift();if(Nj(i,t)){let a=Ij(e,i,t,r),{line:u,character:c}=t.getLineAndCharacterOfPosition(i.getStart());a&&(a.loc=`${s}:${u+1}:${c+1}`,n.push(a))}o.push(...i.getChildren(t))}return n}function Ij(e,t,r,n){let[o]=t.arguments;if(!o)throw new Error("Invalid figmaMapping call, no arguments found");if(!X.isObjectLiteralExpression(o))throw new Error("Invalid figmaMapping call, argument is not an object literal");let s=o.properties;if(!s)throw new Error("Invalid figmaMapping call, argument has no properties");let i="",a,u,c,l="-",d=e.basename(r.fileName).replace(/\.mapper\.[tsxjm]+$/,""),p,h,g,m,y;if(t.typeArguments&&t.typeArguments.length>0){let k=GE(t.typeArguments[0].getText(r));k&&(d=k)}for(let k of s){let O=k.name?.getText(r);if(!O)throw new Error("Invalid figmaMapping call, property has no name");switch(O){case"componentName":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, componentName has no initializer");let $=k.initializer;if(!X.isStringLiteral($))throw new Error("Invalid figmaMapping call, componentName is not a string literal");a=$.text;break}case"url":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, url has no initializer");let $=k.initializer;if(!X.isStringLiteral($))throw new Error("Invalid figmaMapping call, url is not a string literal");m=$.text;break}case"componentKey":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, componentKey has no initializer");let $=k.initializer;if(!X.isStringLiteral($))throw new Error("Invalid figmaMapping call, componentKey is not a string literal");i=$.text;break}case"meta":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, meta has no initializer");let $=k.initializer;if(X.isObjectLiteralExpression($)){y={imports:[]};for(let R of $.properties)X.isPropertyAssignment(R)&&X.isIdentifier(R.name)&&R.name.text==="imports"&&X.isArrayLiteralExpression(R.initializer)&&(y.imports=R.initializer.elements.map(U=>{if(X.isStringLiteral(U))return U.text;if(X.isObjectLiteralExpression(U)){let G={};for(let K of U.properties)if(X.isPropertyAssignment(K)&&X.isIdentifier(K.name)){let x=K.name.text;X.isStringLiteral(K.initializer)&&(G[x]=K.initializer.text)}return G}return null}).filter(Boolean))}break}case"mapper":if(X.isMethodDeclaration(k)){let $=function(C){let G=n.getSymbolAtLocation(C)?.getDeclarations()?.[0];if(G){let K=$j(G);if(K?.importClause){let x=K.importClause.name?.getText(r);return x===l?(p="default",h=x):K.importClause.namedBindings&&X.isNamedImports(K.importClause.namedBindings)&&(p="named",K.importClause.namedBindings.elements.forEach(P=>{P.name.getText(r)===l&&(h=P.name.getText(r))})),h&&X.isStringLiteral(K.moduleSpecifier)&&(g=K.moduleSpecifier.text),!0}}return!1},R=function(C){if((X.isJsxOpeningElement(C)||X.isJsxSelfClosingElement(C))&&X.isIdentifier(C.tagName)){l=C.tagName.getText(r),$(C.tagName);return}else if(X.isTaggedTemplateExpression(C)&&X.isIdentifier(C.tag)&&(C.tag.escapedText==="html"||C.tag.escapedText==="tmpl")){if(X.isTemplateExpression(C.template)){let G=C.template.templateSpans.find(K=>X.isIdentifier(K.expression)&&kj(K.expression.text)&&$(K.expression));if(G&&X.isIdentifier(G.expression)){l=G.expression.text;return}}let U=C.template.getText(r).match(/^`\s*<([^\s]+)/);if(U){l=U[1];return}if(U=C.template.getText(r).match(/^`\s*([^\s]+)/),U){l=U[1];return}}else X.forEachChild(C,R)};var A=$,_=R;if(k.parameters&&k.parameters.length>0&&k.parameters[0]&&k.parameters[0].type){let C=k.parameters[0].type.getText(r),U=GE(C);U&&(d=U)}X.forEachChild(k,R),c=k.getText(r).replace(/^mapper/,"function Mapper"),u=ig(c);break}case"designTokenMapper":if(X.isMethodDeclaration(k)){c=k.getText(r).replace(/^designTokenMapper/,"function Mapper"),u=ig(c),i="design-tokens";break}case"genericMapper":if(X.isMethodDeclaration(k)){c=k.getText(r).replace(/^genericMapper/,"function Mapper"),u=ig(c),i="*";break}}}if(!i&&!m)throw new Error("Invalid figmaMapping call, no componentKey or url found");if(!i&&!u)throw new Error("Invalid figmaMapping call, no mapper found");if(!i&&!c)throw new Error("Invalid figmaMapping call, no original mapper found");let D=Mj(r),w=y?.imports??[],S=[],F=[];S.push(...D);for(let k of w)typeof k=="string"?F.push(k):S.push(k);return{builderName:l,figmaName:a??d,figmaKey:i,figmaUrl:m,inputMapper:u,exportType:p,importName:h,importPath:g,originalInputMapper:c,imports:S,importStrings:F.length>0?F:void 0,source:"cli"}}function kj(e){return e.charAt(0)===e.charAt(0).toUpperCase()}function ig(e){return X.transpile(e,{target:X.ScriptTarget.Latest,allowNonTsExtensions:!0,moduleResolution:X.ModuleResolutionKind.NodeJs,module:X.ModuleKind.CommonJS,noImplicitAny:!1,esModuleInterop:!0,noUnusedLocals:!1,noUnusedParameters:!1,jsx:X.JsxEmit.React,jsxFactory:"React.createElement",jsxFragmentFactory:"React.Fragment",allowJs:!0,checkJs:!0,strict:!0,suppressImplicitAnyIndexErrors:!0,typeRoots:["node_modules/@types"],inlineSources:!0,inlineSourceMap:!0})}function $j(e){let t=e;for(;t;){if(X.isImportDeclaration(t))return t;t=t.parent}}function Nj(e,t){return X.isCallExpression(e)&&e.expression.getText(t)===Rj}async function zE(e){let t=["node_modules","dist","build","public"];return(await e.readdirRecursive(e.getAppRootDir(),t)).filter(n=>Kt(n))}function GE(e){let t=e.match(/^Figma(\w+)Props$/);if(t&&typeof t[1]=="string")return t[1]}async function qE(e,t,r,n=!1){try{return r||(r=await vu(e)),(await r.setPublicApiKey({publicApiKey:t})).modifiedType==="permission-error"?{success:!1,error:"permission-error"}:(n&&await r.ensureFigmaImportPage(),{success:!0})}catch(o){let s="unknown-error";return o instanceof Error?s=o.message:typeof o=="string"&&(s=o),{success:!1,error:s}}}function Bj(e){return X.formatDiagnosticsWithColorAndContext(e,Oj)}async function KE({sys:e,mappingFiles:t,typeCheck:r}){if(e.Sentry?.setContext("findMappings",{mappingFiles:t}),!t.length)return{mapperFiles:[],figmaBuilderLinks:[],figmaLinksToResolve:[],diagnostics:[]};let n=[],o=[],s=[],i=await Ge(e,t),a=i.getTypeChecker(),u=i.getSyntacticDiagnostics().filter(og).filter(d=>d.file?.fileName?t.includes(d.file.fileName):!1);if(u.length>0)return pe.error(`At least one of the mappings contain syntactic errors:
|
|
1511
|
+
|
|
1512
|
+
${Bj(u)}`),pn(1);let c=[...r?i.getSemanticDiagnostics():[]].filter(og);for(let d of t)try{let p=i.getSourceFile(d);if(!p){e.Sentry?.captureException(new Error("Could not find source file"),{extra:{file:d,sourceFiles:i.getSourceFiles().map(m=>m.fileName)},level:"warning"});continue}let h=p?.fileName;if(o.push({filePath:d,content:p.getText()}),h){let m=c.filter(y=>y.file?.fileName===h);m.length>0&&s.push(...m)}let g=await _j(e,p,a);n.push(...g)}catch(p){return e.Sentry?.captureException(p),await pn(1)}let l=n.filter(d=>d.figmaUrl&&!d.figmaKey).map(d=>d.figmaUrl);return{mapperFiles:o,figmaBuilderLinks:n,figmaLinksToResolve:l,diagnostics:s}}function Mj(e){let t=[];for(let r of e.statements){if(!X.isImportDeclaration(r)||!r.importClause||r.importClause.isTypeOnly||!X.isStringLiteral(r.moduleSpecifier))continue;let n=r.moduleSpecifier.text;if(n.startsWith("@builder.io"))continue;r.importClause.name&&t.push({importType:"default",importName:r.importClause.name.text,importPath:n});let o=r.importClause.namedBindings;if(o&&X.isNamedImports(o))for(let s of o.elements)s.isTypeOnly||t.push({importType:"named",importName:s.name.text,importPath:n})}return t}var Rj,Oj,sg=v(()=>{"use strict";Ln();Lt();Jt();Cu();Do();fn();me();bi();zr();Fr();Su();gv();VE();HE();Rj="figmaMapping";Oj={getCanonicalFileName:e=>e,getCurrentDirectory:()=>X.sys.getCurrentDirectory(),getNewLine:()=>X.sys.newLine}});import{createServer as Lj}from"http";import{platform as jj}from"node:os";import{dirname as WE,join as Pn}from"node:path";import{existsSync as cg,mkdirSync as JE,readFileSync as QE,writeFileSync as qc}from"node:fs";import{randomUUID as Uj}from"crypto";async function qj(e){let t=Uj();return ZE({sys:e,name:"Figma",initialPort:Vj,requestListener:async(r,n,o,s,i)=>{let a=new URL(n.url||"",`http://localhost:${r}`);if(a.pathname==="/figma-connect"){let u=a.searchParams.get("code"),c=a.searchParams.get("state"),l="nrGCqw6TLl95QJhVDi097A",d=zj,h=`Basic ${Buffer.from(`${l}:${d}`).toString("base64")}`;if(u&&t===c){let m=await(await Gr("https://api.figma.com/v1/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:h},body:new URLSearchParams({redirect_uri:`http://localhost:${r}/figma-connect`,code:u,grant_type:"authorization_code"}).toString()})).json();o.end(`<!doctype html>
|
|
1513
1513
|
<html lang="en" dir="ltr">
|
|
1514
1514
|
<head>
|
|
1515
1515
|
<meta charset="utf-8" />
|
|
@@ -1618,7 +1618,7 @@ ${Nj(u)}`),pn(1);let c=[...r?i.getSemanticDiagnostics():[]].filter(og);for(let d
|
|
|
1618
1618
|
<!--SCRIPT_PLACEHOLDER-->
|
|
1619
1619
|
</body>
|
|
1620
1620
|
</html>
|
|
1621
|
-
`.replace("{{MESSAGE}}","The CLI has authenticated correctly with Figma"),()=>{s({...
|
|
1621
|
+
`.replace("{{MESSAGE}}","The CLI has authenticated correctly with Figma"),()=>{s({...m,oauth:!0})})}}},onListen:r=>{let n=new URL("https://www.figma.com/oauth");return n.searchParams.set("client_id","nrGCqw6TLl95QJhVDi097A"),n.searchParams.set("redirect_uri",`http://localhost:${r}/figma-connect`),n.searchParams.set("scope","files:read,file_dev_resources:read,file_variables:read"),n.searchParams.set("state",t),n.searchParams.set("response_type","code"),n.href}})}async function Kj(e,t){let r=await e.getDeviceId();return ZE({sys:e,name:"Builder.io",initialPort:Hj,requestListener:async(n,o,s,i)=>{let a=new URL(o.url||"",`http://localhost:${n}`);a.pathname===to&&s.end(`<!doctype html>
|
|
1622
1622
|
<html lang="en" dir="ltr">
|
|
1623
1623
|
<head>
|
|
1624
1624
|
<meta charset="utf-8" />
|
|
@@ -1727,14 +1727,14 @@ ${Nj(u)}`),pn(1);let c=[...r?i.getSemanticDiagnostics():[]].filter(og);for(let d
|
|
|
1727
1727
|
<!--SCRIPT_PLACEHOLDER-->
|
|
1728
1728
|
</body>
|
|
1729
1729
|
</html>
|
|
1730
|
-
`.replace("{{MESSAGE}}","The CLI has authenticated correctly with Builder.io"),()=>{i({privateKey:a.searchParams.get("p-key")||"",spaceId:a.searchParams.get("api-key")||"",spaceName:a.searchParams.get("org-name")||"",userId:a.searchParams.get("user-id")||""})})},onListen:n=>{let o=new URL("/cli-auth","https://builder.io");o.searchParams.set("client_id","builder-dev-tools-cli"),o.searchParams.set("host",r),o.searchParams.set("response_type","code"),o.searchParams.set("cli","true"),t&&o.searchParams.set("space_id",t);let s=new URL(to,`http://localhost:${n}`);s.searchParams.set(
|
|
1730
|
+
`.replace("{{MESSAGE}}","The CLI has authenticated correctly with Builder.io"),()=>{i({privateKey:a.searchParams.get("p-key")||"",spaceId:a.searchParams.get("api-key")||"",spaceName:a.searchParams.get("org-name")||"",userId:a.searchParams.get("user-id")||""})})},onListen:n=>{let o=new URL("/cli-auth","https://builder.io");o.searchParams.set("client_id","builder-dev-tools-cli"),o.searchParams.set("host",r),o.searchParams.set("response_type","code"),o.searchParams.set("cli","true"),t&&o.searchParams.set("space_id",t);let s=new URL(to,`http://localhost:${n}`);s.searchParams.set(Ma,jj()),s.searchParams.set(La,process.versions.node);let i=e.getFrameworks();return i.length>0&&(o.searchParams.set(Qo,i[0].name),s.searchParams.set(Qo,i[0].name)),o.searchParams.set("redirect_url",s.href),o.href}})}function YE(e,t){if(cg(Pn(e.getAppRootDir(),"node_modules"))){let n=Pn(e.getAppRootDir(),"node_modules",".builder"),o=Pn(n,"data.json"),s=lg(e);t=Object.assign(s,t),JE(WE(o),{recursive:!0}),qc(o,JSON.stringify({credentials:t},null,2))}else{let n=Pn(e.getAppRootDir(),".config","builderio"),o=Pn(n,"data.json"),s=Pn(e.getAppRootDir(),".gitignore"),i=lg(e);t=Object.assign(i,t),JE(WE(o),{recursive:!0}),qc(o,JSON.stringify({credentials:t},null,2));let a=".config/";if(cg(s)){let u=QE(s,"utf8");u.includes(a)||qc(s,u+`
|
|
1731
1731
|
`+a+`
|
|
1732
1732
|
`)}else qc(s,a+`
|
|
1733
|
-
`)}}function lg(e){let t=Pn(e.getAppRootDir(),".config","builderio","data.json"),r=[Pn(e.getAppRootDir(),"node_modules",".builder","data.json"),t,Pn(e.getRepoRootDir(),".git",".builder.json")];for(let n of r)if(cg(n))try{let o=
|
|
1734
|
-
OPEN: ${(0,Xn.dim)(p)}`),n=eg(),n.start(`Waiting for ${e.name} authentication`),await rg(p);let h=await o;return n&&n.stop(`Authenticated with ${e.name} successfully`),h}catch(d){throw n&&(n.stop(`Failed to authenticate with ${e.name}.`,-1),
|
|
1733
|
+
`)}}function lg(e){let t=Pn(e.getAppRootDir(),".config","builderio","data.json"),r=[Pn(e.getAppRootDir(),"node_modules",".builder","data.json"),t,Pn(e.getRepoRootDir(),".git",".builder.json")];for(let n of r)if(cg(n))try{let o=QE(n,"utf8");return JSON.parse(o).credentials}catch(o){e.Sentry?.captureException(o,{level:"warning"})}return{}}async function ZE(e){let t,r,n,o=new Promise((d,p)=>{t=d,r=p}),s=e.initialPort,i=0,a=Lj((d,p)=>e.requestListener(s,d,p,t,r)),u=()=>{c(),a&&("closeAllConnections"in a&&a.closeAllConnections(),a.close(d=>{d&&e.sys.Sentry?.captureException(d)}))};process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",u),process.on("SIGTERM",u),process.on("exit",u);let c=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",u),process.removeListener("SIGTERM",u),process.removeListener("exit",u)},l=()=>new Promise((d,p)=>{let h=g=>{a.removeListener("error",h),g.code==="EADDRINUSE"&&i<ug?(pe.warning(`Port ${s} is already in use, trying next port`),s++,i++,d(0)):p(g)};a.once("error",h),a.listen(s,()=>{a.removeListener("error",h);let g=a.address();d(g.port)})});try{let d=0;for(;d===0&&i<ug;)d=await l();if(d===0)throw new Error(`Failed to find an available port after ${ug} attempts`);let p=e.onListen(d);pe.warn(`Required authenticating with ${e.name}
|
|
1734
|
+
OPEN: ${(0,Xn.dim)(p)}`),n=eg(),n.start(`Waiting for ${e.name} authentication`),await rg(p);let h=await o;return n&&n.stop(`Authenticated with ${e.name} successfully`),h}catch(d){throw n&&(n.stop(`Failed to authenticate with ${e.name}.`,-1),Pd("auth")),e.sys.Sentry?.captureException(d),u(),d}finally{u()}}var Xn,Vj,Hj,ug,ag,Gj,Bs,zj,Ln=v(()=>{"use strict";Zo();Lt();Xn=Me(io(),1);sg();bi();zr();tg();Ad();gt();ng();Do();Vj=5294,Hj=5284,ug=4,ag=e=>!!(process.env.CI||e.ci),Gj=(e,t)=>{let r=ag(t)?{}:lg(e),n=r.spaceName,o=t.builderUserId??process.env.BUILDER_USER_ID??r.userId,s=t.builderPublicKey??process.env.BUILDER_PUBLIC_KEY??r.builderPublicKey,i=t.builderPrivateKey??process.env.BUILDER_PRIVATE_KEY??r.builderPrivateKey,a=process.env.FIGMA_PERSONAL_TOKEN??t.figmaToken,u;return a?u={access_token:a,oauth:!1}:u=r.figmaAuth,{spaceName:n,userId:o,builderPublicKey:s,builderPrivateKey:i,figmaAuth:u,timestamp:r.timestamp}},Bs=async(e,t,r)=>{let{spaceName:n,userId:o,builderPublicKey:s,builderPrivateKey:i,figmaAuth:a,timestamp:u}=Gj(e,t);if(r.forceSpaceId&&!t.yes&&s&&s!==r.forceSpaceId)if(pe.warning(`You are currently authenticated for space ${(0,Xn.yellow)(s)} (${n||"unnamed"}), but this command requires space ${(0,Xn.green)(r.forceSpaceId)}.`),await fs({message:"You must switch to the correct space to continue with this code generation command.",options:[{value:"switch",label:"Switch to required space",hint:"Authenticate with the correct space and continue"},{value:"exit",label:"Exit code generation",hint:"Cancel the command and stay in current space"}]})==="switch")s=r.forceSpaceId,i=void 0,n=void 0,o=void 0;else return pe.info("Code generation cancelled. You can run the command again when you're ready to switch spaces."),await pn(1);if(ag(t)){if(!a&&r.requireFigmaAuth==="if-unset")throw new Error(`No Figma personal token found.
|
|
1735
1735
|
Please set the FIGMA_PERSONAL_TOKEN environment variable.`);if(!i&&r.builderPrivateKey)throw new Error(`No Builder private key found.
|
|
1736
1736
|
Please set the BUILDER_PRIVATE_KEY environment variable.`);if(!s&&r.builderPublicKey)throw new Error(`No Builder public key found.
|
|
1737
|
-
Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,userId:o,spaceName:n}}if((r.requireFigmaAuth==="always"||!a&&r.requireFigmaAuth==="if-unset")&&(a=await
|
|
1737
|
+
Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,userId:o,spaceName:n}}if((r.requireFigmaAuth==="always"||!a&&r.requireFigmaAuth==="if-unset")&&(a=await qj(e),YE(e,{figmaAuth:a})),r.force||!i&&r.builderPrivateKey||!s&&r.builderPublicKey){let{privateKey:c,spaceId:l,spaceName:d,userId:p}=await Kj(e,r.forceSpaceId);if(r.forceSpaceId&&l!==r.forceSpaceId)throw new Error(`OAuth flow returned space ${(0,Xn.yellow)(l)}, however the command specified --spaceId=${(0,Xn.green)(r.forceSpaceId)}`);s=l,i=c,n=d,o=p,await dv(o),await An(e,e.getAppRootDir())&&(await qE(e,l,void 0,!1)||pe.warn("Unable to set public api key in an existing .env file or create a new one. Please ensure you have write access in the current directory.")),YE(e,{builderPublicKey:s,builderPrivateKey:i,spaceName:n,userId:o,timestamp:new Date().toISOString()})}return o?e.Sentry?.setUser({id:o,username:process.env.USER||process.env.USERNAME||"unknown"}):s&&e.Sentry?.setUser({id:s,username:process.env.USER||process.env.USERNAME||"unknown"}),(n||s)&&e.Sentry?.setContext("builder",{spaceId:s,spaceName:n,userId:o}),{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,spaceName:n,userId:o,timestamp:u}},zj="RHr2ed743waC2g2ZHMEJSn6O0NQ08L"});async function eP(e,t,r,n){try{if(!e)return ss(r,n,400,"Builder context closed");let o=Zj(r);if(o.pathname===Jc){if(r.method==="POST"){let s=await Qj(r);if(s)try{let i=await Lg(e,JSON.parse(s));return XE(r,n,200,i)}catch(i){e.debug("Dev API Error",i.stack||i.message||i);let a={errors:[String(i.message||i)]};return XE(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"},i=r.headers.origin;i&&i!=="null"?tP(new URL(i))&&(s["Access-Control-Allow-Origin"]=i):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return ss(r,n,405,`${Jc} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(o.pathname===Yc)return Wj(r,n,200,await Ug(e));if(o.pathname===dg){let s=o.searchParams.get(Wc);return s?Yj(n,302,await zg(e,s)):ss(r,n,400,`Missing ${Wc} querystring`)}if(o.pathname===to)return Jj(r,n,200,await Vg(e));if(o.pathname===pg){await Bs(e,{_:[]},{});let s=await zE(e),{figmaBuilderLinks:i,diagnostics:a}=await KE({mappingFiles:s,sys:e});return Ia(r,n,200,"application/json",JSON.stringify({figmaBuilderLinks:i,foundErrors:a.length>0,diagnostics:a,version:2,local:!0},null,2))}return o.pathname===ro?(e.debug(`Close Dev Tools Server Requested: ${o.href}`),setTimeout(()=>{try{t.close(s=>{e.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){e.debug(`Error closing devtools server: ${s}`)}},20),ss(r,n,200,"Closing Dev Tools Server")):ss(r,n,404,"Not found")}catch(o){return e?.Sentry?.captureException(o),ss(r,n,500,`Dev Server Error: ${o}`)}}function XE(e,t,r,n){Ia(e,t,r,"application/json",JSON.stringify(n))}function Wj(e,t,r,n){Ia(e,t,r,"application/javascript",n)}function Jj(e,t,r,n){Ia(e,t,r,"text/html",n)}function ss(e,t,r,n){Ia(e,t,r,"text/plain",n)}function Ia(e,t,r,n,o){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":qt},i=e.headers.origin;i&&i!=="null"?tP(new URL(i))&&(s["Access-Control-Allow-Origin"]=i):s["Access-Control-Allow-Origin"]="*",t.writeHead(r,s),t.end(o)}function tP(e){return e.hostname==="localhost"||e.origin==="https://builder.io"||e.origin==="https://www.builder.io"||e.origin.endsWith(".builder.io")?!0:e.port===""?!1:e.port!=="80"&&e.port!=="443"}function Yj(e,t,r){e.writeHead(t,{Location:r}),e.end()}async function Qj(e){let t="";for await(let r of e)t+=r;return t}function Zj(e){let t=e.url||"/";return new URL(t,`http://${e.headers.host}`)}var rP=v(()=>{"use strict";Zo();jg();Gg();qg();Ln();sg();Fr()});import{createServer as Xj,request as e8}from"node:http";async function nP(e){if(globalThis.__builderDevToolsServer)return e.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(e),globalThis.__builderDevToolsServer;let t=await t8(e),r=Xj((o,s)=>{eP(e,r,o,s)}),n=()=>new Promise((o,s)=>{r.listening?(e.debug(`closing devtools server on port ${t}`),r.close(i=>{e=null,i?(e.debug(`error closing devtools server on port ${t}`),s(i)):(e&&e.debug(`closed devtools server on port ${t}`),o())})):(e.debug(`devtools server on port ${t} not listening`),o())});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:${t}`).href,port:t,setContext:o=>{e.debug(`set devtools context on server ${t}`),e=o},close:async()=>{globalThis.__builderDevToolsServer=null,await n()}},new Promise(o=>{r.listen(t,()=>{e.debug(`started devtools server on port ${t}`),o(globalThis.__builderDevToolsServer)})})}function t8(e){return new Promise(t=>{let r=e.port;try{e8({hostname:"localhost",port:r,path:ro,method:"GET"},o=>{o.on("end",()=>{e.debug(`${ro} - Response ended`),t(r)})}).on("error",o=>{e.debug(`${ro} - No response ${o}`),t(r)}).end()}catch(n){e.debug(`${ro} - Error ${n}`),t(r)}})}var oP=v(()=>{"use strict";rP();Zo()});async function Dv(e){let t={...e,devToolsServerUrl:"",isValid:!1,serverShouldRestart:!1,publicApiKey:"",port:e.port||5273,ignoreMissingConfig:!1,getAllProjectFiles:e.getAllProjectFiles||(()=>Promise.resolve([]))},r=e.getFrameworks().map(s=>s.name).join(", ");t.debug(`create devtools ${sP} [${r}]`);let n=await nP(t);return t.devToolsServerUrl=n.url,t.port=n.port,{getUrl:()=>t.devToolsServerUrl}}var iP=v(()=>{"use strict";oP();Ed()});var sP,Ed=v(()=>{Fr();iP();sP=qt});Ed();export{Dv as createDevToolsServer,sP as version};
|
|
1738
1738
|
/*! Bundled license information:
|
|
1739
1739
|
|
|
1740
1740
|
is-number/index.js:
|