cf 0.7.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 (174) hide show
  1. package/dist/_meta/agent-context.json +1 -1
  2. package/dist/_meta/commands.json +9 -112
  3. package/dist/{abuse-reports-BsF9JZPW.mjs → abuse-reports-C6GFnuYE.mjs} +1 -1
  4. package/dist/{account-D8mYiWxQ.mjs → account-DxzpnGA8.mjs} +1 -1
  5. package/dist/{accounts-CJci1Oez.mjs → accounts-6RFDuFLF.mjs} +1 -1
  6. package/dist/{acm-CmCd985Q.mjs → acm-Bndi5Jqo.mjs} +1 -1
  7. package/dist/{addressing-R7p6TRBe.mjs → addressing-C8HB4n_n.mjs} +1 -1
  8. package/dist/ai-B4La9Oqk.mjs +8 -0
  9. package/dist/{ai-audit-B0vJNOZG.mjs → ai-audit-B9kKFhoY.mjs} +1 -1
  10. package/dist/{ai-gateway-D3vJR3My.mjs → ai-gateway-Bx9MzNxL.mjs} +1 -1
  11. package/dist/{ai-search-CNg7W7U4.mjs → ai-search-BgIOIgXd.mjs} +1 -1
  12. package/dist/{alerting-_sdM0B0S.mjs → alerting-DVI-v6mE.mjs} +1 -1
  13. package/dist/{analytics-BFBJhDrP.mjs → analytics-B98epmDb.mjs} +1 -1
  14. package/dist/{analytics_engine-CWhFvyeK.mjs → analytics_engine-DwDePA2c.mjs} +1 -1
  15. package/dist/{api-gateway-D4AIEtUq.mjs → api-gateway-DW2GX64w.mjs} +1 -1
  16. package/dist/{argo-Bjk6nFfs.mjs → argo-DKEx-B66.mjs} +1 -1
  17. package/dist/{artifacts-Ba4b3iOa.mjs → artifacts-BEU8fBqt.mjs} +1 -1
  18. package/dist/{audit-logs-BE0T5All.mjs → audit-logs-DZiEPYL0.mjs} +1 -1
  19. package/dist/{auth-D_zyQbDR.mjs → auth-009DISzb.mjs} +1 -1
  20. package/dist/{auth-CZ0E51rF.mjs → auth-B1CY5zpC.mjs} +2 -2
  21. package/dist/{billing-Dz6Zj8Eq.mjs → billing-10B4_1qb.mjs} +1 -1
  22. package/dist/{bot-management-pFwIbFi-.mjs → bot-management-D51WzJBO.mjs} +1 -1
  23. package/dist/{botnet-feed-BY9uGChY.mjs → botnet-feed-Dw-leAwX.mjs} +1 -1
  24. package/dist/{brand-protection-DkPAk2Cz.mjs → brand-protection-BTYkTsER.mjs} +1 -1
  25. package/dist/{browser-extension-D9P6Yv8i.mjs → browser-extension-BFa5Ky8u.mjs} +1 -1
  26. package/dist/{browser-run-DhHtz4y3.mjs → browser-run-BMA8Z_hI.mjs} +1 -1
  27. package/dist/build-C1FOoThn.mjs +70 -0
  28. package/dist/{cache-DVhkiIGK.mjs → cache-DrX4gWvg.mjs} +1 -1
  29. package/dist/{calls-95zjvIcO.mjs → calls-m4WyL1Rb.mjs} +1 -1
  30. package/dist/{certificate-authorities-BowBqbVq.mjs → certificate-authorities-BA-S8NE-.mjs} +1 -1
  31. package/dist/{cf-BLT7uKJF.mjs → cf-BhDnTcDR.mjs} +7 -7
  32. package/dist/chunk-2SIGYDH3-_JSHaszR.mjs +473 -0
  33. package/dist/{chunk-6IEM75FG-BEjRFMGh.mjs → chunk-Q72B4Q5Z-B-N_eqrM.mjs} +1 -1
  34. package/dist/{client-certificates-D6mE4vJu.mjs → client-certificates-5h-fXoNq.mjs} +1 -1
  35. package/dist/{cloud-connector-DmwsjeFN.mjs → cloud-connector-ywFQuqtV.mjs} +1 -1
  36. package/dist/{cloudforce-one-CG3TT7IN.mjs → cloudforce-one-CPx4C-r3.mjs} +1 -1
  37. package/dist/{completions-DMc_PlIw.mjs → completions-CCRu-jvY.mjs} +1 -1
  38. package/dist/{connectivity-DJkE3crz.mjs → connectivity-y-Gav-Ge.mjs} +1 -1
  39. package/dist/{connector-interrupts-DTgQ7onV.mjs → connector-interrupts-Bs-jfuh8.mjs} +1 -1
  40. package/dist/{connector-telemetry-events-D0rTHDou.mjs → connector-telemetry-events-Bc6f3xpx.mjs} +1 -1
  41. package/dist/{connector-telemetry-snapshots--0QmD3z6.mjs → connector-telemetry-snapshots-Bl54XZ3h.mjs} +1 -1
  42. package/dist/{connectors-zWaZTi2A.mjs → connectors-BnQq_R19.mjs} +1 -1
  43. package/dist/{content-scanning-CGvGf04y.mjs → content-scanning-Bxk-WkSL.mjs} +1 -1
  44. package/dist/{ct-alerting-ebSPSWNC.mjs → ct-alerting-BSn2Jqou.mjs} +1 -1
  45. package/dist/{custom-certificates-CWUrPYLP.mjs → custom-certificates-BBqr4S9W.mjs} +1 -1
  46. package/dist/{custom-csrs-CRtdrF9R.mjs → custom-csrs-CXeBzLUy.mjs} +1 -1
  47. package/dist/{custom-hostnames-CVQSksqq.mjs → custom-hostnames-CfCOedoN.mjs} +1 -1
  48. package/dist/{custom-nameservers-BRwbIdsX.mjs → custom-nameservers-RPXeu7f_.mjs} +1 -1
  49. package/dist/{custom-pages-Ci8sTQX7.mjs → custom-pages-xGG1xo88.mjs} +1 -1
  50. package/dist/{d1-78Ym1P6D.mjs → d1-CRIOfBsJ.mjs} +1 -1
  51. package/dist/{data-security-zmFoMwRU.mjs → data-security-D5Sw5rwj.mjs} +1 -1
  52. package/dist/{dcv-delegation-Dd4FZ2IG.mjs → dcv-delegation-BBnlgr6F.mjs} +1 -1
  53. package/dist/deploy-D0_KIUpW.mjs +2 -0
  54. package/dist/deploy-input-CdWrpzPA.mjs +1178 -0
  55. package/dist/{dev-DSslyDXx.mjs → dev-Bz87BeKt.mjs} +1 -1
  56. package/dist/{diagnostics-B8Ev5m_o.mjs → diagnostics-C1qryRf4.mjs} +1 -1
  57. package/dist/{dispatch-namespaces-Dm5vGeEP.mjs → dispatch-namespaces-DbosPgPV.mjs} +1 -1
  58. package/dist/{dist-BH-4NQOV.mjs → dist-C-6VkMPZ.mjs} +35 -35
  59. package/dist/dist-CnaLMpVH.mjs +18 -0
  60. package/dist/{dns-D7VAaCyO.mjs → dns-ByufYrJH.mjs} +1 -1
  61. package/dist/{dns-firewall-ByLCsf0q.mjs → dns-firewall-CiokCKRr.mjs} +1 -1
  62. package/dist/{durable-objects-BIpvyu9m.mjs → durable-objects-DjF-WAD3.mjs} +1 -1
  63. package/dist/{email-auth-Cx--s8W4.mjs → email-auth-B4BIYMb-.mjs} +1 -1
  64. package/dist/{email-routing-CiDbivcN.mjs → email-routing-BbbtpVyS.mjs} +1 -1
  65. package/dist/{email-security-BYeAuSc6.mjs → email-security-DuBVypAO.mjs} +1 -1
  66. package/dist/{email-sending-Dg2rSmHH.mjs → email-sending-5g-k05Lv.mjs} +1 -1
  67. package/dist/{filters-DZ8YnQ90.mjs → filters-CzJmLFcS.mjs} +1 -1
  68. package/dist/{firewall-DEd1hs_I.mjs → firewall-CjmeWA2M.mjs} +1 -1
  69. package/dist/{flagship-DVw7xGoP.mjs → flagship-BfyVrWP-.mjs} +1 -1
  70. package/dist/{fraud-BbGS3FZs.mjs → fraud-reRvxNg-.mjs} +1 -1
  71. package/dist/{google-tag-gateway-CBnRGYQR.mjs → google-tag-gateway-CGwzMZU1.mjs} +1 -1
  72. package/dist/{healthchecks-Da9N3ix4.mjs → healthchecks-BhCsPWcG.mjs} +1 -1
  73. package/dist/{hostnames-mimZu2tB.mjs → hostnames-JpgQW4kn.mjs} +1 -1
  74. package/dist/{hyperdrive-BNdvxOos.mjs → hyperdrive-iwYttuwV.mjs} +1 -1
  75. package/dist/{iam-DGQ-OgRl.mjs → iam-ffI98_4v.mjs} +1 -1
  76. package/dist/{images-CI6Iy9ho.mjs → images-Bgb9DGlr.mjs} +1 -1
  77. package/dist/index.mjs +1 -1
  78. package/dist/{intel-BDB-aRtU.mjs → intel-DVRjKpyU.mjs} +1 -1
  79. package/dist/{ips-B9UuPvsY.mjs → ips-BtLRO19r.mjs} +1 -1
  80. package/dist/{keyless-certificates-Ua9uJgPt.mjs → keyless-certificates-13w8KOcC.mjs} +1 -1
  81. package/dist/{kv-BHerx4dZ.mjs → kv-CvQyF_NB.mjs} +1 -1
  82. package/dist/{leaked-credential-checks-B8Vunj9h.mjs → leaked-credential-checks-DvY8VReW.mjs} +1 -1
  83. package/dist/{load-balancers-DSjS5WKw.mjs → load-balancers-6lgExyS7.mjs} +1 -1
  84. package/dist/{logexplorer-DBIfTlRP.mjs → logexplorer-DBfrK1hn.mjs} +1 -1
  85. package/dist/{logo-matches-C00iGpzW.mjs → logo-matches-XS2RaxQu.mjs} +1 -1
  86. package/dist/{logos-CJLhx1go.mjs → logos-COtlpbRq.mjs} +1 -1
  87. package/dist/{logpush-Cr1U-eK-.mjs → logpush-CIpiK3Xl.mjs} +1 -1
  88. package/dist/{logs-DMvtchc6.mjs → logs-0KjIf_3g.mjs} +1 -1
  89. package/dist/{magic-cloud-networking-FQfO8QWH.mjs → magic-cloud-networking-q_d9-he-.mjs} +1 -1
  90. package/dist/{magic-network-monitoring-CDd70fJQ.mjs → magic-network-monitoring-DLNCrUsn.mjs} +1 -1
  91. package/dist/{magic-transit-DiKiPUax.mjs → magic-transit-sIwSlzoK.mjs} +1 -1
  92. package/dist/{managed-transforms-fPVUTrAv.mjs → managed-transforms-BKRjmzJS.mjs} +1 -1
  93. package/dist/{matches-B0yHbQ2I.mjs → matches-DZLS60M2.mjs} +1 -1
  94. package/dist/{moq-UgBawOXe.mjs → moq-Dbb9QhC1.mjs} +1 -1
  95. package/dist/{mtls-certificates-xKUbC5EL.mjs → mtls-certificates-BpIqoWpc.mjs} +1 -1
  96. package/dist/{network-interconnects-BJzOE2ny.mjs → network-interconnects-DZwGJFYT.mjs} +1 -1
  97. package/dist/{oauth-DBJ5GSFk.mjs → oauth-DC9g9uK_.mjs} +1 -1
  98. package/dist/{observability-B-1y36QS.mjs → observability-CVLjPAir.mjs} +1 -1
  99. package/dist/{open-YWOUIZ5Y-CFRcYALi.mjs → open-PBXRGS4R-D5C2-7de.mjs} +1 -1
  100. package/dist/{organization-Dq3PClZ7.mjs → organization-BGF8N1QQ.mjs} +1 -1
  101. package/dist/{organizations-AhsQkHyX.mjs → organizations-BInE8nlx.mjs} +1 -1
  102. package/dist/{origin-ca-certificates-CRgF0UyU.mjs → origin-ca-certificates-wPzWcEa0.mjs} +1 -1
  103. package/dist/{origin-post-quantum-encryption-BXTx7DPa.mjs → origin-post-quantum-encryption-t1Cl9hiy.mjs} +1 -1
  104. package/dist/{origin-tls-client-auth-BDw5q-6G.mjs → origin-tls-client-auth-Cvr9D8eq.mjs} +1 -1
  105. package/dist/{page-rules-DqYQ23eg.mjs → page-rules-CMo73oVb.mjs} +1 -1
  106. package/dist/{page-shield-DKdlZOLO.mjs → page-shield-Z23iqabu.mjs} +1 -1
  107. package/dist/{pages-BsXF11Kv.mjs → pages-ByaZvYjA.mjs} +1 -1
  108. package/dist/{pay-per-crawl-BGAwuAP3.mjs → pay-per-crawl-BXTenh_d.mjs} +1 -1
  109. package/dist/{pipelines-D_QhSnGW.mjs → pipelines-7KWm5BYN.mjs} +1 -1
  110. package/dist/{progress-O88q63Bk.mjs → progress-BLQ2xXwD.mjs} +1 -1
  111. package/dist/{prompt-DTAWiEm2.mjs → prompt-DcfYBioA.mjs} +1 -1
  112. package/dist/{queries-CAE95-OH.mjs → queries-Cgx1lQbn.mjs} +1 -1
  113. package/dist/{queues-BBz35Mqd.mjs → queues-jnugmCYI.mjs} +1 -1
  114. package/dist/{r2-Zp99S5xF.mjs → r2-Dllx7F7a.mjs} +1 -1
  115. package/dist/{r2-data-catalog-BeVLZwrE.mjs → r2-data-catalog-CaAAPwKp.mjs} +1 -1
  116. package/dist/{radar-Cij-XVQJ.mjs → radar-DLSHX2_1.mjs} +1 -1
  117. package/dist/{rate-limits-DSdToIWv.mjs → rate-limits-DlVTd6QY.mjs} +1 -1
  118. package/dist/{raw-fetch-DgezeshQ.mjs → raw-fetch-CeW1mW_u.mjs} +1 -1
  119. package/dist/{realtime-kit-9rJcapfM.mjs → realtime-kit-ct8Fu2kO.mjs} +1 -1
  120. package/dist/{registrar-CXViZlah.mjs → registrar-CKTB7QTM.mjs} +1 -1
  121. package/dist/{registrar-sandbox-CvQyjXLJ.mjs → registrar-sandbox-1-nNk6Uy.mjs} +1 -1
  122. package/dist/{request-tracers-DATfBnE9.mjs → request-tracers-DO6lno0x.mjs} +1 -1
  123. package/dist/{resource-sharing-Cmhn6ghR.mjs → resource-sharing-DYhXJw44.mjs} +1 -1
  124. package/dist/{resource-tagging-BTn05AOj.mjs → resource-tagging-CcKWMF9l.mjs} +1 -1
  125. package/dist/{rules-ens3OHme.mjs → rules-DQKR3qb7.mjs} +1 -1
  126. package/dist/{rulesets-bkreZRao.mjs → rulesets-B9fZb_JY.mjs} +1 -1
  127. package/dist/{rum-CpgXFcwl.mjs → rum-BaJio_GD.mjs} +1 -1
  128. package/dist/{schema-validation-Ca6o94ts.mjs → schema-validation-Cqv8KT1B.mjs} +1 -1
  129. package/dist/{scim-C4oT8TMc.mjs → scim-DkYH1dep.mjs} +1 -1
  130. package/dist/{secrets-store-CWEuiDNo.mjs → secrets-store-CMR_pA1t.mjs} +1 -1
  131. package/dist/{security-center-BOvm7xy6.mjs → security-center-DCHfgCq6.mjs} +1 -1
  132. package/dist/{security-txt-BCAUBctN.mjs → security-txt-D19uTyaf.mjs} +1 -1
  133. package/dist/{session-B1ARgLG7.mjs → session-CQpgz61H.mjs} +1 -1
  134. package/dist/{share-DhmVspmL.mjs → share-CfJbt0WU.mjs} +1 -1
  135. package/dist/shared-D0xvDsDl.mjs +2 -0
  136. package/dist/{smart-shield-DZm4fn6z.mjs → smart-shield-BG5WOmi1.mjs} +1 -1
  137. package/dist/{snippets-oQ0u26-z.mjs → snippets-CYiSdx7R.mjs} +1 -1
  138. package/dist/{spawn-ChG5Xi9Z.mjs → spawn-j3dn7A69.mjs} +1 -1
  139. package/dist/{spectrum-Cnkee5Ww.mjs → spectrum-Qvq3yJax.mjs} +1 -1
  140. package/dist/{speed-DqNnvLBD.mjs → speed-vpoB9msm.mjs} +1 -1
  141. package/dist/{src-By-zTCHz.mjs → src-Bn0FyQIp.mjs} +5 -5
  142. package/dist/{ssl-tS3CYZsZ.mjs → ssl-Qw8eVAiS.mjs} +1 -1
  143. package/dist/{state-OsdDJvdj.mjs → state-C2cBU9iK.mjs} +1 -1
  144. package/dist/{stream-Bud9Os5V.mjs → stream-BNbkY3zI.mjs} +1 -1
  145. package/dist/{submit-BtP8she2.mjs → submit-pQNW7uWj.mjs} +1 -1
  146. package/dist/{tenant-CMwHa-tU.mjs → tenant-xkvdAutS.mjs} +1 -1
  147. package/dist/{token-validation-BYC7HTok.mjs → token-validation-5F2AbQCz.mjs} +1 -1
  148. package/dist/triggers-CYdZhJYr.mjs +2 -0
  149. package/dist/{turnstile-CP4nScaL.mjs → turnstile-BSIaunXn.mjs} +1 -1
  150. package/dist/{ui-BNoF0KpD.mjs → ui-CTo5OG9r.mjs} +1 -1
  151. package/dist/{url-info-Chs9h7Y-.mjs → url-info-Q7m7AVih.mjs} +1 -1
  152. package/dist/{url-normalization-XYxW5Gj0.mjs → url-normalization-Bs2m5jlD.mjs} +1 -1
  153. package/dist/{url-scanner-D4pYNlO-.mjs → url-scanner-CYmT3C99.mjs} +1 -1
  154. package/dist/{user-DtefniLc.mjs → user-Bay_0p3C.mjs} +1 -1
  155. package/dist/{vectorize-BeAY2g-7.mjs → vectorize-cP2OuB5N.mjs} +1 -1
  156. package/dist/{versions-dMW3bLVv.mjs → versions-D7F26fhH.mjs} +1 -1
  157. package/dist/{waiting-rooms-K78HeeTg.mjs → waiting-rooms-B5HR1-37.mjs} +1 -1
  158. package/dist/{web3-Dhw79l4S.mjs → web3-DqCXM4sx.mjs} +1 -1
  159. package/dist/{workers-l3zMNOU6.mjs → workers-Cu-A8AZc.mjs} +1 -1
  160. package/dist/{workers-builds-CuOAB3u4.mjs → workers-builds-CmCg27M-.mjs} +1 -1
  161. package/dist/{workflows-rb7RYBKP.mjs → workflows-DavS4SEh.mjs} +1 -1
  162. package/dist/{zaraz-CHecMYuo.mjs → zaraz-CKcVy5Xa.mjs} +1 -1
  163. package/dist/{zero-trust-DAZoa-Aj.mjs → zero-trust-BKVqb2yq.mjs} +1 -1
  164. package/dist/{zone-BnnqJwW-.mjs → zone-BOcuY4sU.mjs} +1 -1
  165. package/dist/{zones-DpI2YikF.mjs → zones-BR-9WaY7.mjs} +1 -1
  166. package/package.json +5 -4
  167. package/dist/ai-BzJg0RIX.mjs +0 -3
  168. package/dist/build-CWuStmDi.mjs +0 -2
  169. package/dist/chunk-2SIGYDH3-qXx_zE6v.mjs +0 -397
  170. package/dist/deploy-CVvkZFjR.mjs +0 -2
  171. package/dist/lib-Og5sB51C.mjs +0 -68
  172. package/dist/shared-Bod3-Exx.mjs +0 -990
  173. /package/dist/{schema-DCF4yEp_.mjs → schema-DAW-B7wT.mjs} +0 -0
  174. /package/dist/{tools-Dru4l8yh.mjs → tools-BpNGzfj2.mjs} +0 -0
