@mintlify/cli 4.1.82 → 4.1.84

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.
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{A as e,B as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,K as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,T as _,U as v,V as y,W as b,_ as x,b as S,c as C,d as w,f as T,g as E,h as D,j as O,k,l as A,m as j,n as M,o as N,p as P,q as F,s as I,t as L,tt as R,u as z,v as B,w as V,x as H,y as U,z as W}from"./dist-Cgbskz5I.js";import{t as G}from"./watcher-CrrSXFeO.js";export{d as AddedLog,f as BrokenLinksLog,m as DeletedLog,a as EditedLog,c as EmptyLineLog,u as ErrorLog,h as InfoLog,R as LOCAL_LINKED_CLI_VERSION,W as LaunchLog,t as LinksToLog,y as Logs,C as PackageIslandCollector,s as RenamedLog,v as SearchDisabledLog,b as SpinnerLog,o as SuccessLog,l as UpdateLog,F as WarningLog,x as addChangeLog,B as addErrorLog,U as addLog,S as addLogs,H as addRawErrorLog,T as checkBuild,g as clearErrorLogs,n as clearLogs,A as collectPackageIslands,M as createPreviewPathIgnored,L as dev,P as downloadTargetMint,w as exportSite,E as getClientVersion,V as getCurrentErrorLogs,j as getLatestClientVersion,D as getVersionMap,N as normalizeProviderPath,_ as onLogsCleared,I as readPackagesSetup,i as removeErrorLogs,r as removeLastLog,p as removeLog,k as removeSpinnerLogs,e as replaceLog,z as resolvePageContent,O as setLoggingCallbacks,G as watchTree};
7
+ import{A as e,B as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,K as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,T as _,U as v,V as y,W as b,_ as x,b as S,c as C,d as w,f as T,g as E,h as D,j as O,k,l as A,m as j,n as M,o as N,p as P,q as F,s as I,t as L,tt as R,u as z,v as B,w as V,x as H,y as U,z as W}from"./dist-DxjIV9Q5.js";import{t as G}from"./watcher-CrrSXFeO.js";export{d as AddedLog,f as BrokenLinksLog,m as DeletedLog,a as EditedLog,c as EmptyLineLog,u as ErrorLog,h as InfoLog,R as LOCAL_LINKED_CLI_VERSION,W as LaunchLog,t as LinksToLog,y as Logs,C as PackageIslandCollector,s as RenamedLog,v as SearchDisabledLog,b as SpinnerLog,o as SuccessLog,l as UpdateLog,F as WarningLog,x as addChangeLog,B as addErrorLog,U as addLog,S as addLogs,H as addRawErrorLog,T as checkBuild,g as clearErrorLogs,n as clearLogs,A as collectPackageIslands,M as createPreviewPathIgnored,L as dev,P as downloadTargetMint,w as exportSite,E as getClientVersion,V as getCurrentErrorLogs,j as getLatestClientVersion,D as getVersionMap,N as normalizeProviderPath,_ as onLogsCleared,I as readPackagesSetup,i as removeErrorLogs,r as removeLastLog,p as removeLog,k as removeSpinnerLogs,e as replaceLog,z as resolvePageContent,O as setLoggingCallbacks,G as watchTree};
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{a as e,i as t,n,o as r,r as i,t as a}from"./rolldown-runtime-CEAe2Uac.js";import{$t as o,A as s,An as c,At as l,Cn as u,Ct as d,Dn as f,Dt as p,E as m,En as h,Fn as g,Ft as _,G as v,Gt as y,H as b,Ht as x,It as S,J as C,Jt as w,K as T,Kt as E,Ln as D,Lt as O,Mn as k,Mt as ee,Nt as te,O as A,Ot as j,Pn as M,Pt as N,Qn as P,Qt as ne,S as F,Sn as I,St as re,Tn as L,Tt as ie,Un as ae,Ut as oe,Vn as se,Vt as ce,Wt as le,Xn as ue,Xt as de,Y as fe,Yt as pe,Zn as me,_n as he,_t as ge,ar as _e,bn as ve,cn as ye,cr as be,dn as xe,dr as Se,en as Ce,fn as we,ft as Te,g as Ee,gn as De,gt as Oe,hn as ke,ht as Ae,i as je,in as Me,it as Ne,j as Pe,jn as Fe,jt as Ie,k as Le,kn as Re,kt as ze,ln as Be,m as Ve,mn as He,n as Ue,nn as We,nt as Ge,on as Ke,ot as qe,pn as Je,pt as Ye,qt as Xe,r as Ze,rt as Qe,s as $e,sn as et,sr as tt,st as nt,tn as rt,tt as it,un as at,wn as ot,wt as st,x as ct,xn as lt,y as ut,yn as dt,yt as ft,zn as pt,zt as mt}from"./dist-Ds9rgRXa.js";import{t as ht}from"./react-CocJQ9gk.js";import{g as gt,h as R,m as _t}from"./build-dp785b-C.js";import{F as vt,I as yt,c as bt,dt as xt,it as St,t as Ct,tt as wt,w as Tt}from"./utils-B1yewEzF.js";import{n as Et,r as Dt,t as Ot}from"./remark-utils-FAwkaMKD.js";import{t as kt}from"./watcher-CrrSXFeO.js";import z,{dirname as At,extname as jt,join as B,parse as Mt,posix as Nt,sep as Pt}from"path";import V from"node:fs";import{spawn as Ft}from"child_process";import*as It from"url";import{fileURLToPath as Lt}from"url";import Rt,{createServer as zt}from"http";import Bt from"https";import Vt,*as Ht from"zlib";import{Buffer as Ut}from"buffer";import Wt,{EventEmitter as Gt}from"node:events";import Kt from"node:os";import H,{basename as qt,join as Jt,posix as Yt,win32 as Xt}from"node:path";import Zt,{randomBytes as Qt,randomUUID as $t}from"node:crypto";import en,{ServerResponse as tn}from"node:http";import nn from"node:https";import rn,{pathToFileURL as an}from"node:url";import{inspect as on,promisify as sn}from"node:util";import cn from"node:assert";import ln from"node:fs/promises";import un,{Duplex as dn,PassThrough as fn,Readable as pn}from"node:stream";import{pipeline as mn}from"node:stream/promises";import hn from"node:process";import{types as gn}from"util";import U,{existsSync as _n,promises as vn,readFileSync as yn,statSync as bn}from"fs";import xn from"assert";import Sn,{createHash as Cn}from"crypto";import wn,{EventEmitter as Tn,errorMonitor as En}from"events";import{BlockList as Dn,isIP as On}from"net";import kn from"node:tty";import{Buffer as An}from"node:buffer";import jn from"os";import Mn,{readFile as Nn}from"fs/promises";import Pn from"node:net";import{checkServerIdentity as Fn}from"node:tls";import{ADDRCONFIG as In,ALL as Ln,V4MAPPED as Rn,lookup as zn,promises as Bn}from"node:dns";import{StringDecoder as Vn}from"node:string_decoder";import{pipeline as Hn}from"stream/promises";import Un from"dns";
7
+ import{a as e,i as t,n,o as r,r as i,t as a}from"./rolldown-runtime-CEAe2Uac.js";import{$t as o,A as s,An as c,At as l,Cn as u,Ct as d,Dn as f,Dt as p,E as m,En as h,Fn as g,Ft as _,G as v,Gt as y,H as b,Ht as x,It as S,J as C,Jt as w,K as T,Kt as E,Ln as D,Lt as O,Mn as k,Mt as ee,Nt as te,O as A,Ot as j,Pn as M,Pt as N,Qn as P,Qt as ne,S as F,Sn as I,St as re,Tn as L,Tt as ie,Un as ae,Ut as oe,Vn as se,Vt as ce,Wt as le,Xn as ue,Xt as de,Y as fe,Yt as pe,Zn as me,_n as he,_t as ge,ar as _e,bn as ve,cn as ye,cr as be,dn as xe,dr as Se,en as Ce,fn as we,ft as Te,g as Ee,gn as De,gt as Oe,hn as ke,ht as Ae,i as je,in as Me,it as Ne,j as Pe,jn as Fe,jt as Ie,k as Le,kn as Re,kt as ze,ln as Be,m as Ve,mn as He,n as Ue,nn as We,nt as Ge,on as Ke,ot as qe,pn as Je,pt as Ye,qt as Xe,r as Ze,rt as Qe,s as $e,sn as et,sr as tt,st as nt,tn as rt,tt as it,un as at,wn as ot,wt as st,x as ct,xn as lt,y as ut,yn as dt,yt as ft,zn as pt,zt as mt}from"./dist-BAndNTcP.js";import{t as ht}from"./react-CocJQ9gk.js";import{g as gt,h as R,m as _t}from"./build-dp785b-C.js";import{F as vt,I as yt,c as bt,dt as xt,it as St,t as Ct,tt as wt,w as Tt}from"./utils-B1yewEzF.js";import{n as Et,r as Dt,t as Ot}from"./remark-utils-FAwkaMKD.js";import{t as kt}from"./watcher-CrrSXFeO.js";import z,{dirname as At,extname as jt,join as B,parse as Mt,posix as Nt,sep as Pt}from"path";import V from"node:fs";import{spawn as Ft}from"child_process";import*as It from"url";import{fileURLToPath as Lt}from"url";import Rt,{createServer as zt}from"http";import Bt from"https";import Vt,*as Ht from"zlib";import{Buffer as Ut}from"buffer";import Wt,{EventEmitter as Gt}from"node:events";import Kt from"node:os";import H,{basename as qt,join as Jt,posix as Yt,win32 as Xt}from"node:path";import Zt,{randomBytes as Qt,randomUUID as $t}from"node:crypto";import en,{ServerResponse as tn}from"node:http";import nn from"node:https";import rn,{pathToFileURL as an}from"node:url";import{inspect as on,promisify as sn}from"node:util";import cn from"node:assert";import ln from"node:fs/promises";import un,{Duplex as dn,PassThrough as fn,Readable as pn}from"node:stream";import{pipeline as mn}from"node:stream/promises";import hn from"node:process";import{types as gn}from"util";import U,{existsSync as _n,promises as vn,readFileSync as yn,statSync as bn}from"fs";import xn from"assert";import Sn,{createHash as Cn}from"crypto";import wn,{EventEmitter as Tn,errorMonitor as En}from"events";import{BlockList as Dn,isIP as On}from"net";import kn from"node:tty";import{Buffer as An}from"node:buffer";import jn from"os";import Mn,{readFile as Nn}from"fs/promises";import Pn from"node:net";import{checkServerIdentity as Fn}from"node:tls";import{ADDRCONFIG as In,ALL as Ln,V4MAPPED as Rn,lookup as zn,promises as Bn}from"node:dns";import{StringDecoder as Vn}from"node:string_decoder";import{pipeline as Hn}from"stream/promises";import Un from"dns";
8
8
  /**
9
9
  * @license React
10
10
  * react-jsx-runtime.production.js
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- export{t as DIAGNOSTICS_DIR,n as reportPathOf,r as watchComponentUsage}from"./live-BR7YGuvT.js";
7
+ export{t as DIAGNOSTICS_DIR,n as reportPathOf,r as watchComponentUsage}from"./live-CND-3fI5.js";
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{o as e}from"./rolldown-runtime-CEAe2Uac.js";import{$ as t,A as n,O as r,Q as i,T as a,X as o,Y as s,Z as c,_ as l,et as u,n as d,nt as f,q as p,y as m}from"./dist-Cgbskz5I.js";import{$t as h,Bt as g,C as _,Cn as v,Dn as ee,E as y,Et as te,Gt as b,Ht as ne,On as x,Q as S,Qt as re,Rt as C,St as w,U as T,Un as E,Vt as ie,X as ae,Yt as oe,Z as se,Zn as ce,Zt as le,_n as ue,a as de,bt as fe,er as pe,et as me,it as he,k as ge,nr as _e,o as ve,ot as ye,rn as be,st as xe,tr as Se,ur as Ce,vn as we,w as Te,wn as Ee,wt as De,yn as Oe,yt as ke,zt as Ae}from"./dist-Ds9rgRXa.js";import{B as je,M as Me,P as Ne,Q as Pe,X as Fe,Z as Ie,_ as D,_t as Le,b as Re,c as ze,d as Be,r as Ve,s as He,st as Ue,t as We,tt as O,u as Ge,w as Ke,x as qe,y as Je}from"./utils-B1yewEzF.js";import{a as Ye,c as Xe,i as Ze,n as Qe,o as $e,r as et,s as tt,t as k}from"./remark-utils-FAwkaMKD.js";import{t as nt}from"./watcher-CrrSXFeO.js";import rt,{basename as it,dirname as at,join as A,normalize as ot,parse as j,resolve as st}from"path";import ct,{readFileSync as lt,watch as ut}from"node:fs";import dt from"node:os";import M from"node:path";import{createHash as ft}from"node:crypto";import pt from"node:fs/promises";import{existsSync as mt}from"fs";import{sep as ht}from"path/win32";function gt(e,t){let n=t>0?`_${t}`:``;return oe(`param-${e}${n}`,{decamelize:!0,separator:`-`})}function _t(e){return(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`)&&e.name===`Variation`}function vt(e){let t=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`is`);if(!t)return{kind:`missing`};if(typeof t.value==`string`){let e=t.value.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(!t.value)return{kind:`invalid`};let n=t.value.data?.estree,r=n?.body[0],i=r?.type===`ExpressionStatement`?r.expression:void 0;if(i?.type===`Literal`&&typeof i.value==`string`){let e=i.value.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(i?.type===`TemplateLiteral`&&i.expressions.length===0){let e=(i.quasis[0]?.value.cooked)?.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(i?.type===`ArrayExpression`){let e=[];for(let t of i.elements){if(t?.type!==`Literal`||typeof t.value!=`string`)return{kind:`invalid`};let n=t.value.trim();if(!n)return{kind:`invalid`};e.push(n)}return e.length>0?{kind:`valid`,ids:[...new Set(e)]}:{kind:`invalid`}}if(n)return{kind:`invalid`};let a=t.value.value.trim().match(/^(["'`])([\s\S]*)\1$/);return(a?.[2])?.trim()?{kind:`valid`,ids:[a[2].trim()]}:{kind:`invalid`}}const yt=[`h1`,`h2`,`h3`,`h4`],bt=[`Accordion`,`AccordionGroup`,`Expandable`,`Update`,`Prompt`];function N(e,t){let n=e.find(e=>`name`in e&&e.name===t);if(n&&`value`in n&&typeof n.value==`string`)return n.value}const xt=e=>e&&[...e].sort(),St=e=>{if(typeof e==`string`)return e;let t=Ue(Xe(e.groups));return JSON.stringify([xt(t?.includes),xt(t?.excludes)])},Ct=(e,t)=>{if(t===void 0)return!0;let n=new Set(e?.map(St));return t.every(e=>n.has(St(e)))},wt=(e,t)=>{let n=i();return r=>{let i=[],a=!1,c=/* @__PURE__ */ new Map,l=/* @__PURE__ */ new Map,u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map,f=/* @__PURE__ */ new Map,p=/* @__PURE__ */ new Set,m=s.includes(t?.mode??``);O(r,e=>{if(e.type===`mdxJsxFlowElement`&&e.name===`_MintIsland`)for(let t of e.data?.islandHeadings??[])n.reserve(t.slug);e.type===`mdxJsxFlowElement`&&e.name&&bt.includes(e.name)&&O(e,t=>{t!==e&&p.add(t)});let t=e;if(Ye(t)){let n=$e(t),r=tt(n);Ze(n)?O(e,t=>{t!==e&&p.add(t)}):r&&O(e,t=>{t!==e&&d.set(t,[...d.get(t)??[],r])})}if(e.type===`mdxJsxFlowElement`&&e.name===`Steps`){let t=N(e.attributes,`titleSize`);if(t){let n=e=>{for(let r of e)r.type===`mdxJsxFlowElement`&&(r.name===`Step`?f.set(r,t):Be(r)&&n(r.children))};n(e.children)}}if(e.type===`mdxJsxFlowElement`&&e.name===`Tab`){let t=N(e.attributes,`id`),n=N(e.attributes,`title`),r=t??(n?h(et(e,n)):void 0);r&&O(e,e=>{c.set(e,r)})}if(e.type===`mdxJsxFlowElement`&&e.name===`View`){let t=N(e.attributes,`title`);t&&O(e,e=>{l.set(e,t)})}let r=e;if(_t(r)){let t=vt(r),n=t.kind===`valid`?t.ids:[];O(e,e=>{let t=u.get(e);u.set(e,t?t.filter(e=>n.includes(e)):n)})}});let g=(e,t)=>{if(!e.title.trim())return;if(t!==void 0&&Number(t)<=2){a=!0,i.push(e);return}let n=i;if(a){let t=i.at(-1);t&&!(t.depth>2&&t.depth>=e.depth)&&(t.tabId===void 0||t.tabId===e.tabId)&&(t.viewId===void 0||t.viewId===e.viewId)&&(t.variationIds===void 0||e.variationIds!==void 0&&e.variationIds.every(e=>t.variationIds?.includes(e)))&&Ct(e.authRules,t.authRules)&&(n=t.children)}n.push(e)};O(r,e=>{if(p.has(e))return;let t=c.get(e),r=l.get(e),i=u.get(e),a=d.get(e);if(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`){let o=e.data?.tableOfContents;if(!o?.length)return;let s=e=>{for(let t of e)n.reserve(t.slug),s(t.children)};s(o);for(let e of o)g(Object.assign(Object.assign({},e),{tabId:t,viewId:r,variationIds:i,authRules:a||e.authRules?[...a??[],...e.authRules??[]]:void 0}),e.depth);return}if(e.type===`mdxJsxFlowElement`&&e.name===`_MintIsland`){if(m)return;for(let{title:n,slug:o,depth:s}of e.data?.islandHeadings??[])g({title:n,slug:o,depth:s,children:[],tabId:t,viewId:r,variationIds:i,authRules:a},s);return}let s=e.type===`heading`&&o.includes(e.depth),_=e.type===`mdxJsxFlowElement`&&yt.includes(e.name??``),v=e.type===`mdxJsxFlowElement`&&e.name===`Heading`,ee=e.type===`mdxJsxFlowElement`&&e.name===`Update`&&e.attributes.some(e=>`name`in e&&e.name===`label`),y=e.type===`mdxJsxFlowElement`&&e.name===`Step`?N(e.attributes,`titleSize`)??f.get(e):void 0,te=e.type===`mdxJsxFlowElement`&&e.attributes.some(e=>`name`in e&&e.name===`noAnchor`&&(e.value==null||e.value===`true`||typeof e.value==`object`&&e.value.value===`true`)),b=e.type===`mdxJsxFlowElement`&&e.name===`Step`?et(e,N(e.attributes,`title`)??``):void 0,ne=e.type===`mdxJsxFlowElement`&&e.name===`Step`&&!te&&[`h2`,`h3`].includes(y??``)&&b?.trim()!==``,x=e.type===`mdxJsxFlowElement`&&e.attributes.some(e=>`name`in e&&e.name===`id`);if(!s&&!_&&!v&&!ee&&!ne||m&&(s||_))return;let S;if(`name`in e&&e.name===`Update`)S=1,e.depth=1;else if(`name`in e&&e.name===`Step`)S={h2:2,h3:3,h4:4}[y??``]??3,e.depth=S;else if(`depth`in e)S=e.depth;else if(`name`in e&&e.name===`Heading`){let t=e.attributes.find(e=>`name`in e&&e.name===`level`);t&&`value`in t&&typeof t.value==`number`&&(S=t.value)}else if(`name`in e&&e.name?.[1]){let t=Number(e.name[1]);S=isNaN(t)?void 0:t,S!==void 0&&(e.depth=S)}let C=b??Qe(e),w,T=`name`in e&&(e.name===`Heading`||e.name===`Step`||e.name===`Update`)||x?N(e.attributes,`id`):void 0;w=T?n.claim(re(T)||h(C)):n.claim(h(C));let E;if(`name`in e&&e.name===`Update`){let t=N(e.attributes,`id`);E=t?t===w?e.attributes:e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):[...e.attributes,k(`id`,w)]}else if(`name`in e&&e.name===`Step`){let t=N(e.attributes,`id`);E=t?t===w?e.attributes:e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):[...e.attributes,k(`id`,w)]}else if(`name`in e&&e.name===`Heading`)E=T&&w!==T?e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):e.attributes;else if(S!==void 0&&x){let t=T&&w!==T?e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):e.attributes;E=[k(`level`,S),...t]}else S!==void 0&&!x&&(E=[k(`level`,S),k(`id`,w)],_&&e.attributes.length>0&&E.push(...e.attributes));e.attributes=E,e.type=`mdxJsxFlowElement`,e.name=e.name===`Update`?`Update`:e.name===`Step`?`Step`:`Heading`;let ie=e.depth;g({title:C,slug:w,depth:ie,children:[],tabId:t,viewId:r,variationIds:i,authRules:a},S)}),e&&(e.tableOfContents=i)}},Tt=/* @__PURE__ */ new Set([`codeFenced`,`codeText`,`yaml`,`toml`]),Et=[Me([`yaml`,`toml`]),je(),{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}],Dt=e=>{let t=+!!e.startsWith(``),n=Ie(Pe({extensions:Et}).document().write(Fe()(e.slice(t),void 0,!0))),r=[];for(let[e,i]of n)e===`enter`&&Tt.has(i.type)&&r.push([i.start.offset+t,i.end.offset+t]);return r},Ot=/* @__PURE__ */ new Set(/* @__PURE__ */ `Info.Warning.Note.Tip.Check.Danger.Callout.AccordionGroup.Card.CardGroup.Tabs.CodeGroup.Column.Columns.CustomCode.CustomComponent.DynamicCustomComponent.Expandable.Frame.GitHub.Github.Icon.Latex.Mermaid.Panel.Popup.Prompt.List.Quote.RequestExample.ResponseExample.SnippetGroup.Steps.Tile.Tooltip.Tree.FileTree.Variation.Visibility.MDX.Badge.Color.ZoomImage`.split(`.`)),kt=/* @__PURE__ */ new Set([`Heading`,`Step`,`Update`]),At=[`Example`,`Snippet`],jt=e=>We.includes(e)||At.includes(e),Mt=[];function P(e){let t=-1;if(!e||!Array.isArray(e)&&!e.type)throw Error("Expected node, not `"+e+"`");if(`value`in e)return e.value;let n=(Array.isArray(e)?e:e.children)||Mt,r=[];for(;++t<n.length;)r[t]=P(n[t]);return r.join(``)}const Nt={}.hasOwnProperty;function Pt(e,t,n){let r=-1;if(!e)throw Error(`Iterate requires that |this| not be `+e);if(!Nt.call(e,`length`))throw Error("Iterate requires that |this| has a `length`");if(typeof t!=`function`)throw TypeError("`callback` must be a function");for(;++r<e.length;){if(!(r in e))continue;let i=t.call(n,e[r],r,e);typeof i==`number`&&(i<0&&(r=0),r=i-1)}}function F(e){return t;function t(e){if(!e||!e.children)throw Error("Missing children in `parent` for `modifier`");Pt(e.children,n,e)}function n(t,n){return e(t,n,this)}}const Ft=F(function(e,t,n){let r=n.children[t-1];if(r&&`children`in r&&`children`in e&&e.children.length>0){let i=-1;for(;e.children[++i];){let a=e.children[i];if(a.type===`WordNode`)return;if(a.type===`SymbolNode`||a.type===`PunctuationNode`){let i=P(a);return i!==`,`&&i!==`;`?void 0:(r.children.push(...e.children),r.position&&e.position&&(r.position.end=e.position.end),n.children.splice(t,1),t)}}}}),It=/^([!"').?\u0F3B\u0F3D\u169C\u2019\u201D\u2026\u203A\u203D\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u2E23\u2E25\u2E27\u2E29\u2E56\u2E58\u2E5A\u2E5C\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63\u00BB\]}])\1*$/,Lt=/^[ \t]*((\r?\n|\r)[\t ]*)+$/,Rt=/^([!.?\u2026\u203D]+)$/,zt=/^([&'\-.:=?@\u00AD\u00B7\u2010\u2011\u2019\u2027]|_+)$/,Bt=/^(?:[\d\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])+$/,Vt=/^\d/,Ht=/^(?:[a-z\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1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2184\u2C30-\u2C5F\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7BB\uA7BD\uA7BF\uA7C1\uA7C3\uA7C8\uA7CA\uA7D1\uA7D3\uA7D5\uA7D7\uA7D9\uA7F6\uA7FA\uAB30-\uAB5A\uAB60-\uAB68\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E\uDF25-\uDF2A]|\uD83A[\uDD22-\uDD43])/,Ut=/[\uD800-\uDFFF]/,Wt=/[!"'-),-/:;?[-\]_{}\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u201F\u2022-\u2027\u2032-\u203A\u203C-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Gt=/[\dA-Za-z\u00AA\u00B2\u00B3\u00B5\u00B9\u00BA\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\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-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\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\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u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85-\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\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\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\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\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\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\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-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\u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DF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uD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=/[\t-\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,qt=F(function(e,t,n){if(`children`in e&&e.children.length>0&&t>0){let r=n.children[t-1],i=e.children[0],a=e.children[1];if(r&&r.type===`SentenceNode`&&(i.type===`SymbolNode`||i.type===`PunctuationNode`)&&It.test(P(i)))return e.children.shift(),r.children.push(i),i.position&&r.position&&(r.position.end=i.position.end),a&&a.position&&e.position&&(e.position.start=a.position.start),t-1}}),Jt=F(function(e,t,n){if(e.type!==`SentenceNode`)return;let r=e.children,i=0;for(;++i<r.length-1;){let a=r[i];if(a.type!==`WhiteSpaceNode`||P(a).split(/\r\n|\r|\n/).length<3)continue;e.children=r.slice(0,i);let o={type:`SentenceNode`,children:r.slice(i+1)},s=r[i-1],c=r[i+1];if(n.children.splice(t+1,0,a,o),e.position&&s.position&&c.position){let t=e.position.end;e.position.end=s.position.end,o.position={start:c.position.start,end:t}}return t+1}}),Yt=F(function(e,t,n){if(`children`in e){let r=e.children[e.children.length-1];if(r&&r.type===`WhiteSpaceNode`){e.children.pop(),n.children.splice(t+1,0,r);let i=e.children[e.children.length-1];return i&&i.position&&e.position&&(e.position.end=i.position.end),t}}});function Xt(e){return t;function t(t){let n=t&&t.children,r=-1;if(!n)throw Error("Missing children in `parent` for `visit`");for(;++r in n;)e(n[r],r,t)}}const Zt=Xt(function(e,t,n){if(`children`in e&&e.children){let r=e.children[0];if(r&&r.type===`WhiteSpaceNode`){e.children.shift(),n.children.splice(t,0,r);let i=e.children[0];i&&i.position&&e.position&&(e.position.start=i.position.start)}}}),Qt=F(function(e,t,n){if(t>0&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)&&P(e)===`-`){let r=n.children,i=r[t-1],a=r[t+1];if((!a||a.type!==`WordNode`)&&i&&i.type===`WordNode`)return r.splice(t,1),i.children.push(e),i.position&&e.position&&(i.position.end=e.position.end),t}}),$t=F(function(e,t,n){let r=n.children[t-1];if(r&&r.type===`SentenceNode`&&e.type===`SentenceNode`){let i=e.children[0];if(i&&i.type===`WordNode`&&Vt.test(P(i)))return r.children.push(...e.children),n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t}}),en=F(function(e,t,n){if(e.type===`SentenceNode`&&t>0){let r=n.children[t-1],i=e.children;if(i.length>0&&r.type===`SentenceNode`){let a=-1;for(;i[++a];){let o=i[a];if(o.type===`WordNode`)return Ht.test(P(o))?(r.children.push(...i),n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t):void 0;if(o.type===`SymbolNode`||o.type===`PunctuationNode`)return}}}}),tn=F(function(e,t,n){if(e.type!==`SymbolNode`&&e.type!==`PunctuationNode`||P(e)!==`&`)return;let r=n.children,i=r[t+1];if(!(t>0&&r[t-1].type===`WordNode`||!(i&&i.type===`WordNode`)))return r.splice(t,1),i.children.unshift(e),i.position&&e.position&&(i.position.start=e.position.start),t-1}),nn=F(function(e,t,n){if(t>0&&e.type===`PunctuationNode`&&P(e)===`.`){let r=n.children[t-1];if(r.type===`WordNode`&&r.children&&r.children.length!==1&&r.children.length%2!=0){let i=r.children.length,a=!0;for(;r.children[--i];){let e=r.children[i],t=P(e);if(i%2==0){if(t.length>1)return;Bt.test(t)||(a=!1)}else if(t!==`.`){if(i<r.children.length-2)break;return}}if(!a)return n.children.splice(t,1),r.children.push(e),r.position&&e.position&&(r.position.end=e.position.end),t}}}),rn=F(function(e,t,n){if(t>0&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)){let e=n.children,r=e[t-1];if(r&&r.type===`WordNode`){let n=t-1,i=[],a=[];for(;e[++n];){let t=e[n];if(t.type===`WordNode`)i.push(...a,...t.children),a=[];else if((t.type===`SymbolNode`||t.type===`PunctuationNode`)&&zt.test(P(t)))a.push(t);else break}if(i.length>0){a.length>0&&(n-=a.length),e.splice(t,n-t),r.children.push(...i);let o=i[i.length-1];return r.position&&o.position&&(r.position.end=o.position.end),t}}}}),an=F(function(e,t,n){let r=n.children,i=r[t-1];if(i&&i.type===`WordNode`&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)&&P(e)===`/`){let n=P(i),a=e,o=[e],s=1,c=``,l=r[t+1];if(l&&l.type===`WordNode`&&(c=P(l),a=l,o.push(...l.children),s++),n.length<3&&(!c||c.length<3))return i.children.push(...o),r.splice(t,s),i.position&&a.position&&(i.position.end=a.position.end),t}}),on=F(function(e,t,n){if(`children`in e){let r=-1;for(;e.children[++r];)if(e.children[r].type===`WordNode`)return;let i=n.children[t-1];if(i&&`children`in i)return i.children.push(...e.children),n.children.splice(t,1),i.position&&e.position&&(i.position.end=e.position.end),t;let a=n.children[t+1];a&&`children`in a&&(a.children.unshift(...e.children),a.position&&e.position&&(a.position.start=e.position.start),n.children.splice(t,1))}}),sn=/* @__PURE__ */ RegExp(`^([0-9]{1,3}|[a-z]|al|ca|cap|cca|cent|cf|cit|con|cp|cwt|ead|etc|ff|fl|ibid|id|nem|op|pro|seq|sic|stat|tem|viz)$`),cn=F(function(e,t,n){if(`children`in e&&e.children.length>1){let r=e.children[e.children.length-1];if(r&&(r.type===`PunctuationNode`||r.type===`SymbolNode`)&&P(r)===`.`){let i=e.children[e.children.length-2];if(i&&i.type===`WordNode`&&sn.test(P(i).toLowerCase())){i.children.push(r),e.children.pop(),r.position&&i.position&&(i.position.end=r.position.end);let a=n.children[t+1];if(a&&a.type===`SentenceNode`)return e.children.push(...a.children),n.children.splice(t+1,1),a.position&&e.position&&(e.position.end=a.position.end),t-1}}}}),ln=Xt(function(e,t,n){if(`children`in e){let t=e.children.length,n=!1;for(;e.children[--t];){let r=e.children[t];if(r.type!==`SymbolNode`&&r.type!==`PunctuationNode`){r.type===`WordNode`&&(n=!0);continue}if(!Rt.test(P(r)))continue;if(!n){n=!0;continue}if(P(r)!==`.`)continue;let i=e.children[t-1],a=e.children[t+1];if(i&&i.type===`WordNode`){let n=e.children[t+2];if(a&&n&&a.type===`WhiteSpaceNode`&&P(n)===`.`)continue;e.children.splice(t,1),i.children.push(r),r.position&&i.position&&(i.position.end=r.position.end),t--}else a&&a.type===`WordNode`&&(e.children.splice(t,1),a.children.unshift(r),r.position&&a.position&&(a.position.start=r.position.start))}}}),un=F(function(e,t,n){if(`children`in e&&e.children.length===0)return n.children.splice(t,1),t}),dn=Xt(function(e,t,n){let r=n.children;e.position&&t<1&&(!n.position||!n.position.start)&&(fn(n),n.position.start=e.position.start),!e.position||t!==r.length-1||n.position&&n.position.end||(fn(n),n.position.end=e.position.end)});function fn(e){e.position||={}}var pn=class{constructor(e,t){let n=t||e;this.doc=n?String(n):void 0,this.tokenizeRootPlugins=[...this.tokenizeRootPlugins],this.tokenizeParagraphPlugins=[...this.tokenizeParagraphPlugins],this.tokenizeSentencePlugins=[...this.tokenizeSentencePlugins]}parse(e){return this.tokenizeRoot(e||this.doc)}tokenizeRoot(e){let t={type:`RootNode`,children:mn(this.tokenizeParagraph(e),`WhiteSpaceNode`,Lt)},n=-1;for(;this.tokenizeRootPlugins[++n];)this.tokenizeRootPlugins[n](t);return t}tokenizeParagraph(e){let t={type:`ParagraphNode`,children:mn(this.tokenizeSentence(e),`PunctuationNode`,Rt)},n=-1;for(;this.tokenizeParagraphPlugins[++n];)this.tokenizeParagraphPlugins[n](t);return t}tokenizeSentence(e){let t={type:`SentenceNode`,children:this.tokenize(e)},n=-1;for(;this.tokenizeSentencePlugins[++n];)this.tokenizeSentencePlugins[n](t);return t}tokenize(e){let t=[];if(!e)return t;let n={line:1,column:1,offset:0},r=0,i=0,a={...n},o,s;for(;i<e.length;){let l=e.charAt(i),u=Kt.test(l)?`WhiteSpaceNode`:Wt.test(l)?`PunctuationNode`:Gt.test(l)?`WordNode`:`SymbolNode`;r<i&&o&&u&&(o!==u||o!==`WordNode`&&o!==`WhiteSpaceNode`&&l!==s&&!Ut.test(l))&&(t.push(c(o,e.slice(r,i))),r=i,a={...n}),l===`\r`||l===`
7
+ import{o as e}from"./rolldown-runtime-CEAe2Uac.js";import{$ as t,A as n,O as r,Q as i,T as a,X as o,Y as s,Z as c,_ as l,et as u,n as d,nt as f,q as p,y as m}from"./dist-DxjIV9Q5.js";import{$t as h,Bt as g,C as _,Cn as v,Dn as ee,E as y,Et as te,Gt as b,Ht as ne,On as x,Q as S,Qt as re,Rt as C,St as w,U as T,Un as E,Vt as ie,X as ae,Yt as oe,Z as se,Zn as ce,Zt as le,_n as ue,a as de,bt as fe,er as pe,et as me,it as he,k as ge,nr as _e,o as ve,ot as ye,rn as be,st as xe,tr as Se,ur as Ce,vn as we,w as Te,wn as Ee,wt as De,yn as Oe,yt as ke,zt as Ae}from"./dist-BAndNTcP.js";import{B as je,M as Me,P as Ne,Q as Pe,X as Fe,Z as Ie,_ as D,_t as Le,b as Re,c as ze,d as Be,r as Ve,s as He,st as Ue,t as We,tt as O,u as Ge,w as Ke,x as qe,y as Je}from"./utils-B1yewEzF.js";import{a as Ye,c as Xe,i as Ze,n as Qe,o as $e,r as et,s as tt,t as k}from"./remark-utils-FAwkaMKD.js";import{t as nt}from"./watcher-CrrSXFeO.js";import rt,{basename as it,dirname as at,join as A,normalize as ot,parse as j,resolve as st}from"path";import ct,{readFileSync as lt,watch as ut}from"node:fs";import dt from"node:os";import M from"node:path";import{createHash as ft}from"node:crypto";import pt from"node:fs/promises";import{existsSync as mt}from"fs";import{sep as ht}from"path/win32";function gt(e,t){let n=t>0?`_${t}`:``;return oe(`param-${e}${n}`,{decamelize:!0,separator:`-`})}function _t(e){return(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`)&&e.name===`Variation`}function vt(e){let t=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`is`);if(!t)return{kind:`missing`};if(typeof t.value==`string`){let e=t.value.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(!t.value)return{kind:`invalid`};let n=t.value.data?.estree,r=n?.body[0],i=r?.type===`ExpressionStatement`?r.expression:void 0;if(i?.type===`Literal`&&typeof i.value==`string`){let e=i.value.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(i?.type===`TemplateLiteral`&&i.expressions.length===0){let e=(i.quasis[0]?.value.cooked)?.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(i?.type===`ArrayExpression`){let e=[];for(let t of i.elements){if(t?.type!==`Literal`||typeof t.value!=`string`)return{kind:`invalid`};let n=t.value.trim();if(!n)return{kind:`invalid`};e.push(n)}return e.length>0?{kind:`valid`,ids:[...new Set(e)]}:{kind:`invalid`}}if(n)return{kind:`invalid`};let a=t.value.value.trim().match(/^(["'`])([\s\S]*)\1$/);return(a?.[2])?.trim()?{kind:`valid`,ids:[a[2].trim()]}:{kind:`invalid`}}const yt=[`h1`,`h2`,`h3`,`h4`],bt=[`Accordion`,`AccordionGroup`,`Expandable`,`Update`,`Prompt`];function N(e,t){let n=e.find(e=>`name`in e&&e.name===t);if(n&&`value`in n&&typeof n.value==`string`)return n.value}const xt=e=>e&&[...e].sort(),St=e=>{if(typeof e==`string`)return e;let t=Ue(Xe(e.groups));return JSON.stringify([xt(t?.includes),xt(t?.excludes)])},Ct=(e,t)=>{if(t===void 0)return!0;let n=new Set(e?.map(St));return t.every(e=>n.has(St(e)))},wt=(e,t)=>{let n=i();return r=>{let i=[],a=!1,c=/* @__PURE__ */ new Map,l=/* @__PURE__ */ new Map,u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map,f=/* @__PURE__ */ new Map,p=/* @__PURE__ */ new Set,m=s.includes(t?.mode??``);O(r,e=>{if(e.type===`mdxJsxFlowElement`&&e.name===`_MintIsland`)for(let t of e.data?.islandHeadings??[])n.reserve(t.slug);e.type===`mdxJsxFlowElement`&&e.name&&bt.includes(e.name)&&O(e,t=>{t!==e&&p.add(t)});let t=e;if(Ye(t)){let n=$e(t),r=tt(n);Ze(n)?O(e,t=>{t!==e&&p.add(t)}):r&&O(e,t=>{t!==e&&d.set(t,[...d.get(t)??[],r])})}if(e.type===`mdxJsxFlowElement`&&e.name===`Steps`){let t=N(e.attributes,`titleSize`);if(t){let n=e=>{for(let r of e)r.type===`mdxJsxFlowElement`&&(r.name===`Step`?f.set(r,t):Be(r)&&n(r.children))};n(e.children)}}if(e.type===`mdxJsxFlowElement`&&e.name===`Tab`){let t=N(e.attributes,`id`),n=N(e.attributes,`title`),r=t??(n?h(et(e,n)):void 0);r&&O(e,e=>{c.set(e,r)})}if(e.type===`mdxJsxFlowElement`&&e.name===`View`){let t=N(e.attributes,`title`);t&&O(e,e=>{l.set(e,t)})}let r=e;if(_t(r)){let t=vt(r),n=t.kind===`valid`?t.ids:[];O(e,e=>{let t=u.get(e);u.set(e,t?t.filter(e=>n.includes(e)):n)})}});let g=(e,t)=>{if(!e.title.trim())return;if(t!==void 0&&Number(t)<=2){a=!0,i.push(e);return}let n=i;if(a){let t=i.at(-1);t&&!(t.depth>2&&t.depth>=e.depth)&&(t.tabId===void 0||t.tabId===e.tabId)&&(t.viewId===void 0||t.viewId===e.viewId)&&(t.variationIds===void 0||e.variationIds!==void 0&&e.variationIds.every(e=>t.variationIds?.includes(e)))&&Ct(e.authRules,t.authRules)&&(n=t.children)}n.push(e)};O(r,e=>{if(p.has(e))return;let t=c.get(e),r=l.get(e),i=u.get(e),a=d.get(e);if(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`){let o=e.data?.tableOfContents;if(!o?.length)return;let s=e=>{for(let t of e)n.reserve(t.slug),s(t.children)};s(o);for(let e of o)g(Object.assign(Object.assign({},e),{tabId:t,viewId:r,variationIds:i,authRules:a||e.authRules?[...a??[],...e.authRules??[]]:void 0}),e.depth);return}if(e.type===`mdxJsxFlowElement`&&e.name===`_MintIsland`){if(m)return;for(let{title:n,slug:o,depth:s}of e.data?.islandHeadings??[])g({title:n,slug:o,depth:s,children:[],tabId:t,viewId:r,variationIds:i,authRules:a},s);return}let s=e.type===`heading`&&o.includes(e.depth),_=e.type===`mdxJsxFlowElement`&&yt.includes(e.name??``),v=e.type===`mdxJsxFlowElement`&&e.name===`Heading`,ee=e.type===`mdxJsxFlowElement`&&e.name===`Update`&&e.attributes.some(e=>`name`in e&&e.name===`label`),y=e.type===`mdxJsxFlowElement`&&e.name===`Step`?N(e.attributes,`titleSize`)??f.get(e):void 0,te=e.type===`mdxJsxFlowElement`&&e.attributes.some(e=>`name`in e&&e.name===`noAnchor`&&(e.value==null||e.value===`true`||typeof e.value==`object`&&e.value.value===`true`)),b=e.type===`mdxJsxFlowElement`&&e.name===`Step`?et(e,N(e.attributes,`title`)??``):void 0,ne=e.type===`mdxJsxFlowElement`&&e.name===`Step`&&!te&&[`h2`,`h3`].includes(y??``)&&b?.trim()!==``,x=e.type===`mdxJsxFlowElement`&&e.attributes.some(e=>`name`in e&&e.name===`id`);if(!s&&!_&&!v&&!ee&&!ne||m&&(s||_))return;let S;if(`name`in e&&e.name===`Update`)S=1,e.depth=1;else if(`name`in e&&e.name===`Step`)S={h2:2,h3:3,h4:4}[y??``]??3,e.depth=S;else if(`depth`in e)S=e.depth;else if(`name`in e&&e.name===`Heading`){let t=e.attributes.find(e=>`name`in e&&e.name===`level`);t&&`value`in t&&typeof t.value==`number`&&(S=t.value)}else if(`name`in e&&e.name?.[1]){let t=Number(e.name[1]);S=isNaN(t)?void 0:t,S!==void 0&&(e.depth=S)}let C=b??Qe(e),w,T=`name`in e&&(e.name===`Heading`||e.name===`Step`||e.name===`Update`)||x?N(e.attributes,`id`):void 0;w=T?n.claim(re(T)||h(C)):n.claim(h(C));let E;if(`name`in e&&e.name===`Update`){let t=N(e.attributes,`id`);E=t?t===w?e.attributes:e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):[...e.attributes,k(`id`,w)]}else if(`name`in e&&e.name===`Step`){let t=N(e.attributes,`id`);E=t?t===w?e.attributes:e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):[...e.attributes,k(`id`,w)]}else if(`name`in e&&e.name===`Heading`)E=T&&w!==T?e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):e.attributes;else if(S!==void 0&&x){let t=T&&w!==T?e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):e.attributes;E=[k(`level`,S),...t]}else S!==void 0&&!x&&(E=[k(`level`,S),k(`id`,w)],_&&e.attributes.length>0&&E.push(...e.attributes));e.attributes=E,e.type=`mdxJsxFlowElement`,e.name=e.name===`Update`?`Update`:e.name===`Step`?`Step`:`Heading`;let ie=e.depth;g({title:C,slug:w,depth:ie,children:[],tabId:t,viewId:r,variationIds:i,authRules:a},S)}),e&&(e.tableOfContents=i)}},Tt=/* @__PURE__ */ new Set([`codeFenced`,`codeText`,`yaml`,`toml`]),Et=[Me([`yaml`,`toml`]),je(),{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}],Dt=e=>{let t=+!!e.startsWith(``),n=Ie(Pe({extensions:Et}).document().write(Fe()(e.slice(t),void 0,!0))),r=[];for(let[e,i]of n)e===`enter`&&Tt.has(i.type)&&r.push([i.start.offset+t,i.end.offset+t]);return r},Ot=/* @__PURE__ */ new Set(/* @__PURE__ */ `Info.Warning.Note.Tip.Check.Danger.Callout.AccordionGroup.Card.CardGroup.Tabs.CodeGroup.Column.Columns.CustomCode.CustomComponent.DynamicCustomComponent.Expandable.Frame.GitHub.Github.Icon.Latex.Mermaid.Panel.Popup.Prompt.List.Quote.RequestExample.ResponseExample.SnippetGroup.Steps.Tile.Tooltip.Tree.FileTree.Variation.Visibility.MDX.Badge.Color.ZoomImage`.split(`.`)),kt=/* @__PURE__ */ new Set([`Heading`,`Step`,`Update`]),At=[`Example`,`Snippet`],jt=e=>We.includes(e)||At.includes(e),Mt=[];function P(e){let t=-1;if(!e||!Array.isArray(e)&&!e.type)throw Error("Expected node, not `"+e+"`");if(`value`in e)return e.value;let n=(Array.isArray(e)?e:e.children)||Mt,r=[];for(;++t<n.length;)r[t]=P(n[t]);return r.join(``)}const Nt={}.hasOwnProperty;function Pt(e,t,n){let r=-1;if(!e)throw Error(`Iterate requires that |this| not be `+e);if(!Nt.call(e,`length`))throw Error("Iterate requires that |this| has a `length`");if(typeof t!=`function`)throw TypeError("`callback` must be a function");for(;++r<e.length;){if(!(r in e))continue;let i=t.call(n,e[r],r,e);typeof i==`number`&&(i<0&&(r=0),r=i-1)}}function F(e){return t;function t(e){if(!e||!e.children)throw Error("Missing children in `parent` for `modifier`");Pt(e.children,n,e)}function n(t,n){return e(t,n,this)}}const Ft=F(function(e,t,n){let r=n.children[t-1];if(r&&`children`in r&&`children`in e&&e.children.length>0){let i=-1;for(;e.children[++i];){let a=e.children[i];if(a.type===`WordNode`)return;if(a.type===`SymbolNode`||a.type===`PunctuationNode`){let i=P(a);return i!==`,`&&i!==`;`?void 0:(r.children.push(...e.children),r.position&&e.position&&(r.position.end=e.position.end),n.children.splice(t,1),t)}}}}),It=/^([!"').?\u0F3B\u0F3D\u169C\u2019\u201D\u2026\u203A\u203D\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u2E23\u2E25\u2E27\u2E29\u2E56\u2E58\u2E5A\u2E5C\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63\u00BB\]}])\1*$/,Lt=/^[ \t]*((\r?\n|\r)[\t ]*)+$/,Rt=/^([!.?\u2026\u203D]+)$/,zt=/^([&'\-.:=?@\u00AD\u00B7\u2010\u2011\u2019\u2027]|_+)$/,Bt=/^(?:[\d\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])+$/,Vt=/^\d/,Ht=/^(?:[a-z\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1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\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7BB\uA7BD\uA7BF\uA7C1\uA7C3\uA7C8\uA7CA\uA7D1\uA7D3\uA7D5\uA7D7\uA7D9\uA7F6\uA7FA\uAB30-\uAB5A\uAB60-\uAB68\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E\uDF25-\uDF2A]|\uD83A[\uDD22-\uDD43])/,Ut=/[\uD800-\uDFFF]/,Wt=/[!"'-),-/:;?[-\]_{}\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u201F\u2022-\u2027\u2032-\u203A\u203C-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Gt=/[\dA-Za-z\u00AA\u00B2\u00B3\u00B5\u00B9\u00BA\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\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-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\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\u09F4-\u09F9\u09FC\u09FE\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\u0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E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\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\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\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\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\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-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\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uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF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21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\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]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF]/,Kt=/[\t-\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,qt=F(function(e,t,n){if(`children`in e&&e.children.length>0&&t>0){let r=n.children[t-1],i=e.children[0],a=e.children[1];if(r&&r.type===`SentenceNode`&&(i.type===`SymbolNode`||i.type===`PunctuationNode`)&&It.test(P(i)))return e.children.shift(),r.children.push(i),i.position&&r.position&&(r.position.end=i.position.end),a&&a.position&&e.position&&(e.position.start=a.position.start),t-1}}),Jt=F(function(e,t,n){if(e.type!==`SentenceNode`)return;let r=e.children,i=0;for(;++i<r.length-1;){let a=r[i];if(a.type!==`WhiteSpaceNode`||P(a).split(/\r\n|\r|\n/).length<3)continue;e.children=r.slice(0,i);let o={type:`SentenceNode`,children:r.slice(i+1)},s=r[i-1],c=r[i+1];if(n.children.splice(t+1,0,a,o),e.position&&s.position&&c.position){let t=e.position.end;e.position.end=s.position.end,o.position={start:c.position.start,end:t}}return t+1}}),Yt=F(function(e,t,n){if(`children`in e){let r=e.children[e.children.length-1];if(r&&r.type===`WhiteSpaceNode`){e.children.pop(),n.children.splice(t+1,0,r);let i=e.children[e.children.length-1];return i&&i.position&&e.position&&(e.position.end=i.position.end),t}}});function Xt(e){return t;function t(t){let n=t&&t.children,r=-1;if(!n)throw Error("Missing children in `parent` for `visit`");for(;++r in n;)e(n[r],r,t)}}const Zt=Xt(function(e,t,n){if(`children`in e&&e.children){let r=e.children[0];if(r&&r.type===`WhiteSpaceNode`){e.children.shift(),n.children.splice(t,0,r);let i=e.children[0];i&&i.position&&e.position&&(e.position.start=i.position.start)}}}),Qt=F(function(e,t,n){if(t>0&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)&&P(e)===`-`){let r=n.children,i=r[t-1],a=r[t+1];if((!a||a.type!==`WordNode`)&&i&&i.type===`WordNode`)return r.splice(t,1),i.children.push(e),i.position&&e.position&&(i.position.end=e.position.end),t}}),$t=F(function(e,t,n){let r=n.children[t-1];if(r&&r.type===`SentenceNode`&&e.type===`SentenceNode`){let i=e.children[0];if(i&&i.type===`WordNode`&&Vt.test(P(i)))return r.children.push(...e.children),n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t}}),en=F(function(e,t,n){if(e.type===`SentenceNode`&&t>0){let r=n.children[t-1],i=e.children;if(i.length>0&&r.type===`SentenceNode`){let a=-1;for(;i[++a];){let o=i[a];if(o.type===`WordNode`)return Ht.test(P(o))?(r.children.push(...i),n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t):void 0;if(o.type===`SymbolNode`||o.type===`PunctuationNode`)return}}}}),tn=F(function(e,t,n){if(e.type!==`SymbolNode`&&e.type!==`PunctuationNode`||P(e)!==`&`)return;let r=n.children,i=r[t+1];if(!(t>0&&r[t-1].type===`WordNode`||!(i&&i.type===`WordNode`)))return r.splice(t,1),i.children.unshift(e),i.position&&e.position&&(i.position.start=e.position.start),t-1}),nn=F(function(e,t,n){if(t>0&&e.type===`PunctuationNode`&&P(e)===`.`){let r=n.children[t-1];if(r.type===`WordNode`&&r.children&&r.children.length!==1&&r.children.length%2!=0){let i=r.children.length,a=!0;for(;r.children[--i];){let e=r.children[i],t=P(e);if(i%2==0){if(t.length>1)return;Bt.test(t)||(a=!1)}else if(t!==`.`){if(i<r.children.length-2)break;return}}if(!a)return n.children.splice(t,1),r.children.push(e),r.position&&e.position&&(r.position.end=e.position.end),t}}}),rn=F(function(e,t,n){if(t>0&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)){let e=n.children,r=e[t-1];if(r&&r.type===`WordNode`){let n=t-1,i=[],a=[];for(;e[++n];){let t=e[n];if(t.type===`WordNode`)i.push(...a,...t.children),a=[];else if((t.type===`SymbolNode`||t.type===`PunctuationNode`)&&zt.test(P(t)))a.push(t);else break}if(i.length>0){a.length>0&&(n-=a.length),e.splice(t,n-t),r.children.push(...i);let o=i[i.length-1];return r.position&&o.position&&(r.position.end=o.position.end),t}}}}),an=F(function(e,t,n){let r=n.children,i=r[t-1];if(i&&i.type===`WordNode`&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)&&P(e)===`/`){let n=P(i),a=e,o=[e],s=1,c=``,l=r[t+1];if(l&&l.type===`WordNode`&&(c=P(l),a=l,o.push(...l.children),s++),n.length<3&&(!c||c.length<3))return i.children.push(...o),r.splice(t,s),i.position&&a.position&&(i.position.end=a.position.end),t}}),on=F(function(e,t,n){if(`children`in e){let r=-1;for(;e.children[++r];)if(e.children[r].type===`WordNode`)return;let i=n.children[t-1];if(i&&`children`in i)return i.children.push(...e.children),n.children.splice(t,1),i.position&&e.position&&(i.position.end=e.position.end),t;let a=n.children[t+1];a&&`children`in a&&(a.children.unshift(...e.children),a.position&&e.position&&(a.position.start=e.position.start),n.children.splice(t,1))}}),sn=/* @__PURE__ */ RegExp(`^([0-9]{1,3}|[a-z]|al|ca|cap|cca|cent|cf|cit|con|cp|cwt|ead|etc|ff|fl|ibid|id|nem|op|pro|seq|sic|stat|tem|viz)$`),cn=F(function(e,t,n){if(`children`in e&&e.children.length>1){let r=e.children[e.children.length-1];if(r&&(r.type===`PunctuationNode`||r.type===`SymbolNode`)&&P(r)===`.`){let i=e.children[e.children.length-2];if(i&&i.type===`WordNode`&&sn.test(P(i).toLowerCase())){i.children.push(r),e.children.pop(),r.position&&i.position&&(i.position.end=r.position.end);let a=n.children[t+1];if(a&&a.type===`SentenceNode`)return e.children.push(...a.children),n.children.splice(t+1,1),a.position&&e.position&&(e.position.end=a.position.end),t-1}}}}),ln=Xt(function(e,t,n){if(`children`in e){let t=e.children.length,n=!1;for(;e.children[--t];){let r=e.children[t];if(r.type!==`SymbolNode`&&r.type!==`PunctuationNode`){r.type===`WordNode`&&(n=!0);continue}if(!Rt.test(P(r)))continue;if(!n){n=!0;continue}if(P(r)!==`.`)continue;let i=e.children[t-1],a=e.children[t+1];if(i&&i.type===`WordNode`){let n=e.children[t+2];if(a&&n&&a.type===`WhiteSpaceNode`&&P(n)===`.`)continue;e.children.splice(t,1),i.children.push(r),r.position&&i.position&&(i.position.end=r.position.end),t--}else a&&a.type===`WordNode`&&(e.children.splice(t,1),a.children.unshift(r),r.position&&a.position&&(a.position.start=r.position.start))}}}),un=F(function(e,t,n){if(`children`in e&&e.children.length===0)return n.children.splice(t,1),t}),dn=Xt(function(e,t,n){let r=n.children;e.position&&t<1&&(!n.position||!n.position.start)&&(fn(n),n.position.start=e.position.start),!e.position||t!==r.length-1||n.position&&n.position.end||(fn(n),n.position.end=e.position.end)});function fn(e){e.position||={}}var pn=class{constructor(e,t){let n=t||e;this.doc=n?String(n):void 0,this.tokenizeRootPlugins=[...this.tokenizeRootPlugins],this.tokenizeParagraphPlugins=[...this.tokenizeParagraphPlugins],this.tokenizeSentencePlugins=[...this.tokenizeSentencePlugins]}parse(e){return this.tokenizeRoot(e||this.doc)}tokenizeRoot(e){let t={type:`RootNode`,children:mn(this.tokenizeParagraph(e),`WhiteSpaceNode`,Lt)},n=-1;for(;this.tokenizeRootPlugins[++n];)this.tokenizeRootPlugins[n](t);return t}tokenizeParagraph(e){let t={type:`ParagraphNode`,children:mn(this.tokenizeSentence(e),`PunctuationNode`,Rt)},n=-1;for(;this.tokenizeParagraphPlugins[++n];)this.tokenizeParagraphPlugins[n](t);return t}tokenizeSentence(e){let t={type:`SentenceNode`,children:this.tokenize(e)},n=-1;for(;this.tokenizeSentencePlugins[++n];)this.tokenizeSentencePlugins[n](t);return t}tokenize(e){let t=[];if(!e)return t;let n={line:1,column:1,offset:0},r=0,i=0,a={...n},o,s;for(;i<e.length;){let l=e.charAt(i),u=Kt.test(l)?`WhiteSpaceNode`:Wt.test(l)?`PunctuationNode`:Gt.test(l)?`WordNode`:`SymbolNode`;r<i&&o&&u&&(o!==u||o!==`WordNode`&&o!==`WhiteSpaceNode`&&l!==s&&!Ut.test(l))&&(t.push(c(o,e.slice(r,i))),r=i,a={...n}),l===`\r`||l===`
8
8
  `&&s!==`\r`?(n.line++,n.column=1):l!==`
9
9
  `&&n.column++,n.offset++,o=u,s=l,i++}return o&&r<i&&t.push(c(o,e.slice(r,i))),t;function c(e,t){return e===`WordNode`?{type:`WordNode`,children:[{type:`TextNode`,value:t,position:{start:a,end:{...n}}}],position:{start:a,end:{...n}}}:{type:e,value:t,position:{start:a,end:{...n}}}}}};pn.prototype.tokenizeSentencePlugins=[tn,Qt,rn,an,nn,dn],pn.prototype.tokenizeParagraphPlugins=[on,qt,en,$t,cn,Ft,ln,Zt,Yt,Jt,un,dn],pn.prototype.tokenizeRootPlugins=[Zt,Yt,un,dn];function mn(e,t,n){let r=[],i=-1,a=0;for(;++i<e.children.length;){let o=e.children[i];if(i===e.children.length-1||o.type===t&&n.test(P(o))){let t={type:e.type,children:e.children.slice(a,i+1)},n=e.children[a],s=o;n.position&&s.position&&(t.position={start:n.position.start,end:s.position.end}),r.push(t),a=i+1}}return r}function hn(){let e=this;e.parser=t;function t(t){let n=new pn;return gn(n.tokenizeParagraphPlugins,e.data(`nlcstParagraphExtensions`)),gn(n.tokenizeRootPlugins,e.data(`nlcstRootExtensions`)),gn(n.tokenizeSentencePlugins,e.data(`nlcstSentenceExtensions`)),n.parse(t)}}function gn(e,t){t&&e.unshift(...t)}function _n(){let e=this;e.compiler=vn}function vn(e){return P(e)}var yn=f(),bn=/* @__PURE__ */ e(xe(),1);const xn=Ne().use(hn).use(_n).freeze(),Sn=[`”`,`’`],Cn=[`“`,`‘`],wn={};function Tn(e){let t=e||wn,n=[];if(t.quotes!==!1&&n.push(Pn),t.ellipses===`spaced`?n.push(Mn):t.ellipses===`unspaced`?n.push(Nn):t.ellipses!==!1&&n.push(jn),t.backticks===`all`){if(t.quotes!==!1)throw Error("Cannot accept `backticks: 'all'` with `quotes: true`");n.push(En)}else t.backticks!==!1&&n.push(Dn);t.dashes===`inverted`?n.push(kn):t.dashes===`oldschool`?n.push(An):t.dashes!==!1&&n.push(On);let r={close:t.closingQuotes?[t.closingQuotes.double,t.closingQuotes.single]:Sn,open:t.openingQuotes?[t.openingQuotes.double,t.openingQuotes.single]:Cn};return function(e){O(e,function(e,t,i){let a=-1;if(i&&t!==void 0&&(e.type===`PunctuationNode`||e.type===`SymbolNode`)){for(;++a<n.length;)if(n[a](r,e,t,i)===!0)return console.log(`drop`,e),i.children.splice(t,1),t}})}}function En(e,t,n,r){Dn(e,t,n,r),t.value==="`"?t.value=`‘`:t.value===`'`&&(t.value=`’`)}function Dn(e,t){t.value==="``"?t.value=`“`:t.value===`''`&&(t.value=`”`)}function On(e,t){t.value===`--`&&(t.value=`—`)}function kn(e,t,n,r){let i=r.children[n+1];if(t.value===`—`&&i&&i.type===`PunctuationNode`&&i.value===`-`)return i.value=`–`,!0;t.value===`---`?t.value=`–`:t.value===`--`&&(t.value=`—`)}function An(e,t,n,r){let i=r.children[n+1];if(t.value===`–`&&i&&i.type===`PunctuationNode`&&i.value===`-`)return i.value=`—`,!0;t.value===`---`?t.value=`—`:t.value===`--`&&(t.value=`–`)}function jn(e,t,n,r){Mn(e,t,n,r),Nn(e,t,n,r)}function Mn(e,t,n,r){let i=t.value,a=r.children;if(!/^\.+$/.test(i))return;let o=[],s=n,c=1;for(;--s>0;){let e=a[s];if(e.type!==`WhiteSpaceNode`)break;let t=e;if(e=a[--s],e&&(e.type===`PunctuationNode`||e.type===`SymbolNode`)&&/^\.+$/.test(e.value))o.push(t,e),c++;else break}c<3||(a.splice(n-o.length,o.length),t.value=`…`)}function Nn(e,t){/^\.{3,}$/.test(t.value)&&(t.value=`…`)}function Pn(e,t,n,r){let i=r.children,a=t.value;if(a!==`"`&&a!==`'`)return;let o=a===`"`?0:1,s=i[n-1],c=i[n+1],l=i[n+2],u=c?P(c):``;c&&(c.type===`PunctuationNode`||c.type===`SymbolNode`)&&(!l||l.type!==`WordNode`)?t.value=e.close[o]:c&&(c.type===`PunctuationNode`||c.type===`SymbolNode`)&&(u===`"`||u===`'`)&&l&&l.type===`WordNode`?(t.value=e.open[o],c.value=e.open[u===`"`?0:1]):t.value=c&&/^\d\ds$/.test(u)?e.close[o]:s&&(s.type===`WhiteSpaceNode`||s.type===`PunctuationNode`||s.type===`SymbolNode`)&&c&&c.type===`WordNode`?e.open[o]:s&&s.type!==`WhiteSpaceNode`&&s.type!==`SymbolNode`&&s.type!==`PunctuationNode`||!c||c.type===`WhiteSpaceNode`||a===`'`&&u===`s`?e.close[o]:e.open[o]}const Fn=/* @__PURE__ */ new Set([`text`,`inlineCode`,`paragraph`]),In=/* @__PURE__ */ new Set([`style`,`script`]),Ln=(e,t,n)=>n&&(n.type!==`mdxJsxTextElement`||`name`in n&&typeof n.name==`string`&&!In.has(n.name))&&Fn.has(e.type)&&(zn(e)||Bn(e)),Rn=e=>{let t=xn().use(Tn,{...e,ellipses:!1,dashes:!1,backticks:!1}),n=xn().use(Tn,{...e,quotes:!1});return e=>{let r=``,i=0,a=[];O(e,Ln,e=>{zn(e)?r+=e.type===`text`?e.value:`A`.repeat(e.value.length):Bn(e)&&(r+=` `),a.push(e)}),/["']/.test(r)&&(r=t.processSync(r).toString());for(let e of a)if(zn(e)){let t=i+e.value.length;if(e.type===`text`){let a=r.slice(i,t);e.value=/\.[\s\u0085]*\.|--|``|''/.test(a)?n.processSync(a).toString():a}i=t}else Bn(e)&&(i+=1)}};function zn(e){return`value`in e&&typeof e.value==`string`}function Bn(e){return e.type===`paragraph`}const Vn=(function(e){if(e==null)return Kn;if(typeof e==`string`)return Wn(e);if(typeof e==`object`)return Array.isArray(e)?Hn(e):Un(e);if(typeof e==`function`)return Gn(e);throw Error(`Expected function, string, or object as test`)});function Hn(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Vn(e[n]);return Gn(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}function Un(e){return Gn(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function Wn(e){return Gn(t);function t(t){return t&&t.type===e}}function Gn(e){return t;function t(t,...n){return!!(t&&typeof t==`object`&&`type`in t&&e.call(this,t,...n))}}function Kn(){return!0}function qn(e){return`\x1B[33m`+e+`\x1B[39m`}const Jn=(function(e,t,n,r){typeof t==`function`&&typeof n!=`function`&&(r=n,n=t,t=null);let i=Vn(t),a=r?-1:1;o(e,void 0,[])();function o(e,s,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+qn(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=[],u,d,f;if((!t||i(e,s,c[c.length-1]||null))&&(l=Yn(n(e,c)),l[0]===!1))return l;if(e.children&&l[0]!==`skip`)for(d=(r?e.children.length:-1)+a,f=c.concat(e);d>-1&&d<e.children.length;){if(u=o(e.children[d],d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+a}return l}}});function Yn(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:[e]}const Xn=(function(e,t,n,r){typeof t==`function`&&typeof n!=`function`&&(r=n,n=t,t=null),Jn(e,t,i,r);function i(e,t){let r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}}),Zn=[`.mdx`,`.md`],Qn=[`.jpeg`,`.jpg`,`.jfif`,`.pjpeg`,`.pjp`,`.png`,`.svg`,`.svgz`,`.ico`,`.webp`,`.gif`,`.apng`,`.avif`,`.bmp`,`.mp4`,`.css`,`.xml`],$n=e=>!(e.dir===`node_modules`||e.dir.startsWith(`node_modules/`)),er=e=>!(e.dir===`.github`||e.dir.startsWith(`.github/`)),tr=e=>Zn.includes(e.ext),nr=e=>Qn.includes(e.ext),rr=e=>tr(e)||nr(e),ir=e=>e.map(I).map(j).filter($n),ar=e=>ir(e).filter(tr).filter(er),or=e=>ir(e).filter(rr).filter(er),sr=e=>A(e.dir,e.base),cr=e=>A(e.dir,e.name),lr=e=>e.split(`#`)[0].split(`?`)[0],ur=(e,t=[])=>ar(ke(e,e,t)).map(sr),dr=(e,t=[])=>or(ke(e,e,t)).map(sr),I=e=>ot(fr(e)),fr=e=>e.startsWith(`/`)?e.slice(1):e;var L;(function(e){e.INTERNAL=`internal`,e.EXTERNAL=`external`,e.DATA=`data`})(L||={});const pr=e=>{try{return decodeURIComponent(e)}catch{return e}},mr=e=>/[:*]/.test(e);var R;(function(e){e.MD=`md`,e.SRC=`src`,e.HREF=`href`,e.CARD=`card`,e.IMPORT=`import`,e.DEFINITION=`definition`})(R||={});var hr;(function(e){e.CONTENT=`content`,e.NAVIGATION=`navigation`})(hr||={});var gr=class e{static getPathType(e){let t;return t=URL.canParse(e)?L.EXTERNAL:e.startsWith(`data:`)?L.DATA:L.INTERNAL,t}constructParsedPath(){let t=e.getPathType(this.originalPath),n,r;if(t===L.INTERNAL){let e=new URL(`mintlify:/`);e.pathname=`/${this.relativeDir}/${this.filename}`.replaceAll(ht,`/`),n=new URL(this.originalPath.replaceAll(ht,`/`),e);let t=pr(n.pathname).slice(1);t.endsWith(`/`)&&(t=t.slice(0,-1)),t===``&&(t=`.`),r=j(t)}else try{n=new URL(this.originalPath),r=n}catch{throw Error(`Failed to parse path as URL: ${this.originalPath}. If this is a purposefully malformed path, please wrap it in backticks, i.e \`${this.originalPath}\` `)}let i=n.hash?t===L.INTERNAL?pr(n.hash):n.hash:void 0,a=n.searchParams;return{path:r,pathType:t,anchorLink:i,queryParams:a}}constructor(e,t=``,n=``,r,i){this.originalPath=e,this.relativeDir=t,this.filename=n,this.wrapper=r,this.line=i,this.pagePaths=[],this.relativeDir=I(t);let{path:a,pathType:o,anchorLink:s,queryParams:c}=this.constructParsedPath();this.path=a,this.pathType=o,this.anchorLink=s,this.queryParams=c}toString(){if(this.pathType===L.INTERNAL){let e=this.path;return A(e.dir,e.base)}return this.path.toString()}getResolvedFiles(e,t){if(this.pathType!==L.INTERNAL||this.path instanceof URL)return[];let{dir:n,name:r,base:i}=j(this.toString()),a=[];return mt(st(t,this.toString()))&&a.push(A(n,i)),a.push(...e.lookup(n,r,i)),a}keepsMdxExtension(){let e=this.wrapper===R.DEFINITION?this.originalPath:this.wrapper===R.MD||this.wrapper===R.HREF?t(A(this.relativeDir,this.filename),this.originalPath,!0):void 0;return e!==void 0&&/\.mdx$/i.test(lr(e))}resolvesTo(e,t,n){return this.pathType===L.INTERNAL&&!!(this.toString()===e.toString()||this.getResolvedFiles(t,n).includes(e.toString()))}static filterMapInternalPaths(t){return t.map(t=>new e(t)).filter(({pathType:e})=>e===L.INTERNAL).map(e=>e.toString())}},_r=class e{constructor(t){this.byDirAndName=/* @__PURE__ */ new Map,t.forEach((t,n)=>{let r=t.startsWith(`/`)?t.slice(1):t,{dir:i,name:a}=j(r),o=e.key(i,a),s=[n,r],c=this.byDirAndName.get(o);c?c.push(s):this.byDirAndName.set(o,[s])})}static key(e,t){return`${e}\0${t}`}lookup(t,n,r){let i=this.byDirAndName.get(e.key(t,n))??[],a=r===n?[]:this.byDirAndName.get(e.key(t,r))??[];return[...i,...a].sort(([e],[t])=>e-t).map(([,e])=>e)}},vr=class{constructor(e,t=[]){this.label=e,this.paths=t,this.edges=[],this.headingSlugs=null,this.relativeDir=I(at(e)),this.filename=it(e),this.label=A(this.relativeDir,this.filename)}toString(){return this.label}equals(e){return this.label===e.label}addPath(e,t,n){let r=new gr(e,this.relativeDir,this.filename,t,n);this.paths.push(r)}addOutgoingEdge(e){let t=this.edges.find(t=>t.equals(e));t?t.incrementCount():this.edges.push(e)}getChildNodes(e=1){let t=[];for(let n of this.edges){let r=n.target;t.push(r),e>1&&t.push(...r.getChildNodes(e-1))}return t}},yr=class{constructor(e,t,n){this.source=e,this.target=t,this.edgeType=n,this.count=0,this.count++}incrementCount(){this.count++}getCount(){return this.count}equals(e){return this.source.equals(e.source)&&this.target.equals(e.target)&&this.edgeType===e.edgeType}},br=class{constructor(e,t=[]){this.baseDir=e,this.nodes=Object.create(null),this.edges=[],this.fileResolutionMap=/* @__PURE__ */ new Map,this.redirectMap=/* @__PURE__ */ new Map,this.wildcardRedirects=[],this.configRedirects=[],this.mintIgnoreGlobs=[],this.virtualNodes=/* @__PURE__ */ new Set,this.snippetReferencesByFile=/* @__PURE__ */ new Map,this.baseDir=st(e),this.mintIgnoreGlobs=t,this.mintIgnoreMatcher=w(t)}addNode(e){return this.nodes[e]||(this.nodes[e]=new vr(e)),this.nodes[e]}addNodes(e){for(let t of e)this.addNode(t)}addVirtualNodes(e){for(let t of e)this.addNode(t),this.virtualNodes.add(new vr(t).toString())}setRedirects(e){this.configRedirects=e,this.redirectMap.clear();for(let t of e){let e=I(t.source);this.redirectMap.has(e)||this.redirectMap.set(e,I(t.destination))}this.wildcardRedirects=[...this.redirectMap].filter(([e])=>mr(e))}matchesWildcardPattern(e,t){let n=`^${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`).replace(/:(\w+)/g,`(?<$1>[^/]+)`).replace(/\\\*/g,`(.*)`)}$`;return new RegExp(n).test(e)}applyWildcardRedirect(e,t,n){let r=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),i=[],a=r.replace(/:(\w+)/g,(e,t)=>(i.push({type:`param`,name:t}),`(?<${t}>[^/]+)`)).replace(/\\\*/g,()=>(i.push({type:`wildcard`}),`(.*)`)),o=RegExp(`^${a}$`),s=e.match(o);if(!s)return n;let c=n,l=s.groups||{};for(let[e,t]of Object.entries(l))c=c.replace(RegExp(`:${e}`,`g`),t);let u=s.slice(1),d=0,f=u.filter((e,t)=>i[t]&&i[t].type===`wildcard`);return c=c.replace(/\*/g,()=>f[d++]||``),c}addAliasNodes(){let e=gr.filterMapInternalPaths(fe(this.baseDir,this.baseDir,this.mintIgnoreGlobs)).filter(e=>!De(e,this.mintIgnoreMatcher));this.addNodes(e)}getNode(e){return this.nodes[e]}getAnchorTargetFiles(e){this.fileResolutionMap.size===0&&this.precomputeFileResolutions();let t=new Set(Object.keys(this.nodes)),n=/* @__PURE__ */ new Set;for(let r of Object.values(this.nodes))for(let i of r.paths.flatMap(e=>[e,...e.pagePaths]))if(i.pathType===L.INTERNAL&&i.anchorLink&&e.has(A(i.relativeDir,i.filename)))for(let e of this.getHeadingSlugCandidates(i.toString(),t)){let t=this.nodes[e];if(t&&(n.add(e),t.headingSlugs!==null))break}return n}addEdge(e,t,n=hr.CONTENT){let r=new yr(e,t,n);return this.edges.find(e=>e.equals(r)?(e.incrementCount(),!0):!1)||(this.edges.push(r),r)}addEdgesBetweenNodes(){let e=new _r(dr(this.baseDir,this.mintIgnoreGlobs));for(let t of Object.values(this.nodes))for(let n of t.paths)if(n.pathType===L.INTERNAL){let r=Object.values(this.nodes).find(t=>n.resolvesTo(t,e,this.baseDir));if(r){let e=this.addEdge(t,r);t.addOutgoingEdge(e)}}}precomputeFileResolutions(){let e=new _r(dr(this.baseDir,this.mintIgnoreGlobs)),t=/* @__PURE__ */ new Set;Object.values(this.nodes).forEach(n=>{n.paths.flatMap(e=>[e,...e.pagePaths]).filter(e=>e.pathType===L.INTERNAL).forEach(n=>{let r=n.toString();if(t.has(r))return;t.add(r);let i=n.getResolvedFiles(e,this.baseDir);this.fileResolutionMap.set(r,new Set(i))})})}getHeadingSlugCandidates(e,t){let n=[...this.fileResolutionMap.get(e)??[]].filter(e=>t.has(e)),r=A(e,`index.mdx`),i=this.nodes[r]?r:A(e,`index.md`);return[...n,e,i]}getHeadingSlugsForPath(e,t){for(let n of this.getHeadingSlugCandidates(e,t)){let e=this.nodes[n];if(e&&e.headingSlugs!==null)return e.headingSlugs}}getBrokenInternalLinks(e){this.fileResolutionMap.size===0&&this.precomputeFileResolutions();let t=/* @__PURE__ */ new Set,n=new Set(Object.values(this.nodes).map(e=>e.toString()));for(let r of Object.values(this.nodes))for(let i of r.paths.flatMap(e=>[e,...e.pagePaths]))if(i.pathType===L.INTERNAL){let r=i.toString(),a=this.fileResolutionMap.get(r),o=r===`.`||a&&[...a].some(e=>n.has(e))||this.virtualNodes.has(r);if(i.keepsMdxExtension()&&!this.redirectsToPage(r)||!o&&!this.reachesPage(r))t.add(i);else if(e?.checkAnchors&&i.anchorLink){let e=re(i.anchorLink.slice(1)),a=this.getHeadingSlugsForPath(r,n);a&&!a.has(e)&&t.add(i)}}return Object.values(this.nodes).flatMap(e=>e.paths).filter(e=>t.has(e)&&(e.pagePaths.length===0||e.pagePaths.some(e=>t.has(e))))}getLinksTo(e){let t=this.getPageRoute(e.toString()),n=n=>n.pathType===L.INTERNAL&&!n.originalPath.startsWith(`#`)&&this.getPageRoute(n.toString())===t&&(!e.anchorLink||n.anchorLink===e.anchorLink);return Object.values(this.nodes).flatMap(e=>e.paths).filter(e=>n(e)||e.pagePaths.some(n))}getPageRoute(e){let t=[...this.getPageCandidates(e),e].find(e=>this.nodes[e])??e,n=j(t),r=tr(n)?cr(n):t;return it(r)===`index`?at(r):r}getPageCandidates(e){return e===`.`?[`index.mdx`,`index.md`]:[`${e}.mdx`,`${e}.md`,A(e,`index.mdx`),A(e,`index.md`)]}isPageRoute(e){return this.getPageCandidates(e).some(e=>this.nodes[e])||this.virtualNodes.has(e)}resolvesToValidPath(e,t=/* @__PURE__ */ new Set){if(URL.canParse(e))return!0;let n=lr(e);return!n||mr(n)?!0:this.reachesPage(I(n),t)}redirectsToPage(e){let t=this.getRedirectTarget(e);return t!==void 0&&this.resolvesToValidPath(t,/* @__PURE__ */ new Set([e]))}reachesPage(e,t=/* @__PURE__ */ new Set){if(t.has(e))return!1;t.add(e);let n=this.getExactRedirectTarget(e);if(n!==void 0)return this.resolvesToValidPath(n,t);if(e!==`.`&&this.nodes[e]||this.isPageRoute(e))return!0;let r=this.getRedirectTarget(e);return r!==void 0&&this.resolvesToValidPath(r,t)}getExactRedirectTarget(e){return this.redirectMap.get(e)}getRedirectTarget(e){let t=this.getExactRedirectTarget(e);if(t!==void 0)return t;for(let[t,n]of this.wildcardRedirects)if(this.matchesWildcardPattern(e,t))return this.applyWildcardRedirect(e,t,n)}getBrokenRedirects(){let e=[],t=/* @__PURE__ */ new Set;for(let{source:n,destination:r}of this.configRedirects){let i=I(n);t.has(i)||(t.add(i),URL.canParse(r)||mr(lr(r))||this.resolvesToValidPath(r)||e.push({source:n,destination:r}))}return e}getExternalPathsByNode(){let e=/* @__PURE__ */ new Map;for(let[t,n]of Object.entries(this.nodes)){let r=n.paths.filter(e=>e.pathType===L.EXTERNAL);r.length>0&&e.set(t,r)}return e}getAllInternalPaths(){return Object.values(this.nodes).flatMap(e=>e.paths).filter(e=>e.pathType===L.INTERNAL).map(e=>e.originalPath+` => `+e.toString())}},xr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Sr=e=>xr(void 0,void 0,void 0,function*(){for(let t of[`docs.json`,`mint.json`]){let n=rt.join(e,t);if(bn.default.existsSync(n))try{let r=yield bn.default.readJSON(n),{resolved:i}=yield ye(r,e);if(i&&typeof i==`object`&&!Array.isArray(i))return{configFile:t,json:i}}catch(e){console.warn(`Warning: Failed to read or resolve ${t}: ${e}`)}}return null}),Cr=e=>xr(void 0,void 0,void 0,function*(){let t=yield Sr(e);return t?t.configFile===`docs.json`?Se(pe(t.json)):_e(t.json):null}),wr=e=>xr(void 0,void 0,void 0,function*(){let t=yield Sr(e);if(!t||t.configFile!==`docs.json`)return null;let n=Se(pe(t.json));return n.success?n.data:null});var Tr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Er=e=>Tr(void 0,void 0,void 0,function*(){let t=yield wr(e);if(!t)return[];let{generatedRoutes:n}=yield y(t,t=>ge(t,e),{onSourceError:(e,t)=>console.warn(`Warning: Failed to load GraphQL schema ${e}: ${t}`)});return n});var Dr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Or=e=>typeof e==`string`&&e!==``&&E(e)===void 0&&te(e)===void 0,kr=e=>{if(typeof e!=`object`||!e)return[];if(Array.isArray(e))return e.flatMap(kr);let t=e,n=[];if(typeof t.href==`string`&&n.push(t.href),Or(t.root)&&n.push(t.root.startsWith(`/`)?t.root:`/${t.root}`),Array.isArray(t.pages))for(let e of t.pages)Or(e)&&n.push(e.startsWith(`/`)?e:`/${e}`);for(let e of Object.values(t))n.push(...kr(e));return n},Ar=e=>Dr(void 0,void 0,void 0,function*(){let t=yield Sr(e);if(t&&t.json.navigation)return{hrefs:kr(t.json.navigation),configFile:t.configFile}});var jr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Mr=(e,t)=>jr(void 0,void 0,void 0,function*(){let n=[];try{let r=yield wr(e),i=r?ce(r):void 0,a=yield de(e,{explicitOverlays:i,fetchRemoteDocument:t?.fetchRemoteDocument});if(r){let o=yield ve(e,{explicitOverlays:i,fetchRemoteDocument:t?.fetchRemoteDocument}),s=yield Nr(r,o,t?.fetchRemoteDocument),c=[...a,...s],l={};try{yield _(r.navigation,c,l,{writeFiles:!1,overlayRegistry:o,fetchRemoteDocument:t?.fetchRemoteDocument})}catch(e){console.warn(`Warning: Failed to extract OpenAPI pages from navigation: ${e}`)}n.push(...Object.keys(l))}for(let e of a)try{let{pagesAcc:t}=yield T(e.spec,{openApiFilePath:e.originalFileLocation,writeFiles:!1,outDir:`api-reference`});n.push(...Object.keys(t))}catch(t){console.warn(`Warning: Failed to extract pages from OpenAPI spec ${e.originalFileLocation}: ${t}`)}}catch(e){console.warn(`Warning: Failed to categorize files for OpenAPI extraction: ${e}`)}return[...new Set(n)]}),Nr=(e,t,n)=>jr(void 0,void 0,void 0,function*(){try{return yield Te(`docs`,e,void 0,t,n)}catch(e){return console.warn(`Warning: Failed to fetch URL-based OpenAPI specs: ${e}`),[]}});var Pr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Fr=e=>Pr(void 0,void 0,void 0,function*(){let t=[],n=yield Cr(e);return n&&n.success&&`redirects`in n.data&&n.data.redirects&&t.push(...n.data.redirects),t}),Ir=[`ImportDefaultSpecifier`,`ImportNamespaceSpecifier`],Lr=e=>{let t=[],n=[],r=[],i=/* @__PURE__ */ new Set;Xn(e,e=>{if(ze(e)&&Ve(e)){for(let n of e.data.estree.body){if(!He(n)||typeof n.source.value!=`string`)continue;let e=n.source.value;t.push(e);for(let t of n.specifiers)Ir.includes(t.type)&&r.push({source:e,name:t.local.name})}return}if(!Ge(e)||!e.name||(i.add(e.name),e.name!==`Snippet`))return;let a=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`file`)?.value;typeof a==`string`&&n.push(`/_snippets/`+fr(a))});for(let{source:e,name:t}of r)i.has(t)&&n.push(e);return{imported:t,rendered:n}},Rr=[`snippets/`,`_snippets/`],z=e=>e.replaceAll(ht,`/`),zr=({originalPath:e,pathType:t,wrapper:n})=>n!==R.IMPORT&&t===L.INTERNAL&&!e.startsWith(`/`),Br=(e,t)=>{var n;let r=new Map([...t.keys()].map(e=>[z(e),e])),i=(e,t)=>e.flatMap(e=>{let n=Oe(e,z(t)),i=n&&r.get(fr(n));return i?[i]:[]}),a=/* @__PURE__ */ new Set;for(let[e,{imported:n}]of t){let t=z(e).toLowerCase();Rr.some(e=>t.startsWith(e))&&a.add(e);for(let t of i(n,e))a.add(t)}let o=(e,n)=>{let r=t.get(e)?.rendered??[];for(let t of i(r,e))!n.has(t)&&a.has(t)&&(n.add(t),o(t,n));return n},s=/* @__PURE__ */ new Map;for(let e of t.keys())a.has(e)||s.set(e,o(e,/* @__PURE__ */ new Set));for(let[t,r]of s){let i=e.getNode(t);if(i)for(let t of r){let r=e.getNode(t);for(let e of r?.paths.filter(zr)??[])e.pagePaths.push(new gr(e.originalPath,i.relativeDir,i.filename,e.wrapper));for(let e of r?.headingSlugs??[])(n=i.headingSlugs)==null||n.add(e)}}},Vr=(e,t,n)=>{let r=/* @__PURE__ */ new Set;if(!n.checkAnchors&&!n.checkSnippets)return r;let i=n.checkAnchors?[...e.getAnchorTargetFiles(t)]:[];for(let e of i)r.add(z(e));let a=new Map([...e.snippetReferencesByFile.keys()].map(e=>[z(e),e])),o=/* @__PURE__ */ new Set,s=t=>{if(o.has(t))return;o.add(t);let n=a.get(t),i=n?e.snippetReferencesByFile.get(n)?.rendered??[]:[];for(let e of i){let n=Oe(e,t);if(!n)continue;let i=fr(n);r.add(i),s(i)}};for(let e of[...t,...i])s(z(e));return r};var Hr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Ur=e=>{let t=/* @__PURE__ */ new Set;for(let n of e){t.add(le(n.slug));for(let e of Ur(n.children))t.add(e)}return t},Wr=/* @__PURE__ */ new Set([`ParamField`,`Param`,`ResponseField`]),Gr=/* @__PURE__ */ new Set([`query`,`path`,`body`,`header`,`name`]),Kr=e=>{let t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Map;return Xn(e,`mdxJsxFlowElement`,e=>{if(Wr.has(e.name??``)){let r=e.attributes.find(e=>`name`in e&&Gr.has(e.name));if(r&&typeof r.value==`string`&&r.value){let e=n.get(r.value)??0;n.set(r.value,e+1),t.add(gt(r.value,e))}return}if(Ot.has(e.name??``))return;let r=e.attributes.find(e=>`name`in e&&e.name===`id`);if(r&&typeof r.value==`string`&&r.value){let n=kt.has(e.name??``)?le(r.value):r.value;t.add(n)}}),t},qr=e=>{if(typeof e==`string`)return e;let t=(e?.data?.estree)?.body[0],n=t?.type===`ExpressionStatement`?t.expression:void 0;if(n?.type===`Literal`&&typeof n.value==`string`)return n.value;if(n?.type===`TemplateLiteral`&&n.expressions.length===0)return n.quasis[0]?.value.cooked??void 0},Jr=(e,t,n)=>Hr(void 0,void 0,void 0,function*(){let r={},i=()=>t=>{let n=/* @__PURE__ */ new Set;return Xn(t,[`linkReference`,`imageReference`],e=>{`identifier`in e&&n.add(e.identifier)}),Xn(t,t=>{let r=t.position?.start.line,i=r===void 0?void 0:s[r-1];if(t.type===`link`||t.type===`image`){e.addPath(t.url,R.MD,i);return}if(t.type===`definition`){n.delete(t.identifier)&&e.addPath(t.url,R.DEFINITION,i);return}let a=t;if(a.name===`img`||a.name===`source`){let t=a.attributes.findIndex(e=>e.type===`mdxJsxAttribute`&&e.name===`src`),n=qr(a.attributes[t]?.value);if(typeof n==`string`){e.addPath(n,R.SRC,i);return}}else if(a.name===`a`||a.name===`Card`){let t=a.attributes.findIndex(e=>e.type===`mdxJsxAttribute`&&e.name===`href`),n=qr(a.attributes[t]?.value);if(typeof n==`string`){e.addPath(n,R.HREF,i);return}}}),t},a=ee(t),o=Ke(a),s=qe(a),l=v().use(Rn).use(i).use(c).use(wt,r),u=l.parse(o),d=Lr(u);if(n?.checkSnippets)for(let t of d.imported)e.addPath(t,R.IMPORT);yield l.run(u);let f=r.tableOfContents?Ur(r.tableOfContents):/* @__PURE__ */ new Set,p=Kr(u);return e.headingSlugs=/* @__PURE__ */ new Set([...f,...p]),d}),Yr=(e,t)=>Hr(void 0,void 0,void 0,function*(){let n=e||process.cwd(),r=yield he(n),i=w(r),a=new br(n,r),o=dr(n,r).filter(e=>!De(e,i));a.addNodes(o);let s=yield Fr(n);a.setRedirects(s),a.addAliasNodes();try{let e=yield Mr(n,{fetchRemoteDocument:t?.fetchRemoteDocument});a.addVirtualNodes(e)}catch(e){console.warn(`Warning: Failed to extract OpenAPI page paths: ${e}`)}try{let e=yield Er(n);a.addVirtualNodes(e)}catch(e){console.warn(`Warning: Failed to extract GraphQL page paths: ${e}`)}let c=yield Ar(n);if(c){let e=a.addNode(c.configFile);for(let t of c.hrefs){let n=t===`/`||t===``?`/index`:t.replace(/^\/#/,`/index#`);e.addPath(n)}}let l=ur(n,r).filter(e=>!De(e,i)),u=/* @__PURE__ */ new Map,d=0,f=performance.now();return yield Promise.all(Array.from({length:Math.min(8,l.length)},()=>Hr(void 0,void 0,void 0,function*(){for(;d<l.length;){performance.now()-f>50&&(yield new Promise(e=>setImmediate(e)),f=performance.now());let e=l[d++];if(e===void 0)continue;let r=a.getNode(e);if(!r)continue;let i=bn.default.readFileSync(rt.join(n,e)).toString();try{let n=yield Jr(r,i,{checkSnippets:t?.checkSnippets});u.set(e,n)}catch(n){let r=/* @__PURE__ */ Error(`Syntax error - Unable to parse ${e} - ${n}`);if(!t?.onParseError)throw r;t.onParseError(e,r)}}}))),Br(a,u),a.snippetReferencesByFile=u,a});var B=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Xr=e=>{try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}},Zr=(e,t)=>B(void 0,void 0,void 0,function*(){let n=new AbortController,r=setTimeout(()=>n.abort(),1e4);try{let r=yield fetch(e,{method:t,signal:n.signal,headers:{"User-Agent":`Mintlify-LinkChecker/1.0`},redirect:`follow`});return yield r.body?.cancel().catch(()=>void 0),r.status}finally{clearTimeout(r)}}),Qr=/* @__PURE__ */ new Set([404,405]),$r=e=>B(void 0,void 0,void 0,function*(){try{let t=yield Zr(e,`HEAD`),n=Qr.has(t)?yield Zr(e,`GET`).catch(()=>t):t;return{ok:n!==404,status:n}}catch(e){return{ok:!1,status:null,error:e instanceof Error?e.message:`unknown error`}}}),ei=(e,t,n)=>B(void 0,void 0,void 0,function*(){let r=[],i=0,a=()=>B(void 0,void 0,void 0,function*(){for(;i<e.length;){let n=i++;r[n]=yield t(e[n])}}),o=Array.from({length:Math.min(n,e.length)},()=>a());return yield Promise.all(o),r}),ti=(e,t)=>B(void 0,void 0,void 0,function*(){let n=/* @__PURE__ */ new Map;for(let[r,i]of e.getExternalPathsByNode())if(!t?.sourceFiles||t.sourceFiles.has(r)){for(let e of i)if(Xr(e.originalPath)){let t=e.originalPath,i=n.get(t),a={file:r,originalPath:e.originalPath};i?i.push(a):n.set(t,[a])}}let r=[...n.keys()];return(yield ei(r,e=>B(void 0,void 0,void 0,function*(){let t=yield $r(e);if(t.ok)return null;let r={url:e,status:t.status,sources:n.get(e)};return t.error&&(r.error=t.error),r}),5)).filter(e=>e!==null)});var ni=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const ri=new RegExp(Re.source,`gm`),ii=/^(?:import|export)(?=[\s{*])/,ai=/<[A-Za-z][\w.:-]*(?:"[^"]*"|'[^']*'|\{[^{}]*\}|[^<>"'{}])*>/g,oi=/"[^"]*"|'[^']*'|\{[^{}]*\}/g,si=e=>/\{\s*#[^}]+?\s*\}\s*$/.test(e),ci=e=>{let t=e.replace(ri,(e,t,n,r)=>{let i=e.indexOf(r,t.length+n.length)+r.length;return e.slice(0,i).padEnd(e.length,` `)});return v().parse(t)},li=(e,t)=>{let n=``,r=0;for(let[i,a]of[...t].sort((e,t)=>e[0]-t[0])){let t=Math.max(i,r);a<=t||(n+=e.slice(r,t)+e.slice(t,a).replace(/[^\n]/g,` `),r=a)}return n+e.slice(r)},ui=(e,t)=>t.reduce((e,t)=>li(e,t(e)),e),di=e=>{try{return x.parse(e,{ecmaVersion:`latest`,sourceType:`module`}),!0}catch(t){let n=t.pos;return typeof n!=`number`||n<e.trimEnd().length}},fi=e=>{let t=g.exec(e);return t?[[t.index,t.index+t[0].length]]:[]},pi=(e,t)=>{let n,r=!0,i=[],a=0;for(let o of e.split(`
10
10
  `)){let e=o.trim()===``,s=r;r=e,n?e&&di(n.join(`
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{i as e,o as t}from"./rolldown-runtime-CEAe2Uac.js";import{t as n}from"./multi-repo-config-fDV9HAT5.js";import{basename as r,dirname as i,extname as a,normalize as o,relative as s,resolve as c}from"path";import{fileURLToPath as l}from"url";import u from"node:os";import d from"node:path";import{format as f,inspect as p}from"util";import{readFileSync as m,readdirSync as h,statSync as g,writeFile as ee}from"fs";import{notStrictEqual as _,strictEqual as te}from"assert";var v={fs:{readFileSync:m,writeFile:ee},format:f,resolve:c,exists:e=>{try{return g(e).isFile()}catch{return!1}}};let y;var ne=class{constructor(e){e||={},this.directory=e.directory||`./locales`,this.updateFiles=typeof e.updateFiles!=`boolean`||e.updateFiles,this.locale=e.locale||`en`,this.fallbackToLanguage=typeof e.fallbackToLanguage!=`boolean`||e.fallbackToLanguage,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!=`string`)return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),n=function(){};return typeof e[e.length-1]==`function`&&(n=e.pop()),n||=function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),y.format.apply(y.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift(),i=function(){};typeof e[e.length-1]==`function`&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let a=r===1?t:n;this.cache[this.locale][t]&&(a=this.cache[this.locale][t][r===1?`one`:`other`]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();let o=[a];return~a.indexOf(`%d`)&&o.push(r),y.format.apply(y.format,o.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let n=``;return e.forEach(function(e,r){let i=t[r+1];n+=e,i!==void 0&&(n+=`%s`)}),this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],n=t.directory,r=t.locale,i=t.cb,a=this._resolveLocaleFile(n,r),o=JSON.stringify(this.cache[r],null,2);y.fs.writeFile(a,o,`utf-8`,function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(t)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{y.fs.readFileSync&&(e=JSON.parse(y.fs.readFileSync(t,`utf-8`)))}catch(n){if(n instanceof SyntaxError&&(n.message=`syntax error in `+t),n.code===`ENOENT`)e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=y.resolve(e,`./`,t+`.json`);if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf(`_`)){let r=y.resolve(e,`./`,t.split(`_`)[0]+`.json`);this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return y.exists(e)}};function re(e,t){y=t;let n=new ne(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}const b=e=>re(e,v),x={right:ae,center:oe};var S=class{constructor(e){this.width=e.width,this.wrap=e.wrap??!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(``),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]==`string`)return this.applyLayoutDSL(e[0]);let t=e.map(e=>typeof e==`string`?this.colFromString(e):e);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]==`string`&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
7
+ import{i as e,o as t}from"./rolldown-runtime-CEAe2Uac.js";import{t as n}from"./multi-repo-config-BRFbpA00.js";import{basename as r,dirname as i,extname as a,normalize as o,relative as s,resolve as c}from"path";import{fileURLToPath as l}from"url";import u from"node:os";import d from"node:path";import{format as f,inspect as p}from"util";import{readFileSync as m,readdirSync as h,statSync as g,writeFile as ee}from"fs";import{notStrictEqual as _,strictEqual as te}from"assert";var v={fs:{readFileSync:m,writeFile:ee},format:f,resolve:c,exists:e=>{try{return g(e).isFile()}catch{return!1}}};let y;var ne=class{constructor(e){e||={},this.directory=e.directory||`./locales`,this.updateFiles=typeof e.updateFiles!=`boolean`||e.updateFiles,this.locale=e.locale||`en`,this.fallbackToLanguage=typeof e.fallbackToLanguage!=`boolean`||e.fallbackToLanguage,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!=`string`)return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),n=function(){};return typeof e[e.length-1]==`function`&&(n=e.pop()),n||=function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),y.format.apply(y.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift(),i=function(){};typeof e[e.length-1]==`function`&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let a=r===1?t:n;this.cache[this.locale][t]&&(a=this.cache[this.locale][t][r===1?`one`:`other`]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();let o=[a];return~a.indexOf(`%d`)&&o.push(r),y.format.apply(y.format,o.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let n=``;return e.forEach(function(e,r){let i=t[r+1];n+=e,i!==void 0&&(n+=`%s`)}),this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],n=t.directory,r=t.locale,i=t.cb,a=this._resolveLocaleFile(n,r),o=JSON.stringify(this.cache[r],null,2);y.fs.writeFile(a,o,`utf-8`,function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(t)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{y.fs.readFileSync&&(e=JSON.parse(y.fs.readFileSync(t,`utf-8`)))}catch(n){if(n instanceof SyntaxError&&(n.message=`syntax error in `+t),n.code===`ENOENT`)e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=y.resolve(e,`./`,t+`.json`);if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf(`_`)){let r=y.resolve(e,`./`,t.split(`_`)[0]+`.json`);this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return y.exists(e)}};function re(e,t){y=t;let n=new ne(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}const b=e=>re(e,v),x={right:ae,center:oe};var S=class{constructor(e){this.width=e.width,this.wrap=e.wrap??!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(``),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]==`string`)return this.applyLayoutDSL(e[0]);let t=e.map(e=>typeof e==`string`?this.colFromString(e):e);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]==`string`&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
8
8
  `).map(e=>e.split(` `)),n=0;return t.forEach(e=>{e.length>1&&T.stringWidth(e[0])>n&&(n=Math.min(Math.floor(this.width*.5),T.stringWidth(e[0])))}),t.forEach(e=>{this.div(...e.map((t,r)=>({text:t.trim(),padding:this.measurePadding(t),width:r===0&&e.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=T.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(e=>!e.hidden).map(e=>e.text).join(`
9
9
  `)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let i=``;n.forEach((n,a)=>{let{width:o}=e[a],s=this.negatePadding(e[a]),c=n;if(s>T.stringWidth(n)&&(c+=` `.repeat(s-T.stringWidth(n))),e[a].align&&e[a].align!==`left`&&this.wrap){let t=x[e[a].align];c=t(c,s),T.stringWidth(c)<s&&(c+=` `.repeat((o||0)-T.stringWidth(c)-1))}let l=e[a].padding||[0,0,0,0];l[3]&&(i+=` `.repeat(l[3])),i+=C(e[a],c,`| `),i+=c,i+=C(e[a],c,` |`),l[1]&&(i+=` `.repeat(l[1])),r===0&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))}),t.push({text:i.replace(/ +$/,``),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,i=t.text,a=T.stringWidth(i.trimRight());return t.span?this.wrap?r<a?e:(t.hidden=!0,i.trimRight()+` `.repeat(r-a)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((e,i)=>{e.width=n[i],r=this.wrap?T.wrap(e.text,this.negatePadding(e),{hard:!0}).split(`
10
10
  `):e.text.split(`
@@ -98,4 +98,4 @@ Please do one of the following:
98
98
  - Use a different option key
99
99
  https://yargs.js.org/docs/#api-reference-version`,void 0,`versionWarning`),I(this,q,`f`).key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption==`string`?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),`default`in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type===`boolean`)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type===`array`)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type===`number`)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type===`string`)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type===`count`)&&this.count(e),typeof t.global==`boolean`&&this.global(e,t.global),t.defaultDescription&&(I(this,q,`f`).defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let i=t.describe||t.description||t.desc,a=I(this,Z,`f`).getDescriptions();Object.prototype.hasOwnProperty.call(a,e)&&typeof i!=`string`||this.describe(e,i),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){P(`[string|array] [function|boolean|object] [function]`,[e,t,n],arguments.length),this[Ut](),e===void 0&&(e=I(this,Y,`f`)),typeof t==`object`&&(F(this,At,t,`f`),t=n),typeof t==`function`&&(F(this,J,t,`f`),t=!1),t||F(this,Y,e,`f`),I(this,J,`f`)&&F(this,V,!1,`f`);let r=this[vn](e,!!t),i=this.parsed;return I(this,R,`f`).setParsed(this.parsed),N(r)?r.then(e=>(I(this,J,`f`)&&I(this,J,`f`).call(this,I(this,B,`f`),e,I(this,K,`f`)),e)).catch(e=>{throw I(this,J,`f`)&&I(this,J,`f`)(e,this.parsed.argv,I(this,K,`f`)),e}).finally(()=>{this[rn](),this.parsed=i}):(I(this,J,`f`)&&I(this,J,`f`).call(this,I(this,B,`f`),r,I(this,K,`f`)),this[rn](),this.parsed=i,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return N(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(N(r))throw new j(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return r}parserConfiguration(e){return P(`<object>`,[e],arguments.length),F(this,kt,e,`f`),this}pkgConf(e,t){P(`<string> [string]`,[e,t],arguments.length);let n=null,r=this[Xt](t||I(this,bt,`f`));return r[e]&&typeof r[e]==`object`&&(n=gt(r[e],t||I(this,bt,`f`),this[Gt]()[`deep-merge-config`]||!1,I(this,X,`f`)),I(this,q,`f`).configObjects=(I(this,q,`f`).configObjects||[]).concat(n)),this}positional(e,t){P(`<string> <object>`,[e,t],arguments.length);let n=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];t=$e(t,(e,t)=>e===`type`&&![`string`,`number`,`boolean`].includes(t)?!1:n.includes(e));let r=I(this,xt,`f`).fullCommands[I(this,xt,`f`).fullCommands.length-1],i=r?I(this,L,`f`).cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return Pe(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.indexOf(e)!==-1&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])}),this.group(e,I(this,Z,`f`).getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return P(`[boolean]`,[e],arguments.length),F(this,Nt,e,`f`),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return P(`<array|string|object> [number]`,[e],arguments.length),typeof e==`string`&&I(this,q,`f`).narg[e]||this[Qt](this.requiresArg.bind(this),`narg`,e,NaN),this}showCompletionScript(e,t){return P(`[string] [string]`,[e,t],arguments.length),e||=this.$0,I(this,Dt,`f`).log(I(this,R,`f`).generateCompletionScript(e,t||I(this,z,`f`)||`completion`)),this}showHelp(e){if(P(`[string|function]`,[e],arguments.length),F(this,W,!0,`f`),!I(this,Z,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[vn](I(this,Y,`f`),void 0,void 0,0,!0);if(N(t))return t.then(()=>{I(this,Z,`f`).showHelp(e)}),this}let t=I(this,L,`f`).runDefaultBuilderOn(this);if(N(t))return t.then(()=>{I(this,Z,`f`).showHelp(e)}),this}return I(this,Z,`f`).showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return P(`[boolean|string] [string]`,[e,t],arguments.length),I(this,Z,`f`).showHelpOnFail(e,t),this}showVersion(e){return P(`[string|function]`,[e],arguments.length),I(this,Z,`f`).showVersion(e),this}skipValidation(e){return P(`<array|string>`,[e],arguments.length),this[Zt](`skipValidation`,e),this}strict(e){return P(`[boolean]`,[e],arguments.length),F(this,Pt,e!==!1,`f`),this}strictCommands(e){return P(`[boolean]`,[e],arguments.length),F(this,Ft,e!==!1,`f`),this}strictOptions(e){return P(`[boolean]`,[e],arguments.length),F(this,It,e!==!1,`f`),this}string(e){return P(`<array|string>`,[e],arguments.length),this[Zt](`string`,e),this[xn](e),this}terminalWidth(){return P([],0),I(this,X,`f`).process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return P(`<object>`,[e],arguments.length),F(this,Ct,!1,`f`),I(this,X,`f`).y18n.updateLocale(e),this}usage(e,t,n,r){if(P(`<string|null|undefined> [string|boolean] [function|object] [function]`,[e,t,n,r],arguments.length),t!==void 0){if(M(e,null,I(this,X,`f`)),(e||``).match(/^\$0( |$)/))return this.command(e,t,n,r);throw new j(`.usage() description must start with $0 if being used as alias for .command()`)}return I(this,Z,`f`).usage(e),this}usageConfiguration(e){return P(`<object>`,[e],arguments.length),F(this,Lt,e,`f`),this}version(e,t,n){let r=`version`;if(P(`[boolean|string] [string] [string]`,[e,t,n],arguments.length),I(this,Q,`f`)&&(this[Vt](I(this,Q,`f`)),I(this,Z,`f`).version(void 0),F(this,Q,null,`f`)),arguments.length===0)n=this[Jt](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return F(this,Q,typeof e==`string`?e:r,`f`),t||=I(this,Z,`f`).deferY18nLookup(`Show version number`),I(this,Z,`f`).version(n||void 0),this.boolean(I(this,Q,`f`)),this.describe(I(this,Q,`f`),t),this}wrap(e){return P(`<number|null|undefined>`,[e],arguments.length),I(this,Z,`f`).wrap(e),this}[(L=/* @__PURE__ */ new WeakMap,bt=/* @__PURE__ */ new WeakMap,xt=/* @__PURE__ */ new WeakMap,R=/* @__PURE__ */ new WeakMap,z=/* @__PURE__ */ new WeakMap,St=/* @__PURE__ */ new WeakMap,B=/* @__PURE__ */ new WeakMap,Ct=/* @__PURE__ */ new WeakMap,wt=/* @__PURE__ */ new WeakMap,V=/* @__PURE__ */ new WeakMap,Tt=/* @__PURE__ */ new WeakMap,H=/* @__PURE__ */ new WeakMap,U=/* @__PURE__ */ new WeakMap,W=/* @__PURE__ */ new WeakMap,G=/* @__PURE__ */ new WeakMap,Et=/* @__PURE__ */ new WeakMap,Dt=/* @__PURE__ */ new WeakMap,K=/* @__PURE__ */ new WeakMap,q=/* @__PURE__ */ new WeakMap,Ot=/* @__PURE__ */ new WeakMap,kt=/* @__PURE__ */ new WeakMap,J=/* @__PURE__ */ new WeakMap,At=/* @__PURE__ */ new WeakMap,jt=/* @__PURE__ */ new WeakMap,Mt=/* @__PURE__ */ new WeakMap,Y=/* @__PURE__ */ new WeakMap,Nt=/* @__PURE__ */ new WeakMap,X=/* @__PURE__ */ new WeakMap,Pt=/* @__PURE__ */ new WeakMap,Ft=/* @__PURE__ */ new WeakMap,It=/* @__PURE__ */ new WeakMap,Z=/* @__PURE__ */ new WeakMap,Lt=/* @__PURE__ */ new WeakMap,Q=/* @__PURE__ */ new WeakMap,$=/* @__PURE__ */ new WeakMap,zt)](e){if(!e._||!e[`--`])return e;e._.push.apply(e._,e[`--`]);try{delete e[`--`]}catch{}return e}[Bt](){return{log:(...e)=>{this[pn]()||console.log(...e),F(this,W,!0,`f`),I(this,K,`f`).length&&F(this,K,I(this,K,`f`)+`
100
100
  `,`f`),F(this,K,I(this,K,`f`)+e.join(` `),`f`)},error:(...e)=>{this[pn]()||console.error(...e),F(this,W,!0,`f`),I(this,K,`f`).length&&F(this,K,I(this,K,`f`)+`
101
- `,`f`),F(this,K,I(this,K,`f`)+e.join(` `),`f`)}}}[Vt](e){Pe(I(this,q,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=I(this,q,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete I(this,Z,`f`).getDescriptions()[e]}[Ht](e,t,n){I(this,wt,`f`)[n]||(I(this,X,`f`).process.emitWarning(e,t),I(this,wt,`f`)[n]=!0)}[Ut](){I(this,Tt,`f`).push({options:I(this,q,`f`),configObjects:I(this,q,`f`).configObjects.slice(0),exitProcess:I(this,V,`f`),groups:I(this,U,`f`),strict:I(this,Pt,`f`),strictCommands:I(this,Ft,`f`),strictOptions:I(this,It,`f`),completionCommand:I(this,z,`f`),output:I(this,K,`f`),exitError:I(this,B,`f`),hasOutput:I(this,W,`f`),parsed:this.parsed,parseFn:I(this,J,`f`),parseContext:I(this,At,`f`)}),I(this,Z,`f`).freeze(),I(this,$,`f`).freeze(),I(this,L,`f`).freeze(),I(this,H,`f`).freeze()}[Wt](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(I(this,X,`f`).process.argv()[0])?I(this,X,`f`).process.argv().slice(1,2):I(this,X,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[gn](I(this,bt,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),I(this,X,`f`).getEnv(`_`)&&I(this,X,`f`).getProcessArgvBin()===I(this,X,`f`).getEnv(`_`)&&(e=I(this,X,`f`).getEnv(`_`).replace(`${I(this,X,`f`).path.dirname(I(this,X,`f`).process.execPath())}/`,``)),e}[Gt](){return I(this,kt,`f`)}[Kt](){return I(this,Lt,`f`)}[qt](){if(!I(this,Ct,`f`))return;let e=I(this,X,`f`).getEnv(`LC_ALL`)||I(this,X,`f`).getEnv(`LC_MESSAGES`)||I(this,X,`f`).getEnv(`LANG`)||I(this,X,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[Jt](){return this[Xt]().version||`unknown`}[Yt](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)I(this,X,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Xt](e){let t=e||`*`;if(I(this,jt,`f`)[t])return I(this,jt,`f`)[t];let n={};try{let t=e||I(this,X,`f`).mainFilename;!e&&I(this,X,`f`).path.extname(t)&&(t=I(this,X,`f`).path.dirname(t));let r=I(this,X,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});M(r,void 0,I(this,X,`f`)),n=JSON.parse(I(this,X,`f`).readFileSync(r,`utf8`))}catch{}return I(this,jt,`f`)[t]=n||{},I(this,jt,`f`)[t]}[Zt](e,t){t=[].concat(t),t.forEach(t=>{t=this[tn](t),I(this,q,`f`)[e].push(t)})}[Qt](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{I(this,q,`f`)[e][t]=n})}[$t](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{I(this,q,`f`)[e][t]=(I(this,q,`f`)[e][t]||[]).concat(n)})}[en](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of Pe(n))e(t,n[t]);else i(t,this[tn](n),r)}[tn](e){return e===`__proto__`?`___proto___`:e}[nn](e,t){return this[Qt](this[nn].bind(this),`key`,e,t),this}[rn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=I(this,Tt,`f`).pop();M(f,void 0,I(this,X,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){F(e,q,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){F(t,V,e,`f`)}}.value,groups:{set value(e){F(n,U,e,`f`)}}.value,output:{set value(e){F(r,K,e,`f`)}}.value,exitError:{set value(e){F(i,B,e,`f`)}}.value,hasOutput:{set value(e){F(a,W,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){F(o,Pt,e,`f`)}}.value,strictCommands:{set value(e){F(s,Ft,e,`f`)}}.value,strictOptions:{set value(e){F(c,It,e,`f`)}}.value,completionCommand:{set value(e){F(l,z,e,`f`)}}.value,parseFn:{set value(e){F(u,J,e,`f`)}}.value,parseContext:{set value(e){F(d,At,e,`f`)}}.value}=f,I(this,q,`f`).configObjects=p,I(this,Z,`f`).unfreeze(),I(this,$,`f`).unfreeze(),I(this,L,`f`).unfreeze(),I(this,H,`f`).unfreeze()}[an](e,t){return He(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[on].bind(this),getContext:this[sn].bind(this),getHasOutput:this[cn].bind(this),getLoggerInstance:this[ln].bind(this),getParseContext:this[un].bind(this),getParserConfiguration:this[Gt].bind(this),getUsageConfiguration:this[Kt].bind(this),getUsageInstance:this[dn].bind(this),getValidationInstance:this[fn].bind(this),hasParseCallback:this[pn].bind(this),isGlobalContext:this[mn].bind(this),postProcess:this[hn].bind(this),reset:this[_n].bind(this),runValidation:this[yn].bind(this),runYargsParserAndExecuteCommands:this[vn].bind(this),setHasOutput:this[bn].bind(this)}}[on](){return I(this,L,`f`)}[sn](){return I(this,xt,`f`)}[cn](){return I(this,W,`f`)}[ln](){return I(this,Dt,`f`)}[un](){return I(this,At,`f`)||{}}[dn](){return I(this,Z,`f`)}[fn](){return I(this,$,`f`)}[pn](){return!!I(this,J,`f`)}[mn](){return I(this,Et,`f`)}[hn](e,t,n,r){return n||N(e)||(t||(e=this[zt](e)),(this[Gt]()[`parse-positional-numbers`]||this[Gt]()[`parse-positional-numbers`]===void 0)&&(e=this[Yt](e)),r&&(e=Ve(e,this,I(this,H,`f`).getMiddleware(),!1))),e}[_n](e={}){F(this,q,I(this,q,`f`)||{},`f`);let t={};t.local=I(this,q,`f`).local||[],t.configObjects=I(this,q,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(I(this,Mt,`f`),Object.keys(I(this,U,`f`)).reduce((e,t)=>{let r=I(this,U,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),F(this,U,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(I(this,q,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=$e(I(this,q,`f`)[e],e=>!n[e])}),t.envPrefix=I(this,q,`f`).envPrefix,F(this,q,t,`f`),F(this,Z,I(this,Z,`f`)?I(this,Z,`f`).reset(n):nt(this,I(this,X,`f`)),`f`),F(this,$,I(this,$,`f`)?I(this,$,`f`).reset(n):pt(this,I(this,Z,`f`),I(this,X,`f`)),`f`),F(this,L,I(this,L,`f`)?I(this,L,`f`).reset():qe(I(this,Z,`f`),I(this,$,`f`),I(this,H,`f`),I(this,X,`f`)),`f`),I(this,R,`f`)||F(this,R,ct(this,I(this,Z,`f`),I(this,L,`f`),I(this,X,`f`)),`f`),I(this,H,`f`).reset(),F(this,z,null,`f`),F(this,K,``,`f`),F(this,B,null,`f`),F(this,W,!1,`f`),this.parsed=!1,this}[gn](e,t){return I(this,X,`f`).path.relative(e,t)}[vn](e,t,n,r=0,i=!1){let a=!!n||i;e||=I(this,Y,`f`),I(this,q,`f`).__=I(this,X,`f`).y18n.__,I(this,q,`f`).configuration=this[Gt]();let o=!!I(this,q,`f`).configuration[`populate--`],s=Object.assign({},I(this,q,`f`).configuration,{"populate--":!0}),c=I(this,X,`f`).Parser.detailed(e,Object.assign({},I(this,q,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,I(this,At,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===I(this,G,`f`)&&l[e]?f=!0:e===I(this,Q,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&I(this,Z,`f`).clearCachedHelpMessage();try{if(this[qt](),t)return this[hn](l,o,!!n,!1);I(this,G,`f`)&&[I(this,G,`f`)].concat(d[I(this,G,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),F(this,Et,!1,`f`);let s=I(this,L,`f`).getCommands(),m=I(this,R,`f`).completionKey in l,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++){if(a=String(l._[t]),s.includes(a)&&a!==I(this,z,`f`)){let e=I(this,L,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[hn](e,o,!!n,!1)}if(!e&&a!==I(this,z,`f`)){e=a;break}}!I(this,L,`f`).hasDefaultCommand()&&I(this,Nt,`f`)&&e&&!h&&I(this,$,`f`).recommendCommands(e,s)}I(this,z,`f`)&&l._.includes(I(this,z,`f`))&&!m&&(I(this,V,`f`)&&et(!0),this.showCompletionScript(),this.exit(0))}if(I(this,L,`f`).hasDefaultCommand()&&!h){let e=I(this,L,`f`).runCommand(null,this,c,0,i,f||p||i);return this[hn](e,o,!!n,!1)}if(m){I(this,V,`f`)&&et(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${I(this,R,`f`).completionKey}`)+1);return I(this,R,`f`).getCompletion(t,(e,t)=>{if(e)throw new j(e.message);(t||[]).forEach(e=>{I(this,Dt,`f`).log(e)}),this.exit(0)}),this[hn](l,!o,!!n,!1)}if(I(this,W,`f`)||(f?(I(this,V,`f`)&&et(!0),a=!0,this.showHelp(`log`),this.exit(0)):p&&(I(this,V,`f`)&&et(!0),a=!0,I(this,Z,`f`).showVersion(`log`),this.exit(0))),!a&&I(this,q,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>I(this,q,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new j(c.error.message);if(!m){let e=this[yn](d,{},c.error);n||(u=Ve(l,this,I(this,H,`f`).getMiddleware(),!0)),u=this[an](e,u??l),N(u)&&!n&&(u=u.then(()=>Ve(l,this,I(this,H,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof j)I(this,Z,`f`).fail(e.message,e);else throw e}return this[hn](u??l,o,!!n,!0)}[yn](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new j(n.message);I(this,$,`f`).nonOptionCount(a),I(this,$,`f`).requiredArguments(a,i);let o=!1;I(this,Ft,`f`)&&(o=I(this,$,`f`).unknownCommands(a)),I(this,Pt,`f`)&&!o?I(this,$,`f`).unknownArguments(a,e,t,!!r):I(this,It,`f`)&&I(this,$,`f`).unknownArguments(a,e,{},!1,!1),I(this,$,`f`).limitedChoices(a),I(this,$,`f`).implications(a),I(this,$,`f`).conflicting(a)}}[bn](){F(this,W,!0,`f`)}[xn](e){if(typeof e==`string`)I(this,q,`f`).key[e]=!0;else for(let t of e)I(this,q,`f`).key[t]=!0}};function Cn(e){return!!e&&typeof e.getInternalMethods==`function`}const wn=Rt(Me);var Tn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const En=e=>e.option(`multi-repo`,{type:`boolean`,description:`Compose local repositories; set up a workspace if no config exists`}).option(`workspace`,{type:`string`,requiresArg:!0,description:`Path to a local multi-repo config (implies --multi-repo)`}).option(`setup`,{type:`boolean`,description:`Review saved setup (requires --multi-repo or --workspace); preserve cache`}).option(`non-interactive`,{type:`boolean`,description:`Never prompt (requires --multi-repo or --workspace and a valid config)`}).wrap(null).epilog(n),Dn=(e,t)=>En(wn(e).scriptName(t).usage(`$0 dev --multi-repo [options]`)).option(`port`,{type:`number`,default:3e3,description:`Local preview port`}).option(`open`,{type:`boolean`,default:!1,description:`Open the preview in a browser`}).option(`client-version`,{type:`string`,hidden:!0}).option(`local-client-version`,{type:`string`,hidden:!0}).option(`local-schema`,{type:`boolean`,hidden:!0}).option(`classic`,{type:`boolean`,default:!1,description:`Preview with the classic client`}).option(`beta`,{type:`boolean`,default:!1,hidden:!0}).option(`groups`,{type:`array`,description:`Mock user groups`}).option(`signed-in`,{type:`boolean`,default:!1}).option(`disable-openapi`,{type:`boolean`,default:!1}).option(`disable-prefetch`,{type:`boolean`,default:!1}).option(`host`,{type:`boolean`,default:!1}).option(`telemetry`,{alias:`t`,type:`boolean`}).help().alias(`help`,`h`).exitProcess(!1).strictOptions().fail(e=>{throw Error(e)});function On(e){return Dn(e,`mint`).help(!1).version(!1).strictOptions(!1).parseSync()._[0]===`dev`}function kn(e,n,r,i){return Tn(this,void 0,void 0,function*(){let a=Dn(e,n).parseSync();if(a.help||a.version)return;if(a.workspace!==void 0&&!a.workspace.trim())throw Error(`--workspace requires a config path.`);if(!a[`multi-repo`]&&!a.workspace)throw Error(`Use --multi-repo with --setup or --non-interactive.`);if(!Number.isInteger(a.port)||a.port<1||a.port>65535)throw Error(`--port must be an integer from 1 to 65535.`);let{resolveWorkspace:o}=yield import(`./multi-repo-setup-CRaAzjLQ.js`),s;console.log(`Checking multi-repo configuration…`);let c=yield o({cwd:process.cwd(),workspace:a.workspace,setup:a.setup,nonInteractive:a[`non-interactive`],onSaved:e=>{s=`Saved ${e}. Keep machine-specific paths out of Git; add the local config to .gitignore.`}}),{prepareMultiRepoPreview:l}=yield import(`./multi-repo-preview-C-LdbybQ.js`),f=performance.now(),p=0,m=yield l(c,!0,{compositionCacheDirectory:d.join(u.homedir(),`.mintlify`,`multi-repo-compositions`),onProgress:e=>{e.stage===`cold`&&console.log(`Preparing the workspace for the first time. Large repositories can take around two minutes; later runs reuse the saved workspace.`),e.stage===`cached`&&console.log(`Checking the saved workspace for changes…`),e.stage===`watching`&&console.log(`Starting repository watchers…`),e.stage===`files`&&performance.now()-p>=1e3&&(p=performance.now(),console.log(`Checked ${e.files.toLocaleString()} files…`))}});r(m.close);let h=m.getStats();console.log(`Workspace ready in ${((performance.now()-f)/1e3).toFixed(1)}s: ${h?.reusedFiles??0} files reused. Starting preview…`);for(let e of m.sources)console.log(` ${e.repo} → /${e.mountPath}`);if(process.chdir(m.directory),typeof a.telemetry==`boolean`){let{setTelemetryEnabled:e}=yield import(`./config-o7H193Xj.js`);yield e(a.telemetry)}let[{dev:g,Logs:ee},{render:_},{createElement:te}]=yield Promise.all([import(`./dist-BVY4bzYW.js`),import(`./build-B-oc3MuD.js`),import(`./react-CA8V--cT.js`).then(e=>/* @__PURE__ */ t(e.default,1))]);if(_(te(ee)),a.classic!==!0){let{watchComponentUsage:e}=yield import(`./live-C37won3z.js`);e(m.directory).catch(()=>void 0)}yield g(Object.assign(Object.assign({},a),{groups:a.groups??(a[`signed-in`]?[]:void 0),packageName:n,previewReadyMessage:s,onExit:i}))})}export{A as a,wn as i,En as n,kn as r,On as t};
101
+ `,`f`),F(this,K,I(this,K,`f`)+e.join(` `),`f`)}}}[Vt](e){Pe(I(this,q,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=I(this,q,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete I(this,Z,`f`).getDescriptions()[e]}[Ht](e,t,n){I(this,wt,`f`)[n]||(I(this,X,`f`).process.emitWarning(e,t),I(this,wt,`f`)[n]=!0)}[Ut](){I(this,Tt,`f`).push({options:I(this,q,`f`),configObjects:I(this,q,`f`).configObjects.slice(0),exitProcess:I(this,V,`f`),groups:I(this,U,`f`),strict:I(this,Pt,`f`),strictCommands:I(this,Ft,`f`),strictOptions:I(this,It,`f`),completionCommand:I(this,z,`f`),output:I(this,K,`f`),exitError:I(this,B,`f`),hasOutput:I(this,W,`f`),parsed:this.parsed,parseFn:I(this,J,`f`),parseContext:I(this,At,`f`)}),I(this,Z,`f`).freeze(),I(this,$,`f`).freeze(),I(this,L,`f`).freeze(),I(this,H,`f`).freeze()}[Wt](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(I(this,X,`f`).process.argv()[0])?I(this,X,`f`).process.argv().slice(1,2):I(this,X,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[gn](I(this,bt,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),I(this,X,`f`).getEnv(`_`)&&I(this,X,`f`).getProcessArgvBin()===I(this,X,`f`).getEnv(`_`)&&(e=I(this,X,`f`).getEnv(`_`).replace(`${I(this,X,`f`).path.dirname(I(this,X,`f`).process.execPath())}/`,``)),e}[Gt](){return I(this,kt,`f`)}[Kt](){return I(this,Lt,`f`)}[qt](){if(!I(this,Ct,`f`))return;let e=I(this,X,`f`).getEnv(`LC_ALL`)||I(this,X,`f`).getEnv(`LC_MESSAGES`)||I(this,X,`f`).getEnv(`LANG`)||I(this,X,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[Jt](){return this[Xt]().version||`unknown`}[Yt](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)I(this,X,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Xt](e){let t=e||`*`;if(I(this,jt,`f`)[t])return I(this,jt,`f`)[t];let n={};try{let t=e||I(this,X,`f`).mainFilename;!e&&I(this,X,`f`).path.extname(t)&&(t=I(this,X,`f`).path.dirname(t));let r=I(this,X,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});M(r,void 0,I(this,X,`f`)),n=JSON.parse(I(this,X,`f`).readFileSync(r,`utf8`))}catch{}return I(this,jt,`f`)[t]=n||{},I(this,jt,`f`)[t]}[Zt](e,t){t=[].concat(t),t.forEach(t=>{t=this[tn](t),I(this,q,`f`)[e].push(t)})}[Qt](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{I(this,q,`f`)[e][t]=n})}[$t](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{I(this,q,`f`)[e][t]=(I(this,q,`f`)[e][t]||[]).concat(n)})}[en](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of Pe(n))e(t,n[t]);else i(t,this[tn](n),r)}[tn](e){return e===`__proto__`?`___proto___`:e}[nn](e,t){return this[Qt](this[nn].bind(this),`key`,e,t),this}[rn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=I(this,Tt,`f`).pop();M(f,void 0,I(this,X,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){F(e,q,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){F(t,V,e,`f`)}}.value,groups:{set value(e){F(n,U,e,`f`)}}.value,output:{set value(e){F(r,K,e,`f`)}}.value,exitError:{set value(e){F(i,B,e,`f`)}}.value,hasOutput:{set value(e){F(a,W,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){F(o,Pt,e,`f`)}}.value,strictCommands:{set value(e){F(s,Ft,e,`f`)}}.value,strictOptions:{set value(e){F(c,It,e,`f`)}}.value,completionCommand:{set value(e){F(l,z,e,`f`)}}.value,parseFn:{set value(e){F(u,J,e,`f`)}}.value,parseContext:{set value(e){F(d,At,e,`f`)}}.value}=f,I(this,q,`f`).configObjects=p,I(this,Z,`f`).unfreeze(),I(this,$,`f`).unfreeze(),I(this,L,`f`).unfreeze(),I(this,H,`f`).unfreeze()}[an](e,t){return He(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[on].bind(this),getContext:this[sn].bind(this),getHasOutput:this[cn].bind(this),getLoggerInstance:this[ln].bind(this),getParseContext:this[un].bind(this),getParserConfiguration:this[Gt].bind(this),getUsageConfiguration:this[Kt].bind(this),getUsageInstance:this[dn].bind(this),getValidationInstance:this[fn].bind(this),hasParseCallback:this[pn].bind(this),isGlobalContext:this[mn].bind(this),postProcess:this[hn].bind(this),reset:this[_n].bind(this),runValidation:this[yn].bind(this),runYargsParserAndExecuteCommands:this[vn].bind(this),setHasOutput:this[bn].bind(this)}}[on](){return I(this,L,`f`)}[sn](){return I(this,xt,`f`)}[cn](){return I(this,W,`f`)}[ln](){return I(this,Dt,`f`)}[un](){return I(this,At,`f`)||{}}[dn](){return I(this,Z,`f`)}[fn](){return I(this,$,`f`)}[pn](){return!!I(this,J,`f`)}[mn](){return I(this,Et,`f`)}[hn](e,t,n,r){return n||N(e)||(t||(e=this[zt](e)),(this[Gt]()[`parse-positional-numbers`]||this[Gt]()[`parse-positional-numbers`]===void 0)&&(e=this[Yt](e)),r&&(e=Ve(e,this,I(this,H,`f`).getMiddleware(),!1))),e}[_n](e={}){F(this,q,I(this,q,`f`)||{},`f`);let t={};t.local=I(this,q,`f`).local||[],t.configObjects=I(this,q,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(I(this,Mt,`f`),Object.keys(I(this,U,`f`)).reduce((e,t)=>{let r=I(this,U,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),F(this,U,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(I(this,q,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=$e(I(this,q,`f`)[e],e=>!n[e])}),t.envPrefix=I(this,q,`f`).envPrefix,F(this,q,t,`f`),F(this,Z,I(this,Z,`f`)?I(this,Z,`f`).reset(n):nt(this,I(this,X,`f`)),`f`),F(this,$,I(this,$,`f`)?I(this,$,`f`).reset(n):pt(this,I(this,Z,`f`),I(this,X,`f`)),`f`),F(this,L,I(this,L,`f`)?I(this,L,`f`).reset():qe(I(this,Z,`f`),I(this,$,`f`),I(this,H,`f`),I(this,X,`f`)),`f`),I(this,R,`f`)||F(this,R,ct(this,I(this,Z,`f`),I(this,L,`f`),I(this,X,`f`)),`f`),I(this,H,`f`).reset(),F(this,z,null,`f`),F(this,K,``,`f`),F(this,B,null,`f`),F(this,W,!1,`f`),this.parsed=!1,this}[gn](e,t){return I(this,X,`f`).path.relative(e,t)}[vn](e,t,n,r=0,i=!1){let a=!!n||i;e||=I(this,Y,`f`),I(this,q,`f`).__=I(this,X,`f`).y18n.__,I(this,q,`f`).configuration=this[Gt]();let o=!!I(this,q,`f`).configuration[`populate--`],s=Object.assign({},I(this,q,`f`).configuration,{"populate--":!0}),c=I(this,X,`f`).Parser.detailed(e,Object.assign({},I(this,q,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,I(this,At,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===I(this,G,`f`)&&l[e]?f=!0:e===I(this,Q,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&I(this,Z,`f`).clearCachedHelpMessage();try{if(this[qt](),t)return this[hn](l,o,!!n,!1);I(this,G,`f`)&&[I(this,G,`f`)].concat(d[I(this,G,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),F(this,Et,!1,`f`);let s=I(this,L,`f`).getCommands(),m=I(this,R,`f`).completionKey in l,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++){if(a=String(l._[t]),s.includes(a)&&a!==I(this,z,`f`)){let e=I(this,L,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[hn](e,o,!!n,!1)}if(!e&&a!==I(this,z,`f`)){e=a;break}}!I(this,L,`f`).hasDefaultCommand()&&I(this,Nt,`f`)&&e&&!h&&I(this,$,`f`).recommendCommands(e,s)}I(this,z,`f`)&&l._.includes(I(this,z,`f`))&&!m&&(I(this,V,`f`)&&et(!0),this.showCompletionScript(),this.exit(0))}if(I(this,L,`f`).hasDefaultCommand()&&!h){let e=I(this,L,`f`).runCommand(null,this,c,0,i,f||p||i);return this[hn](e,o,!!n,!1)}if(m){I(this,V,`f`)&&et(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${I(this,R,`f`).completionKey}`)+1);return I(this,R,`f`).getCompletion(t,(e,t)=>{if(e)throw new j(e.message);(t||[]).forEach(e=>{I(this,Dt,`f`).log(e)}),this.exit(0)}),this[hn](l,!o,!!n,!1)}if(I(this,W,`f`)||(f?(I(this,V,`f`)&&et(!0),a=!0,this.showHelp(`log`),this.exit(0)):p&&(I(this,V,`f`)&&et(!0),a=!0,I(this,Z,`f`).showVersion(`log`),this.exit(0))),!a&&I(this,q,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>I(this,q,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new j(c.error.message);if(!m){let e=this[yn](d,{},c.error);n||(u=Ve(l,this,I(this,H,`f`).getMiddleware(),!0)),u=this[an](e,u??l),N(u)&&!n&&(u=u.then(()=>Ve(l,this,I(this,H,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof j)I(this,Z,`f`).fail(e.message,e);else throw e}return this[hn](u??l,o,!!n,!0)}[yn](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new j(n.message);I(this,$,`f`).nonOptionCount(a),I(this,$,`f`).requiredArguments(a,i);let o=!1;I(this,Ft,`f`)&&(o=I(this,$,`f`).unknownCommands(a)),I(this,Pt,`f`)&&!o?I(this,$,`f`).unknownArguments(a,e,t,!!r):I(this,It,`f`)&&I(this,$,`f`).unknownArguments(a,e,{},!1,!1),I(this,$,`f`).limitedChoices(a),I(this,$,`f`).implications(a),I(this,$,`f`).conflicting(a)}}[bn](){F(this,W,!0,`f`)}[xn](e){if(typeof e==`string`)I(this,q,`f`).key[e]=!0;else for(let t of e)I(this,q,`f`).key[t]=!0}};function Cn(e){return!!e&&typeof e.getInternalMethods==`function`}const wn=Rt(Me);var Tn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const En=e=>e.option(`multi-repo`,{type:`boolean`,description:`Compose local repositories; set up a workspace if no config exists`}).option(`workspace`,{type:`string`,requiresArg:!0,description:`Path to a local multi-repo config (implies --multi-repo)`}).option(`setup`,{type:`boolean`,description:`Review saved setup (requires --multi-repo or --workspace); preserve cache`}).option(`non-interactive`,{type:`boolean`,description:`Never prompt (requires --multi-repo or --workspace and a valid config)`}).wrap(null).epilog(n),Dn=(e,t)=>En(wn(e).scriptName(t).usage(`$0 dev --multi-repo [options]`)).option(`port`,{type:`number`,default:3e3,description:`Local preview port`}).option(`open`,{type:`boolean`,default:!1,description:`Open the preview in a browser`}).option(`client-version`,{type:`string`,hidden:!0}).option(`local-client-version`,{type:`string`,hidden:!0}).option(`local-schema`,{type:`boolean`,hidden:!0}).option(`classic`,{type:`boolean`,default:!1,description:`Preview with the classic client`}).option(`beta`,{type:`boolean`,default:!1,hidden:!0}).option(`groups`,{type:`array`,description:`Mock user groups`}).option(`signed-in`,{type:`boolean`,default:!1}).option(`disable-openapi`,{type:`boolean`,default:!1}).option(`disable-prefetch`,{type:`boolean`,default:!1}).option(`host`,{type:`boolean`,default:!1}).option(`telemetry`,{alias:`t`,type:`boolean`}).help().alias(`help`,`h`).exitProcess(!1).strictOptions().fail(e=>{throw Error(e)});function On(e){return Dn(e,`mint`).help(!1).version(!1).strictOptions(!1).parseSync()._[0]===`dev`}function kn(e,n,r,i){return Tn(this,void 0,void 0,function*(){let a=Dn(e,n).parseSync();if(a.help||a.version)return;if(a.workspace!==void 0&&!a.workspace.trim())throw Error(`--workspace requires a config path.`);if(!a[`multi-repo`]&&!a.workspace)throw Error(`Use --multi-repo with --setup or --non-interactive.`);if(!Number.isInteger(a.port)||a.port<1||a.port>65535)throw Error(`--port must be an integer from 1 to 65535.`);let{resolveWorkspace:o}=yield import(`./multi-repo-setup-B90kQcaV.js`),s;console.log(`Checking multi-repo configuration…`);let c=yield o({cwd:process.cwd(),workspace:a.workspace,setup:a.setup,nonInteractive:a[`non-interactive`],onSaved:e=>{s=`Saved ${e}. Keep machine-specific paths out of Git; add the local config to .gitignore.`}}),{prepareMultiRepoPreview:l}=yield import(`./multi-repo-preview-DYnrpllj.js`),f=performance.now(),p=0,m=yield l(c,!0,{compositionCacheDirectory:d.join(u.homedir(),`.mintlify`,`multi-repo-compositions`),onProgress:e=>{e.stage===`cold`&&console.log(`Preparing the workspace for the first time. Large repositories can take around two minutes; later runs reuse the saved workspace.`),e.stage===`cached`&&console.log(`Checking the saved workspace for changes…`),e.stage===`watching`&&console.log(`Starting repository watchers…`),e.stage===`files`&&performance.now()-p>=1e3&&(p=performance.now(),console.log(`Checked ${e.files.toLocaleString()} files…`))}});r(m.close);let h=m.getStats();console.log(`Workspace ready in ${((performance.now()-f)/1e3).toFixed(1)}s: ${h?.reusedFiles??0} files reused. Starting preview…`);for(let e of m.sources)console.log(` ${e.repo} → /${e.mountPath}`);if(process.chdir(m.directory),typeof a.telemetry==`boolean`){let{setTelemetryEnabled:e}=yield import(`./config-CY4BARhX.js`);yield e(a.telemetry)}let[{dev:g,Logs:ee},{render:_},{createElement:te}]=yield Promise.all([import(`./dist-CjxRxd2A.js`),import(`./build-B-oc3MuD.js`),import(`./react-CA8V--cT.js`).then(e=>/* @__PURE__ */ t(e.default,1))]);if(_(te(ee)),a.classic!==!0){let{watchComponentUsage:e}=yield import(`./live-BtmS_Dke.js`);e(m.directory).catch(()=>void 0)}yield g(Object.assign(Object.assign({},a),{groups:a.groups??(a[`signed-in`]?[]:void 0),packageName:n,previewReadyMessage:s,onExit:i}))})}export{A as a,wn as i,En as n,kn as r,On as t};
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- export{t as isMultiRepoDev,n as multiRepoOptions,r as runMultiRepoDev}from"./multi-repo-command-DmTEZuwj.js";
7
+ export{t as isMultiRepoDev,n as multiRepoOptions,r as runMultiRepoDev}from"./multi-repo-command-CipHiXuw.js";
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{f as e,g as t,m as n,o as r,p as i,s as a}from"./schemas-CVKidklE.js";import o from"node:os";import s from"node:path";import{access as c,readFile as l,realpath as u}from"node:fs/promises";var d=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const f=`.mint-workspace.local.json`,p=e({sources:r(e({repo:n().trim().min(1),directory:n().trim().min(1),mountPath:n(),base:a().optional()}).strict()).min(1)}).strict(),m=(e,t)=>s.resolve(t,e===`~`?o.homedir():e.startsWith(`~/`)?s.join(o.homedir(),e.slice(2)):e);function h(e){return d(this,void 0,void 0,function*(){try{return yield c(e),!0}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return!1;throw e}})}function g(e,t){return d(this,void 0,void 0,function*(){if(t)return m(t,e);let n=s.resolve(e);for(;;){let e=s.join(n,f);if(yield h(e))return e;if((yield h(s.join(n,`.git`)))||n===o.homedir()||s.dirname(n)===n)return;n=s.dirname(n)}})}function _(e){return d(this,void 0,void 0,function*(){let{resolveFileRefs:t}=yield import(`./dist-B9Tpyt5G.js`),{resolved:n,referencedFiles:r}=yield t(JSON.parse(yield l(s.join(e,`docs.json`),`utf8`)),e);return{config:n,referencedFiles:r}})}function v(e){return d(this,void 0,void 0,function*(){try{return p.parse(JSON.parse(yield l(e,`utf8`)))}catch(t){throw Error(`Invalid workspace config ${e}: ${t instanceof Error?t.message:String(t)}. Run mint dev --multi-repo --setup --workspace "${e}" to review it.`)}})}function y(e,r){return d(this,void 0,void 0,function*(){let a=p.parse(e);if(a.sources.filter(e=>e.base).length!==1)throw Error(`Exactly one source must set base: true.`);let o=/* @__PURE__ */ new Set,c=/* @__PURE__ */ new Set,l=/* @__PURE__ */ new Set,d=[],f=[];for(let e of a.sources){let a=e.mountPath.replace(/^\/+|\/+$/g,``);if((/[\\?#]/.test(a)||a.split(`/`).some(e=>e===`.`||e===`..`||e===``))&&a!==``)throw Error(`Invalid mountPath for ${e.repo}: ${e.mountPath}`);if(e.base&&a)throw Error(`The base repository must use mountPath: "".`);if(o.has(e.repo.toLowerCase()))throw Error(`Duplicate repo: ${e.repo}`);if(c.has(a)||[...c].some(e=>e&&a&&(a.startsWith(e+`/`)||e.startsWith(a+`/`))))throw Error(`Conflicting mountPath: /${a}`);let p=m(e.directory,s.dirname(r)),h,g;try{h=yield u(p),g=(yield _(p)).config}catch(t){throw Error(`Cannot load ${e.repo} at ${p}. Select a folder containing docs.json. ${t instanceof Error?t.message:String(t)}`)}if(l.has(h))throw Error(`The same folder is configured more than once: ${p}`);if(typeof g!=`object`||!g||Array.isArray(g))throw Error(`Invalid docs.json in ${p}`);f.push(i(n(),t()).parse(g)),d.push(Object.assign(Object.assign({},e),{directory:p,mountPath:a})),o.add(e.repo.toLowerCase()),c.add(a),l.add(h)}let{composeConfig:h}=yield import(`./multi-repo-preview-C-LdbybQ.js`);return h(d,f),{sources:d}})}const b=`
7
+ import{f as e,g as t,m as n,o as r,p as i,s as a}from"./schemas-CVKidklE.js";import o from"node:os";import s from"node:path";import{access as c,readFile as l,realpath as u}from"node:fs/promises";var d=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const f=`.mint-workspace.local.json`,p=e({sources:r(e({repo:n().trim().min(1),directory:n().trim().min(1),mountPath:n(),base:a().optional()}).strict()).min(1)}).strict(),m=(e,t)=>s.resolve(t,e===`~`?o.homedir():e.startsWith(`~/`)?s.join(o.homedir(),e.slice(2)):e);function h(e){return d(this,void 0,void 0,function*(){try{return yield c(e),!0}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return!1;throw e}})}function g(e,t){return d(this,void 0,void 0,function*(){if(t)return m(t,e);let n=s.resolve(e);for(;;){let e=s.join(n,f);if(yield h(e))return e;if((yield h(s.join(n,`.git`)))||n===o.homedir()||s.dirname(n)===n)return;n=s.dirname(n)}})}function _(e){return d(this,void 0,void 0,function*(){let{resolveFileRefs:t}=yield import(`./dist-BAGnFN_9.js`),{resolved:n,referencedFiles:r}=yield t(JSON.parse(yield l(s.join(e,`docs.json`),`utf8`)),e);return{config:n,referencedFiles:r}})}function v(e){return d(this,void 0,void 0,function*(){try{return p.parse(JSON.parse(yield l(e,`utf8`)))}catch(t){throw Error(`Invalid workspace config ${e}: ${t instanceof Error?t.message:String(t)}. Run mint dev --multi-repo --setup --workspace "${e}" to review it.`)}})}function y(e,r){return d(this,void 0,void 0,function*(){let a=p.parse(e);if(a.sources.filter(e=>e.base).length!==1)throw Error(`Exactly one source must set base: true.`);let o=/* @__PURE__ */ new Set,c=/* @__PURE__ */ new Set,l=/* @__PURE__ */ new Set,d=[],f=[];for(let e of a.sources){let a=e.mountPath.replace(/^\/+|\/+$/g,``);if((/[\\?#]/.test(a)||a.split(`/`).some(e=>e===`.`||e===`..`||e===``))&&a!==``)throw Error(`Invalid mountPath for ${e.repo}: ${e.mountPath}`);if(e.base&&a)throw Error(`The base repository must use mountPath: "".`);if(o.has(e.repo.toLowerCase()))throw Error(`Duplicate repo: ${e.repo}`);if(c.has(a)||[...c].some(e=>e&&a&&(a.startsWith(e+`/`)||e.startsWith(a+`/`))))throw Error(`Conflicting mountPath: /${a}`);let p=m(e.directory,s.dirname(r)),h,g;try{h=yield u(p),g=(yield _(p)).config}catch(t){throw Error(`Cannot load ${e.repo} at ${p}. Select a folder containing docs.json. ${t instanceof Error?t.message:String(t)}`)}if(l.has(h))throw Error(`The same folder is configured more than once: ${p}`);if(typeof g!=`object`||!g||Array.isArray(g))throw Error(`Invalid docs.json in ${p}`);f.push(i(n(),t()).parse(g)),d.push(Object.assign(Object.assign({},e),{directory:p,mountPath:a})),o.add(e.repo.toLowerCase()),c.add(a),l.add(h)}let{composeConfig:h}=yield import(`./multi-repo-preview-DYnrpllj.js`);return h(d,f),{sources:d}})}const b=`
8
8
  Multi-repo local configuration
9
9
 
10
10
  Default: ${f}. Search from the current directory upward, stopping