@pplethai/cli 0.6.0 → 0.8.0

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.
Files changed (51) hide show
  1. package/dist/bin.js +171 -22
  2. package/package.json +3 -2
  3. package/templates/golden-path/.dev.vars.example +19 -1
  4. package/templates/golden-path/CLAUDE.md +74 -7
  5. package/templates/golden-path/README.md +27 -2
  6. package/templates/golden-path/gitignore +3 -0
  7. package/templates/golden-path/overlay-mtime.mjs +30 -0
  8. package/templates/golden-path/package-lock.json +19 -1
  9. package/templates/golden-path/package.json +3 -2
  10. package/templates/golden-path/scripts/assert-dev-compiled-out.mjs +42 -0
  11. package/templates/golden-path/shared/api.ts +42 -2
  12. package/templates/golden-path/src/auth.ts +99 -7
  13. package/templates/golden-path/src/call-service.ts +140 -0
  14. package/templates/golden-path/src/dataset-query.ts +470 -0
  15. package/templates/golden-path/src/dataset-schema.ts +398 -0
  16. package/templates/golden-path/src/dev-call-service.ts +391 -0
  17. package/templates/golden-path/src/dev-personas.ts +105 -7
  18. package/templates/golden-path/src/dev-read-dataset.ts +429 -0
  19. package/templates/golden-path/src/dev-registry.ts +276 -0
  20. package/templates/golden-path/src/env.ts +17 -0
  21. package/templates/golden-path/src/identity-header.ts +17 -0
  22. package/templates/golden-path/src/index.ts +32 -1
  23. package/templates/golden-path/src/legal-identity.ts +180 -0
  24. package/templates/golden-path/src/levels.ts +132 -0
  25. package/templates/golden-path/src/read-dataset.ts +376 -0
  26. package/templates/golden-path/src/registry.ts +122 -0
  27. package/templates/golden-path/src/vite-env.d.ts +13 -0
  28. package/templates/golden-path/test/call-service.test.ts +178 -0
  29. package/templates/golden-path/test/dev-call-service.test.ts +279 -0
  30. package/templates/golden-path/test/dev-read-dataset.test.ts +270 -0
  31. package/templates/golden-path/test/dev-registry.test.ts +375 -0
  32. package/templates/golden-path/test/effective-sub.test.ts +101 -0
  33. package/templates/golden-path/test/fixtures/overlay/directory/branches/entry.md +85 -0
  34. package/templates/golden-path/test/fixtures/overlay/directory/branches/mocks/audience.json +3 -0
  35. package/templates/golden-path/test/fixtures/overlay/directory/branches/mocks/named.json +3 -0
  36. package/templates/golden-path/test/fixtures/overlay/directory/branches/mocks/offices.json +6 -0
  37. package/templates/golden-path/test/fixtures/overlay/directory/branches/mocks/roster.json +3 -0
  38. package/templates/golden-path/test/fixtures/overlay/directory/branches/mocks/summary.json +1 -0
  39. package/templates/golden-path/test/fixtures/overlay/platform/legal-identity/entry.md +8 -0
  40. package/templates/golden-path/test/fixtures/overlay/platform/legal-identity/mocks/responses.json +13 -0
  41. package/templates/golden-path/test/fixtures/overlay/shop/catalog/entry.md +8 -0
  42. package/templates/golden-path/test/fixtures/overlay/shop/catalog/mocks/responses.json +7 -0
  43. package/templates/golden-path/test/fixtures/overlay/shop/orders/entry.md +12 -0
  44. package/templates/golden-path/test/fixtures/overlay/shop/orders/mocks/responses.json +36 -0
  45. package/templates/golden-path/test/harness.ts +101 -16
  46. package/templates/golden-path/test/legal-identity.test.ts +323 -0
  47. package/templates/golden-path/test/membership.test.ts +105 -0
  48. package/templates/golden-path/test/read-dataset.test.ts +214 -0
  49. package/templates/golden-path/test/service-call.test.ts +166 -0
  50. package/templates/golden-path/vite.config.ts +2 -1
  51. package/templates/golden-path/vitest.config.ts +2 -0
package/dist/bin.js CHANGED
@@ -1,38 +1,187 @@
1
1
  #!/usr/bin/env node
2
- import No from"node:os";var s=class extends Error{constructor(n,r){super(n);this.hint=r;this.name="CliError"}hint},V=new s("\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A","\u0E23\u0E31\u0E19 `pple auth login` \u0E01\u0E48\u0E2D\u0E19"),A=new s("\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E41\u0E25\u0E49\u0E27","\u0E23\u0E31\u0E19 `pple auth login` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");var m={long:"--app",value:"<slug>",text:"\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 (\u0E16\u0E49\u0E32\u0E44\u0E21\u0E48\u0E23\u0E30\u0E1A\u0E38 \u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49)"},y={long:"--json",text:"\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25\u0E40\u0E1B\u0E47\u0E19 JSON (\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A agent/\u0E2A\u0E04\u0E23\u0E34\u0E1B\u0E15\u0E4C)"};function Fe(e,t){let n=e.options??[],r=new Set,o=new Map,i=[];for(let u=0;u<t.length;u++){let c=t[u];if(c==="--"){i.push(...t.slice(u+1));break}if(!c.startsWith("-")||c==="-"){i.push(c);continue}let h=c.startsWith("--")?c.indexOf("="):-1,D=h===-1?c:c.slice(0,h),C=n.find(Ge=>Ge.long===D||Ge.short===D);if(!C)throw new s(`\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01 \`${D}\``,`\u0E23\u0E31\u0E19 \`pple ${e.path.join(" ")} help\` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14 (\u0E16\u0E49\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 - \u0E43\u0E2B\u0E49\u0E27\u0E32\u0E07 \`--\` \u0E44\u0E27\u0E49\u0E02\u0E49\u0E32\u0E07\u0E2B\u0E19\u0E49\u0E32)`);if(C.value===void 0){if(h!==-1)throw new s(`\`${C.long}\` \u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E04\u0E48\u0E32`);r.add(C.long);continue}let ge=h!==-1?c.slice(h+1):t[++u];if(ge===void 0||h===-1&&ge.startsWith("-"))throw new s(`\`${C.long}\` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E04\u0E48\u0E32\u0E15\u0E32\u0E21\u0E2B\u0E25\u0E31\u0E07`);o.set(C.long,ge)}let a=e.maxArgs??0;if(i.length>a)throw new s(`\`pple ${e.path.join(" ")}\` \u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01 "${i[a]}"`,`\u0E23\u0E31\u0E19 \`pple ${e.path.join(" ")} help\` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49`);return{positionals:i,flag:u=>r.has(u),value:u=>o.get(u)}}import{randomBytes as Hn}from"node:crypto";import w from"node:fs/promises";import g from"node:path";import de from"node:fs/promises";import I from"node:path";var ye=".pple",Ve="app.json",he="\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E41\u0E2D\u0E1B PPLE";async function Je(e,t){await de.mkdir(I.join(e,ye),{recursive:!0}),await de.writeFile(I.join(e,ye,Ve),`${JSON.stringify(t,null,2)}
3
- `)}async function J(e){let t=await L(e);if(t)return t;throw new s(he,"\u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E31\u0E19 `pple init <app>` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48")}async function L(e){let t=I.resolve(e.cwd);for(;;){let n=I.join(t,ye,Ve),r=await de.readFile(n,"utf8").catch(()=>null);if(r!==null){let i=Un(r);if(i)return{...i,dir:t};throw new s("\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E42\u0E22\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E01\u0E31\u0E1A\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E2A\u0E35\u0E22\u0E2B\u0E32\u0E22","\u0E23\u0E31\u0E19 `pple init <app>` \u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E43\u0E2B\u0E21\u0E48\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")}let o=I.dirname(t);if(o===t)break;t=o}return null}function Un(e){try{let t=JSON.parse(e);return typeof t.slug!="string"||t.slug===""?null:{slug:t.slug,apiBase:typeof t.apiBase=="string"?t.apiBase:"",url:typeof t.url=="string"?t.url:""}}catch{return null}}import O from"node:fs/promises";import Bn from"node:path";var Mn="credentials.json",Ke=384,Gn=448;function K(e){return Bn.join(e.configDir,Mn)}async function We(e){let t=await O.readFile(K(e),"utf8").catch(()=>null);if(t===null)return null;let n;try{n=JSON.parse(t)}catch{return null}return typeof n.accessToken!="string"||n.ssoBase!==e.config.ssoBase?null:{accessToken:n.accessToken,refreshToken:typeof n.refreshToken=="string"?n.refreshToken:null,expiresAt:typeof n.expiresAt=="number"?n.expiresAt:null,ssoBase:n.ssoBase}}async function W(e,t){await O.mkdir(e.configDir,{recursive:!0,mode:Gn}),await O.writeFile(K(e),`${JSON.stringify(t,null,2)}
4
- `,{mode:Ke}),await O.chmod(K(e),Ke)}async function He(e){try{return await O.unlink(K(e)),!0}catch{return!1}}var Fn="/oauth/v2/device_authorization",Xe="/oauth/v2/token",Vn="urn:ietf:params:oauth:grant-type:device_code",ze="openid profile offline_access";function ve(e){return{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(e).toString()}}function we(e){return new s(`\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D PPLE ID (${e}) \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E2D\u0E34\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E40\u0E19\u0E47\u0E15\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07 `pple auth login` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")}async function Qe(e){let{ssoBase:t,clientId:n}=e.config,r=await e.fetch(`${t}${Fn}`,ve({client_id:n,scope:ze})).catch(()=>null);if(!r||!r.ok)throw we(t);let o=await r.json().catch(()=>({}));if(!o.device_code||!o.user_code||!o.verification_uri)throw we(t);return{deviceCode:o.device_code,userCode:o.user_code,verificationUri:o.verification_uri,verificationUriComplete:o.verification_uri_complete??null,expiresInMs:(o.expires_in??600)*1e3,intervalMs:(o.interval??5)*1e3}}async function Ze(e,t){let{ssoBase:n,clientId:r}=e.config,o=e.now()+t.expiresInMs,i=t.intervalMs;for(;e.now()<o;){await e.sleep(i);let a=await e.fetch(`${n}${Xe}`,ve({client_id:r,grant_type:Vn,device_code:t.deviceCode})).catch(()=>null);if(!a)throw we(n);let u=await a.json().catch(()=>({}));if(a.ok&&u.access_token)return tt(e,u);switch(u.error){case"authorization_pending":break;case"slow_down":i+=5e3;break;case"access_denied":throw new s("\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E16\u0E39\u0E01\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E43\u0E19\u0E40\u0E1A\u0E23\u0E32\u0E27\u0E4C\u0E40\u0E0B\u0E2D\u0E23\u0E4C","\u0E2B\u0E32\u0E01\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E04\u0E38\u0E13\u0E17\u0E35\u0E48\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18 \u0E43\u0E2B\u0E49\u0E23\u0E31\u0E19 `pple auth login` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");case"expired_token":throw Ye();default:throw new s("PPLE ID \u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",u.error_description??"\u0E25\u0E2D\u0E07 `pple auth login` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")}}throw Ye()}function Ye(){return new s("\u0E23\u0E2B\u0E31\u0E2A\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E01\u0E48\u0E2D\u0E19\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34","\u0E23\u0E31\u0E19 `pple auth login` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u2014 \u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E43\u0E19\u0E40\u0E1A\u0E23\u0E32\u0E27\u0E4C\u0E40\u0E0B\u0E2D\u0E23\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E20\u0E32\u0E22\u0E43\u0E19\u0E44\u0E21\u0E48\u0E01\u0E35\u0E48\u0E19\u0E32\u0E17\u0E35")}async function et(e,t){let{ssoBase:n,clientId:r}=e.config,o=await e.fetch(`${n}${Xe}`,ve({client_id:r,grant_type:"refresh_token",refresh_token:t,scope:ze})).catch(()=>null);if(!o||!o.ok)return null;let i=await o.json().catch(()=>({}));return i.access_token?{...tt(e,i),refreshToken:i.refresh_token??t}:null}function tt(e,t){return{accessToken:t.access_token,refreshToken:t.refresh_token??null,expiresAt:typeof t.expires_in=="number"?e.now()+t.expires_in*1e3:null}}var N=20,R=class{constructor(t,n){this.deps=t;this.token=n}deps;token;me(){return this.request("GET","/me")}apps(){return this.request("GET","/apps").then(t=>t.apps)}app(t){return this.request("GET",`/apps/${encodeURIComponent(t)}`,{slug:t})}createApp(t){return this.request("POST","/apps",{body:{name:t}})}renameApp(t,n){return this.request("PATCH",`/apps/${encodeURIComponent(t)}`,{slug:t,body:{name:n}})}retireApp(t){return this.request("DELETE",`/apps/${encodeURIComponent(t)}`,{slug:t,body:{confirm:t}})}provision(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/provision`,{slug:t,answerOn:[502]})}acceptAgreement(){return this.request("POST","/agreement")}repoToken(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/repo-token`,{slug:t})}deploys(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/deploys`,{slug:t}).then(n=>n.deploys)}redeploy(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/deploys`,{slug:t}).then(()=>{})}env(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/env`,{slug:t}).then(n=>n.env)}metrics(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/metrics`,{slug:t})}collaborators(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/collaborators`,{slug:t}).then(n=>n.collaborators)}notes(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/notes`,{slug:t}).then(n=>n.notes)}cron(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/cron`,{slug:t})}pauseCron(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/cron/pause`,{slug:t})}resumeCron(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/cron/resume`,{slug:t})}runCron(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/cron/run`,{slug:t,body:{expression:n}})}addNote(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/notes`,{slug:t,body:{body:n}})}lookupCollaborator(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/collaborators/lookup`,{slug:t,body:{phoneNumber:n},notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49"})}confirmCollaborator(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/collaborators`,{slug:t,body:{confirmationToken:n}})}removeCollaborator(t,n){return this.request("DELETE",`/apps/${encodeURIComponent(t)}/collaborators/${encodeURIComponent(n)}`,{slug:t,notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E04\u0E19\u0E19\u0E35\u0E49"})}requests(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/requests`,{slug:t}).then(n=>n.requests)}promoteToBeta(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/tier`,{slug:t,body:{tier:"beta"}})}addInvite(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/invites`,{slug:t,body:{phoneNumber:n}})}removeInvite(t,n){return this.request("DELETE",`/apps/${encodeURIComponent(t)}/invites/${encodeURIComponent(n)}`,{slug:t,notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E02\u0E2D\u0E07\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49"})}roleOptions(){return this.request("GET","/role-options").then(t=>t.options)}guidanceHash(t){return this.request("GET","/guidance",{signal:t,notFound:"\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48 Skill \u0E41\u0E25\u0E30\u0E01\u0E0E"}).then(n=>n.hash)}guidanceVersion(t,n){return this.request("GET",`/guidance/${encodeURIComponent(t)}`,{signal:n,notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A Skill \u0E41\u0E25\u0E30\u0E01\u0E0E\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E19\u0E35\u0E49\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"})}uploadIcon(t){return this.request("POST","/icons",{raw:t})}fileRequest(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/requests`,{slug:t,body:n})}invites(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/invites`,{slug:t}).then(n=>n.invites)}setEnv(t,n,r,o){return this.request("PUT",`/apps/${encodeURIComponent(t)}/env/${encodeURIComponent(n)}`,{slug:t,body:{value:r,secret:o}})}deleteEnv(t,n){return this.request("DELETE",`/apps/${encodeURIComponent(t)}/env/${encodeURIComponent(n)}`,{slug:t,envKey:n})}async request(t,n,r={}){let o=`${this.deps.config.apiBase}${n}`,i={authorization:`Bearer ${this.token}`},a;r.body!==void 0?(i["content-type"]="application/json",a=JSON.stringify(r.body)):r.raw!==void 0&&(i["content-type"]="application/octet-stream");let u=await this.deps.fetch(o,{method:t,headers:i,body:a??r.raw,signal:r.signal}).catch(()=>null);if(!u)throw new s("\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D PPLE Platform \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E2D\u0E34\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E40\u0E19\u0E47\u0E15\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");if(u.ok||r.answerOn?.includes(u.status))return u.status===204?void 0:await u.json();let c=await u.json().catch(()=>({}));throw Jn(u.status,c.error,r,typeof c.detail=="string"?c.detail:void 0)}};function Jn(e,t,n={},r){let{slug:o,envKey:i}=n;return e===401?A:t==="not_org_member"?new s("PPLE ID \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E2D\u0E07\u0E04\u0E4C\u0E01\u0E23\u0E02\u0E2D\u0E07\u0E1E\u0E23\u0E23\u0E04 \u0E08\u0E36\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E2B\u0E31\u0E27\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C \u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"):t==="agreement_required"?new s("\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32","\u0E23\u0E31\u0E19 `pple agreement` \u0E43\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E40\u0E2D\u0E07 (\u0E2B\u0E23\u0E37\u0E2D\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E17\u0E35\u0E48 https://console.ppleth.ai) \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E19\u0E35\u0E49\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"):t==="app_has_no_repo"?new s(`${o?`"${o}"`:"\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"} \u0E22\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E40\u0E2A\u0E23\u0E47\u0E08`,"\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"):t==="app_retired"?new s(`${o?`"${o}"`:"\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"} \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27 \u0E08\u0E36\u0E07\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,'\u0E2B\u0E32\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E32\u0E19\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49\u0E15\u0E48\u0E2D \u0E43\u0E2B\u0E49\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48\u0E14\u0E49\u0E27\u0E22 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B"`'):t==="rename_requires_request"?new s("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E41\u0E25\u0E49\u0E27 \u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E40\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",'\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E14\u0E49\u0E27\u0E22 `pple request change --name "\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48"`'):t==="invalid_name"?new s("\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",r?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${r}`:void 0):t==="live_retire_needs_request"?new s("\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E2D\u0E22\u0E39\u0E48 \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E40\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E14\u0E49\u0E27\u0E22 `pple request retire`"):t==="confirm_slug_required"?new s("\u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22 slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B","\u0E23\u0E30\u0E1A\u0E38 `--confirm <slug>`"):t==="not_in_draft"?new s("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E1E\u0E49\u0E19\u0E08\u0E32\u0E01\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27","\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple info`"):t==="not_in_beta"?new s("\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E34\u0E0D\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49","\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E41\u0E2D\u0E1B\u0E02\u0E36\u0E49\u0E19\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E14\u0E49\u0E27\u0E22 `pple promote` \u0E01\u0E48\u0E2D\u0E19"):t==="invite_cap_reached"?new s("\u0E04\u0E38\u0E13\u0E40\u0E0A\u0E34\u0E0D\u0E04\u0E23\u0E1A\u0E40\u0E1E\u0E14\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 (20 \u0E04\u0E19)","\u0E19\u0E33\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E2D\u0E2D\u0E01\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 `pple invites remove <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>` \u0E41\u0E25\u0E49\u0E27\u0E40\u0E0A\u0E34\u0E0D\u0E04\u0E19\u0E43\u0E2B\u0E21\u0E48"):t==="invalid_note"?new s("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E19\u0E35\u0E49\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",r?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${r}`:"\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21 \u0E41\u0E25\u0E30\u0E22\u0E32\u0E27\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 2,000 \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23"):t==="invalid_confirmation"?new s("\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E41\u0E25\u0E49\u0E27","\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E14\u0E49\u0E27\u0E22 `pple collaborators add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>`"):t==="owner_cannot_be_collaborator"?new s("\u0E04\u0E38\u0E13\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27"):t==="invalid_phone_number"?new s("\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07","\u0E43\u0E0A\u0E49\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E40\u0E15\u0E47\u0E21 \u0E40\u0E0A\u0E48\u0E19 0812345678 \u0E2B\u0E23\u0E37\u0E2D +66812345678"):t==="publish_requires_beta"?new s("\u0E02\u0E2D\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E44\u0E14\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E2D\u0E22\u0E39\u0E48\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27","\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E41\u0E2D\u0E1B\u0E02\u0E36\u0E49\u0E19\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E14\u0E49\u0E27\u0E22 `pple promote` \u0E01\u0E48\u0E2D\u0E19"):t==="already_live"?new s("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E08\u0E30\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D \u0E44\u0E2D\u0E04\u0E2D\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19 \u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49 `pple request change`"):t==="change_requires_live"?new s("\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E41\u0E25\u0E49\u0E27","\u0E41\u0E2D\u0E1B\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E41\u0E25\u0E30\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E40\u0E2D\u0E07\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple rename`"):t==="retire_requires_live"?new s("\u0E04\u0E33\u0E02\u0E2D\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07","\u0E41\u0E2D\u0E1B\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E41\u0E25\u0E30\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E40\u0E2D\u0E07\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple retire`"):t==="request_already_pending"?new s("\u0E21\u0E35\u0E04\u0E33\u0E02\u0E2D\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E19\u0E35\u0E49\u0E23\u0E2D\u0E01\u0E32\u0E23\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E14\u0E49\u0E27\u0E22 `pple requests`"):t==="invalid_visibility"?new s("\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07","\u0E40\u0E25\u0E37\u0E2D\u0E01 `--visibility everyone`, `roles` (\u0E1E\u0E23\u0E49\u0E2D\u0E21 `--roles`) \u0E2B\u0E23\u0E37\u0E2D `unlisted`"):t==="icon_required"||t==="invalid_icon"?new s(t==="icon_required"?"\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E41\u0E2D\u0E1B":"\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",r??"\u0E43\u0E0A\u0E49\u0E44\u0E1F\u0E25\u0E4C PNG, JPEG \u0E2B\u0E23\u0E37\u0E2D WebP \u0E02\u0E19\u0E32\u0E14\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 512 KB \u0E14\u0E49\u0E27\u0E22 `--icon <\u0E44\u0E1F\u0E25\u0E4C>`"):t==="invalid_custom_address"?new s("\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2D\u0E31\u0E07\u0E01\u0E24\u0E29\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E40\u0E25\u0E47\u0E01 \u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 \u0E41\u0E25\u0E30\u0E02\u0E35\u0E14\u0E01\u0E25\u0E32\u0E07",r?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${r}`:void 0):t==="custom_address_reserved"||t==="custom_address_taken"?new s(t==="custom_address_reserved"?"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E19\u0E35\u0E49\u0E16\u0E39\u0E01\u0E2A\u0E07\u0E27\u0E19\u0E44\u0E27\u0E49\u0E42\u0E14\u0E22\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21":"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E19\u0E35\u0E49\u0E21\u0E35\u0E41\u0E2D\u0E1B\u0E2D\u0E37\u0E48\u0E19\u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E37\u0E48\u0E19\u0E14\u0E49\u0E27\u0E22 `--address`"):t==="invalid_limit"||t==="empty_limit_request"?new s("\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 \u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21\u0E1A\u0E27\u0E01","\u0E43\u0E0A\u0E49 `--cpu-ms`, `--notifications`, `--cron-schedules` \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D `--cron-interval`"):t==="schedule_not_found"?new s("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E21\u0E35\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E19\u0E31\u0E49\u0E19","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49\u0E14\u0E49\u0E27\u0E22 `pple cron` \u2014 \u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2B\u0E23\u0E37\u0E2D\u0E41\u0E01\u0E49\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48 triggers.crons \u0E43\u0E19 wrangler.jsonc \u0E41\u0E25\u0E49\u0E27\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22"):t==="empty_change_request"?new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07","\u0E43\u0E0A\u0E49 `--name`, `--icon` \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D `--visibility`"):t==="role_options_unconfigured"||t==="role_options_unavailable"?new s("\u0E14\u0E36\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E08\u0E32\u0E01\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49","\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48 \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E41\u0E08\u0E49\u0E07\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"):t==="app_not_provisioned"?new s(`${o?`"${o}"`:"\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"} \u0E22\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E40\u0E2A\u0E23\u0E47\u0E08`,"\u0E14\u0E39\u0E2A\u0E32\u0E40\u0E2B\u0E15\u0E38\u0E14\u0E49\u0E27\u0E22 `pple info` \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"):t==="dispatch_failed"?new s("\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E23\u0E34\u0E48\u0E21\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E43\u0E2B\u0E21\u0E48\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",r?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${r}`:"\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48"):t==="invalid_key"?new s("\u0E04\u0E35\u0E22\u0E4C\u0E19\u0E35\u0E49\u0E43\u0E0A\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E04\u0E35\u0E22\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2B\u0E23\u0E37\u0E2D\u0E02\u0E35\u0E14\u0E25\u0E48\u0E32\u0E07 \u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23 \u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 \u0E2B\u0E23\u0E37\u0E2D\u0E02\u0E35\u0E14\u0E25\u0E48\u0E32\u0E07"):t==="reserved_key"?new s("\u0E04\u0E35\u0E22\u0E4C\u0E19\u0E35\u0E49\u0E16\u0E39\u0E01\u0E2A\u0E07\u0E27\u0E19\u0E44\u0E27\u0E49\u0E42\u0E14\u0E22\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21","\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E37\u0E48\u0E19 \u2014 APP_SLUG, DB, FILES, NOTIFY_* \u0E41\u0E25\u0E30 PPLE_DEPLOY_ID \u0E16\u0E39\u0E01\u0E43\u0E0A\u0E49\u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27"):t==="invalid_value"?new s("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E04\u0E48\u0E32\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08","\u0E2A\u0E48\u0E07\u0E04\u0E48\u0E32\u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19 argument \u0E1C\u0E48\u0E32\u0E19 `--file` \u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E32\u0E07 stdin"):e===404?n.notFound?new s(n.notFound):i?new s(`\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 "${i}" \u0E44\u0E27\u0E49`,"\u0E23\u0E31\u0E19 `pple env list` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49"):new s(o?`\u0E44\u0E21\u0E48\u0E21\u0E35\u0E41\u0E2D\u0E1B\u0E0A\u0E37\u0E48\u0E2D "${o}" \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13`:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E2A\u0E34\u0E48\u0E07\u0E19\u0E35\u0E49\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E14\u0E49\u0E27\u0E22 `pple apps`"):e>=500||t==="sso_unavailable"?new s("PPLE Platform \u0E01\u0E33\u0E25\u0E31\u0E07\u0E21\u0E35\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49","\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19\u0E2D\u0E35\u0E01 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E41\u0E08\u0E49\u0E07\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"):new s("PPLE Platform \u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E04\u0E33\u0E02\u0E2D\u0E19\u0E35\u0E49",t?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${t}`:void 0)}var Kn=6e4;async function Wn(e){let t=await We(e);if(!t)throw V;if(!(t.expiresAt!==null&&t.expiresAt-e.now()<Kn))return t.accessToken;if(t.refreshToken){let r=await et(e,t.refreshToken);if(r)return await W(e,{...r,ssoBase:e.config.ssoBase}),r.accessToken}throw A}async function p(e){return new R(e,await Wn(e))}var X=[g.join(".claude","skills","pple-platform"),g.join(".agents","skills","pple-platform")],nt=g.join(".claude","rules","pple-platform.md"),rt=g.join(".cursor","rules","pple-platform.mdc"),ot=g.join(".pple","rules.md"),$e=[nt,rt,ot],Pe=g.join(".pple","guidance.json"),Yn=[...X.map(e=>`${Y(e)}/`),...$e.map(Y),Y(Pe),...[...X,...$e].map(e=>`${Y(g.dirname(e))}/.pple-*`)],Xn="Before you start, read `.pple/rules.md` \u2014 the PPLE Platform Rules for this app. They win over anything else in the repo.\n",zn=["---","description: PPLE Platform Rules \u2014 always follow these in this app","alwaysApply: true","---","",""].join(`
5
- `),it=1e4;async function st(e){let t=await L(e).catch(()=>null);t&&(t.apiBase!==""&&t.apiBase!==e.config.apiBase||await xe(e,t.dir))}async function xe(e,t){try{let n=await p(e),r=await n.guidanceHash(AbortSignal.timeout(it)),o=await or(t),i=await ir(t);if(await sr(t),o!==r||!i){let a=er(await Qn(n,r));await nr(t,a,r),e.out.notice(o!==null&&i?"\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 Skill \u0E41\u0E25\u0E30\u0E01\u0E0E\u0E02\u0E2D\u0E07\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E41\u0E25\u0E49\u0E27":"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Skill \u0E41\u0E25\u0E30\u0E01\u0E0E\u0E02\u0E2D\u0E07\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E41\u0E25\u0E49\u0E27")}await ar(t)}catch(n){if(n===V||n===A)return;e.out.notice("\u0E14\u0E36\u0E07 Skill \u0E41\u0E25\u0E30\u0E01\u0E0E\u0E02\u0E2D\u0E07\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u2014 \u0E43\u0E0A\u0E49\u0E09\u0E1A\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E15\u0E48\u0E2D\u0E44\u0E1B"),e.out.notice(` (${Zn(n)})`)}}async function Qn(e,t){return e.guidanceVersion(t,AbortSignal.timeout(it))}function Zn(e){return e instanceof Error?e.message:String(e)}var z=class extends s{};function er(e){let t=a=>new z(`\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E17\u0E35\u0E48\u0E14\u0E32\u0E27\u0E19\u0E4C\u0E42\u0E2B\u0E25\u0E14\u0E21\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${a}`);if(typeof e!="object"||e===null||Array.isArray(e))throw t("\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E44\u0E27\u0E49");let{skill:n,rules:r}=e;if(typeof r!="string")throw t("\u0E44\u0E21\u0E48\u0E21\u0E35 Platform Rules");if(!Array.isArray(n)||n.length===0)throw t("\u0E44\u0E21\u0E48\u0E21\u0E35\u0E44\u0E1F\u0E25\u0E4C\u0E02\u0E2D\u0E07 Skill");let o=new Set,i=n.map(a=>{let{path:u,content:c}=a??{};if(typeof u!="string"||typeof c!="string")throw t("\u0E44\u0E1F\u0E25\u0E4C\u0E02\u0E2D\u0E07 Skill \u0E44\u0E21\u0E48\u0E04\u0E23\u0E1A");if(!tr(u))throw t(`\u0E1E\u0E32\u0E18 "${u}" \u0E2D\u0E2D\u0E01\u0E19\u0E2D\u0E01\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07 Skill`);if(o.has(u))throw t(`\u0E1E\u0E32\u0E18 "${u}" \u0E0B\u0E49\u0E33\u0E01\u0E31\u0E19`);return o.add(u),{path:u,content:c}});if(!o.has("SKILL.md"))throw t("\u0E44\u0E21\u0E48\u0E21\u0E35 SKILL.md");return{skill:i,rules:r}}function tr(e){return e.includes("\0")?!1:e.split(/[\\/]/).every(t=>t!==""&&t!=="."&&t!==".."&&!t.includes(":"))}async function nr(e,t,n){let r=[];try{for(let o of X)r.push(await rr(g.join(e,o),t.skill));r.push(await H(g.join(e,nt),t.rules)),r.push(await H(g.join(e,rt),`${zn}${t.rules}`)),r.push(await H(g.join(e,ot),t.rules)),r.push(await H(g.join(e,Pe),`${JSON.stringify({hash:n})}
6
- `))}catch(o){throw await Promise.all(r.map(i=>i.discard())),o}for(let[o,i]of r.entries())try{await i.commit()}catch(a){throw await Promise.all(r.slice(o).map(u=>u.discard())),a}}var be=()=>Hn(4).toString("hex");async function rr(e,t){let n=g.dirname(e);await w.mkdir(n,{recursive:!0});let r=g.join(n,`.pple-new-${be()}`),o=()=>w.rm(r,{recursive:!0,force:!0});try{await w.mkdir(r);for(let i of t){let a=g.join(r,...i.path.split(/[\\/]/));if(g.relative(r,a).startsWith(".."))throw new z(`\u0E1E\u0E32\u0E18 "${i.path}" \u0E2D\u0E2D\u0E01\u0E19\u0E2D\u0E01\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07 Skill`);await w.mkdir(g.dirname(a),{recursive:!0}),await w.writeFile(a,i.content)}}catch(i){throw await o(),i}return{discard:o,async commit(){let i=g.join(n,`.pple-old-${be()}`),a=await w.rename(e,i).then(()=>!0,u=>{if(u.code==="ENOENT")return!1;throw u});try{await w.rename(r,e)}catch(u){throw a&&await w.rename(i,e).catch(()=>{}),await o(),u}a&&await w.rm(i,{recursive:!0,force:!0})}}}async function H(e,t){await w.mkdir(g.dirname(e),{recursive:!0});let n=g.join(g.dirname(e),`.pple-${g.basename(e)}.${be()}.tmp`),r=()=>w.rm(n,{force:!0});try{await w.writeFile(n,t)}catch(o){throw await r(),o}return{discard:r,async commit(){try{await w.rename(n,e)}catch(o){throw await r(),o}}}}async function or(e){let t=await w.readFile(g.join(e,Pe),"utf8").catch(()=>null);if(t===null)return null;try{let{hash:n}=JSON.parse(t);return typeof n=="string"&&n!==""?n:null}catch{return null}}async function ir(e){let t=[...X.map(n=>g.join(n,"SKILL.md")),...$e];for(let n of t)if(!await w.access(g.join(e,n)).then(()=>!0,()=>!1))return!1;return!0}async function sr(e){let t=g.join(e,".gitignore"),n=await w.readFile(t,"utf8").catch(()=>""),r=new Set(n.split(`
7
- `).map(a=>a.trim())),o=Yn.filter(a=>!r.has(a));if(o.length===0)return;let i=n===""||n.endsWith(`
2
+ import { createRequire as __ppleCreateRequire } from "node:module"; const require = __ppleCreateRequire(import.meta.url);
3
+ var Xu=Object.create;var $i=Object.defineProperty;var zu=Object.getOwnPropertyDescriptor;var Zu=Object.getOwnPropertyNames;var ef=Object.getPrototypeOf,tf=Object.prototype.hasOwnProperty;var Ut=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var v=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}};var nf=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Zu(t))!tf.call(e,r)&&r!==n&&$i(e,r,{get:()=>t[r],enumerable:!(s=zu(t,r))||s.enumerable});return e};var sf=(e,t,n)=>(n=e!=null?Xu(ef(e)):{},nf(t||!e||!e.__esModule?$i(n,"default",{value:e,enumerable:!0}):n,e));var I=v(J=>{"use strict";var Rs=Symbol.for("yaml.alias"),wa=Symbol.for("yaml.document"),un=Symbol.for("yaml.map"),ba=Symbol.for("yaml.pair"),Ds=Symbol.for("yaml.scalar"),fn=Symbol.for("yaml.seq"),oe=Symbol.for("yaml.node.type"),ym=e=>!!e&&typeof e=="object"&&e[oe]===Rs,wm=e=>!!e&&typeof e=="object"&&e[oe]===wa,bm=e=>!!e&&typeof e=="object"&&e[oe]===un,vm=e=>!!e&&typeof e=="object"&&e[oe]===ba,va=e=>!!e&&typeof e=="object"&&e[oe]===Ds,Sm=e=>!!e&&typeof e=="object"&&e[oe]===fn;function Sa(e){if(e&&typeof e=="object")switch(e[oe]){case un:case fn:return!0}return!1}function km(e){if(e&&typeof e=="object")switch(e[oe]){case Rs:case un:case Ds:case fn:return!0}return!1}var Em=e=>(va(e)||Sa(e))&&!!e.anchor;J.ALIAS=Rs;J.DOC=wa;J.MAP=un;J.NODE_TYPE=oe;J.PAIR=ba;J.SCALAR=Ds;J.SEQ=fn;J.hasAnchor=Em;J.isAlias=ym;J.isCollection=Sa;J.isDocument=wm;J.isMap=bm;J.isNode=km;J.isPair=vm;J.isScalar=va;J.isSeq=Sm});var it=v(xs=>{"use strict";var K=I(),Y=Symbol("break visit"),ka=Symbol("skip children"),te=Symbol("remove node");function pn(e,t){let n=Ea(t);K.isDocument(e)?Me(null,e.contents,n,Object.freeze([e]))===te&&(e.contents=null):Me(null,e,n,Object.freeze([]))}pn.BREAK=Y;pn.SKIP=ka;pn.REMOVE=te;function Me(e,t,n,s){let r=$a(e,t,n,s);if(K.isNode(r)||K.isPair(r))return Aa(e,s,r),Me(e,r,n,s);if(typeof r!="symbol"){if(K.isCollection(t)){s=Object.freeze(s.concat(t));for(let i=0;i<t.items.length;++i){let o=Me(i,t.items[i],n,s);if(typeof o=="number")i=o-1;else{if(o===Y)return Y;o===te&&(t.items.splice(i,1),i-=1)}}}else if(K.isPair(t)){s=Object.freeze(s.concat(t));let i=Me("key",t.key,n,s);if(i===Y)return Y;i===te&&(t.key=null);let o=Me("value",t.value,n,s);if(o===Y)return Y;o===te&&(t.value=null)}}return r}async function mn(e,t){let n=Ea(t);K.isDocument(e)?await Be(null,e.contents,n,Object.freeze([e]))===te&&(e.contents=null):await Be(null,e,n,Object.freeze([]))}mn.BREAK=Y;mn.SKIP=ka;mn.REMOVE=te;async function Be(e,t,n,s){let r=await $a(e,t,n,s);if(K.isNode(r)||K.isPair(r))return Aa(e,s,r),Be(e,r,n,s);if(typeof r!="symbol"){if(K.isCollection(t)){s=Object.freeze(s.concat(t));for(let i=0;i<t.items.length;++i){let o=await Be(i,t.items[i],n,s);if(typeof o=="number")i=o-1;else{if(o===Y)return Y;o===te&&(t.items.splice(i,1),i-=1)}}}else if(K.isPair(t)){s=Object.freeze(s.concat(t));let i=await Be("key",t.key,n,s);if(i===Y)return Y;i===te&&(t.key=null);let o=await Be("value",t.value,n,s);if(o===Y)return Y;o===te&&(t.value=null)}}return r}function Ea(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function $a(e,t,n,s){if(typeof n=="function")return n(e,t,s);if(K.isMap(t))return n.Map?.(e,t,s);if(K.isSeq(t))return n.Seq?.(e,t,s);if(K.isPair(t))return n.Pair?.(e,t,s);if(K.isScalar(t))return n.Scalar?.(e,t,s);if(K.isAlias(t))return n.Alias?.(e,t,s)}function Aa(e,t,n){let s=t[t.length-1];if(K.isCollection(s))s.items[e]=n;else if(K.isPair(s))e==="key"?s.key=n:s.value=n;else if(K.isDocument(s))s.contents=n;else{let r=K.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}xs.visit=pn;xs.visitAsync=mn});var js=v(Na=>{"use strict";var Pa=I(),$m=it(),Am={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Pm=e=>e.replace(/[!,[\]{}]/g,t=>Am[t]),ot=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let s=t.trim().split(/[ \t]+/),r=s.shift();switch(r){case"%TAG":{if(s.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[i,o]=s;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[i]=s;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{let o=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,o),!1}}default:return n(0,`Unknown directive ${r}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let o=t.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}let[,s,r]=t.match(/^(.*!)([^!]*)$/s);r||n(`The ${t} tag has no suffix`);let i=this.tags[s];if(i)try{return i+decodeURIComponent(r)}catch(o){return n(String(o)),null}return s==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[n,s]of Object.entries(this.tags))if(t.startsWith(s))return n+Pm(t.substring(s.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),r;if(t&&s.length>0&&Pa.isNode(t.contents)){let i={};$m.visit(t.contents,(o,a)=>{Pa.isNode(a)&&a.tag&&(i[a.tag]=!0)}),r=Object.keys(i)}else r=[];for(let[i,o]of s)i==="!!"&&o==="tag:yaml.org,2002:"||(!t||r.some(a=>a.startsWith(o)))&&n.push(`%TAG ${i} ${o}`);return n.join(`
4
+ `)}};ot.defaultYaml={explicit:!1,version:"1.2"};ot.defaultTags={"!!":"tag:yaml.org,2002:"};Na.Directives=ot});var dn=v(at=>{"use strict";var Ca=I(),Nm=it();function Cm(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Ta(e){let t=new Set;return Nm.visit(e,{Value(n,s){s.anchor&&t.add(s.anchor)}}),t}function Ia(e,t){for(let n=1;;++n){let s=`${e}${n}`;if(!t.has(s))return s}}function Tm(e,t){let n=[],s=new Map,r=null;return{onAnchor:i=>{n.push(i),r??(r=Ta(e));let o=Ia(t,r);return r.add(o),o},setAnchors:()=>{for(let i of n){let o=s.get(i);if(typeof o=="object"&&o.anchor&&(Ca.isScalar(o.node)||Ca.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:s}}at.anchorIsValid=Cm;at.anchorNames=Ta;at.createNodeAnchors=Tm;at.findNewAnchor=Ia});var Ms=v(La=>{"use strict";function lt(e,t,n,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let r=0,i=s.length;r<i;++r){let o=s[r],a=lt(e,s,String(r),o);a===void 0?delete s[r]:a!==o&&(s[r]=a)}else if(s instanceof Map)for(let r of Array.from(s.keys())){let i=s.get(r),o=lt(e,s,r,i);o===void 0?s.delete(r):o!==i&&s.set(r,o)}else if(s instanceof Set)for(let r of Array.from(s)){let i=lt(e,s,r,r);i===void 0?s.delete(r):i!==r&&(s.delete(r),s.add(i))}else for(let[r,i]of Object.entries(s)){let o=lt(e,s,r,i);o===void 0?delete s[r]:o!==i&&(s[r]=o)}return e.call(t,n,s)}La.applyReviver=lt});var de=v(qa=>{"use strict";var Im=I();function Oa(e,t,n){if(Array.isArray(e))return e.map((s,r)=>Oa(s,String(r),n));if(e&&typeof e.toJSON=="function"){if(!n||!Im.hasAnchor(e))return e.toJSON(t,n);let s={aliasCount:0,count:1,res:void 0};n.anchors.set(e,s),n.onCreate=i=>{s.res=i,delete n.onCreate};let r=e.toJSON(t,n);return n.onCreate&&n.onCreate(r),r}return typeof e=="bigint"&&!n?.keep?Number(e):e}qa.toJS=Oa});var hn=v(Ra=>{"use strict";var Lm=Ms(),_a=I(),Om=de(),Bs=class{constructor(t){Object.defineProperty(this,_a.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:s,onAnchor:r,reviver:i}={}){if(!_a.isDocument(t))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=Om.toJS(this,"",o);if(typeof r=="function")for(let{count:l,res:c}of o.anchors.values())r(c,l);return typeof i=="function"?Lm.applyReviver(i,{"":a},"",a):a}};Ra.NodeBase=Bs});var ct=v(Da=>{"use strict";var qm=dn(),_m=it(),Ue=I(),Rm=hn(),Dm=de(),Us=class extends Rm.NodeBase{constructor(t){super(Ue.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let s;n?.aliasResolveCache?s=n.aliasResolveCache:(s=[],_m.visit(t,{Node:(i,o)=>{(Ue.isAlias(o)||Ue.hasAnchor(o))&&s.push(o)}}),n&&(n.aliasResolveCache=s));let r;for(let i of s){if(i===this)break;i.anchor===this.source&&(r=i)}if(r&&n){let{anchors:i,doc:o,maxAliasCount:a}=n,l=i.get(r);if(l||(Dm.toJS(r,null,n),l=i.get(r)),l?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=gn(o,r,i)),l.count*l.aliasCount>a)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}}return r}toJSON(t,n){if(!n)return{source:this.source};let s=this.resolve(n.doc,n);if(!s){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(r)}return n.anchors.get(s).res}toString(t,n,s){let r=`*${this.source}`;if(t){if(qm.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(t.implicitKey)return`${r} `}return r}};function gn(e,t,n){if(Ue.isAlias(t)){let s=t.resolve(e),r=n&&s&&n.get(s);return r?r.count*r.aliasCount:0}else if(Ue.isCollection(t)){let s=0;for(let r of t.items){let i=gn(e,r,n);i>s&&(s=i)}return s}else if(Ue.isPair(t)){let s=gn(e,t.key,n),r=gn(e,t.value,n);return Math.max(s,r)}return 1}Da.Alias=Us});var M=v(Fs=>{"use strict";var xm=I(),jm=hn(),Mm=de(),Bm=e=>!e||typeof e!="function"&&typeof e!="object",he=class extends jm.NodeBase{constructor(t){super(xm.SCALAR),this.value=t}toJSON(t,n){return n?.keep?this.value:Mm.toJS(this.value,t,n)}toString(){return String(this.value)}};he.BLOCK_FOLDED="BLOCK_FOLDED";he.BLOCK_LITERAL="BLOCK_LITERAL";he.PLAIN="PLAIN";he.QUOTE_DOUBLE="QUOTE_DOUBLE";he.QUOTE_SINGLE="QUOTE_SINGLE";Fs.Scalar=he;Fs.isScalarValue=Bm});var ut=v(ja=>{"use strict";var Um=ct(),Pe=I(),xa=M(),Fm="tag:yaml.org,2002:";function Km(e,t,n){if(t){let s=n.filter(i=>i.tag===t),r=s.find(i=>!i.format)??s[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(s=>s.identify?.(e)&&!s.format)}function Gm(e,t,n){if(Pe.isDocument(e)&&(e=e.contents),Pe.isNode(e))return e;if(Pe.isPair(e)){let f=n.schema[Pe.MAP].createNode?.(n.schema,null,n);return f.items.push(e),f}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:s,onAnchor:r,onTagObj:i,schema:o,sourceObjects:a}=n,l;if(s&&e&&typeof e=="object"){if(l=a.get(e),l)return l.anchor??(l.anchor=r(e)),new Um.Alias(l.anchor);l={anchor:null,node:null},a.set(e,l)}t?.startsWith("!!")&&(t=Fm+t.slice(2));let c=Km(e,t,o.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let f=new xa.Scalar(e);return l&&(l.node=f),f}c=e instanceof Map?o[Pe.MAP]:Symbol.iterator in Object(e)?o[Pe.SEQ]:o[Pe.MAP]}i&&(i(c),delete n.onTagObj);let m=c?.createNode?c.createNode(n.schema,e,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,e,n):new xa.Scalar(e);return t?m.tag=t:c.default||(m.tag=c.tag),l&&(l.node=m),m}ja.createNode=Gm});var wn=v(yn=>{"use strict";var Vm=ut(),ne=I(),Jm=hn();function Ks(e,t,n){let s=n;for(let r=t.length-1;r>=0;--r){let i=t[r];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){let o=[];o[i]=s,s=o}else s=new Map([[i,s]])}return Vm.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var Ma=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,Gs=class extends Jm.NodeBase{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(s=>ne.isNode(s)||ne.isPair(s)?s.clone(t):s),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Ma(t))this.add(n);else{let[s,...r]=t,i=this.get(s,!0);if(ne.isCollection(i))i.addIn(r,n);else if(i===void 0&&this.schema)this.set(s,Ks(this.schema,r,n));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}deleteIn(t){let[n,...s]=t;if(s.length===0)return this.delete(n);let r=this.get(n,!0);if(ne.isCollection(r))return r.deleteIn(s);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}getIn(t,n){let[s,...r]=t,i=this.get(s,!0);return r.length===0?!n&&ne.isScalar(i)?i.value:i:ne.isCollection(i)?i.getIn(r,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!ne.isPair(n))return!1;let s=n.value;return s==null||t&&ne.isScalar(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(t){let[n,...s]=t;if(s.length===0)return this.has(n);let r=this.get(n,!0);return ne.isCollection(r)?r.hasIn(s):!1}setIn(t,n){let[s,...r]=t;if(r.length===0)this.set(s,n);else{let i=this.get(s,!0);if(ne.isCollection(i))i.setIn(r,n);else if(i===void 0&&this.schema)this.set(s,Ks(this.schema,r,n));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}};yn.Collection=Gs;yn.collectionFromPath=Ks;yn.isEmptyPath=Ma});var ft=v(bn=>{"use strict";var Ym=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Vs(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Wm=(e,t,n)=>e.endsWith(`
5
+ `)?Vs(n,t):n.includes(`
6
+ `)?`
7
+ `+Vs(n,t):(e.endsWith(" ")?"":" ")+n;bn.indentComment=Vs;bn.lineComment=Wm;bn.stringifyComment=Ym});var Ua=v(pt=>{"use strict";var Hm="flow",Js="block",vn="quoted";function Qm(e,t,n="flow",{indentAtStart:s,lineWidth:r=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return e;r<i&&(i=0);let l=Math.max(1+i,1+r-t.length);if(e.length<=l)return e;let c=[],m={},f=r-t.length;typeof s=="number"&&(s>r-Math.max(2,i)?c.push(0):f=r-s);let p,h,w=!1,d=-1,g=-1,y=-1;n===Js&&(d=Ba(e,d,t.length),d!==-1&&(f=d+l));for(let P;P=e[d+=1];){if(n===vn&&P==="\\"){switch(g=d,e[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}y=d}if(P===`
8
+ `)n===Js&&(d=Ba(e,d,t.length)),f=d+t.length+l,p=void 0;else{if(P===" "&&h&&h!==" "&&h!==`
9
+ `&&h!==" "){let S=e[d+1];S&&S!==" "&&S!==`
10
+ `&&S!==" "&&(p=d)}if(d>=f)if(p)c.push(p),f=p+l,p=void 0;else if(n===vn){for(;h===" "||h===" ";)h=P,P=e[d+=1],w=!0;let S=d>y+1?d-2:g-1;if(m[S])return e;c.push(S),m[S]=!0,f=S+l,p=void 0}else w=!0}h=P}if(w&&a&&a(),c.length===0)return e;o&&o();let b=e.slice(0,c[0]);for(let P=0;P<c.length;++P){let S=c[P],A=c[P+1]||e.length;S===0?b=`
11
+ ${t}${e.slice(0,A)}`:(n===vn&&m[S]&&(b+=`${e[S]}\\`),b+=`
12
+ ${t}${e.slice(S+1,A)}`)}return b}function Ba(e,t,n){let s=t,r=t+1,i=e[r];for(;i===" "||i===" ";)if(t<r+n)i=e[++t];else{do i=e[++t];while(i&&i!==`
13
+ `);s=t,r=t+1,i=e[r]}return s}pt.FOLD_BLOCK=Js;pt.FOLD_FLOW=Hm;pt.FOLD_QUOTED=vn;pt.foldFlowLines=Qm});var dt=v(Fa=>{"use strict";var X=M(),ge=Ua(),kn=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),En=e=>/^(%|---|\.\.\.)/m.test(e);function Xm(e,t,n){if(!t||t<0)return!1;let s=t-n,r=e.length;if(r<=s)return!1;for(let i=0,o=0;i<r;++i)if(e[i]===`
14
+ `){if(i-o>s)return!0;if(o=i+1,r-o<=s)return!1}return!0}function mt(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:s}=t,r=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(En(e)?" ":""),o="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(o+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{o+=n.slice(a,l);let m=n.substr(l+2,4);switch(m){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:m.substr(0,2)==="00"?o+="\\x"+m.substr(2):o+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(s||n[l+2]==='"'||n.length<r)l+=1;else{for(o+=n.slice(a,l)+`
15
+
16
+ `;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)o+=`
17
+ `,l+=2;o+=i,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,s?o:ge.foldFlowLines(o,i,ge.FOLD_QUOTED,kn(t,!1))}function Ys(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
18
+ `)||/[ \t]\n|\n[ \t]/.test(e))return mt(e,t);let n=t.indent||(En(e)?" ":""),s="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
19
+ ${n}`)+"'";return t.implicitKey?s:ge.foldFlowLines(s,n,ge.FOLD_FLOW,kn(t,!1))}function Fe(e,t){let{singleQuote:n}=t.options,s;if(n===!1)s=mt;else{let r=e.includes('"'),i=e.includes("'");r&&!i?s=Ys:i&&!r?s=mt:s=n?Ys:mt}return s(e,t)}var Ws;try{Ws=new RegExp(`(^|(?<!
20
+ ))
21
+ +(?!
22
+ |$)`,"g")}catch{Ws=/\n+(?!\n|$)/g}function Sn({comment:e,type:t,value:n},s,r,i){let{blockQuote:o,commentString:a,lineWidth:l}=s.options;if(!o||/\n[\t ]+$/.test(n))return Fe(n,s);let c=s.indent||(s.forceBlockIndent||En(n)?" ":""),m=o==="literal"?!0:o==="folded"||t===X.Scalar.BLOCK_FOLDED?!1:t===X.Scalar.BLOCK_LITERAL?!0:!Xm(n,l,c.length);if(!n)return m?`|
23
+ `:`>
24
+ `;let f,p;for(p=n.length;p>0;--p){let A=n[p-1];if(A!==`
25
+ `&&A!==" "&&A!==" ")break}let h=n.substring(p),w=h.indexOf(`
26
+ `);w===-1?f="-":n===h||w!==h.length-1?(f="+",i&&i()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
27
+ `&&(h=h.slice(0,-1)),h=h.replace(Ws,`$&${c}`));let d=!1,g,y=-1;for(g=0;g<n.length;++g){let A=n[g];if(A===" ")d=!0;else if(A===`
28
+ `)y=g;else break}let b=n.substring(0,y<g?y+1:g);b&&(n=n.substring(b.length),b=b.replace(/\n+/g,`$&${c}`));let S=(d?c?"2":"1":"")+f;if(e&&(S+=" "+a(e.replace(/ ?[\r\n]+/g," ")),r&&r()),!m){let A=n.replace(/\n+/g,`
29
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),N=!1,_=kn(s,!0);o!=="folded"&&t!==X.Scalar.BLOCK_FOLDED&&(_.onOverflow=()=>{N=!0});let k=ge.foldFlowLines(`${b}${A}${h}`,c,ge.FOLD_BLOCK,_);if(!N)return`>${S}
30
+ ${c}${k}`}return n=n.replace(/\n+/g,`$&${c}`),`|${S}
31
+ ${c}${b}${n}${h}`}function zm(e,t,n,s){let{type:r,value:i}=e,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:m}=t;if(a&&i.includes(`
32
+ `)||m&&/[[\]{},]/.test(i))return Fe(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||m||!i.includes(`
33
+ `)?Fe(i,t):Sn(e,t,n,s);if(!a&&!m&&r!==X.Scalar.PLAIN&&i.includes(`
34
+ `))return Sn(e,t,n,s);if(En(i)){if(l==="")return t.forceBlockIndent=!0,Sn(e,t,n,s);if(a&&l===c)return Fe(i,t)}let f=i.replace(/\n+/g,`$&
35
+ ${l}`);if(o){let p=d=>d.default&&d.tag!=="tag:yaml.org,2002:str"&&d.test?.test(f),{compat:h,tags:w}=t.doc.schema;if(w.some(p)||h?.some(p))return Fe(i,t)}return a?f:ge.foldFlowLines(f,l,ge.FOLD_FLOW,kn(t,!1))}function Zm(e,t,n,s){let{implicitKey:r,inFlow:i}=t,o=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;a!==X.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=X.Scalar.QUOTE_DOUBLE);let l=m=>{switch(m){case X.Scalar.BLOCK_FOLDED:case X.Scalar.BLOCK_LITERAL:return r||i?Fe(o.value,t):Sn(o,t,n,s);case X.Scalar.QUOTE_DOUBLE:return mt(o.value,t);case X.Scalar.QUOTE_SINGLE:return Ys(o.value,t);case X.Scalar.PLAIN:return zm(o,t,n,s);default:return null}},c=l(a);if(c===null){let{defaultKeyType:m,defaultStringType:f}=t.options,p=r&&m||f;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}Fa.stringifyString=Zm});var ht=v(Hs=>{"use strict";var ed=dn(),ye=I(),td=ft(),nd=dt();function sd(e,t){let n=Object.assign({blockQuote:!0,commentString:td.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),s;switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:s,options:n}}function rd(e,t){if(t.tag){let r=e.filter(i=>i.tag===t.tag);if(r.length>0)return r.find(i=>i.format===t.format)??r[0]}let n,s;if(ye.isScalar(t)){s=t.value;let r=e.filter(i=>i.identify?.(s));if(r.length>1){let i=r.filter(o=>o.test);i.length>0&&(r=i)}n=r.find(i=>i.format===t.format)??r.find(i=>!i.format)}else s=t,n=e.find(r=>r.nodeClass&&s instanceof r.nodeClass);if(!n){let r=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${r} value`)}return n}function id(e,t,{anchors:n,doc:s}){if(!s.directives)return"";let r=[],i=(ye.isScalar(e)||ye.isCollection(e))&&e.anchor;i&&ed.anchorIsValid(i)&&(n.add(i),r.push(`&${i}`));let o=e.tag??(t.default?null:t.tag);return o&&r.push(s.directives.tagString(o)),r.join(" ")}function od(e,t,n,s){if(ye.isPair(e))return e.toString(t,n,s);if(ye.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let r,i=ye.isNode(e)?e:t.doc.createNode(e,{onTagObj:l=>r=l});r??(r=rd(t.doc.schema.tags,i));let o=id(i,r,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let a=typeof r.stringify=="function"?r.stringify(i,t,n,s):ye.isScalar(i)?nd.stringifyString(i,t,n,s):i.toString(t,n,s);return o?ye.isScalar(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
36
+ ${t.indent}${a}`:a}Hs.createStringifyContext=sd;Hs.stringify=od});var Ja=v(Va=>{"use strict";var ae=I(),Ka=M(),Ga=ht(),gt=ft();function ad({key:e,value:t},n,s,r){let{allNullValues:i,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:m,simpleKeys:f}}=n,p=ae.isNode(e)&&e.comment||null;if(f){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(ae.isCollection(e)||!ae.isNode(e)&&typeof e=="object"){let _="With simple keys, collection cannot be used as a key value";throw new Error(_)}}let h=!f&&(!e||p&&t==null&&!n.inFlow||ae.isCollection(e)||(ae.isScalar(e)?e.type===Ka.Scalar.BLOCK_FOLDED||e.type===Ka.Scalar.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!i),indent:a+l});let w=!1,d=!1,g=Ga.stringify(e,n,()=>w=!0,()=>d=!0);if(!h&&!n.inFlow&&g.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(i||t==null)return w&&s&&s(),g===""?"?":h?`? ${g}`:g}else if(i&&!f||t==null&&h)return g=`? ${g}`,p&&!w?g+=gt.lineComment(g,n.indent,c(p)):d&&r&&r(),g;w&&(p=null),h?(p&&(g+=gt.lineComment(g,n.indent,c(p))),g=`? ${g}
37
+ ${a}:`):(g=`${g}:`,p&&(g+=gt.lineComment(g,n.indent,c(p))));let y,b,P;ae.isNode(t)?(y=!!t.spaceBefore,b=t.commentBefore,P=t.comment):(y=!1,b=null,P=null,t&&typeof t=="object"&&(t=o.createNode(t))),n.implicitKey=!1,!h&&!p&&ae.isScalar(t)&&(n.indentAtStart=g.length+1),d=!1,!m&&l.length>=2&&!n.inFlow&&!h&&ae.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let S=!1,A=Ga.stringify(t,n,()=>S=!0,()=>d=!0),N=" ";if(p||y||b){if(N=y?`
38
+ `:"",b){let _=c(b);N+=`
39
+ ${gt.indentComment(_,n.indent)}`}A===""&&!n.inFlow?N===`
40
+ `&&P&&(N=`
41
+
42
+ `):N+=`
43
+ ${n.indent}`}else if(!h&&ae.isCollection(t)){let _=A[0],k=A.indexOf(`
44
+ `),B=k!==-1,ce=n.inFlow??t.flow??t.items.length===0;if(B||!ce){let Oe=!1;if(B&&(_==="&"||_==="!")){let U=A.indexOf(" ");_==="&"&&U!==-1&&U<k&&A[U+1]==="!"&&(U=A.indexOf(" ",U+1)),(U===-1||k<U)&&(Oe=!0)}Oe||(N=`
45
+ ${n.indent}`)}}else(A===""||A[0]===`
46
+ `)&&(N="");return g+=N+A,n.inFlow?S&&s&&s():P&&!S?g+=gt.lineComment(g,n.indent,c(P)):d&&r&&r(),g}Va.stringifyPair=ad});var Xs=v(Qs=>{"use strict";var Ya=Ut("process");function ld(e,...t){e==="debug"&&console.log(...t)}function cd(e,t){(e==="debug"||e==="warn")&&(typeof Ya.emitWarning=="function"?Ya.emitWarning(t):console.warn(t))}Qs.debug=ld;Qs.warn=cd});var Cn=v(Nn=>{"use strict";var Pn=I(),Wa=M(),$n="<<",An={identify:e=>e===$n||typeof e=="symbol"&&e.description===$n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Wa.Scalar(Symbol($n)),{addToJSMap:Ha}),stringify:()=>$n},ud=(e,t)=>(An.identify(t)||Pn.isScalar(t)&&(!t.type||t.type===Wa.Scalar.PLAIN)&&An.identify(t.value))&&e?.doc.schema.tags.some(n=>n.tag===An.tag&&n.default);function Ha(e,t,n){let s=Qa(e,n);if(Pn.isSeq(s))for(let r of s.items)zs(e,t,r);else if(Array.isArray(s))for(let r of s)zs(e,t,r);else zs(e,t,s)}function zs(e,t,n){let s=Qa(e,n);if(!Pn.isMap(s))throw new Error("Merge sources must be maps or map aliases");let r=s.toJSON(null,e,Map);for(let[i,o]of r)t instanceof Map?t.has(i)||t.set(i,o):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return t}function Qa(e,t){return e&&Pn.isAlias(t)?t.resolve(e.doc,e):t}Nn.addMergeToJSMap=Ha;Nn.isMergeKey=ud;Nn.merge=An});var er=v(Za=>{"use strict";var fd=Xs(),Xa=Cn(),pd=ht(),za=I(),Zs=de();function md(e,t,{key:n,value:s}){if(za.isNode(n)&&n.addToJSMap)n.addToJSMap(e,t,s);else if(Xa.isMergeKey(e,n))Xa.addMergeToJSMap(e,t,s);else{let r=Zs.toJS(n,"",e);if(t instanceof Map)t.set(r,Zs.toJS(s,r,e));else if(t instanceof Set)t.add(r);else{let i=dd(n,r,e),o=Zs.toJS(s,i,e);i in t?Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[i]=o}}return t}function dd(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(za.isNode(e)&&n?.doc){let s=pd.createStringifyContext(n.doc,{});s.anchors=new Set;for(let i of n.anchors.keys())s.anchors.add(i.anchor);s.inFlow=!0,s.inStringifyKey=!0;let r=e.toString(s);if(!n.mapKeyWarned){let i=JSON.stringify(r);i.length>40&&(i=i.substring(0,36)+'..."'),fd.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}Za.addPairToJSMap=md});var we=v(tr=>{"use strict";var el=ut(),hd=Ja(),gd=er(),Tn=I();function yd(e,t,n){let s=el.createNode(e,void 0,n),r=el.createNode(t,void 0,n);return new In(s,r)}var In=class e{constructor(t,n=null){Object.defineProperty(this,Tn.NODE_TYPE,{value:Tn.PAIR}),this.key=t,this.value=n}clone(t){let{key:n,value:s}=this;return Tn.isNode(n)&&(n=n.clone(t)),Tn.isNode(s)&&(s=s.clone(t)),new e(n,s)}toJSON(t,n){let s=n?.mapAsMap?new Map:{};return gd.addPairToJSMap(n,s,this)}toString(t,n,s){return t?.doc?hd.stringifyPair(this,t,n,s):JSON.stringify(this)}};tr.Pair=In;tr.createPair=yd});var nr=v(nl=>{"use strict";var Ne=I(),tl=ht(),Ln=ft();function wd(e,t,n){return(t.inFlow??e.flow?vd:bd)(e,t,n)}function bd({comment:e,items:t},n,{blockItemPrefix:s,flowChars:r,itemIndent:i,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=n,m=Object.assign({},n,{indent:i,type:null}),f=!1,p=[];for(let w=0;w<t.length;++w){let d=t[w],g=null;if(Ne.isNode(d))!f&&d.spaceBefore&&p.push(""),On(n,p,d.commentBefore,f),d.comment&&(g=d.comment);else if(Ne.isPair(d)){let b=Ne.isNode(d.key)?d.key:null;b&&(!f&&b.spaceBefore&&p.push(""),On(n,p,b.commentBefore,f))}f=!1;let y=tl.stringify(d,m,()=>g=null,()=>f=!0);g&&(y+=Ln.lineComment(y,i,c(g))),f&&g&&(f=!1),p.push(s+y)}let h;if(p.length===0)h=r.start+r.end;else{h=p[0];for(let w=1;w<p.length;++w){let d=p[w];h+=d?`
47
+ ${l}${d}`:`
48
+ `}}return e?(h+=`
49
+ `+Ln.indentComment(c(e),l),a&&a()):f&&o&&o(),h}function vd({items:e},t,{flowChars:n,itemIndent:s}){let{indent:r,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=t;s+=i;let l=Object.assign({},t,{indent:s,inFlow:!0,type:null}),c=!1,m=0,f=[];for(let w=0;w<e.length;++w){let d=e[w],g=null;if(Ne.isNode(d))d.spaceBefore&&f.push(""),On(t,f,d.commentBefore,!1),d.comment&&(g=d.comment);else if(Ne.isPair(d)){let b=Ne.isNode(d.key)?d.key:null;b&&(b.spaceBefore&&f.push(""),On(t,f,b.commentBefore,!1),b.comment&&(c=!0));let P=Ne.isNode(d.value)?d.value:null;P?(P.comment&&(g=P.comment),P.commentBefore&&(c=!0)):d.value==null&&b?.comment&&(g=b.comment)}g&&(c=!0);let y=tl.stringify(d,l,()=>g=null);c||(c=f.length>m||y.includes(`
50
+ `)),w<e.length-1?y+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||(c=f.reduce((b,P)=>b+P.length+2,2)+(y.length+2)>t.options.lineWidth)),c&&(y+=",")),g&&(y+=Ln.lineComment(y,s,a(g))),f.push(y),m=f.length}let{start:p,end:h}=n;if(f.length===0)return p+h;if(!c){let w=f.reduce((d,g)=>d+g.length+2,2);c=t.options.lineWidth>0&&w>t.options.lineWidth}if(c){let w=p;for(let d of f)w+=d?`
51
+ ${i}${r}${d}`:`
52
+ `;return`${w}
53
+ ${r}${h}`}else return`${p}${o}${f.join(" ")}${o}${h}`}function On({indent:e,options:{commentString:t}},n,s,r){if(s&&r&&(s=s.replace(/^\n+/,"")),s){let i=Ln.indentComment(t(s),e);n.push(i.trimStart())}}nl.stringifyCollection=wd});var ve=v(rr=>{"use strict";var Sd=nr(),kd=er(),Ed=wn(),be=I(),qn=we(),$d=M();function yt(e,t){let n=be.isScalar(t)?t.value:t;for(let s of e)if(be.isPair(s)&&(s.key===t||s.key===n||be.isScalar(s.key)&&s.key.value===n))return s}var sr=class extends Ed.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(be.MAP,t),this.items=[]}static from(t,n,s){let{keepUndefined:r,replacer:i}=s,o=new this(t),a=(l,c)=>{if(typeof i=="function")c=i.call(n,l,c);else if(Array.isArray(i)&&!i.includes(l))return;(c!==void 0||r)&&o.items.push(qn.createPair(l,c,s))};if(n instanceof Map)for(let[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))a(l,n[l]);return typeof t.sortMapEntries=="function"&&o.items.sort(t.sortMapEntries),o}add(t,n){let s;be.isPair(t)?s=t:!t||typeof t!="object"||!("key"in t)?s=new qn.Pair(t,t?.value):s=new qn.Pair(t.key,t.value);let r=yt(this.items,s.key),i=this.schema?.sortMapEntries;if(r){if(!n)throw new Error(`Key ${s.key} already set`);be.isScalar(r.value)&&$d.isScalarValue(s.value)?r.value.value=s.value:r.value=s.value}else if(i){let o=this.items.findIndex(a=>i(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(t){let n=yt(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){let r=yt(this.items,t)?.value;return(!n&&be.isScalar(r)?r.value:r)??void 0}has(t){return!!yt(this.items,t)}set(t,n){this.add(new qn.Pair(t,n),!0)}toJSON(t,n,s){let r=s?new s:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(r);for(let i of this.items)kd.addPairToJSMap(n,r,i);return r}toString(t,n,s){if(!t)return JSON.stringify(this);for(let r of this.items)if(!be.isPair(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Sd.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}};rr.YAMLMap=sr;rr.findPair=yt});var Ke=v(rl=>{"use strict";var Ad=I(),sl=ve(),Pd={collection:"map",default:!0,nodeClass:sl.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){return Ad.isMap(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>sl.YAMLMap.from(e,t,n)};rl.map=Pd});var Se=v(il=>{"use strict";var Nd=ut(),Cd=nr(),Td=wn(),Rn=I(),Id=M(),Ld=de(),ir=class extends Td.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Rn.SEQ,t),this.items=[]}add(t){this.items.push(t)}delete(t){let n=_n(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){let s=_n(t);if(typeof s!="number")return;let r=this.items[s];return!n&&Rn.isScalar(r)?r.value:r}has(t){let n=_n(t);return typeof n=="number"&&n<this.items.length}set(t,n){let s=_n(t);if(typeof s!="number")throw new Error(`Expected a valid index, not ${t}.`);let r=this.items[s];Rn.isScalar(r)&&Id.isScalarValue(n)?r.value=n:this.items[s]=n}toJSON(t,n){let s=[];n?.onCreate&&n.onCreate(s);let r=0;for(let i of this.items)s.push(Ld.toJS(i,String(r++),n));return s}toString(t,n,s){return t?Cd.stringifyCollection(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}static from(t,n,s){let{replacer:r}=s,i=new this(t);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof r=="function"){let l=n instanceof Set?a:String(o++);a=r.call(n,l,a)}i.items.push(Nd.createNode(a,void 0,s))}}return i}};function _n(e){let t=Rn.isScalar(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}il.YAMLSeq=ir});var Ge=v(al=>{"use strict";var Od=I(),ol=Se(),qd={collection:"seq",default:!0,nodeClass:ol.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Od.isSeq(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>ol.YAMLSeq.from(e,t,n)};al.seq=qd});var wt=v(ll=>{"use strict";var _d=dt(),Rd={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,s){return t=Object.assign({actualString:!0},t),_d.stringifyString(e,t,n,s)}};ll.string=Rd});var Dn=v(fl=>{"use strict";var cl=M(),ul={identify:e=>e==null,createNode:()=>new cl.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new cl.Scalar(null),stringify:({source:e},t)=>typeof e=="string"&&ul.test.test(e)?e:t.options.nullStr};fl.nullTag=ul});var or=v(ml=>{"use strict";var Dd=M(),pl={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Dd.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&pl.test.test(e)){let s=e[0]==="t"||e[0]==="T";if(t===s)return e}return t?n.options.trueStr:n.options.falseStr}};ml.boolTag=pl});var Ve=v(dl=>{"use strict";function xd({format:e,minFractionDigits:t,tag:n,value:s}){if(typeof s=="bigint")return String(s);let r=typeof s=="number"?s:Number(s);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=Object.is(s,-0)?"-0":JSON.stringify(s);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=t-(i.length-o-1);for(;a-- >0;)i+="0"}return i}dl.stringifyNumber=xd});var lr=v(xn=>{"use strict";var jd=M(),ar=Ve(),Md={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ar.stringifyNumber},Bd={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():ar.stringifyNumber(e)}},Ud={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new jd.Scalar(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:ar.stringifyNumber};xn.float=Ud;xn.floatExp=Bd;xn.floatNaN=Md});var ur=v(Mn=>{"use strict";var hl=Ve(),jn=e=>typeof e=="bigint"||Number.isInteger(e),cr=(e,t,n,{intAsBigInt:s})=>s?BigInt(e):parseInt(e.substring(t),n);function gl(e,t,n){let{value:s}=e;return jn(s)&&s>=0?n+s.toString(t):hl.stringifyNumber(e)}var Fd={identify:e=>jn(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>cr(e,2,8,n),stringify:e=>gl(e,8,"0o")},Kd={identify:jn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>cr(e,0,10,n),stringify:hl.stringifyNumber},Gd={identify:e=>jn(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>cr(e,2,16,n),stringify:e=>gl(e,16,"0x")};Mn.int=Kd;Mn.intHex=Gd;Mn.intOct=Fd});var wl=v(yl=>{"use strict";var Vd=Ke(),Jd=Dn(),Yd=Ge(),Wd=wt(),Hd=or(),fr=lr(),pr=ur(),Qd=[Vd.map,Yd.seq,Wd.string,Jd.nullTag,Hd.boolTag,pr.intOct,pr.int,pr.intHex,fr.floatNaN,fr.floatExp,fr.float];yl.schema=Qd});var Sl=v(vl=>{"use strict";var Xd=M(),zd=Ke(),Zd=Ge();function bl(e){return typeof e=="bigint"||Number.isInteger(e)}var Bn=({value:e})=>JSON.stringify(e),eh=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Bn},{identify:e=>e==null,createNode:()=>new Xd.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Bn},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Bn},{identify:bl,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>bl(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Bn}],th={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},nh=[zd.map,Zd.seq].concat(eh,th);vl.schema=nh});var dr=v(kl=>{"use strict";var bt=Ut("buffer"),mr=M(),sh=dt(),rh={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof bt.Buffer=="function")return bt.Buffer.from(e,"base64");if(typeof atob=="function"){let n=atob(e.replace(/[\n\r]/g,"")),s=new Uint8Array(n.length);for(let r=0;r<n.length;++r)s[r]=n.charCodeAt(r);return s}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},s,r,i){if(!n)return"";let o=n,a;if(typeof bt.Buffer=="function")a=o instanceof bt.Buffer?o.toString("base64"):bt.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=mr.Scalar.BLOCK_LITERAL),t!==mr.Scalar.QUOTE_DOUBLE){let l=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),c=Math.ceil(a.length/l),m=new Array(c);for(let f=0,p=0;f<c;++f,p+=l)m[f]=a.substr(p,l);a=m.join(t===mr.Scalar.BLOCK_LITERAL?`
54
+ `:" ")}return sh.stringifyString({comment:e,type:t,value:a},s,r,i)}};kl.binary=rh});var Kn=v(Fn=>{"use strict";var Un=I(),hr=we(),ih=M(),oh=Se();function El(e,t){if(Un.isSeq(e))for(let n=0;n<e.items.length;++n){let s=e.items[n];if(!Un.isPair(s)){if(Un.isMap(s)){s.items.length>1&&t("Each pair must have its own sequence indicator");let r=s.items[0]||new hr.Pair(new ih.Scalar(null));if(s.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${s.commentBefore}
55
+ ${r.key.commentBefore}`:s.commentBefore),s.comment){let i=r.value??r.key;i.comment=i.comment?`${s.comment}
56
+ ${i.comment}`:s.comment}s=r}e.items[n]=Un.isPair(s)?s:new hr.Pair(s)}}else t("Expected a sequence for this tag");return e}function $l(e,t,n){let{replacer:s}=n,r=new oh.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let o of t){typeof s=="function"&&(o=s.call(t,String(i++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;r.items.push(hr.createPair(a,l,n))}return r}var ah={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:El,createNode:$l};Fn.createPairs=$l;Fn.pairs=ah;Fn.resolvePairs=El});var wr=v(yr=>{"use strict";var Al=I(),gr=de(),vt=ve(),lh=Se(),Pl=Kn(),Ce=class e extends lh.YAMLSeq{constructor(){super(),this.add=vt.YAMLMap.prototype.add.bind(this),this.delete=vt.YAMLMap.prototype.delete.bind(this),this.get=vt.YAMLMap.prototype.get.bind(this),this.has=vt.YAMLMap.prototype.has.bind(this),this.set=vt.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON(t,n){if(!n)return super.toJSON(t);let s=new Map;n?.onCreate&&n.onCreate(s);for(let r of this.items){let i,o;if(Al.isPair(r)?(i=gr.toJS(r.key,"",n),o=gr.toJS(r.value,i,n)):i=gr.toJS(r,"",n),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(t,n,s){let r=Pl.createPairs(t,n,s),i=new this;return i.items=r.items,i}};Ce.tag="tag:yaml.org,2002:omap";var ch={collection:"seq",identify:e=>e instanceof Map,nodeClass:Ce,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=Pl.resolvePairs(e,t),s=[];for(let{key:r}of n.items)Al.isScalar(r)&&(s.includes(r.value)?t(`Ordered maps must not include duplicate keys: ${r.value}`):s.push(r.value));return Object.assign(new Ce,n)},createNode:(e,t,n)=>Ce.from(e,t,n)};yr.YAMLOMap=Ce;yr.omap=ch});var Ll=v(br=>{"use strict";var Nl=M();function Cl({value:e,source:t},n){return t&&(e?Tl:Il).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Tl={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Nl.Scalar(!0),stringify:Cl},Il={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Nl.Scalar(!1),stringify:Cl};br.falseTag=Il;br.trueTag=Tl});var Ol=v(Gn=>{"use strict";var uh=M(),vr=Ve(),fh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:vr.stringifyNumber},ph={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():vr.stringifyNumber(e)}},mh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new uh.Scalar(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){let s=e.substring(n+1).replace(/_/g,"");s[s.length-1]==="0"&&(t.minFractionDigits=s.length)}return t},stringify:vr.stringifyNumber};Gn.float=mh;Gn.floatExp=ph;Gn.floatNaN=fh});var _l=v(kt=>{"use strict";var ql=Ve(),St=e=>typeof e=="bigint"||Number.isInteger(e);function Vn(e,t,n,{intAsBigInt:s}){let r=e[0];if((r==="-"||r==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),s){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let o=BigInt(e);return r==="-"?BigInt(-1)*o:o}let i=parseInt(e,n);return r==="-"?-1*i:i}function Sr(e,t,n){let{value:s}=e;if(St(s)){let r=s.toString(t);return s<0?"-"+n+r.substr(1):n+r}return ql.stringifyNumber(e)}var dh={identify:St,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Vn(e,2,2,n),stringify:e=>Sr(e,2,"0b")},hh={identify:St,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Vn(e,1,8,n),stringify:e=>Sr(e,8,"0")},gh={identify:St,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Vn(e,0,10,n),stringify:ql.stringifyNumber},yh={identify:St,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Vn(e,2,16,n),stringify:e=>Sr(e,16,"0x")};kt.int=gh;kt.intBin=dh;kt.intHex=yh;kt.intOct=hh});var Er=v(kr=>{"use strict";var Wn=I(),Jn=we(),Yn=ve(),Te=class e extends Yn.YAMLMap{constructor(t){super(t),this.tag=e.tag}add(t){let n;Wn.isPair(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new Jn.Pair(t.key,null):n=new Jn.Pair(t,null),Yn.findPair(this.items,n.key)||this.items.push(n)}get(t,n){let s=Yn.findPair(this.items,t);return!n&&Wn.isPair(s)?Wn.isScalar(s.key)?s.key.value:s.key:s}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let s=Yn.findPair(this.items,t);s&&!n?this.items.splice(this.items.indexOf(s),1):!s&&n&&this.items.push(new Jn.Pair(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,s){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,s);throw new Error("Set items must all have null values")}static from(t,n,s){let{replacer:r}=s,i=new this(t);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof r=="function"&&(o=r.call(n,o,o)),i.items.push(Jn.createPair(o,null,s));return i}};Te.tag="tag:yaml.org,2002:set";var wh={collection:"map",identify:e=>e instanceof Set,nodeClass:Te,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>Te.from(e,t,n),resolve(e,t){if(Wn.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new Te,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};kr.YAMLSet=Te;kr.set=wh});var Ar=v(Hn=>{"use strict";var bh=Ve();function $r(e,t){let n=e[0],s=n==="-"||n==="+"?e.substring(1):e,r=o=>t?BigInt(o):Number(o),i=s.replace(/_/g,"").split(":").reduce((o,a)=>o*r(60)+r(a),r(0));return n==="-"?r(-1)*i:i}function Rl(e){let{value:t}=e,n=o=>o;if(typeof t=="bigint")n=o=>BigInt(o);else if(isNaN(t)||!isFinite(t))return bh.stringifyNumber(e);let s="";t<0&&(s="-",t*=n(-1));let r=n(60),i=[t%r];return t<60?i.unshift(0):(t=(t-i[0])/r,i.unshift(t%r),t>=60&&(t=(t-i[0])/r,i.unshift(t))),s+i.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var vh={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>$r(e,n),stringify:Rl},Sh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>$r(e,!1),stringify:Rl},Dl={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(Dl.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,s,r,i,o,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(n,s-1,r,i||0,o||0,a||0,l),m=t[8];if(m&&m!=="Z"){let f=$r(m,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Hn.floatTime=Sh;Hn.intTime=vh;Hn.timestamp=Dl});var Ml=v(jl=>{"use strict";var kh=Ke(),Eh=Dn(),$h=Ge(),Ah=wt(),Ph=dr(),xl=Ll(),Pr=Ol(),Qn=_l(),Nh=Cn(),Ch=wr(),Th=Kn(),Ih=Er(),Nr=Ar(),Lh=[kh.map,$h.seq,Ah.string,Eh.nullTag,xl.trueTag,xl.falseTag,Qn.intBin,Qn.intOct,Qn.int,Qn.intHex,Pr.floatNaN,Pr.floatExp,Pr.float,Ph.binary,Nh.merge,Ch.omap,Th.pairs,Ih.set,Nr.intTime,Nr.floatTime,Nr.timestamp];jl.schema=Lh});var Hl=v(Ir=>{"use strict";var Kl=Ke(),Oh=Dn(),Gl=Ge(),qh=wt(),_h=or(),Cr=lr(),Tr=ur(),Rh=wl(),Dh=Sl(),Vl=dr(),Et=Cn(),Jl=wr(),Yl=Kn(),Bl=Ml(),Wl=Er(),Xn=Ar(),Ul=new Map([["core",Rh.schema],["failsafe",[Kl.map,Gl.seq,qh.string]],["json",Dh.schema],["yaml11",Bl.schema],["yaml-1.1",Bl.schema]]),Fl={binary:Vl.binary,bool:_h.boolTag,float:Cr.float,floatExp:Cr.floatExp,floatNaN:Cr.floatNaN,floatTime:Xn.floatTime,int:Tr.int,intHex:Tr.intHex,intOct:Tr.intOct,intTime:Xn.intTime,map:Kl.map,merge:Et.merge,null:Oh.nullTag,omap:Jl.omap,pairs:Yl.pairs,seq:Gl.seq,set:Wl.set,timestamp:Xn.timestamp},xh={"tag:yaml.org,2002:binary":Vl.binary,"tag:yaml.org,2002:merge":Et.merge,"tag:yaml.org,2002:omap":Jl.omap,"tag:yaml.org,2002:pairs":Yl.pairs,"tag:yaml.org,2002:set":Wl.set,"tag:yaml.org,2002:timestamp":Xn.timestamp};function jh(e,t,n){let s=Ul.get(t);if(s&&!e)return n&&!s.includes(Et.merge)?s.concat(Et.merge):s.slice();let r=s;if(!r)if(Array.isArray(e))r=[];else{let i=Array.from(Ul.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${i} or define customTags array`)}if(Array.isArray(e))for(let i of e)r=r.concat(i);else typeof e=="function"&&(r=e(r.slice()));return n&&(r=r.concat(Et.merge)),r.reduce((i,o)=>{let a=typeof o=="string"?Fl[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(Fl).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return i.includes(a)||i.push(a),i},[])}Ir.coreKnownTags=xh;Ir.getTags=jh});var qr=v(Ql=>{"use strict";var Lr=I(),Mh=Ke(),Bh=Ge(),Uh=wt(),zn=Hl(),Fh=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,Or=class e{constructor({compat:t,customTags:n,merge:s,resolveKnownTags:r,schema:i,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(t)?zn.getTags(t,"compat"):t?zn.getTags(null,t):null,this.name=typeof i=="string"&&i||"core",this.knownTags=r?zn.coreKnownTags:{},this.tags=zn.getTags(n,this.name,s),this.toStringOptions=a??null,Object.defineProperty(this,Lr.MAP,{value:Mh.map}),Object.defineProperty(this,Lr.SCALAR,{value:Uh.string}),Object.defineProperty(this,Lr.SEQ,{value:Bh.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?Fh:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};Ql.Schema=Or});var zl=v(Xl=>{"use strict";var Kh=I(),_r=ht(),$t=ft();function Gh(e,t){let n=[],s=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);l?(n.push(l),s=!0):e.directives.docStart&&(s=!0)}s&&n.push("---");let r=_r.createStringifyContext(e,t),{commentString:i}=r.options;if(e.commentBefore){n.length!==1&&n.unshift("");let l=i(e.commentBefore);n.unshift($t.indentComment(l,""))}let o=!1,a=null;if(e.contents){if(Kh.isNode(e.contents)){if(e.contents.spaceBefore&&s&&n.push(""),e.contents.commentBefore){let m=i(e.contents.commentBefore);n.push($t.indentComment(m,""))}r.forceBlockIndent=!!e.comment,a=e.contents.comment}let l=a?void 0:()=>o=!0,c=_r.stringify(e.contents,r,()=>a=null,l);a&&(c+=$t.lineComment(c,"",i(a))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(_r.stringify(e.contents,r));if(e.directives?.docEnd)if(e.comment){let l=i(e.comment);l.includes(`
57
+ `)?(n.push("..."),n.push($t.indentComment(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=e.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push($t.indentComment(i(l),"")))}return n.join(`
58
+ `)+`
59
+ `}Xl.stringifyDocument=Gh});var At=v(Zl=>{"use strict";var Vh=ct(),Je=wn(),Q=I(),Jh=we(),Yh=de(),Wh=qr(),Hh=zl(),Rr=dn(),Qh=Ms(),Xh=ut(),Dr=js(),xr=class e{constructor(t,n,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Q.NODE_TYPE,{value:Q.DOC});let r=null;typeof n=="function"||Array.isArray(n)?r=n:s===void 0&&n&&(s=n,n=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:o}=i;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Dr.Directives({version:o}),this.setSchema(o,s),this.contents=t===void 0?null:this.createNode(t,r,s)}clone(){let t=Object.create(e.prototype,{[Q.NODE_TYPE]:{value:Q.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Q.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Ye(this.contents)&&this.contents.add(t)}addIn(t,n){Ye(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){let s=Rr.anchorNames(this);t.anchor=!n||s.has(n)?Rr.findNewAnchor(n||"a",s):n}return new Vh.Alias(t.anchor)}createNode(t,n,s){let r;if(typeof n=="function")t=n.call({"":t},"",t),r=n;else if(Array.isArray(n)){let g=b=>typeof b=="number"||b instanceof String||b instanceof Number,y=n.filter(g).map(String);y.length>0&&(n=n.concat(y)),r=n}else s===void 0&&n&&(s=n,n=void 0);let{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:m}=s??{},{onAnchor:f,setAnchors:p,sourceObjects:h}=Rr.createNodeAnchors(this,o||"a"),w={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:h},d=Xh.createNode(t,m,w);return a&&Q.isCollection(d)&&(d.flow=!0),p(),d}createPair(t,n,s={}){let r=this.createNode(t,null,s),i=this.createNode(n,null,s);return new Jh.Pair(r,i)}delete(t){return Ye(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Je.isEmptyPath(t)?this.contents==null?!1:(this.contents=null,!0):Ye(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Q.isCollection(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Je.isEmptyPath(t)?!n&&Q.isScalar(this.contents)?this.contents.value:this.contents:Q.isCollection(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Q.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){return Je.isEmptyPath(t)?this.contents!==void 0:Q.isCollection(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Je.collectionFromPath(this.schema,[t],n):Ye(this.contents)&&this.contents.set(t,n)}setIn(t,n){Je.isEmptyPath(t)?this.contents=n:this.contents==null?this.contents=Je.collectionFromPath(this.schema,Array.from(t),n):Ye(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let s;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Dr.Directives({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Dr.Directives({version:t}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{let r=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(s)this.schema=new Wh.Schema(Object.assign(s,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:s,maxAliasCount:r,onAnchor:i,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!t,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=Yh.toJS(this.contents,n??"",a);if(typeof i=="function")for(let{count:c,res:m}of a.anchors.values())i(m,c);return typeof o=="function"?Qh.applyReviver(o,{"":l},"",l):l}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Hh.stringifyDocument(this,t)}};function Ye(e){if(Q.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}Zl.Document=xr});var Ct=v(Nt=>{"use strict";var Pt=class extends Error{constructor(t,n,s,r){super(),this.name=t,this.code=s,this.message=r,this.pos=n}},jr=class extends Pt{constructor(t,n,s){super("YAMLParseError",t,n,s)}},Mr=class extends Pt{constructor(t,n,s){super("YAMLWarning",t,n,s)}},zh=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>t.linePos(a));let{line:s,col:r}=n.linePos[0];n.message+=` at line ${s}, column ${r}`;let i=r-1,o=e.substring(t.lineStarts[s-1],t.lineStarts[s]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){let a=Math.min(i-39,o.length-79);o="\u2026"+o.substring(a),i-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),s>1&&/^ *$/.test(o.substring(0,i))){let a=e.substring(t.lineStarts[s-2],t.lineStarts[s-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
60
+ `),o=a+o}if(/[^ ]/.test(o)){let a=1,l=n.linePos[1];l?.line===s&&l.col>r&&(a=Math.max(1,Math.min(l.col-r,80-i)));let c=" ".repeat(i)+"^".repeat(a);n.message+=`:
61
+
62
+ ${o}
63
+ ${c}
64
+ `}};Nt.YAMLError=Pt;Nt.YAMLParseError=jr;Nt.YAMLWarning=Mr;Nt.prettifyError=zh});var Tt=v(ec=>{"use strict";function Zh(e,{flow:t,indicator:n,next:s,offset:r,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,c=a,m=a,f="",p="",h=!1,w=!1,d=null,g=null,y=null,b=null,P=null,S=null,A=null;for(let k of e)switch(w&&(k.type!=="space"&&k.type!=="newline"&&k.type!=="comma"&&i(k.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w=!1),d&&(c&&k.type!=="comment"&&k.type!=="newline"&&i(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),d=null),k.type){case"space":!t&&(n!=="doc-start"||s?.type!=="flow-collection")&&k.source.includes(" ")&&(d=k),m=!0;break;case"comment":{m||i(k,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let B=k.source.substring(1)||" ";f?f+=p+B:f=B,p="",c=!1;break}case"newline":c?f?f+=k.source:(!S||n!=="seq-item-ind")&&(l=!0):p+=k.source,c=!0,h=!0,(g||y)&&(b=k),m=!0;break;case"anchor":g&&i(k,"MULTIPLE_ANCHORS","A node can have at most one anchor"),k.source.endsWith(":")&&i(k.offset+k.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=k,A??(A=k.offset),c=!1,m=!1,w=!0;break;case"tag":{y&&i(k,"MULTIPLE_TAGS","A node can have at most one tag"),y=k,A??(A=k.offset),c=!1,m=!1,w=!0;break}case n:(g||y)&&i(k,"BAD_PROP_ORDER",`Anchors and tags must be after the ${k.source} indicator`),S&&i(k,"UNEXPECTED_TOKEN",`Unexpected ${k.source} in ${t??"collection"}`),S=k,c=n==="seq-item-ind"||n==="explicit-key-ind",m=!1;break;case"comma":if(t){P&&i(k,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),P=k,c=!1,m=!1;break}default:i(k,"UNEXPECTED_TOKEN",`Unexpected ${k.type} token`),c=!1,m=!1}let N=e[e.length-1],_=N?N.offset+N.source.length:r;return w&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d&&(c&&d.indent<=o||s?.type==="block-map"||s?.type==="block-seq")&&i(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:P,found:S,spaceBefore:l,comment:f,hasNewline:h,anchor:g,tag:y,newlineAfterProp:b,end:_,start:A??_}}ec.resolveProps=Zh});var Zn=v(tc=>{"use strict";function Br(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
65
+ `))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let n of t.start)if(n.type==="newline")return!0;if(t.sep){for(let n of t.sep)if(n.type==="newline")return!0}if(Br(t.key)||Br(t.value))return!0}return!1;default:return!0}}tc.containsNewline=Br});var Ur=v(nc=>{"use strict";var eg=Zn();function tg(e,t,n){if(t?.type==="flow-collection"){let s=t.end[0];s.indent===e&&(s.source==="]"||s.source==="}")&&eg.containsNewline(t)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}nc.flowIndentCheck=tg});var Fr=v(rc=>{"use strict";var sc=I();function ng(e,t,n){let{uniqueKeys:s}=e.options;if(s===!1)return!1;let r=typeof s=="function"?s:(i,o)=>i===o||sc.isScalar(i)&&sc.isScalar(o)&&i.value===o.value;return t.some(i=>r(i.key,n))}rc.mapIncludes=ng});var uc=v(cc=>{"use strict";var ic=we(),sg=ve(),oc=Tt(),rg=Zn(),ac=Ur(),ig=Fr(),lc="All mapping items must start at the same column";function og({composeNode:e,composeEmptyNode:t},n,s,r,i){let o=i?.nodeClass??sg.YAMLMap,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset,c=null;for(let m of s.items){let{start:f,key:p,sep:h,value:w}=m,d=oc.resolveProps(f,{indicator:"explicit-key-ind",next:p??h?.[0],offset:l,onError:r,parentIndent:s.indent,startOnNewline:!0}),g=!d.found;if(g){if(p&&(p.type==="block-seq"?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==s.indent&&r(l,"BAD_INDENT",lc)),!d.anchor&&!d.tag&&!h){c=d.end,d.comment&&(a.comment?a.comment+=`
66
+ `+d.comment:a.comment=d.comment);continue}(d.newlineAfterProp||rg.containsNewline(p))&&r(p??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else d.found?.indent!==s.indent&&r(l,"BAD_INDENT",lc);n.atKey=!0;let y=d.end,b=p?e(n,p,d,r):t(n,y,f,null,d,r);n.schema.compat&&ac.flowIndentCheck(s.indent,p,r),n.atKey=!1,ig.mapIncludes(n,a.items,b)&&r(y,"DUPLICATE_KEY","Map keys must be unique");let P=oc.resolveProps(h??[],{indicator:"map-value-ind",next:w,offset:b.range[2],onError:r,parentIndent:s.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=P.end,P.found){g&&(w?.type==="block-map"&&!P.hasNewline&&r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&d.start<P.found.offset-1024&&r(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=w?e(n,w,P,r):t(n,l,h,null,P,r);n.schema.compat&&ac.flowIndentCheck(s.indent,w,r),l=S.range[2];let A=new ic.Pair(b,S);n.options.keepSourceTokens&&(A.srcToken=m),a.items.push(A)}else{g&&r(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),P.comment&&(b.comment?b.comment+=`
67
+ `+P.comment:b.comment=P.comment);let S=new ic.Pair(b);n.options.keepSourceTokens&&(S.srcToken=m),a.items.push(S)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[s.offset,l,c??l],a}cc.resolveBlockMap=og});var pc=v(fc=>{"use strict";var ag=Se(),lg=Tt(),cg=Ur();function ug({composeNode:e,composeEmptyNode:t},n,s,r,i){let o=i?.nodeClass??ag.YAMLSeq,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=s.offset,c=null;for(let{start:m,value:f}of s.items){let p=lg.resolveProps(m,{indicator:"seq-item-ind",next:f,offset:l,onError:r,parentIndent:s.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||f)f?.type==="block-seq"?r(p.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(a.comment=p.comment);continue}let h=f?e(n,f,p,r):t(n,p.end,m,null,p,r);n.schema.compat&&cg.flowIndentCheck(s.indent,f,r),l=h.range[2],a.items.push(h)}return a.range=[s.offset,l,c??l],a}fc.resolveBlockSeq=ug});var We=v(mc=>{"use strict";function fg(e,t,n,s){let r="";if(e){let i=!1,o="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let m=l.substring(1)||" ";r?r+=o+m:r=m,o="";break}case"newline":r&&(o+=l),i=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:r,offset:t}}mc.resolveEnd=fg});var yc=v(gc=>{"use strict";var pg=I(),mg=we(),dc=ve(),dg=Se(),hg=We(),hc=Tt(),gg=Zn(),yg=Fr(),Kr="Block collections are not allowed within flow collections",Gr=e=>e&&(e.type==="block-map"||e.type==="block-seq");function wg({composeNode:e,composeEmptyNode:t},n,s,r,i){let o=s.start.source==="{",a=o?"flow map":"flow sequence",l=i?.nodeClass??(o?dc.YAMLMap:dg.YAMLSeq),c=new l(n.schema);c.flow=!0;let m=n.atRoot;m&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=s.offset+s.start.source.length;for(let g=0;g<s.items.length;++g){let y=s.items[g],{start:b,key:P,sep:S,value:A}=y,N=hc.resolveProps(b,{flow:a,indicator:"explicit-key-ind",next:P??S?.[0],offset:f,onError:r,parentIndent:s.indent,startOnNewline:!1});if(!N.found){if(!N.anchor&&!N.tag&&!S&&!A){g===0&&N.comma?r(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):g<s.items.length-1&&r(N.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),N.comment&&(c.comment?c.comment+=`
68
+ `+N.comment:c.comment=N.comment),f=N.end;continue}!o&&n.options.strict&&gg.containsNewline(P)&&r(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)N.comma&&r(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(N.comma||r(N.start,"MISSING_CHAR",`Missing , between ${a} items`),N.comment){let _="";e:for(let k of b)switch(k.type){case"comma":case"space":break;case"comment":_=k.source.substring(1);break e;default:break e}if(_){let k=c.items[c.items.length-1];pg.isPair(k)&&(k=k.value??k.key),k.comment?k.comment+=`
69
+ `+_:k.comment=_,N.comment=N.comment.substring(_.length+1)}}if(!o&&!S&&!N.found){let _=A?e(n,A,N,r):t(n,N.end,S,null,N,r);c.items.push(_),f=_.range[2],Gr(A)&&r(_.range,"BLOCK_IN_FLOW",Kr)}else{n.atKey=!0;let _=N.end,k=P?e(n,P,N,r):t(n,_,b,null,N,r);Gr(P)&&r(k.range,"BLOCK_IN_FLOW",Kr),n.atKey=!1;let B=hc.resolveProps(S??[],{flow:a,indicator:"map-value-ind",next:A,offset:k.range[2],onError:r,parentIndent:s.indent,startOnNewline:!1});if(B.found){if(!o&&!N.found&&n.options.strict){if(S)for(let U of S){if(U===B.found)break;if(U.type==="newline"){r(U,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}N.start<B.found.offset-1024&&r(B.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else A&&("source"in A&&A.source?.[0]===":"?r(A,"MISSING_CHAR",`Missing space after : in ${a}`):r(B.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let ce=A?e(n,A,B,r):B.found?t(n,B.end,S,null,B,r):null;ce?Gr(A)&&r(ce.range,"BLOCK_IN_FLOW",Kr):B.comment&&(k.comment?k.comment+=`
70
+ `+B.comment:k.comment=B.comment);let Oe=new mg.Pair(k,ce);if(n.options.keepSourceTokens&&(Oe.srcToken=y),o){let U=c;yg.mapIncludes(n,U.items,k)&&r(_,"DUPLICATE_KEY","Map keys must be unique"),U.items.push(Oe)}else{let U=new dc.YAMLMap(n.schema);U.flow=!0,U.items.push(Oe);let Ei=(ce??k).range;U.range=[k.range[0],Ei[1],Ei[2]],c.items.push(U)}f=ce?ce.range[2]:B.end}}let p=o?"}":"]",[h,...w]=s.end,d=f;if(h?.source===p)d=h.offset+h.source.length;else{let g=a[0].toUpperCase()+a.substring(1),y=m?`${g} must end with a ${p}`:`${g} in block collection must be sufficiently indented and end with a ${p}`;r(f,m?"MISSING_CHAR":"BAD_INDENT",y),h&&h.source.length!==1&&w.unshift(h)}if(w.length>0){let g=hg.resolveEnd(w,d,n.options.strict,r);g.comment&&(c.comment?c.comment+=`
71
+ `+g.comment:c.comment=g.comment),c.range=[s.offset,d,g.offset]}else c.range=[s.offset,d,d];return c}gc.resolveFlowCollection=wg});var bc=v(wc=>{"use strict";var bg=I(),vg=M(),Sg=ve(),kg=Se(),Eg=uc(),$g=pc(),Ag=yc();function Vr(e,t,n,s,r,i){let o=n.type==="block-map"?Eg.resolveBlockMap(e,t,n,s,i):n.type==="block-seq"?$g.resolveBlockSeq(e,t,n,s,i):Ag.resolveFlowCollection(e,t,n,s,i),a=o.constructor;return r==="!"||r===a.tagName?(o.tag=a.tagName,o):(r&&(o.tag=r),o)}function Pg(e,t,n,s,r){let i=s.tag,o=i?t.directives.tagName(i.source,p=>r(i,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){let{anchor:p,newlineAfterProp:h}=s,w=p&&i?p.offset>i.offset?p:i:p??i;w&&(!h||h.offset<w.offset)&&r(w,"MISSING_CHAR","Missing newline after block sequence props")}let a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===Sg.YAMLMap.tagName&&a==="map"||o===kg.YAMLSeq.tagName&&a==="seq")return Vr(e,t,n,r,o);let l=t.schema.tags.find(p=>p.tag===o&&p.collection===a);if(!l){let p=t.schema.knownTags[o];if(p?.collection===a)t.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else return p?r(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0):r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Vr(e,t,n,r,o)}let c=Vr(e,t,n,r,o,l),m=l.resolve?.(c,p=>r(i,"TAG_RESOLVE_FAILED",p),t.options)??c,f=bg.isNode(m)?m:new vg.Scalar(m);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}wc.composeCollection=Pg});var Yr=v(vc=>{"use strict";var Jr=M();function Ng(e,t,n){let s=t.offset,r=Cg(t,e.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[s,s,s]};let i=r.mode===">"?Jr.Scalar.BLOCK_FOLDED:Jr.Scalar.BLOCK_LITERAL,o=t.source?Tg(t.source):[],a=o.length;for(let d=o.length-1;d>=0;--d){let g=o[d][1];if(g===""||g==="\r")a=d;else break}if(a===0){let d=r.chomp==="+"&&o.length>0?`
72
+ `.repeat(Math.max(1,o.length-1)):"",g=s+r.length;return t.source&&(g+=t.source.length),{value:d,type:i,comment:r.comment,range:[s,g,g]}}let l=t.indent+r.indent,c=t.offset+r.length,m=0;for(let d=0;d<a;++d){let[g,y]=o[d];if(y===""||y==="\r")r.indent===0&&g.length>l&&(l=g.length);else{g.length<l&&n(c+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(l=g.length),m=d,l===0&&!e.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=g.length+y.length+1}for(let d=o.length-1;d>=a;--d)o[d][0].length>l&&(a=d+1);let f="",p="",h=!1;for(let d=0;d<m;++d)f+=o[d][0].slice(l)+`
73
+ `;for(let d=m;d<a;++d){let[g,y]=o[d];c+=g.length+y.length+1;let b=y[y.length-1]==="\r";if(b&&(y=y.slice(0,-1)),y&&g.length<l){let S=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;n(c-y.length-(b?2:1),"BAD_INDENT",S),g=""}i===Jr.Scalar.BLOCK_LITERAL?(f+=p+g.slice(l)+y,p=`
74
+ `):g.length>l||y[0]===" "?(p===" "?p=`
75
+ `:!h&&p===`
76
+ `&&(p=`
77
+
78
+ `),f+=p+g.slice(l)+y,p=`
79
+ `,h=!0):y===""?p===`
80
+ `?f+=`
81
+ `:p=`
82
+ `:(f+=p+y,p=" ",h=!1)}switch(r.chomp){case"-":break;case"+":for(let d=a;d<o.length;++d)f+=`
83
+ `+o[d][0].slice(l);f[f.length-1]!==`
84
+ `&&(f+=`
85
+ `);break;default:f+=`
86
+ `}let w=s+r.length+t.source.length;return{value:f,type:i,comment:r.comment,range:[s,w,w]}}function Cg({offset:e,props:t},n,s){if(t[0].type!=="block-scalar-header")return s(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=t[0],i=r[0],o=0,a="",l=-1;for(let p=1;p<r.length;++p){let h=r[p];if(!a&&(h==="-"||h==="+"))a=h;else{let w=Number(h);!o&&w?o=w:l===-1&&(l=e+p)}}l!==-1&&s(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let c=!1,m="",f=r.length;for(let p=1;p<t.length;++p){let h=t[p];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":n&&!c&&s(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,m=h.source.substring(1);break;case"error":s(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{let w=`Unexpected token in block scalar header: ${h.type}`;s(h,"UNEXPECTED_TOKEN",w);let d=h.source;d&&typeof d=="string"&&(f+=d.length)}}}return{mode:i,indent:o,chomp:a,comment:m,length:f}}function Tg(e){let t=e.split(/\n( *)/),n=t[0],s=n.match(/^( *)/),i=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let o=1;o<t.length;o+=2)i.push([t[o],t[o+1]]);return i}vc.resolveBlockScalar=Ng});var Hr=v(kc=>{"use strict";var Wr=M(),Ig=We();function Lg(e,t,n){let{offset:s,type:r,source:i,end:o}=e,a,l,c=(p,h,w)=>n(s+p,h,w);switch(r){case"scalar":a=Wr.Scalar.PLAIN,l=Og(i,c);break;case"single-quoted-scalar":a=Wr.Scalar.QUOTE_SINGLE,l=qg(i,c);break;case"double-quoted-scalar":a=Wr.Scalar.QUOTE_DOUBLE,l=_g(i,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[s,s+i.length,s+i.length]}}let m=s+i.length,f=Ig.resolveEnd(o,m,t,n);return{value:l,type:a,comment:f.comment,range:[s,m,f.offset]}}function Og(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Sc(e)}function qg(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Sc(e.slice(1,-1)).replace(/''/g,"'")}function Sc(e){let t=/(.*?)\r?\n/sy,n=t.exec(e);if(!n)return e;let s,r;try{s=new RegExp("(?<![ ])[ ]+$"),r=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{s=/[ \t]+$/,r=/^[ \t]+|[ \t]+$/g}let i=n[1].replace(s,""),o=" ",a=t.lastIndex;for(;n=t.exec(e);){let c=n[1].replace(r,"");c===""?o===`
87
+ `?i+=o:o=`
88
+ `:(i+=o+c,o=" "),a=t.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,n=l.exec(e),i+o+(n?.[1]??"")}function _g(e,t){let n="";for(let s=1;s<e.length-1;++s){let r=e[s];if(!(r==="\r"&&e[s+1]===`
89
+ `))if(r===`
90
+ `){let{fold:i,offset:o}=Rg(e,s);n+=i,s=o}else if(r==="\\"){let i=e[++s],o=Dg[i];if(o)n+=o;else if(i===`
91
+ `)for(i=e[s+1];i===" "||i===" ";)i=e[++s+1];else if(i==="\r"&&e[s+1]===`
92
+ `)for(i=e[++s+1];i===" "||i===" ";)i=e[++s+1];else if(i==="x"||i==="u"||i==="U"){let a=i==="x"?2:i==="u"?4:8;n+=xg(e,s+1,a,t),s+=a}else{let a=e.substr(s-1,2);t(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(r===" "||r===" "){let i=s,o=e[s+1];for(;o===" "||o===" ";)o=e[++s+1];o!==`
93
+ `&&!(o==="\r"&&e[s+2]===`
94
+ `)&&(n+=s>i?e.slice(i,s+1):r)}else n+=r}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function Rg(e,t){let n="",s=e[t+1];for(;(s===" "||s===" "||s===`
95
+ `||s==="\r")&&!(s==="\r"&&e[t+2]!==`
96
+ `);)s===`
97
+ `&&(n+=`
98
+ `),t+=1,s=e[t+1];return n||(n=" "),{fold:n,offset:t}}var Dg={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function xg(e,t,n,s){let r=e.substr(t,n),o=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(o)}catch{let a=e.substr(t-2,n+2);return s(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}kc.resolveFlowScalar=Lg});var Ac=v($c=>{"use strict";var Ie=I(),Ec=M(),jg=Yr(),Mg=Hr();function Bg(e,t,n,s){let{value:r,type:i,comment:o,range:a}=t.type==="block-scalar"?jg.resolveBlockScalar(e,t,s):Mg.resolveFlowScalar(t,e.options.strict,s),l=n?e.directives.tagName(n.source,f=>s(n,"TAG_RESOLVE_FAILED",f)):null,c;e.options.stringKeys&&e.atKey?c=e.schema[Ie.SCALAR]:l?c=Ug(e.schema,r,l,n,s):t.type==="scalar"?c=Fg(e,r,t,s):c=e.schema[Ie.SCALAR];let m;try{let f=c.resolve(r,p=>s(n??t,"TAG_RESOLVE_FAILED",p),e.options);m=Ie.isScalar(f)?f:new Ec.Scalar(f)}catch(f){let p=f instanceof Error?f.message:String(f);s(n??t,"TAG_RESOLVE_FAILED",p),m=new Ec.Scalar(r)}return m.range=a,m.source=r,i&&(m.type=i),l&&(m.tag=l),c.format&&(m.format=c.format),o&&(m.comment=o),m}function Ug(e,t,n,s,r){if(n==="!")return e[Ie.SCALAR];let i=[];for(let a of e.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)i.push(a);else return a;for(let a of i)if(a.test?.test(t))return a;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Ie.SCALAR])}function Fg({atKey:e,directives:t,schema:n},s,r,i){let o=n.tags.find(a=>(a.default===!0||e&&a.default==="key")&&a.test?.test(s))||n[Ie.SCALAR];if(n.compat){let a=n.compat.find(l=>l.default&&l.test?.test(s))??n[Ie.SCALAR];if(o.tag!==a.tag){let l=t.tagString(o.tag),c=t.tagString(a.tag),m=`Value may be parsed as either ${l} or ${c}`;i(r,"TAG_RESOLVE_FAILED",m,!0)}}return o}$c.composeScalar=Bg});var Nc=v(Pc=>{"use strict";function Kg(e,t,n){if(t){n??(n=t.length);for(let s=n-1;s>=0;--s){let r=t[s];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++s];r?.type==="space";)e+=r.source.length,r=t[++s];break}}return e}Pc.emptyScalarPosition=Kg});var Ic=v(Xr=>{"use strict";var Gg=ct(),Vg=I(),Jg=bc(),Cc=Ac(),Yg=We(),Wg=Nc(),Hg={composeNode:Tc,composeEmptyNode:Qr};function Tc(e,t,n,s){let r=e.atKey,{spaceBefore:i,comment:o,anchor:a,tag:l}=n,c,m=!0;switch(t.type){case"alias":c=Qg(e,t,s),(a||l)&&s(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Cc.composeScalar(e,t,l,s),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Jg.composeCollection(Hg,e,t,n,s),a&&(c.anchor=a.source.substring(1))}catch(f){let p=f instanceof Error?f.message:String(f);s(t,"RESOURCE_EXHAUSTION",p)}break;default:{let f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;s(t,"UNEXPECTED_TOKEN",f),m=!1}}return c??(c=Qr(e,t.offset,void 0,null,n,s)),a&&c.anchor===""&&s(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&e.options.stringKeys&&(!Vg.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),o&&(t.type==="scalar"&&t.source===""?c.comment=o:c.commentBefore=o),e.options.keepSourceTokens&&m&&(c.srcToken=t),c}function Qr(e,t,n,s,{spaceBefore:r,comment:i,anchor:o,tag:a,end:l},c){let m={type:"scalar",offset:Wg.emptyScalarPosition(t,n,s),indent:-1,source:""},f=Cc.composeScalar(e,m,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=l),f}function Qg({options:e},{offset:t,source:n,end:s},r){let i=new Gg.Alias(n.substring(1));i.source===""&&r(t,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&r(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=t+n.length,a=Yg.resolveEnd(s,o,e.strict,r);return i.range=[t,o,a.offset],a.comment&&(i.comment=a.comment),i}Xr.composeEmptyNode=Qr;Xr.composeNode=Tc});var qc=v(Oc=>{"use strict";var Xg=At(),Lc=Ic(),zg=We(),Zg=Tt();function ey(e,t,{offset:n,start:s,value:r,end:i},o){let a=Object.assign({_directives:t},e),l=new Xg.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},m=Zg.resolveProps(s,{indicator:"doc-start",next:r??i?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});m.found&&(l.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!m.hasNewline&&o(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=r?Lc.composeNode(c,r,m,o):Lc.composeEmptyNode(c,m.end,s,null,m,o);let f=l.contents.range[2],p=zg.resolveEnd(i,f,!1,o);return p.comment&&(l.comment=p.comment),l.range=[n,f,p.offset],l}Oc.composeDoc=ey});var Zr=v(Dc=>{"use strict";var ty=Ut("process"),ny=js(),sy=At(),It=Ct(),_c=I(),ry=qc(),iy=We();function Lt(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function Rc(e){let t="",n=!1,s=!1;for(let r=0;r<e.length;++r){let i=e[r];switch(i[0]){case"#":t+=(t===""?"":s?`
100
+
101
+ `:`
102
+ `)+(i.substring(1)||" "),n=!0,s=!1;break;case"%":e[r+1]?.[0]!=="#"&&(r+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:t,afterEmptyLine:s}}var zr=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,s,r,i)=>{let o=Lt(n);i?this.warnings.push(new It.YAMLWarning(o,s,r)):this.errors.push(new It.YAMLParseError(o,s,r))},this.directives=new ny.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,n){let{comment:s,afterEmptyLine:r}=Rc(this.prelude);if(s){let i=t.contents;if(n)t.comment=t.comment?`${t.comment}
103
+ ${s}`:s;else if(r||t.directives.docStart||!i)t.commentBefore=s;else if(_c.isCollection(i)&&!i.flow&&i.items.length>0){let o=i.items[0];_c.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${s}
104
+ ${a}`:s}else{let o=i.commentBefore;i.commentBefore=o?`${s}
105
+ ${o}`:s}}if(n){for(let i=0;i<this.errors.length;++i)t.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)t.warnings.push(this.warnings[i])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Rc(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,s=-1){for(let r of t)yield*this.next(r);yield*this.end(n,s)}*next(t){switch(ty.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(n,s,r)=>{let i=Lt(t);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",s,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let n=ry.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,s=new It.YAMLParseError(Lt(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){let s="Unexpected doc-end without preceding document";this.errors.push(new It.YAMLParseError(Lt(t),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;let n=iy.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let s=this.doc.comment;this.doc.comment=s?`${s}
106
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new It.YAMLParseError(Lt(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let s=Object.assign({_directives:this.directives},this.options),r=new sy.Document(void 0,s);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,!1),yield r}}};Dc.Composer=zr});var Mc=v(es=>{"use strict";var oy=Yr(),ay=Hr(),ly=Ct(),xc=dt();function cy(e,t=!0,n){if(e){let s=(r,i,o)=>{let a=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(n)n(a,i,o);else throw new ly.YAMLParseError([a,a+1],i,o)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ay.resolveFlowScalar(e,t,s);case"block-scalar":return oy.resolveBlockScalar({options:{strict:t}},e,s)}}return null}function uy(e,t){let{implicitKey:n=!1,indent:s,inFlow:r=!1,offset:i=-1,type:o="PLAIN"}=t,a=xc.stringifyString({type:o,value:e},{implicitKey:n,indent:s>0?" ".repeat(s):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:s,source:`
107
+ `}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
108
+ `),m=a.substring(0,c),f=a.substring(c+1)+`
109
+ `,p=[{type:"block-scalar-header",offset:i,indent:s,source:m}];return jc(p,l)||p.push({type:"newline",offset:-1,indent:s,source:`
110
+ `}),{type:"block-scalar",offset:i,indent:s,props:p,source:f}}case'"':return{type:"double-quoted-scalar",offset:i,indent:s,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:i,indent:s,source:a,end:l};default:return{type:"scalar",offset:i,indent:s,source:a,end:l}}}function fy(e,t,n={}){let{afterKey:s=!1,implicitKey:r=!1,inFlow:i=!1,type:o}=n,a="indent"in e?e.indent:null;if(s&&typeof a=="number"&&(a+=2),!o)switch(e.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=xc.stringifyString({type:o,value:t},{implicitKey:r||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":py(e,l);break;case'"':ei(e,l,"double-quoted-scalar");break;case"'":ei(e,l,"single-quoted-scalar");break;default:ei(e,l,"scalar")}}function py(e,t){let n=t.indexOf(`
111
+ `),s=t.substring(0,n),r=t.substring(n+1)+`
112
+ `;if(e.type==="block-scalar"){let i=e.props[0];if(i.type!=="block-scalar-header")throw new Error("Invalid block scalar header");i.source=s,e.source=r}else{let{offset:i}=e,o="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:i,indent:o,source:s}];jc(a,"end"in e?e.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
113
+ `});for(let l of Object.keys(e))l!=="type"&&l!=="offset"&&delete e[l];Object.assign(e,{type:"block-scalar",indent:o,props:a,source:r})}}function jc(e,t){if(t)for(let n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function ei(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{let s=e.props.slice(1),r=t.length;e.props[0].type==="block-scalar-header"&&(r-=e.props[0].source.length);for(let i of s)i.offset+=r;delete e.props,Object.assign(e,{type:n,source:t,end:s});break}case"block-map":case"block-seq":{let r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
114
+ `};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{let s="indent"in e?e.indent:-1,r="end"in e&&Array.isArray(e.end)?e.end.filter(i=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(e))i!=="type"&&i!=="offset"&&delete e[i];Object.assign(e,{type:n,indent:s,source:t,end:r})}}}es.createScalarToken=uy;es.resolveAsScalar=cy;es.setScalarValue=fy});var Uc=v(Bc=>{"use strict";var my=e=>"type"in e?ns(e):ts(e);function ns(e){switch(e.type){case"block-scalar":{let t="";for(let n of e.props)t+=ns(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(let n of e.items)t+=ts(n);return t}case"flow-collection":{let t=e.start.source;for(let n of e.items)t+=ts(n);for(let n of e.end)t+=n.source;return t}case"document":{let t=ts(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function ts({start:e,key:t,sep:n,value:s}){let r="";for(let i of e)r+=i.source;if(t&&(r+=ns(t)),n)for(let i of n)r+=i.source;return s&&(r+=ns(s)),r}Bc.stringify=my});var Vc=v(Gc=>{"use strict";var ti=Symbol("break visit"),dy=Symbol("skip children"),Fc=Symbol("remove item");function Le(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),Kc(Object.freeze([]),e,t)}Le.BREAK=ti;Le.SKIP=dy;Le.REMOVE=Fc;Le.itemAtPath=(e,t)=>{let n=e;for(let[s,r]of t){let i=n?.[s];if(i&&"items"in i)n=i.items[r];else return}return n};Le.parentCollection=(e,t)=>{let n=Le.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],r=n?.[s];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function Kc(e,t,n){let s=n(t,e);if(typeof s=="symbol")return s;for(let r of["key","value"]){let i=t[r];if(i&&"items"in i){for(let o=0;o<i.items.length;++o){let a=Kc(Object.freeze(e.concat([[r,o]])),i.items[o],n);if(typeof a=="number")o=a-1;else{if(a===ti)return ti;a===Fc&&(i.items.splice(o,1),o-=1)}}typeof s=="function"&&r==="key"&&(s=s(t,e))}}return typeof s=="function"?s(t,e):s}Gc.visit=Le});var ss=v(W=>{"use strict";var ni=Mc(),hy=Uc(),gy=Vc(),si="\uFEFF",ri="",ii="",oi="",yy=e=>!!e&&"items"in e,wy=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function by(e){switch(e){case si:return"<BOM>";case ri:return"<DOC>";case ii:return"<FLOW_END>";case oi:return"<SCALAR>";default:return JSON.stringify(e)}}function vy(e){switch(e){case si:return"byte-order-mark";case ri:return"doc-mode";case ii:return"flow-error-end";case oi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
115
+ `:case`\r
116
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}W.createScalarToken=ni.createScalarToken;W.resolveAsScalar=ni.resolveAsScalar;W.setScalarValue=ni.setScalarValue;W.stringify=hy.stringify;W.visit=gy.visit;W.BOM=si;W.DOCUMENT=ri;W.FLOW_END=ii;W.SCALAR=oi;W.isCollection=yy;W.isScalar=wy;W.prettyToken=by;W.tokenType=vy});var ci=v(Yc=>{"use strict";var Ot=ss();function z(e){switch(e){case void 0:case" ":case`
117
+ `:case"\r":case" ":return!0;default:return!1}}var Jc=new Set("0123456789ABCDEFabcdef"),Sy=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),rs=new Set(",[]{}"),ky=new Set(` ,[]{}
118
+ \r `),ai=e=>!e||ky.has(e),li=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let s=this.next??"stream";for(;s&&(n||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
119
+ `?!0:n==="\r"?this.buffer[t+1]===`
120
+ `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let s=0;for(;n===" ";)n=this.buffer[++s+t];if(n==="\r"){let r=this.buffer[s+t+1];if(r===`
121
+ `||!r&&!this.atEnd)return t+s+1}return n===`
122
+ `||s>=this.indentNext||!n&&!this.atEnd?t+s:-1}if(n==="-"||n==="."){let s=this.buffer.substr(t,3);if((s==="---"||s==="...")&&z(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
123
+ `,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Ot.BOM&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,s=t.indexOf("#");for(;s!==-1;){let i=t[s-1];if(i===" "||i===" "){n=s-1;break}else s=t.indexOf("#",s+1)}for(;;){let i=t[n-1];if(i===" "||i===" ")n-=1;else break}let r=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Ot.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&z(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!z(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&z(n)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ai),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,s=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=s=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&r[0]!=="#"||s===0&&(r.startsWith("---")||r.startsWith("..."))&&z(r[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Ot.FLOW_END,yield*this.parseLineStart();let i=0;for(;r[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(ai),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||z(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let t=this.charAt(0),n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}let s=this.buffer.substring(0,n),r=s.indexOf(`
124
+ `,this.pos);if(r!==-1){for(;r!==-1;){let i=this.continueScalar(r+1);if(i===-1)break;r=s.indexOf(`
125
+ `,i)}r!==-1&&(n=r-(s[r-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){let n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>z(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,s;e:for(let i=this.pos;s=this.buffer[i];++i)switch(s){case" ":n+=1;break;case`
126
+ `:t=i,n=0;break;case"\r":{let o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
127
+ `)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(t+1);if(i===-1)break;t=this.buffer.indexOf(`
128
+ `,i)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let r=t+1;for(s=this.buffer[r];s===" ";)s=this.buffer[++r];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
129
+ `;)s=this.buffer[++r];t=r-1}else if(!this.blockScalarKeep)do{let i=t-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);let a=i;for(;o===" ";)o=this.buffer[--i];if(o===`
130
+ `&&i>=this.pos&&i+1+n>a)t=i;else break}while(!0);return yield Ot.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,n=this.pos-1,s=this.pos-1,r;for(;r=this.buffer[++s];)if(r===":"){let i=this.buffer[s+1];if(z(i)||t&&rs.has(i))break;n=s}else if(z(r)){let i=this.buffer[s+1];if(r==="\r"&&(i===`
131
+ `?(s+=1,r=`
132
+ `,i=this.buffer[s+1]):n=s),i==="#"||t&&rs.has(i))break;if(r===`
133
+ `){let o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(t&&rs.has(r))break;n=s}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield Ot.SCALAR,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){let s=this.buffer.slice(this.pos,t);return s?(yield s,this.pos+=s.length,s.length):(n&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(ai),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,s=this.charAt(1);if(z(s)||n&&rs.has(s)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!z(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(Sy.has(n))n=this.buffer[++t];else if(n==="%"&&Jc.has(this.buffer[t+1])&&Jc.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===`
134
+ `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
135
+ `?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,s;do s=this.buffer[++n];while(s===" "||t&&s===" ");let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(t){let n=this.pos,s=this.buffer[n];for(;!t(s);)s=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};Yc.Lexer=li});var fi=v(Wc=>{"use strict";var ui=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,s=this.lineStarts.length;for(;n<s;){let i=n+s>>1;this.lineStarts[i]<t?n=i+1:s=i}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};let r=this.lineStarts[n-1];return{line:n,col:t-r+1}}}};Wc.LineCounter=ui});var mi=v(Zc=>{"use strict";var Ey=Ut("process"),Hc=ss(),$y=ci();function ke(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Qc(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function zc(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function is(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function He(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function os(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function Xc(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!ke(t.start,"explicit-key-ind")&&!ke(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,zc(t.value)?t.value.end?os(t.value.end,t.sep):t.value.end=t.sep:os(t.start,t.sep),delete t.sep)}var pi=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new $y.Lexer,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let s of this.lexer.lex(t,n))yield*this.next(s);n||(yield*this.end())}*next(t){if(this.source=t,Ey.env.LOG_TOKENS&&console.log("|",Hc.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let n=Hc.tokenType(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let s=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let t=this.peek(1);if(this.type==="doc-end"&&t?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let s=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in s?s.indent:0:n.type==="flow-collection"&&s.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Xc(n),s.type){case"document":s.value=n;break;case"block-scalar":s.props.push(n);break;case"block-map":{let r=s.items[s.items.length-1];if(r.value){s.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=s.items[s.items.length-1];r.value?s.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{let r=s.items[s.items.length-1];!r||r.value?s.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&Qc(r.start)===-1&&(n.indent===0||r.start.every(i=>i.type!=="comment"||i.indent<n.indent))&&(s.type==="document"?s.end=r.start:s.items.push({start:r.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{Qc(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}let n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){let n=is(this.peek(2)),s=He(n),r;t.end?(r=t.end,r.push(this.sourceToken),delete t.end):r=[this.sourceToken];let i={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:s,key:t,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
136
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
137
+ `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){let r=t.items[t.items.length-2]?.value?.end;if(Array.isArray(r)){os(r,n.start),r.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let s=!this.onKeyLine&&this.indent===t.indent,r=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(r&&n.sep&&!n.value){let o=[];for(let a=0;a<n.sep.length;++a){let l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>t.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(i=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||n.value?(i.push(this.sourceToken),t.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):r||n.value?(i.push(this.sourceToken),t.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ke(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(zc(n.key)&&!ke(n.sep,"newline")){let o=He(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(ke(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let o=He(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||r?t.items.push({start:i,key:null,sep:[this.sourceToken]}):ke(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);r||n.value?(t.items.push({start:i,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(t);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!ke(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&t.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){let s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){let r=t.items[t.items.length-2]?.value?.end;if(Array.isArray(r)){os(r,n.start),r.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||ke(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){let s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:r,sep:[]}):n.sep?this.stack.push(r):Object.assign(n,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let s=this.startBlockValue(t);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{let s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===t.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){let r=is(s),i=He(r);Xc(t);let o=t.end.splice(1,t.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
138
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
139
+ `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=is(t),s=He(n);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=is(t),s=He(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Zc.Parser=pi});var ru=v(_t=>{"use strict";var eu=Zr(),Ay=At(),qt=Ct(),Py=Xs(),Ny=I(),Cy=fi(),tu=mi();function nu(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Cy.LineCounter||null,prettyErrors:t}}function Ty(e,t={}){let{lineCounter:n,prettyErrors:s}=nu(t),r=new tu.Parser(n?.addNewLine),i=new eu.Composer(t),o=Array.from(i.compose(r.parse(e)));if(s&&n)for(let a of o)a.errors.forEach(qt.prettifyError(e,n)),a.warnings.forEach(qt.prettifyError(e,n));return o.length>0?o:Object.assign([],{empty:!0},i.streamInfo())}function su(e,t={}){let{lineCounter:n,prettyErrors:s}=nu(t),r=new tu.Parser(n?.addNewLine),i=new eu.Composer(t),o=null;for(let a of i.compose(r.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new qt.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&n&&(o.errors.forEach(qt.prettifyError(e,n)),o.warnings.forEach(qt.prettifyError(e,n))),o}function Iy(e,t,n){let s;typeof t=="function"?s=t:n===void 0&&t&&typeof t=="object"&&(n=t);let r=su(e,n);if(!r)return null;if(r.warnings.forEach(i=>Py.warn(r.options.logLevel,i)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:s},n))}function Ly(e,t,n){let s=null;if(typeof t=="function"||Array.isArray(t)?s=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let r=Math.round(n);n=r<1?void 0:r>8?{indent:8}:{indent:r}}if(e===void 0){let{keepUndefined:r}=n??t??{};if(!r)return}return Ny.isDocument(e)&&!s?e.toString(n):new Ay.Document(e,s,n).toString(n)}_t.parse=Iy;_t.parseAllDocuments=Ty;_t.parseDocument=su;_t.stringify=Ly});var ou=v(O=>{"use strict";var Oy=Zr(),qy=At(),_y=qr(),di=Ct(),Ry=ct(),Ee=I(),Dy=we(),xy=M(),jy=ve(),My=Se(),By=ss(),Uy=ci(),Fy=fi(),Ky=mi(),as=ru(),iu=it();O.Composer=Oy.Composer;O.Document=qy.Document;O.Schema=_y.Schema;O.YAMLError=di.YAMLError;O.YAMLParseError=di.YAMLParseError;O.YAMLWarning=di.YAMLWarning;O.Alias=Ry.Alias;O.isAlias=Ee.isAlias;O.isCollection=Ee.isCollection;O.isDocument=Ee.isDocument;O.isMap=Ee.isMap;O.isNode=Ee.isNode;O.isPair=Ee.isPair;O.isScalar=Ee.isScalar;O.isSeq=Ee.isSeq;O.Pair=Dy.Pair;O.Scalar=xy.Scalar;O.YAMLMap=jy.YAMLMap;O.YAMLSeq=My.YAMLSeq;O.CST=By;O.Lexer=Uy.Lexer;O.LineCounter=Fy.LineCounter;O.Parser=Ky.Parser;O.parse=as.parse;O.parseAllDocuments=as.parseAllDocuments;O.parseDocument=as.parseDocument;O.stringify=as.stringify;O.visit=iu.visit;O.visitAsync=iu.visitAsync});import ob from"node:os";var u=class extends Error{constructor(n,s){super(n);this.hint=s;this.name="CliError"}hint},qe=new u("\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A","\u0E23\u0E31\u0E19 `pple auth login` \u0E01\u0E48\u0E2D\u0E19"),ue=new u("\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E41\u0E25\u0E49\u0E27","\u0E23\u0E31\u0E19 `pple auth login` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");var C={long:"--app",value:"<slug>",text:"\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 (\u0E16\u0E49\u0E32\u0E44\u0E21\u0E48\u0E23\u0E30\u0E1A\u0E38 \u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49)"},R={long:"--json",text:"\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25\u0E40\u0E1B\u0E47\u0E19 JSON (\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A agent/\u0E2A\u0E04\u0E23\u0E34\u0E1B\u0E15\u0E4C)"};function Ai(e,t){let n=e.options??[],s=new Set,r=new Map,i=[];for(let a=0;a<t.length;a++){let l=t[a];if(l==="--"){i.push(...t.slice(a+1));break}if(!l.startsWith("-")||l==="-"){i.push(l);continue}let c=l.startsWith("--")?l.indexOf("="):-1,m=c===-1?l:l.slice(0,c),f=n.find(h=>h.long===m||h.short===m);if(!f)throw new u(`\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01 \`${m}\``,`\u0E23\u0E31\u0E19 \`pple ${e.path.join(" ")} help\` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14 (\u0E16\u0E49\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 - \u0E43\u0E2B\u0E49\u0E27\u0E32\u0E07 \`--\` \u0E44\u0E27\u0E49\u0E02\u0E49\u0E32\u0E07\u0E2B\u0E19\u0E49\u0E32)`);if(f.value===void 0){if(c!==-1)throw new u(`\`${f.long}\` \u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E04\u0E48\u0E32`);s.add(f.long);continue}let p=c!==-1?l.slice(c+1):t[++a];if(p===void 0||c===-1&&p.startsWith("-"))throw new u(`\`${f.long}\` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E04\u0E48\u0E32\u0E15\u0E32\u0E21\u0E2B\u0E25\u0E31\u0E07`);r.set(f.long,p)}let o=e.maxArgs??0;if(i.length>o)throw new u(`\`pple ${e.path.join(" ")}\` \u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01 "${i[o]}"`,`\u0E23\u0E31\u0E19 \`pple ${e.path.join(" ")} help\` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49`);return{positionals:i,flag:a=>s.has(a),value:a=>r.get(a)}}import{randomBytes as If}from"node:crypto";import G from"node:fs/promises";import q from"node:path";import Ft from"node:fs/promises";import _e from"node:path";var fe=".pple",fs="app.json",ps="\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E41\u0E2D\u0E1B PPLE";async function Pi(e){let t=await Ft.readFile(_e.join(e,fe,fs),"utf8").catch(()=>null);return t===null?null:Ci(t)}async function Ni(e,t){await Ft.mkdir(_e.join(e,fe),{recursive:!0}),await Ft.writeFile(_e.join(e,fe,fs),`${JSON.stringify(t,null,2)}
140
+ `)}async function Kt(e){let t=await $e(e);if(t)return t;throw new u(ps,"\u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E31\u0E19 `pple init <app>` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48")}async function $e(e){let t=_e.resolve(e.cwd);for(;;){let n=_e.join(t,fe,fs),s=await Ft.readFile(n,"utf8").catch(()=>null);if(s!==null){let i=Ci(s);if(i)return{...i,dir:t};throw new u("\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E42\u0E22\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E01\u0E31\u0E1A\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E2A\u0E35\u0E22\u0E2B\u0E32\u0E22","\u0E23\u0E31\u0E19 `pple init <app>` \u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E43\u0E2B\u0E21\u0E48\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")}let r=_e.dirname(t);if(r===t)break;t=r}return null}function Ci(e){try{let t=JSON.parse(e);return typeof t.slug!="string"||t.slug===""?null:{slug:t.slug,apiBase:typeof t.apiBase=="string"?t.apiBase:"",url:typeof t.url=="string"?t.url:""}}catch{return null}}import{randomBytes as hs}from"node:crypto";import D from"node:fs/promises";import x from"node:path";import ze from"node:fs/promises";import rf from"node:path";var of="credentials.json",Ti=384,af=448;function Gt(e){return rf.join(e.configDir,of)}async function Vt(e){let t=await ze.readFile(Gt(e),"utf8").catch(()=>null);if(t===null)return null;let n;try{n=JSON.parse(t)}catch{return null}return typeof n.accessToken!="string"||n.ssoBase!==e.config.ssoBase?null:{accessToken:n.accessToken,refreshToken:typeof n.refreshToken=="string"?n.refreshToken:null,expiresAt:typeof n.expiresAt=="number"?n.expiresAt:null,ssoBase:n.ssoBase}}async function Jt(e,t){await ze.mkdir(e.configDir,{recursive:!0,mode:af}),await ze.writeFile(Gt(e),`${JSON.stringify(t,null,2)}
141
+ `,{mode:Ti}),await ze.chmod(Gt(e),Ti)}async function Ii(e){try{return await ze.unlink(Gt(e)),!0}catch{return!1}}var lf="/oauth/v2/device_authorization",Oi="/oauth/v2/token",cf="urn:ietf:params:oauth:grant-type:device_code",qi="openid profile offline_access";function ds(e){return{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(e).toString()}}function ms(e){return new u(`\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D PPLE ID (${e}) \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E2D\u0E34\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E40\u0E19\u0E47\u0E15\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07 `pple auth login` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")}async function _i(e){let{ssoBase:t,clientId:n}=e.config,s=await e.fetch(`${t}${lf}`,ds({client_id:n,scope:qi})).catch(()=>null);if(!s||!s.ok)throw ms(t);let r=await s.json().catch(()=>({}));if(!r.device_code||!r.user_code||!r.verification_uri)throw ms(t);return{deviceCode:r.device_code,userCode:r.user_code,verificationUri:r.verification_uri,verificationUriComplete:r.verification_uri_complete??null,expiresInMs:(r.expires_in??600)*1e3,intervalMs:(r.interval??5)*1e3}}async function Ri(e,t){let{ssoBase:n,clientId:s}=e.config,r=e.now()+t.expiresInMs,i=t.intervalMs;for(;e.now()<r;){await e.sleep(i);let o=await e.fetch(`${n}${Oi}`,ds({client_id:s,grant_type:cf,device_code:t.deviceCode})).catch(()=>null);if(!o)throw ms(n);let a=await o.json().catch(()=>({}));if(o.ok&&a.access_token)return xi(e,a);switch(a.error){case"authorization_pending":break;case"slow_down":i+=5e3;break;case"access_denied":throw new u("\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E16\u0E39\u0E01\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E43\u0E19\u0E40\u0E1A\u0E23\u0E32\u0E27\u0E4C\u0E40\u0E0B\u0E2D\u0E23\u0E4C","\u0E2B\u0E32\u0E01\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E04\u0E38\u0E13\u0E17\u0E35\u0E48\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18 \u0E43\u0E2B\u0E49\u0E23\u0E31\u0E19 `pple auth login` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");case"expired_token":throw Li();default:throw new u("PPLE ID \u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",a.error_description??"\u0E25\u0E2D\u0E07 `pple auth login` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")}}throw Li()}function Li(){return new u("\u0E23\u0E2B\u0E31\u0E2A\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E01\u0E48\u0E2D\u0E19\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34","\u0E23\u0E31\u0E19 `pple auth login` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u2014 \u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E43\u0E19\u0E40\u0E1A\u0E23\u0E32\u0E27\u0E4C\u0E40\u0E0B\u0E2D\u0E23\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E20\u0E32\u0E22\u0E43\u0E19\u0E44\u0E21\u0E48\u0E01\u0E35\u0E48\u0E19\u0E32\u0E17\u0E35")}async function Di(e,t){let{ssoBase:n,clientId:s}=e.config,r=await e.fetch(`${n}${Oi}`,ds({client_id:s,grant_type:"refresh_token",refresh_token:t,scope:qi})).catch(()=>null);if(!r||!r.ok)return null;let i=await r.json().catch(()=>({}));return i.access_token?{...xi(e,i),refreshToken:i.refresh_token??t}:null}function xi(e,t){return{accessToken:t.access_token,refreshToken:t.refresh_token??null,expiresAt:typeof t.expires_in=="number"?e.now()+t.expires_in*1e3:null}}var Ze=20,Re=class{constructor(t,n){this.deps=t;this.token=n}deps;token;me(){return this.request("GET","/me")}apps(){return this.request("GET","/apps").then(t=>t.apps)}app(t){return this.request("GET",`/apps/${encodeURIComponent(t)}`,{slug:t})}createApp(t){return this.request("POST","/apps",{body:{name:t}})}renameApp(t,n){return this.request("PATCH",`/apps/${encodeURIComponent(t)}`,{slug:t,body:{name:n}})}retireApp(t){return this.request("DELETE",`/apps/${encodeURIComponent(t)}`,{slug:t,body:{confirm:t}})}provision(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/provision`,{slug:t,answerOn:[502]})}acceptAgreement(){return this.request("POST","/agreement")}repoToken(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/repo-token`,{slug:t})}deploys(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/deploys`,{slug:t}).then(n=>n.deploys)}redeploy(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/deploys`,{slug:t}).then(()=>{})}env(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/env`,{slug:t}).then(n=>n.env)}metrics(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/metrics`,{slug:t})}collaborators(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/collaborators`,{slug:t}).then(n=>n.collaborators)}notes(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/notes`,{slug:t}).then(n=>n.notes)}cron(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/cron`,{slug:t})}registry(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/registry`,{slug:t})}sweepRegistry(t,n,s){return this.request("POST",`/apps/${encodeURIComponent(t)}/registry/${encodeURIComponent(n)}/sweep`,{slug:t,body:s===void 0?{}:{objectType:s}})}registryEntry(t,n,s){return this.request("GET",`/apps/${encodeURIComponent(t)}/registry/${encodeURIComponent(n)}/${encodeURIComponent(s)}`,{notFound:`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 ${n}/${s} \u0E43\u0E19\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49`})}registryOverlay(t,n){return this.request("GET",`/apps/${encodeURIComponent(t)}/registry/overlay`,{slug:t,signal:n,notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"})}registryOverlayEntry(t,n,s,r){return this.request("GET",`/apps/${encodeURIComponent(t)}/registry/overlay/${encodeURIComponent(n)}/${encodeURIComponent(s)}`,{slug:t,signal:r,notFound:`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E02\u0E2D\u0E07 ${n}/${s}`})}pauseCron(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/cron/pause`,{slug:t})}resumeCron(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/cron/resume`,{slug:t})}runCron(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/cron/run`,{slug:t,body:{expression:n}})}addNote(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/notes`,{slug:t,body:{body:n}})}lookupCollaborator(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/collaborators/lookup`,{slug:t,body:{phoneNumber:n},notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49"})}confirmCollaborator(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/collaborators`,{slug:t,body:{confirmationToken:n}})}removeCollaborator(t,n){return this.request("DELETE",`/apps/${encodeURIComponent(t)}/collaborators/${encodeURIComponent(n)}`,{slug:t,notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E04\u0E19\u0E19\u0E35\u0E49"})}requests(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/requests`,{slug:t}).then(n=>n.requests)}promoteToBeta(t){return this.request("POST",`/apps/${encodeURIComponent(t)}/tier`,{slug:t,body:{tier:"beta"}})}addInvite(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/invites`,{slug:t,body:{phoneNumber:n}})}removeInvite(t,n){return this.request("DELETE",`/apps/${encodeURIComponent(t)}/invites/${encodeURIComponent(n)}`,{slug:t,notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E02\u0E2D\u0E07\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49"})}roleOptions(){return this.request("GET","/role-options").then(t=>t.options)}guidanceHash(t){return this.request("GET","/guidance",{signal:t,notFound:"\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48 Skill \u0E41\u0E25\u0E30\u0E01\u0E0E"}).then(n=>n.hash)}guidanceVersion(t,n){return this.request("GET",`/guidance/${encodeURIComponent(t)}`,{signal:n,notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A Skill \u0E41\u0E25\u0E30\u0E01\u0E0E\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E19\u0E35\u0E49\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"})}uploadIcon(t){return this.request("POST","/icons",{raw:t})}fileRequest(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/requests`,{slug:t,body:n})}fileUseRequest(t,n,s){return this.request("POST",`/apps/${encodeURIComponent(t)}/requests`,{slug:t,body:{type:"use",entry:n,reason:s},notFound:`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 ${n} \u0E43\u0E19\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49`})}fileListingRequest(t,n){return this.request("POST",`/apps/${encodeURIComponent(t)}/requests`,{slug:t,body:{type:"listing",entry:n},notFound:`\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 ${n}`})}invites(t){return this.request("GET",`/apps/${encodeURIComponent(t)}/invites`,{slug:t}).then(n=>n.invites)}setEnv(t,n,s,r){return this.request("PUT",`/apps/${encodeURIComponent(t)}/env/${encodeURIComponent(n)}`,{slug:t,body:{value:s,secret:r}})}deleteEnv(t,n){return this.request("DELETE",`/apps/${encodeURIComponent(t)}/env/${encodeURIComponent(n)}`,{slug:t,envKey:n})}async request(t,n,s={}){let r=`${this.deps.config.apiBase}${n}`,i={authorization:`Bearer ${this.token}`},o;s.body!==void 0?(i["content-type"]="application/json",o=JSON.stringify(s.body)):s.raw!==void 0&&(i["content-type"]="application/octet-stream");let a=await this.deps.fetch(r,{method:t,headers:i,body:o??s.raw,signal:s.signal}).catch(()=>null);if(!a)throw new u("\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D PPLE Platform \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E2D\u0E34\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E40\u0E19\u0E47\u0E15\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");if(a.ok||s.answerOn?.includes(a.status))return a.status===204?void 0:await a.json();let l=await a.json().catch(()=>({}));throw uf(a.status,l.error,s,typeof l.detail=="string"?l.detail:void 0)}};function uf(e,t,n={},s){let{slug:r,envKey:i}=n;return e===401?ue:t==="not_org_member"?new u("PPLE ID \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E2D\u0E07\u0E04\u0E4C\u0E01\u0E23\u0E02\u0E2D\u0E07\u0E1E\u0E23\u0E23\u0E04 \u0E08\u0E36\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E2B\u0E31\u0E27\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C \u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"):t==="agreement_required"?new u("\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32","\u0E23\u0E31\u0E19 `pple agreement` \u0E43\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E40\u0E2D\u0E07 (\u0E2B\u0E23\u0E37\u0E2D\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E17\u0E35\u0E48 https://console.ppleth.ai) \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E19\u0E35\u0E49\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"):t==="app_has_no_repo"?new u(`${r?`"${r}"`:"\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"} \u0E22\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E40\u0E2A\u0E23\u0E47\u0E08`,"\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"):t==="sweep_rate_limited"?new u("\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E17\u0E33\u0E44\u0E14\u0E49\u0E17\u0E38\u0E01 5 \u0E19\u0E32\u0E17\u0E35","\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"):t==="sweep_running"?new u("\u0E21\u0E35\u0E01\u0E32\u0E23\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E04\u0E49\u0E32\u0E07\u0E2D\u0E22\u0E39\u0E48","\u0E23\u0E2D\u0E43\u0E2B\u0E49\u0E01\u0E32\u0E23\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E01\u0E33\u0E25\u0E31\u0E07\u0E17\u0E33\u0E2D\u0E22\u0E39\u0E48\u0E08\u0E1A\u0E01\u0E48\u0E2D\u0E19"):t==="app_retired"?new u(`${r?`"${r}"`:"\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"} \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27 \u0E08\u0E36\u0E07\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,'\u0E2B\u0E32\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E32\u0E19\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49\u0E15\u0E48\u0E2D \u0E43\u0E2B\u0E49\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48\u0E14\u0E49\u0E27\u0E22 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B"`'):t==="rename_requires_request"?new u("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E41\u0E25\u0E49\u0E27 \u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E40\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",'\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E14\u0E49\u0E27\u0E22 `pple request change --name "\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48"`'):t==="invalid_name"?new u("\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",s?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${s}`:void 0):t==="live_retire_needs_request"?new u("\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E2D\u0E22\u0E39\u0E48 \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E40\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E14\u0E49\u0E27\u0E22 `pple request retire`"):t==="confirm_slug_required"?new u("\u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22 slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B","\u0E23\u0E30\u0E1A\u0E38 `--confirm <slug>`"):t==="not_in_draft"?new u("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E1E\u0E49\u0E19\u0E08\u0E32\u0E01\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27","\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple info`"):t==="not_in_beta"?new u("\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E34\u0E0D\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49","\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E41\u0E2D\u0E1B\u0E02\u0E36\u0E49\u0E19\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E14\u0E49\u0E27\u0E22 `pple promote` \u0E01\u0E48\u0E2D\u0E19"):t==="invite_cap_reached"?new u("\u0E04\u0E38\u0E13\u0E40\u0E0A\u0E34\u0E0D\u0E04\u0E23\u0E1A\u0E40\u0E1E\u0E14\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 (20 \u0E04\u0E19)","\u0E19\u0E33\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E2D\u0E2D\u0E01\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 `pple invites remove <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>` \u0E41\u0E25\u0E49\u0E27\u0E40\u0E0A\u0E34\u0E0D\u0E04\u0E19\u0E43\u0E2B\u0E21\u0E48"):t==="invalid_note"?new u("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E19\u0E35\u0E49\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",s?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${s}`:"\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21 \u0E41\u0E25\u0E30\u0E22\u0E32\u0E27\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 2,000 \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23"):t==="invalid_confirmation"?new u("\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E41\u0E25\u0E49\u0E27","\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E14\u0E49\u0E27\u0E22 `pple collaborators add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>`"):t==="owner_cannot_be_collaborator"?new u("\u0E04\u0E38\u0E13\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27"):t==="invalid_phone_number"?new u("\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07","\u0E43\u0E0A\u0E49\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E40\u0E15\u0E47\u0E21 \u0E40\u0E0A\u0E48\u0E19 0812345678 \u0E2B\u0E23\u0E37\u0E2D +66812345678"):t==="publish_requires_beta"?new u("\u0E02\u0E2D\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E44\u0E14\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E2D\u0E22\u0E39\u0E48\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27","\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E41\u0E2D\u0E1B\u0E02\u0E36\u0E49\u0E19\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E14\u0E49\u0E27\u0E22 `pple promote` \u0E01\u0E48\u0E2D\u0E19"):t==="already_live"?new u("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E08\u0E30\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D \u0E44\u0E2D\u0E04\u0E2D\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19 \u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49 `pple request change`"):t==="change_requires_live"?new u("\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E41\u0E25\u0E49\u0E27","\u0E41\u0E2D\u0E1B\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E41\u0E25\u0E30\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E40\u0E2D\u0E07\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple rename`"):t==="retire_requires_live"?new u("\u0E04\u0E33\u0E02\u0E2D\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07","\u0E41\u0E2D\u0E1B\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E41\u0E25\u0E30\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E40\u0E2D\u0E07\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple retire`"):t==="request_already_pending"?new u("\u0E21\u0E35\u0E04\u0E33\u0E02\u0E2D\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E19\u0E35\u0E49\u0E23\u0E2D\u0E01\u0E32\u0E23\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E14\u0E49\u0E27\u0E22 `pple requests`"):t==="use_request_pending"?new u("\u0E21\u0E35\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E0A\u0E49\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E23\u0E2D\u0E01\u0E32\u0E23\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E14\u0E49\u0E27\u0E22 `pple requests`"):t==="owner_only"?new u("\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49"):t==="listing_owner_only"?new u("\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E44\u0E14\u0E49"):t==="provider_not_live"?new u("\u0E04\u0E33\u0E02\u0E2D\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E17\u0E33\u0E44\u0E14\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07 \u0E41\u0E25\u0E30\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E23\u0E49\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07","\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E41\u0E2D\u0E1B\u0E02\u0E36\u0E49\u0E19\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E04\u0E48\u0E2D\u0E22\u0E22\u0E37\u0E48\u0E19 `pple request listing`"):t==="entry_not_declared"?new u("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E14\u0E49\u0E27\u0E22 `pple registry`"):t==="already_listed"?new u("\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27"):t==="listing_request_pending"?new u("\u0E21\u0E35\u0E04\u0E33\u0E02\u0E2D\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E02\u0E2D\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E23\u0E2D\u0E01\u0E32\u0E23\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E2D\u0E22\u0E39\u0E48","\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E14\u0E49\u0E27\u0E22 `pple requests`"):t==="entry_delisted"?new u("\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E16\u0E39\u0E01\u0E16\u0E2D\u0E14\u0E08\u0E32\u0E01\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27 \u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E43\u0E2A\u0E48\u0E01\u0E25\u0E31\u0E1A"):t==="entry_is_public"?new u("\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E2B\u0E49\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B \u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E0A\u0E49"):t==="already_granted"?new u("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E21\u0E35\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27"):t==="own_entry"?new u("\u0E19\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49 \u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E43\u0E0A\u0E49"):t==="reason_required"?new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E2B\u0E15\u0E38\u0E1C\u0E25",'\u0E43\u0E0A\u0E49 `--reason "\u2026"`'):t==="invalid_visibility"?new u("\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07","\u0E40\u0E25\u0E37\u0E2D\u0E01 `--visibility everyone`, `roles` (\u0E1E\u0E23\u0E49\u0E2D\u0E21 `--roles`) \u0E2B\u0E23\u0E37\u0E2D `unlisted`"):t==="icon_required"||t==="invalid_icon"?new u(t==="icon_required"?"\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E41\u0E2D\u0E1B":"\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",s??"\u0E43\u0E0A\u0E49\u0E44\u0E1F\u0E25\u0E4C PNG, JPEG \u0E2B\u0E23\u0E37\u0E2D WebP \u0E02\u0E19\u0E32\u0E14\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 512 KB \u0E14\u0E49\u0E27\u0E22 `--icon <\u0E44\u0E1F\u0E25\u0E4C>`"):t==="invalid_custom_address"?new u("\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2D\u0E31\u0E07\u0E01\u0E24\u0E29\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E40\u0E25\u0E47\u0E01 \u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 \u0E41\u0E25\u0E30\u0E02\u0E35\u0E14\u0E01\u0E25\u0E32\u0E07",s?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${s}`:void 0):t==="custom_address_reserved"||t==="custom_address_taken"?new u(t==="custom_address_reserved"?"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E19\u0E35\u0E49\u0E16\u0E39\u0E01\u0E2A\u0E07\u0E27\u0E19\u0E44\u0E27\u0E49\u0E42\u0E14\u0E22\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21":"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E19\u0E35\u0E49\u0E21\u0E35\u0E41\u0E2D\u0E1B\u0E2D\u0E37\u0E48\u0E19\u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E37\u0E48\u0E19\u0E14\u0E49\u0E27\u0E22 `--address`"):t==="invalid_limit"||t==="empty_limit_request"?new u("\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 \u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21\u0E1A\u0E27\u0E01","\u0E43\u0E0A\u0E49 `--cpu-ms`, `--notifications`, `--cron-schedules` \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D `--cron-interval`"):t==="schedule_not_found"?new u("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E21\u0E35\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E19\u0E31\u0E49\u0E19","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49\u0E14\u0E49\u0E27\u0E22 `pple cron` \u2014 \u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2B\u0E23\u0E37\u0E2D\u0E41\u0E01\u0E49\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48 triggers.crons \u0E43\u0E19 wrangler.jsonc \u0E41\u0E25\u0E49\u0E27\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22"):t==="empty_change_request"?new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07","\u0E43\u0E0A\u0E49 `--name`, `--icon` \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D `--visibility`"):t==="role_options_unconfigured"||t==="role_options_unavailable"?new u("\u0E14\u0E36\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E08\u0E32\u0E01\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49","\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48 \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E41\u0E08\u0E49\u0E07\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"):t==="app_not_provisioned"?new u(`${r?`"${r}"`:"\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"} \u0E22\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E40\u0E2A\u0E23\u0E47\u0E08`,"\u0E14\u0E39\u0E2A\u0E32\u0E40\u0E2B\u0E15\u0E38\u0E14\u0E49\u0E27\u0E22 `pple info` \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"):t==="dispatch_failed"?new u("\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E23\u0E34\u0E48\u0E21\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E43\u0E2B\u0E21\u0E48\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",s?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${s}`:"\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48"):t==="invalid_key"?new u("\u0E04\u0E35\u0E22\u0E4C\u0E19\u0E35\u0E49\u0E43\u0E0A\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E04\u0E35\u0E22\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2B\u0E23\u0E37\u0E2D\u0E02\u0E35\u0E14\u0E25\u0E48\u0E32\u0E07 \u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23 \u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 \u0E2B\u0E23\u0E37\u0E2D\u0E02\u0E35\u0E14\u0E25\u0E48\u0E32\u0E07"):t==="reserved_key"?new u("\u0E04\u0E35\u0E22\u0E4C\u0E19\u0E35\u0E49\u0E16\u0E39\u0E01\u0E2A\u0E07\u0E27\u0E19\u0E44\u0E27\u0E49\u0E42\u0E14\u0E22\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21","\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E37\u0E48\u0E19 \u2014 APP_SLUG, DB, FILES, NOTIFY_* \u0E41\u0E25\u0E30 PPLE_DEPLOY_ID \u0E16\u0E39\u0E01\u0E43\u0E0A\u0E49\u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27"):t==="invalid_value"?new u("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E04\u0E48\u0E32\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08","\u0E2A\u0E48\u0E07\u0E04\u0E48\u0E32\u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19 argument \u0E1C\u0E48\u0E32\u0E19 `--file` \u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E32\u0E07 stdin"):e===404?n.notFound?new u(n.notFound):i?new u(`\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 "${i}" \u0E44\u0E27\u0E49`,"\u0E23\u0E31\u0E19 `pple env list` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49"):new u(r?`\u0E44\u0E21\u0E48\u0E21\u0E35\u0E41\u0E2D\u0E1B\u0E0A\u0E37\u0E48\u0E2D "${r}" \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13`:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E2A\u0E34\u0E48\u0E07\u0E19\u0E35\u0E49\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E14\u0E49\u0E27\u0E22 `pple apps`"):e>=500||t==="sso_unavailable"?new u("PPLE Platform \u0E01\u0E33\u0E25\u0E31\u0E07\u0E21\u0E35\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49","\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19\u0E2D\u0E35\u0E01 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E41\u0E08\u0E49\u0E07\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"):new u("PPLE Platform \u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E04\u0E33\u0E02\u0E2D\u0E19\u0E35\u0E49",t?`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A: ${t}`:void 0)}var ff=6e4;async function pf(e){let t=await Vt(e);if(!t)throw qe;if(!(t.expiresAt!==null&&t.expiresAt-e.now()<ff))return t.accessToken;if(t.refreshToken){let s=await Di(e,t.refreshToken);if(s)return await Jt(e,{...s,ssoBase:e.config.ssoBase}),s.accessToken}throw ue}async function E(e){return new Re(e,await pf(e))}var gs=[".pple/registry/",".pple/registry.json",".pple/registry-check.json"],ji=1e4,mf=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Mi=/^[0-9a-f]{64}$/,df="\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27",hf="\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27",gf="\u0E14\u0E36\u0E07\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u2014 \u0E43\u0E0A\u0E49\u0E09\u0E1A\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E15\u0E48\u0E2D\u0E44\u0E1B",F=class extends u{constructor(t){super(`\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E17\u0E35\u0E48\u0E14\u0E32\u0E27\u0E19\u0E4C\u0E42\u0E2B\u0E25\u0E14\u0E21\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${t}`)}};async function Bi(e,t){try{let n=await Pi(t);if(!n||n.apiBase!==""&&n.apiBase!==e.config.apiBase)return;let s=await E(e);await Tf(t);let r=bf(await s.registryOverlay(n.slug,AbortSignal.timeout(ji)));await yf(e,t,s,n.slug,r)}catch(n){if(n===qe||n===ue)return;e.out.notice(gf),e.out.notice(` (${n instanceof Error?n.message:String(n)})`)}}async function yf(e,t,n,s,r){let i=x.join(t,".pple","registry"),o=await Nf(t),a=o?.entries??{},l=await $f(i),c=new Map(r.map(y=>[re(y),y])),m=[];for(let y of r)a[re(y)]===y.hash&&await Ef(i,y)||m.push(y);let f=[],p=new Set;for(let y of l){let b=re(y);c.has(b)||p.has(b)||(p.add(b),f.push(y))}for(let y of Object.keys(a)){if(c.has(y)||p.has(y))continue;let b=Ui(y);b&&(p.add(y),f.push(b))}let h=wf(r),w=x.join(i,"INDEX.md"),d=await D.readFile(w,"utf8").catch(()=>null);if(o&&m.length===0&&f.length===0&&d===h)return;let g=[];for(let y of m){let b=await n.registryOverlayEntry(s,y.provider,y.name,AbortSignal.timeout(ji));g.push({entry:y,files:vf(b,y)})}for(let y of g)await Af(i,y.entry,y.files);for(let y of f)await Pf(i,y.provider,y.name);d!==h&&await Ki(w,h),await Cf(t,r),!(m.length===0&&f.length===0)&&e.out.notice(o===null?df:hf)}function re(e){return`${e.provider}/${e.name}`}function wf(e){let t=e.map(re).sort((s,r)=>s<r?-1:s>r?1:0);return`${["# Registry","","Docs and mocks for the Registry entries this app may read.","This folder lists entries only. Run `pple registry` for what the app may call.","",...t.length===0?["No entries."]:t.map(s=>`- ${s}`),""].join(`
142
+ `)}`}function bf(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new F("\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E44\u0E27\u0E49");let{entries:t}=e;if(!Array.isArray(t))throw new F("\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23");let n=new Set,s=[];for(let r of t){if(r===null||typeof r!="object"||Array.isArray(r))throw new F("\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E44\u0E21\u0E48\u0E04\u0E23\u0E1A");let i=r;if(typeof i.provider!="string"||typeof i.name!="string"||typeof i.hash!="string")throw new F("\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E44\u0E21\u0E48\u0E04\u0E23\u0E1A");if(!De(i.provider)||!De(i.name))throw new F(`\u0E0A\u0E37\u0E48\u0E2D "${i.provider}/${i.name}" \u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`);if(!Mi.test(i.hash))throw new F("\u0E23\u0E2B\u0E31\u0E2A\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07");let o=`${i.provider}/${i.name}`;if(n.has(o))throw new F(`\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 "${o}" \u0E0B\u0E49\u0E33\u0E01\u0E31\u0E19`);n.add(o),s.push({provider:i.provider,name:i.name,hash:i.hash})}return s}function vf(e,t){if(e===null||typeof e!="object"||Array.isArray(e))throw new F("\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E44\u0E27\u0E49");let n=e;if(n.provider!==t.provider||n.name!==t.name)throw new F("\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E02\u0E2D");if(n.hash!==t.hash)throw new F("\u0E23\u0E2B\u0E31\u0E2A\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23");if(!Array.isArray(n.files)||n.files.length===0)throw new F("\u0E44\u0E21\u0E48\u0E21\u0E35\u0E44\u0E1F\u0E25\u0E4C");let s=new Set,r=[];for(let i of n.files){if(i===null||typeof i!="object"||Array.isArray(i))throw new F("\u0E44\u0E1F\u0E25\u0E4C\u0E44\u0E21\u0E48\u0E04\u0E23\u0E1A");let o=i;if(typeof o.path!="string"||typeof o.content!="string")throw new F("\u0E44\u0E1F\u0E25\u0E4C\u0E44\u0E21\u0E48\u0E04\u0E23\u0E1A");if(!Sf(o.path))throw new F(`\u0E1E\u0E32\u0E18 "${o.path}" \u0E2D\u0E2D\u0E01\u0E19\u0E2D\u0E01\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`);if(s.has(o.path))throw new F(`\u0E1E\u0E32\u0E18 "${o.path}" \u0E0B\u0E49\u0E33\u0E01\u0E31\u0E19`);s.add(o.path),r.push({path:o.path,content:o.content})}if(!s.has("entry.md"))throw new F("\u0E44\u0E21\u0E48\u0E21\u0E35 entry.md");return r}function De(e){return e.length<=63&&mf.test(e)}function Ui(e){let t=e.indexOf("/");if(t<=0)return null;let n=e.slice(0,t),s=e.slice(t+1);return!De(n)||!De(s)||s.includes("/")?null:{provider:n,name:s}}function Sf(e){return e==="entry.md"?!0:e.startsWith("mocks/")?kf(e.slice(6)):!1}function kf(e){return e.includes("\0")||e.includes("\\")?!1:e.split("/").every(t=>t!==""&&t!=="."&&t!==".."&&!t.includes(":"))}async function Ef(e,t){let n=await D.lstat(x.join(e,t.provider,t.name,"entry.md")).catch(()=>null);return n!==null&&n.isFile()}async function $f(e){let t=[],n=await D.readdir(e,{withFileTypes:!0}).catch(()=>[]);for(let s of n){if(!s.isDirectory()||s.isSymbolicLink()||!De(s.name))continue;let r=await D.readdir(x.join(e,s.name),{withFileTypes:!0});for(let i of r)!i.isDirectory()||i.isSymbolicLink()||!De(i.name)||t.push({provider:s.name,name:i.name})}return t}async function Af(e,t,n){let s=x.join(e,t.provider,t.name);await D.mkdir(x.dirname(s),{recursive:!0});let r=x.join(x.dirname(e),`.pple-registry-${hs(4).toString("hex")}`),i=()=>D.rm(r,{recursive:!0,force:!0});try{await D.mkdir(r);for(let l of n){let c=x.join(r,...l.path.split("/"));if(x.relative(r,c).startsWith(".."))throw new F(`\u0E1E\u0E32\u0E18 "${l.path}" \u0E2D\u0E2D\u0E01\u0E19\u0E2D\u0E01\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`);await D.mkdir(x.dirname(c),{recursive:!0}),await D.writeFile(c,l.content)}}catch(l){throw await i(),l}let o=x.join(x.dirname(e),`.pple-old-${hs(4).toString("hex")}`),a=!1;try{a=await D.rename(s,o).then(()=>!0,l=>{if(l.code==="ENOENT")return!1;throw l}),await D.rename(r,s)}catch(l){throw a&&await D.rename(o,s).catch(()=>{}),await i(),l}a&&await D.rm(o,{recursive:!0,force:!0})}async function Pf(e,t,n){await D.rm(x.join(e,t,n),{recursive:!0,force:!0});let s=await D.readdir(x.join(e,t)).catch(()=>null);s&&s.length===0&&await D.rmdir(x.join(e,t)).catch(()=>{})}async function Nf(e){let t=await D.readFile(Fi(e),"utf8").catch(()=>null);if(t===null)return null;try{let n=JSON.parse(t);if(n===null||typeof n!="object"||Array.isArray(n))return null;let s=n.entries;if(s===null||typeof s!="object"||Array.isArray(s))return null;let r={};for(let[i,o]of Object.entries(s)){if(!Ui(i)||typeof o!="string"||!Mi.test(o))return null;r[i]=o}return{entries:r}}catch{return null}}async function Cf(e,t){let n={};for(let s of[...t].sort((r,i)=>re(r)<re(i)?-1:re(r)>re(i)?1:0))n[re(s)]=s.hash;await Ki(Fi(e),`${JSON.stringify({entries:n},null,2)}
143
+ `)}function Fi(e){return x.join(e,".pple","registry.json")}async function Ki(e,t){await D.mkdir(x.dirname(e),{recursive:!0});let n=x.join(x.dirname(e),`.pple-${x.basename(e)}.${hs(4).toString("hex")}.tmp`);try{await D.writeFile(n,t),await D.rename(n,e)}catch(s){throw await D.rm(n,{force:!0}),s}}async function Tf(e){let t=x.join(e,".gitignore"),n=await D.readFile(t,"utf8").catch(()=>""),s=new Set(n.split(`
144
+ `).map(o=>o.trim())),r=gs.filter(o=>!s.has(o));if(r.length===0)return;let i=n===""||n.endsWith(`
145
+ `)?n:`${n}
146
+ `;await D.writeFile(t,`${i}${r.join(`
147
+ `)}
148
+ `)}var Ht=[q.join(".claude","skills","pple-platform"),q.join(".agents","skills","pple-platform")],Gi=q.join(".claude","rules","pple-platform.md"),Vi=q.join(".cursor","rules","pple-platform.mdc"),Ji=q.join(".pple","rules.md"),ys=[Gi,Vi,Ji],bs=q.join(".pple","guidance.json"),Lf=[...Ht.map(e=>`${Wt(e)}/`),...ys.map(Wt),Wt(bs),...gs,...[...Ht,...ys].map(e=>`${Wt(q.dirname(e))}/.pple-*`)],Of="Before you start, read `.pple/rules.md` \u2014 the PPLE Platform Rules for this app. They win over anything else in the repo.\n",qf=["---","description: PPLE Platform Rules \u2014 always follow these in this app","alwaysApply: true","---","",""].join(`
149
+ `),Yi=1e4;async function Wi(e){let t=await $e(e).catch(()=>null);t&&(t.apiBase!==""&&t.apiBase!==e.config.apiBase||await vs(e,t.dir))}async function vs(e,t){try{let n=await E(e),s=await n.guidanceHash(AbortSignal.timeout(Yi)),r=await Bf(t),i=await Uf(t);if(await Ff(t),r!==s||!i){let o=Df(await _f(n,s));await jf(t,o,s),e.out.notice(r!==null&&i?"\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 Skill \u0E41\u0E25\u0E30\u0E01\u0E0E\u0E02\u0E2D\u0E07\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E41\u0E25\u0E49\u0E27":"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Skill \u0E41\u0E25\u0E30\u0E01\u0E0E\u0E02\u0E2D\u0E07\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E41\u0E25\u0E49\u0E27")}await Kf(t)}catch(n){if(n===qe||n===ue)return;e.out.notice("\u0E14\u0E36\u0E07 Skill \u0E41\u0E25\u0E30\u0E01\u0E0E\u0E02\u0E2D\u0E07\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u2014 \u0E43\u0E0A\u0E49\u0E09\u0E1A\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E15\u0E48\u0E2D\u0E44\u0E1B"),e.out.notice(` (${Rf(n)})`)}await Bi(e,t)}async function _f(e,t){return e.guidanceVersion(t,AbortSignal.timeout(Yi))}function Rf(e){return e instanceof Error?e.message:String(e)}var Qt=class extends u{};function Df(e){let t=o=>new Qt(`\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E17\u0E35\u0E48\u0E14\u0E32\u0E27\u0E19\u0E4C\u0E42\u0E2B\u0E25\u0E14\u0E21\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o}`);if(typeof e!="object"||e===null||Array.isArray(e))throw t("\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E44\u0E27\u0E49");let{skill:n,rules:s}=e;if(typeof s!="string")throw t("\u0E44\u0E21\u0E48\u0E21\u0E35 Platform Rules");if(!Array.isArray(n)||n.length===0)throw t("\u0E44\u0E21\u0E48\u0E21\u0E35\u0E44\u0E1F\u0E25\u0E4C\u0E02\u0E2D\u0E07 Skill");let r=new Set,i=n.map(o=>{let{path:a,content:l}=o??{};if(typeof a!="string"||typeof l!="string")throw t("\u0E44\u0E1F\u0E25\u0E4C\u0E02\u0E2D\u0E07 Skill \u0E44\u0E21\u0E48\u0E04\u0E23\u0E1A");if(!xf(a))throw t(`\u0E1E\u0E32\u0E18 "${a}" \u0E2D\u0E2D\u0E01\u0E19\u0E2D\u0E01\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07 Skill`);if(r.has(a))throw t(`\u0E1E\u0E32\u0E18 "${a}" \u0E0B\u0E49\u0E33\u0E01\u0E31\u0E19`);return r.add(a),{path:a,content:l}});if(!r.has("SKILL.md"))throw t("\u0E44\u0E21\u0E48\u0E21\u0E35 SKILL.md");return{skill:i,rules:s}}function xf(e){return e.includes("\0")?!1:e.split(/[\\/]/).every(t=>t!==""&&t!=="."&&t!==".."&&!t.includes(":"))}async function jf(e,t,n){let s=[];try{for(let r of Ht)s.push(await Mf(q.join(e,r),t.skill));s.push(await Yt(q.join(e,Gi),t.rules)),s.push(await Yt(q.join(e,Vi),`${qf}${t.rules}`)),s.push(await Yt(q.join(e,Ji),t.rules)),s.push(await Yt(q.join(e,bs),`${JSON.stringify({hash:n})}
150
+ `))}catch(r){throw await Promise.all(s.map(i=>i.discard())),r}for(let[r,i]of s.entries())try{await i.commit()}catch(o){throw await Promise.all(s.slice(r).map(a=>a.discard())),o}}var ws=()=>If(4).toString("hex");async function Mf(e,t){let n=q.dirname(e);await G.mkdir(n,{recursive:!0});let s=q.join(n,`.pple-new-${ws()}`),r=()=>G.rm(s,{recursive:!0,force:!0});try{await G.mkdir(s);for(let i of t){let o=q.join(s,...i.path.split(/[\\/]/));if(q.relative(s,o).startsWith(".."))throw new Qt(`\u0E1E\u0E32\u0E18 "${i.path}" \u0E2D\u0E2D\u0E01\u0E19\u0E2D\u0E01\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07 Skill`);await G.mkdir(q.dirname(o),{recursive:!0}),await G.writeFile(o,i.content)}}catch(i){throw await r(),i}return{discard:r,async commit(){let i=q.join(n,`.pple-old-${ws()}`),o=await G.rename(e,i).then(()=>!0,a=>{if(a.code==="ENOENT")return!1;throw a});try{await G.rename(s,e)}catch(a){throw o&&await G.rename(i,e).catch(()=>{}),await r(),a}o&&await G.rm(i,{recursive:!0,force:!0})}}}async function Yt(e,t){await G.mkdir(q.dirname(e),{recursive:!0});let n=q.join(q.dirname(e),`.pple-${q.basename(e)}.${ws()}.tmp`),s=()=>G.rm(n,{force:!0});try{await G.writeFile(n,t)}catch(r){throw await s(),r}return{discard:s,async commit(){try{await G.rename(n,e)}catch(r){throw await s(),r}}}}async function Bf(e){let t=await G.readFile(q.join(e,bs),"utf8").catch(()=>null);if(t===null)return null;try{let{hash:n}=JSON.parse(t);return typeof n=="string"&&n!==""?n:null}catch{return null}}async function Uf(e){let t=[...Ht.map(n=>q.join(n,"SKILL.md")),...ys];for(let n of t)if(!await G.access(q.join(e,n)).then(()=>!0,()=>!1))return!1;return!0}async function Ff(e){let t=q.join(e,".gitignore"),n=await G.readFile(t,"utf8").catch(()=>""),s=new Set(n.split(`
151
+ `).map(o=>o.trim())),r=Lf.filter(o=>!s.has(o));if(r.length===0)return;let i=n===""||n.endsWith(`
8
152
  `)?n:`${n}
9
- `;await w.writeFile(t,`${i}${o.join(`
153
+ `;await G.writeFile(t,`${i}${r.join(`
10
154
  `)}
11
- `)}async function ar(e){await w.writeFile(g.join(e,"AGENTS.md"),Xn,{flag:"wx"}).catch(t=>{if(t.code!=="EEXIST")throw t})}function Y(e){return e.split(g.sep).join("/")}function at(e,t){return{say(n=""){e(`${n}
155
+ `)}async function Kf(e){await G.writeFile(q.join(e,"AGENTS.md"),Of,{flag:"wx"}).catch(t=>{if(t.code!=="EEXIST")throw t})}function Wt(e){return e.split(q.sep).join("/")}function Hi(e,t){return{say(n=""){e(`${n}
12
156
  `)},notice(n=""){t(`${n}
13
157
  `)},fail(n){t(`${n.message}
14
158
  `),n.hint&&t(`${n.hint}
15
- `)}}}var ur=/[\u0E31\u0E34-\u0E3A\u0E47-\u0E4E]/g;function l(e,t){let n=e.replace(ur,"").length;return e+" ".repeat(Math.max(0,t-n))}function Q(e){let t=Date.parse(e);return Number.isNaN(t)?e:new Date(t+7*36e5).toISOString().slice(0,16).replace("T"," ")}function d(e,t){e.say(JSON.stringify(t,null,2))}var lr="\u0E02\u0E2D\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49\u0E02\u0E2D\u0E07\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E43\u0E14\u0E01\u0E47\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple <\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07> help` (\u0E2B\u0E23\u0E37\u0E2D --help, -h) \u2014 \u0E23\u0E30\u0E1A\u0E1A\u0E08\u0E30\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19 \u0E44\u0E21\u0E48\u0E17\u0E33\u0E2D\u0E30\u0E44\u0E23",pr=[["--app <slug>","\u0E23\u0E30\u0E1A\u0E38\u0E41\u0E2D\u0E1B (\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E17\u0E35\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E16\u0E49\u0E32\u0E44\u0E21\u0E48\u0E23\u0E30\u0E1A\u0E38)"],["--json","\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E48\u0E32\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25\u0E40\u0E1B\u0E47\u0E19 JSON \u0E44\u0E14\u0E49"]],cr=46;function pt(e){let t=e.filter(i=>!i.hidden),n=Ce(t),r=["pple \u2014 \u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E25\u0E30\u0E2A\u0E48\u0E07\u0E41\u0E2D\u0E1B\u0E02\u0E36\u0E49\u0E19 PPLE Platform"],o=[...new Set(t.map(i=>i.section))];for(let i of o){r.push("",i);for(let a of t.filter(u=>u.section===i))r.push(...Ee(a,n))}r.push("","\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19");for(let[i,a]of pr)r.push(` ${l(i,14)}${a}`);return r.push("",lr,""),r.join(`
16
- `)}function Ce(e){let t=Math.max(...e.flatMap(n=>n.usage.map(([r])=>r.length)));return Math.min(t,cr)+2}function Ee(e,t){return e.usage.map(([n,r],o)=>{let i=r??(o===0?e.summary:"");return i===""?` ${n}`:` ${l(n,t)}${n.length>=t?" ":""}${i}`})}function ct(e,t){let n=t.find(a=>lt(a.path,e)),r=t.filter(a=>!a.hidden&&a.path.length>e.length&&lt(a.path.slice(0,e.length),e)),o=`pple ${e.join(" ")}`,i=[];if(n){if(i.push(`${o} \u2014 ${n.summary}`,"","\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49"),i.push(...Ee(n,mr(n))),n.options?.length){i.push("","\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01");let a=Math.max(...n.options.map(ut).map(u=>u.length))+2;for(let u of n.options)i.push(` ${l(ut(u),a)}${u.text}`)}i.push("","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07",...n.example.map(a=>` ${a}`)),n.confirmation&&i.push("","\u0E01\u0E32\u0E23\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",` ${n.confirmation}`)}else i.push(`${o} \u2014 \u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E43\u0E19\u0E01\u0E25\u0E38\u0E48\u0E21\u0E19\u0E35\u0E49`);if(r.length>0){let a=Ce(r);i.push("",n?"\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E22\u0E48\u0E2D\u0E22":"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49");for(let u of r)i.push(...Ee(u,a));i.push("",`\u0E14\u0E39\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E15\u0E48\u0E25\u0E30\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E14\u0E49\u0E27\u0E22 \`${o} <\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07> help\``)}return i.push(""),i.join(`
17
- `)}function mr(e){return Ce([e])}function ut(e){let t=e.short?`${e.short}, ${e.long}`:` ${e.long}`;return e.value?`${t} ${e.value}`:t}function lt(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}var Z={ready:"\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19",provisioning:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E08\u0E31\u0E14\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21",failed:"\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",retired:"\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27"},q={draft:"\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07",beta:"\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49",live:"\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07"},ee={owner:"\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07",collaborator:"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"},_={live:"\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48",building:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E1A\u0E34\u0E25\u0E14\u0E4C",unverified:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",failed:"\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27"},te={pending:"\u0E23\u0E2D\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23",approved:"\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34\u0E41\u0E25\u0E49\u0E27",denied:"\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E41\u0E25\u0E49\u0E27"};function v(e,t){return e[t]??t}async function mt(e,t){let n=await(await p(e)).apps();if(t)return d(e.out,n);if(n.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E41\u0E2D\u0E1B"),e.out.say('\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E41\u0E23\u0E01\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E14\u0E49\u0E27\u0E22 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B"`');return}e.out.say(`\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 (${n.length})`);let r=Math.max(...n.map(i=>i.slug.length))+2,o=Math.max(...n.map(i=>i.name.length))+2;for(let i of n)e.out.say(fr(i,r,o))}function fr(e,t,n){return" "+l(e.slug,t)+l(e.name,n)+l(v(q,e.tier??"draft"),14)+l(v(Z,e.status),16)+v(ee,e.role??"owner")}async function ft(e){let t=await Qe(e);e.out.say("\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E42\u0E14\u0E22\u0E40\u0E1B\u0E34\u0E14\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49\u0E41\u0E25\u0E49\u0E27\u0E01\u0E23\u0E2D\u0E01\u0E23\u0E2B\u0E31\u0E2A:"),e.out.say(),e.out.say(` ${t.verificationUri}`),e.out.say(` \u0E23\u0E2B\u0E31\u0E2A: ${t.userCode}`),e.out.say(),e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E43\u0E2B\u0E49\u0E04\u0E38\u0E13\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u2026"),await e.openBrowser(t.verificationUriComplete??t.verificationUri);let n=await Ze(e,t);await W(e,{...n,ssoBase:e.config.ssoBase});let r=await new R(e,n.accessToken).me();e.out.say(`\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E43\u0E19\u0E0A\u0E37\u0E48\u0E2D ${r.name??r.sub} \u0E41\u0E25\u0E49\u0E27`),r.isBuilder||e.out.say("\u0E2D\u0E35\u0E01\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E01\u0E48\u0E2D\u0E19\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E14\u0E49: \u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E14\u0E49\u0E27\u0E22 `pple agreement` (\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48 https://console.ppleth.ai)")}async function gt(e){let t=await He(e);e.out.say(t?"\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A\u0E41\u0E25\u0E49\u0E27":"\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A")}async function Ae(e,t=!1){let n=await(await p(e)).me();if(t)return d(e.out,n);e.out.say(`\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E43\u0E19\u0E0A\u0E37\u0E48\u0E2D ${n.name??n.sub} \u0E41\u0E25\u0E49\u0E27`),n.isBuilder||e.out.say("\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32 \u2014 \u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E14\u0E49\u0E27\u0E22 `pple agreement` (\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48 https://console.ppleth.ai)")}var ne="main",dr="x-access-token";async function x(e,t,n,r){return e.run("git",r?["-c","credential.helper=",...n]:n,{cwd:t,env:{GIT_TERMINAL_PROMPT:"0",...r?{GIT_ASKPASS:e.gitAskpass,PPLE_GIT_USER:dr,PPLE_GIT_TOKEN:r.token}:{}}})}function dt(e){return["-c",`user.name=${e.author.name}`,"-c",`user.email=${e.author.email}`]}function yt(e){return/authentication|could not read|403|denied|not found/i.test(`${e.stdout}
18
- ${e.stderr}`)}function ht(e,t){return new s(`\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E44\u0E21\u0E48\u0E2D\u0E19\u0E38\u0E0D\u0E32\u0E15\u0E43\u0E2B\u0E49\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49${e}`,`\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E27\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 https://console.ppleth.ai \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 \`${t}\` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07`)}function wt(e){return new s("\u0E2D\u0E48\u0E32\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",e.stderr.trim())}async function j(e,t,n,r,o){let i=await x(e,t,n,o).catch(()=>{throw new s("\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D\u0E17\u0E35\u0E48 PPLE CLI \u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49","\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 git (https://git-scm.com/downloads) \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")});if(i.code!==0)throw r(i);return i}async function vt(e,t,n,r){await j(e,e.cwd,["clone",t,n],o=>yt(o)?ht("\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E42\u0E04\u0E49\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E04\u0E38\u0E13","pple init"):new s("\u0E14\u0E36\u0E07\u0E42\u0E04\u0E49\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",o.stderr.trim()),r)}async function re(e,t){return(await j(e,t,["status","--porcelain"],wt)).stdout.trim()!==""}async function oe(e,t,n,r){await j(e,t,["add","-A"],wt),await j(e,t,[...dt(r),"commit","-m",n],o=>new s("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",o.stderr.trim()))}async function $t(e,t){return(await j(e,t,["rev-parse","HEAD"],r=>new s("\u0E2D\u0E48\u0E32\u0E19\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",r.stderr.trim()))).stdout.trim()}async function bt(e,t,n){await x(e,t,["fetch","origin",ne],n);let r=await x(e,t,["rev-parse","HEAD"]),o=await x(e,t,["rev-parse",`origin/${ne}`]);return r.code!==0||o.code!==0?!1:r.stdout.trim()===o.stdout.trim()}async function Pt(e,t,n){let r=["push","origin",`HEAD:${ne}`],o=await x(e,t,r,n);if(o.code===0)return;let i=`${o.stdout}
19
- ${o.stderr}`;if(!/rejected|non-fast-forward|fetch first/i.test(i))throw yt(o)?ht("\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13","pple deploy"):new s("\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",o.stderr.trim());if(e.out.say("\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E37\u0E48\u0E19\u0E41\u0E01\u0E49\u0E44\u0E02\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49 \u2014 \u0E01\u0E33\u0E25\u0E31\u0E07\u0E19\u0E33\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E40\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E01\u0E48\u0E2D\u0E19\u2026"),(await x(e,t,[...dt(n),"pull","--rebase","origin",ne],n)).code!==0)throw await x(e,t,["rebase","--abort"]),new s("\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E02\u0E31\u0E14\u0E41\u0E22\u0E49\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E19\u0E2D\u0E37\u0E48\u0E19\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E2B\u0E49 AI coding agent \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E23\u0E27\u0E21\u0E2A\u0E2D\u0E07\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E40\u0E02\u0E49\u0E32\u0E14\u0E49\u0E27\u0E22\u0E01\u0E31\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 `pple deploy` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");let u=await x(e,t,r,n);if(u.code!==0)throw new s("\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",u.stderr.trim())}var yr=3e3,hr=3*6e4,wr=10*6e4,vr=20;async function xt(e,t){let n=await J(e);if(n.apiBase!==""&&n.apiBase!==e.config.apiBase)throw new s("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 PPLE Platform \u0E04\u0E19\u0E25\u0E30\u0E15\u0E31\u0E27\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2D\u0E22\u0E39\u0E48",`\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E16\u0E39\u0E01\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E27\u0E49\u0E01\u0E31\u0E1A ${n.apiBase}`);let r=await p(e),o=await r.app(n.slug);if(o.status==="retired")throw new s(`"${o.name}" \u0E16\u0E39\u0E01\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27`,'\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E2B\u0E32\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E32\u0E19\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49\u0E15\u0E48\u0E2D \u0E43\u0E2B\u0E49\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48\u0E14\u0E49\u0E27\u0E22 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B"`');if(o.status!=="ready")throw new s(`"${o.name}" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07`,o.error?`\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1E\u0E1A\u0E1B\u0E31\u0E0D\u0E2B\u0E32: ${o.error}`:"\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E14\u0E49\u0E27\u0E22 `pple info` (\u0E16\u0E49\u0E32\u0E04\u0E49\u0E32\u0E07\u0E2D\u0E22\u0E39\u0E48 \u0E25\u0E2D\u0E07 `pple retry-setup`) \u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48");let i=await r.repoToken(n.slug);if(await re(e,n.dir))e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026"),await oe(e,n.dir,t.message??`\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 ${o.name}`,i);else if(await bt(e,n.dir,i)){e.out.say(`\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E43\u0E2B\u0E21\u0E48 \u2014 ${o.name} \u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E17\u0E35\u0E48 ${o.url}`);return}e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026"),await Pt(e,n.dir,i);let a=await $t(e,n.dir);e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026 (\u0E1B\u0E01\u0E15\u0E34\u0E43\u0E0A\u0E49\u0E40\u0E27\u0E25\u0E32\u0E23\u0E32\u0E27\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E19\u0E32\u0E17\u0E35)");let u=await $r(e,r,n.slug,a);Pr(e,o,u)}async function $r(e,t,n,r){let o=e.now(),i;for(;;){let u=(await t.deploys(n)).find(D=>D.commit===r);if(u&&(i=u,u.status!=="building"))return u;if(e.now()-o>=(i?wr:hr))throw new s(i?"\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E41\u0E25\u0E49\u0E27 \u0E41\u0E15\u0E48\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E43\u0E0A\u0E49\u0E40\u0E27\u0E25\u0E32\u0E19\u0E32\u0E19\u0E01\u0E27\u0E48\u0E32\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E44\u0E27\u0E49":"\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E41\u0E25\u0E49\u0E27 \u0E41\u0E15\u0E48\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E23\u0E34\u0E48\u0E21\u0E1A\u0E34\u0E25\u0E14\u0E4C","\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E08\u0E19\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E14\u0E49\u0E27\u0E22 `pple deploys`");await e.sleep(yr)}}var br="superseded by a newer deploy";function Pr(e,t,n){if(n.status==="failed"){if(n.error===br)throw new s("\u0E21\u0E35\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E21\u0E32\u0E41\u0E17\u0E19\u0E17\u0E35\u0E48\u0E04\u0E23\u0E31\u0E49\u0E07\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E2D\u0E22\u0E39\u0E48","\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E19\u0E31\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 `pple deploys`");let o=n.log?xr(n.log,vr):n.error;throw o&&(e.out.say(),e.out.say(o),e.out.say()),new s(`\u0E1A\u0E34\u0E25\u0E14\u0E4C ${t.name} \u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E08\u0E36\u0E07\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07`,o?"\u0E2A\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E14\u0E49\u0E32\u0E19\u0E1A\u0E19\u0E43\u0E2B\u0E49 AI coding agent \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u2014 \u0E43\u0E19\u0E19\u0E31\u0E49\u0E19\u0E1A\u0E2D\u0E01\u0E27\u0E48\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E41\u0E01\u0E49\u0E2D\u0E30\u0E44\u0E23":"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E14\u0E49\u0E27\u0E22 `pple deploys`")}let r=n.migrations.applied??[];if(r.length>0&&e.out.say(`\u0E43\u0E0A\u0E49 migration ${r.length} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E01\u0E31\u0E1A\u0E10\u0E32\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E41\u0E25\u0E49\u0E27`),n.status==="unverified"){e.out.say(`\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 ${t.name} \u0E41\u0E25\u0E49\u0E27 \u0E41\u0E15\u0E48\u0E41\u0E2D\u0E1B\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E15\u0E2D\u0E1A\u0E2A\u0E19\u0E2D\u0E07`),e.out.say(`\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E1B\u0E34\u0E14 ${t.url}`);return}e.out.say(`${t.name} \u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E44\u0E14\u0E49\u0E41\u0E25\u0E49\u0E27\u0E17\u0E35\u0E48 ${t.url}`)}function xr(e,t){return e.split(`
159
+ `)}}}var Gf=/[\u0E31\u0E34-\u0E3A\u0E47-\u0E4E]/g;function $(e,t){let n=e.replace(Gf,"").length;return e+" ".repeat(Math.max(0,t-n))}function pe(e){let t=Date.parse(e);return Number.isNaN(t)?e:new Date(t+7*36e5).toISOString().slice(0,16).replace("T"," ")}function L(e,t){e.say(JSON.stringify(t,null,2))}var Vf="\u0E02\u0E2D\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49\u0E02\u0E2D\u0E07\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E43\u0E14\u0E01\u0E47\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple <\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07> help` (\u0E2B\u0E23\u0E37\u0E2D --help, -h) \u2014 \u0E23\u0E30\u0E1A\u0E1A\u0E08\u0E30\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19 \u0E44\u0E21\u0E48\u0E17\u0E33\u0E2D\u0E30\u0E44\u0E23",Jf=[["--app <slug>","\u0E23\u0E30\u0E1A\u0E38\u0E41\u0E2D\u0E1B (\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E17\u0E35\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E16\u0E49\u0E32\u0E44\u0E21\u0E48\u0E23\u0E30\u0E1A\u0E38)"],["--json","\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E48\u0E32\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25\u0E40\u0E1B\u0E47\u0E19 JSON \u0E44\u0E14\u0E49"]],Yf=46;function zi(e){let t=e.filter(i=>!i.hidden),n=ks(t),s=["pple \u2014 \u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E25\u0E30\u0E2A\u0E48\u0E07\u0E41\u0E2D\u0E1B\u0E02\u0E36\u0E49\u0E19 PPLE Platform"],r=[...new Set(t.map(i=>i.section))];for(let i of r){s.push("",i);for(let o of t.filter(a=>a.section===i))s.push(...Ss(o,n))}s.push("","\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19");for(let[i,o]of Jf)s.push(` ${$(i,14)}${o}`);return s.push("",Vf,""),s.join(`
160
+ `)}function ks(e){let t=Math.max(...e.flatMap(n=>n.usage.map(([s])=>s.length)));return Math.min(t,Yf)+2}function Ss(e,t){return e.usage.map(([n,s],r)=>{let i=s??(r===0?e.summary:"");return i===""?` ${n}`:` ${$(n,t)}${n.length>=t?" ":""}${i}`})}function Zi(e,t){let n=t.find(o=>Xi(o.path,e)),s=t.filter(o=>!o.hidden&&o.path.length>e.length&&Xi(o.path.slice(0,e.length),e)),r=`pple ${e.join(" ")}`,i=[];if(n){if(i.push(`${r} \u2014 ${n.summary}`,"","\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49"),i.push(...Ss(n,Wf(n))),n.options?.length){i.push("","\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01");let o=Math.max(...n.options.map(Qi).map(a=>a.length))+2;for(let a of n.options)i.push(` ${$(Qi(a),o)}${a.text}`)}i.push("","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07",...n.example.map(o=>` ${o}`)),n.confirmation&&i.push("","\u0E01\u0E32\u0E23\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",` ${n.confirmation}`)}else i.push(`${r} \u2014 \u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E43\u0E19\u0E01\u0E25\u0E38\u0E48\u0E21\u0E19\u0E35\u0E49`);if(s.length>0){let o=ks(s);i.push("",n?"\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E22\u0E48\u0E2D\u0E22":"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49");for(let a of s)i.push(...Ss(a,o));i.push("",`\u0E14\u0E39\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E15\u0E48\u0E25\u0E30\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E14\u0E49\u0E27\u0E22 \`${r} <\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07> help\``)}return i.push(""),i.join(`
161
+ `)}function Wf(e){return ks([e])}function Qi(e){let t=e.short?`${e.short}, ${e.long}`:` ${e.long}`;return e.value?`${t} ${e.value}`:t}function Xi(e,t){return e.length===t.length&&e.every((n,s)=>n===t[s])}var Xt={ready:"\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19",provisioning:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E08\u0E31\u0E14\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21",failed:"\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",retired:"\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27"},et={draft:"\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07",beta:"\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49",live:"\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07"},zt={owner:"\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07",collaborator:"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"},xe={live:"\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48",building:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E1A\u0E34\u0E25\u0E14\u0E4C",unverified:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",failed:"\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27"},Zt={pending:"\u0E23\u0E2D\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23",approved:"\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34\u0E41\u0E25\u0E49\u0E27",denied:"\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E41\u0E25\u0E49\u0E27"};function V(e,t){return e[t]??t}async function eo(e,t){let n=await(await E(e)).apps();if(t)return L(e.out,n);if(n.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E41\u0E2D\u0E1B"),e.out.say('\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E41\u0E23\u0E01\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E14\u0E49\u0E27\u0E22 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B"`');return}e.out.say(`\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 (${n.length})`);let s=Math.max(...n.map(i=>i.slug.length))+2,r=Math.max(...n.map(i=>i.name.length))+2;for(let i of n)e.out.say(Hf(i,s,r))}function Hf(e,t,n){return" "+$(e.slug,t)+$(e.name,n)+$(V(et,e.tier??"draft"),14)+$(V(Xt,e.status),16)+V(zt,e.role??"owner")}async function to(e){let t=await _i(e);e.out.say("\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E42\u0E14\u0E22\u0E40\u0E1B\u0E34\u0E14\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49\u0E41\u0E25\u0E49\u0E27\u0E01\u0E23\u0E2D\u0E01\u0E23\u0E2B\u0E31\u0E2A:"),e.out.say(),e.out.say(` ${t.verificationUri}`),e.out.say(` \u0E23\u0E2B\u0E31\u0E2A: ${t.userCode}`),e.out.say(),e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E43\u0E2B\u0E49\u0E04\u0E38\u0E13\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u2026"),await e.openBrowser(t.verificationUriComplete??t.verificationUri);let n=await Ri(e,t);await Jt(e,{...n,ssoBase:e.config.ssoBase});let s=await new Re(e,n.accessToken).me();e.out.say(`\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E43\u0E19\u0E0A\u0E37\u0E48\u0E2D ${s.name??s.sub} \u0E41\u0E25\u0E49\u0E27`),s.isBuilder||e.out.say("\u0E2D\u0E35\u0E01\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E01\u0E48\u0E2D\u0E19\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E14\u0E49: \u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E14\u0E49\u0E27\u0E22 `pple agreement` (\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48 https://console.ppleth.ai)")}async function no(e){let t=await Ii(e);e.out.say(t?"\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A\u0E41\u0E25\u0E49\u0E27":"\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A")}async function Es(e,t=!1){let n=await(await E(e)).me();if(t)return L(e.out,n);e.out.say(`\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E43\u0E19\u0E0A\u0E37\u0E48\u0E2D ${n.name??n.sub} \u0E41\u0E25\u0E49\u0E27`),n.isBuilder||e.out.say("\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32 \u2014 \u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E14\u0E49\u0E27\u0E22 `pple agreement` (\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48 https://console.ppleth.ai)")}var en="main",Xf="x-access-token";async function me(e,t,n,s){return e.run("git",s?["-c","credential.helper=",...n]:n,{cwd:t,env:{GIT_TERMINAL_PROMPT:"0",...s?{GIT_ASKPASS:e.gitAskpass,PPLE_GIT_USER:Xf,PPLE_GIT_TOKEN:s.token}:{}}})}function so(e){return["-c",`user.name=${e.author.name}`,"-c",`user.email=${e.author.email}`]}function ro(e){return/authentication|could not read|403|denied|not found/i.test(`${e.stdout}
162
+ ${e.stderr}`)}function io(e,t){return new u(`\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E44\u0E21\u0E48\u0E2D\u0E19\u0E38\u0E0D\u0E32\u0E15\u0E43\u0E2B\u0E49\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49${e}`,`\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E27\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 https://console.ppleth.ai \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 \`${t}\` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07`)}function oo(e){return new u("\u0E2D\u0E48\u0E32\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",e.stderr.trim())}async function tt(e,t,n,s,r){let i=await me(e,t,n,r).catch(()=>{throw new u("\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D\u0E17\u0E35\u0E48 PPLE CLI \u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49","\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 git (https://git-scm.com/downloads) \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")});if(i.code!==0)throw s(i);return i}async function ao(e,t,n,s){await tt(e,e.cwd,["clone",t,n],r=>ro(r)?io("\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E42\u0E04\u0E49\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E04\u0E38\u0E13","pple init"):new u("\u0E14\u0E36\u0E07\u0E42\u0E04\u0E49\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",r.stderr.trim()),s)}async function tn(e,t){return(await tt(e,t,["status","--porcelain"],oo)).stdout.trim()!==""}async function nn(e,t,n,s){await tt(e,t,["add","-A"],oo),await tt(e,t,[...so(s),"commit","-m",n],r=>new u("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",r.stderr.trim()))}async function lo(e,t){return(await tt(e,t,["rev-parse","HEAD"],s=>new u("\u0E2D\u0E48\u0E32\u0E19\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",s.stderr.trim()))).stdout.trim()}async function co(e,t,n){await me(e,t,["fetch","origin",en],n);let s=await me(e,t,["rev-parse","HEAD"]),r=await me(e,t,["rev-parse",`origin/${en}`]);return s.code!==0||r.code!==0?!1:s.stdout.trim()===r.stdout.trim()}async function uo(e,t,n){let s=["push","origin",`HEAD:${en}`],r=await me(e,t,s,n);if(r.code===0)return;let i=`${r.stdout}
163
+ ${r.stderr}`;if(!/rejected|non-fast-forward|fetch first/i.test(i))throw ro(r)?io("\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13","pple deploy"):new u("\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",r.stderr.trim());if(e.out.say("\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E37\u0E48\u0E19\u0E41\u0E01\u0E49\u0E44\u0E02\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49 \u2014 \u0E01\u0E33\u0E25\u0E31\u0E07\u0E19\u0E33\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E40\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E01\u0E48\u0E2D\u0E19\u2026"),(await me(e,t,[...so(n),"pull","--rebase","origin",en],n)).code!==0)throw await me(e,t,["rebase","--abort"]),new u("\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E02\u0E31\u0E14\u0E41\u0E22\u0E49\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E19\u0E2D\u0E37\u0E48\u0E19\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27","\u0E43\u0E2B\u0E49 AI coding agent \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E23\u0E27\u0E21\u0E2A\u0E2D\u0E07\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E40\u0E02\u0E49\u0E32\u0E14\u0E49\u0E27\u0E22\u0E01\u0E31\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 `pple deploy` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");let a=await me(e,t,s,n);if(a.code!==0)throw new u("\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",a.stderr.trim())}var zf=3e3,Zf=3*6e4,ep=10*6e4,tp=20;async function fo(e,t){let n=await Kt(e);if(n.apiBase!==""&&n.apiBase!==e.config.apiBase)throw new u("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 PPLE Platform \u0E04\u0E19\u0E25\u0E30\u0E15\u0E31\u0E27\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2D\u0E22\u0E39\u0E48",`\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E16\u0E39\u0E01\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E27\u0E49\u0E01\u0E31\u0E1A ${n.apiBase}`);let s=await E(e),r=await s.app(n.slug);if(r.status==="retired")throw new u(`"${r.name}" \u0E16\u0E39\u0E01\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27`,'\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E2B\u0E32\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E32\u0E19\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49\u0E15\u0E48\u0E2D \u0E43\u0E2B\u0E49\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48\u0E14\u0E49\u0E27\u0E22 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B"`');if(r.status!=="ready")throw new u(`"${r.name}" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07`,r.error?`\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1E\u0E1A\u0E1B\u0E31\u0E0D\u0E2B\u0E32: ${r.error}`:"\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E14\u0E49\u0E27\u0E22 `pple info` (\u0E16\u0E49\u0E32\u0E04\u0E49\u0E32\u0E07\u0E2D\u0E22\u0E39\u0E48 \u0E25\u0E2D\u0E07 `pple retry-setup`) \u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48");let i=await s.repoToken(n.slug);if(await tn(e,n.dir))e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026"),await nn(e,n.dir,t.message??`\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 ${r.name}`,i);else if(await co(e,n.dir,i)){e.out.say(`\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E43\u0E2B\u0E21\u0E48 \u2014 ${r.name} \u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E17\u0E35\u0E48 ${r.url}`);return}e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026"),await uo(e,n.dir,i);let o=await lo(e,n.dir);e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026 (\u0E1B\u0E01\u0E15\u0E34\u0E43\u0E0A\u0E49\u0E40\u0E27\u0E25\u0E32\u0E23\u0E32\u0E27\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E19\u0E32\u0E17\u0E35)");let a=await np(e,s,n.slug,o);rp(e,r,a)}async function np(e,t,n,s){let r=e.now(),i;for(;;){let a=(await t.deploys(n)).find(m=>m.commit===s);if(a&&(i=a,a.status!=="building"))return a;if(e.now()-r>=(i?ep:Zf))throw new u(i?"\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E41\u0E25\u0E49\u0E27 \u0E41\u0E15\u0E48\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E43\u0E0A\u0E49\u0E40\u0E27\u0E25\u0E32\u0E19\u0E32\u0E19\u0E01\u0E27\u0E48\u0E32\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E44\u0E27\u0E49":"\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E41\u0E25\u0E49\u0E27 \u0E41\u0E15\u0E48\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E23\u0E34\u0E48\u0E21\u0E1A\u0E34\u0E25\u0E14\u0E4C","\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E08\u0E19\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E14\u0E49\u0E27\u0E22 `pple deploys`");await e.sleep(zf)}}var sp="superseded by a newer deploy";function rp(e,t,n){if(n.status==="failed"){if(n.error===sp)throw new u("\u0E21\u0E35\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E21\u0E32\u0E41\u0E17\u0E19\u0E17\u0E35\u0E48\u0E04\u0E23\u0E31\u0E49\u0E07\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E2D\u0E22\u0E39\u0E48","\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E19\u0E31\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 `pple deploys`");let r=n.log?ip(n.log,tp):n.error;throw r&&(e.out.say(),e.out.say(r),e.out.say()),new u(`\u0E1A\u0E34\u0E25\u0E14\u0E4C ${t.name} \u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E08\u0E36\u0E07\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07`,r?"\u0E2A\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E14\u0E49\u0E32\u0E19\u0E1A\u0E19\u0E43\u0E2B\u0E49 AI coding agent \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u2014 \u0E43\u0E19\u0E19\u0E31\u0E49\u0E19\u0E1A\u0E2D\u0E01\u0E27\u0E48\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E41\u0E01\u0E49\u0E2D\u0E30\u0E44\u0E23":"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E14\u0E49\u0E27\u0E22 `pple deploys`")}let s=n.migrations.applied??[];if(s.length>0&&e.out.say(`\u0E43\u0E0A\u0E49 migration ${s.length} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E01\u0E31\u0E1A\u0E10\u0E32\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E41\u0E25\u0E49\u0E27`),n.status==="unverified"){e.out.say(`\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 ${t.name} \u0E41\u0E25\u0E49\u0E27 \u0E41\u0E15\u0E48\u0E41\u0E2D\u0E1B\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E15\u0E2D\u0E1A\u0E2A\u0E19\u0E2D\u0E07`),e.out.say(`\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E1B\u0E34\u0E14 ${t.url}`);return}e.out.say(`${t.name} \u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E44\u0E14\u0E49\u0E41\u0E25\u0E49\u0E27\u0E17\u0E35\u0E48 ${t.url}`)}function ip(e,t){return e.split(`
20
164
  `).slice(-t).join(`
21
- `).trim()}async function Et(e,t){await(await p(e)).redeploy(t),e.out.say("\u0E40\u0E23\u0E34\u0E48\u0E21\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E43\u0E2B\u0E21\u0E48\u0E41\u0E25\u0E49\u0E27"),e.out.say("\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E04\u0E48\u0E32 env \u0E41\u0E25\u0E30 secret \u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E19\u0E35\u0E49"),e.out.say("\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E04\u0E27\u0E32\u0E21\u0E04\u0E37\u0E1A\u0E2B\u0E19\u0E49\u0E32\u0E14\u0E49\u0E27\u0E22 `pple deploys`")}async function Ct(e,t,n,r){let o=await(await p(e)).deploys(t);if(n===void 0)return r?d(e.out,o):Er(e,t,o);let i=o.find(a=>a.id===n||a.commit.startsWith(n));if(!i)throw new s(`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22 "${n}"`,"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple deploys` \u0E41\u0E25\u0E49\u0E27\u0E43\u0E0A\u0E49 id \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15\u0E08\u0E32\u0E01\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E31\u0E49\u0E19");if(r)return d(e.out,i);Cr(e,i)}function Er(e,t,n){if(n.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22"),e.out.say("\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E36\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 `pple deploy` \u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B");return}e.out.say(`\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E02\u0E2D\u0E07 ${t}`);for(let r of n.slice(0,20)){let o=r.message?` \u2014 ${r.message}`:"";e.out.say(` ${l(v(_,r.status),13)} ${l(r.commit.slice(0,7),9)}${l(r.id,12)}${Re(r.createdAt)}${o}`)}e.out.say(""),e.out.say("\u0E2D\u0E48\u0E32\u0E19\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E41\u0E25\u0E30\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E02\u0E2D\u0E07\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E14\u0E04\u0E23\u0E31\u0E49\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E14\u0E49\u0E27\u0E22 `pple deploys <id>`")}function Cr(e,t){e.out.say(`\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22 ${t.id}`),e.out.say(` ${l("\u0E2A\u0E16\u0E32\u0E19\u0E30",12)}${v(_,t.status)}`),e.out.say(` ${l("\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15",12)}${t.commit.slice(0,7)}`),t.message&&e.out.say(` ${l("\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21",12)}${t.message}`),e.out.say(` ${l("\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E21\u0E37\u0E48\u0E2D",12)}${Re(t.createdAt)}`),t.completedAt&&e.out.say(` ${l("\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E40\u0E21\u0E37\u0E48\u0E2D",12)}${Re(t.completedAt)}`),t.error&&e.out.say(` ${l("\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",12)}${t.error}`);let n=t.migrations.applied??[];n.length>0&&e.out.say(` ${l("migration",12)}\u0E43\u0E0A\u0E49 ${n.length} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23: ${n.join(", ")}`),t.log&&(e.out.say(""),e.out.say("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C"),e.out.say(t.log.trimEnd()))}function Re(e){return`${e.slice(0,16).replace("T"," ")} UTC`}async function At(e,t,n){let r=n.join(" ").trim();if(r==="")throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B",'\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple rename "\u0E25\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23"`');let o=await(await p(e)).renameApp(t,r);e.out.say(`\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E40\u0E1B\u0E47\u0E19 "${o.name}" \u0E41\u0E25\u0E49\u0E27`)}var Ar="\u0E01\u0E32\u0E23\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E08\u0E30\u0E2B\u0E22\u0E38\u0E14\u0E41\u0E2D\u0E1B \u0E19\u0E33\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01 PPLE Today \u0E41\u0E25\u0E30\u0E40\u0E01\u0E47\u0E1A\u0E42\u0E04\u0E49\u0E14\u0E40\u0E02\u0E49\u0E32\u0E04\u0E25\u0E31\u0E07 \u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E08\u0E30\u0E22\u0E31\u0E07\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E27\u0E49 \u2014 \u0E21\u0E35\u0E40\u0E1E\u0E35\u0E22\u0E07\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E17\u0E35\u0E48\u0E25\u0E1A\u0E44\u0E14\u0E49 \u0E41\u0E25\u0E30\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49";async function Rt(e,t,n){let r=await p(e),o=await r.app(t);if(o.status==="retired"){e.out.say(`"${o.name}" \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27`);return}if(o.tier==="live")throw new s("\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E2D\u0E22\u0E39\u0E48 \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E40\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E14\u0E49\u0E27\u0E22 `pple request retire`");if(e.out.say(Ar),n!==void 0){if(n!==t)throw new s(`\`--confirm ${n}\` \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E08\u0E30\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07 ("${t}")`,"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E2D\u0E30\u0E44\u0E23")}else if(e.interactive){if((await e.ask(`\u0E1E\u0E34\u0E21\u0E1E\u0E4C ${t} \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E01\u0E32\u0E23\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07:`)).trim()!==t)throw new s("\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E2D\u0E30\u0E44\u0E23")}else throw new s("\u0E01\u0E32\u0E23\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22 slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B","\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E08\u0E36\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <slug>` \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E08\u0E30\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07");await r.retireApp(t),e.out.say(`\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E41\u0E25\u0E49\u0E27: ${o.name}`)}async function _t(e,t){e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E25\u0E2D\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E43\u0E2B\u0E21\u0E48\u2026");let n=await(await p(e)).provision(t);if(n.status!=="ready")throw new s(`\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 ${n.name} \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08`,n.error?`\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1E\u0E1A\u0E1B\u0E31\u0E0D\u0E2B\u0E32: ${n.error}`:"\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48 \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21");e.out.say(`\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 ${n.name} \u0E40\u0E2A\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27`)}var Rr="\u0E43\u0E19\u0E10\u0E32\u0E19\u0E30\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32 \u0E04\u0E38\u0E13\u0E15\u0E01\u0E25\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E23\u0E31\u0E1A\u0E1C\u0E34\u0E14\u0E0A\u0E2D\u0E1A \u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E08\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E1A\u0E19\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E1E\u0E37\u0E49\u0E19\u0E10\u0E32\u0E19\u0E17\u0E35\u0E48\u0E1E\u0E23\u0E23\u0E04\u0E14\u0E39\u0E41\u0E25 \u0E2D\u0E22\u0E39\u0E48\u0E20\u0E32\u0E22\u0E43\u0E15\u0E49\u0E42\u0E04\u0E27\u0E15\u0E32\u0E17\u0E23\u0E31\u0E1E\u0E22\u0E32\u0E01\u0E23\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 \u0E41\u0E25\u0E30\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E40\u0E04\u0E22\u0E40\u0E1B\u0E34\u0E14\u0E41\u0E2D\u0E1B\u0E19\u0E31\u0E49\u0E19\u0E41\u0E25\u0E49\u0E27\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19 \u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E04\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E1C\u0E34\u0E14\u0E0A\u0E2D\u0E1A\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E36\u0E49\u0E19";async function kt(e){let t=await p(e);if((await t.me()).isBuilder){e.out.say("\u0E04\u0E38\u0E13\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E41\u0E25\u0E49\u0E27");return}if(!e.interactive)throw new s("\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E2B\u0E49\u0E15\u0E31\u0E27\u0E04\u0E38\u0E13\u0E40\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A","\u0E23\u0E31\u0E19 `pple agreement` \u0E43\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E40\u0E2D\u0E07 \u0E2B\u0E23\u0E37\u0E2D\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E17\u0E35\u0E48 https://console.ppleth.ai");if(e.out.say("\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32"),e.out.say(),e.out.say(Rr),e.out.say(),!await e.confirm("\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E19\u0E35\u0E49\u0E41\u0E25\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32?"))throw new s("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07","\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E44\u0E14\u0E49\u0E17\u0E38\u0E01\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E14\u0E49\u0E27\u0E22 `pple agreement`");await t.acceptAgreement(),e.out.say('\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E40\u0E23\u0E34\u0E48\u0E21\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B"`')}var _e={ok:"\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",failed:"\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",timeout:"\u0E2B\u0E21\u0E14\u0E40\u0E27\u0E25\u0E32"},_r={schedule:"\u0E15\u0E32\u0E21\u0E40\u0E27\u0E25\u0E32",manual:"\u0E2A\u0E31\u0E48\u0E07\u0E23\u0E31\u0E19\u0E40\u0E2D\u0E07"};async function ke(e,t,n){let r=await(await p(e)).cron(t);if(n)return d(e.out,r);if(e.out.say(`\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E02\u0E2D\u0E07 ${t}`),e.out.say(` ${kr(r)}`),r.schedules.length===0){e.out.say(""),e.out.say("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32"),e.out.say("\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E43\u0E19 wrangler.jsonc \u0E40\u0E1B\u0E47\u0E19 `triggers.crons` (\u0E40\u0E27\u0E25\u0E32 UTC) \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E40\u0E02\u0E35\u0E22\u0E19 `scheduled()` \u0E43\u0E19\u0E42\u0E04\u0E49\u0E14 \u0E41\u0E25\u0E49\u0E27\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22");return}let o=r.state!=="running";r.schedules.forEach((i,a)=>{if(e.out.say(""),e.out.say(` ${a+1}. ${i.expression} ${i.summary}`),!o&&i.nextRunAt&&e.out.say(` \u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B ${Q(i.nextRunAt)} (\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22)`),i.last){let u=i.last.trigger?` \xB7 ${_r[i.last.trigger]}`:"",c=i.last.durationMs===null?"":` \xB7 ${i.last.durationMs} ms`;e.out.say(` \u0E04\u0E23\u0E31\u0E49\u0E07\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14 ${Q(i.last.at)} (\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22) \xB7 ${_e[i.last.outcome]}${c}${u}`),i.last.error&&e.out.say(` \u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 ${i.last.error}`)}else e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E04\u0E22\u0E23\u0E31\u0E19")}),e.out.say(""),e.out.say("\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C cron \u0E02\u0E49\u0E32\u0E07\u0E1A\u0E19\u0E04\u0E37\u0E2D\u0E40\u0E27\u0E25\u0E32 UTC \u0E15\u0E32\u0E21\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E43\u0E19 wrangler.jsonc \u0E2A\u0E48\u0E27\u0E19\u0E40\u0E27\u0E25\u0E32\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B/\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22"),e.out.say(`\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 ${r.limits.maxSchedules} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 \u0E2B\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 ${r.limits.minIntervalMinutes} \u0E19\u0E32\u0E17\u0E35 (\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E14\u0E49\u0E27\u0E22 \`pple request limit --cron-schedules <\u0E08\u0E33\u0E19\u0E27\u0E19>\`)`)}function kr(e){return e.state==="paused"?`\u0E2B\u0E22\u0E38\u0E14\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27${e.pausedAt?` \u0E15\u0E31\u0E49\u0E07\u0E41\u0E15\u0E48 ${Q(e.pausedAt)} (\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22)`:""} \u2014 \u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19\u0E08\u0E19\u0E01\u0E27\u0E48\u0E32\u0E08\u0E30\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19 \u0E43\u0E0A\u0E49 \`pple cron resume\` (\u0E2A\u0E31\u0E48\u0E07\u0E23\u0E31\u0E19\u0E40\u0E2D\u0E07\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 \`pple cron run\`)`:e.state==="stopped"?"\u0E2B\u0E22\u0E38\u0E14\u0E17\u0E33\u0E07\u0E32\u0E19\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48 \u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E08\u0E30\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19\u0E2D\u0E35\u0E01":"\u0E17\u0E33\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48"}async function St(e,t,n){let r=await(await p(e)).pauseCron(t);if(n)return d(e.out,r);e.out.say("\u0E2B\u0E22\u0E38\u0E14\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27\u0E41\u0E25\u0E49\u0E27"),e.out.say("\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49\u0E22\u0E31\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E04\u0E23\u0E1A \u0E41\u0E15\u0E48\u0E08\u0E30\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19\u0E15\u0E32\u0E21\u0E40\u0E27\u0E25\u0E32\u0E08\u0E19\u0E01\u0E27\u0E48\u0E32\u0E08\u0E30\u0E23\u0E31\u0E19 `pple cron resume`"),e.out.say("\u0E2A\u0E31\u0E48\u0E07\u0E23\u0E31\u0E19\u0E04\u0E23\u0E31\u0E49\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27\u0E17\u0E31\u0E19\u0E17\u0E35\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple cron run <\u0E25\u0E33\u0E14\u0E31\u0E1A>` \u0E41\u0E21\u0E49\u0E08\u0E30\u0E2B\u0E22\u0E38\u0E14\u0E2D\u0E22\u0E39\u0E48")}async function Tt(e,t,n){let r=await(await p(e)).resumeCron(t);if(n)return d(e.out,r);e.out.say("\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19\u0E41\u0E25\u0E49\u0E27"),e.out.say("\u0E0A\u0E48\u0E27\u0E07\u0E17\u0E35\u0E48\u0E2B\u0E22\u0E38\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E23\u0E31\u0E19\u0E22\u0E49\u0E2D\u0E19\u0E2B\u0E25\u0E31\u0E07 \u0E07\u0E32\u0E19\u0E08\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E15\u0E32\u0E21\u0E40\u0E27\u0E25\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B \u0E14\u0E39\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple cron`")}async function Dt(e,t,n,r){let o=n.join(" ").trim();if(o==="")throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E08\u0E30\u0E23\u0E31\u0E19",'\u0E43\u0E0A\u0E49\u0E25\u0E33\u0E14\u0E31\u0E1A\u0E08\u0E32\u0E01 `pple cron` \u0E40\u0E0A\u0E48\u0E19 `pple cron run 1` \u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C \u0E40\u0E0A\u0E48\u0E19 `pple cron run "0 1 * * *"`');let i=await p(e),a=await i.cron(t),u=Tr(a,o);r||e.out.say(`\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E31\u0E19 ${u} \u2026`);let c=await i.runCron(t,u);if(r?d(e.out,c):Sr(e,c),c.outcome!=="ok")throw new s(`\u0E23\u0E31\u0E19 ${u} ${_e[c.outcome]}`,c.error??void 0)}function Sr(e,t){e.out.say(`${t.expression} ${_e[t.outcome]} \xB7 ${t.durationMs} ms`),t.error&&e.out.say(` ${t.error}`)}function Tr(e,t){if(/^\d+$/.test(t)){let r=e.schedules[Number(t)-1];if(r)return r.expression}else{let r=t.replace(/\s+/g," "),o=e.schedules.find(i=>i.expression===r);if(o)return o.expression}let n=e.schedules.length===0?"\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32":e.schedules.map((r,o)=>` ${l(String(o+1),3)}${r.expression}`).join(`
22
- `);throw new s(`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32 "${t}" \u0E43\u0E19\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49`,`\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E25\u0E33\u0E14\u0E31\u0E1A\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49 (\u0E14\u0E39 \`pple cron\`)
23
- ${n}`)}var It=2e3;async function Se(e,t,n){let r=await(await p(e)).notes(t);if(n)return d(e.out,r);if(r.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01");return}e.out.say(`\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01 (${r.length})`);for(let o of r){let i=o.author.isYou?"\u0E04\u0E38\u0E13":o.author.name||"\u0E44\u0E21\u0E48\u0E17\u0E23\u0E32\u0E1A\u0E0A\u0E37\u0E48\u0E2D";e.out.say(""),e.out.say(` ${i} \xB7 ${Te(o.createdAt)}`);for(let a of o.body.split(`
24
- `))e.out.say(` ${a}`)}}async function Nt(e,t,n){let r=n.join(" ").trim();if(r===""&&!e.interactive&&(r=(await e.readStdin()).trim()),r==="")throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01",'\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple notes add "\u0E15\u0E23\u0E27\u0E08\u0E41\u0E25\u0E49\u0E27 \u0E1C\u0E48\u0E32\u0E19"` (\u0E2B\u0E23\u0E37\u0E2D pipe \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E17\u0E32\u0E07 stdin)');if(r.length>It)throw new s(`\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E22\u0E32\u0E27\u0E40\u0E01\u0E34\u0E19 ${It.toLocaleString("en-US")} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23`,`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E17\u0E35\u0E48\u0E2A\u0E48\u0E07\u0E21\u0E32\u0E22\u0E32\u0E27 ${r.length.toLocaleString("en-US")} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23`);await(await p(e)).addNote(t,r),e.out.say("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E25\u0E49\u0E27"),e.out.say("\u0E1C\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E08\u0E30\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E43\u0E19 PPLE Today \u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E01\u0E49\u0E44\u0E02\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E1A\u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49")}var qt={queued:"\u0E40\u0E02\u0E49\u0E32\u0E04\u0E34\u0E27\u0E41\u0E25\u0E49\u0E27",running:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E35\u0E27\u0E34\u0E27",completed:"\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E2A\u0E34\u0E49\u0E19",failed:"\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27"};function jt(e){return e.report&&e.status==="failed"?"completed":e.status}async function Ut(e,t,n,r){let i=(await(await p(e)).app(t)).codeReviews??[];if(r)return n===void 0?d(e.out,i):d(e.out,Lt(i,n));if(i.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"),e.out.say("\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E40\u0E23\u0E34\u0E48\u0E21\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14 \u0E1C\u0E25\u0E08\u0E30\u0E1B\u0E23\u0E32\u0E01\u0E0F\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E40\u0E2A\u0E23\u0E47\u0E08");return}if(n!==void 0)return Ot(e,Lt(i,n));Ot(e,i[0]);let a=i.slice(1);if(a.length>0){e.out.say(""),e.out.say("\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14\u0E04\u0E23\u0E31\u0E49\u0E07\u0E01\u0E48\u0E2D\u0E19");for(let u of a)e.out.say(` ${l(u.commit.slice(0,7),9)}${l(u.id,12)}${l(qt[jt(u)],12)}${Te(u.createdAt)}`);e.out.say("\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E14\u0E04\u0E23\u0E31\u0E49\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E14\u0E49\u0E27\u0E22 `pple reviews <id>`")}}function Lt(e,t){let n=e.find(r=>r.id===t||r.commit.startsWith(t));if(!n)throw new s(`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14 "${t}"`,"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 `pple reviews` \u0E41\u0E25\u0E49\u0E27\u0E43\u0E0A\u0E49 id \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15\u0E08\u0E32\u0E01\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E31\u0E49\u0E19");return n}function Ot(e,t){let n=jt(t);e.out.say(`\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14 ${t.commit.slice(0,7)} \xB7 ${qt[n]} \xB7 ${Te(t.createdAt)}`),n==="failed"&&t.failureReason&&e.out.say(`\u0E23\u0E35\u0E27\u0E34\u0E27\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08: ${t.failureReason}`),n==="completed"&&t.report&&(e.out.say(""),e.out.say(t.report.trimEnd()))}function Te(e){return`${e.slice(0,16).replace("T"," ")} UTC`}async function De(e,t,n){let r=await(await p(e)).collaborators(t);if(n)return d(e.out,r);if(e.out.say(`\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32 (${r.length})`),r.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"),e.out.say("\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E40\u0E15\u0E47\u0E21\u0E14\u0E49\u0E27\u0E22 `pple collaborators add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>`");return}for(let o of r)e.out.say(` ${l(o.maskedName??"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",12)}${l(o.phoneNumber??"-",16)}\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E21\u0E37\u0E48\u0E2D ${o.addedAt.slice(0,10)}`)}async function Mt(e,t,n){if(n.phone!==void 0&&n.confirm!==void 0)throw new s("\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E2B\u0E23\u0E37\u0E2D `--confirm` \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E43\u0E14\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E17\u0E31\u0E49\u0E07\u0E2A\u0E2D\u0E07","\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E04\u0E48\u0E2D\u0E22\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E17\u0E35\u0E48\u0E44\u0E14\u0E49");if(n.phone===void 0&&n.confirm===void 0)throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E02\u0E2D\u0E07\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E1E\u0E34\u0E48\u0E21","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple collaborators add 0812345678`");let r=await p(e);if(n.confirm!==void 0){let a=await r.confirmCollaborator(t,n.confirm);e.out.say(`\u0E40\u0E1E\u0E34\u0E48\u0E21 ${a.maskedName??"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"} \u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E41\u0E25\u0E49\u0E27`);return}let o=await r.lookupCollaborator(t,n.phone);if(!e.interactive)throw e.out.say(`\u0E1E\u0E1A ${o.maskedName} (${o.phoneNumber})`),e.out.say(`\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19 (\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E43\u0E19 10 \u0E19\u0E32\u0E17\u0E35): ${o.confirmationToken}`),e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E43\u0E04\u0E23"),new s("\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32","\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E27\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E19\u0E35\u0E49 \u0E41\u0E25\u0E49\u0E27\u0E08\u0E36\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <token>`");if(!await e.confirm(`\u0E40\u0E1E\u0E34\u0E48\u0E21 ${o.maskedName} (${o.phoneNumber}) \u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E43\u0E0A\u0E48\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48?`))throw new s("\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E43\u0E04\u0E23");await r.confirmCollaborator(t,o.confirmationToken),e.out.say(`\u0E40\u0E1E\u0E34\u0E48\u0E21 ${o.maskedName} \u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E41\u0E25\u0E49\u0E27`)}async function Gt(e,t,n){if(!n)throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E02\u0E2D\u0E07\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E08\u0E30\u0E19\u0E33\u0E2D\u0E2D\u0E01","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E14\u0E49\u0E27\u0E22 `pple collaborators`");let r=await p(e),i=(await r.collaborators(t)).find(a=>Lr(a,n));if(!i)throw new s(`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A "${n}"`,"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E14\u0E49\u0E27\u0E22 `pple collaborators` \u0E41\u0E25\u0E49\u0E27\u0E43\u0E0A\u0E49\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E15\u0E32\u0E21\u0E17\u0E35\u0E48\u0E41\u0E2A\u0E14\u0E07");await r.removeCollaborator(t,i.sub),e.out.say(`\u0E19\u0E33 ${i.maskedName??"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"} \u0E2D\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27`),e.out.say("\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E02\u0E2D\u0E07\u0E40\u0E02\u0E32\u0E08\u0E30\u0E2B\u0E22\u0E38\u0E14\u0E17\u0E31\u0E19\u0E17\u0E35")}function Lr(e,t){return e.sub===t?!0:e.phoneNumber!==void 0&&Bt(e.phoneNumber)===Bt(t)}function Bt(e){let t=e.replace(/[^\d]/g,"");return t.startsWith("66")&&t.length===11?`0${t.slice(2)}`:t}import qr from"node:fs/promises";import jr from"node:path";function Ft(e,t){return!e||e.mode==="everyone"?"\u0E17\u0E38\u0E01\u0E04\u0E19":e.mode==="unlisted"?"\u0E44\u0E21\u0E48\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23":e.roles.length===0?"\u0E17\u0E38\u0E01\u0E04\u0E19":e.roles.map(n=>Nr(n,t)).join(", ")}function Nr(e,t){return t?.find(n=>n.value===e)?.label??Ie(e)}function Ie(e){return e.startsWith(ie)?e.slice(ie.length):e}var ie="pple-ad:";function k(e,t=null){let n=e.payload;if(e.type==="publish"){let o=typeof n.customAddress=="string"?` \xB7 \u0E17\u0E35\u0E48 ${n.customAddress}`:"";return`\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48 \xB7 \u0E02\u0E36\u0E49\u0E19\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07 \xB7 ${Ft(n.visibility,t)}${o}`}if(e.type==="retire")return"\u0E04\u0E33\u0E02\u0E2D\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07 \xB7 \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E2D\u0E1B";if(e.type==="change"){let o=[];return n.displayName!==void 0&&o.push(`\u0E0A\u0E37\u0E48\u0E2D\u0E40\u0E1B\u0E47\u0E19 \u201C${n.displayName}\u201D`),n.iconKey!==void 0&&o.push("\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E43\u0E2B\u0E21\u0E48"),n.visibility!==void 0&&o.push(`\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E40\u0E1B\u0E47\u0E19 ${Ft(n.visibility,t)}`),`\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 \xB7 \u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19${o.join(" \u0E41\u0E25\u0E30 ")}`}let r=[];return typeof n.cpuMs=="number"&&r.push(`CPU ${n.cpuMs} ms/request`),typeof n.notificationsPerDay=="number"&&r.push(`\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E16\u0E36\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A ${n.notificationsPerDay} \u0E23\u0E32\u0E22/\u0E27\u0E31\u0E19`),typeof n.cronSchedules=="number"&&r.push(`\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32 ${n.cronSchedules} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`),typeof n.cronIntervalMinutes=="number"&&r.push(`\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E2B\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E44\u0E14\u0E49 ${n.cronIntervalMinutes} \u0E19\u0E32\u0E17\u0E35`),`\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32 \xB7 \u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21 ${r.length>0?r.join(" \u0E41\u0E25\u0E30 "):"\u0E42\u0E04\u0E27\u0E15\u0E32"}`}async function Vt(e,t){await(await p(e)).promoteToBeta(t),e.out.say("\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E02\u0E36\u0E49\u0E19\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27"),e.out.say(`\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E04\u0E38\u0E13\u0E40\u0E0A\u0E34\u0E0D\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14 ${N} \u0E04\u0E19 \u0E14\u0E49\u0E27\u0E22 \`pple invites add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>\``)}var Ur={PENDING:"\u0E23\u0E2D\u0E15\u0E2D\u0E1A\u0E23\u0E31\u0E1A",ACCEPTED:"\u0E15\u0E2D\u0E1A\u0E23\u0E31\u0E1A\u0E41\u0E25\u0E49\u0E27",DECLINED:"\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E41\u0E25\u0E49\u0E27"};async function Le(e,t,n){let r=await(await p(e)).invites(t);if(n)return d(e.out,r);let o=r.filter(i=>i.status!=="DECLINED").length;if(e.out.say(`\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49 (\u0E43\u0E0A\u0E49\u0E44\u0E1B ${o} \u0E08\u0E32\u0E01 ${N} \u0E17\u0E35\u0E48\u0E19\u0E31\u0E48\u0E07)`),r.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E0A\u0E34\u0E0D\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49");return}for(let i of r)e.out.say(` ${l(i.phoneNumber,16)}${Ur[i.status]}`)}async function Jt(e,t,n){if(!n)throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E34\u0E0D","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple invites add 0812345678`");let r=await(await p(e)).addInvite(t,n);e.out.say(`\u0E40\u0E0A\u0E34\u0E0D ${r.phoneNumber} \u0E41\u0E25\u0E49\u0E27`),e.out.say("\u0E1C\u0E39\u0E49\u0E16\u0E39\u0E01\u0E40\u0E0A\u0E34\u0E0D\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E14\u0E15\u0E2D\u0E1A\u0E23\u0E31\u0E1A\u0E43\u0E19 PPLE Today")}async function Kt(e,t,n){if(!n)throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E02\u0E2D\u0E07\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E19\u0E33\u0E2D\u0E2D\u0E01","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 `pple invites` \u0E41\u0E25\u0E49\u0E27\u0E43\u0E0A\u0E49\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E15\u0E32\u0E21\u0E17\u0E35\u0E48\u0E41\u0E2A\u0E14\u0E07");await(await p(e)).removeInvite(t,n),e.out.say(`\u0E19\u0E33\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E02\u0E2D\u0E07 ${n} \u0E2D\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27`)}async function Wt(e,t){let n=await(await p(e)).roleOptions();if(t)return d(e.out,n);for(let r of n)e.out.say(` ${l(Ie(r.value),24)}${r.label}`);e.out.say(""),e.out.say("\u0E43\u0E0A\u0E49\u0E0A\u0E37\u0E48\u0E2D\u0E22\u0E48\u0E2D\u0E2B\u0E23\u0E37\u0E2D\u0E0A\u0E37\u0E48\u0E2D\u0E44\u0E17\u0E22\u0E01\u0E31\u0E1A `--roles` \u0E40\u0E0A\u0E48\u0E19 `--roles hq,\u0E2A.\u0E2A.`")}function Ht(e,t){let n=(t??"").split(",").map(o=>o.trim()).filter(o=>o!=="");if(e===void 0&&n.length===0)return;let r=e??"roles";if(r!=="everyone"&&r!=="roles"&&r!=="unlisted")throw new s(`\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19 "${r}"`,"\u0E40\u0E25\u0E37\u0E2D\u0E01 `everyone` (\u0E17\u0E38\u0E01\u0E04\u0E19), `roles` (\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E1A\u0E32\u0E07\u0E1A\u0E17\u0E1A\u0E32\u0E17 \u0E1E\u0E23\u0E49\u0E2D\u0E21 `--roles`) \u0E2B\u0E23\u0E37\u0E2D `unlisted` (\u0E44\u0E21\u0E48\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23)");if(r==="roles"&&n.length===0)throw new s("\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E1A\u0E32\u0E07\u0E1A\u0E17\u0E1A\u0E32\u0E17 \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E14\u0E49\u0E27\u0E22 `--roles`","\u0E14\u0E39\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E14\u0E49\u0E27\u0E22 `pple roles`");if(r!=="roles"&&n.length>0)throw new s(`\u0E43\u0E0A\u0E49 \`--roles\` \u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E1A \`--visibility ${r}\` \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,"`--roles` \u0E43\u0E0A\u0E49\u0E01\u0E31\u0E1A `--visibility roles` \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19");return{mode:r,roles:n}}async function Yt(e,t){if(t.length===0)return[];let n=await e.roleOptions(),r=t.map(i=>Br(n,i)),o=t[r.indexOf(void 0)];if(o!==void 0)throw new s(`\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E1A\u0E17\u0E1A\u0E32\u0E17 "${o}"`,"\u0E14\u0E39\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E14\u0E49\u0E27\u0E22 `pple roles`");return[...new Set(r)]}function Br(e,t){let n=t.toLowerCase();return e.find(r=>r.value.toLowerCase()===n||r.value.toLowerCase()===`${ie}${n}`||r.label.toLowerCase()===n)?.value}async function Xt(e,t){let n=await qr.readFile(jr.resolve(e.cwd,t)).catch(()=>null);if(n===null)throw new s(`\u0E2D\u0E48\u0E32\u0E19\u0E44\u0E1F\u0E25\u0E4C ${t} \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E1E\u0E32\u0E18\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");return new Uint8Array(n)}function zt(e){return{visibility:e.mode,roles:e.roles}}function ae(e,t,n,r){e.out.say(t),e.out.say(` ${k(n,r)}`),e.out.say("\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E08\u0E30\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32 \u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple requests`")}async function Qt(e,t,n){let r=Ht(n.visibility,n.roles)??{mode:"everyone",roles:[]};if(r.mode!=="unlisted"&&n.icon===void 0)throw new s("\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E44\u0E2D\u0E04\u0E2D\u0E19","\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E1F\u0E25\u0E4C PNG, JPEG \u0E2B\u0E23\u0E37\u0E2D WebP \u0E14\u0E49\u0E27\u0E22 `--icon <\u0E44\u0E1F\u0E25\u0E4C>` (\u0E2B\u0E23\u0E37\u0E2D\u0E43\u0E0A\u0E49 `--visibility unlisted` \u0E16\u0E49\u0E32\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23)");let o=n.address?.trim().toLowerCase();if(n.confirm!==void 0&&o===void 0)throw new s("`--confirm` \u0E43\u0E0A\u0E49\u0E04\u0E39\u0E48\u0E01\u0E31\u0E1A `--address` \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19");let i=n.icon===void 0?void 0:await Xt(e,n.icon),a=await p(e),u={mode:r.mode,roles:await Yt(a,r.roles)};o!==void 0&&await Mr(e,a,t,o,n.confirm);let c=i?(await a.uploadIcon(i)).key:void 0,h=await a.fileRequest(t,{type:"publish",...zt(u),...c?{iconKey:c}:{},...o?{customAddress:o}:{}});ae(e,"\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E41\u0E25\u0E49\u0E27",h,await nn(a,u))}async function Mr(e,t,n,r,o){let i=await t.app(n),a=new URL(i.url).host.split(".").slice(1).join("."),u=`${r}.${a}`;if(o!==void 0){if(o.trim().toLowerCase()!==r)throw new s(`\`--confirm ${o}\` \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E02\u0E2D ("${r}")`,"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D")}else if(e.interactive){if(!await e.confirm(`\u0E02\u0E2D\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07 ${u} \u0E43\u0E0A\u0E48\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48? (\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34)`))throw new s("\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D")}else throw new s(`\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07 ${u} \u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E19\u0E31\u0E49\u0E19`,"\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E08\u0E36\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <address>` \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A `--address`")}async function Zt(e,t,n){let r=Ht(n.visibility,n.roles),o=n.name?.trim();if(o===void 0&&n.icon===void 0&&r===void 0)throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07",'\u0E43\u0E0A\u0E49 `--name "\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48"`, `--icon <\u0E44\u0E1F\u0E25\u0E4C>` \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D `--visibility`');let i=n.icon===void 0?void 0:await Xt(e,n.icon),a=await p(e),u=r&&{mode:r.mode,roles:await Yt(a,r.roles)},c=i?(await a.uploadIcon(i)).key:void 0,h=await a.fileRequest(t,{type:"change",...o!==void 0?{name:o}:{},...c?{iconKey:c}:{},...u?zt(u):{}});ae(e,"\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E41\u0E25\u0E49\u0E27",h,await nn(a,u))}async function en(e,t,n){let r=se(n.cpuMs,"--cpu-ms"),o=se(n.notifications,"--notifications"),i=se(n.cronSchedules,"--cron-schedules"),a=se(n.cronInterval,"--cron-interval");if(r===void 0&&o===void 0&&i===void 0&&a===void 0)throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23","\u0E43\u0E0A\u0E49 `--cpu-ms <ms>` (CPU \u0E15\u0E48\u0E2D request) `--notifications <\u0E23\u0E32\u0E22/\u0E27\u0E31\u0E19>` `--cron-schedules <\u0E08\u0E33\u0E19\u0E27\u0E19>` \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D `--cron-interval <\u0E19\u0E32\u0E17\u0E35>`");let u=await(await p(e)).fileRequest(t,{type:"limit",...r!==void 0?{cpuMs:r}:{},...o!==void 0?{notificationsPerDay:o}:{},...i!==void 0?{cronSchedules:i}:{},...a!==void 0?{cronIntervalMinutes:a}:{}});ae(e,"\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32\u0E41\u0E25\u0E49\u0E27",u,null)}function se(e,t){if(e===void 0)return;let n=Number(e);if(!/^\d+$/.test(e)||!Number.isSafeInteger(n)||n<=0)throw new s(`\`${t}\` \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21\u0E1A\u0E27\u0E01`,`\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A "${e}"`);return n}async function tn(e,t){let n=await(await p(e)).fileRequest(t,{type:"retire"});ae(e,"\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27",n,null)}async function nn(e,t){return t?.mode!=="roles"?null:e.roleOptions().catch(()=>null)}async function rn(e,t,n){let r=await p(e),o=await r.requests(t);if(n)return d(e.out,o);if(o.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E02\u0E2D");return}let i=o.some(a=>a.payload.visibility?.mode==="roles")?await r.roleOptions().catch(()=>null):null;e.out.say(`\u0E04\u0E33\u0E02\u0E2D\u0E02\u0E2D\u0E07 ${t}`);for(let a of o){let u=a.reason?` \u2014 ${a.reason}`:"";e.out.say(` ${l(v(te,a.status),13)} ${k(a,i)}${u}`)}}import Fr from"node:fs/promises";import Vr from"node:path";async function on(e,t,n=!1){let o=await(await p(e)).env(t);if(n)return d(e.out,o);if(o.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E43\u0E14 \u0E46"),e.out.say("\u0E15\u0E31\u0E27\u0E41\u0E1B\u0E23\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E31\u0E49\u0E07\u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B");return}for(let i of o)i.secret?e.out.say(`${i.key}=(secret)`):e.out.say(`${i.key}=${i.value??""}`);e.out.say(""),e.out.say("\u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B")}async function sn(e,t,n){let r=await Jr(e,n),i=await(await p(e)).setEnv(t,n.key,r,n.secret);e.out.say(`\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01 ${i.key}${i.secret?" (secret)":""} \u0E41\u0E25\u0E49\u0E27`),e.out.say("\u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B")}async function an(e,t,n){await(await p(e)).deleteEnv(t,n),e.out.say(`\u0E25\u0E1A ${n} \u0E41\u0E25\u0E49\u0E27`),e.out.say("\u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B")}async function Jr(e,t){if(t.file!==void 0&&t.value!==void 0)throw new s("\u0E2A\u0E48\u0E07\u0E04\u0E48\u0E32\u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19 argument \u0E2B\u0E23\u0E37\u0E2D\u0E1C\u0E48\u0E32\u0E19 `--file` \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E43\u0E14\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E17\u0E31\u0E49\u0E07\u0E2A\u0E2D\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07");if(t.file!==void 0){let n=Vr.resolve(e.cwd,t.file),r=await Fr.readFile(n,"utf8").catch(()=>null);if(r===null)throw new s(`\u0E2D\u0E48\u0E32\u0E19\u0E44\u0E1F\u0E25\u0E4C ${t.file} \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E1E\u0E32\u0E18\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");return r}if(t.value!==void 0)return t.value;if(e.interactive)throw new s("`pple env set` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E04\u0E48\u0E32","\u0E2A\u0E48\u0E07\u0E04\u0E48\u0E32\u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19 argument \u0E1C\u0E48\u0E32\u0E19 `--file` \u0E2B\u0E23\u0E37\u0E2D pipe \u0E17\u0E32\u0E07 stdin");return e.readStdin()}async function un(e,t,n=!1){let r=await p(e),o=await r.app(t),i=o.role!=="collaborator",[a,u,c,h]=await Promise.all([r.metrics(t),r.deploys(t),r.env(t),i?Wr(r,t):Promise.resolve(null)]);if(n)return d(e.out,{app:o,usage:a,deploys:u,env:c,...h??{}});Hr(e,o),Yr(e,a),Xr(e,u),zr(e,c),h&&(Qr(e,o,h.requests,h.invites),Zr(e,h.collaborators),eo(e,h.requests)),e.out.say(""),e.out.say("\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple env set` / `pple redeploy` (\u0E04\u0E48\u0E32 env), `pple request` (\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07 \u0E42\u0E04\u0E27\u0E15\u0E32),"),e.out.say("`pple promote` / `pple invites` (\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49), `pple collaborators` (\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32) \u2014 \u0E14\u0E39\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E14\u0E49\u0E27\u0E22 `pple help`")}async function Wr(e,t){let[n,r,o]=await Promise.all([e.collaborators(t),e.requests(t),e.invites(t)]);return{collaborators:n,requests:r,invites:o}}function Hr(e,t){e.out.say(t.name),e.out.say(` ${l("slug",18)}${t.slug}`),e.out.say(` ${l("URL",18)}${t.url}`),t.customAddress&&e.out.say(` ${l("\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",18)}${t.customAddress}`),e.out.say(` ${l("\u0E2A\u0E16\u0E32\u0E19\u0E30",18)}${v(Z,t.status)}`),e.out.say(` ${l("\u0E01\u0E32\u0E23\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48",18)}${v(q,t.tier??"draft")}`),t.role&&e.out.say(` ${l("\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",18)}${v(ee,t.role)}`),t.deploy&&e.out.say(` ${l("\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19",18)}${v(_,t.deploy.status)}`+(t.deploy.message?` \u2014 ${t.deploy.message}`:"")),t.error&&e.out.say(` ${l("\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",18)}${t.error}`)}function Yr(e,t){e.out.say(""),e.out.say("\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E41\u0E25\u0E30\u0E42\u0E04\u0E27\u0E15\u0E32\u0E17\u0E23\u0E31\u0E1E\u0E22\u0E32\u0E01\u0E23"),e.out.say(` ${l("CPU \u0E15\u0E48\u0E2D request",20)}${t.limits.cpuMs} ms`),e.out.say(` ${l("\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E16\u0E36\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A",20)}${U(t.usage.notificationsSent)}`+(t.usage.notificationsSent===null?" (\u0E14\u0E39\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49)":` \u0E23\u0E32\u0E22 \u0E08\u0E32\u0E01\u0E42\u0E04\u0E27\u0E15\u0E32 ${U(t.limits.notificationsPerDay)} \u0E23\u0E32\u0E22/\u0E27\u0E31\u0E19`)),e.out.say(` ${l("\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 (24 \u0E0A\u0E21.)",20)}${U(t.usage.errors)}`+(t.usage.errors===null?" (\u0E14\u0E39\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49)":t.usage.errors===0?" (\u0E44\u0E21\u0E48\u0E21\u0E35\u0E43\u0E19 24 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07\u0E17\u0E35\u0E48\u0E1C\u0E48\u0E32\u0E19\u0E21\u0E32)":t.usage.requests===null?" (\u0E04\u0E33\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27\u0E43\u0E19 24 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07\u0E17\u0E35\u0E48\u0E1C\u0E48\u0E32\u0E19\u0E21\u0E32)":` \u0E08\u0E32\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14 ${U(t.usage.requests)} \u0E04\u0E33\u0E02\u0E2D`)),e.out.say(` ${l("\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B",20)}${U(t.usage.appUsers)}`+(t.usage.appUsers===null?" (\u0E14\u0E39\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49)":""))}function U(e){return e===null?"\u2014":String(e)}function Xr(e,t){if(e.out.say(""),e.out.say("\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35");return}for(let n of t.slice(0,10)){let r=n.commit.slice(0,7),o=n.message?` \u2014 ${n.message}`:"",i=v(_,n.status);e.out.say(` ${l(i,13)} ${r}${o}`)}}function zr(e,t){if(e.out.say(""),e.out.say("\u0E04\u0E48\u0E32 env"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E43\u0E14 \u0E46");return}for(let n of t)n.secret?e.out.say(` ${n.key}=(secret)`):e.out.say(` ${n.key}=${n.value??""}`)}function Qr(e,t,n,r){e.out.say(""),e.out.say("\u0E01\u0E32\u0E23\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48"),e.out.say(` ${l("\u0E23\u0E30\u0E14\u0E31\u0E1A",18)}${v(q,t.tier??"draft")}`),t.customAddress&&e.out.say(` ${l("\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",18)}${t.customAddress}`);let o=n.find(i=>i.type==="publish"&&i.status==="pending");if(o&&e.out.say(` ${l("\u0E04\u0E33\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E23\u0E2D\u0E2D\u0E22\u0E39\u0E48",18)}${k(o)}`),t.tier==="beta"){let i=r.filter(a=>a.status!=="DECLINED").length;e.out.say(` ${l("\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49",18)}\u0E43\u0E0A\u0E49\u0E44\u0E1B ${i} \u0E08\u0E32\u0E01 ${N} \u0E17\u0E35\u0E48\u0E19\u0E31\u0E48\u0E07`)}}function Zr(e,t){if(e.out.say(""),e.out.say("\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35");return}for(let n of t){let r=n.maskedName??"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",o=n.phoneNumber?` (${n.phoneNumber})`:"";e.out.say(` ${r}${o}`)}}function eo(e,t){if(e.out.say(""),e.out.say("\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E04\u0E33\u0E02\u0E2D"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35");return}for(let n of t.slice(0,10)){let r=n.reason?` \u2014 ${n.reason}`:"",o=v(te,n.status);e.out.say(` ${l(o,13)} ${k(n)}${r}`)}}import yn from"node:fs/promises";import B from"node:path";import S from"node:fs/promises";import mn from"node:path";import{realpath as to}from"node:fs/promises";import Oe from"node:path";var Ne="@pplethai/cli",E=`npm install -g ${Ne}`;async function ue(e){let t=await e.fetch(`${e.config.registryBase}/${Ne}/latest`,{headers:{accept:"application/json"}}).catch(()=>null);if(!t?.ok)return null;let n=await t.json().catch(()=>null);return typeof n?.version=="string"&&n.version!==""?n.version:null}async function le(e){let t=await e.run("npm",["root","-g"],{cwd:e.cwd}).catch(()=>null);if(!t||t.code!==0)return!1;let n=t.stdout.trim();return n===""?!1:no(n,e.packageDir)}function pe(e,t){return e.run("npm",["install","-g",`${Ne}@${t}`],{cwd:e.cwd}).catch(n=>({code:1,stdout:"",stderr:n instanceof Error?n.message:String(n)}))}async function no(e,t){let[n,r]=await Promise.all([ln(e),ln(t)]),o=Oe.relative(n,r);return o!==""&&!o.startsWith("..")&&!Oe.isAbsolute(o)}async function ln(e){return to(e).catch(()=>Oe.resolve(e))}function ce(e,t){let n=pn(e),r=pn(t);if(!n)return!1;if(!r)return!0;for(let o=0;o<3;o+=1)if(n.parts[o]!==r.parts[o])return n.parts[o]>r.parts[o];return ro(n.prerelease,r.prerelease)>0}function pn(e){let t=/^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(e.trim());return t?{parts:[Number(t[1]),Number(t[2]),Number(t[3])],prerelease:t[4]?t[4].split("."):[]}:null}function ro(e,t){if(e.length===0&&t.length===0)return 0;if(e.length===0)return 1;if(t.length===0)return-1;for(let n=0;n<Math.max(e.length,t.length);n+=1){let r=e[n],o=t[n];if(r===void 0)return-1;if(o===void 0)return 1;let i=/^\d+$/.test(r)&&/^\d+$/.test(o);if(r!==o)return i?Number(r)>Number(o)?1:-1:r>o?1:-1}return 0}function cn(e){return`${e.stderr}
165
+ `).trim()}async function po(e,t){await(await E(e)).redeploy(t),e.out.say("\u0E40\u0E23\u0E34\u0E48\u0E21\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E43\u0E2B\u0E21\u0E48\u0E41\u0E25\u0E49\u0E27"),e.out.say("\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E04\u0E48\u0E32 env \u0E41\u0E25\u0E30 secret \u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E19\u0E35\u0E49"),e.out.say("\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E04\u0E27\u0E32\u0E21\u0E04\u0E37\u0E1A\u0E2B\u0E19\u0E49\u0E32\u0E14\u0E49\u0E27\u0E22 `pple deploys`")}async function mo(e,t,n,s){let r=await(await E(e)).deploys(t);if(n===void 0)return s?L(e.out,r):op(e,t,r);let i=r.find(o=>o.id===n||o.commit.startsWith(n));if(!i)throw new u(`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22 "${n}"`,"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple deploys` \u0E41\u0E25\u0E49\u0E27\u0E43\u0E0A\u0E49 id \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15\u0E08\u0E32\u0E01\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E31\u0E49\u0E19");if(s)return L(e.out,i);ap(e,i)}function op(e,t,n){if(n.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22"),e.out.say("\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E36\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 `pple deploy` \u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B");return}e.out.say(`\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E02\u0E2D\u0E07 ${t}`);for(let s of n.slice(0,20)){let r=s.message?` \u2014 ${s.message}`:"";e.out.say(` ${$(V(xe,s.status),13)} ${$(s.commit.slice(0,7),9)}${$(s.id,12)}${$s(s.createdAt)}${r}`)}e.out.say(""),e.out.say("\u0E2D\u0E48\u0E32\u0E19\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E41\u0E25\u0E30\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E02\u0E2D\u0E07\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E14\u0E04\u0E23\u0E31\u0E49\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E14\u0E49\u0E27\u0E22 `pple deploys <id>`")}function ap(e,t){e.out.say(`\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22 ${t.id}`),e.out.say(` ${$("\u0E2A\u0E16\u0E32\u0E19\u0E30",12)}${V(xe,t.status)}`),e.out.say(` ${$("\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15",12)}${t.commit.slice(0,7)}`),t.message&&e.out.say(` ${$("\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21",12)}${t.message}`),e.out.say(` ${$("\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E21\u0E37\u0E48\u0E2D",12)}${$s(t.createdAt)}`),t.completedAt&&e.out.say(` ${$("\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E40\u0E21\u0E37\u0E48\u0E2D",12)}${$s(t.completedAt)}`),t.error&&e.out.say(` ${$("\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",12)}${t.error}`);let n=t.migrations.applied??[];n.length>0&&e.out.say(` ${$("migration",12)}\u0E43\u0E0A\u0E49 ${n.length} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23: ${n.join(", ")}`),t.log&&(e.out.say(""),e.out.say("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C"),e.out.say(t.log.trimEnd()))}function $s(e){return`${e.slice(0,16).replace("T"," ")} UTC`}async function ho(e,t,n){let s=n.join(" ").trim();if(s==="")throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B",'\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple rename "\u0E25\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23"`');let r=await(await E(e)).renameApp(t,s);e.out.say(`\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E40\u0E1B\u0E47\u0E19 "${r.name}" \u0E41\u0E25\u0E49\u0E27`)}var lp="\u0E01\u0E32\u0E23\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E08\u0E30\u0E2B\u0E22\u0E38\u0E14\u0E41\u0E2D\u0E1B \u0E19\u0E33\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01 PPLE Today \u0E41\u0E25\u0E30\u0E40\u0E01\u0E47\u0E1A\u0E42\u0E04\u0E49\u0E14\u0E40\u0E02\u0E49\u0E32\u0E04\u0E25\u0E31\u0E07 \u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E08\u0E30\u0E22\u0E31\u0E07\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E27\u0E49 \u2014 \u0E21\u0E35\u0E40\u0E1E\u0E35\u0E22\u0E07\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E17\u0E35\u0E48\u0E25\u0E1A\u0E44\u0E14\u0E49 \u0E41\u0E25\u0E30\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49";async function go(e,t,n){let s=await E(e),r=await s.app(t);if(r.status==="retired"){e.out.say(`"${r.name}" \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27`);return}if(r.tier==="live")throw new u("\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E2D\u0E22\u0E39\u0E48 \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E40\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49","\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32\u0E14\u0E49\u0E27\u0E22 `pple request retire`");if(e.out.say(lp),n!==void 0){if(n!==t)throw new u(`\`--confirm ${n}\` \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E08\u0E30\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07 ("${t}")`,"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E2D\u0E30\u0E44\u0E23")}else if(e.interactive){if((await e.ask(`\u0E1E\u0E34\u0E21\u0E1E\u0E4C ${t} \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E01\u0E32\u0E23\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07:`)).trim()!==t)throw new u("\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E2D\u0E30\u0E44\u0E23")}else throw new u("\u0E01\u0E32\u0E23\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22 slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B","\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E08\u0E36\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <slug>` \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E08\u0E30\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07");await s.retireApp(t),e.out.say(`\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E41\u0E25\u0E49\u0E27: ${r.name}`)}async function yo(e,t){e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E25\u0E2D\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E43\u0E2B\u0E21\u0E48\u2026");let n=await(await E(e)).provision(t);if(n.status!=="ready")throw new u(`\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 ${n.name} \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08`,n.error?`\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1E\u0E1A\u0E1B\u0E31\u0E0D\u0E2B\u0E32: ${n.error}`:"\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48 \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21");e.out.say(`\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 ${n.name} \u0E40\u0E2A\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27`)}var cp="\u0E43\u0E19\u0E10\u0E32\u0E19\u0E30\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32 \u0E04\u0E38\u0E13\u0E15\u0E01\u0E25\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E23\u0E31\u0E1A\u0E1C\u0E34\u0E14\u0E0A\u0E2D\u0E1A \u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E08\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E1A\u0E19\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E1E\u0E37\u0E49\u0E19\u0E10\u0E32\u0E19\u0E17\u0E35\u0E48\u0E1E\u0E23\u0E23\u0E04\u0E14\u0E39\u0E41\u0E25 \u0E2D\u0E22\u0E39\u0E48\u0E20\u0E32\u0E22\u0E43\u0E15\u0E49\u0E42\u0E04\u0E27\u0E15\u0E32\u0E17\u0E23\u0E31\u0E1E\u0E22\u0E32\u0E01\u0E23\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 \u0E41\u0E25\u0E30\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E40\u0E04\u0E22\u0E40\u0E1B\u0E34\u0E14\u0E41\u0E2D\u0E1B\u0E19\u0E31\u0E49\u0E19\u0E41\u0E25\u0E49\u0E27\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19 \u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E04\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E1C\u0E34\u0E14\u0E0A\u0E2D\u0E1A\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E36\u0E49\u0E19";async function wo(e){let t=await E(e);if((await t.me()).isBuilder){e.out.say("\u0E04\u0E38\u0E13\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E41\u0E25\u0E49\u0E27");return}if(!e.interactive)throw new u("\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E2B\u0E49\u0E15\u0E31\u0E27\u0E04\u0E38\u0E13\u0E40\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A","\u0E23\u0E31\u0E19 `pple agreement` \u0E43\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E40\u0E2D\u0E07 \u0E2B\u0E23\u0E37\u0E2D\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E17\u0E35\u0E48 https://console.ppleth.ai");if(e.out.say("\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32"),e.out.say(),e.out.say(cp),e.out.say(),!await e.confirm("\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E19\u0E35\u0E49\u0E41\u0E25\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32?"))throw new u("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07","\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E44\u0E14\u0E49\u0E17\u0E38\u0E01\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E14\u0E49\u0E27\u0E22 `pple agreement`");await t.acceptAgreement(),e.out.say('\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E40\u0E23\u0E34\u0E48\u0E21\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B"`')}var As={ok:"\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",failed:"\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",timeout:"\u0E2B\u0E21\u0E14\u0E40\u0E27\u0E25\u0E32"},up={schedule:"\u0E15\u0E32\u0E21\u0E40\u0E27\u0E25\u0E32",manual:"\u0E2A\u0E31\u0E48\u0E07\u0E23\u0E31\u0E19\u0E40\u0E2D\u0E07"};async function Ps(e,t,n){let s=await(await E(e)).cron(t);if(n)return L(e.out,s);if(e.out.say(`\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E02\u0E2D\u0E07 ${t}`),e.out.say(` ${fp(s)}`),s.schedules.length===0){e.out.say(""),e.out.say("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32"),e.out.say("\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E43\u0E19 wrangler.jsonc \u0E40\u0E1B\u0E47\u0E19 `triggers.crons` (\u0E40\u0E27\u0E25\u0E32 UTC) \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E40\u0E02\u0E35\u0E22\u0E19 `scheduled()` \u0E43\u0E19\u0E42\u0E04\u0E49\u0E14 \u0E41\u0E25\u0E49\u0E27\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22");return}let r=s.state!=="running";s.schedules.forEach((i,o)=>{if(e.out.say(""),e.out.say(` ${o+1}. ${i.expression} ${i.summary}`),!r&&i.nextRunAt&&e.out.say(` \u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B ${pe(i.nextRunAt)} (\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22)`),i.last){let a=i.last.trigger?` \xB7 ${up[i.last.trigger]}`:"",l=i.last.durationMs===null?"":` \xB7 ${i.last.durationMs} ms`;e.out.say(` \u0E04\u0E23\u0E31\u0E49\u0E07\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14 ${pe(i.last.at)} (\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22) \xB7 ${As[i.last.outcome]}${l}${a}`),i.last.error&&e.out.say(` \u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 ${i.last.error}`)}else e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E04\u0E22\u0E23\u0E31\u0E19")}),e.out.say(""),e.out.say("\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C cron \u0E02\u0E49\u0E32\u0E07\u0E1A\u0E19\u0E04\u0E37\u0E2D\u0E40\u0E27\u0E25\u0E32 UTC \u0E15\u0E32\u0E21\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E43\u0E19 wrangler.jsonc \u0E2A\u0E48\u0E27\u0E19\u0E40\u0E27\u0E25\u0E32\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B/\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22"),e.out.say(`\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 ${s.limits.maxSchedules} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 \u0E2B\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 ${s.limits.minIntervalMinutes} \u0E19\u0E32\u0E17\u0E35 (\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E14\u0E49\u0E27\u0E22 \`pple request limit --cron-schedules <\u0E08\u0E33\u0E19\u0E27\u0E19>\`)`)}function fp(e){return e.state==="paused"?`\u0E2B\u0E22\u0E38\u0E14\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27${e.pausedAt?` \u0E15\u0E31\u0E49\u0E07\u0E41\u0E15\u0E48 ${pe(e.pausedAt)} (\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22)`:""} \u2014 \u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19\u0E08\u0E19\u0E01\u0E27\u0E48\u0E32\u0E08\u0E30\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19 \u0E43\u0E0A\u0E49 \`pple cron resume\` (\u0E2A\u0E31\u0E48\u0E07\u0E23\u0E31\u0E19\u0E40\u0E2D\u0E07\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 \`pple cron run\`)`:e.state==="stopped"?"\u0E2B\u0E22\u0E38\u0E14\u0E17\u0E33\u0E07\u0E32\u0E19\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48 \u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E08\u0E30\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19\u0E2D\u0E35\u0E01":"\u0E17\u0E33\u0E07\u0E32\u0E19\u0E2D\u0E22\u0E39\u0E48"}async function bo(e,t,n){let s=await(await E(e)).pauseCron(t);if(n)return L(e.out,s);e.out.say("\u0E2B\u0E22\u0E38\u0E14\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27\u0E41\u0E25\u0E49\u0E27"),e.out.say("\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49\u0E22\u0E31\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E04\u0E23\u0E1A \u0E41\u0E15\u0E48\u0E08\u0E30\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19\u0E15\u0E32\u0E21\u0E40\u0E27\u0E25\u0E32\u0E08\u0E19\u0E01\u0E27\u0E48\u0E32\u0E08\u0E30\u0E23\u0E31\u0E19 `pple cron resume`"),e.out.say("\u0E2A\u0E31\u0E48\u0E07\u0E23\u0E31\u0E19\u0E04\u0E23\u0E31\u0E49\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27\u0E17\u0E31\u0E19\u0E17\u0E35\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple cron run <\u0E25\u0E33\u0E14\u0E31\u0E1A>` \u0E41\u0E21\u0E49\u0E08\u0E30\u0E2B\u0E22\u0E38\u0E14\u0E2D\u0E22\u0E39\u0E48")}async function vo(e,t,n){let s=await(await E(e)).resumeCron(t);if(n)return L(e.out,s);e.out.say("\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19\u0E41\u0E25\u0E49\u0E27"),e.out.say("\u0E0A\u0E48\u0E27\u0E07\u0E17\u0E35\u0E48\u0E2B\u0E22\u0E38\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E23\u0E31\u0E19\u0E22\u0E49\u0E2D\u0E19\u0E2B\u0E25\u0E31\u0E07 \u0E07\u0E32\u0E19\u0E08\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E15\u0E32\u0E21\u0E40\u0E27\u0E25\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B \u0E14\u0E39\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple cron`")}async function So(e,t,n,s){let r=n.join(" ").trim();if(r==="")throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E08\u0E30\u0E23\u0E31\u0E19",'\u0E43\u0E0A\u0E49\u0E25\u0E33\u0E14\u0E31\u0E1A\u0E08\u0E32\u0E01 `pple cron` \u0E40\u0E0A\u0E48\u0E19 `pple cron run 1` \u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C \u0E40\u0E0A\u0E48\u0E19 `pple cron run "0 1 * * *"`');let i=await E(e),o=await i.cron(t),a=mp(o,r);s||e.out.say(`\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E31\u0E19 ${a} \u2026`);let l=await i.runCron(t,a);if(s?L(e.out,l):pp(e,l),l.outcome!=="ok")throw new u(`\u0E23\u0E31\u0E19 ${a} ${As[l.outcome]}`,l.error??void 0)}function pp(e,t){e.out.say(`${t.expression} ${As[t.outcome]} \xB7 ${t.durationMs} ms`),t.error&&e.out.say(` ${t.error}`)}function mp(e,t){if(/^\d+$/.test(t)){let s=e.schedules[Number(t)-1];if(s)return s.expression}else{let s=t.replace(/\s+/g," "),r=e.schedules.find(i=>i.expression===s);if(r)return r.expression}let n=e.schedules.length===0?"\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32":e.schedules.map((s,r)=>` ${$(String(r+1),3)}${s.expression}`).join(`
166
+ `);throw new u(`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32 "${t}" \u0E43\u0E19\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49`,`\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E25\u0E33\u0E14\u0E31\u0E1A\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49 (\u0E14\u0E39 \`pple cron\`)
167
+ ${n}`)}var ko=2e3;async function Ns(e,t,n){let s=await(await E(e)).notes(t);if(n)return L(e.out,s);if(s.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01");return}e.out.say(`\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01 (${s.length})`);for(let r of s){let i=r.author.isYou?"\u0E04\u0E38\u0E13":r.author.name||"\u0E44\u0E21\u0E48\u0E17\u0E23\u0E32\u0E1A\u0E0A\u0E37\u0E48\u0E2D";e.out.say(""),e.out.say(` ${i} \xB7 ${Cs(r.createdAt)}`);for(let o of r.body.split(`
168
+ `))e.out.say(` ${o}`)}}async function Ao(e,t,n){let s=n.join(" ").trim();if(s===""&&!e.interactive&&(s=(await e.readStdin()).trim()),s==="")throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01",'\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple notes add "\u0E15\u0E23\u0E27\u0E08\u0E41\u0E25\u0E49\u0E27 \u0E1C\u0E48\u0E32\u0E19"` (\u0E2B\u0E23\u0E37\u0E2D pipe \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E17\u0E32\u0E07 stdin)');if(s.length>ko)throw new u(`\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E22\u0E32\u0E27\u0E40\u0E01\u0E34\u0E19 ${ko.toLocaleString("en-US")} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23`,`\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E17\u0E35\u0E48\u0E2A\u0E48\u0E07\u0E21\u0E32\u0E22\u0E32\u0E27 ${s.length.toLocaleString("en-US")} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23`);await(await E(e)).addNote(t,s),e.out.say("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E25\u0E49\u0E27"),e.out.say("\u0E1C\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E08\u0E30\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E43\u0E19 PPLE Today \u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E01\u0E49\u0E44\u0E02\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E1A\u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49")}var Po={queued:"\u0E40\u0E02\u0E49\u0E32\u0E04\u0E34\u0E27\u0E41\u0E25\u0E49\u0E27",running:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E35\u0E27\u0E34\u0E27",completed:"\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E2A\u0E34\u0E49\u0E19",failed:"\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27"};function No(e){return e.report&&e.status==="failed"?"completed":e.status}async function Co(e,t,n,s){let i=(await(await E(e)).app(t)).codeReviews??[];if(s)return n===void 0?L(e.out,i):L(e.out,Eo(i,n));if(i.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"),e.out.say("\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E40\u0E23\u0E34\u0E48\u0E21\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14 \u0E1C\u0E25\u0E08\u0E30\u0E1B\u0E23\u0E32\u0E01\u0E0F\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E40\u0E2A\u0E23\u0E47\u0E08");return}if(n!==void 0)return $o(e,Eo(i,n));$o(e,i[0]);let o=i.slice(1);if(o.length>0){e.out.say(""),e.out.say("\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14\u0E04\u0E23\u0E31\u0E49\u0E07\u0E01\u0E48\u0E2D\u0E19");for(let a of o)e.out.say(` ${$(a.commit.slice(0,7),9)}${$(a.id,12)}${$(Po[No(a)],12)}${Cs(a.createdAt)}`);e.out.say("\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E14\u0E04\u0E23\u0E31\u0E49\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E14\u0E49\u0E27\u0E22 `pple reviews <id>`")}}function Eo(e,t){let n=e.find(s=>s.id===t||s.commit.startsWith(t));if(!n)throw new u(`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14 "${t}"`,"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 `pple reviews` \u0E41\u0E25\u0E49\u0E27\u0E43\u0E0A\u0E49 id \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15\u0E08\u0E32\u0E01\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E31\u0E49\u0E19");return n}function $o(e,t){let n=No(t);e.out.say(`\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14 ${t.commit.slice(0,7)} \xB7 ${Po[n]} \xB7 ${Cs(t.createdAt)}`),n==="failed"&&t.failureReason&&e.out.say(`\u0E23\u0E35\u0E27\u0E34\u0E27\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08: ${t.failureReason}`),n==="completed"&&t.report&&(e.out.say(""),e.out.say(t.report.trimEnd()))}function Cs(e){return`${e.slice(0,16).replace("T"," ")} UTC`}async function Ts(e,t,n){let s=await(await E(e)).collaborators(t);if(n)return L(e.out,s);if(e.out.say(`\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32 (${s.length})`),s.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"),e.out.say("\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E40\u0E15\u0E47\u0E21\u0E14\u0E49\u0E27\u0E22 `pple collaborators add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>`");return}for(let r of s)e.out.say(` ${$(r.maskedName??"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",12)}${$(r.phoneNumber??"-",16)}\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E21\u0E37\u0E48\u0E2D ${r.addedAt.slice(0,10)}`)}async function Io(e,t,n){if(n.phone!==void 0&&n.confirm!==void 0)throw new u("\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E2B\u0E23\u0E37\u0E2D `--confirm` \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E43\u0E14\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E17\u0E31\u0E49\u0E07\u0E2A\u0E2D\u0E07","\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E04\u0E48\u0E2D\u0E22\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E17\u0E35\u0E48\u0E44\u0E14\u0E49");if(n.phone===void 0&&n.confirm===void 0)throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E02\u0E2D\u0E07\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E1E\u0E34\u0E48\u0E21","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple collaborators add 0812345678`");let s=await E(e);if(n.confirm!==void 0){let o=await s.confirmCollaborator(t,n.confirm);e.out.say(`\u0E40\u0E1E\u0E34\u0E48\u0E21 ${o.maskedName??"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"} \u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E41\u0E25\u0E49\u0E27`);return}let r=await s.lookupCollaborator(t,n.phone);if(!e.interactive)throw e.out.say(`\u0E1E\u0E1A ${r.maskedName} (${r.phoneNumber})`),e.out.say(`\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19 (\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E43\u0E19 10 \u0E19\u0E32\u0E17\u0E35): ${r.confirmationToken}`),e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E43\u0E04\u0E23"),new u("\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32","\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E27\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E19\u0E35\u0E49 \u0E41\u0E25\u0E49\u0E27\u0E08\u0E36\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <token>`");if(!await e.confirm(`\u0E40\u0E1E\u0E34\u0E48\u0E21 ${r.maskedName} (${r.phoneNumber}) \u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E43\u0E0A\u0E48\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48?`))throw new u("\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E43\u0E04\u0E23");await s.confirmCollaborator(t,r.confirmationToken),e.out.say(`\u0E40\u0E1E\u0E34\u0E48\u0E21 ${r.maskedName} \u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E41\u0E25\u0E49\u0E27`)}async function Lo(e,t,n){if(!n)throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E02\u0E2D\u0E07\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E08\u0E30\u0E19\u0E33\u0E2D\u0E2D\u0E01","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E14\u0E49\u0E27\u0E22 `pple collaborators`");let s=await E(e),i=(await s.collaborators(t)).find(o=>gp(o,n));if(!i)throw new u(`\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A "${n}"`,"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E14\u0E49\u0E27\u0E22 `pple collaborators` \u0E41\u0E25\u0E49\u0E27\u0E43\u0E0A\u0E49\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E15\u0E32\u0E21\u0E17\u0E35\u0E48\u0E41\u0E2A\u0E14\u0E07");await s.removeCollaborator(t,i.sub),e.out.say(`\u0E19\u0E33 ${i.maskedName??"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"} \u0E2D\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27`),e.out.say("\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E02\u0E2D\u0E07\u0E40\u0E02\u0E32\u0E08\u0E30\u0E2B\u0E22\u0E38\u0E14\u0E17\u0E31\u0E19\u0E17\u0E35")}function gp(e,t){return e.sub===t?!0:e.phoneNumber!==void 0&&To(e.phoneNumber)===To(t)}function To(e){let t=e.replace(/[^\d]/g,"");return t.startsWith("66")&&t.length===11?`0${t.slice(2)}`:t}import bp from"node:fs/promises";import vp from"node:path";function Oo(e,t){return!e||e.mode==="everyone"?"\u0E17\u0E38\u0E01\u0E04\u0E19":e.mode==="unlisted"?"\u0E44\u0E21\u0E48\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23":e.roles.length===0?"\u0E17\u0E38\u0E01\u0E04\u0E19":e.roles.map(n=>wp(n,t)).join(", ")}function wp(e,t){return t?.find(n=>n.value===e)?.label??Is(e)}function Is(e){return e.startsWith(sn)?e.slice(sn.length):e}var sn="pple-ad:";function ie(e,t=null){let n=e.payload;if(e.type==="publish"){let r=typeof n.customAddress=="string"?` \xB7 \u0E17\u0E35\u0E48 ${n.customAddress}`:"";return`\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48 \xB7 \u0E02\u0E36\u0E49\u0E19\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07 \xB7 ${Oo(n.visibility,t)}${r}`}if(e.type==="retire")return"\u0E04\u0E33\u0E02\u0E2D\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07 \xB7 \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E2D\u0E1B";if(e.type==="use")return`\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E0A\u0E49 \xB7 ${typeof n.entry=="string"?n.entry:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;if(e.type==="listing")return`\u0E04\u0E33\u0E02\u0E2D\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01 \xB7 ${typeof n.entry=="string"?n.entry:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;if(e.type==="change"){let r=[];return n.displayName!==void 0&&r.push(`\u0E0A\u0E37\u0E48\u0E2D\u0E40\u0E1B\u0E47\u0E19 \u201C${n.displayName}\u201D`),n.iconKey!==void 0&&r.push("\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E43\u0E2B\u0E21\u0E48"),n.visibility!==void 0&&r.push(`\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E40\u0E1B\u0E47\u0E19 ${Oo(n.visibility,t)}`),`\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 \xB7 \u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19${r.join(" \u0E41\u0E25\u0E30 ")}`}let s=[];return typeof n.cpuMs=="number"&&s.push(`CPU ${n.cpuMs} ms/request`),typeof n.notificationsPerDay=="number"&&s.push(`\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E16\u0E36\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A ${n.notificationsPerDay} \u0E23\u0E32\u0E22/\u0E27\u0E31\u0E19`),typeof n.cronSchedules=="number"&&s.push(`\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32 ${n.cronSchedules} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`),typeof n.cronIntervalMinutes=="number"&&s.push(`\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E2B\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E44\u0E14\u0E49 ${n.cronIntervalMinutes} \u0E19\u0E32\u0E17\u0E35`),typeof n.sweepIntervalMinutes=="number"&&s.push(`\u0E08\u0E31\u0E07\u0E2B\u0E27\u0E30\u0E01\u0E27\u0E32\u0E14\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E16\u0E35\u0E48\u0E44\u0E14\u0E49\u0E17\u0E38\u0E01 ${n.sweepIntervalMinutes} \u0E19\u0E32\u0E17\u0E35`),`\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32 \xB7 \u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21 ${s.length>0?s.join(" \u0E41\u0E25\u0E30 "):"\u0E42\u0E04\u0E27\u0E15\u0E32"}`}async function qo(e,t){await(await E(e)).promoteToBeta(t),e.out.say("\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E02\u0E36\u0E49\u0E19\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27"),e.out.say(`\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E04\u0E38\u0E13\u0E40\u0E0A\u0E34\u0E0D\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14 ${Ze} \u0E04\u0E19 \u0E14\u0E49\u0E27\u0E22 \`pple invites add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>\``)}var Sp={PENDING:"\u0E23\u0E2D\u0E15\u0E2D\u0E1A\u0E23\u0E31\u0E1A",ACCEPTED:"\u0E15\u0E2D\u0E1A\u0E23\u0E31\u0E1A\u0E41\u0E25\u0E49\u0E27",DECLINED:"\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18\u0E41\u0E25\u0E49\u0E27"};async function Ls(e,t,n){let s=await(await E(e)).invites(t);if(n)return L(e.out,s);let r=s.filter(i=>i.status!=="DECLINED").length;if(e.out.say(`\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49 (\u0E43\u0E0A\u0E49\u0E44\u0E1B ${r} \u0E08\u0E32\u0E01 ${Ze} \u0E17\u0E35\u0E48\u0E19\u0E31\u0E48\u0E07)`),s.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E0A\u0E34\u0E0D\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49");return}for(let i of s)e.out.say(` ${$(i.phoneNumber,16)}${Sp[i.status]}`)}async function _o(e,t,n){if(!n)throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E34\u0E0D","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple invites add 0812345678`");let s=await(await E(e)).addInvite(t,n);e.out.say(`\u0E40\u0E0A\u0E34\u0E0D ${s.phoneNumber} \u0E41\u0E25\u0E49\u0E27`),e.out.say("\u0E1C\u0E39\u0E49\u0E16\u0E39\u0E01\u0E40\u0E0A\u0E34\u0E0D\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E14\u0E15\u0E2D\u0E1A\u0E23\u0E31\u0E1A\u0E43\u0E19 PPLE Today")}async function Ro(e,t,n){if(!n)throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E02\u0E2D\u0E07\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E19\u0E33\u0E2D\u0E2D\u0E01","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 `pple invites` \u0E41\u0E25\u0E49\u0E27\u0E43\u0E0A\u0E49\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E15\u0E32\u0E21\u0E17\u0E35\u0E48\u0E41\u0E2A\u0E14\u0E07");await(await E(e)).removeInvite(t,n),e.out.say(`\u0E19\u0E33\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E02\u0E2D\u0E07 ${n} \u0E2D\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27`)}async function Do(e,t){let n=await(await E(e)).roleOptions();if(t)return L(e.out,n);for(let s of n)e.out.say(` ${$(Is(s.value),24)}${s.label}`);e.out.say(""),e.out.say("\u0E43\u0E0A\u0E49\u0E0A\u0E37\u0E48\u0E2D\u0E22\u0E48\u0E2D\u0E2B\u0E23\u0E37\u0E2D\u0E0A\u0E37\u0E48\u0E2D\u0E44\u0E17\u0E22\u0E01\u0E31\u0E1A `--roles` \u0E40\u0E0A\u0E48\u0E19 `--roles hq,\u0E2A.\u0E2A.`")}function xo(e,t){let n=(t??"").split(",").map(r=>r.trim()).filter(r=>r!=="");if(e===void 0&&n.length===0)return;let s=e??"roles";if(s!=="everyone"&&s!=="roles"&&s!=="unlisted")throw new u(`\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19 "${s}"`,"\u0E40\u0E25\u0E37\u0E2D\u0E01 `everyone` (\u0E17\u0E38\u0E01\u0E04\u0E19), `roles` (\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E1A\u0E32\u0E07\u0E1A\u0E17\u0E1A\u0E32\u0E17 \u0E1E\u0E23\u0E49\u0E2D\u0E21 `--roles`) \u0E2B\u0E23\u0E37\u0E2D `unlisted` (\u0E44\u0E21\u0E48\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23)");if(s==="roles"&&n.length===0)throw new u("\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E1A\u0E32\u0E07\u0E1A\u0E17\u0E1A\u0E32\u0E17 \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E14\u0E49\u0E27\u0E22 `--roles`","\u0E14\u0E39\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E14\u0E49\u0E27\u0E22 `pple roles`");if(s!=="roles"&&n.length>0)throw new u(`\u0E43\u0E0A\u0E49 \`--roles\` \u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E1A \`--visibility ${s}\` \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,"`--roles` \u0E43\u0E0A\u0E49\u0E01\u0E31\u0E1A `--visibility roles` \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19");return{mode:s,roles:n}}async function jo(e,t){if(t.length===0)return[];let n=await e.roleOptions(),s=t.map(i=>kp(n,i)),r=t[s.indexOf(void 0)];if(r!==void 0)throw new u(`\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E1A\u0E17\u0E1A\u0E32\u0E17 "${r}"`,"\u0E14\u0E39\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E14\u0E49\u0E27\u0E22 `pple roles`");return[...new Set(s)]}function kp(e,t){let n=t.toLowerCase();return e.find(s=>s.value.toLowerCase()===n||s.value.toLowerCase()===`${sn}${n}`||s.label.toLowerCase()===n)?.value}async function Mo(e,t){let n=await bp.readFile(vp.resolve(e.cwd,t)).catch(()=>null);if(n===null)throw new u(`\u0E2D\u0E48\u0E32\u0E19\u0E44\u0E1F\u0E25\u0E4C ${t} \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E1E\u0E32\u0E18\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");return new Uint8Array(n)}function Bo(e){return{visibility:e.mode,roles:e.roles}}function rn(e,t,n,s){e.out.say(t),e.out.say(` ${ie(n,s)}`),e.out.say("\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E08\u0E30\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32 \u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple requests`")}async function Uo(e,t,n){let s=xo(n.visibility,n.roles)??{mode:"everyone",roles:[]};if(s.mode!=="unlisted"&&n.icon===void 0)throw new u("\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E44\u0E2D\u0E04\u0E2D\u0E19","\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E1F\u0E25\u0E4C PNG, JPEG \u0E2B\u0E23\u0E37\u0E2D WebP \u0E14\u0E49\u0E27\u0E22 `--icon <\u0E44\u0E1F\u0E25\u0E4C>` (\u0E2B\u0E23\u0E37\u0E2D\u0E43\u0E0A\u0E49 `--visibility unlisted` \u0E16\u0E49\u0E32\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23)");let r=n.address?.trim().toLowerCase();if(n.confirm!==void 0&&r===void 0)throw new u("`--confirm` \u0E43\u0E0A\u0E49\u0E04\u0E39\u0E48\u0E01\u0E31\u0E1A `--address` \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19");let i=n.icon===void 0?void 0:await Mo(e,n.icon),o=await E(e),a={mode:s.mode,roles:await jo(o,s.roles)};r!==void 0&&await Ep(e,o,t,r,n.confirm);let l=i?(await o.uploadIcon(i)).key:void 0,c=await o.fileRequest(t,{type:"publish",...Bo(a),...l?{iconKey:l}:{},...r?{customAddress:r}:{}});rn(e,"\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E41\u0E25\u0E49\u0E27",c,await Vo(o,a))}async function Ep(e,t,n,s,r){let i=await t.app(n),o=new URL(i.url).host.split(".").slice(1).join("."),a=`${s}.${o}`;if(r!==void 0){if(r.trim().toLowerCase()!==s)throw new u(`\`--confirm ${r}\` \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E02\u0E2D ("${s}")`,"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D")}else if(e.interactive){if(!await e.confirm(`\u0E02\u0E2D\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07 ${a} \u0E43\u0E0A\u0E48\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48? (\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34)`))throw new u("\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E41\u0E25\u0E49\u0E27 \u2014 \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D")}else throw new u(`\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07 ${a} \u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E19\u0E31\u0E49\u0E19`,"\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E08\u0E36\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <address>` \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A `--address`")}async function Fo(e,t,n){let s=xo(n.visibility,n.roles),r=n.name?.trim();if(r===void 0&&n.icon===void 0&&s===void 0)throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07",'\u0E43\u0E0A\u0E49 `--name "\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48"`, `--icon <\u0E44\u0E1F\u0E25\u0E4C>` \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D `--visibility`');let i=n.icon===void 0?void 0:await Mo(e,n.icon),o=await E(e),a=s&&{mode:s.mode,roles:await jo(o,s.roles)},l=i?(await o.uploadIcon(i)).key:void 0,c=await o.fileRequest(t,{type:"change",...r!==void 0?{name:r}:{},...l?{iconKey:l}:{},...a?Bo(a):{}});rn(e,"\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E41\u0E25\u0E49\u0E27",c,await Vo(o,a))}async function Ko(e,t,n){let s=nt(n.cpuMs,"--cpu-ms"),r=nt(n.notifications,"--notifications"),i=nt(n.cronSchedules,"--cron-schedules"),o=nt(n.cronInterval,"--cron-interval"),a=nt(n.sweepInterval,"--sweep-interval");if(s===void 0&&r===void 0&&i===void 0&&o===void 0&&a===void 0)throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23","\u0E43\u0E0A\u0E49 `--cpu-ms <ms>` (CPU \u0E15\u0E48\u0E2D request) `--notifications <\u0E23\u0E32\u0E22/\u0E27\u0E31\u0E19>` `--cron-schedules <\u0E08\u0E33\u0E19\u0E27\u0E19>` `--cron-interval <\u0E19\u0E32\u0E17\u0E35>` \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D `--sweep-interval <\u0E19\u0E32\u0E17\u0E35>`");let l=await(await E(e)).fileRequest(t,{type:"limit",...s!==void 0?{cpuMs:s}:{},...r!==void 0?{notificationsPerDay:r}:{},...i!==void 0?{cronSchedules:i}:{},...o!==void 0?{cronIntervalMinutes:o}:{},...a!==void 0?{sweepIntervalMinutes:a}:{}});rn(e,"\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32\u0E41\u0E25\u0E49\u0E27",l,null)}function nt(e,t){if(e===void 0)return;let n=Number(e);if(!/^\d+$/.test(e)||!Number.isSafeInteger(n)||n<=0)throw new u(`\`${t}\` \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21\u0E1A\u0E27\u0E01`,`\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A "${e}"`);return n}async function Go(e,t){let n=await(await E(e)).fileRequest(t,{type:"retire"});rn(e,"\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27",n,null)}async function Vo(e,t){return t?.mode!=="roles"?null:e.roleOptions().catch(()=>null)}async function Jo(e,t,n){let s=await E(e),r=await s.requests(t);if(n)return L(e.out,r);if(r.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E02\u0E2D");return}let i=r.some(o=>o.payload.visibility?.mode==="roles")?await s.roleOptions().catch(()=>null):null;e.out.say(`\u0E04\u0E33\u0E02\u0E2D\u0E02\u0E2D\u0E07 ${t}`);for(let o of r){let a=o.reason?` \u2014 ${o.reason}`:"";e.out.say(` ${$(V(Zt,o.status),13)} ${ie(o,i)}${a}`)}}import Ap from"node:fs/promises";import Pp from"node:path";async function Yo(e,t,n=!1){let r=await(await E(e)).env(t);if(n)return L(e.out,r);if(r.length===0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E43\u0E14 \u0E46"),e.out.say("\u0E15\u0E31\u0E27\u0E41\u0E1B\u0E23\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E31\u0E49\u0E07\u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B");return}for(let i of r)i.secret?e.out.say(`${i.key}=(secret)`):e.out.say(`${i.key}=${i.value??""}`);e.out.say(""),e.out.say("\u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B")}async function Wo(e,t,n){let s=await Np(e,n),i=await(await E(e)).setEnv(t,n.key,s,n.secret);e.out.say(`\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01 ${i.key}${i.secret?" (secret)":""} \u0E41\u0E25\u0E49\u0E27`),e.out.say("\u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B")}async function Ho(e,t,n){await(await E(e)).deleteEnv(t,n),e.out.say(`\u0E25\u0E1A ${n} \u0E41\u0E25\u0E49\u0E27`),e.out.say("\u0E08\u0E30\u0E21\u0E35\u0E1C\u0E25\u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B")}async function Np(e,t){if(t.file!==void 0&&t.value!==void 0)throw new u("\u0E2A\u0E48\u0E07\u0E04\u0E48\u0E32\u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19 argument \u0E2B\u0E23\u0E37\u0E2D\u0E1C\u0E48\u0E32\u0E19 `--file` \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E43\u0E14\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E17\u0E31\u0E49\u0E07\u0E2A\u0E2D\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07");if(t.file!==void 0){let n=Pp.resolve(e.cwd,t.file),s=await Ap.readFile(n,"utf8").catch(()=>null);if(s===null)throw new u(`\u0E2D\u0E48\u0E32\u0E19\u0E44\u0E1F\u0E25\u0E4C ${t.file} \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E1E\u0E32\u0E18\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07");return s}if(t.value!==void 0)return t.value;if(e.interactive)throw new u("`pple env set` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E04\u0E48\u0E32","\u0E2A\u0E48\u0E07\u0E04\u0E48\u0E32\u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19 argument \u0E1C\u0E48\u0E32\u0E19 `--file` \u0E2B\u0E23\u0E37\u0E2D pipe \u0E17\u0E32\u0E07 stdin");return e.readStdin()}async function Qo(e,t,n=!1){let s=await E(e),r=await s.app(t),i=r.role!=="collaborator",[o,a,l,c]=await Promise.all([s.metrics(t),s.deploys(t),s.env(t),i?Tp(s,t):Promise.resolve(null)]);if(n)return L(e.out,{app:r,usage:o,deploys:a,env:l,...c??{}});Ip(e,r),Lp(e,o),Op(e,a),qp(e,l),c&&(_p(e,r,c.requests,c.invites),Rp(e,c.collaborators),Dp(e,c.requests)),e.out.say(""),e.out.say("\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple env set` / `pple redeploy` (\u0E04\u0E48\u0E32 env), `pple request` (\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07 \u0E42\u0E04\u0E27\u0E15\u0E32),"),e.out.say("`pple promote` / `pple invites` (\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49), `pple collaborators` (\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32) \u2014 \u0E14\u0E39\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E14\u0E49\u0E27\u0E22 `pple help`")}async function Tp(e,t){let[n,s,r]=await Promise.all([e.collaborators(t),e.requests(t),e.invites(t)]);return{collaborators:n,requests:s,invites:r}}function Ip(e,t){e.out.say(t.name),e.out.say(` ${$("slug",18)}${t.slug}`),e.out.say(` ${$("URL",18)}${t.url}`),t.customAddress&&e.out.say(` ${$("\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",18)}${t.customAddress}`),e.out.say(` ${$("\u0E2A\u0E16\u0E32\u0E19\u0E30",18)}${V(Xt,t.status)}`),e.out.say(` ${$("\u0E01\u0E32\u0E23\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48",18)}${V(et,t.tier??"draft")}`),t.role&&e.out.say(` ${$("\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",18)}${V(zt,t.role)}`),t.deploy&&e.out.say(` ${$("\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19",18)}${V(xe,t.deploy.status)}`+(t.deploy.message?` \u2014 ${t.deploy.message}`:"")),t.error&&e.out.say(` ${$("\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",18)}${t.error}`)}function Lp(e,t){e.out.say(""),e.out.say("\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E41\u0E25\u0E30\u0E42\u0E04\u0E27\u0E15\u0E32\u0E17\u0E23\u0E31\u0E1E\u0E22\u0E32\u0E01\u0E23"),e.out.say(` ${$("CPU \u0E15\u0E48\u0E2D request",20)}${t.limits.cpuMs} ms`),e.out.say(` ${$("\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E16\u0E36\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A",20)}${st(t.usage.notificationsSent)}`+(t.usage.notificationsSent===null?" (\u0E14\u0E39\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49)":` \u0E23\u0E32\u0E22 \u0E08\u0E32\u0E01\u0E42\u0E04\u0E27\u0E15\u0E32 ${st(t.limits.notificationsPerDay)} \u0E23\u0E32\u0E22/\u0E27\u0E31\u0E19`)),e.out.say(` ${$("\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 (24 \u0E0A\u0E21.)",20)}${st(t.usage.errors)}`+(t.usage.errors===null?" (\u0E14\u0E39\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49)":t.usage.errors===0?" (\u0E44\u0E21\u0E48\u0E21\u0E35\u0E43\u0E19 24 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07\u0E17\u0E35\u0E48\u0E1C\u0E48\u0E32\u0E19\u0E21\u0E32)":t.usage.requests===null?" (\u0E04\u0E33\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27\u0E43\u0E19 24 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07\u0E17\u0E35\u0E48\u0E1C\u0E48\u0E32\u0E19\u0E21\u0E32)":` \u0E08\u0E32\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14 ${st(t.usage.requests)} \u0E04\u0E33\u0E02\u0E2D`)),e.out.say(` ${$("\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B",20)}${st(t.usage.appUsers)}`+(t.usage.appUsers===null?" (\u0E14\u0E39\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49)":""))}function st(e){return e===null?"\u2014":String(e)}function Op(e,t){if(e.out.say(""),e.out.say("\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35");return}for(let n of t.slice(0,10)){let s=n.commit.slice(0,7),r=n.message?` \u2014 ${n.message}`:"",i=V(xe,n.status);e.out.say(` ${$(i,13)} ${s}${r}`)}}function qp(e,t){if(e.out.say(""),e.out.say("\u0E04\u0E48\u0E32 env"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E43\u0E14 \u0E46");return}for(let n of t)n.secret?e.out.say(` ${n.key}=(secret)`):e.out.say(` ${n.key}=${n.value??""}`)}function _p(e,t,n,s){e.out.say(""),e.out.say("\u0E01\u0E32\u0E23\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48"),e.out.say(` ${$("\u0E23\u0E30\u0E14\u0E31\u0E1A",18)}${V(et,t.tier??"draft")}`),t.customAddress&&e.out.say(` ${$("\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",18)}${t.customAddress}`);let r=n.find(i=>i.type==="publish"&&i.status==="pending");if(r&&e.out.say(` ${$("\u0E04\u0E33\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E23\u0E2D\u0E2D\u0E22\u0E39\u0E48",18)}${ie(r)}`),t.tier==="beta"){let i=s.filter(o=>o.status!=="DECLINED").length;e.out.say(` ${$("\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49",18)}\u0E43\u0E0A\u0E49\u0E44\u0E1B ${i} \u0E08\u0E32\u0E01 ${Ze} \u0E17\u0E35\u0E48\u0E19\u0E31\u0E48\u0E07`)}}function Rp(e,t){if(e.out.say(""),e.out.say("\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35");return}for(let n of t){let s=n.maskedName??"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",r=n.phoneNumber?` (${n.phoneNumber})`:"";e.out.say(` ${s}${r}`)}}function Dp(e,t){if(e.out.say(""),e.out.say("\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E04\u0E33\u0E02\u0E2D"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35");return}for(let n of t.slice(0,10)){let s=n.reason?` \u2014 ${n.reason}`:"",r=V(Zt,n.status);e.out.say(` ${$(r,13)} ${ie(n)}${s}`)}}import ra from"node:fs/promises";import rt from"node:path";import je from"node:fs/promises";import ea from"node:path";import{realpath as xp}from"node:fs/promises";import Os from"node:path";var qs="@pplethai/cli",Ae=`npm install -g ${qs}`;async function on(e){let t=await e.fetch(`${e.config.registryBase}/${qs}/latest`,{headers:{accept:"application/json"}}).catch(()=>null);if(!t?.ok)return null;let n=await t.json().catch(()=>null);return typeof n?.version=="string"&&n.version!==""?n.version:null}async function an(e){let t=await e.run("npm",["root","-g"],{cwd:e.cwd}).catch(()=>null);if(!t||t.code!==0)return!1;let n=t.stdout.trim();return n===""?!1:jp(n,e.packageDir)}function ln(e,t){return e.run("npm",["install","-g",`${qs}@${t}`],{cwd:e.cwd}).catch(n=>({code:1,stdout:"",stderr:n instanceof Error?n.message:String(n)}))}async function jp(e,t){let[n,s]=await Promise.all([Xo(e),Xo(t)]),r=Os.relative(n,s);return r!==""&&!r.startsWith("..")&&!Os.isAbsolute(r)}async function Xo(e){return xp(e).catch(()=>Os.resolve(e))}function cn(e,t){let n=zo(e),s=zo(t);if(!n)return!1;if(!s)return!0;for(let r=0;r<3;r+=1)if(n.parts[r]!==s.parts[r])return n.parts[r]>s.parts[r];return Mp(n.prerelease,s.prerelease)>0}function zo(e){let t=/^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(e.trim());return t?{parts:[Number(t[1]),Number(t[2]),Number(t[3])],prerelease:t[4]?t[4].split("."):[]}:null}function Mp(e,t){if(e.length===0&&t.length===0)return 0;if(e.length===0)return 1;if(t.length===0)return-1;for(let n=0;n<Math.max(e.length,t.length);n+=1){let s=e[n],r=t[n];if(s===void 0)return-1;if(r===void 0)return 1;let i=/^\d+$/.test(s)&&/^\d+$/.test(r);if(s!==r)return i?Number(s)>Number(r)?1:-1:s>r?1:-1}return 0}function Zo(e){return`${e.stderr}
25
169
  ${e.stdout}`.split(`
26
170
  `).map(n=>n.replace(/^npm (ERR!|error|warn)\s*/i,"").trim()).filter(n=>n!=="").slice(0,3).join(`
27
- `)||"\u0E2B\u0E22\u0E38\u0E14\u0E17\u0E33\u0E07\u0E32\u0E19\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E23\u0E30\u0E1A\u0E38\u0E2A\u0E32\u0E40\u0E2B\u0E15\u0E38"}var oo=new Set([".git","node_modules","dist",".wrangler",".dev.vars",".env"]),io=new Map([["gitignore",".gitignore"]]),so="pple-app",ao=new Set(["package.json","package-lock.json","wrangler.jsonc"]);async function fn(e,t,n){if(await S.readdir(e).catch(()=>null)===null)throw new s("\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E40\u0E17\u0E21\u0E40\u0E1E\u0E25\u0E15\u0E41\u0E2D\u0E1B PPLE \u0E43\u0E19\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 CLI \u0E0A\u0E38\u0E14\u0E19\u0E35\u0E49",`\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 CLI \u0E43\u0E2B\u0E21\u0E48 (\`${E}\`) \u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07`);let o=[];return await gn({from:e,to:t,prefix:"",slug:n,written:o}),o.sort()}async function gn(e){for(let t of await S.readdir(e.from,{withFileTypes:!0})){if(oo.has(t.name))continue;let n=io.get(t.name)??t.name,r=mn.join(e.from,t.name),o=mn.join(e.to,n),i=e.prefix===""?n:`${e.prefix}/${n}`;if(t.isDirectory()){await S.mkdir(o,{recursive:!0}),await gn({...e,from:r,to:o,prefix:i});continue}if(ao.has(n)){let a=await S.readFile(r,"utf8");await S.writeFile(o,uo(a,so,e.slug))}else await S.copyFile(r,o);e.written.push(i)}}function uo(e,t,n){return e.split(t).join(n)}var lo=3e3,po=5*6e4;async function hn(e,t){let n=await p(e),r=t.slug?await n.app(t.slug):await fo(e,n,await mo(e,t.name));if(!r.repo)throw new s(`"${r.name}" \u0E22\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E40\u0E2A\u0E23\u0E47\u0E08`,`\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 \`pple init ${r.slug}\` \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21`);r.status==="provisioning"&&e.out.say("\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u2026");let o=B.resolve(e.cwd,t.dir??r.slug);await yo(o);let i=await n.repoToken(r.slug);if(e.out.say(`\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 "${r.name}" \u0E43\u0E19 ${B.basename(o)}/\u2026`),await vt(e,go(e,r.repo),o,i),await ho(o))throw new s(`"${r.name}" \u0E21\u0E35\u0E42\u0E04\u0E49\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27 \u0E08\u0E36\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2D\u0E30\u0E44\u0E23\u0E15\u0E49\u0E2D\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32`,"\u0E17\u0E33\u0E07\u0E32\u0E19\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 `pple deploy` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E19\u0E33\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E36\u0E49\u0E19\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E08\u0E23\u0E34\u0E07");await fn(e.templateDir,o,r.slug),await Je(o,{slug:r.slug,apiBase:e.config.apiBase,url:r.url}),await xe(e,o),await re(e,o)&&await oe(e,o,"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E08\u0E32\u0E01\u0E40\u0E17\u0E21\u0E40\u0E1E\u0E25\u0E15\u0E21\u0E32\u0E15\u0E23\u0E10\u0E32\u0E19\u0E02\u0E2D\u0E07 PPLE",i);let a=await co(e,o);wo(e,r,o,a)}async function co(e,t){e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E41\u0E1E\u0E47\u0E01\u0E40\u0E01\u0E08\u0E41\u0E25\u0E30\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21\u0E10\u0E32\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E1A\u0E19\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u2026");let n=[["npm",["install"]],["npm",["run","db:migrate:local"]]];for(let[r,o]of n){let i=await e.run(r,o,{cwd:t}).catch(()=>null);if(!i||i.code!==0)return!1}return!0}async function mo(e,t){if(await L(e))throw new s("\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B PPLE \u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E23\u0E31\u0E19 `pple info` \u0E2B\u0E23\u0E37\u0E2D `pple deploy` \u0E17\u0E35\u0E48\u0E19\u0E35\u0E48 \u0E2B\u0E23\u0E37\u0E2D\u0E22\u0E49\u0E32\u0E22\u0E44\u0E1B\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E2D\u0E37\u0E48\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48");if(t!==void 0){let r=t.trim();if(!r)throw new s("`--name` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B",'\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple init --name "\u0E25\u0E07\u0E17\u0E30\u0E40\u0E1A\u0E35\u0E22\u0E19\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23"`');return r}if(!e.interactive)throw new s("`pple init` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B",'\u0E43\u0E2A\u0E48 `--name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13"` \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E31\u0E19\u0E43\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E23\u0E30\u0E1A\u0E1A\u0E16\u0E32\u0E21');let n=(await e.ask("\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B:")).trim();if(!n)throw new s("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B",'\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u0E2B\u0E23\u0E37\u0E2D\u0E43\u0E2A\u0E48 `--name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13"`');return n}async function fo(e,t,n){e.out.say(`\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07 "${n}" \u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u2026`);let r=await t.createApp(n);if(dn(r))return r;e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E43\u0E2B\u0E49\u0E40\u0E2A\u0E23\u0E47\u0E08\u2026");let o=e.now();for(;;){if(r.status==="failed")throw new s(`\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 "${r.name}" \u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08`,r.error?`${r.error} slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E04\u0E37\u0E2D ${r.slug} \u2014 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21 \u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E2D\u0E07 \`pple init ${r.slug}\` \u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07`:`slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E04\u0E37\u0E2D ${r.slug} \u2014 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21 \u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E2D\u0E07 \`pple init ${r.slug}\` \u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07`);if(e.now()-o>=po)throw new s(`"${r.name}" \u0E22\u0E31\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21`,`\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E14\u0E49\u0E27\u0E22 \`pple init ${r.slug}\` \u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48`);if(await e.sleep(lo),r=await t.app(r.slug),dn(r))return r}}function dn(e){return e.status==="ready"&&e.repo!==null}function go(e,t){return`${e.config.repoBase}/${t}.git`}async function yo(e){let t=await yn.readdir(e).catch(()=>null);if(t!==null&&t.length>0)throw new s(`\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C ${B.basename(e)}/ \u0E21\u0E35\u0E44\u0E1F\u0E25\u0E4C\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27`,"\u0E23\u0E31\u0E19 `pple init` \u0E17\u0E35\u0E48\u0E2D\u0E37\u0E48\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E43\u0E2A\u0E48 `--dir <folder>` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E2D\u0E37\u0E48\u0E19")}async function ho(e){return yn.access(B.join(e,"package.json")).then(()=>!0).catch(()=>!1)}function wo(e,t,n,r){let o=B.basename(n);e.out.say(),e.out.say(`"${t.name}" \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E2B\u0E49\u0E17\u0E33\u0E07\u0E32\u0E19\u0E41\u0E25\u0E49\u0E27\u0E43\u0E19 ${o}/`),e.out.say(`\u0E41\u0E2D\u0E1B\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48 ${t.url}`),e.out.say(),e.out.say("\u0E02\u0E31\u0E49\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B:"),e.out.say(` cd ${o}`),r||(e.out.say(" npm install"),e.out.say(" npm run db:migrate:local")),e.out.say(" npm run dev # \u0E14\u0E39\u0E1C\u0E25\u0E1A\u0E19\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49"),e.out.say(" pple deploy # \u0E19\u0E33\u0E02\u0E36\u0E49\u0E19\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E08\u0E23\u0E34\u0E07")}import qe from"node:fs/promises";import je from"node:path";var vo=1440*60*1e3,wn="update-check.json",$o="config.json",bo=new Set(["upgrade","help","--help","-h"]);function vn(e){return e.length>0&&!bo.has(e[0])}function Ue(e,t){e.out.say(`\u0E21\u0E35 pple \u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E43\u0E2B\u0E21\u0E48 (${t}) \u0E04\u0E38\u0E13\u0E43\u0E0A\u0E49\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19 ${e.version}`)}function Be(e){e.out.say("pple \u0E0A\u0E38\u0E14\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E1C\u0E48\u0E32\u0E19 npm \u0E01\u0E32\u0E23\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48\u0E2D\u0E32\u0E08\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E04\u0E38\u0E13"),e.out.say("\u0E21\u0E35 pple \u0E2A\u0E2D\u0E07\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E14\u0E49\u0E27\u0E22\u0E27\u0E34\u0E18\u0E35\u0E40\u0E14\u0E34\u0E21\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49"),e.out.say(`\u0E2B\u0E23\u0E37\u0E2D\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E14\u0E49\u0E27\u0E22 npm:
171
+ `)||"\u0E2B\u0E22\u0E38\u0E14\u0E17\u0E33\u0E07\u0E32\u0E19\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E23\u0E30\u0E1A\u0E38\u0E2A\u0E32\u0E40\u0E2B\u0E15\u0E38"}var Bp=new Set([".git","node_modules","dist",".wrangler",".dev.vars",".env"]),Up=new Map([["gitignore",".gitignore"]]),Fp="pple-app",Kp=new Set(["package.json","package-lock.json","wrangler.jsonc"]);async function ta(e,t,n){if(await je.readdir(e).catch(()=>null)===null)throw new u("\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E40\u0E17\u0E21\u0E40\u0E1E\u0E25\u0E15\u0E41\u0E2D\u0E1B PPLE \u0E43\u0E19\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 CLI \u0E0A\u0E38\u0E14\u0E19\u0E35\u0E49",`\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 CLI \u0E43\u0E2B\u0E21\u0E48 (\`${Ae}\`) \u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07`);let r=[];return await na({from:e,to:t,prefix:"",slug:n,written:r}),r.sort()}async function na(e){for(let t of await je.readdir(e.from,{withFileTypes:!0})){if(Bp.has(t.name))continue;let n=Up.get(t.name)??t.name,s=ea.join(e.from,t.name),r=ea.join(e.to,n),i=e.prefix===""?n:`${e.prefix}/${n}`;if(t.isDirectory()){await je.mkdir(r,{recursive:!0}),await na({...e,from:s,to:r,prefix:i});continue}if(Kp.has(n)){let o=await je.readFile(s,"utf8");await je.writeFile(r,Gp(o,Fp,e.slug))}else await je.copyFile(s,r);e.written.push(i)}}function Gp(e,t,n){return e.split(t).join(n)}var Vp=3e3,Jp=5*6e4;async function ia(e,t){let n=await E(e),s=t.slug?await n.app(t.slug):await Hp(e,n,await Wp(e,t.name));if(!s.repo)throw new u(`"${s.name}" \u0E22\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E40\u0E2A\u0E23\u0E47\u0E08`,`\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 \`pple init ${s.slug}\` \u0E2B\u0E32\u0E01\u0E22\u0E31\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21`);s.status==="provisioning"&&e.out.say("\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u2026");let r=rt.resolve(e.cwd,t.dir??s.slug);await Xp(r);let i=await n.repoToken(s.slug);if(e.out.say(`\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 "${s.name}" \u0E43\u0E19 ${rt.basename(r)}/\u2026`),await ao(e,Qp(e,s.repo),r,i),await zp(r))throw new u(`"${s.name}" \u0E21\u0E35\u0E42\u0E04\u0E49\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27 \u0E08\u0E36\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2D\u0E30\u0E44\u0E23\u0E15\u0E49\u0E2D\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32`,"\u0E17\u0E33\u0E07\u0E32\u0E19\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 `pple deploy` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E19\u0E33\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E36\u0E49\u0E19\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E08\u0E23\u0E34\u0E07");await ta(e.templateDir,r,s.slug),await Ni(r,{slug:s.slug,apiBase:e.config.apiBase,url:s.url}),await vs(e,r),await tn(e,r)&&await nn(e,r,"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E08\u0E32\u0E01\u0E40\u0E17\u0E21\u0E40\u0E1E\u0E25\u0E15\u0E21\u0E32\u0E15\u0E23\u0E10\u0E32\u0E19\u0E02\u0E2D\u0E07 PPLE",i);let o=await Yp(e,r);Zp(e,s,r,o)}async function Yp(e,t){e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E41\u0E1E\u0E47\u0E01\u0E40\u0E01\u0E08\u0E41\u0E25\u0E30\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21\u0E10\u0E32\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E1A\u0E19\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u2026");let n=[["npm",["install"]],["npm",["run","db:migrate:local"]]];for(let[s,r]of n){let i=await e.run(s,r,{cwd:t}).catch(()=>null);if(!i||i.code!==0)return!1}return!0}async function Wp(e,t){if(await $e(e))throw new u("\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B PPLE \u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27","\u0E23\u0E31\u0E19 `pple info` \u0E2B\u0E23\u0E37\u0E2D `pple deploy` \u0E17\u0E35\u0E48\u0E19\u0E35\u0E48 \u0E2B\u0E23\u0E37\u0E2D\u0E22\u0E49\u0E32\u0E22\u0E44\u0E1B\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E2D\u0E37\u0E48\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48");if(t!==void 0){let s=t.trim();if(!s)throw new u("`--name` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B",'\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple init --name "\u0E25\u0E07\u0E17\u0E30\u0E40\u0E1A\u0E35\u0E22\u0E19\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23"`');return s}if(!e.interactive)throw new u("`pple init` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B",'\u0E43\u0E2A\u0E48 `--name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13"` \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E31\u0E19\u0E43\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E23\u0E30\u0E1A\u0E1A\u0E16\u0E32\u0E21');let n=(await e.ask("\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B:")).trim();if(!n)throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B",'\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u0E2B\u0E23\u0E37\u0E2D\u0E43\u0E2A\u0E48 `--name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13"`');return n}async function Hp(e,t,n){e.out.say(`\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07 "${n}" \u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u2026`);let s=await t.createApp(n);if(sa(s))return s;e.out.say("\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E43\u0E2B\u0E49\u0E40\u0E2A\u0E23\u0E47\u0E08\u2026");let r=e.now();for(;;){if(s.status==="failed")throw new u(`\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 "${s.name}" \u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08`,s.error?`${s.error} slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E04\u0E37\u0E2D ${s.slug} \u2014 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21 \u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E2D\u0E07 \`pple init ${s.slug}\` \u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07`:`slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E04\u0E37\u0E2D ${s.slug} \u2014 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21 \u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E2D\u0E07 \`pple init ${s.slug}\` \u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07`);if(e.now()-r>=Jp)throw new u(`"${s.name}" \u0E22\u0E31\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21`,`\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E14\u0E49\u0E27\u0E22 \`pple init ${s.slug}\` \u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48`);if(await e.sleep(Vp),s=await t.app(s.slug),sa(s))return s}}function sa(e){return e.status==="ready"&&e.repo!==null}function Qp(e,t){return`${e.config.repoBase}/${t}.git`}async function Xp(e){let t=await ra.readdir(e).catch(()=>null);if(t!==null&&t.length>0)throw new u(`\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C ${rt.basename(e)}/ \u0E21\u0E35\u0E44\u0E1F\u0E25\u0E4C\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27`,"\u0E23\u0E31\u0E19 `pple init` \u0E17\u0E35\u0E48\u0E2D\u0E37\u0E48\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E43\u0E2A\u0E48 `--dir <folder>` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E2D\u0E37\u0E48\u0E19")}async function zp(e){return ra.access(rt.join(e,"package.json")).then(()=>!0).catch(()=>!1)}function Zp(e,t,n,s){let r=rt.basename(n);e.out.say(),e.out.say(`"${t.name}" \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E2B\u0E49\u0E17\u0E33\u0E07\u0E32\u0E19\u0E41\u0E25\u0E49\u0E27\u0E43\u0E19 ${r}/`),e.out.say(`\u0E41\u0E2D\u0E1B\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48 ${t.url}`),e.out.say(),e.out.say("\u0E02\u0E31\u0E49\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B:"),e.out.say(` cd ${r}`),s||(e.out.say(" npm install"),e.out.say(" npm run db:migrate:local")),e.out.say(" npm run dev # \u0E14\u0E39\u0E1C\u0E25\u0E1A\u0E19\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49"),e.out.say(" pple deploy # \u0E19\u0E33\u0E02\u0E36\u0E49\u0E19\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E08\u0E23\u0E34\u0E07")}var em={open:"\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49",granted:"\u0E21\u0E35\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19",pending:"\u0E23\u0E2D\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E0A\u0E49",denied:"\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E0A\u0E49\u0E16\u0E39\u0E01\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18",none:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19",own:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"},oa={needs_beta:"\u0E22\u0E31\u0E07\u0E40\u0E23\u0E35\u0E22\u0E01\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E40\u0E1E\u0E23\u0E32\u0E30\u0E41\u0E2D\u0E1B\u0E40\u0E1B\u0E47\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07",delisted:"\u0E22\u0E31\u0E07\u0E40\u0E23\u0E35\u0E22\u0E01\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E40\u0E1E\u0E23\u0E32\u0E30\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E16\u0E39\u0E01\u0E16\u0E2D\u0E14\u0E08\u0E32\u0E01\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01"},aa={unlisted:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",pending:"\u0E23\u0E2D\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34\u0E04\u0E33\u0E02\u0E2D\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",listed:"\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27",held:"\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27 \u0E21\u0E35\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E23\u0E2D\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34",delisted:"\u0E16\u0E39\u0E01\u0E16\u0E2D\u0E14\u0E08\u0E32\u0E01\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01"},tm={service:"\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23",dataset:"\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},nm={public:"\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E2B\u0E49\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B",private:"\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34"},sm={singleton:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E40\u0E14\u0E35\u0E22\u0E27",collection:"\u0E2B\u0E25\u0E32\u0E22\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"},rm={public:"\u0E2A\u0E32\u0E18\u0E32\u0E23\u0E13\u0E30",member:"\u0E2A\u0E21\u0E32\u0E0A\u0E34\u0E01\u0E1E\u0E23\u0E23\u0E04",internal:"\u0E1A\u0E38\u0E04\u0E25\u0E32\u0E01\u0E23\u0E1E\u0E23\u0E23\u0E04"},im={"15m":"\u0E17\u0E38\u0E01 15 \u0E19\u0E32\u0E17\u0E35","1h":"\u0E17\u0E38\u0E01 1 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07","6h":"\u0E17\u0E38\u0E01 6 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07","1d":"\u0E17\u0E38\u0E01 1 \u0E27\u0E31\u0E19"},la=/^([^/]+)\/([^/]+)$/;async function _s(e,t,n){let s=await(await E(e)).registry(t);if(n)return L(e.out,s);cm(e,t,s)}async function ca(e,t,n,s){let r=la.exec(n.trim());if(!r)throw new u("\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 <\u0E1C\u0E39\u0E49\u0E43\u0E2B\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23>/<\u0E0A\u0E37\u0E48\u0E2D>",'\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple request use platform/legal-identity --reason "\u0E15\u0E23\u0E27\u0E08\u0E1A\u0E31\u0E15\u0E23\u0E17\u0E35\u0E48\u0E07\u0E32\u0E19"`');let i=s?.trim()??"";if(!i)throw new u("\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E40\u0E2B\u0E15\u0E38\u0E1C\u0E25",'\u0E43\u0E0A\u0E49 `--reason "\u2026"`');let o=await(await E(e)).fileUseRequest(t,`${r[1]}/${r[2]}`,i);e.out.say("\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27"),e.out.say(` ${ie(o)}`),e.out.say("\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E08\u0E30\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32 \u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple requests`")}var om=/^[^/\\]+$/;async function ua(e,t,n){let s=n?.trim()??"";if(!om.test(s))throw new u("`pple request listing` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple request listing branch-list`");let r=await(await E(e)).fileListingRequest(t,s);e.out.say("\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27"),e.out.say(` ${ie(r)}`),e.out.say("\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E08\u0E30\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32 \u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 `pple requests`")}var am={schedule:"\u0E15\u0E32\u0E21\u0E08\u0E31\u0E07\u0E2B\u0E27\u0E30",manual:"\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49",check:"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},lm={ok:"\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",failed:"\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",timeout:"\u0E2B\u0E21\u0E14\u0E40\u0E27\u0E25\u0E32",skipped:"\u0E02\u0E49\u0E32\u0E21"};async function fa(e,t,n,s,r){let i=await(await E(e)).sweepRegistry(t,n,s);if(r)return L(e.out,i);let o=i.mode==="check"?"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25":"\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49";e.out.say(`${o} ${i.entry}`);for(let a of i.objectTypes)e.out.say(` ${a}`)}async function pa(e,t,n,s){let r=la.exec(n.trim());if(!r)throw new u("\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 <\u0E1C\u0E39\u0E49\u0E43\u0E2B\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23>/<\u0E0A\u0E37\u0E48\u0E2D>","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple registry show platform/legal-identity`");let i=await(await E(e)).registryEntry(t,r[1],r[2]);if(s)return L(e.out,i);um(e,i)}function cm(e,t,n){if(e.out.say(`\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E02\u0E2D\u0E07 ${t}`),n.entries.length===0){e.out.say(""),e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E43\u0E19\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01");return}for(let s of n.entries)e.out.say(""),e.out.say(s.id),e.out.say(` ${da(s)}`),e.out.say(` ${s.description}`),e.out.say(` \u0E2A\u0E16\u0E32\u0E19\u0E30 ${ha(s)}`),s.note&&e.out.say(` ${oa[s.note]}`),s.listing&&e.out.say(` \u0E01\u0E32\u0E23\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01 ${aa[s.listing]}`),s.reason&&e.out.say(` \u0E40\u0E2B\u0E15\u0E38\u0E1C\u0E25 ${s.reason}`),s.consumers&&ga(e,s.consumers," "),s.datasetTypes&&ma(e,s.datasetTypes)}function um(e,t){e.out.say(t.id),e.out.say(` ${da(t)}`),e.out.say(` ${t.description}`);let n=hm(t.userToken);if(n&&e.out.say(` ${n}`),e.out.say(` \u0E2A\u0E16\u0E32\u0E19\u0E30 ${ha(t)}`),t.note&&e.out.say(` ${oa[t.note]}`),t.listing&&e.out.say(` \u0E01\u0E32\u0E23\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01 ${aa[t.listing]}`),t.reason&&e.out.say(` \u0E40\u0E2B\u0E15\u0E38\u0E1C\u0E25 ${t.reason}`),t.consumers&&(ga(e,t.consumers," "),e.out.say(` ${gm(t.listing)}`)),t.datasetTypes&&ma(e,t.datasetTypes),t.objectTypes&&mm(e,t.objectTypes),e.out.say(""),!t.readable){e.out.say("\u0E22\u0E31\u0E07\u0E2D\u0E48\u0E32\u0E19\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49"),t.requestUse&&e.out.say(`\u0E02\u0E2D\u0E43\u0E0A\u0E49\u0E14\u0E49\u0E27\u0E22 \`${t.requestUse}\``);return}if(e.out.say("\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23"),t.docs===void 0){e.out.say("\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49");return}e.out.say(t.docs),e.out.say(""),e.out.say("\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07");let s=t.mocks??[];if(s.length===0){e.out.say("\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07");return}for(let r of s)e.out.say(""),e.out.say(r.path),e.out.say(r.text)}function ma(e,t){if(e.out.say(" \u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25");return}for(let n of t)e.out.say(` ${n.objectType} ${fm(n)}`),n.index.length>0&&e.out.say(` \u0E14\u0E31\u0E0A\u0E19\u0E35 ${n.index.join(", ")}`),e.out.say(n.lastGoodAt?` \u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E40\u0E21\u0E37\u0E48\u0E2D ${pe(n.lastGoodAt)} (\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22)`:" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E04\u0E22\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08")}function fm(e){let t=sm[e.shape]??e.shape,n=im[e.cadence]??e.cadence,s=e.heldNew?"\u0E23\u0E2D\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34":e.level?pm(e.level):null;return s?`${t} \xB7 ${s} \xB7 ${n}`:`${t} \xB7 ${n}`}function pm(e){return e==="public"||e==="member"||e==="internal"?rm[e]:"\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07"}function mm(e,t){if(e.out.say(" \u0E01\u0E32\u0E23\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"),t.length===0){e.out.say(" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25");return}for(let n of t){let s=n.trigger?am[n.trigger]:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E04\u0E22\u0E14\u0E36\u0E07",r=n.outcome?lm[n.outcome]:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E25",i=n.pages===null?"":` \xB7 ${n.pages} \u0E2B\u0E19\u0E49\u0E32`;e.out.say(` ${n.objectType} ${s} \xB7 ${r}${i}`),n.added!==null&&e.out.say(` \u0E40\u0E1E\u0E34\u0E48\u0E21 ${n.added} \xB7 \u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19 ${n.changed??0} \xB7 \u0E25\u0E1A ${n.removed??0} \xB7 \u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E40\u0E14\u0E34\u0E21 ${n.unchanged??0}`),n.droppedFields.length>0&&e.out.say(` \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E17\u0E35\u0E48\u0E15\u0E31\u0E14\u0E17\u0E34\u0E49\u0E07 ${n.droppedFields.join(", ")}`),e.out.say(n.lastGoodAt?` \u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E40\u0E21\u0E37\u0E48\u0E2D ${pe(n.lastGoodAt)} (\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22)`:" \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E04\u0E22\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08"),n.failureStreak>0&&e.out.say(` \u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E19 ${n.failureStreak} \u0E04\u0E23\u0E31\u0E49\u0E07`),n.error&&e.out.say(` ${n.error}`)}}function da(e){return`${tm[e.kind]} \xB7 ${dm(e)} \xB7 ${nm[e.visibility]}`}function dm(e){return e.provider==="platform"?"\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21":e.providerName??e.provider}function ha(e){return em[e.standing]??e.standing}function hm(e){return e==="required"?"\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49":e==="none"?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E49\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49":null}function gm(e){return e==="listed"||e==="held"?"\u0E41\u0E2D\u0E1B\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23\u0E40\u0E2B\u0E47\u0E19\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E19\u0E35\u0E49":e==="delisted"?"\u0E41\u0E2D\u0E1B\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E22\u0E31\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E19\u0E35\u0E49 \u0E41\u0E15\u0E48\u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49":"\u0E41\u0E2D\u0E1B\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E2B\u0E47\u0E19\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E19\u0E35\u0E49"}function ga(e,t,n){if(e.out.say(`${n}\u0E41\u0E2D\u0E1B\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23`),t.length===0){e.out.say(`${n} \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35`);return}for(let s of t)e.out.say(`${n} ${s.name} ${pe(s.grantedAt)} (\u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22)`)}import Z from"node:fs/promises";import se from"node:path";var ya=["pple-ad:mp","pple-ad:mp_assistant","pple-ad:hq","pple-ad:province","pple-ad:tto","pple-ad:local","pple-ad:foundation","pple-ad:candidate","pple-ad:confirmed_candidate","pple-ad:delegate"];var wu=sf(ou(),1);var Gy=new Set(["type","properties","required","items","enum","format","minimum","maximum","maxLength","description"]),Vy=new Set(["string","number","integer","boolean","object","array","null"]),Jy=new Set(["date","date-time","email","uri"]),Yy=new Set(["string","number","integer","boolean"]),au=32,Wy="type, properties, required, items, enum, format, minimum, maximum, maxLength \u0E41\u0E25\u0E30 description";function j(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function Rt(e){return JSON.stringify(hi(e))}function hi(e){if(Array.isArray(e))return e.map(hi);if(!j(e))return e;let t={};for(let n of Object.keys(e).sort())t[n]=hi(e[n]);return t}function lu(e,t=!0){return gi(e,"",t,0)}function gi(e,t,n,s){let r=t===""?"schema":`schema \u0E17\u0E35\u0E48 ${t}`;if(!j(e))return[`${r} \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E47\u0E2D\u0E1A\u0E40\u0E08\u0E01\u0E15\u0E4C`];if(s>au)return[`${r} \u0E0B\u0E49\u0E2D\u0E19\u0E01\u0E31\u0E19\u0E40\u0E01\u0E34\u0E19 ${au} \u0E0A\u0E31\u0E49\u0E19`];let i=[];for(let m of Object.keys(e).filter(f=>!Gy.has(f)).sort())i.push(`${r} \u0E43\u0E0A\u0E49 "${m}" \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u2014 \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30 ${Wy}`);let o=yi(e.type);if(o.ok?n&&(o.names.length!==1||o.names[0]!=="object")&&i.push(`${r} \u0E17\u0E35\u0E48\u0E23\u0E32\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 type \u0E40\u0E1B\u0E47\u0E19 object`):i.push(`${r}: type \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 string, number, integer, boolean, object, array, null \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E0A\u0E19\u0E34\u0E14\u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49`),!o.ok)return i;let a=new Set(o.names),l=m=>a.has(m);if("properties"in e)if(!l("object"))i.push(`${r}: properties \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D type \u0E40\u0E1B\u0E47\u0E19 object`);else if(!j(e.properties))i.push(`${r}: properties \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E41\u0E25\u0E30 schema`);else for(let m of Object.keys(e.properties).sort()){m===""&&i.push(`${r}: \u0E0A\u0E37\u0E48\u0E2D\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E43\u0E19 properties \u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E27\u0E48\u0E32\u0E07`);let f=t===""?m:`${t}.${m}`;i.push(...gi(e.properties[m],f,!1,s+1))}else l("object");if("required"in e)if(!l("object"))i.push(`${r}: required \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D type \u0E40\u0E1B\u0E47\u0E19 object`);else if(!Array.isArray(e.required)||e.required.some(m=>typeof m!="string"||m===""))i.push(`${r}: required \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E1F\u0E34\u0E25\u0E14\u0E4C`);else if(!j(e.properties))i.push(`${r}: required \u0E15\u0E49\u0E2D\u0E07\u0E2D\u0E49\u0E32\u0E07\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E43\u0E19 properties`);else{let m=new Set;for(let f of e.required)m.has(f)&&i.push(`${r}: required \u0E23\u0E30\u0E1A\u0E38 "${f}" \u0E0B\u0E49\u0E33`),m.add(f),Object.hasOwn(e.properties,f)||i.push(`${r}: required \u0E2D\u0E49\u0E32\u0E07 "${f}" \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E21\u0E35\u0E43\u0E19 properties`)}if("items"in e)if(!l("array"))i.push(`${r}: items \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D type \u0E40\u0E1B\u0E47\u0E19 array`);else if(Array.isArray(e.items))i.push(`${r}: items \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 schema \u0E40\u0E14\u0E35\u0E22\u0E27`);else{let m=t===""?"items":`${t}.items`;i.push(...gi(e.items,m,!1,s+1))}else l("array")&&i.push(`${r}: type \u0E40\u0E1B\u0E47\u0E19 array \u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 items`);"enum"in e&&(!Array.isArray(e.enum)||e.enum.length===0?i.push(`${r}: enum \u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 1 \u0E04\u0E48\u0E32`):e.enum.forEach((m,f)=>{Qe(e,m).length>0&&i.push(`${r}: \u0E04\u0E48\u0E32\u0E17\u0E35\u0E48 ${f+1} \u0E43\u0E19 enum \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A schema`)})),"format"in e&&(l("string")?(typeof e.format!="string"||!Jy.has(e.format))&&i.push(`${r}: format \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 date, date-time, email \u0E2B\u0E23\u0E37\u0E2D uri`):i.push(`${r}: format \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D type \u0E40\u0E1B\u0E47\u0E19 string`)),"maxLength"in e&&(l("string")?tw(e.maxLength)||i.push(`${r}: maxLength \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E15\u0E34\u0E14\u0E25\u0E1A`):i.push(`${r}: maxLength \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D type \u0E40\u0E1B\u0E47\u0E19 string`));let c=l("number")||l("integer");return("minimum"in e||"maximum"in e)&&(c?("minimum"in e&&!ls(e.minimum)&&i.push(`${r}: minimum \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19`),"maximum"in e&&!ls(e.maximum)&&i.push(`${r}: maximum \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19`),ls(e.minimum)&&ls(e.maximum)&&e.minimum>e.maximum&&i.push(`${r}: minimum \u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 maximum`)):i.push(`${r}: minimum \u0E41\u0E25\u0E30 maximum \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D type \u0E40\u0E1B\u0E47\u0E19 number \u0E2B\u0E23\u0E37\u0E2D integer`)),"description"in e&&typeof e.description!="string"&&i.push(`${r}: description \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`),i}function Qe(e,t){if(!j(e))return["\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A schema"];let n=yi(e.type);return n.ok?Hy(e,n.names,t):["\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A schema"]}function Hy(e,t,n){if(n===null)return t.includes("null")?"enum"in e&&Array.isArray(e.enum)&&!e.enum.some(i=>i===null)?["\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14"]:[]:["\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E40\u0E1B\u0E47\u0E19 null"];let s=t.filter(i=>i!=="null"&&Xy(i,n));if(s.length===0)return[Qy(t)];let r=[];if("enum"in e&&Array.isArray(e.enum)&&!e.enum.some(i=>ew(i,n))&&r.push("\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14"),s.includes("string")&&typeof n=="string"&&(typeof e.format=="string"&&!zy(e.format,n)&&r.push(`\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A ${e.format}`),typeof e.maxLength=="number"&&[...n].length>e.maxLength&&r.push(`\u0E22\u0E32\u0E27\u0E40\u0E01\u0E34\u0E19 ${e.maxLength} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23`)),(s.includes("number")||s.includes("integer"))&&typeof n=="number"&&(typeof e.minimum=="number"&&n<e.minimum&&r.push(`\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 ${e.minimum}`),typeof e.maximum=="number"&&n>e.maximum&&r.push(`\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 ${e.maximum}`)),s.includes("object")&&j(n)){let i=j(e.properties)?e.properties:{},o=Array.isArray(e.required)?e.required.filter(a=>typeof a=="string"):[];for(let a of o)Object.hasOwn(n,a)||r.push(`\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${a}"`);for(let a of Object.keys(i).sort()){if(!Object.hasOwn(n,a))continue;let l=i[a];if(!j(l))continue;let c=Qe(l,n[a]);for(let m of c)r.push(`${a}: ${m}`)}}return s.includes("array")&&Array.isArray(n)&&j(e.items)&&n.forEach((i,o)=>{for(let a of Qe(e.items,i))r.push(`\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48 ${o+1}: ${a}`)}),r}function Qy(e){let t=e.filter(n=>n!=="null");if(t.length===1){if(t[0]==="string")return"\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21";if(t[0]==="integer")return"\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21";if(t[0]==="number")return"\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19";if(t[0]==="boolean")return"\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E23\u0E34\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E17\u0E47\u0E08";if(t[0]==="object")return"\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E47\u0E2D\u0E1A\u0E40\u0E08\u0E01\u0E15\u0E4C";if(t[0]==="array")return"\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}return"\u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A type \u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28"}function Xy(e,t){return e==="string"?typeof t=="string":e==="boolean"?typeof t=="boolean":e==="integer"?typeof t=="number"&&Number.isInteger(t):e==="number"?typeof t=="number"&&Number.isFinite(t):e==="object"?j(t):e==="array"?Array.isArray(t):!1}function zy(e,t){if(e==="date")return cu(t);if(e==="date-time")return Zy(t);if(e==="email")return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);if(e==="uri")try{return new URL(t).protocol.length>1}catch{return!1}return!1}function cu(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return!1;let n=Number(t[1]),s=Number(t[2]),r=Number(t[3]),i=new Date(Date.UTC(n,s-1,r));return i.getUTCFullYear()===n&&i.getUTCMonth()===s-1&&i.getUTCDate()===r}function Zy(e){let t=/^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d+)?(Z|[+-]\d{2}:\d{2})$/.exec(e);if(!t)return!1;let n=Number(t[2]),s=Number(t[3]),r=Number(t[4]);return n>23||s>59||r>60?!1:cu(t[1]??"")}function ew(e,t){return Rt(e)===Rt(t)}function yi(e){let t=typeof e=="string"?[e]:Array.isArray(e)?e:null;return!t||t.length===0?{ok:!1}:t.every(n=>typeof n=="string"&&Vy.has(n))?new Set(t).size!==t.length?{ok:!1}:{ok:!0,names:t}:{ok:!1}}function ls(e){return typeof e=="number"&&Number.isFinite(e)}function tw(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0}function uu(e){if(!j(e))return!1;let t=yi(e.type);return t.ok?t.names.every(n=>n==="null"||Yy.has(n)):!1}function fu(e){return j(e)&&(e.type==="string"||e.type==="integer")}var pu=120,mu=32*1024,du=1024*1024,nw=["hq-staff","province-coordinator","platform-admin","delegate","unverified","kyc-pending","kyc-verified-nonmember","member"],sw=new Set(nw),bu=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,vu=63,rw=/[\u0E00-\u0E7F]/,iw=/(?<!\d)\d{13}(?!\d)/g,ow=new Set(["kind","description","visibility","name","userToken"]),aw=new Set(["kind","description","visibility","name","objectTypes","level"]),Su=["endpoint","url","baseUrl","baseURL","base_url","host","hostname"],lw=new Set(Su),cw=new Set(["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]),uw=new Set(["method","path","persona","status","headers","body"]),fw=/^[A-Za-z0-9._~-]+$/,pw=/^:[A-Za-z_][A-Za-z0-9_-]*$/,ku={"15m":15,"1h":60,"6h":360,"1d":1440},xt=ku["1h"];function Eu(e,t={}){return e.map(n=>({name:n.name,issues:mw(n,t)}))}function mw(e,t={}){let n=[],s=dw(e.name);if(s&&n.push(s),e.entryMd===null)return n.push({rule:"entry-md",message:"\u0E44\u0E21\u0E48\u0E1E\u0E1A entry.md"}),n.push(...Dt(e.mocks)),n;let r=_w(e.entryMd);return r.ok?(n.push(...hw(e.name,r.fields,r.body)),r.fields.kind==="service"?n.push(...ww(r.fields,e.mocks)):r.fields.kind==="dataset"?n.push(...bw(r.fields,e.mocks,t)):n.push(...Dt(e.mocks)),n):(n.push(r.issue),n.push(...Dt(e.mocks)),n)}function dw(e){return e.length<=vu&&bu.test(e)?null:{rule:"name",message:"\u0E0A\u0E37\u0E48\u0E2D\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2D\u0E31\u0E07\u0E01\u0E24\u0E29\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E40\u0E25\u0E47\u0E01 \u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 \u0E41\u0E25\u0E30\u0E02\u0E35\u0E14\u0E01\u0E25\u0E32\u0E07 \u0E41\u0E25\u0E30\u0E22\u0E32\u0E27\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 63 \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23"}}function hw(e,t,n){let s=[];t.kind!=="service"&&t.kind!=="dataset"&&s.push({rule:"kind",message:"kind \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 service (\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23) \u0E2B\u0E23\u0E37\u0E2D dataset (\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25)"}),s.push(...gw(t.description)),t.visibility!=="public"&&t.visibility!=="private"&&s.push({rule:"visibility",message:"visibility \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 public (\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E2B\u0E49\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B) \u0E2B\u0E23\u0E37\u0E2D private (\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34)"}),"name"in t&&t.name!==e&&s.push({rule:"name-mismatch",message:"\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E19 entry.md \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C"});for(let r of Su)r in t&&s.push({rule:"endpoint",message:`\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28 ${r} \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u2014 \u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E2B\u0E49 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`});return t.userToken==="optional"&&s.push({rule:"user-token-optional",message:"userToken: optional \u0E22\u0E31\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u2014 \u0E2A\u0E07\u0E27\u0E19\u0E44\u0E27\u0E49\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2B\u0E25\u0E31\u0E01\u0E02\u0E2D\u0E07\u0E1E\u0E23\u0E23\u0E04"}),s.push(...yw(n)),s}function gw(e){if(typeof e!="string"||e.trim()==="")return[{rule:"description",message:"\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22\u0E2A\u0E31\u0E49\u0E19 \u0E46"}];let t=e.trim(),n=[];return[...t].length>pu&&n.push({rule:"description-length",message:`\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E22\u0E32\u0E27\u0E40\u0E01\u0E34\u0E19 ${pu} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23`}),rw.test(t)||n.push({rule:"description-thai",message:"\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22"}),n}function yw(e){return e.trim()===""?[{rule:"docs",message:"\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 (\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32\u0E43\u0E19 entry.md \u0E43\u0E15\u0E49\u0E2A\u0E48\u0E27\u0E19\u0E2B\u0E31\u0E27)"}]:Pu(e)>mu?[{rule:"docs-size",message:`\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E22\u0E32\u0E27\u0E40\u0E01\u0E34\u0E19 ${mu.toLocaleString("en-US")} \u0E44\u0E1A\u0E15\u0E4C`}]:[]}function ww(e,t){let n=[],s=e.userToken;return s!=="required"&&s!=="none"&&s!=="optional"&&n.push({rule:"user-token",message:"\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38 userToken \u0E40\u0E1B\u0E47\u0E19 required \u0E2B\u0E23\u0E37\u0E2D none"}),n.push(...$u(e,ow)),n.push(...Pw(e.userToken,t)),n}function bw(e,t,n){let s=[...$u(e,aw)],r=Sw(e,n);return s.push(...r.issues),s.push(...$w(r.expected,t)),s}var vw=new Set(["shape","schema","cadence","level","id","index"]);function Sw(e,t){let n=[],s=t.minCadenceMinutes??xt,r="level"in e?hu(e.level,"\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"):null;r&&!r.ok&&n.push(...r.issues),r?.ok&&yu(r.level)&&n.push(...gu("\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",r.level,t.roles));let i=e.objectTypes;if(!j(i)||Object.keys(i).length===0)return n.push({rule:"object-types",message:"\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E15\u0E49\u0E2D\u0E07\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28 objectTypes \u0E40\u0E1B\u0E47\u0E19\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 1 \u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17"}),{issues:n,declarations:[],expected:[]};let o=[],a=[],l=[];for(let c of Object.keys(i).sort()){let m=n.length,f=c.length<=vu&&bu.test(c);f||n.push({rule:"object-type-name",message:`\u0E0A\u0E37\u0E48\u0E2D\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}" \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E2D\u0E31\u0E07\u0E01\u0E24\u0E29\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E40\u0E25\u0E47\u0E01 \u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 \u0E41\u0E25\u0E30\u0E02\u0E35\u0E14\u0E01\u0E25\u0E32\u0E07 \u0E41\u0E25\u0E30\u0E22\u0E32\u0E27\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 63 \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23`});let p=i[c];if(!j(p)){n.push({rule:"object-type-shape",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}" \u0E15\u0E49\u0E2D\u0E07\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28 shape, schema \u0E41\u0E25\u0E30 cadence`}),f&&a.push({name:c,shape:null,schema:null,idProperty:null});continue}for(let S of Object.keys(p).filter(A=>!vw.has(A)).sort())n.push({rule:"object-type-field",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}": \u0E1F\u0E34\u0E25\u0E14\u0E4C "${S}" \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E2A\u0E48\u0E27\u0E19\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17`});let h=p.shape==="singleton"||p.shape==="collection"?p.shape:null;h?h==="singleton"&&("id"in p&&n.push({rule:"object-type-id",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}": id \u0E43\u0E0A\u0E49\u0E01\u0E31\u0E1A collection \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19`}),"index"in p&&n.push({rule:"object-type-index",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}": index \u0E43\u0E0A\u0E49\u0E01\u0E31\u0E1A collection \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19`})):n.push({rule:"object-type-shape",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}" \u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 shape \u0E40\u0E1B\u0E47\u0E19 singleton \u0E2B\u0E23\u0E37\u0E2D collection`});let w=null;if(!j(p.schema))n.push({rule:"object-type-schema",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}": schema \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E47\u0E2D\u0E1A\u0E40\u0E08\u0E01\u0E15\u0E4C \u0E41\u0E25\u0E30\u0E17\u0E35\u0E48\u0E23\u0E32\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 type \u0E40\u0E1B\u0E47\u0E19 object`});else{let S=lu(p.schema,!0);if(S.length===0)w=p.schema;else for(let A of S)n.push({rule:"object-type-schema",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}": ${A}`})}let d=Ew(p.cadence)?p.cadence:null;d?ku[d]<s&&n.push({rule:"cadence-floor",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}": \u0E08\u0E31\u0E07\u0E2B\u0E27\u0E30\u0E01\u0E27\u0E32\u0E14 ${d} \u0E16\u0E35\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B \u2014 \u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E01\u0E27\u0E32\u0E14\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E16\u0E35\u0E48\u0E01\u0E27\u0E48\u0E32\u0E17\u0E38\u0E01 ${s} \u0E19\u0E32\u0E17\u0E35 \u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32 (sweep interval) \u0E41\u0E25\u0E49\u0E27\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E43\u0E2B\u0E21\u0E48`}):n.push({rule:"object-type-cadence",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}": cadence \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 15m, 1h, 6h \u0E2B\u0E23\u0E37\u0E2D 1d`});let g=null,y=[];if(h==="collection"){let S="id"in p?p.id:"id";if(typeof S!="string"||S==="")n.push({rule:"object-type-id",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}": id \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E1F\u0E34\u0E25\u0E14\u0E4C`});else if(w){let N=j(w.properties)?w.properties:{};fu(N[S])?g=S:n.push({rule:"object-type-id",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}": "${S}" \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E23\u0E30\u0E14\u0E31\u0E1A\u0E1A\u0E19\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19 string \u0E2B\u0E23\u0E37\u0E2D integer`})}let A=kw(c,p.index,"index"in p,w);A.ok?y=A.fields:n.push(...A.issues)}let b=null;if("level"in p){let S=hu(p.level,`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}"`);S.ok?(b=S.level,yu(b)&&n.push(...gu(`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}"`,b,t.roles))):n.push(...S.issues)}else r?.ok?b=r.level:r||n.push({rule:"level",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c}" \u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 level \u0E2B\u0E23\u0E37\u0E2D\u0E43\u0E0A\u0E49 level \u0E02\u0E2D\u0E07\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25`});b&&l.push({name:c,level:b}),f&&a.push({name:c,shape:h,schema:w,idProperty:h==="collection"?g:null}),f&&h!==null&&w!==null&&d!==null&&b!==null&&(h==="singleton"||g!==null)&&n.length===m&&h&&w&&d&&b&&o.push({name:c,shape:h,schema:w,cadence:d,idProperty:h==="collection"?g:null,index:h==="collection"?y:[],level:b})}if(e.visibility==="public")for(let c of l)c.level!=="public"&&n.push({rule:"level-visibility",message:`visibility \u0E40\u0E1B\u0E47\u0E19 public \u0E41\u0E15\u0E48\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${c.name}" \u0E2D\u0E22\u0E39\u0E48\u0E40\u0E2B\u0E19\u0E37\u0E2D public \u2014 \u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E19\u0E35\u0E49\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 private`});return{issues:n,declarations:o,expected:a}}function kw(e,t,n,s){if(!n)return{ok:!0,fields:[]};if(!Array.isArray(t)||t.some(a=>typeof a!="string"||a===""))return{ok:!1,issues:[{rule:"object-type-index",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${e}": index \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E1F\u0E34\u0E25\u0E14\u0E4C`}]};if(t.length>8)return{ok:!1,issues:[{rule:"object-type-index",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${e}": index \u0E23\u0E30\u0E1A\u0E38\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 8 \u0E1F\u0E34\u0E25\u0E14\u0E4C`}]};let r=[],i=new Set,o=s&&j(s.properties)?s.properties:null;for(let a of t){if(i.has(a)){r.push({rule:"object-type-index",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${e}": index \u0E23\u0E30\u0E1A\u0E38 "${a}" \u0E0B\u0E49\u0E33`});continue}i.add(a),(!o||!uu(o[a]))&&r.push({rule:"object-type-index",message:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 "${e}": index \u0E2D\u0E49\u0E32\u0E07 "${a}" \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E23\u0E30\u0E14\u0E31\u0E1A\u0E1A\u0E19\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E48\u0E32\u0E40\u0E14\u0E35\u0E48\u0E22\u0E27`})}return r.length>0?{ok:!1,issues:r}:{ok:!0,fields:[...t]}}function hu(e,t){if(e==="public"||e==="member"||e==="internal")return{ok:!0,level:e};if(!j(e))return{ok:!1,issues:[{rule:"level",message:`${t}: level \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 public, member, internal \u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E41\u0E25\u0E30\u0E04\u0E19\u0E40\u0E2D\u0E07`}]};let n=[];for(let r of Object.keys(e).filter(i=>i!=="roles"&&i!=="subs").sort())n.push({rule:"level",message:`${t}: level \u0E43\u0E0A\u0E49 "${r}" \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u2014 \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30 roles \u0E41\u0E25\u0E30 subs`});let s={};return"roles"in e&&(!Array.isArray(e.roles)||e.roles.length===0||e.roles.some(r=>typeof r!="string"||r==="")?n.push({rule:"level",message:`${t}: roles \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E27\u0E48\u0E32\u0E07`}):new Set(e.roles).size!==e.roles.length?n.push({rule:"level",message:`${t}: roles \u0E23\u0E30\u0E1A\u0E38\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E0B\u0E49\u0E33`}):s.roles=[...e.roles]),"subs"in e&&(e.subs==="swept"?s.subs="swept":!Array.isArray(e.subs)||e.subs.length===0||e.subs.some(r=>typeof r!="string"||r==="")?n.push({rule:"level",message:`${t}: subs \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E04\u0E19 \u0E2B\u0E23\u0E37\u0E2D swept`}):new Set(e.subs).size!==e.subs.length?n.push({rule:"level",message:`${t}: subs \u0E23\u0E30\u0E1A\u0E38\u0E04\u0E19\u0E0B\u0E49\u0E33`}):s.subs=[...e.subs]),!("roles"in e)&&!("subs"in e)&&n.push({rule:"level",message:`${t}: level \u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 roles \u0E2B\u0E23\u0E37\u0E2D subs \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07`}),n.length>0?{ok:!1,issues:n}:{ok:!0,level:s}}function gu(e,t,n){if(!t.roles||t.roles.length===0)return[];if(n===null)return[{rule:"level-vocabulary",message:`${e}: \u0E15\u0E23\u0E27\u0E08\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E40\u0E1E\u0E23\u0E32\u0E30\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`}];if(n===void 0)return[];let s=new Set(n);return t.roles.filter(r=>!s.has(r)).map(r=>({rule:"level-roles",message:`${e}: \u0E1A\u0E17\u0E1A\u0E32\u0E17 "${r}" \u0E44\u0E21\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E1A\u0E17\u0E1A\u0E32\u0E17`}))}function yu(e){return typeof e!="string"}function Ew(e){return e==="15m"||e==="1h"||e==="6h"||e==="1d"}function $w(e,t){let n=[],s=new Map(e.map(i=>[`${i.name}.json`,i])),r=new Set;for(let i of[...t].sort((o,a)=>o.path.localeCompare(a.path))){let o=s.get(i.path);if(!o){n.push({rule:"mocks-extra",message:`\u0E44\u0E1F\u0E25\u0E4C mocks/${i.path} \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49`});continue}r.add(i.path),n.push(...Aw(o,i))}for(let i of[...e].sort((o,a)=>o.name.localeCompare(a.name)))r.has(`${i.name}.json`)||n.push({rule:"mocks-missing",message:`\u0E44\u0E21\u0E48\u0E1E\u0E1A mocks/${i.name}.json`});return n.push(...Dt(t)),n}function Aw(e,t){let n=Au(t.text);if(!n.ok)return[{rule:"mocks-json",message:`\u0E2D\u0E48\u0E32\u0E19 mocks/${e.name}.json \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u2014 \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 JSON`}];if(e.shape==="collection"){if(!Array.isArray(n.value))return[{rule:"mocks-shape",message:`mocks/${e.name}.json \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E2D\u0E47\u0E2D\u0E1A\u0E40\u0E08\u0E01\u0E15\u0E4C`}];if(n.value.length===0)return[{rule:"mocks-empty",message:`mocks/${e.name}.json \u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 1 \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`}];let s=[],r=new Set;return n.value.forEach((i,o)=>{let a=o+1;if(e.schema)for(let m of Qe(e.schema,i))s.push({rule:"mocks-schema",message:`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07 "${e.name}" \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48 ${a}: ${m}`});if(!e.idProperty||!j(i))return;let l=i[e.idProperty];if(typeof l!="string"&&!(typeof l=="number"&&Number.isInteger(l))){s.push({rule:"mocks-id",message:`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07 "${e.name}" \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48 ${a} \u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 ${e.idProperty}`});return}let c=`${typeof l}:${Rt(l)}`;r.has(c)?s.push({rule:"mocks-id",message:`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07 "${e.name}" \u0E21\u0E35 ${e.idProperty} ${Rt(l)} \u0E0B\u0E49\u0E33`}):r.add(c)}),s}return e.shape==="singleton"?n.value===null?[{rule:"mocks-empty",message:`mocks/${e.name}.json \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E47\u0E2D\u0E1A\u0E40\u0E08\u0E01\u0E15\u0E4C\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48 null`}]:j(n.value)?e.schema?Qe(e.schema,n.value).map(s=>({rule:"mocks-schema",message:`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07 "${e.name}": ${s}`})):[]:[{rule:"mocks-shape",message:`mocks/${e.name}.json \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E47\u0E2D\u0E1A\u0E40\u0E08\u0E01\u0E15\u0E4C`}]:[]}function $u(e,t){return Object.keys(e).filter(n=>!t.has(n)&&!lw.has(n)).sort().map(n=>({rule:"unknown-field",message:`\u0E1F\u0E34\u0E25\u0E14\u0E4C "${n}" \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E2A\u0E48\u0E27\u0E19\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`}))}function Pw(e,t){let n=[],s=t.find(r=>r.path==="responses.json");if(!s)n.push({rule:"mocks-missing",message:"\u0E44\u0E21\u0E48\u0E1E\u0E1A mocks/responses.json"});else{let r=Au(s.text);r.ok?Array.isArray(r.value)?r.value.length===0?n.push({rule:"mocks-case",message:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 1 \u0E01\u0E23\u0E13\u0E35"}):r.value.forEach((i,o)=>{n.push(...Nw(o,i,e))}):n.push({rule:"mocks-shape",message:"mocks/responses.json \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E01\u0E23\u0E13\u0E35\u0E40\u0E23\u0E35\u0E22\u0E07\u0E15\u0E32\u0E21\u0E25\u0E33\u0E14\u0E31\u0E1A"}):n.push({rule:"mocks-json",message:"\u0E2D\u0E48\u0E32\u0E19 mocks/responses.json \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u2014 \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 JSON"})}for(let r of t.filter(i=>i.path!=="responses.json").sort((i,o)=>i.path.localeCompare(o.path)))n.push({rule:"mocks-extra",message:`\u0E44\u0E1F\u0E25\u0E4C mocks/${r.path} \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E2A\u0E48\u0E27\u0E19\u0E02\u0E2D\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23 \u2014 \u0E43\u0E0A\u0E49 responses.json`});return n.push(...Dt(t)),n}function Nw(e,t,n){let s=e+1;if(t===null||typeof t!="object"||Array.isArray(t))return[{rule:"mocks-case-shape",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${s} \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E47\u0E2D\u0E1A\u0E40\u0E08\u0E01\u0E15\u0E4C`}];let r=t,i=[];for(let o of Object.keys(r).filter(a=>!uw.has(a)).sort())i.push({rule:"mocks-field",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${s}: \u0E1F\u0E34\u0E25\u0E14\u0E4C "${o}" \u0E43\u0E0A\u0E49\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`});if("method"in r){let o=r.method;(typeof o!="string"||!cw.has(o.toUpperCase()))&&i.push({rule:"mocks-method",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${s}: method \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 GET, HEAD, POST, PUT, PATCH, DELETE \u0E2B\u0E23\u0E37\u0E2D OPTIONS`})}return"path"in r&&(typeof r.path!="string"||!Ow(r.path))&&i.push({rule:"mocks-path",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${s}: path \u0E43\u0E0A\u0E49 :param \u0E41\u0E17\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E2A\u0E48\u0E27\u0E19 \u0E41\u0E25\u0E30 * \u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E2A\u0E48\u0E27\u0E19\u0E17\u0E49\u0E32\u0E22\u0E2A\u0E38\u0E14`}),"persona"in r&&i.push(...Cw(s,n,r.persona)),"status"in r&&!Lw(r.status)&&i.push({rule:"mocks-status",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${s}: status \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E2B\u0E31\u0E2A HTTP 100\u2013599`}),"headers"in r&&i.push(...Iw(s,r.headers)),i}function Cw(e,t,n){if(t!=="required")return[{rule:"mocks-persona-forbidden",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${e}: \u0E23\u0E30\u0E1A\u0E38 persona \u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E40\u0E21\u0E37\u0E48\u0E2D userToken \u0E40\u0E1B\u0E47\u0E19 required`}];let s=Tw(n);return s?s.filter((i,o)=>!sw.has(i)&&s.indexOf(i)===o).map(i=>({rule:"mocks-persona",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${e}: \u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01 Persona "${i}" \u2014 \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30 Persona \u0E17\u0E35\u0E48\u0E21\u0E35\u0E21\u0E32\u0E43\u0E2B\u0E49`})):[{rule:"mocks-persona",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${e}: persona \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E37\u0E48\u0E2D Persona \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D`}]}function Tw(e){return typeof e=="string"?e===""?null:[e]:!Array.isArray(e)||e.length===0||!e.every(t=>typeof t=="string"&&t!=="")?null:e}function Iw(e,t){if(t===null||typeof t!="object"||Array.isArray(t))return[{rule:"mocks-header-shape",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${e}: headers \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E25\u0E30\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`}];let n=t,s=[],r=!1;for(let i of Object.keys(n).sort())typeof n[i]!="string"&&(r=!0),i.toLowerCase().startsWith("x-pple-")&&s.push({rule:"mocks-header",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${e}: \u0E2A\u0E48\u0E27\u0E19\u0E2B\u0E31\u0E27 "${i}" \u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u2014 \u0E2B\u0E49\u0E32\u0E21\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 x-pple-`});return r&&s.unshift({rule:"mocks-header-shape",message:`\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 ${e}: headers \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E25\u0E30\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`}),s}function Lw(e){return typeof e=="number"&&Number.isInteger(e)&&e>=100&&e<=599}function Ow(e){if(e==="/")return!0;if(e.includes("?")||e.includes("#")||e.includes("\\")||e.includes(" "))return!1;let t=e.startsWith("/")?e.slice(1):e;if(t===""||t.endsWith("/"))return!1;let n=t.split("/");for(let s=0;s<n.length;s++){let r=n[s];if(r===void 0||r==="")return!1;if(r==="*"){if(s!==n.length-1)return!1;continue}if(r.includes("*"))return!1;if(r.startsWith(":")){if(!pw.test(r))return!1;continue}if(!fw.test(r))return!1}return!0}function Dt(e){let t=[];e.reduce((r,i)=>r+(i.bytes??Pu(i.text)),0)>du&&t.push({rule:"mocks-size",message:`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19 1 MB (${du.toLocaleString("en-US")} \u0E44\u0E1A\u0E15\u0E4C)`});let s=new Set;for(let r of e)for(let i of r.text.matchAll(iw)){let o=i[0];o===void 0||s.has(o)||!qw(o)||(s.add(o),t.push({rule:"mocks-national-id",message:`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E33\u0E25\u0E2D\u0E07\u0E21\u0E35\u0E40\u0E25\u0E02 13 \u0E2B\u0E25\u0E31\u0E01\u0E17\u0E35\u0E48\u0E1C\u0E48\u0E32\u0E19\u0E15\u0E31\u0E27\u0E15\u0E23\u0E27\u0E08\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E1B\u0E23\u0E30\u0E0A\u0E32\u0E0A\u0E19 (${o})`}))}return t}function qw(e){if(!/^\d{13}$/.test(e))return!1;let t=0;for(let n=0;n<12;n++)t+=Number(e[n])*(13-n);return(11-t%11)%10===Number(e[12])}function _w(e){let t=Rw(e);if(!t)return{ok:!1,issue:{rule:"frontmatter",message:"entry.md \u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 frontmatter (---) \u0E41\u0E25\u0E30\u0E1B\u0E34\u0E14\u0E2A\u0E48\u0E27\u0E19\u0E2B\u0E31\u0E27\u0E14\u0E49\u0E27\u0E22 ---"}};let n=Dw(t.yaml);return n.ok?{ok:!0,fields:n.value,body:t.body}:n}function Rw(e){let t=e.replace(/^\uFEFF/,"").replace(/\r\n/g,`
172
+ `);if(!t.startsWith(`---
173
+ `))return null;let n=t.slice(4),s=n.search(/^---[ \t]*$/m);if(s===-1)return null;let r=n.slice(0,s),i=n.slice(s),o=i.indexOf(`
174
+ `),a=o===-1?"":i.slice(o+1);return{yaml:r,body:a}}function Dw(e){let t=(0,wu.parseDocument)(e,{uniqueKeys:!0});if(t.errors.length>0)return{ok:!1,issue:{rule:"frontmatter",message:"\u0E2D\u0E48\u0E32\u0E19 YAML \u0E43\u0E19 entry.md \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49"}};let n=t.toJS({maxAliasCount:50});return n===null||typeof n!="object"||Array.isArray(n)?{ok:!1,issue:{rule:"frontmatter",message:"\u0E2A\u0E48\u0E27\u0E19\u0E2B\u0E31\u0E27\u0E02\u0E2D\u0E07 entry.md \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E38\u0E14\u0E1F\u0E34\u0E25\u0E14\u0E4C"}}:{ok:!0,value:{...n}}}function Au(e){try{return{ok:!0,value:JSON.parse(e.replace(/^\uFEFF/,""))}}catch{return{ok:!1}}}function Pu(e){return new TextEncoder().encode(e).byteLength}var Nu="registry-check.json";async function Cu(e,t){let n=t.value("--app"),s=await $e(e);if(n!==void 0&&s&&n!==s.slug)throw new u("`--app` \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49",`\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E2D\u0E1B ${s.slug}`);if(n!==void 0&&!s)throw new u("\u0E15\u0E23\u0E27\u0E08\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E44\u0E14\u0E49\u0E08\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19","\u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 `pple registry check`");let r=s?.dir??se.resolve(e.cwd),i=Eu(await Bw(se.join(r,"registry")),await xw(e,s)),o=i.some(c=>c.issues.length>0),a={ok:!o,entries:i};if(t.flag("--json")){if(L(e.out,a),!o)return;throw new u("\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01","\u0E41\u0E01\u0E49\u0E44\u0E1F\u0E25\u0E4C\u0E43\u0E19 registry/ \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 `pple registry check` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")}if(!o){if(i.length===0){e.out.say("\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E43\u0E19\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01 (registry/)");return}e.out.say(`\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27 ${i.length} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 \u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14`);for(let c of i)e.out.say(` ${c.name}`);return}let l=i.flatMap(c=>c.issues.map(m=>`${c.name}: ${m.message}`));throw new u(l.join(`
175
+ `),"\u0E41\u0E01\u0E49\u0E44\u0E1F\u0E25\u0E4C\u0E43\u0E19 registry/ \u0E41\u0E25\u0E49\u0E27\u0E23\u0E31\u0E19 `pple registry check` \u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07")}async function xw(e,t){let n=t?await jw(t.dir):null;if(await Vt(e).catch(()=>null)!==null)try{let r=await E(e),i=await r.roleOptions(),o=n?.sweepMinIntervalMinutes??xt;if(t){let a=await r.app(t.slug);o=typeof a.sweepMinIntervalMinutes=="number"?a.sweepMinIntervalMinutes:xt,await Mw(t.dir,{roles:i.map(l=>l.value),sweepMinIntervalMinutes:o})}return{roles:i.map(a=>a.value),minCadenceMinutes:o}}catch{}return n?{roles:n.roles,minCadenceMinutes:n.sweepMinIntervalMinutes}:{roles:ya,minCadenceMinutes:xt}}async function jw(e){let t=await Z.readFile(se.join(e,fe,Nu),"utf8").catch(()=>null);if(t===null)return null;try{let n=JSON.parse(t);return!Array.isArray(n.roles)||n.roles.some(s=>typeof s!="string")||typeof n.sweepMinIntervalMinutes!="number"||!Number.isInteger(n.sweepMinIntervalMinutes)||n.sweepMinIntervalMinutes<=0?null:{roles:n.roles,sweepMinIntervalMinutes:n.sweepMinIntervalMinutes}}catch{return null}}async function Mw(e,t){await Z.mkdir(se.join(e,fe),{recursive:!0}),await Z.writeFile(se.join(e,fe,Nu),`${JSON.stringify(t,null,2)}
176
+ `)}async function Bw(e){let t=await Z.stat(e).catch(r=>{if(r.code==="ENOENT")return null;throw new u("\u0E2D\u0E48\u0E32\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C registry/ \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49")});if(t===null)return[];if(!t.isDirectory())throw new u("registry/ \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23");let n=await Z.readdir(e,{withFileTypes:!0}),s=[];for(let r of n){if(r.name.startsWith("."))continue;(await Z.stat(se.join(e,r.name)).catch(()=>null))?.isDirectory()&&s.push(r.name)}return s.sort((r,i)=>r.localeCompare(i)),Promise.all(s.map(r=>Uw(e,r)))}async function Uw(e,t){let n=se.join(e,t),s=se.join(n,"entry.md"),r=await Z.readFile(s).catch(i=>{if(i.code==="ENOENT")return null;throw new u(`\u0E2D\u0E48\u0E32\u0E19 registry/${t}/entry.md \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`)});return{name:t,entryMd:r===null?null:Tu(r,`registry/${t}/entry.md`),mocks:await Fw(se.join(n,"mocks"),t)}}async function Fw(e,t){let n=[],s=new Set;async function r(i,o){let a=await Z.realpath(i).catch(()=>i);if(s.has(a))return;s.add(a);let l=await Z.readdir(i,{withFileTypes:!0}).catch(c=>{if(c.code==="ENOENT")return null;throw new u(`\u0E2D\u0E48\u0E32\u0E19 registry/${t}/mocks \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`)});if(l!==null)for(let c of[...l].sort((m,f)=>m.name.localeCompare(f.name))){if(c.name.startsWith("."))continue;let m=o===""?c.name:`${o}/${c.name}`,f=se.join(i,c.name),p=await Z.stat(f).catch(()=>{throw new u(`\u0E2D\u0E48\u0E32\u0E19 registry/${t}/mocks/${m} \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`)});if(p.isDirectory())await r(f,m);else if(p.isFile()){let h=await Z.readFile(f);n.push({path:m,text:Tu(h,`registry/${t}/mocks/${m}`),bytes:h.byteLength})}}}return await r(e,""),n}function Tu(e,t){try{return new TextDecoder("utf-8",{fatal:!0}).decode(e)}catch{throw new u(`\u0E2D\u0E48\u0E32\u0E19 ${t} \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49`,"\u0E44\u0E1F\u0E25\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21 UTF-8")}}import wi from"node:fs/promises";import bi from"node:path";var Kw=1440*60*1e3,Iu="update-check.json",Gw="config.json",Vw=new Set(["upgrade","help","--help","-h"]);function Lu(e){return e.length>0&&!Vw.has(e[0])}function vi(e,t){e.out.say(`\u0E21\u0E35 pple \u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E43\u0E2B\u0E21\u0E48 (${t}) \u0E04\u0E38\u0E13\u0E43\u0E0A\u0E49\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19 ${e.version}`)}function Si(e){e.out.say("pple \u0E0A\u0E38\u0E14\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E1C\u0E48\u0E32\u0E19 npm \u0E01\u0E32\u0E23\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48\u0E2D\u0E32\u0E08\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E04\u0E38\u0E13"),e.out.say("\u0E21\u0E35 pple \u0E2A\u0E2D\u0E07\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E14\u0E49\u0E27\u0E22\u0E27\u0E34\u0E18\u0E35\u0E40\u0E14\u0E34\u0E21\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49"),e.out.say(`\u0E2B\u0E23\u0E37\u0E2D\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E14\u0E49\u0E27\u0E22 npm:
28
177
 
29
- ${E}`)}function Me(e){return`${cn(e)}
178
+ ${Ae}`)}function ki(e){return`${Zo(e)}
30
179
 
31
180
  \u0E25\u0E2D\u0E07\u0E23\u0E31\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E19\u0E35\u0E49\u0E14\u0E49\u0E27\u0E22\u0E15\u0E31\u0E27\u0E40\u0E2D\u0E07:
32
181
 
33
- ${E}`}async function $n(e,t){if(!await xo(e))return null;await Eo(e);let n=await ue(e);if(n===null||!ce(n,e.version))return null;if(Ue(e,n),!await le(e))return Be(e),e.out.say(),null;if(!e.interactive)return e.out.say("\u0E23\u0E31\u0E19 `pple upgrade` \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E04\u0E38\u0E13\u0E1E\u0E23\u0E49\u0E2D\u0E21"),e.out.say(),null;if(!await e.confirm("\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple \u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E40\u0E25\u0E22\u0E44\u0E2B\u0E21?"))return e.out.say(),null;let r=await pe(e,n);return r.code!==0?await Po(e,n,r):(e.out.say(`pple \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19 ${n} \u0E41\u0E25\u0E49\u0E27 \u0E01\u0E33\u0E25\u0E31\u0E07\u0E17\u0E33\u0E07\u0E32\u0E19\u0E15\u0E48\u0E2D\u0E08\u0E32\u0E01\u0E17\u0E35\u0E48\u0E04\u0E49\u0E32\u0E07\u0E44\u0E27\u0E49\u2026`),e.out.say(),e.reexec(t))}async function Po(e,t,n){return e.out.say(`\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple \u0E40\u0E1B\u0E47\u0E19 ${t} \u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08`),e.out.say(Me(n)),e.out.say(),await e.confirm(`\u0E43\u0E0A\u0E49 pple ${e.version} \u0E17\u0E33\u0E07\u0E32\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B\u0E01\u0E48\u0E2D\u0E19\u0E44\u0E2B\u0E21?`)?(e.out.say(),null):(e.out.say("\u0E2B\u0E22\u0E38\u0E14\u0E41\u0E25\u0E49\u0E27 \u0E44\u0E21\u0E48\u0E21\u0E35\u0E2D\u0E30\u0E44\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07"),1)}async function xo(e){if(!e.updateChecks||!await Co(e))return!1;let t=await bn(je.join(e.configDir,wn));return typeof t?.lastCheckedAt!="number"?!0:e.now()-t.lastCheckedAt>=vo}async function Eo(e){let t={lastCheckedAt:e.now()};await qe.mkdir(e.configDir,{recursive:!0}).then(()=>qe.writeFile(je.join(e.configDir,wn),`${JSON.stringify(t,null,2)}
34
- `)).catch(()=>{})}async function Co(e){return(await bn(je.join(e.configDir,$o)))?.updateCheck!==!1}async function bn(e){let t=await qe.readFile(e,"utf8").catch(()=>null);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}async function Pn(e){let t=await ue(e);if(t===null)throw new s("\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D npm \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E15\u0E23\u0E27\u0E08\u0E2B\u0E32\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E43\u0E2B\u0E21\u0E48\u0E02\u0E2D\u0E07 pple \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",`\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E2D\u0E34\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E40\u0E19\u0E47\u0E15 \u0E2B\u0E23\u0E37\u0E2D\u0E2D\u0E31\u0E1B\u0E40\u0E01\u0E23\u0E14\u0E42\u0E14\u0E22\u0E15\u0E23\u0E07:
182
+ ${Ae}`}async function Ou(e,t){if(!await Yw(e))return null;await Ww(e);let n=await on(e);if(n===null||!cn(n,e.version))return null;if(vi(e,n),!await an(e))return Si(e),e.out.say(),null;if(!e.interactive)return e.out.say("\u0E23\u0E31\u0E19 `pple upgrade` \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E04\u0E38\u0E13\u0E1E\u0E23\u0E49\u0E2D\u0E21"),e.out.say(),null;if(!await e.confirm("\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple \u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E40\u0E25\u0E22\u0E44\u0E2B\u0E21?"))return e.out.say(),null;let s=await ln(e,n);return s.code!==0?await Jw(e,n,s):(e.out.say(`pple \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19 ${n} \u0E41\u0E25\u0E49\u0E27 \u0E01\u0E33\u0E25\u0E31\u0E07\u0E17\u0E33\u0E07\u0E32\u0E19\u0E15\u0E48\u0E2D\u0E08\u0E32\u0E01\u0E17\u0E35\u0E48\u0E04\u0E49\u0E32\u0E07\u0E44\u0E27\u0E49\u2026`),e.out.say(),e.reexec(t))}async function Jw(e,t,n){return e.out.say(`\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple \u0E40\u0E1B\u0E47\u0E19 ${t} \u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08`),e.out.say(ki(n)),e.out.say(),await e.confirm(`\u0E43\u0E0A\u0E49 pple ${e.version} \u0E17\u0E33\u0E07\u0E32\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B\u0E01\u0E48\u0E2D\u0E19\u0E44\u0E2B\u0E21?`)?(e.out.say(),null):(e.out.say("\u0E2B\u0E22\u0E38\u0E14\u0E41\u0E25\u0E49\u0E27 \u0E44\u0E21\u0E48\u0E21\u0E35\u0E2D\u0E30\u0E44\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07"),1)}async function Yw(e){if(!e.updateChecks||!await Hw(e))return!1;let t=await qu(bi.join(e.configDir,Iu));return typeof t?.lastCheckedAt!="number"?!0:e.now()-t.lastCheckedAt>=Kw}async function Ww(e){let t={lastCheckedAt:e.now()};await wi.mkdir(e.configDir,{recursive:!0}).then(()=>wi.writeFile(bi.join(e.configDir,Iu),`${JSON.stringify(t,null,2)}
183
+ `)).catch(()=>{})}async function Hw(e){return(await qu(bi.join(e.configDir,Gw)))?.updateCheck!==!1}async function qu(e){let t=await wi.readFile(e,"utf8").catch(()=>null);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}async function _u(e){let t=await on(e);if(t===null)throw new u("\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D npm \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E15\u0E23\u0E27\u0E08\u0E2B\u0E32\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E43\u0E2B\u0E21\u0E48\u0E02\u0E2D\u0E07 pple \u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",`\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E2D\u0E34\u0E19\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E40\u0E19\u0E47\u0E15 \u0E2B\u0E23\u0E37\u0E2D\u0E2D\u0E31\u0E1B\u0E40\u0E01\u0E23\u0E14\u0E42\u0E14\u0E22\u0E15\u0E23\u0E07:
35
184
 
36
- ${E}`);if(!ce(t,e.version)){e.out.say(`\u0E04\u0E38\u0E13\u0E43\u0E0A\u0E49 pple \u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27 (${e.version})`);return}if(!await le(e)){Ue(e,t),e.out.say(),Be(e);return}e.out.say(`\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple ${e.version} \u2192 ${t}\u2026`);let n=await pe(e,t);if(n.code!==0)throw new s(`\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple \u0E40\u0E1B\u0E47\u0E19 ${t} \u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08`,Me(n));e.out.say(`pple \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19 ${t} \u0E41\u0E25\u0E49\u0E27`)}async function f(e,t){let n=t.value("--app");if(n!==void 0)return n;let r=await J(e).catch(o=>{throw o instanceof s&&o.message===he?new s("\u0E41\u0E2D\u0E1B\u0E44\u0E2B\u0E19? \u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E41\u0E2D\u0E1B PPLE \u0E41\u0E25\u0E30\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E23\u0E30\u0E1A\u0E38 `--app`","\u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E30\u0E1A\u0E38\u0E41\u0E2D\u0E1B\u0E14\u0E49\u0E27\u0E22 `--app <slug>` (\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E14\u0E49\u0E27\u0E22 `pple apps`)"):o});if(r.apiBase!==""&&r.apiBase!==e.config.apiBase)throw new s("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 PPLE Platform \u0E04\u0E19\u0E25\u0E30\u0E15\u0E31\u0E27\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2D\u0E22\u0E39\u0E48",`\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E16\u0E39\u0E01\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E27\u0E49\u0E01\u0E31\u0E1A ${r.apiBase}`);return r.slug}var M="\u0E1A\u0E31\u0E0D\u0E0A\u0E35",$="\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",b="\u0E01\u0E32\u0E23\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48",me="\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",fe="\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E25\u0E30\u0E23\u0E35\u0E27\u0E34\u0E27",Ao="\u0E2D\u0E37\u0E48\u0E19 \u0E46",G=[{path:["auth","login"],section:M,summary:"\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E14\u0E49\u0E27\u0E22 PPLE ID \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",usage:[["pple auth login"]],example:["pple auth login"],run:e=>ft(e)},{path:["auth","logout"],section:M,summary:"\u0E25\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49",usage:[["pple auth logout"]],example:["pple auth logout"],run:e=>gt(e)},{path:["whoami"],section:M,summary:"\u0E14\u0E39\u0E27\u0E48\u0E32\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E14\u0E49\u0E27\u0E22\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E43\u0E14",usage:[["pple whoami"]],options:[y],example:["pple whoami"],covers:["me"],run:(e,t)=>Ae(e,t.flag("--json"))},{path:["auth","whoami"],section:M,hidden:!0,summary:"\u0E14\u0E39\u0E27\u0E48\u0E32\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E14\u0E49\u0E27\u0E22\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E43\u0E14 (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple whoami`)",usage:[["pple auth whoami"]],options:[y],example:["pple auth whoami"],run:(e,t)=>Ae(e,t.flag("--json"))},{path:["apps"],section:$,summary:"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 (\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E25\u0E30\u0E17\u0E35\u0E48\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32)",usage:[["pple apps"]],options:[y],example:["pple apps","pple apps --json"],covers:["apps"],run:(e,t)=>mt(e,t.flag("--json"))},{path:["init"],section:$,summary:"\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E2B\u0E23\u0E37\u0E2D\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E1A\u0E19\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49",usage:[["pple init","\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E41\u0E25\u0E30\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E42\u0E04\u0E49\u0E14\u0E1A\u0E19\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49 (\u0E16\u0E32\u0E21\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B)"],['pple init --name "App"',"\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E16\u0E32\u0E21 (\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A agent/\u0E2A\u0E04\u0E23\u0E34\u0E1B\u0E15\u0E4C)"],["pple init <app>","\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"]],options:[{long:"--name",value:"<App Name>",text:"\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48\u0E14\u0E49\u0E27\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E19\u0E35\u0E49"},{long:"--dir",value:"<folder>",text:"\u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E27\u0E32\u0E07\u0E42\u0E04\u0E49\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B"}],example:['pple init --name "\u0E25\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23"',"pple init brave-otter"],maxArgs:1,covers:["createApp"],run:(e,t)=>{let n=t.value("--name"),r=t.positionals[0];if(n!==void 0&&r)throw new s("`pple init` \u0E23\u0E31\u0E1A\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48 \u0E2B\u0E23\u0E37\u0E2D\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27 \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E43\u0E14\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19",'\u0E43\u0E0A\u0E49 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13"` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E43\u0E2B\u0E21\u0E48 \u0E2B\u0E23\u0E37\u0E2D `pple init <app>` \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27');return hn(e,{slug:r,name:n,dir:t.value("--dir")})}},{path:["deploy"],section:$,refreshesGuidance:!0,summary:"\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E02\u0E36\u0E49\u0E19\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E08\u0E23\u0E34\u0E07",usage:[['pple deploy [-m "note"]']],options:[{long:"--message",short:"-m",value:"<note>",text:"\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 \u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B"}],example:['pple deploy -m "\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E2A\u0E21\u0E31\u0E04\u0E23"'],run:(e,t)=>xt(e,{message:t.value("--message")})},{path:["rename"],section:$,summary:"\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B (\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E41\u0E25\u0E30\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49)",usage:[['pple rename "\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48"']],options:[m],example:['pple rename "\u0E25\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23"'],maxArgs:50,covers:["renameApp"],run:async(e,t)=>At(e,await f(e,t),t.positionals)},{path:["retire"],section:$,summary:"\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E2D\u0E1B (\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E41\u0E25\u0E30\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49 \u2014 \u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D)",usage:[["pple retire"]],options:[m,{long:"--confirm",value:"<slug>",text:"slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E08\u0E30\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07 (\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25)"}],example:["pple retire","pple retire --app brave-otter --confirm brave-otter"],confirmation:"\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E08\u0E30\u0E43\u0E2B\u0E49\u0E1E\u0E34\u0E21\u0E1E\u0E4C slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19 \u0E16\u0E49\u0E32\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25 (\u0E40\u0E0A\u0E48\u0E19 agent) \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <slug>` \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B \u2014 \u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E17\u0E38\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",covers:["retire"],run:async(e,t)=>Rt(e,await f(e,t),t.value("--confirm"))},{path:["retry-setup"],section:$,summary:"\u0E25\u0E2D\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48 \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E04\u0E23\u0E31\u0E49\u0E07\u0E41\u0E23\u0E01\u0E04\u0E49\u0E32\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",usage:[["pple retry-setup"]],options:[m],example:["pple retry-setup --app brave-otter"],covers:["provision"],run:async(e,t)=>_t(e,await f(e,t))},{path:["agreement"],section:M,summary:"\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32 (\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E04\u0E38\u0E13\u0E40\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25)",usage:[["pple agreement"]],example:["pple agreement"],confirmation:"\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E17\u0E35\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48 \u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48\u0E04\u0E2D\u0E19\u0E42\u0E0B\u0E25 \u2014 agent \u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E41\u0E17\u0E19\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",covers:["acceptAgreement"],run:e=>kt(e)},{path:["redeploy"],section:$,summary:"\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E42\u0E04\u0E49\u0E14\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19\u0E43\u0E2B\u0E21\u0E48 (\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E04\u0E48\u0E32 env \u0E21\u0E35\u0E1C\u0E25)",usage:[["pple redeploy"]],options:[m],example:["pple redeploy","pple redeploy --app brave-otter"],covers:["redeploy"],run:async(e,t)=>Et(e,await f(e,t))},{path:["deploys"],section:$,summary:"\u0E14\u0E39\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22 \u0E2B\u0E23\u0E37\u0E2D\u0E2D\u0E48\u0E32\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E17\u0E35\u0E48\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",usage:[["pple deploys","\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14"],["pple deploys <id>","\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E41\u0E25\u0E30\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E02\u0E2D\u0E07\u0E04\u0E23\u0E31\u0E49\u0E07\u0E19\u0E31\u0E49\u0E19 (id \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15)"]],options:[m,y],example:["pple deploys","pple deploys deploy-12 --app brave-otter"],maxArgs:1,covers:["deploys"],run:async(e,t)=>Ct(e,await f(e,t),t.positionals[0],t.flag("--json"))},{path:["cron"],section:$,summary:"\u0E14\u0E39\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32 (Cron Schedule) \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B \u2014 \u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22 \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C UTC \u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49",usage:[["pple cron","\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49 \u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B \u0E41\u0E25\u0E30\u0E1C\u0E25\u0E01\u0E32\u0E23\u0E23\u0E31\u0E19\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14"],["pple cron pause","\u0E2B\u0E22\u0E38\u0E14\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27"],["pple cron resume","\u0E43\u0E2B\u0E49\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19"],["pple cron run <\u0E25\u0E33\u0E14\u0E31\u0E1A|\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C>","\u0E23\u0E31\u0E19\u0E07\u0E32\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E17\u0E31\u0E19\u0E17\u0E35 (\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E41\u0E21\u0E49\u0E2B\u0E22\u0E38\u0E14\u0E2D\u0E22\u0E39\u0E48)"]],options:[m,y],example:["pple cron","pple cron --json --app brave-otter"],covers:["cron"],run:async(e,t)=>ke(e,await f(e,t),t.flag("--json"))},{path:["cron","list"],section:$,hidden:!0,summary:"\u0E14\u0E39\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple cron`)",usage:[["pple cron list"]],options:[m,y],example:["pple cron list"],run:async(e,t)=>ke(e,await f(e,t),t.flag("--json"))},{path:["cron","pause"],section:$,summary:"\u0E2B\u0E22\u0E38\u0E14\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27 (\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49\u0E22\u0E31\u0E07\u0E2D\u0E22\u0E39\u0E48 \u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E44\u0E21\u0E48\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19\u0E40\u0E2D\u0E07)",usage:[["pple cron pause"]],options:[m,y],example:["pple cron pause --app brave-otter"],covers:["pauseCron"],run:async(e,t)=>St(e,await f(e,t),t.flag("--json"))},{path:["cron","resume"],section:$,summary:"\u0E43\u0E2B\u0E49\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19",usage:[["pple cron resume"]],options:[m,y],example:["pple cron resume --app brave-otter"],covers:["resumeCron"],run:async(e,t)=>Tt(e,await f(e,t),t.flag("--json"))},{path:["cron","run"],section:$,summary:"\u0E23\u0E31\u0E19\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E07\u0E32\u0E19\u0E17\u0E31\u0E19\u0E17\u0E35 (\u0E40\u0E23\u0E35\u0E22\u0E01 scheduled() \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E08\u0E23\u0E34\u0E07 \u0E46)",usage:[["pple cron run 1","\u0E23\u0E31\u0E19\u0E07\u0E32\u0E19\u0E25\u0E33\u0E14\u0E31\u0E1A\u0E17\u0E35\u0E48 1 \u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07 `pple cron`"],['pple cron run "0 1 * * *"',"\u0E23\u0E31\u0E19\u0E07\u0E32\u0E19\u0E17\u0E35\u0E48\u0E21\u0E35\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49"]],options:[m,y],example:["pple cron run 1",'pple cron run "0 1 * * *" --app brave-otter'],maxArgs:5,covers:["runCron"],run:async(e,t)=>Dt(e,await f(e,t),t.positionals,t.flag("--json"))},{path:["info"],section:$,refreshesGuidance:!0,summary:"\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30 \u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 \u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22 \u0E41\u0E25\u0E30\u0E04\u0E35\u0E22\u0E4C env \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B",usage:[["pple info [<slug>]"]],options:[m,y],example:["pple info","pple info brave-otter","pple info --app brave-otter --json"],maxArgs:1,covers:["app","metrics"],run:async(e,t)=>un(e,t.positionals[0]??await f(e,t),t.flag("--json"))},{path:["promote"],section:b,summary:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E41\u0E2D\u0E1B\u0E08\u0E32\u0E01\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E02\u0E36\u0E49\u0E19\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49 (\u0E40\u0E0A\u0E34\u0E0D\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49)",usage:[["pple promote"]],options:[m],example:["pple promote --app brave-otter"],covers:["promoteToBeta"],run:async(e,t)=>Vt(e,await f(e,t))},{path:["invites"],section:b,summary:"\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E40\u0E0A\u0E34\u0E0D\u0E44\u0E27\u0E49 (\u0E40\u0E2B\u0E47\u0E19\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E40\u0E15\u0E47\u0E21)",usage:[["pple invites","\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E30\u0E17\u0E35\u0E48\u0E19\u0E31\u0E48\u0E07\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E44\u0E1B"]],options:[m,y],example:["pple invites","pple invites --json"],covers:["invites"],run:async(e,t)=>Le(e,await f(e,t),t.flag("--json"))},{path:["invites","list"],section:b,hidden:!0,summary:"\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E40\u0E0A\u0E34\u0E0D\u0E44\u0E27\u0E49 (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple invites`)",usage:[["pple invites list"]],options:[m,y],example:["pple invites list"],run:async(e,t)=>Le(e,await f(e,t),t.flag("--json"))},{path:["invites","add"],section:b,summary:"\u0E40\u0E0A\u0E34\u0E0D\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C (\u0E41\u0E2D\u0E1B\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49 \u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14 20 \u0E04\u0E19)",usage:[["pple invites add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>"]],options:[m],example:["pple invites add 0812345678"],maxArgs:1,covers:["addInvite"],run:async(e,t)=>Jt(e,await f(e,t),t.positionals[0])},{path:["invites","remove"],section:b,summary:"\u0E19\u0E33\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E2D\u0E2D\u0E01 (\u0E04\u0E37\u0E19\u0E17\u0E35\u0E48\u0E19\u0E31\u0E48\u0E07)",usage:[["pple invites remove <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>"]],options:[m],example:["pple invites remove 0812345678"],maxArgs:1,covers:["removeInvite"],run:async(e,t)=>Kt(e,await f(e,t),t.positionals[0])},{path:["roles"],section:b,summary:"\u0E14\u0E39\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E08\u0E33\u0E01\u0E31\u0E14\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E44\u0E14\u0E49",usage:[["pple roles"]],options:[y],example:["pple roles","pple roles --json"],covers:["roleOptions"],run:(e,t)=>Wt(e,t.flag("--json"))},{path:["request","publish"],section:b,summary:"\u0E02\u0E2D\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07 (\u0E41\u0E2D\u0E1B\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49) \u2014 \u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34",usage:[["pple request publish --icon <\u0E44\u0E1F\u0E25\u0E4C>"]],options:[m,{long:"--visibility",value:"<mode>",text:"\u0E43\u0E04\u0E23\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E2D\u0E1B: everyone (\u0E17\u0E38\u0E01\u0E04\u0E19, \u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19) | roles | unlisted (\u0E44\u0E21\u0E48\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23)"},{long:"--roles",value:"<a,b>",text:"\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E35\u0E48\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E2D\u0E1B (\u0E0A\u0E37\u0E48\u0E2D\u0E22\u0E48\u0E2D\u0E2B\u0E23\u0E37\u0E2D\u0E0A\u0E37\u0E48\u0E2D\u0E44\u0E17\u0E22 \u0E14\u0E39 `pple roles`) \u0E43\u0E0A\u0E49\u0E01\u0E31\u0E1A roles"},{long:"--icon",value:"<\u0E44\u0E1F\u0E25\u0E4C>",text:"\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E41\u0E2D\u0E1B PNG/JPEG/WebP \u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 512 KB (\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19 \u0E40\u0E27\u0E49\u0E19\u0E41\u0E15\u0E48 unlisted)"},{long:"--address",value:"<\u0E0A\u0E37\u0E48\u0E2D>",text:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E40\u0E2A\u0E19\u0E2D \u0E40\u0E0A\u0E48\u0E19 donate (\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A)"},{long:"--confirm",value:"<address>",text:"\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E02\u0E2D \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A --address (\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25)"}],example:["pple request publish --icon icon.png","pple request publish --icon icon.png --visibility roles --roles hq,mp","pple request publish --icon icon.png --address donate --confirm donate"],confirmation:"\u0E16\u0E49\u0E32\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07 (--address) \u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E08\u0E30\u0E16\u0E32\u0E21\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19 \u0E2A\u0E48\u0E27\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25 (\u0E40\u0E0A\u0E48\u0E19 agent) \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <address>` \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E19\u0E31\u0E49\u0E19 \u2014 \u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E17\u0E38\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",covers:["filePublishRequest","uploadIcon"],run:async(e,t)=>Qt(e,await f(e,t),{visibility:t.value("--visibility"),roles:t.value("--roles"),icon:t.value("--icon"),address:t.value("--address"),confirm:t.value("--confirm")})},{path:["request","change"],section:b,summary:"\u0E02\u0E2D\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D \u0E44\u0E2D\u0E04\u0E2D\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E41\u0E25\u0E49\u0E27",usage:[['pple request change --name "\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48"']],options:[m,{long:"--name",value:"<\u0E0A\u0E37\u0E48\u0E2D>",text:"\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48"},{long:"--icon",value:"<\u0E44\u0E1F\u0E25\u0E4C>",text:"\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E43\u0E2B\u0E21\u0E48 (PNG/JPEG/WebP \u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 512 KB)"},{long:"--visibility",value:"<mode>",text:"\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E43\u0E2B\u0E21\u0E48: everyone | roles | unlisted"},{long:"--roles",value:"<a,b>",text:"\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E35\u0E48\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E2D\u0E1B \u0E43\u0E0A\u0E49\u0E01\u0E31\u0E1A roles"}],example:['pple request change --name "\u0E25\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23 2"',"pple request change --visibility unlisted"],covers:["fileChangeRequest"],run:async(e,t)=>Zt(e,await f(e,t),{name:t.value("--name"),icon:t.value("--icon"),visibility:t.value("--visibility"),roles:t.value("--roles")})},{path:["request","limit"],section:b,summary:"\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32\u0E17\u0E23\u0E31\u0E1E\u0E22\u0E32\u0E01\u0E23 (CPU \u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32)",usage:[["pple request limit --cpu-ms <ms>","\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21 CPU \u0E15\u0E48\u0E2D request"],["pple request limit --notifications <\u0E23\u0E32\u0E22>","\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E16\u0E36\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E15\u0E48\u0E2D\u0E27\u0E31\u0E19"],["pple request limit --cron-schedules <\u0E08\u0E33\u0E19\u0E27\u0E19>","\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E08\u0E33\u0E19\u0E27\u0E19\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E14\u0E49"],["pple request limit --cron-interval <\u0E19\u0E32\u0E17\u0E35>","\u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E16\u0E35\u0E48\u0E02\u0E36\u0E49\u0E19 (\u0E2B\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E19\u0E49\u0E2D\u0E22\u0E25\u0E07)"]],options:[m,{long:"--cpu-ms",value:"<ms>",text:"CPU \u0E15\u0E48\u0E2D request \u0E17\u0E35\u0E48\u0E02\u0E2D (\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21\u0E1A\u0E27\u0E01)"},{long:"--notifications",value:"<\u0E23\u0E32\u0E22/\u0E27\u0E31\u0E19>",text:"\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E16\u0E36\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E15\u0E48\u0E2D\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E02\u0E2D (\u0E19\u0E31\u0E1A\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E04\u0E23\u0E31\u0E49\u0E07)"},{long:"--cron-schedules",value:"<\u0E08\u0E33\u0E19\u0E27\u0E19>",text:"\u0E08\u0E33\u0E19\u0E27\u0E19\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48\u0E02\u0E2D (\u0E1B\u0E01\u0E15\u0E34 3)"},{long:"--cron-interval",value:"<\u0E19\u0E32\u0E17\u0E35>",text:"\u0E23\u0E30\u0E22\u0E30\u0E2B\u0E48\u0E32\u0E07\u0E2A\u0E31\u0E49\u0E19\u0E2A\u0E38\u0E14\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E01\u0E32\u0E23\u0E23\u0E31\u0E19\u0E17\u0E35\u0E48\u0E02\u0E2D \u0E40\u0E1B\u0E47\u0E19\u0E19\u0E32\u0E17\u0E35 (\u0E1B\u0E01\u0E15\u0E34 5)"}],example:["pple request limit --cpu-ms 100","pple request limit --notifications 5000","pple request limit --cron-schedules 6"],covers:["fileLimitRequest"],run:async(e,t)=>en(e,await f(e,t),{cpuMs:t.value("--cpu-ms"),notifications:t.value("--notifications"),cronSchedules:t.value("--cron-schedules"),cronInterval:t.value("--cron-interval")})},{path:["request","retire"],section:b,summary:"\u0E02\u0E2D\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E2D\u0E22\u0E39\u0E48",usage:[["pple request retire"]],options:[m],example:["pple request retire --app brave-otter"],covers:["fileRetireRequest"],run:async(e,t)=>tn(e,await f(e,t))},{path:["requests"],section:b,summary:"\u0E14\u0E39\u0E04\u0E33\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E22\u0E37\u0E48\u0E19\u0E44\u0E27\u0E49\u0E41\u0E25\u0E30\u0E1C\u0E25\u0E01\u0E32\u0E23\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32",usage:[["pple requests"]],options:[m,y],example:["pple requests","pple requests --json"],covers:["requests"],run:async(e,t)=>rn(e,await f(e,t),t.flag("--json"))},{path:["collaborators"],section:me,summary:"\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E40\u0E2B\u0E47\u0E19\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E40\u0E15\u0E47\u0E21)",usage:[["pple collaborators","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"]],options:[m,y],example:["pple collaborators","pple collaborators --json"],covers:["collaborators"],run:async(e,t)=>De(e,await f(e,t),t.flag("--json"))},{path:["collaborators","list"],section:me,hidden:!0,summary:"\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple collaborators`)",usage:[["pple collaborators list"]],options:[m,y],example:["pple collaborators list"],run:async(e,t)=>De(e,await f(e,t),t.flag("--json"))},{path:["collaborators","add"],section:me,summary:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E40\u0E15\u0E47\u0E21 (\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19)",usage:[["pple collaborators add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>","\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E40\u0E1A\u0E2D\u0E23\u0E4C \u0E41\u0E25\u0E30\u0E16\u0E32\u0E21\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25"],["pple collaborators add --confirm <token>","\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E1E\u0E1A \u0E14\u0E49\u0E27\u0E22\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32"]],options:[m,{long:"--confirm",value:"<token>",text:"\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32 (\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25)"}],example:["pple collaborators add 0812345678","pple collaborators add --confirm <token>"],maxArgs:1,confirmation:"\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E08\u0E30\u0E41\u0E2A\u0E14\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E17\u0E35\u0E48\u0E1B\u0E01\u0E1B\u0E34\u0E14\u0E1A\u0E32\u0E07\u0E2A\u0E48\u0E27\u0E19\u0E41\u0E25\u0E30\u0E16\u0E32\u0E21\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19 \u0E2A\u0E48\u0E27\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25 (\u0E40\u0E0A\u0E48\u0E19 agent) \u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E08\u0E30\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E25\u0E30\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E41\u0E25\u0E49\u0E27\u0E2B\u0E22\u0E38\u0E14 \u2014 \u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E27\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E19\u0E35\u0E49\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E08\u0E36\u0E07\u0E23\u0E31\u0E19\u0E0B\u0E49\u0E33\u0E14\u0E49\u0E27\u0E22 `--confirm <token>` (\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E43\u0E19 10 \u0E19\u0E32\u0E17\u0E35)",covers:["lookupCollaborator","confirmCollaborator"],run:async(e,t)=>Mt(e,await f(e,t),{phone:t.positionals[0],confirm:t.value("--confirm")})},{path:["collaborators","remove"],section:me,summary:"\u0E19\u0E33\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2D\u0E2D\u0E01 (\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E02\u0E2D\u0E07\u0E40\u0E02\u0E32\u0E08\u0E30\u0E2B\u0E22\u0E38\u0E14\u0E17\u0E31\u0E19\u0E17\u0E35)",usage:[["pple collaborators remove <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>"]],options:[m],example:["pple collaborators remove 0812345678"],maxArgs:1,covers:["removeCollaborator"],run:async(e,t)=>Gt(e,await f(e,t),t.positionals[0])},{path:["notes"],section:fe,summary:"\u0E2D\u0E48\u0E32\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E16\u0E36\u0E07\u0E17\u0E35\u0E21\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B",usage:[["pple notes","\u0E2D\u0E48\u0E32\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14 (\u0E43\u0E2B\u0E21\u0E48\u0E2A\u0E38\u0E14\u0E01\u0E48\u0E2D\u0E19)"]],options:[m,y],example:["pple notes","pple notes --json"],covers:["notes"],run:async(e,t)=>Se(e,await f(e,t),t.flag("--json"))},{path:["notes","list"],section:fe,hidden:!0,summary:"\u0E2D\u0E48\u0E32\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E16\u0E36\u0E07\u0E17\u0E35\u0E21\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple notes`)",usage:[["pple notes list"]],options:[m,y],example:["pple notes list"],run:async(e,t)=>Se(e,await f(e,t),t.flag("--json"))},{path:["notes","add"],section:fe,summary:"\u0E40\u0E02\u0E35\u0E22\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E16\u0E36\u0E07\u0E17\u0E35\u0E21\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E17\u0E38\u0E01\u0E04\u0E19\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19 \u0E41\u0E01\u0E49\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E1A\u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49)",usage:[['pple notes add "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21"',"\u0E40\u0E02\u0E35\u0E22\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01 (\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 2,000 \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23)"],["pple notes add < \u0E44\u0E1F\u0E25\u0E4C","\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E17\u0E32\u0E07 stdin \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E23\u0E30\u0E1A\u0E38"]],options:[m],example:['pple notes add "\u0E15\u0E23\u0E27\u0E08\u0E41\u0E25\u0E49\u0E27 \u0E1C\u0E48\u0E32\u0E19"'],maxArgs:500,covers:["addNote"],run:async(e,t)=>Nt(e,await f(e,t),t.positionals)},{path:["reviews"],section:fe,summary:"\u0E2D\u0E48\u0E32\u0E19\u0E1C\u0E25\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E40\u0E23\u0E34\u0E48\u0E21\u0E23\u0E35\u0E27\u0E34\u0E27)",usage:[["pple reviews","\u0E23\u0E35\u0E27\u0E34\u0E27\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E17\u0E31\u0E49\u0E07\u0E09\u0E1A\u0E31\u0E1A \u0E41\u0E25\u0E30\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E04\u0E23\u0E31\u0E49\u0E07\u0E01\u0E48\u0E2D\u0E19"],["pple reviews <id>","\u0E23\u0E35\u0E27\u0E34\u0E27\u0E04\u0E23\u0E31\u0E49\u0E07\u0E19\u0E31\u0E49\u0E19 (id \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15)"]],options:[m,y],example:["pple reviews","pple reviews rev-1 --json"],maxArgs:1,run:async(e,t)=>Ut(e,await f(e,t),t.positionals[0],t.flag("--json"))},{path:["env","list"],section:"\u0E04\u0E48\u0E32 env",refreshesGuidance:!0,summary:"\u0E14\u0E39\u0E15\u0E31\u0E27\u0E41\u0E1B\u0E23\u0E41\u0E25\u0E30 secret \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49",usage:[["pple env list"]],options:[m,y],example:["pple env list","pple env list --app brave-otter"],covers:["env"],run:async(e,t)=>on(e,await f(e,t),t.flag("--json"))},{path:["env","set"],section:"\u0E04\u0E48\u0E32 env",refreshesGuidance:!0,summary:"\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E15\u0E31\u0E27\u0E41\u0E1B\u0E23 (\u0E2B\u0E23\u0E37\u0E2D --secret) \u0E23\u0E31\u0E1A\u0E04\u0E48\u0E32\u0E08\u0E32\u0E01 arg, --file \u0E2B\u0E23\u0E37\u0E2D stdin",usage:[["pple env set <KEY> [VAL]"]],options:[m,{long:"--secret",text:"\u0E40\u0E01\u0E47\u0E1A\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19 secret \u0E41\u0E1A\u0E1A\u0E40\u0E02\u0E35\u0E22\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27"},{long:"--file",value:"<path>",text:"\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E48\u0E32\u0E08\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C"}],example:["pple env set API_URL https://example.com","echo -n $TOKEN | pple env set API_TOKEN --secret"],maxArgs:2,covers:["setEnv"],run:async(e,t)=>{let[n,r]=t.positionals;if(!n)throw new s("`pple env set` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38 KEY","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple env set API_URL https://example.com`");return sn(e,await f(e,t),{key:n,value:r,secret:t.flag("--secret"),file:t.value("--file")})}},{path:["env","delete"],section:"\u0E04\u0E48\u0E32 env",refreshesGuidance:!0,summary:"\u0E25\u0E1A\u0E15\u0E31\u0E27\u0E41\u0E1B\u0E23\u0E2B\u0E23\u0E37\u0E2D secret",usage:[["pple env delete <KEY>"]],options:[m],example:["pple env delete API_URL"],maxArgs:1,covers:["deleteEnv"],run:async(e,t)=>{let n=t.positionals[0];if(!n)throw new s("`pple env delete` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38 KEY","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple env delete API_URL`");return an(e,await f(e,t),n)}},{path:["upgrade"],section:Ao,summary:"\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",usage:[["pple upgrade"]],example:["pple upgrade"],run:e=>Pn(e)}];function Cn(e){let[t,...n]=e;if(t===void 0||t==="--help"||t==="-h")return{kind:"overview"};if(t==="help")return n.length===0?{kind:"overview"}:xn(n);let r=An(e);if(r){let o=e.slice(r.path.length);return Rn(o)?{kind:"help",path:r.path}:{kind:"run",command:r,rest:o}}return xn(e,!0)}function An(e){return G.filter(t=>t.path.every((n,r)=>e[r]===n)).sort((t,n)=>n.path.length-t.path.length)[0]}function xn(e,t=!1){let n=An(e);if(n&&!t)return{kind:"help",path:n.path};let r=Ro(e);if(r.length===0)throw En(e[0]);let o=e[r.length];if(o===void 0||Rn(e.slice(r.length)))return{kind:"help",path:r};throw En(`${r.join(" ")} ${o}`)}function Ro(e){let t=[];for(let n of e){let r=[...t,n];if(!G.some(i=>r.every((a,u)=>i.path[u]===a)))break;t.push(n)}return t}function Rn(e){if(e[0]==="help")return!0;let t=e.indexOf("--")===-1?e:e.slice(0,e.indexOf("--"));return t.includes("--help")||t.includes("-h")}function En(e){return new s(`\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07 \`pple ${e}\``,"\u0E23\u0E31\u0E19 `pple --help` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14")}async function _n(e,t){try{let n=Cn(e);if(n.kind==="overview")return t.out.say(pt(G)),0;if(n.kind==="help")return t.out.say(ct(n.path,G)),0;let r=Fe(n.command,n.rest);if(!r.flag("--json")&&vn(e)){let o=await $n(t,e);if(o!==null)return o}return n.command.refreshesGuidance&&await st(t),await n.command.run(t,r),0}catch(n){if(n instanceof s)return t.out.fail(n),1;throw n}}import{spawn as On}from"node:child_process";import Nn from"node:readline/promises";import{existsSync as _o,readFileSync as ko}from"node:fs";import P from"node:path";import{fileURLToPath as So}from"node:url";var F={apiBase:"https://api.ppleth.ai",ssoBase:"https://id.peoplesparty.or.th",clientId:"382216793067947795",repoBase:"https://github.com",registryBase:"https://registry.npmjs.org"};function kn(e){return{apiBase:e.PPLE_API_BASE??F.apiBase,ssoBase:e.PPLE_SSO_BASE??F.ssoBase,clientId:e.PPLE_CLIENT_ID??F.clientId,repoBase:e.PPLE_REPO_BASE??F.repoBase,registryBase:e.PPLE_REGISTRY_BASE??F.registryBase}}function Sn(e,t){let n=e.XDG_CONFIG_HOME?.trim();return P.join(n&&n!==""?n:P.join(t,".config"),"pple")}function Tn(e){let t=e.PPLE_NO_UPDATE_CHECK?.trim().toLowerCase();return!t||t==="0"||t==="false"}function T(){return P.dirname(P.dirname(So(import.meta.url)))}function Dn(){try{let e=ko(P.join(T(),"package.json"),"utf8");return String(JSON.parse(e).version??"0.0.0")}catch{return"0.0.0"}}function In(e){let t=e.PPLE_TEMPLATE_DIR?.trim();if(t)return t;let n=P.join(T(),"templates","golden-path");return _o(n)?n:P.join(P.dirname(T()),"template")}function Ln(){return P.join(T(),"askpass","pple-askpass.mjs")}function qn(e,t,n){return new Promise((r,o)=>{let i=On(e,t,{cwd:n.cwd,env:{...process.env,...n.env},stdio:["ignore","pipe","pipe"]}),a="",u="";i.stdout.on("data",c=>a+=String(c)),i.stderr.on("data",c=>u+=String(c)),i.on("error",o),i.on("close",c=>r({code:c??0,stdout:a,stderr:u}))})}async function To(e){let t=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";await qn(t,[e],{cwd:process.cwd()}).catch(()=>{})}async function Do(e){let t=Nn.createInterface({input:process.stdin,output:process.stdout});try{let n=await t.question(`${e} [y/N] `);return/^y(es)?$/i.test(n.trim())}finally{t.close()}}async function Io(e){let t=Nn.createInterface({input:process.stdin,output:process.stdout});try{return await t.question(`${e} `)}finally{t.close()}}async function Lo(){let e=[];for await(let t of process.stdin)e.push(typeof t=="string"?Buffer.from(t):t);return Buffer.concat(e).toString("utf8")}function Oo(e){return new Promise((t,n)=>{let r=On(process.execPath,[process.argv[1],...e],{stdio:"inherit"});r.on("error",n),r.on("close",o=>t(o??0))})}function jn(e,t){return{fetch:globalThis.fetch.bind(globalThis),now:()=>Date.now(),sleep:n=>new Promise(r=>setTimeout(r,n)),cwd:process.cwd(),configDir:Sn(process.env,t),out:e,openBrowser:To,run:qn,templateDir:In(process.env),packageDir:T(),version:Dn(),interactive:process.stdin.isTTY===!0&&process.stdout.isTTY===!0,confirm:Do,ask:Io,readStdin:Lo,reexec:Oo,updateChecks:Tn(process.env),gitAskpass:Ln(),config:kn(process.env)}}var qo=at(e=>process.stdout.write(e),e=>process.stderr.write(e));try{process.exitCode=await _n(process.argv.slice(2),jn(qo,No.homedir()))}catch(e){process.stderr.write(`\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E20\u0E32\u0E22\u0E43\u0E19 pple CLI \u0E01\u0E23\u0E38\u0E13\u0E32\u0E2A\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E19\u0E35\u0E49\u0E43\u0E2B\u0E49\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21:
185
+ ${Ae}`);if(!cn(t,e.version)){e.out.say(`\u0E04\u0E38\u0E13\u0E43\u0E0A\u0E49 pple \u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27 (${e.version})`);return}if(!await an(e)){vi(e,t),e.out.say(),Si(e);return}e.out.say(`\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple ${e.version} \u2192 ${t}\u2026`);let n=await ln(e,t);if(n.code!==0)throw new u(`\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple \u0E40\u0E1B\u0E47\u0E19 ${t} \u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08`,ki(n));e.out.say(`pple \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19 ${t} \u0E41\u0E25\u0E49\u0E27`)}async function T(e,t){let n=t.value("--app");if(n!==void 0)return n;let s=await Kt(e).catch(r=>{throw r instanceof u&&r.message===ps?new u("\u0E41\u0E2D\u0E1B\u0E44\u0E2B\u0E19? \u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E41\u0E2D\u0E1B PPLE \u0E41\u0E25\u0E30\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E23\u0E30\u0E1A\u0E38 `--app`","\u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E30\u0E1A\u0E38\u0E41\u0E2D\u0E1B\u0E14\u0E49\u0E27\u0E22 `--app <slug>` (\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E14\u0E49\u0E27\u0E22 `pple apps`)"):r});if(s.apiBase!==""&&s.apiBase!==e.config.apiBase)throw new u("\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 PPLE Platform \u0E04\u0E19\u0E25\u0E30\u0E15\u0E31\u0E27\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2D\u0E22\u0E39\u0E48",`\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E16\u0E39\u0E01\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E44\u0E27\u0E49\u0E01\u0E31\u0E1A ${s.apiBase}`);return s.slug}var jt="\u0E1A\u0E31\u0E0D\u0E0A\u0E35",H="\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",ee="\u0E01\u0E32\u0E23\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48",cs="\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",us="\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E25\u0E30\u0E23\u0E35\u0E27\u0E34\u0E27",Qw="\u0E2D\u0E37\u0E48\u0E19 \u0E46",Mt=[{path:["auth","login"],section:jt,summary:"\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E14\u0E49\u0E27\u0E22 PPLE ID \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",usage:[["pple auth login"]],example:["pple auth login"],run:e=>to(e)},{path:["auth","logout"],section:jt,summary:"\u0E25\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49",usage:[["pple auth logout"]],example:["pple auth logout"],run:e=>no(e)},{path:["whoami"],section:jt,summary:"\u0E14\u0E39\u0E27\u0E48\u0E32\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E14\u0E49\u0E27\u0E22\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E43\u0E14",usage:[["pple whoami"]],options:[R],example:["pple whoami"],covers:["me"],run:(e,t)=>Es(e,t.flag("--json"))},{path:["auth","whoami"],section:jt,hidden:!0,summary:"\u0E14\u0E39\u0E27\u0E48\u0E32\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E14\u0E49\u0E27\u0E22\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E43\u0E14 (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple whoami`)",usage:[["pple auth whoami"]],options:[R],example:["pple auth whoami"],run:(e,t)=>Es(e,t.flag("--json"))},{path:["apps"],section:H,summary:"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 (\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E25\u0E30\u0E17\u0E35\u0E48\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32)",usage:[["pple apps"]],options:[R],example:["pple apps","pple apps --json"],covers:["apps"],run:(e,t)=>eo(e,t.flag("--json"))},{path:["init"],section:H,summary:"\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E2B\u0E23\u0E37\u0E2D\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E1A\u0E19\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49",usage:[["pple init","\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E41\u0E25\u0E30\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E42\u0E04\u0E49\u0E14\u0E1A\u0E19\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49 (\u0E16\u0E32\u0E21\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B)"],['pple init --name "App"',"\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E16\u0E32\u0E21 (\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A agent/\u0E2A\u0E04\u0E23\u0E34\u0E1B\u0E15\u0E4C)"],["pple init <app>","\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E1A\u0E19\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21"]],options:[{long:"--name",value:"<App Name>",text:"\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48\u0E14\u0E49\u0E27\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E19\u0E35\u0E49"},{long:"--dir",value:"<folder>",text:"\u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E27\u0E32\u0E07\u0E42\u0E04\u0E49\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B"}],example:['pple init --name "\u0E25\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23"',"pple init brave-otter"],maxArgs:1,covers:["createApp"],run:(e,t)=>{let n=t.value("--name"),s=t.positionals[0];if(n!==void 0&&s)throw new u("`pple init` \u0E23\u0E31\u0E1A\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48 \u0E2B\u0E23\u0E37\u0E2D\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27 \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E43\u0E14\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19",'\u0E43\u0E0A\u0E49 `pple init --name "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13"` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E43\u0E2B\u0E21\u0E48 \u0E2B\u0E23\u0E37\u0E2D `pple init <app>` \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27');return ia(e,{slug:s,name:n,dir:t.value("--dir")})}},{path:["deploy"],section:H,refreshesGuidance:!0,summary:"\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E02\u0E36\u0E49\u0E19\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E08\u0E23\u0E34\u0E07",usage:[['pple deploy [-m "note"]']],options:[{long:"--message",short:"-m",value:"<note>",text:"\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 \u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B"}],example:['pple deploy -m "\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E2A\u0E21\u0E31\u0E04\u0E23"'],run:(e,t)=>fo(e,{message:t.value("--message")})},{path:["rename"],section:H,summary:"\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B (\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E41\u0E25\u0E30\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49)",usage:[['pple rename "\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48"']],options:[C],example:['pple rename "\u0E25\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23"'],maxArgs:50,covers:["renameApp"],run:async(e,t)=>ho(e,await T(e,t),t.positionals)},{path:["retire"],section:H,summary:"\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E2D\u0E1B (\u0E02\u0E31\u0E49\u0E19\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E41\u0E25\u0E30\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49 \u2014 \u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E22\u0E37\u0E48\u0E19\u0E04\u0E33\u0E02\u0E2D)",usage:[["pple retire"]],options:[C,{long:"--confirm",value:"<slug>",text:"slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E08\u0E30\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07 (\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25)"}],example:["pple retire","pple retire --app brave-otter --confirm brave-otter"],confirmation:"\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E08\u0E30\u0E43\u0E2B\u0E49\u0E1E\u0E34\u0E21\u0E1E\u0E4C slug \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19 \u0E16\u0E49\u0E32\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25 (\u0E40\u0E0A\u0E48\u0E19 agent) \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <slug>` \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E41\u0E2D\u0E1B \u2014 \u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E17\u0E38\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07 \u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",covers:["retire"],run:async(e,t)=>go(e,await T(e,t),t.value("--confirm"))},{path:["retry-setup"],section:H,summary:"\u0E25\u0E2D\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48 \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E04\u0E23\u0E31\u0E49\u0E07\u0E41\u0E23\u0E01\u0E04\u0E49\u0E32\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",usage:[["pple retry-setup"]],options:[C],example:["pple retry-setup --app brave-otter"],covers:["provision"],run:async(e,t)=>yo(e,await T(e,t))},{path:["agreement"],section:jt,summary:"\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32 (\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E04\u0E38\u0E13\u0E40\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25)",usage:[["pple agreement"]],example:["pple agreement"],confirmation:"\u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E44\u0E14\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E17\u0E35\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48 \u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48\u0E04\u0E2D\u0E19\u0E42\u0E0B\u0E25 \u2014 agent \u0E22\u0E2D\u0E21\u0E23\u0E31\u0E1A\u0E41\u0E17\u0E19\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",covers:["acceptAgreement"],run:e=>wo(e)},{path:["redeploy"],section:H,summary:"\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E42\u0E04\u0E49\u0E14\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19\u0E43\u0E2B\u0E21\u0E48 (\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E04\u0E48\u0E32 env \u0E21\u0E35\u0E1C\u0E25)",usage:[["pple redeploy"]],options:[C],example:["pple redeploy","pple redeploy --app brave-otter"],covers:["redeploy"],run:async(e,t)=>po(e,await T(e,t))},{path:["deploys"],section:H,summary:"\u0E14\u0E39\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22 \u0E2B\u0E23\u0E37\u0E2D\u0E2D\u0E48\u0E32\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E17\u0E35\u0E48\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",usage:[["pple deploys","\u0E1B\u0E23\u0E30\u0E27\u0E31\u0E15\u0E34\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14"],["pple deploys <id>","\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E41\u0E25\u0E30\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E01\u0E32\u0E23\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E02\u0E2D\u0E07\u0E04\u0E23\u0E31\u0E49\u0E07\u0E19\u0E31\u0E49\u0E19 (id \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15)"]],options:[C,R],example:["pple deploys","pple deploys deploy-12 --app brave-otter"],maxArgs:1,covers:["deploys"],run:async(e,t)=>mo(e,await T(e,t),t.positionals[0],t.flag("--json"))},{path:["cron"],section:H,summary:"\u0E14\u0E39\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32 (Cron Schedule) \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B \u2014 \u0E40\u0E27\u0E25\u0E32\u0E44\u0E17\u0E22 \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C UTC \u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49",usage:[["pple cron","\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49 \u0E04\u0E23\u0E31\u0E49\u0E07\u0E16\u0E31\u0E14\u0E44\u0E1B \u0E41\u0E25\u0E30\u0E1C\u0E25\u0E01\u0E32\u0E23\u0E23\u0E31\u0E19\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14"],["pple cron pause","\u0E2B\u0E22\u0E38\u0E14\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27"],["pple cron resume","\u0E43\u0E2B\u0E49\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19"],["pple cron run <\u0E25\u0E33\u0E14\u0E31\u0E1A|\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C>","\u0E23\u0E31\u0E19\u0E07\u0E32\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E17\u0E31\u0E19\u0E17\u0E35 (\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E41\u0E21\u0E49\u0E2B\u0E22\u0E38\u0E14\u0E2D\u0E22\u0E39\u0E48)"]],options:[C,R],example:["pple cron","pple cron --json --app brave-otter"],covers:["cron"],run:async(e,t)=>Ps(e,await T(e,t),t.flag("--json"))},{path:["cron","list"],section:H,hidden:!0,summary:"\u0E14\u0E39\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple cron`)",usage:[["pple cron list"]],options:[C,R],example:["pple cron list"],run:async(e,t)=>Ps(e,await T(e,t),t.flag("--json"))},{path:["cron","pause"],section:H,summary:"\u0E2B\u0E22\u0E38\u0E14\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27 (\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49\u0E22\u0E31\u0E07\u0E2D\u0E22\u0E39\u0E48 \u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E44\u0E21\u0E48\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19\u0E40\u0E2D\u0E07)",usage:[["pple cron pause"]],options:[C,R],example:["pple cron pause --app brave-otter"],covers:["pauseCron"],run:async(e,t)=>bo(e,await T(e,t),t.flag("--json"))},{path:["cron","resume"],section:H,summary:"\u0E43\u0E2B\u0E49\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19",usage:[["pple cron resume"]],options:[C,R],example:["pple cron resume --app brave-otter"],covers:["resumeCron"],run:async(e,t)=>vo(e,await T(e,t),t.flag("--json"))},{path:["cron","run"],section:H,summary:"\u0E23\u0E31\u0E19\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E07\u0E32\u0E19\u0E17\u0E31\u0E19\u0E17\u0E35 (\u0E40\u0E23\u0E35\u0E22\u0E01 scheduled() \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E08\u0E23\u0E34\u0E07 \u0E46)",usage:[["pple cron run 1","\u0E23\u0E31\u0E19\u0E07\u0E32\u0E19\u0E25\u0E33\u0E14\u0E31\u0E1A\u0E17\u0E35\u0E48 1 \u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07 `pple cron`"],['pple cron run "0 1 * * *"',"\u0E23\u0E31\u0E19\u0E07\u0E32\u0E19\u0E17\u0E35\u0E48\u0E21\u0E35\u0E19\u0E34\u0E1E\u0E08\u0E19\u0E4C\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49"]],options:[C,R],example:["pple cron run 1",'pple cron run "0 1 * * *" --app brave-otter'],maxArgs:5,covers:["runCron"],run:async(e,t)=>So(e,await T(e,t),t.positionals,t.flag("--json"))},{path:["info"],section:H,refreshesGuidance:!0,summary:"\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30 \u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 \u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22 \u0E41\u0E25\u0E30\u0E04\u0E35\u0E22\u0E4C env \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B",usage:[["pple info [<slug>]"]],options:[C,R],example:["pple info","pple info brave-otter","pple info --app brave-otter --json"],maxArgs:1,covers:["app","metrics"],run:async(e,t)=>Qo(e,t.positionals[0]??await T(e,t),t.flag("--json"))},{path:["promote"],section:ee,summary:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E41\u0E2D\u0E1B\u0E08\u0E32\u0E01\u0E09\u0E1A\u0E31\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E02\u0E36\u0E49\u0E19\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49 (\u0E40\u0E0A\u0E34\u0E0D\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49)",usage:[["pple promote"]],options:[C],example:["pple promote --app brave-otter"],covers:["promoteToBeta"],run:async(e,t)=>qo(e,await T(e,t))},{path:["invites"],section:ee,summary:"\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E40\u0E0A\u0E34\u0E0D\u0E44\u0E27\u0E49 (\u0E40\u0E2B\u0E47\u0E19\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E40\u0E15\u0E47\u0E21)",usage:[["pple invites","\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E30\u0E17\u0E35\u0E48\u0E19\u0E31\u0E48\u0E07\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E44\u0E1B"]],options:[C,R],example:["pple invites","pple invites --json"],covers:["invites"],run:async(e,t)=>Ls(e,await T(e,t),t.flag("--json"))},{path:["invites","list"],section:ee,hidden:!0,summary:"\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E40\u0E0A\u0E34\u0E0D\u0E44\u0E27\u0E49 (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple invites`)",usage:[["pple invites list"]],options:[C,R],example:["pple invites list"],run:async(e,t)=>Ls(e,await T(e,t),t.flag("--json"))},{path:["invites","add"],section:ee,summary:"\u0E40\u0E0A\u0E34\u0E0D\u0E1C\u0E39\u0E49\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C (\u0E41\u0E2D\u0E1B\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49 \u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14 20 \u0E04\u0E19)",usage:[["pple invites add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>"]],options:[C],example:["pple invites add 0812345678"],maxArgs:1,covers:["addInvite"],run:async(e,t)=>_o(e,await T(e,t),t.positionals[0])},{path:["invites","remove"],section:ee,summary:"\u0E19\u0E33\u0E04\u0E33\u0E40\u0E0A\u0E34\u0E0D\u0E2D\u0E2D\u0E01 (\u0E04\u0E37\u0E19\u0E17\u0E35\u0E48\u0E19\u0E31\u0E48\u0E07)",usage:[["pple invites remove <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>"]],options:[C],example:["pple invites remove 0812345678"],maxArgs:1,covers:["removeInvite"],run:async(e,t)=>Ro(e,await T(e,t),t.positionals[0])},{path:["roles"],section:ee,summary:"\u0E14\u0E39\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E08\u0E33\u0E01\u0E31\u0E14\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E44\u0E14\u0E49",usage:[["pple roles"]],options:[R],example:["pple roles","pple roles --json"],covers:["roleOptions"],run:(e,t)=>Do(e,t.flag("--json"))},{path:["request","publish"],section:ee,summary:"\u0E02\u0E2D\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07 (\u0E41\u0E2D\u0E1B\u0E02\u0E31\u0E49\u0E19\u0E17\u0E14\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49) \u2014 \u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34",usage:[["pple request publish --icon <\u0E44\u0E1F\u0E25\u0E4C>"]],options:[C,{long:"--visibility",value:"<mode>",text:"\u0E43\u0E04\u0E23\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E2D\u0E1B: everyone (\u0E17\u0E38\u0E01\u0E04\u0E19, \u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19) | roles | unlisted (\u0E44\u0E21\u0E48\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E19\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23)"},{long:"--roles",value:"<a,b>",text:"\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E35\u0E48\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E2D\u0E1B (\u0E0A\u0E37\u0E48\u0E2D\u0E22\u0E48\u0E2D\u0E2B\u0E23\u0E37\u0E2D\u0E0A\u0E37\u0E48\u0E2D\u0E44\u0E17\u0E22 \u0E14\u0E39 `pple roles`) \u0E43\u0E0A\u0E49\u0E01\u0E31\u0E1A roles"},{long:"--icon",value:"<\u0E44\u0E1F\u0E25\u0E4C>",text:"\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E41\u0E2D\u0E1B PNG/JPEG/WebP \u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 512 KB (\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19 \u0E40\u0E27\u0E49\u0E19\u0E41\u0E15\u0E48 unlisted)"},{long:"--address",value:"<\u0E0A\u0E37\u0E48\u0E2D>",text:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E40\u0E2A\u0E19\u0E2D \u0E40\u0E0A\u0E48\u0E19 donate (\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A)"},{long:"--confirm",value:"<address>",text:"\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E02\u0E2D \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A --address (\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25)"}],example:["pple request publish --icon icon.png","pple request publish --icon icon.png --visibility roles --roles hq,mp","pple request publish --icon icon.png --address donate --confirm donate"],confirmation:"\u0E16\u0E49\u0E32\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07 (--address) \u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E08\u0E30\u0E16\u0E32\u0E21\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19 \u0E2A\u0E48\u0E27\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25 (\u0E40\u0E0A\u0E48\u0E19 agent) \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38 `--confirm <address>` \u0E43\u0E2B\u0E49\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E19\u0E31\u0E49\u0E19 \u2014 \u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E17\u0E38\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",covers:["filePublishRequest","uploadIcon"],run:async(e,t)=>Uo(e,await T(e,t),{visibility:t.value("--visibility"),roles:t.value("--roles"),icon:t.value("--icon"),address:t.value("--address"),confirm:t.value("--confirm")})},{path:["request","change"],section:ee,summary:"\u0E02\u0E2D\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E0A\u0E37\u0E48\u0E2D \u0E44\u0E2D\u0E04\u0E2D\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E41\u0E25\u0E49\u0E27",usage:[['pple request change --name "\u0E0A\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48"']],options:[C,{long:"--name",value:"<\u0E0A\u0E37\u0E48\u0E2D>",text:"\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E2D\u0E1B\u0E43\u0E2B\u0E21\u0E48"},{long:"--icon",value:"<\u0E44\u0E1F\u0E25\u0E4C>",text:"\u0E44\u0E2D\u0E04\u0E2D\u0E19\u0E43\u0E2B\u0E21\u0E48 (PNG/JPEG/WebP \u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 512 KB)"},{long:"--visibility",value:"<mode>",text:"\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E43\u0E2B\u0E21\u0E48: everyone | roles | unlisted"},{long:"--roles",value:"<a,b>",text:"\u0E1A\u0E17\u0E1A\u0E32\u0E17\u0E17\u0E35\u0E48\u0E40\u0E2B\u0E47\u0E19\u0E41\u0E2D\u0E1B \u0E43\u0E0A\u0E49\u0E01\u0E31\u0E1A roles"}],example:['pple request change --name "\u0E25\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E2D\u0E32\u0E2A\u0E32\u0E2A\u0E21\u0E31\u0E04\u0E23 2"',"pple request change --visibility unlisted"],covers:["fileChangeRequest"],run:async(e,t)=>Fo(e,await T(e,t),{name:t.value("--name"),icon:t.value("--icon"),visibility:t.value("--visibility"),roles:t.value("--roles")})},{path:["request","limit"],section:ee,summary:"\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E04\u0E27\u0E15\u0E32\u0E17\u0E23\u0E31\u0E1E\u0E22\u0E32\u0E01\u0E23 (CPU \u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19 \u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32 \u0E2B\u0E23\u0E37\u0E2D\u0E08\u0E31\u0E07\u0E2B\u0E27\u0E30\u0E01\u0E27\u0E32\u0E14)",usage:[["pple request limit --cpu-ms <ms>","\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21 CPU \u0E15\u0E48\u0E2D request"],["pple request limit --notifications <\u0E23\u0E32\u0E22>","\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E16\u0E36\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E15\u0E48\u0E2D\u0E27\u0E31\u0E19"],["pple request limit --cron-schedules <\u0E08\u0E33\u0E19\u0E27\u0E19>","\u0E02\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E08\u0E33\u0E19\u0E27\u0E19\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E14\u0E49"],["pple request limit --cron-interval <\u0E19\u0E32\u0E17\u0E35>","\u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E16\u0E35\u0E48\u0E02\u0E36\u0E49\u0E19 (\u0E2B\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E19\u0E49\u0E2D\u0E22\u0E25\u0E07)"],["pple request limit --sweep-interval <\u0E19\u0E32\u0E17\u0E35>","\u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E01\u0E27\u0E32\u0E14\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E16\u0E35\u0E48\u0E02\u0E36\u0E49\u0E19 (\u0E1B\u0E01\u0E15\u0E34\u0E17\u0E38\u0E01 60 \u0E19\u0E32\u0E17\u0E35)"]],options:[C,{long:"--cpu-ms",value:"<ms>",text:"CPU \u0E15\u0E48\u0E2D request \u0E17\u0E35\u0E48\u0E02\u0E2D (\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21\u0E1A\u0E27\u0E01)"},{long:"--notifications",value:"<\u0E23\u0E32\u0E22/\u0E27\u0E31\u0E19>",text:"\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E16\u0E36\u0E07\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E15\u0E48\u0E2D\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E02\u0E2D (\u0E19\u0E31\u0E1A\u0E40\u0E1B\u0E47\u0E19\u0E23\u0E32\u0E22 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E04\u0E23\u0E31\u0E49\u0E07)"},{long:"--cron-schedules",value:"<\u0E08\u0E33\u0E19\u0E27\u0E19>",text:"\u0E08\u0E33\u0E19\u0E27\u0E19\u0E07\u0E32\u0E19\u0E15\u0E31\u0E49\u0E07\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48\u0E02\u0E2D (\u0E1B\u0E01\u0E15\u0E34 3)"},{long:"--cron-interval",value:"<\u0E19\u0E32\u0E17\u0E35>",text:"\u0E23\u0E30\u0E22\u0E30\u0E2B\u0E48\u0E32\u0E07\u0E2A\u0E31\u0E49\u0E19\u0E2A\u0E38\u0E14\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E01\u0E32\u0E23\u0E23\u0E31\u0E19\u0E17\u0E35\u0E48\u0E02\u0E2D \u0E40\u0E1B\u0E47\u0E19\u0E19\u0E32\u0E17\u0E35 (\u0E1B\u0E01\u0E15\u0E34 5)"},{long:"--sweep-interval",value:"<\u0E19\u0E32\u0E17\u0E35>",text:"\u0E08\u0E31\u0E07\u0E2B\u0E27\u0E30\u0E01\u0E27\u0E32\u0E14\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E16\u0E35\u0E48\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14 \u0E40\u0E1B\u0E47\u0E19\u0E19\u0E32\u0E17\u0E35 (\u0E1B\u0E01\u0E15\u0E34 60, 15 \u0E08\u0E36\u0E07\u0E43\u0E0A\u0E49 15m \u0E44\u0E14\u0E49)"}],example:["pple request limit --cpu-ms 100","pple request limit --notifications 5000","pple request limit --cron-schedules 6"],covers:["fileLimitRequest"],run:async(e,t)=>Ko(e,await T(e,t),{cpuMs:t.value("--cpu-ms"),notifications:t.value("--notifications"),cronSchedules:t.value("--cron-schedules"),cronInterval:t.value("--cron-interval"),sweepInterval:t.value("--sweep-interval")})},{path:["request","retire"],section:ee,summary:"\u0E02\u0E2D\u0E1B\u0E25\u0E14\u0E23\u0E30\u0E27\u0E32\u0E07\u0E41\u0E2D\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E1C\u0E22\u0E41\u0E1E\u0E23\u0E48\u0E08\u0E23\u0E34\u0E07\u0E2D\u0E22\u0E39\u0E48",usage:[["pple request retire"]],options:[C],example:["pple request retire --app brave-otter"],covers:["fileRetireRequest"],run:async(e,t)=>Go(e,await T(e,t))},{path:["request","use"],section:"\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",summary:"\u0E02\u0E2D\u0E43\u0E0A\u0E49\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34\u0E43\u0E19\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",usage:[['pple request use <\u0E1C\u0E39\u0E49\u0E43\u0E2B\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23>/<\u0E0A\u0E37\u0E48\u0E2D> --reason "\u2026"']],options:[C,{long:"--reason",value:"<\u0E40\u0E2B\u0E15\u0E38\u0E1C\u0E25>",text:"\u0E40\u0E2B\u0E15\u0E38\u0E1C\u0E25\u0E17\u0E35\u0E48\u0E02\u0E2D\u0E43\u0E0A\u0E49 \u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19"}],example:['pple request use platform/legal-identity --reason "\u0E15\u0E23\u0E27\u0E08\u0E1A\u0E31\u0E15\u0E23\u0E17\u0E35\u0E48\u0E07\u0E32\u0E19"'],maxArgs:1,covers:["fileUseRequest"],run:async(e,t)=>{let n=t.positionals[0];if(!n)throw new u("`pple request use` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",'\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple request use platform/legal-identity --reason "\u0E15\u0E23\u0E27\u0E08\u0E1A\u0E31\u0E15\u0E23\u0E17\u0E35\u0E48\u0E07\u0E32\u0E19"`');return ca(e,await T(e,t),n,t.value("--reason"))}},{path:["request","listing"],section:"\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",summary:"\u0E02\u0E2D\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E44\u0E27\u0E49",usage:[["pple request listing <\u0E0A\u0E37\u0E48\u0E2D>"]],options:[C],example:["pple request listing branch-list"],maxArgs:1,covers:["fileListingRequest"],run:async(e,t)=>ua(e,await T(e,t),t.positionals[0])},{path:["requests"],section:ee,summary:"\u0E14\u0E39\u0E04\u0E33\u0E02\u0E2D\u0E17\u0E35\u0E48\u0E22\u0E37\u0E48\u0E19\u0E44\u0E27\u0E49\u0E41\u0E25\u0E30\u0E1C\u0E25\u0E01\u0E32\u0E23\u0E1E\u0E34\u0E08\u0E32\u0E23\u0E13\u0E32",usage:[["pple requests"]],options:[C,R],example:["pple requests","pple requests --json"],covers:["requests"],run:async(e,t)=>Jo(e,await T(e,t),t.flag("--json"))},{path:["collaborators"],section:cs,summary:"\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E40\u0E2B\u0E47\u0E19\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E40\u0E15\u0E47\u0E21)",usage:[["pple collaborators","\u0E14\u0E39\u0E23\u0E32\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32"]],options:[C,R],example:["pple collaborators","pple collaborators --json"],covers:["collaborators"],run:async(e,t)=>Ts(e,await T(e,t),t.flag("--json"))},{path:["collaborators","list"],section:cs,hidden:!0,summary:"\u0E14\u0E39\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple collaborators`)",usage:[["pple collaborators list"]],options:[C,R],example:["pple collaborators list"],run:async(e,t)=>Ts(e,await T(e,t),t.flag("--json"))},{path:["collaborators","add"],section:cs,summary:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E40\u0E15\u0E47\u0E21 (\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19)",usage:[["pple collaborators add <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>","\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E40\u0E1A\u0E2D\u0E23\u0E4C \u0E41\u0E25\u0E30\u0E16\u0E32\u0E21\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25"],["pple collaborators add --confirm <token>","\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E1C\u0E39\u0E49\u0E17\u0E35\u0E48\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E1E\u0E1A \u0E14\u0E49\u0E27\u0E22\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32"]],options:[C,{long:"--confirm",value:"<token>",text:"\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32 (\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25)"}],example:["pple collaborators add 0812345678","pple collaborators add --confirm <token>"],maxArgs:1,confirmation:"\u0E17\u0E35\u0E48\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25\u0E08\u0E30\u0E41\u0E2A\u0E14\u0E07\u0E0A\u0E37\u0E48\u0E2D\u0E17\u0E35\u0E48\u0E1B\u0E01\u0E1B\u0E34\u0E14\u0E1A\u0E32\u0E07\u0E2A\u0E48\u0E27\u0E19\u0E41\u0E25\u0E30\u0E16\u0E32\u0E21\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19 \u0E2A\u0E48\u0E27\u0E19\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E40\u0E17\u0E2D\u0E23\u0E4C\u0E21\u0E34\u0E19\u0E31\u0E25 (\u0E40\u0E0A\u0E48\u0E19 agent) \u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E08\u0E30\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E25\u0E30\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E41\u0E25\u0E49\u0E27\u0E2B\u0E22\u0E38\u0E14 \u2014 \u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E40\u0E2B\u0E47\u0E19\u0E0A\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E27\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E19\u0E35\u0E49\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E08\u0E36\u0E07\u0E23\u0E31\u0E19\u0E0B\u0E49\u0E33\u0E14\u0E49\u0E27\u0E22 `--confirm <token>` (\u0E42\u0E17\u0E40\u0E04\u0E47\u0E19\u0E2B\u0E21\u0E14\u0E2D\u0E32\u0E22\u0E38\u0E43\u0E19 10 \u0E19\u0E32\u0E17\u0E35)",covers:["lookupCollaborator","confirmCollaborator"],run:async(e,t)=>Io(e,await T(e,t),{phone:t.positionals[0],confirm:t.value("--confirm")})},{path:["collaborators","remove"],section:cs,summary:"\u0E19\u0E33\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2D\u0E2D\u0E01 (\u0E01\u0E32\u0E23\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E02\u0E2D\u0E07\u0E40\u0E02\u0E32\u0E08\u0E30\u0E2B\u0E22\u0E38\u0E14\u0E17\u0E31\u0E19\u0E17\u0E35)",usage:[["pple collaborators remove <\u0E40\u0E1A\u0E2D\u0E23\u0E4C>"]],options:[C],example:["pple collaborators remove 0812345678"],maxArgs:1,covers:["removeCollaborator"],run:async(e,t)=>Lo(e,await T(e,t),t.positionals[0])},{path:["notes"],section:us,summary:"\u0E2D\u0E48\u0E32\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E16\u0E36\u0E07\u0E17\u0E35\u0E21\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B",usage:[["pple notes","\u0E2D\u0E48\u0E32\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14 (\u0E43\u0E2B\u0E21\u0E48\u0E2A\u0E38\u0E14\u0E01\u0E48\u0E2D\u0E19)"]],options:[C,R],example:["pple notes","pple notes --json"],covers:["notes"],run:async(e,t)=>Ns(e,await T(e,t),t.flag("--json"))},{path:["notes","list"],section:us,hidden:!0,summary:"\u0E2D\u0E48\u0E32\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E16\u0E36\u0E07\u0E17\u0E35\u0E21\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple notes`)",usage:[["pple notes list"]],options:[C,R],example:["pple notes list"],run:async(e,t)=>Ns(e,await T(e,t),t.flag("--json"))},{path:["notes","add"],section:us,summary:"\u0E40\u0E02\u0E35\u0E22\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E16\u0E36\u0E07\u0E17\u0E35\u0E21\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E17\u0E38\u0E01\u0E04\u0E19\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19 \u0E41\u0E01\u0E49\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E1A\u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49)",usage:[['pple notes add "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21"',"\u0E40\u0E02\u0E35\u0E22\u0E19\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01 (\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 2,000 \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23)"],["pple notes add < \u0E44\u0E1F\u0E25\u0E4C","\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E17\u0E32\u0E07 stdin \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E23\u0E30\u0E1A\u0E38"]],options:[C],example:['pple notes add "\u0E15\u0E23\u0E27\u0E08\u0E41\u0E25\u0E49\u0E27 \u0E1C\u0E48\u0E32\u0E19"'],maxArgs:500,covers:["addNote"],run:async(e,t)=>Ao(e,await T(e,t),t.positionals)},{path:["reviews"],section:us,summary:"\u0E2D\u0E48\u0E32\u0E19\u0E1C\u0E25\u0E23\u0E35\u0E27\u0E34\u0E27\u0E42\u0E04\u0E49\u0E14\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B (\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E40\u0E23\u0E34\u0E48\u0E21\u0E23\u0E35\u0E27\u0E34\u0E27)",usage:[["pple reviews","\u0E23\u0E35\u0E27\u0E34\u0E27\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E17\u0E31\u0E49\u0E07\u0E09\u0E1A\u0E31\u0E1A \u0E41\u0E25\u0E30\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E04\u0E23\u0E31\u0E49\u0E07\u0E01\u0E48\u0E2D\u0E19"],["pple reviews <id>","\u0E23\u0E35\u0E27\u0E34\u0E27\u0E04\u0E23\u0E31\u0E49\u0E07\u0E19\u0E31\u0E49\u0E19 (id \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E04\u0E2D\u0E21\u0E21\u0E34\u0E15)"]],options:[C,R],example:["pple reviews","pple reviews rev-1 --json"],maxArgs:1,run:async(e,t)=>Co(e,await T(e,t),t.positionals[0],t.flag("--json"))},{path:["env","list"],section:"\u0E04\u0E48\u0E32 env",refreshesGuidance:!0,summary:"\u0E14\u0E39\u0E15\u0E31\u0E27\u0E41\u0E1B\u0E23\u0E41\u0E25\u0E30 secret \u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49",usage:[["pple env list"]],options:[C,R],example:["pple env list","pple env list --app brave-otter"],covers:["env"],run:async(e,t)=>Yo(e,await T(e,t),t.flag("--json"))},{path:["env","set"],section:"\u0E04\u0E48\u0E32 env",refreshesGuidance:!0,summary:"\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E15\u0E31\u0E27\u0E41\u0E1B\u0E23 (\u0E2B\u0E23\u0E37\u0E2D --secret) \u0E23\u0E31\u0E1A\u0E04\u0E48\u0E32\u0E08\u0E32\u0E01 arg, --file \u0E2B\u0E23\u0E37\u0E2D stdin",usage:[["pple env set <KEY> [VAL]"]],options:[C,{long:"--secret",text:"\u0E40\u0E01\u0E47\u0E1A\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19 secret \u0E41\u0E1A\u0E1A\u0E40\u0E02\u0E35\u0E22\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27"},{long:"--file",value:"<path>",text:"\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E48\u0E32\u0E08\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C"}],example:["pple env set API_URL https://example.com","echo -n $TOKEN | pple env set API_TOKEN --secret"],maxArgs:2,covers:["setEnv"],run:async(e,t)=>{let[n,s]=t.positionals;if(!n)throw new u("`pple env set` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38 KEY","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple env set API_URL https://example.com`");return Wo(e,await T(e,t),{key:n,value:s,secret:t.flag("--secret"),file:t.value("--file")})}},{path:["env","delete"],section:"\u0E04\u0E48\u0E32 env",refreshesGuidance:!0,summary:"\u0E25\u0E1A\u0E15\u0E31\u0E27\u0E41\u0E1B\u0E23\u0E2B\u0E23\u0E37\u0E2D secret",usage:[["pple env delete <KEY>"]],options:[C],example:["pple env delete API_URL"],maxArgs:1,covers:["deleteEnv"],run:async(e,t)=>{let n=t.positionals[0];if(!n)throw new u("`pple env delete` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38 KEY","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple env delete API_URL`");return Ho(e,await T(e,t),n)}},{path:["registry"],section:"\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",refreshesGuidance:!0,summary:"\u0E14\u0E39\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E30\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E15\u0E48\u0E2D\u0E41\u0E15\u0E48\u0E25\u0E30\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",usage:[["pple registry","\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27 \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49"]],options:[C,R],example:["pple registry","pple registry --json --app brave-otter"],covers:["registry"],run:async(e,t)=>_s(e,await T(e,t),t.flag("--json"))},{path:["registry","list"],section:"\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",hidden:!0,refreshesGuidance:!0,summary:"\u0E14\u0E39\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01 (\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 `pple registry`)",usage:[["pple registry list"]],options:[C,R],example:["pple registry list"],run:async(e,t)=>_s(e,await T(e,t),t.flag("--json"))},{path:["registry","show"],section:"\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",refreshesGuidance:!0,summary:"\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01 \u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23 \u0E41\u0E25\u0E30\u0E2A\u0E16\u0E32\u0E19\u0E30\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49",usage:[["pple registry show <\u0E1C\u0E39\u0E49\u0E43\u0E2B\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23>/<\u0E0A\u0E37\u0E48\u0E2D>","\u0E02\u0E49\u0E2D\u0E40\u0E17\u0E47\u0E08\u0E08\u0E23\u0E34\u0E07\u0E02\u0E2D\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 \u0E41\u0E25\u0E30\u0E40\u0E2D\u0E01\u0E2A\u0E32\u0E23\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E2D\u0E48\u0E32\u0E19\u0E44\u0E14\u0E49"]],options:[C,R],example:["pple registry show platform/legal-identity","pple registry show shop/orders --json"],maxArgs:1,covers:["registryEntry"],run:async(e,t)=>{let n=t.positionals[0];if(!n)throw new u("`pple registry show` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple registry show platform/legal-identity`");return pa(e,await T(e,t),n,t.flag("--json"))}},{path:["registry","sweep"],section:"\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",refreshesGuidance:!0,summary:"\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49 \u0E2B\u0E23\u0E37\u0E2D\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E25\u0E07\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",usage:[["pple registry sweep <\u0E0A\u0E37\u0E48\u0E2D>","\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E38\u0E01\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E2D\u0E07\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E19\u0E35\u0E49"],["pple registry sweep <\u0E0A\u0E37\u0E48\u0E2D> <\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25>","\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E40\u0E14\u0E35\u0E22\u0E27"]],options:[C,R],example:["pple registry sweep branch-list","pple registry sweep branch-list offices"],maxArgs:2,covers:["sweepRegistry"],run:async(e,t)=>{let n=t.positionals[0];if(!n)throw new u("`pple registry sweep` \u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25","\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07: `pple registry sweep branch-list`");return fa(e,await T(e,t),n,t.positionals[1],t.flag("--json"))}},{path:["registry","check"],section:"\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01",refreshesGuidance:!0,summary:"\u0E15\u0E23\u0E27\u0E08\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E43\u0E19\u0E41\u0E04\u0E15\u0E15\u0E32\u0E25\u0E47\u0E2D\u0E01\u0E02\u0E2D\u0E07\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49 \u0E01\u0E48\u0E2D\u0E19\u0E14\u0E35\u0E1E\u0E25\u0E2D\u0E22",usage:[["pple registry check","\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E17\u0E38\u0E01\u0E08\u0E38\u0E14\u0E17\u0E35\u0E48 registry/ \u0E1C\u0E34\u0E14 \u0E40\u0E1B\u0E47\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22"],["pple registry check --json","\u0E1C\u0E25\u0E40\u0E14\u0E35\u0E22\u0E27\u0E01\u0E31\u0E19\u0E40\u0E1B\u0E47\u0E19 JSON"]],options:[C,R],example:["pple registry check","pple registry check --json"],localOnly:"It runs the entry validator on the working folder's registry/. When the Builder is signed in it also asks for the role vocabulary and, if the folder is linked, the app's sweep floor, and caches both so the next check still runs offline. Otherwise it uses the fixed Roles and the one-hour floor. The Console reviews a ListingRequest after deploy; this command finds mistakes before that, on the laptop (ADR-0023). There is no Console method to cover.",run:(e,t)=>Cu(e,t)},{path:["upgrade"],section:Qw,summary:"\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15 pple \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E0A\u0E31\u0E19\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",usage:[["pple upgrade"]],example:["pple upgrade"],run:e=>_u(e)}];function xu(e){let[t,...n]=e;if(t===void 0||t==="--help"||t==="-h")return{kind:"overview"};if(t==="help")return n.length===0?{kind:"overview"}:Ru(n);let s=ju(e);if(s){let r=e.slice(s.path.length);return Mu(r)?{kind:"help",path:s.path}:{kind:"run",command:s,rest:r}}return Ru(e,!0)}function ju(e){return Mt.filter(t=>t.path.every((n,s)=>e[s]===n)).sort((t,n)=>n.path.length-t.path.length)[0]}function Ru(e,t=!1){let n=ju(e);if(n&&!t)return{kind:"help",path:n.path};let s=Xw(e);if(s.length===0)throw Du(e[0]);let r=e[s.length];if(r===void 0||Mu(e.slice(s.length)))return{kind:"help",path:s};throw Du(`${s.join(" ")} ${r}`)}function Xw(e){let t=[];for(let n of e){let s=[...t,n];if(!Mt.some(i=>s.every((o,a)=>i.path[a]===o)))break;t.push(n)}return t}function Mu(e){if(e[0]==="help")return!0;let t=e.indexOf("--")===-1?e:e.slice(0,e.indexOf("--"));return t.includes("--help")||t.includes("-h")}function Du(e){return new u(`\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07 \`pple ${e}\``,"\u0E23\u0E31\u0E19 `pple --help` \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14")}async function Bu(e,t){try{let n=xu(e);if(n.kind==="overview")return t.out.say(zi(Mt)),0;if(n.kind==="help")return t.out.say(Zi(n.path,Mt)),0;let s=Ai(n.command,n.rest);if(!s.flag("--json")&&Lu(e)){let r=await Ou(t,e);if(r!==null)return r}return n.command.refreshesGuidance&&await Wi(t),await n.command.run(t,s),0}catch(n){if(n instanceof u)return t.out.fail(n),1;throw n}}import{spawn as Yu}from"node:child_process";import Wu from"node:readline/promises";import{existsSync as zw,readFileSync as Zw}from"node:fs";import le from"node:path";import{fileURLToPath as eb}from"node:url";var Bt={apiBase:"https://api.ppleth.ai",ssoBase:"https://id.peoplesparty.or.th",clientId:"382216793067947795",repoBase:"https://github.com",registryBase:"https://registry.npmjs.org"};function Uu(e){return{apiBase:e.PPLE_API_BASE??Bt.apiBase,ssoBase:e.PPLE_SSO_BASE??Bt.ssoBase,clientId:e.PPLE_CLIENT_ID??Bt.clientId,repoBase:e.PPLE_REPO_BASE??Bt.repoBase,registryBase:e.PPLE_REGISTRY_BASE??Bt.registryBase}}function Fu(e,t){let n=e.XDG_CONFIG_HOME?.trim();return le.join(n&&n!==""?n:le.join(t,".config"),"pple")}function Ku(e){let t=e.PPLE_NO_UPDATE_CHECK?.trim().toLowerCase();return!t||t==="0"||t==="false"}function Xe(){return le.dirname(le.dirname(eb(import.meta.url)))}function Gu(){try{let e=Zw(le.join(Xe(),"package.json"),"utf8");return String(JSON.parse(e).version??"0.0.0")}catch{return"0.0.0"}}function Vu(e){let t=e.PPLE_TEMPLATE_DIR?.trim();if(t)return t;let n=le.join(Xe(),"templates","golden-path");return zw(n)?n:le.join(le.dirname(Xe()),"template")}function Ju(){return le.join(Xe(),"askpass","pple-askpass.mjs")}function Hu(e,t,n){return new Promise((s,r)=>{let i=Yu(e,t,{cwd:n.cwd,env:{...process.env,...n.env},stdio:["ignore","pipe","pipe"]}),o="",a="";i.stdout.on("data",l=>o+=String(l)),i.stderr.on("data",l=>a+=String(l)),i.on("error",r),i.on("close",l=>s({code:l??0,stdout:o,stderr:a}))})}async function tb(e){let t=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";await Hu(t,[e],{cwd:process.cwd()}).catch(()=>{})}async function nb(e){let t=Wu.createInterface({input:process.stdin,output:process.stdout});try{let n=await t.question(`${e} [y/N] `);return/^y(es)?$/i.test(n.trim())}finally{t.close()}}async function sb(e){let t=Wu.createInterface({input:process.stdin,output:process.stdout});try{return await t.question(`${e} `)}finally{t.close()}}async function rb(){let e=[];for await(let t of process.stdin)e.push(typeof t=="string"?Buffer.from(t):t);return Buffer.concat(e).toString("utf8")}function ib(e){return new Promise((t,n)=>{let s=Yu(process.execPath,[process.argv[1],...e],{stdio:"inherit"});s.on("error",n),s.on("close",r=>t(r??0))})}function Qu(e,t){return{fetch:globalThis.fetch.bind(globalThis),now:()=>Date.now(),sleep:n=>new Promise(s=>setTimeout(s,n)),cwd:process.cwd(),configDir:Fu(process.env,t),out:e,openBrowser:tb,run:Hu,templateDir:Vu(process.env),packageDir:Xe(),version:Gu(),interactive:process.stdin.isTTY===!0&&process.stdout.isTTY===!0,confirm:nb,ask:sb,readStdin:rb,reexec:ib,updateChecks:Ku(process.env),gitAskpass:Ju(),config:Uu(process.env)}}var ab=Hi(e=>process.stdout.write(e),e=>process.stderr.write(e));try{process.exitCode=await Bu(process.argv.slice(2),Qu(ab,ob.homedir()))}catch(e){process.stderr.write(`\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E20\u0E32\u0E22\u0E43\u0E19 pple CLI \u0E01\u0E23\u0E38\u0E13\u0E32\u0E2A\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E19\u0E35\u0E49\u0E43\u0E2B\u0E49\u0E17\u0E35\u0E21\u0E41\u0E1E\u0E25\u0E15\u0E1F\u0E2D\u0E23\u0E4C\u0E21:
37
186
  `),process.stderr.write(`${e instanceof Error?e.stack??e.message:String(e)}
38
187
  `),process.exitCode=1}