@@ -62,73 +62,73 @@ import{r as e}from"./chunk-DH-VkVmc.mjs";import*as t from"node:module";import{ex
62
62
 
63
63
  `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=se,s=!x.jitless,c=s&&ce.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Dn([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function An(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Ce(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>j(e,r,S())))}),t)}const jn=v(`$ZodUnion`,(e,t)=>{N.init(e,t),D(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),D(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),D(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),D(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>E(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>An(t,r,e,i)):An(o,r,e,i)}}),Mn=v(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,jn.init(e,t);let n=e._zod.parse;D(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=w(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!se(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Nn=v(`$ZodIntersection`,(e,t)=>{N.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Fn(e,t,n)):Fn(e,i,a)}});function Pn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(le(e)&&le(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Pn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Pn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Fn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Ce(e))return e;let o=Pn(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const In=v(`$ZodRecord`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!le(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>j(e,r,S())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...Te(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Te(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&bt.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>j(e,r,S())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Te(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Te(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Ln=v(`$ZodEnum`,(e,t)=>{N.init(e,t);let n=ee(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>de.has(typeof e)).map(e=>typeof e==`string`?pe(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Rn=v(`$ZodLiteral`,(e,t)=>{if(N.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?pe(e):e?pe(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),zn=v(`$ZodTransform`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new b(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new y;return n.value=i,n.fallback=!0,n}});function Bn(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Vn=v(`$ZodOptional`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,D(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),D(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${E(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Bn(e,r)):Bn(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Hn=v(`$ZodExactOptional`,(e,t)=>{Vn.init(e,t),D(e._zod,`values`,()=>t.innerType._zod.values),D(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Un=v(`$ZodNullable`,(e,t)=>{N.init(e,t),D(e._zod,`optin`,()=>t.innerType._zod.optin),D(e._zod,`optout`,()=>t.innerType._zod.optout),D(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${E(e.source)}|null)$`):void 0}),D(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Wn=v(`$ZodDefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,D(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Gn(e,t)):Gn(r,t)}});function Gn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Kn=v(`$ZodPrefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,D(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),qn=v(`$ZodNonOptional`,(e,t)=>{N.init(e,t),D(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Jn(t,e)):Jn(i,e)}});function Jn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const Yn=v(`$ZodCatch`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,D(e._zod,`optout`,()=>t.innerType._zod.optout),D(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>j(e,n,S()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>j(e,n,S()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Xn=v(`$ZodPipe`,(e,t)=>{N.init(e,t),D(e._zod,`values`,()=>t.in._zod.values),D(e._zod,`optin`,()=>t.in._zod.optin),D(e._zod,`optout`,()=>t.out._zod.optout),D(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Zn(e,t.in,n)):Zn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Zn(e,t.out,n)):Zn(r,t.out,n)}});function Zn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Qn=v(`$ZodReadonly`,(e,t)=>{N.init(e,t),D(e._zod,`propValues`,()=>t.innerType._zod.propValues),D(e._zod,`values`,()=>t.innerType._zod.values),D(e._zod,`optin`,()=>t.innerType?._zod?.optin),D(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then($n):$n(r)}});function $n(e){return e.value=Object.freeze(e.value),e}const er=v(`$ZodTemplateLiteral`,(e,t)=>{N.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||fe.has(typeof e))n.push(pe(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),tr=v(`$ZodLazy`,(e,t)=>{N.init(e,t),D(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),D(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),D(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),D(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),D(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),nr=v(`$ZodCustom`,(e,t)=>{M.init(e,t),N.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>rr(t,n,r,e));rr(i,n,r,e)}});function rr(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Oe(e))}}var ir,ar=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function or(){return new ar}(ir=globalThis).__zod_globalRegistry??(ir.__zod_globalRegistry=or());const sr=globalThis.__zod_globalRegistry;function cr(e,t){return new e({type:`string`,...A(t)})}function lr(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...A(t)})}function ur(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...A(t)})}function dr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...A(t)})}function fr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...A(t)})}function pr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...A(t)})}function mr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...A(t)})}function hr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...A(t)})}function gr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...A(t)})}function _r(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...A(t)})}function vr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...A(t)})}function yr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...A(t)})}function br(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...A(t)})}function xr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...A(t)})}function Sr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...A(t)})}function Cr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...A(t)})}function wr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...A(t)})}function Tr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...A(t)})}function Er(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...A(t)})}function Dr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...A(t)})}function Or(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...A(t)})}function kr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...A(t)})}function Ar(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...A(t)})}function jr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...A(t)})}function Mr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...A(t)})}function Nr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...A(t)})}function Pr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...A(t)})}function Fr(e,t){return new e({type:`number`,checks:[],...A(t)})}function Ir(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...A(t)})}function Lr(e,t){return new e({type:`boolean`,...A(t)})}function Rr(e,t){return new e({type:`null`,...A(t)})}function zr(e){return new e({type:`unknown`})}function Br(e,t){return new e({type:`never`,...A(t)})}function Vr(e,t){return new Et({check:`less_than`,...A(t),value:e,inclusive:!1})}function Hr(e,t){return new Et({check:`less_than`,...A(t),value:e,inclusive:!0})}function Ur(e,t){return new Dt({check:`greater_than`,...A(t),value:e,inclusive:!1})}function Wr(e,t){return new Dt({check:`greater_than`,...A(t),value:e,inclusive:!0})}function Gr(e,t){return new Ot({check:`multiple_of`,...A(t),value:e})}function Kr(e,t){return new At({check:`max_length`,...A(t),maximum:e})}function qr(e,t){return new jt({check:`min_length`,...A(t),minimum:e})}function Jr(e,t){return new Mt({check:`length_equals`,...A(t),length:e})}function Yr(e,t){return new Pt({check:`string_format`,format:`regex`,...A(t),pattern:e})}function Xr(e){return new Ft({check:`string_format`,format:`lowercase`,...A(e)})}function Zr(e){return new It({check:`string_format`,format:`uppercase`,...A(e)})}function Qr(e,t){return new Lt({check:`string_format`,format:`includes`,...A(t),includes:e})}function $r(e,t){return new Rt({check:`string_format`,format:`starts_with`,...A(t),prefix:e})}function ei(e,t){return new zt({check:`string_format`,format:`ends_with`,...A(t),suffix:e})}function ti(e){return new Bt({check:`overwrite`,tx:e})}function ni(e){return ti(t=>t.normalize(e))}function ri(){return ti(e=>e.trim())}function ii(){return ti(e=>e.toLowerCase())}function ai(){return ti(e=>e.toUpperCase())}function oi(){return ti(e=>ae(e))}function si(e,t,n){return new e({type:`array`,element:t,...A(n)})}function ci(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...A(n)})}function li(e,t){let n=ui(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Oe(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Oe(r))}},e(t.value,t)),t);return n}function ui(e,t){let n=new M({check:`custom`,...A(t)});return n._zod.check=e,n}function di(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??sr,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function F(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,F(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&I(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function fi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
64
64
 
65
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function pi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:hi(t,`input`,e.processors),output:hi(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function I(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return I(r.element,n);if(r.type===`set`)return I(r.valueType,n);if(r.type===`lazy`)return I(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return I(r.innerType,n);if(r.type===`intersection`)return I(r.left,n)||I(r.right,n);if(r.type===`record`||r.type===`map`)return I(r.keyType,n)||I(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:I(r.in,n)||I(r.out,n);if(r.type===`object`){for(let e in r.shape)if(I(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(I(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(I(e,n))return!0;return!!(r.rest&&I(r.rest,n))}return!1}const mi=(e,t={})=>n=>{let r=di({...n,processors:t});return F(e,r),fi(r,e),pi(r,e)},hi=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=di({...i??{},target:a,io:t,processors:n});return F(e,o),fi(o,e),pi(o,e)},gi={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},_i=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=gi[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},vi=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},yi=(e,t,n,r)=>{n.type=`boolean`},bi=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},xi=(e,t,n,r)=>{n.not={}},Si=(e,t,n,r)=>{let i=e._zod.def,a=ee(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ci=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},wi=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Ti=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Ei=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Di=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=F(a.element,t,{...r,path:[...r.path,`items`]})},Oi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=F(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=F(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ki=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>F(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ai=(e,t,n,r)=>{let i=e._zod.def,a=F(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=F(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},ji=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=F(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=F(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=F(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Mi=(e,t,n,r)=>{let i=e._zod.def,a=F(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ni=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Pi=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Fi=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ii=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Li=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;F(o,t,r);let s=t.seen.get(e);s.ref=o},Ri=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},zi=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Bi=(e,t,n,r)=>{let i=e._zod.innerType;F(i,t,r);let a=t.seen.get(e);a.ref=i},Vi=v(`ZodISODateTime`,(e,t)=>{tn.init(e,t),B.init(e,t)});function Hi(e){return jr(Vi,e)}const Ui=v(`ZodISODate`,(e,t)=>{nn.init(e,t),B.init(e,t)});function Wi(e){return Mr(Ui,e)}const Gi=v(`ZodISOTime`,(e,t)=>{rn.init(e,t),B.init(e,t)});function Ki(e){return Nr(Gi,e)}const qi=v(`ZodISODuration`,(e,t)=>{an.init(e,t),B.init(e,t)});function Ji(e){return Pr(qi,e)}const L=v(`ZodError`,(e,t)=>{Ae.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Ne(e,t)},flatten:{value:t=>Me(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,C,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,C,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Yi=Pe(L),Xi=Fe(L),Zi=Ie(L),Qi=Re(L),$i=Be(L),ea=Ve(L),ta=He(L),na=Ue(L),ra=We(L),ia=Ge(L),aa=Ke(L),oa=qe(L),sa=new WeakMap;function ca(e,t,n){let r=Object.getPrototypeOf(e),i=sa.get(r);if(i||(i=new Set,sa.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const R=v(`ZodType`,(e,t)=>(N.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:hi(e,`input`),output:hi(e,`output`)}}),e.toJSONSchema=mi(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>Yi(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Zi(e,t,n),e.parseAsync=async(t,n)=>Xi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Qi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>$i(e,t,n),e.decode=(t,n)=>ea(e,t,n),e.encodeAsync=async(t,n)=>ta(e,t,n),e.decodeAsync=async(t,n)=>na(e,t,n),e.safeEncode=(t,n)=>ra(e,t,n),e.safeDecode=(t,n)=>ia(e,t,n),e.safeEncodeAsync=async(t,n)=>aa(e,t,n),e.safeDecodeAsync=async(t,n)=>oa(e,t,n),ca(e,`ZodType`,{check(...e){let t=this.def;return this.clone(re(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return k(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(wo(e,t))},superRefine(e,t){return this.check(To(e,t))},overwrite(e){return this.check(ti(e))},optional(){return to(this)},exactOptional(){return ro(this)},nullable(){return ao(this)},nullish(){return to(ao(this))},nonoptional(e){return fo(this,e)},array(){return U(this)},or(e){return G([this,e])},and(e){return Ja(this,e)},transform(e){return go(this,$a(e))},default(e){return so(this,e)},prefault(e){return lo(this,e)},catch(e){return mo(this,e)},pipe(e){return go(this,e)},readonly(){return vo(this)},describe(e){let t=this.clone();return sr.add(t,{description:e}),t},meta(...e){if(e.length===0)return sr.get(this);let t=this.clone();return sr.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return sr.get(e)?.description},configurable:!0}),e)),la=v(`_ZodString`,(e,t)=>{Ut.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ca(e,`_ZodString`,{regex(...e){return this.check(Yr(...e))},includes(...e){return this.check(Qr(...e))},startsWith(...e){return this.check($r(...e))},endsWith(...e){return this.check(ei(...e))},min(...e){return this.check(qr(...e))},max(...e){return this.check(Kr(...e))},length(...e){return this.check(Jr(...e))},nonempty(...e){return this.check(qr(1,...e))},lowercase(e){return this.check(Xr(e))},uppercase(e){return this.check(Zr(e))},trim(){return this.check(ri())},normalize(...e){return this.check(ni(...e))},toLowerCase(){return this.check(ii())},toUpperCase(){return this.check(ai())},slugify(){return this.check(oi())}})}),ua=v(`ZodString`,(e,t)=>{Ut.init(e,t),la.init(e,t),e.email=t=>e.check(lr(da,t)),e.url=t=>e.check(hr(ma,t)),e.jwt=t=>e.check(Ar(ka,t)),e.emoji=t=>e.check(gr(ha,t)),e.guid=t=>e.check(ur(fa,t)),e.uuid=t=>e.check(dr(pa,t)),e.uuidv4=t=>e.check(fr(pa,t)),e.uuidv6=t=>e.check(pr(pa,t)),e.uuidv7=t=>e.check(mr(pa,t)),e.nanoid=t=>e.check(_r(ga,t)),e.guid=t=>e.check(ur(fa,t)),e.cuid=t=>e.check(vr(_a,t)),e.cuid2=t=>e.check(yr(va,t)),e.ulid=t=>e.check(br(ya,t)),e.base64=t=>e.check(Dr(Ea,t)),e.base64url=t=>e.check(Or(Da,t)),e.xid=t=>e.check(xr(ba,t)),e.ksuid=t=>e.check(Sr(xa,t)),e.ipv4=t=>e.check(Cr(Sa,t)),e.ipv6=t=>e.check(wr(Ca,t)),e.cidrv4=t=>e.check(Tr(wa,t)),e.cidrv6=t=>e.check(Er(Ta,t)),e.e164=t=>e.check(kr(Oa,t)),e.datetime=t=>e.check(Hi(t)),e.date=t=>e.check(Wi(t)),e.time=t=>e.check(Ki(t)),e.duration=t=>e.check(Ji(t))});function z(e){return cr(ua,e)}const B=v(`ZodStringFormat`,(e,t)=>{P.init(e,t),la.init(e,t)}),da=v(`ZodEmail`,(e,t)=>{Kt.init(e,t),B.init(e,t)}),fa=v(`ZodGUID`,(e,t)=>{Wt.init(e,t),B.init(e,t)}),pa=v(`ZodUUID`,(e,t)=>{Gt.init(e,t),B.init(e,t)}),ma=v(`ZodURL`,(e,t)=>{qt.init(e,t),B.init(e,t)}),ha=v(`ZodEmoji`,(e,t)=>{Jt.init(e,t),B.init(e,t)}),ga=v(`ZodNanoID`,(e,t)=>{Yt.init(e,t),B.init(e,t)}),_a=v(`ZodCUID`,(e,t)=>{Xt.init(e,t),B.init(e,t)}),va=v(`ZodCUID2`,(e,t)=>{Zt.init(e,t),B.init(e,t)}),ya=v(`ZodULID`,(e,t)=>{Qt.init(e,t),B.init(e,t)}),ba=v(`ZodXID`,(e,t)=>{$t.init(e,t),B.init(e,t)}),xa=v(`ZodKSUID`,(e,t)=>{en.init(e,t),B.init(e,t)}),Sa=v(`ZodIPv4`,(e,t)=>{on.init(e,t),B.init(e,t)}),Ca=v(`ZodIPv6`,(e,t)=>{sn.init(e,t),B.init(e,t)}),wa=v(`ZodCIDRv4`,(e,t)=>{cn.init(e,t),B.init(e,t)}),Ta=v(`ZodCIDRv6`,(e,t)=>{ln.init(e,t),B.init(e,t)}),Ea=v(`ZodBase64`,(e,t)=>{dn.init(e,t),B.init(e,t)}),Da=v(`ZodBase64URL`,(e,t)=>{pn.init(e,t),B.init(e,t)}),Oa=v(`ZodE164`,(e,t)=>{mn.init(e,t),B.init(e,t)}),ka=v(`ZodJWT`,(e,t)=>{gn.init(e,t),B.init(e,t)}),Aa=v(`ZodNumber`,(e,t)=>{_n.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),ca(e,`ZodNumber`,{gt(e,t){return this.check(Ur(e,t))},gte(e,t){return this.check(Wr(e,t))},min(e,t){return this.check(Wr(e,t))},lt(e,t){return this.check(Vr(e,t))},lte(e,t){return this.check(Hr(e,t))},max(e,t){return this.check(Hr(e,t))},int(e){return this.check(Ma(e))},safe(e){return this.check(Ma(e))},positive(e){return this.check(Ur(0,e))},nonnegative(e){return this.check(Wr(0,e))},negative(e){return this.check(Vr(0,e))},nonpositive(e){return this.check(Hr(0,e))},multipleOf(e,t){return this.check(Gr(e,t))},step(e,t){return this.check(Gr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function V(e){return Fr(Aa,e)}const ja=v(`ZodNumberFormat`,(e,t)=>{vn.init(e,t),Aa.init(e,t)});function Ma(e){return Ir(ja,e)}const Na=v(`ZodBoolean`,(e,t)=>{yn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r)});function H(e){return Lr(Na,e)}const Pa=v(`ZodNull`,(e,t)=>{bn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r)});function Fa(e){return Rr(Pa,e)}const Ia=v(`ZodUnknown`,(e,t)=>{xn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function La(){return zr(Ia)}const Ra=v(`ZodNever`,(e,t)=>{Sn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r)});function za(e){return Br(Ra,e)}const Ba=v(`ZodArray`,(e,t)=>{wn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.element=t.element,ca(e,`ZodArray`,{min(e,t){return this.check(qr(e,t))},nonempty(e){return this.check(qr(1,e))},max(e,t){return this.check(Kr(e,t))},length(e,t){return this.check(Jr(e,t))},unwrap(){return this.element}})});function U(e,t){return si(Ba,e,t)}const Va=v(`ZodObject`,(e,t)=>{kn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),D(e,`shape`,()=>t.shape),ca(e,`ZodObject`,{keyof(){return q(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:La()})},loose(){return this.clone({...this._zod.def,catchall:La()})},strict(){return this.clone({...this._zod.def,catchall:za()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return ve(this,e)},safeExtend(e){return ye(this,e)},merge(e){return be(this,e)},pick(e){return ge(this,e)},omit(e){return _e(this,e)},partial(...e){return xe(eo,this,e[0])},required(...e){return Se(uo,this,e[0])}})});function Ha(e,t){return new Va({type:`object`,shape:e??{},...A(t)})}function W(e,t){return new Va({type:`object`,shape:e,catchall:za(),...A(t)})}function Ua(e,t){return new Va({type:`object`,shape:e,catchall:La(),...A(t)})}const Wa=v(`ZodUnion`,(e,t)=>{jn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.options=t.options});function G(e,t){return new Wa({type:`union`,options:e,...A(t)})}const Ga=v(`ZodDiscriminatedUnion`,(e,t)=>{Wa.init(e,t),Mn.init(e,t)});function Ka(e,t,n){return new Ga({type:`union`,options:t,discriminator:e,...A(n)})}const qa=v(`ZodIntersection`,(e,t)=>{Nn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r)});function Ja(e,t){return new qa({type:`intersection`,left:e,right:t})}const Ya=v(`ZodRecord`,(e,t)=>{In.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function K(e,t,n){return!t||!t._zod?new Ya({type:`record`,keyType:z(),valueType:e,...A(t)}):new Ya({type:`record`,keyType:e,valueType:t,...A(n)})}const Xa=v(`ZodEnum`,(e,t)=>{Ln.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Xa({...t,checks:[],...A(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Xa({...t,checks:[],...A(r),entries:i})}});function q(e,t){return new Xa({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...A(t)})}const Za=v(`ZodLiteral`,(e,t)=>{Rn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function J(e,t){return new Za({type:`literal`,values:Array.isArray(e)?e:[e],...A(t)})}const Qa=v(`ZodTransform`,(e,t)=>{zn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new b(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Oe(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Oe(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function $a(e){return new Qa({type:`transform`,transform:e})}const eo=v(`ZodOptional`,(e,t)=>{Vn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function to(e){return new eo({type:`optional`,innerType:e})}const no=v(`ZodExactOptional`,(e,t)=>{Hn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ro(e){return new no({type:`optional`,innerType:e})}const io=v(`ZodNullable`,(e,t)=>{Un.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ao(e){return new io({type:`nullable`,innerType:e})}const oo=v(`ZodDefault`,(e,t)=>{Wn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function so(e,t){return new oo({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ue(t)}})}const co=v(`ZodPrefault`,(e,t)=>{Kn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lo(e,t){return new co({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ue(t)}})}const uo=v(`ZodNonOptional`,(e,t)=>{qn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fo(e,t){return new uo({type:`nonoptional`,innerType:e,...A(t)})}const po=v(`ZodCatch`,(e,t)=>{Yn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ii(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mo(e,t){return new po({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const ho=v(`ZodPipe`,(e,t)=>{Xn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Li(e,t,n,r),e.in=t.in,e.out=t.out});function go(e,t){return new ho({type:`pipe`,in:e,out:t})}const _o=v(`ZodReadonly`,(e,t)=>{Qn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vo(e){return new _o({type:`readonly`,innerType:e})}const yo=v(`ZodTemplateLiteral`,(e,t)=>{er.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r)});function bo(e,t){return new yo({type:`template_literal`,parts:e,...A(t)})}const xo=v(`ZodLazy`,(e,t)=>{tr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bi(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function So(e){return new xo({type:`lazy`,getter:e})}const Co=v(`ZodCustom`,(e,t)=>{nr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r)});function wo(e,t={}){return ci(Co,e,t)}function To(e,t){return li(e,t)}function Eo(e){let t=So(()=>G([z(e),V(),H(),Fa(),U(t),K(z(),t)]));return t}var Do=e({ConfigExportsSchema:()=>Zo,InputWorkerSchema:()=>qo,ModuleTypeSchema:()=>Qo,OutputWorkerSchema:()=>es,SettingsSchema:()=>Jo,convertToWranglerConfig:()=>Wc,loadAndValidateConfig:()=>dl,loadConfig:()=>al,registerConfigHooks:()=>sl,resolveExportDefinition:()=>h}),Oo=Object.getOwnPropertyNames,ko=(e,t)=>function(){return t||(0,e[Oo(e)[0]])((t={exports:{}}).exports,t),t.exports};const Ao=W({htmlHandling:q([`auto-trailing-slash`,`drop-trailing-slash`,`force-trailing-slash`,`none`]).optional(),notFoundHandling:q([`single-page-application`,`404-page`,`none`]).optional(),runWorkerFirst:G([U(z()),H()]).optional()}),jo=Ka(`type`,[W({type:J(`agent-memory`),namespace:z(),remote:H().optional()}),W({type:J(`ai`),remote:H().optional()}),W({type:J(`ai-search`),name:z(),remote:H().optional()}),W({type:J(`ai-search-namespace`),namespace:z(),remote:H().optional()}),W({type:J(`analytics-engine-dataset`),name:z().optional()}),W({type:J(`artifacts`),namespace:z(),remote:H().optional()}),W({type:J(`assets`)}),W({type:J(`browser`),remote:H().optional()}),W({type:J(`d1`),name:z().optional(),id:z().optional(),remote:H().optional()}),W({type:J(`dispatch-namespace`),namespace:z().optional(),outbound:W({workerName:z(),parameters:U(z()).optional()}).optional(),remote:H().optional()}),W({type:J(`durable-object`),workerName:z(),exportName:z()}),W({type:J(`flagship`),id:z().optional(),remote:H().optional()}),W({type:J(`hyperdrive`),id:z(),localConnectionString:z().optional()}),W({type:J(`images`),remote:H().optional()}),W({type:J(`json`),value:Eo()}),W({type:J(`kv`),id:z().optional(),remote:H().optional()}),W({type:J(`logfwdr`),destination:z()}),W({type:J(`media`),remote:H().optional()}),W({type:J(`mtls-certificate`),id:z(),remote:H().optional()}),W({type:J(`pipeline`),name:z(),remote:H().optional()}),W({type:J(`queue`),name:z().optional(),deliveryDelay:V().optional(),remote:H().optional()}),W({type:J(`rate-limit`),namespace:z(),simple:W({limit:V(),period:G([J(10),J(60)])})}),W({type:J(`r2`),name:z().optional(),jurisdiction:z().optional(),remote:H().optional()}),W({type:J(`secret`)}),W({type:J(`secrets-store-secret`),storeId:z(),secretName:z()}),W({type:J(`send-email`),destinationAddress:z().optional(),allowedDestinationAddresses:U(z()).optional(),allowedSenderAddresses:U(z()).optional(),remote:H().optional()}),W({type:J(`stream`),remote:H().optional()}),W({type:J(`text`),value:z()}),W({type:J(`vectorize`),name:z(),remote:H().optional()}),W({type:J(`version-metadata`)}),W({type:J(`vpc-service`),id:z(),remote:H().optional()}),W({type:J(`vpc-network`),tunnelId:z().optional(),networkId:z().optional(),remote:H().optional()}).superRefine((e,t)=>{let n=e.tunnelId!==void 0;n===(e.networkId!==void 0)&&t.addIssue({code:`custom`,message:n?`"vpc-network" bindings must specify exactly one of "tunnelId" or "networkId", not both`:`"vpc-network" bindings must specify either "tunnelId" or "networkId"`})}),W({type:J(`web-search`),remote:H().optional()}),W({type:J(`worker`),workerName:z(),exportName:z().optional(),props:K(z(),La()).optional(),remote:H().optional()}),W({type:J(`worker-loader`)})]),Mo=Ua({type:bo([`unsafe:`,z().min(1)]),dev:W({plugin:W({package:z(),name:z()}),options:K(z(),La()).optional()}).optional()}),No=La().transform((e,t)=>{let n=(typeof e==`object`&&e&&`type`in e&&typeof e.type==`string`&&e.type.startsWith(`unsafe:`)?Mo:jo).safeParse(e);return n.success?n.data:(t.issues.push(...n.error.issues),_)});function Po(e){return e.type.startsWith(`unsafe:`)}const Fo=W({enabled:H(),crossVersionCache:H().optional()}),Io=new Set([`ai`,`assets`,`browser`,`images`,`media`,`stream`,`version-metadata`,`web-search`]),Lo=new Intl.ListFormat(`en-US`),Ro=K(z(),No).superRefine((e,t)=>{let n=new Set,r=new Set;for(let t of Object.values(e)){let e=t.type;Io.has(e)&&(n.has(e)&&r.add(e),n.add(e))}r.size>0&&t.addIssue({code:`custom`,message:`${Lo.format([...r].sort())} bindings can only be defined once`})}).optional(),zo=G([W({type:J(`durable-object`),state:J(`created`).optional(),storage:q([`sqlite`,`legacy-kv`])}),W({type:J(`durable-object`),state:J(`deleted`)}),W({type:J(`durable-object`),state:J(`renamed`),renamedTo:z()}),W({type:J(`durable-object`),state:J(`transferred`),transferredTo:z()}),W({type:J(`durable-object`),state:J(`expecting-transfer`),storage:q([`sqlite`,`legacy-kv`]),transferFrom:z()}),W({type:J(`worker`),cache:W({enabled:H()}).optional()})]),Bo=W({cpuMs:V().optional(),subrequests:V().optional()}),Vo=W({enabled:H().optional(),headSamplingRate:V().optional(),logs:W({enabled:H().optional(),headSamplingRate:V().optional(),invocationLogs:H().optional(),persist:H().optional(),destinations:U(z()).optional()}).optional(),traces:W({enabled:H().optional(),headSamplingRate:V().optional(),persist:H().optional(),destinations:U(z()).optional()}).optional()}),Ho=G([W({mode:q([`off`,`smart`]),hint:z().optional()}),W({mode:J(`targeted`).optional(),region:z()}),W({mode:J(`targeted`).optional(),host:z()}),W({mode:J(`targeted`).optional(),hostname:z()})]),Uo=W({workerName:z(),streaming:H().optional()}),Wo=Ka(`type`,[W({type:J(`email`),addresses:U(z())}),W({type:J(`fetch`),pattern:z(),zone:z().optional()}),W({type:J(`queue`),name:z(),deadLetterQueue:z().optional(),maxBatchSize:V().optional(),maxBatchTimeout:V().optional(),maxConcurrency:V().nullable().optional(),maxRetries:V().optional(),retryDelay:V().optional(),visibilityTimeoutMs:V().optional()}),W({type:J(`scheduled`),schedule:z()})]),Go=W({metadata:K(z(),La()).optional(),capnp:G([W({basePath:z(),sourceSchemas:U(z()),compiledSchema:za().optional()}),W({basePath:za().optional(),sourceSchemas:za().optional(),compiledSchema:z()})]).optional()}),Ko=W({type:J(`worker`),name:z(),compatibilityDate:z(),compatibilityFlags:U(z()).optional(),assets:Ao.optional(),domains:U(z()).optional(),triggers:U(Wo).optional(),tailConsumers:U(Uo).optional(),cache:Fo.optional(),placement:Ho.optional(),limits:Bo.optional(),logpush:H().optional(),observability:Vo.optional(),workersDev:H().optional(),previewUrls:H().optional(),firstPartyWorker:H().optional(),unsafe:Go.optional(),env:Ro,exports:K(z(),zo).optional()}),qo=Ko.extend({entrypoint:G([z(),W({default:z()})]).transform(e=>typeof e==`string`?e:e.default).optional()}),Jo=W({type:J(`settings`),accountId:z().optional(),complianceRegion:q([`public`,`fedramp-high`]).optional()}),Yo=Ka(`type`,[qo,Jo]),Xo=`settings`,Zo=K(z(),Yo).check(e=>{for(let[t,n]of Object.entries(e.value)){let r=t===Xo,i=n.type===`settings`;i&&!r?e.issues.push({code:`custom`,input:n,path:[t],message:`A \`settings\` config is only allowed on the \`${Xo}\` export; found one on the \`${t}\` export.`}):r&&!i&&e.issues.push({code:`custom`,input:n,path:[t],message:`The \`${Xo}\` export is reserved for a \`settings\` config; found a \`${n.type}\` config.`})}}),Qo=q([`esm`,`cjs`,`python`,`python-requirement`,`wasm`,`text`,`data`,`json`,`sourcemap`]),$o=W({mainModule:z(),modules:K(z(),W({type:Qo}))}),es=Ko.extend({manifest:$o.optional()});ko({"../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/dist/index.js":(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dedent=void 0;function t(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
65
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function pi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:hi(t,`input`,e.processors),output:hi(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function I(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return I(r.element,n);if(r.type===`set`)return I(r.valueType,n);if(r.type===`lazy`)return I(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return I(r.innerType,n);if(r.type===`intersection`)return I(r.left,n)||I(r.right,n);if(r.type===`record`||r.type===`map`)return I(r.keyType,n)||I(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:I(r.in,n)||I(r.out,n);if(r.type===`object`){for(let e in r.shape)if(I(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(I(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(I(e,n))return!0;return!!(r.rest&&I(r.rest,n))}return!1}const mi=(e,t={})=>n=>{let r=di({...n,processors:t});return F(e,r),fi(r,e),pi(r,e)},hi=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=di({...i??{},target:a,io:t,processors:n});return F(e,o),fi(o,e),pi(o,e)},gi={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},_i=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=gi[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},vi=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},yi=(e,t,n,r)=>{n.type=`boolean`},bi=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},xi=(e,t,n,r)=>{n.not={}},Si=(e,t,n,r)=>{let i=e._zod.def,a=ee(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ci=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},wi=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Ti=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Ei=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Di=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=F(a.element,t,{...r,path:[...r.path,`items`]})},Oi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=F(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=F(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ki=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>F(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ai=(e,t,n,r)=>{let i=e._zod.def,a=F(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=F(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},ji=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=F(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=F(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=F(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Mi=(e,t,n,r)=>{let i=e._zod.def,a=F(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ni=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Pi=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Fi=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ii=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Li=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;F(o,t,r);let s=t.seen.get(e);s.ref=o},Ri=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},zi=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Bi=(e,t,n,r)=>{let i=e._zod.innerType;F(i,t,r);let a=t.seen.get(e);a.ref=i},Vi=v(`ZodISODateTime`,(e,t)=>{tn.init(e,t),B.init(e,t)});function Hi(e){return jr(Vi,e)}const Ui=v(`ZodISODate`,(e,t)=>{nn.init(e,t),B.init(e,t)});function Wi(e){return Mr(Ui,e)}const Gi=v(`ZodISOTime`,(e,t)=>{rn.init(e,t),B.init(e,t)});function Ki(e){return Nr(Gi,e)}const qi=v(`ZodISODuration`,(e,t)=>{an.init(e,t),B.init(e,t)});function Ji(e){return Pr(qi,e)}const L=v(`ZodError`,(e,t)=>{Ae.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Ne(e,t)},flatten:{value:t=>Me(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,C,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,C,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Yi=Pe(L),Xi=Fe(L),Zi=Ie(L),Qi=Re(L),$i=Be(L),ea=Ve(L),ta=He(L),na=Ue(L),ra=We(L),ia=Ge(L),aa=Ke(L),oa=qe(L),sa=new WeakMap;function ca(e,t,n){let r=Object.getPrototypeOf(e),i=sa.get(r);if(i||(i=new Set,sa.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const R=v(`ZodType`,(e,t)=>(N.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:hi(e,`input`),output:hi(e,`output`)}}),e.toJSONSchema=mi(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>Yi(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Zi(e,t,n),e.parseAsync=async(t,n)=>Xi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Qi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>$i(e,t,n),e.decode=(t,n)=>ea(e,t,n),e.encodeAsync=async(t,n)=>ta(e,t,n),e.decodeAsync=async(t,n)=>na(e,t,n),e.safeEncode=(t,n)=>ra(e,t,n),e.safeDecode=(t,n)=>ia(e,t,n),e.safeEncodeAsync=async(t,n)=>aa(e,t,n),e.safeDecodeAsync=async(t,n)=>oa(e,t,n),ca(e,`ZodType`,{check(...e){let t=this.def;return this.clone(re(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return k(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(wo(e,t))},superRefine(e,t){return this.check(To(e,t))},overwrite(e){return this.check(ti(e))},optional(){return to(this)},exactOptional(){return ro(this)},nullable(){return ao(this)},nullish(){return to(ao(this))},nonoptional(e){return fo(this,e)},array(){return U(this)},or(e){return G([this,e])},and(e){return Ja(this,e)},transform(e){return go(this,$a(e))},default(e){return so(this,e)},prefault(e){return lo(this,e)},catch(e){return mo(this,e)},pipe(e){return go(this,e)},readonly(){return vo(this)},describe(e){let t=this.clone();return sr.add(t,{description:e}),t},meta(...e){if(e.length===0)return sr.get(this);let t=this.clone();return sr.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return sr.get(e)?.description},configurable:!0}),e)),la=v(`_ZodString`,(e,t)=>{Ut.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ca(e,`_ZodString`,{regex(...e){return this.check(Yr(...e))},includes(...e){return this.check(Qr(...e))},startsWith(...e){return this.check($r(...e))},endsWith(...e){return this.check(ei(...e))},min(...e){return this.check(qr(...e))},max(...e){return this.check(Kr(...e))},length(...e){return this.check(Jr(...e))},nonempty(...e){return this.check(qr(1,...e))},lowercase(e){return this.check(Xr(e))},uppercase(e){return this.check(Zr(e))},trim(){return this.check(ri())},normalize(...e){return this.check(ni(...e))},toLowerCase(){return this.check(ii())},toUpperCase(){return this.check(ai())},slugify(){return this.check(oi())}})}),ua=v(`ZodString`,(e,t)=>{Ut.init(e,t),la.init(e,t),e.email=t=>e.check(lr(da,t)),e.url=t=>e.check(hr(ma,t)),e.jwt=t=>e.check(Ar(ka,t)),e.emoji=t=>e.check(gr(ha,t)),e.guid=t=>e.check(ur(fa,t)),e.uuid=t=>e.check(dr(pa,t)),e.uuidv4=t=>e.check(fr(pa,t)),e.uuidv6=t=>e.check(pr(pa,t)),e.uuidv7=t=>e.check(mr(pa,t)),e.nanoid=t=>e.check(_r(ga,t)),e.guid=t=>e.check(ur(fa,t)),e.cuid=t=>e.check(vr(_a,t)),e.cuid2=t=>e.check(yr(va,t)),e.ulid=t=>e.check(br(ya,t)),e.base64=t=>e.check(Dr(Ea,t)),e.base64url=t=>e.check(Or(Da,t)),e.xid=t=>e.check(xr(ba,t)),e.ksuid=t=>e.check(Sr(xa,t)),e.ipv4=t=>e.check(Cr(Sa,t)),e.ipv6=t=>e.check(wr(Ca,t)),e.cidrv4=t=>e.check(Tr(wa,t)),e.cidrv6=t=>e.check(Er(Ta,t)),e.e164=t=>e.check(kr(Oa,t)),e.datetime=t=>e.check(Hi(t)),e.date=t=>e.check(Wi(t)),e.time=t=>e.check(Ki(t)),e.duration=t=>e.check(Ji(t))});function z(e){return cr(ua,e)}const B=v(`ZodStringFormat`,(e,t)=>{P.init(e,t),la.init(e,t)}),da=v(`ZodEmail`,(e,t)=>{Kt.init(e,t),B.init(e,t)}),fa=v(`ZodGUID`,(e,t)=>{Wt.init(e,t),B.init(e,t)}),pa=v(`ZodUUID`,(e,t)=>{Gt.init(e,t),B.init(e,t)}),ma=v(`ZodURL`,(e,t)=>{qt.init(e,t),B.init(e,t)}),ha=v(`ZodEmoji`,(e,t)=>{Jt.init(e,t),B.init(e,t)}),ga=v(`ZodNanoID`,(e,t)=>{Yt.init(e,t),B.init(e,t)}),_a=v(`ZodCUID`,(e,t)=>{Xt.init(e,t),B.init(e,t)}),va=v(`ZodCUID2`,(e,t)=>{Zt.init(e,t),B.init(e,t)}),ya=v(`ZodULID`,(e,t)=>{Qt.init(e,t),B.init(e,t)}),ba=v(`ZodXID`,(e,t)=>{$t.init(e,t),B.init(e,t)}),xa=v(`ZodKSUID`,(e,t)=>{en.init(e,t),B.init(e,t)}),Sa=v(`ZodIPv4`,(e,t)=>{on.init(e,t),B.init(e,t)}),Ca=v(`ZodIPv6`,(e,t)=>{sn.init(e,t),B.init(e,t)}),wa=v(`ZodCIDRv4`,(e,t)=>{cn.init(e,t),B.init(e,t)}),Ta=v(`ZodCIDRv6`,(e,t)=>{ln.init(e,t),B.init(e,t)}),Ea=v(`ZodBase64`,(e,t)=>{dn.init(e,t),B.init(e,t)}),Da=v(`ZodBase64URL`,(e,t)=>{pn.init(e,t),B.init(e,t)}),Oa=v(`ZodE164`,(e,t)=>{mn.init(e,t),B.init(e,t)}),ka=v(`ZodJWT`,(e,t)=>{gn.init(e,t),B.init(e,t)}),Aa=v(`ZodNumber`,(e,t)=>{_n.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),ca(e,`ZodNumber`,{gt(e,t){return this.check(Ur(e,t))},gte(e,t){return this.check(Wr(e,t))},min(e,t){return this.check(Wr(e,t))},lt(e,t){return this.check(Vr(e,t))},lte(e,t){return this.check(Hr(e,t))},max(e,t){return this.check(Hr(e,t))},int(e){return this.check(Ma(e))},safe(e){return this.check(Ma(e))},positive(e){return this.check(Ur(0,e))},nonnegative(e){return this.check(Wr(0,e))},negative(e){return this.check(Vr(0,e))},nonpositive(e){return this.check(Hr(0,e))},multipleOf(e,t){return this.check(Gr(e,t))},step(e,t){return this.check(Gr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function V(e){return Fr(Aa,e)}const ja=v(`ZodNumberFormat`,(e,t)=>{vn.init(e,t),Aa.init(e,t)});function Ma(e){return Ir(ja,e)}const Na=v(`ZodBoolean`,(e,t)=>{yn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r)});function H(e){return Lr(Na,e)}const Pa=v(`ZodNull`,(e,t)=>{bn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r)});function Fa(e){return Rr(Pa,e)}const Ia=v(`ZodUnknown`,(e,t)=>{xn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function La(){return zr(Ia)}const Ra=v(`ZodNever`,(e,t)=>{Sn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r)});function za(e){return Br(Ra,e)}const Ba=v(`ZodArray`,(e,t)=>{wn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.element=t.element,ca(e,`ZodArray`,{min(e,t){return this.check(qr(e,t))},nonempty(e){return this.check(qr(1,e))},max(e,t){return this.check(Kr(e,t))},length(e,t){return this.check(Jr(e,t))},unwrap(){return this.element}})});function U(e,t){return si(Ba,e,t)}const Va=v(`ZodObject`,(e,t)=>{kn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),D(e,`shape`,()=>t.shape),ca(e,`ZodObject`,{keyof(){return q(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:La()})},loose(){return this.clone({...this._zod.def,catchall:La()})},strict(){return this.clone({...this._zod.def,catchall:za()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return ve(this,e)},safeExtend(e){return ye(this,e)},merge(e){return be(this,e)},pick(e){return ge(this,e)},omit(e){return _e(this,e)},partial(...e){return xe(eo,this,e[0])},required(...e){return Se(uo,this,e[0])}})});function Ha(e,t){return new Va({type:`object`,shape:e??{},...A(t)})}function W(e,t){return new Va({type:`object`,shape:e,catchall:za(),...A(t)})}function Ua(e,t){return new Va({type:`object`,shape:e,catchall:La(),...A(t)})}const Wa=v(`ZodUnion`,(e,t)=>{jn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.options=t.options});function G(e,t){return new Wa({type:`union`,options:e,...A(t)})}const Ga=v(`ZodDiscriminatedUnion`,(e,t)=>{Wa.init(e,t),Mn.init(e,t)});function Ka(e,t,n){return new Ga({type:`union`,options:t,discriminator:e,...A(n)})}const qa=v(`ZodIntersection`,(e,t)=>{Nn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r)});function Ja(e,t){return new qa({type:`intersection`,left:e,right:t})}const Ya=v(`ZodRecord`,(e,t)=>{In.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function K(e,t,n){return!t||!t._zod?new Ya({type:`record`,keyType:z(),valueType:e,...A(t)}):new Ya({type:`record`,keyType:e,valueType:t,...A(n)})}const Xa=v(`ZodEnum`,(e,t)=>{Ln.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Xa({...t,checks:[],...A(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Xa({...t,checks:[],...A(r),entries:i})}});function q(e,t){return new Xa({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...A(t)})}const Za=v(`ZodLiteral`,(e,t)=>{Rn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function J(e,t){return new Za({type:`literal`,values:Array.isArray(e)?e:[e],...A(t)})}const Qa=v(`ZodTransform`,(e,t)=>{zn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new b(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Oe(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Oe(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function $a(e){return new Qa({type:`transform`,transform:e})}const eo=v(`ZodOptional`,(e,t)=>{Vn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function to(e){return new eo({type:`optional`,innerType:e})}const no=v(`ZodExactOptional`,(e,t)=>{Hn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ro(e){return new no({type:`optional`,innerType:e})}const io=v(`ZodNullable`,(e,t)=>{Un.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ao(e){return new io({type:`nullable`,innerType:e})}const oo=v(`ZodDefault`,(e,t)=>{Wn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function so(e,t){return new oo({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ue(t)}})}const co=v(`ZodPrefault`,(e,t)=>{Kn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lo(e,t){return new co({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ue(t)}})}const uo=v(`ZodNonOptional`,(e,t)=>{qn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fo(e,t){return new uo({type:`nonoptional`,innerType:e,...A(t)})}const po=v(`ZodCatch`,(e,t)=>{Yn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ii(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mo(e,t){return new po({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const ho=v(`ZodPipe`,(e,t)=>{Xn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Li(e,t,n,r),e.in=t.in,e.out=t.out});function go(e,t){return new ho({type:`pipe`,in:e,out:t})}const _o=v(`ZodReadonly`,(e,t)=>{Qn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vo(e){return new _o({type:`readonly`,innerType:e})}const yo=v(`ZodTemplateLiteral`,(e,t)=>{er.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r)});function bo(e,t){return new yo({type:`template_literal`,parts:e,...A(t)})}const xo=v(`ZodLazy`,(e,t)=>{tr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bi(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function So(e){return new xo({type:`lazy`,getter:e})}const Co=v(`ZodCustom`,(e,t)=>{nr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r)});function wo(e,t={}){return ci(Co,e,t)}function To(e,t){return li(e,t)}function Eo(e){let t=So(()=>G([z(e),V(),H(),Fa(),U(t),K(z(),t)]));return t}var Do=e({AnalyticsEngineDatasetBindingSchema:()=>Lo,AssetsSchema:()=>Ao,BindingSchema:()=>Ho,BrowserBindingSchema:()=>jo,ConfigExportsSchema:()=>ps,D1BindingSchema:()=>No,DurableObjectCreatedExportSchema:()=>Yo,DurableObjectDeletedExportSchema:()=>Xo,DurableObjectExpectingTransferExportSchema:()=>$o,DurableObjectRenamedExportSchema:()=>Zo,DurableObjectTransferredExportSchema:()=>Qo,ExportSchema:()=>ts,FlagshipBindingSchema:()=>Ro,HyperdriveBindingSchema:()=>zo,InputWorkerSchema:()=>ls,KVBindingSchema:()=>Po,KnownBindingSchema:()=>Bo,ModuleTypeSchema:()=>ms,QueueBindingSchema:()=>Fo,R2BindingSchema:()=>Io,SettingsSchema:()=>us,TailConsumerSchema:()=>as,UnsafeBindingSchema:()=>Vo,WorkerBindingSchema:()=>Mo,WorkerEntrypointExportSchema:()=>es,convertToWranglerConfig:()=>dl,loadAndValidateConfig:()=>Ml,loadConfig:()=>El,registerConfigHooks:()=>Ol,resolveExportDefinition:()=>h,validateSingletonBindings:()=>qo}),Oo=Object.getOwnPropertyNames,ko=(e,t)=>function(){return t||(0,e[Oo(e)[0]])((t={exports:{}}).exports,t),t.exports};const Ao=W({htmlHandling:q([`auto-trailing-slash`,`drop-trailing-slash`,`force-trailing-slash`,`none`]).optional(),notFoundHandling:q([`single-page-application`,`404-page`,`none`]).optional(),runWorkerFirst:G([U(z()),H()]).optional()}),jo=W({type:J(`browser`),remote:H().optional()}),Mo=W({type:J(`worker`),workerName:z(),exportName:z().optional(),props:K(z(),La()).optional(),remote:H().optional()}),No=W({type:J(`d1`),name:z().optional(),id:z().optional(),remote:H().optional()}),Po=W({type:J(`kv`),id:z().optional(),remote:H().optional()}),Fo=W({type:J(`queue`),name:z().optional(),deliveryDelay:V().optional(),remote:H().optional()}),Io=W({type:J(`r2`),name:z().optional(),jurisdiction:z().optional(),remote:H().optional(),localDev:W({experimentalS3Credentials:Ha({accessKeyId:z(),secretAccessKey:z()}).optional()}).optional()}),Lo=W({type:J(`analytics-engine-dataset`),name:z().optional()}),Ro=W({type:J(`flagship`),id:z().optional(),remote:H().optional()}),zo=W({type:J(`hyperdrive`),id:z(),localConnectionString:z().optional()}),Bo=Ka(`type`,[W({type:J(`agent-memory`),namespace:z(),remote:H().optional()}),W({type:J(`ai`),remote:H().optional()}),W({type:J(`ai-search`),name:z(),remote:H().optional()}),W({type:J(`ai-search-namespace`),namespace:z(),remote:H().optional()}),Lo,W({type:J(`artifacts`),namespace:z(),remote:H().optional()}),W({type:J(`assets`)}),jo,No,W({type:J(`dispatch-namespace`),namespace:z().optional(),outbound:W({workerName:z(),parameters:U(z()).optional()}).optional(),remote:H().optional()}),W({type:J(`durable-object`),workerName:z(),exportName:z()}),Ro,zo,W({type:J(`images`),remote:H().optional()}),W({type:J(`json`),value:Eo()}),Po,W({type:J(`logfwdr`),destination:z()}),W({type:J(`media`),remote:H().optional()}),W({type:J(`mtls-certificate`),id:z(),remote:H().optional()}),W({type:J(`pipeline`),name:z(),remote:H().optional()}),Fo,W({type:J(`rate-limit`),namespace:z(),simple:W({limit:V(),period:G([J(10),J(60)])})}),Io,W({type:J(`secret`)}),W({type:J(`secrets-store-secret`),storeId:z(),secretName:z()}),W({type:J(`send-email`),destinationAddress:z().optional(),allowedDestinationAddresses:U(z()).optional(),allowedSenderAddresses:U(z()).optional(),remote:H().optional()}),W({type:J(`stream`),remote:H().optional()}),W({type:J(`text`),value:z()}),W({type:J(`vectorize`),name:z(),remote:H().optional()}),W({type:J(`version-metadata`)}),W({type:J(`vpc-service`),id:z(),remote:H().optional()}),W({type:J(`vpc-network`),tunnelId:z().optional(),networkId:z().optional(),remote:H().optional()}).superRefine((e,t)=>{let n=e.tunnelId!==void 0;n===(e.networkId!==void 0)&&t.addIssue({code:`custom`,message:n?`"vpc-network" bindings must specify exactly one of "tunnelId" or "networkId", not both`:`"vpc-network" bindings must specify either "tunnelId" or "networkId"`})}),W({type:J(`web-search`),remote:H().optional()}),Mo,W({type:J(`worker-loader`)})]),Vo=Ua({type:bo([`unsafe:`,z().min(1)]),dev:W({plugin:W({package:z(),name:z()}),options:K(z(),La()).optional()}).optional()}),Ho=La().transform((e,t)=>{let n=(typeof e==`object`&&e&&`type`in e&&typeof e.type==`string`&&e.type.startsWith(`unsafe:`)?Vo:Bo).safeParse(e);return n.success?n.data:(t.issues.push(...n.error.issues),_)});function Uo(e){return e.type.startsWith(`unsafe:`)}const Wo=W({enabled:H(),crossVersionCache:H().optional()}),Go=new Set([`ai`,`assets`,`browser`,`images`,`media`,`stream`,`version-metadata`,`web-search`]),Ko=new Intl.ListFormat(`en-US`);function qo(e,t){let n=new Set,r=new Set;for(let t of Object.values(e)){let e=t.type;Go.has(e)&&(n.has(e)&&r.add(e),n.add(e))}r.size>0&&t.addIssue({code:`custom`,message:`${Ko.format([...r].sort())} bindings can only be defined once`})}const Jo=K(z(),Ho).superRefine(qo).optional(),Yo=W({type:J(`durable-object`),state:J(`created`).optional(),storage:q([`sqlite`,`legacy-kv`]),container:z().optional()}),Xo=W({type:J(`durable-object`),state:J(`deleted`)}),Zo=W({type:J(`durable-object`),state:J(`renamed`),renamedTo:z()}),Qo=W({type:J(`durable-object`),state:J(`transferred`),transferredTo:z()}),$o=W({type:J(`durable-object`),state:J(`expecting-transfer`),storage:q([`sqlite`,`legacy-kv`]),transferFrom:z(),container:z().optional()}),es=W({type:J(`worker`),cache:W({enabled:H()}).optional()}),ts=G([Yo.extend({storage:J(`sqlite`)}),Yo.omit({container:!0}).extend({storage:J(`legacy-kv`)}),Xo,Zo,Qo,$o.extend({storage:J(`sqlite`)}),$o.omit({container:!0}).extend({storage:J(`legacy-kv`)}),es]),ns=W({cpuMs:V().optional(),subrequests:V().optional()}),rs=W({enabled:H().optional(),headSamplingRate:V().optional(),logs:W({enabled:H().optional(),headSamplingRate:V().optional(),invocationLogs:H().optional(),persist:H().optional(),destinations:U(z()).optional()}).optional(),traces:W({enabled:H().optional(),headSamplingRate:V().optional(),persist:H().optional(),destinations:U(z()).optional()}).optional()}),is=G([W({mode:q([`off`,`smart`]),hint:z().optional()}),W({mode:J(`targeted`).optional(),region:z()}),W({mode:J(`targeted`).optional(),host:z()}),W({mode:J(`targeted`).optional(),hostname:z()})]),as=W({workerName:z(),streaming:H().optional()}),os=Ka(`type`,[W({type:J(`email`),addresses:U(z())}),W({type:J(`fetch`),pattern:z(),zone:z().optional()}),W({type:J(`queue`),name:z(),deadLetterQueue:z().optional(),maxBatchSize:V().optional(),maxBatchTimeout:V().optional(),maxConcurrency:V().nullable().optional(),maxRetries:V().optional(),retryDelay:V().optional(),visibilityTimeoutMs:V().optional()}),W({type:J(`scheduled`),schedule:z()}),W({type:J(`connect`),protocol:q([`tcp`]),port:V(),address:z().optional()})]),ss=W({metadata:K(z(),La()).optional(),capnp:G([W({basePath:z(),sourceSchemas:U(z()),compiledSchema:za().optional()}),W({basePath:za().optional(),sourceSchemas:za().optional(),compiledSchema:z()})]).optional()}),cs=W({type:J(`worker`),name:z(),compatibilityDate:z(),compatibilityFlags:U(z()).optional(),assets:Ao.optional(),domains:U(z()).optional(),triggers:U(os).optional(),tailConsumers:U(as).optional(),cache:Wo.optional(),placement:is.optional(),limits:ns.optional(),logpush:H().optional(),observability:rs.optional(),workersDev:H().optional(),previewUrls:H().optional(),firstPartyWorker:H().optional(),unsafe:ss.optional(),env:Jo,exports:K(z(),ts).optional()}),ls=cs.extend({entrypoint:G([z(),W({default:z()})]).transform(e=>typeof e==`string`?e:e.default).optional()}),us=W({type:J(`settings`),accountId:z().optional(),complianceRegion:q([`public`,`fedramp-high`]).optional()}),ds=Ka(`type`,[ls,us]),fs=`settings`,ps=K(z(),ds).check(e=>{for(let[t,n]of Object.entries(e.value)){let r=t===fs,i=n.type===`settings`;i&&!r?e.issues.push({code:`custom`,input:n,path:[t],message:`A \`settings\` config is only allowed on the \`${fs}\` export; found one on the \`${t}\` export.`}):r&&!i&&e.issues.push({code:`custom`,input:n,path:[t],message:`The \`${fs}\` export is reserved for a \`settings\` config; found a \`${n.type}\` config.`})}}),ms=q([`esm`,`cjs`,`python`,`python-requirement`,`wasm`,`text`,`data`,`json`,`sourcemap`]),hs=W({mainModule:z(),modules:K(z(),W({type:ms}))});cs.extend({manifest:hs.optional()}),ko({"../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/dist/index.js":(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dedent=void 0;function t(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
66
66
  [ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
67
67
  `)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
68
68
  `)&&(o=String(e).split(`
69
69
  `).map(function(e,t){return t===0?e:``+i+e}).join(`
70
- `)),a+=o+n[t+1]}),a}e.dedent=t})})();var ts=Object.defineProperty,Y=(e,t)=>ts(e,`name`,{value:t,configurable:!0});function ns(e){let t={"durable-object":{},worker:{}};if(e===void 0)return t;for(let[n,r]of Object.entries(e))t[r.type][n]=r;return t}Y(ns,`partitionExports`);var X=class extends Error{static{Y(this,`UserError`)}telemetryMessage;constructor(e,t){super(e,t),Object.setPrototypeOf(this,new.target.prototype),this.telemetryMessage=typeof t?.telemetryMessage==`string`?t.telemetryMessage:t?.telemetryMessage?e:void 0}};(class extends X{static{Y(this,`DeprecationError`)}constructor(e,t){super(`Deprecation:
71
- ${e}`,t)}});var rs=class extends X{static{Y(this,`FatalError`)}code;constructor(e,t){super(e,t),this.code=t.code}};(class extends X{static{Y(this,`CommandLineArgsError`)}});var is=class extends rs{static{Y(this,`JsonFriendlyFatalError`)}};(class extends Error{static{Y(this,`MissingConfigError`)}telemetryMessage;constructor(e){super(`Missing config value for ${e}`),this.telemetryMessage=`Missing config value for ${e}`}});function as(e,t,n){return t?new is(JSON.stringify(e),n):new rs(`${e}`,n)}Y(as,`createFatalError`);function os(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}Y(f,`scanHexDigits`);function p(e){r=e,i=``,a=0,o=16,d=0}Y(p,`setPosition`);function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&ls(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&ls(e.charCodeAt(r)))for(r++;r<e.length&&ls(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&ls(e.charCodeAt(r))){for(r++;r<e.length&&ls(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}Y(m,`scanNumber`);function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
72
- `;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(cs(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}Y(h,`scanString`);function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(ss(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(ss(t));return o=15}if(cs(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
73
- `),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!cs(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,cs(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!ls(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}Y(g,`scanNext`);function _(e){if(ss(e)||cs(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}Y(_,`isUnknownContentCharacter`);function v(){let e;do e=g();while(e>=12&&e<=15);return e}return Y(v,`scanNextNonTrivia`),{setPosition:p,getPosition:Y(()=>r,`getPosition`),scan:t?v:g,getToken:Y(()=>o,`getToken`),getTokenValue:Y(()=>i,`getTokenValue`),getTokenOffset:Y(()=>a,`getTokenOffset`),getTokenLength:Y(()=>r-a,`getTokenLength`),getTokenStartLine:Y(()=>c,`getTokenStartLine`),getTokenStartCharacter:Y(()=>a-u,`getTokenStartCharacter`),getTokenError:Y(()=>d,`getTokenError`)}}Y(os,`createScanner`);function ss(e){return e===32||e===9}Y(ss,`isWhiteSpace`);function cs(e){return e===10||e===13}Y(cs,`isLineBreak`);function ls(e){return e>=48&&e<=57}Y(ls,`isDigit`);var us;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(us||={});function ds(e,t,n){let r,i,a,o,s;if(t){for(o=t.offset,s=o+t.length,a=o;a>0&&!hs(e,a-1);)a--;let c=s;for(;c<e.length&&!hs(e,c);)c++;i=e.substring(a,c),r=ps(i,n)}else i=e,r=0,a=0,o=0,s=e.length;let c=ms(n,e),l=0,u=0,d;d=n.insertSpaces?fs(` `,n.tabSize||4):` `;let f=os(i,!1),p=!1;function m(){return l>1?fs(c,l)+fs(d,r+u):c+fs(d,r+u)}Y(m,`newLinesAndIndent`);function h(){let e=f.scan();for(l=0;e===15||e===14;)e===14&&n.keepLines?l+=1:e===14&&(l=1),e=f.scan();return p=e===16||f.getTokenError()!==0,e}Y(h,`scanNext`);let g=[];function _(n,r,i){!p&&(!t||r<s&&i>o)&&e.substring(r,i)!==n&&g.push({offset:r,length:i-r,content:n})}Y(_,`addEdit`);let v=h();if(n.keepLines&&l>0&&_(fs(c,l),0,0),v!==17){let e=f.getTokenOffset()+a;_(fs(d,r),a,e)}for(;v!==17;){let e=f.getTokenOffset()+f.getTokenLength()+a,t=h(),r=``,i=!1;for(;l===0&&(t===12||t===13);){let n=f.getTokenOffset()+a;_(` `,e,n),e=f.getTokenOffset()+f.getTokenLength()+a,i=t===12,r=i?m():``,t=h()}if(t===2)v!==1&&u--,n.keepLines&&l>0||!n.keepLines&&v!==1?r=m():n.keepLines&&(r=` `);else if(t===4)v!==3&&u--,n.keepLines&&l>0||!n.keepLines&&v!==3?r=m():n.keepLines&&(r=` `);else{switch(v){case 3:case 1:u++,r=n.keepLines&&l>0||!n.keepLines?m():` `;break;case 5:r=n.keepLines&&l>0||!n.keepLines?m():` `;break;case 12:r=m();break;case 13:l>0?r=m():i||(r=` `);break;case 6:n.keepLines&&l>0?r=m():i||(r=` `);break;case 10:n.keepLines&&l>0?r=m():t===6&&!i&&(r=``);break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&l>0?r=m():(t===12||t===13)&&!i?r=` `:t!==5&&t!==17&&(p=!0);break;case 16:p=!0;break}l>0&&(t===12||t===13)&&(r=m())}t===17&&(r=n.keepLines&&l>0?m():n.insertFinalNewline?c:``);let o=f.getTokenOffset()+a;_(r,e,o),v=t}return g}Y(ds,`format`);function fs(e,t){let n=``;for(let r=0;r<t;r++)n+=e;return n}Y(fs,`repeat`);function ps(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===` `)r++;else if(t===` `)r+=i;else break;n++}return Math.floor(r/i)}Y(ps,`computeIndentLevel`);function ms(e,t){for(let e=0;e<t.length;e++){let n=t.charAt(e);if(n===`\r`)return e+1<t.length&&t.charAt(e+1)===`
70
+ `)),a+=o+n[t+1]}),a}e.dedent=t})})();var gs=Object.defineProperty,Y=(e,t)=>gs(e,`name`,{value:t,configurable:!0});function _s(e){let t=e?.type;return t===`durable-object`||t===`worker`}Y(_s,`hasKnownExportType`);function vs(e){let t={"durable-object":{},worker:{}};if(e===void 0)return t;for(let[n,r]of Object.entries(e))_s(r)&&(t[r.type][n]=r);return t}Y(vs,`partitionExports`);function ys(e){return vs(e)[`durable-object`]}Y(ys,`getDurableObjectExports`);function bs(e){return Object.keys(ys(e)).length>0}Y(bs,`hasDurableObjectExports`);function xs(e){let t=new Map;for(let[n,r]of Object.entries(ys(e)))`container`in r&&typeof r.container==`string`&&!t.has(r.container)&&t.set(r.container,n);return t}Y(xs,`getContainerNameToClassNameMap`);function Ss(e,t){if(e.class_name!==void 0)return e.class_name;if(e.name!==void 0)return xs(t).get(e.name)}Y(Ss,`resolveContainerClassName`);function Cs(e,t){let n=new Set;for(let r of e??[]){let e=Ss(r,t);e!==void 0&&n.add(e)}return n}Y(Cs,`getContainerDurableObjectClassNames`);var X=class extends Error{static{Y(this,`UserError`)}telemetryMessage;constructor(e,t){super(e,t),Object.setPrototypeOf(this,new.target.prototype),this.telemetryMessage=typeof t?.telemetryMessage==`string`?t.telemetryMessage:t?.telemetryMessage?e:void 0}};(class extends X{static{Y(this,`DeprecationError`)}constructor(e,t){super(`Deprecation:
71
+ ${e}`,t)}});var ws=class extends X{static{Y(this,`FatalError`)}code;constructor(e,t){super(e,t),this.code=t.code}};(class extends X{static{Y(this,`CommandLineArgsError`)}});var Ts=class extends ws{static{Y(this,`JsonFriendlyFatalError`)}};(class extends Error{static{Y(this,`MissingConfigError`)}telemetryMessage;constructor(e){super(`Missing config value for ${e}`),this.telemetryMessage=`Missing config value for ${e}`}});function Es(e,t,n){return t?new Ts(JSON.stringify(e),n):new ws(`${e}`,n)}Y(Es,`createFatalError`);function Ds(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}Y(f,`scanHexDigits`);function p(e){r=e,i=``,a=0,o=16,d=0}Y(p,`setPosition`);function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&As(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&As(e.charCodeAt(r)))for(r++;r<e.length&&As(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&As(e.charCodeAt(r))){for(r++;r<e.length&&As(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}Y(m,`scanNumber`);function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
72
+ `;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(ks(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}Y(h,`scanString`);function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(Os(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(Os(t));return o=15}if(ks(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
73
+ `),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!ks(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,ks(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!As(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}Y(g,`scanNext`);function _(e){if(Os(e)||ks(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}Y(_,`isUnknownContentCharacter`);function v(){let e;do e=g();while(e>=12&&e<=15);return e}return Y(v,`scanNextNonTrivia`),{setPosition:p,getPosition:Y(()=>r,`getPosition`),scan:t?v:g,getToken:Y(()=>o,`getToken`),getTokenValue:Y(()=>i,`getTokenValue`),getTokenOffset:Y(()=>a,`getTokenOffset`),getTokenLength:Y(()=>r-a,`getTokenLength`),getTokenStartLine:Y(()=>c,`getTokenStartLine`),getTokenStartCharacter:Y(()=>a-u,`getTokenStartCharacter`),getTokenError:Y(()=>d,`getTokenError`)}}Y(Ds,`createScanner`);function Os(e){return e===32||e===9}Y(Os,`isWhiteSpace`);function ks(e){return e===10||e===13}Y(ks,`isLineBreak`);function As(e){return e>=48&&e<=57}Y(As,`isDigit`);var js;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(js||={});function Ms(e,t,n){let r,i,a,o,s;if(t){for(o=t.offset,s=o+t.length,a=o;a>0&&!Is(e,a-1);)a--;let c=s;for(;c<e.length&&!Is(e,c);)c++;i=e.substring(a,c),r=Ps(i,n)}else i=e,r=0,a=0,o=0,s=e.length;let c=Fs(n,e),l=0,u=0,d;d=n.insertSpaces?Ns(` `,n.tabSize||4):` `;let f=Ds(i,!1),p=!1;function m(){return l>1?Ns(c,l)+Ns(d,r+u):c+Ns(d,r+u)}Y(m,`newLinesAndIndent`);function h(){let e=f.scan();for(l=0;e===15||e===14;)e===14&&n.keepLines?l+=1:e===14&&(l=1),e=f.scan();return p=e===16||f.getTokenError()!==0,e}Y(h,`scanNext`);let g=[];function _(n,r,i){!p&&(!t||r<s&&i>o)&&e.substring(r,i)!==n&&g.push({offset:r,length:i-r,content:n})}Y(_,`addEdit`);let v=h();if(n.keepLines&&l>0&&_(Ns(c,l),0,0),v!==17){let e=f.getTokenOffset()+a;_(Ns(d,r),a,e)}for(;v!==17;){let e=f.getTokenOffset()+f.getTokenLength()+a,t=h(),r=``,i=!1;for(;l===0&&(t===12||t===13);){let n=f.getTokenOffset()+a;_(` `,e,n),e=f.getTokenOffset()+f.getTokenLength()+a,i=t===12,r=i?m():``,t=h()}if(t===2)v!==1&&u--,n.keepLines&&l>0||!n.keepLines&&v!==1?r=m():n.keepLines&&(r=` `);else if(t===4)v!==3&&u--,n.keepLines&&l>0||!n.keepLines&&v!==3?r=m():n.keepLines&&(r=` `);else{switch(v){case 3:case 1:u++,r=n.keepLines&&l>0||!n.keepLines?m():` `;break;case 5:r=n.keepLines&&l>0||!n.keepLines?m():` `;break;case 12:r=m();break;case 13:l>0?r=m():i||(r=` `);break;case 6:n.keepLines&&l>0?r=m():i||(r=` `);break;case 10:n.keepLines&&l>0?r=m():t===6&&!i&&(r=``);break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&l>0?r=m():(t===12||t===13)&&!i?r=` `:t!==5&&t!==17&&(p=!0);break;case 16:p=!0;break}l>0&&(t===12||t===13)&&(r=m())}t===17&&(r=n.keepLines&&l>0?m():n.insertFinalNewline?c:``);let o=f.getTokenOffset()+a;_(r,e,o),v=t}return g}Y(Ms,`format`);function Ns(e,t){let n=``;for(let r=0;r<t;r++)n+=e;return n}Y(Ns,`repeat`);function Ps(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===` `)r++;else if(t===` `)r+=i;else break;n++}return Math.floor(r/i)}Y(Ps,`computeIndentLevel`);function Fs(e,t){for(let e=0;e<t.length;e++){let n=t.charAt(e);if(n===`\r`)return e+1<t.length&&t.charAt(e+1)===`
74
74
  `?`\r
75
75
  `:`\r`;if(n===`
76
76
  `)return`
77
77
  `}return e&&e.eol||`
78
- `}Y(ms,`getEOL`);function hs(e,t){return`\r
79
- `.indexOf(e.charAt(t))!==-1}Y(hs,`isEOL`);var gs;(function(e){e.DEFAULT={allowTrailingComma:!1}})(gs||={});function _s(e,t=[],n=gs.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return Y(o,`onValue`),bs(e,{onObjectBegin:Y(()=>{let e={};o(e),a.push(i),i=e,r=null},`onObjectBegin`),onObjectProperty:Y(e=>{r=e},`onObjectProperty`),onObjectEnd:Y(()=>{i=a.pop()},`onObjectEnd`),onArrayBegin:Y(()=>{let e=[];o(e),a.push(i),i=e,r=null},`onArrayBegin`),onArrayEnd:Y(()=>{i=a.pop()},`onArrayEnd`),onLiteralValue:o,onError:Y((e,n,r)=>{t.push({error:e,offset:n,length:r})},`onError`)},n),i[0]}Y(_s,`parse`);function vs(e,t=[],n=gs.DEFAULT){let r={type:`array`,offset:-1,length:-1,children:[],parent:void 0};function i(e){r.type===`property`&&(r.length=e-r.offset,r=r.parent)}Y(i,`ensurePropertyComplete`);function a(e){return r.children.push(e),e}Y(a,`onValue`),bs(e,{onObjectBegin:Y(e=>{r=a({type:`object`,offset:e,length:-1,parent:r,children:[]})},`onObjectBegin`),onObjectProperty:Y((e,t,n)=>{r=a({type:`property`,offset:t,length:-1,parent:r,children:[]}),r.children.push({type:`string`,value:e,offset:t,length:n,parent:r})},`onObjectProperty`),onObjectEnd:Y((e,t)=>{i(e+t),r.length=e+t-r.offset,r=r.parent,i(e+t)},`onObjectEnd`),onArrayBegin:Y((e,t)=>{r=a({type:`array`,offset:e,length:-1,parent:r,children:[]})},`onArrayBegin`),onArrayEnd:Y((e,t)=>{r.length=e+t-r.offset,r=r.parent,i(e+t)},`onArrayEnd`),onLiteralValue:Y((e,t,n)=>{a({type:xs(e),offset:t,length:n,parent:r,value:e}),i(t+n)},`onLiteralValue`),onSeparator:Y((e,t,n)=>{r.type===`property`&&(e===`:`?r.colonOffset=t:e===`,`&&i(t))},`onSeparator`),onError:Y((e,n,r)=>{t.push({error:e,offset:n,length:r})},`onError`)},n);let o=r.children[0];return o&&delete o.parent,o}Y(vs,`parseTree`);function ys(e,t){if(!e)return;let n=e;for(let e of t)if(typeof e==`string`){if(n.type!==`object`||!Array.isArray(n.children))return;let t=!1;for(let r of n.children)if(Array.isArray(r.children)&&r.children[0].value===e&&r.children.length===2){n=r.children[1],t=!0;break}if(!t)return}else{let t=e;if(n.type!==`array`||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n}Y(ys,`findNodeAtLocation`);function bs(e,t,n=gs.DEFAULT){let r=os(e,!1),i=[];function a(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}Y(a,`toNoArgVisit`);function o(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}Y(o,`toNoArgVisitWithPath`);function s(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}Y(s,`toOneArgVisit`);function c(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}Y(c,`toOneArgVisitWithPath`);let l=o(t.onObjectBegin),u=c(t.onObjectProperty),d=a(t.onObjectEnd),f=o(t.onArrayBegin),p=a(t.onArrayEnd),m=c(t.onLiteralValue),h=s(t.onSeparator),g=a(t.onComment),_=s(t.onError),v=n&&n.disallowComments,y=n&&n.allowTrailingComma;function b(){for(;;){let e=r.scan();switch(r.getTokenError()){case 4:x(14);break;case 5:x(15);break;case 3:x(13);break;case 1:v||x(11);break;case 2:x(12);break;case 6:x(16);break}switch(e){case 12:case 13:v?x(10):g();break;case 16:x(1);break;case 15:case 14:break;default:return e}}}Y(b,`scanNext`);function x(e,t=[],n=[]){if(_(e),t.length+n.length>0){let e=r.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){b();break}else if(n.indexOf(e)!==-1)break;e=b()}}}Y(x,`handleError`);function S(e){let t=r.getTokenValue();return e?m(t):(u(t),i.push(t)),b(),!0}Y(S,`parseString`);function ee(){switch(r.getToken()){case 11:let e=r.getTokenValue(),t=Number(e);isNaN(t)&&(x(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return b(),!0}Y(ee,`parseLiteral`);function C(){return r.getToken()===10?(S(!1),r.getToken()===6?(h(`:`),b(),E()||x(4,[],[2,5])):x(5,[],[2,5]),i.pop(),!0):(x(3,[],[2,5]),!1)}Y(C,`parseProperty`);function w(){l(),b();let e=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(e||x(4,[],[]),h(`,`),b(),r.getToken()===2&&y)break}else e&&x(6,[],[]);C()||x(4,[],[2,5]),e=!0}return d(),r.getToken()===2?b():x(7,[2],[]),!0}Y(w,`parseObject`);function T(){f(),b();let e=!0,t=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(t||x(4,[],[]),h(`,`),b(),r.getToken()===4&&y)break}else t&&x(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,E()||x(4,[],[4,5]),t=!0}return p(),e||i.pop(),r.getToken()===4?b():x(8,[4],[]),!0}Y(T,`parseArray`);function E(){switch(r.getToken()){case 3:return T();case 1:return w();case 10:return S(!0);default:return ee()}}return Y(E,`parseValue`),b(),r.getToken()===17?n.allowEmptyContent?!0:(x(4,[],[]),!1):E()?(r.getToken()!==17&&x(9,[],[]),!0):(x(4,[],[]),!1)}Y(bs,`visit`);function xs(e){switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`string`:return`string`;case`object`:return e?Array.isArray(e)?`array`:`object`:`null`;default:return`null`}}Y(xs,`getNodeType`);function Ss(e,t,n,r){let i=t.slice(),a=vs(e,[]),o,s;for(;i.length>0&&(s=i.pop(),o=ys(a,i),o===void 0&&n!==void 0);)n=typeof s==`string`?{[s]:n}:[n];if(!o){if(n===void 0)throw Error(`Can not delete in empty document`);return Cs(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}else if(o.type===`object`&&typeof s==`string`&&Array.isArray(o.children)){let t=ys(o,[s]);if(t!==void 0)if(n===void 0){if(!t.parent)throw Error(`Malformed AST`);let n=o.children.indexOf(t.parent),i,a=t.parent.offset+t.parent.length;if(n>0){let e=o.children[n-1];i=e.offset+e.length}else i=o.offset+1,o.children.length>1&&(a=o.children[1].offset);return Cs(e,{offset:i,length:a-i,content:``},r)}else return Cs(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];let t=`${JSON.stringify(s)}: ${JSON.stringify(n)}`,i=r.getInsertionIndex?r.getInsertionIndex(o.children.map(e=>e.children[0].value)):o.children.length,a;if(i>0){let e=o.children[i-1];a={offset:e.offset+e.length,length:0,content:`,`+t}}else a=o.children.length===0?{offset:o.offset+1,length:0,content:t}:{offset:o.offset+1,length:0,content:t+`,`};return Cs(e,a,r)}}else if(o.type===`array`&&typeof s==`number`&&Array.isArray(o.children)){let t=s;if(t===-1){let t=`${JSON.stringify(n)}`,i;if(o.children.length===0)i={offset:o.offset+1,length:0,content:t};else{let e=o.children[o.children.length-1];i={offset:e.offset+e.length,length:0,content:`,`+t}}return Cs(e,i,r)}else if(n===void 0&&o.children.length>=0){let t=s,n=o.children[t],i;if(o.children.length===1)i={offset:o.offset+1,length:o.length-2,content:``};else if(o.children.length-1===t){let e=o.children[t-1],n=e.offset+e.length;i={offset:n,length:o.offset+o.length-2-n,content:``}}else i={offset:n.offset,length:o.children[t+1].offset-n.offset,content:``};return Cs(e,i,r)}else if(n!==void 0){let t,i=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>s){let e=o.children[s];t={offset:e.offset,length:e.length,content:i}}else if(o.children.length===0||s===0)t={offset:o.offset+1,length:0,content:o.children.length===0?i:i+`,`};else{let e=s>o.children.length?o.children.length:s,n=o.children[e-1];t={offset:n.offset+n.length,length:0,content:`,`+i}}return Cs(e,t,r)}else throw Error(`Can not ${n===void 0?`remove`:r.isArrayInsertion?`insert`:`modify`} Array index ${t} as length is not sufficient`)}else throw Error(`Can not add ${typeof s==`number`?`property`:`index`} to parent of type ${o.type}`)}Y(Ss,`setProperty`);function Cs(e,t,n){if(!n.formattingOptions)return[t];let r=ws(e,t),i=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!hs(r,i-1);)i--;for(;a<r.length&&!hs(r,a);)a++}let o=ds(r,{offset:i,length:a-i},{...n.formattingOptions,keepLines:!1});for(let e=o.length-1;e>=0;e--){let t=o[e];r=ws(r,t),i=Math.min(i,t.offset),a=Math.max(a,t.offset+t.length),a+=t.content.length-t.length}let s=e.length-(r.length-a)-i;return[{offset:i,length:s,content:r.substring(i,a)}]}Y(Cs,`withFormatting`);function ws(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}Y(ws,`applyEdit`);var Ts;(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(Ts||={});var Es;(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(Es||={});var Ds=_s,Os;(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(Os||={});function ks(e){switch(e){case 1:return`InvalidSymbol`;case 2:return`InvalidNumberFormat`;case 3:return`PropertyNameExpected`;case 4:return`ValueExpected`;case 5:return`ColonExpected`;case 6:return`CommaExpected`;case 7:return`CloseBraceExpected`;case 8:return`CloseBracketExpected`;case 9:return`EndOfFileExpected`;case 10:return`InvalidCommentToken`;case 11:return`UnexpectedEndOfComment`;case 12:return`UnexpectedEndOfString`;case 13:return`UnexpectedEndOfNumber`;case 14:return`InvalidUnicode`;case 15:return`InvalidEscapeCharacter`;case 16:return`InvalidCharacter`}return`<unknown ParseErrorCode>`}Y(ks,`printParseErrorCode`);function As(e,t,n){return ds(e,t,n)}Y(As,`format`);function js(e,t,n,r){return Ss(e,t,n,r)}Y(js,`modify`);function Ms(e,t){let n=t.slice(0).sort((e,t)=>{let n=e.offset-t.offset;return n===0?e.length-t.length:n}),r=e.length;for(let t=n.length-1;t>=0;t--){let i=n[t];if(i.offset+i.length<=r)e=ws(e,i);else throw Error(`Overlapping edit`);r=i.offset}return e}Y(Ms,`applyEdits`);function Ns(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}Y(Ns,`getLineColFromPtr`);function Ps(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
78
+ `}Y(Fs,`getEOL`);function Is(e,t){return`\r
79
+ `.indexOf(e.charAt(t))!==-1}Y(Is,`isEOL`);var Ls;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Ls||={});function Rs(e,t=[],n=Ls.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return Y(o,`onValue`),Vs(e,{onObjectBegin:Y(()=>{let e={};o(e),a.push(i),i=e,r=null},`onObjectBegin`),onObjectProperty:Y(e=>{r=e},`onObjectProperty`),onObjectEnd:Y(()=>{i=a.pop()},`onObjectEnd`),onArrayBegin:Y(()=>{let e=[];o(e),a.push(i),i=e,r=null},`onArrayBegin`),onArrayEnd:Y(()=>{i=a.pop()},`onArrayEnd`),onLiteralValue:o,onError:Y((e,n,r)=>{t.push({error:e,offset:n,length:r})},`onError`)},n),i[0]}Y(Rs,`parse`);function zs(e,t=[],n=Ls.DEFAULT){let r={type:`array`,offset:-1,length:-1,children:[],parent:void 0};function i(e){r.type===`property`&&(r.length=e-r.offset,r=r.parent)}Y(i,`ensurePropertyComplete`);function a(e){return r.children.push(e),e}Y(a,`onValue`),Vs(e,{onObjectBegin:Y(e=>{r=a({type:`object`,offset:e,length:-1,parent:r,children:[]})},`onObjectBegin`),onObjectProperty:Y((e,t,n)=>{r=a({type:`property`,offset:t,length:-1,parent:r,children:[]}),r.children.push({type:`string`,value:e,offset:t,length:n,parent:r})},`onObjectProperty`),onObjectEnd:Y((e,t)=>{i(e+t),r.length=e+t-r.offset,r=r.parent,i(e+t)},`onObjectEnd`),onArrayBegin:Y((e,t)=>{r=a({type:`array`,offset:e,length:-1,parent:r,children:[]})},`onArrayBegin`),onArrayEnd:Y((e,t)=>{r.length=e+t-r.offset,r=r.parent,i(e+t)},`onArrayEnd`),onLiteralValue:Y((e,t,n)=>{a({type:Hs(e),offset:t,length:n,parent:r,value:e}),i(t+n)},`onLiteralValue`),onSeparator:Y((e,t,n)=>{r.type===`property`&&(e===`:`?r.colonOffset=t:e===`,`&&i(t))},`onSeparator`),onError:Y((e,n,r)=>{t.push({error:e,offset:n,length:r})},`onError`)},n);let o=r.children[0];return o&&delete o.parent,o}Y(zs,`parseTree`);function Bs(e,t){if(!e)return;let n=e;for(let e of t)if(typeof e==`string`){if(n.type!==`object`||!Array.isArray(n.children))return;let t=!1;for(let r of n.children)if(Array.isArray(r.children)&&r.children[0].value===e&&r.children.length===2){n=r.children[1],t=!0;break}if(!t)return}else{let t=e;if(n.type!==`array`||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n}Y(Bs,`findNodeAtLocation`);function Vs(e,t,n=Ls.DEFAULT){let r=Ds(e,!1),i=[];function a(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}Y(a,`toNoArgVisit`);function o(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}Y(o,`toNoArgVisitWithPath`);function s(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}Y(s,`toOneArgVisit`);function c(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}Y(c,`toOneArgVisitWithPath`);let l=o(t.onObjectBegin),u=c(t.onObjectProperty),d=a(t.onObjectEnd),f=o(t.onArrayBegin),p=a(t.onArrayEnd),m=c(t.onLiteralValue),h=s(t.onSeparator),g=a(t.onComment),_=s(t.onError),v=n&&n.disallowComments,y=n&&n.allowTrailingComma;function b(){for(;;){let e=r.scan();switch(r.getTokenError()){case 4:x(14);break;case 5:x(15);break;case 3:x(13);break;case 1:v||x(11);break;case 2:x(12);break;case 6:x(16);break}switch(e){case 12:case 13:v?x(10):g();break;case 16:x(1);break;case 15:case 14:break;default:return e}}}Y(b,`scanNext`);function x(e,t=[],n=[]){if(_(e),t.length+n.length>0){let e=r.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){b();break}else if(n.indexOf(e)!==-1)break;e=b()}}}Y(x,`handleError`);function S(e){let t=r.getTokenValue();return e?m(t):(u(t),i.push(t)),b(),!0}Y(S,`parseString`);function ee(){switch(r.getToken()){case 11:let e=r.getTokenValue(),t=Number(e);isNaN(t)&&(x(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return b(),!0}Y(ee,`parseLiteral`);function C(){return r.getToken()===10?(S(!1),r.getToken()===6?(h(`:`),b(),E()||x(4,[],[2,5])):x(5,[],[2,5]),i.pop(),!0):(x(3,[],[2,5]),!1)}Y(C,`parseProperty`);function w(){l(),b();let e=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(e||x(4,[],[]),h(`,`),b(),r.getToken()===2&&y)break}else e&&x(6,[],[]);C()||x(4,[],[2,5]),e=!0}return d(),r.getToken()===2?b():x(7,[2],[]),!0}Y(w,`parseObject`);function T(){f(),b();let e=!0,t=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(t||x(4,[],[]),h(`,`),b(),r.getToken()===4&&y)break}else t&&x(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,E()||x(4,[],[4,5]),t=!0}return p(),e||i.pop(),r.getToken()===4?b():x(8,[4],[]),!0}Y(T,`parseArray`);function E(){switch(r.getToken()){case 3:return T();case 1:return w();case 10:return S(!0);default:return ee()}}return Y(E,`parseValue`),b(),r.getToken()===17?n.allowEmptyContent?!0:(x(4,[],[]),!1):E()?(r.getToken()!==17&&x(9,[],[]),!0):(x(4,[],[]),!1)}Y(Vs,`visit`);function Hs(e){switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`string`:return`string`;case`object`:return e?Array.isArray(e)?`array`:`object`:`null`;default:return`null`}}Y(Hs,`getNodeType`);function Us(e,t,n,r){let i=t.slice(),a=zs(e,[]),o,s;for(;i.length>0&&(s=i.pop(),o=Bs(a,i),o===void 0&&n!==void 0);)n=typeof s==`string`?{[s]:n}:[n];if(!o){if(n===void 0)throw Error(`Can not delete in empty document`);return Ws(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}else if(o.type===`object`&&typeof s==`string`&&Array.isArray(o.children)){let t=Bs(o,[s]);if(t!==void 0)if(n===void 0){if(!t.parent)throw Error(`Malformed AST`);let n=o.children.indexOf(t.parent),i,a=t.parent.offset+t.parent.length;if(n>0){let e=o.children[n-1];i=e.offset+e.length}else i=o.offset+1,o.children.length>1&&(a=o.children[1].offset);return Ws(e,{offset:i,length:a-i,content:``},r)}else return Ws(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];let t=`${JSON.stringify(s)}: ${JSON.stringify(n)}`,i=r.getInsertionIndex?r.getInsertionIndex(o.children.map(e=>e.children[0].value)):o.children.length,a;if(i>0){let e=o.children[i-1];a={offset:e.offset+e.length,length:0,content:`,`+t}}else a=o.children.length===0?{offset:o.offset+1,length:0,content:t}:{offset:o.offset+1,length:0,content:t+`,`};return Ws(e,a,r)}}else if(o.type===`array`&&typeof s==`number`&&Array.isArray(o.children)){let t=s;if(t===-1){let t=`${JSON.stringify(n)}`,i;if(o.children.length===0)i={offset:o.offset+1,length:0,content:t};else{let e=o.children[o.children.length-1];i={offset:e.offset+e.length,length:0,content:`,`+t}}return Ws(e,i,r)}else if(n===void 0&&o.children.length>=0){let t=s,n=o.children[t],i;if(o.children.length===1)i={offset:o.offset+1,length:o.length-2,content:``};else if(o.children.length-1===t){let e=o.children[t-1],n=e.offset+e.length;i={offset:n,length:o.offset+o.length-2-n,content:``}}else i={offset:n.offset,length:o.children[t+1].offset-n.offset,content:``};return Ws(e,i,r)}else if(n!==void 0){let t,i=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>s){let e=o.children[s];t={offset:e.offset,length:e.length,content:i}}else if(o.children.length===0||s===0)t={offset:o.offset+1,length:0,content:o.children.length===0?i:i+`,`};else{let e=s>o.children.length?o.children.length:s,n=o.children[e-1];t={offset:n.offset+n.length,length:0,content:`,`+i}}return Ws(e,t,r)}else throw Error(`Can not ${n===void 0?`remove`:r.isArrayInsertion?`insert`:`modify`} Array index ${t} as length is not sufficient`)}else throw Error(`Can not add ${typeof s==`number`?`property`:`index`} to parent of type ${o.type}`)}Y(Us,`setProperty`);function Ws(e,t,n){if(!n.formattingOptions)return[t];let r=Gs(e,t),i=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!Is(r,i-1);)i--;for(;a<r.length&&!Is(r,a);)a++}let o=Ms(r,{offset:i,length:a-i},{...n.formattingOptions,keepLines:!1});for(let e=o.length-1;e>=0;e--){let t=o[e];r=Gs(r,t),i=Math.min(i,t.offset),a=Math.max(a,t.offset+t.length),a+=t.content.length-t.length}let s=e.length-(r.length-a)-i;return[{offset:i,length:s,content:r.substring(i,a)}]}Y(Ws,`withFormatting`);function Gs(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}Y(Gs,`applyEdit`);var Ks;(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(Ks||={});var qs;(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(qs||={});var Js=Rs,Ys;(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(Ys||={});function Xs(e){switch(e){case 1:return`InvalidSymbol`;case 2:return`InvalidNumberFormat`;case 3:return`PropertyNameExpected`;case 4:return`ValueExpected`;case 5:return`ColonExpected`;case 6:return`CommaExpected`;case 7:return`CloseBraceExpected`;case 8:return`CloseBracketExpected`;case 9:return`EndOfFileExpected`;case 10:return`InvalidCommentToken`;case 11:return`UnexpectedEndOfComment`;case 12:return`UnexpectedEndOfString`;case 13:return`UnexpectedEndOfNumber`;case 14:return`InvalidUnicode`;case 15:return`InvalidEscapeCharacter`;case 16:return`InvalidCharacter`}return`<unknown ParseErrorCode>`}Y(Xs,`printParseErrorCode`);function Zs(e,t,n){return Ms(e,t,n)}Y(Zs,`format`);function Qs(e,t,n,r){return Us(e,t,n,r)}Y(Qs,`modify`);function $s(e,t){let n=t.slice(0).sort((e,t)=>{let n=e.offset-t.offset;return n===0?e.length-t.length:n}),r=e.length;for(let t=n.length-1;t>=0;t--){let i=n[t];if(i.offset+i.length<=r)e=Gs(e,i);else throw Error(`Overlapping edit`);r=i.offset}return e}Y($s,`applyEdits`);function ec(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}Y(ec,`getLineColFromPtr`);function tc(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
80
80
  `,e===t&&(i+=` `.repeat(a+n+2),i+=`^
81
- `))}return i}Y(Ps,`makeCodeBlock`);var Z=class extends Error{static{Y(this,`TomlError`)}line;column;codeblock;constructor(e,t){let[n,r]=Ns(t.toml,t.ptr),i=Ps(t.toml,n,r);super(`Invalid TOML document: ${e}
81
+ `))}return i}Y(tc,`makeCodeBlock`);var Z=class extends Error{static{Y(this,`TomlError`)}line;column;codeblock;constructor(e,t){let[n,r]=ec(t.toml,t.ptr),i=tc(t.toml,n,r);super(`Invalid TOML document: ${e}
82
82
 
83
- ${i}`,t),this.line=n,this.column=r,this.codeblock=i}};function Fs(e,t){let n=0;for(;e[t-++n]===`\\`;);return--n&&n%2}Y(Fs,`isEscaped`);function Is(e,t=0,n=e.length){let r=e.indexOf(`
84
- `,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}Y(Is,`indexOfNewline`);function Ls(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
83
+ ${i}`,t),this.line=n,this.column=r,this.codeblock=i}};function nc(e,t){let n=0;for(;e[t-++n]===`\\`;);return--n&&n%2}Y(nc,`isEscaped`);function rc(e,t=0,n=e.length){let r=e.indexOf(`
84
+ `,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}Y(rc,`indexOfNewline`);function ic(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
85
85
  `)return n;if(r===`\r`&&e[n+1]===`
86
- `)return n+1;if(r<` `&&r!==` `||r===``)throw new Z(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}Y(Ls,`skipComment`);function Q(e,t,n,r){let i;for(;(i=e[t])===` `||i===` `||!n&&(i===`
86
+ `)return n+1;if(r<` `&&r!==` `||r===``)throw new Z(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}Y(ic,`skipComment`);function Q(e,t,n,r){let i;for(;(i=e[t])===` `||i===` `||!n&&(i===`
87
87
  `||i===`\r`&&e[t+1]===`
88
- `);)t++;return r||i!==`#`?t:Q(e,Ls(e,t),n)}Y(Q,`skipVoid`);function Rs(e,t,n,r,i=!1){if(!r)return t=Is(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=Is(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
88
+ `);)t++;return r||i!==`#`?t:Q(e,ic(e,t),n)}Y(Q,`skipVoid`);function ac(e,t,n,r,i=!1){if(!r)return t=rc(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=rc(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
89
89
  `||t===`\r`&&e[a+1]===`
90
- `))return a}throw new Z(`cannot find end of structure`,{toml:e,ptr:t})}Y(Rs,`skipUntil`);function zs(e,t){let n=e[t],r=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=r.length-1;do t=e.indexOf(r,++t);while(t>-1&&n!==`'`&&Fs(e,t));return t>-1&&(t+=r.length,r.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}Y(zs,`getStringEnd`);var Bs=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i,Vs=class e extends Date{static{Y(this,`TomlDate`)}#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(Bs);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}},Hs=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,Us=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Ws=/^[+-]?0[0-9_]/,Gs=/^[0-9a-f]{4,8}$/i,Ks={b:`\b`,t:` `,n:`
91
- `,f:`\f`,r:`\r`,'"':`"`,"\\":`\\`};function qs(e,t=0,n=e.length){let r=e[t]===`'`,i=e[t++]===e[t]&&e[t]===e[t+1];i&&(n-=2,e[t+=2]===`\r`&&t++,e[t]===`
90
+ `))return a}throw new Z(`cannot find end of structure`,{toml:e,ptr:t})}Y(ac,`skipUntil`);function oc(e,t){let n=e[t],r=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=r.length-1;do t=e.indexOf(r,++t);while(t>-1&&n!==`'`&&nc(e,t));return t>-1&&(t+=r.length,r.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}Y(oc,`getStringEnd`);var sc=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i,cc=class e extends Date{static{Y(this,`TomlDate`)}#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(sc);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}},lc=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,uc=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,dc=/^[+-]?0[0-9_]/,fc=/^[0-9a-f]{4,8}$/i,pc={b:`\b`,t:` `,n:`
91
+ `,f:`\f`,r:`\r`,'"':`"`,"\\":`\\`};function mc(e,t=0,n=e.length){let r=e[t]===`'`,i=e[t++]===e[t]&&e[t]===e[t+1];i&&(n-=2,e[t+=2]===`\r`&&t++,e[t]===`
92
92
  `&&t++);let a=0,o,s=``,c=t;for(;t<n-1;){let n=e[t++];if(n===`
93
93
  `||n===`\r`&&e[t]===`
94
- `){if(!i)throw new Z(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(n<` `&&n!==` `||n===``)throw new Z(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(o){if(o=!1,n===`u`||n===`U`){let r=e.slice(t,t+=n===`u`?4:8);if(!Gs.test(r))throw new Z(`invalid unicode escape`,{toml:e,ptr:a});try{s+=String.fromCodePoint(parseInt(r,16))}catch{throw new Z(`invalid unicode escape`,{toml:e,ptr:a})}}else if(i&&(n===`
94
+ `){if(!i)throw new Z(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(n<` `&&n!==` `||n===``)throw new Z(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(o){if(o=!1,n===`u`||n===`U`){let r=e.slice(t,t+=n===`u`?4:8);if(!fc.test(r))throw new Z(`invalid unicode escape`,{toml:e,ptr:a});try{s+=String.fromCodePoint(parseInt(r,16))}catch{throw new Z(`invalid unicode escape`,{toml:e,ptr:a})}}else if(i&&(n===`
95
95
  `||n===` `||n===` `||n===`\r`)){if(t=Q(e,t-1,!0),e[t]!==`
96
- `&&e[t]!==`\r`)throw new Z(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:a});t=Q(e,t)}else if(n in Ks)s+=Ks[n];else throw new Z(`unrecognized escape sequence`,{toml:e,ptr:a});c=t}else !r&&n===`\\`&&(a=t-1,o=!0,s+=e.slice(c,a))}return s+e.slice(c,n-1)}Y(qs,`parseString`);function Js(e,t,n,r){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return r?0n:0;let i=Hs.test(e);if(i||Us.test(e)){if(Ws.test(e))throw new Z(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new Z(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new Z(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new Vs(e);if(!a.isValid())throw new Z(`invalid value`,{toml:t,ptr:n});return a}Y(Js,`parseValue`);function Ys(e,t,n,r){let i=e.slice(t,n),a=i.indexOf(`#`);a>-1&&(Ls(e,a),i=i.slice(0,a));let o=i.trimEnd();if(!r){let n=i.indexOf(`
97
- `,o.length);if(n>-1)throw new Z(`newlines are not allowed in inline tables`,{toml:e,ptr:t+n})}return[o,a]}Y(Ys,`sliceAndTrimEndOf`);function Xs(e,t,n,r,i){if(r===0)throw new Z(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?ec(e,t,r,i):$s(e,t,r,i),c=n?Rs(e,s,`,`,n):s;if(s-c&&n===`}`){let t=Is(e,s,c);if(t>-1)throw new Z(`newlines are not allowed in inline tables`,{toml:e,ptr:t})}return[o,c]}let o;if(a===`"`||a===`'`){o=zs(e,t);let r=qs(e,t,o);if(n){if(o=Q(e,o,n!==`]`),e[o]&&e[o]!==`,`&&e[o]!==n&&e[o]!==`
98
- `&&e[o]!==`\r`)throw new Z(`unexpected character encountered`,{toml:e,ptr:o});o+=+(e[o]===`,`)}return[r,o]}o=Rs(e,t,`,`,n);let s=Ys(e,t,o-+(e[o-1]===`,`),n===`]`);if(!s[0])throw new Z(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=Q(e,t+s[1]),o+=+(e[o]===`,`)),[Js(s[0],e,t,i),o]}Y(Xs,`extractValue`);var Zs=/^[a-zA-Z0-9-_]+[ \t]*$/;function Qs(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new Z(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++r];if(o!==` `&&o!==` `)if(o===`"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new Z(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let s=zs(e,t);if(s<0)throw new Z(`unfinished string encountered`,{toml:e,ptr:t});r=e.indexOf(`.`,s);let c=e.slice(s,r<0||r>a?a:r),l=Is(c);if(l>-1)throw new Z(`newlines are not allowed in keys`,{toml:e,ptr:t+r+l});if(c.trimStart())throw new Z(`found extra tokens after the string part`,{toml:e,ptr:s});if(a<s&&(a=e.indexOf(n,s),a<0))throw new Z(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});i.push(qs(e,t,s))}else{r=e.indexOf(`.`,t);let n=e.slice(t,r<0||r>a?a:r);if(!Zs.test(n))throw new Z(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});i.push(n.trimEnd())}}while(r+1&&r<a);return[i,Q(e,a+1,!0,!0)]}Y(Qs,`parseKey`);function $s(e,t,n,r){let i={},a=new Set,o,s=0;for(t++;(o=e[t++])!==`}`&&o;){let c={toml:e,ptr:t-1};if(o===`
99
- `)throw new Z(`newlines are not allowed in inline tables`,c);if(o===`#`)throw new Z(`inline tables cannot contain comments`,c);if(o===`,`)throw new Z(`expected key-value, found comma`,c);if(o!==` `&&o!==` `){let o,c=i,l=!1,[u,d]=Qs(e,t-1);for(let n=0;n<u.length;n++){if(n&&(c=l?c[o]:c[o]={}),o=u[n],(l=Object.hasOwn(c,o))&&(typeof c[o]!=`object`||a.has(c[o])))throw new Z(`trying to redefine an already defined value`,{toml:e,ptr:t});!l&&o===`__proto__`&&Object.defineProperty(c,o,{enumerable:!0,configurable:!0,writable:!0})}if(l)throw new Z(`trying to redefine an already defined value`,{toml:e,ptr:t});let[f,p]=Xs(e,d,`}`,n-1,r);a.add(f),c[o]=f,t=p,s=e[t-1]===`,`?t-1:0}}if(s)throw new Z(`trailing commas are not allowed in inline tables`,{toml:e,ptr:s});if(!o)throw new Z(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}Y($s,`parseInlineTable`);function ec(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new Z(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=Ls(e,t);else if(a!==` `&&a!==` `&&a!==`
100
- `&&a!==`\r`){let a=Xs(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new Z(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}Y(ec,`parseArray`);function tc(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}Y(tc,`peekTable`);function nc(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=Q(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=Qs(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new Z(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=tc(n[0],r,i,t?2:1);if(!c)throw new Z(`trying to redefine an already defined table or value`,{toml:e,ptr:s});o=c[2],a=c[1],s=n[1]}else{let r=Qs(e,s),i=tc(r[0],a,o,0);if(!i)throw new Z(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=Xs(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=Q(e,s,!0),e[s]&&e[s]!==`
101
- `&&e[s]!==`\r`)throw new Z(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=Q(e,s)}return r}Y(nc,`parse`);var rc=/^[a-z0-9-_]+$/i;function ic(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}Y(ic,`extendedTypeOf`);function ac(e){for(let t=0;t<e.length;t++)if(ic(e[t])!==`object`)return!1;return e.length!=0}Y(ac,`isArrayOfTables`);function oc(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}Y(oc,`formatString`);function sc(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);if(t===`number`)return isNaN(e)?`nan`:e===1/0?`inf`:e===-1/0?`-inf`:r&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t===`bigint`||t===`boolean`)return e.toString();if(t===`string`)return oc(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return cc(e,n,r);if(t===`array`)return lc(e,n,r)}Y(sc,`stringifyValue`);function cc(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=rc.test(o)?o:oc(o),i+=` = `,i+=sc(e[o],ic(e[o]),t-1,n)}return i+` }`}Y(cc,`stringifyInlineTable`);function lc(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=sc(e[i],ic(e[i]),t-1,n)}return r+` ]`}Y(lc,`stringifyArray`);function uc(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`
96
+ `&&e[t]!==`\r`)throw new Z(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:a});t=Q(e,t)}else if(n in pc)s+=pc[n];else throw new Z(`unrecognized escape sequence`,{toml:e,ptr:a});c=t}else !r&&n===`\\`&&(a=t-1,o=!0,s+=e.slice(c,a))}return s+e.slice(c,n-1)}Y(mc,`parseString`);function hc(e,t,n,r){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return r?0n:0;let i=lc.test(e);if(i||uc.test(e)){if(dc.test(e))throw new Z(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new Z(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new Z(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new cc(e);if(!a.isValid())throw new Z(`invalid value`,{toml:t,ptr:n});return a}Y(hc,`parseValue`);function gc(e,t,n,r){let i=e.slice(t,n),a=i.indexOf(`#`);a>-1&&(ic(e,a),i=i.slice(0,a));let o=i.trimEnd();if(!r){let n=i.indexOf(`
97
+ `,o.length);if(n>-1)throw new Z(`newlines are not allowed in inline tables`,{toml:e,ptr:t+n})}return[o,a]}Y(gc,`sliceAndTrimEndOf`);function _c(e,t,n,r,i){if(r===0)throw new Z(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?xc(e,t,r,i):bc(e,t,r,i),c=n?ac(e,s,`,`,n):s;if(s-c&&n===`}`){let t=rc(e,s,c);if(t>-1)throw new Z(`newlines are not allowed in inline tables`,{toml:e,ptr:t})}return[o,c]}let o;if(a===`"`||a===`'`){o=oc(e,t);let r=mc(e,t,o);if(n){if(o=Q(e,o,n!==`]`),e[o]&&e[o]!==`,`&&e[o]!==n&&e[o]!==`
98
+ `&&e[o]!==`\r`)throw new Z(`unexpected character encountered`,{toml:e,ptr:o});o+=+(e[o]===`,`)}return[r,o]}o=ac(e,t,`,`,n);let s=gc(e,t,o-+(e[o-1]===`,`),n===`]`);if(!s[0])throw new Z(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=Q(e,t+s[1]),o+=+(e[o]===`,`)),[hc(s[0],e,t,i),o]}Y(_c,`extractValue`);var vc=/^[a-zA-Z0-9-_]+[ \t]*$/;function yc(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new Z(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++r];if(o!==` `&&o!==` `)if(o===`"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new Z(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let s=oc(e,t);if(s<0)throw new Z(`unfinished string encountered`,{toml:e,ptr:t});r=e.indexOf(`.`,s);let c=e.slice(s,r<0||r>a?a:r),l=rc(c);if(l>-1)throw new Z(`newlines are not allowed in keys`,{toml:e,ptr:t+r+l});if(c.trimStart())throw new Z(`found extra tokens after the string part`,{toml:e,ptr:s});if(a<s&&(a=e.indexOf(n,s),a<0))throw new Z(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});i.push(mc(e,t,s))}else{r=e.indexOf(`.`,t);let n=e.slice(t,r<0||r>a?a:r);if(!vc.test(n))throw new Z(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});i.push(n.trimEnd())}}while(r+1&&r<a);return[i,Q(e,a+1,!0,!0)]}Y(yc,`parseKey`);function bc(e,t,n,r){let i={},a=new Set,o,s=0;for(t++;(o=e[t++])!==`}`&&o;){let c={toml:e,ptr:t-1};if(o===`
99
+ `)throw new Z(`newlines are not allowed in inline tables`,c);if(o===`#`)throw new Z(`inline tables cannot contain comments`,c);if(o===`,`)throw new Z(`expected key-value, found comma`,c);if(o!==` `&&o!==` `){let o,c=i,l=!1,[u,d]=yc(e,t-1);for(let n=0;n<u.length;n++){if(n&&(c=l?c[o]:c[o]={}),o=u[n],(l=Object.hasOwn(c,o))&&(typeof c[o]!=`object`||a.has(c[o])))throw new Z(`trying to redefine an already defined value`,{toml:e,ptr:t});!l&&o===`__proto__`&&Object.defineProperty(c,o,{enumerable:!0,configurable:!0,writable:!0})}if(l)throw new Z(`trying to redefine an already defined value`,{toml:e,ptr:t});let[f,p]=_c(e,d,`}`,n-1,r);a.add(f),c[o]=f,t=p,s=e[t-1]===`,`?t-1:0}}if(s)throw new Z(`trailing commas are not allowed in inline tables`,{toml:e,ptr:s});if(!o)throw new Z(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}Y(bc,`parseInlineTable`);function xc(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new Z(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=ic(e,t);else if(a!==` `&&a!==` `&&a!==`
100
+ `&&a!==`\r`){let a=_c(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new Z(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}Y(xc,`parseArray`);function Sc(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}Y(Sc,`peekTable`);function Cc(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=Q(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=yc(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new Z(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=Sc(n[0],r,i,t?2:1);if(!c)throw new Z(`trying to redefine an already defined table or value`,{toml:e,ptr:s});o=c[2],a=c[1],s=n[1]}else{let r=yc(e,s),i=Sc(r[0],a,o,0);if(!i)throw new Z(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=_c(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=Q(e,s,!0),e[s]&&e[s]!==`
101
+ `&&e[s]!==`\r`)throw new Z(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=Q(e,s)}return r}Y(Cc,`parse`);var wc=/^[a-z0-9-_]+$/i;function Tc(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}Y(Tc,`extendedTypeOf`);function Ec(e){for(let t=0;t<e.length;t++)if(Tc(e[t])!==`object`)return!1;return e.length!=0}Y(Ec,`isArrayOfTables`);function Dc(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}Y(Dc,`formatString`);function Oc(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);if(t===`number`)return isNaN(e)?`nan`:e===1/0?`inf`:e===-1/0?`-inf`:r&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t===`bigint`||t===`boolean`)return e.toString();if(t===`string`)return Dc(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return kc(e,n,r);if(t===`array`)return Ac(e,n,r)}Y(Oc,`stringifyValue`);function kc(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=wc.test(o)?o:Dc(o),i+=` = `,i+=Oc(e[o],Tc(e[o]),t-1,n)}return i+` }`}Y(kc,`stringifyInlineTable`);function Ac(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=Oc(e[i],Tc(e[i]),t-1,n)}return r+` ]`}Y(Ac,`stringifyArray`);function jc(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`
102
102
  `}[[${t}]]
103
- `,i+=dc(0,e[a],t,n,r);return i}Y(uc,`stringifyArrayTable`);function dc(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=ic(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=rc.test(c)?c:oc(c);if(e===`array`&&ac(t[c]))o+=(o&&`
104
- `)+uc(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
105
- `)+dc(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=sc(t[c],e,r,i),a+=`
103
+ `,i+=Mc(0,e[a],t,n,r);return i}Y(jc,`stringifyArrayTable`);function Mc(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=Tc(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=wc.test(c)?c:Dc(c);if(e===`array`&&Ec(t[c]))o+=(o&&`
104
+ `)+jc(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
105
+ `)+Mc(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=Oc(t[c],e,r,i),a+=`
106
106
  `}}return e&&(a||!o)&&(a=a?`[${e}]
107
107
  ${a}`:`[${e}]`),a&&o?`${a}
108
- ${o}`:a||o}Y(dc,`stringifyTable`);function fc(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(ic(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=dc(0,e,``,t,n);return r[r.length-1]===`
108
+ ${o}`:a||o}Y(Mc,`stringifyTable`);function Nc(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(Tc(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=Mc(0,e,``,t,n);return r[r.length-1]===`
109
109
  `?r:r+`
110
- `}Y(fc,`stringify`);var pc={parse:nc,stringify:fc,TomlDate:Vs,TomlError:Z},mc=class extends X{static{Y(this,`ParseError`)}text;notes;location;kind;constructor({text:e,notes:t,location:n,kind:r,telemetryMessage:i}){super(e,{telemetryMessage:i}),this.name=this.constructor.name,this.text=e,this.notes=t??[],this.location=n,this.kind=r??`error`}};(class extends mc{static{Y(this,`APIError`)}#e;code;accountTag;meta;retryAfterMs;constructor({status:e,retryAfterMs:t,...n}){super(n),this.name=this.constructor.name,this.#e=e,this.retryAfterMs=t}get status(){return this.#e}isGatewayError(){return this.#e===void 0?!1:[524].includes(this.#e)}isRetryable(){return String(this.#e).startsWith(`5`)}#t=!0;get reportable(){return this.#t}preventReport(){this.#t=!1}});function hc(e,t){try{return pc.parse(e)}catch(n){if(!(n instanceof Z))throw n;let r={lineText:e.split(`
111
- `)[n.line-1],line:n.line,column:n.column-1,file:t,fileText:e};throw new mc({text:n.message.substring(0,n.message.indexOf(`
112
- `)),location:r,telemetryMessage:`TOML parse error`})}}Y(hc,`parseTOML`);function gc(e,t){return _c(e,t)}Y(gc,`parsePackageJSON`);function _c(e,t){return vc(e,t,{allowEmptyContent:!1,allowTrailingComma:!1,disallowComments:!0})}Y(_c,`parseJSON`);function vc(e,t,n={allowTrailingComma:!0}){let r=[],i=Ds(e,r,n);if(r.length)throw new mc({text:ks(r[0].error),location:{...xc({file:t,fileText:e},r[0].offset+1),length:r[0].length},telemetryMessage:`JSON(C) parse error`});return i}Y(vc,`parseJSONC`);function yc(e){try{return r(e)}catch(t){let{message:n}=t;throw new mc({text:`Could not read file: ${e}`,notes:[{text:n.replace(e,l(e))}],telemetryMessage:!1})}}Y(yc,`readFileSyncToBuffer`);function bc(e){try{return Oc(r(e),e)}catch(t){if(t instanceof mc)throw t;let{message:n}=t;throw new mc({text:`Could not read file: ${e}`,notes:[{text:n.replace(e,l(e))}],telemetryMessage:`Could not read file`})}}Y(bc,`readFileSync`);function xc(e,t){let n,r=0,i=0,a=0,{fileText:o=``}=e;for(let e of o.split(`
113
- `))if(r++,a+=e.length+1,a>=t){n=e,i=e.length-(a-t);break}return{lineText:n,line:r,column:i,...e}}Y(xc,`indexLocation`);function Sc(e,t){let n,r,i=0,a=0,o=String(t),{fileText:s=``}=e;for(let e of s.split(`
114
- `)){i++;let t=e.indexOf(o);if(t>=0){n=e,a=t,r=o.length;break}}return{lineText:n,line:i,column:a,length:r,...e}}Y(Sc,`searchLocation`);var Cc={nanoseconds:1e-9,nanosecond:1e-9,microseconds:1e-6,microsecond:1e-6,milliseconds:.001,millisecond:.001,seconds:1,second:1,minutes:60,minute:60,hours:3600,hour:3600,days:86400,day:86400,weeks:604800,week:604800,month:18144e3,year:220752e3,nsecs:1e-9,nsec:1e-9,usecs:1e-6,usec:1e-6,msecs:.001,msec:.001,secs:1,sec:1,mins:60,min:60,ns:1e-9,us:1e-6,ms:.001,mo:18144e3,yr:220752e3,s:1,m:60,h:3600,d:86400,w:604800,y:220752e3};function wc(e){let t=new Map(Object.entries(Cc));e=e.trim().toLowerCase();let n=1;for(let[r,i]of t)if(e.endsWith(r)){e=e.substring(0,e.length-r.length),n=t.get(r)||1;break}return Number(e)*n}Y(wc,`parseHumanDuration`);function Tc(e){if(e==null||e.includes(`-`))return e;if(e.length!=32)return null;let t=[];t.push(e.slice(0,8)),t.push(e.slice(8,12)),t.push(e.slice(12,16)),t.push(e.slice(16,20)),t.push(e.slice(20));let n=``;return t.forEach(e=>n+=e+`-`),n.slice(0,36)}Y(Tc,`parseNonHyphenedUuid`);function Ec(e,t=void 0){let n=e.match(/^(\d*\.*\d*)\s*([kKmMgGtTpP]{0,1})([i]{0,1}[bB]{0,1})$/);if(!n)return NaN;let r=n[1];if(r.length===0||isNaN(Number(r)))return NaN;let i=n[2].toLowerCase(),a={k:1,m:2,g:3,t:4,p:5};if(i.length!==0&&!(i in a))return NaN;let o=n[3].toLowerCase()==`ib`;if(o&&i.length===0)return NaN;let s=a[i]||0;return Math.floor(Number(r)*(t??(o?1024:1e3))**+s)}Y(Ec,`parseByteSize`);var Dc=[{buffer:Buffer.from([0,0,254,255]),encoding:`UTF-32 BE`},{buffer:Buffer.from([255,254,0,0]),encoding:`UTF-32 LE`},{buffer:Buffer.from([254,255]),encoding:`UTF-16 BE`},{buffer:Buffer.from([255,254]),encoding:`UTF-16 LE`}];function Oc(e,t){for(let n of Dc)if(e.length>=n.buffer.length&&e.subarray(0,n.buffer.length).equals(n.buffer))throw new mc({text:`Configuration file contains ${n.encoding} byte order marker`,notes:[{text:`The file "${t}" appears to be encoded as ${n.encoding}. Please save the file as UTF-8 without BOM.`}],location:{file:t,line:1,column:0},telemetryMessage:`${n.encoding} BOM detected`});let n=e.toString(`utf-8`);return n.charCodeAt(0)===65279?n.slice(1):n}Y(Oc,`removeBOMAndValidate`);var kc=`.wrangler/deploy/config.json`;function Ac(e,t){return s(e)?e:l(t||`.`,e)}Y(Ac,`absolute`);function jc(e,t){let{last:n,cwd:r}=t||{},i=Ac(e,r),a=Ac(n||`/`,r),s,c=[];for(;s!==a&&(c.push(i),i=o(s=i),i!==s););return c}Y(jc,`up`);function Mc(e,t){let n,r;for(n of jc(t&&t.cwd||``,t))try{if(r=c(n,e),i(r).isFile())return r}catch{}}Y(Mc,`file`);function Nc(e,t){let n,r;for(n of jc(t&&t.cwd||``,t))try{if(r=c(n,e),i(r).isDirectory())return r}catch{}}Y(Nc,`dir`);function Pc(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
110
+ `}Y(Nc,`stringify`);var Pc={parse:Cc,stringify:Nc,TomlDate:cc,TomlError:Z},Fc=class extends X{static{Y(this,`ParseError`)}text;notes;location;kind;constructor({text:e,notes:t,location:n,kind:r,telemetryMessage:i}){super(e,{telemetryMessage:i}),this.name=this.constructor.name,this.text=e,this.notes=t??[],this.location=n,this.kind=r??`error`}};(class extends Fc{static{Y(this,`APIError`)}#e;code;accountTag;meta;retryAfterMs;constructor({status:e,retryAfterMs:t,...n}){super(n),this.name=this.constructor.name,this.#e=e,this.retryAfterMs=t}get status(){return this.#e}isGatewayError(){return this.#e===void 0?!1:[524].includes(this.#e)}isRetryable(){return String(this.#e).startsWith(`5`)}#t=!0;get reportable(){return this.#t}preventReport(){this.#t=!1}});function Ic(e,t){try{return Pc.parse(e)}catch(n){if(!(n instanceof Z))throw n;let r={lineText:e.split(`
111
+ `)[n.line-1],line:n.line,column:n.column-1,file:t,fileText:e};throw new Fc({text:n.message.substring(0,n.message.indexOf(`
112
+ `)),location:r,telemetryMessage:`TOML parse error`})}}Y(Ic,`parseTOML`);function Lc(e,t){return Rc(e,t)}Y(Lc,`parsePackageJSON`);function Rc(e,t){return zc(e,t,{allowEmptyContent:!1,allowTrailingComma:!1,disallowComments:!0})}Y(Rc,`parseJSON`);function zc(e,t,n={allowTrailingComma:!0}){let r=[],i=Js(e,r,n);if(r.length)throw new Fc({text:Xs(r[0].error),location:{...Hc({file:t,fileText:e},r[0].offset+1),length:r[0].length},telemetryMessage:`JSON(C) parse error`});return i}Y(zc,`parseJSONC`);function Bc(e){try{return r(e)}catch(t){let{message:n}=t;throw new Fc({text:`Could not read file: ${e}`,notes:[{text:n.replace(e,l(e))}],telemetryMessage:!1})}}Y(Bc,`readFileSyncToBuffer`);function Vc(e){try{return Yc(r(e),e)}catch(t){if(t instanceof Fc)throw t;let{message:n}=t;throw new Fc({text:`Could not read file: ${e}`,notes:[{text:n.replace(e,l(e))}],telemetryMessage:`Could not read file`})}}Y(Vc,`readFileSync`);function Hc(e,t){let n,r=0,i=0,a=0,{fileText:o=``}=e;for(let e of o.split(`
113
+ `))if(r++,a+=e.length+1,a>=t){n=e,i=e.length-(a-t);break}return{lineText:n,line:r,column:i,...e}}Y(Hc,`indexLocation`);function Uc(e,t){let n,r,i=0,a=0,o=String(t),{fileText:s=``}=e;for(let e of s.split(`
114
+ `)){i++;let t=e.indexOf(o);if(t>=0){n=e,a=t,r=o.length;break}}return{lineText:n,line:i,column:a,length:r,...e}}Y(Uc,`searchLocation`);var Wc={nanoseconds:1e-9,nanosecond:1e-9,microseconds:1e-6,microsecond:1e-6,milliseconds:.001,millisecond:.001,seconds:1,second:1,minutes:60,minute:60,hours:3600,hour:3600,days:86400,day:86400,weeks:604800,week:604800,month:18144e3,year:220752e3,nsecs:1e-9,nsec:1e-9,usecs:1e-6,usec:1e-6,msecs:.001,msec:.001,secs:1,sec:1,mins:60,min:60,ns:1e-9,us:1e-6,ms:.001,mo:18144e3,yr:220752e3,s:1,m:60,h:3600,d:86400,w:604800,y:220752e3};function Gc(e){let t=new Map(Object.entries(Wc));e=e.trim().toLowerCase();let n=1;for(let[r,i]of t)if(e.endsWith(r)){e=e.substring(0,e.length-r.length),n=t.get(r)||1;break}return Number(e)*n}Y(Gc,`parseHumanDuration`);function Kc(e){if(e==null||e.includes(`-`))return e;if(e.length!=32)return null;let t=[];t.push(e.slice(0,8)),t.push(e.slice(8,12)),t.push(e.slice(12,16)),t.push(e.slice(16,20)),t.push(e.slice(20));let n=``;return t.forEach(e=>n+=e+`-`),n.slice(0,36)}Y(Kc,`parseNonHyphenedUuid`);function qc(e,t=void 0){let n=e.match(/^(\d*\.*\d*)\s*([kKmMgGtTpP]{0,1})([i]{0,1}[bB]{0,1})$/);if(!n)return NaN;let r=n[1];if(r.length===0||isNaN(Number(r)))return NaN;let i=n[2].toLowerCase(),a={k:1,m:2,g:3,t:4,p:5};if(i.length!==0&&!(i in a))return NaN;let o=n[3].toLowerCase()==`ib`;if(o&&i.length===0)return NaN;let s=a[i]||0;return Math.floor(Number(r)*(t??(o?1024:1e3))**+s)}Y(qc,`parseByteSize`);var Jc=[{buffer:Buffer.from([0,0,254,255]),encoding:`UTF-32 BE`},{buffer:Buffer.from([255,254,0,0]),encoding:`UTF-32 LE`},{buffer:Buffer.from([254,255]),encoding:`UTF-16 BE`},{buffer:Buffer.from([255,254]),encoding:`UTF-16 LE`}];function Yc(e,t){for(let n of Jc)if(e.length>=n.buffer.length&&e.subarray(0,n.buffer.length).equals(n.buffer))throw new Fc({text:`Configuration file contains ${n.encoding} byte order marker`,notes:[{text:`The file "${t}" appears to be encoded as ${n.encoding}. Please save the file as UTF-8 without BOM.`}],location:{file:t,line:1,column:0},telemetryMessage:`${n.encoding} BOM detected`});let n=e.toString(`utf-8`);return n.charCodeAt(0)===65279?n.slice(1):n}Y(Yc,`removeBOMAndValidate`);var Xc=`.wrangler/deploy/config.json`;function Zc(e,t){return s(e)?e:l(t||`.`,e)}Y(Zc,`absolute`);function Qc(e,t){let{last:n,cwd:r}=t||{},i=Zc(e,r),a=Zc(n||`/`,r),s,c=[];for(;s!==a&&(c.push(i),i=o(s=i),i!==s););return c}Y(Qc,`up`);function $c(e,t){let n,r;for(n of Qc(t&&t.cwd||``,t))try{if(r=c(n,e),i(r).isFile())return r}catch{}}Y($c,`file`);function el(e,t){let n,r;for(n of Qc(t&&t.cwd||``,t))try{if(r=c(n,e),i(r).isDirectory())return r}catch{}}Y(el,`dir`);function tl(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
115
115
  [ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
116
116
  `)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
117
117
  `)&&(o=String(e).split(`
118
118
  `).map(function(e,t){return t===0?e:``+i+e}).join(`
119
- `)),a+=o+n[t+1]}),a}Y(Pc,`dedent`);var Fc=Pc;function Ic({config:e,script:t},n){return e===void 0?Lc(t===void 0?process.cwd():a.dirname(t),n):{userConfigPath:e,configPath:e,deployConfigPath:void 0,redirected:!1}}Y(Ic,`resolveWranglerConfigPath`);function Lc(e=process.cwd(),{useRedirectIfAvailable:t=!1}={}){let n=Mc(`wrangler.json`,{cwd:e})??Mc(`wrangler.jsonc`,{cwd:e})??Mc(`wrangler.toml`,{cwd:e});if(!t)return{userConfigPath:n,configPath:n,deployConfigPath:void 0,redirected:!1};let{configPath:r,deployConfigPath:i,redirected:a}=Rc(e,n);return{userConfigPath:n,configPath:r,deployConfigPath:i,redirected:a}}Y(Lc,`findWranglerConfig`);function Rc(e,t){let r=Mc(kc,{cwd:e});if(r===void 0)return{configPath:t,deployConfigPath:r,redirected:!1};let i,o=bc(r);try{let e=vc(o,r);i=e.configPath&&a.resolve(a.dirname(r),e.configPath)}catch(e){throw new X(`Failed to parse the deploy configuration file at ${a.relative(`.`,r)}`,{cause:e,telemetryMessage:!1})}if(!i)throw new X(Fc`
119
+ `)),a+=o+n[t+1]}),a}Y(tl,`dedent`);var nl=tl;function rl({config:e,script:t},n){return e===void 0?il(t===void 0?process.cwd():a.dirname(t),n):{userConfigPath:e,configPath:e,deployConfigPath:void 0,redirected:!1}}Y(rl,`resolveWranglerConfigPath`);function il(e=process.cwd(),{useRedirectIfAvailable:t=!1}={}){let n=$c(`wrangler.json`,{cwd:e})??$c(`wrangler.jsonc`,{cwd:e})??$c(`wrangler.toml`,{cwd:e});if(!t)return{userConfigPath:n,configPath:n,deployConfigPath:void 0,redirected:!1};let{configPath:r,deployConfigPath:i,redirected:a}=al(e,n);return{userConfigPath:n,configPath:r,deployConfigPath:i,redirected:a}}Y(il,`findWranglerConfig`);function al(e,t){let r=$c(Xc,{cwd:e});if(r===void 0)return{configPath:t,deployConfigPath:r,redirected:!1};let i,o=Vc(r);try{let e=zc(o,r);i=e.configPath&&a.resolve(a.dirname(r),e.configPath)}catch(e){throw new X(`Failed to parse the deploy configuration file at ${a.relative(`.`,r)}`,{cause:e,telemetryMessage:!1})}if(!i)throw new X(nl`
120
120
  A deploy configuration file was found at "${a.relative(`.`,r)}".
121
121
  But this is not valid - the required "configPath" property was not found.
122
122
  Instead this file contains:
123
123
  \`\`\`
124
124
  ${o}
125
125
  \`\`\`
126
- `,{telemetryMessage:!1});if(!n(i))throw new X(Fc`
126
+ `,{telemetryMessage:!1});if(!n(i))throw new X(nl`
127
127
  There is a deploy configuration at "${a.relative(`.`,r)}".
128
128
  But the redirected configuration path it points to, "${a.relative(`.`,i)}", does not exist.
129
- `,{telemetryMessage:!1});if(t&&a.join(a.dirname(t),kc)!==r)throw new X(Fc`
129
+ `,{telemetryMessage:!1});if(t&&a.join(a.dirname(t),Xc)!==r)throw new X(nl`
130
130
  Found both a user configuration file at "${a.relative(`.`,t)}"
131
131
  and a deploy configuration file at "${a.relative(`.`,r)}".
132
132
  But these do not share the same base path so it is not clear which should be used.
133
- `,{telemetryMessage:!1});return{configPath:i,deployConfigPath:r,redirected:!0}}Y(Rc,`findRedirectedWranglerConfig`);function zc(e){return e.configPath!==void 0&&e.configPath!==e.userConfigPath}Y(zc,`isRedirectedConfig`);function Bc(e,t,n){return zc({configPath:t,userConfigPath:n})}Y(Bc,`isRedirectedRawConfig`);function Vc(e){return e?.endsWith(`toml`)?`toml`:e?.endsWith(`jsonc`)?`jsonc`:e?.endsWith(`json`)?`json`:`none`}Y(Vc,`configFormat`);function Hc(e){switch(Vc(e)){case`toml`:return`wrangler.toml`;case`json`:return`wrangler.json`;case`jsonc`:return`wrangler.jsonc`;default:return`Wrangler configuration`}}Y(Hc,`configFileName`);function Uc(e,t,n=!0){return Vc(t)===`toml`?pc.stringify(e):n?JSON.stringify(e,null,2):JSON.stringify(e)}Y(Uc,`formatConfigSnippet`);function Wc(e,t){let n={};return Kc(e,n),Yc(e,n),Xc(e,n),Qc(e,n),Zc(e,n),$c(e,n),t!==void 0&&Gc(t,n),n}function Gc(e,t){e.accountId!==void 0&&(t.account_id=e.accountId),e.complianceRegion!==void 0&&(t.compliance_region=e.complianceRegion===`fedramp-high`?`fedramp_high`:`public`)}function Kc(e,t){if(e.name!==void 0&&(t.name=e.name),typeof e.entrypoint==`string`&&(t.main=e.entrypoint),e.compatibilityDate!==void 0&&(t.compatibility_date=e.compatibilityDate),e.compatibilityFlags!==void 0&&(t.compatibility_flags=e.compatibilityFlags),e.workersDev!==void 0&&(t.workers_dev=e.workersDev),e.previewUrls!==void 0&&(t.preview_urls=e.previewUrls),e.logpush!==void 0&&(t.logpush=e.logpush),e.firstPartyWorker!==void 0&&(t.first_party_worker=e.firstPartyWorker),e.placement!==void 0&&(t.placement=e.placement),e.limits!==void 0){let n={};e.limits.cpuMs!==void 0&&(n.cpu_ms=e.limits.cpuMs),e.limits.subrequests!==void 0&&(n.subrequests=e.limits.subrequests),t.limits=n}if(e.observability!==void 0&&(t.observability=qc(e.observability)),e.cache!==void 0){let n={enabled:e.cache.enabled};e.cache.crossVersionCache!==void 0&&(n.cross_version_cache=e.cache.crossVersionCache),t.cache=n}e.unsafe!==void 0&&(t.unsafe=Jc(e.unsafe))}function qc(e){let t={};if(e.enabled!==void 0&&(t.enabled=e.enabled),e.headSamplingRate!==void 0&&(t.head_sampling_rate=e.headSamplingRate),e.logs!==void 0){let n={},{logs:r}=e;r.enabled!==void 0&&(n.enabled=r.enabled),r.headSamplingRate!==void 0&&(n.head_sampling_rate=r.headSamplingRate),r.invocationLogs!==void 0&&(n.invocation_logs=r.invocationLogs),r.persist!==void 0&&(n.persist=r.persist),r.destinations!==void 0&&(n.destinations=r.destinations),t.logs=n}if(e.traces!==void 0){let n={},{traces:r}=e;r.enabled!==void 0&&(n.enabled=r.enabled),r.headSamplingRate!==void 0&&(n.head_sampling_rate=r.headSamplingRate),r.persist!==void 0&&(n.persist=r.persist),r.destinations!==void 0&&(n.destinations=r.destinations),t.traces=n}return t}function Jc(e){let t={};return e.metadata!==void 0&&(t.metadata=e.metadata),e.capnp!==void 0&&(`compiledSchema`in e.capnp&&e.capnp.compiledSchema?t.capnp={compiled_schema:e.capnp.compiledSchema}:`basePath`in e.capnp&&e.capnp.basePath&&(t.capnp={base_path:e.capnp.basePath,source_schemas:e.capnp.sourceSchemas??[]})),t}function Yc(e,t){let n,r=e.env??{},i=[],a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=[],b=[],x=[],S=[],ee=[],C=[],w=[],T=[],E=[],te=[],ne=[],D={},O=[];for(let[e,T]of Object.entries(r)){if(Po(T)){ne.push({...T,name:e,type:T.type.slice(7)});continue}switch(T.type){case`agent-memory`:m.push($({binding:e,namespace:T.namespace,remote:T.remote}));break;case`ai`:t.ai=$({binding:e,remote:T.remote});break;case`ai-search`:f.push($({binding:e,instance_name:T.name,remote:T.remote}));break;case`ai-search-namespace`:p.push($({binding:e,namespace:T.namespace,remote:T.remote}));break;case`analytics-engine-dataset`:h.push($({binding:e,dataset:T.name}));break;case`artifacts`:g.push($({binding:e,namespace:T.namespace,remote:T.remote}));break;case`assets`:n=e;break;case`browser`:t.browser=$({binding:e,remote:T.remote});break;case`d1`:a.push($({binding:e,database_id:T.id,database_name:T.name,remote:T.remote}));break;case`dispatch-namespace`:{let t={binding:e,namespace:T.namespace};T.outbound&&(t.outbound=$({service:T.outbound.workerName,parameters:T.outbound.parameters})),T.remote!==void 0&&(t.remote=T.remote),_.push(t);break}case`durable-object`:w.push({name:e,class_name:T.exportName,script_name:T.workerName});break;case`flagship`:d.push($({binding:e,app_id:T.id,remote:T.remote}));break;case`hyperdrive`:l.push($({binding:e,id:T.id,localConnectionString:T.localConnectionString}));break;case`images`:t.images=$({binding:e,remote:T.remote});break;case`json`:D[e]=T.value;break;case`kv`:i.push($({binding:e,id:T.id,remote:T.remote}));break;case`logfwdr`:te.push({name:e,destination:T.destination});break;case`media`:t.media=$({binding:e,remote:T.remote});break;case`mtls-certificate`:c.push($({binding:e,certificate_id:T.id,remote:T.remote}));break;case`pipeline`:u.push($({binding:e,stream:T.name,remote:T.remote}));break;case`queue`:E.push($({binding:e,queue:T.name,delivery_delay:T.deliveryDelay,remote:T.remote}));break;case`rate-limit`:ee.push({name:e,namespace_id:T.namespace,simple:T.simple});break;case`r2`:o.push($({binding:e,bucket_name:T.name,jurisdiction:T.jurisdiction,remote:T.remote}));break;case`secret`:O.push(e);break;case`secrets-store-secret`:v.push({binding:e,store_id:T.storeId,secret_name:T.secretName});break;case`send-email`:y.push($({name:e,destination_address:T.destinationAddress,allowed_destination_addresses:T.allowedDestinationAddresses,allowed_sender_addresses:T.allowedSenderAddresses,remote:T.remote}));break;case`stream`:t.stream=$({binding:e,remote:T.remote});break;case`text`:D[e]=T.value;break;case`vectorize`:s.push($({binding:e,index_name:T.name,remote:T.remote}));break;case`version-metadata`:t.version_metadata={binding:e};break;case`vpc-service`:b.push($({binding:e,service_id:T.id,remote:T.remote}));break;case`vpc-network`:T.tunnelId===void 0?T.networkId!==void 0&&x.push($({binding:e,network_id:T.networkId,remote:T.remote})):x.push($({binding:e,tunnel_id:T.tunnelId,remote:T.remote}));break;case`web-search`:t.websearch=$({binding:e,remote:T.remote});break;case`worker`:C.push($({binding:e,service:T.workerName,entrypoint:T.exportName,props:T.props,remote:T.remote}));break;case`worker-loader`:S.push({binding:e});break}}if(i.length&&(t.kv_namespaces=i),a.length&&(t.d1_databases=a),o.length&&(t.r2_buckets=o),s.length&&(t.vectorize=s),c.length&&(t.mtls_certificates=c),l.length&&(t.hyperdrive=l),u.length&&(t.pipelines=u),d.length&&(t.flagship=d),f.length&&(t.ai_search=f),p.length&&(t.ai_search_namespaces=p),m.length&&(t.agent_memory=m),h.length&&(t.analytics_engine_datasets=h),g.length&&(t.artifacts=g),_.length&&(t.dispatch_namespaces=_),v.length&&(t.secrets_store_secrets=v),y.length&&(t.send_email=y),b.length&&(t.vpc_services=b),x.length&&(t.vpc_networks=x),S.length&&(t.worker_loaders=S),ee.length&&(t.ratelimits=ee),C.length&&(t.services=C),w.length&&(t.durable_objects={bindings:w}),T.length&&(t.workflows=T),E.length&&(t.queues={...t.queues??{},producers:E}),te.length&&(t.logfwdr={bindings:te}),ne.length&&(t.unsafe={...t.unsafe??{},bindings:ne}),Object.keys(D).length&&(t.vars=D),O.length&&(t.secrets={required:O}),e.assets!==void 0||n!==void 0){let r={};n!==void 0&&(r.binding=n),e.assets?.htmlHandling!==void 0&&(r.html_handling=e.assets.htmlHandling),e.assets?.notFoundHandling!==void 0&&(r.not_found_handling=e.assets.notFoundHandling),e.assets?.runWorkerFirst!==void 0&&(r.run_worker_first=e.assets.runWorkerFirst),t.assets=r}}function Xc(e,t){let n=e.exports;if(!n)return;let r={},i={};for(let[e,t]of Object.entries(n)){if(t.type===`worker`){r[e]=t;continue}if(t.type!==`durable-object`){i[e]=t;continue}switch(t.state){case void 0:case`created`:r[e]={type:`durable-object`,storage:t.storage};break;case`deleted`:r[e]={type:`durable-object`,state:`deleted`};break;case`renamed`:r[e]={type:`durable-object`,state:`renamed`,renamed_to:t.renamedTo};break;case`transferred`:r[e]={type:`durable-object`,state:`transferred`,transferred_to:t.transferredTo};break;case`expecting-transfer`:r[e]={type:`durable-object`,state:`expecting-transfer`,storage:t.storage,transfer_from:t.transferFrom};break}}if(Object.keys(i).length>0)throw new X(`Unknown export types found: `+Object.entries(i).map(([e,{type:t}])=>`- ${e} : ${t}`).join(`
134
- `),{telemetryMessage:`Unknown export types found`});Object.keys(r).length>0&&(t.exports=r)}function Zc(e,t){let n=e.triggers;if(!n||n.length===0)return;let r=[],i=t.routes?[...t.routes]:[],a=t.queues?.consumers?[...t.queues.consumers]:[],o;for(let e of n)switch(e.type){case`email`:o??=[],o.push(...e.addresses);break;case`scheduled`:r.push(e.schedule);break;case`fetch`:e.zone===void 0?i.push(e.pattern):e.zone.includes(`.`)?i.push({pattern:e.pattern,zone_name:e.zone}):i.push({pattern:e.pattern,zone_id:e.zone});break;case`queue`:a.push($({queue:e.name,dead_letter_queue:e.deadLetterQueue,max_batch_size:e.maxBatchSize,max_batch_timeout:e.maxBatchTimeout,max_concurrency:e.maxConcurrency,max_retries:e.maxRetries,retry_delay:e.retryDelay,visibility_timeout_ms:e.visibilityTimeoutMs}));break}r.length&&(t.triggers={crons:r}),i.length&&(t.routes=i),a.length&&(t.queues={...t.queues??{},consumers:a}),o!==void 0&&(t.addresses=o)}function Qc(e,t){if(!e.domains||e.domains.length===0)return;let n=t.routes?[...t.routes]:[];for(let t of e.domains)n.push({pattern:t,custom_domain:!0});t.routes=n}function $c(e,t){let n=e.tailConsumers;if(!n||n.length===0)return;let r=[],i=[];for(let e of n)e.streaming?i.push({service:e.workerName}):r.push({service:e.workerName});r.length&&(t.tail_consumers=r),i.length&&(t.streaming_tail_consumers=i)}function $(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}const el=`cf-worker:`,tl=`no-cache`,nl=`cf-no-cache`,rl=/[/\\]node_modules[/\\]/,il=new f;async function al(e,t){sl();let n=d(e).href,r=new Set,i=await il.run(r,()=>import(n,{with:{cf:tl}})),a={};for(let[e,n]of Object.entries(i))t?.include&&!t.include.includes(e)||(a[e]=n);return{exports:a,dependencies:r}}let ol;function sl(){if(ol)return ol;if(typeof process<`u`&&process.versions.bun)throw Error(`cloudflare.config.ts loading is not supported on Bun. Please use Node.js v22.18.0 or higher.`);let e=t.registerHooks;if(typeof e!=`function`)throw Error(`cloudflare.config.ts loading requires Node.js v22.18.0 or higher.`);let n=e({resolve(e,t,n){let r=t.importAttributes??{};if(r.type===`cf-worker`){let n=(e.startsWith(`./`)||e.startsWith(`../`))&&t.parentURL?u(new URL(e,t.parentURL)):e;return{url:`${el}${encodeURIComponent(n)}`,format:`module`,shortCircuit:!0}}let i=r.cf===tl,a=n(e,t);if(rl.test(a.url)||!a.url.startsWith(`file://`))return a;let o=cl(t.parentURL);return!o&&!i?a:(il.getStore()?.add(u(a.url)),a.url=ll(a.url,o||crypto.randomUUID()),a)},load(e,t,n){if(e.startsWith(el)){let t=decodeURIComponent(e.slice(10));return{format:`module`,source:`export default ${JSON.stringify(t)};`,shortCircuit:!0}}return ul(t),n(e,t)}});return ol=()=>{n.deregister(),ol=void 0},ol}function cl(e){if(e)return new URL(e).searchParams.get(nl)??void 0}function ll(e,t){let n=new URL(e);return n.searchParams.set(nl,t),n.toString()}function ul(e){if(!e.importAttributes?.cf)return;let t=Object.assign(Object.create(null),e.importAttributes);delete t.cf,e.importAttributes=t,Object.freeze(e.importAttributes)}async function dl(e,t,n){let{exports:r,dependencies:i}=await al(e,n),a={};for(let[e,n]of Object.entries(r))a[e]=await h(n,t);return{result:Zo.safeParse(a),dependencies:i}}export{_ as S,W as _,q as a,G as b,H as c,J as d,Ua as f,K as g,Ha as h,Do as i,Ka as l,V as m,Jo as n,Fa as o,za as p,Wc as r,U as s,es as t,Eo as u,z as v,La as x,bo as y};
133
+ `,{telemetryMessage:!1});return{configPath:i,deployConfigPath:r,redirected:!0}}Y(al,`findRedirectedWranglerConfig`);function ol(e){return e.configPath!==void 0&&e.configPath!==e.userConfigPath}Y(ol,`isRedirectedConfig`);function sl(e,t,n){return ol({configPath:t,userConfigPath:n})}Y(sl,`isRedirectedRawConfig`);function cl(e){return e?.endsWith(`toml`)?`toml`:e?.endsWith(`jsonc`)?`jsonc`:e?.endsWith(`json`)?`json`:`none`}Y(cl,`configFormat`);function ll(e){switch(cl(e)){case`toml`:return`wrangler.toml`;case`json`:return`wrangler.json`;case`jsonc`:return`wrangler.jsonc`;default:return`Wrangler configuration`}}Y(ll,`configFileName`);function ul(e,t,n=!0){return cl(t)===`toml`?Pc.stringify(e):n?JSON.stringify(e,null,2):JSON.stringify(e)}Y(ul,`formatConfigSnippet`);function dl(e,t){let n={};return pl(e,n),gl(e,n),_l(e,n),yl(e,n),vl(e,n),bl(e,n),t!==void 0&&fl(t,n),n}function fl(e,t){e.accountId!==void 0&&(t.account_id=e.accountId),e.complianceRegion!==void 0&&(t.compliance_region=e.complianceRegion===`fedramp-high`?`fedramp_high`:`public`)}function pl(e,t){if(e.name!==void 0&&(t.name=e.name),typeof e.entrypoint==`string`&&(t.main=e.entrypoint),e.compatibilityDate!==void 0&&(t.compatibility_date=e.compatibilityDate),e.compatibilityFlags!==void 0&&(t.compatibility_flags=e.compatibilityFlags),e.workersDev!==void 0&&(t.workers_dev=e.workersDev),e.previewUrls!==void 0&&(t.preview_urls=e.previewUrls),e.logpush!==void 0&&(t.logpush=e.logpush),e.firstPartyWorker!==void 0&&(t.first_party_worker=e.firstPartyWorker),e.placement!==void 0&&(t.placement=e.placement),e.limits!==void 0){let n={};e.limits.cpuMs!==void 0&&(n.cpu_ms=e.limits.cpuMs),e.limits.subrequests!==void 0&&(n.subrequests=e.limits.subrequests),t.limits=n}if(e.observability!==void 0&&(t.observability=ml(e.observability)),e.cache!==void 0){let n={enabled:e.cache.enabled};e.cache.crossVersionCache!==void 0&&(n.cross_version_cache=e.cache.crossVersionCache),t.cache=n}e.unsafe!==void 0&&(t.unsafe=hl(e.unsafe))}function ml(e){let t={};if(e.enabled!==void 0&&(t.enabled=e.enabled),e.headSamplingRate!==void 0&&(t.head_sampling_rate=e.headSamplingRate),e.logs!==void 0){let n={},{logs:r}=e;r.enabled!==void 0&&(n.enabled=r.enabled),r.headSamplingRate!==void 0&&(n.head_sampling_rate=r.headSamplingRate),r.invocationLogs!==void 0&&(n.invocation_logs=r.invocationLogs),r.persist!==void 0&&(n.persist=r.persist),r.destinations!==void 0&&(n.destinations=r.destinations),t.logs=n}if(e.traces!==void 0){let n={},{traces:r}=e;r.enabled!==void 0&&(n.enabled=r.enabled),r.headSamplingRate!==void 0&&(n.head_sampling_rate=r.headSamplingRate),r.persist!==void 0&&(n.persist=r.persist),r.destinations!==void 0&&(n.destinations=r.destinations),t.traces=n}return t}function hl(e){let t={};return e.metadata!==void 0&&(t.metadata=e.metadata),e.capnp!==void 0&&(`compiledSchema`in e.capnp&&e.capnp.compiledSchema?t.capnp={compiled_schema:e.capnp.compiledSchema}:`basePath`in e.capnp&&e.capnp.basePath&&(t.capnp={base_path:e.capnp.basePath,source_schemas:e.capnp.sourceSchemas??[]})),t}function gl(e,t){let n,r=e.env??{},i=[],a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=[],b=[],x=[],S=[],ee=[],C=[],w=[],T=[],E=[],te=[],ne=[],D={},O=[];for(let[e,T]of Object.entries(r)){if(Uo(T)){ne.push({...T,name:e,type:T.type.slice(7)});continue}switch(T.type){case`agent-memory`:m.push($({binding:e,namespace:T.namespace,remote:T.remote}));break;case`ai`:t.ai=$({binding:e,remote:T.remote});break;case`ai-search`:f.push($({binding:e,instance_name:T.name,remote:T.remote}));break;case`ai-search-namespace`:p.push($({binding:e,namespace:T.namespace,remote:T.remote}));break;case`analytics-engine-dataset`:h.push($({binding:e,dataset:T.name}));break;case`artifacts`:g.push($({binding:e,namespace:T.namespace,remote:T.remote}));break;case`assets`:n=e;break;case`browser`:t.browser=$({binding:e,remote:T.remote});break;case`d1`:a.push($({binding:e,database_id:T.id,database_name:T.name,remote:T.remote}));break;case`dispatch-namespace`:{let t={binding:e,namespace:T.namespace};T.outbound&&(t.outbound=$({service:T.outbound.workerName,parameters:T.outbound.parameters})),T.remote!==void 0&&(t.remote=T.remote),_.push(t);break}case`durable-object`:w.push({name:e,class_name:T.exportName,script_name:T.workerName});break;case`flagship`:d.push($({binding:e,app_id:T.id,remote:T.remote}));break;case`hyperdrive`:l.push($({binding:e,id:T.id,localConnectionString:T.localConnectionString}));break;case`images`:t.images=$({binding:e,remote:T.remote});break;case`json`:D[e]=T.value;break;case`kv`:i.push($({binding:e,id:T.id,remote:T.remote}));break;case`logfwdr`:te.push({name:e,destination:T.destination});break;case`media`:t.media=$({binding:e,remote:T.remote});break;case`mtls-certificate`:c.push($({binding:e,certificate_id:T.id,remote:T.remote}));break;case`pipeline`:u.push($({binding:e,stream:T.name,remote:T.remote}));break;case`queue`:E.push($({binding:e,queue:T.name,delivery_delay:T.deliveryDelay,remote:T.remote}));break;case`rate-limit`:ee.push({name:e,namespace_id:T.namespace,simple:T.simple});break;case`r2`:{let t=T.localDev?.experimentalS3Credentials;o.push($({binding:e,bucket_name:T.name,jurisdiction:T.jurisdiction,remote:T.remote,local_dev:t===void 0?void 0:{experimental_s3_credentials:t}}));break}case`secret`:O.push(e);break;case`secrets-store-secret`:v.push({binding:e,store_id:T.storeId,secret_name:T.secretName});break;case`send-email`:y.push($({name:e,destination_address:T.destinationAddress,allowed_destination_addresses:T.allowedDestinationAddresses,allowed_sender_addresses:T.allowedSenderAddresses,remote:T.remote}));break;case`stream`:t.stream=$({binding:e,remote:T.remote});break;case`text`:D[e]=T.value;break;case`vectorize`:s.push($({binding:e,index_name:T.name,remote:T.remote}));break;case`version-metadata`:t.version_metadata={binding:e};break;case`vpc-service`:b.push($({binding:e,service_id:T.id,remote:T.remote}));break;case`vpc-network`:T.tunnelId===void 0?T.networkId!==void 0&&x.push($({binding:e,network_id:T.networkId,remote:T.remote})):x.push($({binding:e,tunnel_id:T.tunnelId,remote:T.remote}));break;case`web-search`:t.websearch=$({binding:e,remote:T.remote});break;case`worker`:C.push($({binding:e,service:T.workerName,entrypoint:T.exportName,props:T.props,remote:T.remote}));break;case`worker-loader`:S.push({binding:e});break}}if(i.length&&(t.kv_namespaces=i),a.length&&(t.d1_databases=a),o.length&&(t.r2_buckets=o),s.length&&(t.vectorize=s),c.length&&(t.mtls_certificates=c),l.length&&(t.hyperdrive=l),u.length&&(t.pipelines=u),d.length&&(t.flagship=d),f.length&&(t.ai_search=f),p.length&&(t.ai_search_namespaces=p),m.length&&(t.agent_memory=m),h.length&&(t.analytics_engine_datasets=h),g.length&&(t.artifacts=g),_.length&&(t.dispatch_namespaces=_),v.length&&(t.secrets_store_secrets=v),y.length&&(t.send_email=y),b.length&&(t.vpc_services=b),x.length&&(t.vpc_networks=x),S.length&&(t.worker_loaders=S),ee.length&&(t.ratelimits=ee),C.length&&(t.services=C),w.length&&(t.durable_objects={bindings:w}),T.length&&(t.workflows=T),E.length&&(t.queues={...t.queues??{},producers:E}),te.length&&(t.logfwdr={bindings:te}),ne.length&&(t.unsafe={...t.unsafe??{},bindings:ne}),Object.keys(D).length&&(t.vars=D),O.length&&(t.secrets={required:O}),e.assets!==void 0||n!==void 0){let r={};n!==void 0&&(r.binding=n),e.assets?.htmlHandling!==void 0&&(r.html_handling=e.assets.htmlHandling),e.assets?.notFoundHandling!==void 0&&(r.not_found_handling=e.assets.notFoundHandling),e.assets?.runWorkerFirst!==void 0&&(r.run_worker_first=e.assets.runWorkerFirst),t.assets=r}}function _l(e,t){let n=e.exports;if(!n)return;let r={},i={};for(let[e,t]of Object.entries(n)){if(t.type===`worker`){r[e]=t;continue}if(t.type!==`durable-object`){i[e]=t;continue}switch(t.state){case void 0:case`created`:r[e]={type:`durable-object`,storage:t.storage,...t.storage===`sqlite`&&t.container!==void 0&&{container:t.container}};break;case`deleted`:r[e]={type:`durable-object`,state:`deleted`};break;case`renamed`:r[e]={type:`durable-object`,state:`renamed`,renamed_to:t.renamedTo};break;case`transferred`:r[e]={type:`durable-object`,state:`transferred`,transferred_to:t.transferredTo};break;case`expecting-transfer`:r[e]={type:`durable-object`,state:`expecting-transfer`,storage:t.storage,transfer_from:t.transferFrom,...t.storage===`sqlite`&&t.container!==void 0&&{container:t.container}};break}}if(Object.keys(i).length>0)throw new X(`Unknown export types found: `+Object.entries(i).map(([e,{type:t}])=>`- ${e} : ${t}`).join(`
134
+ `),{telemetryMessage:`Unknown export types found`});Object.keys(r).length>0&&(t.exports=r)}function vl(e,t){let n=e.triggers;if(!n||n.length===0)return;let r=[],i=t.routes?[...t.routes]:[],a=t.queues?.consumers?[...t.queues.consumers]:[],o=t.connect?[...t.connect]:[],s;for(let e of n)switch(e.type){case`email`:s??=[],s.push(...e.addresses);break;case`scheduled`:r.push(e.schedule);break;case`fetch`:e.zone===void 0?i.push(e.pattern):e.zone.includes(`.`)?i.push({pattern:e.pattern,zone_name:e.zone}):i.push({pattern:e.pattern,zone_id:e.zone});break;case`queue`:a.push($({queue:e.name,dead_letter_queue:e.deadLetterQueue,max_batch_size:e.maxBatchSize,max_batch_timeout:e.maxBatchTimeout,max_concurrency:e.maxConcurrency,max_retries:e.maxRetries,retry_delay:e.retryDelay,visibility_timeout_ms:e.visibilityTimeoutMs}));break;case`connect`:o.push($({protocol:e.protocol,port:e.port,address:e.address}));break}r.length&&(t.triggers={crons:r}),i.length&&(t.routes=i),a.length&&(t.queues={...t.queues??{},consumers:a}),o.length&&(t.connect=o),s!==void 0&&(t.addresses=s)}function yl(e,t){if(!e.domains||e.domains.length===0)return;let n=t.routes?[...t.routes]:[];for(let t of e.domains)n.push({pattern:t,custom_domain:!0});t.routes=n}function bl(e,t){let n=e.tailConsumers;if(!n||n.length===0)return;let r=[],i=[];for(let e of n)e.streaming?i.push({service:e.workerName}):r.push({service:e.workerName});r.length&&(t.tail_consumers=r),i.length&&(t.streaming_tail_consumers=i)}function $(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}const xl=`cf-worker:`,Sl=`no-cache`,Cl=`cf-no-cache`,wl=/[/\\]node_modules[/\\]/,Tl=new f;async function El(e,t){Ol();let n=d(e).href,r=new Set,i=await Tl.run(r,()=>import(n,{with:{cf:Sl}})),a={};for(let[e,n]of Object.entries(i))t?.include&&!t.include.includes(e)||(a[e]=n);return{exports:a,dependencies:r}}let Dl;function Ol(){if(Dl)return Dl;if(typeof process<`u`&&process.versions.bun)throw Error(`cloudflare.config.ts loading is not supported on Bun. Please use Node.js v22.18.0 or higher.`);let e=t.registerHooks;if(typeof e!=`function`)throw Error(`cloudflare.config.ts loading requires Node.js v22.18.0 or higher.`);let n=e({resolve(e,t,n){let r=t.importAttributes??{};if(r.type===`cf-worker`){let n=(e.startsWith(`./`)||e.startsWith(`../`))&&t.parentURL?u(new URL(e,t.parentURL)):e;return{url:`${xl}${encodeURIComponent(n)}`,format:`module`,shortCircuit:!0}}let i=r.cf===Sl,a=n(e,t);if(wl.test(a.url)||!a.url.startsWith(`file://`))return a;let o=kl(t.parentURL);return!o&&!i?a:(Tl.getStore()?.add(u(a.url)),a.url=Al(a.url,o||crypto.randomUUID()),a)},load(e,t,n){if(e.startsWith(xl)){let t=decodeURIComponent(e.slice(10));return{format:`module`,source:`export default ${JSON.stringify(t)};`,shortCircuit:!0}}return jl(t),n(e,t)}});return Dl=()=>{n.deregister(),Dl=void 0},Dl}function kl(e){if(e)return new URL(e).searchParams.get(Cl)??void 0}function Al(e,t){let n=new URL(e);return n.searchParams.set(Cl,t),n.toString()}function jl(e){if(!e.importAttributes?.cf)return;let t=Object.assign(Object.create(null),e.importAttributes);delete t.cf,e.importAttributes=t,Object.freeze(e.importAttributes)}async function Ml(e,t,n){let{exports:r,dependencies:i}=await El(e,n),a={};for(let[e,n]of Object.entries(r))a[e]=await h(n,t);return{result:ps.safeParse(a),dependencies:i}}export{La as _,H as a,J as c,V as d,K as f,G as g,bo as h,U as i,Ua as l,z as m,Do as n,Ka as o,W as p,q as r,Eo as s,dl as t,za as u,_ as v};