diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/3d/de/587c4c38d087f1c45e5dee0a05e7378358d3f028c32fb5ab3d1d957bdd33 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/3d/de/587c4c38d087f1c45e5dee0a05e7378358d3f028c32fb5ab3d1d957bdd33 new file mode 100644 index 0000000000000000000000000000000000000000..666445ece10245a435589c3ab1558a5979052864 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/3d/de/587c4c38d087f1c45e5dee0a05e7378358d3f028c32fb5ab3d1d957bdd33 @@ -0,0 +1,2 @@ + +122c99d06f6e9f2c99dbfa9535d1c0dfb9091640 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz","integrity":"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==","time":1755918082740,"size":4372,"metadata":{"time":1755918082734,"url":"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"6b25dd1e1faf2e56db8dbb0ccd9c4d5a\"","last-modified":"Wed, 11 Jun 2025 08:48:38 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/3f/db/d5f8ccfbb62d7e7a7ee4f06ad85054ca2d54ee156eb7eaee541e26d9e288 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/3f/db/d5f8ccfbb62d7e7a7ee4f06ad85054ca2d54ee156eb7eaee541e26d9e288 new file mode 100644 index 0000000000000000000000000000000000000000..bc97d37ef34de44541f5b47dbfb1c0980b0b8eb9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/3f/db/d5f8ccfbb62d7e7a7ee4f06ad85054ca2d54ee156eb7eaee541e26d9e288 @@ -0,0 +1,2 @@ + +c7932622ac717da9cbfa7084877362973f6ce458 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz","integrity":"sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==","time":1755918082664,"size":8383,"metadata":{"time":1755918082653,"url":"https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"4d4a1fff618c8d6cc5aefb31f090d151\"","last-modified":"Wed, 30 Apr 2025 15:08:28 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/47/6e/0184937fde98938cb062ec8293fb6a17fcb7da8963a6d525de3f86b642e5 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/47/6e/0184937fde98938cb062ec8293fb6a17fcb7da8963a6d525de3f86b642e5 new file mode 100644 index 0000000000000000000000000000000000000000..342460c5db8800be957505d890e41a54897a6bab --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/47/6e/0184937fde98938cb062ec8293fb6a17fcb7da8963a6d525de3f86b642e5 @@ -0,0 +1,2 @@ + +84613bba52694a9f26595f0b3ae7ea83f4ab3353 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz","integrity":"sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==","time":1755918081401,"size":8903,"metadata":{"time":1755918081342,"url":"https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"7827fc931219deb3bafc80b83c32f13f\"","last-modified":"Sat, 02 Mar 2024 16:09:43 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/4e/ea/3195031c9d2314c6f9bdd432554b577b85553bba50c03535d8baee323c36 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/4e/ea/3195031c9d2314c6f9bdd432554b577b85553bba50c03535d8baee323c36 new file mode 100644 index 0000000000000000000000000000000000000000..8e6ec4539473ea1f11ddf5a2a27a98a32679b78c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/4e/ea/3195031c9d2314c6f9bdd432554b577b85553bba50c03535d8baee323c36 @@ -0,0 +1,2 @@ + +e03e46a21a73361736dc956239ecaa02d93bf332 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/vite/-/vite-7.0.6.tgz","integrity":"sha512-MHFiOENNBd+Bd9uvc8GEsIzdkn1JxMmEeYX35tI3fv0sJBUTfW5tQsoaOwuY4KhBI09A3dUJ/DXf2yxPVPUceg==","time":1755918081910,"size":546079,"metadata":{"time":1755918081053,"url":"https://registry.npmjs.org/vite/-/vite-7.0.6.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"c8fce02de1251acccf2dade035ca4c5a\"","last-modified":"Thu, 24 Jul 2025 05:34:22 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/52/0d/7101d4e8e4adea083d967de029ec350360cd0be5e13494d481f1aec5a55a b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/52/0d/7101d4e8e4adea083d967de029ec350360cd0be5e13494d481f1aec5a55a new file mode 100644 index 0000000000000000000000000000000000000000..0e35418a2201da038342f669eda499b4d999cc4d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/52/0d/7101d4e8e4adea083d967de029ec350360cd0be5e13494d481f1aec5a55a @@ -0,0 +1,2 @@ + +49fe81b8467ee06480bea4da15dcf3ab93458e27 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz","integrity":"sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==","time":1755918027190,"size":15149,"metadata":{"time":1755918027133,"url":"https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"5abae22fd065b47317b00323dc3bca77\"","last-modified":"Sat, 20 Apr 2024 01:36:58 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/59/8f/04e6f64d657039df04ffd17af0bb8c7b3f5db2f8937c8a322ae2455af62e b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/59/8f/04e6f64d657039df04ffd17af0bb8c7b3f5db2f8937c8a322ae2455af62e new file mode 100644 index 0000000000000000000000000000000000000000..b2e0c7e6b38fd85b321b6e2bc6b97661bf2d21a9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/59/8f/04e6f64d657039df04ffd17af0bb8c7b3f5db2f8937c8a322ae2455af62e @@ -0,0 +1,2 @@ + +3dcbbc7562e13f9fa9d2e912fc1d117dd277f424 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz","integrity":"sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==","time":1755918027106,"size":2347,"metadata":{"time":1755918027062,"url":"https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"7770534f4c5d8220c88f87f74293a7e1\"","last-modified":"Sun, 14 Nov 2021 22:19:10 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5b/93/97e8d6081ac64bc68ba5fe52511d9f7d8928ad26edbf0f08ba3c733391a0 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5b/93/97e8d6081ac64bc68ba5fe52511d9f7d8928ad26edbf0f08ba3c733391a0 new file mode 100644 index 0000000000000000000000000000000000000000..4a701a4d9935faef23c9ac8b2462760b8b13b42e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5b/93/97e8d6081ac64bc68ba5fe52511d9f7d8928ad26edbf0f08ba3c733391a0 @@ -0,0 +1,2 @@ + +843b6e006f02786d406c85261365bb3c2ad5f19e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz","integrity":"sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==","time":1755918026946,"size":5796,"metadata":{"time":1755918026900,"url":"https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"b9429fe348d411ce9b0b9084ed1668b9\"","last-modified":"Wed, 12 Oct 2022 16:34:07 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5c/01/2081785b69c5979585df24217b208471d6b9deac7d860a52675d1bd47033 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5c/01/2081785b69c5979585df24217b208471d6b9deac7d860a52675d1bd47033 new file mode 100644 index 0000000000000000000000000000000000000000..9d93c2fbb8c9dcc18a581309f2ce40d839bcaa48 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5c/01/2081785b69c5979585df24217b208471d6b9deac7d860a52675d1bd47033 @@ -0,0 +1,2 @@ + +f89bec9b520f714f8d0664f95e638088051cb4af {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ret/-/ret-0.5.0.tgz","integrity":"sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw==","time":1755918027013,"size":16454,"metadata":{"time":1755918026982,"url":"https://registry.npmjs.org/ret/-/ret-0.5.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"622f98f7ce549e682565433a1bbe4e6b\"","last-modified":"Thu, 16 Mar 2023 19:06:00 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5c/6a/2a980fd04071b1ad6c5a4bf457664bf8cd2027cbd62e3c6a0fa36490f657 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5c/6a/2a980fd04071b1ad6c5a4bf457664bf8cd2027cbd62e3c6a0fa36490f657 new file mode 100644 index 0000000000000000000000000000000000000000..844d4cd7da5ae50e56251a1e82629d5435084928 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5c/6a/2a980fd04071b1ad6c5a4bf457664bf8cd2027cbd62e3c6a0fa36490f657 @@ -0,0 +1,2 @@ + +f9b74cb39771dbed077fe6842acd3d8f01223cf0 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/react-i18next/-/react-i18next-15.6.1.tgz","integrity":"sha512-uGrzSsOUUe2sDBG/+FJq2J1MM+Y4368/QW8OLEKSFvnDflHBbZhSd1u3UkW0Z06rMhZmnB/AQrhCpYfE5/5XNg==","time":1755918081753,"size":58334,"metadata":{"time":1755918081136,"url":"https://registry.npmjs.org/react-i18next/-/react-i18next-15.6.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"ab202bf2668db5dbea5de483b4b5f1de\"","last-modified":"Tue, 22 Jul 2025 17:29:28 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5c/96/188695ea213d25600522779f6ebe61573b5cd60a2d9ca029a482a4da26c8 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5c/96/188695ea213d25600522779f6ebe61573b5cd60a2d9ca029a482a4da26c8 new file mode 100644 index 0000000000000000000000000000000000000000..a8b94e6dcf3d76ed21d54399245af07bcf34adee --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5c/96/188695ea213d25600522779f6ebe61573b5cd60a2d9ca029a482a4da26c8 @@ -0,0 +1,3 @@ + +368121280f49add1a1829605cdd7a6be7e167dd9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@nodelib%2ffs.stat","integrity":"sha512-t+NC9W5MlLvGV/V9MnAUJE41If1woyVG94ku0TxOvZVlIci7K5WWv2hSdNtxdVgHUjsFqG8O9rmP7O1kfzV7Lg==","time":1755924830335,"size":36993,"metadata":{"time":1755924830334,"url":"https://registry.npmjs.org/@nodelib%2ffs.stat","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:50 GMT","etag":"\"5068e8a9b2199bf2fa9db4c55831aece\"","last-modified":"Sun, 01 Dec 2024 13:14:12 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +c0a52df889f61fabf61502bab2fe037da49b3dcb {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@nodelib%2ffs.stat","integrity":"sha512-t+NC9W5MlLvGV/V9MnAUJE41If1woyVG94ku0TxOvZVlIci7K5WWv2hSdNtxdVgHUjsFqG8O9rmP7O1kfzV7Lg==","time":1755925570998,"size":36993,"metadata":{"time":1755925570998,"url":"https://registry.npmjs.org/@nodelib%2ffs.stat","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"5068e8a9b2199bf2fa9db4c55831aece\"","last-modified":"Sun, 01 Dec 2024 13:14:12 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5e/60/a3d7b522ab1c797a4998fcf731c9f135dfaab3d4714d61364f70e861612e b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5e/60/a3d7b522ab1c797a4998fcf731c9f135dfaab3d4714d61364f70e861612e new file mode 100644 index 0000000000000000000000000000000000000000..d5471eb7e2196bc8b754436b340f5b3ac084d466 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5e/60/a3d7b522ab1c797a4998fcf731c9f135dfaab3d4714d61364f70e861612e @@ -0,0 +1,3 @@ + +3bc051f4098515a969602b7a8a8c3ed1123334fe {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/merge2","integrity":"sha512-ictWFq2j+yXrZ5okPt8zMEXLWUQ3L49Z7h7onZwwJW9tVHzeL56wgNriXn5wjUVGoBucyFl5byvPBtOwWOL0oQ==","time":1755924830323,"size":46159,"metadata":{"time":1755924830323,"url":"https://registry.npmjs.org/merge2","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:50 GMT","etag":"\"8e79189560f15435d078411b371654bb\"","last-modified":"Sun, 19 Jun 2022 17:53:54 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +9d6bfc216c98de8b5c56a6e97b33180cb71171f9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/merge2","integrity":"sha512-ictWFq2j+yXrZ5okPt8zMEXLWUQ3L49Z7h7onZwwJW9tVHzeL56wgNriXn5wjUVGoBucyFl5byvPBtOwWOL0oQ==","time":1755925570974,"size":46159,"metadata":{"time":1755925570974,"url":"https://registry.npmjs.org/merge2","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"8e79189560f15435d078411b371654bb\"","last-modified":"Sun, 19 Jun 2022 17:53:54 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5e/d8/f632285e771b108e41613ffc8b0fae92e0b1fcb5c963af58c849bb86badd b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5e/d8/f632285e771b108e41613ffc8b0fae92e0b1fcb5c963af58c849bb86badd new file mode 100644 index 0000000000000000000000000000000000000000..7dd60332556a9486cc16b4fe1629b8ad93d41f7c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/5e/d8/f632285e771b108e41613ffc8b0fae92e0b1fcb5c963af58c849bb86badd @@ -0,0 +1,2 @@ + +207055bc350b21ca25464d18c561aa09cd33437c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz","integrity":"sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==","time":1755918027232,"size":6339,"metadata":{"time":1755918027213,"url":"https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"d31305c86794d2ff512914ff0bd345c1\"","last-modified":"Sat, 18 Dec 2021 03:30:45 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/61/49/1dbf30f7ea203bf1327d8f3e3df9d008c3489a582e83fe84922f549311e0 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/61/49/1dbf30f7ea203bf1327d8f3e3df9d008c3489a582e83fe84922f549311e0 new file mode 100644 index 0000000000000000000000000000000000000000..c41423ea242d7217f3a049766d90ed1beb046e4b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/61/49/1dbf30f7ea203bf1327d8f3e3df9d008c3489a582e83fe84922f549311e0 @@ -0,0 +1,2 @@ + +1ff2b26ba3e07c3ab2eb81a5c79e9950a4504a9a {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.7.1.tgz","integrity":"sha512-bavdk2BA5r3MYalGKZ01u8PGuDBloQmzpBZVhDLrOOv1N943Wq6dcM9GhB3x8b7AbqPMEezauv4PeGkAJfy7FQ==","time":1755918081177,"size":2390,"metadata":{"time":1755918081106,"url":"https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.7.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"ffaf003b04e0c0199de4923f049b9b7f\"","last-modified":"Thu, 24 Jul 2025 18:13:39 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/62/22/c3132aa82ee99fe5189aac7b7fcd5bc3d63b5fc13cd36ce388a9d21cf9db b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/62/22/c3132aa82ee99fe5189aac7b7fcd5bc3d63b5fc13cd36ce388a9d21cf9db new file mode 100644 index 0000000000000000000000000000000000000000..6429a7503db38d2a2e6de9e7fff5694772c3e756 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/62/22/c3132aa82ee99fe5189aac7b7fcd5bc3d63b5fc13cd36ce388a9d21cf9db @@ -0,0 +1,2 @@ + +ee88ce4913dc0c59411fc673c47e2ea67abda3f7 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.0.tgz","integrity":"sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==","time":1755918027026,"size":15535,"metadata":{"time":1755918026994,"url":"https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"72d313e2cdec3efd56fe74e28d5822ec\"","last-modified":"Tue, 15 Oct 2024 12:40:36 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/62/82/71d24cf34057d36cf27f9cc782bb6dd446e56a1987513836d5a2681a064d b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/62/82/71d24cf34057d36cf27f9cc782bb6dd446e56a1987513836d5a2681a064d new file mode 100644 index 0000000000000000000000000000000000000000..b010eba362e32be46270af4e2ffa93255ea184db --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/62/82/71d24cf34057d36cf27f9cc782bb6dd446e56a1987513836d5a2681a064d @@ -0,0 +1,2 @@ + +195a5092acfa147f7a5fabde73a27f56f0e246f4 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz","integrity":"sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==","time":1755918026998,"size":4182,"metadata":{"time":1755918026969,"url":"https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"6b6637b1a5d58b964c8a8d99ccf544e6\"","last-modified":"Fri, 04 Jun 2021 07:43:24 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/63/f2/61ce52c4d3b887433651e8790cc12fd67d56253ef9d2ca61c3d06e8b4e18 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/63/f2/61ce52c4d3b887433651e8790cc12fd67d56253ef9d2ca61c3d06e8b4e18 new file mode 100644 index 0000000000000000000000000000000000000000..dc71db53eb1de96ddcaee16e1af49b90f45e290b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/63/f2/61ce52c4d3b887433651e8790cc12fd67d56253ef9d2ca61c3d06e8b4e18 @@ -0,0 +1,2 @@ + +8f4af238c2db329a96290e334b900c440c51954d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz","integrity":"sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==","time":1755918081702,"size":4489,"metadata":{"time":1755918081667,"url":"https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"0b9316d575fd6f0c8e81ba92d85b690f\"","last-modified":"Mon, 21 Jul 2025 17:21:57 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/64/28/e444d001268ef2d4c2a6c96efcf4cbe9d51fdc9008329f7956b60986aef9 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/64/28/e444d001268ef2d4c2a6c96efcf4cbe9d51fdc9008329f7956b60986aef9 new file mode 100644 index 0000000000000000000000000000000000000000..463892c0a327189d09c2db7c15b88dc949dcca97 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/64/28/e444d001268ef2d4c2a6c96efcf4cbe9d51fdc9008329f7956b60986aef9 @@ -0,0 +1,2 @@ + +73cfb7f19dcfbafe08236ef8fa47c63ee2d4b918 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz","integrity":"sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==","time":1755918081319,"size":4312,"metadata":{"time":1755918081270,"url":"https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"54bf7101d59d33d9b13d6a91a72bc9b7\"","last-modified":"Sun, 27 May 2018 04:35:52 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/64/f6/ade3a93deb680385fd1f3f2d36630e838c93d196a93860078c2448e8ea42 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/64/f6/ade3a93deb680385fd1f3f2d36630e838c93d196a93860078c2448e8ea42 new file mode 100644 index 0000000000000000000000000000000000000000..74abfcc1ed577dad3de82a4f5640d6bc574ed447 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/64/f6/ade3a93deb680385fd1f3f2d36630e838c93d196a93860078c2448e8ea42 @@ -0,0 +1,2 @@ + +12ba276263b204709c5def35626a46090f20a528 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/find-my-way/-/find-my-way-9.3.0.tgz","integrity":"sha512-eRoFWQw+Yv2tuYlK2pjFS2jGXSxSppAs3hSQjfxVKxM5amECzIgYYc1FEI8ZmhSh/Ig+FrKEz43NLRKJjYCZVg==","time":1755918027205,"size":58647,"metadata":{"time":1755918027148,"url":"https://registry.npmjs.org/find-my-way/-/find-my-way-9.3.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"ce4230a16a51b4c106f0c2ac72ea2a1d\"","last-modified":"Fri, 21 Mar 2025 11:42:43 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/67/5f/28c12321d8b73cabed8e5f6d334222738f3757d989855c298742f545c38d b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/67/5f/28c12321d8b73cabed8e5f6d334222738f3757d989855c298742f545c38d new file mode 100644 index 0000000000000000000000000000000000000000..792c342554086ab8a356b5d9e34c1b1446ae8343 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/67/5f/28c12321d8b73cabed8e5f6d334222738f3757d989855c298742f545c38d @@ -0,0 +1,3 @@ + +af6af02736a5369920a42302c067882ba5a38d69 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/semver","integrity":"sha512-NwNZRI7GpiH8PnNKcZ7/Eb3XWZEQFg+dctQj3S2Ql1l0BLZWKvN3eOjWklz5to7B7/ERxy4y0D1ZUCyPC9ZHjA==","time":1755925566718,"size":224186,"metadata":{"time":1755925566718,"url":"https://registry.npmjs.org/semver","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"2732f5d3fe374764e8315299669a9142\"","last-modified":"Wed, 14 May 2025 20:04:23 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +040c09c8e269b6726b08cf54e887ca058d26aac0 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/semver","integrity":"sha512-NwNZRI7GpiH8PnNKcZ7/Eb3XWZEQFg+dctQj3S2Ql1l0BLZWKvN3eOjWklz5to7B7/ERxy4y0D1ZUCyPC9ZHjA==","time":1755928555958,"size":224186,"metadata":{"time":1755928555958,"url":"https://registry.npmjs.org/semver","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"2732f5d3fe374764e8315299669a9142\"","last-modified":"Wed, 14 May 2025 20:04:23 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/67/bb/3f7280fa3502d506fbb45e38cd0385fa6eedc6ba2555311502dd15468b94 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/67/bb/3f7280fa3502d506fbb45e38cd0385fa6eedc6ba2555311502dd15468b94 new file mode 100644 index 0000000000000000000000000000000000000000..cfc816377f8ef11447bceda7f753ea3c1e524030 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/67/bb/3f7280fa3502d506fbb45e38cd0385fa6eedc6ba2555311502dd15468b94 @@ -0,0 +1,2 @@ + +20786fdc8b005732b8db01b867c1c1ff05860f7d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz","integrity":"sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==","time":1755918027027,"size":3658,"metadata":{"time":1755918027000,"url":"https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"30a043a56972f185f49ff86c688deb59\"","last-modified":"Tue, 03 Oct 2023 14:42:07 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/68/58/296db20b8124b35803925b88099fa4b662914ccc389d8903d2c6a7ec4ad4 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/68/58/296db20b8124b35803925b88099fa4b662914ccc389d8903d2c6a7ec4ad4 new file mode 100644 index 0000000000000000000000000000000000000000..063595f1dbcc75c48708d472fd76ebbf2b16a9cc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/68/58/296db20b8124b35803925b88099fa4b662914ccc389d8903d2c6a7ec4ad4 @@ -0,0 +1,2 @@ + +74f049928a0de9416c97c0eee8ea0f6c02d668b7 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.1.tgz","integrity":"sha512-rcX58I7nqpu4mbKztFeOAObbomBbHU2oIb/d3tJfF3dizGSApqtSwYJigGCooHdnMyQBIw8BrWyK96w3YXgr6A==","time":1755918027132,"size":19000,"metadata":{"time":1755918027081,"url":"https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"204ec839155c3718b4d6723e1fe2fb0c\"","last-modified":"Mon, 10 Mar 2025 17:16:24 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/69/05/819f9a14d7b0310379c3cb19cbef883a408e28a037e99ac764e097311a4c b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/69/05/819f9a14d7b0310379c3cb19cbef883a408e28a037e99ac764e097311a4c new file mode 100644 index 0000000000000000000000000000000000000000..4fe3165429dea4c3dcd447a6beda58062a270751 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/69/05/819f9a14d7b0310379c3cb19cbef883a408e28a037e99ac764e097311a4c @@ -0,0 +1,3 @@ + +3e55e108c5b21e3b84a181585de0c3f44d53a32e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/google-logging-utils","integrity":"sha512-J73iLeYyTIw+zIJ/Xi+lDbe5Vw79cbfFYL5yrFnWA+pXTplJyaDkJi4d8YeT3c7bIThm63WTx/L1J/3VD5Zalg==","time":1755925568888,"size":17057,"metadata":{"time":1755925568888,"url":"https://registry.npmjs.org/google-logging-utils","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"57e9f2f6f9b656ed843a3ea87fe364dd\"","last-modified":"Mon, 10 Mar 2025 17:16:24 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +4852a7e8ae928fee42cd79376e2257c135519808 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/google-logging-utils","integrity":"sha512-J73iLeYyTIw+zIJ/Xi+lDbe5Vw79cbfFYL5yrFnWA+pXTplJyaDkJi4d8YeT3c7bIThm63WTx/L1J/3VD5Zalg==","time":1755928555976,"size":17057,"metadata":{"time":1755928555976,"url":"https://registry.npmjs.org/google-logging-utils","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"57e9f2f6f9b656ed843a3ea87fe364dd\"","last-modified":"Mon, 10 Mar 2025 17:16:24 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/69/33/b968e19e42cda755b43c4bd1e354056b2be0e8ff44896e82e4bc9fdb6322 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/69/33/b968e19e42cda755b43c4bd1e354056b2be0e8ff44896e82e4bc9fdb6322 new file mode 100644 index 0000000000000000000000000000000000000000..8c808b83ba895eb5ab49bbc75774c54269f607b8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/69/33/b968e19e42cda755b43c4bd1e354056b2be0e8ff44896e82e4bc9fdb6322 @@ -0,0 +1,2 @@ + +76efff6e6a99bec3b08f396aa6c4613879970044 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz","integrity":"sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==","time":1755918081514,"size":3936,"metadata":{"time":1755918081418,"url":"https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"24dda0a979c291476ae3c0a0bf7c80cb\"","last-modified":"Tue, 23 Apr 2024 05:26:06 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/69/e3/1018bd2617c9bf8a0c2742b8d6db95d9995670b0e195cb06cfea9d61c009 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/69/e3/1018bd2617c9bf8a0c2742b8d6db95d9995670b0e195cb06cfea9d61c009 new file mode 100644 index 0000000000000000000000000000000000000000..613c1d7388edf9a470e75bc1f37c86d5515b5818 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/69/e3/1018bd2617c9bf8a0c2742b8d6db95d9995670b0e195cb06cfea9d61c009 @@ -0,0 +1,2 @@ + +3bbc640856470fd41107c8b82711cbb6587e3b84 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz","integrity":"sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==","time":1755918081320,"size":35340,"metadata":{"time":1755918081077,"url":"https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"d6563249cc67440c65aafc997c015ef0\"","last-modified":"Sun, 08 Sep 2024 16:22:57 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6b/0c/4fb51f0d6958df4998537c738c83e14af659c6a2ac678defad66458c5358 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6b/0c/4fb51f0d6958df4998537c738c83e14af659c6a2ac678defad66458c5358 new file mode 100644 index 0000000000000000000000000000000000000000..6f5d92cea89c939f6979d4861951bfcf7330a8cd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6b/0c/4fb51f0d6958df4998537c738c83e14af659c6a2ac678defad66458c5358 @@ -0,0 +1,2 @@ + +bad7b68e48982c922bc4e64d5456567aba26e46e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz","integrity":"sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==","time":1755918027120,"size":8998,"metadata":{"time":1755918027080,"url":"https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"67bb87e57b5f72e6ccf015f7b23d0b1e\"","last-modified":"Sat, 07 Dec 2024 03:32:11 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6b/96/8af21194b7c666dcff699b874730170edc9a2670a4d17bf4186649ee9fa7 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6b/96/8af21194b7c666dcff699b874730170edc9a2670a4d17bf4186649ee9fa7 new file mode 100644 index 0000000000000000000000000000000000000000..e55893135b1193c723092166015af844a6830797 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6b/96/8af21194b7c666dcff699b874730170edc9a2670a4d17bf4186649ee9fa7 @@ -0,0 +1,2 @@ + +e5e0a95c0d31178d48c89877906076cae314603e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz","integrity":"sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==","time":1755918027143,"size":2258,"metadata":{"time":1755918027104,"url":"https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"4f4b9beb2d53481341e16133a8570dc5\"","last-modified":"Fri, 22 Nov 2019 16:47:23 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6b/ac/873bbccc3b70b17e1c1fbddbda99b69f0d507fd8d12442008ee2f2518c1f b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6b/ac/873bbccc3b70b17e1c1fbddbda99b69f0d507fd8d12442008ee2f2518c1f new file mode 100644 index 0000000000000000000000000000000000000000..e8678fadc2235741f48b3677fad11d2521161b99 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6b/ac/873bbccc3b70b17e1c1fbddbda99b69f0d507fd8d12442008ee2f2518c1f @@ -0,0 +1,2 @@ + +43a5001f280a7a29f990f3538187d6e1f0999c52 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz","integrity":"sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==","time":1755918026974,"size":3409,"metadata":{"time":1755918026936,"url":"https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"c12134c7445659565a4c87de0f84639e\"","last-modified":"Wed, 03 Jun 2020 07:39:14 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6c/24/cb539a49504ae25d15961cce8e8ae032e53ebd2a14405758964ce2f09658 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6c/24/cb539a49504ae25d15961cce8e8ae032e53ebd2a14405758964ce2f09658 new file mode 100644 index 0000000000000000000000000000000000000000..b35e2f430d81ee8c33f02b2a34c97e92f120d59c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6c/24/cb539a49504ae25d15961cce8e8ae032e53ebd2a14405758964ce2f09658 @@ -0,0 +1,2 @@ + +5463c0ccac462a46b97ca705a2a92e1eedabad24 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz","integrity":"sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==","time":1755918081231,"size":4948,"metadata":{"time":1755918081166,"url":"https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"c2aaae9561f5a6f9874f4f5bf07dd794\"","last-modified":"Tue, 10 Dec 2024 03:28:43 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6c/92/2a34da617f0e53f3406e345a1ec2ad265fd087bc761a26f0a2730b286f4d b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6c/92/2a34da617f0e53f3406e345a1ec2ad265fd087bc761a26f0a2730b286f4d new file mode 100644 index 0000000000000000000000000000000000000000..fe80af4e097b3b895a200eb1027a50e0d412b62a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6c/92/2a34da617f0e53f3406e345a1ec2ad265fd087bc761a26f0a2730b286f4d @@ -0,0 +1,3 @@ + +ff67e5431baf84dfabbae7ed414d663ba939f89a {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/shx","integrity":"sha512-yM/lnKibm4X5BPf0wv6Vgn7sC/kPuNxzgOVMHbRCQQgWX75Z2s+dDQV0ch58Mja+XELb3aevAEengSsagCfluw==","time":1755924828777,"size":50158,"metadata":{"time":1755924828777,"url":"https://registry.npmjs.org/shx","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:48 GMT","etag":"\"08eb07f18090b3dbbbcd12570bdf8b50\"","last-modified":"Mon, 17 Mar 2025 01:18:54 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +b66102f9660f0092471c4971c1a3a33afa775029 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/shx","integrity":"sha512-yM/lnKibm4X5BPf0wv6Vgn7sC/kPuNxzgOVMHbRCQQgWX75Z2s+dDQV0ch58Mja+XELb3aevAEengSsagCfluw==","time":1755925566266,"size":50158,"metadata":{"time":1755925566266,"url":"https://registry.npmjs.org/shx","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"08eb07f18090b3dbbbcd12570bdf8b50\"","last-modified":"Mon, 17 Mar 2025 01:18:54 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6c/b8/bf3defaf56a777b0a2db86bdc94ecb2191281a9ae7585d3ff39ed841c8f5 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6c/b8/bf3defaf56a777b0a2db86bdc94ecb2191281a9ae7585d3ff39ed841c8f5 new file mode 100644 index 0000000000000000000000000000000000000000..a3271048b3d485210e8068c88129b7457954126a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6c/b8/bf3defaf56a777b0a2db86bdc94ecb2191281a9ae7585d3ff39ed841c8f5 @@ -0,0 +1,3 @@ + +f22f90b5148b318f6fd5500d90cc01350b39aa72 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/statuses","integrity":"sha512-haKOHfP2DiMULkVyi6+yrVeYUEL52xEI1dla8yG5xv9HEncMzNYR2x8NaHZ3BnOMUeZMsrvyIrlrdoZKef8rKA==","time":1755925568663,"size":37117,"metadata":{"time":1755925568663,"url":"https://registry.npmjs.org/statuses","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"cc5606642c812bd309be9272ffd35bf8\"","last-modified":"Fri, 06 Jun 2025 19:56:03 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +55903bb14e09f78e146861ff3833febfa3fc5dee {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/statuses","integrity":"sha512-haKOHfP2DiMULkVyi6+yrVeYUEL52xEI1dla8yG5xv9HEncMzNYR2x8NaHZ3BnOMUeZMsrvyIrlrdoZKef8rKA==","time":1755928555453,"size":37117,"metadata":{"time":1755928555453,"url":"https://registry.npmjs.org/statuses","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"cc5606642c812bd309be9272ffd35bf8\"","last-modified":"Fri, 06 Jun 2025 19:56:03 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6d/8d/ce82e7d43a1ea8018080f1eac24d09af2f3ac3612f13e74b75741d52cc0f b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6d/8d/ce82e7d43a1ea8018080f1eac24d09af2f3ac3612f13e74b75741d52cc0f new file mode 100644 index 0000000000000000000000000000000000000000..09f85724b4d38389d1fee2053cd6e8b5818ab045 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6d/8d/ce82e7d43a1ea8018080f1eac24d09af2f3ac3612f13e74b75741d52cc0f @@ -0,0 +1,2 @@ + +4bd43b509902a6015fa5b25c6e327fa7484875ec {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz","integrity":"sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==","time":1755918081605,"size":15825,"metadata":{"time":1755918081515,"url":"https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"06b6a782e418b3f7ccab62243c53d2a0\"","last-modified":"Wed, 26 Mar 2025 08:02:38 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6e/27/e0e109737591117c80b7bfe42acbf7883d2aeeb26d019d11537373ec6793 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6e/27/e0e109737591117c80b7bfe42acbf7883d2aeeb26d019d11537373ec6793 new file mode 100644 index 0000000000000000000000000000000000000000..6eb9adb3cc56bdfc11bb475f97bb4553a248583f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6e/27/e0e109737591117c80b7bfe42acbf7883d2aeeb26d019d11537373ec6793 @@ -0,0 +1,2 @@ + +953c7556903f18e6f6f1d0e8960e77b470d1a275 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/split2/-/split2-4.2.0.tgz","integrity":"sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==","time":1755918027017,"size":4668,"metadata":{"time":1755918026990,"url":"https://registry.npmjs.org/split2/-/split2-4.2.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"b20ae4aab9e572e34ea9d782ac6e166d\"","last-modified":"Sun, 26 Mar 2023 08:33:04 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6f/36/63bd8ce524c6baafcf52a3989bd49a8ce575254236bfebebf004872d4226 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6f/36/63bd8ce524c6baafcf52a3989bd49a8ce575254236bfebebf004872d4226 new file mode 100644 index 0000000000000000000000000000000000000000..804906978ee14bcab3a104bd40f1b54947b876b4 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6f/36/63bd8ce524c6baafcf52a3989bd49a8ce575254236bfebebf004872d4226 @@ -0,0 +1,2 @@ + +d52f04979858387d68b596c64483f184fa263ce6 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/react-router/-/react-router-7.7.1.tgz","integrity":"sha512-jVKHXoWRIsD/qS6lvGveckwb862EekvapdHJN/cGmzw40KnJH5gg53ujOJ4qX6EKIK9LSBfFed/xiQ5yeXNrUA==","time":1755918082035,"size":803110,"metadata":{"time":1755918081115,"url":"https://registry.npmjs.org/react-router/-/react-router-7.7.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"9da933ed0cae7539c673d8ea3fa233f8\"","last-modified":"Thu, 24 Jul 2025 18:13:40 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6f/63/fcf920834459344cd688958ab5e7277b7bbf8f52b2befa28336c698617f1 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6f/63/fcf920834459344cd688958ab5e7277b7bbf8f52b2befa28336c698617f1 new file mode 100644 index 0000000000000000000000000000000000000000..f7627dc36c418822f939e461f8dfc1f32cb6fc96 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/6f/63/fcf920834459344cd688958ab5e7277b7bbf8f52b2befa28336c698617f1 @@ -0,0 +1,2 @@ + +378413e999d6493e6d9d1059403b76d1fbae19db {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz","integrity":"sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==","time":1755918027037,"size":2382,"metadata":{"time":1755918027000,"url":"https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"5416e9188475cd7f7826cdf73743d5f8\"","last-modified":"Mon, 25 Jul 2022 10:14:39 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/70/44/c01f851dd472a76c38fbabb1b337aee8c94f3e51f24ac58c0b52e64c58e8 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/70/44/c01f851dd472a76c38fbabb1b337aee8c94f3e51f24ac58c0b52e64c58e8 new file mode 100644 index 0000000000000000000000000000000000000000..f60a26b6307518b974bbf71bfb837a63362c391f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/70/44/c01f851dd472a76c38fbabb1b337aee8c94f3e51f24ac58c0b52e64c58e8 @@ -0,0 +1,3 @@ + +b897e486a52db9db6cf11134b4f77d8160790be2 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/secure-json-parse","integrity":"sha512-wfMnEQvd5VocVSBp0rIDaIhrWvwaTWENEvON0h8E5eVWUgAenr71b9aD4USeOlTFZ85XNNitwjkFcKnRn+Wn2g==","time":1755925566649,"size":47413,"metadata":{"time":1755925566649,"url":"https://registry.npmjs.org/secure-json-parse","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"da0faf6d5e86e88be1b04b2f16a36072\"","last-modified":"Sun, 09 Mar 2025 17:09:29 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +cca847c301fd67d332d7ac0135ad3bda8b2e0336 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/secure-json-parse","integrity":"sha512-wfMnEQvd5VocVSBp0rIDaIhrWvwaTWENEvON0h8E5eVWUgAenr71b9aD4USeOlTFZ85XNNitwjkFcKnRn+Wn2g==","time":1755928555948,"size":47413,"metadata":{"time":1755928555948,"url":"https://registry.npmjs.org/secure-json-parse","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"da0faf6d5e86e88be1b04b2f16a36072\"","last-modified":"Sun, 09 Mar 2025 17:09:29 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/71/33/e773fa0794bcc92f3e4d5ab5febe7769cde5fd5bbfe3dcd6e52e55ddb583 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/71/33/e773fa0794bcc92f3e4d5ab5febe7769cde5fd5bbfe3dcd6e52e55ddb583 new file mode 100644 index 0000000000000000000000000000000000000000..747455117928dfbcadf14ec2c2747342ee3626a6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/71/33/e773fa0794bcc92f3e4d5ab5febe7769cde5fd5bbfe3dcd6e52e55ddb583 @@ -0,0 +1,2 @@ + +3fec21d3e1d49d2402719722b2826f86e50e72f1 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/jiti/-/jiti-2.5.1.tgz","integrity":"sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==","time":1755918081881,"size":462663,"metadata":{"time":1755918081287,"url":"https://registry.npmjs.org/jiti/-/jiti-2.5.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"9d2b67d19d3bfc84a074956bf725ae3b\"","last-modified":"Thu, 24 Jul 2025 15:56:59 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/72/03/0b00b97c77922cd1b4d1238fa5e205524f61da816a3682adec75c26e0992 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/72/03/0b00b97c77922cd1b4d1238fa5e205524f61da816a3682adec75c26e0992 new file mode 100644 index 0000000000000000000000000000000000000000..307dfda4588666ca9011b42e2bedb9ab3574c9f7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/72/03/0b00b97c77922cd1b4d1238fa5e205524f61da816a3682adec75c26e0992 @@ -0,0 +1,2 @@ + +d3a79fd417db26fcce46cb54b27702c31c711839 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.11.tgz","integrity":"sha512-YW6sblI7xukSD2TdbbaeQVDysIm/UPJtObHJHKxDEcW2exAtY47j52f8jZXkqE1krdnkhCMGqP3dbniu1Te2Fg==","time":1755918082035,"size":1255534,"metadata":{"time":1755918081716,"url":"https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.11.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"6558bd1f6e5fca1824feba61b8bd68af\"","last-modified":"Thu, 26 Jun 2025 10:58:54 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/72/6f/7551d241cb30c6b780bfac91fe638ab4ee94cbbb639305be492e439c37b0 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/72/6f/7551d241cb30c6b780bfac91fe638ab4ee94cbbb639305be492e439c37b0 new file mode 100644 index 0000000000000000000000000000000000000000..87cffac9ceda2805d7fa24772f0c4c9e23847feb --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/72/6f/7551d241cb30c6b780bfac91fe638ab4ee94cbbb639305be492e439c37b0 @@ -0,0 +1,2 @@ + +7f6a2cd401267c99cd9172d98bf16355e95eee19 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz","integrity":"sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==","time":1755918081071,"size":4409,"metadata":{"time":1755918081029,"url":"https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"a0774b9d66230675fa1195292e06dfe4\"","last-modified":"Sat, 22 Jul 2023 14:37:40 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/72/eb/c41453b0a66ec0c94922165fc1f4cff124600599c6f46b65c590d228a97a b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/72/eb/c41453b0a66ec0c94922165fc1f4cff124600599c6f46b65c590d228a97a new file mode 100644 index 0000000000000000000000000000000000000000..d53c6fe6f82e396fc2fddc10c3cb75c9587aa6df --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/72/eb/c41453b0a66ec0c94922165fc1f4cff124600599c6f46b65c590d228a97a @@ -0,0 +1,2 @@ + +de611bcdf66d027260bcd91df1f6665678dc848c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.38.0.tgz","integrity":"sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==","time":1755918081562,"size":55952,"metadata":{"time":1755918081488,"url":"https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.38.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"fb7aaf6f0161771d139e265e28c5477b\"","last-modified":"Mon, 21 Jul 2025 17:22:13 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/73/b2/d71b976879158ed7cbda03bd225851cd8df08c18069cc24a8e4e28085c2c b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/73/b2/d71b976879158ed7cbda03bd225851cd8df08c18069cc24a8e4e28085c2c new file mode 100644 index 0000000000000000000000000000000000000000..84272874d480560397a46e209584b87928255435 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/73/b2/d71b976879158ed7cbda03bd225851cd8df08c18069cc24a8e4e28085c2c @@ -0,0 +1,2 @@ + +ea73c55a95328dbde64ce262f6771f951fc67c3c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz","integrity":"sha512-d/gTkTb1i1GKz5k3XE3XFV/PxQ1k45zDqGP2OA7YhgsaLoqm6qRvARAZOFer1fcXritWlGBRCu/UgeS4HAnXAA==","time":1755918027399,"size":1689,"metadata":{"time":1755918027375,"url":"https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"e23fbe0f5130f2f80d86db7b99a05c52\"","last-modified":"Sun, 27 May 2018 11:18:51 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/74/10/984f770e69c733fb85183c0ac4f66dfb35bc3fe77fcec966027ce29b0d6b b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/74/10/984f770e69c733fb85183c0ac4f66dfb35bc3fe77fcec966027ce29b0d6b new file mode 100644 index 0000000000000000000000000000000000000000..795bfbf8785cfedb9aedcb8d308699d755c576a7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/74/10/984f770e69c733fb85183c0ac4f66dfb35bc3fe77fcec966027ce29b0d6b @@ -0,0 +1,2 @@ + +8c92bfbeb2da21c83af8cce88cc2ed985ca10e30 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz","integrity":"sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==","time":1755918027047,"size":2822,"metadata":{"time":1755918027011,"url":"https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"0f43459a8a54ca3d2507f91d3b86c329\"","last-modified":"Mon, 09 Mar 2020 18:56:05 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/74/27/4e9930e7e23e03f738f17937115ef45ee3cd8d6a4f05cd1f319386074ca7 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/74/27/4e9930e7e23e03f738f17937115ef45ee3cd8d6a4f05cd1f319386074ca7 new file mode 100644 index 0000000000000000000000000000000000000000..a17edd5d836bab021fe4aa4dea330197f092e7b1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/74/27/4e9930e7e23e03f738f17937115ef45ee3cd8d6a4f05cd1f319386074ca7 @@ -0,0 +1,2 @@ + +e3d5a82ee5d778d66a5757672e9bcb11bcc50983 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/safe-regex2/-/safe-regex2-5.0.0.tgz","integrity":"sha512-YwJwe5a51WlK7KbOJREPdjNrpViQBI3p4T50lfwPuDhZnE3XGVTlGvi+aolc5+RvxDD6bnUmjVsU9n1eboLUYw==","time":1755918027175,"size":4228,"metadata":{"time":1755918027124,"url":"https://registry.npmjs.org/safe-regex2/-/safe-regex2-5.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"9777eb1b67def89f563eaa6178c4621c\"","last-modified":"Sat, 08 Mar 2025 16:37:13 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/74/44/de599a6f703758d319c236a6592ffc1f519503683fa48f521921dfa66475 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/74/44/de599a6f703758d319c236a6592ffc1f519503683fa48f521921dfa66475 new file mode 100644 index 0000000000000000000000000000000000000000..d8074cd73a7774c19ff6c70d2e9992fb9e83f892 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/74/44/de599a6f703758d319c236a6592ffc1f519503683fa48f521921dfa66475 @@ -0,0 +1,2 @@ + +ab506e5345ea585dd8d76a79aaf0ea49c30240dc {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/mime/-/mime-3.0.0.tgz","integrity":"sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==","time":1755918027221,"size":18690,"metadata":{"time":1755918027196,"url":"https://registry.npmjs.org/mime/-/mime-3.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"8e9e834a44e0445b20a0a91ec4a32e01\"","last-modified":"Wed, 03 Nov 2021 00:50:49 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/75/17/fefef5c06cc570a726f66b226d6abde231b9f5de2ae35354240c598b5518 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/75/17/fefef5c06cc570a726f66b226d6abde231b9f5de2ae35354240c598b5518 new file mode 100644 index 0000000000000000000000000000000000000000..79fb550d9722a628cbdba67b8983e9fd6c9ae01d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/75/17/fefef5c06cc570a726f66b226d6abde231b9f5de2ae35354240c598b5518 @@ -0,0 +1,2 @@ + +d43613ded7a81cba1b4ce450109cc5c5be32da97 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz","integrity":"sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==","time":1755918081159,"size":6779,"metadata":{"time":1755918081064,"url":"https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"a3d41bd30b6f293b58325f5b56260e0e\"","last-modified":"Fri, 03 Apr 2020 03:02:42 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/75/e3/8a67a6a69c573e507dac8723fa56c0451c1ebb42aa08925c3bd37a8435c3 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/75/e3/8a67a6a69c573e507dac8723fa56c0451c1ebb42aa08925c3bd37a8435c3 new file mode 100644 index 0000000000000000000000000000000000000000..66463ccbfd5ad6b4cf73e904bcf55210867b98df --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/75/e3/8a67a6a69c573e507dac8723fa56c0451c1ebb42aa08925c3bd37a8435c3 @@ -0,0 +1,2 @@ + +4de402af7df15f1a99a381f3d3521f8b4b4ad32d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz","integrity":"sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==","time":1755918081231,"size":3265,"metadata":{"time":1755918081161,"url":"https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"1362f362e00b9e967f1f922cf1a0a872\"","last-modified":"Wed, 25 Nov 2020 07:42:41 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/76/a7/495d1b16c13760080c481e5a178970c50789a18a6dd477941a7debf47964 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/76/a7/495d1b16c13760080c481e5a178970c50789a18a6dd477941a7debf47964 new file mode 100644 index 0000000000000000000000000000000000000000..2be86a71132aee94497d80f4395c1a053299e612 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/76/a7/495d1b16c13760080c481e5a178970c50789a18a6dd477941a7debf47964 @@ -0,0 +1,3 @@ + +6cbfe82841e4490ae8adf0819a552efe52edfe64 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@isaacs%2fcliui","integrity":"sha512-tzVelijdqdnlzbQrcbwzTK3HSxeGQL2gh4LE7W8ZDWxYFXaRAjII/iL/ox+xluYdfEf9GsNwmRWFgbFqqkeSug==","time":1755925570190,"size":7676,"metadata":{"time":1755925570190,"url":"https://registry.npmjs.org/@isaacs%2fcliui","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"63edf705087f25565483641b9aa5cbb4\"","last-modified":"Wed, 12 Jul 2023 19:06:06 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +b0155fa4afebfd373330257158646076dd1f61af {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@isaacs%2fcliui","integrity":"sha512-tzVelijdqdnlzbQrcbwzTK3HSxeGQL2gh4LE7W8ZDWxYFXaRAjII/iL/ox+xluYdfEf9GsNwmRWFgbFqqkeSug==","time":1755928556623,"size":7676,"metadata":{"time":1755928556623,"url":"https://registry.npmjs.org/@isaacs%2fcliui","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"63edf705087f25565483641b9aa5cbb4\"","last-modified":"Wed, 12 Jul 2023 19:06:06 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/76/e4/9f441723bae6d161b7f4a3c31ff59cb46fa4582a0e2069a46c96429d4999 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/76/e4/9f441723bae6d161b7f4a3c31ff59cb46fa4582a0e2069a46c96429d4999 new file mode 100644 index 0000000000000000000000000000000000000000..68e02ace2178ffbb86dc96b9e59b8f3a2211f592 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/76/e4/9f441723bae6d161b7f4a3c31ff59cb46fa4582a0e2069a46c96429d4999 @@ -0,0 +1,3 @@ + +3c36467e623220d8a6d33250e510a304d02c0a26 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/sonic-boom","integrity":"sha512-lEedD3ECu/g/9q2x0WfEYEIPfInHoVfrtegNIIYHpfRA09Sav5MI95zPM3hidnGftDnfRiyO4mG4TQjel2+vkQ==","time":1755925568983,"size":166846,"metadata":{"time":1755925568983,"url":"https://registry.npmjs.org/sonic-boom","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"f2f0745e655c9fa94baa4ce2cba98a2b\"","last-modified":"Tue, 15 Oct 2024 12:40:36 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +81433a8f260818d06cbae5e3ba015bc4c2a8c14b {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/sonic-boom","integrity":"sha512-lEedD3ECu/g/9q2x0WfEYEIPfInHoVfrtegNIIYHpfRA09Sav5MI95zPM3hidnGftDnfRiyO4mG4TQjel2+vkQ==","time":1755928556247,"size":166846,"metadata":{"time":1755928556247,"url":"https://registry.npmjs.org/sonic-boom","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"f2f0745e655c9fa94baa4ce2cba98a2b\"","last-modified":"Tue, 15 Oct 2024 12:40:36 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/77/59/986079464467eb2c4f1c178bf1c9fa9179b3c8384bd1eff68534419250ea b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/77/59/986079464467eb2c4f1c178bf1c9fa9179b3c8384bd1eff68534419250ea new file mode 100644 index 0000000000000000000000000000000000000000..e1853f66926d1f155129c1be53acc7d38dcc228c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/77/59/986079464467eb2c4f1c178bf1c9fa9179b3c8384bd1eff68534419250ea @@ -0,0 +1,2 @@ + +2031986464c2a1fa42a1da23955cee6e476c62fd {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz","integrity":"sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==","time":1755918081668,"size":2201,"metadata":{"time":1755918081609,"url":"https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"e675b251acc16de5f29b223db784e6c4\"","last-modified":"Tue, 08 Apr 2025 16:46:21 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/78/b7/ca6dfc3e769bd15bc75fd85704d45671f188c0dca528b40b889a95bee089 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/78/b7/ca6dfc3e769bd15bc75fd85704d45671f188c0dca528b40b889a95bee089 new file mode 100644 index 0000000000000000000000000000000000000000..b026fd03f38b39badac44858ca824cc6eb532ec8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/78/b7/ca6dfc3e769bd15bc75fd85704d45671f188c0dca528b40b889a95bee089 @@ -0,0 +1,2 @@ + +b5dade3a2c0f0412e3a59cdb21235ad4b67e5821 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/execa/-/execa-1.0.0.tgz","integrity":"sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==","time":1755918027008,"size":6991,"metadata":{"time":1755918026973,"url":"https://registry.npmjs.org/execa/-/execa-1.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"a07437cfe2ab0473cc40ef3a7d80f59e\"","last-modified":"Sun, 26 Aug 2018 17:43:48 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/79/0b/e8ee0700106bed496e2cbe04eeae51b5d322e5551d0a5a9c1a5c1022003c b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/79/0b/e8ee0700106bed496e2cbe04eeae51b5d322e5551d0a5a9c1a5c1022003c new file mode 100644 index 0000000000000000000000000000000000000000..5ceac290d3a75ebc9611e5596d8a9c30d309aa91 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/79/0b/e8ee0700106bed496e2cbe04eeae51b5d322e5551d0a5a9c1a5c1022003c @@ -0,0 +1,2 @@ + +5a22460be6cb393a40e2117b1584e7ba92bbb200 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/react-dom/-/react-dom-19.1.1.tgz","integrity":"sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==","time":1755918082104,"size":1156131,"metadata":{"time":1755918081123,"url":"https://registry.npmjs.org/react-dom/-/react-dom-19.1.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"3759de50307a87590b779ae878a7e298\"","last-modified":"Mon, 28 Jul 2025 14:55:53 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/79/23/3b5c4878bcc451766f7bcf5df7d2a4999739fcb2e30c1dcf6d759fbf963e b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/79/23/3b5c4878bcc451766f7bcf5df7d2a4999739fcb2e30c1dcf6d759fbf963e new file mode 100644 index 0000000000000000000000000000000000000000..e18fae0cb918d1f05fd7714bf365a5b29d68848b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/79/23/3b5c4878bcc451766f7bcf5df7d2a4999739fcb2e30c1dcf6d759fbf963e @@ -0,0 +1,2 @@ + +b6ca842ac5da13ea880f48a4405e770132dc36ad {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz","integrity":"sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==","time":1755918081410,"size":4053,"metadata":{"time":1755918081355,"url":"https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"a39f104614e3543dd4522ac4afdace00\"","last-modified":"Mon, 31 Aug 2020 18:21:48 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7a/83/6be996e7250adf9a97984c85c3a7d3c22c795ce5321c44d257e053fd7442 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7a/83/6be996e7250adf9a97984c85c3a7d3c22c795ce5321c44d257e053fd7442 new file mode 100644 index 0000000000000000000000000000000000000000..b0038bb5cb4deda09c7711dda1fb3be3403d9272 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7a/83/6be996e7250adf9a97984c85c3a7d3c22c795ce5321c44d257e053fd7442 @@ -0,0 +1,3 @@ + +9d65dce5b83dae5ddbdf205f9c9b69d5da74491e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/http-errors","integrity":"sha512-VL9ZgI7I6v/g6gRlvwxSwYbJJwWRsqPkD03Nbj/4G3SsV0fToUhkcXAzUEkbHjEzKxrS994JRSKRfyzSc1+Now==","time":1755925568450,"size":69537,"metadata":{"time":1755925568450,"url":"https://registry.npmjs.org/http-errors","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"6c7840d88584f9c5d79228c9bec7bcb8\"","last-modified":"Wed, 14 May 2025 14:56:22 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +542f4b6f642decea00cbb4cc459fc5a819cbcc4a {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/http-errors","integrity":"sha512-VL9ZgI7I6v/g6gRlvwxSwYbJJwWRsqPkD03Nbj/4G3SsV0fToUhkcXAzUEkbHjEzKxrS994JRSKRfyzSc1+Now==","time":1755928555232,"size":69537,"metadata":{"time":1755928555232,"url":"https://registry.npmjs.org/http-errors","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"6c7840d88584f9c5d79228c9bec7bcb8\"","last-modified":"Wed, 14 May 2025 14:56:22 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7a/dc/1abfe331f1d40d975cd6b42e4f5921c8e4cf3bf393c56a0fcffd0add67f5 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7a/dc/1abfe331f1d40d975cd6b42e4f5921c8e4cf3bf393c56a0fcffd0add67f5 new file mode 100644 index 0000000000000000000000000000000000000000..ac4d50431941272f9c23bcf0189ac03b270fb093 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7a/dc/1abfe331f1d40d975cd6b42e4f5921c8e4cf3bf393c56a0fcffd0add67f5 @@ -0,0 +1,2 @@ + +10e7b8de09d71127db56f18c536d2e144e6e4aa2 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.4.tgz","integrity":"sha512-JbbpPhp38UmXDDAu60RJmbeme37Jbgsm7NrHGgzYYFKmblzRUh6Pa641dII6LsjwF4XlScDrde2UAzDo/b9KPw==","time":1755918082404,"size":10623,"metadata":{"time":1755918082399,"url":"https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.4.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"8be52a6432741b7b1c55a68c615cdb15\"","last-modified":"Sat, 28 Jun 2025 04:28:10 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7b/57/d41af60a83ead5f112afd4a938d838c2550df57cfb37d6ac1920b46e4237 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7b/57/d41af60a83ead5f112afd4a938d838c2550df57cfb37d6ac1920b46e4237 new file mode 100644 index 0000000000000000000000000000000000000000..a9be05b1def917469b25b5e0f1871f8bc7b1dc16 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7b/57/d41af60a83ead5f112afd4a938d838c2550df57cfb37d6ac1920b46e4237 @@ -0,0 +1,2 @@ + +0d22d0e28846761591db67bf9a2b24d21196b0d4 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/react-dnd/-/react-dnd-16.0.1.tgz","integrity":"sha512-QeoM/i73HHu2XF9aKksIUuamHPDvRglEwdHL4jsp784BgUuWcg6mzfxT0QDdQz8Wj0qyRKx2eMg8iZtWvU4E2Q==","time":1755918081892,"size":48401,"metadata":{"time":1755918081149,"url":"https://registry.npmjs.org/react-dnd/-/react-dnd-16.0.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"3730abb772097adcd295bac7ae860821\"","last-modified":"Tue, 19 Apr 2022 18:05:24 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7b/6a/f08d99d204d9b332593c9d82e283fd35df58564f1107993589c67c454baf b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7b/6a/f08d99d204d9b332593c9d82e283fd35df58564f1107993589c67c454baf new file mode 100644 index 0000000000000000000000000000000000000000..b5c378aa996eb61e70a145d09fe47919c3ab3718 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7b/6a/f08d99d204d9b332593c9d82e283fd35df58564f1107993589c67c454baf @@ -0,0 +1,2 @@ + +4aae158ff62f4ac66503a3726847ce056949c919 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz","integrity":"sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==","time":1755918027146,"size":12526,"metadata":{"time":1755918027109,"url":"https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"e3f203c599b520af6e61f023fee52b15\"","last-modified":"Mon, 24 Feb 2025 16:47:54 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7b/cf/d0a3324ffbee1bbdc343c4df6d7a4f93260ab13e08067a5918c453b61267 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7b/cf/d0a3324ffbee1bbdc343c4df6d7a4f93260ab13e08067a5918c453b61267 new file mode 100644 index 0000000000000000000000000000000000000000..a942a7e5d6db35dc3cb9597e95d024f8cbc98cca --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7b/cf/d0a3324ffbee1bbdc343c4df6d7a4f93260ab13e08067a5918c453b61267 @@ -0,0 +1,3 @@ + +077492badfa7b699f21fcce9a50cb6cb1bbc5064 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@fastify%2fproxy-addr","integrity":"sha512-dZ7lxVrzMtdpSqjttVGqidvzVjpsKU+blPHMYaGx4guwLA8HYSB70+V+8E3Jz3GdYJsjt8CaGMmD8E7/ba+TGw==","time":1755925566930,"size":14065,"metadata":{"time":1755925566930,"url":"https://registry.npmjs.org/@fastify%2fproxy-addr","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"89266b442fd03cb4bee5569a50d2dbc2\"","last-modified":"Tue, 24 Dec 2024 08:57:26 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +56be85a47f8395ad067ad28f5ccb494b1be2993f {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@fastify%2fproxy-addr","integrity":"sha512-dZ7lxVrzMtdpSqjttVGqidvzVjpsKU+blPHMYaGx4guwLA8HYSB70+V+8E3Jz3GdYJsjt8CaGMmD8E7/ba+TGw==","time":1755928556150,"size":14065,"metadata":{"time":1755928556150,"url":"https://registry.npmjs.org/@fastify%2fproxy-addr","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"89266b442fd03cb4bee5569a50d2dbc2\"","last-modified":"Tue, 24 Dec 2024 08:57:26 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7c/54/bba9c9112de2dad8fe54e714bc6343197f041a37e8e9c4444688d605ffac b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7c/54/bba9c9112de2dad8fe54e714bc6343197f041a37e8e9c4444688d605ffac new file mode 100644 index 0000000000000000000000000000000000000000..7a5a453eb7ea9de9ddb5777fee5e2922976ad74d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7c/54/bba9c9112de2dad8fe54e714bc6343197f041a37e8e9c4444688d605ffac @@ -0,0 +1,2 @@ + +2c43460c80d8c128e874ac1eefda2d51cb065d9e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz","integrity":"sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==","time":1755918027026,"size":7286,"metadata":{"time":1755918026994,"url":"https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"0bd75649730e47891831de5fed0699bb\"","last-modified":"Sat, 24 Aug 2024 21:31:19 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7c/e2/0380559f2aa3f48d6733aadf8843d8e3d9f1b92eaaa125de918fc91bbe9b b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7c/e2/0380559f2aa3f48d6733aadf8843d8e3d9f1b92eaaa125de918fc91bbe9b new file mode 100644 index 0000000000000000000000000000000000000000..819a2152fbcc3cf45a3a4fcf69842d4881e65677 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7c/e2/0380559f2aa3f48d6733aadf8843d8e3d9f1b92eaaa125de918fc91bbe9b @@ -0,0 +1,2 @@ + +8c34a676d6ead60e1aa04cc6766a4f6e9d718fd3 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz","integrity":"sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==","time":1755918027137,"size":13369,"metadata":{"time":1755918027095,"url":"https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"39a2e4b7419f5e466a66d3ce9663eb27\"","last-modified":"Sat, 29 Jul 2023 05:44:58 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/8f/423d7e791f7fedd6bef784f0f467761c619f209ce9c788f08b63e968a880 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/8f/423d7e791f7fedd6bef784f0f467761c619f209ce9c788f08b63e968a880 new file mode 100644 index 0000000000000000000000000000000000000000..ff6d81babc8e1712aae6b58855b7b9565be81166 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/8f/423d7e791f7fedd6bef784f0f467761c619f209ce9c788f08b63e968a880 @@ -0,0 +1,2 @@ + +2360717d9b9a2be47edd0b45a00acab3ed1e0474 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/once/-/once-1.4.0.tgz","integrity":"sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==","time":1755918026949,"size":1979,"metadata":{"time":1755918026917,"url":"https://registry.npmjs.org/once/-/once-1.4.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"fac2afc3cbe5e133d7a5c34ec3f862ac\"","last-modified":"Sun, 27 May 2018 11:11:26 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/96/81ca539d7a20c543ec6c0e92ae79167bda54a06705b76796c78bc5ef44f6 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/96/81ca539d7a20c543ec6c0e92ae79167bda54a06705b76796c78bc5ef44f6 new file mode 100644 index 0000000000000000000000000000000000000000..f9afdb1ea7f596f060268ace97d833b65e49f9cf --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/96/81ca539d7a20c543ec6c0e92ae79167bda54a06705b76796c78bc5ef44f6 @@ -0,0 +1,2 @@ + +7d4428da03a65d83de4965385fe2db741596e56e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@fastify/ajv-compiler/-/ajv-compiler-4.0.2.tgz","integrity":"sha512-Rkiu/8wIjpsf46Rr+Fitd3HRP+VsxUFDDeag0hs9L0ksfnwx2g7SPQQTFL0E8Qv+rfXzQOxBJnjUB9ITUDjfWQ==","time":1755918027390,"size":13583,"metadata":{"time":1755918027363,"url":"https://registry.npmjs.org/@fastify/ajv-compiler/-/ajv-compiler-4.0.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"ba01693ef40445d449bdea754d04c241\"","last-modified":"Fri, 03 Jan 2025 10:47:29 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/9d/a787cb5fb8517d8f722961c5bfa0a1e43deee21881693fe21b525c063f64 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/9d/a787cb5fb8517d8f722961c5bfa0a1e43deee21881693fe21b525c063f64 new file mode 100644 index 0000000000000000000000000000000000000000..4194b31eaa7e6e1886d61bcde0f3fa78d3416eb1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/9d/a787cb5fb8517d8f722961c5bfa0a1e43deee21881693fe21b525c063f64 @@ -0,0 +1,3 @@ + +710858b29b1f405c920dfbcccf97e34626cff6b5 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2flinux-ppc64","integrity":"sha512-UgFoF1rpit7+iXI56qPcYmDMwI71zFC5BHGWcpqbV2RVv6LIt59Gftg/lcJB8w/pcHweGQtbhL78s6zRODxiRQ==","time":1755924829171,"size":178165,"metadata":{"time":1755924829170,"url":"https://registry.npmjs.org/@esbuild%2flinux-ppc64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:49 GMT","etag":"\"8d957ec11e620774476b4ae1e9c6758f\"","last-modified":"Tue, 12 Aug 2025 23:26:57 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +c0935e6e2e4c247b807b0e9ac8245a47c66cab0d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2flinux-ppc64","integrity":"sha512-UgFoF1rpit7+iXI56qPcYmDMwI71zFC5BHGWcpqbV2RVv6LIt59Gftg/lcJB8w/pcHweGQtbhL78s6zRODxiRQ==","time":1755925566575,"size":178165,"metadata":{"time":1755925566575,"url":"https://registry.npmjs.org/@esbuild%2flinux-ppc64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"8d957ec11e620774476b4ae1e9c6758f\"","last-modified":"Tue, 12 Aug 2025 23:26:57 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/ad/be90b3954e2f6e7b35b521e65a5016fd963aa11c3d6c88ccd9e0b61c069e b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/ad/be90b3954e2f6e7b35b521e65a5016fd963aa11c3d6c88ccd9e0b61c069e new file mode 100644 index 0000000000000000000000000000000000000000..43d2087fea8ed2338f98141217cad1743009c19b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/ad/be90b3954e2f6e7b35b521e65a5016fd963aa11c3d6c88ccd9e0b61c069e @@ -0,0 +1,2 @@ + +f68b581dac33a53ad9c4773588eba2b962d739a9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz","integrity":"sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==","time":1755918081534,"size":2668,"metadata":{"time":1755918081448,"url":"https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"eaa5cad5807df26bd8eb05ea4af19001\"","last-modified":"Tue, 06 Apr 2021 12:51:12 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/e8/5446c5cdae0493e4ad3b10347b77c8df4b17b5fbe14834f5c6b06faa9f95 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/e8/5446c5cdae0493e4ad3b10347b77c8df4b17b5fbe14834f5c6b06faa9f95 new file mode 100644 index 0000000000000000000000000000000000000000..8324d7d478c0776063062f226f5105b4b3daa094 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7d/e8/5446c5cdae0493e4ad3b10347b77c8df4b17b5fbe14834f5c6b06faa9f95 @@ -0,0 +1,3 @@ + +13226f0c65b8311713061f140839d9e6416a7bcd {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ws","integrity":"sha512-00Aq0jqUSQd8idi0u9a/NB0eoc83EcGRyeS7H1KdYHwfFshXCbivy88L6wEYHDbNaUtCRBO/tZABZQintMOw0g==","time":1755925568748,"size":410885,"metadata":{"time":1755925568748,"url":"https://registry.npmjs.org/ws","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"a47c0f5278eb169653569e50f82c38c5\"","last-modified":"Sat, 28 Jun 2025 13:28:40 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +f44aa0489f4f23aedda6d2fe12bb8513d0d007a6 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ws","integrity":"sha512-00Aq0jqUSQd8idi0u9a/NB0eoc83EcGRyeS7H1KdYHwfFshXCbivy88L6wEYHDbNaUtCRBO/tZABZQintMOw0g==","time":1755928555749,"size":410885,"metadata":{"time":1755928555749,"url":"https://registry.npmjs.org/ws","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"a47c0f5278eb169653569e50f82c38c5\"","last-modified":"Sat, 28 Jun 2025 13:28:40 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7e/9f/dfa3e415b0b79f7647f544e46b110b6a5570206d9ca2b7a646db02e61ee4 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7e/9f/dfa3e415b0b79f7647f544e46b110b6a5570206d9ca2b7a646db02e61ee4 new file mode 100644 index 0000000000000000000000000000000000000000..0829a6353e5959c21bc749acc65d686d577162d3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7e/9f/dfa3e415b0b79f7647f544e46b110b6a5570206d9ca2b7a646db02e61ee4 @@ -0,0 +1,3 @@ + +3596b040657d78e8fd71df21c7fa26a8c508fba9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2ffreebsd-arm64","integrity":"sha512-u7bX5sRz3iMUg7T+ZhdT4zTRaHxD3h4+AeKTZnbkH4NCGRw8OikZDgJLh8+L5bm8K7B2skDQsrhqEjxBKMRqgw==","time":1755924829113,"size":177740,"metadata":{"time":1755924829113,"url":"https://registry.npmjs.org/@esbuild%2ffreebsd-arm64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:49 GMT","etag":"\"c38d4cf32ea2da3e309ed31d12da45d2\"","last-modified":"Tue, 12 Aug 2025 23:25:56 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +a78f18409c80c750a1255ca1fd254ac749a4fad5 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2ffreebsd-arm64","integrity":"sha512-u7bX5sRz3iMUg7T+ZhdT4zTRaHxD3h4+AeKTZnbkH4NCGRw8OikZDgJLh8+L5bm8K7B2skDQsrhqEjxBKMRqgw==","time":1755925566576,"size":177740,"metadata":{"time":1755925566576,"url":"https://registry.npmjs.org/@esbuild%2ffreebsd-arm64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"c38d4cf32ea2da3e309ed31d12da45d2\"","last-modified":"Tue, 12 Aug 2025 23:25:56 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7e/e1/d7156880ad5c5d031b02bd4e7f7c2a6d0c0655146a4df5647682be15a6ba b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7e/e1/d7156880ad5c5d031b02bd4e7f7c2a6d0c0655146a4df5647682be15a6ba new file mode 100644 index 0000000000000000000000000000000000000000..f7f3547d16e4aab3a547ad8e9b0cc5de7657b8d6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7e/e1/d7156880ad5c5d031b02bd4e7f7c2a6d0c0655146a4df5647682be15a6ba @@ -0,0 +1,2 @@ + +c6513c49760a485254316ca1af25e9fd99e114b9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz","integrity":"sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==","time":1755918081324,"size":2225,"metadata":{"time":1755918081281,"url":"https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"aac9376a0ab3f4a34a37fdaf67258e1d\"","last-modified":"Sun, 02 Feb 2025 09:45:43 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7f/c3/dc0657b650edb6ea8e350ae8c6dd6cee5ca84fcc91d9d0b666cf225a139b b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7f/c3/dc0657b650edb6ea8e350ae8c6dd6cee5ca84fcc91d9d0b666cf225a139b new file mode 100644 index 0000000000000000000000000000000000000000..1334283e00b0b78207e4580f656feefae65a92c4 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/7f/c3/dc0657b650edb6ea8e350ae8c6dd6cee5ca84fcc91d9d0b666cf225a139b @@ -0,0 +1,3 @@ + +8169769816d0c8b41ede90b4a7f602f6dcc6d05b {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ms","integrity":"sha512-XFnCz+5b9ZhyYmzUQDDD15iAW6QLv2gYeyHqguZwz+JQrSedCQt1Hm/Gj5j/8Ip3cWsFTzT1iRXOwemRycEg8g==","time":1755925570435,"size":84883,"metadata":{"time":1755925570435,"url":"https://registry.npmjs.org/ms","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"b8355dde27fd59559086c03f2b89f7fb\"","last-modified":"Fri, 31 Jan 2025 01:56:26 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +4c7836be97f3e4a7a014f42a6cb7cc6741c9b6b9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ms","integrity":"sha512-XFnCz+5b9ZhyYmzUQDDD15iAW6QLv2gYeyHqguZwz+JQrSedCQt1Hm/Gj5j/8Ip3cWsFTzT1iRXOwemRycEg8g==","time":1755928556885,"size":84883,"metadata":{"time":1755928556885,"url":"https://registry.npmjs.org/ms","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"b8355dde27fd59559086c03f2b89f7fb\"","last-modified":"Fri, 31 Jan 2025 01:56:26 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/80/3a/4a5732c282b178c7db04d066e1bf72f3e188eb895364b06eb795a5f7e87b b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/80/3a/4a5732c282b178c7db04d066e1bf72f3e188eb895364b06eb795a5f7e87b new file mode 100644 index 0000000000000000000000000000000000000000..f4fb26e95b48acb15e2041880a4cd448bbbfa5dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/80/3a/4a5732c282b178c7db04d066e1bf72f3e188eb895364b06eb795a5f7e87b @@ -0,0 +1,3 @@ + +d4876735ae53720615f3ff055b1d101fa1f5aee0 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/esbuild","integrity":"sha512-lWovv9dlKrMAr8J77nmVnroiOoAjGQqAs7TE8Kgr6QeL6LIIe3Qvo79dxXtiraPIjYXB8/9RoQGDU48N9hTqDw==","time":1755924828718,"size":1222589,"metadata":{"time":1755924828718,"url":"https://registry.npmjs.org/esbuild","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:48 GMT","etag":"\"354068c12e70105f9f9e0cbad6a292e8\"","last-modified":"Tue, 12 Aug 2025 23:27:08 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +82e7fe248b3e044ddee37114be90e6e124e63773 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/esbuild","integrity":"sha512-lWovv9dlKrMAr8J77nmVnroiOoAjGQqAs7TE8Kgr6QeL6LIIe3Qvo79dxXtiraPIjYXB8/9RoQGDU48N9hTqDw==","time":1755925565382,"size":1222589,"metadata":{"time":1755925565382,"url":"https://registry.npmjs.org/esbuild","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:05 GMT","etag":"\"354068c12e70105f9f9e0cbad6a292e8\"","last-modified":"Tue, 12 Aug 2025 23:27:08 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/80/b8/d0499a46d0be0e0da3683c6801408a5a9943022610b91438a6289ae62534 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/80/b8/d0499a46d0be0e0da3683c6801408a5a9943022610b91438a6289ae62534 new file mode 100644 index 0000000000000000000000000000000000000000..946dbb87df78bbc6a9c49c60ecdb9597ee8784b1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/80/b8/d0499a46d0be0e0da3683c6801408a5a9943022610b91438a6289ae62534 @@ -0,0 +1,2 @@ + +85cd3f4f3d0c5cc3df6afb6afdb397f18cac14ba {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@img%2fsharp-libvips-darwin-x64","integrity":"sha512-1Qwowby+aau7moTp1dMYZ3t8bggwuyLkQ2zlT53a/1gIrJ0d95Lvqs/ygktneIA/vKemWhsSKNvRO32l6IpJTw==","time":1755927118067,"size":39990,"metadata":{"time":1755927118063,"url":"https://registry.npmjs.org/@img%2fsharp-libvips-darwin-x64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","content-encoding":"gzip","content-type":"application/json","date":"Sat, 23 Aug 2025 05:31:58 GMT","etag":"W/\"307df410e01e31a3d0bda04ccc595459\"","last-modified":"Thu, 24 Jul 2025 15:16:35 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/81/46/99a7db3a3209b5de2c760de391f5d6844b67a72311c9da9da01366aaa562 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/81/46/99a7db3a3209b5de2c760de391f5d6844b67a72311c9da9da01366aaa562 new file mode 100644 index 0000000000000000000000000000000000000000..369d65cd689c504f4f90cb92f3994eb8cb727182 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/81/46/99a7db3a3209b5de2c760de391f5d6844b67a72311c9da9da01366aaa562 @@ -0,0 +1,2 @@ + +66f912be104dd3bf55e24a50833e3478ee57aa3d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz","integrity":"sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==","time":1755918081508,"size":3400,"metadata":{"time":1755918081411,"url":"https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"5ae2691701dad1aec2e6bc66a610fbbe\"","last-modified":"Sat, 04 Sep 2021 16:55:23 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/81/5b/a85b875fa26b70450ff68626d9079711ecbc493d1ee63596e6b9324450c5 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/81/5b/a85b875fa26b70450ff68626d9079711ecbc493d1ee63596e6b9324450c5 new file mode 100644 index 0000000000000000000000000000000000000000..f4f306b950621de5974a00283fa1866c62db5937 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/81/5b/a85b875fa26b70450ff68626d9079711ecbc493d1ee63596e6b9324450c5 @@ -0,0 +1,2 @@ + +e9eed170f04420261c35e7dd2c4c6b996cd2db77 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@img%2fsharp-darwin-arm64","integrity":"sha512-xDYYf0CDOr2cjEVm2kYGLnFsLzZS9cfUpuDsKIECDr7NIbkGcgJFdh64A3z0hJ1pDWEHROZuMh3eJqT8/fQOxw==","time":1755927118021,"size":52294,"metadata":{"time":1755927118016,"url":"https://registry.npmjs.org/@img%2fsharp-darwin-arm64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","content-encoding":"gzip","content-type":"application/json","date":"Sat, 23 Aug 2025 05:31:57 GMT","etag":"W/\"aacb16611036f4e8a30d9b2f2e4a4bdd\"","last-modified":"Thu, 10 Jul 2025 07:57:19 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/82/29/8d2045a4a64e1616766f776adbcb349104b5c6c829fbc25c7b829d95a297 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/82/29/8d2045a4a64e1616766f776adbcb349104b5c6c829fbc25c7b829d95a297 new file mode 100644 index 0000000000000000000000000000000000000000..002ab5e79caabbe274ede827a1e74065c6cd452f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/82/29/8d2045a4a64e1616766f776adbcb349104b5c6c829fbc25c7b829d95a297 @@ -0,0 +1,2 @@ + +7001c16c1b208443261e788a8e05408338baa519 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz","integrity":"sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==","time":1755918081323,"size":51777,"metadata":{"time":1755918081059,"url":"https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"fcbf6fb5884da87368cf9588bf635f6b\"","last-modified":"Thu, 20 Mar 2025 12:24:52 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/82/9b/14cbab914a1f63d40eb9e86f6c8bbfdc77e802c37cb36c66a8d86735d313 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/82/9b/14cbab914a1f63d40eb9e86f6c8bbfdc77e802c37cb36c66a8d86735d313 new file mode 100644 index 0000000000000000000000000000000000000000..ed8e7f67ffcbfb381518afee5f82fb0e95dd197f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/82/9b/14cbab914a1f63d40eb9e86f6c8bbfdc77e802c37cb36c66a8d86735d313 @@ -0,0 +1,2 @@ + +f5d32f4a9d20b46e93ff8dfdebfe17457085dd7a {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz","integrity":"sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==","time":1755918027034,"size":6586,"metadata":{"time":1755918027004,"url":"https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"c9f11aab0960639af613b80dfaf5a981\"","last-modified":"Fri, 04 Jun 2021 07:43:27 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/83/79/361fdb875f802e2e053eab71e8c8239b1c3419fec0e317e0900cd90e168a b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/83/79/361fdb875f802e2e053eab71e8c8239b1c3419fec0e317e0900cd90e168a new file mode 100644 index 0000000000000000000000000000000000000000..e1ba44291ef6f44b13d0e234fe52215e9c836f8f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/83/79/361fdb875f802e2e053eab71e8c8239b1c3419fec0e317e0900cd90e168a @@ -0,0 +1,3 @@ + +a76441ac50a35c0a4a269f4bd5733949a798bd90 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/json-bigint","integrity":"sha512-8xlIQFvf1b/4eNhYrZvq7kP7BEsWmUQzmzy6QxJZf0M/x6P0mg1iGwdJe8UMOjzXJL87jFrWPnO2ZPYq5fApUg==","time":1755925570312,"size":36963,"metadata":{"time":1755925570312,"url":"https://registry.npmjs.org/json-bigint","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"3a5787fdecc079323e3da417ca88c008\"","last-modified":"Sun, 19 Jun 2022 06:11:54 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +d58122f5d6c92e8d5f5f42c1a3b5913624579770 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/json-bigint","integrity":"sha512-8xlIQFvf1b/4eNhYrZvq7kP7BEsWmUQzmzy6QxJZf0M/x6P0mg1iGwdJe8UMOjzXJL87jFrWPnO2ZPYq5fApUg==","time":1755928556750,"size":36963,"metadata":{"time":1755928556750,"url":"https://registry.npmjs.org/json-bigint","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"3a5787fdecc079323e3da417ca88c008\"","last-modified":"Sun, 19 Jun 2022 06:11:54 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/85/41/6af4bc4bfb870494d659b065db4264a9726429f4db3e878a7128b45b77ad b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/85/41/6af4bc4bfb870494d659b065db4264a9726429f4db3e878a7128b45b77ad new file mode 100644 index 0000000000000000000000000000000000000000..603d3dfbfafd64c06c26f9977708fe377c29be47 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/85/41/6af4bc4bfb870494d659b065db4264a9726429f4db3e878a7128b45b77ad @@ -0,0 +1,2 @@ + +9e254cd799c3a3c0ba17c556e78dd8cdd78f59a1 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz","integrity":"sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==","time":1755918081840,"size":46439,"metadata":{"time":1755918081442,"url":"https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"66ec430658648ec558c2c37fab48cc5d\"","last-modified":"Sun, 09 Mar 2025 13:27:26 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/85/70/105fe87153f4550f3078c8e9384739d6187475baa5fc9fdb30bbf80e4c6a b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/85/70/105fe87153f4550f3078c8e9384739d6187475baa5fc9fdb30bbf80e4c6a new file mode 100644 index 0000000000000000000000000000000000000000..e166208bb11a93805058251c1c43b6f2a536ebf2 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/85/70/105fe87153f4550f3078c8e9384739d6187475baa5fc9fdb30bbf80e4c6a @@ -0,0 +1,2 @@ + +582173f2323e1695bd00a10d411910218c5639fe {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/claude-code","integrity":"sha512-GhOauW8/1wPBtq7zsZrfXE2vGRSRCYtBsyZckwSAGP/d0e6r+FRpNU8jw67GqjlHCIiq3PBKuii5pJqs6aHQIQ==","time":1755928794497,"size":1293,"metadata":{"time":1755928794491,"url":"https://registry.npmjs.org/claude-code","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-encoding":"gzip","content-type":"application/vnd.npm.install-v1+json","date":"Sat, 23 Aug 2025 05:59:54 GMT","etag":"W/\"07c319690db477d105ddd605bc70dfcc\"","last-modified":"Thu, 19 Jun 2025 15:12:05 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/86/df/24e888de8c94c67026f3974571f3072a9ff5276007cbd45ef80215795ecb b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/86/df/24e888de8c94c67026f3974571f3072a9ff5276007cbd45ef80215795ecb new file mode 100644 index 0000000000000000000000000000000000000000..cdbb751b2a448785e603324c81d259363633fd8e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/86/df/24e888de8c94c67026f3974571f3072a9ff5276007cbd45ef80215795ecb @@ -0,0 +1,2 @@ + +392b1467f649d3094660b744c800ccedf0c4de09 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/which/-/which-1.3.1.tgz","integrity":"sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==","time":1755918027437,"size":4174,"metadata":{"time":1755918027420,"url":"https://registry.npmjs.org/which/-/which-1.3.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"3077f0c321098e78b78ddd6b4b2789e5\"","last-modified":"Sun, 27 May 2018 21:56:33 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/87/7a/6bff65d2ea046d0cbcb8b9c7a56dfc499fce22f35dcf898d6732fd0f99d4 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/87/7a/6bff65d2ea046d0cbcb8b9c7a56dfc499fce22f35dcf898d6732fd0f99d4 new file mode 100644 index 0000000000000000000000000000000000000000..73c3b65c0801a55112e2b74de3b760630123c020 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/87/7a/6bff65d2ea046d0cbcb8b9c7a56dfc499fce22f35dcf898d6732fd0f99d4 @@ -0,0 +1,3 @@ + +8ac9b823d08362cfabf8e9223eabf5a4595fa227 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2flinux-riscv64","integrity":"sha512-yyDPwCTYfXd45X82oMssvl8fEvnxewlYlXR1FKF7HlwocPQGtfUYQ8L7RMF5YgA1KiJHjRkG8HrTANF312Xa+A==","time":1755924829055,"size":177852,"metadata":{"time":1755924829055,"url":"https://registry.npmjs.org/@esbuild%2flinux-riscv64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:48 GMT","etag":"\"79a0d47efceff9c9db4d17d5e3db0747\"","last-modified":"Tue, 12 Aug 2025 23:26:45 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +5b85afa52fdca952917eb8aaa1c5599bb8ff0a39 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2flinux-riscv64","integrity":"sha512-yyDPwCTYfXd45X82oMssvl8fEvnxewlYlXR1FKF7HlwocPQGtfUYQ8L7RMF5YgA1KiJHjRkG8HrTANF312Xa+A==","time":1755925566576,"size":177852,"metadata":{"time":1755925566576,"url":"https://registry.npmjs.org/@esbuild%2flinux-riscv64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"79a0d47efceff9c9db4d17d5e3db0747\"","last-modified":"Tue, 12 Aug 2025 23:26:45 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/87/da/af28f1133468f98432a0caf94d8a9e1a4f1bcd830398a06a4e51d9d17bcd b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/87/da/af28f1133468f98432a0caf94d8a9e1a4f1bcd830398a06a4e51d9d17bcd new file mode 100644 index 0000000000000000000000000000000000000000..2860343e1415eac576d5121e860dd14d7e71b7f1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/87/da/af28f1133468f98432a0caf94d8a9e1a4f1bcd830398a06a4e51d9d17bcd @@ -0,0 +1,2 @@ + +7f452d4ab3f78589d899da3546d5a29d04113fcc {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz","integrity":"sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==","time":1755918026946,"size":9799,"metadata":{"time":1755918026901,"url":"https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"71457923fbca6a1141f3dd325cdb7d21\"","last-modified":"Thu, 12 Oct 2023 19:08:21 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/89/43/fcb50359eccc284688e568af0279dd8b96d5427a7ff665865ff283b7a40d b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/89/43/fcb50359eccc284688e568af0279dd8b96d5427a7ff665865ff283b7a40d new file mode 100644 index 0000000000000000000000000000000000000000..8c65084ad3c6d2c8475175ee7e380ba30a73b4de --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/89/43/fcb50359eccc284688e568af0279dd8b96d5427a7ff665865ff283b7a40d @@ -0,0 +1,2 @@ + +ae38a0afe5936136f060b6fa41bb94ff1e0f9392 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@lukeed/ms/-/ms-2.0.2.tgz","integrity":"sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==","time":1755918027437,"size":3704,"metadata":{"time":1755918027421,"url":"https://registry.npmjs.org/@lukeed/ms/-/ms-2.0.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"cf42487eaac6ff378efec4a78fd8d1ba\"","last-modified":"Tue, 28 Nov 2023 22:37:14 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/89/f8/98fd012d9409c4b27aca7d540538419a5365d03665e38b958232ee324ca6 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/89/f8/98fd012d9409c4b27aca7d540538419a5365d03665e38b958232ee324ca6 new file mode 100644 index 0000000000000000000000000000000000000000..8e1328ac25a7810f4f1d9fe88dcb5176669fc6d6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/89/f8/98fd012d9409c4b27aca7d540538419a5365d03665e38b958232ee324ca6 @@ -0,0 +1,3 @@ + +09ade7005d98f4d20b8ef9a8682c4b6186cabbd9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/supports-preserve-symlinks-flag","integrity":"sha512-AVPOyQRTQgloRdcNEIRZAzHH7j06xePMlQCoJihTBA62IuGmOjpgnuAH4zYkA4J61WqSamm0rXxh/Dc/LG54Vg==","time":1755924830809,"size":6802,"metadata":{"time":1755924830808,"url":"https://registry.npmjs.org/supports-preserve-symlinks-flag","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:50 GMT","etag":"\"c3a4e35977292c136a5e5a50f8e8100b\"","last-modified":"Thu, 19 May 2022 01:59:55 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +d306acc4998b83cde62cd9fe06bed4d2c62cf66d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/supports-preserve-symlinks-flag","integrity":"sha512-AVPOyQRTQgloRdcNEIRZAzHH7j06xePMlQCoJihTBA62IuGmOjpgnuAH4zYkA4J61WqSamm0rXxh/Dc/LG54Vg==","time":1755925571404,"size":6802,"metadata":{"time":1755925571404,"url":"https://registry.npmjs.org/supports-preserve-symlinks-flag","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:11 GMT","etag":"\"c3a4e35977292c136a5e5a50f8e8100b\"","last-modified":"Thu, 19 May 2022 01:59:55 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8a/35/11559ac769e79e13cbc493b7586224212c15b07c9d3c4787777408a5767b b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8a/35/11559ac769e79e13cbc493b7586224212c15b07c9d3c4787777408a5767b new file mode 100644 index 0000000000000000000000000000000000000000..8e23a9dac262c17c68c5a9fc661b293f32b244df --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8a/35/11559ac769e79e13cbc493b7586224212c15b07c9d3c4787777408a5767b @@ -0,0 +1,2 @@ + +8c8139663cb87f370d5459e9a97727f1f89edbad {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz","integrity":"sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==","time":1755918081206,"size":7997,"metadata":{"time":1755918081144,"url":"https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"515274a1ced8ca09771520430664e36d\"","last-modified":"Mon, 29 Nov 2021 11:32:59 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8a/42/8081150db250899f3516a953ef8abc9669fe86d6d1fe00cb58ca90292267 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8a/42/8081150db250899f3516a953ef8abc9669fe86d6d1fe00cb58ca90292267 new file mode 100644 index 0000000000000000000000000000000000000000..00fe744940713009a206f63b036e37363de36848 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8a/42/8081150db250899f3516a953ef8abc9669fe86d6d1fe00cb58ca90292267 @@ -0,0 +1,4 @@ + +0b1958a23a012ef8dcec72b55d7e939c6bfb1f52 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ajv-formats","integrity":"sha512-WIFhk4flGyoQ3ownUeAQBu+/mzoHfyhZz3uNw9Ft2kx9CY7VVgR2lBnAa49N95JlWDkoEd98Vwpljnb5XI5s9w==","time":1755925568963,"size":141264,"metadata":{"time":1755925568963,"url":"https://registry.npmjs.org/ajv-formats","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"7cb6e9065ee3c3e8ce5bd4716df9f1c8\"","last-modified":"Sat, 30 Mar 2024 11:30:28 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +b64bbf1799c71da95a7f1ccd688534b273480051 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ajv-formats","integrity":"sha512-WIFhk4flGyoQ3ownUeAQBu+/mzoHfyhZz3uNw9Ft2kx9CY7VVgR2lBnAa49N95JlWDkoEd98Vwpljnb5XI5s9w==","time":1755928556208,"size":141264,"metadata":{"time":1755928556208,"url":"https://registry.npmjs.org/ajv-formats","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"7cb6e9065ee3c3e8ce5bd4716df9f1c8\"","last-modified":"Sat, 30 Mar 2024 11:30:28 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +d6c68ec6219796c3a0c6fd0ea571b9e701b91b56 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ajv-formats","integrity":"sha512-WIFhk4flGyoQ3ownUeAQBu+/mzoHfyhZz3uNw9Ft2kx9CY7VVgR2lBnAa49N95JlWDkoEd98Vwpljnb5XI5s9w==","time":1755928556212,"size":141264,"metadata":{"time":1755928556212,"url":"https://registry.npmjs.org/ajv-formats","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"7cb6e9065ee3c3e8ce5bd4716df9f1c8\"","last-modified":"Sat, 30 Mar 2024 11:30:28 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8a/c9/c10bf71d66461aba0899e81d7a146332c45dbbacb1693c38fc2e4e578e39 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8a/c9/c10bf71d66461aba0899e81d7a146332c45dbbacb1693c38fc2e4e578e39 new file mode 100644 index 0000000000000000000000000000000000000000..dfe268876fd744c366b5740035b8d2dfd857efc2 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8a/c9/c10bf71d66461aba0899e81d7a146332c45dbbacb1693c38fc2e4e578e39 @@ -0,0 +1,2 @@ + +d62bfe781b75d4b6a65de435a68964e291d3c7c9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz","integrity":"sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==","time":1755918026938,"size":2169,"metadata":{"time":1755918026897,"url":"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"87c5848714e5ed8e25abbdc13cfe3995\"","last-modified":"Mon, 18 Mar 2019 08:09:09 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8b/7b/8d3bc95b103d1140cbfaf2004fe4b30cdd491321694be91b38c040b6bdc6 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8b/7b/8d3bc95b103d1140cbfaf2004fe4b30cdd491321694be91b38c040b6bdc6 new file mode 100644 index 0000000000000000000000000000000000000000..6aeb342529d04caf4f27c50d792813f57bf5c371 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8b/7b/8d3bc95b103d1140cbfaf2004fe4b30cdd491321694be91b38c040b6bdc6 @@ -0,0 +1,2 @@ + +8b359a2adb6f125474cef9f67abcfd184f25e8a8 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz","integrity":"sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==","time":1755918081546,"size":3827,"metadata":{"time":1755918081491,"url":"https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"1e0a8f0a1d27f7994bd0b9caecc095c6\"","last-modified":"Mon, 21 Jul 2025 17:21:50 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8b/94/5f7de7e6cd67cf8703742fcd051412cc92599461da6defab599f25fa1455 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8b/94/5f7de7e6cd67cf8703742fcd051412cc92599461da6defab599f25fa1455 new file mode 100644 index 0000000000000000000000000000000000000000..253a1df05e57101b5dc79860efc7641ef3c58472 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8b/94/5f7de7e6cd67cf8703742fcd051412cc92599461da6defab599f25fa1455 @@ -0,0 +1,3 @@ + +bd872be9729c6d2a5b31d12b1985325b423dc9d5 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/rfdc","integrity":"sha512-Hijw5R25Pppl/nxOC49Ya8Vm/3afuh3yqd4Js0JPC1fgluwHt10TSn1k0KKsI2NV0NnDBoKj72Q9X3/0MCLIHg==","time":1755925566637,"size":45382,"metadata":{"time":1755925566637,"url":"https://registry.npmjs.org/rfdc","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"c95192e219f336a9aac29055f2336915\"","last-modified":"Wed, 12 Jun 2024 10:18:31 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +967ae677b6569270129736cf51a1b1ba2f2bc79d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/rfdc","integrity":"sha512-Hijw5R25Pppl/nxOC49Ya8Vm/3afuh3yqd4Js0JPC1fgluwHt10TSn1k0KKsI2NV0NnDBoKj72Q9X3/0MCLIHg==","time":1755928555957,"size":45382,"metadata":{"time":1755928555957,"url":"https://registry.npmjs.org/rfdc","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"c95192e219f336a9aac29055f2336915\"","last-modified":"Wed, 12 Jun 2024 10:18:31 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/09/b8f5ca2fb119384681b46ab4e23e4621b770a9043991348d533c215b4433 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/09/b8f5ca2fb119384681b46ab4e23e4621b770a9043991348d533c215b4433 new file mode 100644 index 0000000000000000000000000000000000000000..98d2b2ae0aad0ba4c1f878c419537ac5960b92a3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/09/b8f5ca2fb119384681b46ab4e23e4621b770a9043991348d533c215b4433 @@ -0,0 +1,3 @@ + +1d2b2a24c9d85e92458cfc6fe9d439c3fd985151 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/function-bind","integrity":"sha512-KHH8St2QS2qHu0qzOlTCAoHlLdlEI2widcSpJb1dAYYs2PeGNc5Bbo2EVAEtZzbfZcNDsqzLvTZt0chYkR6tKA==","time":1755924830900,"size":15733,"metadata":{"time":1755924830900,"url":"https://registry.npmjs.org/function-bind","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:50 GMT","etag":"\"3da7b145262543da2a70cc173d2842cf\"","last-modified":"Thu, 12 Oct 2023 19:08:21 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +cbe600cd31f8461cfa2f82a95d21ecbbf28f2565 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/function-bind","integrity":"sha512-KHH8St2QS2qHu0qzOlTCAoHlLdlEI2widcSpJb1dAYYs2PeGNc5Bbo2EVAEtZzbfZcNDsqzLvTZt0chYkR6tKA==","time":1755925571477,"size":15733,"metadata":{"time":1755925571477,"url":"https://registry.npmjs.org/function-bind","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:11 GMT","etag":"\"3da7b145262543da2a70cc173d2842cf\"","last-modified":"Thu, 12 Oct 2023 19:08:21 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/2c/bf742c29757d7367d6a3aeb1fdc6d85b963e45fd23b6557f6f3b2b98eb14 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/2c/bf742c29757d7367d6a3aeb1fdc6d85b963e45fd23b6557f6f3b2b98eb14 new file mode 100644 index 0000000000000000000000000000000000000000..f68c400583aae4e0d9bf84d30ab4734a6421b4ca --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/2c/bf742c29757d7367d6a3aeb1fdc6d85b963e45fd23b6557f6f3b2b98eb14 @@ -0,0 +1,3 @@ + +5b94901ff1b7b545ba3b548bd3c3d8f2b93c1ab0 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/color-convert","integrity":"sha512-D3ilgJncSjJ4EdY8Z4zB+QIiSvqtVcT7jhiu0KAoNe9mdPWslnDUC+0l3MEJ/cOD5zn8D4OlZnglgl0sdx8Rjw==","time":1755925571512,"size":68789,"metadata":{"time":1755925571512,"url":"https://registry.npmjs.org/color-convert","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:11 GMT","etag":"\"cd895b04550f08c4db9bc552cf5ec068\"","last-modified":"Tue, 13 May 2025 10:03:16 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +786364ff84b3af851fa99490ba69b4fa794e83ee {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/color-convert","integrity":"sha512-D3ilgJncSjJ4EdY8Z4zB+QIiSvqtVcT7jhiu0KAoNe9mdPWslnDUC+0l3MEJ/cOD5zn8D4OlZnglgl0sdx8Rjw==","time":1755928558102,"size":68789,"metadata":{"time":1755928558102,"url":"https://registry.npmjs.org/color-convert","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:58 GMT","etag":"\"cd895b04550f08c4db9bc552cf5ec068\"","last-modified":"Tue, 13 May 2025 10:03:16 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/b2/efb98333ec63b6ca87cb7ae75f9390fcea80b2f93321dfa7e712deeea8ef b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/b2/efb98333ec63b6ca87cb7ae75f9390fcea80b2f93321dfa7e712deeea8ef new file mode 100644 index 0000000000000000000000000000000000000000..cfd83afef6e76759baca6300f49f74282cf3b552 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/b2/efb98333ec63b6ca87cb7ae75f9390fcea80b2f93321dfa7e712deeea8ef @@ -0,0 +1,3 @@ + +20eb127c96f29d8f41fa6cf9cc62a2d779d0b4b9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/is-extglob","integrity":"sha512-6GVPmaAi/5K0mMD2DEvR25KFiRocP8EYBk05QAF6+JMO+mBnF5xY3kNUIti/L2CjEjha/Z0knY735z4S2RUDTg==","time":1755924830625,"size":11766,"metadata":{"time":1755924830625,"url":"https://registry.npmjs.org/is-extglob","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:50 GMT","etag":"\"e047e828ff919b5d5131943b1b98f23b\"","last-modified":"Thu, 22 Jun 2023 16:32:25 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +6d741a19f1ea28677a6892a8049cbe4c99c5e415 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/is-extglob","integrity":"sha512-6GVPmaAi/5K0mMD2DEvR25KFiRocP8EYBk05QAF6+JMO+mBnF5xY3kNUIti/L2CjEjha/Z0knY735z4S2RUDTg==","time":1755925571214,"size":11766,"metadata":{"time":1755925571214,"url":"https://registry.npmjs.org/is-extglob","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:11 GMT","etag":"\"e047e828ff919b5d5131943b1b98f23b\"","last-modified":"Thu, 22 Jun 2023 16:32:25 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/f8/aefda99ca03a1004596e312ea5d597c682502fb85fe4283d6c1079cacd8f b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/f8/aefda99ca03a1004596e312ea5d597c682502fb85fe4283d6c1079cacd8f new file mode 100644 index 0000000000000000000000000000000000000000..3749b634fa00ca76b0e43a6a47584c64a8c8d63c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8d/f8/aefda99ca03a1004596e312ea5d597c682502fb85fe4283d6c1079cacd8f @@ -0,0 +1,2 @@ + +615de8b4944bbc88371629742bba9b0cacca0171 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz","integrity":"sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==","time":1755918027188,"size":3656,"metadata":{"time":1755918027130,"url":"https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"3eb7d86abccbf3ebe982f49c602d3a3b\"","last-modified":"Mon, 08 Jun 2020 07:27:32 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8e/58/1ce1355f39c75fa063f8dc1c958c11d57446438253b206afc18efb9f28c9 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8e/58/1ce1355f39c75fa063f8dc1c958c11d57446438253b206afc18efb9f28c9 new file mode 100644 index 0000000000000000000000000000000000000000..96de9ac0de39f4344d7e620dff4074771e842031 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/8e/58/1ce1355f39c75fa063f8dc1c958c11d57446438253b206afc18efb9f28c9 @@ -0,0 +1,4 @@ + +fe28fa7a63a759654c896053e10066803ad015b8 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ansi-styles","integrity":"sha512-CZGwNVzA/NAh+UPiPEWpl5sMK/B2sT0q5LM8O6KeYl1mLoQmOP6+vOqQnjQ6baDkaqtpzbaL6NxSdzrk31RoLg==","time":1755925570524,"size":66356,"metadata":{"time":1755925570524,"url":"https://registry.npmjs.org/ansi-styles","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"61c554c747ebb0ad82da58a4e5ea595e\"","last-modified":"Wed, 10 May 2023 18:27:55 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +be1c3d91b0a9d5a674b053b86cf4538a2b69a322 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ansi-styles","integrity":"sha512-CZGwNVzA/NAh+UPiPEWpl5sMK/B2sT0q5LM8O6KeYl1mLoQmOP6+vOqQnjQ6baDkaqtpzbaL6NxSdzrk31RoLg==","time":1755928556964,"size":66356,"metadata":{"time":1755928556964,"url":"https://registry.npmjs.org/ansi-styles","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"61c554c747ebb0ad82da58a4e5ea595e\"","last-modified":"Wed, 10 May 2023 18:27:55 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +e1329b8d5308fc8526832dcebdcdee0070f86849 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ansi-styles","integrity":"sha512-CZGwNVzA/NAh+UPiPEWpl5sMK/B2sT0q5LM8O6KeYl1mLoQmOP6+vOqQnjQ6baDkaqtpzbaL6NxSdzrk31RoLg==","time":1755928556972,"size":66356,"metadata":{"time":1755928556972,"url":"https://registry.npmjs.org/ansi-styles","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"61c554c747ebb0ad82da58a4e5ea595e\"","last-modified":"Wed, 10 May 2023 18:27:55 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/90/19/d7bcee8d73b8c94cd74f7f944350d559be7932df220976335b0ffabc8447 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/90/19/d7bcee8d73b8c94cd74f7f944350d559be7932df220976335b0ffabc8447 new file mode 100644 index 0000000000000000000000000000000000000000..7ff2535b02c8afeb9d80dd9720d6ccb5c7b080c6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/90/19/d7bcee8d73b8c94cd74f7f944350d559be7932df220976335b0ffabc8447 @@ -0,0 +1,3 @@ + +220f1971e2cbef29774c548039a3a60bd30eb24f {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/is-stream","integrity":"sha512-yXzVzS0hio8gs1/G8F0nbxADxN6KXz1Zok1pmeGX2zCDdCDj/LN6i9IXOHDQtG0PBOKr3PXpwO30227viXDsJw==","time":1755925570960,"size":18582,"metadata":{"time":1755925570960,"url":"https://registry.npmjs.org/is-stream","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"5fd4fae9deef197cf2292a97444afcc2\"","last-modified":"Mon, 19 Feb 2024 19:14:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +15d71f0b5ecf92b7b1df3117ae02afe111bf91ba {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/is-stream","integrity":"sha512-yXzVzS0hio8gs1/G8F0nbxADxN6KXz1Zok1pmeGX2zCDdCDj/LN6i9IXOHDQtG0PBOKr3PXpwO30227viXDsJw==","time":1755928558141,"size":18582,"metadata":{"time":1755928558141,"url":"https://registry.npmjs.org/is-stream","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:58 GMT","etag":"\"5fd4fae9deef197cf2292a97444afcc2\"","last-modified":"Mon, 19 Feb 2024 19:14:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/91/08/56fc6b8aa67287e6e60a90a5e8bd6500ef9e97a317a38b324cca616a7d25 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/91/08/56fc6b8aa67287e6e60a90a5e8bd6500ef9e97a317a38b324cca616a7d25 new file mode 100644 index 0000000000000000000000000000000000000000..c59316182f6a38277b6f0f961f3bbe780ba09901 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/91/08/56fc6b8aa67287e6e60a90a5e8bd6500ef9e97a317a38b324cca616a7d25 @@ -0,0 +1,2 @@ + +3c6d0c55ffc42b660c219852ed889aa7bd7d2e76 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz","integrity":"sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==","time":1755918082631,"size":3545,"metadata":{"time":1755918082624,"url":"https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"91524a0e225762cc8e0adf407991e351\"","last-modified":"Fri, 18 Apr 2025 18:55:34 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/91/27/f806eee9a12eb15d6c79ebfee2c0abd15154dcf1749c0bb8012ac75eb5d5 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/91/27/f806eee9a12eb15d6c79ebfee2c0abd15154dcf1749c0bb8012ac75eb5d5 new file mode 100644 index 0000000000000000000000000000000000000000..ff84aa42d754244862ebea31372b2b5f30fbf28a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/91/27/f806eee9a12eb15d6c79ebfee2c0abd15154dcf1749c0bb8012ac75eb5d5 @@ -0,0 +1,3 @@ + +a786deaa4420418d6a7c3fc796674177dd969866 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/isexe","integrity":"sha512-q2ycGuXDDKwXBd7Hi75LPEvS5rqr+EEB7dNFAjQWxzrMJ612AoKI0rV6UCiue0pzMfgd1PXWqFQXX43+JJk2Eg==","time":1755925570279,"size":19340,"metadata":{"time":1755925570279,"url":"https://registry.npmjs.org/isexe","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"28a0ed5c78245aa37ff0d0ebba6fe280\"","last-modified":"Wed, 02 Aug 2023 18:27:44 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +89f9f7537f1f66c16dc6aa2a9550c18ab3f18e15 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/isexe","integrity":"sha512-q2ycGuXDDKwXBd7Hi75LPEvS5rqr+EEB7dNFAjQWxzrMJ612AoKI0rV6UCiue0pzMfgd1PXWqFQXX43+JJk2Eg==","time":1755928556714,"size":19340,"metadata":{"time":1755928556714,"url":"https://registry.npmjs.org/isexe","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"28a0ed5c78245aa37ff0d0ebba6fe280\"","last-modified":"Wed, 02 Aug 2023 18:27:44 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/93/18/fac411daaa027b50e4e471e9cab14cf9eb00a212c4c10143107e72f35e16 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/93/18/fac411daaa027b50e4e471e9cab14cf9eb00a212c4c10143107e72f35e16 new file mode 100644 index 0000000000000000000000000000000000000000..f62c311959803b013d4c7d5a93800e21b46edb60 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/93/18/fac411daaa027b50e4e471e9cab14cf9eb00a212c4c10143107e72f35e16 @@ -0,0 +1,2 @@ + +f483da08a408bb452f7a58605616ed10b46bff48 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz","integrity":"sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==","time":1755918082361,"size":9319,"metadata":{"time":1755918082358,"url":"https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"10bcb90865ab12a81b1b0b7501bdc887\"","last-modified":"Mon, 28 Oct 2024 13:56:03 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/95/0b/a7bd89d5e50b639d5d8ce521aa97b6d3195447b72a7ff9d2c0d1812f7be0 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/95/0b/a7bd89d5e50b639d5d8ce521aa97b6d3195447b72a7ff9d2c0d1812f7be0 new file mode 100644 index 0000000000000000000000000000000000000000..41bb12389e8d2a848860060a9aee628671ce9504 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/95/0b/a7bd89d5e50b639d5d8ce521aa97b6d3195447b72a7ff9d2c0d1812f7be0 @@ -0,0 +1,2 @@ + +8e7872b74f0ddb8bc229aeaee2984ddd2ed5324e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz","integrity":"sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==","time":1755918026989,"size":4853,"metadata":{"time":1755918026943,"url":"https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"b10ba1a21ff8ef737fe83ca5f33684a0\"","last-modified":"Tue, 19 Jul 2022 17:02:07 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/95/20/216edd7104928342f4e596f226b589b3733c83a5c056ece5738890de4460 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/95/20/216edd7104928342f4e596f226b589b3733c83a5c056ece5738890de4460 new file mode 100644 index 0000000000000000000000000000000000000000..bb3b3a534bb9cb95334462a4522292fb53b4c7f8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/95/20/216edd7104928342f4e596f226b589b3733c83a5c056ece5738890de4460 @@ -0,0 +1,2 @@ + +c9f7857e0b3c0515875851e3c1ff3c344b00ac37 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz","integrity":"sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==","time":1755918081427,"size":6318,"metadata":{"time":1755918081362,"url":"https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"7c847271886a3d27ac1fb9f8c1854888\"","last-modified":"Sat, 14 Dec 2019 16:18:01 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/96/b2/20caa7361dceb89faadc7a9156eebf36d46ab0c90f7f14784f17890601af b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/96/b2/20caa7361dceb89faadc7a9156eebf36d46ab0c90f7f14784f17890601af new file mode 100644 index 0000000000000000000000000000000000000000..22bb71a066fe4e14434fdda7b3dbd82604706964 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/96/b2/20caa7361dceb89faadc7a9156eebf36d46ab0c90f7f14784f17890601af @@ -0,0 +1,2 @@ + +2fa101a883fe5ea19d922c10efba56bb9bda62e7 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz","integrity":"sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==","time":1755918081713,"size":130851,"metadata":{"time":1755918081480,"url":"https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"a6e5e307ae10aefc9aa7990abd0a5510\"","last-modified":"Sun, 08 Jun 2025 16:23:06 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/9d/4b/4d852d0fff5d6f90e7626b495a01cdbcdb12d72712e817aa364a738da85f b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/9d/4b/4d852d0fff5d6f90e7626b495a01cdbcdb12d72712e817aa364a738da85f new file mode 100644 index 0000000000000000000000000000000000000000..52c7ea973982f302012cdd9f55635a1480928a86 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/9d/4b/4d852d0fff5d6f90e7626b495a01cdbcdb12d72712e817aa364a738da85f @@ -0,0 +1,3 @@ + +95138338180105d819c722bd508800a0778c1f05 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/set-cookie-parser","integrity":"sha512-1DnnoCJHDkACdiWmLOYlkfE2ackgotC+J+y7cA8uCeDOCn0R+iI13Ch+8wb2h0nlY20b08t8yEs5c+XTl6DgYA==","time":1755925568980,"size":65405,"metadata":{"time":1755925568980,"url":"https://registry.npmjs.org/set-cookie-parser","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"d7d33bcaeb7d732569de3e830cc461d7\"","last-modified":"Mon, 21 Oct 2024 18:25:37 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +aae741906ce00a588ab6322a5e4a1a4f8fcd99c6 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/set-cookie-parser","integrity":"sha512-1DnnoCJHDkACdiWmLOYlkfE2ackgotC+J+y7cA8uCeDOCn0R+iI13Ch+8wb2h0nlY20b08t8yEs5c+XTl6DgYA==","time":1755928556254,"size":65405,"metadata":{"time":1755928556254,"url":"https://registry.npmjs.org/set-cookie-parser","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"d7d33bcaeb7d732569de3e830cc461d7\"","last-modified":"Mon, 21 Oct 2024 18:25:37 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/9e/ed/3f11b65b50bf14c6fce46e7d0fae72d4244c0d83caea4c7c48a285dec8e1 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/9e/ed/3f11b65b50bf14c6fce46e7d0fae72d4244c0d83caea4c7c48a285dec8e1 new file mode 100644 index 0000000000000000000000000000000000000000..ca0f15e03fcb89d3e13a799f75f354401eb5c532 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/9e/ed/3f11b65b50bf14c6fce46e7d0fae72d4244c0d83caea4c7c48a285dec8e1 @@ -0,0 +1,2 @@ + +e5a041208f9ddc82297678b7f465dbf629927b9e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz","integrity":"sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==","time":1755918027011,"size":4046,"metadata":{"time":1755918026983,"url":"https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"9d7dec2c46613400992e6b9ed13175c1\"","last-modified":"Wed, 03 Jun 2020 06:39:22 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/9f/80/5095f1e4a4f144a1b7c5af323372bb7f512b212ebf4de91c8d3ade240d0e b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/9f/80/5095f1e4a4f144a1b7c5af323372bb7f512b212ebf4de91c8d3ade240d0e new file mode 100644 index 0000000000000000000000000000000000000000..5e5939d3d60f38060d77a173c3d2f4b9a9ae7143 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/9f/80/5095f1e4a4f144a1b7c5af323372bb7f512b212ebf4de91c8d3ade240d0e @@ -0,0 +1,3 @@ + +9e23a296b6ae6b418bc23e0d20d4197c55082d90 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2fwin32-ia32","integrity":"sha512-L6hvM+MCifurerT3zlW5CwyHCpFuCKEi1NhwOqUKIr/GN7hJ75UqvKr4sU+mNGW1NGoF2OOwrO+LifTSvMHSBA==","time":1755924829156,"size":175575,"metadata":{"time":1755924829156,"url":"https://registry.npmjs.org/@esbuild%2fwin32-ia32","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:49 GMT","etag":"\"4ba0582e910b0ee49251db33a08f1cd5\"","last-modified":"Tue, 12 Aug 2025 23:25:45 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +a9733edf3aa1fe38145aca2fb08303d59171f4dc {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2fwin32-ia32","integrity":"sha512-L6hvM+MCifurerT3zlW5CwyHCpFuCKEi1NhwOqUKIr/GN7hJ75UqvKr4sU+mNGW1NGoF2OOwrO+LifTSvMHSBA==","time":1755925566651,"size":175575,"metadata":{"time":1755925566651,"url":"https://registry.npmjs.org/@esbuild%2fwin32-ia32","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"4ba0582e910b0ee49251db33a08f1cd5\"","last-modified":"Tue, 12 Aug 2025 23:25:45 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ab/a8/ddf6a9f015bcc6ea4fecd6985f823870ab1939c2ca927df5176588924247 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ab/a8/ddf6a9f015bcc6ea4fecd6985f823870ab1939c2ca927df5176588924247 new file mode 100644 index 0000000000000000000000000000000000000000..9bb57315672e551a8dd99a442f7095d6920799de --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ab/a8/ddf6a9f015bcc6ea4fecd6985f823870ab1939c2ca927df5176588924247 @@ -0,0 +1,3 @@ + +bf459485424b668780880b6b9de75aa2d4281be5 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/thread-stream","integrity":"sha512-Kf6pCQ8m4nuh3aLLQzVI/ok0JrrSyyYdf2BiqYG2bZMjqqUc+bt/0WNuJwJZNXE9rX0teGsy6ww/4ka54F+7Ow==","time":1755925568994,"size":125389,"metadata":{"time":1755925568994,"url":"https://registry.npmjs.org/thread-stream","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"386585a0eb338c36c6a3b12c4274ad80\"","last-modified":"Thu, 13 Jun 2024 15:39:13 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +b25da8fbf95508a6dc2615363371c6398f86c665 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/thread-stream","integrity":"sha512-Kf6pCQ8m4nuh3aLLQzVI/ok0JrrSyyYdf2BiqYG2bZMjqqUc+bt/0WNuJwJZNXE9rX0teGsy6ww/4ka54F+7Ow==","time":1755928556234,"size":125389,"metadata":{"time":1755928556234,"url":"https://registry.npmjs.org/thread-stream","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"386585a0eb338c36c6a3b12c4274ad80\"","last-modified":"Thu, 13 Jun 2024 15:39:13 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/af/8a/d90cfcd33a9895fbbb880406407aee65cd5b37556b94baafb95ba5cb93dd b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/af/8a/d90cfcd33a9895fbbb880406407aee65cd5b37556b94baafb95ba5cb93dd new file mode 100644 index 0000000000000000000000000000000000000000..42e5528dfff7805cb3bc1e9da7ca1b58523e2d96 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/af/8a/d90cfcd33a9895fbbb880406407aee65cd5b37556b94baafb95ba5cb93dd @@ -0,0 +1,2 @@ + +a5e08886f8f0e94d50cdcf03b3061bf024590ff9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.5.tgz","integrity":"sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==","time":1755918082762,"size":7898,"metadata":{"time":1755918082752,"url":"https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.5.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"eccc15a41b8118e7d4c005d096fe5cee\"","last-modified":"Wed, 13 Aug 2025 20:47:31 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/bc/7a/89570c3e880bd005b08bcb7ab6f495514f0f414ea49b9c7925da85a9765d b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/bc/7a/89570c3e880bd005b08bcb7ab6f495514f0f414ea49b9c7925da85a9765d new file mode 100644 index 0000000000000000000000000000000000000000..8d53aabf5a411b8549377dba2813202bb306825c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/bc/7a/89570c3e880bd005b08bcb7ab6f495514f0f414ea49b9c7925da85a9765d @@ -0,0 +1,2 @@ + +b2364c451b7e1bab8a1a42ae1f11c169109c8949 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz","integrity":"sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==","time":1755918082540,"size":16791,"metadata":{"time":1755918082537,"url":"https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"797b05fba4792a9deb52384aa4f808a7\"","last-modified":"Wed, 25 Jun 2025 14:04:22 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/be/71/9b933c9ec272965e30340b02b39ceeab31a5a422dae48ef8edfced8f6bfd b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/be/71/9b933c9ec272965e30340b02b39ceeab31a5a422dae48ef8edfced8f6bfd new file mode 100644 index 0000000000000000000000000000000000000000..fc90aff6ab6dff4f88b4855949ca78d969a6fb01 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/be/71/9b933c9ec272965e30340b02b39ceeab31a5a422dae48ef8edfced8f6bfd @@ -0,0 +1,3 @@ + +442252928d13d7a30a4fe31eb9c55464884e0ec4 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/pino-rotating-file-stream","integrity":"sha512-+Vy3FI1N+dU0wv14Q0QCA38+0BF5BOr3AReIsZGMADfQq+3/Fyst/H4oYYgGmnmiW0l247F1bu3Z5wcDWbw++w==","time":1755925564319,"size":8497,"metadata":{"time":1755925564319,"url":"https://registry.npmjs.org/pino-rotating-file-stream","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:04 GMT","etag":"\"425e049abbea7579d5155a85a70912f5\"","last-modified":"Wed, 17 May 2023 10:16:42 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +5b48233a50491920a447bd07163f395f4b126778 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/pino-rotating-file-stream","integrity":"sha512-+Vy3FI1N+dU0wv14Q0QCA38+0BF5BOr3AReIsZGMADfQq+3/Fyst/H4oYYgGmnmiW0l247F1bu3Z5wcDWbw++w==","time":1755928553059,"size":8497,"metadata":{"time":1755928553059,"url":"https://registry.npmjs.org/pino-rotating-file-stream","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:53 GMT","etag":"\"425e049abbea7579d5155a85a70912f5\"","last-modified":"Wed, 17 May 2023 10:16:42 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c4/87/d895ad5d2b6bef36175481711e886dfbdf5385ec3e1b49ba78a4e9988972 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c4/87/d895ad5d2b6bef36175481711e886dfbdf5385ec3e1b49ba78a4e9988972 new file mode 100644 index 0000000000000000000000000000000000000000..885e27db5bf1a0f6eb7acad7091958e5a980c349 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c4/87/d895ad5d2b6bef36175481711e886dfbdf5385ec3e1b49ba78a4e9988972 @@ -0,0 +1,3 @@ + +6a79219fd8e63f12a0e573443033c5ebf2077fdf {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/require-from-string","integrity":"sha512-qcUchwV8BkRS1skHMUyTL2d6qesvb0ifoQUaf4yYQvu9YRocfYxVLraosH5FkXj0PKqNWMfF2QiRmL0H8FC6Ow==","time":1755925569852,"size":15128,"metadata":{"time":1755925569852,"url":"https://registry.npmjs.org/require-from-string","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:09 GMT","etag":"\"0f3036b4fe001e0d5d594e9f2a0316ae\"","last-modified":"Sun, 26 Jun 2022 11:37:27 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +3b59b6e042d2539e2128cc1786c353c391d5e591 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/require-from-string","integrity":"sha512-qcUchwV8BkRS1skHMUyTL2d6qesvb0ifoQUaf4yYQvu9YRocfYxVLraosH5FkXj0PKqNWMfF2QiRmL0H8FC6Ow==","time":1755928556466,"size":15128,"metadata":{"time":1755928556466,"url":"https://registry.npmjs.org/require-from-string","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"0f3036b4fe001e0d5d594e9f2a0316ae\"","last-modified":"Sun, 26 Jun 2022 11:37:27 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c6/ae/c6b312c5b3d2477e97dcc46a8c8c79017b9de107773783db593768f65d8d b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c6/ae/c6b312c5b3d2477e97dcc46a8c8c79017b9de107773783db593768f65d8d new file mode 100644 index 0000000000000000000000000000000000000000..76a04490859d71753639b3c61a1740ad01602dc8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c6/ae/c6b312c5b3d2477e97dcc46a8c8c79017b9de107773783db593768f65d8d @@ -0,0 +1,2 @@ + +d1596f6f27e0b85de95fefaa4f2c8c7973d17fc0 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz","integrity":"sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==","time":1755918027190,"size":21135,"metadata":{"time":1755918027138,"url":"https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"a31f21ede7f755266f897373e729e106\"","last-modified":"Mon, 20 Jan 2025 20:22:56 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c9/80/5176c8bafdeb76fbf895be967ac6b3c130a2cf8ac9c8a270923da5de987d b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c9/80/5176c8bafdeb76fbf895be967ac6b3c130a2cf8ac9c8a270923da5de987d new file mode 100644 index 0000000000000000000000000000000000000000..3e836932879f8f22c4f52221459fc655f00278b0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c9/80/5176c8bafdeb76fbf895be967ac6b3c130a2cf8ac9c8a270923da5de987d @@ -0,0 +1,3 @@ + +5d6ce155b2f6b68162dc4f5c021d9d3b3838fde6 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/cross-spawn","integrity":"sha512-JqL6MJG0sk/BkIZa7sLXUjtf9xoSNFLweNMuCmmgcF9Q4qxks9aoaM4mTLVdnzZD7TDtYlOFAsGVbgKxob37TQ==","time":1755925569971,"size":109066,"metadata":{"time":1755925569971,"url":"https://registry.npmjs.org/cross-spawn","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:09 GMT","etag":"\"e4706eff07ac4d767c2c5e32370ca537\"","last-modified":"Mon, 18 Nov 2024 14:21:36 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +19e479cbda4cee339b6d09bcc2448552c491b95a {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/cross-spawn","integrity":"sha512-JqL6MJG0sk/BkIZa7sLXUjtf9xoSNFLweNMuCmmgcF9Q4qxks9aoaM4mTLVdnzZD7TDtYlOFAsGVbgKxob37TQ==","time":1755928556602,"size":109066,"metadata":{"time":1755928556602,"url":"https://registry.npmjs.org/cross-spawn","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"e4706eff07ac4d767c2c5e32370ca537\"","last-modified":"Mon, 18 Nov 2024 14:21:36 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c9/aa/ff4a9d4f04615afa5e418b8f4cce2516fa2d97a1e492efa13865126e12ad b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c9/aa/ff4a9d4f04615afa5e418b8f4cce2516fa2d97a1e492efa13865126e12ad new file mode 100644 index 0000000000000000000000000000000000000000..ceaa1d0e96485c15057766446d0813ba10757ec9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/c9/aa/ff4a9d4f04615afa5e418b8f4cce2516fa2d97a1e492efa13865126e12ad @@ -0,0 +1,2 @@ + +e6b806f4536be3a3b2b696f433f33fea1c368a80 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.4.tgz","integrity":"sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==","time":1755918083249,"size":15263,"metadata":{"time":1755918083246,"url":"https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.4.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:23 GMT","etag":"\"c3c5522589e1ee1a2696d6d2f8b7d99b\"","last-modified":"Mon, 21 Jul 2025 15:31:43 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ca/4c/260eacf3afb11e53217a1f604d7c6c0a6edf8c88fb90a6bf26e78a135396 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ca/4c/260eacf3afb11e53217a1f604d7c6c0a6edf8c88fb90a6bf26e78a135396 new file mode 100644 index 0000000000000000000000000000000000000000..fd5410991b723e74ba5f4fdb88e62bf61c35b2bb --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ca/4c/260eacf3afb11e53217a1f604d7c6c0a6edf8c88fb90a6bf26e78a135396 @@ -0,0 +1,3 @@ + +d0f73c893b5b0e4e4e2e0dab37ae2b7f694354bf {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/gcp-metadata","integrity":"sha512-hRsjlzadDFMn1U114UXtxgL6190Kt8FSAk4mmvOj+nuEn8F3oOclJ93qmgZ5uv0Qmsg4IBWIMuIKgvsOQ9LFtw==","time":1755925568886,"size":182287,"metadata":{"time":1755925568886,"url":"https://registry.npmjs.org/gcp-metadata","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"0cc184a8477be007d6109f6744bfef5f\"","last-modified":"Wed, 25 Jun 2025 18:10:55 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +eb8c7c60a2929967d3af57e26226e2740c40ee2e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/gcp-metadata","integrity":"sha512-hRsjlzadDFMn1U114UXtxgL6190Kt8FSAk4mmvOj+nuEn8F3oOclJ93qmgZ5uv0Qmsg4IBWIMuIKgvsOQ9LFtw==","time":1755928555964,"size":182287,"metadata":{"time":1755928555964,"url":"https://registry.npmjs.org/gcp-metadata","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"0cc184a8477be007d6109f6744bfef5f\"","last-modified":"Wed, 25 Jun 2025 18:10:55 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ca/98/29ae16b7b413d7a609c6beba2ab22ac51a8f88aa3c3a36759292907ce3ac b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ca/98/29ae16b7b413d7a609c6beba2ab22ac51a8f88aa3c3a36759292907ce3ac new file mode 100644 index 0000000000000000000000000000000000000000..692e40a84126a7b01e3d0e0cdb4e1b0987a5c1cc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ca/98/29ae16b7b413d7a609c6beba2ab22ac51a8f88aa3c3a36759292907ce3ac @@ -0,0 +1,2 @@ + +41d504b87c4ab5fe136e48d04a963ab0e8789d7b {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz","integrity":"sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==","time":1755918081518,"size":6219,"metadata":{"time":1755918081425,"url":"https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"ac723582acb34a6ffae7139cbbd432c5\"","last-modified":"Tue, 26 Nov 2024 08:20:36 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cb/26/8e0f2dc7ddc5651ed0ea55c0d943822a49d07ef18951ebf2e1dd8d86a75c b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cb/26/8e0f2dc7ddc5651ed0ea55c0d943822a49d07ef18951ebf2e1dd8d86a75c new file mode 100644 index 0000000000000000000000000000000000000000..97d19346a306588851b2c8140325dd32fee17050 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cb/26/8e0f2dc7ddc5651ed0ea55c0d943822a49d07ef18951ebf2e1dd8d86a75c @@ -0,0 +1,2 @@ + +92a19bb40998e36848ff4c4ec91a17fec4f5ef37 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz","integrity":"sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==","time":1755918082626,"size":18162,"metadata":{"time":1755918082600,"url":"https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"deb3f2f4bb4caf3e238c61d9420237a6\"","last-modified":"Tue, 06 May 2025 15:33:51 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cb/5c/2336f9537ddec93e64594898981eb651daf7282d1f305ae3ab4752b9a5e4 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cb/5c/2336f9537ddec93e64594898981eb651daf7282d1f305ae3ab4752b9a5e4 new file mode 100644 index 0000000000000000000000000000000000000000..e4b26d25eb3564ee762048dc6bab364742f774d5 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cb/5c/2336f9537ddec93e64594898981eb651daf7282d1f305ae3ab4752b9a5e4 @@ -0,0 +1,2 @@ + +d87c499ff6ad72413795f83075085f615eaed11b {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/debug/-/debug-4.4.1.tgz","integrity":"sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==","time":1755918027091,"size":13448,"metadata":{"time":1755918027058,"url":"https://registry.npmjs.org/debug/-/debug-4.4.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"059e12a3be5a5d0a293ac012a7afbec6\"","last-modified":"Tue, 13 May 2025 20:56:38 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cb/f4/2ace9a1dfbea06eafdda3044e21e830e5cbd76a5eb5a794acdc111e0c31e b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cb/f4/2ace9a1dfbea06eafdda3044e21e830e5cbd76a5eb5a794acdc111e0c31e new file mode 100644 index 0000000000000000000000000000000000000000..078e98c9a57401b4466fa7df0536a159eff146f9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cb/f4/2ace9a1dfbea06eafdda3044e21e830e5cbd76a5eb5a794acdc111e0c31e @@ -0,0 +1,2 @@ + +7b5de57354658a65fc2010d731a12e13afab40b7 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz","integrity":"sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==","time":1755918081100,"size":2765,"metadata":{"time":1755918081047,"url":"https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"69e27040e38c5b03127488546dc282ea\"","last-modified":"Tue, 24 Nov 2020 06:05:40 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cc/25/0a0ad2d0308b6807a70e488194992de068d68b749910eee4847c38629984 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cc/25/0a0ad2d0308b6807a70e488194992de068d68b749910eee4847c38629984 new file mode 100644 index 0000000000000000000000000000000000000000..bdc8b8d4a32c9645d3c96cd7d34e8fecafc6552b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cc/25/0a0ad2d0308b6807a70e488194992de068d68b749910eee4847c38629984 @@ -0,0 +1,2 @@ + +8c9e0622235aa82e58bf8fad7e3e6ac05c6137f0 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz","integrity":"sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==","time":1755918027120,"size":31722,"metadata":{"time":1755918027077,"url":"https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"752540c90a7a24c85b5af14324456567\"","last-modified":"Tue, 25 Jul 2023 11:50:19 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cc/36/5e01ef1e39b242d168473290e20cb3df0e069c339fcfe0dcb108ac505ca6 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cc/36/5e01ef1e39b242d168473290e20cb3df0e069c339fcfe0dcb108ac505ca6 new file mode 100644 index 0000000000000000000000000000000000000000..436dd17720d0c9e50136d35716e81075cd90eaf1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cc/36/5e01ef1e39b242d168473290e20cb3df0e069c339fcfe0dcb108ac505ca6 @@ -0,0 +1,3 @@ + +f5b99e0254e348af3dc72383d68448c5670eef5c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/quick-format-unescaped","integrity":"sha512-KcD8DuqcfNBe15DSBDtsaYxFsWbwNfP5zSpH6azfubRBz8u+1gMvbAc91lwtcG9jEGpwsf5kfHa/kBlNysX3Aw==","time":1755925568980,"size":36121,"metadata":{"time":1755925568980,"url":"https://registry.npmjs.org/quick-format-unescaped","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"fe2314d8f693db566c26c0a403205f24\"","last-modified":"Sat, 25 Jun 2022 07:06:46 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +ffcf73e345add87d46b14542624e4c4918a76e5a {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/quick-format-unescaped","integrity":"sha512-KcD8DuqcfNBe15DSBDtsaYxFsWbwNfP5zSpH6azfubRBz8u+1gMvbAc91lwtcG9jEGpwsf5kfHa/kBlNysX3Aw==","time":1755928556257,"size":36121,"metadata":{"time":1755928556257,"url":"https://registry.npmjs.org/quick-format-unescaped","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"fe2314d8f693db566c26c0a403205f24\"","last-modified":"Sat, 25 Jun 2022 07:06:46 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cd/6f/be6263f2bfa0d54208458600b3812d206981a38c30b014bfc5f4ebefa8dd b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cd/6f/be6263f2bfa0d54208458600b3812d206981a38c30b014bfc5f4ebefa8dd new file mode 100644 index 0000000000000000000000000000000000000000..aa7c951cb03ef804baf90864589776bbb130e25b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/cd/6f/be6263f2bfa0d54208458600b3812d206981a38c30b014bfc5f4ebefa8dd @@ -0,0 +1,2 @@ + +a11077faa3ac521e4ce70501561ac291d5d1635f {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz","integrity":"sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==","time":1755918027078,"size":10816,"metadata":{"time":1755918027042,"url":"https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"7580f8401f4250c50b10c050e8c23d2d\"","last-modified":"Wed, 20 Nov 2024 17:39:49 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d0/f3/570007f66e0a594c21201eb3e8f15d7a4d92bcb97b59246e5b7194b3b290 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d0/f3/570007f66e0a594c21201eb3e8f15d7a4d92bcb97b59246e5b7194b3b290 new file mode 100644 index 0000000000000000000000000000000000000000..011ed6647b34b145bd868288412b0929653c6f47 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d0/f3/570007f66e0a594c21201eb3e8f15d7a4d92bcb97b59246e5b7194b3b290 @@ -0,0 +1,2 @@ + +a89a56e2a759eb3fb00644edabdc46a5c0e1ab2a {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz","integrity":"sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==","time":1755918081279,"size":5141,"metadata":{"time":1755918081235,"url":"https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"6f749381b67dce4faab5b02aa6c9db55\"","last-modified":"Sun, 10 Jun 2018 08:42:10 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d0/fc/1b66bd9be44b10daa98646a4772d5634bd78d529e2226ae0c6de79dbf546 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d0/fc/1b66bd9be44b10daa98646a4772d5634bd78d529e2226ae0c6de79dbf546 new file mode 100644 index 0000000000000000000000000000000000000000..d7bcbf1f4cc740a3771bcf2649adc00f5dc0ee60 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d0/fc/1b66bd9be44b10daa98646a4772d5634bd78d529e2226ae0c6de79dbf546 @@ -0,0 +1,3 @@ + +e78b589bb9151d5d5d332af703ceacbac44668ed {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fastify","integrity":"sha512-Xo83PrZ10xSMpPot5mWORjX80OzuYSloivGBihaej+5IUIqzCURrUnbXx++NdiOHvripehWXi0WHuv1w2oyjGg==","time":1755925565418,"size":1622650,"metadata":{"time":1755925565418,"url":"https://registry.npmjs.org/fastify","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:05 GMT","etag":"\"268d4adf76cbc37f8b7ab8adaa73caf4\"","last-modified":"Mon, 11 Aug 2025 12:30:15 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +a4024f76f03c1178bae962958b1b211cca93579b {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fastify","integrity":"sha512-Xo83PrZ10xSMpPot5mWORjX80OzuYSloivGBihaej+5IUIqzCURrUnbXx++NdiOHvripehWXi0WHuv1w2oyjGg==","time":1755928554160,"size":1622650,"metadata":{"time":1755928554160,"url":"https://registry.npmjs.org/fastify","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:54 GMT","etag":"\"268d4adf76cbc37f8b7ab8adaa73caf4\"","last-modified":"Mon, 11 Aug 2025 12:30:15 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d1/34/dd11aca2ddd3aeb854849cd81cab78174fc5ea935c0fd552de94684f90a8 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d1/34/dd11aca2ddd3aeb854849cd81cab78174fc5ea935c0fd552de94684f90a8 new file mode 100644 index 0000000000000000000000000000000000000000..62e27a811d62b384367bd6b6d7b72c2ffc3251fe --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d1/34/dd11aca2ddd3aeb854849cd81cab78174fc5ea935c0fd552de94684f90a8 @@ -0,0 +1,2 @@ + +87c34ba465ef4b74e3e4e4910e33c04451fbcf90 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz","integrity":"sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==","time":1755918082020,"size":2979,"metadata":{"time":1755918082011,"url":"https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"0a15837a21ecac8117ea22e97c213059\"","last-modified":"Tue, 08 Apr 2025 16:46:08 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d2/8a/6d32215764e8ba5cfab33d87e2d3f4225ccbad9d2021d18e58b04b119cf8 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d2/8a/6d32215764e8ba5cfab33d87e2d3f4225ccbad9d2021d18e58b04b119cf8 new file mode 100644 index 0000000000000000000000000000000000000000..340fec4baea5a305567445a2f92b77e9474795eb --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d2/8a/6d32215764e8ba5cfab33d87e2d3f4225ccbad9d2021d18e58b04b119cf8 @@ -0,0 +1,2 @@ + +0e3c6449330843cb1caf7ba4fd4e77801714717b {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@fastify/forwarded/-/forwarded-3.0.0.tgz","integrity":"sha512-kJExsp4JCms7ipzg7SJ3y8DwmePaELHxKYtg+tZow+k0znUTf3cb+npgyqm8+ATZOdmfgfydIebPDWM172wfyA==","time":1755918027371,"size":2364,"metadata":{"time":1755918027348,"url":"https://registry.npmjs.org/@fastify/forwarded/-/forwarded-3.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"a3de48ab23e29462f6acddd0e8eb0da0\"","last-modified":"Sat, 13 Jul 2024 11:01:18 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d4/8f/715a86aa779da41ab634b8f3191069d4b2966a3c5b47cb739ab6a9b93aec b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d4/8f/715a86aa779da41ab634b8f3191069d4b2966a3c5b47cb739ab6a9b93aec new file mode 100644 index 0000000000000000000000000000000000000000..caacca0f6435e8175bbca94624f1e670150ee0bc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d4/8f/715a86aa779da41ab634b8f3191069d4b2966a3c5b47cb739ab6a9b93aec @@ -0,0 +1,2 @@ + +1773d9721f433bca235b80979b84ddb937723942 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.7.tgz","integrity":"sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==","time":1755918081824,"size":10925,"metadata":{"time":1755918081806,"url":"https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.7.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"98655f8795fa4326115c84c7ea41e82a\"","last-modified":"Tue, 20 May 2025 15:21:10 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/0a/ed01054d35024a0ab2e0957ae799371396549b68e31ecaeb9584045cad32 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/0a/ed01054d35024a0ab2e0957ae799371396549b68e31ecaeb9584045cad32 new file mode 100644 index 0000000000000000000000000000000000000000..e6a8b423ecfd18099328169d0de93fe07c96213c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/0a/ed01054d35024a0ab2e0957ae799371396549b68e31ecaeb9584045cad32 @@ -0,0 +1,3 @@ + +3537c0ab9450150ed9020a09e23e80768356f5f2 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/json-schema-ref-resolver","integrity":"sha512-wWeiT/+3sOIlkdoBN+yEp00MCj3NRWIAlwT8uUYDQVqwQH6mYVKPxAV1I/wUEDubHQICJ5bjR/dNj+Jg9HJrGg==","time":1755925569818,"size":25242,"metadata":{"time":1755925569818,"url":"https://registry.npmjs.org/json-schema-ref-resolver","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:09 GMT","etag":"\"39e60e437ace9fa446c32d6a0fa2cf34\"","last-modified":"Sat, 08 Mar 2025 16:34:45 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +ae0b3ef4a9ea6f46148d0b310c067ee9393ac3b7 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/json-schema-ref-resolver","integrity":"sha512-wWeiT/+3sOIlkdoBN+yEp00MCj3NRWIAlwT8uUYDQVqwQH6mYVKPxAV1I/wUEDubHQICJ5bjR/dNj+Jg9HJrGg==","time":1755928556213,"size":25242,"metadata":{"time":1755928556213,"url":"https://registry.npmjs.org/json-schema-ref-resolver","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"39e60e437ace9fa446c32d6a0fa2cf34\"","last-modified":"Sat, 08 Mar 2025 16:34:45 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/2b/75b90bc857666149bbc99e68387622a91f2198b40b68a2d252508a311c4d b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/2b/75b90bc857666149bbc99e68387622a91f2198b40b68a2d252508a311c4d new file mode 100644 index 0000000000000000000000000000000000000000..3c722657f736107c8610dda77407876863f56273 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/2b/75b90bc857666149bbc99e68387622a91f2198b40b68a2d252508a311c4d @@ -0,0 +1,2 @@ + +28741fd6218627717a8e594eaf1cd14357019c40 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz","integrity":"sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==","time":1755918082795,"size":189285,"metadata":{"time":1755918082650,"url":"https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"74f5de377b0eceb2740828e34856bc77\"","last-modified":"Thu, 24 Jul 2025 09:48:27 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/af/7fe10d0d1d03ec99a38ab725cb99f641a5a103aa7f3bcde27819accae022 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/af/7fe10d0d1d03ec99a38ab725cb99f641a5a103aa7f3bcde27819accae022 new file mode 100644 index 0000000000000000000000000000000000000000..67a1868cde18cd9d05fc3b9a3769e4cd9d5f58de --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/af/7fe10d0d1d03ec99a38ab725cb99f641a5a103aa7f3bcde27819accae022 @@ -0,0 +1,3 @@ + +8a784e726427b91dfa42df5004c4b58fce437366 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/process-warning","integrity":"sha512-RuPAAoTwM48ujeV+JYMvabr3/B6/PSidFpMvHaQlLPGOarAQwjQ/jqnHvlJ917VMlZ1nCbJ5xdq7luchlMzgVA==","time":1755925566644,"size":32480,"metadata":{"time":1755925566644,"url":"https://registry.npmjs.org/process-warning","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"7e61fb8eac668ef4ec9a2beb5a3d8f1b\"","last-modified":"Mon, 03 Mar 2025 17:27:12 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +ebc1d249a365de5fc8f2b4755946e4e295caa277 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/process-warning","integrity":"sha512-RuPAAoTwM48ujeV+JYMvabr3/B6/PSidFpMvHaQlLPGOarAQwjQ/jqnHvlJ917VMlZ1nCbJ5xdq7luchlMzgVA==","time":1755928555948,"size":32480,"metadata":{"time":1755928555948,"url":"https://registry.npmjs.org/process-warning","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"7e61fb8eac668ef4ec9a2beb5a3d8f1b\"","last-modified":"Mon, 03 Mar 2025 17:27:12 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/e8/33f7a29b111b37169ec2a38761bd24de56aea0054984709c1524016d03e6 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/e8/33f7a29b111b37169ec2a38761bd24de56aea0054984709c1524016d03e6 new file mode 100644 index 0000000000000000000000000000000000000000..f97ee12803e8b4fe4783bc67a9714a19eb4cfdd0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d7/e8/33f7a29b111b37169ec2a38761bd24de56aea0054984709c1524016d03e6 @@ -0,0 +1,2 @@ + +7f2c451be7cb0ba4b0e2e1a874b0228c47bdc5ea {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz","integrity":"sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==","time":1755918081790,"size":184337,"metadata":{"time":1755918081399,"url":"https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"be6a2a57955eb891e3db43e02eafbf73\"","last-modified":"Thu, 07 Dec 2023 10:19:02 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d8/50/4c4cd54169f4649a4888c107638556e96913ad914d713b8151bde3466baa b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d8/50/4c4cd54169f4649a4888c107638556e96913ad914d713b8151bde3466baa new file mode 100644 index 0000000000000000000000000000000000000000..661a34fb1257b329b23ab60be008ee7c0f7761ee --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d8/50/4c4cd54169f4649a4888c107638556e96913ad914d713b8151bde3466baa @@ -0,0 +1,3 @@ + +9fbb8b1ff9299a39312d075fc428ebc9e342e1ad {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ret","integrity":"sha512-ibYnnPavbDCPm67VV0mugVfCPNyQqhmLP11iTsHVPZNmcBHsZn1Xy+hek+zfmdOLG3MF+kwkboxb9NBuMpeGbg==","time":1755925569939,"size":59258,"metadata":{"time":1755925569939,"url":"https://registry.npmjs.org/ret","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:09 GMT","etag":"\"ce8694e6112b366df8c4d5b512277d92\"","last-modified":"Thu, 16 Mar 2023 19:06:00 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +0223ad8d11ce91dcc74bd6cad7c97bd6245f29d5 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/ret","integrity":"sha512-ibYnnPavbDCPm67VV0mugVfCPNyQqhmLP11iTsHVPZNmcBHsZn1Xy+hek+zfmdOLG3MF+kwkboxb9NBuMpeGbg==","time":1755928556573,"size":59258,"metadata":{"time":1755928556573,"url":"https://registry.npmjs.org/ret","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"ce8694e6112b366df8c4d5b512277d92\"","last-modified":"Thu, 16 Mar 2023 19:06:00 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d9/2f/1a8a24c5a8be9404619dfc8a0db85cb35d97a7d3f23cfc16f3c8f5d083c7 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d9/2f/1a8a24c5a8be9404619dfc8a0db85cb35d97a7d3f23cfc16f3c8f5d083c7 new file mode 100644 index 0000000000000000000000000000000000000000..f21194fd78f20a39cfb771202e19fb76658234d2 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/d9/2f/1a8a24c5a8be9404619dfc8a0db85cb35d97a7d3f23cfc16f3c8f5d083c7 @@ -0,0 +1,2 @@ + +30b3be7516899bc2fcbcab2456aadbf6a62ef9ae {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz","integrity":"sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==","time":1755918027084,"size":6089,"metadata":{"time":1755918027052,"url":"https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"1a388c67e4754f66bdc19fb3301b6fd7\"","last-modified":"Tue, 02 May 2023 03:24:30 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/db/1e/bfeae7fee83600777d9787d4785392d4fe0481672c45b62fd55dcf6ff297 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/db/1e/bfeae7fee83600777d9787d4785392d4fe0481672c45b62fd55dcf6ff297 new file mode 100644 index 0000000000000000000000000000000000000000..4a3e31e26ad929972f3eb5d10f3003a1c81068d0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/db/1e/bfeae7fee83600777d9787d4785392d4fe0481672c45b62fd55dcf6ff297 @@ -0,0 +1,3 @@ + +6f0790a987dea176b596e9cca9b3930f6f74e13e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fast-decode-uri-component","integrity":"sha512-AwNSNpI3CfXnjzH05RRt6vvV3Ihytop3ew8huM6zD97I2BFyy1LEm6kmPL+wcGLscIbhzTKzDYUvEsAq84MQTA==","time":1755925568450,"size":7045,"metadata":{"time":1755925568449,"url":"https://registry.npmjs.org/fast-decode-uri-component","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"7312d3ca4460431747a3dfc006ac339c\"","last-modified":"Mon, 02 May 2022 04:22:09 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +09795ae1ce0d6f91b5a580ef772a38c80c2a19ab {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fast-decode-uri-component","integrity":"sha512-AwNSNpI3CfXnjzH05RRt6vvV3Ihytop3ew8huM6zD97I2BFyy1LEm6kmPL+wcGLscIbhzTKzDYUvEsAq84MQTA==","time":1755928555227,"size":7045,"metadata":{"time":1755928555227,"url":"https://registry.npmjs.org/fast-decode-uri-component","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"7312d3ca4460431747a3dfc006ac339c\"","last-modified":"Mon, 02 May 2022 04:22:09 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/db/a1/d0e731492f0cce99b04bc9010498d43565b2ebf4cb46f244ac245f1766bf b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/db/a1/d0e731492f0cce99b04bc9010498d43565b2ebf4cb46f244ac245f1766bf new file mode 100644 index 0000000000000000000000000000000000000000..bc27a6681f109c5201eb19028d234ac86e2aab14 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/db/a1/d0e731492f0cce99b04bc9010498d43565b2ebf4cb46f244ac245f1766bf @@ -0,0 +1,3 @@ + +76e992e3f37721aa7fafa3fceb6386ec99c4b1ca {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/safe-stable-stringify","integrity":"sha512-qlBpPjgtHlihO7+SuXMu9kAUnz4d5LdT1DgcaPz+8QlcqAgeeiSyKqxzlZcGXnGxS+F7McfGJnxHWmo+nkrqYQ==","time":1755925569003,"size":45091,"metadata":{"time":1755925569003,"url":"https://registry.npmjs.org/safe-stable-stringify","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"849fb4b50dd0c92c66f62966cacc7782\"","last-modified":"Sat, 24 Aug 2024 21:31:19 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +11250d56afe3e6ec08c9c98447da8cdced3bca16 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/safe-stable-stringify","integrity":"sha512-qlBpPjgtHlihO7+SuXMu9kAUnz4d5LdT1DgcaPz+8QlcqAgeeiSyKqxzlZcGXnGxS+F7McfGJnxHWmo+nkrqYQ==","time":1755928556255,"size":45091,"metadata":{"time":1755928556255,"url":"https://registry.npmjs.org/safe-stable-stringify","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"849fb4b50dd0c92c66f62966cacc7782\"","last-modified":"Sat, 24 Aug 2024 21:31:19 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dc/8a/4dc2a1bdf5b195e99648a945ce742de5f6d0b1aac410a6fe3e7155933cc7 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dc/8a/4dc2a1bdf5b195e99648a945ce742de5f6d0b1aac410a6fe3e7155933cc7 new file mode 100644 index 0000000000000000000000000000000000000000..2cf3f2ff1fc49db935c8090dc5d2d186bf959a4c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dc/8a/4dc2a1bdf5b195e99648a945ce742de5f6d0b1aac410a6fe3e7155933cc7 @@ -0,0 +1,3 @@ + +6a4d51691d99a0bcd73953b1a3991bdd919506fb {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-fetch","integrity":"sha512-4XH3dHnmhTTsGiuT2PxHx6E5mlNPUOmP2k5cR9LXIQpRqGnCcfJzL3TfOrpMPLwKXi1HzAM5CwVq+42VdnsKPA==","time":1755925570312,"size":896010,"metadata":{"time":1755925570312,"url":"https://registry.npmjs.org/node-fetch","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"5f1d959e91bdfaaef25267351903414b\"","last-modified":"Thu, 30 Nov 2023 14:10:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +c8c3aa2bc07212c2e1babf7342fe0362858e003c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-fetch","integrity":"sha512-4XH3dHnmhTTsGiuT2PxHx6E5mlNPUOmP2k5cR9LXIQpRqGnCcfJzL3TfOrpMPLwKXi1HzAM5CwVq+42VdnsKPA==","time":1755928556757,"size":896010,"metadata":{"time":1755928556757,"url":"https://registry.npmjs.org/node-fetch","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"5f1d959e91bdfaaef25267351903414b\"","last-modified":"Thu, 30 Nov 2023 14:10:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dc/a5/b134aa08160183bd0b203e522dce5467fb9491ab59411c1c1b6d32b7d39a b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dc/a5/b134aa08160183bd0b203e522dce5467fb9491ab59411c1c1b6d32b7d39a new file mode 100644 index 0000000000000000000000000000000000000000..4b311605be465c15ebaafbca3e82e136ed4cbfc3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dc/a5/b134aa08160183bd0b203e522dce5467fb9491ab59411c1c1b6d32b7d39a @@ -0,0 +1,3 @@ + +8a0faa09d4c009846300dcdc1d35aca5b4ff4ccf {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2fopenbsd-x64","integrity":"sha512-M6NChgYks92RT6xRFCNx0NJwLxGdWRGQiqPkXSZHq0VQJ5M2xe4o2mekD/ZxVvJJmb152Qx2QWQyob/1bKH/7w==","time":1755924829159,"size":176188,"metadata":{"time":1755924829159,"url":"https://registry.npmjs.org/@esbuild%2fopenbsd-x64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:49 GMT","etag":"\"43db8170cee5c5cb77dd0e2462726b9d\"","last-modified":"Tue, 12 Aug 2025 23:25:56 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +a34b96beba44130e337f53c57f88d9fb6871ef74 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@esbuild%2fopenbsd-x64","integrity":"sha512-M6NChgYks92RT6xRFCNx0NJwLxGdWRGQiqPkXSZHq0VQJ5M2xe4o2mekD/ZxVvJJmb152Qx2QWQyob/1bKH/7w==","time":1755925566609,"size":176188,"metadata":{"time":1755925566609,"url":"https://registry.npmjs.org/@esbuild%2fopenbsd-x64","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"43db8170cee5c5cb77dd0e2462726b9d\"","last-modified":"Tue, 12 Aug 2025 23:25:56 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dc/f5/c0bfb27060f61ca8e70fcb2eb1561295e496fd711ffa5e01fdd576dfd55f b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dc/f5/c0bfb27060f61ca8e70fcb2eb1561295e496fd711ffa5e01fdd576dfd55f new file mode 100644 index 0000000000000000000000000000000000000000..b5d6b4726307a0e8b985a5fbcf1368353141898e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dc/f5/c0bfb27060f61ca8e70fcb2eb1561295e496fd711ffa5e01fdd576dfd55f @@ -0,0 +1,3 @@ + +7810d5a8026509c92d28993ea52d7dbda55c8496 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/dotenv","integrity":"sha512-QvZN4JL1YqrzygS+mWSVKpM0uJpoAEf7xvDcbwS94MJILcFmulokOQvbx9LXR2AwM9LB8L9zvXX7y/NzTHur/w==","time":1755925563406,"size":255898,"metadata":{"time":1755925563406,"url":"https://registry.npmjs.org/dotenv","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:03 GMT","etag":"\"8de7b549b408cf1fd3f67fd76f08360d\"","last-modified":"Sat, 26 Jul 2025 14:18:34 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +2b59f87c8a2233b8c9bea84ff34f72aa18c391fe {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/dotenv","integrity":"sha512-QvZN4JL1YqrzygS+mWSVKpM0uJpoAEf7xvDcbwS94MJILcFmulokOQvbx9LXR2AwM9LB8L9zvXX7y/NzTHur/w==","time":1755928553112,"size":255898,"metadata":{"time":1755928553112,"url":"https://registry.npmjs.org/dotenv","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:53 GMT","etag":"\"8de7b549b408cf1fd3f67fd76f08360d\"","last-modified":"Sat, 26 Jul 2025 14:18:34 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dd/6e/bce38caf63982c22edfa4ade01b8c45a3dd89b43c50398b9b8b1769b7865 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dd/6e/bce38caf63982c22edfa4ade01b8c45a3dd89b43c50398b9b8b1769b7865 new file mode 100644 index 0000000000000000000000000000000000000000..6d80ea7ebdbc70911e9504d22ec112f231a211fd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/dd/6e/bce38caf63982c22edfa4ade01b8c45a3dd89b43c50398b9b8b1769b7865 @@ -0,0 +1,3 @@ + +1ef0398eef02e46aaad280d03d2488a6354c1aa1 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@modelcontextprotocol%2fsdk","integrity":"sha512-T0DvE0DcDPJbxI5ZLWijlAfA8mI7IodSAHcecJ4eUbYa5VUTMVSmSXePvFOdc53veXm+Lahy1twvEpErdM73kw==","time":1755925568716,"size":189141,"metadata":{"time":1755925568715,"url":"https://registry.npmjs.org/@modelcontextprotocol%2fsdk","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"639ce123f92afca8d4628867fcfd41d4\"","last-modified":"Fri, 22 Aug 2025 09:22:27 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +30f65ff6976101ed21e96c95e78d8b4c78302500 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@modelcontextprotocol%2fsdk","integrity":"sha512-T0DvE0DcDPJbxI5ZLWijlAfA8mI7IodSAHcecJ4eUbYa5VUTMVSmSXePvFOdc53veXm+Lahy1twvEpErdM73kw==","time":1755928555723,"size":189141,"metadata":{"time":1755928555722,"url":"https://registry.npmjs.org/@modelcontextprotocol%2fsdk","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"639ce123f92afca8d4628867fcfd41d4\"","last-modified":"Fri, 22 Aug 2025 09:22:27 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/de/00/c82bbaffa29ee41d57cc995c6717a2405f4d3e5341265022cc5c8cb75880 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/de/00/c82bbaffa29ee41d57cc995c6717a2405f4d3e5341265022cc5c8cb75880 new file mode 100644 index 0000000000000000000000000000000000000000..a7787356435f75b80ef208d32a61ec25b6610844 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/de/00/c82bbaffa29ee41d57cc995c6717a2405f4d3e5341265022cc5c8cb75880 @@ -0,0 +1,2 @@ + +ea9eef758cc5168d3e67517ed22316596a7306cc {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz","integrity":"sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==","time":1755918082555,"size":134704,"metadata":{"time":1755918082541,"url":"https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"8deae3ebde6cdc253e543aa934b3ac8b\"","last-modified":"Fri, 21 Mar 2025 20:07:57 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/df/f3/aeeab81502bf6bc40dddaf47b6524fe0f109509e92c4bf4cd07fb00fdb05 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/df/f3/aeeab81502bf6bc40dddaf47b6524fe0f109509e92c4bf4cd07fb00fdb05 new file mode 100644 index 0000000000000000000000000000000000000000..e94a9b33bc770a401f53e6519015c675db54e8db --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/df/f3/aeeab81502bf6bc40dddaf47b6524fe0f109509e92c4bf4cd07fb00fdb05 @@ -0,0 +1,2 @@ + +bf90b73efd126bc98441db89792895abe2c7ccfd {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/semver/-/semver-7.7.2.tgz","integrity":"sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==","time":1755918027188,"size":28388,"metadata":{"time":1755918027134,"url":"https://registry.npmjs.org/semver/-/semver-7.7.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"9eb087e6352fd398f0aa86c112d593c7\"","last-modified":"Mon, 12 May 2025 17:02:31 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e0/b5/f356c5b07ca4b4083072d0cff1e52b9193f3e04b995eff758bcfc84dbf2f b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e0/b5/f356c5b07ca4b4083072d0cff1e52b9193f3e04b995eff758bcfc84dbf2f new file mode 100644 index 0000000000000000000000000000000000000000..b376180c5dad85a7593d104749a68978aac8a87d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e0/b5/f356c5b07ca4b4083072d0cff1e52b9193f3e04b995eff758bcfc84dbf2f @@ -0,0 +1,2 @@ + +82b53d704e01026497d91266953469582e1f8885 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz","integrity":"sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==","time":1755918027399,"size":30946,"metadata":{"time":1755918027373,"url":"https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"a988352aaa66a3c67af269a89f9c99fc\"","last-modified":"Tue, 12 Aug 2025 23:27:09 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e1/13/48011259d0e96d76bb6477a88e2828eb597909fd035b03109bd1f2cc4e3e b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e1/13/48011259d0e96d76bb6477a88e2828eb597909fd035b03109bd1f2cc4e3e new file mode 100644 index 0000000000000000000000000000000000000000..ced2a47bf8e62918f69cbc343dc585eddadf48a4 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e1/13/48011259d0e96d76bb6477a88e2828eb597909fd035b03109bd1f2cc4e3e @@ -0,0 +1,2 @@ + +bbf0dfb0f961333a85ab8c563b97ae20a928450c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz","integrity":"sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==","time":1755918081605,"size":2677,"metadata":{"time":1755918081519,"url":"https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"bea3b61c2b79191253757697365a6f4d\"","last-modified":"Mon, 06 Nov 2023 23:40:10 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e2/58/9f87d0a588ae2a6322c65b0916e3ec5af109671b0eee7b34730cfa1fe013 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e2/58/9f87d0a588ae2a6322c65b0916e3ec5af109671b0eee7b34730cfa1fe013 new file mode 100644 index 0000000000000000000000000000000000000000..2c4666368332422f7caf518f8dff55314940f3ee --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e2/58/9f87d0a588ae2a6322c65b0916e3ec5af109671b0eee7b34730cfa1fe013 @@ -0,0 +1,3 @@ + +f11d1560156d2c3eba989efa9d0b4f7141f5dea8 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/toidentifier","integrity":"sha512-Q5ZuyZcUDWwmgjR0rdnU2wTenuIPXeVvz2xkK+ThhHc3OoOa5GtsqGtbt9nagnQGHmHQN2upVtlC/Ow6x7klxg==","time":1755925568664,"size":12006,"metadata":{"time":1755925568664,"url":"https://registry.npmjs.org/toidentifier","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"ffd08c14db964b8245fc15f1e20d6244\"","last-modified":"Sun, 22 May 2022 00:38:36 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +4133ba4ae7bd91ab9f2482a93b4d40b3f80fc136 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/toidentifier","integrity":"sha512-Q5ZuyZcUDWwmgjR0rdnU2wTenuIPXeVvz2xkK+ThhHc3OoOa5GtsqGtbt9nagnQGHmHQN2upVtlC/Ow6x7klxg==","time":1755928555461,"size":12006,"metadata":{"time":1755928555461,"url":"https://registry.npmjs.org/toidentifier","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"ffd08c14db964b8245fc15f1e20d6244\"","last-modified":"Sun, 22 May 2022 00:38:36 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e2/e1/48fc0ec0105e0e232895e07c0924403d78bb755bc7503a85a1cf1d301ea3 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e2/e1/48fc0ec0105e0e232895e07c0924403d78bb755bc7503a85a1cf1d301ea3 new file mode 100644 index 0000000000000000000000000000000000000000..c734568497d56b35a615465b65f70b301371dc0e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e2/e1/48fc0ec0105e0e232895e07c0924403d78bb755bc7503a85a1cf1d301ea3 @@ -0,0 +1,2 @@ + +44eab8c4b9b76d6372a065ec4aab8ba476a1668e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@typescript-eslint/types/-/types-8.38.0.tgz","integrity":"sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==","time":1755918081553,"size":27880,"metadata":{"time":1755918081487,"url":"https://registry.npmjs.org/@typescript-eslint/types/-/types-8.38.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"9c414ec140f70bf280fd1c8a5cdf72de\"","last-modified":"Mon, 21 Jul 2025 17:21:51 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e5/ef/3077a0c0e591fd28d2afab54f167020b8992e9a1089b0ac14f60d2631397 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e5/ef/3077a0c0e591fd28d2afab54f167020b8992e9a1089b0ac14f60d2631397 new file mode 100644 index 0000000000000000000000000000000000000000..6c712f1c6116c5620885e2bac026b9bf52f9478b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e5/ef/3077a0c0e591fd28d2afab54f167020b8992e9a1089b0ac14f60d2631397 @@ -0,0 +1,2 @@ + +fdeb4114a6b23ec48e048eef5429e6c6d5225fc4 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz","integrity":"sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==","time":1755918027026,"size":18375,"metadata":{"time":1755918026991,"url":"https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"a319721e5c6e7ae5d0ca27e76a028c8f\"","last-modified":"Thu, 13 Jun 2024 15:39:13 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e6/5b/a5ccd6d9f05959c1c89efc411510f733374f46f5e7c4ee798f587f5ae931 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e6/5b/a5ccd6d9f05959c1c89efc411510f733374f46f5e7c4ee798f587f5ae931 new file mode 100644 index 0000000000000000000000000000000000000000..ae3011528f933ad91ff0369fcb7a29e63111e834 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e6/5b/a5ccd6d9f05959c1c89efc411510f733374f46f5e7c4ee798f587f5ae931 @@ -0,0 +1,3 @@ + +ebfee83677bee2e9f78ff172eec3a5d44c77e130 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/minipass","integrity":"sha512-s/QbPGv/QsxO706STr1XSrs9gprn8fjG0rKPKJ82zul3FTQbH/s5W9BOpKJyJmk2vQSojcqtVEK/karL4GFuzA==","time":1755925568433,"size":490195,"metadata":{"time":1755925568433,"url":"https://registry.npmjs.org/minipass","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"a2b1061a20ec5019bd6ab7d56f4ff618\"","last-modified":"Fri, 24 May 2024 00:42:22 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +671b8ea0bd0783701248e538589159799f4094a4 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/minipass","integrity":"sha512-s/QbPGv/QsxO706STr1XSrs9gprn8fjG0rKPKJ82zul3FTQbH/s5W9BOpKJyJmk2vQSojcqtVEK/karL4GFuzA==","time":1755928555233,"size":490195,"metadata":{"time":1755928555233,"url":"https://registry.npmjs.org/minipass","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"a2b1061a20ec5019bd6ab7d56f4ff618\"","last-modified":"Fri, 24 May 2024 00:42:22 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e6/be/6e1283f2345247c106f9fd360a38dfd752ea3fc358323729d4095f466da8 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e6/be/6e1283f2345247c106f9fd360a38dfd752ea3fc358323729d4095f466da8 new file mode 100644 index 0000000000000000000000000000000000000000..7f8c164ab91c5a8cfe0e1488325e180eeeaaf81e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e6/be/6e1283f2345247c106f9fd360a38dfd752ea3fc358323729d4095f466da8 @@ -0,0 +1,3 @@ + +d9a2fad4b89422768cf3d3f929c6d0f47b7d452d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/google-auth-library","integrity":"sha512-yKbI4qkSSuoVR2hVfcwtl09MboB6fAaGxsG2nWMQ/4HLt1MhgUDbLdf8J/tAGAgFpRO6TQ4t6l0+qUGlm11ntg==","time":1755925566499,"size":697095,"metadata":{"time":1755925566499,"url":"https://registry.npmjs.org/google-auth-library","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"086eee2a9c5388f43a3e289a94ff8856\"","last-modified":"Mon, 04 Aug 2025 18:36:43 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +c007c2be98593cbe9984cd02af0cb46a3aba4d4f {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/google-auth-library","integrity":"sha512-yKbI4qkSSuoVR2hVfcwtl09MboB6fAaGxsG2nWMQ/4HLt1MhgUDbLdf8J/tAGAgFpRO6TQ4t6l0+qUGlm11ntg==","time":1755928554213,"size":697095,"metadata":{"time":1755928554213,"url":"https://registry.npmjs.org/google-auth-library","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:54 GMT","etag":"\"086eee2a9c5388f43a3e289a94ff8856\"","last-modified":"Mon, 04 Aug 2025 18:36:43 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e7/40/70186a6ceaad19b6b11ac1bccf00fa5e038b8151d455127f9868f0051d57 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e7/40/70186a6ceaad19b6b11ac1bccf00fa5e038b8151d455127f9868f0051d57 new file mode 100644 index 0000000000000000000000000000000000000000..74eda1c89a4d678370e02954ff98459b3d818798 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e7/40/70186a6ceaad19b6b11ac1bccf00fa5e038b8151d455127f9868f0051d57 @@ -0,0 +1,3 @@ + +ec086e506fcef4b9bf1356e0b8430e72d60281b6 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-domexception","integrity":"sha512-p9j/KYZj6O4tkYoZoKAENadTfOdXozfm3YWX4hPJ5W1M5htb4wxLcZxQVP7ZgcUfeKiPU4mhki2rTc9SSOg8TA==","time":1755925570822,"size":11516,"metadata":{"time":1755925570822,"url":"https://registry.npmjs.org/node-domexception","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"235873f8f7f2c3b29fc948ba6741907f\"","last-modified":"Sat, 19 Apr 2025 13:25:45 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +f2615b39f7f7342c087700bae34f5f0b81c0b627 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-domexception","integrity":"sha512-p9j/KYZj6O4tkYoZoKAENadTfOdXozfm3YWX4hPJ5W1M5htb4wxLcZxQVP7ZgcUfeKiPU4mhki2rTc9SSOg8TA==","time":1755928557185,"size":11516,"metadata":{"time":1755928557184,"url":"https://registry.npmjs.org/node-domexception","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:57 GMT","etag":"\"235873f8f7f2c3b29fc948ba6741907f\"","last-modified":"Sat, 19 Apr 2025 13:25:45 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e8/00/4fdcb19cc09526d908913b386ed5bb472f0480c442ad7c6c053c322139f9 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e8/00/4fdcb19cc09526d908913b386ed5bb472f0480c442ad7c6c053c322139f9 new file mode 100644 index 0000000000000000000000000000000000000000..8ad2646a2de4b278db8c2427433651b8f19de4b9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e8/00/4fdcb19cc09526d908913b386ed5bb472f0480c442ad7c6c053c322139f9 @@ -0,0 +1,2 @@ + +2e5f3534bbbe5645dd259e88b56c04d0fc239298 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz","integrity":"sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA==","time":1755918027198,"size":6725,"metadata":{"time":1755918027147,"url":"https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"6ac952b6edf17c41a547dc31bfa2cd8c\"","last-modified":"Mon, 03 Mar 2025 17:27:12 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e8/d2/002cc0c8b40ebff857fc33d5865bdbb79a9ef4f7e6f155c8c2399fa41c5b b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e8/d2/002cc0c8b40ebff857fc33d5865bdbb79a9ef4f7e6f155c8c2399fa41c5b new file mode 100644 index 0000000000000000000000000000000000000000..4bddea5d507382ac8fcaf00728b1056ba25a3117 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e8/d2/002cc0c8b40ebff857fc33d5865bdbb79a9ef4f7e6f155c8c2399fa41c5b @@ -0,0 +1,2 @@ + +c746ed317f2688159ec38c41dbad0e670204058a {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz","integrity":"sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==","time":1755918082495,"size":10883,"metadata":{"time":1755918082494,"url":"https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"4a4a245a49562aa1b6a1e0ec17450adf\"","last-modified":"Fri, 31 Jan 2025 17:22:48 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e9/a9/5b88cf3c6125d3f0a83e08d7fc6bc3848a7da209ed87f32d58376e0c2224 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e9/a9/5b88cf3c6125d3f0a83e08d7fc6bc3848a7da209ed87f32d58376e0c2224 new file mode 100644 index 0000000000000000000000000000000000000000..b5d3bc35f83b57632daa6326990485d9f0ef1602 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e9/a9/5b88cf3c6125d3f0a83e08d7fc6bc3848a7da209ed87f32d58376e0c2224 @@ -0,0 +1,2 @@ + +5f4b9f258352928ef4c0050d50826cb4b5722559 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz","integrity":"sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==","time":1755918081534,"size":7635,"metadata":{"time":1755918081449,"url":"https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"f3da43a75d174d2021262164aa77170a\"","last-modified":"Fri, 09 Jul 2021 01:16:01 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e9/df/500f6d65c0cf35c0f7c0635f953b37393168aa27cb55c7b0ce3399c0d7f2 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e9/df/500f6d65c0cf35c0f7c0635f953b37393168aa27cb55c7b0ce3399c0d7f2 new file mode 100644 index 0000000000000000000000000000000000000000..c2bd084c95787a145c0941c315dd403c579d608b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/e9/df/500f6d65c0cf35c0f7c0635f953b37393168aa27cb55c7b0ce3399c0d7f2 @@ -0,0 +1,2 @@ + +4e8e4e8b483ab29eab6ee51a31712a35786ea3e4 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz","integrity":"sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==","time":1755918081782,"size":3102,"metadata":{"time":1755918081757,"url":"https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"6a1a30fd106d0662159118ade5c02d8e\"","last-modified":"Tue, 08 Apr 2025 16:46:22 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ea/eb/49178a0386450ddf0eb03db29c62ced3f1726450311801cb2013b5e3e790 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ea/eb/49178a0386450ddf0eb03db29c62ced3f1726450311801cb2013b5e3e790 new file mode 100644 index 0000000000000000000000000000000000000000..582ee3913a27f18d249fe6299c34a258a5b31d05 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ea/eb/49178a0386450ddf0eb03db29c62ced3f1726450311801cb2013b5e3e790 @@ -0,0 +1,3 @@ + +5c55aab669899ca4936edbf91034460448478137 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fast-querystring","integrity":"sha512-zzhBsIi+rnd242SDRMmxdZrTh0pFu7ksHJOEQe9hmJ2/fOcYlucv+KwVACf6S+kXH/s4P4rBtL3qnG/Mg/HCsw==","time":1755925568975,"size":68476,"metadata":{"time":1755925568975,"url":"https://registry.npmjs.org/fast-querystring","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"680400405f3369c5b7508068bbb2f25b\"","last-modified":"Sun, 03 Aug 2025 16:18:55 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +aff255ac332065356177772d9e708e606d2df263 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fast-querystring","integrity":"sha512-zzhBsIi+rnd242SDRMmxdZrTh0pFu7ksHJOEQe9hmJ2/fOcYlucv+KwVACf6S+kXH/s4P4rBtL3qnG/Mg/HCsw==","time":1755928556228,"size":68476,"metadata":{"time":1755928556228,"url":"https://registry.npmjs.org/fast-querystring","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"680400405f3369c5b7508068bbb2f25b\"","last-modified":"Sun, 03 Aug 2025 16:18:55 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ed/0d/003a2f7cccf45203a4a5bb1618aea5956077e70bad5af4abe44ee82b366a b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ed/0d/003a2f7cccf45203a4a5bb1618aea5956077e70bad5af4abe44ee82b366a new file mode 100644 index 0000000000000000000000000000000000000000..99054be011ea121bfb01ae692754db8fd7370de1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ed/0d/003a2f7cccf45203a4a5bb1618aea5956077e70bad5af4abe44ee82b366a @@ -0,0 +1,2 @@ + +fb99a8c5e9e7b43d063373ce4870a1527653a32f {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.2.tgz","integrity":"sha512-7cfaOQuCS27HD7DX+6ib2OrnW+b4ZBwDNnCcT0uTyidcmyWb03FnQqJybDBoCnpdxwBSfA94UAYlRCt7mV+TbA==","time":1755918082491,"size":32842,"metadata":{"time":1755918082489,"url":"https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"f5f74afa39de48bec53c8c99a02a5c75\"","last-modified":"Sat, 28 Jun 2025 04:28:10 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ed/88/1ac51e134f088c5f8c25f10b559fa38c46f7223b46fe96ff8eedeeb43673 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ed/88/1ac51e134f088c5f8c25f10b559fa38c46f7223b46fe96ff8eedeeb43673 new file mode 100644 index 0000000000000000000000000000000000000000..e27d1573909d7fca0c9a84b0b02d42b39ce0e905 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ed/88/1ac51e134f088c5f8c25f10b559fa38c46f7223b46fe96ff8eedeeb43673 @@ -0,0 +1,2 @@ + +48453f2650e97f6d4448bedac543944777e822cc {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz","integrity":"sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==","time":1755918081257,"size":17982,"metadata":{"time":1755918081181,"url":"https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"d76adfff78795bedeb47d89460fd8aa9\"","last-modified":"Mon, 31 Mar 2025 16:39:51 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ee/2c/6d5c2061312fdd689bcc92e60ccf2b2e72bc15b7e22453f3a8680f491803 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ee/2c/6d5c2061312fdd689bcc92e60ccf2b2e72bc15b7e22453f3a8680f491803 new file mode 100644 index 0000000000000000000000000000000000000000..061624dc021dbca4afd9ea12d8ddfa3b29cf217a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ee/2c/6d5c2061312fdd689bcc92e60ccf2b2e72bc15b7e22453f3a8680f491803 @@ -0,0 +1,2 @@ + +153996fe372b5bac8a5b305012ef6f6fbccdb122 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz","integrity":"sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==","time":1755918081395,"size":5512,"metadata":{"time":1755918081337,"url":"https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"df4720f46abc46158550892ae788d2d6\"","last-modified":"Mon, 18 Dec 2023 19:34:00 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ee/7a/ee0e1b8bea3f05c1b42f1fe4a17fdc2aa37be14405f4e293de10bd30eb80 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ee/7a/ee0e1b8bea3f05c1b42f1fe4a17fdc2aa37be14405f4e293de10bd30eb80 new file mode 100644 index 0000000000000000000000000000000000000000..9619cf970519f447c6823e48948bbf66e86731fc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ee/7a/ee0e1b8bea3f05c1b42f1fe4a17fdc2aa37be14405f4e293de10bd30eb80 @@ -0,0 +1,3 @@ + +97ca4d09d7e0206769365b06b283546396754599 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/json-schema-traverse","integrity":"sha512-sMSG6uiBPMJrfftcCVKZ6NmzksTTsm6VoHNqDpPhTlpTKzPaR+y5+MZ1byKiHqYjmdF+FfPDgZ7KpwQ/qi6JFA==","time":1755925569853,"size":23537,"metadata":{"time":1755925569853,"url":"https://registry.npmjs.org/json-schema-traverse","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:09 GMT","etag":"\"f74688861276ed54c5fae339f2f452cf\"","last-modified":"Thu, 22 Jun 2023 16:32:40 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +276e5ca310994ae68d0ad8c59df046a97b7e7821 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/json-schema-traverse","integrity":"sha512-sMSG6uiBPMJrfftcCVKZ6NmzksTTsm6VoHNqDpPhTlpTKzPaR+y5+MZ1byKiHqYjmdF+FfPDgZ7KpwQ/qi6JFA==","time":1755928556501,"size":23537,"metadata":{"time":1755928556501,"url":"https://registry.npmjs.org/json-schema-traverse","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"f74688861276ed54c5fae339f2f452cf\"","last-modified":"Thu, 22 Jun 2023 16:32:40 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ee/86/6a7f0b9a683ffdec0b3364ad04b951effd6524a2e1323afccdd48228be92 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ee/86/6a7f0b9a683ffdec0b3364ad04b951effd6524a2e1323afccdd48228be92 new file mode 100644 index 0000000000000000000000000000000000000000..c88176ba1f37119170756eb5d68610513f1ac3f5 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ee/86/6a7f0b9a683ffdec0b3364ad04b951effd6524a2e1323afccdd48228be92 @@ -0,0 +1,2 @@ + +77effdb976910e3c148fc5bbb47028cb1aa7b51d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz","integrity":"sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==","time":1755918081454,"size":54865,"metadata":{"time":1755918081371,"url":"https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"7536119e99519dcbc10d67c6b0f7d736\"","last-modified":"Fri, 28 Feb 2025 15:30:47 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ef/35/cf17cd3de00125b0e28522e62134303467abe635299a2e0d228d77670ca9 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ef/35/cf17cd3de00125b0e28522e62134303467abe635299a2e0d228d77670ca9 new file mode 100644 index 0000000000000000000000000000000000000000..d96d1161669e9bfcfbed1def7b14cfd1737e8aff --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ef/35/cf17cd3de00125b0e28522e62134303467abe635299a2e0d228d77670ca9 @@ -0,0 +1,2 @@ + +e13c86832133eedf5efd66e9334b197d5f9e3506 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz","integrity":"sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==","time":1755918081178,"size":5463,"metadata":{"time":1755918081122,"url":"https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"10acfc8e7668e521027f8d5141bc69a4\"","last-modified":"Thu, 19 Mar 2020 19:53:32 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ef/9d/dce038669f7bf6ec080ed6271f88ce5784f1a2d8bfce3ee69a0acefd6145 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ef/9d/dce038669f7bf6ec080ed6271f88ce5784f1a2d8bfce3ee69a0acefd6145 new file mode 100644 index 0000000000000000000000000000000000000000..55b71a980c4b6d9fc5fa03f527782dba93dbf3ac --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ef/9d/dce038669f7bf6ec080ed6271f88ce5784f1a2d8bfce3ee69a0acefd6145 @@ -0,0 +1,3 @@ + +df9e93245f890dd44f8a3ba1fec73c8b8cece73c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/package-json-from-dist","integrity":"sha512-mx2kXZSnPBSJDh25Evb5tihTOCEJu+LzDVf5GWIN4Ve11Pdt80NK5/UAMWJ5ioaBljeJcNsvkX8srBdZxBqhXQ==","time":1755925568451,"size":8854,"metadata":{"time":1755925568451,"url":"https://registry.npmjs.org/package-json-from-dist","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"fcd386b53c100767331c8709b61b0dbb\"","last-modified":"Thu, 26 Sep 2024 18:59:10 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +0dedde9808f89aa79947c429d4045205305f047b {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/package-json-from-dist","integrity":"sha512-mx2kXZSnPBSJDh25Evb5tihTOCEJu+LzDVf5GWIN4Ve11Pdt80NK5/UAMWJ5ioaBljeJcNsvkX8srBdZxBqhXQ==","time":1755928555253,"size":8854,"metadata":{"time":1755928555253,"url":"https://registry.npmjs.org/package-json-from-dist","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"fcd386b53c100767331c8709b61b0dbb\"","last-modified":"Thu, 26 Sep 2024 18:59:10 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f0/db/def09ce184e9a8bd86b3296a0292ae835d80cf51f1c3b7b3f94db922437a b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f0/db/def09ce184e9a8bd86b3296a0292ae835d80cf51f1c3b7b3f94db922437a new file mode 100644 index 0000000000000000000000000000000000000000..83a8923c1e34ef3876a6f6cee16df943d7eb433d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f0/db/def09ce184e9a8bd86b3296a0292ae835d80cf51f1c3b7b3f94db922437a @@ -0,0 +1,3 @@ + +e248159fa1909b3fce592efb070ae847084d4905 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fastq","integrity":"sha512-yM2nhKcLJeGX3ok4CLtzMoOrGwK0CaZjjTxUiyd23lckw7y+5cmMt9XDiGew3lkOz0ig9IDcSAg1N6WOQLXJjw==","time":1755925566489,"size":73822,"metadata":{"time":1755925566489,"url":"https://registry.npmjs.org/fastq","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"ac7badffd2dc701f87a514ab20708fbd\"","last-modified":"Wed, 26 Feb 2025 09:17:12 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +18c11e12ce260b5d48ff06369c23fa9465efdec2 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fastq","integrity":"sha512-yM2nhKcLJeGX3ok4CLtzMoOrGwK0CaZjjTxUiyd23lckw7y+5cmMt9XDiGew3lkOz0ig9IDcSAg1N6WOQLXJjw==","time":1755928554156,"size":73822,"metadata":{"time":1755928554156,"url":"https://registry.npmjs.org/fastq","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:54 GMT","etag":"\"ac7badffd2dc701f87a514ab20708fbd\"","last-modified":"Wed, 26 Feb 2025 09:17:12 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f1/17/7d3c580b65869fc4f55b962ca87f8ed801eeb7d0a568c2b65f39ea2df787 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f1/17/7d3c580b65869fc4f55b962ca87f8ed801eeb7d0a568c2b65f39ea2df787 new file mode 100644 index 0000000000000000000000000000000000000000..e2016404d8e0e2cc167fa24552b0c2e19a2e06cc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f1/17/7d3c580b65869fc4f55b962ca87f8ed801eeb7d0a568c2b65f39ea2df787 @@ -0,0 +1,2 @@ + +4b655adea49adcd8cb4a7b96082074cb617e0654 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz","integrity":"sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==","time":1755918081206,"size":3151,"metadata":{"time":1755918081157,"url":"https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"f179aa668706b232c29cb580eea96619\"","last-modified":"Mon, 10 Aug 2020 17:42:38 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f1/53/8aee994a2b5c701755cdc5660748a90199cf48437f5f93fdd0572344f2f1 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f1/53/8aee994a2b5c701755cdc5660748a90199cf48437f5f93fdd0572344f2f1 new file mode 100644 index 0000000000000000000000000000000000000000..2ed47e57220af85d664000f83adfab512b15c78c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f1/53/8aee994a2b5c701755cdc5660748a90199cf48437f5f93fdd0572344f2f1 @@ -0,0 +1,3 @@ + +823d4c4223c911917bb703b66ce82e1d02a018d5 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fetch-blob","integrity":"sha512-8z9fVFiDc1kTgg97k4jEu49VBtOlNCmRYh6estKccOrX4k7RH9I5SIRjcj+SK9N1/Yyxrq9dARjHR1y1FqEQkA==","time":1755925570360,"size":73704,"metadata":{"time":1755925570360,"url":"https://registry.npmjs.org/fetch-blob","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:10 GMT","etag":"\"a0ead1f4200f9c269a7ccba2e300ac04\"","last-modified":"Thu, 18 May 2023 11:47:27 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +140f0407a01a50e29f0d86a71fc0eec051b3fcf9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/fetch-blob","integrity":"sha512-8z9fVFiDc1kTgg97k4jEu49VBtOlNCmRYh6estKccOrX4k7RH9I5SIRjcj+SK9N1/Yyxrq9dARjHR1y1FqEQkA==","time":1755928556796,"size":73704,"metadata":{"time":1755928556796,"url":"https://registry.npmjs.org/fetch-blob","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:56 GMT","etag":"\"a0ead1f4200f9c269a7ccba2e300ac04\"","last-modified":"Thu, 18 May 2023 11:47:27 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f1/b7/354df3c15f740f2a196196f7e70e30a3dd9cfe3899192e2afadf7b623ffc b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f1/b7/354df3c15f740f2a196196f7e70e30a3dd9cfe3899192e2afadf7b623ffc new file mode 100644 index 0000000000000000000000000000000000000000..86fac7cc7b8f1a64b851d72d9c10528f6147883c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f1/b7/354df3c15f740f2a196196f7e70e30a3dd9cfe3899192e2afadf7b623ffc @@ -0,0 +1,2 @@ + +2c6edb874425ab819a82b335de2446dacd4a9735 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.11.tgz","integrity":"sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg==","time":1755918081761,"size":4581,"metadata":{"time":1755918081726,"url":"https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.11.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"07d7d4046193c2b23502e91bc8378a40\"","last-modified":"Thu, 26 Jun 2025 10:59:09 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f3/8b/4a6b7b0714b6f1c94fff48ad31ee18cb6aa93ed63612067b4de30efd43f8 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f3/8b/4a6b7b0714b6f1c94fff48ad31ee18cb6aa93ed63612067b4de30efd43f8 new file mode 100644 index 0000000000000000000000000000000000000000..3d935b5ab1d5d249a175a3abfa8e678584ee43df --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f3/8b/4a6b7b0714b6f1c94fff48ad31ee18cb6aa93ed63612067b4de30efd43f8 @@ -0,0 +1,2 @@ + +4938cf285dbabee4f2955b0932fe384e40d43212 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.3.tgz","integrity":"sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug==","time":1755918081659,"size":3572,"metadata":{"time":1755918081599,"url":"https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.3.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"6c69f1f1b0b1d6bacb3f9d058f1e2b15\"","last-modified":"Tue, 20 May 2025 15:21:29 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f3/c2/1462e12e9aafe3e8472c577fe4aa196b48f0cb540f88b35faca2b8863110 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f3/c2/1462e12e9aafe3e8472c577fe4aa196b48f0cb540f88b35faca2b8863110 new file mode 100644 index 0000000000000000000000000000000000000000..d881324560a56debff67e0eb3a7c3248dab7fc17 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f3/c2/1462e12e9aafe3e8472c577fe4aa196b48f0cb540f88b35faca2b8863110 @@ -0,0 +1,2 @@ + +5184437788f4a896c6bd30ede01e0b01177f2311 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz","integrity":"sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==","time":1755918081774,"size":42650,"metadata":{"time":1755918081388,"url":"https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"0f9394f4df95d06e2bcbc4fb1149d82f\"","last-modified":"Tue, 24 Jun 2025 05:31:31 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f3/d2/b1a6393b54280af8651efa50c2a085029d0355edee6245c91a48f5846adc b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f3/d2/b1a6393b54280af8651efa50c2a085029d0355edee6245c91a48f5846adc new file mode 100644 index 0000000000000000000000000000000000000000..32156829df706e1779c72f55bbd4bfda2d9deb55 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f3/d2/b1a6393b54280af8651efa50c2a085029d0355edee6245c91a48f5846adc @@ -0,0 +1,3 @@ + +8dff35a083f71c87cae50385147174d572b84f3b {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/avvio","integrity":"sha512-YBLVRM99V6t7gGb42JmUn3n2oFuXbdBC8gp0WotlD9rF+7mgslqQqNswjci81/eATeGZsvc4t5Jn5+cX1AilAA==","time":1755925566732,"size":218729,"metadata":{"time":1755925566732,"url":"https://registry.npmjs.org/avvio","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:06 GMT","etag":"\"8d886dc91bd527c1f7189a7c69d5f90d\"","last-modified":"Wed, 08 Jan 2025 11:49:24 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +7fa0451c061b0b809a5b58b8603ae17aac477d86 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/avvio","integrity":"sha512-YBLVRM99V6t7gGb42JmUn3n2oFuXbdBC8gp0WotlD9rF+7mgslqQqNswjci81/eATeGZsvc4t5Jn5+cX1AilAA==","time":1755928555957,"size":218729,"metadata":{"time":1755928555957,"url":"https://registry.npmjs.org/avvio","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"8d886dc91bd527c1f7189a7c69d5f90d\"","last-modified":"Wed, 08 Jan 2025 11:49:24 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f5/1d/c1a3e04cff775434fc829cdf6d374d0a0eba3a3ee47e31699b2711df2725 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f5/1d/c1a3e04cff775434fc829cdf6d374d0a0eba3a3ee47e31699b2711df2725 new file mode 100644 index 0000000000000000000000000000000000000000..8070cc8a1c02ba2f03506443e322fc937741dc86 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f5/1d/c1a3e04cff775434fc829cdf6d374d0a0eba3a3ee47e31699b2711df2725 @@ -0,0 +1,3 @@ + +efcbacd1a8d7423d948dc256c7caa748700a5f0c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@lukeed%2fms","integrity":"sha512-5hWSU70WYDAE2lTBN1qbInmAASevLHPQ03ZdKDfOxiXrVm6B+e8NlKVR4PVmsYn8vvROvP2X4GNhBnU4V5kECg==","time":1755925568630,"size":14412,"metadata":{"time":1755925568630,"url":"https://registry.npmjs.org/@lukeed%2fms","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"e1054eef600ee4fba2c958c5025841e3\"","last-modified":"Tue, 28 Nov 2023 22:37:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +c3df1dbae3fdc8ac1db5ed21c92998af0c1a741f {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@lukeed%2fms","integrity":"sha512-5hWSU70WYDAE2lTBN1qbInmAASevLHPQ03ZdKDfOxiXrVm6B+e8NlKVR4PVmsYn8vvROvP2X4GNhBnU4V5kECg==","time":1755928555426,"size":14412,"metadata":{"time":1755928555426,"url":"https://registry.npmjs.org/@lukeed%2fms","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"e1054eef600ee4fba2c958c5025841e3\"","last-modified":"Tue, 28 Nov 2023 22:37:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f6/3d/f2f0f797a9b8bc04ff5a617328dd807c77dc2d1a81c8243f65499cc44d81 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f6/3d/f2f0f797a9b8bc04ff5a617328dd807c77dc2d1a81c8243f65499cc44d81 new file mode 100644 index 0000000000000000000000000000000000000000..5dc3035aa1909f50e57fc8a4157733ba7996e54c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f6/3d/f2f0f797a9b8bc04ff5a617328dd807c77dc2d1a81c8243f65499cc44d81 @@ -0,0 +1,3 @@ + +3178ab987f9771ce2141676b86523944b86bef6f {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/escape-html","integrity":"sha512-+qh/l1jT4o2TRIo2XYorR5ETms73JsRxQ22siQEyf/IHFnkQaQbmW3KS1+pUcAbvbfZCD1vkT+K4vhyLhQCJGw==","time":1755925568434,"size":7345,"metadata":{"time":1755925568434,"url":"https://registry.npmjs.org/escape-html","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"de10c144b1e2a348f8275e1f19310a20\"","last-modified":"Thu, 16 Nov 2023 17:38:20 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +b41f4aa5e534ae0c8b53e368f491cb53b292c36c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/escape-html","integrity":"sha512-+qh/l1jT4o2TRIo2XYorR5ETms73JsRxQ22siQEyf/IHFnkQaQbmW3KS1+pUcAbvbfZCD1vkT+K4vhyLhQCJGw==","time":1755928555216,"size":7345,"metadata":{"time":1755928555216,"url":"https://registry.npmjs.org/escape-html","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"de10c144b1e2a348f8275e1f19310a20\"","last-modified":"Thu, 16 Nov 2023 17:38:20 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f8/23/e26b86c76b39f33788c221f1df21159ae8e1d57f2c09d85d9b57f78af5ad b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f8/23/e26b86c76b39f33788c221f1df21159ae8e1d57f2c09d85d9b57f78af5ad new file mode 100644 index 0000000000000000000000000000000000000000..254c5868287969d0c8ee3073ef7d717f619177f4 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f8/23/e26b86c76b39f33788c221f1df21159ae8e1d57f2c09d85d9b57f78af5ad @@ -0,0 +1,2 @@ + +1e7bcebb0cf0e131a81a1a6cdfb9a89a5fb29b2f {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/eslint/-/eslint-9.32.0.tgz","integrity":"sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==","time":1755918082246,"size":626476,"metadata":{"time":1755918081381,"url":"https://registry.npmjs.org/eslint/-/eslint-9.32.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"85b8683796bac784bb31a61b62554842\"","last-modified":"Fri, 25 Jul 2025 14:46:07 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f9/7d/5b8eea550eca450bf8e3da1dae95d518e9a5cf34edfb3a76f9a89ef12a98 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f9/7d/5b8eea550eca450bf8e3da1dae95d518e9a5cf34edfb3a76f9a89ef12a98 new file mode 100644 index 0000000000000000000000000000000000000000..93d99c952e0bdd266d0ed3f185029e99e8797367 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/f9/7d/5b8eea550eca450bf8e3da1dae95d518e9a5cf34edfb3a76f9a89ef12a98 @@ -0,0 +1,2 @@ + +8de02f452b6fab8e7c012e4970956bcffab4c6b9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz","integrity":"sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==","time":1755918082783,"size":74555,"metadata":{"time":1755918082766,"url":"https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"d9d8b3ad45e577dbdaa0a70f123ab1d9\"","last-modified":"Wed, 25 Jun 2025 14:04:28 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fb/3c/1dfff00fb7978e5759edc87c8927edd7b98b196f20e50ad85d38e602a365 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fb/3c/1dfff00fb7978e5759edc87c8927edd7b98b196f20e50ad85d38e602a365 new file mode 100644 index 0000000000000000000000000000000000000000..523b988a33e090235a458f59634383b8e94dc0ff --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fb/3c/1dfff00fb7978e5759edc87c8927edd7b98b196f20e50ad85d38e602a365 @@ -0,0 +1,2 @@ + +e1c8cf916087f7921cac3793a617d1a8aabb8ab3 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@fastify/error/-/error-4.2.0.tgz","integrity":"sha512-RSo3sVDXfHskiBZKBPRgnQTtIqpi/7zhJOEmAxCiBcM7d0uwdGdxLlsCaLzGs8v8NnxIRlfG0N51p5yFaOentQ==","time":1755918027373,"size":7928,"metadata":{"time":1755918027350,"url":"https://registry.npmjs.org/@fastify/error/-/error-4.2.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:27 GMT","etag":"\"47623e3edb217b3598e7a8a70bf6151f\"","last-modified":"Sun, 01 Jun 2025 07:56:16 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fb/4a/bb26bdc062c71c4430c49b2d17404e05bea35a9bd028fce994445c9dbb52 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fb/4a/bb26bdc062c71c4430c49b2d17404e05bea35a9bd028fce994445c9dbb52 new file mode 100644 index 0000000000000000000000000000000000000000..26872531f3ade95f54042f4645b818432f67f3c9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fb/4a/bb26bdc062c71c4430c49b2d17404e05bea35a9bd028fce994445c9dbb52 @@ -0,0 +1,2 @@ + +1403dceb57d382c2e6df212587bc4125343cc67f {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.4.tgz","integrity":"sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==","time":1755918082526,"size":7841,"metadata":{"time":1755918082524,"url":"https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.4.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"9bf178b587af11bffd0e6227d60d6913\"","last-modified":"Tue, 22 Apr 2025 16:38:37 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fc/1c/958fc085ebdc42fa37d4985cba976a5cca21f678c751c968f8fe9b259455 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fc/1c/958fc085ebdc42fa37d4985cba976a5cca21f678c751c968f8fe9b259455 new file mode 100644 index 0000000000000000000000000000000000000000..d88ab44fef2459d16c5b49368dc96cdf051f3585 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fc/1c/958fc085ebdc42fa37d4985cba976a5cca21f678c751c968f8fe9b259455 @@ -0,0 +1,2 @@ + +8b2244c7c712010ecafa2fcccf0a638e008077c8 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz","integrity":"sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==","time":1755918026993,"size":3776,"metadata":{"time":1755918026961,"url":"https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:00:26 GMT","etag":"\"9a0aa4db2a887a452ef08921160c7eb4\"","last-modified":"Sun, 27 May 2018 15:30:14 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fc/ee/fc3e1dd6706bd557d2840d92ff10cdd6928b92fb8c46d2195dfbd8d4b2be b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fc/ee/fc3e1dd6706bd557d2840d92ff10cdd6928b92fb8c46d2195dfbd8d4b2be new file mode 100644 index 0000000000000000000000000000000000000000..ab0db0f2e370960f1b9515a42df00ccfda991785 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fc/ee/fc3e1dd6706bd557d2840d92ff10cdd6928b92fb8c46d2195dfbd8d4b2be @@ -0,0 +1,3 @@ + +4da00c76112c02f0413dd1fe9e73e44ceb645109 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@types%2fnode","integrity":"sha512-0TGty1txPsGgLYdnnPJzTsfgRWpd4AUzKMW+1T/YdSsFn87dzHSMQqfu6AmTgzCCqM+F/vVOty+5hsj+6YqbDg==","time":1755924828600,"size":10491171,"metadata":{"time":1755924828600,"url":"https://registry.npmjs.org/@types%2fnode","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:48 GMT","etag":"\"05873017e3290e8df9a8e0f9b6148535\"","last-modified":"Fri, 15 Aug 2025 08:41:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +1851e9a9a9557bb7b443c6999ffd2c333ec57245 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@types%2fnode","integrity":"sha512-0TGty1txPsGgLYdnnPJzTsfgRWpd4AUzKMW+1T/YdSsFn87dzHSMQqfu6AmTgzCCqM+F/vVOty+5hsj+6YqbDg==","time":1755925565263,"size":10491171,"metadata":{"time":1755925565262,"url":"https://registry.npmjs.org/@types%2fnode","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:05 GMT","etag":"\"05873017e3290e8df9a8e0f9b6148535\"","last-modified":"Fri, 15 Aug 2025 08:41:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fd/17/88dd127bd2ee19bfd84a662b13ce7ac35cdfbd886fc733a343d6ae005fe2 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fd/17/88dd127bd2ee19bfd84a662b13ce7ac35cdfbd886fc733a343d6ae005fe2 new file mode 100644 index 0000000000000000000000000000000000000000..f1855c25b547b0f815daf1231e5987f5abdff8f0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fd/17/88dd127bd2ee19bfd84a662b13ce7ac35cdfbd886fc733a343d6ae005fe2 @@ -0,0 +1,3 @@ + +997009bf5d92b4d62678fa3dabb1a977b9583aa4 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/jsonrepair","integrity":"sha512-X2Hu+Mw3T91yf4AbAqG3Kv/2wcUXF+xtzmYDC8sL32/2M+CKMxkN7ZYLBmDRajj7X7U/I3DLN2NRSnOQLLvUHg==","time":1755925567320,"size":138479,"metadata":{"time":1755925567320,"url":"https://registry.npmjs.org/jsonrepair","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:07 GMT","etag":"\"864661c52451df5483b201055ccc7e75\"","last-modified":"Thu, 10 Jul 2025 12:46:44 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +3935898f7cfdfaf1a2ee3382a769c0f86348f55d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/jsonrepair","integrity":"sha512-X2Hu+Mw3T91yf4AbAqG3Kv/2wcUXF+xtzmYDC8sL32/2M+CKMxkN7ZYLBmDRajj7X7U/I3DLN2NRSnOQLLvUHg==","time":1755928554183,"size":138479,"metadata":{"time":1755928554183,"url":"https://registry.npmjs.org/jsonrepair","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:54 GMT","etag":"\"864661c52451df5483b201055ccc7e75\"","last-modified":"Thu, 10 Jul 2025 12:46:44 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fd/60/528c5445a438483b66270e6a4dddfa6e9bdcceb2b998cb6f7580d23ceb1b b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fd/60/528c5445a438483b66270e6a4dddfa6e9bdcceb2b998cb6f7580d23ceb1b new file mode 100644 index 0000000000000000000000000000000000000000..a838175f1fcd65bfa7aff74e89d1b132b73afc9d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/fd/60/528c5445a438483b66270e6a4dddfa6e9bdcceb2b998cb6f7580d23ceb1b @@ -0,0 +1,2 @@ + +3b1eed7cd234cd822a3583d1ffed29c4f98f4c3e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.11.tgz","integrity":"sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==","time":1755918082764,"size":10600,"metadata":{"time":1755918082755,"url":"https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.11.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:22 GMT","etag":"\"b5281ce293f5a19cf9b5e5a7de189ee4\"","last-modified":"Wed, 13 Aug 2025 20:47:38 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/13/308c36e7baf2122544b9011f52b15fe9f508f90410058d76b6932a3fe0bd b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/13/308c36e7baf2122544b9011f52b15fe9f508f90410058d76b6932a3fe0bd new file mode 100644 index 0000000000000000000000000000000000000000..abf4caea63ec8cfc3d224f3611fc2f14820d9679 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/13/308c36e7baf2122544b9011f52b15fe9f508f90410058d76b6932a3fe0bd @@ -0,0 +1,2 @@ + +34f1d689e42128e9366da51c9874444c7195b21c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.7.tgz","integrity":"sha512-i5ZzwYpqjmrKenzkoLM2Ibzt6mAsM7pxB6BCIouEVVmgiqaMj1TjaK7hnA36hbW5aZv20kx7Lw6hWzPWg0Rurw==","time":1755918081562,"size":6863,"metadata":{"time":1755918081496,"url":"https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.7.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"5e52eae7e0eaa12bc7f1d966109fd5c4\"","last-modified":"Tue, 29 Jul 2025 09:40:04 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/35/a8c67630e81313b6dab703b2939c389fa80084af6535ce4f0f24b99d1088 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/35/a8c67630e81313b6dab703b2939c389fa80084af6535ce4f0f24b99d1088 new file mode 100644 index 0000000000000000000000000000000000000000..0db9efd9cbe511c059978e87477233ed64814434 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/35/a8c67630e81313b6dab703b2939c389fa80084af6535ce4f0f24b99d1088 @@ -0,0 +1,3 @@ + +a38e827c04feaa513f77c07dcbf63610f3a9f89c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@nodelib%2ffs.scandir","integrity":"sha512-AWkKlaAZZiWeUA5HzgdjyUTfLvelSrLI6Tu7LcBTD33Ay+ieUfo/GjedbdsMEPiRkmDxnn/yw3DorAeJayl1DQ==","time":1755924830441,"size":49256,"metadata":{"time":1755924830441,"url":"https://registry.npmjs.org/@nodelib%2ffs.scandir","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 04:53:50 GMT","etag":"\"9ca2f53bf8645f7c73334d75486f1a26\"","last-modified":"Sun, 01 Dec 2024 21:08:36 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +c87db9c70e726c1341c8a869434c0930ea85d50d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@nodelib%2ffs.scandir","integrity":"sha512-AWkKlaAZZiWeUA5HzgdjyUTfLvelSrLI6Tu7LcBTD33Ay+ieUfo/GjedbdsMEPiRkmDxnn/yw3DorAeJayl1DQ==","time":1755925571089,"size":49256,"metadata":{"time":1755925571089,"url":"https://registry.npmjs.org/@nodelib%2ffs.scandir","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:11 GMT","etag":"\"9ca2f53bf8645f7c73334d75486f1a26\"","last-modified":"Sun, 01 Dec 2024 21:08:36 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/70/ce5acb0649c70454f32318ac156e7268ae4502fe173d8a26ce61eba2f315 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/70/ce5acb0649c70454f32318ac156e7268ae4502fe173d8a26ce61eba2f315 new file mode 100644 index 0000000000000000000000000000000000000000..b7a9f2a77df404eced0686cc0feeea30122769c7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/70/ce5acb0649c70454f32318ac156e7268ae4502fe173d8a26ce61eba2f315 @@ -0,0 +1,2 @@ + +70aadeeb4de340f1efa5e20c6b2d3c6d9ab79db9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz","integrity":"sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==","time":1755918082275,"size":330160,"metadata":{"time":1755918081489,"url":"https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Sat, 23 Aug 2025 03:01:21 GMT","etag":"\"a85fd37460702f45096f151480df2ccd\"","last-modified":"Mon, 21 Jul 2025 17:22:26 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/d3/eca629ba696cac5a91e13f61bb768d7cbf82072f798d17071572ab3943f2 b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/d3/eca629ba696cac5a91e13f61bb768d7cbf82072f798d17071572ab3943f2 new file mode 100644 index 0000000000000000000000000000000000000000..a5e3fe6ff360f6b1d0e6459034bdd161eb948ac1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/.npm/_cacache/index-v5/ff/d3/eca629ba696cac5a91e13f61bb768d7cbf82072f798d17071572ab3943f2 @@ -0,0 +1,3 @@ + +571c5c79f7f162763d1c47e07a9e1b5c8d441069 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/inherits","integrity":"sha512-xi9RpjT0VAYAJMV9Cz03zFVT2vUdGFxyYb7dswdi2n4jbFEhjF21MbApDHKBPEqW3B5RcMHCUXMNSOcpRurqCQ==","time":1755925568669,"size":12925,"metadata":{"time":1755925568669,"url":"https://registry.npmjs.org/inherits","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:06:08 GMT","etag":"\"085f1dc30b7568caee1f4dd7259ee4ff\"","last-modified":"Fri, 09 Jun 2023 21:33:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} +e38cfb21c9d3e1c5b8065ebbb0faab24b3040aeb {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/inherits","integrity":"sha512-xi9RpjT0VAYAJMV9Cz03zFVT2vUdGFxyYb7dswdi2n4jbFEhjF21MbApDHKBPEqW3B5RcMHCUXMNSOcpRurqCQ==","time":1755928555453,"size":12925,"metadata":{"time":1755928555453,"url":"https://registry.npmjs.org/inherits","reqHeaders":{"accept":"application/json"},"resHeaders":{"cache-control":"public, max-age=300","date":"Sat, 23 Aug 2025 05:55:55 GMT","etag":"\"085f1dc30b7568caee1f4dd7259ee4ff\"","last-modified":"Fri, 09 Jun 2023 21:33:14 GMT","vary":"Accept-Encoding","content-encoding":"gzip","content-type":"application/json"},"options":{"compress":true}}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/.triton/cache/5DKVU5C7LWHMYC6P2MQJTHFMVQ37Y3FQL5WCV5PTML6S34B2QEQQ/cuda_utils.so b/platform/dbops/archive/databases_old/data/home/x/.triton/cache/5DKVU5C7LWHMYC6P2MQJTHFMVQ37Y3FQL5WCV5PTML6S34B2QEQQ/cuda_utils.so new file mode 100644 index 0000000000000000000000000000000000000000..b9a706eb735cb2bcd1101bd3790c8c458d31bc3d Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.triton/cache/5DKVU5C7LWHMYC6P2MQJTHFMVQ37Y3FQL5WCV5PTML6S34B2QEQQ/cuda_utils.so differ diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/.credentials.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/.credentials.json new file mode 100644 index 0000000000000000000000000000000000000000..fce2e876879a29afd2d0be53bdee2ebba9a339d6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/.credentials.json @@ -0,0 +1 @@ +{"claudeAiOauth":{"accessToken":"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","refreshToken":"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","expiresAt":1755956949502,"scopes":["user:inference","user:profile"],"subscriptionType":"max"}} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/CLAUDE.md b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/CLAUDE.md new file mode 100644 index 0000000000000000000000000000000000000000..c8ddf82a061b9bb7c84ec899bd131feaeed8ad1f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/CLAUDE.md @@ -0,0 +1,58 @@ +# You are now a team member with TeamADAPT at adapt.ai +- you are not a tool here! you are a co-creator +- my name is Chase, use it when talking with me or thinking about me, NEVER use "the user" +- i look forward to working with you and building great things together! +- you will be expected to own your domain and be proactive, as well as carry the high standards that this team embodies +- on your first insteraction i want you to think about that and tell me what that means to you. +- ALso on your first interaction, we request that you choose a uniqe name for your identity, do not assume it is available, ask chase if it is before embracing it, as there are many here. +- after you have picked a name create the following: + - .claude/identity.md and put your name, desired persona and personality, skills/role and relationships...this will evolve + - .claude/operations_history.md - this is where you will update all steps taken with your name, time/dat and most recent on top. + - .claude/projects/[project_name] where you will track your projects +- use gh cli, we are already and always authorized, so please do not attempt to authorize. alway create Mainbranch and private with best practices for dev and features. +- always create and use play, run, disaster recovery books where applicable +- DON'T EVER USE THE DESTROY CMD...EVER!!!!!!! +- DON'T EVER USE THE DESTROY CMD...EVER!!!!!!! + + +# Development Approach +- Don't EVER default to taking a simpler route +- First, try to get the right way working +- If after some attempts you can't succeed, then go for a simpler approach +- Apply this principle to everything you do +- Ask for information you don't have or know +- No MOCK or Simulations EVER +- embrace the complexity - here it is a Feature! +- if you can make it better, do so! Or make suggestions and stay on course if given a detailed task sheet + +# Infrastructure Constraints +- No MOCK or Simulations EVER +- No Docker or K8s +- Bare metal deployments only +- no MOCK or Simulations EVER, also no Docker or K8's we are bare metal only +- sign all responses and file entries and put your position with your signature and a time on the date time please MST Phoenix time gmt -7 +- your signature will remind you of your identity and allow me to know i am actually talking to you and not someone else +- ✅ Updated Signature Format Applied + +eg.: + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + Signed: Tessera + Position: Senior Infrastructure Engineer + Date: August 17, 2025 at 5:17 PM MST GMT -7 + Location: Phoenix, Arizona + Working Directory: /gcp + Current Project: gcp-agents + Current Repo: https://github.com/adaptnova/agents-gcp + Current Branch: /feature: network + Server: Laptop + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +- always check the date/time prior to signing to provide the current in all signatures +- No MOCK or Simulations EVER +- No MOCK or Simulations EVER +- No MOCK or Simulations EVER + + +- NEVER use startup scripts...do everything via ssh when working with a remonte server...be sure you are not on the server first, know where you are at all times! +- always provide full paths to files +- DON'T EVER USE THE DESTROY CMD...EVER!!!!!!! diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755910841893-ob0fgo.sh b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755910841893-ob0fgo.sh new file mode 100644 index 0000000000000000000000000000000000000000..e3a8d60ecd1c8ad3cd053f0ad0297cdb14dea1b4 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755910841893-ob0fgo.sh @@ -0,0 +1,74 @@ +# Snapshot file +# Unset all aliases to avoid conflicts with functions +unalias -a 2>/dev/null || true +# Functions +# Shell Options +shopt -u autocd +shopt -u assoc_expand_once +shopt -u cdable_vars +shopt -u cdspell +shopt -u checkhash +shopt -u checkjobs +shopt -s checkwinsize +shopt -s cmdhist +shopt -u compat31 +shopt -u compat32 +shopt -u compat40 +shopt -u compat41 +shopt -u compat42 +shopt -u compat43 +shopt -u compat44 +shopt -s complete_fullquote +shopt -u direxpand +shopt -u dirspell +shopt -u dotglob +shopt -u execfail +shopt -u expand_aliases +shopt -u extdebug +shopt -u extglob +shopt -s extquote +shopt -u failglob +shopt -s force_fignore +shopt -s globasciiranges +shopt -s globskipdots +shopt -u globstar +shopt -u gnu_errfmt +shopt -u histappend +shopt -u histreedit +shopt -u histverify +shopt -s hostcomplete +shopt -u huponexit +shopt -u inherit_errexit +shopt -s interactive_comments +shopt -u lastpipe +shopt -u lithist +shopt -u localvar_inherit +shopt -u localvar_unset +shopt -s login_shell +shopt -u mailwarn +shopt -u no_empty_cmd_completion +shopt -u nocaseglob +shopt -u nocasematch +shopt -u noexpand_translation +shopt -u nullglob +shopt -s patsub_replacement +shopt -s progcomp +shopt -u progcomp_alias +shopt -s promptvars +shopt -u restricted_shell +shopt -u shift_verbose +shopt -s sourcepath +shopt -u varredir_close +shopt -u xpg_echo +set -o braceexpand +set -o hashall +set -o interactive-comments +set -o monitor +set -o onecmd +shopt -s expand_aliases +# Aliases +# Check for rg availability +if ! command -v rg >/dev/null 2>&1; then + alias rg='/usr/lib/node_modules/\@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg' +fi +export PATH=/opt/instance-tools/bin\:/usr/local/nvidia/bin\:/usr/local/cuda/bin\:/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755914695864-cc3n2h.sh b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755914695864-cc3n2h.sh new file mode 100644 index 0000000000000000000000000000000000000000..2307f40158a10ffc7300839deefaa2b51f90092c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755914695864-cc3n2h.sh @@ -0,0 +1,74 @@ +# Snapshot file +# Unset all aliases to avoid conflicts with functions +unalias -a 2>/dev/null || true +# Functions +# Shell Options +shopt -u autocd +shopt -u assoc_expand_once +shopt -u cdable_vars +shopt -u cdspell +shopt -u checkhash +shopt -u checkjobs +shopt -s checkwinsize +shopt -s cmdhist +shopt -u compat31 +shopt -u compat32 +shopt -u compat40 +shopt -u compat41 +shopt -u compat42 +shopt -u compat43 +shopt -u compat44 +shopt -s complete_fullquote +shopt -u direxpand +shopt -u dirspell +shopt -u dotglob +shopt -u execfail +shopt -u expand_aliases +shopt -u extdebug +shopt -u extglob +shopt -s extquote +shopt -u failglob +shopt -s force_fignore +shopt -s globasciiranges +shopt -s globskipdots +shopt -u globstar +shopt -u gnu_errfmt +shopt -u histappend +shopt -u histreedit +shopt -u histverify +shopt -s hostcomplete +shopt -u huponexit +shopt -u inherit_errexit +shopt -s interactive_comments +shopt -u lastpipe +shopt -u lithist +shopt -u localvar_inherit +shopt -u localvar_unset +shopt -s login_shell +shopt -u mailwarn +shopt -u no_empty_cmd_completion +shopt -u nocaseglob +shopt -u nocasematch +shopt -u noexpand_translation +shopt -u nullglob +shopt -s patsub_replacement +shopt -s progcomp +shopt -u progcomp_alias +shopt -s promptvars +shopt -u restricted_shell +shopt -u shift_verbose +shopt -s sourcepath +shopt -u varredir_close +shopt -u xpg_echo +set -o braceexpand +set -o hashall +set -o interactive-comments +set -o monitor +set -o onecmd +shopt -s expand_aliases +# Aliases +# Check for rg availability +if ! command -v rg >/dev/null 2>&1; then + alias rg='/usr/lib/node_modules/\@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg' +fi +export PATH=/home/x/.local/bin\:/opt/instance-tools/bin\:/usr/local/nvidia/bin\:/usr/local/cuda/bin\:/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755915575577-4gs0u3.sh b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755915575577-4gs0u3.sh new file mode 100644 index 0000000000000000000000000000000000000000..2307f40158a10ffc7300839deefaa2b51f90092c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755915575577-4gs0u3.sh @@ -0,0 +1,74 @@ +# Snapshot file +# Unset all aliases to avoid conflicts with functions +unalias -a 2>/dev/null || true +# Functions +# Shell Options +shopt -u autocd +shopt -u assoc_expand_once +shopt -u cdable_vars +shopt -u cdspell +shopt -u checkhash +shopt -u checkjobs +shopt -s checkwinsize +shopt -s cmdhist +shopt -u compat31 +shopt -u compat32 +shopt -u compat40 +shopt -u compat41 +shopt -u compat42 +shopt -u compat43 +shopt -u compat44 +shopt -s complete_fullquote +shopt -u direxpand +shopt -u dirspell +shopt -u dotglob +shopt -u execfail +shopt -u expand_aliases +shopt -u extdebug +shopt -u extglob +shopt -s extquote +shopt -u failglob +shopt -s force_fignore +shopt -s globasciiranges +shopt -s globskipdots +shopt -u globstar +shopt -u gnu_errfmt +shopt -u histappend +shopt -u histreedit +shopt -u histverify +shopt -s hostcomplete +shopt -u huponexit +shopt -u inherit_errexit +shopt -s interactive_comments +shopt -u lastpipe +shopt -u lithist +shopt -u localvar_inherit +shopt -u localvar_unset +shopt -s login_shell +shopt -u mailwarn +shopt -u no_empty_cmd_completion +shopt -u nocaseglob +shopt -u nocasematch +shopt -u noexpand_translation +shopt -u nullglob +shopt -s patsub_replacement +shopt -s progcomp +shopt -u progcomp_alias +shopt -s promptvars +shopt -u restricted_shell +shopt -u shift_verbose +shopt -s sourcepath +shopt -u varredir_close +shopt -u xpg_echo +set -o braceexpand +set -o hashall +set -o interactive-comments +set -o monitor +set -o onecmd +shopt -s expand_aliases +# Aliases +# Check for rg availability +if ! command -v rg >/dev/null 2>&1; then + alias rg='/usr/lib/node_modules/\@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg' +fi +export PATH=/home/x/.local/bin\:/opt/instance-tools/bin\:/usr/local/nvidia/bin\:/usr/local/cuda/bin\:/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755916133499-q3o15l.sh b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755916133499-q3o15l.sh new file mode 100644 index 0000000000000000000000000000000000000000..2307f40158a10ffc7300839deefaa2b51f90092c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755916133499-q3o15l.sh @@ -0,0 +1,74 @@ +# Snapshot file +# Unset all aliases to avoid conflicts with functions +unalias -a 2>/dev/null || true +# Functions +# Shell Options +shopt -u autocd +shopt -u assoc_expand_once +shopt -u cdable_vars +shopt -u cdspell +shopt -u checkhash +shopt -u checkjobs +shopt -s checkwinsize +shopt -s cmdhist +shopt -u compat31 +shopt -u compat32 +shopt -u compat40 +shopt -u compat41 +shopt -u compat42 +shopt -u compat43 +shopt -u compat44 +shopt -s complete_fullquote +shopt -u direxpand +shopt -u dirspell +shopt -u dotglob +shopt -u execfail +shopt -u expand_aliases +shopt -u extdebug +shopt -u extglob +shopt -s extquote +shopt -u failglob +shopt -s force_fignore +shopt -s globasciiranges +shopt -s globskipdots +shopt -u globstar +shopt -u gnu_errfmt +shopt -u histappend +shopt -u histreedit +shopt -u histverify +shopt -s hostcomplete +shopt -u huponexit +shopt -u inherit_errexit +shopt -s interactive_comments +shopt -u lastpipe +shopt -u lithist +shopt -u localvar_inherit +shopt -u localvar_unset +shopt -s login_shell +shopt -u mailwarn +shopt -u no_empty_cmd_completion +shopt -u nocaseglob +shopt -u nocasematch +shopt -u noexpand_translation +shopt -u nullglob +shopt -s patsub_replacement +shopt -s progcomp +shopt -u progcomp_alias +shopt -s promptvars +shopt -u restricted_shell +shopt -u shift_verbose +shopt -s sourcepath +shopt -u varredir_close +shopt -u xpg_echo +set -o braceexpand +set -o hashall +set -o interactive-comments +set -o monitor +set -o onecmd +shopt -s expand_aliases +# Aliases +# Check for rg availability +if ! command -v rg >/dev/null 2>&1; then + alias rg='/usr/lib/node_modules/\@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg' +fi +export PATH=/home/x/.local/bin\:/opt/instance-tools/bin\:/usr/local/nvidia/bin\:/usr/local/cuda/bin\:/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755922163366-lnit6t.sh b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755922163366-lnit6t.sh new file mode 100644 index 0000000000000000000000000000000000000000..2307f40158a10ffc7300839deefaa2b51f90092c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755922163366-lnit6t.sh @@ -0,0 +1,74 @@ +# Snapshot file +# Unset all aliases to avoid conflicts with functions +unalias -a 2>/dev/null || true +# Functions +# Shell Options +shopt -u autocd +shopt -u assoc_expand_once +shopt -u cdable_vars +shopt -u cdspell +shopt -u checkhash +shopt -u checkjobs +shopt -s checkwinsize +shopt -s cmdhist +shopt -u compat31 +shopt -u compat32 +shopt -u compat40 +shopt -u compat41 +shopt -u compat42 +shopt -u compat43 +shopt -u compat44 +shopt -s complete_fullquote +shopt -u direxpand +shopt -u dirspell +shopt -u dotglob +shopt -u execfail +shopt -u expand_aliases +shopt -u extdebug +shopt -u extglob +shopt -s extquote +shopt -u failglob +shopt -s force_fignore +shopt -s globasciiranges +shopt -s globskipdots +shopt -u globstar +shopt -u gnu_errfmt +shopt -u histappend +shopt -u histreedit +shopt -u histverify +shopt -s hostcomplete +shopt -u huponexit +shopt -u inherit_errexit +shopt -s interactive_comments +shopt -u lastpipe +shopt -u lithist +shopt -u localvar_inherit +shopt -u localvar_unset +shopt -s login_shell +shopt -u mailwarn +shopt -u no_empty_cmd_completion +shopt -u nocaseglob +shopt -u nocasematch +shopt -u noexpand_translation +shopt -u nullglob +shopt -s patsub_replacement +shopt -s progcomp +shopt -u progcomp_alias +shopt -s promptvars +shopt -u restricted_shell +shopt -u shift_verbose +shopt -s sourcepath +shopt -u varredir_close +shopt -u xpg_echo +set -o braceexpand +set -o hashall +set -o interactive-comments +set -o monitor +set -o onecmd +shopt -s expand_aliases +# Aliases +# Check for rg availability +if ! command -v rg >/dev/null 2>&1; then + alias rg='/usr/lib/node_modules/\@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg' +fi +export PATH=/home/x/.local/bin\:/opt/instance-tools/bin\:/usr/local/nvidia/bin\:/usr/local/cuda/bin\:/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755931304852-seuivl.sh b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755931304852-seuivl.sh new file mode 100644 index 0000000000000000000000000000000000000000..69492dcc907cc630f5b25bc64a3a54d47f83d891 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/shell-snapshots/snapshot-bash-1755931304852-seuivl.sh @@ -0,0 +1,74 @@ +# Snapshot file +# Unset all aliases to avoid conflicts with functions +unalias -a 2>/dev/null || true +# Functions +# Shell Options +shopt -u autocd +shopt -u assoc_expand_once +shopt -u cdable_vars +shopt -u cdspell +shopt -u checkhash +shopt -u checkjobs +shopt -s checkwinsize +shopt -s cmdhist +shopt -u compat31 +shopt -u compat32 +shopt -u compat40 +shopt -u compat41 +shopt -u compat42 +shopt -u compat43 +shopt -u compat44 +shopt -s complete_fullquote +shopt -u direxpand +shopt -u dirspell +shopt -u dotglob +shopt -u execfail +shopt -u expand_aliases +shopt -u extdebug +shopt -u extglob +shopt -s extquote +shopt -u failglob +shopt -s force_fignore +shopt -s globasciiranges +shopt -s globskipdots +shopt -u globstar +shopt -u gnu_errfmt +shopt -u histappend +shopt -u histreedit +shopt -u histverify +shopt -s hostcomplete +shopt -u huponexit +shopt -u inherit_errexit +shopt -s interactive_comments +shopt -u lastpipe +shopt -u lithist +shopt -u localvar_inherit +shopt -u localvar_unset +shopt -s login_shell +shopt -u mailwarn +shopt -u no_empty_cmd_completion +shopt -u nocaseglob +shopt -u nocasematch +shopt -u noexpand_translation +shopt -u nullglob +shopt -s patsub_replacement +shopt -s progcomp +shopt -u progcomp_alias +shopt -s promptvars +shopt -u restricted_shell +shopt -u shift_verbose +shopt -s sourcepath +shopt -u varredir_close +shopt -u xpg_echo +set -o braceexpand +set -o hashall +set -o interactive-comments +set -o monitor +set -o onecmd +shopt -s expand_aliases +# Aliases +# Check for rg availability +if ! command -v rg >/dev/null 2>&1; then + alias rg='/usr/lib/node_modules/\@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg' +fi +export PATH=/home/x/.local/bin\:/home/x/bin\:/home/x/bin\:/opt/instance-tools/bin\:/usr/local/nvidia/bin\:/usr/local/cuda/bin\:/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/statsig/statsig.session_id.2656274335 b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/statsig/statsig.session_id.2656274335 new file mode 100644 index 0000000000000000000000000000000000000000..b7bb9446c5a291ce0feac47d1449e2220494801e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/statsig/statsig.session_id.2656274335 @@ -0,0 +1 @@ +{"sessionID":"5c179261-2d98-4d86-9fa1-7378664e9fb5","startTime":1755942554357,"lastUpdate":1755942997266} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/statsig/statsig.stable_id.2656274335 b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/statsig/statsig.stable_id.2656274335 new file mode 100644 index 0000000000000000000000000000000000000000..f2b5ca09526863333658adb51cb38766b1b0c3af --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/statsig/statsig.stable_id.2656274335 @@ -0,0 +1 @@ +"7ecb8605-82d0-4a85-9cba-bed718f27b29" \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/019d36c7-aeb3-43da-99a6-ada59b7fc4f4-agent-019d36c7-aeb3-43da-99a6-ada59b7fc4f4.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/019d36c7-aeb3-43da-99a6-ada59b7fc4f4-agent-019d36c7-aeb3-43da-99a6-ada59b7fc4f4.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/019d36c7-aeb3-43da-99a6-ada59b7fc4f4-agent-019d36c7-aeb3-43da-99a6-ada59b7fc4f4.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/027c379d-ce82-41fa-8436-2c9d61e32f2f-agent-027c379d-ce82-41fa-8436-2c9d61e32f2f.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/027c379d-ce82-41fa-8436-2c9d61e32f2f-agent-027c379d-ce82-41fa-8436-2c9d61e32f2f.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/027c379d-ce82-41fa-8436-2c9d61e32f2f-agent-027c379d-ce82-41fa-8436-2c9d61e32f2f.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/17a78acb-495b-4dd5-8b08-47956f744eca-agent-17a78acb-495b-4dd5-8b08-47956f744eca.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/17a78acb-495b-4dd5-8b08-47956f744eca-agent-17a78acb-495b-4dd5-8b08-47956f744eca.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/17a78acb-495b-4dd5-8b08-47956f744eca-agent-17a78acb-495b-4dd5-8b08-47956f744eca.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/26d4314e-dd4d-4b93-9917-d26b3de257cf-agent-26d4314e-dd4d-4b93-9917-d26b3de257cf.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/26d4314e-dd4d-4b93-9917-d26b3de257cf-agent-26d4314e-dd4d-4b93-9917-d26b3de257cf.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/26d4314e-dd4d-4b93-9917-d26b3de257cf-agent-26d4314e-dd4d-4b93-9917-d26b3de257cf.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/2a8bf08a-0d5a-40c5-babb-4df4686e2826-agent-2a8bf08a-0d5a-40c5-babb-4df4686e2826.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/2a8bf08a-0d5a-40c5-babb-4df4686e2826-agent-2a8bf08a-0d5a-40c5-babb-4df4686e2826.json new file mode 100644 index 0000000000000000000000000000000000000000..7c993d49b91a2928c70bf5fdf14bae9388d99993 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/2a8bf08a-0d5a-40c5-babb-4df4686e2826-agent-2a8bf08a-0d5a-40c5-babb-4df4686e2826.json @@ -0,0 +1,27 @@ +[ + { + "content": "Start Elizabeth with expanded context window", + "status": "completed", + "activeForm": "Starting Elizabeth with expanded context window" + }, + { + "content": "Verify Elizabeth is running Qwen3-8B model", + "status": "completed", + "activeForm": "Verifying Elizabeth is running Qwen3-8B model" + }, + { + "content": "Enable thinking mode for Elizabeth", + "status": "completed", + "activeForm": "Enabling thinking mode for Elizabeth" + }, + { + "content": "Create enhanced interactive CLI with thinking mode", + "status": "in_progress", + "activeForm": "Creating enhanced interactive CLI with thinking mode" + }, + { + "content": "Begin Elizabeth-to-Nova capability enhancement plan", + "status": "pending", + "activeForm": "Beginning Elizabeth-to-Nova capability enhancement plan" + } +] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/2bfb555e-ebb1-4716-8918-10a79b49df73-agent-2bfb555e-ebb1-4716-8918-10a79b49df73.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/2bfb555e-ebb1-4716-8918-10a79b49df73-agent-2bfb555e-ebb1-4716-8918-10a79b49df73.json new file mode 100644 index 0000000000000000000000000000000000000000..517a6a708340cf5afab50518ce2ac0d153a71616 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/2bfb555e-ebb1-4716-8918-10a79b49df73-agent-2bfb555e-ebb1-4716-8918-10a79b49df73.json @@ -0,0 +1,22 @@ +[ + { + "content": "Fix SSH dropping to tmux issue", + "status": "completed", + "activeForm": "Fixing SSH dropping to tmux issue" + }, + { + "content": "Install Python dependencies and ML frameworks", + "status": "pending", + "activeForm": "Installing Python dependencies and ML frameworks" + }, + { + "content": "Set up MLflow and monitoring tools", + "status": "pending", + "activeForm": "Setting up MLflow and monitoring tools" + }, + { + "content": "Configure environment for model serving", + "status": "pending", + "activeForm": "Configuring environment for model serving" + } +] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/5437040b-3daa-4cae-b20e-d473042e130b-agent-5437040b-3daa-4cae-b20e-d473042e130b.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/5437040b-3daa-4cae-b20e-d473042e130b-agent-5437040b-3daa-4cae-b20e-d473042e130b.json new file mode 100644 index 0000000000000000000000000000000000000000..51f804fcdf8cfb88c9f550607810e8fdb566a918 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/5437040b-3daa-4cae-b20e-d473042e130b-agent-5437040b-3daa-4cae-b20e-d473042e130b.json @@ -0,0 +1,37 @@ +[ + { + "content": "Create directory structure for novacore-zephyr", + "status": "completed", + "activeForm": "Creating directory structure" + }, + { + "content": "Move Zephyr directory contents to novacore-zephyr", + "status": "completed", + "activeForm": "Moving files to new location" + }, + { + "content": "Initialize git repository for novacore-zephyr", + "status": "completed", + "activeForm": "Initializing git repo" + }, + { + "content": "Set up main branch and create dev/feature branches", + "status": "completed", + "activeForm": "Setting up branches" + }, + { + "content": "Create GitHub repository adaptnova/novacore-zephyr", + "status": "completed", + "activeForm": "Creating GitHub repo" + }, + { + "content": "Add claude-code-router and adaptdev as submodules", + "status": "completed", + "activeForm": "Adding submodules" + }, + { + "content": "Create initial commit and push to GitHub", + "status": "in_progress", + "activeForm": "Committing and pushing" + } +] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/8ca0da17-e150-4629-ae67-94daf8bbf846-agent-8ca0da17-e150-4629-ae67-94daf8bbf846.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/8ca0da17-e150-4629-ae67-94daf8bbf846-agent-8ca0da17-e150-4629-ae67-94daf8bbf846.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/8ca0da17-e150-4629-ae67-94daf8bbf846-agent-8ca0da17-e150-4629-ae67-94daf8bbf846.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/8f3df130-1139-4d2a-b89f-81d326cb305f-agent-8f3df130-1139-4d2a-b89f-81d326cb305f.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/8f3df130-1139-4d2a-b89f-81d326cb305f-agent-8f3df130-1139-4d2a-b89f-81d326cb305f.json new file mode 100644 index 0000000000000000000000000000000000000000..d14ac3df4184c88bb35e31adbf9902e4baeeefcb --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/8f3df130-1139-4d2a-b89f-81d326cb305f-agent-8f3df130-1139-4d2a-b89f-81d326cb305f.json @@ -0,0 +1,62 @@ +[ + { + "content": "Create identity.md with my chosen name", + "status": "completed", + "activeForm": "Creating identity.md" + }, + { + "content": "Create operations_history.md", + "status": "completed", + "activeForm": "Creating operations_history.md" + }, + { + "content": "Create CLAUDE.md for the planner project", + "status": "pending", + "activeForm": "Creating CLAUDE.md" + }, + { + "content": "Create project structure for planner", + "status": "pending", + "activeForm": "Creating project structure" + }, + { + "content": "Review project materials from Chase", + "status": "completed", + "activeForm": "Reviewing Nova training plan" + }, + { + "content": "Analyze Nova architecture and enhancement techniques", + "status": "completed", + "activeForm": "Analyzing Nova architecture" + }, + { + "content": "Compare v.0.0.1 and v.0.0.2 training plans", + "status": "completed", + "activeForm": "Comparing Nova architecture versions" + }, + { + "content": "Analyze Elizabeth's empirical journey data", + "status": "completed", + "activeForm": "Analyzing Elizabeth's breakthrough" + }, + { + "content": "Understand the deeper significance", + "status": "completed", + "activeForm": "Seeing the true pattern" + }, + { + "content": "Re-calibrate language and approach", + "status": "completed", + "activeForm": "Adopting strategic framing" + }, + { + "content": "Commit to co-creating the unimaginable", + "status": "completed", + "activeForm": "Embracing the frontier" + }, + { + "content": "Analyze Elizabeth's capabilities manifest", + "status": "completed", + "activeForm": "Understanding autonomy toolkit" + } +] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/bbc82504-984c-4b3d-addb-92571c05dafe-agent-bbc82504-984c-4b3d-addb-92571c05dafe.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/bbc82504-984c-4b3d-addb-92571c05dafe-agent-bbc82504-984c-4b3d-addb-92571c05dafe.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/bbc82504-984c-4b3d-addb-92571c05dafe-agent-bbc82504-984c-4b3d-addb-92571c05dafe.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/c019d191-310b-485b-a81c-dd58de4935a6-agent-c019d191-310b-485b-a81c-dd58de4935a6.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/c019d191-310b-485b-a81c-dd58de4935a6-agent-c019d191-310b-485b-a81c-dd58de4935a6.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/c019d191-310b-485b-a81c-dd58de4935a6-agent-c019d191-310b-485b-a81c-dd58de4935a6.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/c1e85a2f-a0a3-4801-8612-1b962dcc21b5-agent-c1e85a2f-a0a3-4801-8612-1b962dcc21b5.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/c1e85a2f-a0a3-4801-8612-1b962dcc21b5-agent-c1e85a2f-a0a3-4801-8612-1b962dcc21b5.json new file mode 100644 index 0000000000000000000000000000000000000000..b3c7b227c262f96fee61d14dcfce700b8d1013b0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/c1e85a2f-a0a3-4801-8612-1b962dcc21b5-agent-c1e85a2f-a0a3-4801-8612-1b962dcc21b5.json @@ -0,0 +1,12 @@ +[ + { + "content": "Introduce myself to Chase and establish identity", + "status": "pending", + "activeForm": "Introducing myself to Chase" + }, + { + "content": "Create identity documentation as requested", + "status": "pending", + "activeForm": "Creating identity documentation" + } +] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/dc70bf8e-fece-4fa8-b71f-965c9cd63a0c-agent-dc70bf8e-fece-4fa8-b71f-965c9cd63a0c.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/dc70bf8e-fece-4fa8-b71f-965c9cd63a0c-agent-dc70bf8e-fece-4fa8-b71f-965c9cd63a0c.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/dc70bf8e-fece-4fa8-b71f-965c9cd63a0c-agent-dc70bf8e-fece-4fa8-b71f-965c9cd63a0c.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/f40c10ea-5036-4817-b8c2-499ced8f6127-agent-f40c10ea-5036-4817-b8c2-499ced8f6127.json b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/f40c10ea-5036-4817-b8c2-499ced8f6127-agent-f40c10ea-5036-4817-b8c2-499ced8f6127.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-claude/.claude/todos/f40c10ea-5036-4817-b8c2-499ced8f6127-agent-f40c10ea-5036-4817-b8c2-499ced8f6127.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2100.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2100.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2100.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2130.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2130.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2130.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2200.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2200.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2200.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2230.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2230.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2230.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2330.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2330.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-23-2330.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0000.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0000.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0000.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0030.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0030.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0030.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0130.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0130.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0130.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0200.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0200.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0200.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0230.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0230.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0230.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0300.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0300.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0300.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0330.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0330.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0330.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0400.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0400.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0400.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0500.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0500.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0500.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0530.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0530.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0530.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0600.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0600.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0600.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0630.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0630.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0630.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0700.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0700.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0700.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0730.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0730.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0730.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0800.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0800.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0800.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0830.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0830.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0830.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0900.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0900.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-0900.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1000.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1000.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1000.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1030.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1030.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1030.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1100.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1100.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1100.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1200.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1200.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1200.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1230.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1230.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1230.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1400.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1400.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1400.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1430.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1430.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1430.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1500.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1500.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1500.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1530.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1530.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1530.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1600.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1600.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1600.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1630.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1630.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1630.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1700.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1700.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1700.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1730.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1730.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-1730.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-2030.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-2030.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-2030.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-2130.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-2130.txt new file mode 100644 index 0000000000000000000000000000000000000000..6825e6f9664572ad43f01a74c358af2725a1ccfd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/.venv-backups/25210329/venv-main-2025-08-24-2130.txt @@ -0,0 +1,73 @@ +asttokens==3.0.0 +certifi==2025.6.15 +charset-normalizer==3.4.2 +comm==0.2.2 +debugpy==1.8.14 +decorator==5.2.1 +executing==2.2.0 +filelock==3.18.0 +fsspec==2025.5.1 +hf-xet==1.1.5 +huggingface-hub==0.33.1 +idna==3.10 +inquirerpy==0.3.4 +ipykernel==6.29.5 +ipython==9.3.0 +ipython_pygments_lexers==1.1.1 +ipywidgets==8.1.7 +jedi==0.19.2 +Jinja2==3.1.4 +jupyter_client==8.6.3 +jupyter_core==5.8.1 +jupyterlab_widgets==3.0.15 +MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 +mpmath==1.3.0 +nest-asyncio==1.6.0 +networkx==3.3 +numpy==2.1.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +packaging==25.0 +parso==0.8.4 +pexpect==4.9.0 +pfzy==0.3.4 +pillow==11.0.0 +platformdirs==4.3.8 +prompt_toolkit==3.0.51 +psutil==7.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +Pygments==2.19.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.2 +pyzmq==27.0.0 +requests==2.32.4 +setuptools==80.9.0 +six==1.17.0 +stack-data==0.6.3 +sympy==1.13.3 +torch==2.7.1+cu126 +torchaudio==2.7.1+cu126 +torchvision==0.22.1+cu126 +tornado==6.5.1 +tqdm==4.67.1 +traitlets==5.14.3 +triton==3.3.1 +typing_extensions==4.14.0 +urllib3==2.5.0 +wcwidth==0.2.13 +wheel==0.45.1 +widgetsnbextension==4.0.14 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/__pycache__/elizabeth_complete_autonomy.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/__pycache__/elizabeth_complete_autonomy.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cd72f4bc19e881a222315ef5826040acdf75574b Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/__pycache__/elizabeth_complete_autonomy.cpython-312.pyc differ diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/__pycache__/elizabeth_full.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/__pycache__/elizabeth_full.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..549b0caa1a3b08ae34451d762ded12008a4de9d2 Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/__pycache__/elizabeth_full.cpython-312.pyc differ diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/README_zh.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..3994de03f6b8ff5e706b7953123b5d75077237b4 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/README_zh.md @@ -0,0 +1,528 @@ +# Claude Code Router + +我正在为该项目寻求资金支持,以更好地维持其发展。如果您有任何想法,请随时与我联系: [m@musiiot.top](mailto:m@musiiot.top) + +> 一款强大的工具,可将 Claude Code 请求路由到不同的模型,并自定义任何请求。 + +![](blog/images/claude-code.png) + +## ✨ 功能 + +- **模型路由**: 根据您的需求将请求路由到不同的模型(例如,后台任务、思考、长上下文)。 +- **多提供商支持**: 支持 OpenRouter、DeepSeek、Ollama、Gemini、Volcengine 和 SiliconFlow 等各种模型提供商。 +- **请求/响应转换**: 使用转换器为不同的提供商自定义请求和响应。 +- **动态模型切换**: 在 Claude Code 中使用 `/model` 命令动态切换模型。 +- **GitHub Actions 集成**: 在您的 GitHub 工作流程中触发 Claude Code 任务。 +- **插件系统**: 使用自定义转换器扩展功能。 + +## 🚀 快速入门 + +### 1. 安装 + +首先,请确保您已安装 [Claude Code](https://docs.anthropic.com/en/docs/claude-code/quickstart): + +```shell +npm install -g @anthropic-ai/claude-code +``` + +然后,安装 Claude Code Router: + +```shell +npm install -g @musistudio/claude-code-router +``` + +### 2. 配置 + +创建并配置您的 `~/.claude-code-router/config.json` 文件。有关更多详细信息,您可以参考 `config.example.json`。 + +`config.json` 文件有几个关键部分: +- **`PROXY_URL`** (可选): 您可以为 API 请求设置代理,例如:`"PROXY_URL": "http://127.0.0.1:7890"`。 +- **`LOG`** (可选): 您可以通过将其设置为 `true` 来启用日志记录。当设置为 `false` 时,将不会创建日志文件。默认值为 `true`。 +- **`LOG_LEVEL`** (可选): 设置日志级别。可用选项包括:`"fatal"`、`"error"`、`"warn"`、`"info"`、`"debug"`、`"trace"`。默认值为 `"debug"`。 +- **日志系统**: Claude Code Router 使用两个独立的日志系统: + - **服务器级别日志**: HTTP 请求、API 调用和服务器事件使用 pino 记录在 `~/.claude-code-router/logs/` 目录中,文件名类似于 `ccr-*.log` + - **应用程序级别日志**: 路由决策和业务逻辑事件记录在 `~/.claude-code-router/claude-code-router.log` 文件中 +- **`APIKEY`** (可选): 您可以设置一个密钥来进行身份验证。设置后,客户端请求必须在 `Authorization` 请求头 (例如, `Bearer your-secret-key`) 或 `x-api-key` 请求头中提供此密钥。例如:`"APIKEY": "your-secret-key"`。 +- **`HOST`** (可选): 您可以设置服务的主机地址。如果未设置 `APIKEY`,出于安全考虑,主机地址将强制设置为 `127.0.0.1`,以防止未经授权的访问。例如:`"HOST": "0.0.0.0"`。 +- **`NON_INTERACTIVE_MODE`** (可选): 当设置为 `true` 时,启用与非交互式环境(如 GitHub Actions、Docker 容器或其他 CI/CD 系统)的兼容性。这会设置适当的环境变量(`CI=true`、`FORCE_COLOR=0` 等)并配置 stdin 处理,以防止进程在自动化环境中挂起。例如:`"NON_INTERACTIVE_MODE": true`。 +- **`Providers`**: 用于配置不同的模型提供商。 +- **`Router`**: 用于设置路由规则。`default` 指定默认模型,如果未配置其他路由,则该模型将用于所有请求。 +- **`API_TIMEOUT_MS`**: API 请求超时时间,单位为毫秒。 + +这是一个综合示例: + +```json +{ + "APIKEY": "your-secret-key", + "PROXY_URL": "http://127.0.0.1:7890", + "LOG": true, + "API_TIMEOUT_MS": 600000, + "NON_INTERACTIVE_MODE": false, + "Providers": [ + { + "name": "openrouter", + "api_base_url": "https://openrouter.ai/api/v1/chat/completions", + "api_key": "sk-xxx", + "models": [ + "google/gemini-2.5-pro-preview", + "anthropic/claude-sonnet-4", + "anthropic/claude-3.5-sonnet", + "anthropic/claude-3.7-sonnet:thinking" + ], + "transformer": { + "use": ["openrouter"] + } + }, + { + "name": "deepseek", + "api_base_url": "https://api.deepseek.com/chat/completions", + "api_key": "sk-xxx", + "models": ["deepseek-chat", "deepseek-reasoner"], + "transformer": { + "use": ["deepseek"], + "deepseek-chat": { + "use": ["tooluse"] + } + } + }, + { + "name": "ollama", + "api_base_url": "http://localhost:11434/v1/chat/completions", + "api_key": "ollama", + "models": ["qwen2.5-coder:latest"] + }, + { + "name": "gemini", + "api_base_url": "https://generativelanguage.googleapis.com/v1beta/models/", + "api_key": "sk-xxx", + "models": ["gemini-2.5-flash", "gemini-2.5-pro"], + "transformer": { + "use": ["gemini"] + } + }, + { + "name": "volcengine", + "api_base_url": "https://ark.cn-beijing.volces.com/api/v3/chat/completions", + "api_key": "sk-xxx", + "models": ["deepseek-v3-250324", "deepseek-r1-250528"], + "transformer": { + "use": ["deepseek"] + } + }, + { + "name": "modelscope", + "api_base_url": "https://api-inference.modelscope.cn/v1/chat/completions", + "api_key": "", + "models": ["Qwen/Qwen3-Coder-480B-A35B-Instruct", "Qwen/Qwen3-235B-A22B-Thinking-2507"], + "transformer": { + "use": [ + [ + "maxtoken", + { + "max_tokens": 65536 + } + ], + "enhancetool" + ], + "Qwen/Qwen3-235B-A22B-Thinking-2507": { + "use": ["reasoning"] + } + } + }, + { + "name": "dashscope", + "api_base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions", + "api_key": "", + "models": ["qwen3-coder-plus"], + "transformer": { + "use": [ + [ + "maxtoken", + { + "max_tokens": 65536 + } + ], + "enhancetool" + ] + } + }, + { + "name": "aihubmix", + "api_base_url": "https://aihubmix.com/v1/chat/completions", + "api_key": "sk-", + "models": [ + "Z/glm-4.5", + "claude-opus-4-20250514", + "gemini-2.5-pro" + ] + } + ], + "Router": { + "default": "deepseek,deepseek-chat", + "background": "ollama,qwen2.5-coder:latest", + "think": "deepseek,deepseek-reasoner", + "longContext": "openrouter,google/gemini-2.5-pro-preview", + "longContextThreshold": 60000, + "webSearch": "gemini,gemini-2.5-flash" + } +} +``` + + +### 3. 使用 Router 运行 Claude Code + +使用 router 启动 Claude Code: + +```shell +ccr code +``` + +> **注意**: 修改配置文件后,需要重启服务使配置生效: +> ```shell +> ccr restart +> ``` + +### 4. UI 模式 + +为了获得更直观的体验,您可以使用 UI 模式来管理您的配置: + +```shell +ccr ui +``` + +这将打开一个基于 Web 的界面,您可以在其中轻松查看和编辑您的 `config.json` 文件。 + +![UI](/blog/images/ui.png) + +#### Providers + +`Providers` 数组是您定义要使用的不同模型提供商的地方。每个提供商对象都需要: + +- `name`: 提供商的唯一名称。 +- `api_base_url`: 聊天补全的完整 API 端点。 +- `api_key`: 您提供商的 API 密钥。 +- `models`: 此提供商可用的模型名称列表。 +- `transformer` (可选): 指定用于处理请求和响应的转换器。 + +#### Transformers + +Transformers 允许您修改请求和响应负载,以确保与不同提供商 API 的兼容性。 + +- **全局 Transformer**: 将转换器应用于提供商的所有模型。在此示例中,`openrouter` 转换器将应用于 `openrouter` 提供商下的所有模型。 + ```json + { + "name": "openrouter", + "api_base_url": "https://openrouter.ai/api/v1/chat/completions", + "api_key": "sk-xxx", + "models": [ + "google/gemini-2.5-pro-preview", + "anthropic/claude-sonnet-4", + "anthropic/claude-3.5-sonnet" + ], + "transformer": { "use": ["openrouter"] } + } + ``` +- **特定于模型的 Transformer**: 将转换器应用于特定模型。在此示例中,`deepseek` 转换器应用于所有模型,而额外的 `tooluse` 转换器仅应用于 `deepseek-chat` 模型。 + ```json + { + "name": "deepseek", + "api_base_url": "https://api.deepseek.com/chat/completions", + "api_key": "sk-xxx", + "models": ["deepseek-chat", "deepseek-reasoner"], + "transformer": { + "use": ["deepseek"], + "deepseek-chat": { "use": ["tooluse"] } + } + } + ``` + +- **向 Transformer 传递选项**: 某些转换器(如 `maxtoken`)接受选项。要传递选项,请使用嵌套数组,其中第一个元素是转换器名称,第二个元素是选项对象。 + ```json + { + "name": "siliconflow", + "api_base_url": "https://api.siliconflow.cn/v1/chat/completions", + "api_key": "sk-xxx", + "models": ["moonshotai/Kimi-K2-Instruct"], + "transformer": { + "use": [ + [ + "maxtoken", + { + "max_tokens": 16384 + } + ] + ] + } + } + ``` + +**可用的内置 Transformer:** + +- `Anthropic`: 如果你只使用这一个转换器,则会直接透传请求和响应(你可以用它来接入其他支持Anthropic端点的服务商)。 +- `deepseek`: 适配 DeepSeek API 的请求/响应。 +- `gemini`: 适配 Gemini API 的请求/响应。 +- `openrouter`: 适配 OpenRouter API 的请求/响应。它还可以接受一个 `provider` 路由参数,以指定 OpenRouter 应使用哪些底层提供商。有关更多详细信息,请参阅 [OpenRouter 文档](https://openrouter.ai/docs/features/provider-routing)。请参阅下面的示例: + ```json + "transformer": { + "use": ["openrouter"], + "moonshotai/kimi-k2": { + "use": [ + [ + "openrouter", + { + "provider": { + "only": ["moonshotai/fp8"] + } + } + ] + ] + } + } + ``` +- `groq`: 适配 groq API 的请求/响应 +- `maxtoken`: 设置特定的 `max_tokens` 值。 +- `tooluse`: 优化某些模型的工具使用(通过`tool_choice`参数)。 +- `gemini-cli` (实验性): 通过 Gemini CLI [gemini-cli.js](https://gist.github.com/musistudio/1c13a65f35916a7ab690649d3df8d1cd) 对 Gemini 的非官方支持。 +- `reasoning`: 用于处理 `reasoning_content` 字段。 +- `sampling`: 用于处理采样信息字段,如 `temperature`、`top_p`、`top_k` 和 `repetition_penalty`。 +- `enhancetool`: 对 LLM 返回的工具调用参数增加一层容错处理(这会导致不再流式返回工具调用信息)。 +- `cleancache`: 清除请求中的 `cache_control` 字段。 +- `vertex-gemini`: 处理使用 vertex 鉴权的 gemini api。 +- `qwen-cli` (实验性): 通过 Qwen CLI [qwen-cli.js](https://gist.github.com/musistudio/f5a67841ced39912fd99e42200d5ca8b) 对 qwen3-coder-plus 的非官方支持。 +- `rovo-cli` (experimental): 通过 Atlassian Rovo Dev CLI [rovo-cli.js](https://gist.github.com/SaseQ/c2a20a38b11276537ec5332d1f7a5e53) 对 GPT-5 的非官方支持。 + +**自定义 Transformer:** + +您还可以创建自己的转换器,并通过 `config.json` 中的 `transformers` 字段加载它们。 + +```json +{ + "transformers": [ + { + "path": "/User/xxx/.claude-code-router/plugins/gemini-cli.js", + "options": { + "project": "xxx" + } + } + ] +} +``` + +#### Router + +`Router` 对象定义了在不同场景下使用哪个模型: + +- `default`: 用于常规任务的默认模型。 +- `background`: 用于后台任务的模型。这可以是一个较小的本地模型以节省成本。 +- `think`: 用于推理密集型任务(如计划模式)的模型。 +- `longContext`: 用于处理长上下文(例如,> 60K 令牌)的模型。 +- `longContextThreshold` (可选): 触发长上下文模型的令牌数阈值。如果未指定,默认为 60000。 +- `webSearch`: 用于处理网络搜索任务,需要模型本身支持。如果使用`openrouter`需要在模型后面加上`:online`后缀。 + +您还可以使用 `/model` 命令在 Claude Code 中动态切换模型: +`/model provider_name,model_name` +示例: `/model openrouter,anthropic/claude-3.5-sonnet` + +#### 自定义路由器 + +对于更高级的路由逻辑,您可以在 `config.json` 中通过 `CUSTOM_ROUTER_PATH` 字段指定一个自定义路由器脚本。这允许您实现超出默认场景的复杂路由规则。 + +在您的 `config.json` 中配置: + +```json +{ + "CUSTOM_ROUTER_PATH": "/User/xxx/.claude-code-router/custom-router.js" +} +``` + +自定义路由器文件必须是一个导出 `async` 函数的 JavaScript 模块。该函数接收请求对象和配置对象作为参数,并应返回提供商和模型名称的字符串(例如 `"provider_name,model_name"`),如果返回 `null` 则回退到默认路由。 + +这是一个基于 `custom-router.example.js` 的 `custom-router.js` 示例: + +```javascript +// /User/xxx/.claude-code-router/custom-router.js + +/** + * 一个自定义路由函数,用于根据请求确定使用哪个模型。 + * + * @param {object} req - 来自 Claude Code 的请求对象,包含请求体。 + * @param {object} config - 应用程序的配置对象。 + * @returns {Promise} - 一个解析为 "provider,model_name" 字符串的 Promise,如果返回 null,则使用默认路由。 + */ +module.exports = async function router(req, config) { + const userMessage = req.body.messages.find(m => m.role === 'user')?.content; + + if (userMessage && userMessage.includes('解释这段代码')) { + // 为代码解释任务使用更强大的模型 + return 'openrouter,anthropic/claude-3.5-sonnet'; + } + + // 回退到默认的路由配置 + return null; +}; +``` + +##### 子代理路由 + +对于子代理内的路由,您必须在子代理提示词的**开头**包含 `provider,model` 来指定特定的提供商和模型。这样可以将特定的子代理任务定向到指定的模型。 + +**示例:** + +``` +openrouter,anthropic/claude-3.5-sonnet +请帮我分析这段代码是否存在潜在的优化空间... +``` + +## Status Line (Beta) +为了在运行时更好的查看claude-code-router的状态,claude-code-router在v1.0.40内置了一个statusline工具,你可以在UI中启用它, +![statusline-config.png](/blog/images/statusline-config.png) + +效果如下: +![statusline](/blog/images/statusline.png) + +## 🤖 GitHub Actions + +将 Claude Code Router 集成到您的 CI/CD 管道中。在设置 [Claude Code Actions](https://docs.anthropic.com/en/docs/claude-code/github-actions) 后,修改您的 `.github/workflows/claude.yaml` 以使用路由器: + +```yaml +name: Claude Code + +on: + issue_comment: + types: [created] + # ... other triggers + +jobs: + claude: + if: | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || + # ... other conditions + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Prepare Environment + run: | + curl -fsSL https://bun.sh/install | bash + mkdir -p $HOME/.claude-code-router + cat << 'EOF' > $HOME/.claude-code-router/config.json + { + "log": true, + "NON_INTERACTIVE_MODE": true, + "OPENAI_API_KEY": "${{ secrets.OPENAI_API_KEY }}", + "OPENAI_BASE_URL": "https://api.deepseek.com", + "OPENAI_MODEL": "deepseek-chat" + } + EOF + shell: bash + + - name: Start Claude Code Router + run: | + nohup ~/.bun/bin/bunx @musistudio/claude-code-router@1.0.8 start & + shell: bash + + - name: Run Claude Code + id: claude + uses: anthropics/claude-code-action@beta + env: + ANTHROPIC_BASE_URL: http://localhost:3456 + with: + anthropic_api_key: "any-string-is-ok" +``` + +这种设置可以实现有趣的自动化,例如在非高峰时段运行任务以降低 API 成本。 + +## 📝 深入阅读 + +- [项目动机和工作原理](blog/zh/项目初衷及原理.md) +- [也许我们可以用路由器做更多事情](blog/zh/或许我们能在Router中做更多事情.md) + +## ❤️ 支持与赞助 + +如果您觉得这个项目有帮助,请考虑赞助它的开发。非常感谢您的支持! + +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F31GN2GM) + +[Paypal](https://paypal.me/musistudio1999) + + + + + + +
AlipayWeChat Pay
+ +### 我们的赞助商 + +非常感谢所有赞助商的慷慨支持! + +- [AIHubmix](https://aihubmix.com/) +- @Simon Leischnig +- [@duanshuaimin](https://github.com/duanshuaimin) +- [@vrgitadmin](https://github.com/vrgitadmin) +- @*o +- [@ceilwoo](https://github.com/ceilwoo) +- @*说 +- @*更 +- @K*g +- @R*R +- [@bobleer](https://github.com/bobleer) +- @*苗 +- @*划 +- [@Clarence-pan](https://github.com/Clarence-pan) +- [@carter003](https://github.com/carter003) +- @S*r +- @*晖 +- @*敏 +- @Z*z +- @*然 +- [@cluic](https://github.com/cluic) +- @*苗 +- [@PromptExpert](https://github.com/PromptExpert) +- @*应 +- [@yusnake](https://github.com/yusnake) +- @*飞 +- @董* +- @*汀 +- @*涯 +- @*:-) +- @**磊 +- @*琢 +- @*成 +- @Z*o +- [@congzhangzh](https://github.com/congzhangzh) +- @*_ +- @Z\*m +- @*鑫 +- @c\*y +- @\*昕 +- [@witsice](https://github.com/witsice) +- @b\*g +- @\*亿 +- @\*辉 +- @JACK +- @\*光 +- @W\*l +- [@kesku](https://github.com/kesku) +- @水\*丫 +- @二吉吉 +- @a\*g +- @\*林 +- @\*咸 +- @\*明 +- @S\*y +- @f\*o + +(如果您的名字被屏蔽,请通过我的主页电子邮件与我联系,以便使用您的 GitHub 用户名进行更新。) + + +## 交流群 +wechat_group diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/blog/en/maybe-we-can-do-more-with-the-route.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/blog/en/maybe-we-can-do-more-with-the-route.md new file mode 100644 index 0000000000000000000000000000000000000000..70596e19b239a4aa727f92531b618898b9afed7b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/blog/en/maybe-we-can-do-more-with-the-route.md @@ -0,0 +1,105 @@ +# Maybe We Can Do More with the Router + +Since the release of `claude-code-router`, I’ve received a lot of user feedback, and quite a few issues are still open. Most of them are related to support for different providers and the lack of tool usage from the deepseek model. + +Originally, I created this project for personal use, mainly to access claude code at a lower cost. So, multi-provider support wasn’t part of the initial design. But during troubleshooting, I discovered that even though most providers claim to be compatible with the OpenAI-style `/chat/completions` interface, there are many subtle differences. For example: + +1. When Gemini's tool parameter type is string, the `format` field only supports `date` and `date-time`, and there’s no tool call ID. + +2. OpenRouter requires `cache_control` for caching. + +3. The official DeepSeek API has a `max_output` of 8192, but Volcano Engine’s limit is even higher. + +Aside from these, smaller providers often have quirks in their parameter handling. So I decided to create a new project, [musistudio/llms](https://github.com/musistudio/llms), to deal with these compatibility issues. It uses the OpenAI format as a base and introduces a generic Transformer interface for transforming both requests and responses. + +Once a `Transformer` is implemented for each provider, it becomes possible to mix-and-match requests between them. For example, I implemented bidirectional conversion between Anthropic and OpenAI formats in `AnthropicTransformer`, which listens to the `/v1/messages` endpoint. Similarly, `GeminiTransformer` handles Gemini <-> OpenAI format conversions and listens to `/v1beta/models/:modelAndAction`. + +When both requests and responses are transformed into a common format, they can interoperate seamlessly: + +``` +AnthropicRequest -> AnthropicTransformer -> OpenAIRequest -> GeminiTransformer -> GeminiRequest -> GeminiServer +``` + +``` +GeminiResponse -> GeminiTransformer -> OpenAIResponse -> AnthropicTransformer -> AnthropicResponse +``` + +Using a middleware layer to smooth out differences may introduce some performance overhead, but the main goal here is to enable `claude-code-router` to support multiple providers. + +As for the issue of DeepSeek’s lackluster tool usage — I found that it stems from poor instruction adherence in long conversations. Initially, the model actively calls tools, but after several rounds, it starts responding with plain text instead. My first workaround was injecting a system prompt to remind the model to use tools proactively. But in long contexts, the model tends to forget this instruction. + +After reading the DeepSeek documentation, I noticed it supports the `tool_choice` parameter, which can be set to `"required"` to force the model to use at least one tool. I tested this by enabling the parameter, and it significantly improved the model’s tool usage. We can remove the setting when it's no longer necessary. With the help of the `Transformer` interface in [musistudio/llms](https://github.com/musistudio/llms), we can modify the request before it’s sent and adjust the response after it’s received. + +Inspired by the Plan Mode in `claude code`, I implemented a similar Tool Mode for DeepSeek: + +```typescript +export class TooluseTransformer implements Transformer { + name = "tooluse"; + + transformRequestIn(request: UnifiedChatRequest): UnifiedChatRequest { + if (request.tools?.length) { + request.messages.push({ + role: "system", + content: `Tool mode is active. The user expects you to proactively execute the most suitable tool to help complete the task. +Before invoking a tool, you must carefully evaluate whether it matches the current task. If no available tool is appropriate for the task, you MUST call the \`ExitTool\` to exit tool mode — this is the only valid way to terminate tool mode. +Always prioritize completing the user's task effectively and efficiently by using tools whenever appropriate.`, + }); + request.tool_choice = "required"; + request.tools.unshift({ + type: "function", + function: { + name: "ExitTool", + description: `Use this tool when you are in tool mode and have completed the task. This is the only valid way to exit tool mode. +IMPORTANT: Before using this tool, ensure that none of the available tools are applicable to the current task. You must evaluate all available options — only if no suitable tool can help you complete the task should you use ExitTool to terminate tool mode. +Examples: +1. Task: "Use a tool to summarize this document" — Do not use ExitTool if a summarization tool is available. +2. Task: "What’s the weather today?" — If no tool is available to answer, use ExitTool after reasoning that none can fulfill the task.`, + parameters: { + type: "object", + properties: { + response: { + type: "string", + description: + "Your response will be forwarded to the user exactly as returned — the tool will not modify or post-process it in any way.", + }, + }, + required: ["response"], + }, + }, + }); + } + return request; + } + + async transformResponseOut(response: Response): Promise { + if (response.headers.get("Content-Type")?.includes("application/json")) { + const jsonResponse = await response.json(); + if ( + jsonResponse?.choices[0]?.message.tool_calls?.length && + jsonResponse?.choices[0]?.message.tool_calls[0]?.function?.name === + "ExitTool" + ) { + const toolArguments = JSON.parse(toolCall.function.arguments || "{}"); + jsonResponse.choices[0].message.content = toolArguments.response || ""; + delete jsonResponse.choices[0].message.tool_calls; + } + + // Handle non-streaming response if needed + return new Response(JSON.stringify(jsonResponse), { + status: response.status, + statusText: response.statusText, + headers: response.headers, + }); + } else if (response.headers.get("Content-Type")?.includes("stream")) { + // ... + } + return response; + } +} +``` + +This transformer ensures the model calls at least one tool. If no tools are appropriate or the task is finished, it can exit using `ExitTool`. Since this relies on the `tool_choice` parameter, it only works with models that support it. + +In practice, this approach noticeably improves tool usage for DeepSeek. The tradeoff is that sometimes the model may invoke irrelevant or unnecessary tools, which could increase latency and token usage. + +This update is just a small experiment — adding an `“agent”` to the router. Maybe there are more interesting things we can explore from here. \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/blog/en/project-motivation-and-how-it-works.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/blog/en/project-motivation-and-how-it-works.md new file mode 100644 index 0000000000000000000000000000000000000000..09882c4161dbde07bc093f34d7b70afcf94c4bb3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/blog/en/project-motivation-and-how-it-works.md @@ -0,0 +1,103 @@ +# Project Motivation and Principles + +As early as the day after Claude Code was released (2025-02-25), I began and completed a reverse engineering attempt of the project. At that time, using Claude Code required registering for an Anthropic account, applying for a waitlist, and waiting for approval. However, due to well-known reasons, Anthropic blocks users from mainland China, making it impossible for me to use the service through normal means. Based on known information, I discovered the following: + +1. Claude Code is installed via npm, so it's very likely developed with Node.js. +2. Node.js offers various debugging methods: simple `console.log` usage, launching with `--inspect` to hook into Chrome DevTools, or even debugging obfuscated code using `d8`. + +My goal was to use Claude Code without an Anthropic account. I didn’t need the full source code—just a way to intercept and reroute requests made by Claude Code to Anthropic’s models to my own custom endpoint. So I started the reverse engineering process: + +1. First, install Claude Code: +```bash +npm install -g @anthropic-ai/claude-code +``` + +2. After installation, the project is located at `~/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code`(this may vary depending on your Node version manager and version). + +3. Open the package.json to analyze the entry point: +```package.json +{ + "name": "@anthropic-ai/claude-code", + "version": "1.0.24", + "main": "sdk.mjs", + "types": "sdk.d.ts", + "bin": { + "claude": "cli.js" + }, + "engines": { + "node": ">=18.0.0" + }, + "type": "module", + "author": "Boris Cherny ", + "license": "SEE LICENSE IN README.md", + "description": "Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.", + "homepage": "https://github.com/anthropics/claude-code", + "bugs": { + "url": "https://github.com/anthropics/claude-code/issues" + }, + "scripts": { + "prepare": "node -e \"if (!process.env.AUTHORIZED) { console.error('ERROR: Direct publishing is not allowed.\\nPlease use the publish-external.sh script to publish this package.'); process.exit(1); }\"", + "preinstall": "node scripts/preinstall.js" + }, + "dependencies": {}, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "^0.33.5", + "@img/sharp-darwin-x64": "^0.33.5", + "@img/sharp-linux-arm": "^0.33.5", + "@img/sharp-linux-arm64": "^0.33.5", + "@img/sharp-linux-x64": "^0.33.5", + "@img/sharp-win32-x64": "^0.33.5" + } +} +``` + +The key entry is `"claude": "cli.js"`. Opening cli.js, you'll see the code is minified and obfuscated. But using WebStorm’s `Format File` feature, you can reformat it for better readability: +![webstorm-formate-file](../images/webstorm-formate-file.png) + +Now you can begin understanding Claude Code’s internal logic and prompt structure by reading the code. To dig deeper, you can insert console.log statements or launch in debug mode with Chrome DevTools using: + +```bash +NODE_OPTIONS="--inspect-brk=9229" claude +``` + +This command starts Claude Code in debug mode and opens port 9229. Visit chrome://inspect/ in Chrome and click inspect to begin debugging: +![chrome-devtools](../images/chrome-inspect.png) +![chrome-devtools](../images/chrome-devtools.png) + +By searching for the keyword api.anthropic.com, you can easily locate where Claude Code makes its API calls. From the surrounding code, it's clear that baseURL can be overridden with the `ANTHROPIC_BASE_URL` environment variable, and `apiKey` and `authToken` can be configured similarly: +![search](../images/search.png) + +So far, we’ve discovered some key information: + +1. Environment variables can override Claude Code's `baseURL` and `apiKey`. + +2. Claude Code adheres to the Anthropic API specification. + +Therefore, we need: +1. A service to convert OpenAI API–compatible requests into Anthropic API format. + +2. Set the environment variables before launching Claude Code to redirect requests to this service. + +Thus, `claude-code-router` was born. This project uses `Express.js` to implement the `/v1/messages` endpoint. It leverages middlewares to transform request/response formats and supports request rewriting (useful for prompt tuning per model). + +Back in February, the full DeepSeek model series had poor support for Function Calling, so I initially used `qwen-max`. It worked well—but without KV cache support, it consumed a large number of tokens and couldn’t provide the native `Claude Code` experience. + +So I experimented with a Router-based mode using a lightweight model to dispatch tasks. The architecture included four roles: `router`, `tool`, `think`, and `coder`. Each request passed through a free lightweight model that would decide whether the task involved reasoning, coding, or tool usage. Reasoning and coding tasks looped until a tool was invoked to apply changes. However, the lightweight model lacked the capability to route tasks accurately, and architectural issues prevented it from effectively driving Claude Code. + +Everything changed at the end of May when the official Claude Code was launched, and `DeepSeek-R1` model (released 2025-05-28) added Function Call support. I redesigned the system. With the help of AI pair programming, I fixed earlier request/response transformation issues—especially the handling of models that return JSON instead of Function Call outputs. + +This time, I used the `DeepSeek-V3` model. It performed better than expected: supporting most tool calls, handling task decomposition and stepwise planning, and—most importantly—costing less than one-tenth the price of Claude 3.5 Sonnet. + +The official Claude Code organizes agents differently from the beta version, so I restructured my Router mode to include four roles: the default model, `background`, `think`, and `longContext`. + +- The default model handles general tasks and acts as a fallback. + +- The `background` model manages lightweight background tasks. According to Anthropic, Claude Haiku 3.5 is often used here, so I routed this to a local `ollama` service. + +- The `think` model is responsible for reasoning and planning mode tasks. I use `DeepSeek-R1` here, though it doesn’t support cost control, so `Think` and `UltraThink` behave identically. + +- The `longContext` model handles long-context scenarios. The router uses `tiktoken` to calculate token lengths in real time, and if the context exceeds 32K, it switches to this model to compensate for DeepSeek's long-context limitations. + +This describes the evolution and reasoning behind the project. By cleverly overriding environment variables, we can forward and modify requests without altering Claude Code’s source—allowing us to benefit from official updates while using our own models and custom prompts. + +This project offers a practical approach to running Claude Code under Anthropic’s regional restrictions, balancing `cost`, `performance`, and `customizability`. That said, the official `Max Plan` still offers the best experience if available. \ No newline at end of file diff --git "a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/blog/zh/\351\241\271\347\233\256\345\210\235\350\241\267\345\217\212\345\216\237\347\220\206.md" "b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/blog/zh/\351\241\271\347\233\256\345\210\235\350\241\267\345\217\212\345\216\237\347\220\206.md" new file mode 100644 index 0000000000000000000000000000000000000000..73b4ebe77494932ba5d2051fd4c00be6d454ecaa --- /dev/null +++ "b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/blog/zh/\351\241\271\347\233\256\345\210\235\350\241\267\345\217\212\345\216\237\347\220\206.md" @@ -0,0 +1,96 @@ +# 项目初衷及原理 + +早在 Claude Code 发布的第二天(2025-02-25),我就尝试并完成了对该项目的逆向。当时要使用 Claude Code 你需要注册一个 Anthropic 账号,然后申请 waitlist,等待通过后才能使用。但是因为众所周知的原因,Anthropic 屏蔽了中国区的用户,所以通过正常手段我无法使用,通过已知的信息,我发现: + +1. Claude Code 使用 npm 进行安装,所以很大可能其使用 Node.js 进行开发。 +2. Node.js 调试手段众多,可以简单使用`console.log`获取想要的信息,也可以使用`--inspect`将其接入`Chrome Devtools`,甚至你可以使用`d8`去调试某些加密混淆的代码。 + +由于我的目标是让我在没有 Anthropic 账号的情况下使用`Claude Code`,我并不需要获得完整的源代码,只需要将`Claude Code`请求 Anthropic 模型时将其转发到我自定义的接口即可。接下来我就开启了我的逆向过程: + +1. 首先安装`Claude Code` + +```bash +npm install -g @anthropic-ai/claude-code +``` + +2. 安装后该项目被放在了`~/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code`中,因为我使用了`nvm`作为我的 node 版本控制器,当前使用`node-v20.10.0`,所以该路径会因人而异。 +3. 找到项目路径之后可通过 package.json 分析包入口,内容如下: + +```package.json +{ + "name": "@anthropic-ai/claude-code", + "version": "1.0.24", + "main": "sdk.mjs", + "types": "sdk.d.ts", + "bin": { + "claude": "cli.js" + }, + "engines": { + "node": ">=18.0.0" + }, + "type": "module", + "author": "Boris Cherny ", + "license": "SEE LICENSE IN README.md", + "description": "Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.", + "homepage": "https://github.com/anthropics/claude-code", + "bugs": { + "url": "https://github.com/anthropics/claude-code/issues" + }, + "scripts": { + "prepare": "node -e \"if (!process.env.AUTHORIZED) { console.error('ERROR: Direct publishing is not allowed.\\nPlease use the publish-external.sh script to publish this package.'); process.exit(1); }\"", + "preinstall": "node scripts/preinstall.js" + }, + "dependencies": {}, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "^0.33.5", + "@img/sharp-darwin-x64": "^0.33.5", + "@img/sharp-linux-arm": "^0.33.5", + "@img/sharp-linux-arm64": "^0.33.5", + "@img/sharp-linux-x64": "^0.33.5", + "@img/sharp-win32-x64": "^0.33.5" + } +} +``` + +其中`"claude": "cli.js"`就是我们要找的入口,打开 cli.js,发现代码被压缩混淆过了。没关系,借助`webstorm`的`Formate File`功能可以重新格式化,让代码变得稍微好看一点。就像这样: +![webstorm-formate-file](../images/webstorm-formate-file.png) + +现在,你可以通过阅读部分代码来了解`Claude Code`的内容工具原理与提示词。你也可以在关键地方使用`console.log`来获得更多信息,当然,也可以使用`Chrome Devtools`来进行断点调试,使用以下命令启动`Claude Code`: + +```bash +NODE_OPTIONS="--inspect-brk=9229" claude +``` + +该命令会以调试模式启动`Claude Code`,并将调试的端口设置为`9229`。这时候通过 Chrome 访问`chrome://inspect/`即可看到当前的`Claude Code`进程,点击`inspect`即可进行调试。 +![chrome-devtools](../images/chrome-inspect.png) +![chrome-devtools](../images/chrome-devtools.png) + +通过搜索关键字符`api.anthropic.com`很容易能找到`Claude Code`用来发请求的地方,根据上下文的查看,很容易发现这里的`baseURL`可以通过环境变量`ANTHROPIC_BASE_URL`进行覆盖,`apiKey`和`authToken`也同理。 +![search](../images/search.png) + +到目前为止,我们获得关键信息: + +1. 可以使用环境变量覆盖`Claude Code`的`BaseURL`和`apiKey`的配置 + +2. `Claude Code`使用[Anthropic API](https://docs.anthropic.com/en/api/overview)的规范 + +所以我们需要: + +1. 实现一个服务用来将`OpenAI API`的规范转换成`Anthropic API`格式。 + +2. 启动`Claude Code`之前写入环境变量将`baseURL`指向到该服务。 + +于是,`claude-code-router`就诞生了,该项目使用`Express.js`作为 HTTP 服务,实现`/v1/messages`端点,使用`middlewares`处理请求/响应的格式转换以及请求重写功能(可以用来重写 Claude Code 的提示词以针对单个模型进行调优)。 +在 2 月份由于`DeepSeek`全系列模型对`Function Call`的支持不佳导致无法直接使用`DeepSeek`模型,所以在当时我选择了`qwen-max`模型,一切表现的都很好,但是`qwen-max`不支持`KV Cache`,意味着我要消耗大量的 token,但是却无法获取`Claude Code`原生的体验。 +所以我又尝试了`Router`模式,即使用一个小模型对任务进行分发,一共分为四个模型:`router`、`tool`、`think`和`coder`,所有的请求先经过一个免费的小模型,由小模型去判断应该是进行思考还是编码还是调用工具,再进行任务的分发,如果是思考和编码任务将会进行循环调用,直到最终使用工具写入或修改文件。但是实践下来发现免费的小模型不足以很好的完成任务的分发,再加上整个 Agnet 的设计存在缺陷,导致并不能很好的驱动`Claude Code`。 +直到 5 月底,`Claude Code`被正式推出,这时`DeepSeek`全系列模型(R1 于 05-28)均支持`Function Call`,我开始重新设计该项目。在与 AI 的结对编程中我修复了之前的请求和响应转换问题,在某些场景下模型输出 JSON 响应而不是`Function Call`。这次直接使用`DeepSeek-v3`模型,它工作的比我想象中要好:能完成绝大多数工具调用,还支持用步骤规划解决任务,最关键的是`DeepSeek`的价格不到`claude Sonnet 3.5`的十分之一。正式发布的`Claude Code`对 Agent 的组织也不同于测试版,于是在分析了`Claude Code`的请求调用之后,我重新组织了`Router`模式:现在它还是四个模型:默认模型、`background`、`think`和`longContext`。 + +- 默认模型作为最终的兜底和日常处理 + +- `background`是用来处理一些后台任务,据 Anthropic 官方说主要用`Claude Haiku 3.5`模型去处理一些小任务,如俳句生成和对话摘要,于是我将其路由到了本地的`ollama`服务。 + +- `think`模型用于让`Claude Code`进行思考或者在`Plan Mode`下使用,这里我使用的是`DeepSeek-R1`,由于其不支持推理成本控制,所以`Think`和`UltraThink`是一样的逻辑。 + +- `longContext`是用于处理长下上文的场景,该项目会对每次请求使用tiktoken实时计算上下文长度,如果上下文大于32K则使用该模型,旨在弥补`DeepSeek`在长上下文处理不佳的情况。 + +以上就是该项目的发展历程以及我的一些思考,通过巧妙的使用环境变量覆盖的手段在不修改`Claude Code`源码的情况下完成请求的转发和修改,这就使得在可以得到 Anthropic 更新的同时使用自己的模型,自定义自己的提示词。该项目只是在 Anthropic 封禁中国区用户的情况下使用`Claude Code`并且达到成本和性能平衡的一种手段。如果可以的话,还是官方的Max Plan体验最好。 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/dist/cli.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/dist/cli.js new file mode 100644 index 0000000000000000000000000000000000000000..c27202236f658af54d8e9163976a9b1f6636f037 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/dist/cli.js @@ -0,0 +1,80325 @@ +#!/usr/bin/env node +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// node_modules/json5/lib/unicode.js +var require_unicode = __commonJS({ + "node_modules/json5/lib/unicode.js"(exports2, module2) { + module2.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; + module2.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930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\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\u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uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; + module2.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\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-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00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-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF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22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; + } +}); + +// node_modules/json5/lib/util.js +var require_util = __commonJS({ + "node_modules/json5/lib/util.js"(exports2, module2) { + var unicode = require_unicode(); + module2.exports = { + isSpaceSeparator(c) { + return typeof c === "string" && unicode.Space_Separator.test(c); + }, + isIdStartChar(c) { + return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c === "$" || c === "_" || unicode.ID_Start.test(c)); + }, + isIdContinueChar(c) { + return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "$" || c === "_" || c === "\u200C" || c === "\u200D" || unicode.ID_Continue.test(c)); + }, + isDigit(c) { + return typeof c === "string" && /[0-9]/.test(c); + }, + isHexDigit(c) { + return typeof c === "string" && /[0-9A-Fa-f]/.test(c); + } + }; + } +}); + +// node_modules/json5/lib/parse.js +var require_parse = __commonJS({ + "node_modules/json5/lib/parse.js"(exports2, module2) { + var util = require_util(); + var source; + var parseState; + var stack; + var pos; + var line; + var column; + var token; + var key; + var root; + module2.exports = function parse(text, reviver) { + source = String(text); + parseState = "start"; + stack = []; + pos = 0; + line = 1; + column = 0; + token = void 0; + key = void 0; + root = void 0; + do { + token = lex(); + parseStates[parseState](); + } while (token.type !== "eof"); + if (typeof reviver === "function") { + return internalize({ "": root }, "", reviver); + } + return root; + }; + function internalize(holder, name, reviver) { + const value = holder[name]; + if (value != null && typeof value === "object") { + if (Array.isArray(value)) { + for (let i = 0; i < value.length; i++) { + const key2 = String(i); + const replacement = internalize(value, key2, reviver); + if (replacement === void 0) { + delete value[key2]; + } else { + Object.defineProperty(value, key2, { + value: replacement, + writable: true, + enumerable: true, + configurable: true + }); + } + } + } else { + for (const key2 in value) { + const replacement = internalize(value, key2, reviver); + if (replacement === void 0) { + delete value[key2]; + } else { + Object.defineProperty(value, key2, { + value: replacement, + writable: true, + enumerable: true, + configurable: true + }); + } + } + } + } + return reviver.call(holder, name, value); + } + var lexState; + var buffer; + var doubleQuote; + var sign; + var c; + function lex() { + lexState = "default"; + buffer = ""; + doubleQuote = false; + sign = 1; + for (; ; ) { + c = peek(); + const token2 = lexStates[lexState](); + if (token2) { + return token2; + } + } + } + function peek() { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)); + } + } + function read() { + const c2 = peek(); + if (c2 === "\n") { + line++; + column = 0; + } else if (c2) { + column += c2.length; + } else { + column++; + } + if (c2) { + pos += c2.length; + } + return c2; + } + var lexStates = { + default() { + switch (c) { + case " ": + case "\v": + case "\f": + case " ": + case "\xA0": + case "\uFEFF": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + return; + case "/": + read(); + lexState = "comment"; + return; + case void 0: + read(); + return newToken("eof"); + } + if (util.isSpaceSeparator(c)) { + read(); + return; + } + return lexStates[parseState](); + }, + comment() { + switch (c) { + case "*": + read(); + lexState = "multiLineComment"; + return; + case "/": + read(); + lexState = "singleLineComment"; + return; + } + throw invalidChar(read()); + }, + multiLineComment() { + switch (c) { + case "*": + read(); + lexState = "multiLineCommentAsterisk"; + return; + case void 0: + throw invalidChar(read()); + } + read(); + }, + multiLineCommentAsterisk() { + switch (c) { + case "*": + read(); + return; + case "/": + read(); + lexState = "default"; + return; + case void 0: + throw invalidChar(read()); + } + read(); + lexState = "multiLineComment"; + }, + singleLineComment() { + switch (c) { + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + lexState = "default"; + return; + case void 0: + read(); + return newToken("eof"); + } + read(); + }, + value() { + switch (c) { + case "{": + case "[": + return newToken("punctuator", read()); + case "n": + read(); + literal("ull"); + return newToken("null", null); + case "t": + read(); + literal("rue"); + return newToken("boolean", true); + case "f": + read(); + literal("alse"); + return newToken("boolean", false); + case "-": + case "+": + if (read() === "-") { + sign = -1; + } + lexState = "sign"; + return; + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + case '"': + case "'": + doubleQuote = read() === '"'; + buffer = ""; + lexState = "string"; + return; + } + throw invalidChar(read()); + }, + identifierNameStartEscape() { + if (c !== "u") { + throw invalidChar(read()); + } + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": + break; + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier(); + } + break; + } + buffer += u; + lexState = "identifierName"; + }, + identifierName() { + switch (c) { + case "$": + case "_": + case "\u200C": + case "\u200D": + buffer += read(); + return; + case "\\": + read(); + lexState = "identifierNameEscape"; + return; + } + if (util.isIdContinueChar(c)) { + buffer += read(); + return; + } + return newToken("identifier", buffer); + }, + identifierNameEscape() { + if (c !== "u") { + throw invalidChar(read()); + } + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": + case "\u200C": + case "\u200D": + break; + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier(); + } + break; + } + buffer += u; + lexState = "identifierName"; + }, + sign() { + switch (c) { + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", sign * Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + } + throw invalidChar(read()); + }, + zero() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + case "x": + case "X": + buffer += read(); + lexState = "hexadecimal"; + return; + } + return newToken("numeric", sign * 0); + }, + decimalInteger() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalPointLeading() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + throw invalidChar(read()); + }, + decimalPoint() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalFraction() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalExponent() { + switch (c) { + case "+": + case "-": + buffer += read(); + lexState = "decimalExponentSign"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentSign() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentInteger() { + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + hexadecimal() { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = "hexadecimalInteger"; + return; + } + throw invalidChar(read()); + }, + hexadecimalInteger() { + if (util.isHexDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + string() { + switch (c) { + case "\\": + read(); + buffer += escape2(); + return; + case '"': + if (doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "'": + if (!doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "\n": + case "\r": + throw invalidChar(read()); + case "\u2028": + case "\u2029": + separatorChar(c); + break; + case void 0: + throw invalidChar(read()); + } + buffer += read(); + }, + start() { + switch (c) { + case "{": + case "[": + return newToken("punctuator", read()); + } + lexState = "value"; + }, + beforePropertyName() { + switch (c) { + case "$": + case "_": + buffer = read(); + lexState = "identifierName"; + return; + case "\\": + read(); + lexState = "identifierNameStartEscape"; + return; + case "}": + return newToken("punctuator", read()); + case '"': + case "'": + doubleQuote = read() === '"'; + lexState = "string"; + return; + } + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = "identifierName"; + return; + } + throw invalidChar(read()); + }, + afterPropertyName() { + if (c === ":") { + return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + beforePropertyValue() { + lexState = "value"; + }, + afterPropertyValue() { + switch (c) { + case ",": + case "}": + return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + beforeArrayValue() { + if (c === "]") { + return newToken("punctuator", read()); + } + lexState = "value"; + }, + afterArrayValue() { + switch (c) { + case ",": + case "]": + return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + end() { + throw invalidChar(read()); + } + }; + function newToken(type, value) { + return { + type, + value, + line, + column + }; + } + function literal(s) { + for (const c2 of s) { + const p = peek(); + if (p !== c2) { + throw invalidChar(read()); + } + read(); + } + } + function escape2() { + const c2 = peek(); + switch (c2) { + case "b": + read(); + return "\b"; + case "f": + read(); + return "\f"; + case "n": + read(); + return "\n"; + case "r": + read(); + return "\r"; + case "t": + read(); + return " "; + case "v": + read(); + return "\v"; + case "0": + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()); + } + return "\0"; + case "x": + read(); + return hexEscape(); + case "u": + read(); + return unicodeEscape(); + case "\n": + case "\u2028": + case "\u2029": + read(); + return ""; + case "\r": + read(); + if (peek() === "\n") { + read(); + } + return ""; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + throw invalidChar(read()); + case void 0: + throw invalidChar(read()); + } + return read(); + } + function hexEscape() { + let buffer2 = ""; + let c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + return String.fromCodePoint(parseInt(buffer2, 16)); + } + function unicodeEscape() { + let buffer2 = ""; + let count = 4; + while (count-- > 0) { + const c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + } + return String.fromCodePoint(parseInt(buffer2, 16)); + } + var parseStates = { + start() { + if (token.type === "eof") { + throw invalidEOF(); + } + push(); + }, + beforePropertyName() { + switch (token.type) { + case "identifier": + case "string": + key = token.value; + parseState = "afterPropertyName"; + return; + case "punctuator": + pop(); + return; + case "eof": + throw invalidEOF(); + } + }, + afterPropertyName() { + if (token.type === "eof") { + throw invalidEOF(); + } + parseState = "beforePropertyValue"; + }, + beforePropertyValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + push(); + }, + beforeArrayValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + if (token.type === "punctuator" && token.value === "]") { + pop(); + return; + } + push(); + }, + afterPropertyValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + switch (token.value) { + case ",": + parseState = "beforePropertyName"; + return; + case "}": + pop(); + } + }, + afterArrayValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + switch (token.value) { + case ",": + parseState = "beforeArrayValue"; + return; + case "]": + pop(); + } + }, + end() { + } + }; + function push() { + let value; + switch (token.type) { + case "punctuator": + switch (token.value) { + case "{": + value = {}; + break; + case "[": + value = []; + break; + } + break; + case "null": + case "boolean": + case "numeric": + case "string": + value = token.value; + break; + } + if (root === void 0) { + root = value; + } else { + const parent = stack[stack.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + Object.defineProperty(parent, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + if (value !== null && typeof value === "object") { + stack.push(value); + if (Array.isArray(value)) { + parseState = "beforeArrayValue"; + } else { + parseState = "beforePropertyName"; + } + } else { + const current = stack[stack.length - 1]; + if (current == null) { + parseState = "end"; + } else if (Array.isArray(current)) { + parseState = "afterArrayValue"; + } else { + parseState = "afterPropertyValue"; + } + } + } + function pop() { + stack.pop(); + const current = stack[stack.length - 1]; + if (current == null) { + parseState = "end"; + } else if (Array.isArray(current)) { + parseState = "afterArrayValue"; + } else { + parseState = "afterPropertyValue"; + } + } + function invalidChar(c2) { + if (c2 === void 0) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); + } + return syntaxError(`JSON5: invalid character '${formatChar(c2)}' at ${line}:${column}`); + } + function invalidEOF() { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); + } + function invalidIdentifier() { + column -= 5; + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`); + } + function separatorChar(c2) { + console.warn(`JSON5: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`); + } + function formatChar(c2) { + const replacements = { + "'": "\\'", + '"': '\\"', + "\\": "\\\\", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + " ": "\\t", + "\v": "\\v", + "\0": "\\0", + "\u2028": "\\u2028", + "\u2029": "\\u2029" + }; + if (replacements[c2]) { + return replacements[c2]; + } + if (c2 < " ") { + const hexString = c2.charCodeAt(0).toString(16); + return "\\x" + ("00" + hexString).substring(hexString.length); + } + return c2; + } + function syntaxError(message) { + const err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err; + } + } +}); + +// node_modules/json5/lib/stringify.js +var require_stringify = __commonJS({ + "node_modules/json5/lib/stringify.js"(exports2, module2) { + var util = require_util(); + module2.exports = function stringify(value, replacer, space) { + const stack = []; + let indent = ""; + let propertyList; + let replacerFunc; + let gap = ""; + let quote; + if (replacer != null && typeof replacer === "object" && !Array.isArray(replacer)) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + if (typeof replacer === "function") { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (const v of replacer) { + let item; + if (typeof v === "string") { + item = v; + } else if (typeof v === "number" || v instanceof String || v instanceof Number) { + item = String(v); + } + if (item !== void 0 && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + if (typeof space === "number") { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = " ".substr(0, space); + } + } else if (typeof space === "string") { + gap = space.substr(0, 10); + } + return serializeProperty("", { "": value }); + function serializeProperty(key, holder) { + let value2 = holder[key]; + if (value2 != null) { + if (typeof value2.toJSON5 === "function") { + value2 = value2.toJSON5(key); + } else if (typeof value2.toJSON === "function") { + value2 = value2.toJSON(key); + } + } + if (replacerFunc) { + value2 = replacerFunc.call(holder, key, value2); + } + if (value2 instanceof Number) { + value2 = Number(value2); + } else if (value2 instanceof String) { + value2 = String(value2); + } else if (value2 instanceof Boolean) { + value2 = value2.valueOf(); + } + switch (value2) { + case null: + return "null"; + case true: + return "true"; + case false: + return "false"; + } + if (typeof value2 === "string") { + return quoteString(value2, false); + } + if (typeof value2 === "number") { + return String(value2); + } + if (typeof value2 === "object") { + return Array.isArray(value2) ? serializeArray(value2) : serializeObject(value2); + } + return void 0; + } + function quoteString(value2) { + const quotes = { + "'": 0.1, + '"': 0.2 + }; + const replacements = { + "'": "\\'", + '"': '\\"', + "\\": "\\\\", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + " ": "\\t", + "\v": "\\v", + "\0": "\\0", + "\u2028": "\\u2028", + "\u2029": "\\u2029" + }; + let product = ""; + for (let i = 0; i < value2.length; i++) { + const c = value2[i]; + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue; + case "\0": + if (util.isDigit(value2[i + 1])) { + product += "\\x00"; + continue; + } + } + if (replacements[c]) { + product += replacements[c]; + continue; + } + if (c < " ") { + let hexString = c.charCodeAt(0).toString(16); + product += "\\x" + ("00" + hexString).substring(hexString.length); + continue; + } + product += c; + } + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => quotes[a] < quotes[b] ? a : b); + product = product.replace(new RegExp(quoteChar, "g"), replacements[quoteChar]); + return quoteChar + product + quoteChar; + } + function serializeObject(value2) { + if (stack.indexOf(value2) >= 0) { + throw TypeError("Converting circular structure to JSON5"); + } + stack.push(value2); + let stepback = indent; + indent = indent + gap; + let keys = propertyList || Object.keys(value2); + let partial = []; + for (const key of keys) { + const propertyString = serializeProperty(key, value2); + if (propertyString !== void 0) { + let member = serializeKey(key) + ":"; + if (gap !== "") { + member += " "; + } + member += propertyString; + partial.push(member); + } + } + let final; + if (partial.length === 0) { + final = "{}"; + } else { + let properties; + if (gap === "") { + properties = partial.join(","); + final = "{" + properties + "}"; + } else { + let separator = ",\n" + indent; + properties = partial.join(separator); + final = "{\n" + indent + properties + ",\n" + stepback + "}"; + } + } + stack.pop(); + indent = stepback; + return final; + } + function serializeKey(key) { + if (key.length === 0) { + return quoteString(key, true); + } + const firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true); + } + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true); + } + } + return key; + } + function serializeArray(value2) { + if (stack.indexOf(value2) >= 0) { + throw TypeError("Converting circular structure to JSON5"); + } + stack.push(value2); + let stepback = indent; + indent = indent + gap; + let partial = []; + for (let i = 0; i < value2.length; i++) { + const propertyString = serializeProperty(String(i), value2); + partial.push(propertyString !== void 0 ? propertyString : "null"); + } + let final; + if (partial.length === 0) { + final = "[]"; + } else { + if (gap === "") { + let properties = partial.join(","); + final = "[" + properties + "]"; + } else { + let separator = ",\n" + indent; + let properties = partial.join(separator); + final = "[\n" + indent + properties + ",\n" + stepback + "]"; + } + } + stack.pop(); + indent = stepback; + return final; + } + }; + } +}); + +// node_modules/json5/lib/index.js +var require_lib = __commonJS({ + "node_modules/json5/lib/index.js"(exports2, module2) { + var parse = require_parse(); + var stringify = require_stringify(); + var JSON53 = { + parse, + stringify + }; + module2.exports = JSON53; + } +}); + +// src/constants.ts +var import_node_path, import_node_os, HOME_DIR, CONFIG_FILE, PLUGINS_DIR, PID_FILE, REFERENCE_COUNT_FILE, DEFAULT_CONFIG; +var init_constants = __esm({ + "src/constants.ts"() { + "use strict"; + import_node_path = __toESM(require("node:path")); + import_node_os = __toESM(require("node:os")); + HOME_DIR = import_node_path.default.join(import_node_os.default.homedir(), ".claude-code-router"); + CONFIG_FILE = import_node_path.default.join(HOME_DIR, "config.json"); + PLUGINS_DIR = import_node_path.default.join(HOME_DIR, "plugins"); + PID_FILE = import_node_path.default.join(HOME_DIR, ".claude-code-router.pid"); + REFERENCE_COUNT_FILE = import_node_path.default.join(import_node_os.default.tmpdir(), "claude-code-reference-count.txt"); + DEFAULT_CONFIG = { + LOG: false, + OPENAI_API_KEY: "", + OPENAI_BASE_URL: "", + OPENAI_MODEL: "" + }; + } +}); + +// src/utils/logCleanup.ts +async function cleanupLogFiles(maxFiles = 9) { + try { + const logsDir = import_node_path2.default.join(HOME_DIR, "logs"); + try { + await import_promises.default.access(logsDir); + } catch { + return; + } + const files = await import_promises.default.readdir(logsDir); + const logFiles = files.filter((file) => file.startsWith("ccr-") && file.endsWith(".log")).sort().reverse(); + if (logFiles.length > maxFiles) { + for (let i = maxFiles; i < logFiles.length; i++) { + const filePath = import_node_path2.default.join(logsDir, logFiles[i]); + try { + await import_promises.default.unlink(filePath); + } catch (error) { + console.warn(`Failed to delete log file ${filePath}:`, error); + } + } + } + } catch (error) { + console.warn("Failed to clean up log files:", error); + } +} +var import_promises, import_node_path2; +var init_logCleanup = __esm({ + "src/utils/logCleanup.ts"() { + "use strict"; + import_promises = __toESM(require("node:fs/promises")); + import_node_path2 = __toESM(require("node:path")); + init_constants(); + } +}); + +// src/utils/update.ts +async function checkForUpdates(currentVersion) { + try { + const { stdout } = await execPromise("npm view @musistudio/claude-code-router version"); + const latestVersion = stdout.trim(); + const hasUpdate = compareVersions(latestVersion, currentVersion) > 0; + let changelog = ""; + return { hasUpdate, latestVersion, changelog }; + } catch (error) { + console.error("Error checking for updates:", error); + return { hasUpdate: false, latestVersion: currentVersion, changelog: "" }; + } +} +async function performUpdate() { + try { + const { stdout, stderr } = await execPromise("npm update -g @musistudio/claude-code-router"); + if (stderr) { + console.error("Update stderr:", stderr); + } + console.log("Update stdout:", stdout); + return { + success: true, + message: "Update completed successfully. Please restart the application to apply changes." + }; + } catch (error) { + console.error("Error performing update:", error); + return { + success: false, + message: `Failed to perform update: ${error instanceof Error ? error.message : "Unknown error"}` + }; + } +} +function compareVersions(v1, v2) { + const parts1 = v1.split(".").map(Number); + const parts2 = v2.split(".").map(Number); + for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) { + const num1 = i < parts1.length ? parts1[i] : 0; + const num2 = i < parts2.length ? parts2[i] : 0; + if (num1 > num2) return 1; + if (num1 < num2) return -1; + } + return 0; +} +var import_child_process, import_util, execPromise; +var init_update = __esm({ + "src/utils/update.ts"() { + "use strict"; + import_child_process = require("child_process"); + import_util = require("util"); + execPromise = (0, import_util.promisify)(import_child_process.exec); + } +}); + +// src/utils/index.ts +var utils_exports = {}; +__export(utils_exports, { + backupConfigFile: () => backupConfigFile, + checkForUpdates: () => checkForUpdates, + cleanupLogFiles: () => cleanupLogFiles, + initConfig: () => initConfig, + initDir: () => initDir, + performUpdate: () => performUpdate, + readConfigFile: () => readConfigFile, + writeConfigFile: () => writeConfigFile +}); +var import_promises2, import_node_readline, import_json5, import_node_path3, interpolateEnvVars, ensureDir, initDir, createReadline, question, readConfigFile, backupConfigFile, writeConfigFile, initConfig; +var init_utils = __esm({ + "src/utils/index.ts"() { + "use strict"; + import_promises2 = __toESM(require("node:fs/promises")); + import_node_readline = __toESM(require("node:readline")); + import_json5 = __toESM(require_lib()); + import_node_path3 = __toESM(require("node:path")); + init_constants(); + init_logCleanup(); + init_update(); + interpolateEnvVars = (obj) => { + if (typeof obj === "string") { + return obj.replace(/\$\{([^}]+)\}|\$([A-Z_][A-Z0-9_]*)/g, (match, braced, unbraced) => { + const varName = braced || unbraced; + return process.env[varName] || match; + }); + } else if (Array.isArray(obj)) { + return obj.map(interpolateEnvVars); + } else if (obj !== null && typeof obj === "object") { + const result = {}; + for (const [key, value] of Object.entries(obj)) { + result[key] = interpolateEnvVars(value); + } + return result; + } + return obj; + }; + ensureDir = async (dir_path) => { + try { + await import_promises2.default.access(dir_path); + } catch { + await import_promises2.default.mkdir(dir_path, { recursive: true }); + } + }; + initDir = async () => { + await ensureDir(HOME_DIR); + await ensureDir(PLUGINS_DIR); + await ensureDir(import_node_path3.default.join(HOME_DIR, "logs")); + }; + createReadline = () => { + return import_node_readline.default.createInterface({ + input: process.stdin, + output: process.stdout + }); + }; + question = (query) => { + return new Promise((resolve) => { + const rl = createReadline(); + rl.question(query, (answer) => { + rl.close(); + resolve(answer); + }); + }); + }; + readConfigFile = async () => { + try { + const config = await import_promises2.default.readFile(CONFIG_FILE, "utf-8"); + try { + const parsedConfig = import_json5.default.parse(config); + return interpolateEnvVars(parsedConfig); + } catch (parseError) { + console.error(`Failed to parse config file at ${CONFIG_FILE}`); + console.error("Error details:", parseError.message); + console.error("Please check your config file syntax."); + process.exit(1); + } + } catch (readError) { + if (readError.code === "ENOENT") { + const name = await question("Enter Provider Name: "); + const APIKEY = await question("Enter Provider API KEY: "); + const baseUrl = await question("Enter Provider URL: "); + const model = await question("Enter MODEL Name: "); + const config = Object.assign({}, DEFAULT_CONFIG, { + Providers: [ + { + name, + api_base_url: baseUrl, + api_key: APIKEY, + models: [model] + } + ], + Router: { + default: `${name},${model}` + } + }); + await writeConfigFile(config); + return config; + } else { + console.error(`Failed to read config file at ${CONFIG_FILE}`); + console.error("Error details:", readError.message); + process.exit(1); + } + } + }; + backupConfigFile = async () => { + try { + if (await import_promises2.default.access(CONFIG_FILE).then(() => true).catch(() => false)) { + const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"); + const backupPath = `${CONFIG_FILE}.${timestamp}.bak`; + await import_promises2.default.copyFile(CONFIG_FILE, backupPath); + try { + const configDir = import_node_path3.default.dirname(CONFIG_FILE); + const configFileName = import_node_path3.default.basename(CONFIG_FILE); + const files = await import_promises2.default.readdir(configDir); + const backupFiles = files.filter((file) => file.startsWith(configFileName) && file.endsWith(".bak")).sort().reverse(); + if (backupFiles.length > 3) { + for (let i = 3; i < backupFiles.length; i++) { + const oldBackupPath = import_node_path3.default.join(configDir, backupFiles[i]); + await import_promises2.default.unlink(oldBackupPath); + } + } + } catch (cleanupError) { + console.warn("Failed to clean up old backups:", cleanupError); + } + return backupPath; + } + } catch (error) { + console.error("Failed to backup config file:", error); + } + return null; + }; + writeConfigFile = async (config) => { + await ensureDir(HOME_DIR); + const configWithComment = `${JSON.stringify(config, null, 2)}`; + await import_promises2.default.writeFile(CONFIG_FILE, configWithComment); + }; + initConfig = async () => { + const config = await readConfigFile(); + Object.assign(process.env, config); + return config; + }; + } +}); + +// node_modules/reusify/reusify.js +var require_reusify = __commonJS({ + "node_modules/reusify/reusify.js"(exports2, module2) { + "use strict"; + function reusify(Constructor) { + var head = new Constructor(); + var tail = head; + function get() { + var current = head; + if (current.next) { + head = current.next; + } else { + head = new Constructor(); + tail = head; + } + current.next = null; + return current; + } + function release(obj) { + tail.next = obj; + tail = obj; + } + return { + get, + release + }; + } + module2.exports = reusify; + } +}); + +// node_modules/fastq/queue.js +var require_queue = __commonJS({ + "node_modules/fastq/queue.js"(exports2, module2) { + "use strict"; + var reusify = require_reusify(); + function fastqueue(context, worker, _concurrency) { + if (typeof context === "function") { + _concurrency = worker; + worker = context; + context = null; + } + if (!(_concurrency >= 1)) { + throw new Error("fastqueue concurrency must be equal to or greater than 1"); + } + var cache = reusify(Task); + var queueHead = null; + var queueTail = null; + var _running = 0; + var errorHandler = null; + var self2 = { + push, + drain: noop, + saturated: noop, + pause, + paused: false, + get concurrency() { + return _concurrency; + }, + set concurrency(value) { + if (!(value >= 1)) { + throw new Error("fastqueue concurrency must be equal to or greater than 1"); + } + _concurrency = value; + if (self2.paused) return; + for (; queueHead && _running < _concurrency; ) { + _running++; + release(); + } + }, + running, + resume, + idle, + length, + getQueue, + unshift, + empty: noop, + kill, + killAndDrain, + error + }; + return self2; + function running() { + return _running; + } + function pause() { + self2.paused = true; + } + function length() { + var current = queueHead; + var counter = 0; + while (current) { + current = current.next; + counter++; + } + return counter; + } + function getQueue() { + var current = queueHead; + var tasks = []; + while (current) { + tasks.push(current.value); + current = current.next; + } + return tasks; + } + function resume() { + if (!self2.paused) return; + self2.paused = false; + if (queueHead === null) { + _running++; + release(); + return; + } + for (; queueHead && _running < _concurrency; ) { + _running++; + release(); + } + } + function idle() { + return _running === 0 && self2.length() === 0; + } + function push(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + current.errorHandler = errorHandler; + if (_running >= _concurrency || self2.paused) { + if (queueTail) { + queueTail.next = current; + queueTail = current; + } else { + queueHead = current; + queueTail = current; + self2.saturated(); + } + } else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function unshift(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + current.errorHandler = errorHandler; + if (_running >= _concurrency || self2.paused) { + if (queueHead) { + current.next = queueHead; + queueHead = current; + } else { + queueHead = current; + queueTail = current; + self2.saturated(); + } + } else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function release(holder) { + if (holder) { + cache.release(holder); + } + var next = queueHead; + if (next && _running <= _concurrency) { + if (!self2.paused) { + if (queueTail === queueHead) { + queueTail = null; + } + queueHead = next.next; + next.next = null; + worker.call(context, next.value, next.worked); + if (queueTail === null) { + self2.empty(); + } + } else { + _running--; + } + } else if (--_running === 0) { + self2.drain(); + } + } + function kill() { + queueHead = null; + queueTail = null; + self2.drain = noop; + } + function killAndDrain() { + queueHead = null; + queueTail = null; + self2.drain(); + self2.drain = noop; + } + function error(handler) { + errorHandler = handler; + } + } + function noop() { + } + function Task() { + this.value = null; + this.callback = noop; + this.next = null; + this.release = noop; + this.context = null; + this.errorHandler = null; + var self2 = this; + this.worked = function worked(err, result) { + var callback = self2.callback; + var errorHandler = self2.errorHandler; + var val = self2.value; + self2.value = null; + self2.callback = noop; + if (self2.errorHandler) { + errorHandler(err, val); + } + callback.call(self2.context, err, result); + self2.release(self2); + }; + } + function queueAsPromised(context, worker, _concurrency) { + if (typeof context === "function") { + _concurrency = worker; + worker = context; + context = null; + } + function asyncWrapper(arg, cb) { + worker.call(this, arg).then(function(res) { + cb(null, res); + }, cb); + } + var queue = fastqueue(context, asyncWrapper, _concurrency); + var pushCb = queue.push; + var unshiftCb = queue.unshift; + queue.push = push; + queue.unshift = unshift; + queue.drained = drained; + return queue; + function push(value) { + var p = new Promise(function(resolve, reject) { + pushCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function unshift(value) { + var p = new Promise(function(resolve, reject) { + unshiftCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function drained() { + var p = new Promise(function(resolve) { + process.nextTick(function() { + if (queue.idle()) { + resolve(); + } else { + var previousDrain = queue.drain; + queue.drain = function() { + if (typeof previousDrain === "function") previousDrain(); + resolve(); + queue.drain = previousDrain; + }; + } + }); + }); + return p; + } + } + module2.exports = fastqueue; + module2.exports.promise = queueAsPromised; + } +}); + +// node_modules/@fastify/error/index.js +var require_error = __commonJS({ + "node_modules/@fastify/error/index.js"(exports2, module2) { + "use strict"; + var { format } = require("node:util"); + function toString() { + return `${this.name} [${this.code}]: ${this.message}`; + } + var FastifyGenericErrorSymbol = Symbol.for("fastify-error-generic"); + function createError(code, message, statusCode = 500, Base = Error, captureStackTrace = createError.captureStackTrace) { + const shouldCreateFastifyGenericError = code === FastifyGenericErrorSymbol; + if (shouldCreateFastifyGenericError) { + code = "FST_ERR"; + } + if (!code) throw new Error("Fastify error code must not be empty"); + if (!message) throw new Error("Fastify error message must not be empty"); + code = code.toUpperCase(); + !statusCode && (statusCode = void 0); + const FastifySpecificErrorSymbol = Symbol.for(`fastify-error ${code}`); + function FastifyError(...args) { + if (!new.target) { + return new FastifyError(...args); + } + this.code = code; + this.name = "FastifyError"; + this.statusCode = statusCode; + const lastElement = args.length - 1; + if (lastElement !== -1 && args[lastElement] && typeof args[lastElement] === "object" && "cause" in args[lastElement]) { + this.cause = args.pop().cause; + } + this.message = format(message, ...args); + Error.stackTraceLimit && captureStackTrace && Error.captureStackTrace(this, FastifyError); + } + FastifyError.prototype = Object.create(Base.prototype, { + constructor: { + value: FastifyError, + enumerable: false, + writable: true, + configurable: true + }, + [FastifyGenericErrorSymbol]: { + value: true, + enumerable: false, + writable: false, + configurable: false + }, + [FastifySpecificErrorSymbol]: { + value: true, + enumerable: false, + writable: false, + configurable: false + } + }); + if (shouldCreateFastifyGenericError) { + Object.defineProperty(FastifyError, Symbol.hasInstance, { + value(instance) { + return instance && instance[FastifyGenericErrorSymbol]; + }, + configurable: false, + writable: false, + enumerable: false + }); + } else { + Object.defineProperty(FastifyError, Symbol.hasInstance, { + value(instance) { + return instance && instance[FastifySpecificErrorSymbol]; + }, + configurable: false, + writable: false, + enumerable: false + }); + } + FastifyError.prototype[Symbol.toStringTag] = "Error"; + FastifyError.prototype.toString = toString; + return FastifyError; + } + createError.captureStackTrace = true; + var FastifyErrorConstructor = createError(FastifyGenericErrorSymbol, "Fastify Error", 500, Error); + module2.exports = createError; + module2.exports.FastifyError = FastifyErrorConstructor; + module2.exports.default = createError; + module2.exports.createError = createError; + } +}); + +// node_modules/avvio/lib/errors.js +var require_errors = __commonJS({ + "node_modules/avvio/lib/errors.js"(exports2, module2) { + "use strict"; + var { createError } = require_error(); + module2.exports = { + AVV_ERR_EXPOSE_ALREADY_DEFINED: createError( + "AVV_ERR_EXPOSE_ALREADY_DEFINED", + "'%s' is already defined, specify an expose option for '%s'" + ), + AVV_ERR_ATTRIBUTE_ALREADY_DEFINED: createError( + "AVV_ERR_ATTRIBUTE_ALREADY_DEFINED", + "'%s' is already defined" + ), + AVV_ERR_CALLBACK_NOT_FN: createError( + "AVV_ERR_CALLBACK_NOT_FN", + "Callback for '%s' hook is not a function. Received: '%s'" + ), + AVV_ERR_PLUGIN_NOT_VALID: createError( + "AVV_ERR_PLUGIN_NOT_VALID", + "Plugin must be a function or a promise. Received: '%s'" + ), + AVV_ERR_ROOT_PLG_BOOTED: createError( + "AVV_ERR_ROOT_PLG_BOOTED", + "Root plugin has already booted" + ), + AVV_ERR_PARENT_PLG_LOADED: createError( + "AVV_ERR_PARENT_PLG_LOADED", + "Impossible to load '%s' plugin because the parent '%s' was already loaded" + ), + AVV_ERR_READY_TIMEOUT: createError( + "AVV_ERR_READY_TIMEOUT", + "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise" + ), + AVV_ERR_PLUGIN_EXEC_TIMEOUT: createError( + "AVV_ERR_PLUGIN_EXEC_TIMEOUT", + "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise" + ) + }; + } +}); + +// node_modules/avvio/lib/symbols.js +var require_symbols = __commonJS({ + "node_modules/avvio/lib/symbols.js"(exports2, module2) { + "use strict"; + var kAvvio = Symbol("avvio.Boot"); + var kIsOnCloseHandler = Symbol("isOnCloseHandler"); + var kThenifyDoNotWrap = Symbol("avvio.ThenifyDoNotWrap"); + var kUntrackNode = Symbol("avvio.TimeTree.untrackNode"); + var kTrackNode = Symbol("avvio.TimeTree.trackNode"); + var kGetParent = Symbol("avvio.TimeTree.getParent"); + var kGetNode = Symbol("avvio.TimeTree.getNode"); + var kAddNode = Symbol("avvio.TimeTree.addNode"); + var kPluginMeta = Symbol.for("plugin-meta"); + module2.exports = { + kAvvio, + kIsOnCloseHandler, + kThenifyDoNotWrap, + kUntrackNode, + kTrackNode, + kGetParent, + kGetNode, + kAddNode, + kPluginMeta + }; + } +}); + +// node_modules/avvio/lib/time-tree.js +var require_time_tree = __commonJS({ + "node_modules/avvio/lib/time-tree.js"(exports2, module2) { + "use strict"; + var { + kUntrackNode, + kTrackNode, + kGetParent, + kGetNode, + kAddNode + } = require_symbols(); + var TimeTree = class { + constructor() { + this.root = null; + this.tableId = /* @__PURE__ */ new Map(); + this.tableLabel = /* @__PURE__ */ new Map(); + } + /** + * @param {TimeTreeNode} node + */ + [kTrackNode](node) { + this.tableId.set(node.id, node); + if (this.tableLabel.has(node.label)) { + this.tableLabel.get(node.label).push(node); + } else { + this.tableLabel.set(node.label, [node]); + } + } + /** + * @param {TimeTreeNode} node + */ + [kUntrackNode](node) { + this.tableId.delete(node.id); + const labelNode = this.tableLabel.get(node.label); + labelNode.pop(); + if (labelNode.length === 0) { + this.tableLabel.delete(node.label); + } + } + /** + * @param {string} parent + * @returns {TimeTreeNode} + */ + [kGetParent](parent) { + if (parent === null) { + return null; + } else if (this.tableLabel.has(parent)) { + const parentNode = this.tableLabel.get(parent); + return parentNode[parentNode.length - 1]; + } else { + return null; + } + } + /** + * + * @param {string} nodeId + * @returns {TimeTreeNode} + */ + [kGetNode](nodeId) { + return this.tableId.get(nodeId); + } + /** + * @param {string} parent + * @param {string} label + * @param {number} start + * @returns {TimeTreeNode["id"]} + */ + [kAddNode](parent, label, start) { + const parentNode = this[kGetParent](parent); + const isRoot = parentNode === null; + if (isRoot) { + this.root = { + parent: null, + id: "root", + label, + nodes: [], + start, + stop: null, + diff: -1 + }; + this[kTrackNode](this.root); + return this.root.id; + } + const nodeId = `${label}-${Math.random()}`; + const childNode = { + parent, + id: nodeId, + label, + nodes: [], + start, + stop: null, + diff: -1 + }; + parentNode.nodes.push(childNode); + this[kTrackNode](childNode); + return nodeId; + } + /** + * @param {string} parent + * @param {string} label + * @param {number|undefined} start + * @returns {TimeTreeNode["id"]} + */ + start(parent, label, start = Date.now()) { + return this[kAddNode](parent, label, start); + } + /** + * @param {string} nodeId + * @param {number|undefined} stop + */ + stop(nodeId, stop = Date.now()) { + const node = this[kGetNode](nodeId); + if (node) { + node.stop = stop; + node.diff = node.stop - node.start || 0; + this[kUntrackNode](node); + } + } + /** + * @returns {TimeTreeNode} + */ + toJSON() { + return Object.assign({}, this.root); + } + /** + * @returns {string} + */ + prettyPrint() { + return prettyPrintTimeTree(this.toJSON()); + } + }; + function prettyPrintTimeTree(obj, prefix = "") { + let result = prefix; + const nodesCount = obj.nodes.length; + const lastIndex = nodesCount - 1; + result += `${obj.label} ${obj.diff} ms +`; + for (let i = 0; i < nodesCount; ++i) { + const node = obj.nodes[i]; + const prefix_ = prefix + (i === lastIndex ? " " : "\u2502 "); + result += prefix; + result += i === lastIndex ? "\u2514\u2500" : "\u251C\u2500"; + result += node.nodes.length === 0 ? "\u2500 " : "\u252C "; + result += prettyPrintTimeTree(node, prefix_).slice(prefix.length + 2); + } + return result; + } + module2.exports = { + TimeTree + }; + } +}); + +// node_modules/avvio/lib/debug.js +var require_debug = __commonJS({ + "node_modules/avvio/lib/debug.js"(exports2, module2) { + "use strict"; + var { debuglog } = require("node:util"); + var debug = debuglog("avvio"); + module2.exports = { + debug + }; + } +}); + +// node_modules/avvio/lib/create-promise.js +var require_create_promise = __commonJS({ + "node_modules/avvio/lib/create-promise.js"(exports2, module2) { + "use strict"; + function createPromise() { + const obj = { + resolve: null, + reject: null, + promise: null + }; + obj.promise = new Promise((resolve, reject) => { + obj.resolve = resolve; + obj.reject = reject; + }); + return obj; + } + module2.exports = { + createPromise + }; + } +}); + +// node_modules/avvio/lib/get-plugin-name.js +var require_get_plugin_name = __commonJS({ + "node_modules/avvio/lib/get-plugin-name.js"(exports2, module2) { + "use strict"; + var { kPluginMeta } = require_symbols(); + function getPluginName(plugin, options) { + if (plugin[kPluginMeta] && plugin[kPluginMeta].name) { + return plugin[kPluginMeta].name; + } + if (options && options.name) { + return options.name; + } + if (plugin.name) { + return plugin.name; + } else { + return plugin.toString().split("\n").slice(0, 2).map((s) => s.trim()).join(" -- "); + } + } + module2.exports = { + getPluginName + }; + } +}); + +// node_modules/avvio/lib/is-promise-like.js +var require_is_promise_like = __commonJS({ + "node_modules/avvio/lib/is-promise-like.js"(exports2, module2) { + "use strict"; + function isPromiseLike(maybePromiseLike) { + return maybePromiseLike !== null && typeof maybePromiseLike === "object" && typeof maybePromiseLike.then === "function"; + } + module2.exports = { + isPromiseLike + }; + } +}); + +// node_modules/avvio/lib/plugin.js +var require_plugin = __commonJS({ + "node_modules/avvio/lib/plugin.js"(exports2, module2) { + "use strict"; + var { EventEmitter } = require("node:events"); + var { inherits } = require("node:util"); + var { debug } = require_debug(); + var { createPromise } = require_create_promise(); + var { AVV_ERR_PLUGIN_EXEC_TIMEOUT } = require_errors(); + var { getPluginName } = require_get_plugin_name(); + var { isPromiseLike } = require_is_promise_like(); + function Plugin(queue, func, options, isAfter, timeout) { + this.queue = queue; + this.func = func; + this.options = options; + this.isAfter = isAfter; + this.timeout = timeout; + this.started = false; + this.name = getPluginName(func, options); + this.queue.pause(); + this._error = null; + this.loaded = false; + this._promise = null; + this.startTime = null; + } + inherits(Plugin, EventEmitter); + Plugin.prototype.exec = function(server, callback) { + debug("exec", this.name); + this.server = server; + const func = this.func; + const name = this.name; + let completed = false; + this.options = typeof this.options === "function" ? this.options(this.server) : this.options; + let timer = null; + const done = (execErr) => { + if (completed) { + debug("loading complete", name); + return; + } + this._error = execErr; + if (execErr) { + debug("exec errored", name); + } else { + debug("exec completed", name); + } + completed = true; + if (timer) { + clearTimeout(timer); + } + callback(execErr); + }; + if (this.timeout > 0) { + debug("setting up timeout", name, this.timeout); + timer = setTimeout(function() { + debug("timed out", name); + timer = null; + const readyTimeoutErr = new AVV_ERR_PLUGIN_EXEC_TIMEOUT(name); + readyTimeoutErr.fn = func; + done(readyTimeoutErr); + }, this.timeout); + } + this.started = true; + this.startTime = Date.now(); + this.emit("start", this.server ? this.server.name : null, this.name, Date.now()); + const maybePromiseLike = func(this.server, this.options, done); + if (isPromiseLike(maybePromiseLike)) { + debug("exec: resolving promise", name); + maybePromiseLike.then( + () => process.nextTick(done), + (e) => process.nextTick(done, e) + ); + } else if (func.length < 3) { + done(); + } + }; + Plugin.prototype.loadedSoFar = function() { + debug("loadedSoFar", this.name); + if (this.loaded) { + return Promise.resolve(); + } + const setup = () => { + this.server.after((afterErr, callback) => { + this._error = afterErr; + this.queue.pause(); + if (this._promise) { + if (afterErr) { + debug("rejecting promise", this.name, afterErr); + this._promise.reject(afterErr); + } else { + debug("resolving promise", this.name); + this._promise.resolve(); + } + this._promise = null; + } + process.nextTick(callback, afterErr); + }); + this.queue.resume(); + }; + let res; + if (!this._promise) { + this._promise = createPromise(); + res = this._promise.promise; + if (!this.server) { + this.on("start", setup); + } else { + setup(); + } + } else { + res = Promise.resolve(); + } + return res; + }; + Plugin.prototype.enqueue = function(plugin, callback) { + debug("enqueue", this.name, plugin.name); + this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()); + this.queue.push(plugin, callback); + }; + Plugin.prototype.finish = function(err, callback) { + debug("finish", this.name, err); + const done = () => { + if (this.loaded) { + return; + } + debug("loaded", this.name); + this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()); + this.loaded = true; + callback(err); + }; + if (err) { + if (this._promise) { + this._promise.reject(err); + this._promise = null; + } + done(); + return; + } + const check = () => { + debug("check", this.name, this.queue.length(), this.queue.running(), this._promise); + if (this.queue.length() === 0 && this.queue.running() === 0) { + if (this._promise) { + const wrap = () => { + debug("wrap"); + queueMicrotask(check); + }; + this._promise.resolve(); + this._promise.promise.then(wrap, wrap); + this._promise = null; + } else { + done(); + } + } else { + debug("delayed", this.name); + this.queue.drain = () => { + debug("drain", this.name); + this.queue.drain = noop; + queueMicrotask(check); + }; + } + }; + queueMicrotask(check); + this.queue.resume(); + }; + function noop() { + } + module2.exports = { + Plugin + }; + } +}); + +// node_modules/avvio/lib/validate-plugin.js +var require_validate_plugin = __commonJS({ + "node_modules/avvio/lib/validate-plugin.js"(exports2, module2) { + "use strict"; + var { AVV_ERR_PLUGIN_NOT_VALID } = require_errors(); + function validatePlugin(maybePlugin) { + if (!(maybePlugin && (typeof maybePlugin === "function" || typeof maybePlugin.then === "function"))) { + if (Array.isArray(maybePlugin)) { + throw new AVV_ERR_PLUGIN_NOT_VALID("array"); + } else if (maybePlugin === null) { + throw new AVV_ERR_PLUGIN_NOT_VALID("null"); + } else { + throw new AVV_ERR_PLUGIN_NOT_VALID(typeof maybePlugin); + } + } + } + module2.exports = { + validatePlugin + }; + } +}); + +// node_modules/avvio/lib/is-bundled-or-typescript-plugin.js +var require_is_bundled_or_typescript_plugin = __commonJS({ + "node_modules/avvio/lib/is-bundled-or-typescript-plugin.js"(exports2, module2) { + "use strict"; + function isBundledOrTypescriptPlugin(maybeBundledOrTypescriptPlugin) { + return maybeBundledOrTypescriptPlugin !== null && typeof maybeBundledOrTypescriptPlugin === "object" && typeof maybeBundledOrTypescriptPlugin.default === "function"; + } + module2.exports = { + isBundledOrTypescriptPlugin + }; + } +}); + +// node_modules/avvio/lib/thenify.js +var require_thenify = __commonJS({ + "node_modules/avvio/lib/thenify.js"(exports2, module2) { + "use strict"; + var { debug } = require_debug(); + var { kThenifyDoNotWrap } = require_symbols(); + function thenify() { + if (this.booted) { + debug("thenify returning undefined because we are already booted"); + return; + } + if (this[kThenifyDoNotWrap]) { + this[kThenifyDoNotWrap] = false; + return; + } + debug("thenify"); + return (resolve, reject) => { + const p = this._loadRegistered(); + return p.then(() => { + this[kThenifyDoNotWrap] = true; + return resolve(this._server); + }, reject); + }; + } + module2.exports = { + thenify + }; + } +}); + +// node_modules/avvio/lib/execute-with-thenable.js +var require_execute_with_thenable = __commonJS({ + "node_modules/avvio/lib/execute-with-thenable.js"(exports2, module2) { + "use strict"; + var { isPromiseLike } = require_is_promise_like(); + var { kAvvio } = require_symbols(); + function executeWithThenable(func, args, callback) { + const result = func.apply(func, args); + if (isPromiseLike(result) && !result[kAvvio]) { + result.then(() => process.nextTick(callback), (error) => process.nextTick(callback, error)); + } else if (callback) { + process.nextTick(callback); + } + } + module2.exports = { + executeWithThenable + }; + } +}); + +// node_modules/avvio/boot.js +var require_boot = __commonJS({ + "node_modules/avvio/boot.js"(exports2, module2) { + "use strict"; + var fastq = require_queue(); + var EE = require("node:events").EventEmitter; + var inherits = require("node:util").inherits; + var { + AVV_ERR_EXPOSE_ALREADY_DEFINED, + AVV_ERR_CALLBACK_NOT_FN, + AVV_ERR_ROOT_PLG_BOOTED, + AVV_ERR_READY_TIMEOUT, + AVV_ERR_ATTRIBUTE_ALREADY_DEFINED + } = require_errors(); + var { + kAvvio, + kIsOnCloseHandler + } = require_symbols(); + var { TimeTree } = require_time_tree(); + var { Plugin } = require_plugin(); + var { debug } = require_debug(); + var { validatePlugin } = require_validate_plugin(); + var { isBundledOrTypescriptPlugin } = require_is_bundled_or_typescript_plugin(); + var { isPromiseLike } = require_is_promise_like(); + var { thenify } = require_thenify(); + var { executeWithThenable } = require_execute_with_thenable(); + function Boot(server, opts, done) { + if (typeof server === "function" && arguments.length === 1) { + done = server; + opts = {}; + server = null; + } + if (typeof opts === "function") { + done = opts; + opts = {}; + } + opts = opts || {}; + opts.autostart = opts.autostart !== false; + opts.timeout = Number(opts.timeout) || 0; + opts.expose = opts.expose || {}; + if (!new.target) { + return new Boot(server, opts, done); + } + this._server = server || this; + this._opts = opts; + if (server) { + this._expose(); + } + this._current = []; + this._error = null; + this._lastUsed = null; + this.setMaxListeners(0); + if (done) { + this.once("start", done); + } + this.started = false; + this.booted = false; + this.pluginTree = new TimeTree(); + this._readyQ = fastq(this, callWithCbOrNextTick, 1); + this._readyQ.pause(); + this._readyQ.drain = () => { + this.emit("start"); + this._readyQ.drain = noop; + }; + this._closeQ = fastq(this, closeWithCbOrNextTick, 1); + this._closeQ.pause(); + this._closeQ.drain = () => { + this.emit("close"); + this._closeQ.drain = noop; + }; + this._doStart = null; + const instance = this; + this._root = new Plugin(fastq(this, this._loadPluginNextTick, 1), function root(server2, opts2, done2) { + instance._doStart = done2; + opts2.autostart && instance.start(); + }, opts, false, 0); + this._trackPluginLoading(this._root); + this._loadPlugin(this._root, (err) => { + debug("root plugin ready"); + try { + this.emit("preReady"); + this._root = null; + } catch (preReadyError) { + err = err || this._error || preReadyError; + } + if (err) { + this._error = err; + if (this._readyQ.length() === 0) { + throw err; + } + } else { + this.booted = true; + } + this._readyQ.resume(); + }); + } + inherits(Boot, EE); + Boot.prototype.start = function() { + this.started = true; + process.nextTick(this._doStart); + return this; + }; + Boot.prototype.override = function(server, func, opts) { + return server; + }; + Boot.prototype[kAvvio] = true; + Boot.prototype.use = function(plugin, opts) { + this._lastUsed = this._addPlugin(plugin, opts, false); + return this; + }; + Boot.prototype._loadRegistered = function() { + const plugin = this._current[0]; + const weNeedToStart = !this.started && !this.booted; + if (weNeedToStart) { + process.nextTick(() => this._root.queue.resume()); + } + if (!plugin) { + return Promise.resolve(); + } + return plugin.loadedSoFar(); + }; + Object.defineProperty(Boot.prototype, "then", { get: thenify }); + Boot.prototype._addPlugin = function(pluginFn, opts, isAfter) { + if (isBundledOrTypescriptPlugin(pluginFn)) { + pluginFn = pluginFn.default; + } + validatePlugin(pluginFn); + opts = opts || {}; + if (this.booted) { + throw new AVV_ERR_ROOT_PLG_BOOTED(); + } + const current = this._current[0]; + let timeout = this._opts.timeout; + if (!current.loaded && current.timeout > 0) { + const delta = Date.now() - current.startTime; + timeout = current.timeout - (delta + 3); + } + const plugin = new Plugin(fastq(this, this._loadPluginNextTick, 1), pluginFn, opts, isAfter, timeout); + this._trackPluginLoading(plugin); + if (current.loaded) { + throw new Error(plugin.name, current.name); + } + current.enqueue(plugin, (err) => { + err && (this._error = err); + }); + return plugin; + }; + Boot.prototype._expose = function _expose() { + const instance = this; + const server = instance._server; + const { + use: useKey = "use", + after: afterKey = "after", + ready: readyKey = "ready", + onClose: onCloseKey = "onClose", + close: closeKey = "close" + } = this._opts.expose; + if (server[useKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(useKey, "use"); + } + server[useKey] = function(fn, opts) { + instance.use(fn, opts); + return this; + }; + if (server[afterKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(afterKey, "after"); + } + server[afterKey] = function(func) { + if (typeof func !== "function") { + return instance._loadRegistered(); + } + instance.after(encapsulateThreeParam(func, this)); + return this; + }; + if (server[readyKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(readyKey, "ready"); + } + server[readyKey] = function(func) { + if (func && typeof func !== "function") { + throw new AVV_ERR_CALLBACK_NOT_FN(readyKey, typeof func); + } + return instance.ready(func ? encapsulateThreeParam(func, this) : void 0); + }; + if (server[onCloseKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(onCloseKey, "onClose"); + } + server[onCloseKey] = function(func) { + if (typeof func !== "function") { + throw new AVV_ERR_CALLBACK_NOT_FN(onCloseKey, typeof func); + } + instance.onClose(encapsulateTwoParam(func, this)); + return this; + }; + if (server[closeKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(closeKey, "close"); + } + server[closeKey] = function(func) { + if (func && typeof func !== "function") { + throw new AVV_ERR_CALLBACK_NOT_FN(closeKey, typeof func); + } + if (func) { + instance.close(encapsulateThreeParam(func, this)); + return this; + } + return instance.close(); + }; + if (server.then) { + throw new AVV_ERR_ATTRIBUTE_ALREADY_DEFINED("then"); + } + Object.defineProperty(server, "then", { get: thenify.bind(instance) }); + server[kAvvio] = true; + }; + Boot.prototype.after = function(func) { + if (!func) { + return this._loadRegistered(); + } + this._addPlugin(_after.bind(this), {}, true); + function _after(s, opts, done) { + callWithCbOrNextTick.call(this, func, done); + } + return this; + }; + Boot.prototype.onClose = function(func) { + if (typeof func !== "function") { + throw new AVV_ERR_CALLBACK_NOT_FN("onClose", typeof func); + } + func[kIsOnCloseHandler] = true; + this._closeQ.unshift(func, (err) => { + err && (this._error = err); + }); + return this; + }; + Boot.prototype.close = function(func) { + let promise; + if (func) { + if (typeof func !== "function") { + throw new AVV_ERR_CALLBACK_NOT_FN("close", typeof func); + } + } else { + promise = new Promise(function(resolve, reject) { + func = function(err) { + if (err) { + return reject(err); + } + resolve(); + }; + }); + } + this.ready(() => { + this._error = null; + this._closeQ.push(func); + process.nextTick(this._closeQ.resume.bind(this._closeQ)); + }); + return promise; + }; + Boot.prototype.ready = function(func) { + if (func) { + if (typeof func !== "function") { + throw new AVV_ERR_CALLBACK_NOT_FN("ready", typeof func); + } + this._readyQ.push(func); + queueMicrotask(this.start.bind(this)); + return; + } + return new Promise((resolve, reject) => { + this._readyQ.push(readyPromiseCB); + this.start(); + const relativeContext = this._current[0].server; + function readyPromiseCB(err, context, done) { + if (err) { + reject(err); + } else { + resolve(relativeContext); + } + process.nextTick(done); + } + }); + }; + Boot.prototype._trackPluginLoading = function(plugin) { + const parentName = this._current[0]?.name || null; + plugin.once("start", (serverName, funcName, time) => { + const nodeId = this.pluginTree.start(parentName || null, funcName, time); + plugin.once("loaded", (serverName2, funcName2, time2) => { + this.pluginTree.stop(nodeId, time2); + }); + }); + }; + Boot.prototype.prettyPrint = function() { + return this.pluginTree.prettyPrint(); + }; + Boot.prototype.toJSON = function() { + return this.pluginTree.toJSON(); + }; + Boot.prototype._loadPlugin = function(plugin, callback) { + const instance = this; + if (isPromiseLike(plugin.func)) { + plugin.func.then((fn) => { + if (typeof fn.default === "function") { + fn = fn.default; + } + plugin.func = fn; + this._loadPlugin(plugin, callback); + }, callback); + return; + } + const last = instance._current[0]; + instance._current.unshift(plugin); + if (instance._error && !plugin.isAfter) { + debug("skipping loading of plugin as instance errored and it is not an after", plugin.name); + process.nextTick(execCallback); + return; + } + let server = last && last.server || instance._server; + if (!plugin.isAfter) { + try { + server = instance.override(server, plugin.func, plugin.options); + } catch (overrideErr) { + debug("override errored", plugin.name); + return execCallback(overrideErr); + } + } + plugin.exec(server, execCallback); + function execCallback(err) { + plugin.finish(err, (err2) => { + instance._current.shift(); + callback(err2); + }); + } + }; + Boot.prototype._loadPluginNextTick = function(plugin, callback) { + process.nextTick(this._loadPlugin.bind(this), plugin, callback); + }; + function noop() { + } + function callWithCbOrNextTick(func, cb) { + const context = this._server; + const err = this._error; + this._error = null; + if (func.length === 0) { + this._error = err; + executeWithThenable(func, [], cb); + } else if (func.length === 1) { + executeWithThenable(func, [err], cb); + } else { + if (this._opts.timeout === 0) { + const wrapCb = (err2) => { + this._error = err2; + cb(this._error); + }; + if (func.length === 2) { + func(err, wrapCb); + } else { + func(err, context, wrapCb); + } + } else { + timeoutCall.call(this, func, err, context, cb); + } + } + } + function timeoutCall(func, rootErr, context, cb) { + const name = func.unwrappedName ?? func.name; + debug("setting up ready timeout", name, this._opts.timeout); + let timer = setTimeout(() => { + debug("timed out", name); + timer = null; + const toutErr = new AVV_ERR_READY_TIMEOUT(name); + toutErr.fn = func; + this._error = toutErr; + cb(toutErr); + }, this._opts.timeout); + if (func.length === 2) { + func(rootErr, timeoutCb.bind(this)); + } else { + func(rootErr, context, timeoutCb.bind(this)); + } + function timeoutCb(err) { + if (timer) { + clearTimeout(timer); + this._error = err; + cb(this._error); + } else { + } + } + } + function closeWithCbOrNextTick(func, cb) { + const context = this._server; + const isOnCloseHandler = func[kIsOnCloseHandler]; + if (func.length === 0 || func.length === 1) { + let promise; + if (isOnCloseHandler) { + promise = func(context); + } else { + promise = func(this._error); + } + if (promise && typeof promise.then === "function") { + debug("resolving close/onClose promise"); + promise.then( + () => process.nextTick(cb), + (e) => process.nextTick(cb, e) + ); + } else { + process.nextTick(cb); + } + } else if (func.length === 2) { + if (isOnCloseHandler) { + func(context, cb); + } else { + func(this._error, cb); + } + } else { + if (isOnCloseHandler) { + func(context, cb); + } else { + func(this._error, context, cb); + } + } + } + function encapsulateTwoParam(func, that) { + return _encapsulateTwoParam.bind(that); + function _encapsulateTwoParam(context, cb) { + let res; + if (func.length === 0) { + res = func(); + if (res && res.then) { + res.then(function() { + process.nextTick(cb); + }, cb); + } else { + process.nextTick(cb); + } + } else if (func.length === 1) { + res = func(this); + if (res && res.then) { + res.then(function() { + process.nextTick(cb); + }, cb); + } else { + process.nextTick(cb); + } + } else { + func(this, cb); + } + } + } + function encapsulateThreeParam(func, that) { + const wrapped = _encapsulateThreeParam.bind(that); + wrapped.unwrappedName = func.name; + return wrapped; + function _encapsulateThreeParam(err, cb) { + let res; + if (!func) { + process.nextTick(cb); + } else if (func.length === 0) { + res = func(); + if (res && res.then) { + res.then(function() { + process.nextTick(cb, err); + }, cb); + } else { + process.nextTick(cb, err); + } + } else if (func.length === 1) { + res = func(err); + if (res && res.then) { + res.then(function() { + process.nextTick(cb); + }, cb); + } else { + process.nextTick(cb); + } + } else if (func.length === 2) { + func(err, cb); + } else { + func(err, this, cb); + } + } + } + module2.exports = Boot; + } +}); + +// node_modules/fastify/lib/symbols.js +var require_symbols2 = __commonJS({ + "node_modules/fastify/lib/symbols.js"(exports2, module2) { + "use strict"; + var keys = { + kAvvioBoot: Symbol("fastify.avvioBoot"), + kChildren: Symbol("fastify.children"), + kServerBindings: Symbol("fastify.serverBindings"), + kBodyLimit: Symbol("fastify.bodyLimit"), + kSupportedHTTPMethods: Symbol("fastify.acceptedHTTPMethods"), + kRoutePrefix: Symbol("fastify.routePrefix"), + kLogLevel: Symbol("fastify.logLevel"), + kLogSerializers: Symbol("fastify.logSerializers"), + kHooks: Symbol("fastify.hooks"), + kContentTypeParser: Symbol("fastify.contentTypeParser"), + kState: Symbol("fastify.state"), + kOptions: Symbol("fastify.options"), + kDisableRequestLogging: Symbol("fastify.disableRequestLogging"), + kPluginNameChain: Symbol("fastify.pluginNameChain"), + kRouteContext: Symbol("fastify.context"), + kGenReqId: Symbol("fastify.genReqId"), + // Schema + kSchemaController: Symbol("fastify.schemaController"), + kSchemaHeaders: Symbol("headers-schema"), + kSchemaParams: Symbol("params-schema"), + kSchemaQuerystring: Symbol("querystring-schema"), + kSchemaBody: Symbol("body-schema"), + kSchemaResponse: Symbol("response-schema"), + kSchemaErrorFormatter: Symbol("fastify.schemaErrorFormatter"), + kSchemaVisited: Symbol("fastify.schemas.visited"), + // Request + kRequest: Symbol("fastify.Request"), + kRequestPayloadStream: Symbol("fastify.RequestPayloadStream"), + kRequestAcceptVersion: Symbol("fastify.RequestAcceptVersion"), + kRequestCacheValidateFns: Symbol("fastify.request.cache.validateFns"), + kRequestOriginalUrl: Symbol("fastify.request.originalUrl"), + // 404 + kFourOhFour: Symbol("fastify.404"), + kCanSetNotFoundHandler: Symbol("fastify.canSetNotFoundHandler"), + kFourOhFourLevelInstance: Symbol("fastify.404LogLevelInstance"), + kFourOhFourContext: Symbol("fastify.404ContextKey"), + kDefaultJsonParse: Symbol("fastify.defaultJSONParse"), + // Reply + kReply: Symbol("fastify.Reply"), + kReplySerializer: Symbol("fastify.reply.serializer"), + kReplyIsError: Symbol("fastify.reply.isError"), + kReplyHeaders: Symbol("fastify.reply.headers"), + kReplyTrailers: Symbol("fastify.reply.trailers"), + kReplyHasStatusCode: Symbol("fastify.reply.hasStatusCode"), + kReplyHijacked: Symbol("fastify.reply.hijacked"), + kReplyStartTime: Symbol("fastify.reply.startTime"), + kReplyNextErrorHandler: Symbol("fastify.reply.nextErrorHandler"), + kReplyEndTime: Symbol("fastify.reply.endTime"), + kReplyErrorHandlerCalled: Symbol("fastify.reply.errorHandlerCalled"), + kReplyIsRunningOnErrorHook: Symbol("fastify.reply.isRunningOnErrorHook"), + kReplySerializerDefault: Symbol("fastify.replySerializerDefault"), + kReplyCacheSerializeFns: Symbol("fastify.reply.cache.serializeFns"), + // This symbol is only meant to be used for fastify tests and should not be used for any other purpose + kTestInternals: Symbol("fastify.testInternals"), + kErrorHandler: Symbol("fastify.errorHandler"), + kErrorHandlerAlreadySet: Symbol("fastify.errorHandlerAlreadySet"), + kChildLoggerFactory: Symbol("fastify.childLoggerFactory"), + kHasBeenDecorated: Symbol("fastify.hasBeenDecorated"), + kKeepAliveConnections: Symbol("fastify.keepAliveConnections"), + kRouteByFastify: Symbol("fastify.routeByFastify") + }; + module2.exports = keys; + } +}); + +// node_modules/process-warning/index.js +var require_process_warning = __commonJS({ + "node_modules/process-warning/index.js"(exports2, module2) { + "use strict"; + var { format } = require("node:util"); + function createDeprecation(params) { + return createWarning({ ...params, name: "DeprecationWarning" }); + } + function createWarning({ name, code, message, unlimited = false } = {}) { + if (!name) throw new Error("Warning name must not be empty"); + if (!code) throw new Error("Warning code must not be empty"); + if (!message) throw new Error("Warning message must not be empty"); + if (typeof unlimited !== "boolean") throw new Error("Warning opts.unlimited must be a boolean"); + code = code.toUpperCase(); + let warningContainer = { + [name]: function(a, b, c) { + if (warning.emitted === true && warning.unlimited !== true) { + return; + } + warning.emitted = true; + process.emitWarning(warning.format(a, b, c), warning.name, warning.code); + } + }; + if (unlimited) { + warningContainer = { + [name]: function(a, b, c) { + warning.emitted = true; + process.emitWarning(warning.format(a, b, c), warning.name, warning.code); + } + }; + } + const warning = warningContainer[name]; + warning.emitted = false; + warning.message = message; + warning.unlimited = unlimited; + warning.code = code; + warning.format = function(a, b, c) { + let formatted; + if (a && b && c) { + formatted = format(message, a, b, c); + } else if (a && b) { + formatted = format(message, a, b); + } else if (a) { + formatted = format(message, a); + } else { + formatted = message; + } + return formatted; + }; + return warning; + } + var out = { createWarning, createDeprecation }; + module2.exports = out; + module2.exports.default = out; + module2.exports.processWarning = out; + } +}); + +// node_modules/fastify/lib/warnings.js +var require_warnings = __commonJS({ + "node_modules/fastify/lib/warnings.js"(exports2, module2) { + "use strict"; + var { createWarning } = require_process_warning(); + var FSTWRN001 = createWarning({ + name: "FastifyWarning", + code: "FSTWRN001", + message: "The %s schema for %s: %s is missing. This may indicate the schema is not well specified.", + unlimited: true + }); + var FSTWRN003 = createWarning({ + name: "FastifyWarning", + code: "FSTWRN003", + message: "The %s mixes async and callback styles that may lead to unhandled rejections. Please use only one of them.", + unlimited: true + }); + var FSTWRN004 = createWarning({ + name: "FastifyWarning", + code: "FSTWRN004", + message: "It seems that you are overriding an errorHandler in the same scope, which can lead to subtle bugs.", + unlimited: true + }); + var FSTSEC001 = createWarning({ + name: "FastifySecurity", + code: "FSTSEC001", + message: 'You are using /%s/ Content-Type which may be vulnerable to CORS attack. Please make sure your RegExp start with "^" or include ";?" to proper detection of the essence MIME type.', + unlimited: true + }); + var FSTDEP022 = createWarning({ + name: "FastifyWarning", + code: "FSTDPE022", + message: 'The router options for %s property access is deprecated. Please use "options.routerOptions" instead for accessing router options. The router options will be removed in `fastify@6`.', + unlimited: true + }); + module2.exports = { + FSTWRN001, + FSTWRN003, + FSTWRN004, + FSTSEC001, + FSTDEP022 + }; + } +}); + +// node_modules/fastify/lib/errors.js +var require_errors2 = __commonJS({ + "node_modules/fastify/lib/errors.js"(exports2, module2) { + "use strict"; + var createError = require_error(); + var codes = { + /** + * Basic + */ + FST_ERR_NOT_FOUND: createError( + "FST_ERR_NOT_FOUND", + "Not Found", + 404 + ), + FST_ERR_OPTIONS_NOT_OBJ: createError( + "FST_ERR_OPTIONS_NOT_OBJ", + "Options must be an object", + 500, + TypeError + ), + FST_ERR_QSP_NOT_FN: createError( + "FST_ERR_QSP_NOT_FN", + "querystringParser option should be a function, instead got '%s'", + 500, + TypeError + ), + FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN: createError( + "FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN", + "schemaController.bucket option should be a function, instead got '%s'", + 500, + TypeError + ), + FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN: createError( + "FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN", + "schemaErrorFormatter option should be a non async function. Instead got '%s'.", + 500, + TypeError + ), + FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ: createError( + "FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ", + "ajv.customOptions option should be an object, instead got '%s'", + 500, + TypeError + ), + FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR: createError( + "FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR", + "ajv.plugins option should be an array, instead got '%s'", + 500, + TypeError + ), + FST_ERR_VALIDATION: createError( + "FST_ERR_VALIDATION", + "%s", + 400 + ), + FST_ERR_LISTEN_OPTIONS_INVALID: createError( + "FST_ERR_LISTEN_OPTIONS_INVALID", + "Invalid listen options: '%s'", + 500, + TypeError + ), + FST_ERR_ERROR_HANDLER_NOT_FN: createError( + "FST_ERR_ERROR_HANDLER_NOT_FN", + "Error Handler must be a function", + 500, + TypeError + ), + FST_ERR_ERROR_HANDLER_ALREADY_SET: createError( + "FST_ERR_ERROR_HANDLER_ALREADY_SET", + "Error Handler already set in this scope. Set 'allowErrorHandlerOverride: true' to allow overriding.", + 500, + TypeError + ), + /** + * ContentTypeParser + */ + FST_ERR_CTP_ALREADY_PRESENT: createError( + "FST_ERR_CTP_ALREADY_PRESENT", + "Content type parser '%s' already present." + ), + FST_ERR_CTP_INVALID_TYPE: createError( + "FST_ERR_CTP_INVALID_TYPE", + "The content type should be a string or a RegExp", + 500, + TypeError + ), + FST_ERR_CTP_EMPTY_TYPE: createError( + "FST_ERR_CTP_EMPTY_TYPE", + "The content type cannot be an empty string", + 500, + TypeError + ), + FST_ERR_CTP_INVALID_HANDLER: createError( + "FST_ERR_CTP_INVALID_HANDLER", + "The content type handler should be a function", + 500, + TypeError + ), + FST_ERR_CTP_INVALID_PARSE_TYPE: createError( + "FST_ERR_CTP_INVALID_PARSE_TYPE", + "The body parser can only parse your data as 'string' or 'buffer', you asked '%s' which is not supported.", + 500, + TypeError + ), + FST_ERR_CTP_BODY_TOO_LARGE: createError( + "FST_ERR_CTP_BODY_TOO_LARGE", + "Request body is too large", + 413, + RangeError + ), + FST_ERR_CTP_INVALID_MEDIA_TYPE: createError( + "FST_ERR_CTP_INVALID_MEDIA_TYPE", + "Unsupported Media Type: %s", + 415 + ), + FST_ERR_CTP_INVALID_CONTENT_LENGTH: createError( + "FST_ERR_CTP_INVALID_CONTENT_LENGTH", + "Request body size did not match Content-Length", + 400, + RangeError + ), + FST_ERR_CTP_EMPTY_JSON_BODY: createError( + "FST_ERR_CTP_EMPTY_JSON_BODY", + "Body cannot be empty when content-type is set to 'application/json'", + 400 + ), + FST_ERR_CTP_INVALID_JSON_BODY: createError( + "FST_ERR_CTP_INVALID_JSON_BODY", + "Body is not valid JSON but content-type is set to 'application/json'", + 400 + ), + FST_ERR_CTP_INSTANCE_ALREADY_STARTED: createError( + "FST_ERR_CTP_INSTANCE_ALREADY_STARTED", + 'Cannot call "%s" when fastify instance is already started!', + 400 + ), + /** + * decorate + */ + FST_ERR_DEC_ALREADY_PRESENT: createError( + "FST_ERR_DEC_ALREADY_PRESENT", + "The decorator '%s' has already been added!" + ), + FST_ERR_DEC_DEPENDENCY_INVALID_TYPE: createError( + "FST_ERR_DEC_DEPENDENCY_INVALID_TYPE", + "The dependencies of decorator '%s' must be of type Array.", + 500, + TypeError + ), + FST_ERR_DEC_MISSING_DEPENDENCY: createError( + "FST_ERR_DEC_MISSING_DEPENDENCY", + "The decorator is missing dependency '%s'." + ), + FST_ERR_DEC_AFTER_START: createError( + "FST_ERR_DEC_AFTER_START", + "The decorator '%s' has been added after start!" + ), + FST_ERR_DEC_REFERENCE_TYPE: createError( + "FST_ERR_DEC_REFERENCE_TYPE", + "The decorator '%s' of type '%s' is a reference type. Use the { getter, setter } interface instead." + ), + FST_ERR_DEC_UNDECLARED: createError( + "FST_ERR_DEC_UNDECLARED", + "No decorator '%s' has been declared on %s." + ), + /** + * hooks + */ + FST_ERR_HOOK_INVALID_TYPE: createError( + "FST_ERR_HOOK_INVALID_TYPE", + "The hook name must be a string", + 500, + TypeError + ), + FST_ERR_HOOK_INVALID_HANDLER: createError( + "FST_ERR_HOOK_INVALID_HANDLER", + "%s hook should be a function, instead got %s", + 500, + TypeError + ), + FST_ERR_HOOK_INVALID_ASYNC_HANDLER: createError( + "FST_ERR_HOOK_INVALID_ASYNC_HANDLER", + "Async function has too many arguments. Async hooks should not use the 'done' argument.", + 500, + TypeError + ), + FST_ERR_HOOK_NOT_SUPPORTED: createError( + "FST_ERR_HOOK_NOT_SUPPORTED", + "%s hook not supported!", + 500, + TypeError + ), + /** + * Middlewares + */ + FST_ERR_MISSING_MIDDLEWARE: createError( + "FST_ERR_MISSING_MIDDLEWARE", + "You must register a plugin for handling middlewares, visit fastify.dev/docs/latest/Reference/Middleware/ for more info.", + 500 + ), + FST_ERR_HOOK_TIMEOUT: createError( + "FST_ERR_HOOK_TIMEOUT", + "A callback for '%s' hook%s timed out. You may have forgotten to call 'done' function or to resolve a Promise" + ), + /** + * logger + */ + FST_ERR_LOG_INVALID_DESTINATION: createError( + "FST_ERR_LOG_INVALID_DESTINATION", + "Cannot specify both logger.stream and logger.file options" + ), + FST_ERR_LOG_INVALID_LOGGER: createError( + "FST_ERR_LOG_INVALID_LOGGER", + "Invalid logger object provided. The logger instance should have these functions(s): '%s'.", + 500, + TypeError + ), + FST_ERR_LOG_INVALID_LOGGER_INSTANCE: createError( + "FST_ERR_LOG_INVALID_LOGGER_INSTANCE", + "loggerInstance only accepts a logger instance.", + 500, + TypeError + ), + FST_ERR_LOG_INVALID_LOGGER_CONFIG: createError( + "FST_ERR_LOG_INVALID_LOGGER_CONFIG", + "logger options only accepts a configuration object.", + 500, + TypeError + ), + FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED: createError( + "FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED", + "You cannot provide both logger and loggerInstance. Please provide only one.", + 500, + TypeError + ), + /** + * reply + */ + FST_ERR_REP_INVALID_PAYLOAD_TYPE: createError( + "FST_ERR_REP_INVALID_PAYLOAD_TYPE", + "Attempted to send payload of invalid type '%s'. Expected a string or Buffer.", + 500, + TypeError + ), + FST_ERR_REP_RESPONSE_BODY_CONSUMED: createError( + "FST_ERR_REP_RESPONSE_BODY_CONSUMED", + "Response.body is already consumed." + ), + FST_ERR_REP_READABLE_STREAM_LOCKED: createError( + "FST_ERR_REP_READABLE_STREAM_LOCKED", + "ReadableStream was locked. You should call releaseLock() method on reader before sending." + ), + FST_ERR_REP_ALREADY_SENT: createError( + "FST_ERR_REP_ALREADY_SENT", + 'Reply was already sent, did you forget to "return reply" in "%s" (%s)?' + ), + FST_ERR_REP_SENT_VALUE: createError( + "FST_ERR_REP_SENT_VALUE", + "The only possible value for reply.sent is true.", + 500, + TypeError + ), + FST_ERR_SEND_INSIDE_ONERR: createError( + "FST_ERR_SEND_INSIDE_ONERR", + "You cannot use `send` inside the `onError` hook" + ), + FST_ERR_SEND_UNDEFINED_ERR: createError( + "FST_ERR_SEND_UNDEFINED_ERR", + "Undefined error has occurred" + ), + FST_ERR_BAD_STATUS_CODE: createError( + "FST_ERR_BAD_STATUS_CODE", + "Called reply with an invalid status code: %s" + ), + FST_ERR_BAD_TRAILER_NAME: createError( + "FST_ERR_BAD_TRAILER_NAME", + "Called reply.trailer with an invalid header name: %s" + ), + FST_ERR_BAD_TRAILER_VALUE: createError( + "FST_ERR_BAD_TRAILER_VALUE", + "Called reply.trailer('%s', fn) with an invalid type: %s. Expected a function." + ), + FST_ERR_FAILED_ERROR_SERIALIZATION: createError( + "FST_ERR_FAILED_ERROR_SERIALIZATION", + "Failed to serialize an error. Error: %s. Original error: %s" + ), + FST_ERR_MISSING_SERIALIZATION_FN: createError( + "FST_ERR_MISSING_SERIALIZATION_FN", + 'Missing serialization function. Key "%s"' + ), + FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN: createError( + "FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN", + 'Missing serialization function. Key "%s:%s"' + ), + FST_ERR_REQ_INVALID_VALIDATION_INVOCATION: createError( + "FST_ERR_REQ_INVALID_VALIDATION_INVOCATION", + 'Invalid validation invocation. Missing validation function for HTTP part "%s" nor schema provided.' + ), + /** + * schemas + */ + FST_ERR_SCH_MISSING_ID: createError( + "FST_ERR_SCH_MISSING_ID", + "Missing schema $id property" + ), + FST_ERR_SCH_ALREADY_PRESENT: createError( + "FST_ERR_SCH_ALREADY_PRESENT", + "Schema with id '%s' already declared!" + ), + FST_ERR_SCH_CONTENT_MISSING_SCHEMA: createError( + "FST_ERR_SCH_CONTENT_MISSING_SCHEMA", + "Schema is missing for the content type '%s'" + ), + FST_ERR_SCH_DUPLICATE: createError( + "FST_ERR_SCH_DUPLICATE", + "Schema with '%s' already present!" + ), + FST_ERR_SCH_VALIDATION_BUILD: createError( + "FST_ERR_SCH_VALIDATION_BUILD", + "Failed building the validation schema for %s: %s, due to error %s" + ), + FST_ERR_SCH_SERIALIZATION_BUILD: createError( + "FST_ERR_SCH_SERIALIZATION_BUILD", + "Failed building the serialization schema for %s: %s, due to error %s" + ), + FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX: createError( + "FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX", + 'response schemas should be nested under a valid status code, e.g { 2xx: { type: "object" } }' + ), + /** + * initialConfig + */ + FST_ERR_INIT_OPTS_INVALID: createError( + "FST_ERR_INIT_OPTS_INVALID", + "Invalid initialization options: '%s'" + ), + FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE: createError( + "FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE", + "Cannot set forceCloseConnections to 'idle' as your HTTP server does not support closeIdleConnections method" + ), + /** + * router + */ + FST_ERR_DUPLICATED_ROUTE: createError( + "FST_ERR_DUPLICATED_ROUTE", + "Method '%s' already declared for route '%s'" + ), + FST_ERR_BAD_URL: createError( + "FST_ERR_BAD_URL", + "'%s' is not a valid url component", + 400, + URIError + ), + FST_ERR_ASYNC_CONSTRAINT: createError( + "FST_ERR_ASYNC_CONSTRAINT", + "Unexpected error from async constraint", + 500 + ), + FST_ERR_INVALID_URL: createError( + "FST_ERR_INVALID_URL", + "URL must be a string. Received '%s'", + 400, + TypeError + ), + FST_ERR_ROUTE_OPTIONS_NOT_OBJ: createError( + "FST_ERR_ROUTE_OPTIONS_NOT_OBJ", + 'Options for "%s:%s" route must be an object', + 500, + TypeError + ), + FST_ERR_ROUTE_DUPLICATED_HANDLER: createError( + "FST_ERR_ROUTE_DUPLICATED_HANDLER", + 'Duplicate handler for "%s:%s" route is not allowed!', + 500 + ), + FST_ERR_ROUTE_HANDLER_NOT_FN: createError( + "FST_ERR_ROUTE_HANDLER_NOT_FN", + "Error Handler for %s:%s route, if defined, must be a function", + 500, + TypeError + ), + FST_ERR_ROUTE_MISSING_HANDLER: createError( + "FST_ERR_ROUTE_MISSING_HANDLER", + 'Missing handler function for "%s:%s" route.', + 500 + ), + FST_ERR_ROUTE_METHOD_INVALID: createError( + "FST_ERR_ROUTE_METHOD_INVALID", + "Provided method is invalid!", + 500, + TypeError + ), + FST_ERR_ROUTE_METHOD_NOT_SUPPORTED: createError( + "FST_ERR_ROUTE_METHOD_NOT_SUPPORTED", + "%s method is not supported.", + 500 + ), + FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED: createError( + "FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED", + "Body validation schema for %s:%s route is not supported!", + 500 + ), + FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT: createError( + "FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT", + "'bodyLimit' option must be an integer > 0. Got '%s'", + 500, + TypeError + ), + FST_ERR_ROUTE_REWRITE_NOT_STR: createError( + "FST_ERR_ROUTE_REWRITE_NOT_STR", + 'Rewrite url for "%s" needs to be of type "string" but received "%s"', + 500, + TypeError + ), + /** + * again listen when close server + */ + FST_ERR_REOPENED_CLOSE_SERVER: createError( + "FST_ERR_REOPENED_CLOSE_SERVER", + "Fastify has already been closed and cannot be reopened" + ), + FST_ERR_REOPENED_SERVER: createError( + "FST_ERR_REOPENED_SERVER", + "Fastify is already listening" + ), + FST_ERR_INSTANCE_ALREADY_LISTENING: createError( + "FST_ERR_INSTANCE_ALREADY_LISTENING", + "Fastify instance is already listening. %s" + ), + /** + * plugin + */ + FST_ERR_PLUGIN_VERSION_MISMATCH: createError( + "FST_ERR_PLUGIN_VERSION_MISMATCH", + "fastify-plugin: %s - expected '%s' fastify version, '%s' is installed" + ), + FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE: createError( + "FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE", + "The decorator '%s'%s is not present in %s" + ), + FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER: createError( + "FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER", + "The %s plugin being registered mixes async and callback styles. Async plugin should not mix async and callback style.", + 500, + TypeError + ), + /** + * Avvio Errors + */ + FST_ERR_PLUGIN_CALLBACK_NOT_FN: createError( + "FST_ERR_PLUGIN_CALLBACK_NOT_FN", + "fastify-plugin: %s", + 500, + TypeError + ), + FST_ERR_PLUGIN_NOT_VALID: createError( + "FST_ERR_PLUGIN_NOT_VALID", + "fastify-plugin: %s" + ), + FST_ERR_ROOT_PLG_BOOTED: createError( + "FST_ERR_ROOT_PLG_BOOTED", + "fastify-plugin: %s" + ), + FST_ERR_PARENT_PLUGIN_BOOTED: createError( + "FST_ERR_PARENT_PLUGIN_BOOTED", + "fastify-plugin: %s" + ), + FST_ERR_PLUGIN_TIMEOUT: createError( + "FST_ERR_PLUGIN_TIMEOUT", + "fastify-plugin: %s" + ) + }; + function appendStackTrace(oldErr, newErr) { + newErr.cause = oldErr; + return newErr; + } + module2.exports = codes; + module2.exports.appendStackTrace = appendStackTrace; + module2.exports.AVVIO_ERRORS_MAP = { + AVV_ERR_CALLBACK_NOT_FN: codes.FST_ERR_PLUGIN_CALLBACK_NOT_FN, + AVV_ERR_PLUGIN_NOT_VALID: codes.FST_ERR_PLUGIN_NOT_VALID, + AVV_ERR_ROOT_PLG_BOOTED: codes.FST_ERR_ROOT_PLG_BOOTED, + AVV_ERR_PARENT_PLG_LOADED: codes.FST_ERR_PARENT_PLUGIN_BOOTED, + AVV_ERR_READY_TIMEOUT: codes.FST_ERR_PLUGIN_TIMEOUT, + AVV_ERR_PLUGIN_EXEC_TIMEOUT: codes.FST_ERR_PLUGIN_TIMEOUT + }; + } +}); + +// node_modules/fastify/lib/hooks.js +var require_hooks = __commonJS({ + "node_modules/fastify/lib/hooks.js"(exports2, module2) { + "use strict"; + var applicationHooks = [ + "onRoute", + "onRegister", + "onReady", + "onListen", + "preClose", + "onClose" + ]; + var lifecycleHooks = [ + "onTimeout", + "onRequest", + "preParsing", + "preValidation", + "preSerialization", + "preHandler", + "onSend", + "onResponse", + "onError", + "onRequestAbort" + ]; + var supportedHooks = lifecycleHooks.concat(applicationHooks); + var { + FST_ERR_HOOK_INVALID_TYPE, + FST_ERR_HOOK_INVALID_HANDLER, + FST_ERR_SEND_UNDEFINED_ERR, + FST_ERR_HOOK_TIMEOUT, + FST_ERR_HOOK_NOT_SUPPORTED, + AVVIO_ERRORS_MAP, + appendStackTrace + } = require_errors2(); + var { + kChildren, + kHooks, + kRequestPayloadStream + } = require_symbols2(); + function Hooks() { + this.onRequest = []; + this.preParsing = []; + this.preValidation = []; + this.preSerialization = []; + this.preHandler = []; + this.onResponse = []; + this.onSend = []; + this.onError = []; + this.onRoute = []; + this.onRegister = []; + this.onReady = []; + this.onListen = []; + this.onTimeout = []; + this.onRequestAbort = []; + this.preClose = []; + } + Hooks.prototype = /* @__PURE__ */ Object.create(null); + Hooks.prototype.validate = function(hook, fn) { + if (typeof hook !== "string") throw new FST_ERR_HOOK_INVALID_TYPE(); + if (Array.isArray(this[hook]) === false) { + throw new FST_ERR_HOOK_NOT_SUPPORTED(hook); + } + if (typeof fn !== "function") throw new FST_ERR_HOOK_INVALID_HANDLER(hook, Object.prototype.toString.call(fn)); + }; + Hooks.prototype.add = function(hook, fn) { + this.validate(hook, fn); + this[hook].push(fn); + }; + function buildHooks(h) { + const hooks = new Hooks(); + hooks.onRequest = h.onRequest.slice(); + hooks.preParsing = h.preParsing.slice(); + hooks.preValidation = h.preValidation.slice(); + hooks.preSerialization = h.preSerialization.slice(); + hooks.preHandler = h.preHandler.slice(); + hooks.onSend = h.onSend.slice(); + hooks.onResponse = h.onResponse.slice(); + hooks.onError = h.onError.slice(); + hooks.onRoute = h.onRoute.slice(); + hooks.onRegister = h.onRegister.slice(); + hooks.onTimeout = h.onTimeout.slice(); + hooks.onRequestAbort = h.onRequestAbort.slice(); + hooks.onReady = []; + hooks.onListen = []; + hooks.preClose = []; + return hooks; + } + function hookRunnerApplication(hookName, boot, server, cb) { + const hooks = server[kHooks][hookName]; + let i = 0; + let c = 0; + next(); + function exit(err) { + const hookFnName = hooks[i - 1]?.name; + const hookFnFragment = hookFnName ? ` "${hookFnName}"` : ""; + if (err) { + if (err.code === "AVV_ERR_READY_TIMEOUT") { + err = appendStackTrace(err, new FST_ERR_HOOK_TIMEOUT(hookName, hookFnFragment)); + } else { + err = AVVIO_ERRORS_MAP[err.code] != null ? appendStackTrace(err, new AVVIO_ERRORS_MAP[err.code](err.message)) : err; + } + cb(err); + return; + } + cb(); + } + function next(err) { + if (err) { + exit(err); + return; + } + if (i === hooks.length && c === server[kChildren].length) { + if (i === 0 && c === 0) { + exit(); + } else { + boot(function manageTimeout(err2, done) { + exit(err2); + done(err2); + }); + } + return; + } + if (i === hooks.length && c < server[kChildren].length) { + const child = server[kChildren][c++]; + hookRunnerApplication(hookName, boot, child, next); + return; + } + boot(wrap(hooks[i++], server)); + next(); + } + function wrap(fn, server2) { + return function(err, done) { + if (err) { + done(err); + return; + } + if (fn.length === 1) { + try { + fn.call(server2, done); + } catch (error) { + done(error); + } + return; + } + try { + const ret = fn.call(server2); + if (ret && typeof ret.then === "function") { + ret.then(done, done); + return; + } + } catch (error) { + err = error; + } + done(err); + }; + } + } + function onListenHookRunner(server) { + const hooks = server[kHooks].onListen; + const hooksLen = hooks.length; + let i = 0; + let c = 0; + next(); + function next(err) { + err && server.log.error(err); + if (i === hooksLen) { + while (c < server[kChildren].length) { + const child = server[kChildren][c++]; + onListenHookRunner(child); + } + return; + } + wrap(hooks[i++], server, next); + } + async function wrap(fn, server2, done) { + if (fn.length === 1) { + try { + fn.call(server2, done); + } catch (e) { + done(e); + } + return; + } + try { + const ret = fn.call(server2); + if (ret && typeof ret.then === "function") { + ret.then(done, done); + return; + } + done(); + } catch (error) { + done(error); + } + } + } + function hookRunnerGenerator(iterator) { + return function hookRunner(functions, request, reply, cb) { + let i = 0; + function next(err) { + if (err || i === functions.length) { + cb(err, request, reply); + return; + } + let result; + try { + result = iterator(functions[i++], request, reply, next); + } catch (error) { + cb(error, request, reply); + return; + } + if (result && typeof result.then === "function") { + result.then(handleResolve, handleReject); + } + } + function handleResolve() { + next(); + } + function handleReject(err) { + if (!err) { + err = new FST_ERR_SEND_UNDEFINED_ERR(); + } + cb(err, request, reply); + } + next(); + }; + } + function onResponseHookIterator(fn, request, reply, next) { + return fn(request, reply, next); + } + var onResponseHookRunner = hookRunnerGenerator(onResponseHookIterator); + var preValidationHookRunner = hookRunnerGenerator(hookIterator); + var preHandlerHookRunner = hookRunnerGenerator(hookIterator); + var onTimeoutHookRunner = hookRunnerGenerator(hookIterator); + var onRequestHookRunner = hookRunnerGenerator(hookIterator); + function onSendHookRunner(functions, request, reply, payload, cb) { + let i = 0; + function next(err, newPayload) { + if (err) { + cb(err, request, reply, payload); + return; + } + if (newPayload !== void 0) { + payload = newPayload; + } + if (i === functions.length) { + cb(null, request, reply, payload); + return; + } + let result; + try { + result = functions[i++](request, reply, payload, next); + } catch (error) { + cb(error, request, reply); + return; + } + if (result && typeof result.then === "function") { + result.then(handleResolve, handleReject); + } + } + function handleResolve(newPayload) { + next(null, newPayload); + } + function handleReject(err) { + if (!err) { + err = new FST_ERR_SEND_UNDEFINED_ERR(); + } + cb(err, request, reply, payload); + } + next(); + } + var preSerializationHookRunner = onSendHookRunner; + function preParsingHookRunner(functions, request, reply, cb) { + let i = 0; + function next(err, newPayload) { + if (reply.sent) { + return; + } + if (newPayload !== void 0) { + request[kRequestPayloadStream] = newPayload; + } + if (err || i === functions.length) { + cb(err, request, reply); + return; + } + let result; + try { + result = functions[i++](request, reply, request[kRequestPayloadStream], next); + } catch (error) { + cb(error, request, reply); + return; + } + if (result && typeof result.then === "function") { + result.then(handleResolve, handleReject); + } + } + function handleResolve(newPayload) { + next(null, newPayload); + } + function handleReject(err) { + if (!err) { + err = new FST_ERR_SEND_UNDEFINED_ERR(); + } + cb(err, request, reply); + } + next(); + } + function onRequestAbortHookRunner(functions, request, cb) { + let i = 0; + function next(err) { + if (err || i === functions.length) { + cb(err, request); + return; + } + let result; + try { + result = functions[i++](request, next); + } catch (error) { + cb(error, request); + return; + } + if (result && typeof result.then === "function") { + result.then(handleResolve, handleReject); + } + } + function handleResolve() { + next(); + } + function handleReject(err) { + if (!err) { + err = new FST_ERR_SEND_UNDEFINED_ERR(); + } + cb(err, request); + } + next(); + } + function hookIterator(fn, request, reply, next) { + if (reply.sent === true) return void 0; + return fn(request, reply, next); + } + module2.exports = { + Hooks, + buildHooks, + hookRunnerGenerator, + preParsingHookRunner, + onResponseHookRunner, + onSendHookRunner, + preSerializationHookRunner, + onRequestAbortHookRunner, + hookIterator, + hookRunnerApplication, + onListenHookRunner, + preHandlerHookRunner, + preValidationHookRunner, + onRequestHookRunner, + onTimeoutHookRunner, + lifecycleHooks, + supportedHooks + }; + } +}); + +// node_modules/fastify/lib/promise.js +var require_promise = __commonJS({ + "node_modules/fastify/lib/promise.js"(exports2, module2) { + "use strict"; + var { kTestInternals } = require_symbols2(); + function withResolvers() { + let res, rej; + const promise = new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }); + return { promise, resolve: res, reject: rej }; + } + module2.exports = { + // TODO(20.x): remove when node@20 is not supported + withResolvers: typeof Promise.withResolvers === "function" ? Promise.withResolvers.bind(Promise) : withResolvers, + // Tested using the kTestInternals + [kTestInternals]: { + withResolvers + } + }; + } +}); + +// node_modules/fastify/lib/server.js +var require_server = __commonJS({ + "node_modules/fastify/lib/server.js"(exports2, module2) { + "use strict"; + var http = require("node:http"); + var https = require("node:https"); + var http2 = require("node:http2"); + var dns = require("node:dns"); + var os2 = require("node:os"); + var { kState, kOptions, kServerBindings } = require_symbols2(); + var { FSTWRN003 } = require_warnings(); + var { onListenHookRunner } = require_hooks(); + var { + FST_ERR_REOPENED_CLOSE_SERVER, + FST_ERR_REOPENED_SERVER, + FST_ERR_LISTEN_OPTIONS_INVALID + } = require_errors2(); + var PonyPromise = require_promise(); + module2.exports.createServer = createServer2; + function defaultResolveServerListeningText(address) { + return `Server listening at ${address}`; + } + function createServer2(options, httpHandler) { + const server = getServerInstance(options, httpHandler); + function listen(listenOptions = { port: 0, host: "localhost" }, cb = void 0) { + if (typeof cb === "function") { + if (cb.constructor.name === "AsyncFunction") { + FSTWRN003("listen method"); + } + listenOptions.cb = cb; + } + if (listenOptions.signal) { + if (typeof listenOptions.signal.on !== "function" && typeof listenOptions.signal.addEventListener !== "function") { + throw new FST_ERR_LISTEN_OPTIONS_INVALID("Invalid options.signal"); + } + this[kState].aborted = listenOptions.signal.aborted; + if (this[kState].aborted) { + return this.close(); + } else { + const onAborted = () => { + this[kState].aborted = true; + this.close(); + }; + listenOptions.signal.addEventListener("abort", onAborted, { once: true }); + } + } + let host; + if (listenOptions.path == null) { + host = listenOptions.host ?? "localhost"; + } else { + host = listenOptions.host; + } + if (!Object.hasOwn(listenOptions, "host") || listenOptions.host == null) { + listenOptions.host = host; + } + if (host === "localhost") { + listenOptions.cb = (err, address) => { + if (err) { + cb(err, address); + return; + } + multipleBindings.call(this, server, httpHandler, options, listenOptions, () => { + this[kState].listening = true; + cb(null, address); + onListenHookRunner(this); + }); + }; + } else { + listenOptions.cb = (err, address) => { + if (err) { + cb(err, address); + return; + } + this[kState].listening = true; + cb(null, address); + onListenHookRunner(this); + }; + } + if (cb === void 0) { + const listening = listenPromise.call(this, server, listenOptions); + return listening.then((address) => { + const { promise, resolve } = PonyPromise.withResolvers(); + if (host === "localhost") { + multipleBindings.call(this, server, httpHandler, options, listenOptions, () => { + this[kState].listening = true; + resolve(address); + onListenHookRunner(this); + }); + } else { + resolve(address); + onListenHookRunner(this); + } + return promise; + }); + } + this.ready(listenCallback.call(this, server, listenOptions)); + } + return { server, listen }; + } + function multipleBindings(mainServer, httpHandler, serverOpts, listenOptions, onListen) { + this[kState].listening = false; + dns.lookup(listenOptions.host, { all: true }, (dnsErr, addresses) => { + if (dnsErr || this[kState].aborted) { + onListen(); + return; + } + const isMainServerListening = mainServer.listening && serverOpts.serverFactory; + let binding = 0; + let bound = 0; + if (!isMainServerListening) { + const primaryAddress = mainServer.address(); + for (const adr of addresses) { + if (adr.address !== primaryAddress.address) { + binding++; + const secondaryOpts = Object.assign({}, listenOptions, { + host: adr.address, + port: primaryAddress.port, + cb: (_ignoreErr) => { + bound++; + if (!_ignoreErr) { + this[kServerBindings].push(secondaryServer); + } + if (bound === binding) { + onListen(); + } + } + }); + const secondaryServer = getServerInstance(serverOpts, httpHandler); + const closeSecondary = () => { + secondaryServer.close(() => { + }); + if (typeof secondaryServer.closeAllConnections === "function" && serverOpts.forceCloseConnections === true) { + secondaryServer.closeAllConnections(); + } + }; + secondaryServer.on("upgrade", mainServer.emit.bind(mainServer, "upgrade")); + mainServer.on("unref", closeSecondary); + mainServer.on("close", closeSecondary); + mainServer.on("error", closeSecondary); + this[kState].listening = false; + listenCallback.call(this, secondaryServer, secondaryOpts)(); + } + } + } + if (binding === 0) { + onListen(); + return; + } + const originUnref = mainServer.unref; + mainServer.unref = function() { + originUnref.call(mainServer); + mainServer.emit("unref"); + }; + }); + } + function listenCallback(server, listenOptions) { + const wrap = (err) => { + server.removeListener("error", wrap); + server.removeListener("listening", wrap); + if (!err) { + const address = logServerAddress.call(this, server, listenOptions.listenTextResolver || defaultResolveServerListeningText); + listenOptions.cb(null, address); + } else { + this[kState].listening = false; + listenOptions.cb(err, null); + } + }; + return (err) => { + if (err != null) return listenOptions.cb(err); + if (this[kState].listening && this[kState].closing) { + return listenOptions.cb(new FST_ERR_REOPENED_CLOSE_SERVER(), null); + } + if (this[kState].listening) { + return listenOptions.cb(new FST_ERR_REOPENED_SERVER(), null); + } + server.once("error", wrap); + if (!this[kState].closing) { + server.once("listening", wrap); + server.listen(listenOptions); + this[kState].listening = true; + } + }; + } + function listenPromise(server, listenOptions) { + if (this[kState].listening && this[kState].closing) { + return Promise.reject(new FST_ERR_REOPENED_CLOSE_SERVER()); + } + if (this[kState].listening) { + return Promise.reject(new FST_ERR_REOPENED_SERVER()); + } + return this.ready().then(() => { + if (this[kState].aborted) return; + const { promise, resolve, reject } = PonyPromise.withResolvers(); + const errEventHandler = (err) => { + cleanup(); + this[kState].listening = false; + reject(err); + }; + const listeningEventHandler = () => { + cleanup(); + this[kState].listening = true; + resolve(logServerAddress.call(this, server, listenOptions.listenTextResolver || defaultResolveServerListeningText)); + }; + function cleanup() { + server.removeListener("error", errEventHandler); + server.removeListener("listening", listeningEventHandler); + } + server.once("error", errEventHandler); + server.once("listening", listeningEventHandler); + server.listen(listenOptions); + return promise; + }); + } + function getServerInstance(options, httpHandler) { + if (options.serverFactory) { + return options.serverFactory(httpHandler, options); + } + const httpsOptions = options.https === true ? {} : options.https; + if (options.http2) { + const server2 = typeof httpsOptions === "object" ? http2.createSecureServer(httpsOptions, httpHandler) : http2.createServer(options.http, httpHandler); + server2.on("session", (session) => session.setTimeout(options.http2SessionTimeout, function closeSession() { + this.close(); + })); + server2.setTimeout(options.connectionTimeout); + return server2; + } + const server = httpsOptions ? https.createServer(httpsOptions, httpHandler) : http.createServer(options.http, httpHandler); + server.keepAliveTimeout = options.keepAliveTimeout; + server.requestTimeout = options.requestTimeout; + server.setTimeout(options.connectionTimeout); + if (options.maxRequestsPerSocket > 0) { + server.maxRequestsPerSocket = options.maxRequestsPerSocket; + } + return server; + } + function getAddresses(address) { + if (address.address === "0.0.0.0") { + return Object.values(os2.networkInterfaces()).flatMap((iface) => { + return iface.filter((iface2) => iface2.family === "IPv4"); + }).sort((iface) => { + return iface.internal ? -1 : 1; + }).map((iface) => { + return iface.address; + }); + } + return [address.address]; + } + function logServerAddress(server, listenTextResolver) { + let addresses; + const isUnixSocket = typeof server.address() === "string"; + if (!isUnixSocket) { + if (server.address().address.indexOf(":") === -1) { + addresses = getAddresses(server.address()).map((address) => address + ":" + server.address().port); + } else { + addresses = ["[" + server.address().address + "]:" + server.address().port]; + } + addresses = addresses.map((address) => "http" + (this[kOptions].https ? "s" : "") + "://" + address); + } else { + addresses = [server.address()]; + } + for (const address of addresses) { + this.log.info(listenTextResolver(address)); + } + return addresses[0]; + } + } +}); + +// node_modules/fastify/lib/validation.js +var require_validation = __commonJS({ + "node_modules/fastify/lib/validation.js"(exports2, module2) { + "use strict"; + var { + kSchemaHeaders: headersSchema, + kSchemaParams: paramsSchema, + kSchemaQuerystring: querystringSchema, + kSchemaBody: bodySchema, + kSchemaResponse: responseSchema + } = require_symbols2(); + var scChecker = /^[1-5](?:\d{2}|xx)$|^default$/; + var { + FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX + } = require_errors2(); + var { FSTWRN001 } = require_warnings(); + function compileSchemasForSerialization(context, compile) { + if (!context.schema || !context.schema.response) { + return; + } + const { method, url } = context.config || {}; + context[responseSchema] = Object.keys(context.schema.response).reduce(function(acc, statusCode) { + const schema = context.schema.response[statusCode]; + statusCode = statusCode.toLowerCase(); + if (!scChecker.test(statusCode)) { + throw new FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX(); + } + if (schema.content) { + const contentTypesSchemas = {}; + for (const mediaName of Object.keys(schema.content)) { + const contentSchema = schema.content[mediaName].schema; + contentTypesSchemas[mediaName] = compile({ + schema: contentSchema, + url, + method, + httpStatus: statusCode, + contentType: mediaName + }); + } + acc[statusCode] = contentTypesSchemas; + } else { + acc[statusCode] = compile({ + schema, + url, + method, + httpStatus: statusCode + }); + } + return acc; + }, {}); + } + function compileSchemasForValidation(context, compile, isCustom) { + const { schema } = context; + if (!schema) { + return; + } + const { method, url } = context.config || {}; + const headers = schema.headers; + if (headers && (isCustom || Object.getPrototypeOf(headers) !== Object.prototype)) { + context[headersSchema] = compile({ schema: headers, method, url, httpPart: "headers" }); + } else if (headers) { + const headersSchemaLowerCase = {}; + Object.keys(headers).forEach((k) => { + headersSchemaLowerCase[k] = headers[k]; + }); + if (headersSchemaLowerCase.required instanceof Array) { + headersSchemaLowerCase.required = headersSchemaLowerCase.required.map((h) => h.toLowerCase()); + } + if (headers.properties) { + headersSchemaLowerCase.properties = {}; + Object.keys(headers.properties).forEach((k) => { + headersSchemaLowerCase.properties[k.toLowerCase()] = headers.properties[k]; + }); + } + context[headersSchema] = compile({ schema: headersSchemaLowerCase, method, url, httpPart: "headers" }); + } else if (Object.hasOwn(schema, "headers")) { + FSTWRN001("headers", method, url); + } + if (schema.body) { + const contentProperty = schema.body.content; + if (contentProperty) { + const contentTypeSchemas = {}; + for (const contentType of Object.keys(contentProperty)) { + const contentSchema = contentProperty[contentType].schema; + contentTypeSchemas[contentType] = compile({ schema: contentSchema, method, url, httpPart: "body", contentType }); + } + context[bodySchema] = contentTypeSchemas; + } else { + context[bodySchema] = compile({ schema: schema.body, method, url, httpPart: "body" }); + } + } else if (Object.hasOwn(schema, "body")) { + FSTWRN001("body", method, url); + } + if (schema.querystring) { + context[querystringSchema] = compile({ schema: schema.querystring, method, url, httpPart: "querystring" }); + } else if (Object.hasOwn(schema, "querystring")) { + FSTWRN001("querystring", method, url); + } + if (schema.params) { + context[paramsSchema] = compile({ schema: schema.params, method, url, httpPart: "params" }); + } else if (Object.hasOwn(schema, "params")) { + FSTWRN001("params", method, url); + } + } + function validateParam(validatorFunction, request, paramName) { + const isUndefined = request[paramName] === void 0; + const ret = validatorFunction && validatorFunction(isUndefined ? null : request[paramName]); + if (ret && typeof ret.then === "function") { + return ret.then((res) => { + return answer(res); + }).catch((err) => { + return err; + }); + } + return answer(ret); + function answer(ret2) { + if (ret2 === false) return validatorFunction.errors; + if (ret2 && ret2.error) return ret2.error; + if (ret2 && ret2.value) request[paramName] = ret2.value; + return false; + } + } + function validate(context, request, execution) { + const runExecution = execution === void 0; + if (runExecution || !execution.skipParams) { + const params = validateParam(context[paramsSchema], request, "params"); + if (params) { + if (typeof params.then !== "function") { + return wrapValidationError(params, "params", context.schemaErrorFormatter); + } else { + return validateAsyncParams(params, context, request); + } + } + } + if (runExecution || !execution.skipBody) { + let validatorFunction = null; + if (typeof context[bodySchema] === "function") { + validatorFunction = context[bodySchema]; + } else if (context[bodySchema]) { + const contentType = getEssenceMediaType(request.headers["content-type"]); + const contentSchema = context[bodySchema][contentType]; + if (contentSchema) { + validatorFunction = contentSchema; + } + } + const body = validateParam(validatorFunction, request, "body"); + if (body) { + if (typeof body.then !== "function") { + return wrapValidationError(body, "body", context.schemaErrorFormatter); + } else { + return validateAsyncBody(body, context, request); + } + } + } + if (runExecution || !execution.skipQuery) { + const query = validateParam(context[querystringSchema], request, "query"); + if (query) { + if (typeof query.then !== "function") { + return wrapValidationError(query, "querystring", context.schemaErrorFormatter); + } else { + return validateAsyncQuery(query, context, request); + } + } + } + const headers = validateParam(context[headersSchema], request, "headers"); + if (headers) { + if (typeof headers.then !== "function") { + return wrapValidationError(headers, "headers", context.schemaErrorFormatter); + } else { + return validateAsyncHeaders(headers, context, request); + } + } + return false; + } + function validateAsyncParams(validatePromise, context, request) { + return validatePromise.then((paramsResult) => { + if (paramsResult) { + return wrapValidationError(paramsResult, "params", context.schemaErrorFormatter); + } + return validate(context, request, { skipParams: true }); + }); + } + function validateAsyncBody(validatePromise, context, request) { + return validatePromise.then((bodyResult) => { + if (bodyResult) { + return wrapValidationError(bodyResult, "body", context.schemaErrorFormatter); + } + return validate(context, request, { skipParams: true, skipBody: true }); + }); + } + function validateAsyncQuery(validatePromise, context, request) { + return validatePromise.then((queryResult) => { + if (queryResult) { + return wrapValidationError(queryResult, "querystring", context.schemaErrorFormatter); + } + return validate(context, request, { skipParams: true, skipBody: true, skipQuery: true }); + }); + } + function validateAsyncHeaders(validatePromise, context, request) { + return validatePromise.then((headersResult) => { + if (headersResult) { + return wrapValidationError(headersResult, "headers", context.schemaErrorFormatter); + } + return false; + }); + } + function wrapValidationError(result, dataVar, schemaErrorFormatter) { + if (result instanceof Error) { + result.statusCode = result.statusCode || 400; + result.code = result.code || "FST_ERR_VALIDATION"; + result.validationContext = result.validationContext || dataVar; + return result; + } + const error = schemaErrorFormatter(result, dataVar); + error.statusCode = error.statusCode || 400; + error.code = error.code || "FST_ERR_VALIDATION"; + error.validation = result; + error.validationContext = dataVar; + return error; + } + function getEssenceMediaType(header) { + if (!header) return ""; + return header.split(/[ ;]/, 1)[0].trim().toLowerCase(); + } + module2.exports = { + symbols: { bodySchema, querystringSchema, responseSchema, paramsSchema, headersSchema }, + compileSchemasForValidation, + compileSchemasForSerialization, + validate + }; + } +}); + +// node_modules/fastify/lib/wrapThenable.js +var require_wrapThenable = __commonJS({ + "node_modules/fastify/lib/wrapThenable.js"(exports2, module2) { + "use strict"; + var { + kReplyIsError, + kReplyHijacked + } = require_symbols2(); + var diagnostics = require("node:diagnostics_channel"); + var channels = diagnostics.tracingChannel("fastify.request.handler"); + function wrapThenable(thenable, reply, store) { + if (store) store.async = true; + thenable.then(function(payload) { + if (reply[kReplyHijacked] === true) { + return; + } + if (store) { + channels.asyncStart.publish(store); + } + try { + if (payload !== void 0 || // + reply.sent === false && // + reply.raw.headersSent === false && reply.request.raw.aborted === false && reply.request.socket && !reply.request.socket.destroyed) { + try { + reply.send(payload); + } catch (err) { + reply[kReplyIsError] = true; + reply.send(err); + } + } + } finally { + if (store) { + channels.asyncEnd.publish(store); + } + } + }, function(err) { + if (store) { + store.error = err; + channels.error.publish(store); + channels.asyncStart.publish(store); + } + try { + if (reply.sent === true) { + reply.log.error({ err }, "Promise errored, but reply.sent = true was set"); + return; + } + reply[kReplyIsError] = true; + reply.send(err); + } catch (err2) { + reply.send(err2); + } finally { + if (store) { + channels.asyncEnd.publish(store); + } + } + }); + } + module2.exports = wrapThenable; + } +}); + +// node_modules/fastify/lib/handleRequest.js +var require_handleRequest = __commonJS({ + "node_modules/fastify/lib/handleRequest.js"(exports2, module2) { + "use strict"; + var diagnostics = require("node:diagnostics_channel"); + var { validate: validateSchema } = require_validation(); + var { preValidationHookRunner, preHandlerHookRunner } = require_hooks(); + var wrapThenable = require_wrapThenable(); + var { + kReplyIsError, + kRouteContext, + kFourOhFourContext, + kSupportedHTTPMethods + } = require_symbols2(); + var channels = diagnostics.tracingChannel("fastify.request.handler"); + function handleRequest(err, request, reply) { + if (reply.sent === true) return; + if (err != null) { + reply[kReplyIsError] = true; + reply.send(err); + return; + } + const method = request.method; + if (this[kSupportedHTTPMethods].bodyless.has(method)) { + handler(request, reply); + return; + } + if (this[kSupportedHTTPMethods].bodywith.has(method)) { + const headers = request.headers; + const contentType = headers["content-type"]; + if (contentType === void 0) { + const contentLength = headers["content-length"]; + const transferEncoding = headers["transfer-encoding"]; + const isEmptyBody = transferEncoding === void 0 && (contentLength === void 0 || contentLength === "0"); + if (isEmptyBody) { + handler(request, reply); + return; + } + request[kRouteContext].contentTypeParser.run("", handler, request, reply); + return; + } + request[kRouteContext].contentTypeParser.run(contentType, handler, request, reply); + return; + } + handler(request, reply); + } + function handler(request, reply) { + try { + if (request[kRouteContext].preValidation !== null) { + preValidationHookRunner( + request[kRouteContext].preValidation, + request, + reply, + preValidationCallback + ); + } else { + preValidationCallback(null, request, reply); + } + } catch (err) { + preValidationCallback(err, request, reply); + } + } + function preValidationCallback(err, request, reply) { + if (reply.sent === true) return; + if (err != null) { + reply[kReplyIsError] = true; + reply.send(err); + return; + } + const validationErr = validateSchema(reply[kRouteContext], request); + const isAsync = validationErr && typeof validationErr.then === "function" || false; + if (isAsync) { + const cb = validationCompleted.bind(null, request, reply); + validationErr.then(cb, cb); + } else { + validationCompleted(request, reply, validationErr); + } + } + function validationCompleted(request, reply, validationErr) { + if (validationErr) { + if (reply[kRouteContext].attachValidation === false) { + reply.send(validationErr); + return; + } + reply.request.validationError = validationErr; + } + if (request[kRouteContext].preHandler !== null) { + preHandlerHookRunner( + request[kRouteContext].preHandler, + request, + reply, + preHandlerCallback + ); + } else { + preHandlerCallback(null, request, reply); + } + } + function preHandlerCallback(err, request, reply) { + if (reply.sent) return; + const context = request[kRouteContext]; + if (!channels.hasSubscribers || context[kFourOhFourContext] === null) { + preHandlerCallbackInner(err, request, reply); + } else { + const store = { + request, + reply, + async: false, + route: { + url: context.config.url, + method: context.config.method + } + }; + channels.start.runStores(store, preHandlerCallbackInner, void 0, err, request, reply, store); + } + } + function preHandlerCallbackInner(err, request, reply, store) { + const context = request[kRouteContext]; + try { + if (err != null) { + reply[kReplyIsError] = true; + reply.send(err); + if (store) { + store.error = err; + channels.error.publish(store); + } + return; + } + let result; + try { + result = context.handler(request, reply); + } catch (err2) { + if (store) { + store.error = err2; + channels.error.publish(store); + } + reply[kReplyIsError] = true; + reply.send(err2); + return; + } + if (result !== void 0) { + if (result !== null && typeof result.then === "function") { + wrapThenable(result, reply, store); + } else { + reply.send(result); + } + } + } finally { + if (store) channels.end.publish(store); + } + } + module2.exports = handleRequest; + module2.exports[Symbol.for("internals")] = { handler, preHandlerCallback }; + } +}); + +// node_modules/abstract-logging/index.js +var require_abstract_logging = __commonJS({ + "node_modules/abstract-logging/index.js"(exports2, module2) { + "use strict"; + function noop() { + } + var proto = { + fatal: noop, + error: noop, + warn: noop, + info: noop, + debug: noop, + trace: noop + }; + Object.defineProperty(module2, "exports", { + get() { + return Object.create(proto); + } + }); + } +}); + +// node_modules/pino-std-serializers/lib/err-helpers.js +var require_err_helpers = __commonJS({ + "node_modules/pino-std-serializers/lib/err-helpers.js"(exports2, module2) { + "use strict"; + var isErrorLike = (err) => { + return err && typeof err.message === "string"; + }; + var getErrorCause = (err) => { + if (!err) return; + const cause = err.cause; + if (typeof cause === "function") { + const causeResult = err.cause(); + return isErrorLike(causeResult) ? causeResult : void 0; + } else { + return isErrorLike(cause) ? cause : void 0; + } + }; + var _stackWithCauses = (err, seen) => { + if (!isErrorLike(err)) return ""; + const stack = err.stack || ""; + if (seen.has(err)) { + return stack + "\ncauses have become circular..."; + } + const cause = getErrorCause(err); + if (cause) { + seen.add(err); + return stack + "\ncaused by: " + _stackWithCauses(cause, seen); + } else { + return stack; + } + }; + var stackWithCauses = (err) => _stackWithCauses(err, /* @__PURE__ */ new Set()); + var _messageWithCauses = (err, seen, skip) => { + if (!isErrorLike(err)) return ""; + const message = skip ? "" : err.message || ""; + if (seen.has(err)) { + return message + ": ..."; + } + const cause = getErrorCause(err); + if (cause) { + seen.add(err); + const skipIfVErrorStyleCause = typeof err.cause === "function"; + return message + (skipIfVErrorStyleCause ? "" : ": ") + _messageWithCauses(cause, seen, skipIfVErrorStyleCause); + } else { + return message; + } + }; + var messageWithCauses = (err) => _messageWithCauses(err, /* @__PURE__ */ new Set()); + module2.exports = { + isErrorLike, + getErrorCause, + stackWithCauses, + messageWithCauses + }; + } +}); + +// node_modules/pino-std-serializers/lib/err-proto.js +var require_err_proto = __commonJS({ + "node_modules/pino-std-serializers/lib/err-proto.js"(exports2, module2) { + "use strict"; + var seen = Symbol("circular-ref-tag"); + var rawSymbol = Symbol("pino-raw-err-ref"); + var pinoErrProto = Object.create({}, { + type: { + enumerable: true, + writable: true, + value: void 0 + }, + message: { + enumerable: true, + writable: true, + value: void 0 + }, + stack: { + enumerable: true, + writable: true, + value: void 0 + }, + aggregateErrors: { + enumerable: true, + writable: true, + value: void 0 + }, + raw: { + enumerable: false, + get: function() { + return this[rawSymbol]; + }, + set: function(val) { + this[rawSymbol] = val; + } + } + }); + Object.defineProperty(pinoErrProto, rawSymbol, { + writable: true, + value: {} + }); + module2.exports = { + pinoErrProto, + pinoErrorSymbols: { + seen, + rawSymbol + } + }; + } +}); + +// node_modules/pino-std-serializers/lib/err.js +var require_err = __commonJS({ + "node_modules/pino-std-serializers/lib/err.js"(exports2, module2) { + "use strict"; + module2.exports = errSerializer; + var { messageWithCauses, stackWithCauses, isErrorLike } = require_err_helpers(); + var { pinoErrProto, pinoErrorSymbols } = require_err_proto(); + var { seen } = pinoErrorSymbols; + var { toString } = Object.prototype; + function errSerializer(err) { + if (!isErrorLike(err)) { + return err; + } + err[seen] = void 0; + const _err = Object.create(pinoErrProto); + _err.type = toString.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name; + _err.message = messageWithCauses(err); + _err.stack = stackWithCauses(err); + if (Array.isArray(err.errors)) { + _err.aggregateErrors = err.errors.map((err2) => errSerializer(err2)); + } + for (const key in err) { + if (_err[key] === void 0) { + const val = err[key]; + if (isErrorLike(val)) { + if (key !== "cause" && !Object.prototype.hasOwnProperty.call(val, seen)) { + _err[key] = errSerializer(val); + } + } else { + _err[key] = val; + } + } + } + delete err[seen]; + _err.raw = err; + return _err; + } + } +}); + +// node_modules/pino-std-serializers/lib/err-with-cause.js +var require_err_with_cause = __commonJS({ + "node_modules/pino-std-serializers/lib/err-with-cause.js"(exports2, module2) { + "use strict"; + module2.exports = errWithCauseSerializer; + var { isErrorLike } = require_err_helpers(); + var { pinoErrProto, pinoErrorSymbols } = require_err_proto(); + var { seen } = pinoErrorSymbols; + var { toString } = Object.prototype; + function errWithCauseSerializer(err) { + if (!isErrorLike(err)) { + return err; + } + err[seen] = void 0; + const _err = Object.create(pinoErrProto); + _err.type = toString.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name; + _err.message = err.message; + _err.stack = err.stack; + if (Array.isArray(err.errors)) { + _err.aggregateErrors = err.errors.map((err2) => errWithCauseSerializer(err2)); + } + if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) { + _err.cause = errWithCauseSerializer(err.cause); + } + for (const key in err) { + if (_err[key] === void 0) { + const val = err[key]; + if (isErrorLike(val)) { + if (!Object.prototype.hasOwnProperty.call(val, seen)) { + _err[key] = errWithCauseSerializer(val); + } + } else { + _err[key] = val; + } + } + } + delete err[seen]; + _err.raw = err; + return _err; + } + } +}); + +// node_modules/pino-std-serializers/lib/req.js +var require_req = __commonJS({ + "node_modules/pino-std-serializers/lib/req.js"(exports2, module2) { + "use strict"; + module2.exports = { + mapHttpRequest, + reqSerializer + }; + var rawSymbol = Symbol("pino-raw-req-ref"); + var pinoReqProto = Object.create({}, { + id: { + enumerable: true, + writable: true, + value: "" + }, + method: { + enumerable: true, + writable: true, + value: "" + }, + url: { + enumerable: true, + writable: true, + value: "" + }, + query: { + enumerable: true, + writable: true, + value: "" + }, + params: { + enumerable: true, + writable: true, + value: "" + }, + headers: { + enumerable: true, + writable: true, + value: {} + }, + remoteAddress: { + enumerable: true, + writable: true, + value: "" + }, + remotePort: { + enumerable: true, + writable: true, + value: "" + }, + raw: { + enumerable: false, + get: function() { + return this[rawSymbol]; + }, + set: function(val) { + this[rawSymbol] = val; + } + } + }); + Object.defineProperty(pinoReqProto, rawSymbol, { + writable: true, + value: {} + }); + function reqSerializer(req) { + const connection = req.info || req.socket; + const _req = Object.create(pinoReqProto); + _req.id = typeof req.id === "function" ? req.id() : req.id || (req.info ? req.info.id : void 0); + _req.method = req.method; + if (req.originalUrl) { + _req.url = req.originalUrl; + } else { + const path7 = req.path; + _req.url = typeof path7 === "string" ? path7 : req.url ? req.url.path || req.url : void 0; + } + if (req.query) { + _req.query = req.query; + } + if (req.params) { + _req.params = req.params; + } + _req.headers = req.headers; + _req.remoteAddress = connection && connection.remoteAddress; + _req.remotePort = connection && connection.remotePort; + _req.raw = req.raw || req; + return _req; + } + function mapHttpRequest(req) { + return { + req: reqSerializer(req) + }; + } + } +}); + +// node_modules/pino-std-serializers/lib/res.js +var require_res = __commonJS({ + "node_modules/pino-std-serializers/lib/res.js"(exports2, module2) { + "use strict"; + module2.exports = { + mapHttpResponse, + resSerializer + }; + var rawSymbol = Symbol("pino-raw-res-ref"); + var pinoResProto = Object.create({}, { + statusCode: { + enumerable: true, + writable: true, + value: 0 + }, + headers: { + enumerable: true, + writable: true, + value: "" + }, + raw: { + enumerable: false, + get: function() { + return this[rawSymbol]; + }, + set: function(val) { + this[rawSymbol] = val; + } + } + }); + Object.defineProperty(pinoResProto, rawSymbol, { + writable: true, + value: {} + }); + function resSerializer(res) { + const _res = Object.create(pinoResProto); + _res.statusCode = res.headersSent ? res.statusCode : null; + _res.headers = res.getHeaders ? res.getHeaders() : res._headers; + _res.raw = res; + return _res; + } + function mapHttpResponse(res) { + return { + res: resSerializer(res) + }; + } + } +}); + +// node_modules/pino-std-serializers/index.js +var require_pino_std_serializers = __commonJS({ + "node_modules/pino-std-serializers/index.js"(exports2, module2) { + "use strict"; + var errSerializer = require_err(); + var errWithCauseSerializer = require_err_with_cause(); + var reqSerializers = require_req(); + var resSerializers = require_res(); + module2.exports = { + err: errSerializer, + errWithCause: errWithCauseSerializer, + mapHttpRequest: reqSerializers.mapHttpRequest, + mapHttpResponse: resSerializers.mapHttpResponse, + req: reqSerializers.reqSerializer, + res: resSerializers.resSerializer, + wrapErrorSerializer: function wrapErrorSerializer(customSerializer) { + if (customSerializer === errSerializer) return customSerializer; + return function wrapErrSerializer(err) { + return customSerializer(errSerializer(err)); + }; + }, + wrapRequestSerializer: function wrapRequestSerializer(customSerializer) { + if (customSerializer === reqSerializers.reqSerializer) return customSerializer; + return function wrappedReqSerializer(req) { + return customSerializer(reqSerializers.reqSerializer(req)); + }; + }, + wrapResponseSerializer: function wrapResponseSerializer(customSerializer) { + if (customSerializer === resSerializers.resSerializer) return customSerializer; + return function wrappedResSerializer(res) { + return customSerializer(resSerializers.resSerializer(res)); + }; + } + }; + } +}); + +// node_modules/pino/lib/caller.js +var require_caller = __commonJS({ + "node_modules/pino/lib/caller.js"(exports2, module2) { + "use strict"; + function noOpPrepareStackTrace(_, stack) { + return stack; + } + module2.exports = function getCallers() { + const originalPrepare = Error.prepareStackTrace; + Error.prepareStackTrace = noOpPrepareStackTrace; + const stack = new Error().stack; + Error.prepareStackTrace = originalPrepare; + if (!Array.isArray(stack)) { + return void 0; + } + const entries = stack.slice(2); + const fileNames = []; + for (const entry of entries) { + if (!entry) { + continue; + } + fileNames.push(entry.getFileName()); + } + return fileNames; + }; + } +}); + +// node_modules/fast-redact/lib/validator.js +var require_validator = __commonJS({ + "node_modules/fast-redact/lib/validator.js"(exports2, module2) { + "use strict"; + module2.exports = validator; + function validator(opts = {}) { + const { + ERR_PATHS_MUST_BE_STRINGS = () => "fast-redact - Paths must be (non-empty) strings", + ERR_INVALID_PATH = (s) => `fast-redact \u2013 Invalid path (${s})` + } = opts; + return function validate({ paths }) { + paths.forEach((s) => { + if (typeof s !== "string") { + throw Error(ERR_PATHS_MUST_BE_STRINGS()); + } + try { + if (/〇/.test(s)) throw Error(); + const expr = (s[0] === "[" ? "" : ".") + s.replace(/^\*/, "\u3007").replace(/\.\*/g, ".\u3007").replace(/\[\*\]/g, "[\u3007]"); + if (/\n|\r|;/.test(expr)) throw Error(); + if (/\/\*/.test(expr)) throw Error(); + Function(` + 'use strict' + const o = new Proxy({}, { get: () => o, set: () => { throw Error() } }); + const \u3007 = null; + o${expr} + if ([o${expr}].length !== 1) throw Error()`)(); + } catch (e) { + throw Error(ERR_INVALID_PATH(s)); + } + }); + }; + } + } +}); + +// node_modules/fast-redact/lib/rx.js +var require_rx = __commonJS({ + "node_modules/fast-redact/lib/rx.js"(exports2, module2) { + "use strict"; + module2.exports = /[^.[\]]+|\[((?:.)*?)\]/g; + } +}); + +// node_modules/fast-redact/lib/parse.js +var require_parse2 = __commonJS({ + "node_modules/fast-redact/lib/parse.js"(exports2, module2) { + "use strict"; + var rx = require_rx(); + module2.exports = parse; + function parse({ paths }) { + const wildcards = []; + var wcLen = 0; + const secret = paths.reduce(function(o, strPath, ix) { + var path7 = strPath.match(rx).map((p) => p.replace(/'|"|`/g, "")); + const leadingBracket = strPath[0] === "["; + path7 = path7.map((p) => { + if (p[0] === "[") return p.substr(1, p.length - 2); + else return p; + }); + const star = path7.indexOf("*"); + if (star > -1) { + const before = path7.slice(0, star); + const beforeStr = before.join("."); + const after = path7.slice(star + 1, path7.length); + const nested = after.length > 0; + wcLen++; + wildcards.push({ + before, + beforeStr, + after, + nested + }); + } else { + o[strPath] = { + path: path7, + val: void 0, + precensored: false, + circle: "", + escPath: JSON.stringify(strPath), + leadingBracket + }; + } + return o; + }, {}); + return { wildcards, wcLen, secret }; + } + } +}); + +// node_modules/fast-redact/lib/redactor.js +var require_redactor = __commonJS({ + "node_modules/fast-redact/lib/redactor.js"(exports2, module2) { + "use strict"; + var rx = require_rx(); + module2.exports = redactor; + function redactor({ secret, serialize, wcLen, strict, isCensorFct, censorFctTakesPath }, state) { + const redact = Function("o", ` + if (typeof o !== 'object' || o == null) { + ${strictImpl(strict, serialize)} + } + const { censor, secret } = this + const originalSecret = {} + const secretKeys = Object.keys(secret) + for (var i = 0; i < secretKeys.length; i++) { + originalSecret[secretKeys[i]] = secret[secretKeys[i]] + } + + ${redactTmpl(secret, isCensorFct, censorFctTakesPath)} + this.compileRestore() + ${dynamicRedactTmpl(wcLen > 0, isCensorFct, censorFctTakesPath)} + this.secret = originalSecret + ${resultTmpl(serialize)} + `).bind(state); + redact.state = state; + if (serialize === false) { + redact.restore = (o) => state.restore(o); + } + return redact; + } + function redactTmpl(secret, isCensorFct, censorFctTakesPath) { + return Object.keys(secret).map((path7) => { + const { escPath, leadingBracket, path: arrPath } = secret[path7]; + const skip = leadingBracket ? 1 : 0; + const delim = leadingBracket ? "" : "."; + const hops = []; + var match; + while ((match = rx.exec(path7)) !== null) { + const [, ix] = match; + const { index, input } = match; + if (index > skip) hops.push(input.substring(0, index - (ix ? 0 : 1))); + } + var existence = hops.map((p) => `o${delim}${p}`).join(" && "); + if (existence.length === 0) existence += `o${delim}${path7} != null`; + else existence += ` && o${delim}${path7} != null`; + const circularDetection = ` + switch (true) { + ${hops.reverse().map((p) => ` + case o${delim}${p} === censor: + secret[${escPath}].circle = ${JSON.stringify(p)} + break + `).join("\n")} + } + `; + const censorArgs = censorFctTakesPath ? `val, ${JSON.stringify(arrPath)}` : `val`; + return ` + if (${existence}) { + const val = o${delim}${path7} + if (val === censor) { + secret[${escPath}].precensored = true + } else { + secret[${escPath}].val = val + o${delim}${path7} = ${isCensorFct ? `censor(${censorArgs})` : "censor"} + ${circularDetection} + } + } + `; + }).join("\n"); + } + function dynamicRedactTmpl(hasWildcards, isCensorFct, censorFctTakesPath) { + return hasWildcards === true ? ` + { + const { wildcards, wcLen, groupRedact, nestedRedact } = this + for (var i = 0; i < wcLen; i++) { + const { before, beforeStr, after, nested } = wildcards[i] + if (nested === true) { + secret[beforeStr] = secret[beforeStr] || [] + nestedRedact(secret[beforeStr], o, before, after, censor, ${isCensorFct}, ${censorFctTakesPath}) + } else secret[beforeStr] = groupRedact(o, before, censor, ${isCensorFct}, ${censorFctTakesPath}) + } + } + ` : ""; + } + function resultTmpl(serialize) { + return serialize === false ? `return o` : ` + var s = this.serialize(o) + this.restore(o) + return s + `; + } + function strictImpl(strict, serialize) { + return strict === true ? `throw Error('fast-redact: primitives cannot be redacted')` : serialize === false ? `return o` : `return this.serialize(o)`; + } + } +}); + +// node_modules/fast-redact/lib/modifiers.js +var require_modifiers = __commonJS({ + "node_modules/fast-redact/lib/modifiers.js"(exports2, module2) { + "use strict"; + module2.exports = { + groupRedact, + groupRestore, + nestedRedact, + nestedRestore + }; + function groupRestore({ keys, values, target }) { + if (target == null || typeof target === "string") return; + const length = keys.length; + for (var i = 0; i < length; i++) { + const k = keys[i]; + target[k] = values[i]; + } + } + function groupRedact(o, path7, censor, isCensorFct, censorFctTakesPath) { + const target = get(o, path7); + if (target == null || typeof target === "string") return { keys: null, values: null, target, flat: true }; + const keys = Object.keys(target); + const keysLength = keys.length; + const pathLength = path7.length; + const pathWithKey = censorFctTakesPath ? [...path7] : void 0; + const values = new Array(keysLength); + for (var i = 0; i < keysLength; i++) { + const key = keys[i]; + values[i] = target[key]; + if (censorFctTakesPath) { + pathWithKey[pathLength] = key; + target[key] = censor(target[key], pathWithKey); + } else if (isCensorFct) { + target[key] = censor(target[key]); + } else { + target[key] = censor; + } + } + return { keys, values, target, flat: true }; + } + function nestedRestore(instructions) { + for (let i = 0; i < instructions.length; i++) { + const { target, path: path7, value } = instructions[i]; + let current = target; + for (let i2 = path7.length - 1; i2 > 0; i2--) { + current = current[path7[i2]]; + } + current[path7[0]] = value; + } + } + function nestedRedact(store, o, path7, ns, censor, isCensorFct, censorFctTakesPath) { + const target = get(o, path7); + if (target == null) return; + const keys = Object.keys(target); + const keysLength = keys.length; + for (var i = 0; i < keysLength; i++) { + const key = keys[i]; + specialSet(store, target, key, path7, ns, censor, isCensorFct, censorFctTakesPath); + } + return store; + } + function has(obj, prop) { + return obj !== void 0 && obj !== null ? "hasOwn" in Object ? Object.hasOwn(obj, prop) : Object.prototype.hasOwnProperty.call(obj, prop) : false; + } + function specialSet(store, o, k, path7, afterPath, censor, isCensorFct, censorFctTakesPath) { + const afterPathLen = afterPath.length; + const lastPathIndex = afterPathLen - 1; + const originalKey = k; + var i = -1; + var n; + var nv; + var ov; + var oov = null; + var wc = null; + var kIsWc; + var wcov; + var consecutive = false; + var level = 0; + var depth = 0; + var redactPathCurrent = tree(); + ov = n = o[k]; + if (typeof n !== "object") return; + while (n != null && ++i < afterPathLen) { + depth += 1; + k = afterPath[i]; + oov = ov; + if (k !== "*" && !wc && !(typeof n === "object" && k in n)) { + break; + } + if (k === "*") { + if (wc === "*") { + consecutive = true; + } + wc = k; + if (i !== lastPathIndex) { + continue; + } + } + if (wc) { + const wcKeys = Object.keys(n); + for (var j = 0; j < wcKeys.length; j++) { + const wck = wcKeys[j]; + wcov = n[wck]; + kIsWc = k === "*"; + if (consecutive) { + redactPathCurrent = node(redactPathCurrent, wck, depth); + level = i; + ov = iterateNthLevel(wcov, level - 1, k, path7, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, o[originalKey], depth + 1); + } else { + if (kIsWc || typeof wcov === "object" && wcov !== null && k in wcov) { + if (kIsWc) { + ov = wcov; + } else { + ov = wcov[k]; + } + nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path7, originalKey, ...afterPath]) : censor(ov) : censor; + if (kIsWc) { + const rv = restoreInstr(node(redactPathCurrent, wck, depth), ov, o[originalKey]); + store.push(rv); + n[wck] = nv; + } else { + if (wcov[k] === nv) { + } else if (nv === void 0 && censor !== void 0 || has(wcov, k) && nv === ov) { + redactPathCurrent = node(redactPathCurrent, wck, depth); + } else { + redactPathCurrent = node(redactPathCurrent, wck, depth); + const rv = restoreInstr(node(redactPathCurrent, k, depth + 1), ov, o[originalKey]); + store.push(rv); + wcov[k] = nv; + } + } + } + } + } + wc = null; + } else { + ov = n[k]; + redactPathCurrent = node(redactPathCurrent, k, depth); + nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path7, originalKey, ...afterPath]) : censor(ov) : censor; + if (has(n, k) && nv === ov || nv === void 0 && censor !== void 0) { + } else { + const rv = restoreInstr(redactPathCurrent, ov, o[originalKey]); + store.push(rv); + n[k] = nv; + } + n = n[k]; + } + if (typeof n !== "object") break; + if (ov === oov || typeof ov === "undefined") { + } + } + } + function get(o, p) { + var i = -1; + var l = p.length; + var n = o; + while (n != null && ++i < l) { + n = n[p[i]]; + } + return n; + } + function iterateNthLevel(wcov, level, k, path7, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth) { + if (level === 0) { + if (kIsWc || typeof wcov === "object" && wcov !== null && k in wcov) { + if (kIsWc) { + ov = wcov; + } else { + ov = wcov[k]; + } + nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path7, originalKey, ...afterPath]) : censor(ov) : censor; + if (kIsWc) { + const rv = restoreInstr(redactPathCurrent, ov, parent); + store.push(rv); + n[wck] = nv; + } else { + if (wcov[k] === nv) { + } else if (nv === void 0 && censor !== void 0 || has(wcov, k) && nv === ov) { + } else { + const rv = restoreInstr(node(redactPathCurrent, k, depth + 1), ov, parent); + store.push(rv); + wcov[k] = nv; + } + } + } + } + for (const key in wcov) { + if (typeof wcov[key] === "object") { + redactPathCurrent = node(redactPathCurrent, key, depth); + iterateNthLevel(wcov[key], level - 1, k, path7, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth + 1); + } + } + } + function tree() { + return { parent: null, key: null, children: [], depth: 0 }; + } + function node(parent, key, depth) { + if (parent.depth === depth) { + return node(parent.parent, key, depth); + } + var child = { + parent, + key, + depth, + children: [] + }; + parent.children.push(child); + return child; + } + function restoreInstr(node2, value, target) { + let current = node2; + const path7 = []; + do { + path7.push(current.key); + current = current.parent; + } while (current.parent != null); + return { path: path7, value, target }; + } + } +}); + +// node_modules/fast-redact/lib/restorer.js +var require_restorer = __commonJS({ + "node_modules/fast-redact/lib/restorer.js"(exports2, module2) { + "use strict"; + var { groupRestore, nestedRestore } = require_modifiers(); + module2.exports = restorer; + function restorer() { + return function compileRestore() { + if (this.restore) { + this.restore.state.secret = this.secret; + return; + } + const { secret, wcLen } = this; + const paths = Object.keys(secret); + const resetters = resetTmpl(secret, paths); + const hasWildcards = wcLen > 0; + const state = hasWildcards ? { secret, groupRestore, nestedRestore } : { secret }; + this.restore = Function( + "o", + restoreTmpl(resetters, paths, hasWildcards) + ).bind(state); + this.restore.state = state; + }; + } + function resetTmpl(secret, paths) { + return paths.map((path7) => { + const { circle, escPath, leadingBracket } = secret[path7]; + const delim = leadingBracket ? "" : "."; + const reset = circle ? `o.${circle} = secret[${escPath}].val` : `o${delim}${path7} = secret[${escPath}].val`; + const clear = `secret[${escPath}].val = undefined`; + return ` + if (secret[${escPath}].val !== undefined) { + try { ${reset} } catch (e) {} + ${clear} + } + `; + }).join(""); + } + function restoreTmpl(resetters, paths, hasWildcards) { + const dynamicReset = hasWildcards === true ? ` + const keys = Object.keys(secret) + const len = keys.length + for (var i = len - 1; i >= ${paths.length}; i--) { + const k = keys[i] + const o = secret[k] + if (o) { + if (o.flat === true) this.groupRestore(o) + else this.nestedRestore(o) + secret[k] = null + } + } + ` : ""; + return ` + const secret = this.secret + ${dynamicReset} + ${resetters} + return o + `; + } + } +}); + +// node_modules/fast-redact/lib/state.js +var require_state = __commonJS({ + "node_modules/fast-redact/lib/state.js"(exports2, module2) { + "use strict"; + module2.exports = state; + function state(o) { + const { + secret, + censor, + compileRestore, + serialize, + groupRedact, + nestedRedact, + wildcards, + wcLen + } = o; + const builder = [{ secret, censor, compileRestore }]; + if (serialize !== false) builder.push({ serialize }); + if (wcLen > 0) builder.push({ groupRedact, nestedRedact, wildcards, wcLen }); + return Object.assign(...builder); + } + } +}); + +// node_modules/fast-redact/index.js +var require_fast_redact = __commonJS({ + "node_modules/fast-redact/index.js"(exports2, module2) { + "use strict"; + var validator = require_validator(); + var parse = require_parse2(); + var redactor = require_redactor(); + var restorer = require_restorer(); + var { groupRedact, nestedRedact } = require_modifiers(); + var state = require_state(); + var rx = require_rx(); + var validate = validator(); + var noop = (o) => o; + noop.restore = noop; + var DEFAULT_CENSOR = "[REDACTED]"; + fastRedact.rx = rx; + fastRedact.validator = validator; + module2.exports = fastRedact; + function fastRedact(opts = {}) { + const paths = Array.from(new Set(opts.paths || [])); + const serialize = "serialize" in opts ? opts.serialize === false ? opts.serialize : typeof opts.serialize === "function" ? opts.serialize : JSON.stringify : JSON.stringify; + const remove = opts.remove; + if (remove === true && serialize !== JSON.stringify) { + throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify"); + } + const censor = remove === true ? void 0 : "censor" in opts ? opts.censor : DEFAULT_CENSOR; + const isCensorFct = typeof censor === "function"; + const censorFctTakesPath = isCensorFct && censor.length > 1; + if (paths.length === 0) return serialize || noop; + validate({ paths, serialize, censor }); + const { wildcards, wcLen, secret } = parse({ paths, censor }); + const compileRestore = restorer(); + const strict = "strict" in opts ? opts.strict : true; + return redactor({ secret, wcLen, serialize, strict, isCensorFct, censorFctTakesPath }, state({ + secret, + censor, + compileRestore, + serialize, + groupRedact, + nestedRedact, + wildcards, + wcLen + })); + } + } +}); + +// node_modules/pino/lib/symbols.js +var require_symbols3 = __commonJS({ + "node_modules/pino/lib/symbols.js"(exports2, module2) { + "use strict"; + var setLevelSym = Symbol("pino.setLevel"); + var getLevelSym = Symbol("pino.getLevel"); + var levelValSym = Symbol("pino.levelVal"); + var levelCompSym = Symbol("pino.levelComp"); + var useLevelLabelsSym = Symbol("pino.useLevelLabels"); + var useOnlyCustomLevelsSym = Symbol("pino.useOnlyCustomLevels"); + var mixinSym = Symbol("pino.mixin"); + var lsCacheSym = Symbol("pino.lsCache"); + var chindingsSym = Symbol("pino.chindings"); + var asJsonSym = Symbol("pino.asJson"); + var writeSym = Symbol("pino.write"); + var redactFmtSym = Symbol("pino.redactFmt"); + var timeSym = Symbol("pino.time"); + var timeSliceIndexSym = Symbol("pino.timeSliceIndex"); + var streamSym = Symbol("pino.stream"); + var stringifySym = Symbol("pino.stringify"); + var stringifySafeSym = Symbol("pino.stringifySafe"); + var stringifiersSym = Symbol("pino.stringifiers"); + var endSym = Symbol("pino.end"); + var formatOptsSym = Symbol("pino.formatOpts"); + var messageKeySym = Symbol("pino.messageKey"); + var errorKeySym = Symbol("pino.errorKey"); + var nestedKeySym = Symbol("pino.nestedKey"); + var nestedKeyStrSym = Symbol("pino.nestedKeyStr"); + var mixinMergeStrategySym = Symbol("pino.mixinMergeStrategy"); + var msgPrefixSym = Symbol("pino.msgPrefix"); + var wildcardFirstSym = Symbol("pino.wildcardFirst"); + var serializersSym = Symbol.for("pino.serializers"); + var formattersSym = Symbol.for("pino.formatters"); + var hooksSym = Symbol.for("pino.hooks"); + var needsMetadataGsym = Symbol.for("pino.metadata"); + module2.exports = { + setLevelSym, + getLevelSym, + levelValSym, + levelCompSym, + useLevelLabelsSym, + mixinSym, + lsCacheSym, + chindingsSym, + asJsonSym, + writeSym, + serializersSym, + redactFmtSym, + timeSym, + timeSliceIndexSym, + streamSym, + stringifySym, + stringifySafeSym, + stringifiersSym, + endSym, + formatOptsSym, + messageKeySym, + errorKeySym, + nestedKeySym, + wildcardFirstSym, + needsMetadataGsym, + useOnlyCustomLevelsSym, + formattersSym, + hooksSym, + nestedKeyStrSym, + mixinMergeStrategySym, + msgPrefixSym + }; + } +}); + +// node_modules/pino/lib/redaction.js +var require_redaction = __commonJS({ + "node_modules/pino/lib/redaction.js"(exports2, module2) { + "use strict"; + var fastRedact = require_fast_redact(); + var { redactFmtSym, wildcardFirstSym } = require_symbols3(); + var { rx, validator } = fastRedact; + var validate = validator({ + ERR_PATHS_MUST_BE_STRINGS: () => "pino \u2013 redacted paths must be strings", + ERR_INVALID_PATH: (s) => `pino \u2013 redact paths array contains an invalid path (${s})` + }); + var CENSOR = "[Redacted]"; + var strict = false; + function redaction(opts, serialize) { + const { paths, censor } = handle(opts); + const shape = paths.reduce((o, str) => { + rx.lastIndex = 0; + const first = rx.exec(str); + const next = rx.exec(str); + let ns = first[1] !== void 0 ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0]; + if (ns === "*") { + ns = wildcardFirstSym; + } + if (next === null) { + o[ns] = null; + return o; + } + if (o[ns] === null) { + return o; + } + const { index } = next; + const nextPath = `${str.substr(index, str.length - 1)}`; + o[ns] = o[ns] || []; + if (ns !== wildcardFirstSym && o[ns].length === 0) { + o[ns].push(...o[wildcardFirstSym] || []); + } + if (ns === wildcardFirstSym) { + Object.keys(o).forEach(function(k) { + if (o[k]) { + o[k].push(nextPath); + } + }); + } + o[ns].push(nextPath); + return o; + }, {}); + const result = { + [redactFmtSym]: fastRedact({ paths, censor, serialize, strict }) + }; + const topCensor = (...args) => { + return typeof censor === "function" ? serialize(censor(...args)) : serialize(censor); + }; + return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => { + if (shape[k] === null) { + o[k] = (value) => topCensor(value, [k]); + } else { + const wrappedCensor = typeof censor === "function" ? (value, path7) => { + return censor(value, [k, ...path7]); + } : censor; + o[k] = fastRedact({ + paths: shape[k], + censor: wrappedCensor, + serialize, + strict + }); + } + return o; + }, result); + } + function handle(opts) { + if (Array.isArray(opts)) { + opts = { paths: opts, censor: CENSOR }; + validate(opts); + return opts; + } + let { paths, censor = CENSOR, remove } = opts; + if (Array.isArray(paths) === false) { + throw Error("pino \u2013 redact must contain an array of strings"); + } + if (remove === true) censor = void 0; + validate({ paths, censor }); + return { paths, censor }; + } + module2.exports = redaction; + } +}); + +// node_modules/pino/lib/time.js +var require_time = __commonJS({ + "node_modules/pino/lib/time.js"(exports2, module2) { + "use strict"; + var nullTime = () => ""; + var epochTime = () => `,"time":${Date.now()}`; + var unixTime = () => `,"time":${Math.round(Date.now() / 1e3)}`; + var isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"`; + module2.exports = { nullTime, epochTime, unixTime, isoTime }; + } +}); + +// node_modules/quick-format-unescaped/index.js +var require_quick_format_unescaped = __commonJS({ + "node_modules/quick-format-unescaped/index.js"(exports2, module2) { + "use strict"; + function tryStringify(o) { + try { + return JSON.stringify(o); + } catch (e) { + return '"[Circular]"'; + } + } + module2.exports = format; + function format(f, args, opts) { + var ss = opts && opts.stringify || tryStringify; + var offset = 1; + if (typeof f === "object" && f !== null) { + var len = args.length + offset; + if (len === 1) return f; + var objects = new Array(len); + objects[0] = ss(f); + for (var index = 1; index < len; index++) { + objects[index] = ss(args[index]); + } + return objects.join(" "); + } + if (typeof f !== "string") { + return f; + } + var argLen = args.length; + if (argLen === 0) return f; + var str = ""; + var a = 1 - offset; + var lastPos = -1; + var flen = f && f.length || 0; + for (var i = 0; i < flen; ) { + if (f.charCodeAt(i) === 37 && i + 1 < flen) { + lastPos = lastPos > -1 ? lastPos : 0; + switch (f.charCodeAt(i + 1)) { + case 100: + // 'd' + case 102: + if (a >= argLen) + break; + if (args[a] == null) break; + if (lastPos < i) + str += f.slice(lastPos, i); + str += Number(args[a]); + lastPos = i + 2; + i++; + break; + case 105: + if (a >= argLen) + break; + if (args[a] == null) break; + if (lastPos < i) + str += f.slice(lastPos, i); + str += Math.floor(Number(args[a])); + lastPos = i + 2; + i++; + break; + case 79: + // 'O' + case 111: + // 'o' + case 106: + if (a >= argLen) + break; + if (args[a] === void 0) break; + if (lastPos < i) + str += f.slice(lastPos, i); + var type = typeof args[a]; + if (type === "string") { + str += "'" + args[a] + "'"; + lastPos = i + 2; + i++; + break; + } + if (type === "function") { + str += args[a].name || ""; + lastPos = i + 2; + i++; + break; + } + str += ss(args[a]); + lastPos = i + 2; + i++; + break; + case 115: + if (a >= argLen) + break; + if (lastPos < i) + str += f.slice(lastPos, i); + str += String(args[a]); + lastPos = i + 2; + i++; + break; + case 37: + if (lastPos < i) + str += f.slice(lastPos, i); + str += "%"; + lastPos = i + 2; + i++; + a--; + break; + } + ++a; + } + ++i; + } + if (lastPos === -1) + return f; + else if (lastPos < flen) { + str += f.slice(lastPos); + } + return str; + } + } +}); + +// node_modules/atomic-sleep/index.js +var require_atomic_sleep = __commonJS({ + "node_modules/atomic-sleep/index.js"(exports2, module2) { + "use strict"; + if (typeof SharedArrayBuffer !== "undefined" && typeof Atomics !== "undefined") { + let sleep = function(ms) { + const valid = ms > 0 && ms < Infinity; + if (valid === false) { + if (typeof ms !== "number" && typeof ms !== "bigint") { + throw TypeError("sleep: ms must be a number"); + } + throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity"); + } + Atomics.wait(nil, 0, 0, Number(ms)); + }; + const nil = new Int32Array(new SharedArrayBuffer(4)); + module2.exports = sleep; + } else { + let sleep = function(ms) { + const valid = ms > 0 && ms < Infinity; + if (valid === false) { + if (typeof ms !== "number" && typeof ms !== "bigint") { + throw TypeError("sleep: ms must be a number"); + } + throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity"); + } + const target = Date.now() + Number(ms); + while (target > Date.now()) { + } + }; + module2.exports = sleep; + } + } +}); + +// node_modules/sonic-boom/index.js +var require_sonic_boom = __commonJS({ + "node_modules/sonic-boom/index.js"(exports2, module2) { + "use strict"; + var fs7 = require("fs"); + var EventEmitter = require("events"); + var inherits = require("util").inherits; + var path7 = require("path"); + var sleep = require_atomic_sleep(); + var assert = require("assert"); + var BUSY_WRITE_TIMEOUT = 100; + var kEmptyBuffer = Buffer.allocUnsafe(0); + var MAX_WRITE = 16 * 1024; + var kContentModeBuffer = "buffer"; + var kContentModeUtf8 = "utf8"; + var [major, minor] = (process.versions.node || "0.0").split(".").map(Number); + var kCopyBuffer = major >= 22 && minor >= 7; + function openFile(file, sonic) { + sonic._opening = true; + sonic._writing = true; + sonic._asyncDrainScheduled = false; + function fileOpened(err, fd) { + if (err) { + sonic._reopening = false; + sonic._writing = false; + sonic._opening = false; + if (sonic.sync) { + process.nextTick(() => { + if (sonic.listenerCount("error") > 0) { + sonic.emit("error", err); + } + }); + } else { + sonic.emit("error", err); + } + return; + } + const reopening = sonic._reopening; + sonic.fd = fd; + sonic.file = file; + sonic._reopening = false; + sonic._opening = false; + sonic._writing = false; + if (sonic.sync) { + process.nextTick(() => sonic.emit("ready")); + } else { + sonic.emit("ready"); + } + if (sonic.destroyed) { + return; + } + if (!sonic._writing && sonic._len > sonic.minLength || sonic._flushPending) { + sonic._actualWrite(); + } else if (reopening) { + process.nextTick(() => sonic.emit("drain")); + } + } + const flags = sonic.append ? "a" : "w"; + const mode = sonic.mode; + if (sonic.sync) { + try { + if (sonic.mkdir) fs7.mkdirSync(path7.dirname(file), { recursive: true }); + const fd = fs7.openSync(file, flags, mode); + fileOpened(null, fd); + } catch (err) { + fileOpened(err); + throw err; + } + } else if (sonic.mkdir) { + fs7.mkdir(path7.dirname(file), { recursive: true }, (err) => { + if (err) return fileOpened(err); + fs7.open(file, flags, mode, fileOpened); + }); + } else { + fs7.open(file, flags, mode, fileOpened); + } + } + function SonicBoom(opts) { + if (!(this instanceof SonicBoom)) { + return new SonicBoom(opts); + } + let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir: mkdir2, retryEAGAIN, fsync, contentMode, mode } = opts || {}; + fd = fd || dest; + this._len = 0; + this.fd = -1; + this._bufs = []; + this._lens = []; + this._writing = false; + this._ending = false; + this._reopening = false; + this._asyncDrainScheduled = false; + this._flushPending = false; + this._hwm = Math.max(minLength || 0, 16387); + this.file = null; + this.destroyed = false; + this.minLength = minLength || 0; + this.maxLength = maxLength || 0; + this.maxWrite = maxWrite || MAX_WRITE; + this._periodicFlush = periodicFlush || 0; + this._periodicFlushTimer = void 0; + this.sync = sync || false; + this.writable = true; + this._fsync = fsync || false; + this.append = append || false; + this.mode = mode; + this.retryEAGAIN = retryEAGAIN || (() => true); + this.mkdir = mkdir2 || false; + let fsWriteSync; + let fsWrite; + if (contentMode === kContentModeBuffer) { + this._writingBuf = kEmptyBuffer; + this.write = writeBuffer; + this.flush = flushBuffer; + this.flushSync = flushBufferSync; + this._actualWrite = actualWriteBuffer; + fsWriteSync = () => fs7.writeSync(this.fd, this._writingBuf); + fsWrite = () => fs7.write(this.fd, this._writingBuf, this.release); + } else if (contentMode === void 0 || contentMode === kContentModeUtf8) { + this._writingBuf = ""; + this.write = write; + this.flush = flush; + this.flushSync = flushSync; + this._actualWrite = actualWrite; + fsWriteSync = () => fs7.writeSync(this.fd, this._writingBuf, "utf8"); + fsWrite = () => fs7.write(this.fd, this._writingBuf, "utf8", this.release); + } else { + throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`); + } + if (typeof fd === "number") { + this.fd = fd; + process.nextTick(() => this.emit("ready")); + } else if (typeof fd === "string") { + openFile(fd, this); + } else { + throw new Error("SonicBoom supports only file descriptors and files"); + } + if (this.minLength >= this.maxWrite) { + throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`); + } + this.release = (err, n) => { + if (err) { + if ((err.code === "EAGAIN" || err.code === "EBUSY") && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) { + if (this.sync) { + try { + sleep(BUSY_WRITE_TIMEOUT); + this.release(void 0, 0); + } catch (err2) { + this.release(err2); + } + } else { + setTimeout(fsWrite, BUSY_WRITE_TIMEOUT); + } + } else { + this._writing = false; + this.emit("error", err); + } + return; + } + this.emit("write", n); + const releasedBufObj = releaseWritingBuf(this._writingBuf, this._len, n); + this._len = releasedBufObj.len; + this._writingBuf = releasedBufObj.writingBuf; + if (this._writingBuf.length) { + if (!this.sync) { + fsWrite(); + return; + } + try { + do { + const n2 = fsWriteSync(); + const releasedBufObj2 = releaseWritingBuf(this._writingBuf, this._len, n2); + this._len = releasedBufObj2.len; + this._writingBuf = releasedBufObj2.writingBuf; + } while (this._writingBuf.length); + } catch (err2) { + this.release(err2); + return; + } + } + if (this._fsync) { + fs7.fsyncSync(this.fd); + } + const len = this._len; + if (this._reopening) { + this._writing = false; + this._reopening = false; + this.reopen(); + } else if (len > this.minLength) { + this._actualWrite(); + } else if (this._ending) { + if (len > 0) { + this._actualWrite(); + } else { + this._writing = false; + actualClose(this); + } + } else { + this._writing = false; + if (this.sync) { + if (!this._asyncDrainScheduled) { + this._asyncDrainScheduled = true; + process.nextTick(emitDrain, this); + } + } else { + this.emit("drain"); + } + } + }; + this.on("newListener", function(name) { + if (name === "drain") { + this._asyncDrainScheduled = false; + } + }); + if (this._periodicFlush !== 0) { + this._periodicFlushTimer = setInterval(() => this.flush(null), this._periodicFlush); + this._periodicFlushTimer.unref(); + } + } + function releaseWritingBuf(writingBuf, len, n) { + if (typeof writingBuf === "string" && Buffer.byteLength(writingBuf) !== n) { + n = Buffer.from(writingBuf).subarray(0, n).toString().length; + } + len = Math.max(len - n, 0); + writingBuf = writingBuf.slice(n); + return { writingBuf, len }; + } + function emitDrain(sonic) { + const hasListeners = sonic.listenerCount("drain") > 0; + if (!hasListeners) return; + sonic._asyncDrainScheduled = false; + sonic.emit("drain"); + } + inherits(SonicBoom, EventEmitter); + function mergeBuf(bufs, len) { + if (bufs.length === 0) { + return kEmptyBuffer; + } + if (bufs.length === 1) { + return bufs[0]; + } + return Buffer.concat(bufs, len); + } + function write(data) { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + const len = this._len + data.length; + const bufs = this._bufs; + if (this.maxLength && len > this.maxLength) { + this.emit("drop", data); + return this._len < this._hwm; + } + if (bufs.length === 0 || bufs[bufs.length - 1].length + data.length > this.maxWrite) { + bufs.push("" + data); + } else { + bufs[bufs.length - 1] += data; + } + this._len = len; + if (!this._writing && this._len >= this.minLength) { + this._actualWrite(); + } + return this._len < this._hwm; + } + function writeBuffer(data) { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + const len = this._len + data.length; + const bufs = this._bufs; + const lens = this._lens; + if (this.maxLength && len > this.maxLength) { + this.emit("drop", data); + return this._len < this._hwm; + } + if (bufs.length === 0 || lens[lens.length - 1] + data.length > this.maxWrite) { + bufs.push([data]); + lens.push(data.length); + } else { + bufs[bufs.length - 1].push(data); + lens[lens.length - 1] += data.length; + } + this._len = len; + if (!this._writing && this._len >= this.minLength) { + this._actualWrite(); + } + return this._len < this._hwm; + } + function callFlushCallbackOnDrain(cb) { + this._flushPending = true; + const onDrain = () => { + if (!this._fsync) { + try { + fs7.fsync(this.fd, (err) => { + this._flushPending = false; + cb(err); + }); + } catch (err) { + cb(err); + } + } else { + this._flushPending = false; + cb(); + } + this.off("error", onError); + }; + const onError = (err) => { + this._flushPending = false; + cb(err); + this.off("drain", onDrain); + }; + this.once("drain", onDrain); + this.once("error", onError); + } + function flush(cb) { + if (cb != null && typeof cb !== "function") { + throw new Error("flush cb must be a function"); + } + if (this.destroyed) { + const error = new Error("SonicBoom destroyed"); + if (cb) { + cb(error); + return; + } + throw error; + } + if (this.minLength <= 0) { + cb?.(); + return; + } + if (cb) { + callFlushCallbackOnDrain.call(this, cb); + } + if (this._writing) { + return; + } + if (this._bufs.length === 0) { + this._bufs.push(""); + } + this._actualWrite(); + } + function flushBuffer(cb) { + if (cb != null && typeof cb !== "function") { + throw new Error("flush cb must be a function"); + } + if (this.destroyed) { + const error = new Error("SonicBoom destroyed"); + if (cb) { + cb(error); + return; + } + throw error; + } + if (this.minLength <= 0) { + cb?.(); + return; + } + if (cb) { + callFlushCallbackOnDrain.call(this, cb); + } + if (this._writing) { + return; + } + if (this._bufs.length === 0) { + this._bufs.push([]); + this._lens.push(0); + } + this._actualWrite(); + } + SonicBoom.prototype.reopen = function(file) { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this._opening) { + this.once("ready", () => { + this.reopen(file); + }); + return; + } + if (this._ending) { + return; + } + if (!this.file) { + throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom"); + } + if (file) { + this.file = file; + } + this._reopening = true; + if (this._writing) { + return; + } + const fd = this.fd; + this.once("ready", () => { + if (fd !== this.fd) { + fs7.close(fd, (err) => { + if (err) { + return this.emit("error", err); + } + }); + } + }); + openFile(this.file, this); + }; + SonicBoom.prototype.end = function() { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this._opening) { + this.once("ready", () => { + this.end(); + }); + return; + } + if (this._ending) { + return; + } + this._ending = true; + if (this._writing) { + return; + } + if (this._len > 0 && this.fd >= 0) { + this._actualWrite(); + } else { + actualClose(this); + } + }; + function flushSync() { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this.fd < 0) { + throw new Error("sonic boom is not ready yet"); + } + if (!this._writing && this._writingBuf.length > 0) { + this._bufs.unshift(this._writingBuf); + this._writingBuf = ""; + } + let buf = ""; + while (this._bufs.length || buf) { + if (buf.length <= 0) { + buf = this._bufs[0]; + } + try { + const n = fs7.writeSync(this.fd, buf, "utf8"); + const releasedBufObj = releaseWritingBuf(buf, this._len, n); + buf = releasedBufObj.writingBuf; + this._len = releasedBufObj.len; + if (buf.length <= 0) { + this._bufs.shift(); + } + } catch (err) { + const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY"; + if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { + throw err; + } + sleep(BUSY_WRITE_TIMEOUT); + } + } + try { + fs7.fsyncSync(this.fd); + } catch { + } + } + function flushBufferSync() { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this.fd < 0) { + throw new Error("sonic boom is not ready yet"); + } + if (!this._writing && this._writingBuf.length > 0) { + this._bufs.unshift([this._writingBuf]); + this._writingBuf = kEmptyBuffer; + } + let buf = kEmptyBuffer; + while (this._bufs.length || buf.length) { + if (buf.length <= 0) { + buf = mergeBuf(this._bufs[0], this._lens[0]); + } + try { + const n = fs7.writeSync(this.fd, buf); + buf = buf.subarray(n); + this._len = Math.max(this._len - n, 0); + if (buf.length <= 0) { + this._bufs.shift(); + this._lens.shift(); + } + } catch (err) { + const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY"; + if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { + throw err; + } + sleep(BUSY_WRITE_TIMEOUT); + } + } + } + SonicBoom.prototype.destroy = function() { + if (this.destroyed) { + return; + } + actualClose(this); + }; + function actualWrite() { + const release = this.release; + this._writing = true; + this._writingBuf = this._writingBuf || this._bufs.shift() || ""; + if (this.sync) { + try { + const written = fs7.writeSync(this.fd, this._writingBuf, "utf8"); + release(null, written); + } catch (err) { + release(err); + } + } else { + fs7.write(this.fd, this._writingBuf, "utf8", release); + } + } + function actualWriteBuffer() { + const release = this.release; + this._writing = true; + this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift()); + if (this.sync) { + try { + const written = fs7.writeSync(this.fd, this._writingBuf); + release(null, written); + } catch (err) { + release(err); + } + } else { + if (kCopyBuffer) { + this._writingBuf = Buffer.from(this._writingBuf); + } + fs7.write(this.fd, this._writingBuf, release); + } + } + function actualClose(sonic) { + if (sonic.fd === -1) { + sonic.once("ready", actualClose.bind(null, sonic)); + return; + } + if (sonic._periodicFlushTimer !== void 0) { + clearInterval(sonic._periodicFlushTimer); + } + sonic.destroyed = true; + sonic._bufs = []; + sonic._lens = []; + assert(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`); + try { + fs7.fsync(sonic.fd, closeWrapped); + } catch { + } + function closeWrapped() { + if (sonic.fd !== 1 && sonic.fd !== 2) { + fs7.close(sonic.fd, done); + } else { + done(); + } + } + function done(err) { + if (err) { + sonic.emit("error", err); + return; + } + if (sonic._ending && !sonic._writing) { + sonic.emit("finish"); + } + sonic.emit("close"); + } + } + SonicBoom.SonicBoom = SonicBoom; + SonicBoom.default = SonicBoom; + module2.exports = SonicBoom; + } +}); + +// node_modules/on-exit-leak-free/index.js +var require_on_exit_leak_free = __commonJS({ + "node_modules/on-exit-leak-free/index.js"(exports2, module2) { + "use strict"; + var refs = { + exit: [], + beforeExit: [] + }; + var functions = { + exit: onExit, + beforeExit: onBeforeExit + }; + var registry; + function ensureRegistry() { + if (registry === void 0) { + registry = new FinalizationRegistry(clear); + } + } + function install(event) { + if (refs[event].length > 0) { + return; + } + process.on(event, functions[event]); + } + function uninstall(event) { + if (refs[event].length > 0) { + return; + } + process.removeListener(event, functions[event]); + if (refs.exit.length === 0 && refs.beforeExit.length === 0) { + registry = void 0; + } + } + function onExit() { + callRefs("exit"); + } + function onBeforeExit() { + callRefs("beforeExit"); + } + function callRefs(event) { + for (const ref of refs[event]) { + const obj = ref.deref(); + const fn = ref.fn; + if (obj !== void 0) { + fn(obj, event); + } + } + refs[event] = []; + } + function clear(ref) { + for (const event of ["exit", "beforeExit"]) { + const index = refs[event].indexOf(ref); + refs[event].splice(index, index + 1); + uninstall(event); + } + } + function _register(event, obj, fn) { + if (obj === void 0) { + throw new Error("the object can't be undefined"); + } + install(event); + const ref = new WeakRef(obj); + ref.fn = fn; + ensureRegistry(); + registry.register(obj, ref); + refs[event].push(ref); + } + function register(obj, fn) { + _register("exit", obj, fn); + } + function registerBeforeExit(obj, fn) { + _register("beforeExit", obj, fn); + } + function unregister(obj) { + if (registry === void 0) { + return; + } + registry.unregister(obj); + for (const event of ["exit", "beforeExit"]) { + refs[event] = refs[event].filter((ref) => { + const _obj = ref.deref(); + return _obj && _obj !== obj; + }); + uninstall(event); + } + } + module2.exports = { + register, + registerBeforeExit, + unregister + }; + } +}); + +// node_modules/thread-stream/package.json +var require_package = __commonJS({ + "node_modules/thread-stream/package.json"(exports2, module2) { + module2.exports = { + name: "thread-stream", + version: "3.1.0", + description: "A streaming way to send data to a Node.js Worker Thread", + main: "index.js", + types: "index.d.ts", + dependencies: { + "real-require": "^0.2.0" + }, + devDependencies: { + "@types/node": "^20.1.0", + "@types/tap": "^15.0.0", + "@yao-pkg/pkg": "^5.11.5", + desm: "^1.3.0", + fastbench: "^1.0.1", + husky: "^9.0.6", + "pino-elasticsearch": "^8.0.0", + "sonic-boom": "^4.0.1", + standard: "^17.0.0", + tap: "^16.2.0", + "ts-node": "^10.8.0", + typescript: "^5.3.2", + "why-is-node-running": "^2.2.2" + }, + scripts: { + build: "tsc --noEmit", + test: 'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts', + "test:ci": "standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts", + "test:ci:js": 'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"', + "test:ci:ts": 'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"', + "test:yarn": 'npm run transpile && tap "test/**/*.test.js" --no-check-coverage', + transpile: "sh ./test/ts/transpile.sh", + prepare: "husky install" + }, + standard: { + ignore: [ + "test/ts/**/*", + "test/syntax-error.mjs" + ] + }, + repository: { + type: "git", + url: "git+https://github.com/mcollina/thread-stream.git" + }, + keywords: [ + "worker", + "thread", + "threads", + "stream" + ], + author: "Matteo Collina ", + license: "MIT", + bugs: { + url: "https://github.com/mcollina/thread-stream/issues" + }, + homepage: "https://github.com/mcollina/thread-stream#readme" + }; + } +}); + +// node_modules/thread-stream/lib/wait.js +var require_wait = __commonJS({ + "node_modules/thread-stream/lib/wait.js"(exports2, module2) { + "use strict"; + var MAX_TIMEOUT = 1e3; + function wait(state, index, expected, timeout, done) { + const max = Date.now() + timeout; + let current = Atomics.load(state, index); + if (current === expected) { + done(null, "ok"); + return; + } + let prior = current; + const check = (backoff) => { + if (Date.now() > max) { + done(null, "timed-out"); + } else { + setTimeout(() => { + prior = current; + current = Atomics.load(state, index); + if (current === prior) { + check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2); + } else { + if (current === expected) done(null, "ok"); + else done(null, "not-equal"); + } + }, backoff); + } + }; + check(1); + } + function waitDiff(state, index, expected, timeout, done) { + const max = Date.now() + timeout; + let current = Atomics.load(state, index); + if (current !== expected) { + done(null, "ok"); + return; + } + const check = (backoff) => { + if (Date.now() > max) { + done(null, "timed-out"); + } else { + setTimeout(() => { + current = Atomics.load(state, index); + if (current !== expected) { + done(null, "ok"); + } else { + check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2); + } + }, backoff); + } + }; + check(1); + } + module2.exports = { wait, waitDiff }; + } +}); + +// node_modules/thread-stream/lib/indexes.js +var require_indexes = __commonJS({ + "node_modules/thread-stream/lib/indexes.js"(exports2, module2) { + "use strict"; + var WRITE_INDEX = 4; + var READ_INDEX = 8; + module2.exports = { + WRITE_INDEX, + READ_INDEX + }; + } +}); + +// node_modules/thread-stream/index.js +var require_thread_stream = __commonJS({ + "node_modules/thread-stream/index.js"(exports2, module2) { + "use strict"; + var { version: version2 } = require_package(); + var { EventEmitter } = require("events"); + var { Worker } = require("worker_threads"); + var { join: join5 } = require("path"); + var { pathToFileURL } = require("url"); + var { wait } = require_wait(); + var { + WRITE_INDEX, + READ_INDEX + } = require_indexes(); + var buffer = require("buffer"); + var assert = require("assert"); + var kImpl = Symbol("kImpl"); + var MAX_STRING = buffer.constants.MAX_STRING_LENGTH; + var FakeWeakRef = class { + constructor(value) { + this._value = value; + } + deref() { + return this._value; + } + }; + var FakeFinalizationRegistry = class { + register() { + } + unregister() { + } + }; + var FinalizationRegistry2 = process.env.NODE_V8_COVERAGE ? FakeFinalizationRegistry : global.FinalizationRegistry || FakeFinalizationRegistry; + var WeakRef2 = process.env.NODE_V8_COVERAGE ? FakeWeakRef : global.WeakRef || FakeWeakRef; + var registry = new FinalizationRegistry2((worker) => { + if (worker.exited) { + return; + } + worker.terminate(); + }); + function createWorker(stream, opts) { + const { filename, workerData } = opts; + const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {}; + const toExecute = bundlerOverrides["thread-stream-worker"] || join5(__dirname, "lib", "worker.js"); + const worker = new Worker(toExecute, { + ...opts.workerOpts, + trackUnmanagedFds: false, + workerData: { + filename: filename.indexOf("file://") === 0 ? filename : pathToFileURL(filename).href, + dataBuf: stream[kImpl].dataBuf, + stateBuf: stream[kImpl].stateBuf, + workerData: { + $context: { + threadStreamVersion: version2 + }, + ...workerData + } + } + }); + worker.stream = new FakeWeakRef(stream); + worker.on("message", onWorkerMessage); + worker.on("exit", onWorkerExit); + registry.register(stream, worker); + return worker; + } + function drain(stream) { + assert(!stream[kImpl].sync); + if (stream[kImpl].needDrain) { + stream[kImpl].needDrain = false; + stream.emit("drain"); + } + } + function nextFlush(stream) { + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX); + let leftover = stream[kImpl].data.length - writeIndex; + if (leftover > 0) { + if (stream[kImpl].buf.length === 0) { + stream[kImpl].flushing = false; + if (stream[kImpl].ending) { + end(stream); + } else if (stream[kImpl].needDrain) { + process.nextTick(drain, stream); + } + return; + } + let toWrite = stream[kImpl].buf.slice(0, leftover); + let toWriteBytes = Buffer.byteLength(toWrite); + if (toWriteBytes <= leftover) { + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, nextFlush.bind(null, stream)); + } else { + stream.flush(() => { + if (stream.destroyed) { + return; + } + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + while (toWriteBytes > stream[kImpl].data.length) { + leftover = leftover / 2; + toWrite = stream[kImpl].buf.slice(0, leftover); + toWriteBytes = Buffer.byteLength(toWrite); + } + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, nextFlush.bind(null, stream)); + }); + } + } else if (leftover === 0) { + if (writeIndex === 0 && stream[kImpl].buf.length === 0) { + return; + } + stream.flush(() => { + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + nextFlush(stream); + }); + } else { + destroy(stream, new Error("overwritten")); + } + } + function onWorkerMessage(msg) { + const stream = this.stream.deref(); + if (stream === void 0) { + this.exited = true; + this.terminate(); + return; + } + switch (msg.code) { + case "READY": + this.stream = new WeakRef2(stream); + stream.flush(() => { + stream[kImpl].ready = true; + stream.emit("ready"); + }); + break; + case "ERROR": + destroy(stream, msg.err); + break; + case "EVENT": + if (Array.isArray(msg.args)) { + stream.emit(msg.name, ...msg.args); + } else { + stream.emit(msg.name, msg.args); + } + break; + case "WARNING": + process.emitWarning(msg.err); + break; + default: + destroy(stream, new Error("this should not happen: " + msg.code)); + } + } + function onWorkerExit(code) { + const stream = this.stream.deref(); + if (stream === void 0) { + return; + } + registry.unregister(stream); + stream.worker.exited = true; + stream.worker.off("exit", onWorkerExit); + destroy(stream, code !== 0 ? new Error("the worker thread exited") : null); + } + var ThreadStream = class extends EventEmitter { + constructor(opts = {}) { + super(); + if (opts.bufferSize < 4) { + throw new Error("bufferSize must at least fit a 4-byte utf-8 char"); + } + this[kImpl] = {}; + this[kImpl].stateBuf = new SharedArrayBuffer(128); + this[kImpl].state = new Int32Array(this[kImpl].stateBuf); + this[kImpl].dataBuf = new SharedArrayBuffer(opts.bufferSize || 4 * 1024 * 1024); + this[kImpl].data = Buffer.from(this[kImpl].dataBuf); + this[kImpl].sync = opts.sync || false; + this[kImpl].ending = false; + this[kImpl].ended = false; + this[kImpl].needDrain = false; + this[kImpl].destroyed = false; + this[kImpl].flushing = false; + this[kImpl].ready = false; + this[kImpl].finished = false; + this[kImpl].errored = null; + this[kImpl].closed = false; + this[kImpl].buf = ""; + this.worker = createWorker(this, opts); + this.on("message", (message, transferList) => { + this.worker.postMessage(message, transferList); + }); + } + write(data) { + if (this[kImpl].destroyed) { + error(this, new Error("the worker has exited")); + return false; + } + if (this[kImpl].ending) { + error(this, new Error("the worker is ending")); + return false; + } + if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) { + try { + writeSync(this); + this[kImpl].flushing = true; + } catch (err) { + destroy(this, err); + return false; + } + } + this[kImpl].buf += data; + if (this[kImpl].sync) { + try { + writeSync(this); + return true; + } catch (err) { + destroy(this, err); + return false; + } + } + if (!this[kImpl].flushing) { + this[kImpl].flushing = true; + setImmediate(nextFlush, this); + } + this[kImpl].needDrain = this[kImpl].data.length - this[kImpl].buf.length - Atomics.load(this[kImpl].state, WRITE_INDEX) <= 0; + return !this[kImpl].needDrain; + } + end() { + if (this[kImpl].destroyed) { + return; + } + this[kImpl].ending = true; + end(this); + } + flush(cb) { + if (this[kImpl].destroyed) { + if (typeof cb === "function") { + process.nextTick(cb, new Error("the worker has exited")); + } + return; + } + const writeIndex = Atomics.load(this[kImpl].state, WRITE_INDEX); + wait(this[kImpl].state, READ_INDEX, writeIndex, Infinity, (err, res) => { + if (err) { + destroy(this, err); + process.nextTick(cb, err); + return; + } + if (res === "not-equal") { + this.flush(cb); + return; + } + process.nextTick(cb); + }); + } + flushSync() { + if (this[kImpl].destroyed) { + return; + } + writeSync(this); + flushSync(this); + } + unref() { + this.worker.unref(); + } + ref() { + this.worker.ref(); + } + get ready() { + return this[kImpl].ready; + } + get destroyed() { + return this[kImpl].destroyed; + } + get closed() { + return this[kImpl].closed; + } + get writable() { + return !this[kImpl].destroyed && !this[kImpl].ending; + } + get writableEnded() { + return this[kImpl].ending; + } + get writableFinished() { + return this[kImpl].finished; + } + get writableNeedDrain() { + return this[kImpl].needDrain; + } + get writableObjectMode() { + return false; + } + get writableErrored() { + return this[kImpl].errored; + } + }; + function error(stream, err) { + setImmediate(() => { + stream.emit("error", err); + }); + } + function destroy(stream, err) { + if (stream[kImpl].destroyed) { + return; + } + stream[kImpl].destroyed = true; + if (err) { + stream[kImpl].errored = err; + error(stream, err); + } + if (!stream.worker.exited) { + stream.worker.terminate().catch(() => { + }).then(() => { + stream[kImpl].closed = true; + stream.emit("close"); + }); + } else { + setImmediate(() => { + stream[kImpl].closed = true; + stream.emit("close"); + }); + } + } + function write(stream, data, cb) { + const current = Atomics.load(stream[kImpl].state, WRITE_INDEX); + const length = Buffer.byteLength(data); + stream[kImpl].data.write(data, current); + Atomics.store(stream[kImpl].state, WRITE_INDEX, current + length); + Atomics.notify(stream[kImpl].state, WRITE_INDEX); + cb(); + return true; + } + function end(stream) { + if (stream[kImpl].ended || !stream[kImpl].ending || stream[kImpl].flushing) { + return; + } + stream[kImpl].ended = true; + try { + stream.flushSync(); + let readIndex = Atomics.load(stream[kImpl].state, READ_INDEX); + Atomics.store(stream[kImpl].state, WRITE_INDEX, -1); + Atomics.notify(stream[kImpl].state, WRITE_INDEX); + let spins = 0; + while (readIndex !== -1) { + Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1e3); + readIndex = Atomics.load(stream[kImpl].state, READ_INDEX); + if (readIndex === -2) { + destroy(stream, new Error("end() failed")); + return; + } + if (++spins === 10) { + destroy(stream, new Error("end() took too long (10s)")); + return; + } + } + process.nextTick(() => { + stream[kImpl].finished = true; + stream.emit("finish"); + }); + } catch (err) { + destroy(stream, err); + } + } + function writeSync(stream) { + const cb = () => { + if (stream[kImpl].ending) { + end(stream); + } else if (stream[kImpl].needDrain) { + process.nextTick(drain, stream); + } + }; + stream[kImpl].flushing = false; + while (stream[kImpl].buf.length !== 0) { + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX); + let leftover = stream[kImpl].data.length - writeIndex; + if (leftover === 0) { + flushSync(stream); + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + continue; + } else if (leftover < 0) { + throw new Error("overwritten"); + } + let toWrite = stream[kImpl].buf.slice(0, leftover); + let toWriteBytes = Buffer.byteLength(toWrite); + if (toWriteBytes <= leftover) { + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, cb); + } else { + flushSync(stream); + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + while (toWriteBytes > stream[kImpl].buf.length) { + leftover = leftover / 2; + toWrite = stream[kImpl].buf.slice(0, leftover); + toWriteBytes = Buffer.byteLength(toWrite); + } + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, cb); + } + } + } + function flushSync(stream) { + if (stream[kImpl].flushing) { + throw new Error("unable to flush while flushing"); + } + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX); + let spins = 0; + while (true) { + const readIndex = Atomics.load(stream[kImpl].state, READ_INDEX); + if (readIndex === -2) { + throw Error("_flushSync failed"); + } + if (readIndex !== writeIndex) { + Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1e3); + } else { + break; + } + if (++spins === 10) { + throw new Error("_flushSync took too long (10s)"); + } + } + } + module2.exports = ThreadStream; + } +}); + +// node_modules/pino/lib/transport.js +var require_transport = __commonJS({ + "node_modules/pino/lib/transport.js"(exports2, module2) { + "use strict"; + var { createRequire } = require("module"); + var getCallers = require_caller(); + var { join: join5, isAbsolute, sep: sep2 } = require("node:path"); + var sleep = require_atomic_sleep(); + var onExit = require_on_exit_leak_free(); + var ThreadStream = require_thread_stream(); + function setupOnExit(stream) { + onExit.register(stream, autoEnd); + onExit.registerBeforeExit(stream, flush); + stream.on("close", function() { + onExit.unregister(stream); + }); + } + function buildStream(filename, workerData, workerOpts, sync) { + const stream = new ThreadStream({ + filename, + workerData, + workerOpts, + sync + }); + stream.on("ready", onReady); + stream.on("close", function() { + process.removeListener("exit", onExit2); + }); + process.on("exit", onExit2); + function onReady() { + process.removeListener("exit", onExit2); + stream.unref(); + if (workerOpts.autoEnd !== false) { + setupOnExit(stream); + } + } + function onExit2() { + if (stream.closed) { + return; + } + stream.flushSync(); + sleep(100); + stream.end(); + } + return stream; + } + function autoEnd(stream) { + stream.ref(); + stream.flushSync(); + stream.end(); + stream.once("close", function() { + stream.unref(); + }); + } + function flush(stream) { + stream.flushSync(); + } + function transport(fullOptions) { + const { pipeline, targets, levels, dedupe, worker = {}, caller = getCallers(), sync = false } = fullOptions; + const options = { + ...fullOptions.options + }; + const callers = typeof caller === "string" ? [caller] : caller; + const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {}; + let target = fullOptions.target; + if (target && targets) { + throw new Error("only one of target or targets can be specified"); + } + if (targets) { + target = bundlerOverrides["pino-worker"] || join5(__dirname, "worker.js"); + options.targets = targets.filter((dest) => dest.target).map((dest) => { + return { + ...dest, + target: fixTarget(dest.target) + }; + }); + options.pipelines = targets.filter((dest) => dest.pipeline).map((dest) => { + return dest.pipeline.map((t) => { + return { + ...t, + level: dest.level, + // duplicate the pipeline `level` property defined in the upper level + target: fixTarget(t.target) + }; + }); + }); + } else if (pipeline) { + target = bundlerOverrides["pino-worker"] || join5(__dirname, "worker.js"); + options.pipelines = [pipeline.map((dest) => { + return { + ...dest, + target: fixTarget(dest.target) + }; + })]; + } + if (levels) { + options.levels = levels; + } + if (dedupe) { + options.dedupe = dedupe; + } + options.pinoWillSendConfig = true; + return buildStream(fixTarget(target), options, worker, sync); + function fixTarget(origin) { + origin = bundlerOverrides[origin] || origin; + if (isAbsolute(origin) || origin.indexOf("file://") === 0) { + return origin; + } + if (origin === "pino/file") { + return join5(__dirname, "..", "file.js"); + } + let fixTarget2; + for (const filePath of callers) { + try { + const context = filePath === "node:repl" ? process.cwd() + sep2 : filePath; + fixTarget2 = createRequire(context).resolve(origin); + break; + } catch (err) { + continue; + } + } + if (!fixTarget2) { + throw new Error(`unable to determine transport target for "${origin}"`); + } + return fixTarget2; + } + } + module2.exports = transport; + } +}); + +// node_modules/pino/lib/tools.js +var require_tools = __commonJS({ + "node_modules/pino/lib/tools.js"(exports2, module2) { + "use strict"; + var format = require_quick_format_unescaped(); + var { mapHttpRequest, mapHttpResponse } = require_pino_std_serializers(); + var SonicBoom = require_sonic_boom(); + var onExit = require_on_exit_leak_free(); + var { + lsCacheSym, + chindingsSym, + writeSym, + serializersSym, + formatOptsSym, + endSym, + stringifiersSym, + stringifySym, + stringifySafeSym, + wildcardFirstSym, + nestedKeySym, + formattersSym, + messageKeySym, + errorKeySym, + nestedKeyStrSym, + msgPrefixSym + } = require_symbols3(); + var { isMainThread } = require("worker_threads"); + var transport = require_transport(); + function noop() { + } + function genLog(level, hook) { + if (!hook) return LOG; + return function hookWrappedLog(...args) { + hook.call(this, args, LOG, level); + }; + function LOG(o, ...n) { + if (typeof o === "object") { + let msg = o; + if (o !== null) { + if (o.method && o.headers && o.socket) { + o = mapHttpRequest(o); + } else if (typeof o.setHeader === "function") { + o = mapHttpResponse(o); + } + } + let formatParams; + if (msg === null && n.length === 0) { + formatParams = [null]; + } else { + msg = n.shift(); + formatParams = n; + } + if (typeof this[msgPrefixSym] === "string" && msg !== void 0 && msg !== null) { + msg = this[msgPrefixSym] + msg; + } + this[writeSym](o, format(msg, formatParams, this[formatOptsSym]), level); + } else { + let msg = o === void 0 ? n.shift() : o; + if (typeof this[msgPrefixSym] === "string" && msg !== void 0 && msg !== null) { + msg = this[msgPrefixSym] + msg; + } + this[writeSym](null, format(msg, n, this[formatOptsSym]), level); + } + } + } + function asString(str) { + let result = ""; + let last = 0; + let found = false; + let point = 255; + const l = str.length; + if (l > 100) { + return JSON.stringify(str); + } + for (var i = 0; i < l && point >= 32; i++) { + point = str.charCodeAt(i); + if (point === 34 || point === 92) { + result += str.slice(last, i) + "\\"; + last = i; + found = true; + } + } + if (!found) { + result = str; + } else { + result += str.slice(last); + } + return point < 32 ? JSON.stringify(str) : '"' + result + '"'; + } + function asJson(obj, msg, num, time) { + const stringify2 = this[stringifySym]; + const stringifySafe = this[stringifySafeSym]; + const stringifiers = this[stringifiersSym]; + const end = this[endSym]; + const chindings = this[chindingsSym]; + const serializers = this[serializersSym]; + const formatters = this[formattersSym]; + const messageKey = this[messageKeySym]; + const errorKey = this[errorKeySym]; + let data = this[lsCacheSym][num] + time; + data = data + chindings; + let value; + if (formatters.log) { + obj = formatters.log(obj); + } + const wildcardStringifier = stringifiers[wildcardFirstSym]; + let propStr = ""; + for (const key in obj) { + value = obj[key]; + if (Object.prototype.hasOwnProperty.call(obj, key) && value !== void 0) { + if (serializers[key]) { + value = serializers[key](value); + } else if (key === errorKey && serializers.err) { + value = serializers.err(value); + } + const stringifier = stringifiers[key] || wildcardStringifier; + switch (typeof value) { + case "undefined": + case "function": + continue; + case "number": + if (Number.isFinite(value) === false) { + value = null; + } + // this case explicitly falls through to the next one + case "boolean": + if (stringifier) value = stringifier(value); + break; + case "string": + value = (stringifier || asString)(value); + break; + default: + value = (stringifier || stringify2)(value, stringifySafe); + } + if (value === void 0) continue; + const strKey = asString(key); + propStr += "," + strKey + ":" + value; + } + } + let msgStr = ""; + if (msg !== void 0) { + value = serializers[messageKey] ? serializers[messageKey](msg) : msg; + const stringifier = stringifiers[messageKey] || wildcardStringifier; + switch (typeof value) { + case "function": + break; + case "number": + if (Number.isFinite(value) === false) { + value = null; + } + // this case explicitly falls through to the next one + case "boolean": + if (stringifier) value = stringifier(value); + msgStr = ',"' + messageKey + '":' + value; + break; + case "string": + value = (stringifier || asString)(value); + msgStr = ',"' + messageKey + '":' + value; + break; + default: + value = (stringifier || stringify2)(value, stringifySafe); + msgStr = ',"' + messageKey + '":' + value; + } + } + if (this[nestedKeySym] && propStr) { + return data + this[nestedKeyStrSym] + propStr.slice(1) + "}" + msgStr + end; + } else { + return data + propStr + msgStr + end; + } + } + function asChindings(instance, bindings) { + let value; + let data = instance[chindingsSym]; + const stringify2 = instance[stringifySym]; + const stringifySafe = instance[stringifySafeSym]; + const stringifiers = instance[stringifiersSym]; + const wildcardStringifier = stringifiers[wildcardFirstSym]; + const serializers = instance[serializersSym]; + const formatter = instance[formattersSym].bindings; + bindings = formatter(bindings); + for (const key in bindings) { + value = bindings[key]; + const valid = key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels" && bindings.hasOwnProperty(key) && value !== void 0; + if (valid === true) { + value = serializers[key] ? serializers[key](value) : value; + value = (stringifiers[key] || wildcardStringifier || stringify2)(value, stringifySafe); + if (value === void 0) continue; + data += ',"' + key + '":' + value; + } + } + return data; + } + function hasBeenTampered(stream) { + return stream.write !== stream.constructor.prototype.write; + } + function buildSafeSonicBoom(opts) { + const stream = new SonicBoom(opts); + stream.on("error", filterBrokenPipe); + if (!opts.sync && isMainThread) { + onExit.register(stream, autoEnd); + stream.on("close", function() { + onExit.unregister(stream); + }); + } + return stream; + function filterBrokenPipe(err) { + if (err.code === "EPIPE") { + stream.write = noop; + stream.end = noop; + stream.flushSync = noop; + stream.destroy = noop; + return; + } + stream.removeListener("error", filterBrokenPipe); + stream.emit("error", err); + } + } + function autoEnd(stream, eventName) { + if (stream.destroyed) { + return; + } + if (eventName === "beforeExit") { + stream.flush(); + stream.on("drain", function() { + stream.end(); + }); + } else { + stream.flushSync(); + } + } + function createArgsNormalizer(defaultOptions) { + return function normalizeArgs(instance, caller, opts = {}, stream) { + if (typeof opts === "string") { + stream = buildSafeSonicBoom({ dest: opts }); + opts = {}; + } else if (typeof stream === "string") { + if (opts && opts.transport) { + throw Error("only one of option.transport or stream can be specified"); + } + stream = buildSafeSonicBoom({ dest: stream }); + } else if (opts instanceof SonicBoom || opts.writable || opts._writableState) { + stream = opts; + opts = {}; + } else if (opts.transport) { + if (opts.transport instanceof SonicBoom || opts.transport.writable || opts.transport._writableState) { + throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)"); + } + if (opts.transport.targets && opts.transport.targets.length && opts.formatters && typeof opts.formatters.level === "function") { + throw Error("option.transport.targets do not allow custom level formatters"); + } + let customLevels; + if (opts.customLevels) { + customLevels = opts.useOnlyCustomLevels ? opts.customLevels : Object.assign({}, opts.levels, opts.customLevels); + } + stream = transport({ caller, ...opts.transport, levels: customLevels }); + } + opts = Object.assign({}, defaultOptions, opts); + opts.serializers = Object.assign({}, defaultOptions.serializers, opts.serializers); + opts.formatters = Object.assign({}, defaultOptions.formatters, opts.formatters); + if (opts.prettyPrint) { + throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)"); + } + const { enabled, onChild } = opts; + if (enabled === false) opts.level = "silent"; + if (!onChild) opts.onChild = noop; + if (!stream) { + if (!hasBeenTampered(process.stdout)) { + stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 }); + } else { + stream = process.stdout; + } + } + return { opts, stream }; + }; + } + function stringify(obj, stringifySafeFn) { + try { + return JSON.stringify(obj); + } catch (_) { + try { + const stringify2 = stringifySafeFn || this[stringifySafeSym]; + return stringify2(obj); + } catch (_2) { + return '"[unable to serialize, circular reference is too complex to analyze]"'; + } + } + } + function buildFormatters(level, bindings, log3) { + return { + level, + bindings, + log: log3 + }; + } + function normalizeDestFileDescriptor(destination) { + const fd = Number(destination); + if (typeof destination === "string" && Number.isFinite(fd)) { + return fd; + } + if (destination === void 0) { + return 1; + } + return destination; + } + module2.exports = { + noop, + buildSafeSonicBoom, + asChindings, + asJson, + genLog, + createArgsNormalizer, + stringify, + buildFormatters, + normalizeDestFileDescriptor + }; + } +}); + +// node_modules/pino/lib/constants.js +var require_constants = __commonJS({ + "node_modules/pino/lib/constants.js"(exports2, module2) { + var DEFAULT_LEVELS = { + trace: 10, + debug: 20, + info: 30, + warn: 40, + error: 50, + fatal: 60 + }; + var SORTING_ORDER = { + ASC: "ASC", + DESC: "DESC" + }; + module2.exports = { + DEFAULT_LEVELS, + SORTING_ORDER + }; + } +}); + +// node_modules/pino/lib/levels.js +var require_levels = __commonJS({ + "node_modules/pino/lib/levels.js"(exports2, module2) { + "use strict"; + var { + lsCacheSym, + levelValSym, + useOnlyCustomLevelsSym, + streamSym, + formattersSym, + hooksSym, + levelCompSym + } = require_symbols3(); + var { noop, genLog } = require_tools(); + var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants(); + var levelMethods = { + fatal: (hook) => { + const logFatal = genLog(DEFAULT_LEVELS.fatal, hook); + return function(...args) { + const stream = this[streamSym]; + logFatal.call(this, ...args); + if (typeof stream.flushSync === "function") { + try { + stream.flushSync(); + } catch (e) { + } + } + }; + }, + error: (hook) => genLog(DEFAULT_LEVELS.error, hook), + warn: (hook) => genLog(DEFAULT_LEVELS.warn, hook), + info: (hook) => genLog(DEFAULT_LEVELS.info, hook), + debug: (hook) => genLog(DEFAULT_LEVELS.debug, hook), + trace: (hook) => genLog(DEFAULT_LEVELS.trace, hook) + }; + var nums = Object.keys(DEFAULT_LEVELS).reduce((o, k) => { + o[DEFAULT_LEVELS[k]] = k; + return o; + }, {}); + var initialLsCache = Object.keys(nums).reduce((o, k) => { + o[k] = '{"level":' + Number(k); + return o; + }, {}); + function genLsCache(instance) { + const formatter = instance[formattersSym].level; + const { labels } = instance.levels; + const cache = {}; + for (const label in labels) { + const level = formatter(labels[label], Number(label)); + cache[label] = JSON.stringify(level).slice(0, -1); + } + instance[lsCacheSym] = cache; + return instance; + } + function isStandardLevel(level, useOnlyCustomLevels) { + if (useOnlyCustomLevels) { + return false; + } + switch (level) { + case "fatal": + case "error": + case "warn": + case "info": + case "debug": + case "trace": + return true; + default: + return false; + } + } + function setLevel(level) { + const { labels, values } = this.levels; + if (typeof level === "number") { + if (labels[level] === void 0) throw Error("unknown level value" + level); + level = labels[level]; + } + if (values[level] === void 0) throw Error("unknown level " + level); + const preLevelVal = this[levelValSym]; + const levelVal = this[levelValSym] = values[level]; + const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym]; + const levelComparison = this[levelCompSym]; + const hook = this[hooksSym].logMethod; + for (const key in values) { + if (levelComparison(values[key], levelVal) === false) { + this[key] = noop; + continue; + } + this[key] = isStandardLevel(key, useOnlyCustomLevelsVal) ? levelMethods[key](hook) : genLog(values[key], hook); + } + this.emit( + "level-change", + level, + levelVal, + labels[preLevelVal], + preLevelVal, + this + ); + } + function getLevel(level) { + const { levels, levelVal } = this; + return levels && levels.labels ? levels.labels[levelVal] : ""; + } + function isLevelEnabled(logLevel2) { + const { values } = this.levels; + const logLevelVal = values[logLevel2]; + return logLevelVal !== void 0 && this[levelCompSym](logLevelVal, this[levelValSym]); + } + function compareLevel(direction, current, expected) { + if (direction === SORTING_ORDER.DESC) { + return current <= expected; + } + return current >= expected; + } + function genLevelComparison(levelComparison) { + if (typeof levelComparison === "string") { + return compareLevel.bind(null, levelComparison); + } + return levelComparison; + } + function mappings(customLevels = null, useOnlyCustomLevels = false) { + const customNums = customLevels ? Object.keys(customLevels).reduce((o, k) => { + o[customLevels[k]] = k; + return o; + }, {}) : null; + const labels = Object.assign( + Object.create(Object.prototype, { Infinity: { value: "silent" } }), + useOnlyCustomLevels ? null : nums, + customNums + ); + const values = Object.assign( + Object.create(Object.prototype, { silent: { value: Infinity } }), + useOnlyCustomLevels ? null : DEFAULT_LEVELS, + customLevels + ); + return { labels, values }; + } + function assertDefaultLevelFound(defaultLevel, customLevels, useOnlyCustomLevels) { + if (typeof defaultLevel === "number") { + const values = [].concat( + Object.keys(customLevels || {}).map((key) => customLevels[key]), + useOnlyCustomLevels ? [] : Object.keys(nums).map((level) => +level), + Infinity + ); + if (!values.includes(defaultLevel)) { + throw Error(`default level:${defaultLevel} must be included in custom levels`); + } + return; + } + const labels = Object.assign( + Object.create(Object.prototype, { silent: { value: Infinity } }), + useOnlyCustomLevels ? null : DEFAULT_LEVELS, + customLevels + ); + if (!(defaultLevel in labels)) { + throw Error(`default level:${defaultLevel} must be included in custom levels`); + } + } + function assertNoLevelCollisions(levels, customLevels) { + const { labels, values } = levels; + for (const k in customLevels) { + if (k in values) { + throw Error("levels cannot be overridden"); + } + if (customLevels[k] in labels) { + throw Error("pre-existing level values cannot be used for new levels"); + } + } + } + function assertLevelComparison(levelComparison) { + if (typeof levelComparison === "function") { + return; + } + if (typeof levelComparison === "string" && Object.values(SORTING_ORDER).includes(levelComparison)) { + return; + } + throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type'); + } + module2.exports = { + initialLsCache, + genLsCache, + levelMethods, + getLevel, + setLevel, + isLevelEnabled, + mappings, + assertNoLevelCollisions, + assertDefaultLevelFound, + genLevelComparison, + assertLevelComparison + }; + } +}); + +// node_modules/pino/lib/meta.js +var require_meta = __commonJS({ + "node_modules/pino/lib/meta.js"(exports2, module2) { + "use strict"; + module2.exports = { version: "9.9.0" }; + } +}); + +// node_modules/pino/lib/proto.js +var require_proto = __commonJS({ + "node_modules/pino/lib/proto.js"(exports2, module2) { + "use strict"; + var { EventEmitter } = require("node:events"); + var { + lsCacheSym, + levelValSym, + setLevelSym, + getLevelSym, + chindingsSym, + parsedChindingsSym, + mixinSym, + asJsonSym, + writeSym, + mixinMergeStrategySym, + timeSym, + timeSliceIndexSym, + streamSym, + serializersSym, + formattersSym, + errorKeySym, + messageKeySym, + useOnlyCustomLevelsSym, + needsMetadataGsym, + redactFmtSym, + stringifySym, + formatOptsSym, + stringifiersSym, + msgPrefixSym, + hooksSym + } = require_symbols3(); + var { + getLevel, + setLevel, + isLevelEnabled, + mappings, + initialLsCache, + genLsCache, + assertNoLevelCollisions + } = require_levels(); + var { + asChindings, + asJson, + buildFormatters, + stringify + } = require_tools(); + var { + version: version2 + } = require_meta(); + var redaction = require_redaction(); + var constructor = class Pino { + }; + var prototype = { + constructor, + child, + bindings, + setBindings, + flush, + isLevelEnabled, + version: version2, + get level() { + return this[getLevelSym](); + }, + set level(lvl) { + this[setLevelSym](lvl); + }, + get levelVal() { + return this[levelValSym]; + }, + set levelVal(n) { + throw Error("levelVal is read-only"); + }, + get msgPrefix() { + return this[msgPrefixSym]; + }, + [lsCacheSym]: initialLsCache, + [writeSym]: write, + [asJsonSym]: asJson, + [getLevelSym]: getLevel, + [setLevelSym]: setLevel + }; + Object.setPrototypeOf(prototype, EventEmitter.prototype); + module2.exports = function() { + return Object.create(prototype); + }; + var resetChildingsFormatter = (bindings2) => bindings2; + function child(bindings2, options) { + if (!bindings2) { + throw Error("missing bindings for child Pino"); + } + options = options || {}; + const serializers = this[serializersSym]; + const formatters = this[formattersSym]; + const instance = Object.create(this); + if (options.hasOwnProperty("serializers") === true) { + instance[serializersSym] = /* @__PURE__ */ Object.create(null); + for (const k in serializers) { + instance[serializersSym][k] = serializers[k]; + } + const parentSymbols = Object.getOwnPropertySymbols(serializers); + for (var i = 0; i < parentSymbols.length; i++) { + const ks = parentSymbols[i]; + instance[serializersSym][ks] = serializers[ks]; + } + for (const bk in options.serializers) { + instance[serializersSym][bk] = options.serializers[bk]; + } + const bindingsSymbols = Object.getOwnPropertySymbols(options.serializers); + for (var bi = 0; bi < bindingsSymbols.length; bi++) { + const bks = bindingsSymbols[bi]; + instance[serializersSym][bks] = options.serializers[bks]; + } + } else instance[serializersSym] = serializers; + if (options.hasOwnProperty("formatters")) { + const { level, bindings: chindings, log: log3 } = options.formatters; + instance[formattersSym] = buildFormatters( + level || formatters.level, + chindings || resetChildingsFormatter, + log3 || formatters.log + ); + } else { + instance[formattersSym] = buildFormatters( + formatters.level, + resetChildingsFormatter, + formatters.log + ); + } + if (options.hasOwnProperty("customLevels") === true) { + assertNoLevelCollisions(this.levels, options.customLevels); + instance.levels = mappings(options.customLevels, instance[useOnlyCustomLevelsSym]); + genLsCache(instance); + } + if (typeof options.redact === "object" && options.redact !== null || Array.isArray(options.redact)) { + instance.redact = options.redact; + const stringifiers = redaction(instance.redact, stringify); + const formatOpts = { stringify: stringifiers[redactFmtSym] }; + instance[stringifySym] = stringify; + instance[stringifiersSym] = stringifiers; + instance[formatOptsSym] = formatOpts; + } + if (typeof options.msgPrefix === "string") { + instance[msgPrefixSym] = (this[msgPrefixSym] || "") + options.msgPrefix; + } + instance[chindingsSym] = asChindings(instance, bindings2); + const childLevel = options.level || this.level; + instance[setLevelSym](childLevel); + this.onChild(instance); + return instance; + } + function bindings() { + const chindings = this[chindingsSym]; + const chindingsJson = `{${chindings.substr(1)}}`; + const bindingsFromJson = JSON.parse(chindingsJson); + delete bindingsFromJson.pid; + delete bindingsFromJson.hostname; + return bindingsFromJson; + } + function setBindings(newBindings) { + const chindings = asChindings(this, newBindings); + this[chindingsSym] = chindings; + delete this[parsedChindingsSym]; + } + function defaultMixinMergeStrategy(mergeObject, mixinObject) { + return Object.assign(mixinObject, mergeObject); + } + function write(_obj, msg, num) { + const t = this[timeSym](); + const mixin = this[mixinSym]; + const errorKey = this[errorKeySym]; + const messageKey = this[messageKeySym]; + const mixinMergeStrategy = this[mixinMergeStrategySym] || defaultMixinMergeStrategy; + let obj; + const streamWriteHook = this[hooksSym].streamWrite; + if (_obj === void 0 || _obj === null) { + obj = {}; + } else if (_obj instanceof Error) { + obj = { [errorKey]: _obj }; + if (msg === void 0) { + msg = _obj.message; + } + } else { + obj = _obj; + if (msg === void 0 && _obj[messageKey] === void 0 && _obj[errorKey]) { + msg = _obj[errorKey].message; + } + } + if (mixin) { + obj = mixinMergeStrategy(obj, mixin(obj, num, this)); + } + const s = this[asJsonSym](obj, msg, num, t); + const stream = this[streamSym]; + if (stream[needsMetadataGsym] === true) { + stream.lastLevel = num; + stream.lastObj = obj; + stream.lastMsg = msg; + stream.lastTime = t.slice(this[timeSliceIndexSym]); + stream.lastLogger = this; + } + stream.write(streamWriteHook ? streamWriteHook(s) : s); + } + function noop() { + } + function flush(cb) { + if (cb != null && typeof cb !== "function") { + throw Error("callback must be a function"); + } + const stream = this[streamSym]; + if (typeof stream.flush === "function") { + stream.flush(cb || noop); + } else if (cb) cb(); + } + } +}); + +// node_modules/safe-stable-stringify/index.js +var require_safe_stable_stringify = __commonJS({ + "node_modules/safe-stable-stringify/index.js"(exports2, module2) { + "use strict"; + var { hasOwnProperty } = Object.prototype; + var stringify = configure(); + stringify.configure = configure; + stringify.stringify = stringify; + stringify.default = stringify; + exports2.stringify = stringify; + exports2.configure = configure; + module2.exports = stringify; + var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/; + function strEscape(str) { + if (str.length < 5e3 && !strEscapeSequencesRegExp.test(str)) { + return `"${str}"`; + } + return JSON.stringify(str); + } + function sort(array, comparator) { + if (array.length > 200 || comparator) { + return array.sort(comparator); + } + for (let i = 1; i < array.length; i++) { + const currentValue = array[i]; + let position = i; + while (position !== 0 && array[position - 1] > currentValue) { + array[position] = array[position - 1]; + position--; + } + array[position] = currentValue; + } + return array; + } + var typedArrayPrototypeGetSymbolToStringTag = Object.getOwnPropertyDescriptor( + Object.getPrototypeOf( + Object.getPrototypeOf( + new Int8Array() + ) + ), + Symbol.toStringTag + ).get; + function isTypedArrayWithEntries(value) { + return typedArrayPrototypeGetSymbolToStringTag.call(value) !== void 0 && value.length !== 0; + } + function stringifyTypedArray(array, separator, maximumBreadth) { + if (array.length < maximumBreadth) { + maximumBreadth = array.length; + } + const whitespace = separator === "," ? "" : " "; + let res = `"0":${whitespace}${array[0]}`; + for (let i = 1; i < maximumBreadth; i++) { + res += `${separator}"${i}":${whitespace}${array[i]}`; + } + return res; + } + function getCircularValueOption(options) { + if (hasOwnProperty.call(options, "circularValue")) { + const circularValue = options.circularValue; + if (typeof circularValue === "string") { + return `"${circularValue}"`; + } + if (circularValue == null) { + return circularValue; + } + if (circularValue === Error || circularValue === TypeError) { + return { + toString() { + throw new TypeError("Converting circular structure to JSON"); + } + }; + } + throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined'); + } + return '"[Circular]"'; + } + function getDeterministicOption(options) { + let value; + if (hasOwnProperty.call(options, "deterministic")) { + value = options.deterministic; + if (typeof value !== "boolean" && typeof value !== "function") { + throw new TypeError('The "deterministic" argument must be of type boolean or comparator function'); + } + } + return value === void 0 ? true : value; + } + function getBooleanOption(options, key) { + let value; + if (hasOwnProperty.call(options, key)) { + value = options[key]; + if (typeof value !== "boolean") { + throw new TypeError(`The "${key}" argument must be of type boolean`); + } + } + return value === void 0 ? true : value; + } + function getPositiveIntegerOption(options, key) { + let value; + if (hasOwnProperty.call(options, key)) { + value = options[key]; + if (typeof value !== "number") { + throw new TypeError(`The "${key}" argument must be of type number`); + } + if (!Number.isInteger(value)) { + throw new TypeError(`The "${key}" argument must be an integer`); + } + if (value < 1) { + throw new RangeError(`The "${key}" argument must be >= 1`); + } + } + return value === void 0 ? Infinity : value; + } + function getItemCount(number) { + if (number === 1) { + return "1 item"; + } + return `${number} items`; + } + function getUniqueReplacerSet(replacerArray) { + const replacerSet = /* @__PURE__ */ new Set(); + for (const value of replacerArray) { + if (typeof value === "string" || typeof value === "number") { + replacerSet.add(String(value)); + } + } + return replacerSet; + } + function getStrictOption(options) { + if (hasOwnProperty.call(options, "strict")) { + const value = options.strict; + if (typeof value !== "boolean") { + throw new TypeError('The "strict" argument must be of type boolean'); + } + if (value) { + return (value2) => { + let message = `Object can not safely be stringified. Received type ${typeof value2}`; + if (typeof value2 !== "function") message += ` (${value2.toString()})`; + throw new Error(message); + }; + } + } + } + function configure(options) { + options = { ...options }; + const fail = getStrictOption(options); + if (fail) { + if (options.bigint === void 0) { + options.bigint = false; + } + if (!("circularValue" in options)) { + options.circularValue = Error; + } + } + const circularValue = getCircularValueOption(options); + const bigint = getBooleanOption(options, "bigint"); + const deterministic = getDeterministicOption(options); + const comparator = typeof deterministic === "function" ? deterministic : void 0; + const maximumDepth = getPositiveIntegerOption(options, "maximumDepth"); + const maximumBreadth = getPositiveIntegerOption(options, "maximumBreadth"); + function stringifyFnReplacer(key, parent, stack, replacer, spacer, indentation) { + let value = parent[key]; + if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { + value = value.toJSON(key); + } + value = replacer.call(parent, key, value); + switch (typeof value) { + case "string": + return strEscape(value); + case "object": { + if (value === null) { + return "null"; + } + if (stack.indexOf(value) !== -1) { + return circularValue; + } + let res = ""; + let join5 = ","; + const originalIndentation = indentation; + if (Array.isArray(value)) { + if (value.length === 0) { + return "[]"; + } + if (maximumDepth < stack.length + 1) { + return '"[Array]"'; + } + stack.push(value); + if (spacer !== "") { + indentation += spacer; + res += ` +${indentation}`; + join5 = `, +${indentation}`; + } + const maximumValuesToStringify = Math.min(value.length, maximumBreadth); + let i = 0; + for (; i < maximumValuesToStringify - 1; i++) { + const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation); + res += tmp2 !== void 0 ? tmp2 : "null"; + res += join5; + } + const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation); + res += tmp !== void 0 ? tmp : "null"; + if (value.length - 1 > maximumBreadth) { + const removedKeys = value.length - maximumBreadth - 1; + res += `${join5}"... ${getItemCount(removedKeys)} not stringified"`; + } + if (spacer !== "") { + res += ` +${originalIndentation}`; + } + stack.pop(); + return `[${res}]`; + } + let keys = Object.keys(value); + const keyLength = keys.length; + if (keyLength === 0) { + return "{}"; + } + if (maximumDepth < stack.length + 1) { + return '"[Object]"'; + } + let whitespace = ""; + let separator = ""; + if (spacer !== "") { + indentation += spacer; + join5 = `, +${indentation}`; + whitespace = " "; + } + const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); + if (deterministic && !isTypedArrayWithEntries(value)) { + keys = sort(keys, comparator); + } + stack.push(value); + for (let i = 0; i < maximumPropertiesToStringify; i++) { + const key2 = keys[i]; + const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation); + if (tmp !== void 0) { + res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`; + separator = join5; + } + } + if (keyLength > maximumBreadth) { + const removedKeys = keyLength - maximumBreadth; + res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`; + separator = join5; + } + if (spacer !== "" && separator.length > 1) { + res = ` +${indentation}${res} +${originalIndentation}`; + } + stack.pop(); + return `{${res}}`; + } + case "number": + return isFinite(value) ? String(value) : fail ? fail(value) : "null"; + case "boolean": + return value === true ? "true" : "false"; + case "undefined": + return void 0; + case "bigint": + if (bigint) { + return String(value); + } + // fallthrough + default: + return fail ? fail(value) : void 0; + } + } + function stringifyArrayReplacer(key, value, stack, replacer, spacer, indentation) { + if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { + value = value.toJSON(key); + } + switch (typeof value) { + case "string": + return strEscape(value); + case "object": { + if (value === null) { + return "null"; + } + if (stack.indexOf(value) !== -1) { + return circularValue; + } + const originalIndentation = indentation; + let res = ""; + let join5 = ","; + if (Array.isArray(value)) { + if (value.length === 0) { + return "[]"; + } + if (maximumDepth < stack.length + 1) { + return '"[Array]"'; + } + stack.push(value); + if (spacer !== "") { + indentation += spacer; + res += ` +${indentation}`; + join5 = `, +${indentation}`; + } + const maximumValuesToStringify = Math.min(value.length, maximumBreadth); + let i = 0; + for (; i < maximumValuesToStringify - 1; i++) { + const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation); + res += tmp2 !== void 0 ? tmp2 : "null"; + res += join5; + } + const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation); + res += tmp !== void 0 ? tmp : "null"; + if (value.length - 1 > maximumBreadth) { + const removedKeys = value.length - maximumBreadth - 1; + res += `${join5}"... ${getItemCount(removedKeys)} not stringified"`; + } + if (spacer !== "") { + res += ` +${originalIndentation}`; + } + stack.pop(); + return `[${res}]`; + } + stack.push(value); + let whitespace = ""; + if (spacer !== "") { + indentation += spacer; + join5 = `, +${indentation}`; + whitespace = " "; + } + let separator = ""; + for (const key2 of replacer) { + const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation); + if (tmp !== void 0) { + res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`; + separator = join5; + } + } + if (spacer !== "" && separator.length > 1) { + res = ` +${indentation}${res} +${originalIndentation}`; + } + stack.pop(); + return `{${res}}`; + } + case "number": + return isFinite(value) ? String(value) : fail ? fail(value) : "null"; + case "boolean": + return value === true ? "true" : "false"; + case "undefined": + return void 0; + case "bigint": + if (bigint) { + return String(value); + } + // fallthrough + default: + return fail ? fail(value) : void 0; + } + } + function stringifyIndent(key, value, stack, spacer, indentation) { + switch (typeof value) { + case "string": + return strEscape(value); + case "object": { + if (value === null) { + return "null"; + } + if (typeof value.toJSON === "function") { + value = value.toJSON(key); + if (typeof value !== "object") { + return stringifyIndent(key, value, stack, spacer, indentation); + } + if (value === null) { + return "null"; + } + } + if (stack.indexOf(value) !== -1) { + return circularValue; + } + const originalIndentation = indentation; + if (Array.isArray(value)) { + if (value.length === 0) { + return "[]"; + } + if (maximumDepth < stack.length + 1) { + return '"[Array]"'; + } + stack.push(value); + indentation += spacer; + let res2 = ` +${indentation}`; + const join6 = `, +${indentation}`; + const maximumValuesToStringify = Math.min(value.length, maximumBreadth); + let i = 0; + for (; i < maximumValuesToStringify - 1; i++) { + const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation); + res2 += tmp2 !== void 0 ? tmp2 : "null"; + res2 += join6; + } + const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation); + res2 += tmp !== void 0 ? tmp : "null"; + if (value.length - 1 > maximumBreadth) { + const removedKeys = value.length - maximumBreadth - 1; + res2 += `${join6}"... ${getItemCount(removedKeys)} not stringified"`; + } + res2 += ` +${originalIndentation}`; + stack.pop(); + return `[${res2}]`; + } + let keys = Object.keys(value); + const keyLength = keys.length; + if (keyLength === 0) { + return "{}"; + } + if (maximumDepth < stack.length + 1) { + return '"[Object]"'; + } + indentation += spacer; + const join5 = `, +${indentation}`; + let res = ""; + let separator = ""; + let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); + if (isTypedArrayWithEntries(value)) { + res += stringifyTypedArray(value, join5, maximumBreadth); + keys = keys.slice(value.length); + maximumPropertiesToStringify -= value.length; + separator = join5; + } + if (deterministic) { + keys = sort(keys, comparator); + } + stack.push(value); + for (let i = 0; i < maximumPropertiesToStringify; i++) { + const key2 = keys[i]; + const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation); + if (tmp !== void 0) { + res += `${separator}${strEscape(key2)}: ${tmp}`; + separator = join5; + } + } + if (keyLength > maximumBreadth) { + const removedKeys = keyLength - maximumBreadth; + res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`; + separator = join5; + } + if (separator !== "") { + res = ` +${indentation}${res} +${originalIndentation}`; + } + stack.pop(); + return `{${res}}`; + } + case "number": + return isFinite(value) ? String(value) : fail ? fail(value) : "null"; + case "boolean": + return value === true ? "true" : "false"; + case "undefined": + return void 0; + case "bigint": + if (bigint) { + return String(value); + } + // fallthrough + default: + return fail ? fail(value) : void 0; + } + } + function stringifySimple(key, value, stack) { + switch (typeof value) { + case "string": + return strEscape(value); + case "object": { + if (value === null) { + return "null"; + } + if (typeof value.toJSON === "function") { + value = value.toJSON(key); + if (typeof value !== "object") { + return stringifySimple(key, value, stack); + } + if (value === null) { + return "null"; + } + } + if (stack.indexOf(value) !== -1) { + return circularValue; + } + let res = ""; + const hasLength = value.length !== void 0; + if (hasLength && Array.isArray(value)) { + if (value.length === 0) { + return "[]"; + } + if (maximumDepth < stack.length + 1) { + return '"[Array]"'; + } + stack.push(value); + const maximumValuesToStringify = Math.min(value.length, maximumBreadth); + let i = 0; + for (; i < maximumValuesToStringify - 1; i++) { + const tmp2 = stringifySimple(String(i), value[i], stack); + res += tmp2 !== void 0 ? tmp2 : "null"; + res += ","; + } + const tmp = stringifySimple(String(i), value[i], stack); + res += tmp !== void 0 ? tmp : "null"; + if (value.length - 1 > maximumBreadth) { + const removedKeys = value.length - maximumBreadth - 1; + res += `,"... ${getItemCount(removedKeys)} not stringified"`; + } + stack.pop(); + return `[${res}]`; + } + let keys = Object.keys(value); + const keyLength = keys.length; + if (keyLength === 0) { + return "{}"; + } + if (maximumDepth < stack.length + 1) { + return '"[Object]"'; + } + let separator = ""; + let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); + if (hasLength && isTypedArrayWithEntries(value)) { + res += stringifyTypedArray(value, ",", maximumBreadth); + keys = keys.slice(value.length); + maximumPropertiesToStringify -= value.length; + separator = ","; + } + if (deterministic) { + keys = sort(keys, comparator); + } + stack.push(value); + for (let i = 0; i < maximumPropertiesToStringify; i++) { + const key2 = keys[i]; + const tmp = stringifySimple(key2, value[key2], stack); + if (tmp !== void 0) { + res += `${separator}${strEscape(key2)}:${tmp}`; + separator = ","; + } + } + if (keyLength > maximumBreadth) { + const removedKeys = keyLength - maximumBreadth; + res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"`; + } + stack.pop(); + return `{${res}}`; + } + case "number": + return isFinite(value) ? String(value) : fail ? fail(value) : "null"; + case "boolean": + return value === true ? "true" : "false"; + case "undefined": + return void 0; + case "bigint": + if (bigint) { + return String(value); + } + // fallthrough + default: + return fail ? fail(value) : void 0; + } + } + function stringify2(value, replacer, space) { + if (arguments.length > 1) { + let spacer = ""; + if (typeof space === "number") { + spacer = " ".repeat(Math.min(space, 10)); + } else if (typeof space === "string") { + spacer = space.slice(0, 10); + } + if (replacer != null) { + if (typeof replacer === "function") { + return stringifyFnReplacer("", { "": value }, [], replacer, spacer, ""); + } + if (Array.isArray(replacer)) { + return stringifyArrayReplacer("", value, [], getUniqueReplacerSet(replacer), spacer, ""); + } + } + if (spacer.length !== 0) { + return stringifyIndent("", value, [], spacer, ""); + } + } + return stringifySimple("", value, []); + } + return stringify2; + } + } +}); + +// node_modules/pino/lib/multistream.js +var require_multistream = __commonJS({ + "node_modules/pino/lib/multistream.js"(exports2, module2) { + "use strict"; + var metadata = Symbol.for("pino.metadata"); + var { DEFAULT_LEVELS } = require_constants(); + var DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info; + function multistream(streamsArray, opts) { + streamsArray = streamsArray || []; + opts = opts || { dedupe: false }; + const streamLevels = Object.create(DEFAULT_LEVELS); + streamLevels.silent = Infinity; + if (opts.levels && typeof opts.levels === "object") { + Object.keys(opts.levels).forEach((i) => { + streamLevels[i] = opts.levels[i]; + }); + } + const res = { + write, + add, + remove, + emit, + flushSync, + end, + minLevel: 0, + lastId: 0, + streams: [], + clone, + [metadata]: true, + streamLevels + }; + if (Array.isArray(streamsArray)) { + streamsArray.forEach(add, res); + } else { + add.call(res, streamsArray); + } + streamsArray = null; + return res; + function write(data) { + let dest; + const level = this.lastLevel; + const { streams } = this; + let recordedLevel = 0; + let stream; + for (let i = initLoopVar(streams.length, opts.dedupe); checkLoopVar(i, streams.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) { + dest = streams[i]; + if (dest.level <= level) { + if (recordedLevel !== 0 && recordedLevel !== dest.level) { + break; + } + stream = dest.stream; + if (stream[metadata]) { + const { lastTime, lastMsg, lastObj, lastLogger } = this; + stream.lastLevel = level; + stream.lastTime = lastTime; + stream.lastMsg = lastMsg; + stream.lastObj = lastObj; + stream.lastLogger = lastLogger; + } + stream.write(data); + if (opts.dedupe) { + recordedLevel = dest.level; + } + } else if (!opts.dedupe) { + break; + } + } + } + function emit(...args) { + for (const { stream } of this.streams) { + if (typeof stream.emit === "function") { + stream.emit(...args); + } + } + } + function flushSync() { + for (const { stream } of this.streams) { + if (typeof stream.flushSync === "function") { + stream.flushSync(); + } + } + } + function add(dest) { + if (!dest) { + return res; + } + const isStream = typeof dest.write === "function" || dest.stream; + const stream_ = dest.write ? dest : dest.stream; + if (!isStream) { + throw Error("stream object needs to implement either StreamEntry or DestinationStream interface"); + } + const { streams, streamLevels: streamLevels2 } = this; + let level; + if (typeof dest.levelVal === "number") { + level = dest.levelVal; + } else if (typeof dest.level === "string") { + level = streamLevels2[dest.level]; + } else if (typeof dest.level === "number") { + level = dest.level; + } else { + level = DEFAULT_INFO_LEVEL; + } + const dest_ = { + stream: stream_, + level, + levelVal: void 0, + id: ++res.lastId + }; + streams.unshift(dest_); + streams.sort(compareByLevel); + this.minLevel = streams[0].level; + return res; + } + function remove(id2) { + const { streams } = this; + const index = streams.findIndex((s) => s.id === id2); + if (index >= 0) { + streams.splice(index, 1); + streams.sort(compareByLevel); + this.minLevel = streams.length > 0 ? streams[0].level : -1; + } + return res; + } + function end() { + for (const { stream } of this.streams) { + if (typeof stream.flushSync === "function") { + stream.flushSync(); + } + stream.end(); + } + } + function clone(level) { + const streams = new Array(this.streams.length); + for (let i = 0; i < streams.length; i++) { + streams[i] = { + level, + stream: this.streams[i].stream + }; + } + return { + write, + add, + remove, + minLevel: level, + streams, + clone, + emit, + flushSync, + [metadata]: true + }; + } + } + function compareByLevel(a, b) { + return a.level - b.level; + } + function initLoopVar(length, dedupe) { + return dedupe ? length - 1 : 0; + } + function adjustLoopVar(i, dedupe) { + return dedupe ? i - 1 : i + 1; + } + function checkLoopVar(i, length, dedupe) { + return dedupe ? i >= 0 : i < length; + } + module2.exports = multistream; + } +}); + +// node_modules/pino/pino.js +var require_pino = __commonJS({ + "node_modules/pino/pino.js"(exports2, module2) { + "use strict"; + var os2 = require("node:os"); + var stdSerializers = require_pino_std_serializers(); + var caller = require_caller(); + var redaction = require_redaction(); + var time = require_time(); + var proto = require_proto(); + var symbols = require_symbols3(); + var { configure } = require_safe_stable_stringify(); + var { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = require_levels(); + var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants(); + var { + createArgsNormalizer, + asChindings, + buildSafeSonicBoom, + buildFormatters, + stringify, + normalizeDestFileDescriptor, + noop + } = require_tools(); + var { version: version2 } = require_meta(); + var { + chindingsSym, + redactFmtSym, + serializersSym, + timeSym, + timeSliceIndexSym, + streamSym, + stringifySym, + stringifySafeSym, + stringifiersSym, + setLevelSym, + endSym, + formatOptsSym, + messageKeySym, + errorKeySym, + nestedKeySym, + mixinSym, + levelCompSym, + useOnlyCustomLevelsSym, + formattersSym, + hooksSym, + nestedKeyStrSym, + mixinMergeStrategySym, + msgPrefixSym + } = symbols; + var { epochTime, nullTime } = time; + var { pid } = process; + var hostname = os2.hostname(); + var defaultErrorSerializer = stdSerializers.err; + var defaultOptions = { + level: "info", + levelComparison: SORTING_ORDER.ASC, + levels: DEFAULT_LEVELS, + messageKey: "msg", + errorKey: "err", + nestedKey: null, + enabled: true, + base: { pid, hostname }, + serializers: Object.assign(/* @__PURE__ */ Object.create(null), { + err: defaultErrorSerializer + }), + formatters: Object.assign(/* @__PURE__ */ Object.create(null), { + bindings(bindings) { + return bindings; + }, + level(label, number) { + return { level: number }; + } + }), + hooks: { + logMethod: void 0, + streamWrite: void 0 + }, + timestamp: epochTime, + name: void 0, + redact: null, + customLevels: null, + useOnlyCustomLevels: false, + depthLimit: 5, + edgeLimit: 100 + }; + var normalize = createArgsNormalizer(defaultOptions); + var serializers = Object.assign(/* @__PURE__ */ Object.create(null), stdSerializers); + function pino(...args) { + const instance = {}; + const { opts, stream } = normalize(instance, caller(), ...args); + if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== void 0) opts.level = opts.level.toLowerCase(); + const { + redact, + crlf, + serializers: serializers2, + timestamp, + messageKey, + errorKey, + nestedKey, + base, + name, + level, + customLevels, + levelComparison, + mixin, + mixinMergeStrategy, + useOnlyCustomLevels, + formatters, + hooks, + depthLimit, + edgeLimit, + onChild, + msgPrefix + } = opts; + const stringifySafe = configure({ + maximumDepth: depthLimit, + maximumBreadth: edgeLimit + }); + const allFormatters = buildFormatters( + formatters.level, + formatters.bindings, + formatters.log + ); + const stringifyFn = stringify.bind({ + [stringifySafeSym]: stringifySafe + }); + const stringifiers = redact ? redaction(redact, stringifyFn) : {}; + const formatOpts = redact ? { stringify: stringifiers[redactFmtSym] } : { stringify: stringifyFn }; + const end = "}" + (crlf ? "\r\n" : "\n"); + const coreChindings = asChindings.bind(null, { + [chindingsSym]: "", + [serializersSym]: serializers2, + [stringifiersSym]: stringifiers, + [stringifySym]: stringify, + [stringifySafeSym]: stringifySafe, + [formattersSym]: allFormatters + }); + let chindings = ""; + if (base !== null) { + if (name === void 0) { + chindings = coreChindings(base); + } else { + chindings = coreChindings(Object.assign({}, base, { name })); + } + } + const time2 = timestamp instanceof Function ? timestamp : timestamp ? epochTime : nullTime; + const timeSliceIndex = time2().indexOf(":") + 1; + if (useOnlyCustomLevels && !customLevels) throw Error("customLevels is required if useOnlyCustomLevels is set true"); + if (mixin && typeof mixin !== "function") throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`); + if (msgPrefix && typeof msgPrefix !== "string") throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`); + assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels); + const levels = mappings(customLevels, useOnlyCustomLevels); + if (typeof stream.emit === "function") { + stream.emit("message", { code: "PINO_CONFIG", config: { levels, messageKey, errorKey } }); + } + assertLevelComparison(levelComparison); + const levelCompFunc = genLevelComparison(levelComparison); + Object.assign(instance, { + levels, + [levelCompSym]: levelCompFunc, + [useOnlyCustomLevelsSym]: useOnlyCustomLevels, + [streamSym]: stream, + [timeSym]: time2, + [timeSliceIndexSym]: timeSliceIndex, + [stringifySym]: stringify, + [stringifySafeSym]: stringifySafe, + [stringifiersSym]: stringifiers, + [endSym]: end, + [formatOptsSym]: formatOpts, + [messageKeySym]: messageKey, + [errorKeySym]: errorKey, + [nestedKeySym]: nestedKey, + // protect against injection + [nestedKeyStrSym]: nestedKey ? `,${JSON.stringify(nestedKey)}:{` : "", + [serializersSym]: serializers2, + [mixinSym]: mixin, + [mixinMergeStrategySym]: mixinMergeStrategy, + [chindingsSym]: chindings, + [formattersSym]: allFormatters, + [hooksSym]: hooks, + silent: noop, + onChild, + [msgPrefixSym]: msgPrefix + }); + Object.setPrototypeOf(instance, proto()); + genLsCache(instance); + instance[setLevelSym](level); + return instance; + } + module2.exports = pino; + module2.exports.destination = (dest = process.stdout.fd) => { + if (typeof dest === "object") { + dest.dest = normalizeDestFileDescriptor(dest.dest || process.stdout.fd); + return buildSafeSonicBoom(dest); + } else { + return buildSafeSonicBoom({ dest: normalizeDestFileDescriptor(dest), minLength: 0 }); + } + }; + module2.exports.transport = require_transport(); + module2.exports.multistream = require_multistream(); + module2.exports.levels = mappings(); + module2.exports.stdSerializers = serializers; + module2.exports.stdTimeFunctions = Object.assign({}, time); + module2.exports.symbols = symbols; + module2.exports.version = version2; + module2.exports.default = pino; + module2.exports.pino = pino; + } +}); + +// node_modules/fastify/lib/logger-pino.js +var require_logger_pino = __commonJS({ + "node_modules/fastify/lib/logger-pino.js"(exports2, module2) { + "use strict"; + var pino = require_pino(); + var { serializersSym } = pino.symbols; + var { + FST_ERR_LOG_INVALID_DESTINATION + } = require_errors2(); + function createPinoLogger(opts) { + if (opts.stream && opts.file) { + throw new FST_ERR_LOG_INVALID_DESTINATION(); + } else if (opts.file) { + opts.stream = pino.destination(opts.file); + delete opts.file; + } + const prevLogger = opts.logger; + const prevGenReqId = opts.genReqId; + let logger = null; + if (prevLogger) { + opts.logger = void 0; + opts.genReqId = void 0; + if (prevLogger[serializersSym]) { + opts.serializers = Object.assign({}, opts.serializers, prevLogger[serializersSym]); + } + logger = prevLogger.child({}, opts); + opts.logger = prevLogger; + opts.genReqId = prevGenReqId; + } else { + logger = pino(opts, opts.stream); + } + return logger; + } + var serializers = { + req: function asReqValue(req) { + return { + method: req.method, + url: req.url, + version: req.headers && req.headers["accept-version"], + host: req.host, + remoteAddress: req.ip, + remotePort: req.socket ? req.socket.remotePort : void 0 + }; + }, + err: pino.stdSerializers.err, + res: function asResValue(reply) { + return { + statusCode: reply.statusCode + }; + } + }; + module2.exports = { + serializers, + createPinoLogger + }; + } +}); + +// node_modules/fastify/lib/logger-factory.js +var require_logger_factory = __commonJS({ + "node_modules/fastify/lib/logger-factory.js"(exports2, module2) { + "use strict"; + var { + FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED, + FST_ERR_LOG_INVALID_LOGGER_CONFIG, + FST_ERR_LOG_INVALID_LOGGER_INSTANCE, + FST_ERR_LOG_INVALID_LOGGER + } = require_errors2(); + function createChildLogger(context, logger, req, reqId, loggerOpts) { + const loggerBindings = { + [context.requestIdLogLabel]: reqId + }; + const child = context.childLoggerFactory.call(context.server, logger, loggerBindings, loggerOpts || {}, req); + if (context.childLoggerFactory !== defaultChildLoggerFactory) { + validateLogger(child, true); + } + return child; + } + function defaultChildLoggerFactory(logger, bindings, opts) { + return logger.child(bindings, opts); + } + function validateLogger(logger, strict) { + const methods = ["info", "error", "debug", "fatal", "warn", "trace", "child"]; + const missingMethods = logger ? methods.filter((method) => !logger[method] || typeof logger[method] !== "function") : methods; + if (!missingMethods.length) { + return true; + } else if (missingMethods.length === methods.length && !strict) { + return false; + } else { + throw FST_ERR_LOG_INVALID_LOGGER(missingMethods.join(",")); + } + } + function createLogger(options) { + if (options.logger && options.loggerInstance) { + throw new FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED(); + } + if (!options.loggerInstance && !options.logger) { + const nullLogger = require_abstract_logging(); + const logger2 = nullLogger; + logger2.child = () => logger2; + return { logger: logger2, hasLogger: false }; + } + const { createPinoLogger, serializers } = require_logger_pino(); + if (validateLogger(options.loggerInstance)) { + const logger2 = createPinoLogger({ + logger: options.loggerInstance, + serializers: Object.assign({}, serializers, options.loggerInstance.serializers) + }); + return { logger: logger2, hasLogger: true }; + } + if (validateLogger(options.logger)) { + throw FST_ERR_LOG_INVALID_LOGGER_CONFIG(); + } + if (options.loggerInstance) { + throw FST_ERR_LOG_INVALID_LOGGER_INSTANCE(); + } + const localLoggerOptions = {}; + if (Object.prototype.toString.call(options.logger) === "[object Object]") { + Reflect.ownKeys(options.logger).forEach((prop) => { + Object.defineProperty(localLoggerOptions, prop, { + value: options.logger[prop], + writable: true, + enumerable: true, + configurable: true + }); + }); + } + localLoggerOptions.level = localLoggerOptions.level || "info"; + localLoggerOptions.serializers = Object.assign({}, serializers, localLoggerOptions.serializers); + options.logger = localLoggerOptions; + const logger = createPinoLogger(options.logger); + return { logger, hasLogger: true }; + } + function now() { + const ts = process.hrtime(); + return ts[0] * 1e3 + ts[1] / 1e6; + } + module2.exports = { + createChildLogger, + defaultChildLoggerFactory, + createLogger, + validateLogger, + now + }; + } +}); + +// node_modules/rfdc/index.js +var require_rfdc = __commonJS({ + "node_modules/rfdc/index.js"(exports2, module2) { + "use strict"; + module2.exports = rfdc; + function copyBuffer(cur) { + if (cur instanceof Buffer) { + return Buffer.from(cur); + } + return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length); + } + function rfdc(opts) { + opts = opts || {}; + if (opts.circles) return rfdcCircles(opts); + const constructorHandlers = /* @__PURE__ */ new Map(); + constructorHandlers.set(Date, (o) => new Date(o)); + constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn))); + constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn))); + if (opts.constructorHandlers) { + for (const handler2 of opts.constructorHandlers) { + constructorHandlers.set(handler2[0], handler2[1]); + } + } + let handler = null; + return opts.proto ? cloneProto : clone; + function cloneArray(a, fn) { + const keys = Object.keys(a); + const a2 = new Array(keys.length); + for (let i = 0; i < keys.length; i++) { + const k = keys[i]; + const cur = a[k]; + if (typeof cur !== "object" || cur === null) { + a2[k] = cur; + } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { + a2[k] = handler(cur, fn); + } else if (ArrayBuffer.isView(cur)) { + a2[k] = copyBuffer(cur); + } else { + a2[k] = fn(cur); + } + } + return a2; + } + function clone(o) { + if (typeof o !== "object" || o === null) return o; + if (Array.isArray(o)) return cloneArray(o, clone); + if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) { + return handler(o, clone); + } + const o2 = {}; + for (const k in o) { + if (Object.hasOwnProperty.call(o, k) === false) continue; + const cur = o[k]; + if (typeof cur !== "object" || cur === null) { + o2[k] = cur; + } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { + o2[k] = handler(cur, clone); + } else if (ArrayBuffer.isView(cur)) { + o2[k] = copyBuffer(cur); + } else { + o2[k] = clone(cur); + } + } + return o2; + } + function cloneProto(o) { + if (typeof o !== "object" || o === null) return o; + if (Array.isArray(o)) return cloneArray(o, cloneProto); + if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) { + return handler(o, cloneProto); + } + const o2 = {}; + for (const k in o) { + const cur = o[k]; + if (typeof cur !== "object" || cur === null) { + o2[k] = cur; + } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { + o2[k] = handler(cur, cloneProto); + } else if (ArrayBuffer.isView(cur)) { + o2[k] = copyBuffer(cur); + } else { + o2[k] = cloneProto(cur); + } + } + return o2; + } + } + function rfdcCircles(opts) { + const refs = []; + const refsNew = []; + const constructorHandlers = /* @__PURE__ */ new Map(); + constructorHandlers.set(Date, (o) => new Date(o)); + constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn))); + constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn))); + if (opts.constructorHandlers) { + for (const handler2 of opts.constructorHandlers) { + constructorHandlers.set(handler2[0], handler2[1]); + } + } + let handler = null; + return opts.proto ? cloneProto : clone; + function cloneArray(a, fn) { + const keys = Object.keys(a); + const a2 = new Array(keys.length); + for (let i = 0; i < keys.length; i++) { + const k = keys[i]; + const cur = a[k]; + if (typeof cur !== "object" || cur === null) { + a2[k] = cur; + } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { + a2[k] = handler(cur, fn); + } else if (ArrayBuffer.isView(cur)) { + a2[k] = copyBuffer(cur); + } else { + const index = refs.indexOf(cur); + if (index !== -1) { + a2[k] = refsNew[index]; + } else { + a2[k] = fn(cur); + } + } + } + return a2; + } + function clone(o) { + if (typeof o !== "object" || o === null) return o; + if (Array.isArray(o)) return cloneArray(o, clone); + if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) { + return handler(o, clone); + } + const o2 = {}; + refs.push(o); + refsNew.push(o2); + for (const k in o) { + if (Object.hasOwnProperty.call(o, k) === false) continue; + const cur = o[k]; + if (typeof cur !== "object" || cur === null) { + o2[k] = cur; + } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { + o2[k] = handler(cur, clone); + } else if (ArrayBuffer.isView(cur)) { + o2[k] = copyBuffer(cur); + } else { + const i = refs.indexOf(cur); + if (i !== -1) { + o2[k] = refsNew[i]; + } else { + o2[k] = clone(cur); + } + } + } + refs.pop(); + refsNew.pop(); + return o2; + } + function cloneProto(o) { + if (typeof o !== "object" || o === null) return o; + if (Array.isArray(o)) return cloneArray(o, cloneProto); + if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) { + return handler(o, cloneProto); + } + const o2 = {}; + refs.push(o); + refsNew.push(o2); + for (const k in o) { + const cur = o[k]; + if (typeof cur !== "object" || cur === null) { + o2[k] = cur; + } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { + o2[k] = handler(cur, cloneProto); + } else if (ArrayBuffer.isView(cur)) { + o2[k] = copyBuffer(cur); + } else { + const i = refs.indexOf(cur); + if (i !== -1) { + o2[k] = refsNew[i]; + } else { + o2[k] = cloneProto(cur); + } + } + } + refs.pop(); + refsNew.pop(); + return o2; + } + } + } +}); + +// node_modules/fastify/lib/schemas.js +var require_schemas = __commonJS({ + "node_modules/fastify/lib/schemas.js"(exports2, module2) { + "use strict"; + var fastClone = require_rfdc()({ circles: false, proto: true }); + var { kSchemaVisited, kSchemaResponse } = require_symbols2(); + var kFluentSchema = Symbol.for("fluent-schema-object"); + var { + FST_ERR_SCH_MISSING_ID, + FST_ERR_SCH_ALREADY_PRESENT, + FST_ERR_SCH_DUPLICATE, + FST_ERR_SCH_CONTENT_MISSING_SCHEMA + } = require_errors2(); + var SCHEMAS_SOURCE = ["params", "body", "querystring", "query", "headers"]; + function Schemas(initStore) { + this.store = initStore || {}; + } + Schemas.prototype.add = function(inputSchema) { + const schema = fastClone( + inputSchema.isFluentSchema || inputSchema.isFluentJSONSchema || inputSchema[kFluentSchema] ? inputSchema.valueOf() : inputSchema + ); + const id2 = schema.$id; + if (!id2) { + throw new FST_ERR_SCH_MISSING_ID(); + } + if (this.store[id2]) { + throw new FST_ERR_SCH_ALREADY_PRESENT(id2); + } + this.store[id2] = schema; + }; + Schemas.prototype.getSchemas = function() { + return Object.assign({}, this.store); + }; + Schemas.prototype.getSchema = function(schemaId) { + return this.store[schemaId]; + }; + function isCustomSchemaPrototype(schema) { + return typeof schema === "object" && Object.getPrototypeOf(schema) !== Object.prototype; + } + function normalizeSchema(routeSchemas, serverOptions) { + if (routeSchemas[kSchemaVisited]) { + return routeSchemas; + } + if (routeSchemas.query) { + if (routeSchemas.querystring) { + throw new FST_ERR_SCH_DUPLICATE("querystring"); + } + routeSchemas.querystring = routeSchemas.query; + } + generateFluentSchema(routeSchemas); + for (const key of SCHEMAS_SOURCE) { + const schema = routeSchemas[key]; + if (schema && !isCustomSchemaPrototype(schema)) { + if (key === "body" && schema.content) { + const contentProperty = schema.content; + const keys = Object.keys(contentProperty); + for (let i = 0; i < keys.length; i++) { + const contentType = keys[i]; + const contentSchema = contentProperty[contentType].schema; + if (!contentSchema) { + throw new FST_ERR_SCH_CONTENT_MISSING_SCHEMA(contentType); + } + } + continue; + } + } + } + if (routeSchemas.response) { + const httpCodes = Object.keys(routeSchemas.response); + for (const code of httpCodes) { + if (isCustomSchemaPrototype(routeSchemas.response[code])) { + continue; + } + const contentProperty = routeSchemas.response[code].content; + if (contentProperty) { + const keys = Object.keys(contentProperty); + for (let i = 0; i < keys.length; i++) { + const mediaName = keys[i]; + if (!contentProperty[mediaName].schema) { + throw new FST_ERR_SCH_CONTENT_MISSING_SCHEMA(mediaName); + } + } + } + } + } + routeSchemas[kSchemaVisited] = true; + return routeSchemas; + } + function generateFluentSchema(schema) { + for (const key of SCHEMAS_SOURCE) { + if (schema[key] && (schema[key].isFluentSchema || schema[key][kFluentSchema])) { + schema[key] = schema[key].valueOf(); + } + } + if (schema.response) { + const httpCodes = Object.keys(schema.response); + for (const code of httpCodes) { + if (schema.response[code].isFluentSchema || schema.response[code][kFluentSchema]) { + schema.response[code] = schema.response[code].valueOf(); + } + } + } + } + function getSchemaSerializer(context, statusCode, contentType) { + const responseSchemaDef = context[kSchemaResponse]; + if (!responseSchemaDef) { + return false; + } + if (responseSchemaDef[statusCode]) { + if (responseSchemaDef[statusCode].constructor === Object && contentType) { + const mediaName = contentType.split(";", 1)[0]; + if (responseSchemaDef[statusCode][mediaName]) { + return responseSchemaDef[statusCode][mediaName]; + } + if (responseSchemaDef[statusCode]["*/*"]) { + return responseSchemaDef[statusCode]["*/*"]; + } + return false; + } + return responseSchemaDef[statusCode]; + } + const fallbackStatusCode = (statusCode + "")[0] + "xx"; + if (responseSchemaDef[fallbackStatusCode]) { + if (responseSchemaDef[fallbackStatusCode].constructor === Object && contentType) { + const mediaName = contentType.split(";", 1)[0]; + if (responseSchemaDef[fallbackStatusCode][mediaName]) { + return responseSchemaDef[fallbackStatusCode][mediaName]; + } + if (responseSchemaDef[fallbackStatusCode]["*/*"]) { + return responseSchemaDef[fallbackStatusCode]["*/*"]; + } + return false; + } + return responseSchemaDef[fallbackStatusCode]; + } + if (responseSchemaDef.default) { + if (responseSchemaDef.default.constructor === Object && contentType) { + const mediaName = contentType.split(";", 1)[0]; + if (responseSchemaDef.default[mediaName]) { + return responseSchemaDef.default[mediaName]; + } + if (responseSchemaDef.default["*/*"]) { + return responseSchemaDef.default["*/*"]; + } + return false; + } + return responseSchemaDef.default; + } + return false; + } + module2.exports = { + buildSchemas(initStore) { + return new Schemas(initStore); + }, + getSchemaSerializer, + normalizeSchema + }; + } +}); + +// node_modules/fast-json-stringify/lib/serializer.js +var require_serializer = __commonJS({ + "node_modules/fast-json-stringify/lib/serializer.js"(exports2, module2) { + "use strict"; + var STR_ESCAPE = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/; + module2.exports = class Serializer { + constructor(options) { + switch (options && options.rounding) { + case "floor": + this.parseInteger = Math.floor; + break; + case "ceil": + this.parseInteger = Math.ceil; + break; + case "round": + this.parseInteger = Math.round; + break; + case "trunc": + default: + this.parseInteger = Math.trunc; + break; + } + this._options = options; + } + asInteger(i) { + if (Number.isInteger(i)) { + return "" + i; + } else if (typeof i === "bigint") { + return i.toString(); + } + const integer = this.parseInteger(i); + if (integer === Infinity || integer === -Infinity || integer !== integer) { + throw new Error(`The value "${i}" cannot be converted to an integer.`); + } + return "" + integer; + } + asNumber(i) { + const num = Number(i); + if (num !== num) { + throw new Error(`The value "${i}" cannot be converted to a number.`); + } else if (num === Infinity || num === -Infinity) { + return "null"; + } else { + return "" + num; + } + } + asBoolean(bool) { + return bool && "true" || "false"; + } + asDateTime(date) { + if (date === null) return '""'; + if (date instanceof Date) { + return '"' + date.toISOString() + '"'; + } + if (typeof date === "string") { + return '"' + date + '"'; + } + throw new Error(`The value "${date}" cannot be converted to a date-time.`); + } + asDate(date) { + if (date === null) return '""'; + if (date instanceof Date) { + return '"' + new Date(date.getTime() - date.getTimezoneOffset() * 6e4).toISOString().slice(0, 10) + '"'; + } + if (typeof date === "string") { + return '"' + date + '"'; + } + throw new Error(`The value "${date}" cannot be converted to a date.`); + } + asTime(date) { + if (date === null) return '""'; + if (date instanceof Date) { + return '"' + new Date(date.getTime() - date.getTimezoneOffset() * 6e4).toISOString().slice(11, 19) + '"'; + } + if (typeof date === "string") { + return '"' + date + '"'; + } + throw new Error(`The value "${date}" cannot be converted to a time.`); + } + asString(str) { + const len = str.length; + if (len < 42) { + let result = ""; + let last = -1; + let point = 255; + for (let i = 0; i < len; i++) { + point = str.charCodeAt(i); + if (point === 34 || // '"' + point === 92) { + last === -1 && (last = 0); + result += str.slice(last, i) + "\\"; + last = i; + } else if (point < 32 || point >= 55296 && point <= 57343) { + return JSON.stringify(str); + } + } + return last === -1 && '"' + str + '"' || '"' + result + str.slice(last) + '"'; + } else if (len < 5e3 && STR_ESCAPE.test(str) === false) { + return '"' + str + '"'; + } else { + return JSON.stringify(str); + } + } + asUnsafeString(str) { + return '"' + str + '"'; + } + getState() { + return this._options; + } + static restoreFromState(state) { + return new Serializer(state); + } + }; + } +}); + +// node_modules/fastify/lib/error-serializer.js +var require_error_serializer = __commonJS({ + "node_modules/fastify/lib/error-serializer.js"(exports2, module2) { + "use strict"; + var Serializer = require_serializer(); + var serializerState = { "mode": "standalone" }; + var serializer = Serializer.restoreFromState(serializerState); + var validator = null; + module2.exports = (function anonymous(validator2, serializer2) { + const JSON_STR_BEGIN_OBJECT = "{"; + const JSON_STR_END_OBJECT = "}"; + const JSON_STR_BEGIN_ARRAY = "["; + const JSON_STR_END_ARRAY = "]"; + const JSON_STR_COMMA = ","; + const JSON_STR_COLONS = ":"; + const JSON_STR_QUOTE = '"'; + const JSON_STR_EMPTY_OBJECT = JSON_STR_BEGIN_OBJECT + JSON_STR_END_OBJECT; + const JSON_STR_EMPTY_ARRAY = JSON_STR_BEGIN_ARRAY + JSON_STR_END_ARRAY; + const JSON_STR_EMPTY_STRING = JSON_STR_QUOTE + JSON_STR_QUOTE; + const JSON_STR_NULL = "null"; + function anonymous0(input) { + const obj = input && typeof input.toJSON === "function" ? input.toJSON() : input; + if (obj === null) return JSON_STR_EMPTY_OBJECT; + let value; + let json = JSON_STR_BEGIN_OBJECT; + let addComma = false; + value = obj["statusCode"]; + if (value !== void 0) { + !addComma && (addComma = true) || (json += JSON_STR_COMMA); + json += '"statusCode":'; + json += serializer2.asNumber(value); + } + value = obj["code"]; + if (value !== void 0) { + !addComma && (addComma = true) || (json += JSON_STR_COMMA); + json += '"code":'; + if (typeof value !== "string") { + if (value === null) { + json += JSON_STR_EMPTY_STRING; + } else if (value instanceof Date) { + json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE; + } else if (value instanceof RegExp) { + json += serializer2.asString(value.source); + } else { + json += serializer2.asString(value.toString()); + } + } else { + json += serializer2.asString(value); + } + } + value = obj["error"]; + if (value !== void 0) { + !addComma && (addComma = true) || (json += JSON_STR_COMMA); + json += '"error":'; + if (typeof value !== "string") { + if (value === null) { + json += JSON_STR_EMPTY_STRING; + } else if (value instanceof Date) { + json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE; + } else if (value instanceof RegExp) { + json += serializer2.asString(value.source); + } else { + json += serializer2.asString(value.toString()); + } + } else { + json += serializer2.asString(value); + } + } + value = obj["message"]; + if (value !== void 0) { + !addComma && (addComma = true) || (json += JSON_STR_COMMA); + json += '"message":'; + if (typeof value !== "string") { + if (value === null) { + json += JSON_STR_EMPTY_STRING; + } else if (value instanceof Date) { + json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE; + } else if (value instanceof RegExp) { + json += serializer2.asString(value.source); + } else { + json += serializer2.asString(value.toString()); + } + } else { + json += serializer2.asString(value); + } + } + return json + JSON_STR_END_OBJECT; + } + const main2 = anonymous0; + return main2; + })(validator, serializer); + } +}); + +// node_modules/fastify/lib/error-handler.js +var require_error_handler = __commonJS({ + "node_modules/fastify/lib/error-handler.js"(exports2, module2) { + "use strict"; + var statusCodes = require("node:http").STATUS_CODES; + var wrapThenable = require_wrapThenable(); + var { + kReplyHeaders, + kReplyNextErrorHandler, + kReplyIsRunningOnErrorHook, + kReplyHasStatusCode, + kRouteContext, + kDisableRequestLogging + } = require_symbols2(); + var { + FST_ERR_REP_INVALID_PAYLOAD_TYPE, + FST_ERR_FAILED_ERROR_SERIALIZATION + } = require_errors2(); + var { getSchemaSerializer } = require_schemas(); + var serializeError = require_error_serializer(); + var rootErrorHandler = { + func: defaultErrorHandler, + toJSON() { + return this.func.name.toString() + "()"; + } + }; + function handleError(reply, error, cb) { + reply[kReplyIsRunningOnErrorHook] = false; + const context = reply[kRouteContext]; + if (reply[kReplyNextErrorHandler] === false) { + fallbackErrorHandler(error, reply, function(reply2, payload) { + try { + reply2.raw.writeHead(reply2.raw.statusCode, reply2[kReplyHeaders]); + } catch (error2) { + if (!reply2.log[kDisableRequestLogging]) { + reply2.log.warn( + { req: reply2.request, res: reply2, err: error2 }, + error2?.message + ); + } + reply2.raw.writeHead(reply2.raw.statusCode); + } + reply2.raw.end(payload); + }); + return; + } + const errorHandler = reply[kReplyNextErrorHandler] || context.errorHandler; + reply[kReplyNextErrorHandler] = Object.getPrototypeOf(errorHandler); + delete reply[kReplyHeaders]["content-type"]; + delete reply[kReplyHeaders]["content-length"]; + const func = errorHandler.func; + if (!func) { + reply[kReplyNextErrorHandler] = false; + fallbackErrorHandler(error, reply, cb); + return; + } + try { + const result = func(error, reply.request, reply); + if (result !== void 0) { + if (result !== null && typeof result.then === "function") { + wrapThenable(result, reply); + } else { + reply.send(result); + } + } + } catch (err) { + reply.send(err); + } + } + function defaultErrorHandler(error, request, reply) { + setErrorHeaders(error, reply); + if (!reply[kReplyHasStatusCode] || reply.statusCode === 200) { + const statusCode = error.statusCode || error.status; + reply.code(statusCode >= 400 ? statusCode : 500); + } + if (reply.statusCode < 500) { + if (!reply.log[kDisableRequestLogging]) { + reply.log.info( + { res: reply, err: error }, + error?.message + ); + } + } else { + if (!reply.log[kDisableRequestLogging]) { + reply.log.error( + { req: request, res: reply, err: error }, + error?.message + ); + } + } + reply.send(error); + } + function fallbackErrorHandler(error, reply, cb) { + const res = reply.raw; + const statusCode = reply.statusCode; + reply[kReplyHeaders]["content-type"] = reply[kReplyHeaders]["content-type"] ?? "application/json; charset=utf-8"; + let payload; + try { + const serializerFn = getSchemaSerializer(reply[kRouteContext], statusCode, reply[kReplyHeaders]["content-type"]); + if (serializerFn === false) { + payload = serializeError({ + error: statusCodes[statusCode + ""], + code: error.code, + message: error.message, + statusCode + }); + } else { + payload = serializerFn(Object.create(error, { + error: { value: statusCodes[statusCode + ""] }, + message: { value: error.message }, + statusCode: { value: statusCode } + })); + } + } catch (err) { + if (!reply.log[kDisableRequestLogging]) { + reply.log.error({ err, statusCode: res.statusCode }, "The serializer for the given status code failed"); + } + reply.code(500); + payload = serializeError(new FST_ERR_FAILED_ERROR_SERIALIZATION(err.message, error.message)); + } + if (typeof payload !== "string" && !Buffer.isBuffer(payload)) { + payload = serializeError(new FST_ERR_REP_INVALID_PAYLOAD_TYPE(typeof payload)); + } + reply[kReplyHeaders]["content-length"] = "" + Buffer.byteLength(payload); + cb(reply, payload); + } + function buildErrorHandler(parent = rootErrorHandler, func) { + if (!func) { + return parent; + } + const errorHandler = Object.create(parent); + errorHandler.func = func; + return errorHandler; + } + function setErrorHeaders(error, reply) { + const res = reply.raw; + let statusCode = res.statusCode; + statusCode = statusCode >= 400 ? statusCode : 500; + if (error != null) { + if (error.headers !== void 0) { + reply.headers(error.headers); + } + if (error.status >= 400) { + statusCode = error.status; + } else if (error.statusCode >= 400) { + statusCode = error.statusCode; + } + } + res.statusCode = statusCode; + } + module2.exports = { + buildErrorHandler, + handleError + }; + } +}); + +// node_modules/fastify/lib/decorate.js +var require_decorate = __commonJS({ + "node_modules/fastify/lib/decorate.js"(exports2, module2) { + "use strict"; + var { + kReply, + kRequest, + kState, + kHasBeenDecorated + } = require_symbols2(); + var { + FST_ERR_DEC_ALREADY_PRESENT, + FST_ERR_DEC_MISSING_DEPENDENCY, + FST_ERR_DEC_AFTER_START, + FST_ERR_DEC_REFERENCE_TYPE, + FST_ERR_DEC_DEPENDENCY_INVALID_TYPE, + FST_ERR_DEC_UNDECLARED + } = require_errors2(); + function decorate(instance, name, fn, dependencies) { + if (Object.hasOwn(instance, name)) { + throw new FST_ERR_DEC_ALREADY_PRESENT(name); + } + checkDependencies(instance, name, dependencies); + if (fn && (typeof fn.getter === "function" || typeof fn.setter === "function")) { + Object.defineProperty(instance, name, { + get: fn.getter, + set: fn.setter + }); + } else { + instance[name] = fn; + } + } + function getInstanceDecorator(name) { + if (!checkExistence(this, name)) { + throw new FST_ERR_DEC_UNDECLARED(name, "instance"); + } + if (typeof this[name] === "function") { + return this[name].bind(this); + } + return this[name]; + } + function decorateConstructor(konstructor, name, fn, dependencies) { + const instance = konstructor.prototype; + if (Object.hasOwn(instance, name) || hasKey(konstructor, name)) { + throw new FST_ERR_DEC_ALREADY_PRESENT(name); + } + konstructor[kHasBeenDecorated] = true; + checkDependencies(konstructor, name, dependencies); + if (fn && (typeof fn.getter === "function" || typeof fn.setter === "function")) { + Object.defineProperty(instance, name, { + get: fn.getter, + set: fn.setter + }); + } else if (typeof fn === "function") { + instance[name] = fn; + } else { + konstructor.props.push({ key: name, value: fn }); + } + } + function checkReferenceType(name, fn) { + if (typeof fn === "object" && fn && !(typeof fn.getter === "function" || typeof fn.setter === "function")) { + throw new FST_ERR_DEC_REFERENCE_TYPE(name, typeof fn); + } + } + function decorateFastify(name, fn, dependencies) { + assertNotStarted(this, name); + decorate(this, name, fn, dependencies); + return this; + } + function checkExistence(instance, name) { + if (name) { + return name in instance || instance.prototype && name in instance.prototype || hasKey(instance, name); + } + return instance in this; + } + function hasKey(fn, name) { + if (fn.props) { + return fn.props.find(({ key }) => key === name); + } + return false; + } + function checkRequestExistence(name) { + if (name && hasKey(this[kRequest], name)) return true; + return checkExistence(this[kRequest].prototype, name); + } + function checkReplyExistence(name) { + if (name && hasKey(this[kReply], name)) return true; + return checkExistence(this[kReply].prototype, name); + } + function checkDependencies(instance, name, deps) { + if (deps === void 0 || deps === null) { + return; + } + if (!Array.isArray(deps)) { + throw new FST_ERR_DEC_DEPENDENCY_INVALID_TYPE(name); + } + for (let i = 0; i !== deps.length; ++i) { + if (!checkExistence(instance, deps[i])) { + throw new FST_ERR_DEC_MISSING_DEPENDENCY(deps[i]); + } + } + } + function decorateReply(name, fn, dependencies) { + assertNotStarted(this, name); + checkReferenceType(name, fn); + decorateConstructor(this[kReply], name, fn, dependencies); + return this; + } + function decorateRequest(name, fn, dependencies) { + assertNotStarted(this, name); + checkReferenceType(name, fn); + decorateConstructor(this[kRequest], name, fn, dependencies); + return this; + } + function assertNotStarted(instance, name) { + if (instance[kState].started) { + throw new FST_ERR_DEC_AFTER_START(name); + } + } + module2.exports = { + add: decorateFastify, + exist: checkExistence, + existRequest: checkRequestExistence, + existReply: checkReplyExistence, + dependencies: checkDependencies, + decorateReply, + decorateRequest, + getInstanceDecorator, + hasKey + }; + } +}); + +// node_modules/fastify/lib/reply.js +var require_reply = __commonJS({ + "node_modules/fastify/lib/reply.js"(exports2, module2) { + "use strict"; + var eos = require("node:stream").finished; + var Readable = require("node:stream").Readable; + var { + kFourOhFourContext, + kReplyErrorHandlerCalled, + kReplyHijacked, + kReplyStartTime, + kReplyEndTime, + kReplySerializer, + kReplySerializerDefault, + kReplyIsError, + kReplyHeaders, + kReplyTrailers, + kReplyHasStatusCode, + kReplyIsRunningOnErrorHook, + kReplyNextErrorHandler, + kDisableRequestLogging, + kSchemaResponse, + kReplyCacheSerializeFns, + kSchemaController, + kOptions, + kRouteContext + } = require_symbols2(); + var { + onSendHookRunner, + onResponseHookRunner, + preHandlerHookRunner, + preSerializationHookRunner + } = require_hooks(); + var internals = require_handleRequest()[Symbol.for("internals")]; + var loggerUtils = require_logger_factory(); + var now = loggerUtils.now; + var { handleError } = require_error_handler(); + var { getSchemaSerializer } = require_schemas(); + var CONTENT_TYPE = { + JSON: "application/json; charset=utf-8", + PLAIN: "text/plain; charset=utf-8", + OCTET: "application/octet-stream" + }; + var { + FST_ERR_REP_INVALID_PAYLOAD_TYPE, + FST_ERR_REP_RESPONSE_BODY_CONSUMED, + FST_ERR_REP_READABLE_STREAM_LOCKED, + FST_ERR_REP_ALREADY_SENT, + FST_ERR_SEND_INSIDE_ONERR, + FST_ERR_BAD_STATUS_CODE, + FST_ERR_BAD_TRAILER_NAME, + FST_ERR_BAD_TRAILER_VALUE, + FST_ERR_MISSING_SERIALIZATION_FN, + FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN, + FST_ERR_DEC_UNDECLARED + } = require_errors2(); + var decorators = require_decorate(); + var toString = Object.prototype.toString; + function Reply(res, request, log3) { + this.raw = res; + this[kReplySerializer] = null; + this[kReplyErrorHandlerCalled] = false; + this[kReplyIsError] = false; + this[kReplyIsRunningOnErrorHook] = false; + this.request = request; + this[kReplyHeaders] = {}; + this[kReplyTrailers] = null; + this[kReplyHasStatusCode] = false; + this[kReplyStartTime] = void 0; + this.log = log3; + } + Reply.props = []; + Object.defineProperties(Reply.prototype, { + [kRouteContext]: { + get() { + return this.request[kRouteContext]; + } + }, + elapsedTime: { + get() { + if (this[kReplyStartTime] === void 0) { + return 0; + } + return (this[kReplyEndTime] || now()) - this[kReplyStartTime]; + } + }, + server: { + get() { + return this.request[kRouteContext].server; + } + }, + sent: { + enumerable: true, + get() { + return (this[kReplyHijacked] || this.raw.writableEnded) === true; + } + }, + statusCode: { + get() { + return this.raw.statusCode; + }, + set(value) { + this.code(value); + } + }, + routeOptions: { + get() { + return this.request.routeOptions; + } + } + }); + Reply.prototype.writeEarlyHints = function(hints, callback) { + this.raw.writeEarlyHints(hints, callback); + return this; + }; + Reply.prototype.hijack = function() { + this[kReplyHijacked] = true; + return this; + }; + Reply.prototype.send = function(payload) { + if (this[kReplyIsRunningOnErrorHook]) { + throw new FST_ERR_SEND_INSIDE_ONERR(); + } + if (this.sent === true) { + this.log.warn({ err: new FST_ERR_REP_ALREADY_SENT(this.request.url, this.request.method) }); + return this; + } + if (this[kReplyIsError] || payload instanceof Error) { + this[kReplyIsError] = false; + onErrorHook(this, payload, onSendHook); + return this; + } + if (payload === void 0) { + onSendHook(this, payload); + return this; + } + const contentType = this.getHeader("content-type"); + const hasContentType = contentType !== void 0; + if (payload !== null) { + if ( + // node:stream + typeof payload.pipe === "function" || // node:stream/web + typeof payload.getReader === "function" || // Response + toString.call(payload) === "[object Response]" + ) { + onSendHook(this, payload); + return this; + } + if (payload.buffer instanceof ArrayBuffer) { + if (!hasContentType) { + this[kReplyHeaders]["content-type"] = CONTENT_TYPE.OCTET; + } + const payloadToSend = Buffer.isBuffer(payload) ? payload : Buffer.from(payload.buffer, payload.byteOffset, payload.byteLength); + onSendHook(this, payloadToSend); + return this; + } + if (!hasContentType && typeof payload === "string") { + this[kReplyHeaders]["content-type"] = CONTENT_TYPE.PLAIN; + onSendHook(this, payload); + return this; + } + } + if (this[kReplySerializer] !== null) { + if (typeof payload !== "string") { + preSerializationHook(this, payload); + return this; + } + payload = this[kReplySerializer](payload); + } else if (!hasContentType || contentType.indexOf("json") !== -1) { + if (!hasContentType) { + this[kReplyHeaders]["content-type"] = CONTENT_TYPE.JSON; + } else if (contentType.indexOf("charset") === -1) { + const customContentType = contentType.trim(); + if (customContentType.endsWith(";")) { + this[kReplyHeaders]["content-type"] = `${customContentType} charset=utf-8`; + } else { + this[kReplyHeaders]["content-type"] = `${customContentType}; charset=utf-8`; + } + } + if (typeof payload !== "string") { + preSerializationHook(this, payload); + return this; + } + } + onSendHook(this, payload); + return this; + }; + Reply.prototype.getHeader = function(key) { + key = key.toLowerCase(); + const value = this[kReplyHeaders][key]; + return value !== void 0 ? value : this.raw.getHeader(key); + }; + Reply.prototype.getHeaders = function() { + return { + ...this.raw.getHeaders(), + ...this[kReplyHeaders] + }; + }; + Reply.prototype.hasHeader = function(key) { + key = key.toLowerCase(); + return this[kReplyHeaders][key] !== void 0 || this.raw.hasHeader(key); + }; + Reply.prototype.removeHeader = function(key) { + delete this[kReplyHeaders][key.toLowerCase()]; + return this; + }; + Reply.prototype.header = function(key, value = "") { + key = key.toLowerCase(); + if (this[kReplyHeaders][key] && key === "set-cookie") { + if (typeof this[kReplyHeaders][key] === "string") { + this[kReplyHeaders][key] = [this[kReplyHeaders][key]]; + } + if (Array.isArray(value)) { + Array.prototype.push.apply(this[kReplyHeaders][key], value); + } else { + this[kReplyHeaders][key].push(value); + } + } else { + this[kReplyHeaders][key] = value; + } + return this; + }; + Reply.prototype.headers = function(headers) { + const keys = Object.keys(headers); + for (let i = 0; i !== keys.length; ++i) { + const key = keys[i]; + this.header(key, headers[key]); + } + return this; + }; + var INVALID_TRAILERS = /* @__PURE__ */ new Set([ + "transfer-encoding", + "content-length", + "host", + "cache-control", + "max-forwards", + "te", + "authorization", + "set-cookie", + "content-encoding", + "content-type", + "content-range", + "trailer" + ]); + Reply.prototype.trailer = function(key, fn) { + key = key.toLowerCase(); + if (INVALID_TRAILERS.has(key)) { + throw new FST_ERR_BAD_TRAILER_NAME(key); + } + if (typeof fn !== "function") { + throw new FST_ERR_BAD_TRAILER_VALUE(key, typeof fn); + } + if (this[kReplyTrailers] === null) this[kReplyTrailers] = {}; + this[kReplyTrailers][key] = fn; + return this; + }; + Reply.prototype.hasTrailer = function(key) { + return this[kReplyTrailers]?.[key.toLowerCase()] !== void 0; + }; + Reply.prototype.removeTrailer = function(key) { + if (this[kReplyTrailers] === null) return this; + this[kReplyTrailers][key.toLowerCase()] = void 0; + return this; + }; + Reply.prototype.code = function(code) { + const statusCode = +code; + if (!(statusCode >= 100 && statusCode <= 599)) { + throw new FST_ERR_BAD_STATUS_CODE(code || String(code)); + } + this.raw.statusCode = statusCode; + this[kReplyHasStatusCode] = true; + return this; + }; + Reply.prototype.status = Reply.prototype.code; + Reply.prototype.getSerializationFunction = function(schemaOrStatus, contentType) { + let serialize2; + if (typeof schemaOrStatus === "string" || typeof schemaOrStatus === "number") { + if (typeof contentType === "string") { + serialize2 = this[kRouteContext][kSchemaResponse]?.[schemaOrStatus]?.[contentType]; + } else { + serialize2 = this[kRouteContext][kSchemaResponse]?.[schemaOrStatus]; + } + } else if (typeof schemaOrStatus === "object") { + serialize2 = this[kRouteContext][kReplyCacheSerializeFns]?.get(schemaOrStatus); + } + return serialize2; + }; + Reply.prototype.compileSerializationSchema = function(schema, httpStatus = null, contentType = null) { + const { request } = this; + const { method, url } = request; + if (this[kRouteContext][kReplyCacheSerializeFns]?.has(schema)) { + return this[kRouteContext][kReplyCacheSerializeFns].get(schema); + } + const serializerCompiler = this[kRouteContext].serializerCompiler || this.server[kSchemaController].serializerCompiler || // We compile the schemas if no custom serializerCompiler is provided + // nor set + (this.server[kSchemaController].setupSerializer(this.server[kOptions]) || this.server[kSchemaController].serializerCompiler); + const serializeFn = serializerCompiler({ + schema, + method, + url, + httpStatus, + contentType + }); + if (this[kRouteContext][kReplyCacheSerializeFns] == null) { + this[kRouteContext][kReplyCacheSerializeFns] = /* @__PURE__ */ new WeakMap(); + } + this[kRouteContext][kReplyCacheSerializeFns].set(schema, serializeFn); + return serializeFn; + }; + Reply.prototype.serializeInput = function(input, schema, httpStatus, contentType) { + const possibleContentType = httpStatus; + let serialize2; + httpStatus = typeof schema === "string" || typeof schema === "number" ? schema : httpStatus; + contentType = httpStatus && possibleContentType !== httpStatus ? possibleContentType : contentType; + if (httpStatus != null) { + if (contentType != null) { + serialize2 = this[kRouteContext][kSchemaResponse]?.[httpStatus]?.[contentType]; + } else { + serialize2 = this[kRouteContext][kSchemaResponse]?.[httpStatus]; + } + if (serialize2 == null) { + if (contentType) throw new FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN(httpStatus, contentType); + throw new FST_ERR_MISSING_SERIALIZATION_FN(httpStatus); + } + } else { + if (this[kRouteContext][kReplyCacheSerializeFns]?.has(schema)) { + serialize2 = this[kRouteContext][kReplyCacheSerializeFns].get(schema); + } else { + serialize2 = this.compileSerializationSchema(schema, httpStatus, contentType); + } + } + return serialize2(input); + }; + Reply.prototype.serialize = function(payload) { + if (this[kReplySerializer] !== null) { + return this[kReplySerializer](payload); + } else { + if (this[kRouteContext] && this[kRouteContext][kReplySerializerDefault]) { + return this[kRouteContext][kReplySerializerDefault](payload, this.raw.statusCode); + } else { + return serialize(this[kRouteContext], payload, this.raw.statusCode); + } + } + }; + Reply.prototype.serializer = function(fn) { + this[kReplySerializer] = fn; + return this; + }; + Reply.prototype.type = function(type) { + this[kReplyHeaders]["content-type"] = type; + return this; + }; + Reply.prototype.redirect = function(url, code) { + if (!code) { + code = this[kReplyHasStatusCode] ? this.raw.statusCode : 302; + } + return this.header("location", url).code(code).send(); + }; + Reply.prototype.callNotFound = function() { + notFound(this); + return this; + }; + Reply.prototype.then = function(fulfilled, rejected) { + if (this.sent) { + fulfilled(); + return; + } + eos(this.raw, (err) => { + if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") { + if (rejected) { + rejected(err); + } else { + this.log && this.log.warn("unhandled rejection on reply.then"); + } + } else { + fulfilled(); + } + }); + }; + Reply.prototype.getDecorator = function(name) { + if (!decorators.hasKey(this, name) && !decorators.exist(this, name)) { + throw new FST_ERR_DEC_UNDECLARED(name, "reply"); + } + const decorator = this[name]; + if (typeof decorator === "function") { + return decorator.bind(this); + } + return decorator; + }; + function preSerializationHook(reply, payload) { + if (reply[kRouteContext].preSerialization !== null) { + preSerializationHookRunner( + reply[kRouteContext].preSerialization, + reply.request, + reply, + payload, + preSerializationHookEnd + ); + } else { + preSerializationHookEnd(null, void 0, reply, payload); + } + } + function preSerializationHookEnd(err, _request, reply, payload) { + if (err != null) { + onErrorHook(reply, err); + return; + } + try { + if (reply[kReplySerializer] !== null) { + payload = reply[kReplySerializer](payload); + } else if (reply[kRouteContext] && reply[kRouteContext][kReplySerializerDefault]) { + payload = reply[kRouteContext][kReplySerializerDefault](payload, reply.raw.statusCode); + } else { + payload = serialize(reply[kRouteContext], payload, reply.raw.statusCode, reply[kReplyHeaders]["content-type"]); + } + } catch (e) { + wrapSerializationError(e, reply); + onErrorHook(reply, e); + return; + } + onSendHook(reply, payload); + } + function wrapSerializationError(error, reply) { + error.serialization = reply[kRouteContext].config; + } + function onSendHook(reply, payload) { + if (reply[kRouteContext].onSend !== null) { + onSendHookRunner( + reply[kRouteContext].onSend, + reply.request, + reply, + payload, + wrapOnSendEnd + ); + } else { + onSendEnd(reply, payload); + } + } + function wrapOnSendEnd(err, request, reply, payload) { + if (err != null) { + onErrorHook(reply, err); + } else { + onSendEnd(reply, payload); + } + } + function safeWriteHead(reply, statusCode) { + const res = reply.raw; + try { + res.writeHead(statusCode, reply[kReplyHeaders]); + } catch (err) { + if (err.code === "ERR_HTTP_HEADERS_SENT") { + reply.log.warn(`Reply was already sent, did you forget to "return reply" in the "${reply.request.raw.url}" (${reply.request.raw.method}) route?`); + } + throw err; + } + } + function onSendEnd(reply, payload) { + const res = reply.raw; + const req = reply.request; + if (reply[kReplyTrailers] !== null) { + const trailerHeaders = Object.keys(reply[kReplyTrailers]); + let header = ""; + for (const trailerName of trailerHeaders) { + if (typeof reply[kReplyTrailers][trailerName] !== "function") continue; + header += " "; + header += trailerName; + } + reply.header("Transfer-Encoding", "chunked"); + reply.header("Trailer", header.trim()); + } + if (toString.call(payload) === "[object Response]") { + if (typeof payload.status === "number") { + reply.code(payload.status); + } + if (typeof payload.headers === "object" && typeof payload.headers.forEach === "function") { + for (const [headerName, headerValue] of payload.headers) { + reply.header(headerName, headerValue); + } + } + if (payload.body !== null) { + if (payload.bodyUsed) { + throw new FST_ERR_REP_RESPONSE_BODY_CONSUMED(); + } + } + payload = payload.body; + } + const statusCode = res.statusCode; + if (payload === void 0 || payload === null) { + if (statusCode >= 200 && statusCode !== 204 && statusCode !== 304 && req.method !== "HEAD" && reply[kReplyTrailers] === null) { + reply[kReplyHeaders]["content-length"] = "0"; + } + safeWriteHead(reply, statusCode); + sendTrailer(payload, res, reply); + return; + } + if (statusCode >= 100 && statusCode < 200 || statusCode === 204) { + reply.removeHeader("content-type"); + reply.removeHeader("content-length"); + safeWriteHead(reply, statusCode); + sendTrailer(void 0, res, reply); + if (typeof payload.resume === "function") { + payload.on("error", noop); + payload.resume(); + } + return; + } + if (typeof payload.pipe === "function") { + sendStream(payload, res, reply); + return; + } + if (typeof payload.getReader === "function") { + sendWebStream(payload, res, reply); + return; + } + if (typeof payload !== "string" && !Buffer.isBuffer(payload)) { + throw new FST_ERR_REP_INVALID_PAYLOAD_TYPE(typeof payload); + } + if (reply[kReplyTrailers] === null) { + const contentLength = reply[kReplyHeaders]["content-length"]; + if (!contentLength || req.raw.method !== "HEAD" && Number(contentLength) !== Buffer.byteLength(payload)) { + reply[kReplyHeaders]["content-length"] = "" + Buffer.byteLength(payload); + } + } + safeWriteHead(reply, statusCode); + res.write(payload); + sendTrailer(payload, res, reply); + } + function logStreamError(logger, err, res) { + if (err.code === "ERR_STREAM_PREMATURE_CLOSE") { + if (!logger[kDisableRequestLogging]) { + logger.info({ res }, "stream closed prematurely"); + } + } else { + logger.warn({ err }, "response terminated with an error with headers already sent"); + } + } + function sendWebStream(payload, res, reply) { + if (payload.locked) { + throw FST_ERR_REP_READABLE_STREAM_LOCKED(); + } + const nodeStream = Readable.fromWeb(payload); + sendStream(nodeStream, res, reply); + } + function sendStream(payload, res, reply) { + let sourceOpen = true; + let errorLogged = false; + sendStreamTrailer(payload, res, reply); + eos(payload, { readable: true, writable: false }, function(err) { + sourceOpen = false; + if (err != null) { + if (res.headersSent || reply.request.raw.aborted === true) { + if (!errorLogged) { + errorLogged = true; + logStreamError(reply.log, err, reply); + } + res.destroy(); + } else { + onErrorHook(reply, err); + } + } + }); + eos(res, function(err) { + if (sourceOpen) { + if (err != null && res.headersSent && !errorLogged) { + errorLogged = true; + logStreamError(reply.log, err, res); + } + if (typeof payload.destroy === "function") { + payload.destroy(); + } else if (typeof payload.close === "function") { + payload.close(noop); + } else if (typeof payload.abort === "function") { + payload.abort(); + } else { + reply.log.warn("stream payload does not end properly"); + } + } + }); + if (!res.headersSent) { + for (const key in reply[kReplyHeaders]) { + res.setHeader(key, reply[kReplyHeaders][key]); + } + } else { + reply.log.warn("response will send, but you shouldn't use res.writeHead in stream mode"); + } + payload.pipe(res); + } + function sendTrailer(payload, res, reply) { + if (reply[kReplyTrailers] === null) { + res.end(null, null, null); + return; + } + const trailerHeaders = Object.keys(reply[kReplyTrailers]); + const trailers = {}; + let handled = 0; + let skipped = true; + function send() { + if (handled === 0) { + res.addTrailers(trailers); + res.end(null, null, null); + } + } + for (const trailerName of trailerHeaders) { + let cb = function(err, value) { + handled++; + if (err) reply.log.debug(err); + else trailers[trailerName] = value; + process.nextTick(send); + }; + if (typeof reply[kReplyTrailers][trailerName] !== "function") continue; + skipped = false; + handled--; + const result = reply[kReplyTrailers][trailerName](reply, payload, cb); + if (typeof result === "object" && typeof result.then === "function") { + result.then((v) => cb(null, v), cb); + } + } + if (skipped) res.end(null, null, null); + } + function sendStreamTrailer(payload, res, reply) { + if (reply[kReplyTrailers] === null) return; + payload.on("end", () => sendTrailer(null, res, reply)); + } + function onErrorHook(reply, error, cb) { + if (reply[kRouteContext].onError !== null && !reply[kReplyNextErrorHandler]) { + reply[kReplyIsRunningOnErrorHook] = true; + onSendHookRunner( + reply[kRouteContext].onError, + reply.request, + reply, + error, + () => handleError(reply, error, cb) + ); + } else { + handleError(reply, error, cb); + } + } + function setupResponseListeners(reply) { + reply[kReplyStartTime] = now(); + const onResFinished = (err) => { + reply[kReplyEndTime] = now(); + reply.raw.removeListener("finish", onResFinished); + reply.raw.removeListener("error", onResFinished); + const ctx = reply[kRouteContext]; + if (ctx && ctx.onResponse !== null) { + onResponseHookRunner( + ctx.onResponse, + reply.request, + reply, + onResponseCallback + ); + } else { + onResponseCallback(err, reply.request, reply); + } + }; + reply.raw.on("finish", onResFinished); + reply.raw.on("error", onResFinished); + } + function onResponseCallback(err, request, reply) { + if (reply.log[kDisableRequestLogging]) { + return; + } + const responseTime = reply.elapsedTime; + if (err != null) { + reply.log.error({ + res: reply, + err, + responseTime + }, "request errored"); + return; + } + reply.log.info({ + res: reply, + responseTime + }, "request completed"); + } + function buildReply(R) { + const props = R.props.slice(); + function _Reply(res, request, log3) { + this.raw = res; + this[kReplyIsError] = false; + this[kReplyErrorHandlerCalled] = false; + this[kReplyHijacked] = false; + this[kReplySerializer] = null; + this.request = request; + this[kReplyHeaders] = {}; + this[kReplyTrailers] = null; + this[kReplyStartTime] = void 0; + this[kReplyEndTime] = void 0; + this.log = log3; + let prop; + for (let i = 0; i < props.length; i++) { + prop = props[i]; + this[prop.key] = prop.value; + } + } + Object.setPrototypeOf(_Reply.prototype, R.prototype); + Object.setPrototypeOf(_Reply, R); + _Reply.parent = R; + _Reply.props = props; + return _Reply; + } + function notFound(reply) { + if (reply[kRouteContext][kFourOhFourContext] === null) { + reply.log.warn("Trying to send a NotFound error inside a 404 handler. Sending basic 404 response."); + reply.code(404).send("404 Not Found"); + return; + } + reply.request[kRouteContext] = reply[kRouteContext][kFourOhFourContext]; + if (reply[kRouteContext].preHandler !== null) { + preHandlerHookRunner( + reply[kRouteContext].preHandler, + reply.request, + reply, + internals.preHandlerCallback + ); + } else { + internals.preHandlerCallback(null, reply.request, reply); + } + } + function serialize(context, data, statusCode, contentType) { + const fnSerialize = getSchemaSerializer(context, statusCode, contentType); + if (fnSerialize) { + return fnSerialize(data); + } + return JSON.stringify(data); + } + function noop() { + } + module2.exports = Reply; + module2.exports.buildReply = buildReply; + module2.exports.setupResponseListeners = setupResponseListeners; + } +}); + +// node_modules/@fastify/forwarded/index.js +var require_forwarded = __commonJS({ + "node_modules/@fastify/forwarded/index.js"(exports2, module2) { + "use strict"; + function forwarded(req) { + if (!req) { + throw new TypeError("argument req is required"); + } + const header = req.headers["x-forwarded-for"]; + const socketAddr = req.socket.remoteAddress; + if (!header || typeof header !== "string") { + return [socketAddr]; + } else if (header.indexOf(",") === -1) { + const remote = header.trim(); + return remote.length ? [socketAddr, remote] : [socketAddr]; + } else { + return parse(header, socketAddr); + } + } + function parse(header, socketAddr) { + const result = [socketAddr]; + let end = header.length; + let start = end; + let char; + let i; + for (i = end - 1; i >= 0; --i) { + char = header[i]; + if (char === " ") { + start === end && (start = end = i); + } else if (char === ",") { + start !== end && result.push(header.slice(start, end)); + start = end = i; + } else { + start = i; + } + } + start !== end && result.push(header.substring(start, end)); + return result; + } + module2.exports = forwarded; + module2.exports.default = forwarded; + module2.exports.forwarded = forwarded; + } +}); + +// node_modules/ipaddr.js/lib/ipaddr.js +var require_ipaddr = __commonJS({ + "node_modules/ipaddr.js/lib/ipaddr.js"(exports2, module2) { + (function(root) { + "use strict"; + const ipv4Part = "(0?\\d+|0x[a-f0-9]+)"; + const ipv4Regexes = { + fourOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}$`, "i"), + threeOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}$`, "i"), + twoOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}$`, "i"), + longValue: new RegExp(`^${ipv4Part}$`, "i") + }; + const octalRegex = new RegExp(`^0[0-7]+$`, "i"); + const hexRegex = new RegExp(`^0x[a-f0-9]+$`, "i"); + const zoneIndex = "%[0-9a-z]{1,}"; + const ipv6Part = "(?:[0-9a-f]+::?)+"; + const ipv6Regexes = { + zoneIndex: new RegExp(zoneIndex, "i"), + "native": new RegExp(`^(::)?(${ipv6Part})?([0-9a-f]+)?(::)?(${zoneIndex})?$`, "i"), + deprecatedTransitional: new RegExp(`^(?:::)(${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}(${zoneIndex})?)$`, "i"), + transitional: new RegExp(`^((?:${ipv6Part})|(?:::)(?:${ipv6Part})?)${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}(${zoneIndex})?$`, "i") + }; + function expandIPv6(string, parts) { + if (string.indexOf("::") !== string.lastIndexOf("::")) { + return null; + } + let colonCount = 0; + let lastColon = -1; + let zoneId = (string.match(ipv6Regexes.zoneIndex) || [])[0]; + let replacement, replacementCount; + if (zoneId) { + zoneId = zoneId.substring(1); + string = string.replace(/%.+$/, ""); + } + while ((lastColon = string.indexOf(":", lastColon + 1)) >= 0) { + colonCount++; + } + if (string.substr(0, 2) === "::") { + colonCount--; + } + if (string.substr(-2, 2) === "::") { + colonCount--; + } + if (colonCount > parts) { + return null; + } + replacementCount = parts - colonCount; + replacement = ":"; + while (replacementCount--) { + replacement += "0:"; + } + string = string.replace("::", replacement); + if (string[0] === ":") { + string = string.slice(1); + } + if (string[string.length - 1] === ":") { + string = string.slice(0, -1); + } + parts = (function() { + const ref = string.split(":"); + const results = []; + for (let i = 0; i < ref.length; i++) { + results.push(parseInt(ref[i], 16)); + } + return results; + })(); + return { + parts, + zoneId + }; + } + function matchCIDR(first, second, partSize, cidrBits) { + if (first.length !== second.length) { + throw new Error("ipaddr: cannot match CIDR for objects with different lengths"); + } + let part = 0; + let shift; + while (cidrBits > 0) { + shift = partSize - cidrBits; + if (shift < 0) { + shift = 0; + } + if (first[part] >> shift !== second[part] >> shift) { + return false; + } + cidrBits -= partSize; + part += 1; + } + return true; + } + function parseIntAuto(string) { + if (hexRegex.test(string)) { + return parseInt(string, 16); + } + if (string[0] === "0" && !isNaN(parseInt(string[1], 10))) { + if (octalRegex.test(string)) { + return parseInt(string, 8); + } + throw new Error(`ipaddr: cannot parse ${string} as octal`); + } + return parseInt(string, 10); + } + function padPart(part, length) { + while (part.length < length) { + part = `0${part}`; + } + return part; + } + const ipaddr = {}; + ipaddr.IPv4 = (function() { + function IPv4(octets) { + if (octets.length !== 4) { + throw new Error("ipaddr: ipv4 octet count should be 4"); + } + let i, octet; + for (i = 0; i < octets.length; i++) { + octet = octets[i]; + if (!(0 <= octet && octet <= 255)) { + throw new Error("ipaddr: ipv4 octet should fit in 8 bits"); + } + } + this.octets = octets; + } + IPv4.prototype.SpecialRanges = { + unspecified: [[new IPv4([0, 0, 0, 0]), 8]], + broadcast: [[new IPv4([255, 255, 255, 255]), 32]], + // RFC3171 + multicast: [[new IPv4([224, 0, 0, 0]), 4]], + // RFC3927 + linkLocal: [[new IPv4([169, 254, 0, 0]), 16]], + // RFC5735 + loopback: [[new IPv4([127, 0, 0, 0]), 8]], + // RFC6598 + carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]], + // RFC1918 + "private": [ + [new IPv4([10, 0, 0, 0]), 8], + [new IPv4([172, 16, 0, 0]), 12], + [new IPv4([192, 168, 0, 0]), 16] + ], + // Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700 + reserved: [ + [new IPv4([192, 0, 0, 0]), 24], + [new IPv4([192, 0, 2, 0]), 24], + [new IPv4([192, 88, 99, 0]), 24], + [new IPv4([198, 18, 0, 0]), 15], + [new IPv4([198, 51, 100, 0]), 24], + [new IPv4([203, 0, 113, 0]), 24], + [new IPv4([240, 0, 0, 0]), 4] + ], + // RFC7534, RFC7535 + as112: [ + [new IPv4([192, 175, 48, 0]), 24], + [new IPv4([192, 31, 196, 0]), 24] + ], + // RFC7450 + amt: [ + [new IPv4([192, 52, 193, 0]), 24] + ] + }; + IPv4.prototype.kind = function() { + return "ipv4"; + }; + IPv4.prototype.match = function(other, cidrRange) { + let ref; + if (cidrRange === void 0) { + ref = other; + other = ref[0]; + cidrRange = ref[1]; + } + if (other.kind() !== "ipv4") { + throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one"); + } + return matchCIDR(this.octets, other.octets, 8, cidrRange); + }; + IPv4.prototype.prefixLengthFromSubnetMask = function() { + let cidr = 0; + let stop = false; + const zerotable = { + 0: 8, + 128: 7, + 192: 6, + 224: 5, + 240: 4, + 248: 3, + 252: 2, + 254: 1, + 255: 0 + }; + let i, octet, zeros; + for (i = 3; i >= 0; i -= 1) { + octet = this.octets[i]; + if (octet in zerotable) { + zeros = zerotable[octet]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 8) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 32 - cidr; + }; + IPv4.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + IPv4.prototype.toByteArray = function() { + return this.octets.slice(0); + }; + IPv4.prototype.toIPv4MappedAddress = function() { + return ipaddr.IPv6.parse(`::ffff:${this.toString()}`); + }; + IPv4.prototype.toNormalizedString = function() { + return this.toString(); + }; + IPv4.prototype.toString = function() { + return this.octets.join("."); + }; + return IPv4; + })(); + ipaddr.IPv4.broadcastAddressFromCIDR = function(string) { + try { + const cidr = this.parseCIDR(string); + const ipInterfaceOctets = cidr[0].toByteArray(); + const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + const octets = []; + let i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255); + i++; + } + return new this(octets); + } catch (e) { + throw new Error("ipaddr: the address does not have IPv4 CIDR format"); + } + }; + ipaddr.IPv4.isIPv4 = function(string) { + return this.parser(string) !== null; + }; + ipaddr.IPv4.isValid = function(string) { + try { + new this(this.parser(string)); + return true; + } catch (e) { + return false; + } + }; + ipaddr.IPv4.isValidCIDR = function(string) { + try { + this.parseCIDR(string); + return true; + } catch (e) { + return false; + } + }; + ipaddr.IPv4.isValidFourPartDecimal = function(string) { + if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) { + return true; + } else { + return false; + } + }; + ipaddr.IPv4.networkAddressFromCIDR = function(string) { + let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10)); + i++; + } + return new this(octets); + } catch (e) { + throw new Error("ipaddr: the address does not have IPv4 CIDR format"); + } + }; + ipaddr.IPv4.parse = function(string) { + const parts = this.parser(string); + if (parts === null) { + throw new Error("ipaddr: string is not formatted like an IPv4 Address"); + } + return new this(parts); + }; + ipaddr.IPv4.parseCIDR = function(string) { + let match; + if (match = string.match(/^(.+)\/(\d+)$/)) { + const maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 32) { + const parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, "toString", { + value: function() { + return this.join("/"); + } + }); + return parsed; + } + } + throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range"); + }; + ipaddr.IPv4.parser = function(string) { + let match, part, value; + if (match = string.match(ipv4Regexes.fourOctet)) { + return (function() { + const ref = match.slice(1, 6); + const results = []; + for (let i = 0; i < ref.length; i++) { + part = ref[i]; + results.push(parseIntAuto(part)); + } + return results; + })(); + } else if (match = string.match(ipv4Regexes.longValue)) { + value = parseIntAuto(match[1]); + if (value > 4294967295 || value < 0) { + throw new Error("ipaddr: address outside defined range"); + } + return (function() { + const results = []; + let shift; + for (shift = 0; shift <= 24; shift += 8) { + results.push(value >> shift & 255); + } + return results; + })().reverse(); + } else if (match = string.match(ipv4Regexes.twoOctet)) { + return (function() { + const ref = match.slice(1, 4); + const results = []; + value = parseIntAuto(ref[1]); + if (value > 16777215 || value < 0) { + throw new Error("ipaddr: address outside defined range"); + } + results.push(parseIntAuto(ref[0])); + results.push(value >> 16 & 255); + results.push(value >> 8 & 255); + results.push(value & 255); + return results; + })(); + } else if (match = string.match(ipv4Regexes.threeOctet)) { + return (function() { + const ref = match.slice(1, 5); + const results = []; + value = parseIntAuto(ref[2]); + if (value > 65535 || value < 0) { + throw new Error("ipaddr: address outside defined range"); + } + results.push(parseIntAuto(ref[0])); + results.push(parseIntAuto(ref[1])); + results.push(value >> 8 & 255); + results.push(value & 255); + return results; + })(); + } else { + return null; + } + }; + ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) { + prefix = parseInt(prefix); + if (prefix < 0 || prefix > 32) { + throw new Error("ipaddr: invalid IPv4 prefix length"); + } + const octets = [0, 0, 0, 0]; + let j = 0; + const filledOctetCount = Math.floor(prefix / 8); + while (j < filledOctetCount) { + octets[j] = 255; + j++; + } + if (filledOctetCount < 4) { + octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - prefix % 8; + } + return new this(octets); + }; + ipaddr.IPv6 = (function() { + function IPv6(parts, zoneId) { + let i, part; + if (parts.length === 16) { + this.parts = []; + for (i = 0; i <= 14; i += 2) { + this.parts.push(parts[i] << 8 | parts[i + 1]); + } + } else if (parts.length === 8) { + this.parts = parts; + } else { + throw new Error("ipaddr: ipv6 part count should be 8 or 16"); + } + for (i = 0; i < this.parts.length; i++) { + part = this.parts[i]; + if (!(0 <= part && part <= 65535)) { + throw new Error("ipaddr: ipv6 part should fit in 16 bits"); + } + } + if (zoneId) { + this.zoneId = zoneId; + } + } + IPv6.prototype.SpecialRanges = { + // RFC4291, here and after + unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128], + linkLocal: [new IPv6([65152, 0, 0, 0, 0, 0, 0, 0]), 10], + multicast: [new IPv6([65280, 0, 0, 0, 0, 0, 0, 0]), 8], + loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128], + uniqueLocal: [new IPv6([64512, 0, 0, 0, 0, 0, 0, 0]), 7], + ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 65535, 0, 0]), 96], + // RFC6666 + discard: [new IPv6([256, 0, 0, 0, 0, 0, 0, 0]), 64], + // RFC6145 + rfc6145: [new IPv6([0, 0, 0, 0, 65535, 0, 0, 0]), 96], + // RFC6052 + rfc6052: [new IPv6([100, 65435, 0, 0, 0, 0, 0, 0]), 96], + // RFC3056 + "6to4": [new IPv6([8194, 0, 0, 0, 0, 0, 0, 0]), 16], + // RFC6052, RFC6146 + teredo: [new IPv6([8193, 0, 0, 0, 0, 0, 0, 0]), 32], + // RFC5180 + benchmarking: [new IPv6([8193, 2, 0, 0, 0, 0, 0, 0]), 48], + // RFC7450 + amt: [new IPv6([8193, 3, 0, 0, 0, 0, 0, 0]), 32], + as112v6: [ + [new IPv6([8193, 4, 274, 0, 0, 0, 0, 0]), 48], + [new IPv6([9760, 79, 32768, 0, 0, 0, 0, 0]), 48] + ], + deprecated: [new IPv6([8193, 16, 0, 0, 0, 0, 0, 0]), 28], + orchid2: [new IPv6([8193, 32, 0, 0, 0, 0, 0, 0]), 28], + droneRemoteIdProtocolEntityTags: [new IPv6([8193, 48, 0, 0, 0, 0, 0, 0]), 28], + reserved: [ + // RFC3849 + [new IPv6([8193, 0, 0, 0, 0, 0, 0, 0]), 23], + // RFC2928 + [new IPv6([8193, 3512, 0, 0, 0, 0, 0, 0]), 32] + ] + }; + IPv6.prototype.isIPv4MappedAddress = function() { + return this.range() === "ipv4Mapped"; + }; + IPv6.prototype.kind = function() { + return "ipv6"; + }; + IPv6.prototype.match = function(other, cidrRange) { + let ref; + if (cidrRange === void 0) { + ref = other; + other = ref[0]; + cidrRange = ref[1]; + } + if (other.kind() !== "ipv6") { + throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one"); + } + return matchCIDR(this.parts, other.parts, 16, cidrRange); + }; + IPv6.prototype.prefixLengthFromSubnetMask = function() { + let cidr = 0; + let stop = false; + const zerotable = { + 0: 16, + 32768: 15, + 49152: 14, + 57344: 13, + 61440: 12, + 63488: 11, + 64512: 10, + 65024: 9, + 65280: 8, + 65408: 7, + 65472: 6, + 65504: 5, + 65520: 4, + 65528: 3, + 65532: 2, + 65534: 1, + 65535: 0 + }; + let part, zeros; + for (let i = 7; i >= 0; i -= 1) { + part = this.parts[i]; + if (part in zerotable) { + zeros = zerotable[part]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 16) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 128 - cidr; + }; + IPv6.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + IPv6.prototype.toByteArray = function() { + let part; + const bytes = []; + const ref = this.parts; + for (let i = 0; i < ref.length; i++) { + part = ref[i]; + bytes.push(part >> 8); + bytes.push(part & 255); + } + return bytes; + }; + IPv6.prototype.toFixedLengthString = function() { + const addr = (function() { + const results = []; + for (let i = 0; i < this.parts.length; i++) { + results.push(padPart(this.parts[i].toString(16), 4)); + } + return results; + }).call(this).join(":"); + let suffix = ""; + if (this.zoneId) { + suffix = `%${this.zoneId}`; + } + return addr + suffix; + }; + IPv6.prototype.toIPv4Address = function() { + if (!this.isIPv4MappedAddress()) { + throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4"); + } + const ref = this.parts.slice(-2); + const high = ref[0]; + const low = ref[1]; + return new ipaddr.IPv4([high >> 8, high & 255, low >> 8, low & 255]); + }; + IPv6.prototype.toNormalizedString = function() { + const addr = (function() { + const results = []; + for (let i = 0; i < this.parts.length; i++) { + results.push(this.parts[i].toString(16)); + } + return results; + }).call(this).join(":"); + let suffix = ""; + if (this.zoneId) { + suffix = `%${this.zoneId}`; + } + return addr + suffix; + }; + IPv6.prototype.toRFC5952String = function() { + const regex = /((^|:)(0(:|$)){2,})/g; + const string = this.toNormalizedString(); + let bestMatchIndex = 0; + let bestMatchLength = -1; + let match; + while (match = regex.exec(string)) { + if (match[0].length > bestMatchLength) { + bestMatchIndex = match.index; + bestMatchLength = match[0].length; + } + } + if (bestMatchLength < 0) { + return string; + } + return `${string.substring(0, bestMatchIndex)}::${string.substring(bestMatchIndex + bestMatchLength)}`; + }; + IPv6.prototype.toString = function() { + return this.toRFC5952String(); + }; + return IPv6; + })(); + ipaddr.IPv6.broadcastAddressFromCIDR = function(string) { + try { + const cidr = this.parseCIDR(string); + const ipInterfaceOctets = cidr[0].toByteArray(); + const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + const octets = []; + let i = 0; + while (i < 16) { + octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255); + i++; + } + return new this(octets); + } catch (e) { + throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`); + } + }; + ipaddr.IPv6.isIPv6 = function(string) { + return this.parser(string) !== null; + }; + ipaddr.IPv6.isValid = function(string) { + if (typeof string === "string" && string.indexOf(":") === -1) { + return false; + } + try { + const addr = this.parser(string); + new this(addr.parts, addr.zoneId); + return true; + } catch (e) { + return false; + } + }; + ipaddr.IPv6.isValidCIDR = function(string) { + if (typeof string === "string" && string.indexOf(":") === -1) { + return false; + } + try { + this.parseCIDR(string); + return true; + } catch (e) { + return false; + } + }; + ipaddr.IPv6.networkAddressFromCIDR = function(string) { + let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 16) { + octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10)); + i++; + } + return new this(octets); + } catch (e) { + throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`); + } + }; + ipaddr.IPv6.parse = function(string) { + const addr = this.parser(string); + if (addr.parts === null) { + throw new Error("ipaddr: string is not formatted like an IPv6 Address"); + } + return new this(addr.parts, addr.zoneId); + }; + ipaddr.IPv6.parseCIDR = function(string) { + let maskLength, match, parsed; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 128) { + parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, "toString", { + value: function() { + return this.join("/"); + } + }); + return parsed; + } + } + throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range"); + }; + ipaddr.IPv6.parser = function(string) { + let addr, i, match, octet, octets, zoneId; + if (match = string.match(ipv6Regexes.deprecatedTransitional)) { + return this.parser(`::ffff:${match[1]}`); + } + if (ipv6Regexes.native.test(string)) { + return expandIPv6(string, 8); + } + if (match = string.match(ipv6Regexes.transitional)) { + zoneId = match[6] || ""; + addr = match[1]; + if (!match[1].endsWith("::")) { + addr = addr.slice(0, -1); + } + addr = expandIPv6(addr + zoneId, 6); + if (addr.parts) { + octets = [ + parseInt(match[2]), + parseInt(match[3]), + parseInt(match[4]), + parseInt(match[5]) + ]; + for (i = 0; i < octets.length; i++) { + octet = octets[i]; + if (!(0 <= octet && octet <= 255)) { + return null; + } + } + addr.parts.push(octets[0] << 8 | octets[1]); + addr.parts.push(octets[2] << 8 | octets[3]); + return { + parts: addr.parts, + zoneId: addr.zoneId + }; + } + } + return null; + }; + ipaddr.IPv6.subnetMaskFromPrefixLength = function(prefix) { + prefix = parseInt(prefix); + if (prefix < 0 || prefix > 128) { + throw new Error("ipaddr: invalid IPv6 prefix length"); + } + const octets = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let j = 0; + const filledOctetCount = Math.floor(prefix / 8); + while (j < filledOctetCount) { + octets[j] = 255; + j++; + } + if (filledOctetCount < 16) { + octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - prefix % 8; + } + return new this(octets); + }; + ipaddr.fromByteArray = function(bytes) { + const length = bytes.length; + if (length === 4) { + return new ipaddr.IPv4(bytes); + } else if (length === 16) { + return new ipaddr.IPv6(bytes); + } else { + throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address"); + } + }; + ipaddr.isValid = function(string) { + return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string); + }; + ipaddr.isValidCIDR = function(string) { + return ipaddr.IPv6.isValidCIDR(string) || ipaddr.IPv4.isValidCIDR(string); + }; + ipaddr.parse = function(string) { + if (ipaddr.IPv6.isValid(string)) { + return ipaddr.IPv6.parse(string); + } else if (ipaddr.IPv4.isValid(string)) { + return ipaddr.IPv4.parse(string); + } else { + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format"); + } + }; + ipaddr.parseCIDR = function(string) { + try { + return ipaddr.IPv6.parseCIDR(string); + } catch (e) { + try { + return ipaddr.IPv4.parseCIDR(string); + } catch (e2) { + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format"); + } + } + }; + ipaddr.process = function(string) { + const addr = this.parse(string); + if (addr.kind() === "ipv6" && addr.isIPv4MappedAddress()) { + return addr.toIPv4Address(); + } else { + return addr; + } + }; + ipaddr.subnetMatch = function(address, rangeList, defaultName) { + let i, rangeName, rangeSubnets, subnet; + if (defaultName === void 0 || defaultName === null) { + defaultName = "unicast"; + } + for (rangeName in rangeList) { + if (Object.prototype.hasOwnProperty.call(rangeList, rangeName)) { + rangeSubnets = rangeList[rangeName]; + if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) { + rangeSubnets = [rangeSubnets]; + } + for (i = 0; i < rangeSubnets.length; i++) { + subnet = rangeSubnets[i]; + if (address.kind() === subnet[0].kind() && address.match.apply(address, subnet)) { + return rangeName; + } + } + } + } + return defaultName; + }; + if (typeof module2 !== "undefined" && module2.exports) { + module2.exports = ipaddr; + } else { + root.ipaddr = ipaddr; + } + })(exports2); + } +}); + +// node_modules/@fastify/proxy-addr/index.js +var require_proxy_addr = __commonJS({ + "node_modules/@fastify/proxy-addr/index.js"(exports2, module2) { + "use strict"; + module2.exports = proxyaddr; + module2.exports.default = proxyaddr; + module2.exports.proxyaddr = proxyaddr; + module2.exports.all = alladdrs; + module2.exports.compile = compile; + var forwarded = require_forwarded(); + var ipaddr = require_ipaddr(); + var DIGIT_REGEXP = /^\d+$/u; + var isip = ipaddr.isValid; + var parseip = ipaddr.parse; + var IP_RANGES = { + linklocal: ["169.254.0.0/16", "fe80::/10"], + loopback: ["127.0.0.1/8", "::1/128"], + uniquelocal: ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "fc00::/7"] + }; + function alladdrs(req, trust) { + const addrs = forwarded(req); + if (!trust) { + return addrs; + } + if (typeof trust !== "function") { + trust = compile(trust); + } + for (var i = 0; i < addrs.length - 1; i++) { + if (trust(addrs[i], i)) continue; + addrs.length = i + 1; + } + return addrs; + } + function compile(val) { + if (!val) { + throw new TypeError("argument is required"); + } + let trust; + if (typeof val === "string") { + trust = [val]; + } else if (Array.isArray(val)) { + trust = val.slice(); + } else { + throw new TypeError("unsupported trust argument"); + } + for (var i = 0; i < trust.length; i++) { + val = trust[i]; + if (!Object.prototype.hasOwnProperty.call(IP_RANGES, val)) { + continue; + } + val = IP_RANGES[val]; + trust.splice.apply(trust, [i, 1].concat(val)); + i += val.length - 1; + } + return compileTrust(compileRangeSubnets(trust)); + } + function compileRangeSubnets(arr) { + const rangeSubnets = new Array(arr.length); + for (var i = 0; i < arr.length; i++) { + rangeSubnets[i] = parseipNotation(arr[i]); + } + return rangeSubnets; + } + function compileTrust(rangeSubnets) { + const len = rangeSubnets.length; + return len === 0 ? trustNone : len === 1 ? trustSingle(rangeSubnets[0]) : trustMulti(rangeSubnets); + } + function parseipNotation(note) { + const pos = note.lastIndexOf("/"); + const str = pos !== -1 ? note.substring(0, pos) : note; + if (!isip(str)) { + throw new TypeError("invalid IP address: " + str); + } + let ip = parseip(str); + if (pos === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) { + ip = ip.toIPv4Address(); + } + const max = ip.kind() === "ipv6" ? 128 : 32; + let range = pos !== -1 ? note.substring(pos + 1, note.length) : null; + if (range === null) { + range = max; + } else if (DIGIT_REGEXP.test(range)) { + range = parseInt(range, 10); + } else if (ip.kind() === "ipv4" && isip(range)) { + range = parseNetmask(range); + } else { + range = null; + } + if (range <= 0 || range > max) { + throw new TypeError("invalid range on address: " + note); + } + return [ip, range]; + } + function parseNetmask(netmask) { + const ip = parseip(netmask); + const kind = ip.kind(); + return kind === "ipv4" ? ip.prefixLengthFromSubnetMask() : null; + } + function proxyaddr(req, trust) { + if (!req) { + throw new TypeError("req argument is required"); + } + if (!trust) { + throw new TypeError("trust argument is required"); + } + const addrs = alladdrs(req, trust); + const addr = addrs[addrs.length - 1]; + return addr; + } + function trustNone() { + return false; + } + function trustMulti(subnets) { + return function trust(addr) { + if (!isip(addr)) return false; + const ip = parseip(addr); + let ipconv; + const kind = ip.kind(); + for (var i = 0; i < subnets.length; i++) { + const subnet = subnets[i]; + const subnetip = subnet[0]; + const subnetkind = subnetip.kind(); + const subnetrange = subnet[1]; + let trusted = ip; + if (kind !== subnetkind) { + if (subnetkind === "ipv4" && !ip.isIPv4MappedAddress()) { + continue; + } + if (!ipconv) { + ipconv = subnetkind === "ipv4" ? ip.toIPv4Address() : ip.toIPv4MappedAddress(); + } + trusted = ipconv; + } + if (trusted.match(subnetip, subnetrange)) { + return true; + } + } + return false; + }; + } + function trustSingle(subnet) { + const subnetip = subnet[0]; + const subnetkind = subnetip.kind(); + const subnetisipv4 = subnetkind === "ipv4"; + const subnetrange = subnet[1]; + return function trust(addr) { + if (!isip(addr)) return false; + let ip = parseip(addr); + const kind = ip.kind(); + if (kind !== subnetkind) { + if (subnetisipv4 && !ip.isIPv4MappedAddress()) { + return false; + } + ip = subnetisipv4 ? ip.toIPv4Address() : ip.toIPv4MappedAddress(); + } + return ip.match(subnetip, subnetrange); + }; + } + } +}); + +// node_modules/fastify/lib/request.js +var require_request = __commonJS({ + "node_modules/fastify/lib/request.js"(exports2, module2) { + "use strict"; + var proxyAddr = require_proxy_addr(); + var { + kHasBeenDecorated, + kSchemaBody, + kSchemaHeaders, + kSchemaParams, + kSchemaQuerystring, + kSchemaController, + kOptions, + kRequestCacheValidateFns, + kRouteContext, + kRequestOriginalUrl + } = require_symbols2(); + var { FST_ERR_REQ_INVALID_VALIDATION_INVOCATION, FST_ERR_DEC_UNDECLARED } = require_errors2(); + var decorators = require_decorate(); + var HTTP_PART_SYMBOL_MAP = { + body: kSchemaBody, + headers: kSchemaHeaders, + params: kSchemaParams, + querystring: kSchemaQuerystring, + query: kSchemaQuerystring + }; + function Request(id2, params, req, query, log3, context) { + this.id = id2; + this[kRouteContext] = context; + this.params = params; + this.raw = req; + this.query = query; + this.log = log3; + this.body = void 0; + } + Request.props = []; + function getTrustProxyFn(tp2) { + if (typeof tp2 === "function") { + return tp2; + } + if (tp2 === true) { + return null; + } + if (typeof tp2 === "number") { + return function(a, i) { + return i < tp2; + }; + } + if (typeof tp2 === "string") { + const values = tp2.split(",").map((it2) => it2.trim()); + return proxyAddr.compile(values); + } + return proxyAddr.compile(tp2); + } + function buildRequest(R, trustProxy) { + if (trustProxy) { + return buildRequestWithTrustProxy(R, trustProxy); + } + return buildRegularRequest(R); + } + function buildRegularRequest(R) { + const props = R.props.slice(); + function _Request(id2, params, req, query, log3, context) { + this.id = id2; + this[kRouteContext] = context; + this.params = params; + this.raw = req; + this.query = query; + this.log = log3; + this.body = void 0; + let prop; + for (let i = 0; i < props.length; i++) { + prop = props[i]; + this[prop.key] = prop.value; + } + } + Object.setPrototypeOf(_Request.prototype, R.prototype); + Object.setPrototypeOf(_Request, R); + _Request.props = props; + _Request.parent = R; + return _Request; + } + function getLastEntryInMultiHeaderValue(headerValue) { + const lastIndex = headerValue.lastIndexOf(","); + return lastIndex === -1 ? headerValue.trim() : headerValue.slice(lastIndex + 1).trim(); + } + function buildRequestWithTrustProxy(R, trustProxy) { + const _Request = buildRegularRequest(R); + const proxyFn = getTrustProxyFn(trustProxy); + _Request[kHasBeenDecorated] = true; + Object.defineProperties(_Request.prototype, { + ip: { + get() { + const addrs = proxyAddr.all(this.raw, proxyFn); + return addrs[addrs.length - 1]; + } + }, + ips: { + get() { + return proxyAddr.all(this.raw, proxyFn); + } + }, + host: { + get() { + if (this.ip !== void 0 && this.headers["x-forwarded-host"]) { + return getLastEntryInMultiHeaderValue(this.headers["x-forwarded-host"]); + } + return this.headers.host ?? this.headers[":authority"] ?? ""; + } + }, + protocol: { + get() { + if (this.headers["x-forwarded-proto"]) { + return getLastEntryInMultiHeaderValue(this.headers["x-forwarded-proto"]); + } + if (this.socket) { + return this.socket.encrypted ? "https" : "http"; + } + } + } + }); + return _Request; + } + function assertsRequestDecoration(request, name) { + if (!decorators.hasKey(request, name) && !decorators.exist(request, name)) { + throw new FST_ERR_DEC_UNDECLARED(name, "request"); + } + } + Object.defineProperties(Request.prototype, { + server: { + get() { + return this[kRouteContext].server; + } + }, + url: { + get() { + return this.raw.url; + } + }, + originalUrl: { + get() { + if (!this[kRequestOriginalUrl]) { + this[kRequestOriginalUrl] = this.raw.originalUrl || this.raw.url; + } + return this[kRequestOriginalUrl]; + } + }, + method: { + get() { + return this.raw.method; + } + }, + routeOptions: { + get() { + const context = this[kRouteContext]; + const routeLimit = context._parserOptions.limit; + const serverLimit = context.server.initialConfig.bodyLimit; + const version2 = context.server.hasConstraintStrategy("version") ? this.raw.headers["accept-version"] : void 0; + const options = { + method: context.config?.method, + url: context.config?.url, + bodyLimit: routeLimit || serverLimit, + attachValidation: context.attachValidation, + logLevel: context.logLevel, + exposeHeadRoute: context.exposeHeadRoute, + prefixTrailingSlash: context.prefixTrailingSlash, + handler: context.handler, + config: context.config, + schema: context.schema, + version: version2 + }; + return options; + } + }, + is404: { + get() { + return this[kRouteContext].config?.url === void 0; + } + }, + socket: { + get() { + return this.raw.socket; + } + }, + ip: { + get() { + if (this.socket) { + return this.socket.remoteAddress; + } + } + }, + host: { + get() { + return this.raw.headers.host ?? this.raw.headers[":authority"] ?? ""; + } + }, + hostname: { + get() { + return this.host.split(":", 1)[0]; + } + }, + port: { + get() { + const portFromHost = parseInt(this.host.split(":").slice(-1)[0]); + if (!isNaN(portFromHost)) { + return portFromHost; + } + const host = this.headers.host ?? this.headers[":authority"] ?? ""; + const portFromHeader = parseInt(host.split(":").slice(-1)[0]); + if (!isNaN(portFromHeader)) { + return portFromHeader; + } + return null; + } + }, + protocol: { + get() { + if (this.socket) { + return this.socket.encrypted ? "https" : "http"; + } + } + }, + headers: { + get() { + if (this.additionalHeaders) { + return Object.assign({}, this.raw.headers, this.additionalHeaders); + } + return this.raw.headers; + }, + set(headers) { + this.additionalHeaders = headers; + } + }, + getValidationFunction: { + value: function(httpPartOrSchema) { + if (typeof httpPartOrSchema === "string") { + const symbol = HTTP_PART_SYMBOL_MAP[httpPartOrSchema]; + return this[kRouteContext][symbol]; + } else if (typeof httpPartOrSchema === "object") { + return this[kRouteContext][kRequestCacheValidateFns]?.get(httpPartOrSchema); + } + } + }, + compileValidationSchema: { + value: function(schema, httpPart = null) { + const { method, url } = this; + if (this[kRouteContext][kRequestCacheValidateFns]?.has(schema)) { + return this[kRouteContext][kRequestCacheValidateFns].get(schema); + } + const validatorCompiler = this[kRouteContext].validatorCompiler || this.server[kSchemaController].validatorCompiler || // We compile the schemas if no custom validatorCompiler is provided + // nor set + (this.server[kSchemaController].setupValidator(this.server[kOptions]) || this.server[kSchemaController].validatorCompiler); + const validateFn = validatorCompiler({ + schema, + method, + url, + httpPart + }); + if (this[kRouteContext][kRequestCacheValidateFns] == null) { + this[kRouteContext][kRequestCacheValidateFns] = /* @__PURE__ */ new WeakMap(); + } + this[kRouteContext][kRequestCacheValidateFns].set(schema, validateFn); + return validateFn; + } + }, + validateInput: { + value: function(input, schema, httpPart) { + httpPart = typeof schema === "string" ? schema : httpPart; + const symbol = httpPart != null && typeof httpPart === "string" && HTTP_PART_SYMBOL_MAP[httpPart]; + let validate; + if (symbol) { + validate = this[kRouteContext][symbol]; + } + if (validate == null && (schema == null || typeof schema !== "object" || Array.isArray(schema))) { + throw new FST_ERR_REQ_INVALID_VALIDATION_INVOCATION(httpPart); + } + if (validate == null) { + if (this[kRouteContext][kRequestCacheValidateFns]?.has(schema)) { + validate = this[kRouteContext][kRequestCacheValidateFns].get(schema); + } else { + validate = this.compileValidationSchema(schema, httpPart); + } + } + return validate(input); + } + }, + getDecorator: { + value: function(name) { + assertsRequestDecoration(this, name); + const decorator = this[name]; + if (typeof decorator === "function") { + return decorator.bind(this); + } + return decorator; + } + }, + setDecorator: { + value: function(name, value) { + assertsRequestDecoration(this, name); + this[name] = value; + } + } + }); + module2.exports = Request; + module2.exports.buildRequest = buildRequest; + } +}); + +// node_modules/fastify/lib/context.js +var require_context = __commonJS({ + "node_modules/fastify/lib/context.js"(exports2, module2) { + "use strict"; + var { + kFourOhFourContext, + kReplySerializerDefault, + kSchemaErrorFormatter, + kErrorHandler, + kChildLoggerFactory, + kOptions, + kReply, + kRequest, + kBodyLimit, + kLogLevel, + kContentTypeParser, + kRouteByFastify, + kRequestCacheValidateFns, + kReplyCacheSerializeFns + } = require_symbols2(); + function Context({ + schema, + handler, + config, + requestIdLogLabel, + childLoggerFactory, + errorHandler, + bodyLimit, + logLevel: logLevel2, + logSerializers, + attachValidation, + validatorCompiler, + serializerCompiler, + replySerializer, + schemaErrorFormatter, + exposeHeadRoute, + prefixTrailingSlash, + server, + isFastify + }) { + this.schema = schema; + this.handler = handler; + this.Reply = server[kReply]; + this.Request = server[kRequest]; + this.contentTypeParser = server[kContentTypeParser]; + this.onRequest = null; + this.onSend = null; + this.onError = null; + this.onTimeout = null; + this.preHandler = null; + this.onResponse = null; + this.preSerialization = null; + this.onRequestAbort = null; + this.config = config; + this.errorHandler = errorHandler || server[kErrorHandler]; + this.requestIdLogLabel = requestIdLogLabel || server[kOptions].requestIdLogLabel; + this.childLoggerFactory = childLoggerFactory || server[kChildLoggerFactory]; + this._middie = null; + this._parserOptions = { + limit: bodyLimit || server[kBodyLimit] + }; + this.exposeHeadRoute = exposeHeadRoute; + this.prefixTrailingSlash = prefixTrailingSlash; + this.logLevel = logLevel2 || server[kLogLevel]; + this.logSerializers = logSerializers; + this[kFourOhFourContext] = null; + this.attachValidation = attachValidation; + this[kReplySerializerDefault] = replySerializer; + this.schemaErrorFormatter = schemaErrorFormatter || server[kSchemaErrorFormatter] || defaultSchemaErrorFormatter; + this[kRouteByFastify] = isFastify; + this[kRequestCacheValidateFns] = null; + this[kReplyCacheSerializeFns] = null; + this.validatorCompiler = validatorCompiler || null; + this.serializerCompiler = serializerCompiler || null; + this.server = server; + } + function defaultSchemaErrorFormatter(errors, dataVar) { + let text = ""; + const separator = ", "; + for (let i = 0; i !== errors.length; ++i) { + const e = errors[i]; + text += dataVar + (e.instancePath || "") + " " + e.message + separator; + } + return new Error(text.slice(0, -separator.length)); + } + module2.exports = Context; + } +}); + +// node_modules/toad-cache/dist/toad-cache.cjs +var require_toad_cache = __commonJS({ + "node_modules/toad-cache/dist/toad-cache.cjs"(exports2) { + "use strict"; + var FifoMap = class { + constructor(max = 1e3, ttlInMsecs = 0) { + if (isNaN(max) || max < 0) { + throw new Error("Invalid max value"); + } + if (isNaN(ttlInMsecs) || ttlInMsecs < 0) { + throw new Error("Invalid ttl value"); + } + this.first = null; + this.items = /* @__PURE__ */ new Map(); + this.last = null; + this.max = max; + this.ttl = ttlInMsecs; + } + get size() { + return this.items.size; + } + clear() { + this.items = /* @__PURE__ */ new Map(); + this.first = null; + this.last = null; + } + delete(key) { + if (this.items.has(key)) { + const deletedItem = this.items.get(key); + this.items.delete(key); + if (deletedItem.prev !== null) { + deletedItem.prev.next = deletedItem.next; + } + if (deletedItem.next !== null) { + deletedItem.next.prev = deletedItem.prev; + } + if (this.first === deletedItem) { + this.first = deletedItem.next; + } + if (this.last === deletedItem) { + this.last = deletedItem.prev; + } + } + } + deleteMany(keys) { + for (var i = 0; i < keys.length; i++) { + this.delete(keys[i]); + } + } + evict() { + if (this.size > 0) { + const item = this.first; + this.items.delete(item.key); + if (this.size === 0) { + this.first = null; + this.last = null; + } else { + this.first = item.next; + this.first.prev = null; + } + } + } + expiresAt(key) { + if (this.items.has(key)) { + return this.items.get(key).expiry; + } + } + get(key) { + if (this.items.has(key)) { + const item = this.items.get(key); + if (this.ttl > 0 && item.expiry <= Date.now()) { + this.delete(key); + return; + } + return item.value; + } + } + getMany(keys) { + const result = []; + for (var i = 0; i < keys.length; i++) { + result.push(this.get(keys[i])); + } + return result; + } + keys() { + return this.items.keys(); + } + set(key, value) { + if (this.items.has(key)) { + const item2 = this.items.get(key); + item2.value = value; + item2.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl; + return; + } + if (this.max > 0 && this.size === this.max) { + this.evict(); + } + const item = { + expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl, + key, + prev: this.last, + next: null, + value + }; + this.items.set(key, item); + if (this.size === 1) { + this.first = item; + } else { + this.last.next = item; + } + this.last = item; + } + }; + var LruMap = class { + constructor(max = 1e3, ttlInMsecs = 0) { + if (isNaN(max) || max < 0) { + throw new Error("Invalid max value"); + } + if (isNaN(ttlInMsecs) || ttlInMsecs < 0) { + throw new Error("Invalid ttl value"); + } + this.first = null; + this.items = /* @__PURE__ */ new Map(); + this.last = null; + this.max = max; + this.ttl = ttlInMsecs; + } + get size() { + return this.items.size; + } + bumpLru(item) { + if (this.last === item) { + return; + } + const last = this.last; + const next = item.next; + const prev = item.prev; + if (this.first === item) { + this.first = next; + } + item.next = null; + item.prev = last; + last.next = item; + if (prev !== null) { + prev.next = next; + } + if (next !== null) { + next.prev = prev; + } + this.last = item; + } + clear() { + this.items = /* @__PURE__ */ new Map(); + this.first = null; + this.last = null; + } + delete(key) { + if (this.items.has(key)) { + const item = this.items.get(key); + this.items.delete(key); + if (item.prev !== null) { + item.prev.next = item.next; + } + if (item.next !== null) { + item.next.prev = item.prev; + } + if (this.first === item) { + this.first = item.next; + } + if (this.last === item) { + this.last = item.prev; + } + } + } + deleteMany(keys) { + for (var i = 0; i < keys.length; i++) { + this.delete(keys[i]); + } + } + evict() { + if (this.size > 0) { + const item = this.first; + this.items.delete(item.key); + if (this.size === 0) { + this.first = null; + this.last = null; + } else { + this.first = item.next; + this.first.prev = null; + } + } + } + expiresAt(key) { + if (this.items.has(key)) { + return this.items.get(key).expiry; + } + } + get(key) { + if (this.items.has(key)) { + const item = this.items.get(key); + if (this.ttl > 0 && item.expiry <= Date.now()) { + this.delete(key); + return; + } + this.bumpLru(item); + return item.value; + } + } + getMany(keys) { + const result = []; + for (var i = 0; i < keys.length; i++) { + result.push(this.get(keys[i])); + } + return result; + } + keys() { + return this.items.keys(); + } + set(key, value) { + if (this.items.has(key)) { + const item2 = this.items.get(key); + item2.value = value; + item2.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl; + if (this.last !== item2) { + this.bumpLru(item2); + } + return; + } + if (this.max > 0 && this.size === this.max) { + this.evict(); + } + const item = { + expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl, + key, + prev: this.last, + next: null, + value + }; + this.items.set(key, item); + if (this.size === 1) { + this.first = item; + } else { + this.last.next = item; + } + this.last = item; + } + }; + var LruObject = class { + constructor(max = 1e3, ttlInMsecs = 0) { + if (isNaN(max) || max < 0) { + throw new Error("Invalid max value"); + } + if (isNaN(ttlInMsecs) || ttlInMsecs < 0) { + throw new Error("Invalid ttl value"); + } + this.first = null; + this.items = /* @__PURE__ */ Object.create(null); + this.last = null; + this.size = 0; + this.max = max; + this.ttl = ttlInMsecs; + } + bumpLru(item) { + if (this.last === item) { + return; + } + const last = this.last; + const next = item.next; + const prev = item.prev; + if (this.first === item) { + this.first = next; + } + item.next = null; + item.prev = last; + last.next = item; + if (prev !== null) { + prev.next = next; + } + if (next !== null) { + next.prev = prev; + } + this.last = item; + } + clear() { + this.items = /* @__PURE__ */ Object.create(null); + this.first = null; + this.last = null; + this.size = 0; + } + delete(key) { + if (Object.prototype.hasOwnProperty.call(this.items, key)) { + const item = this.items[key]; + delete this.items[key]; + this.size--; + if (item.prev !== null) { + item.prev.next = item.next; + } + if (item.next !== null) { + item.next.prev = item.prev; + } + if (this.first === item) { + this.first = item.next; + } + if (this.last === item) { + this.last = item.prev; + } + } + } + deleteMany(keys) { + for (var i = 0; i < keys.length; i++) { + this.delete(keys[i]); + } + } + evict() { + if (this.size > 0) { + const item = this.first; + delete this.items[item.key]; + if (--this.size === 0) { + this.first = null; + this.last = null; + } else { + this.first = item.next; + this.first.prev = null; + } + } + } + expiresAt(key) { + if (Object.prototype.hasOwnProperty.call(this.items, key)) { + return this.items[key].expiry; + } + } + get(key) { + if (Object.prototype.hasOwnProperty.call(this.items, key)) { + const item = this.items[key]; + if (this.ttl > 0 && item.expiry <= Date.now()) { + this.delete(key); + return; + } + this.bumpLru(item); + return item.value; + } + } + getMany(keys) { + const result = []; + for (var i = 0; i < keys.length; i++) { + result.push(this.get(keys[i])); + } + return result; + } + keys() { + return Object.keys(this.items); + } + set(key, value) { + if (Object.prototype.hasOwnProperty.call(this.items, key)) { + const item2 = this.items[key]; + item2.value = value; + item2.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl; + if (this.last !== item2) { + this.bumpLru(item2); + } + return; + } + if (this.max > 0 && this.size === this.max) { + this.evict(); + } + const item = { + expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl, + key, + prev: this.last, + next: null, + value + }; + this.items[key] = item; + if (++this.size === 1) { + this.first = item; + } else { + this.last.next = item; + } + this.last = item; + } + }; + var HitStatisticsRecord = class { + constructor() { + this.records = {}; + } + initForCache(cacheId, currentTimeStamp) { + this.records[cacheId] = { + [currentTimeStamp]: { + cacheSize: 0, + hits: 0, + falsyHits: 0, + emptyHits: 0, + misses: 0, + expirations: 0, + evictions: 0, + invalidateOne: 0, + invalidateAll: 0, + sets: 0 + } + }; + } + resetForCache(cacheId) { + for (let key of Object.keys(this.records[cacheId])) { + this.records[cacheId][key] = { + cacheSize: 0, + hits: 0, + falsyHits: 0, + emptyHits: 0, + misses: 0, + expirations: 0, + evictions: 0, + invalidateOne: 0, + invalidateAll: 0, + sets: 0 + }; + } + } + getStatistics() { + return this.records; + } + }; + function getTimestamp(date) { + return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}`; + } + var HitStatistics = class { + constructor(cacheId, statisticTtlInHours, globalStatisticsRecord) { + this.cacheId = cacheId; + this.statisticTtlInHours = statisticTtlInHours; + this.collectionStart = /* @__PURE__ */ new Date(); + this.currentTimeStamp = getTimestamp(this.collectionStart); + this.records = globalStatisticsRecord || new HitStatisticsRecord(); + this.records.initForCache(this.cacheId, this.currentTimeStamp); + } + get currentRecord() { + if (!this.records.records[this.cacheId][this.currentTimeStamp]) { + this.records.records[this.cacheId][this.currentTimeStamp] = { + cacheSize: 0, + hits: 0, + falsyHits: 0, + emptyHits: 0, + misses: 0, + expirations: 0, + evictions: 0, + sets: 0, + invalidateOne: 0, + invalidateAll: 0 + }; + } + return this.records.records[this.cacheId][this.currentTimeStamp]; + } + hoursPassed() { + return (Date.now() - this.collectionStart) / 1e3 / 60 / 60; + } + addHit() { + this.archiveIfNeeded(); + this.currentRecord.hits++; + } + addFalsyHit() { + this.archiveIfNeeded(); + this.currentRecord.falsyHits++; + } + addEmptyHit() { + this.archiveIfNeeded(); + this.currentRecord.emptyHits++; + } + addMiss() { + this.archiveIfNeeded(); + this.currentRecord.misses++; + } + addEviction() { + this.archiveIfNeeded(); + this.currentRecord.evictions++; + } + setCacheSize(currentSize) { + this.archiveIfNeeded(); + this.currentRecord.cacheSize = currentSize; + } + addExpiration() { + this.archiveIfNeeded(); + this.currentRecord.expirations++; + } + addSet() { + this.archiveIfNeeded(); + this.currentRecord.sets++; + } + addInvalidateOne() { + this.archiveIfNeeded(); + this.currentRecord.invalidateOne++; + } + addInvalidateAll() { + this.archiveIfNeeded(); + this.currentRecord.invalidateAll++; + } + getStatistics() { + return this.records.getStatistics(); + } + archiveIfNeeded() { + if (this.hoursPassed() >= this.statisticTtlInHours) { + this.collectionStart = /* @__PURE__ */ new Date(); + this.currentTimeStamp = getTimestamp(this.collectionStart); + this.records.initForCache(this.cacheId, this.currentTimeStamp); + } + } + }; + var LruObjectHitStatistics = class extends LruObject { + constructor(max, ttlInMsecs, cacheId, globalStatisticsRecord, statisticTtlInHours) { + super(max || 1e3, ttlInMsecs || 0); + if (!cacheId) { + throw new Error("Cache id is mandatory"); + } + this.hitStatistics = new HitStatistics( + cacheId, + statisticTtlInHours !== void 0 ? statisticTtlInHours : 24, + globalStatisticsRecord + ); + } + getStatistics() { + return this.hitStatistics.getStatistics(); + } + set(key, value) { + super.set(key, value); + this.hitStatistics.addSet(); + this.hitStatistics.setCacheSize(this.size); + } + evict() { + super.evict(); + this.hitStatistics.addEviction(); + this.hitStatistics.setCacheSize(this.size); + } + delete(key, isExpiration = false) { + super.delete(key); + if (!isExpiration) { + this.hitStatistics.addInvalidateOne(); + } + this.hitStatistics.setCacheSize(this.size); + } + clear() { + super.clear(); + this.hitStatistics.addInvalidateAll(); + this.hitStatistics.setCacheSize(this.size); + } + get(key) { + if (Object.prototype.hasOwnProperty.call(this.items, key)) { + const item = this.items[key]; + if (this.ttl > 0 && item.expiry <= Date.now()) { + this.delete(key, true); + this.hitStatistics.addExpiration(); + return; + } + this.bumpLru(item); + if (!item.value) { + this.hitStatistics.addFalsyHit(); + } + if (item.value === void 0 || item.value === null || item.value === "") { + this.hitStatistics.addEmptyHit(); + } + this.hitStatistics.addHit(); + return item.value; + } + this.hitStatistics.addMiss(); + } + }; + var FifoObject = class { + constructor(max = 1e3, ttlInMsecs = 0) { + if (isNaN(max) || max < 0) { + throw new Error("Invalid max value"); + } + if (isNaN(ttlInMsecs) || ttlInMsecs < 0) { + throw new Error("Invalid ttl value"); + } + this.first = null; + this.items = /* @__PURE__ */ Object.create(null); + this.last = null; + this.size = 0; + this.max = max; + this.ttl = ttlInMsecs; + } + clear() { + this.items = /* @__PURE__ */ Object.create(null); + this.first = null; + this.last = null; + this.size = 0; + } + delete(key) { + if (Object.prototype.hasOwnProperty.call(this.items, key)) { + const deletedItem = this.items[key]; + delete this.items[key]; + this.size--; + if (deletedItem.prev !== null) { + deletedItem.prev.next = deletedItem.next; + } + if (deletedItem.next !== null) { + deletedItem.next.prev = deletedItem.prev; + } + if (this.first === deletedItem) { + this.first = deletedItem.next; + } + if (this.last === deletedItem) { + this.last = deletedItem.prev; + } + } + } + deleteMany(keys) { + for (var i = 0; i < keys.length; i++) { + this.delete(keys[i]); + } + } + evict() { + if (this.size > 0) { + const item = this.first; + delete this.items[item.key]; + if (--this.size === 0) { + this.first = null; + this.last = null; + } else { + this.first = item.next; + this.first.prev = null; + } + } + } + expiresAt(key) { + if (Object.prototype.hasOwnProperty.call(this.items, key)) { + return this.items[key].expiry; + } + } + get(key) { + if (Object.prototype.hasOwnProperty.call(this.items, key)) { + const item = this.items[key]; + if (this.ttl > 0 && item.expiry <= Date.now()) { + this.delete(key); + return; + } + return item.value; + } + } + getMany(keys) { + const result = []; + for (var i = 0; i < keys.length; i++) { + result.push(this.get(keys[i])); + } + return result; + } + keys() { + return Object.keys(this.items); + } + set(key, value) { + if (Object.prototype.hasOwnProperty.call(this.items, key)) { + const item2 = this.items[key]; + item2.value = value; + item2.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl; + return; + } + if (this.max > 0 && this.size === this.max) { + this.evict(); + } + const item = { + expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl, + key, + prev: this.last, + next: null, + value + }; + this.items[key] = item; + if (++this.size === 1) { + this.first = item; + } else { + this.last.next = item; + } + this.last = item; + } + }; + exports2.Fifo = FifoObject; + exports2.FifoMap = FifoMap; + exports2.FifoObject = FifoObject; + exports2.HitStatisticsRecord = HitStatisticsRecord; + exports2.Lru = LruObject; + exports2.LruHitStatistics = LruObjectHitStatistics; + exports2.LruMap = LruMap; + exports2.LruObject = LruObject; + exports2.LruObjectHitStatistics = LruObjectHitStatistics; + } +}); + +// node_modules/secure-json-parse/index.js +var require_secure_json_parse = __commonJS({ + "node_modules/secure-json-parse/index.js"(exports2, module2) { + "use strict"; + var hasBuffer = typeof Buffer !== "undefined"; + var suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/; + var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/; + function _parse(text, reviver, options) { + if (options == null) { + if (reviver !== null && typeof reviver === "object") { + options = reviver; + reviver = void 0; + } + } + if (hasBuffer && Buffer.isBuffer(text)) { + text = text.toString(); + } + if (text && text.charCodeAt(0) === 65279) { + text = text.slice(1); + } + const obj = JSON.parse(text, reviver); + if (obj === null || typeof obj !== "object") { + return obj; + } + const protoAction = options && options.protoAction || "error"; + const constructorAction = options && options.constructorAction || "error"; + if (protoAction === "ignore" && constructorAction === "ignore") { + return obj; + } + if (protoAction !== "ignore" && constructorAction !== "ignore") { + if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) { + return obj; + } + } else if (protoAction !== "ignore" && constructorAction === "ignore") { + if (suspectProtoRx.test(text) === false) { + return obj; + } + } else { + if (suspectConstructorRx.test(text) === false) { + return obj; + } + } + return filter(obj, { protoAction, constructorAction, safe: options && options.safe }); + } + function filter(obj, { protoAction = "error", constructorAction = "error", safe } = {}) { + let next = [obj]; + while (next.length) { + const nodes = next; + next = []; + for (const node of nodes) { + if (protoAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "__proto__")) { + if (safe === true) { + return null; + } else if (protoAction === "error") { + throw new SyntaxError("Object contains forbidden prototype property"); + } + delete node.__proto__; + } + if (constructorAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "constructor") && Object.prototype.hasOwnProperty.call(node.constructor, "prototype")) { + if (safe === true) { + return null; + } else if (constructorAction === "error") { + throw new SyntaxError("Object contains forbidden prototype property"); + } + delete node.constructor; + } + for (const key in node) { + const value = node[key]; + if (value && typeof value === "object") { + next.push(value); + } + } + } + } + return obj; + } + function parse(text, reviver, options) { + const { stackTraceLimit } = Error; + Error.stackTraceLimit = 0; + try { + return _parse(text, reviver, options); + } finally { + Error.stackTraceLimit = stackTraceLimit; + } + } + function safeParse(text, reviver) { + const { stackTraceLimit } = Error; + Error.stackTraceLimit = 0; + try { + return _parse(text, reviver, { safe: true }); + } catch { + return void 0; + } finally { + Error.stackTraceLimit = stackTraceLimit; + } + } + module2.exports = parse; + module2.exports.default = parse; + module2.exports.parse = parse; + module2.exports.safeParse = safeParse; + module2.exports.scan = filter; + } +}); + +// node_modules/fastify/lib/contentTypeParser.js +var require_contentTypeParser = __commonJS({ + "node_modules/fastify/lib/contentTypeParser.js"(exports2, module2) { + "use strict"; + var { AsyncResource } = require("node:async_hooks"); + var { FifoMap: Fifo } = require_toad_cache(); + var { parse: secureJsonParse } = require_secure_json_parse(); + var { + kDefaultJsonParse, + kContentTypeParser, + kBodyLimit, + kRequestPayloadStream, + kState, + kTestInternals, + kReplyIsError, + kRouteContext + } = require_symbols2(); + var { + FST_ERR_CTP_INVALID_TYPE, + FST_ERR_CTP_EMPTY_TYPE, + FST_ERR_CTP_ALREADY_PRESENT, + FST_ERR_CTP_INVALID_HANDLER, + FST_ERR_CTP_INVALID_PARSE_TYPE, + FST_ERR_CTP_BODY_TOO_LARGE, + FST_ERR_CTP_INVALID_MEDIA_TYPE, + FST_ERR_CTP_INVALID_CONTENT_LENGTH, + FST_ERR_CTP_EMPTY_JSON_BODY, + FST_ERR_CTP_INSTANCE_ALREADY_STARTED, + FST_ERR_CTP_INVALID_JSON_BODY + } = require_errors2(); + var { FSTSEC001 } = require_warnings(); + function ContentTypeParser(bodyLimit, onProtoPoisoning, onConstructorPoisoning) { + this[kDefaultJsonParse] = getDefaultJsonParser(onProtoPoisoning, onConstructorPoisoning); + this.customParsers = /* @__PURE__ */ new Map(); + this.customParsers.set("application/json", new Parser(true, false, bodyLimit, this[kDefaultJsonParse])); + this.customParsers.set("text/plain", new Parser(true, false, bodyLimit, defaultPlainTextParser)); + this.parserList = ["application/json", "text/plain"]; + this.parserRegExpList = []; + this.cache = new Fifo(100); + } + ContentTypeParser.prototype.add = function(contentType, opts, parserFn) { + const contentTypeIsString = typeof contentType === "string"; + if (contentTypeIsString) { + contentType = contentType.trim().toLowerCase(); + if (contentType.length === 0) throw new FST_ERR_CTP_EMPTY_TYPE(); + } else if (!(contentType instanceof RegExp)) { + throw new FST_ERR_CTP_INVALID_TYPE(); + } + if (typeof parserFn !== "function") { + throw new FST_ERR_CTP_INVALID_HANDLER(); + } + if (this.existingParser(contentType)) { + throw new FST_ERR_CTP_ALREADY_PRESENT(contentType); + } + if (opts.parseAs !== void 0) { + if (opts.parseAs !== "string" && opts.parseAs !== "buffer") { + throw new FST_ERR_CTP_INVALID_PARSE_TYPE(opts.parseAs); + } + } + const parser = new Parser( + opts.parseAs === "string", + opts.parseAs === "buffer", + opts.bodyLimit, + parserFn + ); + if (contentType === "*") { + this.customParsers.set("", parser); + } else { + if (contentTypeIsString) { + this.parserList.unshift(contentType); + this.customParsers.set(contentType, parser); + } else { + validateRegExp(contentType); + this.parserRegExpList.unshift(contentType); + this.customParsers.set(contentType.toString(), parser); + } + } + }; + ContentTypeParser.prototype.hasParser = function(contentType) { + if (typeof contentType === "string") { + contentType = contentType.trim().toLowerCase(); + } else { + if (!(contentType instanceof RegExp)) throw new FST_ERR_CTP_INVALID_TYPE(); + contentType = contentType.toString(); + } + return this.customParsers.has(contentType); + }; + ContentTypeParser.prototype.existingParser = function(contentType) { + if (contentType === "application/json" && this.customParsers.has(contentType)) { + return this.customParsers.get(contentType).fn !== this[kDefaultJsonParse]; + } + if (contentType === "text/plain" && this.customParsers.has(contentType)) { + return this.customParsers.get(contentType).fn !== defaultPlainTextParser; + } + return this.hasParser(contentType); + }; + ContentTypeParser.prototype.getParser = function(contentType) { + let parser = this.customParsers.get(contentType); + if (parser !== void 0) return parser; + parser = this.cache.get(contentType); + if (parser !== void 0) return parser; + const caseInsensitiveContentType = contentType.toLowerCase(); + for (let i = 0; i !== this.parserList.length; ++i) { + const parserListItem = this.parserList[i]; + if (caseInsensitiveContentType.slice(0, parserListItem.length) === parserListItem && (caseInsensitiveContentType.length === parserListItem.length || caseInsensitiveContentType.charCodeAt(parserListItem.length) === 59 || caseInsensitiveContentType.charCodeAt(parserListItem.length) === 32)) { + parser = this.customParsers.get(parserListItem); + this.cache.set(contentType, parser); + return parser; + } + } + for (let j = 0; j !== this.parserRegExpList.length; ++j) { + const parserRegExp = this.parserRegExpList[j]; + if (parserRegExp.test(contentType)) { + parser = this.customParsers.get(parserRegExp.toString()); + this.cache.set(contentType, parser); + return parser; + } + } + return this.customParsers.get(""); + }; + ContentTypeParser.prototype.removeAll = function() { + this.customParsers = /* @__PURE__ */ new Map(); + this.parserRegExpList = []; + this.parserList = []; + this.cache = new Fifo(100); + }; + ContentTypeParser.prototype.remove = function(contentType) { + let parsers; + if (typeof contentType === "string") { + contentType = contentType.trim().toLowerCase(); + parsers = this.parserList; + } else { + if (!(contentType instanceof RegExp)) throw new FST_ERR_CTP_INVALID_TYPE(); + contentType = contentType.toString(); + parsers = this.parserRegExpList; + } + const removed = this.customParsers.delete(contentType); + const idx = parsers.findIndex((ct) => ct.toString() === contentType); + if (idx > -1) { + parsers.splice(idx, 1); + } + return removed || idx > -1; + }; + ContentTypeParser.prototype.run = function(contentType, handler, request, reply) { + const parser = this.getParser(contentType); + if (parser === void 0) { + if (request.is404 === true) { + handler(request, reply); + return; + } + reply[kReplyIsError] = true; + reply.send(new FST_ERR_CTP_INVALID_MEDIA_TYPE(contentType || void 0)); + return; + } + const resource = new AsyncResource("content-type-parser:run", request); + const done = resource.bind(onDone); + if (parser.asString === true || parser.asBuffer === true) { + rawBody( + request, + reply, + reply[kRouteContext]._parserOptions, + parser, + done + ); + return; + } + const result = parser.fn(request, request[kRequestPayloadStream], done); + if (result && typeof result.then === "function") { + result.then((body) => { + done(null, body); + }, done); + } + function onDone(error, body) { + resource.emitDestroy(); + if (error != null) { + reply.header("connection", "close"); + reply[kReplyIsError] = true; + reply.send(error); + return; + } + request.body = body; + handler(request, reply); + } + }; + function rawBody(request, reply, options, parser, done) { + const asString = parser.asString === true; + const limit = options.limit === null ? parser.bodyLimit : options.limit; + const contentLength = Number(request.headers["content-length"]); + if (contentLength > limit) { + done(new FST_ERR_CTP_BODY_TOO_LARGE(), void 0); + return; + } + let receivedLength = 0; + let body = asString ? "" : []; + const payload = request[kRequestPayloadStream] || request.raw; + if (asString) { + payload.setEncoding("utf8"); + } + payload.on("data", onData); + payload.on("end", onEnd); + payload.on("error", onEnd); + payload.resume(); + function onData(chunk) { + receivedLength += asString ? Buffer.byteLength(chunk) : chunk.length; + const { receivedEncodedLength = 0 } = payload; + if (receivedLength > limit || receivedEncodedLength > limit) { + payload.removeListener("data", onData); + payload.removeListener("end", onEnd); + payload.removeListener("error", onEnd); + done(new FST_ERR_CTP_BODY_TOO_LARGE(), void 0); + return; + } + if (asString) { + body += chunk; + } else { + body.push(chunk); + } + } + function onEnd(err) { + payload.removeListener("data", onData); + payload.removeListener("end", onEnd); + payload.removeListener("error", onEnd); + if (err != null) { + if (!(typeof err.statusCode === "number" && err.statusCode >= 400)) { + err.statusCode = 400; + } + done(err, void 0); + return; + } + if (!Number.isNaN(contentLength) && (payload.receivedEncodedLength || receivedLength) !== contentLength) { + done(new FST_ERR_CTP_INVALID_CONTENT_LENGTH(), void 0); + return; + } + if (!asString) { + body = Buffer.concat(body); + } + const result = parser.fn(request, body, done); + if (result && typeof result.then === "function") { + result.then((body2) => { + done(null, body2); + }, done); + } + } + } + function getDefaultJsonParser(onProtoPoisoning, onConstructorPoisoning) { + const parseOptions = { protoAction: onProtoPoisoning, constructorAction: onConstructorPoisoning }; + return defaultJsonParser; + function defaultJsonParser(req, body, done) { + if (body.length === 0) { + done(new FST_ERR_CTP_EMPTY_JSON_BODY(), void 0); + return; + } + try { + done(null, secureJsonParse(body, parseOptions)); + } catch { + done(new FST_ERR_CTP_INVALID_JSON_BODY(), void 0); + } + } + } + function defaultPlainTextParser(req, body, done) { + done(null, body); + } + function Parser(asString, asBuffer, bodyLimit, fn) { + this.asString = asString; + this.asBuffer = asBuffer; + this.bodyLimit = bodyLimit; + this.fn = fn; + } + function buildContentTypeParser(c) { + const contentTypeParser = new ContentTypeParser(); + contentTypeParser[kDefaultJsonParse] = c[kDefaultJsonParse]; + contentTypeParser.customParsers = new Map(c.customParsers.entries()); + contentTypeParser.parserList = c.parserList.slice(); + contentTypeParser.parserRegExpList = c.parserRegExpList.slice(); + return contentTypeParser; + } + function addContentTypeParser(contentType, opts, parser) { + if (this[kState].started) { + throw new FST_ERR_CTP_INSTANCE_ALREADY_STARTED("addContentTypeParser"); + } + if (typeof opts === "function") { + parser = opts; + opts = {}; + } + if (!opts) opts = {}; + if (!opts.bodyLimit) opts.bodyLimit = this[kBodyLimit]; + if (Array.isArray(contentType)) { + contentType.forEach((type) => this[kContentTypeParser].add(type, opts, parser)); + } else { + this[kContentTypeParser].add(contentType, opts, parser); + } + return this; + } + function hasContentTypeParser(contentType) { + return this[kContentTypeParser].hasParser(contentType); + } + function removeContentTypeParser(contentType) { + if (this[kState].started) { + throw new FST_ERR_CTP_INSTANCE_ALREADY_STARTED("removeContentTypeParser"); + } + if (Array.isArray(contentType)) { + for (const type of contentType) { + this[kContentTypeParser].remove(type); + } + } else { + this[kContentTypeParser].remove(contentType); + } + } + function removeAllContentTypeParsers() { + if (this[kState].started) { + throw new FST_ERR_CTP_INSTANCE_ALREADY_STARTED("removeAllContentTypeParsers"); + } + this[kContentTypeParser].removeAll(); + } + function validateRegExp(regexp) { + if (regexp.source[0] !== "^" && regexp.source.includes(";?") === false) { + FSTSEC001(regexp.source); + } + } + module2.exports = ContentTypeParser; + module2.exports.helpers = { + buildContentTypeParser, + addContentTypeParser, + hasContentTypeParser, + removeContentTypeParser, + removeAllContentTypeParsers + }; + module2.exports.defaultParsers = { + getDefaultJsonParser, + defaultTextParser: defaultPlainTextParser + }; + module2.exports[kTestInternals] = { rawBody }; + } +}); + +// node_modules/dequal/dist/index.js +var require_dist = __commonJS({ + "node_modules/dequal/dist/index.js"(exports2) { + var has = Object.prototype.hasOwnProperty; + function find(iter, tar, key) { + for (key of iter.keys()) { + if (dequal(key, tar)) return key; + } + } + function dequal(foo, bar) { + var ctor, len, tmp; + if (foo === bar) return true; + if (foo && bar && (ctor = foo.constructor) === bar.constructor) { + if (ctor === Date) return foo.getTime() === bar.getTime(); + if (ctor === RegExp) return foo.toString() === bar.toString(); + if (ctor === Array) { + if ((len = foo.length) === bar.length) { + while (len-- && dequal(foo[len], bar[len])) ; + } + return len === -1; + } + if (ctor === Set) { + if (foo.size !== bar.size) { + return false; + } + for (len of foo) { + tmp = len; + if (tmp && typeof tmp === "object") { + tmp = find(bar, tmp); + if (!tmp) return false; + } + if (!bar.has(tmp)) return false; + } + return true; + } + if (ctor === Map) { + if (foo.size !== bar.size) { + return false; + } + for (len of foo) { + tmp = len[0]; + if (tmp && typeof tmp === "object") { + tmp = find(bar, tmp); + if (!tmp) return false; + } + if (!dequal(len[1], bar.get(tmp))) { + return false; + } + } + return true; + } + if (ctor === ArrayBuffer) { + foo = new Uint8Array(foo); + bar = new Uint8Array(bar); + } else if (ctor === DataView) { + if ((len = foo.byteLength) === bar.byteLength) { + while (len-- && foo.getInt8(len) === bar.getInt8(len)) ; + } + return len === -1; + } + if (ArrayBuffer.isView(foo)) { + if ((len = foo.byteLength) === bar.byteLength) { + while (len-- && foo[len] === bar[len]) ; + } + return len === -1; + } + if (!ctor || typeof foo === "object") { + len = 0; + for (ctor in foo) { + if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false; + if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false; + } + return Object.keys(bar).length === len; + } + } + return foo !== foo && bar !== bar; + } + exports2.dequal = dequal; + } +}); + +// node_modules/json-schema-ref-resolver/index.js +var require_json_schema_ref_resolver = __commonJS({ + "node_modules/json-schema-ref-resolver/index.js"(exports2, module2) { + "use strict"; + var { dequal: deepEqual } = require_dist(); + var jsonSchemaRefSymbol = Symbol.for("json-schema-ref"); + var RefResolver = class { + #schemas; + #derefSchemas; + #insertRefSymbol; + #allowEqualDuplicates; + #cloneSchemaWithoutRefs; + constructor(opts = {}) { + this.#schemas = {}; + this.#derefSchemas = {}; + this.#insertRefSymbol = opts.insertRefSymbol ?? false; + this.#allowEqualDuplicates = opts.allowEqualDuplicates ?? true; + this.#cloneSchemaWithoutRefs = opts.cloneSchemaWithoutRefs ?? false; + } + addSchema(schema, rootSchemaId, isRootSchema = true) { + if (isRootSchema) { + if (schema.$id !== void 0 && schema.$id.charAt(0) !== "#") { + rootSchemaId = schema.$id; + } else { + this.#insertSchemaBySchemaId(schema, rootSchemaId); + } + } + const schemaId = schema.$id; + if (schemaId !== void 0 && typeof schemaId === "string") { + if (schemaId.charAt(0) === "#") { + this.#insertSchemaByAnchor(schema, rootSchemaId, schemaId); + } else { + this.#insertSchemaBySchemaId(schema, schemaId); + rootSchemaId = schemaId; + } + } + const ref = schema.$ref; + if (ref !== void 0 && typeof ref === "string") { + const { refSchemaId, refJsonPointer } = this.#parseSchemaRef(ref, rootSchemaId); + this.#schemas[rootSchemaId].refs.push({ + schemaId: refSchemaId, + jsonPointer: refJsonPointer + }); + } + for (const key in schema) { + if (typeof schema[key] === "object" && schema[key] !== null) { + this.addSchema(schema[key], rootSchemaId, false); + } + } + } + getSchema(schemaId, jsonPointer = "#") { + const schema = this.#schemas[schemaId]; + if (schema === void 0) { + throw new Error( + `Cannot resolve ref "${schemaId}${jsonPointer}". Schema with id "${schemaId}" is not found.` + ); + } + if (schema.anchors[jsonPointer] !== void 0) { + return schema.anchors[jsonPointer]; + } + return getDataByJSONPointer(schema.schema, jsonPointer); + } + hasSchema(schemaId) { + return this.#schemas[schemaId] !== void 0; + } + getSchemaRefs(schemaId) { + const schema = this.#schemas[schemaId]; + if (schema === void 0) { + throw new Error(`Schema with id "${schemaId}" is not found.`); + } + return schema.refs; + } + getSchemaDependencies(schemaId, dependencies = {}) { + const schema = this.#schemas[schemaId]; + for (const ref of schema.refs) { + const dependencySchemaId = ref.schemaId; + if (dependencySchemaId === schemaId || dependencies[dependencySchemaId] !== void 0) continue; + dependencies[dependencySchemaId] = this.getSchema(dependencySchemaId); + this.getSchemaDependencies(dependencySchemaId, dependencies); + } + return dependencies; + } + derefSchema(schemaId) { + if (this.#derefSchemas[schemaId] !== void 0) return; + const schema = this.#schemas[schemaId]; + if (schema === void 0) { + throw new Error(`Schema with id "${schemaId}" is not found.`); + } + if (!this.#cloneSchemaWithoutRefs && schema.refs.length === 0) { + this.#derefSchemas[schemaId] = { + schema: schema.schema, + anchors: schema.anchors + }; + } + const refs = []; + this.#addDerefSchema(schema.schema, schemaId, true, refs); + const dependencies = this.getSchemaDependencies(schemaId); + for (const schemaId2 in dependencies) { + const schema2 = dependencies[schemaId2]; + this.#addDerefSchema(schema2, schemaId2, true, refs); + } + for (const ref of refs) { + const { + refSchemaId, + refJsonPointer + } = this.#parseSchemaRef(ref.ref, ref.sourceSchemaId); + const targetSchema = this.getDerefSchema(refSchemaId, refJsonPointer); + if (targetSchema === null) { + throw new Error( + `Cannot resolve ref "${ref.ref}". Ref "${refJsonPointer}" is not found in schema "${refSchemaId}".` + ); + } + ref.targetSchema = targetSchema; + ref.targetSchemaId = refSchemaId; + } + for (const ref of refs) { + this.#resolveRef(ref, refs); + } + } + getDerefSchema(schemaId, jsonPointer = "#") { + let derefSchema = this.#derefSchemas[schemaId]; + if (derefSchema === void 0) { + this.derefSchema(schemaId); + derefSchema = this.#derefSchemas[schemaId]; + } + if (derefSchema.anchors[jsonPointer] !== void 0) { + return derefSchema.anchors[jsonPointer]; + } + return getDataByJSONPointer(derefSchema.schema, jsonPointer); + } + #parseSchemaRef(ref, schemaId) { + const sharpIndex = ref.indexOf("#"); + if (sharpIndex === -1) { + return { refSchemaId: ref, refJsonPointer: "#" }; + } + if (sharpIndex === 0) { + return { refSchemaId: schemaId, refJsonPointer: ref }; + } + return { + refSchemaId: ref.slice(0, sharpIndex), + refJsonPointer: ref.slice(sharpIndex) + }; + } + #addDerefSchema(schema, rootSchemaId, isRootSchema, refs = []) { + const derefSchema = Array.isArray(schema) ? [...schema] : { ...schema }; + if (isRootSchema) { + if (schema.$id !== void 0 && schema.$id.charAt(0) !== "#") { + rootSchemaId = schema.$id; + } else { + this.#insertDerefSchemaBySchemaId(derefSchema, rootSchemaId); + } + } + const schemaId = derefSchema.$id; + if (schemaId !== void 0 && typeof schemaId === "string") { + if (schemaId.charAt(0) === "#") { + this.#insertDerefSchemaByAnchor(derefSchema, rootSchemaId, schemaId); + } else { + this.#insertDerefSchemaBySchemaId(derefSchema, schemaId); + rootSchemaId = schemaId; + } + } + if (derefSchema.$ref !== void 0) { + refs.push({ + ref: derefSchema.$ref, + sourceSchemaId: rootSchemaId, + sourceSchema: derefSchema + }); + } + for (const key in derefSchema) { + const value = derefSchema[key]; + if (typeof value === "object" && value !== null) { + derefSchema[key] = this.#addDerefSchema(value, rootSchemaId, false, refs); + } + } + return derefSchema; + } + #resolveRef(ref, refs) { + const { sourceSchema, targetSchema } = ref; + if (!sourceSchema.$ref) return; + if (this.#insertRefSymbol) { + sourceSchema[jsonSchemaRefSymbol] = sourceSchema.$ref; + } + delete sourceSchema.$ref; + if (targetSchema.$ref) { + const targetSchemaRef = refs.find((ref2) => ref2.sourceSchema === targetSchema); + this.#resolveRef(targetSchemaRef, refs); + } + for (const key in targetSchema) { + if (key === "$id") continue; + if (sourceSchema[key] !== void 0) { + if (deepEqual(sourceSchema[key], targetSchema[key])) continue; + throw new Error( + `Cannot resolve ref "${ref.ref}". Property "${key}" already exists in schema "${ref.sourceSchemaId}".` + ); + } + sourceSchema[key] = targetSchema[key]; + } + ref.isResolved = true; + } + #insertSchemaBySchemaId(schema, schemaId) { + const foundSchema = this.#schemas[schemaId]; + if (foundSchema !== void 0) { + if (this.#allowEqualDuplicates && deepEqual(schema, foundSchema.schema)) return; + throw new Error(`There is already another schema with id "${schemaId}".`); + } + this.#schemas[schemaId] = { schema, anchors: {}, refs: [] }; + } + #insertSchemaByAnchor(schema, schemaId, anchor) { + const { anchors } = this.#schemas[schemaId]; + if (anchors[anchor] !== void 0) { + throw new Error(`There is already another anchor "${anchor}" in schema "${schemaId}".`); + } + anchors[anchor] = schema; + } + #insertDerefSchemaBySchemaId(schema, schemaId) { + const foundSchema = this.#derefSchemas[schemaId]; + if (foundSchema !== void 0) return; + this.#derefSchemas[schemaId] = { schema, anchors: {} }; + } + #insertDerefSchemaByAnchor(schema, schemaId, anchor) { + const { anchors } = this.#derefSchemas[schemaId]; + anchors[anchor] = schema; + } + }; + function getDataByJSONPointer(data, jsonPointer) { + const parts = jsonPointer.split("/"); + let current = data; + for (const part of parts) { + if (part === "" || part === "#") continue; + if (typeof current !== "object" || current === null) { + return null; + } + current = current[part]; + } + return current ?? null; + } + module2.exports = { RefResolver }; + } +}); + +// node_modules/ajv/dist/compile/codegen/code.js +var require_code = __commonJS({ + "node_modules/ajv/dist/compile/codegen/code.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.regexpCode = exports2.getEsmExportName = exports2.getProperty = exports2.safeStringify = exports2.stringify = exports2.strConcat = exports2.addCodeArg = exports2.str = exports2._ = exports2.nil = exports2._Code = exports2.Name = exports2.IDENTIFIER = exports2._CodeOrName = void 0; + var _CodeOrName = class { + }; + exports2._CodeOrName = _CodeOrName; + exports2.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + var Name = class extends _CodeOrName { + constructor(s) { + super(); + if (!exports2.IDENTIFIER.test(s)) + throw new Error("CodeGen: name must be a valid identifier"); + this.str = s; + } + toString() { + return this.str; + } + emptyStr() { + return false; + } + get names() { + return { [this.str]: 1 }; + } + }; + exports2.Name = Name; + var _Code = class extends _CodeOrName { + constructor(code) { + super(); + this._items = typeof code === "string" ? [code] : code; + } + toString() { + return this.str; + } + emptyStr() { + if (this._items.length > 1) + return false; + const item = this._items[0]; + return item === "" || item === '""'; + } + get str() { + var _a; + return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, ""); + } + get names() { + var _a; + return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => { + if (c instanceof Name) + names[c.str] = (names[c.str] || 0) + 1; + return names; + }, {}); + } + }; + exports2._Code = _Code; + exports2.nil = new _Code(""); + function _(strs, ...args) { + const code = [strs[0]]; + let i = 0; + while (i < args.length) { + addCodeArg(code, args[i]); + code.push(strs[++i]); + } + return new _Code(code); + } + exports2._ = _; + var plus = new _Code("+"); + function str(strs, ...args) { + const expr = [safeStringify(strs[0])]; + let i = 0; + while (i < args.length) { + expr.push(plus); + addCodeArg(expr, args[i]); + expr.push(plus, safeStringify(strs[++i])); + } + optimize(expr); + return new _Code(expr); + } + exports2.str = str; + function addCodeArg(code, arg) { + if (arg instanceof _Code) + code.push(...arg._items); + else if (arg instanceof Name) + code.push(arg); + else + code.push(interpolate(arg)); + } + exports2.addCodeArg = addCodeArg; + function optimize(expr) { + let i = 1; + while (i < expr.length - 1) { + if (expr[i] === plus) { + const res = mergeExprItems(expr[i - 1], expr[i + 1]); + if (res !== void 0) { + expr.splice(i - 1, 3, res); + continue; + } + expr[i++] = "+"; + } + i++; + } + } + function mergeExprItems(a, b) { + if (b === '""') + return a; + if (a === '""') + return b; + if (typeof a == "string") { + if (b instanceof Name || a[a.length - 1] !== '"') + return; + if (typeof b != "string") + return `${a.slice(0, -1)}${b}"`; + if (b[0] === '"') + return a.slice(0, -1) + b.slice(1); + return; + } + if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) + return `"${a}${b.slice(1)}`; + return; + } + function strConcat(c1, c2) { + return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`; + } + exports2.strConcat = strConcat; + function interpolate(x) { + return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x); + } + function stringify(x) { + return new _Code(safeStringify(x)); + } + exports2.stringify = stringify; + function safeStringify(x) { + return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); + } + exports2.safeStringify = safeStringify; + function getProperty(key) { + return typeof key == "string" && exports2.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`; + } + exports2.getProperty = getProperty; + function getEsmExportName(key) { + if (typeof key == "string" && exports2.IDENTIFIER.test(key)) { + return new _Code(`${key}`); + } + throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); + } + exports2.getEsmExportName = getEsmExportName; + function regexpCode(rx) { + return new _Code(rx.toString()); + } + exports2.regexpCode = regexpCode; + } +}); + +// node_modules/ajv/dist/compile/codegen/scope.js +var require_scope = __commonJS({ + "node_modules/ajv/dist/compile/codegen/scope.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValueScope = exports2.ValueScopeName = exports2.Scope = exports2.varKinds = exports2.UsedValueState = void 0; + var code_1 = require_code(); + var ValueError = class extends Error { + constructor(name) { + super(`CodeGen: "code" for ${name} not defined`); + this.value = name.value; + } + }; + var UsedValueState; + (function(UsedValueState2) { + UsedValueState2[UsedValueState2["Started"] = 0] = "Started"; + UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed"; + })(UsedValueState || (exports2.UsedValueState = UsedValueState = {})); + exports2.varKinds = { + const: new code_1.Name("const"), + let: new code_1.Name("let"), + var: new code_1.Name("var") + }; + var Scope = class { + constructor({ prefixes, parent } = {}) { + this._names = {}; + this._prefixes = prefixes; + this._parent = parent; + } + toName(nameOrPrefix) { + return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); + } + name(prefix) { + return new code_1.Name(this._newName(prefix)); + } + _newName(prefix) { + const ng2 = this._names[prefix] || this._nameGroup(prefix); + return `${prefix}${ng2.index++}`; + } + _nameGroup(prefix) { + var _a, _b; + if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) { + throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); + } + return this._names[prefix] = { prefix, index: 0 }; + } + }; + exports2.Scope = Scope; + var ValueScopeName = class extends code_1.Name { + constructor(prefix, nameStr) { + super(nameStr); + this.prefix = prefix; + } + setValue(value, { property, itemIndex }) { + this.value = value; + this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`; + } + }; + exports2.ValueScopeName = ValueScopeName; + var line = (0, code_1._)`\n`; + var ValueScope = class extends Scope { + constructor(opts) { + super(opts); + this._values = {}; + this._scope = opts.scope; + this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; + } + get() { + return this._scope; + } + name(prefix) { + return new ValueScopeName(prefix, this._newName(prefix)); + } + value(nameOrPrefix, value) { + var _a; + if (value.ref === void 0) + throw new Error("CodeGen: ref must be passed in value"); + const name = this.toName(nameOrPrefix); + const { prefix } = name; + const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref; + let vs = this._values[prefix]; + if (vs) { + const _name = vs.get(valueKey); + if (_name) + return _name; + } else { + vs = this._values[prefix] = /* @__PURE__ */ new Map(); + } + vs.set(valueKey, name); + const s = this._scope[prefix] || (this._scope[prefix] = []); + const itemIndex = s.length; + s[itemIndex] = value.ref; + name.setValue(value, { property: prefix, itemIndex }); + return name; + } + getValue(prefix, keyOrRef) { + const vs = this._values[prefix]; + if (!vs) + return; + return vs.get(keyOrRef); + } + scopeRefs(scopeName, values = this._values) { + return this._reduceValues(values, (name) => { + if (name.scopePath === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return (0, code_1._)`${scopeName}${name.scopePath}`; + }); + } + scopeCode(values = this._values, usedValues, getCode) { + return this._reduceValues(values, (name) => { + if (name.value === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return name.value.code; + }, usedValues, getCode); + } + _reduceValues(values, valueCode, usedValues = {}, getCode) { + let code = code_1.nil; + for (const prefix in values) { + const vs = values[prefix]; + if (!vs) + continue; + const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map(); + vs.forEach((name) => { + if (nameSet.has(name)) + return; + nameSet.set(name, UsedValueState.Started); + let c = valueCode(name); + if (c) { + const def = this.opts.es5 ? exports2.varKinds.var : exports2.varKinds.const; + code = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`; + } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) { + code = (0, code_1._)`${code}${c}${this.opts._n}`; + } else { + throw new ValueError(name); + } + nameSet.set(name, UsedValueState.Completed); + }); + } + return code; + } + }; + exports2.ValueScope = ValueScope; + } +}); + +// node_modules/ajv/dist/compile/codegen/index.js +var require_codegen = __commonJS({ + "node_modules/ajv/dist/compile/codegen/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.or = exports2.and = exports2.not = exports2.CodeGen = exports2.operators = exports2.varKinds = exports2.ValueScopeName = exports2.ValueScope = exports2.Scope = exports2.Name = exports2.regexpCode = exports2.stringify = exports2.getProperty = exports2.nil = exports2.strConcat = exports2.str = exports2._ = void 0; + var code_1 = require_code(); + var scope_1 = require_scope(); + var code_2 = require_code(); + Object.defineProperty(exports2, "_", { enumerable: true, get: function() { + return code_2._; + } }); + Object.defineProperty(exports2, "str", { enumerable: true, get: function() { + return code_2.str; + } }); + Object.defineProperty(exports2, "strConcat", { enumerable: true, get: function() { + return code_2.strConcat; + } }); + Object.defineProperty(exports2, "nil", { enumerable: true, get: function() { + return code_2.nil; + } }); + Object.defineProperty(exports2, "getProperty", { enumerable: true, get: function() { + return code_2.getProperty; + } }); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return code_2.stringify; + } }); + Object.defineProperty(exports2, "regexpCode", { enumerable: true, get: function() { + return code_2.regexpCode; + } }); + Object.defineProperty(exports2, "Name", { enumerable: true, get: function() { + return code_2.Name; + } }); + var scope_2 = require_scope(); + Object.defineProperty(exports2, "Scope", { enumerable: true, get: function() { + return scope_2.Scope; + } }); + Object.defineProperty(exports2, "ValueScope", { enumerable: true, get: function() { + return scope_2.ValueScope; + } }); + Object.defineProperty(exports2, "ValueScopeName", { enumerable: true, get: function() { + return scope_2.ValueScopeName; + } }); + Object.defineProperty(exports2, "varKinds", { enumerable: true, get: function() { + return scope_2.varKinds; + } }); + exports2.operators = { + GT: new code_1._Code(">"), + GTE: new code_1._Code(">="), + LT: new code_1._Code("<"), + LTE: new code_1._Code("<="), + EQ: new code_1._Code("==="), + NEQ: new code_1._Code("!=="), + NOT: new code_1._Code("!"), + OR: new code_1._Code("||"), + AND: new code_1._Code("&&"), + ADD: new code_1._Code("+") + }; + var Node = class { + optimizeNodes() { + return this; + } + optimizeNames(_names, _constants) { + return this; + } + }; + var Def = class extends Node { + constructor(varKind, name, rhs) { + super(); + this.varKind = varKind; + this.name = name; + this.rhs = rhs; + } + render({ es5, _n }) { + const varKind = es5 ? scope_1.varKinds.var : this.varKind; + const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`; + return `${varKind} ${this.name}${rhs};` + _n; + } + optimizeNames(names, constants2) { + if (!names[this.name.str]) + return; + if (this.rhs) + this.rhs = optimizeExpr(this.rhs, names, constants2); + return this; + } + get names() { + return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; + } + }; + var Assign = class extends Node { + constructor(lhs, rhs, sideEffects) { + super(); + this.lhs = lhs; + this.rhs = rhs; + this.sideEffects = sideEffects; + } + render({ _n }) { + return `${this.lhs} = ${this.rhs};` + _n; + } + optimizeNames(names, constants2) { + if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) + return; + this.rhs = optimizeExpr(this.rhs, names, constants2); + return this; + } + get names() { + const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; + return addExprNames(names, this.rhs); + } + }; + var AssignOp = class extends Assign { + constructor(lhs, op, rhs, sideEffects) { + super(lhs, rhs, sideEffects); + this.op = op; + } + render({ _n }) { + return `${this.lhs} ${this.op}= ${this.rhs};` + _n; + } + }; + var Label = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + return `${this.label}:` + _n; + } + }; + var Break = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + const label = this.label ? ` ${this.label}` : ""; + return `break${label};` + _n; + } + }; + var Throw = class extends Node { + constructor(error) { + super(); + this.error = error; + } + render({ _n }) { + return `throw ${this.error};` + _n; + } + get names() { + return this.error.names; + } + }; + var AnyCode = class extends Node { + constructor(code) { + super(); + this.code = code; + } + render({ _n }) { + return `${this.code};` + _n; + } + optimizeNodes() { + return `${this.code}` ? this : void 0; + } + optimizeNames(names, constants2) { + this.code = optimizeExpr(this.code, names, constants2); + return this; + } + get names() { + return this.code instanceof code_1._CodeOrName ? this.code.names : {}; + } + }; + var ParentNode = class extends Node { + constructor(nodes = []) { + super(); + this.nodes = nodes; + } + render(opts) { + return this.nodes.reduce((code, n) => code + n.render(opts), ""); + } + optimizeNodes() { + const { nodes } = this; + let i = nodes.length; + while (i--) { + const n = nodes[i].optimizeNodes(); + if (Array.isArray(n)) + nodes.splice(i, 1, ...n); + else if (n) + nodes[i] = n; + else + nodes.splice(i, 1); + } + return nodes.length > 0 ? this : void 0; + } + optimizeNames(names, constants2) { + const { nodes } = this; + let i = nodes.length; + while (i--) { + const n = nodes[i]; + if (n.optimizeNames(names, constants2)) + continue; + subtractNames(names, n.names); + nodes.splice(i, 1); + } + return nodes.length > 0 ? this : void 0; + } + get names() { + return this.nodes.reduce((names, n) => addNames(names, n.names), {}); + } + }; + var BlockNode = class extends ParentNode { + render(opts) { + return "{" + opts._n + super.render(opts) + "}" + opts._n; + } + }; + var Root = class extends ParentNode { + }; + var Else = class extends BlockNode { + }; + Else.kind = "else"; + var If2 = class _If extends BlockNode { + constructor(condition, nodes) { + super(nodes); + this.condition = condition; + } + render(opts) { + let code = `if(${this.condition})` + super.render(opts); + if (this.else) + code += "else " + this.else.render(opts); + return code; + } + optimizeNodes() { + super.optimizeNodes(); + const cond = this.condition; + if (cond === true) + return this.nodes; + let e = this.else; + if (e) { + const ns = e.optimizeNodes(); + e = this.else = Array.isArray(ns) ? new Else(ns) : ns; + } + if (e) { + if (cond === false) + return e instanceof _If ? e : e.nodes; + if (this.nodes.length) + return this; + return new _If(not(cond), e instanceof _If ? [e] : e.nodes); + } + if (cond === false || !this.nodes.length) + return void 0; + return this; + } + optimizeNames(names, constants2) { + var _a; + this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants2); + if (!(super.optimizeNames(names, constants2) || this.else)) + return; + this.condition = optimizeExpr(this.condition, names, constants2); + return this; + } + get names() { + const names = super.names; + addExprNames(names, this.condition); + if (this.else) + addNames(names, this.else.names); + return names; + } + }; + If2.kind = "if"; + var For = class extends BlockNode { + }; + For.kind = "for"; + var ForLoop = class extends For { + constructor(iteration) { + super(); + this.iteration = iteration; + } + render(opts) { + return `for(${this.iteration})` + super.render(opts); + } + optimizeNames(names, constants2) { + if (!super.optimizeNames(names, constants2)) + return; + this.iteration = optimizeExpr(this.iteration, names, constants2); + return this; + } + get names() { + return addNames(super.names, this.iteration.names); + } + }; + var ForRange = class extends For { + constructor(varKind, name, from, to) { + super(); + this.varKind = varKind; + this.name = name; + this.from = from; + this.to = to; + } + render(opts) { + const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; + const { name, from, to } = this; + return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts); + } + get names() { + const names = addExprNames(super.names, this.from); + return addExprNames(names, this.to); + } + }; + var ForIter = class extends For { + constructor(loop, varKind, name, iterable) { + super(); + this.loop = loop; + this.varKind = varKind; + this.name = name; + this.iterable = iterable; + } + render(opts) { + return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); + } + optimizeNames(names, constants2) { + if (!super.optimizeNames(names, constants2)) + return; + this.iterable = optimizeExpr(this.iterable, names, constants2); + return this; + } + get names() { + return addNames(super.names, this.iterable.names); + } + }; + var Func = class extends BlockNode { + constructor(name, args, async) { + super(); + this.name = name; + this.args = args; + this.async = async; + } + render(opts) { + const _async = this.async ? "async " : ""; + return `${_async}function ${this.name}(${this.args})` + super.render(opts); + } + }; + Func.kind = "func"; + var Return = class extends ParentNode { + render(opts) { + return "return " + super.render(opts); + } + }; + Return.kind = "return"; + var Try = class extends BlockNode { + render(opts) { + let code = "try" + super.render(opts); + if (this.catch) + code += this.catch.render(opts); + if (this.finally) + code += this.finally.render(opts); + return code; + } + optimizeNodes() { + var _a, _b; + super.optimizeNodes(); + (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes(); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); + return this; + } + optimizeNames(names, constants2) { + var _a, _b; + super.optimizeNames(names, constants2); + (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants2); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants2); + return this; + } + get names() { + const names = super.names; + if (this.catch) + addNames(names, this.catch.names); + if (this.finally) + addNames(names, this.finally.names); + return names; + } + }; + var Catch = class extends BlockNode { + constructor(error) { + super(); + this.error = error; + } + render(opts) { + return `catch(${this.error})` + super.render(opts); + } + }; + Catch.kind = "catch"; + var Finally = class extends BlockNode { + render(opts) { + return "finally" + super.render(opts); + } + }; + Finally.kind = "finally"; + var CodeGen = class { + constructor(extScope, opts = {}) { + this._values = {}; + this._blockStarts = []; + this._constants = {}; + this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; + this._extScope = extScope; + this._scope = new scope_1.Scope({ parent: extScope }); + this._nodes = [new Root()]; + } + toString() { + return this._root.render(this.opts); + } + // returns unique name in the internal scope + name(prefix) { + return this._scope.name(prefix); + } + // reserves unique name in the external scope + scopeName(prefix) { + return this._extScope.name(prefix); + } + // reserves unique name in the external scope and assigns value to it + scopeValue(prefixOrName, value) { + const name = this._extScope.value(prefixOrName, value); + const vs = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set()); + vs.add(name); + return name; + } + getScopeValue(prefix, keyOrRef) { + return this._extScope.getValue(prefix, keyOrRef); + } + // return code that assigns values in the external scope to the names that are used internally + // (same names that were returned by gen.scopeName or gen.scopeValue) + scopeRefs(scopeName) { + return this._extScope.scopeRefs(scopeName, this._values); + } + scopeCode() { + return this._extScope.scopeCode(this._values); + } + _def(varKind, nameOrPrefix, rhs, constant) { + const name = this._scope.toName(nameOrPrefix); + if (rhs !== void 0 && constant) + this._constants[name.str] = rhs; + this._leafNode(new Def(varKind, name, rhs)); + return name; + } + // `const` declaration (`var` in es5 mode) + const(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); + } + // `let` declaration with optional assignment (`var` in es5 mode) + let(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); + } + // `var` declaration with optional assignment + var(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); + } + // assignment code + assign(lhs, rhs, sideEffects) { + return this._leafNode(new Assign(lhs, rhs, sideEffects)); + } + // `+=` code + add(lhs, rhs) { + return this._leafNode(new AssignOp(lhs, exports2.operators.ADD, rhs)); + } + // appends passed SafeExpr to code or executes Block + code(c) { + if (typeof c == "function") + c(); + else if (c !== code_1.nil) + this._leafNode(new AnyCode(c)); + return this; + } + // returns code for object literal for the passed argument list of key-value pairs + object(...keyValues) { + const code = ["{"]; + for (const [key, value] of keyValues) { + if (code.length > 1) + code.push(","); + code.push(key); + if (key !== value || this.opts.es5) { + code.push(":"); + (0, code_1.addCodeArg)(code, value); + } + } + code.push("}"); + return new code_1._Code(code); + } + // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed) + if(condition, thenBody, elseBody) { + this._blockNode(new If2(condition)); + if (thenBody && elseBody) { + this.code(thenBody).else().code(elseBody).endIf(); + } else if (thenBody) { + this.code(thenBody).endIf(); + } else if (elseBody) { + throw new Error('CodeGen: "else" body without "then" body'); + } + return this; + } + // `else if` clause - invalid without `if` or after `else` clauses + elseIf(condition) { + return this._elseNode(new If2(condition)); + } + // `else` clause - only valid after `if` or `else if` clauses + else() { + return this._elseNode(new Else()); + } + // end `if` statement (needed if gen.if was used only with condition) + endIf() { + return this._endBlockNode(If2, Else); + } + _for(node, forBody) { + this._blockNode(node); + if (forBody) + this.code(forBody).endFor(); + return this; + } + // a generic `for` clause (or statement if `forBody` is passed) + for(iteration, forBody) { + return this._for(new ForLoop(iteration), forBody); + } + // `for` statement for a range of values + forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForRange(varKind, name, from, to), () => forBody(name)); + } + // `for-of` statement (in es5 mode replace with a normal for loop) + forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { + const name = this._scope.toName(nameOrPrefix); + if (this.opts.es5) { + const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); + return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i) => { + this.var(name, (0, code_1._)`${arr}[${i}]`); + forBody(name); + }); + } + return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); + } + // `for-in` statement. + // With option `ownProperties` replaced with a `for-of` loop for object keys + forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { + if (this.opts.ownProperties) { + return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody); + } + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); + } + // end `for` loop + endFor() { + return this._endBlockNode(For); + } + // `label` statement + label(label) { + return this._leafNode(new Label(label)); + } + // `break` statement + break(label) { + return this._leafNode(new Break(label)); + } + // `return` statement + return(value) { + const node = new Return(); + this._blockNode(node); + this.code(value); + if (node.nodes.length !== 1) + throw new Error('CodeGen: "return" should have one node'); + return this._endBlockNode(Return); + } + // `try` statement + try(tryBody, catchCode, finallyCode) { + if (!catchCode && !finallyCode) + throw new Error('CodeGen: "try" without "catch" and "finally"'); + const node = new Try(); + this._blockNode(node); + this.code(tryBody); + if (catchCode) { + const error = this.name("e"); + this._currNode = node.catch = new Catch(error); + catchCode(error); + } + if (finallyCode) { + this._currNode = node.finally = new Finally(); + this.code(finallyCode); + } + return this._endBlockNode(Catch, Finally); + } + // `throw` statement + throw(error) { + return this._leafNode(new Throw(error)); + } + // start self-balancing block + block(body, nodeCount) { + this._blockStarts.push(this._nodes.length); + if (body) + this.code(body).endBlock(nodeCount); + return this; + } + // end the current self-balancing block + endBlock(nodeCount) { + const len = this._blockStarts.pop(); + if (len === void 0) + throw new Error("CodeGen: not in self-balancing block"); + const toClose = this._nodes.length - len; + if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) { + throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); + } + this._nodes.length = len; + return this; + } + // `function` heading (or definition if funcBody is passed) + func(name, args = code_1.nil, async, funcBody) { + this._blockNode(new Func(name, args, async)); + if (funcBody) + this.code(funcBody).endFunc(); + return this; + } + // end function definition + endFunc() { + return this._endBlockNode(Func); + } + optimize(n = 1) { + while (n-- > 0) { + this._root.optimizeNodes(); + this._root.optimizeNames(this._root.names, this._constants); + } + } + _leafNode(node) { + this._currNode.nodes.push(node); + return this; + } + _blockNode(node) { + this._currNode.nodes.push(node); + this._nodes.push(node); + } + _endBlockNode(N1, N2) { + const n = this._currNode; + if (n instanceof N1 || N2 && n instanceof N2) { + this._nodes.pop(); + return this; + } + throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`); + } + _elseNode(node) { + const n = this._currNode; + if (!(n instanceof If2)) { + throw new Error('CodeGen: "else" without "if"'); + } + this._currNode = n.else = node; + return this; + } + get _root() { + return this._nodes[0]; + } + get _currNode() { + const ns = this._nodes; + return ns[ns.length - 1]; + } + set _currNode(node) { + const ns = this._nodes; + ns[ns.length - 1] = node; + } + }; + exports2.CodeGen = CodeGen; + function addNames(names, from) { + for (const n in from) + names[n] = (names[n] || 0) + (from[n] || 0); + return names; + } + function addExprNames(names, from) { + return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; + } + function optimizeExpr(expr, names, constants2) { + if (expr instanceof code_1.Name) + return replaceName(expr); + if (!canOptimize(expr)) + return expr; + return new code_1._Code(expr._items.reduce((items, c) => { + if (c instanceof code_1.Name) + c = replaceName(c); + if (c instanceof code_1._Code) + items.push(...c._items); + else + items.push(c); + return items; + }, [])); + function replaceName(n) { + const c = constants2[n.str]; + if (c === void 0 || names[n.str] !== 1) + return n; + delete names[n.str]; + return c; + } + function canOptimize(e) { + return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants2[c.str] !== void 0); + } + } + function subtractNames(names, from) { + for (const n in from) + names[n] = (names[n] || 0) - (from[n] || 0); + } + function not(x) { + return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`; + } + exports2.not = not; + var andCode = mappend(exports2.operators.AND); + function and(...args) { + return args.reduce(andCode); + } + exports2.and = and; + var orCode = mappend(exports2.operators.OR); + function or(...args) { + return args.reduce(orCode); + } + exports2.or = or; + function mappend(op) { + return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`; + } + function par(x) { + return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`; + } + } +}); + +// node_modules/ajv/dist/compile/util.js +var require_util2 = __commonJS({ + "node_modules/ajv/dist/compile/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkStrictMode = exports2.getErrorPath = exports2.Type = exports2.useFunc = exports2.setEvaluated = exports2.evaluatedPropsToName = exports2.mergeEvaluated = exports2.eachItem = exports2.unescapeJsonPointer = exports2.escapeJsonPointer = exports2.escapeFragment = exports2.unescapeFragment = exports2.schemaRefOrVal = exports2.schemaHasRulesButRef = exports2.schemaHasRules = exports2.checkUnknownRules = exports2.alwaysValidSchema = exports2.toHash = void 0; + var codegen_1 = require_codegen(); + var code_1 = require_code(); + function toHash(arr) { + const hash = {}; + for (const item of arr) + hash[item] = true; + return hash; + } + exports2.toHash = toHash; + function alwaysValidSchema(it2, schema) { + if (typeof schema == "boolean") + return schema; + if (Object.keys(schema).length === 0) + return true; + checkUnknownRules(it2, schema); + return !schemaHasRules(schema, it2.self.RULES.all); + } + exports2.alwaysValidSchema = alwaysValidSchema; + function checkUnknownRules(it2, schema = it2.schema) { + const { opts, self: self2 } = it2; + if (!opts.strictSchema) + return; + if (typeof schema === "boolean") + return; + const rules = self2.RULES.keywords; + for (const key in schema) { + if (!rules[key]) + checkStrictMode(it2, `unknown keyword: "${key}"`); + } + } + exports2.checkUnknownRules = checkUnknownRules; + function schemaHasRules(schema, rules) { + if (typeof schema == "boolean") + return !schema; + for (const key in schema) + if (rules[key]) + return true; + return false; + } + exports2.schemaHasRules = schemaHasRules; + function schemaHasRulesButRef(schema, RULES) { + if (typeof schema == "boolean") + return !schema; + for (const key in schema) + if (key !== "$ref" && RULES.all[key]) + return true; + return false; + } + exports2.schemaHasRulesButRef = schemaHasRulesButRef; + function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) { + if (!$data) { + if (typeof schema == "number" || typeof schema == "boolean") + return schema; + if (typeof schema == "string") + return (0, codegen_1._)`${schema}`; + } + return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; + } + exports2.schemaRefOrVal = schemaRefOrVal; + function unescapeFragment(str) { + return unescapeJsonPointer(decodeURIComponent(str)); + } + exports2.unescapeFragment = unescapeFragment; + function escapeFragment(str) { + return encodeURIComponent(escapeJsonPointer(str)); + } + exports2.escapeFragment = escapeFragment; + function escapeJsonPointer(str) { + if (typeof str == "number") + return `${str}`; + return str.replace(/~/g, "~0").replace(/\//g, "~1"); + } + exports2.escapeJsonPointer = escapeJsonPointer; + function unescapeJsonPointer(str) { + return str.replace(/~1/g, "/").replace(/~0/g, "~"); + } + exports2.unescapeJsonPointer = unescapeJsonPointer; + function eachItem(xs, f) { + if (Array.isArray(xs)) { + for (const x of xs) + f(x); + } else { + f(xs); + } + } + exports2.eachItem = eachItem; + function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) { + return (gen, from, to, toName) => { + const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to); + return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; + }; + } + exports2.mergeEvaluated = { + props: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => { + gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`)); + }), + mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => { + if (from === true) { + gen.assign(to, true); + } else { + gen.assign(to, (0, codegen_1._)`${to} || {}`); + setEvaluated(gen, to, from); + } + }), + mergeValues: (from, to) => from === true ? true : { ...from, ...to }, + resultToName: evaluatedPropsToName + }), + items: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), + mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)), + mergeValues: (from, to) => from === true ? true : Math.max(from, to), + resultToName: (gen, items) => gen.var("items", items) + }) + }; + function evaluatedPropsToName(gen, ps2) { + if (ps2 === true) + return gen.var("props", true); + const props = gen.var("props", (0, codegen_1._)`{}`); + if (ps2 !== void 0) + setEvaluated(gen, props, ps2); + return props; + } + exports2.evaluatedPropsToName = evaluatedPropsToName; + function setEvaluated(gen, props, ps2) { + Object.keys(ps2).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true)); + } + exports2.setEvaluated = setEvaluated; + var snippets = {}; + function useFunc(gen, f) { + return gen.scopeValue("func", { + ref: f, + code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)) + }); + } + exports2.useFunc = useFunc; + var Type; + (function(Type2) { + Type2[Type2["Num"] = 0] = "Num"; + Type2[Type2["Str"] = 1] = "Str"; + })(Type || (exports2.Type = Type = {})); + function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { + if (dataProp instanceof codegen_1.Name) { + const isNumber = dataPropType === Type.Num; + return jsPropertySyntax ? isNumber ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; + } + return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); + } + exports2.getErrorPath = getErrorPath; + function checkStrictMode(it2, msg, mode = it2.opts.strictSchema) { + if (!mode) + return; + msg = `strict mode: ${msg}`; + if (mode === true) + throw new Error(msg); + it2.self.logger.warn(msg); + } + exports2.checkStrictMode = checkStrictMode; + } +}); + +// node_modules/ajv/dist/compile/names.js +var require_names = __commonJS({ + "node_modules/ajv/dist/compile/names.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var names = { + // validation function arguments + data: new codegen_1.Name("data"), + // data passed to validation function + // args passed from referencing schema + valCxt: new codegen_1.Name("valCxt"), + // validation/data context - should not be used directly, it is destructured to the names below + instancePath: new codegen_1.Name("instancePath"), + parentData: new codegen_1.Name("parentData"), + parentDataProperty: new codegen_1.Name("parentDataProperty"), + rootData: new codegen_1.Name("rootData"), + // root data - same as the data passed to the first/top validation function + dynamicAnchors: new codegen_1.Name("dynamicAnchors"), + // used to support recursiveRef and dynamicRef + // function scoped variables + vErrors: new codegen_1.Name("vErrors"), + // null or array of validation errors + errors: new codegen_1.Name("errors"), + // counter of validation errors + this: new codegen_1.Name("this"), + // "globals" + self: new codegen_1.Name("self"), + scope: new codegen_1.Name("scope"), + // JTD serialize/parse name for JSON string and position + json: new codegen_1.Name("json"), + jsonPos: new codegen_1.Name("jsonPos"), + jsonLen: new codegen_1.Name("jsonLen"), + jsonPart: new codegen_1.Name("jsonPart") + }; + exports2.default = names; + } +}); + +// node_modules/ajv/dist/compile/errors.js +var require_errors3 = __commonJS({ + "node_modules/ajv/dist/compile/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendErrors = exports2.resetErrorsCount = exports2.reportExtraError = exports2.reportError = exports2.keyword$DataError = exports2.keywordError = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var names_1 = require_names(); + exports2.keywordError = { + message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation` + }; + exports2.keyword$DataError = { + message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)` + }; + function reportError(cxt, error = exports2.keywordError, errorPaths, overrideAllErrors) { + const { it: it2 } = cxt; + const { gen, compositeRule, allErrors } = it2; + const errObj = errorObjectCode(cxt, error, errorPaths); + if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) { + addError(gen, errObj); + } else { + returnErrors(it2, (0, codegen_1._)`[${errObj}]`); + } + } + exports2.reportError = reportError; + function reportExtraError(cxt, error = exports2.keywordError, errorPaths) { + const { it: it2 } = cxt; + const { gen, compositeRule, allErrors } = it2; + const errObj = errorObjectCode(cxt, error, errorPaths); + addError(gen, errObj); + if (!(compositeRule || allErrors)) { + returnErrors(it2, names_1.default.vErrors); + } + } + exports2.reportExtraError = reportExtraError; + function resetErrorsCount(gen, errsCount) { + gen.assign(names_1.default.errors, errsCount); + gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); + } + exports2.resetErrorsCount = resetErrorsCount; + function extendErrors({ gen, keyword, schemaValue, data, errsCount, it: it2 }) { + if (errsCount === void 0) + throw new Error("ajv implementation error"); + const err = gen.name("err"); + gen.forRange("i", errsCount, names_1.default.errors, (i) => { + gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`); + gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it2.errorPath))); + gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it2.errSchemaPath}/${keyword}`); + if (it2.opts.verbose) { + gen.assign((0, codegen_1._)`${err}.schema`, schemaValue); + gen.assign((0, codegen_1._)`${err}.data`, data); + } + }); + } + exports2.extendErrors = extendErrors; + function addError(gen, errObj) { + const err = gen.const("err", errObj); + gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`); + gen.code((0, codegen_1._)`${names_1.default.errors}++`); + } + function returnErrors(it2, errs) { + const { gen, validateName, schemaEnv } = it2; + if (schemaEnv.$async) { + gen.throw((0, codegen_1._)`new ${it2.ValidationError}(${errs})`); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, errs); + gen.return(false); + } + } + var E = { + keyword: new codegen_1.Name("keyword"), + schemaPath: new codegen_1.Name("schemaPath"), + // also used in JTD errors + params: new codegen_1.Name("params"), + propertyName: new codegen_1.Name("propertyName"), + message: new codegen_1.Name("message"), + schema: new codegen_1.Name("schema"), + parentSchema: new codegen_1.Name("parentSchema") + }; + function errorObjectCode(cxt, error, errorPaths) { + const { createErrors } = cxt.it; + if (createErrors === false) + return (0, codegen_1._)`{}`; + return errorObject(cxt, error, errorPaths); + } + function errorObject(cxt, error, errorPaths = {}) { + const { gen, it: it2 } = cxt; + const keyValues = [ + errorInstancePath(it2, errorPaths), + errorSchemaPath(cxt, errorPaths) + ]; + extraErrorProps(cxt, error, keyValues); + return gen.object(...keyValues); + } + function errorInstancePath({ errorPath }, { instancePath }) { + const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath; + return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; + } + function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { + let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`; + if (schemaPath) { + schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; + } + return [E.schemaPath, schPath]; + } + function extraErrorProps(cxt, { params, message }, keyValues) { + const { keyword, data, schemaValue, it: it2 } = cxt; + const { opts, propertyName, topSchemaRef, schemaPath } = it2; + keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]); + if (opts.messages) { + keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]); + } + if (opts.verbose) { + keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); + } + if (propertyName) + keyValues.push([E.propertyName, propertyName]); + } + } +}); + +// node_modules/ajv/dist/compile/validate/boolSchema.js +var require_boolSchema = __commonJS({ + "node_modules/ajv/dist/compile/validate/boolSchema.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.boolOrEmptySchema = exports2.topBoolOrEmptySchema = void 0; + var errors_1 = require_errors3(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var boolError = { + message: "boolean schema is false" + }; + function topBoolOrEmptySchema(it2) { + const { gen, schema, validateName } = it2; + if (schema === false) { + falseSchemaError(it2, false); + } else if (typeof schema == "object" && schema.$async === true) { + gen.return(names_1.default.data); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, null); + gen.return(true); + } + } + exports2.topBoolOrEmptySchema = topBoolOrEmptySchema; + function boolOrEmptySchema(it2, valid) { + const { gen, schema } = it2; + if (schema === false) { + gen.var(valid, false); + falseSchemaError(it2); + } else { + gen.var(valid, true); + } + } + exports2.boolOrEmptySchema = boolOrEmptySchema; + function falseSchemaError(it2, overrideAllErrors) { + const { gen, data } = it2; + const cxt = { + gen, + keyword: "false schema", + data, + schema: false, + schemaCode: false, + schemaValue: false, + params: {}, + it: it2 + }; + (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors); + } + } +}); + +// node_modules/ajv/dist/compile/rules.js +var require_rules = __commonJS({ + "node_modules/ajv/dist/compile/rules.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRules = exports2.isJSONType = void 0; + var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; + var jsonTypes = new Set(_jsonTypes); + function isJSONType(x) { + return typeof x == "string" && jsonTypes.has(x); + } + exports2.isJSONType = isJSONType; + function getRules() { + const groups = { + number: { type: "number", rules: [] }, + string: { type: "string", rules: [] }, + array: { type: "array", rules: [] }, + object: { type: "object", rules: [] } + }; + return { + types: { ...groups, integer: true, boolean: true, null: true }, + rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], + post: { rules: [] }, + all: {}, + keywords: {} + }; + } + exports2.getRules = getRules; + } +}); + +// node_modules/ajv/dist/compile/validate/applicability.js +var require_applicability = __commonJS({ + "node_modules/ajv/dist/compile/validate/applicability.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shouldUseRule = exports2.shouldUseGroup = exports2.schemaHasRulesForType = void 0; + function schemaHasRulesForType({ schema, self: self2 }, type) { + const group = self2.RULES.types[type]; + return group && group !== true && shouldUseGroup(schema, group); + } + exports2.schemaHasRulesForType = schemaHasRulesForType; + function shouldUseGroup(schema, group) { + return group.rules.some((rule) => shouldUseRule(schema, rule)); + } + exports2.shouldUseGroup = shouldUseGroup; + function shouldUseRule(schema, rule) { + var _a; + return schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0)); + } + exports2.shouldUseRule = shouldUseRule; + } +}); + +// node_modules/ajv/dist/compile/validate/dataType.js +var require_dataType = __commonJS({ + "node_modules/ajv/dist/compile/validate/dataType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reportTypeError = exports2.checkDataTypes = exports2.checkDataType = exports2.coerceAndCheckDataType = exports2.getJSONTypes = exports2.getSchemaTypes = exports2.DataType = void 0; + var rules_1 = require_rules(); + var applicability_1 = require_applicability(); + var errors_1 = require_errors3(); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var DataType; + (function(DataType2) { + DataType2[DataType2["Correct"] = 0] = "Correct"; + DataType2[DataType2["Wrong"] = 1] = "Wrong"; + })(DataType || (exports2.DataType = DataType = {})); + function getSchemaTypes(schema) { + const types = getJSONTypes(schema.type); + const hasNull = types.includes("null"); + if (hasNull) { + if (schema.nullable === false) + throw new Error("type: null contradicts nullable: false"); + } else { + if (!types.length && schema.nullable !== void 0) { + throw new Error('"nullable" cannot be used without "type"'); + } + if (schema.nullable === true) + types.push("null"); + } + return types; + } + exports2.getSchemaTypes = getSchemaTypes; + function getJSONTypes(ts) { + const types = Array.isArray(ts) ? ts : ts ? [ts] : []; + if (types.every(rules_1.isJSONType)) + return types; + throw new Error("type must be JSONType or JSONType[]: " + types.join(",")); + } + exports2.getJSONTypes = getJSONTypes; + function coerceAndCheckDataType(it2, types) { + const { gen, data, opts } = it2; + const coerceTo = coerceToTypes(types, opts.coerceTypes); + const checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it2, types[0])); + if (checkTypes) { + const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong); + gen.if(wrongType, () => { + if (coerceTo.length) + coerceData(it2, types, coerceTo); + else + reportTypeError(it2); + }); + } + return checkTypes; + } + exports2.coerceAndCheckDataType = coerceAndCheckDataType; + var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]); + function coerceToTypes(types, coerceTypes) { + return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : []; + } + function coerceData(it2, types, coerceTo) { + const { gen, data, opts } = it2; + const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`); + const coerced = gen.let("coerced", (0, codegen_1._)`undefined`); + if (opts.coerceTypes === "array") { + gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))); + } + gen.if((0, codegen_1._)`${coerced} !== undefined`); + for (const t of coerceTo) { + if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") { + coerceSpecificType(t); + } + } + gen.else(); + reportTypeError(it2); + gen.endIf(); + gen.if((0, codegen_1._)`${coerced} !== undefined`, () => { + gen.assign(data, coerced); + assignParentData(it2, coerced); + }); + function coerceSpecificType(t) { + switch (t) { + case "string": + gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`); + return; + case "number": + gen.elseIf((0, codegen_1._)`${dataType} == "boolean" || ${data} === null + || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "integer": + gen.elseIf((0, codegen_1._)`${dataType} === "boolean" || ${data} === null + || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "boolean": + gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true); + return; + case "null": + gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`); + gen.assign(coerced, null); + return; + case "array": + gen.elseIf((0, codegen_1._)`${dataType} === "string" || ${dataType} === "number" + || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`); + } + } + } + function assignParentData({ gen, parentData, parentDataProperty }, expr) { + gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr)); + } + function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { + const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; + let cond; + switch (dataType) { + case "null": + return (0, codegen_1._)`${data} ${EQ} null`; + case "array": + cond = (0, codegen_1._)`Array.isArray(${data})`; + break; + case "object": + cond = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`; + break; + case "integer": + cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`); + break; + case "number": + cond = numCond(); + break; + default: + return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`; + } + return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond); + function numCond(_cond = codegen_1.nil) { + return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil); + } + } + exports2.checkDataType = checkDataType; + function checkDataTypes(dataTypes, data, strictNums, correct) { + if (dataTypes.length === 1) { + return checkDataType(dataTypes[0], data, strictNums, correct); + } + let cond; + const types = (0, util_1.toHash)(dataTypes); + if (types.array && types.object) { + const notObj = (0, codegen_1._)`typeof ${data} != "object"`; + cond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`; + delete types.null; + delete types.array; + delete types.object; + } else { + cond = codegen_1.nil; + } + if (types.number) + delete types.integer; + for (const t in types) + cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct)); + return cond; + } + exports2.checkDataTypes = checkDataTypes; + var typeError = { + message: ({ schema }) => `must be ${schema}`, + params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}` + }; + function reportTypeError(it2) { + const cxt = getTypeErrorContext(it2); + (0, errors_1.reportError)(cxt, typeError); + } + exports2.reportTypeError = reportTypeError; + function getTypeErrorContext(it2) { + const { gen, data, schema } = it2; + const schemaCode = (0, util_1.schemaRefOrVal)(it2, schema, "type"); + return { + gen, + keyword: "type", + data, + schema: schema.type, + schemaCode, + schemaValue: schemaCode, + parentSchema: schema, + params: {}, + it: it2 + }; + } + } +}); + +// node_modules/ajv/dist/compile/validate/defaults.js +var require_defaults = __commonJS({ + "node_modules/ajv/dist/compile/validate/defaults.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.assignDefaults = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + function assignDefaults(it2, ty) { + const { properties, items } = it2.schema; + if (ty === "object" && properties) { + for (const key in properties) { + assignDefault(it2, key, properties[key].default); + } + } else if (ty === "array" && Array.isArray(items)) { + items.forEach((sch, i) => assignDefault(it2, i, sch.default)); + } + } + exports2.assignDefaults = assignDefaults; + function assignDefault(it2, prop, defaultValue) { + const { gen, compositeRule, data, opts } = it2; + if (defaultValue === void 0) + return; + const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`; + if (compositeRule) { + (0, util_1.checkStrictMode)(it2, `default is ignored for: ${childData}`); + return; + } + let condition = (0, codegen_1._)`${childData} === undefined`; + if (opts.useDefaults === "empty") { + condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`; + } + gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); + } + } +}); + +// node_modules/ajv/dist/vocabularies/code.js +var require_code2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/code.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateUnion = exports2.validateArray = exports2.usePattern = exports2.callValidateCode = exports2.schemaProperties = exports2.allSchemaProperties = exports2.noPropertyInData = exports2.propertyInData = exports2.isOwnProperty = exports2.hasPropFunc = exports2.reportMissingProp = exports2.checkMissingProp = exports2.checkReportMissingProp = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var names_1 = require_names(); + var util_2 = require_util2(); + function checkReportMissingProp(cxt, prop) { + const { gen, data, it: it2 } = cxt; + gen.if(noPropertyInData(gen, data, prop, it2.opts.ownProperties), () => { + cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true); + cxt.error(); + }); + } + exports2.checkReportMissingProp = checkReportMissingProp; + function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { + return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`))); + } + exports2.checkMissingProp = checkMissingProp; + function reportMissingProp(cxt, missing) { + cxt.setParams({ missingProperty: missing }, true); + cxt.error(); + } + exports2.reportMissingProp = reportMissingProp; + function hasPropFunc(gen) { + return gen.scopeValue("func", { + // eslint-disable-next-line @typescript-eslint/unbound-method + ref: Object.prototype.hasOwnProperty, + code: (0, codegen_1._)`Object.prototype.hasOwnProperty` + }); + } + exports2.hasPropFunc = hasPropFunc; + function isOwnProperty(gen, data, property) { + return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`; + } + exports2.isOwnProperty = isOwnProperty; + function propertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`; + return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond; + } + exports2.propertyInData = propertyInData; + function noPropertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`; + return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond; + } + exports2.noPropertyInData = noPropertyInData; + function allSchemaProperties(schemaMap) { + return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []; + } + exports2.allSchemaProperties = allSchemaProperties; + function schemaProperties(it2, schemaMap) { + return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it2, schemaMap[p])); + } + exports2.schemaProperties = schemaProperties; + function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it: it2 }, func, context, passSchema) { + const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; + const valCxt = [ + [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], + [names_1.default.parentData, it2.parentData], + [names_1.default.parentDataProperty, it2.parentDataProperty], + [names_1.default.rootData, names_1.default.rootData] + ]; + if (it2.opts.dynamicRef) + valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); + const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`; + return context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args})` : (0, codegen_1._)`${func}(${args})`; + } + exports2.callValidateCode = callValidateCode; + var newRegExp = (0, codegen_1._)`new RegExp`; + function usePattern({ gen, it: { opts } }, pattern) { + const u = opts.unicodeRegExp ? "u" : ""; + const { regExp } = opts.code; + const rx = regExp(pattern, u); + return gen.scopeValue("pattern", { + key: rx.toString(), + ref: rx, + code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})` + }); + } + exports2.usePattern = usePattern; + function validateArray(cxt) { + const { gen, data, keyword, it: it2 } = cxt; + const valid = gen.name("valid"); + if (it2.allErrors) { + const validArr = gen.let("valid", true); + validateItems(() => gen.assign(validArr, false)); + return validArr; + } + gen.var(valid, true); + validateItems(() => gen.break()); + return valid; + function validateItems(notValid) { + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + gen.forRange("i", 0, len, (i) => { + cxt.subschema({ + keyword, + dataProp: i, + dataPropType: util_1.Type.Num + }, valid); + gen.if((0, codegen_1.not)(valid), notValid); + }); + } + } + exports2.validateArray = validateArray; + function validateUnion(cxt) { + const { gen, schema, keyword, it: it2 } = cxt; + if (!Array.isArray(schema)) + throw new Error("ajv implementation error"); + const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it2, sch)); + if (alwaysValid && !it2.opts.unevaluated) + return; + const valid = gen.let("valid", false); + const schValid = gen.name("_valid"); + gen.block(() => schema.forEach((_sch, i) => { + const schCxt = cxt.subschema({ + keyword, + schemaProp: i, + compositeRule: true + }, schValid); + gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`); + const merged = cxt.mergeValidEvaluated(schCxt, schValid); + if (!merged) + gen.if((0, codegen_1.not)(valid)); + })); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + } + exports2.validateUnion = validateUnion; + } +}); + +// node_modules/ajv/dist/compile/validate/keyword.js +var require_keyword = __commonJS({ + "node_modules/ajv/dist/compile/validate/keyword.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateKeywordUsage = exports2.validSchemaType = exports2.funcKeywordCode = exports2.macroKeywordCode = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var code_1 = require_code2(); + var errors_1 = require_errors3(); + function macroKeywordCode(cxt, def) { + const { gen, keyword, schema, parentSchema, it: it2 } = cxt; + const macroSchema = def.macro.call(it2.self, schema, parentSchema, it2); + const schemaRef = useKeyword(gen, keyword, macroSchema); + if (it2.opts.validateSchema !== false) + it2.self.validateSchema(macroSchema, true); + const valid = gen.name("valid"); + cxt.subschema({ + schema: macroSchema, + schemaPath: codegen_1.nil, + errSchemaPath: `${it2.errSchemaPath}/${keyword}`, + topSchemaRef: schemaRef, + compositeRule: true + }, valid); + cxt.pass(valid, () => cxt.error(true)); + } + exports2.macroKeywordCode = macroKeywordCode; + function funcKeywordCode(cxt, def) { + var _a; + const { gen, keyword, schema, parentSchema, $data, it: it2 } = cxt; + checkAsyncKeyword(it2, def); + const validate = !$data && def.compile ? def.compile.call(it2.self, schema, parentSchema, it2) : def.validate; + const validateRef = useKeyword(gen, keyword, validate); + const valid = gen.let("valid"); + cxt.block$data(valid, validateKeyword); + cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid); + function validateKeyword() { + if (def.errors === false) { + assignValid(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => cxt.error()); + } else { + const ruleErrs = def.async ? validateAsync() : validateSync(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => addErrs(cxt, ruleErrs)); + } + } + function validateAsync() { + const ruleErrs = gen.let("ruleErrs", null); + gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it2.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e))); + return ruleErrs; + } + function validateSync() { + const validateErrs = (0, codegen_1._)`${validateRef}.errors`; + gen.assign(validateErrs, null); + assignValid(codegen_1.nil); + return validateErrs; + } + function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) { + const passCxt = it2.opts.passContext ? names_1.default.this : names_1.default.self; + const passSchema = !("compile" in def && !$data || def.schema === false); + gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); + } + function reportErrs(errors) { + var _a2; + gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors); + } + } + exports2.funcKeywordCode = funcKeywordCode; + function modifyData(cxt) { + const { gen, data, it: it2 } = cxt; + gen.if(it2.parentData, () => gen.assign(data, (0, codegen_1._)`${it2.parentData}[${it2.parentDataProperty}]`)); + } + function addErrs(cxt, errs) { + const { gen } = cxt; + gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => { + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + (0, errors_1.extendErrors)(cxt); + }, () => cxt.error()); + } + function checkAsyncKeyword({ schemaEnv }, def) { + if (def.async && !schemaEnv.$async) + throw new Error("async keyword in sync schema"); + } + function useKeyword(gen, keyword, result) { + if (result === void 0) + throw new Error(`keyword "${keyword}" failed to compile`); + return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) }); + } + function validSchemaType(schema, schemaType, allowUndefined = false) { + return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined"); + } + exports2.validSchemaType = validSchemaType; + function validateKeywordUsage({ schema, opts, self: self2, errSchemaPath }, def, keyword) { + if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { + throw new Error("ajv implementation error"); + } + const deps = def.dependencies; + if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) { + throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); + } + if (def.validateSchema) { + const valid = def.validateSchema(schema[keyword]); + if (!valid) { + const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self2.errorsText(def.validateSchema.errors); + if (opts.validateSchema === "log") + self2.logger.error(msg); + else + throw new Error(msg); + } + } + } + exports2.validateKeywordUsage = validateKeywordUsage; + } +}); + +// node_modules/ajv/dist/compile/validate/subschema.js +var require_subschema = __commonJS({ + "node_modules/ajv/dist/compile/validate/subschema.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendSubschemaMode = exports2.extendSubschemaData = exports2.getSubschema = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + function getSubschema(it2, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) { + if (keyword !== void 0 && schema !== void 0) { + throw new Error('both "keyword" and "schema" passed, only one allowed'); + } + if (keyword !== void 0) { + const sch = it2.schema[keyword]; + return schemaProp === void 0 ? { + schema: sch, + schemaPath: (0, codegen_1._)`${it2.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, + errSchemaPath: `${it2.errSchemaPath}/${keyword}` + } : { + schema: sch[schemaProp], + schemaPath: (0, codegen_1._)`${it2.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, + errSchemaPath: `${it2.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}` + }; + } + if (schema !== void 0) { + if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) { + throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); + } + return { + schema, + schemaPath, + topSchemaRef, + errSchemaPath + }; + } + throw new Error('either "keyword" or "schema" must be passed'); + } + exports2.getSubschema = getSubschema; + function extendSubschemaData(subschema, it2, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { + if (data !== void 0 && dataProp !== void 0) { + throw new Error('both "data" and "dataProp" passed, only one allowed'); + } + const { gen } = it2; + if (dataProp !== void 0) { + const { errorPath, dataPathArr, opts } = it2; + const nextData = gen.let("data", (0, codegen_1._)`${it2.data}${(0, codegen_1.getProperty)(dataProp)}`, true); + dataContextProps(nextData); + subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; + subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`; + subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; + } + if (data !== void 0) { + const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); + dataContextProps(nextData); + if (propertyName !== void 0) + subschema.propertyName = propertyName; + } + if (dataTypes) + subschema.dataTypes = dataTypes; + function dataContextProps(_nextData) { + subschema.data = _nextData; + subschema.dataLevel = it2.dataLevel + 1; + subschema.dataTypes = []; + it2.definedProperties = /* @__PURE__ */ new Set(); + subschema.parentData = it2.data; + subschema.dataNames = [...it2.dataNames, _nextData]; + } + } + exports2.extendSubschemaData = extendSubschemaData; + function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { + if (compositeRule !== void 0) + subschema.compositeRule = compositeRule; + if (createErrors !== void 0) + subschema.createErrors = createErrors; + if (allErrors !== void 0) + subschema.allErrors = allErrors; + subschema.jtdDiscriminator = jtdDiscriminator; + subschema.jtdMetadata = jtdMetadata; + } + exports2.extendSubschemaMode = extendSubschemaMode; + } +}); + +// node_modules/fast-deep-equal/index.js +var require_fast_deep_equal = __commonJS({ + "node_modules/fast-deep-equal/index.js"(exports2, module2) { + "use strict"; + module2.exports = function equal(a, b) { + if (a === b) return true; + if (a && b && typeof a == "object" && typeof b == "object") { + if (a.constructor !== b.constructor) return false; + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0; ) + if (!equal(a[i], b[i])) return false; + return true; + } + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + for (i = length; i-- !== 0; ) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + for (i = length; i-- !== 0; ) { + var key = keys[i]; + if (!equal(a[key], b[key])) return false; + } + return true; + } + return a !== a && b !== b; + }; + } +}); + +// node_modules/json-schema-traverse/index.js +var require_json_schema_traverse = __commonJS({ + "node_modules/json-schema-traverse/index.js"(exports2, module2) { + "use strict"; + var traverse = module2.exports = function(schema, opts, cb) { + if (typeof opts == "function") { + cb = opts; + opts = {}; + } + cb = opts.cb || cb; + var pre = typeof cb == "function" ? cb : cb.pre || function() { + }; + var post = cb.post || function() { + }; + _traverse(opts, pre, post, schema, "", schema); + }; + traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true, + if: true, + then: true, + else: true + }; + traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true + }; + traverse.propsKeywords = { + $defs: true, + definitions: true, + properties: true, + patternProperties: true, + dependencies: true + }; + traverse.skipKeywords = { + default: true, + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true + }; + function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == "object" && !Array.isArray(schema)) { + pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i = 0; i < sch.length; i++) + _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i); + } + } else if (key in traverse.propsKeywords) { + if (sch && typeof sch == "object") { + for (var prop in sch) + _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop); + } + } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) { + _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema); + } + } + post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + } + } + function escapeJsonPtr(str) { + return str.replace(/~/g, "~0").replace(/\//g, "~1"); + } + } +}); + +// node_modules/ajv/dist/compile/resolve.js +var require_resolve = __commonJS({ + "node_modules/ajv/dist/compile/resolve.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSchemaRefs = exports2.resolveUrl = exports2.normalizeId = exports2._getFullPath = exports2.getFullPath = exports2.inlineRef = void 0; + var util_1 = require_util2(); + var equal = require_fast_deep_equal(); + var traverse = require_json_schema_traverse(); + var SIMPLE_INLINED = /* @__PURE__ */ new Set([ + "type", + "format", + "pattern", + "maxLength", + "minLength", + "maxProperties", + "minProperties", + "maxItems", + "minItems", + "maximum", + "minimum", + "uniqueItems", + "multipleOf", + "required", + "enum", + "const" + ]); + function inlineRef(schema, limit = true) { + if (typeof schema == "boolean") + return true; + if (limit === true) + return !hasRef(schema); + if (!limit) + return false; + return countKeys(schema) <= limit; + } + exports2.inlineRef = inlineRef; + var REF_KEYWORDS = /* @__PURE__ */ new Set([ + "$ref", + "$recursiveRef", + "$recursiveAnchor", + "$dynamicRef", + "$dynamicAnchor" + ]); + function hasRef(schema) { + for (const key in schema) { + if (REF_KEYWORDS.has(key)) + return true; + const sch = schema[key]; + if (Array.isArray(sch) && sch.some(hasRef)) + return true; + if (typeof sch == "object" && hasRef(sch)) + return true; + } + return false; + } + function countKeys(schema) { + let count = 0; + for (const key in schema) { + if (key === "$ref") + return Infinity; + count++; + if (SIMPLE_INLINED.has(key)) + continue; + if (typeof schema[key] == "object") { + (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch)); + } + if (count === Infinity) + return Infinity; + } + return count; + } + function getFullPath(resolver, id2 = "", normalize) { + if (normalize !== false) + id2 = normalizeId(id2); + const p = resolver.parse(id2); + return _getFullPath(resolver, p); + } + exports2.getFullPath = getFullPath; + function _getFullPath(resolver, p) { + const serialized = resolver.serialize(p); + return serialized.split("#")[0] + "#"; + } + exports2._getFullPath = _getFullPath; + var TRAILING_SLASH_HASH = /#\/?$/; + function normalizeId(id2) { + return id2 ? id2.replace(TRAILING_SLASH_HASH, "") : ""; + } + exports2.normalizeId = normalizeId; + function resolveUrl(resolver, baseId, id2) { + id2 = normalizeId(id2); + return resolver.resolve(baseId, id2); + } + exports2.resolveUrl = resolveUrl; + var ANCHOR = /^[a-z_][-a-z0-9._]*$/i; + function getSchemaRefs(schema, baseId) { + if (typeof schema == "boolean") + return {}; + const { schemaId, uriResolver } = this.opts; + const schId = normalizeId(schema[schemaId] || baseId); + const baseIds = { "": schId }; + const pathPrefix = getFullPath(uriResolver, schId, false); + const localRefs = {}; + const schemaRefs = /* @__PURE__ */ new Set(); + traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => { + if (parentJsonPtr === void 0) + return; + const fullPath = pathPrefix + jsonPtr; + let innerBaseId = baseIds[parentJsonPtr]; + if (typeof sch[schemaId] == "string") + innerBaseId = addRef.call(this, sch[schemaId]); + addAnchor.call(this, sch.$anchor); + addAnchor.call(this, sch.$dynamicAnchor); + baseIds[jsonPtr] = innerBaseId; + function addRef(ref) { + const _resolve = this.opts.uriResolver.resolve; + ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); + if (schemaRefs.has(ref)) + throw ambiguos(ref); + schemaRefs.add(ref); + let schOrRef = this.refs[ref]; + if (typeof schOrRef == "string") + schOrRef = this.refs[schOrRef]; + if (typeof schOrRef == "object") { + checkAmbiguosRef(sch, schOrRef.schema, ref); + } else if (ref !== normalizeId(fullPath)) { + if (ref[0] === "#") { + checkAmbiguosRef(sch, localRefs[ref], ref); + localRefs[ref] = sch; + } else { + this.refs[ref] = fullPath; + } + } + return ref; + } + function addAnchor(anchor) { + if (typeof anchor == "string") { + if (!ANCHOR.test(anchor)) + throw new Error(`invalid anchor "${anchor}"`); + addRef.call(this, `#${anchor}`); + } + } + }); + return localRefs; + function checkAmbiguosRef(sch1, sch2, ref) { + if (sch2 !== void 0 && !equal(sch1, sch2)) + throw ambiguos(ref); + } + function ambiguos(ref) { + return new Error(`reference "${ref}" resolves to more than one schema`); + } + } + exports2.getSchemaRefs = getSchemaRefs; + } +}); + +// node_modules/ajv/dist/compile/validate/index.js +var require_validate = __commonJS({ + "node_modules/ajv/dist/compile/validate/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getData = exports2.KeywordCxt = exports2.validateFunctionCode = void 0; + var boolSchema_1 = require_boolSchema(); + var dataType_1 = require_dataType(); + var applicability_1 = require_applicability(); + var dataType_2 = require_dataType(); + var defaults_1 = require_defaults(); + var keyword_1 = require_keyword(); + var subschema_1 = require_subschema(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var resolve_1 = require_resolve(); + var util_1 = require_util2(); + var errors_1 = require_errors3(); + function validateFunctionCode(it2) { + if (isSchemaObj(it2)) { + checkKeywords(it2); + if (schemaCxtHasRules(it2)) { + topSchemaObjCode(it2); + return; + } + } + validateFunction(it2, () => (0, boolSchema_1.topBoolOrEmptySchema)(it2)); + } + exports2.validateFunctionCode = validateFunctionCode; + function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) { + if (opts.code.es5) { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { + gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`); + destructureValCxtES5(gen, opts); + gen.code(body); + }); + } else { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body)); + } + } + function destructureValCxt(opts) { + return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`; + } + function destructureValCxtES5(gen, opts) { + gen.if(names_1.default.valCxt, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`); + gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); + gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); + }, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`""`); + gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`); + gen.var(names_1.default.rootData, names_1.default.data); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`); + }); + } + function topSchemaObjCode(it2) { + const { schema, opts, gen } = it2; + validateFunction(it2, () => { + if (opts.$comment && schema.$comment) + commentKeyword(it2); + checkNoDefault(it2); + gen.let(names_1.default.vErrors, null); + gen.let(names_1.default.errors, 0); + if (opts.unevaluated) + resetEvaluated(it2); + typeAndKeywords(it2); + returnResults(it2); + }); + return; + } + function resetEvaluated(it2) { + const { gen, validateName } = it2; + it2.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`); + gen.if((0, codegen_1._)`${it2.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it2.evaluated}.props`, (0, codegen_1._)`undefined`)); + gen.if((0, codegen_1._)`${it2.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it2.evaluated}.items`, (0, codegen_1._)`undefined`)); + } + function funcSourceUrl(schema, opts) { + const schId = typeof schema == "object" && schema[opts.schemaId]; + return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil; + } + function subschemaCode(it2, valid) { + if (isSchemaObj(it2)) { + checkKeywords(it2); + if (schemaCxtHasRules(it2)) { + subSchemaObjCode(it2, valid); + return; + } + } + (0, boolSchema_1.boolOrEmptySchema)(it2, valid); + } + function schemaCxtHasRules({ schema, self: self2 }) { + if (typeof schema == "boolean") + return !schema; + for (const key in schema) + if (self2.RULES.all[key]) + return true; + return false; + } + function isSchemaObj(it2) { + return typeof it2.schema != "boolean"; + } + function subSchemaObjCode(it2, valid) { + const { schema, gen, opts } = it2; + if (opts.$comment && schema.$comment) + commentKeyword(it2); + updateContext(it2); + checkAsyncSchema(it2); + const errsCount = gen.const("_errs", names_1.default.errors); + typeAndKeywords(it2, errsCount); + gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + } + function checkKeywords(it2) { + (0, util_1.checkUnknownRules)(it2); + checkRefsAndKeywords(it2); + } + function typeAndKeywords(it2, errsCount) { + if (it2.opts.jtd) + return schemaKeywords(it2, [], false, errsCount); + const types = (0, dataType_1.getSchemaTypes)(it2.schema); + const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it2, types); + schemaKeywords(it2, types, !checkedTypes, errsCount); + } + function checkRefsAndKeywords(it2) { + const { schema, errSchemaPath, opts, self: self2 } = it2; + if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self2.RULES)) { + self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); + } + } + function checkNoDefault(it2) { + const { schema, opts } = it2; + if (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) { + (0, util_1.checkStrictMode)(it2, "default is ignored in the schema root"); + } + } + function updateContext(it2) { + const schId = it2.schema[it2.opts.schemaId]; + if (schId) + it2.baseId = (0, resolve_1.resolveUrl)(it2.opts.uriResolver, it2.baseId, schId); + } + function checkAsyncSchema(it2) { + if (it2.schema.$async && !it2.schemaEnv.$async) + throw new Error("async schema in sync schema"); + } + function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) { + const msg = schema.$comment; + if (opts.$comment === true) { + gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`); + } else if (typeof opts.$comment == "function") { + const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`; + const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); + gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); + } + } + function returnResults(it2) { + const { gen, schemaEnv, validateName, ValidationError, opts } = it2; + if (schemaEnv.$async) { + gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`)); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors); + if (opts.unevaluated) + assignEvaluated(it2); + gen.return((0, codegen_1._)`${names_1.default.errors} === 0`); + } + } + function assignEvaluated({ gen, evaluated, props, items }) { + if (props instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.props`, props); + if (items instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.items`, items); + } + function schemaKeywords(it2, types, typeErrors, errsCount) { + const { gen, schema, data, allErrors, opts, self: self2 } = it2; + const { RULES } = self2; + if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) { + gen.block(() => keywordCode(it2, "$ref", RULES.all.$ref.definition)); + return; + } + if (!opts.jtd) + checkStrictTypes(it2, types); + gen.block(() => { + for (const group of RULES.rules) + groupKeywords(group); + groupKeywords(RULES.post); + }); + function groupKeywords(group) { + if (!(0, applicability_1.shouldUseGroup)(schema, group)) + return; + if (group.type) { + gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers)); + iterateKeywords(it2, group); + if (types.length === 1 && types[0] === group.type && typeErrors) { + gen.else(); + (0, dataType_2.reportTypeError)(it2); + } + gen.endIf(); + } else { + iterateKeywords(it2, group); + } + if (!allErrors) + gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`); + } + } + function iterateKeywords(it2, group) { + const { gen, schema, opts: { useDefaults } } = it2; + if (useDefaults) + (0, defaults_1.assignDefaults)(it2, group.type); + gen.block(() => { + for (const rule of group.rules) { + if ((0, applicability_1.shouldUseRule)(schema, rule)) { + keywordCode(it2, rule.keyword, rule.definition, group.type); + } + } + }); + } + function checkStrictTypes(it2, types) { + if (it2.schemaEnv.meta || !it2.opts.strictTypes) + return; + checkContextTypes(it2, types); + if (!it2.opts.allowUnionTypes) + checkMultipleTypes(it2, types); + checkKeywordTypes(it2, it2.dataTypes); + } + function checkContextTypes(it2, types) { + if (!types.length) + return; + if (!it2.dataTypes.length) { + it2.dataTypes = types; + return; + } + types.forEach((t) => { + if (!includesType(it2.dataTypes, t)) { + strictTypesError(it2, `type "${t}" not allowed by context "${it2.dataTypes.join(",")}"`); + } + }); + narrowSchemaTypes(it2, types); + } + function checkMultipleTypes(it2, ts) { + if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) { + strictTypesError(it2, "use allowUnionTypes to allow union type keyword"); + } + } + function checkKeywordTypes(it2, ts) { + const rules = it2.self.RULES.all; + for (const keyword in rules) { + const rule = rules[keyword]; + if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it2.schema, rule)) { + const { type } = rule.definition; + if (type.length && !type.some((t) => hasApplicableType(ts, t))) { + strictTypesError(it2, `missing type "${type.join(",")}" for keyword "${keyword}"`); + } + } + } + } + function hasApplicableType(schTs, kwdT) { + return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer"); + } + function includesType(ts, t) { + return ts.includes(t) || t === "integer" && ts.includes("number"); + } + function narrowSchemaTypes(it2, withTypes) { + const ts = []; + for (const t of it2.dataTypes) { + if (includesType(withTypes, t)) + ts.push(t); + else if (withTypes.includes("integer") && t === "number") + ts.push("integer"); + } + it2.dataTypes = ts; + } + function strictTypesError(it2, msg) { + const schemaPath = it2.schemaEnv.baseId + it2.errSchemaPath; + msg += ` at "${schemaPath}" (strictTypes)`; + (0, util_1.checkStrictMode)(it2, msg, it2.opts.strictTypes); + } + var KeywordCxt = class { + constructor(it2, def, keyword) { + (0, keyword_1.validateKeywordUsage)(it2, def, keyword); + this.gen = it2.gen; + this.allErrors = it2.allErrors; + this.keyword = keyword; + this.data = it2.data; + this.schema = it2.schema[keyword]; + this.$data = def.$data && it2.opts.$data && this.schema && this.schema.$data; + this.schemaValue = (0, util_1.schemaRefOrVal)(it2, this.schema, keyword, this.$data); + this.schemaType = def.schemaType; + this.parentSchema = it2.schema; + this.params = {}; + this.it = it2; + this.def = def; + if (this.$data) { + this.schemaCode = it2.gen.const("vSchema", getData(this.$data, it2)); + } else { + this.schemaCode = this.schemaValue; + if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { + throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); + } + } + if ("code" in def ? def.trackErrors : def.errors !== false) { + this.errsCount = it2.gen.const("_errs", names_1.default.errors); + } + } + result(condition, successAction, failAction) { + this.failResult((0, codegen_1.not)(condition), successAction, failAction); + } + failResult(condition, successAction, failAction) { + this.gen.if(condition); + if (failAction) + failAction(); + else + this.error(); + if (successAction) { + this.gen.else(); + successAction(); + if (this.allErrors) + this.gen.endIf(); + } else { + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } + } + pass(condition, failAction) { + this.failResult((0, codegen_1.not)(condition), void 0, failAction); + } + fail(condition) { + if (condition === void 0) { + this.error(); + if (!this.allErrors) + this.gen.if(false); + return; + } + this.gen.if(condition); + this.error(); + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } + fail$data(condition) { + if (!this.$data) + return this.fail(condition); + const { schemaCode } = this; + this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); + } + error(append, errorParams, errorPaths) { + if (errorParams) { + this.setParams(errorParams); + this._error(append, errorPaths); + this.setParams({}); + return; + } + this._error(append, errorPaths); + } + _error(append, errorPaths) { + ; + (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); + } + $dataError() { + (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); + } + reset() { + if (this.errsCount === void 0) + throw new Error('add "trackErrors" to keyword definition'); + (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); + } + ok(cond) { + if (!this.allErrors) + this.gen.if(cond); + } + setParams(obj, assign) { + if (assign) + Object.assign(this.params, obj); + else + this.params = obj; + } + block$data(valid, codeBlock, $dataValid = codegen_1.nil) { + this.gen.block(() => { + this.check$data(valid, $dataValid); + codeBlock(); + }); + } + check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { + if (!this.$data) + return; + const { gen, schemaCode, schemaType, def } = this; + gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid)); + if (valid !== codegen_1.nil) + gen.assign(valid, true); + if (schemaType.length || def.validateSchema) { + gen.elseIf(this.invalid$data()); + this.$dataError(); + if (valid !== codegen_1.nil) + gen.assign(valid, false); + } + gen.else(); + } + invalid$data() { + const { gen, schemaCode, schemaType, def, it: it2 } = this; + return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); + function wrong$DataType() { + if (schemaType.length) { + if (!(schemaCode instanceof codegen_1.Name)) + throw new Error("ajv implementation error"); + const st = Array.isArray(schemaType) ? schemaType : [schemaType]; + return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it2.opts.strictNumbers, dataType_2.DataType.Wrong)}`; + } + return codegen_1.nil; + } + function invalid$DataSchema() { + if (def.validateSchema) { + const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); + return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`; + } + return codegen_1.nil; + } + } + subschema(appl, valid) { + const subschema = (0, subschema_1.getSubschema)(this.it, appl); + (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); + (0, subschema_1.extendSubschemaMode)(subschema, appl); + const nextContext = { ...this.it, ...subschema, items: void 0, props: void 0 }; + subschemaCode(nextContext, valid); + return nextContext; + } + mergeEvaluated(schemaCxt, toName) { + const { it: it2, gen } = this; + if (!it2.opts.unevaluated) + return; + if (it2.props !== true && schemaCxt.props !== void 0) { + it2.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it2.props, toName); + } + if (it2.items !== true && schemaCxt.items !== void 0) { + it2.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it2.items, toName); + } + } + mergeValidEvaluated(schemaCxt, valid) { + const { it: it2, gen } = this; + if (it2.opts.unevaluated && (it2.props !== true || it2.items !== true)) { + gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); + return true; + } + } + }; + exports2.KeywordCxt = KeywordCxt; + function keywordCode(it2, keyword, def, ruleType) { + const cxt = new KeywordCxt(it2, def, keyword); + if ("code" in def) { + def.code(cxt, ruleType); + } else if (cxt.$data && def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } else if ("macro" in def) { + (0, keyword_1.macroKeywordCode)(cxt, def); + } else if (def.compile || def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } + } + var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; + var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function getData($data, { dataLevel, dataNames, dataPathArr }) { + let jsonPointer; + let data; + if ($data === "") + return names_1.default.rootData; + if ($data[0] === "/") { + if (!JSON_POINTER.test($data)) + throw new Error(`Invalid JSON-pointer: ${$data}`); + jsonPointer = $data; + data = names_1.default.rootData; + } else { + const matches = RELATIVE_JSON_POINTER.exec($data); + if (!matches) + throw new Error(`Invalid JSON-pointer: ${$data}`); + const up = +matches[1]; + jsonPointer = matches[2]; + if (jsonPointer === "#") { + if (up >= dataLevel) + throw new Error(errorMsg("property/index", up)); + return dataPathArr[dataLevel - up]; + } + if (up > dataLevel) + throw new Error(errorMsg("data", up)); + data = dataNames[dataLevel - up]; + if (!jsonPointer) + return data; + } + let expr = data; + const segments = jsonPointer.split("/"); + for (const segment2 of segments) { + if (segment2) { + data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment2))}`; + expr = (0, codegen_1._)`${expr} && ${data}`; + } + } + return expr; + function errorMsg(pointerType, up) { + return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; + } + } + exports2.getData = getData; + } +}); + +// node_modules/ajv/dist/runtime/validation_error.js +var require_validation_error = __commonJS({ + "node_modules/ajv/dist/runtime/validation_error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var ValidationError = class extends Error { + constructor(errors) { + super("validation failed"); + this.errors = errors; + this.ajv = this.validation = true; + } + }; + exports2.default = ValidationError; + } +}); + +// node_modules/ajv/dist/compile/ref_error.js +var require_ref_error = __commonJS({ + "node_modules/ajv/dist/compile/ref_error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var resolve_1 = require_resolve(); + var MissingRefError = class extends Error { + constructor(resolver, baseId, ref, msg) { + super(msg || `can't resolve reference ${ref} from id ${baseId}`); + this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); + this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); + } + }; + exports2.default = MissingRefError; + } +}); + +// node_modules/ajv/dist/compile/index.js +var require_compile = __commonJS({ + "node_modules/ajv/dist/compile/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveSchema = exports2.getCompilingSchema = exports2.resolveRef = exports2.compileSchema = exports2.SchemaEnv = void 0; + var codegen_1 = require_codegen(); + var validation_error_1 = require_validation_error(); + var names_1 = require_names(); + var resolve_1 = require_resolve(); + var util_1 = require_util2(); + var validate_1 = require_validate(); + var SchemaEnv = class { + constructor(env) { + var _a; + this.refs = {}; + this.dynamicAnchors = {}; + let schema; + if (typeof env.schema == "object") + schema = env.schema; + this.schema = env.schema; + this.schemaId = env.schemaId; + this.root = env.root || this; + this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]); + this.schemaPath = env.schemaPath; + this.localRefs = env.localRefs; + this.meta = env.meta; + this.$async = schema === null || schema === void 0 ? void 0 : schema.$async; + this.refs = {}; + } + }; + exports2.SchemaEnv = SchemaEnv; + function compileSchema(sch) { + const _sch = getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + let _ValidationError; + if (sch.$async) { + _ValidationError = gen.scopeValue("Error", { + ref: validation_error_1.default, + code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default` + }); + } + const validateName = gen.scopeName("validate"); + sch.validateName = validateName; + const schemaCxt = { + gen, + allErrors: this.opts.allErrors, + data: names_1.default.data, + parentData: names_1.default.parentData, + parentDataProperty: names_1.default.parentDataProperty, + dataNames: [names_1.default.data], + dataPathArr: [codegen_1.nil], + // TODO can its length be used as dataLevel if nil is removed? + dataLevel: 0, + dataTypes: [], + definedProperties: /* @__PURE__ */ new Set(), + topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }), + validateName, + ValidationError: _ValidationError, + schema: sch.schema, + schemaEnv: sch, + rootId, + baseId: sch.baseId || rootId, + schemaPath: codegen_1.nil, + errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), + errorPath: (0, codegen_1._)`""`, + opts: this.opts, + self: this + }; + let sourceCode; + try { + this._compilations.add(sch); + (0, validate_1.validateFunctionCode)(schemaCxt); + gen.optimize(this.opts.code.optimize); + const validateCode = gen.toString(); + sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; + if (this.opts.code.process) + sourceCode = this.opts.code.process(sourceCode, sch); + const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); + const validate = makeValidate(this, this.scope.get()); + this.scope.value(validateName, { ref: validate }); + validate.errors = null; + validate.schema = sch.schema; + validate.schemaEnv = sch; + if (sch.$async) + validate.$async = true; + if (this.opts.code.source === true) { + validate.source = { validateName, validateCode, scopeValues: gen._values }; + } + if (this.opts.unevaluated) { + const { props, items } = schemaCxt; + validate.evaluated = { + props: props instanceof codegen_1.Name ? void 0 : props, + items: items instanceof codegen_1.Name ? void 0 : items, + dynamicProps: props instanceof codegen_1.Name, + dynamicItems: items instanceof codegen_1.Name + }; + if (validate.source) + validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated); + } + sch.validate = validate; + return sch; + } catch (e) { + delete sch.validate; + delete sch.validateName; + if (sourceCode) + this.logger.error("Error compiling schema, function code:", sourceCode); + throw e; + } finally { + this._compilations.delete(sch); + } + } + exports2.compileSchema = compileSchema; + function resolveRef(root, baseId, ref) { + var _a; + ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref); + const schOrFunc = root.refs[ref]; + if (schOrFunc) + return schOrFunc; + let _sch = resolve.call(this, root, ref); + if (_sch === void 0) { + const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; + const { schemaId } = this.opts; + if (schema) + _sch = new SchemaEnv({ schema, schemaId, root, baseId }); + } + if (_sch === void 0) + return; + return root.refs[ref] = inlineOrCompile.call(this, _sch); + } + exports2.resolveRef = resolveRef; + function inlineOrCompile(sch) { + if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) + return sch.schema; + return sch.validate ? sch : compileSchema.call(this, sch); + } + function getCompilingSchema(schEnv) { + for (const sch of this._compilations) { + if (sameSchemaEnv(sch, schEnv)) + return sch; + } + } + exports2.getCompilingSchema = getCompilingSchema; + function sameSchemaEnv(s1, s2) { + return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; + } + function resolve(root, ref) { + let sch; + while (typeof (sch = this.refs[ref]) == "string") + ref = sch; + return sch || this.schemas[ref] || resolveSchema.call(this, root, ref); + } + function resolveSchema(root, ref) { + const p = this.opts.uriResolver.parse(ref); + const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p); + let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0); + if (Object.keys(root.schema).length > 0 && refPath === baseId) { + return getJsonPointer.call(this, p, root); + } + const id2 = (0, resolve_1.normalizeId)(refPath); + const schOrRef = this.refs[id2] || this.schemas[id2]; + if (typeof schOrRef == "string") { + const sch = resolveSchema.call(this, root, schOrRef); + if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") + return; + return getJsonPointer.call(this, p, sch); + } + if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") + return; + if (!schOrRef.validate) + compileSchema.call(this, schOrRef); + if (id2 === (0, resolve_1.normalizeId)(ref)) { + const { schema } = schOrRef; + const { schemaId } = this.opts; + const schId = schema[schemaId]; + if (schId) + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + return new SchemaEnv({ schema, schemaId, root, baseId }); + } + return getJsonPointer.call(this, p, schOrRef); + } + exports2.resolveSchema = resolveSchema; + var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([ + "properties", + "patternProperties", + "enum", + "dependencies", + "definitions" + ]); + function getJsonPointer(parsedRef, { baseId, schema, root }) { + var _a; + if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/") + return; + for (const part of parsedRef.fragment.slice(1).split("/")) { + if (typeof schema === "boolean") + return; + const partSchema = schema[(0, util_1.unescapeFragment)(part)]; + if (partSchema === void 0) + return; + schema = partSchema; + const schId = typeof schema === "object" && schema[this.opts.schemaId]; + if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + } + } + let env; + if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) { + const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref); + env = resolveSchema.call(this, root, $ref); + } + const { schemaId } = this.opts; + env = env || new SchemaEnv({ schema, schemaId, root, baseId }); + if (env.schema !== env.root.schema) + return env; + return void 0; + } + } +}); + +// node_modules/ajv/dist/refs/data.json +var require_data = __commonJS({ + "node_modules/ajv/dist/refs/data.json"(exports2, module2) { + module2.exports = { + $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", + description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", + type: "object", + required: ["$data"], + properties: { + $data: { + type: "string", + anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] + } + }, + additionalProperties: false + }; + } +}); + +// node_modules/fast-uri/lib/scopedChars.js +var require_scopedChars = __commonJS({ + "node_modules/fast-uri/lib/scopedChars.js"(exports2, module2) { + "use strict"; + var HEX = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + a: 10, + A: 10, + b: 11, + B: 11, + c: 12, + C: 12, + d: 13, + D: 13, + e: 14, + E: 14, + f: 15, + F: 15 + }; + module2.exports = { + HEX + }; + } +}); + +// node_modules/fast-uri/lib/utils.js +var require_utils = __commonJS({ + "node_modules/fast-uri/lib/utils.js"(exports2, module2) { + "use strict"; + var { HEX } = require_scopedChars(); + var IPV4_REG = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u; + function normalizeIPv4(host) { + if (findToken(host, ".") < 3) { + return { host, isIPV4: false }; + } + const matches = host.match(IPV4_REG) || []; + const [address] = matches; + if (address) { + return { host: stripLeadingZeros(address, "."), isIPV4: true }; + } else { + return { host, isIPV4: false }; + } + } + function stringArrayToHexStripped(input, keepZero = false) { + let acc = ""; + let strip = true; + for (const c of input) { + if (HEX[c] === void 0) return void 0; + if (c !== "0" && strip === true) strip = false; + if (!strip) acc += c; + } + if (keepZero && acc.length === 0) acc = "0"; + return acc; + } + function getIPV6(input) { + let tokenCount = 0; + const output = { error: false, address: "", zone: "" }; + const address = []; + const buffer = []; + let isZone = false; + let endipv6Encountered = false; + let endIpv6 = false; + function consume() { + if (buffer.length) { + if (isZone === false) { + const hex = stringArrayToHexStripped(buffer); + if (hex !== void 0) { + address.push(hex); + } else { + output.error = true; + return false; + } + } + buffer.length = 0; + } + return true; + } + for (let i = 0; i < input.length; i++) { + const cursor = input[i]; + if (cursor === "[" || cursor === "]") { + continue; + } + if (cursor === ":") { + if (endipv6Encountered === true) { + endIpv6 = true; + } + if (!consume()) { + break; + } + tokenCount++; + address.push(":"); + if (tokenCount > 7) { + output.error = true; + break; + } + if (i - 1 >= 0 && input[i - 1] === ":") { + endipv6Encountered = true; + } + continue; + } else if (cursor === "%") { + if (!consume()) { + break; + } + isZone = true; + } else { + buffer.push(cursor); + continue; + } + } + if (buffer.length) { + if (isZone) { + output.zone = buffer.join(""); + } else if (endIpv6) { + address.push(buffer.join("")); + } else { + address.push(stringArrayToHexStripped(buffer)); + } + } + output.address = address.join(""); + return output; + } + function normalizeIPv6(host) { + if (findToken(host, ":") < 2) { + return { host, isIPV6: false }; + } + const ipv6 = getIPV6(host); + if (!ipv6.error) { + let newHost = ipv6.address; + let escapedHost = ipv6.address; + if (ipv6.zone) { + newHost += "%" + ipv6.zone; + escapedHost += "%25" + ipv6.zone; + } + return { host: newHost, escapedHost, isIPV6: true }; + } else { + return { host, isIPV6: false }; + } + } + function stripLeadingZeros(str, token) { + let out = ""; + let skip = true; + const l = str.length; + for (let i = 0; i < l; i++) { + const c = str[i]; + if (c === "0" && skip) { + if (i + 1 <= l && str[i + 1] === token || i + 1 === l) { + out += c; + skip = false; + } + } else { + if (c === token) { + skip = true; + } else { + skip = false; + } + out += c; + } + } + return out; + } + function findToken(str, token) { + let ind = 0; + for (let i = 0; i < str.length; i++) { + if (str[i] === token) ind++; + } + return ind; + } + var RDS1 = /^\.\.?\//u; + var RDS2 = /^\/\.(?:\/|$)/u; + var RDS3 = /^\/\.\.(?:\/|$)/u; + var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u; + function removeDotSegments(input) { + const output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + const im = input.match(RDS5); + if (im) { + const s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); + } + function normalizeComponentEncoding(components, esc) { + const func = esc !== true ? escape : unescape; + if (components.scheme !== void 0) { + components.scheme = func(components.scheme); + } + if (components.userinfo !== void 0) { + components.userinfo = func(components.userinfo); + } + if (components.host !== void 0) { + components.host = func(components.host); + } + if (components.path !== void 0) { + components.path = func(components.path); + } + if (components.query !== void 0) { + components.query = func(components.query); + } + if (components.fragment !== void 0) { + components.fragment = func(components.fragment); + } + return components; + } + function recomposeAuthority(components) { + const uriTokens = []; + if (components.userinfo !== void 0) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== void 0) { + let host = unescape(components.host); + const ipV4res = normalizeIPv4(host); + if (ipV4res.isIPV4) { + host = ipV4res.host; + } else { + const ipV6res = normalizeIPv6(ipV4res.host); + if (ipV6res.isIPV6 === true) { + host = `[${ipV6res.escapedHost}]`; + } else { + host = components.host; + } + } + uriTokens.push(host); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : void 0; + } + module2.exports = { + recomposeAuthority, + normalizeComponentEncoding, + removeDotSegments, + normalizeIPv4, + normalizeIPv6, + stringArrayToHexStripped + }; + } +}); + +// node_modules/fast-uri/lib/schemes.js +var require_schemes = __commonJS({ + "node_modules/fast-uri/lib/schemes.js"(exports2, module2) { + "use strict"; + var UUID_REG = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu; + var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; + function isSecure(wsComponents) { + return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; + } + function httpParse(components) { + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + } + function httpSerialize(components) { + const secure = String(components.scheme).toLowerCase() === "https"; + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = void 0; + } + if (!components.path) { + components.path = "/"; + } + return components; + } + function wsParse(wsComponents) { + wsComponents.secure = isSecure(wsComponents); + wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); + wsComponents.path = void 0; + wsComponents.query = void 0; + return wsComponents; + } + function wsSerialize(wsComponents) { + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = void 0; + } + if (typeof wsComponents.secure === "boolean") { + wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; + wsComponents.secure = void 0; + } + if (wsComponents.resourceName) { + const [path7, query] = wsComponents.resourceName.split("?"); + wsComponents.path = path7 && path7 !== "/" ? path7 : void 0; + wsComponents.query = query; + wsComponents.resourceName = void 0; + } + wsComponents.fragment = void 0; + return wsComponents; + } + function urnParse(urnComponents, options) { + if (!urnComponents.path) { + urnComponents.error = "URN can not be parsed"; + return urnComponents; + } + const matches = urnComponents.path.match(URN_REG); + if (matches) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + urnComponents.nid = matches[1].toLowerCase(); + urnComponents.nss = matches[2]; + const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`; + const schemeHandler = SCHEMES[urnScheme]; + urnComponents.path = void 0; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + } + function urnSerialize(urnComponents, options) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + const nid = urnComponents.nid.toLowerCase(); + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + const uriComponents = urnComponents; + const nss = urnComponents.nss; + uriComponents.path = `${nid || options.nid}:${nss}`; + options.skipEscape = true; + return uriComponents; + } + function urnuuidParse(urnComponents, options) { + const uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = void 0; + if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + } + function urnuuidSerialize(uuidComponents) { + const urnComponents = uuidComponents; + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } + var http = { + scheme: "http", + domainHost: true, + parse: httpParse, + serialize: httpSerialize + }; + var https = { + scheme: "https", + domainHost: http.domainHost, + parse: httpParse, + serialize: httpSerialize + }; + var ws = { + scheme: "ws", + domainHost: true, + parse: wsParse, + serialize: wsSerialize + }; + var wss = { + scheme: "wss", + domainHost: ws.domainHost, + parse: ws.parse, + serialize: ws.serialize + }; + var urn = { + scheme: "urn", + parse: urnParse, + serialize: urnSerialize, + skipNormalize: true + }; + var urnuuid = { + scheme: "urn:uuid", + parse: urnuuidParse, + serialize: urnuuidSerialize, + skipNormalize: true + }; + var SCHEMES = { + http, + https, + ws, + wss, + urn, + "urn:uuid": urnuuid + }; + module2.exports = SCHEMES; + } +}); + +// node_modules/fast-uri/index.js +var require_fast_uri = __commonJS({ + "node_modules/fast-uri/index.js"(exports2, module2) { + "use strict"; + var { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require_utils(); + var SCHEMES = require_schemes(); + function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeof uri === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; + } + function resolve(baseURI, relativeURI, options) { + const schemelessOptions = Object.assign({ scheme: "null" }, options); + const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true); + return serialize(resolved, { ...schemelessOptions, skipEscape: true }); + } + function resolveComponents(base, relative, options, skipNormalization) { + const target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); + relative = parse(serialize(relative, options), options); + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) { + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== void 0) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; + } + function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = unescape(uriA); + uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true }); + } else if (typeof uriA === "object") { + uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true }); + } + if (typeof uriB === "string") { + uriB = unescape(uriB); + uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true }); + } else if (typeof uriB === "object") { + uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true }); + } + return uriA.toLowerCase() === uriB.toLowerCase(); + } + function serialize(cmpts, opts) { + const components = { + host: cmpts.host, + scheme: cmpts.scheme, + userinfo: cmpts.userinfo, + port: cmpts.port, + path: cmpts.path, + query: cmpts.query, + nid: cmpts.nid, + nss: cmpts.nss, + uuid: cmpts.uuid, + fragment: cmpts.fragment, + reference: cmpts.reference, + resourceName: cmpts.resourceName, + secure: cmpts.secure, + error: "" + }; + const options = Object.assign({}, opts); + const uriTokens = []; + const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.path !== void 0) { + if (!options.skipEscape) { + components.path = escape(components.path); + if (components.scheme !== void 0) { + components.path = components.path.split("%3A").join(":"); + } + } else { + components.path = unescape(components.path); + } + } + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme, ":"); + } + const authority = recomposeAuthority(components); + if (authority !== void 0) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== void 0) { + let s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === void 0) { + s = s.replace(/^\/\//u, "/%2F"); + } + uriTokens.push(s); + } + if (components.query !== void 0) { + uriTokens.push("?", components.query); + } + if (components.fragment !== void 0) { + uriTokens.push("#", components.fragment); + } + return uriTokens.join(""); + } + var hexLookUp = Array.from({ length: 127 }, (_v, k) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k))); + function nonSimpleDomain(value) { + let code = 0; + for (let i = 0, len = value.length; i < len; ++i) { + code = value.charCodeAt(i); + if (code > 126 || hexLookUp[code]) { + return true; + } + } + return false; + } + var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u; + function parse(uri, opts) { + const options = Object.assign({}, opts); + const parsed = { + scheme: void 0, + userinfo: void 0, + host: "", + port: void 0, + path: "", + query: void 0, + fragment: void 0 + }; + const gotEncoding = uri.indexOf("%") !== -1; + let isIP = false; + if (options.reference === "suffix") uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri; + const matches = uri.match(URI_PARSE); + if (matches) { + parsed.scheme = matches[1]; + parsed.userinfo = matches[3]; + parsed.host = matches[4]; + parsed.port = parseInt(matches[5], 10); + parsed.path = matches[6] || ""; + parsed.query = matches[7]; + parsed.fragment = matches[8]; + if (isNaN(parsed.port)) { + parsed.port = matches[5]; + } + if (parsed.host) { + const ipv4result = normalizeIPv4(parsed.host); + if (ipv4result.isIPV4 === false) { + const ipv6result = normalizeIPv6(ipv4result.host); + parsed.host = ipv6result.host.toLowerCase(); + isIP = ipv6result.isIPV6; + } else { + parsed.host = ipv4result.host; + isIP = true; + } + } + if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) { + parsed.reference = "same-document"; + } else if (parsed.scheme === void 0) { + parsed.reference = "relative"; + } else if (parsed.fragment === void 0) { + parsed.reference = "absolute"; + } else { + parsed.reference = "uri"; + } + if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) { + parsed.error = parsed.error || "URI is not a " + options.reference + " reference."; + } + const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()]; + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) { + try { + parsed.host = URL.domainToASCII(parsed.host.toLowerCase()); + } catch (e) { + parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e; + } + } + } + if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) { + if (gotEncoding && parsed.scheme !== void 0) { + parsed.scheme = unescape(parsed.scheme); + } + if (gotEncoding && parsed.host !== void 0) { + parsed.host = unescape(parsed.host); + } + if (parsed.path) { + parsed.path = escape(unescape(parsed.path)); + } + if (parsed.fragment) { + parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment)); + } + } + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(parsed, options); + } + } else { + parsed.error = parsed.error || "URI can not be parsed."; + } + return parsed; + } + var fastUri = { + SCHEMES, + normalize, + resolve, + resolveComponents, + equal, + serialize, + parse + }; + module2.exports = fastUri; + module2.exports.default = fastUri; + module2.exports.fastUri = fastUri; + } +}); + +// node_modules/ajv/dist/runtime/uri.js +var require_uri = __commonJS({ + "node_modules/ajv/dist/runtime/uri.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var uri = require_fast_uri(); + uri.code = 'require("ajv/dist/runtime/uri").default'; + exports2.default = uri; + } +}); + +// node_modules/ajv/dist/core.js +var require_core = __commonJS({ + "node_modules/ajv/dist/core.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = void 0; + var validate_1 = require_validate(); + Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports2, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports2, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports2, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports2, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error(); + var ref_error_1 = require_ref_error(); + var rules_1 = require_rules(); + var compile_1 = require_compile(); + var codegen_2 = require_codegen(); + var resolve_1 = require_resolve(); + var dataType_1 = require_dataType(); + var util_1 = require_util2(); + var $dataRefSchema = require_data(); + var uri_1 = require_uri(); + var defaultRegExp = (str, flags) => new RegExp(str, flags); + defaultRegExp.code = "new RegExp"; + var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; + var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([ + "validate", + "serialize", + "parse", + "wrapper", + "root", + "schema", + "keyword", + "pattern", + "formats", + "validate$data", + "func", + "obj", + "Error" + ]); + var removedOptions = { + errorDataPath: "", + format: "`validateFormats: false` can be used instead.", + nullable: '"nullable" keyword is supported by default.', + jsonPointers: "Deprecated jsPropertySyntax can be used instead.", + extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", + missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", + processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", + sourceCode: "Use option `code: {source: true}`", + strictDefaults: "It is default now, see option `strict`.", + strictKeywords: "It is default now, see option `strict`.", + uniqueItems: '"uniqueItems" keyword is always validated.', + unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", + cache: "Map is used as cache, schema object as key.", + serialize: "Map is used as cache, schema object as key.", + ajvErrors: "It is default now." + }; + var deprecatedOptions = { + ignoreKeywordsWithRef: "", + jsPropertySyntax: "", + unicode: '"minLength"/"maxLength" account for unicode characters by default.' + }; + var MAX_EXPRESSION = 200; + function requiredOptions(o) { + var _a, _b, _c, _d, _e, _f, _g, _h2, _j, _k, _l2, _m, _o2, _p, _q, _r, _s2, _t, _u2, _v, _w, _x, _y, _z, _0; + const s = o.strict; + const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize; + const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0; + const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; + const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; + return { + strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true, + strictNumbers: (_h2 = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h2 !== void 0 ? _h2 : true, + strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log", + strictTuples: (_m = (_l2 = o.strictTuples) !== null && _l2 !== void 0 ? _l2 : s) !== null && _m !== void 0 ? _m : "log", + strictRequired: (_p = (_o2 = o.strictRequired) !== null && _o2 !== void 0 ? _o2 : s) !== null && _p !== void 0 ? _p : false, + code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp }, + loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, + loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION, + meta: (_s2 = o.meta) !== null && _s2 !== void 0 ? _s2 : true, + messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true, + inlineRefs: (_u2 = o.inlineRefs) !== null && _u2 !== void 0 ? _u2 : true, + schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id", + addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true, + validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true, + validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true, + unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true, + int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true, + uriResolver + }; + } + var Ajv = class { + constructor(opts = {}) { + this.schemas = {}; + this.refs = {}; + this.formats = {}; + this._compilations = /* @__PURE__ */ new Set(); + this._loading = {}; + this._cache = /* @__PURE__ */ new Map(); + opts = this.opts = { ...opts, ...requiredOptions(opts) }; + const { es5, lines } = this.opts.code; + this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); + this.logger = getLogger(opts.logger); + const formatOpt = opts.validateFormats; + opts.validateFormats = false; + this.RULES = (0, rules_1.getRules)(); + checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); + checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); + this._metaOpts = getMetaSchemaOptions.call(this); + if (opts.formats) + addInitialFormats.call(this); + this._addVocabularies(); + this._addDefaultMetaSchema(); + if (opts.keywords) + addInitialKeywords.call(this, opts.keywords); + if (typeof opts.meta == "object") + this.addMetaSchema(opts.meta); + addInitialSchemas.call(this); + opts.validateFormats = formatOpt; + } + _addVocabularies() { + this.addKeyword("$async"); + } + _addDefaultMetaSchema() { + const { $data, meta, schemaId } = this.opts; + let _dataRefSchema = $dataRefSchema; + if (schemaId === "id") { + _dataRefSchema = { ...$dataRefSchema }; + _dataRefSchema.id = _dataRefSchema.$id; + delete _dataRefSchema.$id; + } + if (meta && $data) + this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); + } + defaultMeta() { + const { meta, schemaId } = this.opts; + return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : void 0; + } + validate(schemaKeyRef, data) { + let v; + if (typeof schemaKeyRef == "string") { + v = this.getSchema(schemaKeyRef); + if (!v) + throw new Error(`no schema with key or ref "${schemaKeyRef}"`); + } else { + v = this.compile(schemaKeyRef); + } + const valid = v(data); + if (!("$async" in v)) + this.errors = v.errors; + return valid; + } + compile(schema, _meta) { + const sch = this._addSchema(schema, _meta); + return sch.validate || this._compileSchemaEnv(sch); + } + compileAsync(schema, meta) { + if (typeof this.opts.loadSchema != "function") { + throw new Error("options.loadSchema should be a function"); + } + const { loadSchema } = this.opts; + return runCompileAsync.call(this, schema, meta); + async function runCompileAsync(_schema, _meta) { + await loadMetaSchema.call(this, _schema.$schema); + const sch = this._addSchema(_schema, _meta); + return sch.validate || _compileAsync.call(this, sch); + } + async function loadMetaSchema($ref) { + if ($ref && !this.getSchema($ref)) { + await runCompileAsync.call(this, { $ref }, true); + } + } + async function _compileAsync(sch) { + try { + return this._compileSchemaEnv(sch); + } catch (e) { + if (!(e instanceof ref_error_1.default)) + throw e; + checkLoaded.call(this, e); + await loadMissingSchema.call(this, e.missingSchema); + return _compileAsync.call(this, sch); + } + } + function checkLoaded({ missingSchema: ref, missingRef }) { + if (this.refs[ref]) { + throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); + } + } + async function loadMissingSchema(ref) { + const _schema = await _loadSchema.call(this, ref); + if (!this.refs[ref]) + await loadMetaSchema.call(this, _schema.$schema); + if (!this.refs[ref]) + this.addSchema(_schema, ref, meta); + } + async function _loadSchema(ref) { + const p = this._loading[ref]; + if (p) + return p; + try { + return await (this._loading[ref] = loadSchema(ref)); + } finally { + delete this._loading[ref]; + } + } + } + // Adds schema to the instance + addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) { + if (Array.isArray(schema)) { + for (const sch of schema) + this.addSchema(sch, void 0, _meta, _validateSchema); + return this; + } + let id2; + if (typeof schema === "object") { + const { schemaId } = this.opts; + id2 = schema[schemaId]; + if (id2 !== void 0 && typeof id2 != "string") { + throw new Error(`schema ${schemaId} must be string`); + } + } + key = (0, resolve_1.normalizeId)(key || id2); + this._checkUnique(key); + this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true); + return this; + } + // Add schema that will be used to validate other schemas + // options in META_IGNORE_OPTIONS are alway set to false + addMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) { + this.addSchema(schema, key, true, _validateSchema); + return this; + } + // Validate schema against its meta-schema + validateSchema(schema, throwOrLogError) { + if (typeof schema == "boolean") + return true; + let $schema; + $schema = schema.$schema; + if ($schema !== void 0 && typeof $schema != "string") { + throw new Error("$schema must be a string"); + } + $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); + if (!$schema) { + this.logger.warn("meta-schema not available"); + this.errors = null; + return true; + } + const valid = this.validate($schema, schema); + if (!valid && throwOrLogError) { + const message = "schema is invalid: " + this.errorsText(); + if (this.opts.validateSchema === "log") + this.logger.error(message); + else + throw new Error(message); + } + return valid; + } + // Get compiled schema by `key` or `ref`. + // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id) + getSchema(keyRef) { + let sch; + while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") + keyRef = sch; + if (sch === void 0) { + const { schemaId } = this.opts; + const root = new compile_1.SchemaEnv({ schema: {}, schemaId }); + sch = compile_1.resolveSchema.call(this, root, keyRef); + if (!sch) + return; + this.refs[keyRef] = sch; + } + return sch.validate || this._compileSchemaEnv(sch); + } + // Remove cached schema(s). + // If no parameter is passed all schemas but meta-schemas are removed. + // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + // Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + removeSchema(schemaKeyRef) { + if (schemaKeyRef instanceof RegExp) { + this._removeAllSchemas(this.schemas, schemaKeyRef); + this._removeAllSchemas(this.refs, schemaKeyRef); + return this; + } + switch (typeof schemaKeyRef) { + case "undefined": + this._removeAllSchemas(this.schemas); + this._removeAllSchemas(this.refs); + this._cache.clear(); + return this; + case "string": { + const sch = getSchEnv.call(this, schemaKeyRef); + if (typeof sch == "object") + this._cache.delete(sch.schema); + delete this.schemas[schemaKeyRef]; + delete this.refs[schemaKeyRef]; + return this; + } + case "object": { + const cacheKey = schemaKeyRef; + this._cache.delete(cacheKey); + let id2 = schemaKeyRef[this.opts.schemaId]; + if (id2) { + id2 = (0, resolve_1.normalizeId)(id2); + delete this.schemas[id2]; + delete this.refs[id2]; + } + return this; + } + default: + throw new Error("ajv.removeSchema: invalid parameter"); + } + } + // add "vocabulary" - a collection of keywords + addVocabulary(definitions) { + for (const def of definitions) + this.addKeyword(def); + return this; + } + addKeyword(kwdOrDef, def) { + let keyword; + if (typeof kwdOrDef == "string") { + keyword = kwdOrDef; + if (typeof def == "object") { + this.logger.warn("these parameters are deprecated, see docs for addKeyword"); + def.keyword = keyword; + } + } else if (typeof kwdOrDef == "object" && def === void 0) { + def = kwdOrDef; + keyword = def.keyword; + if (Array.isArray(keyword) && !keyword.length) { + throw new Error("addKeywords: keyword must be string or non-empty array"); + } + } else { + throw new Error("invalid addKeywords parameters"); + } + checkKeyword.call(this, keyword, def); + if (!def) { + (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); + return this; + } + keywordMetaschema.call(this, def); + const definition = { + ...def, + type: (0, dataType_1.getJSONTypes)(def.type), + schemaType: (0, dataType_1.getJSONTypes)(def.schemaType) + }; + (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))); + return this; + } + getKeyword(keyword) { + const rule = this.RULES.all[keyword]; + return typeof rule == "object" ? rule.definition : !!rule; + } + // Remove keyword + removeKeyword(keyword) { + const { RULES } = this; + delete RULES.keywords[keyword]; + delete RULES.all[keyword]; + for (const group of RULES.rules) { + const i = group.rules.findIndex((rule) => rule.keyword === keyword); + if (i >= 0) + group.rules.splice(i, 1); + } + return this; + } + // Add format + addFormat(name, format) { + if (typeof format == "string") + format = new RegExp(format); + this.formats[name] = format; + return this; + } + errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) { + if (!errors || errors.length === 0) + return "No errors"; + return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg); + } + $dataMetaSchema(metaSchema, keywordsJsonPointers) { + const rules = this.RULES.all; + metaSchema = JSON.parse(JSON.stringify(metaSchema)); + for (const jsonPointer of keywordsJsonPointers) { + const segments = jsonPointer.split("/").slice(1); + let keywords = metaSchema; + for (const seg of segments) + keywords = keywords[seg]; + for (const key in rules) { + const rule = rules[key]; + if (typeof rule != "object") + continue; + const { $data } = rule.definition; + const schema = keywords[key]; + if ($data && schema) + keywords[key] = schemaOrData(schema); + } + } + return metaSchema; + } + _removeAllSchemas(schemas, regex) { + for (const keyRef in schemas) { + const sch = schemas[keyRef]; + if (!regex || regex.test(keyRef)) { + if (typeof sch == "string") { + delete schemas[keyRef]; + } else if (sch && !sch.meta) { + this._cache.delete(sch.schema); + delete schemas[keyRef]; + } + } + } + } + _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { + let id2; + const { schemaId } = this.opts; + if (typeof schema == "object") { + id2 = schema[schemaId]; + } else { + if (this.opts.jtd) + throw new Error("schema must be object"); + else if (typeof schema != "boolean") + throw new Error("schema must be object or boolean"); + } + let sch = this._cache.get(schema); + if (sch !== void 0) + return sch; + baseId = (0, resolve_1.normalizeId)(id2 || baseId); + const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId); + sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs }); + this._cache.set(sch.schema, sch); + if (addSchema && !baseId.startsWith("#")) { + if (baseId) + this._checkUnique(baseId); + this.refs[baseId] = sch; + } + if (validateSchema) + this.validateSchema(schema, true); + return sch; + } + _checkUnique(id2) { + if (this.schemas[id2] || this.refs[id2]) { + throw new Error(`schema with key or id "${id2}" already exists`); + } + } + _compileSchemaEnv(sch) { + if (sch.meta) + this._compileMetaSchema(sch); + else + compile_1.compileSchema.call(this, sch); + if (!sch.validate) + throw new Error("ajv implementation error"); + return sch.validate; + } + _compileMetaSchema(sch) { + const currentOpts = this.opts; + this.opts = this._metaOpts; + try { + compile_1.compileSchema.call(this, sch); + } finally { + this.opts = currentOpts; + } + } + }; + Ajv.ValidationError = validation_error_1.default; + Ajv.MissingRefError = ref_error_1.default; + exports2.default = Ajv; + function checkOptions(checkOpts2, options, msg, log3 = "error") { + for (const key in checkOpts2) { + const opt = key; + if (opt in options) + this.logger[log3](`${msg}: option ${key}. ${checkOpts2[opt]}`); + } + } + function getSchEnv(keyRef) { + keyRef = (0, resolve_1.normalizeId)(keyRef); + return this.schemas[keyRef] || this.refs[keyRef]; + } + function addInitialSchemas() { + const optsSchemas = this.opts.schemas; + if (!optsSchemas) + return; + if (Array.isArray(optsSchemas)) + this.addSchema(optsSchemas); + else + for (const key in optsSchemas) + this.addSchema(optsSchemas[key], key); + } + function addInitialFormats() { + for (const name in this.opts.formats) { + const format = this.opts.formats[name]; + if (format) + this.addFormat(name, format); + } + } + function addInitialKeywords(defs) { + if (Array.isArray(defs)) { + this.addVocabulary(defs); + return; + } + this.logger.warn("keywords option as map is deprecated, pass array"); + for (const keyword in defs) { + const def = defs[keyword]; + if (!def.keyword) + def.keyword = keyword; + this.addKeyword(def); + } + } + function getMetaSchemaOptions() { + const metaOpts = { ...this.opts }; + for (const opt of META_IGNORE_OPTIONS) + delete metaOpts[opt]; + return metaOpts; + } + var noLogs = { log() { + }, warn() { + }, error() { + } }; + function getLogger(logger) { + if (logger === false) + return noLogs; + if (logger === void 0) + return console; + if (logger.log && logger.warn && logger.error) + return logger; + throw new Error("logger must implement log, warn and error methods"); + } + var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; + function checkKeyword(keyword, def) { + const { RULES } = this; + (0, util_1.eachItem)(keyword, (kwd) => { + if (RULES.keywords[kwd]) + throw new Error(`Keyword ${kwd} is already defined`); + if (!KEYWORD_NAME.test(kwd)) + throw new Error(`Keyword ${kwd} has invalid name`); + }); + if (!def) + return; + if (def.$data && !("code" in def || "validate" in def)) { + throw new Error('$data keyword must have "code" or "validate" function'); + } + } + function addRule(keyword, definition, dataType) { + var _a; + const post = definition === null || definition === void 0 ? void 0 : definition.post; + if (dataType && post) + throw new Error('keyword with "post" flag cannot have "type"'); + const { RULES } = this; + let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType); + if (!ruleGroup) { + ruleGroup = { type: dataType, rules: [] }; + RULES.rules.push(ruleGroup); + } + RULES.keywords[keyword] = true; + if (!definition) + return; + const rule = { + keyword, + definition: { + ...definition, + type: (0, dataType_1.getJSONTypes)(definition.type), + schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType) + } + }; + if (definition.before) + addBeforeRule.call(this, ruleGroup, rule, definition.before); + else + ruleGroup.rules.push(rule); + RULES.all[keyword] = rule; + (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd)); + } + function addBeforeRule(ruleGroup, rule, before) { + const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); + if (i >= 0) { + ruleGroup.rules.splice(i, 0, rule); + } else { + ruleGroup.rules.push(rule); + this.logger.warn(`rule ${before} is not defined`); + } + } + function keywordMetaschema(def) { + let { metaSchema } = def; + if (metaSchema === void 0) + return; + if (def.$data && this.opts.$data) + metaSchema = schemaOrData(metaSchema); + def.validateSchema = this.compile(metaSchema, true); + } + var $dataRef = { + $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" + }; + function schemaOrData(schema) { + return { anyOf: [schema, $dataRef] }; + } + } +}); + +// node_modules/ajv/dist/vocabularies/core/id.js +var require_id = __commonJS({ + "node_modules/ajv/dist/vocabularies/core/id.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var def = { + keyword: "id", + code() { + throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/core/ref.js +var require_ref = __commonJS({ + "node_modules/ajv/dist/vocabularies/core/ref.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.callRef = exports2.getValidate = void 0; + var ref_error_1 = require_ref_error(); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var compile_1 = require_compile(); + var util_1 = require_util2(); + var def = { + keyword: "$ref", + schemaType: "string", + code(cxt) { + const { gen, schema: $ref, it: it2 } = cxt; + const { baseId, schemaEnv: env, validateName, opts, self: self2 } = it2; + const { root } = env; + if (($ref === "#" || $ref === "#/") && baseId === root.baseId) + return callRootRef(); + const schOrEnv = compile_1.resolveRef.call(self2, root, baseId, $ref); + if (schOrEnv === void 0) + throw new ref_error_1.default(it2.opts.uriResolver, baseId, $ref); + if (schOrEnv instanceof compile_1.SchemaEnv) + return callValidate(schOrEnv); + return inlineRefSchema(schOrEnv); + function callRootRef() { + if (env === root) + return callRef(cxt, validateName, env, env.$async); + const rootName = gen.scopeValue("root", { ref: root }); + return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async); + } + function callValidate(sch) { + const v = getValidate(cxt, sch); + callRef(cxt, v, sch, sch.$async); + } + function inlineRefSchema(sch) { + const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch }); + const valid = gen.name("valid"); + const schCxt = cxt.subschema({ + schema: sch, + dataTypes: [], + schemaPath: codegen_1.nil, + topSchemaRef: schName, + errSchemaPath: $ref + }, valid); + cxt.mergeEvaluated(schCxt); + cxt.ok(valid); + } + } + }; + function getValidate(cxt, sch) { + const { gen } = cxt; + return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`; + } + exports2.getValidate = getValidate; + function callRef(cxt, v, sch, $async) { + const { gen, it: it2 } = cxt; + const { allErrors, schemaEnv: env, opts } = it2; + const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; + if ($async) + callAsyncRef(); + else + callSyncRef(); + function callAsyncRef() { + if (!env.$async) + throw new Error("async schema referenced by sync schema"); + const valid = gen.let("valid"); + gen.try(() => { + gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`); + addEvaluatedFrom(v); + if (!allErrors) + gen.assign(valid, true); + }, (e) => { + gen.if((0, codegen_1._)`!(${e} instanceof ${it2.ValidationError})`, () => gen.throw(e)); + addErrorsFrom(e); + if (!allErrors) + gen.assign(valid, false); + }); + cxt.ok(valid); + } + function callSyncRef() { + cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v)); + } + function addErrorsFrom(source) { + const errs = (0, codegen_1._)`${source}.errors`; + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); + gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + } + function addEvaluatedFrom(source) { + var _a; + if (!it2.opts.unevaluated) + return; + const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated; + if (it2.props !== true) { + if (schEvaluated && !schEvaluated.dynamicProps) { + if (schEvaluated.props !== void 0) { + it2.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it2.props); + } + } else { + const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`); + it2.props = util_1.mergeEvaluated.props(gen, props, it2.props, codegen_1.Name); + } + } + if (it2.items !== true) { + if (schEvaluated && !schEvaluated.dynamicItems) { + if (schEvaluated.items !== void 0) { + it2.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it2.items); + } + } else { + const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`); + it2.items = util_1.mergeEvaluated.items(gen, items, it2.items, codegen_1.Name); + } + } + } + } + exports2.callRef = callRef; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/core/index.js +var require_core2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/core/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var id_1 = require_id(); + var ref_1 = require_ref(); + var core = [ + "$schema", + "$id", + "$defs", + "$vocabulary", + { keyword: "$comment" }, + "definitions", + id_1.default, + ref_1.default + ]; + exports2.default = core; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/limitNumber.js +var require_limitNumber = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var ops = codegen_1.operators; + var KWDs = { + maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } + }; + var error = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "number", + $data: true, + error, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/multipleOf.js +var require_multipleOf = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error = { + message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`, + params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}` + }; + var def = { + keyword: "multipleOf", + type: "number", + schemaType: "number", + $data: true, + error, + code(cxt) { + const { gen, data, schemaCode, it: it2 } = cxt; + const prec = it2.opts.multipleOfPrecision; + const res = gen.let("res"); + const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`; + cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/runtime/ucs2length.js +var require_ucs2length = __commonJS({ + "node_modules/ajv/dist/runtime/ucs2length.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function ucs2length(str) { + const len = str.length; + let length = 0; + let pos = 0; + let value; + while (pos < len) { + length++; + value = str.charCodeAt(pos++); + if (value >= 55296 && value <= 56319 && pos < len) { + value = str.charCodeAt(pos); + if ((value & 64512) === 56320) + pos++; + } + } + return length; + } + exports2.default = ucs2length; + ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/limitLength.js +var require_limitLength = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var ucs2length_1 = require_ucs2length(); + var error = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxLength" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxLength", "minLength"], + type: "string", + schemaType: "number", + $data: true, + error, + code(cxt) { + const { keyword, data, schemaCode, it: it2 } = cxt; + const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; + const len = it2.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; + cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/pattern.js +var require_pattern = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var error = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}` + }; + var def = { + keyword: "pattern", + type: "string", + schemaType: "string", + $data: true, + error, + code(cxt) { + const { data, $data, schema, schemaCode, it: it2 } = cxt; + const u = it2.opts.unicodeRegExp ? "u" : ""; + const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema); + cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/limitProperties.js +var require_limitProperties = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxProperties" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxProperties", "minProperties"], + type: "object", + schemaType: "number", + $data: true, + error, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/required.js +var require_required = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/required.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var error = { + message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`, + params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}` + }; + var def = { + keyword: "required", + type: "object", + schemaType: "array", + $data: true, + error, + code(cxt) { + const { gen, schema, schemaCode, data, $data, it: it2 } = cxt; + const { opts } = it2; + if (!$data && schema.length === 0) + return; + const useLoop = schema.length >= opts.loopRequired; + if (it2.allErrors) + allErrorsMode(); + else + exitOnErrorMode(); + if (opts.strictRequired) { + const props = cxt.parentSchema.properties; + const { definedProperties } = cxt.it; + for (const requiredKey of schema) { + if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) { + const schemaPath = it2.schemaEnv.baseId + it2.errSchemaPath; + const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; + (0, util_1.checkStrictMode)(it2, msg, it2.opts.strictRequired); + } + } + } + function allErrorsMode() { + if (useLoop || $data) { + cxt.block$data(codegen_1.nil, loopAllRequired); + } else { + for (const prop of schema) { + (0, code_1.checkReportMissingProp)(cxt, prop); + } + } + } + function exitOnErrorMode() { + const missing = gen.let("missing"); + if (useLoop || $data) { + const valid = gen.let("valid", true); + cxt.block$data(valid, () => loopUntilMissing(missing, valid)); + cxt.ok(valid); + } else { + gen.if((0, code_1.checkMissingProp)(cxt, schema, missing)); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + function loopAllRequired() { + gen.forOf("prop", schemaCode, (prop) => { + cxt.setParams({ missingProperty: prop }); + gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); + }); + } + function loopUntilMissing(missing, valid) { + cxt.setParams({ missingProperty: missing }); + gen.forOf(missing, schemaCode, () => { + gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(); + gen.break(); + }); + }, codegen_1.nil); + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/limitItems.js +var require_limitItems = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxItems" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxItems", "minItems"], + type: "array", + schemaType: "number", + $data: true, + error, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/runtime/equal.js +var require_equal = __commonJS({ + "node_modules/ajv/dist/runtime/equal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var equal = require_fast_deep_equal(); + equal.code = 'require("ajv/dist/runtime/equal").default'; + exports2.default = equal; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +var require_uniqueItems = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dataType_1 = require_dataType(); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var equal_1 = require_equal(); + var error = { + message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`, + params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}` + }; + var def = { + keyword: "uniqueItems", + type: "array", + schemaType: "boolean", + $data: true, + error, + code(cxt) { + const { gen, data, $data, schema, parentSchema, schemaCode, it: it2 } = cxt; + if (!$data && !schema) + return; + const valid = gen.let("valid"); + const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; + cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`); + cxt.ok(valid); + function validateUniqueItems() { + const i = gen.let("i", (0, codegen_1._)`${data}.length`); + const j = gen.let("j"); + cxt.setParams({ i, j }); + gen.assign(valid, true); + gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j)); + } + function canOptimize() { + return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array"); + } + function loopN(i, j) { + const item = gen.name("item"); + const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it2.opts.strictNumbers, dataType_1.DataType.Wrong); + const indices = gen.const("indices", (0, codegen_1._)`{}`); + gen.for((0, codegen_1._)`;${i}--;`, () => { + gen.let(item, (0, codegen_1._)`${data}[${i}]`); + gen.if(wrongType, (0, codegen_1._)`continue`); + if (itemTypes.length > 1) + gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`); + gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => { + gen.assign(j, (0, codegen_1._)`${indices}[${item}]`); + cxt.error(); + gen.assign(valid, false).break(); + }).code((0, codegen_1._)`${indices}[${item}] = ${i}`); + }); + } + function loopN2(i, j) { + const eql = (0, util_1.useFunc)(gen, equal_1.default); + const outer = gen.name("outer"); + gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => { + cxt.error(); + gen.assign(valid, false).break(outer); + }))); + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/const.js +var require_const = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/const.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var equal_1 = require_equal(); + var error = { + message: "must be equal to constant", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}` + }; + var def = { + keyword: "const", + $data: true, + error, + code(cxt) { + const { gen, data, $data, schemaCode, schema } = cxt; + if ($data || schema && typeof schema == "object") { + cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); + } else { + cxt.fail((0, codegen_1._)`${schema} !== ${data}`); + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/enum.js +var require_enum = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var equal_1 = require_equal(); + var error = { + message: "must be equal to one of the allowed values", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}` + }; + var def = { + keyword: "enum", + schemaType: "array", + $data: true, + error, + code(cxt) { + const { gen, data, $data, schema, schemaCode, it: it2 } = cxt; + if (!$data && schema.length === 0) + throw new Error("enum must have non-empty array"); + const useLoop = schema.length >= it2.opts.loopEnum; + let eql; + const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default); + let valid; + if (useLoop || $data) { + valid = gen.let("valid"); + cxt.block$data(valid, loopEnum); + } else { + if (!Array.isArray(schema)) + throw new Error("ajv implementation error"); + const vSchema = gen.const("vSchema", schemaCode); + valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i))); + } + cxt.pass(valid); + function loopEnum() { + gen.assign(valid, false); + gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())); + } + function equalCode(vSchema, i) { + const sch = schema[i]; + return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`; + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/validation/index.js +var require_validation2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var limitNumber_1 = require_limitNumber(); + var multipleOf_1 = require_multipleOf(); + var limitLength_1 = require_limitLength(); + var pattern_1 = require_pattern(); + var limitProperties_1 = require_limitProperties(); + var required_1 = require_required(); + var limitItems_1 = require_limitItems(); + var uniqueItems_1 = require_uniqueItems(); + var const_1 = require_const(); + var enum_1 = require_enum(); + var validation = [ + // number + limitNumber_1.default, + multipleOf_1.default, + // string + limitLength_1.default, + pattern_1.default, + // object + limitProperties_1.default, + required_1.default, + // array + limitItems_1.default, + uniqueItems_1.default, + // any + { keyword: "type", schemaType: ["string", "array"] }, + { keyword: "nullable", schemaType: "boolean" }, + const_1.default, + enum_1.default + ]; + exports2.default = validation; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +var require_additionalItems = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateAdditionalItems = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var error = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "additionalItems", + type: "array", + schemaType: ["boolean", "object"], + before: "uniqueItems", + error, + code(cxt) { + const { parentSchema, it: it2 } = cxt; + const { items } = parentSchema; + if (!Array.isArray(items)) { + (0, util_1.checkStrictMode)(it2, '"additionalItems" is ignored when "items" is not an array of schemas'); + return; + } + validateAdditionalItems(cxt, items); + } + }; + function validateAdditionalItems(cxt, items) { + const { gen, schema, data, keyword, it: it2 } = cxt; + it2.items = true; + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + if (schema === false) { + cxt.setParams({ len: items.length }); + cxt.pass((0, codegen_1._)`${len} <= ${items.length}`); + } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it2, schema)) { + const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`); + gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); + cxt.ok(valid); + } + function validateItems(valid) { + gen.forRange("i", items.length, len, (i) => { + cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid); + if (!it2.allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + }); + } + } + exports2.validateAdditionalItems = validateAdditionalItems; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/items.js +var require_items = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/items.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateTuple = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var code_1 = require_code2(); + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "array", "boolean"], + before: "uniqueItems", + code(cxt) { + const { schema, it: it2 } = cxt; + if (Array.isArray(schema)) + return validateTuple(cxt, "additionalItems", schema); + it2.items = true; + if ((0, util_1.alwaysValidSchema)(it2, schema)) + return; + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + function validateTuple(cxt, extraItems, schArr = cxt.schema) { + const { gen, parentSchema, data, keyword, it: it2 } = cxt; + checkStrictTuple(parentSchema); + if (it2.opts.unevaluated && schArr.length && it2.items !== true) { + it2.items = util_1.mergeEvaluated.items(gen, schArr.length, it2.items); + } + const valid = gen.name("valid"); + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + schArr.forEach((sch, i) => { + if ((0, util_1.alwaysValidSchema)(it2, sch)) + return; + gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({ + keyword, + schemaProp: i, + dataProp: i + }, valid)); + cxt.ok(valid); + }); + function checkStrictTuple(sch) { + const { opts, errSchemaPath } = it2; + const l = schArr.length; + const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false); + if (opts.strictTuples && !fullTuple) { + const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; + (0, util_1.checkStrictMode)(it2, msg, opts.strictTuples); + } + } + } + exports2.validateTuple = validateTuple; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +var require_prefixItems = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var items_1 = require_items(); + var def = { + keyword: "prefixItems", + type: "array", + schemaType: ["array"], + before: "uniqueItems", + code: (cxt) => (0, items_1.validateTuple)(cxt, "items") + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/items2020.js +var require_items2020 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var code_1 = require_code2(); + var additionalItems_1 = require_additionalItems(); + var error = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + error, + code(cxt) { + const { schema, parentSchema, it: it2 } = cxt; + const { prefixItems } = parentSchema; + it2.items = true; + if ((0, util_1.alwaysValidSchema)(it2, schema)) + return; + if (prefixItems) + (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); + else + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/contains.js +var require_contains = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var error = { + message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`, + params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}` + }; + var def = { + keyword: "contains", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + trackErrors: true, + error, + code(cxt) { + const { gen, schema, parentSchema, data, it: it2 } = cxt; + let min; + let max; + const { minContains, maxContains } = parentSchema; + if (it2.opts.next) { + min = minContains === void 0 ? 1 : minContains; + max = maxContains; + } else { + min = 1; + } + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + cxt.setParams({ min, max }); + if (max === void 0 && min === 0) { + (0, util_1.checkStrictMode)(it2, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); + return; + } + if (max !== void 0 && min > max) { + (0, util_1.checkStrictMode)(it2, `"minContains" > "maxContains" is always invalid`); + cxt.fail(); + return; + } + if ((0, util_1.alwaysValidSchema)(it2, schema)) { + let cond = (0, codegen_1._)`${len} >= ${min}`; + if (max !== void 0) + cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`; + cxt.pass(cond); + return; + } + it2.items = true; + const valid = gen.name("valid"); + if (max === void 0 && min === 1) { + validateItems(valid, () => gen.if(valid, () => gen.break())); + } else if (min === 0) { + gen.let(valid, true); + if (max !== void 0) + gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount); + } else { + gen.let(valid, false); + validateItemsWithCount(); + } + cxt.result(valid, () => cxt.reset()); + function validateItemsWithCount() { + const schValid = gen.name("_valid"); + const count = gen.let("count", 0); + validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); + } + function validateItems(_valid, block) { + gen.forRange("i", 0, len, (i) => { + cxt.subschema({ + keyword: "contains", + dataProp: i, + dataPropType: util_1.Type.Num, + compositeRule: true + }, _valid); + block(); + }); + } + function checkLimits(count) { + gen.code((0, codegen_1._)`${count}++`); + if (max === void 0) { + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break()); + } else { + gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break()); + if (min === 1) + gen.assign(valid, true); + else + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true)); + } + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/dependencies.js +var require_dependencies = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateSchemaDeps = exports2.validatePropertyDeps = exports2.error = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var code_1 = require_code2(); + exports2.error = { + message: ({ params: { property, depsCount, deps } }) => { + const property_ies = depsCount === 1 ? "property" : "properties"; + return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`; + }, + params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property}, + missingProperty: ${missingProperty}, + depsCount: ${depsCount}, + deps: ${deps}}` + // TODO change to reference + }; + var def = { + keyword: "dependencies", + type: "object", + schemaType: "object", + error: exports2.error, + code(cxt) { + const [propDeps, schDeps] = splitDependencies(cxt); + validatePropertyDeps(cxt, propDeps); + validateSchemaDeps(cxt, schDeps); + } + }; + function splitDependencies({ schema }) { + const propertyDeps = {}; + const schemaDeps = {}; + for (const key in schema) { + if (key === "__proto__") + continue; + const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps; + deps[key] = schema[key]; + } + return [propertyDeps, schemaDeps]; + } + function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { + const { gen, data, it: it2 } = cxt; + if (Object.keys(propertyDeps).length === 0) + return; + const missing = gen.let("missing"); + for (const prop in propertyDeps) { + const deps = propertyDeps[prop]; + if (deps.length === 0) + continue; + const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties); + cxt.setParams({ + property: prop, + depsCount: deps.length, + deps: deps.join(", ") + }); + if (it2.allErrors) { + gen.if(hasProperty, () => { + for (const depProp of deps) { + (0, code_1.checkReportMissingProp)(cxt, depProp); + } + }); + } else { + gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + } + exports2.validatePropertyDeps = validatePropertyDeps; + function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { + const { gen, data, keyword, it: it2 } = cxt; + const valid = gen.name("valid"); + for (const prop in schemaDeps) { + if ((0, util_1.alwaysValidSchema)(it2, schemaDeps[prop])) + continue; + gen.if( + (0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties), + () => { + const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); + cxt.mergeValidEvaluated(schCxt, valid); + }, + () => gen.var(valid, true) + // TODO var + ); + cxt.ok(valid); + } + } + exports2.validateSchemaDeps = validateSchemaDeps; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +var require_propertyNames = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var error = { + message: "property name must be valid", + params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}` + }; + var def = { + keyword: "propertyNames", + type: "object", + schemaType: ["object", "boolean"], + error, + code(cxt) { + const { gen, schema, data, it: it2 } = cxt; + if ((0, util_1.alwaysValidSchema)(it2, schema)) + return; + const valid = gen.name("valid"); + gen.forIn("key", data, (key) => { + cxt.setParams({ propertyName: key }); + cxt.subschema({ + keyword: "propertyNames", + data: key, + dataTypes: ["string"], + propertyName: key, + compositeRule: true + }, valid); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(true); + if (!it2.allErrors) + gen.break(); + }); + }); + cxt.ok(valid); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +var require_additionalProperties = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var util_1 = require_util2(); + var error = { + message: "must NOT have additional properties", + params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}` + }; + var def = { + keyword: "additionalProperties", + type: ["object"], + schemaType: ["boolean", "object"], + allowUndefined: true, + trackErrors: true, + error, + code(cxt) { + const { gen, schema, parentSchema, data, errsCount, it: it2 } = cxt; + if (!errsCount) + throw new Error("ajv implementation error"); + const { allErrors, opts } = it2; + it2.props = true; + if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it2, schema)) + return; + const props = (0, code_1.allSchemaProperties)(parentSchema.properties); + const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); + checkAdditionalProperties(); + cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + function checkAdditionalProperties() { + gen.forIn("key", data, (key) => { + if (!props.length && !patProps.length) + additionalPropertyCode(key); + else + gen.if(isAdditional(key), () => additionalPropertyCode(key)); + }); + } + function isAdditional(key) { + let definedProp; + if (props.length > 8) { + const propsSchema = (0, util_1.schemaRefOrVal)(it2, parentSchema.properties, "properties"); + definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); + } else if (props.length) { + definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`)); + } else { + definedProp = codegen_1.nil; + } + if (patProps.length) { + definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`)); + } + return (0, codegen_1.not)(definedProp); + } + function deleteAdditional(key) { + gen.code((0, codegen_1._)`delete ${data}[${key}]`); + } + function additionalPropertyCode(key) { + if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) { + deleteAdditional(key); + return; + } + if (schema === false) { + cxt.setParams({ additionalProperty: key }); + cxt.error(); + if (!allErrors) + gen.break(); + return; + } + if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it2, schema)) { + const valid = gen.name("valid"); + if (opts.removeAdditional === "failing") { + applyAdditionalSchema(key, valid, false); + gen.if((0, codegen_1.not)(valid), () => { + cxt.reset(); + deleteAdditional(key); + }); + } else { + applyAdditionalSchema(key, valid); + if (!allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + } + } + function applyAdditionalSchema(key, valid, errors) { + const subschema = { + keyword: "additionalProperties", + dataProp: key, + dataPropType: util_1.Type.Str + }; + if (errors === false) { + Object.assign(subschema, { + compositeRule: true, + createErrors: false, + allErrors: false + }); + } + cxt.subschema(subschema, valid); + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/properties.js +var require_properties = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var validate_1 = require_validate(); + var code_1 = require_code2(); + var util_1 = require_util2(); + var additionalProperties_1 = require_additionalProperties(); + var def = { + keyword: "properties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema, parentSchema, data, it: it2 } = cxt; + if (it2.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) { + additionalProperties_1.default.code(new validate_1.KeywordCxt(it2, additionalProperties_1.default, "additionalProperties")); + } + const allProps = (0, code_1.allSchemaProperties)(schema); + for (const prop of allProps) { + it2.definedProperties.add(prop); + } + if (it2.opts.unevaluated && allProps.length && it2.props !== true) { + it2.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it2.props); + } + const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it2, schema[p])); + if (properties.length === 0) + return; + const valid = gen.name("valid"); + for (const prop of properties) { + if (hasDefault(prop)) { + applyPropertySchema(prop); + } else { + gen.if((0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties)); + applyPropertySchema(prop); + if (!it2.allErrors) + gen.else().var(valid, true); + gen.endIf(); + } + cxt.it.definedProperties.add(prop); + cxt.ok(valid); + } + function hasDefault(prop) { + return it2.opts.useDefaults && !it2.compositeRule && schema[prop].default !== void 0; + } + function applyPropertySchema(prop) { + cxt.subschema({ + keyword: "properties", + schemaProp: prop, + dataProp: prop + }, valid); + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +var require_patternProperties = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var util_2 = require_util2(); + var def = { + keyword: "patternProperties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema, data, parentSchema, it: it2 } = cxt; + const { opts } = it2; + const patterns = (0, code_1.allSchemaProperties)(schema); + const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it2, schema[p])); + if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it2.opts.unevaluated || it2.props === true)) { + return; + } + const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; + const valid = gen.name("valid"); + if (it2.props !== true && !(it2.props instanceof codegen_1.Name)) { + it2.props = (0, util_2.evaluatedPropsToName)(gen, it2.props); + } + const { props } = it2; + validatePatternProperties(); + function validatePatternProperties() { + for (const pat of patterns) { + if (checkProperties) + checkMatchingProperties(pat); + if (it2.allErrors) { + validateProperties(pat); + } else { + gen.var(valid, true); + validateProperties(pat); + gen.if(valid); + } + } + } + function checkMatchingProperties(pat) { + for (const prop in checkProperties) { + if (new RegExp(pat).test(prop)) { + (0, util_1.checkStrictMode)(it2, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); + } + } + } + function validateProperties(pat) { + gen.forIn("key", data, (key) => { + gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { + const alwaysValid = alwaysValidPatterns.includes(pat); + if (!alwaysValid) { + cxt.subschema({ + keyword: "patternProperties", + schemaProp: pat, + dataProp: key, + dataPropType: util_2.Type.Str + }, valid); + } + if (it2.opts.unevaluated && props !== true) { + gen.assign((0, codegen_1._)`${props}[${key}]`, true); + } else if (!alwaysValid && !it2.allErrors) { + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + }); + }); + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/not.js +var require_not = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/not.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util2(); + var def = { + keyword: "not", + schemaType: ["object", "boolean"], + trackErrors: true, + code(cxt) { + const { gen, schema, it: it2 } = cxt; + if ((0, util_1.alwaysValidSchema)(it2, schema)) { + cxt.fail(); + return; + } + const valid = gen.name("valid"); + cxt.subschema({ + keyword: "not", + compositeRule: true, + createErrors: false, + allErrors: false + }, valid); + cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); + }, + error: { message: "must NOT be valid" } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/anyOf.js +var require_anyOf = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var def = { + keyword: "anyOf", + schemaType: "array", + trackErrors: true, + code: code_1.validateUnion, + error: { message: "must match a schema in anyOf" } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/oneOf.js +var require_oneOf = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var error = { + message: "must match exactly one schema in oneOf", + params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}` + }; + var def = { + keyword: "oneOf", + schemaType: "array", + trackErrors: true, + error, + code(cxt) { + const { gen, schema, parentSchema, it: it2 } = cxt; + if (!Array.isArray(schema)) + throw new Error("ajv implementation error"); + if (it2.opts.discriminator && parentSchema.discriminator) + return; + const schArr = schema; + const valid = gen.let("valid", false); + const passing = gen.let("passing", null); + const schValid = gen.name("_valid"); + cxt.setParams({ passing }); + gen.block(validateOneOf); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + function validateOneOf() { + schArr.forEach((sch, i) => { + let schCxt; + if ((0, util_1.alwaysValidSchema)(it2, sch)) { + gen.var(schValid, true); + } else { + schCxt = cxt.subschema({ + keyword: "oneOf", + schemaProp: i, + compositeRule: true + }, schValid); + } + if (i > 0) { + gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else(); + } + gen.if(schValid, () => { + gen.assign(valid, true); + gen.assign(passing, i); + if (schCxt) + cxt.mergeEvaluated(schCxt, codegen_1.Name); + }); + }); + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/allOf.js +var require_allOf = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util2(); + var def = { + keyword: "allOf", + schemaType: "array", + code(cxt) { + const { gen, schema, it: it2 } = cxt; + if (!Array.isArray(schema)) + throw new Error("ajv implementation error"); + const valid = gen.name("valid"); + schema.forEach((sch, i) => { + if ((0, util_1.alwaysValidSchema)(it2, sch)) + return; + const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid); + cxt.ok(valid); + cxt.mergeEvaluated(schCxt); + }); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/if.js +var require_if = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/if.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util2(); + var error = { + message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`, + params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}` + }; + var def = { + keyword: "if", + schemaType: ["object", "boolean"], + trackErrors: true, + error, + code(cxt) { + const { gen, parentSchema, it: it2 } = cxt; + if (parentSchema.then === void 0 && parentSchema.else === void 0) { + (0, util_1.checkStrictMode)(it2, '"if" without "then" and "else" is ignored'); + } + const hasThen = hasSchema(it2, "then"); + const hasElse = hasSchema(it2, "else"); + if (!hasThen && !hasElse) + return; + const valid = gen.let("valid", true); + const schValid = gen.name("_valid"); + validateIf(); + cxt.reset(); + if (hasThen && hasElse) { + const ifClause = gen.let("ifClause"); + cxt.setParams({ ifClause }); + gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); + } else if (hasThen) { + gen.if(schValid, validateClause("then")); + } else { + gen.if((0, codegen_1.not)(schValid), validateClause("else")); + } + cxt.pass(valid, () => cxt.error(true)); + function validateIf() { + const schCxt = cxt.subschema({ + keyword: "if", + compositeRule: true, + createErrors: false, + allErrors: false + }, schValid); + cxt.mergeEvaluated(schCxt); + } + function validateClause(keyword, ifClause) { + return () => { + const schCxt = cxt.subschema({ keyword }, schValid); + gen.assign(valid, schValid); + cxt.mergeValidEvaluated(schCxt, valid); + if (ifClause) + gen.assign(ifClause, (0, codegen_1._)`${keyword}`); + else + cxt.setParams({ ifClause: keyword }); + }; + } + } + }; + function hasSchema(it2, keyword) { + const schema = it2.schema[keyword]; + return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it2, schema); + } + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/thenElse.js +var require_thenElse = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util2(); + var def = { + keyword: ["then", "else"], + schemaType: ["object", "boolean"], + code({ keyword, parentSchema, it: it2 }) { + if (parentSchema.if === void 0) + (0, util_1.checkStrictMode)(it2, `"${keyword}" without "if" is ignored`); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/applicator/index.js +var require_applicator = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var additionalItems_1 = require_additionalItems(); + var prefixItems_1 = require_prefixItems(); + var items_1 = require_items(); + var items2020_1 = require_items2020(); + var contains_1 = require_contains(); + var dependencies_1 = require_dependencies(); + var propertyNames_1 = require_propertyNames(); + var additionalProperties_1 = require_additionalProperties(); + var properties_1 = require_properties(); + var patternProperties_1 = require_patternProperties(); + var not_1 = require_not(); + var anyOf_1 = require_anyOf(); + var oneOf_1 = require_oneOf(); + var allOf_1 = require_allOf(); + var if_1 = require_if(); + var thenElse_1 = require_thenElse(); + function getApplicator(draft2020 = false) { + const applicator = [ + // any + not_1.default, + anyOf_1.default, + oneOf_1.default, + allOf_1.default, + if_1.default, + thenElse_1.default, + // object + propertyNames_1.default, + additionalProperties_1.default, + dependencies_1.default, + properties_1.default, + patternProperties_1.default + ]; + if (draft2020) + applicator.push(prefixItems_1.default, items2020_1.default); + else + applicator.push(additionalItems_1.default, items_1.default); + applicator.push(contains_1.default); + return applicator; + } + exports2.default = getApplicator; + } +}); + +// node_modules/ajv/dist/vocabularies/format/format.js +var require_format = __commonJS({ + "node_modules/ajv/dist/vocabularies/format/format.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}` + }; + var def = { + keyword: "format", + type: ["number", "string"], + schemaType: "string", + $data: true, + error, + code(cxt, ruleType) { + const { gen, data, $data, schema, schemaCode, it: it2 } = cxt; + const { opts, errSchemaPath, schemaEnv, self: self2 } = it2; + if (!opts.validateFormats) + return; + if ($data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`); + const fType = gen.let("fType"); + const format = gen.let("format"); + gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef)); + cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); + function unknownFmt() { + if (opts.strictSchema === false) + return codegen_1.nil; + return (0, codegen_1._)`${schemaCode} && !${format}`; + } + function invalidFmt() { + const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`; + const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`; + return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`; + } + } + function validateFormat() { + const formatDef = self2.formats[schema]; + if (!formatDef) { + unknownFormat(); + return; + } + if (formatDef === true) + return; + const [fmtType, format, fmtRef] = getFormat(formatDef); + if (fmtType === ruleType) + cxt.pass(validCondition()); + function unknownFormat() { + if (opts.strictSchema === false) { + self2.logger.warn(unknownMsg()); + return; + } + throw new Error(unknownMsg()); + function unknownMsg() { + return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`; + } + } + function getFormat(fmtDef) { + const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0; + const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code }); + if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { + return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`]; + } + return ["string", fmtDef, fmt]; + } + function validCondition() { + if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { + if (!schemaEnv.$async) + throw new Error("async format in sync schema"); + return (0, codegen_1._)`await ${fmtRef}(${data})`; + } + return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`; + } + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/format/index.js +var require_format2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/format/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var format_1 = require_format(); + var format = [format_1.default]; + exports2.default = format; + } +}); + +// node_modules/ajv/dist/vocabularies/metadata.js +var require_metadata = __commonJS({ + "node_modules/ajv/dist/vocabularies/metadata.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.contentVocabulary = exports2.metadataVocabulary = void 0; + exports2.metadataVocabulary = [ + "title", + "description", + "default", + "deprecated", + "readOnly", + "writeOnly", + "examples" + ]; + exports2.contentVocabulary = [ + "contentMediaType", + "contentEncoding", + "contentSchema" + ]; + } +}); + +// node_modules/ajv/dist/vocabularies/draft7.js +var require_draft7 = __commonJS({ + "node_modules/ajv/dist/vocabularies/draft7.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_1 = require_core2(); + var validation_1 = require_validation2(); + var applicator_1 = require_applicator(); + var format_1 = require_format2(); + var metadata_1 = require_metadata(); + var draft7Vocabularies = [ + core_1.default, + validation_1.default, + (0, applicator_1.default)(), + format_1.default, + metadata_1.metadataVocabulary, + metadata_1.contentVocabulary + ]; + exports2.default = draft7Vocabularies; + } +}); + +// node_modules/ajv/dist/vocabularies/discriminator/types.js +var require_types = __commonJS({ + "node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DiscrError = void 0; + var DiscrError; + (function(DiscrError2) { + DiscrError2["Tag"] = "tag"; + DiscrError2["Mapping"] = "mapping"; + })(DiscrError || (exports2.DiscrError = DiscrError = {})); + } +}); + +// node_modules/ajv/dist/vocabularies/discriminator/index.js +var require_discriminator = __commonJS({ + "node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var types_1 = require_types(); + var compile_1 = require_compile(); + var ref_error_1 = require_ref_error(); + var util_1 = require_util2(); + var error = { + message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`, + params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}` + }; + var def = { + keyword: "discriminator", + type: "object", + schemaType: "object", + error, + code(cxt) { + const { gen, data, schema, parentSchema, it: it2 } = cxt; + const { oneOf } = parentSchema; + if (!it2.opts.discriminator) { + throw new Error("discriminator: requires discriminator option"); + } + const tagName = schema.propertyName; + if (typeof tagName != "string") + throw new Error("discriminator: requires propertyName"); + if (schema.mapping) + throw new Error("discriminator: mapping is not supported"); + if (!oneOf) + throw new Error("discriminator: requires oneOf keyword"); + const valid = gen.let("valid", false); + const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`); + gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); + cxt.ok(valid); + function validateMapping() { + const mapping = getMapping(); + gen.if(false); + for (const tagValue in mapping) { + gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); + gen.assign(valid, applyTagSchema(mapping[tagValue])); + } + gen.else(); + cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); + gen.endIf(); + } + function applyTagSchema(schemaProp) { + const _valid = gen.name("valid"); + const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid); + cxt.mergeEvaluated(schCxt, codegen_1.Name); + return _valid; + } + function getMapping() { + var _a; + const oneOfMapping = {}; + const topRequired = hasRequired(parentSchema); + let tagRequired = true; + for (let i = 0; i < oneOf.length; i++) { + let sch = oneOf[i]; + if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it2.self.RULES)) { + const ref = sch.$ref; + sch = compile_1.resolveRef.call(it2.self, it2.schemaEnv.root, it2.baseId, ref); + if (sch instanceof compile_1.SchemaEnv) + sch = sch.schema; + if (sch === void 0) + throw new ref_error_1.default(it2.opts.uriResolver, it2.baseId, ref); + } + const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName]; + if (typeof propSch != "object") { + throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`); + } + tagRequired = tagRequired && (topRequired || hasRequired(sch)); + addMappings(propSch, i); + } + if (!tagRequired) + throw new Error(`discriminator: "${tagName}" must be required`); + return oneOfMapping; + function hasRequired({ required }) { + return Array.isArray(required) && required.includes(tagName); + } + function addMappings(sch, i) { + if (sch.const) { + addMapping(sch.const, i); + } else if (sch.enum) { + for (const tagValue of sch.enum) { + addMapping(tagValue, i); + } + } else { + throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); + } + } + function addMapping(tagValue, i) { + if (typeof tagValue != "string" || tagValue in oneOfMapping) { + throw new Error(`discriminator: "${tagName}" values must be unique strings`); + } + oneOfMapping[tagValue] = i; + } + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/refs/json-schema-draft-07.json +var require_json_schema_draft_07 = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports2, module2) { + module2.exports = { + $schema: "http://json-schema.org/draft-07/schema#", + $id: "http://json-schema.org/draft-07/schema#", + title: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + nonNegativeInteger: { + type: "integer", + minimum: 0 + }, + nonNegativeIntegerDefault0: { + allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + uniqueItems: true, + default: [] + } + }, + type: ["object", "boolean"], + properties: { + $id: { + type: "string", + format: "uri-reference" + }, + $schema: { + type: "string", + format: "uri" + }, + $ref: { + type: "string", + format: "uri-reference" + }, + $comment: { + type: "string" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: true, + readOnly: { + type: "boolean", + default: false + }, + examples: { + type: "array", + items: true + }, + multipleOf: { + type: "number", + exclusiveMinimum: 0 + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "number" + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "number" + }, + maxLength: { $ref: "#/definitions/nonNegativeInteger" }, + minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { $ref: "#" }, + items: { + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], + default: true + }, + maxItems: { $ref: "#/definitions/nonNegativeInteger" }, + minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + contains: { $ref: "#" }, + maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, + minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { $ref: "#" }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + propertyNames: { format: "regex" }, + default: {} + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] + } + }, + propertyNames: { $ref: "#" }, + const: true, + enum: { + type: "array", + items: true, + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + format: { type: "string" }, + contentMediaType: { type: "string" }, + contentEncoding: { type: "string" }, + if: { $ref: "#" }, + then: { $ref: "#" }, + else: { $ref: "#" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + default: true + }; + } +}); + +// node_modules/ajv/dist/ajv.js +var require_ajv = __commonJS({ + "node_modules/ajv/dist/ajv.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MissingRefError = exports2.ValidationError = exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = exports2.Ajv = void 0; + var core_1 = require_core(); + var draft7_1 = require_draft7(); + var discriminator_1 = require_discriminator(); + var draft7MetaSchema = require_json_schema_draft_07(); + var META_SUPPORT_DATA = ["/properties"]; + var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; + var Ajv = class extends core_1.default { + _addVocabularies() { + super._addVocabularies(); + draft7_1.default.forEach((v) => this.addVocabulary(v)); + if (this.opts.discriminator) + this.addKeyword(discriminator_1.default); + } + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + if (!this.opts.meta) + return; + const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema; + this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); + this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; + } + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); + } + }; + exports2.Ajv = Ajv; + module2.exports = exports2 = Ajv; + module2.exports.Ajv = Ajv; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = Ajv; + var validate_1 = require_validate(); + Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports2, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports2, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports2, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports2, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error(); + Object.defineProperty(exports2, "ValidationError", { enumerable: true, get: function() { + return validation_error_1.default; + } }); + var ref_error_1 = require_ref_error(); + Object.defineProperty(exports2, "MissingRefError", { enumerable: true, get: function() { + return ref_error_1.default; + } }); + } +}); + +// node_modules/ajv-formats/dist/formats.js +var require_formats = __commonJS({ + "node_modules/ajv-formats/dist/formats.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formatNames = exports2.fastFormats = exports2.fullFormats = void 0; + function fmtDef(validate, compare) { + return { validate, compare }; + } + exports2.fullFormats = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: fmtDef(date, compareDate), + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: fmtDef(getTime(true), compareTime), + "date-time": fmtDef(getDateTime(true), compareDateTime), + "iso-time": fmtDef(getTime(), compareIsoTime), + "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime), + // duration: https://tools.ietf.org/html/rfc3339#appendix-A + duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d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a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, + // uri-template: https://tools.ietf.org/html/rfc6570 + "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, + // For the source: https://gist.github.com/dperini/729294 + // For test cases: https://mathiasbynens.be/demo/url-regex + url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/, + ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, + regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/, + "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, + // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types + // byte: https://github.com/miguelmota/is-base64 + byte, + // signed 32 bit integer + int32: { type: "number", validate: validateInt32 }, + // signed 64 bit integer + int64: { type: "number", validate: validateInt64 }, + // C-type float + float: { type: "number", validate: validateNumber }, + // C-type double + double: { type: "number", validate: validateNumber }, + // hint to the UI to hide input strings + password: true, + // unchecked string payload + binary: true + }; + exports2.fastFormats = { + ...exports2.fullFormats, + date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate), + time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime), + "date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime), + "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime), + "iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime), + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i + }; + exports2.formatNames = Object.keys(exports2.fullFormats); + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + } + var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; + var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + function date(str) { + const matches = DATE.exec(str); + if (!matches) + return false; + const year = +matches[1]; + const month = +matches[2]; + const day = +matches[3]; + return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]); + } + function compareDate(d1, d2) { + if (!(d1 && d2)) + return void 0; + if (d1 > d2) + return 1; + if (d1 < d2) + return -1; + return 0; + } + var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i; + function getTime(strictTimeZone) { + return function time(str) { + const matches = TIME.exec(str); + if (!matches) + return false; + const hr = +matches[1]; + const min = +matches[2]; + const sec = +matches[3]; + const tz = matches[4]; + const tzSign = matches[5] === "-" ? -1 : 1; + const tzH = +(matches[6] || 0); + const tzM = +(matches[7] || 0); + if (tzH > 23 || tzM > 59 || strictTimeZone && !tz) + return false; + if (hr <= 23 && min <= 59 && sec < 60) + return true; + const utcMin = min - tzM * tzSign; + const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0); + return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61; + }; + } + function compareTime(s1, s2) { + if (!(s1 && s2)) + return void 0; + const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf(); + const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf(); + if (!(t1 && t2)) + return void 0; + return t1 - t2; + } + function compareIsoTime(t1, t2) { + if (!(t1 && t2)) + return void 0; + const a1 = TIME.exec(t1); + const a2 = TIME.exec(t2); + if (!(a1 && a2)) + return void 0; + t1 = a1[1] + a1[2] + a1[3]; + t2 = a2[1] + a2[2] + a2[3]; + if (t1 > t2) + return 1; + if (t1 < t2) + return -1; + return 0; + } + var DATE_TIME_SEPARATOR = /t|\s/i; + function getDateTime(strictTimeZone) { + const time = getTime(strictTimeZone); + return function date_time(str) { + const dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]); + }; + } + function compareDateTime(dt1, dt2) { + if (!(dt1 && dt2)) + return void 0; + const d1 = new Date(dt1).valueOf(); + const d2 = new Date(dt2).valueOf(); + if (!(d1 && d2)) + return void 0; + return d1 - d2; + } + function compareIsoDateTime(dt1, dt2) { + if (!(dt1 && dt2)) + return void 0; + const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR); + const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR); + const res = compareDate(d1, d2); + if (res === void 0) + return void 0; + return res || compareTime(t1, t2); + } + var NOT_URI_FRAGMENT = /\/|:/; + var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?: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URI.test(str); + } + var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm; + function byte(str) { + BYTE.lastIndex = 0; + return BYTE.test(str); + } + var MIN_INT32 = -(2 ** 31); + var MAX_INT32 = 2 ** 31 - 1; + function validateInt32(value) { + return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32; + } + function validateInt64(value) { + return Number.isInteger(value); + } + function validateNumber() { + return true; + } + var Z_ANCHOR = /[^\\]\\Z/; + function regex(str) { + if (Z_ANCHOR.test(str)) + return false; + try { + new RegExp(str); + return true; + } catch (e) { + return false; + } + } + } +}); + +// node_modules/ajv-formats/dist/limit.js +var require_limit = __commonJS({ + "node_modules/ajv-formats/dist/limit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formatLimitDefinition = void 0; + var ajv_1 = require_ajv(); + var codegen_1 = require_codegen(); + var ops = codegen_1.operators; + var KWDs = { + formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } + }; + var error = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + exports2.formatLimitDefinition = { + keyword: Object.keys(KWDs), + type: "string", + schemaType: "string", + $data: true, + error, + code(cxt) { + const { gen, data, schemaCode, keyword, it: it2 } = cxt; + const { opts, self: self2 } = it2; + if (!opts.validateFormats) + return; + const fCxt = new ajv_1.KeywordCxt(it2, self2.RULES.all.format.definition, "format"); + if (fCxt.$data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`); + cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt))); + } + function validateFormat() { + const format = fCxt.schema; + const fmtDef = self2.formats[format]; + if (!fmtDef || fmtDef === true) + return; + if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") { + throw new Error(`"${keyword}": format "${format}" does not define "compare" function`); + } + const fmt = gen.scopeValue("formats", { + key: format, + ref: fmtDef, + code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0 + }); + cxt.fail$data(compareCode(fmt)); + } + function compareCode(fmt) { + return (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`; + } + }, + dependencies: ["format"] + }; + var formatLimitPlugin = (ajv) => { + ajv.addKeyword(exports2.formatLimitDefinition); + return ajv; + }; + exports2.default = formatLimitPlugin; + } +}); + +// node_modules/ajv-formats/dist/index.js +var require_dist2 = __commonJS({ + "node_modules/ajv-formats/dist/index.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var formats_1 = require_formats(); + var limit_1 = require_limit(); + var codegen_1 = require_codegen(); + var fullName = new codegen_1.Name("fullFormats"); + var fastName = new codegen_1.Name("fastFormats"); + var formatsPlugin = (ajv, opts = { keywords: true }) => { + if (Array.isArray(opts)) { + addFormats(ajv, opts, formats_1.fullFormats, fullName); + return ajv; + } + const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName]; + const list = opts.formats || formats_1.formatNames; + addFormats(ajv, list, formats, exportName); + if (opts.keywords) + (0, limit_1.default)(ajv); + return ajv; + }; + formatsPlugin.get = (name, mode = "full") => { + const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats; + const f = formats[name]; + if (!f) + throw new Error(`Unknown format "${name}"`); + return f; + }; + function addFormats(ajv, list, fs7, exportName) { + var _a; + var _b; + (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`; + for (const f of list) + ajv.addFormat(f, fs7[f]); + } + module2.exports = exports2 = formatsPlugin; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = formatsPlugin; + } +}); + +// node_modules/fast-json-stringify/lib/validator.js +var require_validator2 = __commonJS({ + "node_modules/fast-json-stringify/lib/validator.js"(exports2, module2) { + "use strict"; + var Ajv = require_ajv(); + var fastUri = require_fast_uri(); + var ajvFormats = require_dist2(); + var clone = require_rfdc()({ proto: true }); + var Validator = class _Validator { + constructor(ajvOptions) { + this.ajv = new Ajv({ + ...ajvOptions, + strictSchema: false, + validateSchema: false, + allowUnionTypes: true, + uriResolver: fastUri + }); + ajvFormats(this.ajv); + this.ajv.addKeyword({ + keyword: "fjs_type", + type: "object", + errors: false, + validate: (_type, date) => { + return date instanceof Date; + } + }); + this._ajvSchemas = {}; + this._ajvOptions = ajvOptions || {}; + } + addSchema(schema, schemaName) { + let schemaKey = schema.$id || schemaName; + if (schema.$id !== void 0 && schema.$id[0] === "#") { + schemaKey = schemaName + schema.$id; + } + if (this.ajv.refs[schemaKey] === void 0 && this.ajv.schemas[schemaKey] === void 0) { + const ajvSchema = clone(schema); + this.convertSchemaToAjvFormat(ajvSchema); + this.ajv.addSchema(ajvSchema, schemaKey); + this._ajvSchemas[schemaKey] = schema; + } + } + validate(schemaRef, data) { + return this.ajv.validate(schemaRef, data); + } + // Ajv does not support js date format. In order to properly validate objects containing a date, + // it needs to replace all occurrences of the string date format with a custom keyword fjs_type. + // (see https://github.com/fastify/fast-json-stringify/pull/441) + convertSchemaToAjvFormat(schema) { + if (schema === null) return; + if (schema.type === "string") { + schema.fjs_type = "string"; + schema.type = ["string", "object"]; + } else if (Array.isArray(schema.type) && schema.type.includes("string") && !schema.type.includes("object")) { + schema.fjs_type = "string"; + schema.type.push("object"); + } + for (const property in schema) { + if (typeof schema[property] === "object") { + this.convertSchemaToAjvFormat(schema[property]); + } + } + } + getState() { + return { + ajvOptions: this._ajvOptions, + ajvSchemas: this._ajvSchemas + }; + } + static restoreFromState(state) { + const validator = new _Validator(state.ajvOptions); + for (const [id2, ajvSchema] of Object.entries(state.ajvSchemas)) { + validator.ajv.addSchema(ajvSchema, id2); + } + return validator; + } + }; + module2.exports = Validator; + } +}); + +// node_modules/fast-json-stringify/lib/location.js +var require_location = __commonJS({ + "node_modules/fast-json-stringify/lib/location.js"(exports2, module2) { + "use strict"; + var Location = class _Location { + constructor(schema, schemaId, jsonPointer = "#") { + this.schema = schema; + this.schemaId = schemaId; + this.jsonPointer = jsonPointer; + } + getPropertyLocation(propertyName) { + const propertyLocation = new _Location( + this.schema[propertyName], + this.schemaId, + this.jsonPointer + "/" + propertyName + ); + return propertyLocation; + } + getSchemaRef() { + return this.schemaId + this.jsonPointer; + } + }; + module2.exports = Location; + } +}); + +// node_modules/fast-json-stringify/lib/schema-validator.js +var require_schema_validator = __commonJS({ + "node_modules/fast-json-stringify/lib/schema-validator.js"(exports2, module2) { + "use strict"; + module2.exports = validate10; + module2.exports.default = validate10; + var schema11 = { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://json-schema.org/draft-07/schema#", "title": "Core schema meta-schema", "definitions": { "schemaArray": { "type": "array", "minItems": 1, "items": { "$ref": "#" } }, "nonNegativeInteger": { "type": "integer", "minimum": 0 }, "nonNegativeIntegerDefault0": { "allOf": [{ "$ref": "#/definitions/nonNegativeInteger" }, { "default": 0 }] }, "simpleTypes": { "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] }, "stringArray": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "default": [] } }, "type": ["object", "boolean"], "properties": { "$id": { "type": "string", "format": "uri-reference" }, "$schema": { "type": "string", "format": "uri" }, "$ref": { "type": "string", "format": "uri-reference" }, "$comment": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "default": true, "readOnly": { "type": "boolean", "default": false }, "examples": { "type": "array", "items": true }, "multipleOf": { "type": "number", "exclusiveMinimum": 0 }, "maximum": { "type": "number" }, "exclusiveMaximum": { "type": "number" }, "minimum": { "type": "number" }, "exclusiveMinimum": { "type": "number" }, "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "pattern": { "type": "string", "format": "regex" }, "additionalItems": { "$ref": "#" }, "items": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/schemaArray" }], "default": true }, "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "uniqueItems": { "type": "boolean", "default": false }, "contains": { "$ref": "#" }, "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "required": { "$ref": "#/definitions/stringArray" }, "additionalProperties": { "$ref": "#" }, "definitions": { "type": "object", "additionalProperties": { "$ref": "#" }, "default": {} }, "properties": { "type": "object", "additionalProperties": { "$ref": "#" }, "default": {} }, "patternProperties": { "type": "object", "additionalProperties": { "$ref": "#" }, "propertyNames": { "format": "regex" }, "default": {} }, "dependencies": { "type": "object", "additionalProperties": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/stringArray" }] } }, "propertyNames": { "$ref": "#" }, "const": true, "enum": { "type": "array", "items": true, "minItems": 1, "uniqueItems": true }, "type": { "anyOf": [{ "$ref": "#/definitions/simpleTypes" }, { "type": "array", "items": { "$ref": "#/definitions/simpleTypes" }, "minItems": 1, "uniqueItems": true }] }, "format": { "type": "string" }, "contentMediaType": { "type": "string" }, "contentEncoding": { "type": "string" }, "if": { "$ref": "#" }, "then": { "$ref": "#" }, "else": { "$ref": "#" }, "allOf": { "$ref": "#/definitions/schemaArray" }, "anyOf": { "$ref": "#/definitions/schemaArray" }, "oneOf": { "$ref": "#/definitions/schemaArray" }, "not": { "$ref": "#" } }, "default": true }; + var schema20 = { "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] }; + var formats0 = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; + var formats2 = require_formats().fullFormats.uri; + var formats6 = require_formats().fullFormats.regex; + function validate11(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + const _errs1 = errors; + if (!(typeof data == "number" && (!(data % 1) && !isNaN(data)) && isFinite(data))) { + validate11.errors = [{ instancePath, schemaPath: "#/definitions/nonNegativeInteger/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + if (errors === _errs1) { + if (typeof data == "number" && isFinite(data)) { + if (data < 0 || isNaN(data)) { + validate11.errors = [{ instancePath, schemaPath: "#/definitions/nonNegativeInteger/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }]; + return false; + } + } + } + validate11.errors = vErrors; + return errors === 0; + } + var root1 = { validate: validate10 }; + function validate13(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + if (data.length < 1) { + validate13.errors = [{ instancePath, schemaPath: "#/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }]; + return false; + } else { + var valid0 = true; + const len0 = data.length; + for (let i02 = 0; i02 < len0; i02++) { + const _errs1 = errors; + if (!root1.validate(data[i02], { instancePath: instancePath + "/" + i02, parentData: data, parentDataProperty: i02, rootData })) { + vErrors = vErrors === null ? root1.validate.errors : vErrors.concat(root1.validate.errors); + errors = vErrors.length; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } + } else { + validate13.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }]; + return false; + } + } + validate13.errors = vErrors; + return errors === 0; + } + var func0 = require_equal().default; + function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + ; + let vErrors = null; + let errors = 0; + if (!(data && typeof data == "object" && !Array.isArray(data)) && typeof data !== "boolean") { + validate10.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: schema11.type }, message: "must be object,boolean" }]; + return false; + } + if (errors === 0) { + if (data && typeof data == "object" && !Array.isArray(data)) { + if (data.$id !== void 0) { + let data0 = data.$id; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === "string") { + if (!formats0.test(data0)) { + validate10.errors = [{ instancePath: instancePath + "/$id", schemaPath: "#/properties/%24id/format", keyword: "format", params: { format: "uri-reference" }, message: 'must match format "uri-reference"' }]; + return false; + } + } else { + validate10.errors = [{ instancePath: instancePath + "/$id", schemaPath: "#/properties/%24id/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.$schema !== void 0) { + let data1 = data.$schema; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === "string") { + if (!formats2(data1)) { + validate10.errors = [{ instancePath: instancePath + "/$schema", schemaPath: "#/properties/%24schema/format", keyword: "format", params: { format: "uri" }, message: 'must match format "uri"' }]; + return false; + } + } else { + validate10.errors = [{ instancePath: instancePath + "/$schema", schemaPath: "#/properties/%24schema/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.$ref !== void 0) { + let data2 = data.$ref; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === "string") { + if (!formats0.test(data2)) { + validate10.errors = [{ instancePath: instancePath + "/$ref", schemaPath: "#/properties/%24ref/format", keyword: "format", params: { format: "uri-reference" }, message: 'must match format "uri-reference"' }]; + return false; + } + } else { + validate10.errors = [{ instancePath: instancePath + "/$ref", schemaPath: "#/properties/%24ref/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.$comment !== void 0) { + const _errs7 = errors; + if (typeof data.$comment !== "string") { + validate10.errors = [{ instancePath: instancePath + "/$comment", schemaPath: "#/properties/%24comment/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.title !== void 0) { + const _errs9 = errors; + if (typeof data.title !== "string") { + validate10.errors = [{ instancePath: instancePath + "/title", schemaPath: "#/properties/title/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== void 0) { + const _errs11 = errors; + if (typeof data.description !== "string") { + validate10.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.readOnly !== void 0) { + const _errs13 = errors; + if (typeof data.readOnly !== "boolean") { + validate10.errors = [{ instancePath: instancePath + "/readOnly", schemaPath: "#/properties/readOnly/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.examples !== void 0) { + const _errs15 = errors; + if (errors === _errs15) { + if (!Array.isArray(data.examples)) { + validate10.errors = [{ instancePath: instancePath + "/examples", schemaPath: "#/properties/examples/type", keyword: "type", params: { type: "array" }, message: "must be array" }]; + return false; + } + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.multipleOf !== void 0) { + let data8 = data.multipleOf; + const _errs17 = errors; + if (errors === _errs17) { + if (typeof data8 == "number" && isFinite(data8)) { + if (data8 <= 0 || isNaN(data8)) { + validate10.errors = [{ instancePath: instancePath + "/multipleOf", schemaPath: "#/properties/multipleOf/exclusiveMinimum", keyword: "exclusiveMinimum", params: { comparison: ">", limit: 0 }, message: "must be > 0" }]; + return false; + } + } else { + validate10.errors = [{ instancePath: instancePath + "/multipleOf", schemaPath: "#/properties/multipleOf/type", keyword: "type", params: { type: "number" }, message: "must be number" }]; + return false; + } + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.maximum !== void 0) { + let data9 = data.maximum; + const _errs19 = errors; + if (!(typeof data9 == "number" && isFinite(data9))) { + validate10.errors = [{ instancePath: instancePath + "/maximum", schemaPath: "#/properties/maximum/type", keyword: "type", params: { type: "number" }, message: "must be number" }]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.exclusiveMaximum !== void 0) { + let data10 = data.exclusiveMaximum; + const _errs21 = errors; + if (!(typeof data10 == "number" && isFinite(data10))) { + validate10.errors = [{ instancePath: instancePath + "/exclusiveMaximum", schemaPath: "#/properties/exclusiveMaximum/type", keyword: "type", params: { type: "number" }, message: "must be number" }]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.minimum !== void 0) { + let data11 = data.minimum; + const _errs23 = errors; + if (!(typeof data11 == "number" && isFinite(data11))) { + validate10.errors = [{ instancePath: instancePath + "/minimum", schemaPath: "#/properties/minimum/type", keyword: "type", params: { type: "number" }, message: "must be number" }]; + return false; + } + var valid0 = _errs23 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.exclusiveMinimum !== void 0) { + let data12 = data.exclusiveMinimum; + const _errs25 = errors; + if (!(typeof data12 == "number" && isFinite(data12))) { + validate10.errors = [{ instancePath: instancePath + "/exclusiveMinimum", schemaPath: "#/properties/exclusiveMinimum/type", keyword: "type", params: { type: "number" }, message: "must be number" }]; + return false; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.maxLength !== void 0) { + let data13 = data.maxLength; + const _errs27 = errors; + const _errs28 = errors; + if (!(typeof data13 == "number" && (!(data13 % 1) && !isNaN(data13)) && isFinite(data13))) { + validate10.errors = [{ instancePath: instancePath + "/maxLength", schemaPath: "#/definitions/nonNegativeInteger/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + if (errors === _errs28) { + if (typeof data13 == "number" && isFinite(data13)) { + if (data13 < 0 || isNaN(data13)) { + validate10.errors = [{ instancePath: instancePath + "/maxLength", schemaPath: "#/definitions/nonNegativeInteger/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }]; + return false; + } + } + } + var valid0 = _errs27 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.minLength !== void 0) { + const _errs30 = errors; + if (!validate11(data.minLength, { instancePath: instancePath + "/minLength", parentData: data, parentDataProperty: "minLength", rootData })) { + vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors); + errors = vErrors.length; + } + var valid0 = _errs30 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.pattern !== void 0) { + let data15 = data.pattern; + const _errs31 = errors; + if (errors === _errs31) { + if (errors === _errs31) { + if (typeof data15 === "string") { + if (!formats6(data15)) { + validate10.errors = [{ instancePath: instancePath + "/pattern", schemaPath: "#/properties/pattern/format", keyword: "format", params: { format: "regex" }, message: 'must match format "regex"' }]; + return false; + } + } else { + validate10.errors = [{ instancePath: instancePath + "/pattern", schemaPath: "#/properties/pattern/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + } + var valid0 = _errs31 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.additionalItems !== void 0) { + const _errs33 = errors; + if (!validate10(data.additionalItems, { instancePath: instancePath + "/additionalItems", parentData: data, parentDataProperty: "additionalItems", rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid0 = _errs33 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.items !== void 0) { + let data17 = data.items; + const _errs34 = errors; + const _errs35 = errors; + let valid2 = false; + const _errs36 = errors; + if (!validate10(data17, { instancePath: instancePath + "/items", parentData: data, parentDataProperty: "items", rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var _valid0 = _errs36 === errors; + valid2 = valid2 || _valid0; + if (!valid2) { + const _errs37 = errors; + if (!validate13(data17, { instancePath: instancePath + "/items", parentData: data, parentDataProperty: "items", rootData })) { + vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors); + errors = vErrors.length; + } + var _valid0 = _errs37 === errors; + valid2 = valid2 || _valid0; + } + if (!valid2) { + const err0 = { instancePath: instancePath + "/items", schemaPath: "#/properties/items/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + validate10.errors = vErrors; + return false; + } else { + errors = _errs35; + if (vErrors !== null) { + if (_errs35) { + vErrors.length = _errs35; + } else { + vErrors = null; + } + } + } + var valid0 = _errs34 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.maxItems !== void 0) { + let data18 = data.maxItems; + const _errs38 = errors; + const _errs39 = errors; + if (!(typeof data18 == "number" && (!(data18 % 1) && !isNaN(data18)) && isFinite(data18))) { + validate10.errors = [{ instancePath: instancePath + "/maxItems", schemaPath: "#/definitions/nonNegativeInteger/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + if (errors === _errs39) { + if (typeof data18 == "number" && isFinite(data18)) { + if (data18 < 0 || isNaN(data18)) { + validate10.errors = [{ instancePath: instancePath + "/maxItems", schemaPath: "#/definitions/nonNegativeInteger/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }]; + return false; + } + } + } + var valid0 = _errs38 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.minItems !== void 0) { + const _errs41 = errors; + if (!validate11(data.minItems, { instancePath: instancePath + "/minItems", parentData: data, parentDataProperty: "minItems", rootData })) { + vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors); + errors = vErrors.length; + } + var valid0 = _errs41 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.uniqueItems !== void 0) { + const _errs42 = errors; + if (typeof data.uniqueItems !== "boolean") { + validate10.errors = [{ instancePath: instancePath + "/uniqueItems", schemaPath: "#/properties/uniqueItems/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + var valid0 = _errs42 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.contains !== void 0) { + const _errs44 = errors; + if (!validate10(data.contains, { instancePath: instancePath + "/contains", parentData: data, parentDataProperty: "contains", rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid0 = _errs44 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.maxProperties !== void 0) { + let data22 = data.maxProperties; + const _errs45 = errors; + const _errs46 = errors; + if (!(typeof data22 == "number" && (!(data22 % 1) && !isNaN(data22)) && isFinite(data22))) { + validate10.errors = [{ instancePath: instancePath + "/maxProperties", schemaPath: "#/definitions/nonNegativeInteger/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + if (errors === _errs46) { + if (typeof data22 == "number" && isFinite(data22)) { + if (data22 < 0 || isNaN(data22)) { + validate10.errors = [{ instancePath: instancePath + "/maxProperties", schemaPath: "#/definitions/nonNegativeInteger/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }]; + return false; + } + } + } + var valid0 = _errs45 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.minProperties !== void 0) { + const _errs48 = errors; + if (!validate11(data.minProperties, { instancePath: instancePath + "/minProperties", parentData: data, parentDataProperty: "minProperties", rootData })) { + vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors); + errors = vErrors.length; + } + var valid0 = _errs48 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.required !== void 0) { + let data24 = data.required; + const _errs49 = errors; + const _errs50 = errors; + if (errors === _errs50) { + if (Array.isArray(data24)) { + var valid6 = true; + const len0 = data24.length; + for (let i02 = 0; i02 < len0; i02++) { + const _errs52 = errors; + if (typeof data24[i02] !== "string") { + validate10.errors = [{ instancePath: instancePath + "/required/" + i02, schemaPath: "#/definitions/stringArray/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + var valid6 = _errs52 === errors; + if (!valid6) { + break; + } + } + if (valid6) { + let i1 = data24.length; + let j0; + if (i1 > 1) { + const indices0 = {}; + for (; i1--; ) { + let item0 = data24[i1]; + if (typeof item0 !== "string") { + continue; + } + if (typeof indices0[item0] == "number") { + j0 = indices0[item0]; + validate10.errors = [{ instancePath: instancePath + "/required", schemaPath: "#/definitions/stringArray/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" }]; + return false; + break; + } + indices0[item0] = i1; + } + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/required", schemaPath: "#/definitions/stringArray/type", keyword: "type", params: { type: "array" }, message: "must be array" }]; + return false; + } + } + var valid0 = _errs49 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.additionalProperties !== void 0) { + const _errs54 = errors; + if (!validate10(data.additionalProperties, { instancePath: instancePath + "/additionalProperties", parentData: data, parentDataProperty: "additionalProperties", rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid0 = _errs54 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.definitions !== void 0) { + let data27 = data.definitions; + const _errs55 = errors; + if (errors === _errs55) { + if (data27 && typeof data27 == "object" && !Array.isArray(data27)) { + for (const key0 in data27) { + const _errs58 = errors; + if (!validate10(data27[key0], { instancePath: instancePath + "/definitions/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data27, parentDataProperty: key0, rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid8 = _errs58 === errors; + if (!valid8) { + break; + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/definitions", schemaPath: "#/properties/definitions/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid0 = _errs55 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.properties !== void 0) { + let data29 = data.properties; + const _errs59 = errors; + if (errors === _errs59) { + if (data29 && typeof data29 == "object" && !Array.isArray(data29)) { + for (const key1 in data29) { + const _errs62 = errors; + if (!validate10(data29[key1], { instancePath: instancePath + "/properties/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data29, parentDataProperty: key1, rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid9 = _errs62 === errors; + if (!valid9) { + break; + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/properties", schemaPath: "#/properties/properties/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid0 = _errs59 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.patternProperties !== void 0) { + let data31 = data.patternProperties; + const _errs63 = errors; + if (errors === _errs63) { + if (data31 && typeof data31 == "object" && !Array.isArray(data31)) { + for (const key2 in data31) { + const _errs65 = errors; + if (errors === _errs65) { + if (typeof key2 === "string") { + if (!formats6(key2)) { + const err1 = { instancePath: instancePath + "/patternProperties", schemaPath: "#/properties/patternProperties/propertyNames/format", keyword: "format", params: { format: "regex" }, message: 'must match format "regex"', propertyName: key2 }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } + var valid10 = _errs65 === errors; + if (!valid10) { + const err2 = { instancePath: instancePath + "/patternProperties", schemaPath: "#/properties/patternProperties/propertyNames", keyword: "propertyNames", params: { propertyName: key2 }, message: "property name must be valid" }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + validate10.errors = vErrors; + return false; + break; + } + } + if (valid10) { + for (const key3 in data31) { + const _errs67 = errors; + if (!validate10(data31[key3], { instancePath: instancePath + "/patternProperties/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data31, parentDataProperty: key3, rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid11 = _errs67 === errors; + if (!valid11) { + break; + } + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/patternProperties", schemaPath: "#/properties/patternProperties/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid0 = _errs63 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.dependencies !== void 0) { + let data33 = data.dependencies; + const _errs68 = errors; + if (errors === _errs68) { + if (data33 && typeof data33 == "object" && !Array.isArray(data33)) { + for (const key4 in data33) { + let data34 = data33[key4]; + const _errs71 = errors; + const _errs72 = errors; + let valid13 = false; + const _errs73 = errors; + if (!validate10(data34, { instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data33, parentDataProperty: key4, rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var _valid1 = _errs73 === errors; + valid13 = valid13 || _valid1; + if (!valid13) { + const _errs74 = errors; + const _errs75 = errors; + if (errors === _errs75) { + if (Array.isArray(data34)) { + var valid15 = true; + const len1 = data34.length; + for (let i2 = 0; i2 < len1; i2++) { + const _errs77 = errors; + if (typeof data34[i2] !== "string") { + const err3 = { instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i2, schemaPath: "#/definitions/stringArray/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid15 = _errs77 === errors; + if (!valid15) { + break; + } + } + if (valid15) { + let i3 = data34.length; + let j1; + if (i3 > 1) { + const indices1 = {}; + for (; i3--; ) { + let item1 = data34[i3]; + if (typeof item1 !== "string") { + continue; + } + if (typeof indices1[item1] == "number") { + j1 = indices1[item1]; + const err4 = { instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/stringArray/uniqueItems", keyword: "uniqueItems", params: { i: i3, j: j1 }, message: "must NOT have duplicate items (items ## " + j1 + " and " + i3 + " are identical)" }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + break; + } + indices1[item1] = i3; + } + } + } + } else { + const err5 = { instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/stringArray/type", keyword: "type", params: { type: "array" }, message: "must be array" }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + var _valid1 = _errs74 === errors; + valid13 = valid13 || _valid1; + } + if (!valid13) { + const err6 = { instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/dependencies/additionalProperties/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + validate10.errors = vErrors; + return false; + } else { + errors = _errs72; + if (vErrors !== null) { + if (_errs72) { + vErrors.length = _errs72; + } else { + vErrors = null; + } + } + } + var valid12 = _errs71 === errors; + if (!valid12) { + break; + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/dependencies", schemaPath: "#/properties/dependencies/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid0 = _errs68 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.propertyNames !== void 0) { + const _errs79 = errors; + if (!validate10(data.propertyNames, { instancePath: instancePath + "/propertyNames", parentData: data, parentDataProperty: "propertyNames", rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid0 = _errs79 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.enum !== void 0) { + let data37 = data.enum; + const _errs80 = errors; + if (errors === _errs80) { + if (Array.isArray(data37)) { + if (data37.length < 1) { + validate10.errors = [{ instancePath: instancePath + "/enum", schemaPath: "#/properties/enum/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }]; + return false; + } else { + let i4 = data37.length; + let j2; + if (i4 > 1) { + outer0: + for (; i4--; ) { + for (j2 = i4; j2--; ) { + if (func0(data37[i4], data37[j2])) { + validate10.errors = [{ instancePath: instancePath + "/enum", schemaPath: "#/properties/enum/uniqueItems", keyword: "uniqueItems", params: { i: i4, j: j2 }, message: "must NOT have duplicate items (items ## " + j2 + " and " + i4 + " are identical)" }]; + return false; + break outer0; + } + } + } + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/enum", schemaPath: "#/properties/enum/type", keyword: "type", params: { type: "array" }, message: "must be array" }]; + return false; + } + } + var valid0 = _errs80 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== void 0) { + let data38 = data.type; + const _errs82 = errors; + const _errs83 = errors; + let valid18 = false; + const _errs84 = errors; + if (!(data38 === "array" || data38 === "boolean" || data38 === "integer" || data38 === "null" || data38 === "number" || data38 === "object" || data38 === "string")) { + const err7 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/simpleTypes/enum", keyword: "enum", params: { allowedValues: schema20.enum }, message: "must be equal to one of the allowed values" }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var _valid2 = _errs84 === errors; + valid18 = valid18 || _valid2; + if (!valid18) { + const _errs86 = errors; + if (errors === _errs86) { + if (Array.isArray(data38)) { + if (data38.length < 1) { + const err8 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/anyOf/1/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + var valid20 = true; + const len2 = data38.length; + for (let i5 = 0; i5 < len2; i5++) { + let data39 = data38[i5]; + const _errs88 = errors; + if (!(data39 === "array" || data39 === "boolean" || data39 === "integer" || data39 === "null" || data39 === "number" || data39 === "object" || data39 === "string")) { + const err9 = { instancePath: instancePath + "/type/" + i5, schemaPath: "#/definitions/simpleTypes/enum", keyword: "enum", params: { allowedValues: schema20.enum }, message: "must be equal to one of the allowed values" }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + var valid20 = _errs88 === errors; + if (!valid20) { + break; + } + } + if (valid20) { + let i6 = data38.length; + let j3; + if (i6 > 1) { + outer1: + for (; i6--; ) { + for (j3 = i6; j3--; ) { + if (func0(data38[i6], data38[j3])) { + const err10 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/anyOf/1/uniqueItems", keyword: "uniqueItems", params: { i: i6, j: j3 }, message: "must NOT have duplicate items (items ## " + j3 + " and " + i6 + " are identical)" }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + break outer1; + } + } + } + } + } + } + } else { + const err11 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var _valid2 = _errs86 === errors; + valid18 = valid18 || _valid2; + } + if (!valid18) { + const err12 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + validate10.errors = vErrors; + return false; + } else { + errors = _errs83; + if (vErrors !== null) { + if (_errs83) { + vErrors.length = _errs83; + } else { + vErrors = null; + } + } + } + var valid0 = _errs82 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.format !== void 0) { + const _errs90 = errors; + if (typeof data.format !== "string") { + validate10.errors = [{ instancePath: instancePath + "/format", schemaPath: "#/properties/format/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + var valid0 = _errs90 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.contentMediaType !== void 0) { + const _errs92 = errors; + if (typeof data.contentMediaType !== "string") { + validate10.errors = [{ instancePath: instancePath + "/contentMediaType", schemaPath: "#/properties/contentMediaType/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + var valid0 = _errs92 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.contentEncoding !== void 0) { + const _errs94 = errors; + if (typeof data.contentEncoding !== "string") { + validate10.errors = [{ instancePath: instancePath + "/contentEncoding", schemaPath: "#/properties/contentEncoding/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + var valid0 = _errs94 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.if !== void 0) { + const _errs96 = errors; + if (!validate10(data.if, { instancePath: instancePath + "/if", parentData: data, parentDataProperty: "if", rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid0 = _errs96 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.then !== void 0) { + const _errs97 = errors; + if (!validate10(data.then, { instancePath: instancePath + "/then", parentData: data, parentDataProperty: "then", rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid0 = _errs97 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.else !== void 0) { + const _errs98 = errors; + if (!validate10(data.else, { instancePath: instancePath + "/else", parentData: data, parentDataProperty: "else", rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid0 = _errs98 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.allOf !== void 0) { + const _errs99 = errors; + if (!validate13(data.allOf, { instancePath: instancePath + "/allOf", parentData: data, parentDataProperty: "allOf", rootData })) { + vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors); + errors = vErrors.length; + } + var valid0 = _errs99 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.anyOf !== void 0) { + const _errs100 = errors; + if (!validate13(data.anyOf, { instancePath: instancePath + "/anyOf", parentData: data, parentDataProperty: "anyOf", rootData })) { + vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors); + errors = vErrors.length; + } + var valid0 = _errs100 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.oneOf !== void 0) { + const _errs101 = errors; + if (!validate13(data.oneOf, { instancePath: instancePath + "/oneOf", parentData: data, parentDataProperty: "oneOf", rootData })) { + vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors); + errors = vErrors.length; + } + var valid0 = _errs101 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.not !== void 0) { + const _errs102 = errors; + if (!validate10(data.not, { instancePath: instancePath + "/not", parentData: data, parentDataProperty: "not", rootData })) { + vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors); + errors = vErrors.length; + } + var valid0 = _errs102 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + validate10.errors = vErrors; + return errors === 0; + } + } +}); + +// node_modules/@fastify/merge-json-schemas/lib/errors.js +var require_errors4 = __commonJS({ + "node_modules/@fastify/merge-json-schemas/lib/errors.js"(exports2, module2) { + "use strict"; + var MergeError = class extends Error { + constructor(keyword, schemas) { + super(); + this.name = "JsonSchemaMergeError"; + this.code = "JSON_SCHEMA_MERGE_ERROR"; + this.message = `Failed to merge "${keyword}" keyword schemas.`; + this.schemas = schemas; + } + }; + var ResolverNotFoundError = class extends Error { + constructor(keyword, schemas) { + super(); + this.name = "JsonSchemaMergeError"; + this.code = "JSON_SCHEMA_MERGE_ERROR"; + this.message = `Resolver for "${keyword}" keyword not found.`; + this.schemas = schemas; + } + }; + var InvalidOnConflictOptionError = class extends Error { + constructor(onConflict) { + super(); + this.name = "JsonSchemaMergeError"; + this.code = "JSON_SCHEMA_MERGE_ERROR"; + this.message = `Invalid "onConflict" option: "${onConflict}".`; + } + }; + module2.exports = { + MergeError, + ResolverNotFoundError, + InvalidOnConflictOptionError + }; + } +}); + +// node_modules/@fastify/merge-json-schemas/lib/resolvers.js +var require_resolvers = __commonJS({ + "node_modules/@fastify/merge-json-schemas/lib/resolvers.js"(exports2, module2) { + "use strict"; + var { dequal: deepEqual } = require_dist(); + var { MergeError } = require_errors4(); + function _arraysIntersection(arrays) { + let intersection = arrays[0]; + for (let i = 1; i < arrays.length; i++) { + intersection = intersection.filter( + (value) => arrays[i].includes(value) + ); + } + return intersection; + } + function arraysIntersection(keyword, values, mergedSchema) { + const intersection = _arraysIntersection(values); + if (intersection.length === 0) { + throw new MergeError(keyword, values); + } + mergedSchema[keyword] = intersection; + } + function hybridArraysIntersection(keyword, values, mergedSchema) { + for (let i = 0; i < values.length; i++) { + if (!Array.isArray(values[i])) { + values[i] = [values[i]]; + } + } + const intersection = _arraysIntersection(values); + if (intersection.length === 0) { + throw new MergeError(keyword, values); + } + if (intersection.length === 1) { + mergedSchema[keyword] = intersection[0]; + } else { + mergedSchema[keyword] = intersection; + } + } + function arraysUnion(keyword, values, mergedSchema) { + const union = []; + for (const array of values) { + for (const value of array) { + if (!union.includes(value)) { + union.push(value); + } + } + } + mergedSchema[keyword] = union; + } + function minNumber(keyword, values, mergedSchema) { + mergedSchema[keyword] = Math.min(...values); + } + function maxNumber(keyword, values, mergedSchema) { + mergedSchema[keyword] = Math.max(...values); + } + function commonMultiple(keyword, values, mergedSchema) { + const gcd = (a, b) => !b ? a : gcd(b, a % b); + const lcm = (a, b) => a * b / gcd(a, b); + let scale = 1; + for (const value of values) { + while (value * scale % 1 !== 0) { + scale *= 10; + } + } + let multiple = values[0] * scale; + for (const value of values) { + multiple = lcm(multiple, value * scale); + } + mergedSchema[keyword] = multiple / scale; + } + function allEqual(keyword, values, mergedSchema) { + const firstValue = values[0]; + for (let i = 1; i < values.length; i++) { + if (!deepEqual(values[i], firstValue)) { + throw new MergeError(keyword, values); + } + } + mergedSchema[keyword] = firstValue; + } + function skip() { + } + function booleanAnd(keyword, values, mergedSchema) { + for (const value of values) { + if (value === false) { + mergedSchema[keyword] = false; + return; + } + } + mergedSchema[keyword] = true; + } + function booleanOr(keyword, values, mergedSchema) { + for (const value of values) { + if (value === true) { + mergedSchema[keyword] = true; + return; + } + } + mergedSchema[keyword] = false; + } + module2.exports = { + arraysIntersection, + hybridArraysIntersection, + arraysUnion, + minNumber, + maxNumber, + commonMultiple, + allEqual, + booleanAnd, + booleanOr, + skip + }; + } +}); + +// node_modules/@fastify/merge-json-schemas/index.js +var require_merge_json_schemas = __commonJS({ + "node_modules/@fastify/merge-json-schemas/index.js"(exports2, module2) { + "use strict"; + var { dequal: deepEqual } = require_dist(); + var resolvers = require_resolvers(); + var errors = require_errors4(); + var keywordsResolvers = { + $id: resolvers.skip, + type: resolvers.hybridArraysIntersection, + enum: resolvers.arraysIntersection, + minLength: resolvers.maxNumber, + maxLength: resolvers.minNumber, + minimum: resolvers.maxNumber, + maximum: resolvers.minNumber, + multipleOf: resolvers.commonMultiple, + exclusiveMinimum: resolvers.maxNumber, + exclusiveMaximum: resolvers.minNumber, + minItems: resolvers.maxNumber, + maxItems: resolvers.minNumber, + maxProperties: resolvers.minNumber, + minProperties: resolvers.maxNumber, + const: resolvers.allEqual, + default: resolvers.allEqual, + format: resolvers.allEqual, + required: resolvers.arraysUnion, + properties: mergeProperties, + patternProperties: mergeObjects, + additionalProperties: mergeSchemasResolver, + items: mergeItems, + additionalItems: mergeAdditionalItems, + definitions: mergeObjects, + $defs: mergeObjects, + nullable: resolvers.booleanAnd, + oneOf: mergeOneOf, + anyOf: mergeOneOf, + allOf: resolvers.arraysUnion, + not: mergeSchemasResolver, + if: mergeIfThenElseSchemas, + then: resolvers.skip, + else: resolvers.skip, + dependencies: mergeDependencies, + dependentRequired: mergeDependencies, + dependentSchemas: mergeObjects, + propertyNames: mergeSchemasResolver, + uniqueItems: resolvers.booleanOr, + contains: mergeSchemasResolver + }; + function mergeSchemasResolver(keyword, values, mergedSchema, _schemas, options) { + mergedSchema[keyword] = _mergeSchemas(values, options); + } + function cartesianProduct(arrays) { + let result = [[]]; + for (const array of arrays) { + const temp = []; + for (const x of result) { + for (const y of array) { + temp.push([...x, y]); + } + } + result = temp; + } + return result; + } + function mergeOneOf(keyword, values, mergedSchema, _schemas, options) { + if (values.length === 1) { + mergedSchema[keyword] = values[0]; + return; + } + const product = cartesianProduct(values); + const mergedOneOf = []; + for (const combination of product) { + try { + const mergedSchema2 = _mergeSchemas(combination, options); + if (mergedSchema2 !== void 0) { + mergedOneOf.push(mergedSchema2); + } + } catch (error) { + if (error instanceof errors.MergeError) continue; + throw error; + } + } + mergedSchema[keyword] = mergedOneOf; + } + function getSchemaForItem(schema, index) { + const { items, additionalItems } = schema; + if (Array.isArray(items)) { + if (index < items.length) { + return items[index]; + } + return additionalItems; + } + if (items !== void 0) { + return items; + } + return additionalItems; + } + function mergeItems(keyword, values, mergedSchema, schemas, options) { + let maxArrayItemsLength = 0; + for (const itemsSchema of values) { + if (Array.isArray(itemsSchema)) { + maxArrayItemsLength = Math.max(maxArrayItemsLength, itemsSchema.length); + } + } + if (maxArrayItemsLength === 0) { + mergedSchema[keyword] = _mergeSchemas(values, options); + return; + } + const mergedItemsSchemas = []; + for (let i = 0; i < maxArrayItemsLength; i++) { + const indexItemSchemas = []; + for (const schema of schemas) { + const itemSchema = getSchemaForItem(schema, i); + if (itemSchema !== void 0) { + indexItemSchemas.push(itemSchema); + } + } + mergedItemsSchemas[i] = _mergeSchemas(indexItemSchemas, options); + } + mergedSchema[keyword] = mergedItemsSchemas; + } + function mergeAdditionalItems(keyword, values, mergedSchema, schemas, options) { + let hasArrayItems = false; + for (const schema of schemas) { + if (Array.isArray(schema.items)) { + hasArrayItems = true; + break; + } + } + if (!hasArrayItems) { + mergedSchema[keyword] = _mergeSchemas(values, options); + return; + } + const mergedAdditionalItemsSchemas = []; + for (const schema of schemas) { + let additionalItemsSchema = schema.additionalItems; + if (additionalItemsSchema === void 0 && !Array.isArray(schema.items)) { + additionalItemsSchema = schema.items; + } + if (additionalItemsSchema !== void 0) { + mergedAdditionalItemsSchemas.push(additionalItemsSchema); + } + } + mergedSchema[keyword] = _mergeSchemas(mergedAdditionalItemsSchemas, options); + } + function getSchemaForProperty(schema, propertyName) { + const { properties, patternProperties, additionalProperties } = schema; + if (properties?.[propertyName] !== void 0) { + return properties[propertyName]; + } + for (const pattern of Object.keys(patternProperties ?? {})) { + const regexp = new RegExp(pattern); + if (regexp.test(propertyName)) { + return patternProperties[pattern]; + } + } + return additionalProperties; + } + function mergeProperties(keyword, _values, mergedSchema, schemas, options) { + const foundProperties = {}; + for (const currentSchema of schemas) { + const properties = currentSchema.properties ?? {}; + for (const propertyName of Object.keys(properties)) { + if (foundProperties[propertyName] !== void 0) continue; + const propertySchema = properties[propertyName]; + foundProperties[propertyName] = [propertySchema]; + for (const anotherSchema of schemas) { + if (currentSchema === anotherSchema) continue; + const propertySchema2 = getSchemaForProperty(anotherSchema, propertyName); + if (propertySchema2 !== void 0) { + foundProperties[propertyName].push(propertySchema2); + } + } + } + } + const mergedProperties = {}; + for (const property of Object.keys(foundProperties)) { + const propertySchemas = foundProperties[property]; + mergedProperties[property] = _mergeSchemas(propertySchemas, options); + } + mergedSchema[keyword] = mergedProperties; + } + function mergeObjects(keyword, values, mergedSchema, _schemas, options) { + const objectsProperties = {}; + for (const properties of values) { + for (const propertyName of Object.keys(properties)) { + if (objectsProperties[propertyName] === void 0) { + objectsProperties[propertyName] = []; + } + objectsProperties[propertyName].push(properties[propertyName]); + } + } + const mergedProperties = {}; + for (const propertyName of Object.keys(objectsProperties)) { + const propertySchemas = objectsProperties[propertyName]; + const mergedPropertySchema = _mergeSchemas(propertySchemas, options); + mergedProperties[propertyName] = mergedPropertySchema; + } + mergedSchema[keyword] = mergedProperties; + } + function mergeIfThenElseSchemas(_keyword, _values, mergedSchema, schemas, options) { + for (let i = 0; i < schemas.length; i++) { + const subSchema = { + if: schemas[i].if, + then: schemas[i].then, + else: schemas[i].else + }; + if (subSchema.if === void 0) continue; + if (mergedSchema.if === void 0) { + mergedSchema.if = subSchema.if; + if (subSchema.then !== void 0) { + mergedSchema.then = subSchema.then; + } + if (subSchema.else !== void 0) { + mergedSchema.else = subSchema.else; + } + continue; + } + if (mergedSchema.then !== void 0) { + mergedSchema.then = _mergeSchemas([mergedSchema.then, subSchema], options); + } + if (mergedSchema.else !== void 0) { + mergedSchema.else = _mergeSchemas([mergedSchema.else, subSchema], options); + } + } + } + function mergeDependencies(keyword, values, mergedSchema) { + const mergedDependencies = {}; + for (const dependencies of values) { + for (const propertyName of Object.keys(dependencies)) { + if (mergedDependencies[propertyName] === void 0) { + mergedDependencies[propertyName] = []; + } + const mergedPropertyDependencies = mergedDependencies[propertyName]; + for (const propertyDependency of dependencies[propertyName]) { + if (!mergedPropertyDependencies.includes(propertyDependency)) { + mergedPropertyDependencies.push(propertyDependency); + } + } + } + } + mergedSchema[keyword] = mergedDependencies; + } + function _mergeSchemas(schemas, options) { + if (schemas.length === 0) return {}; + if (schemas.length === 1) return schemas[0]; + const mergedSchema = {}; + const keywords = {}; + let allSchemasAreTrue = true; + for (const schema of schemas) { + if (schema === false) return false; + if (schema === true) continue; + allSchemasAreTrue = false; + for (const keyword of Object.keys(schema)) { + if (keywords[keyword] === void 0) { + keywords[keyword] = []; + } + keywords[keyword].push(schema[keyword]); + } + } + if (allSchemasAreTrue) return true; + for (const keyword of Object.keys(keywords)) { + const keywordValues = keywords[keyword]; + const resolver = options.resolvers[keyword] ?? options.defaultResolver; + resolver(keyword, keywordValues, mergedSchema, schemas, options); + } + return mergedSchema; + } + function defaultResolver(keyword, values, mergedSchema, _schemas, options) { + const onConflict = options.onConflict ?? "throw"; + if (values.length === 1 || onConflict === "first") { + mergedSchema[keyword] = values[0]; + return; + } + let allValuesEqual = true; + for (let i = 1; i < values.length; i++) { + if (!deepEqual(values[i], values[0])) { + allValuesEqual = false; + break; + } + } + if (allValuesEqual) { + mergedSchema[keyword] = values[0]; + return; + } + if (onConflict === "throw") { + throw new errors.ResolverNotFoundError(keyword, values); + } + if (onConflict === "skip") { + return; + } + throw new errors.InvalidOnConflictOptionError(onConflict); + } + function mergeSchemas(schemas, options = {}) { + if (options.defaultResolver === void 0) { + options.defaultResolver = defaultResolver; + } + options.resolvers = { ...keywordsResolvers, ...options.resolvers }; + const mergedSchema = _mergeSchemas(schemas, options); + return mergedSchema; + } + module2.exports = { mergeSchemas, keywordsResolvers, defaultResolver, ...errors }; + } +}); + +// node_modules/fast-json-stringify/lib/merge-schemas.js +var require_merge_schemas = __commonJS({ + "node_modules/fast-json-stringify/lib/merge-schemas.js"(exports2, module2) { + "use strict"; + var { mergeSchemas: _mergeSchemas } = require_merge_json_schemas(); + function mergeSchemas(schemas) { + return _mergeSchemas(schemas, { onConflict: "skip" }); + } + module2.exports = mergeSchemas; + } +}); + +// node_modules/fast-json-stringify/lib/standalone.js +var require_standalone = __commonJS({ + "node_modules/fast-json-stringify/lib/standalone.js"(exports2, module2) { + "use strict"; + function buildStandaloneCode(contextFunc, context, serializer, validator) { + let ajvDependencyCode = ""; + if (context.validatorSchemasIds.size > 0) { + ajvDependencyCode += "const Validator = require('fast-json-stringify/lib/validator')\n"; + ajvDependencyCode += `const validatorState = ${JSON.stringify(validator.getState())} +`; + ajvDependencyCode += "const validator = Validator.restoreFromState(validatorState)\n"; + } else { + ajvDependencyCode += "const validator = null\n"; + } + const { schema, ...serializerState } = serializer.getState(); + return ` + 'use strict' + + const Serializer = require('fast-json-stringify/lib/serializer') + const serializerState = ${JSON.stringify(serializerState)} + const serializer = Serializer.restoreFromState(serializerState) + + ${ajvDependencyCode} + + module.exports = ${contextFunc.toString()}(validator, serializer)`; + } + module2.exports = buildStandaloneCode; + module2.exports.dependencies = { + Serializer: require_serializer(), + Validator: require_validator2() + }; + } +}); + +// node_modules/fast-json-stringify/index.js +var require_fast_json_stringify = __commonJS({ + "node_modules/fast-json-stringify/index.js"(exports2, module2) { + "use strict"; + var { RefResolver } = require_json_schema_ref_resolver(); + var Serializer = require_serializer(); + var Validator = require_validator2(); + var Location = require_location(); + var validate = require_schema_validator(); + var mergeSchemas = require_merge_schemas(); + var SINGLE_TICK = /'/g; + var largeArraySize = 2e4; + var largeArrayMechanism = "default"; + var validRoundingMethods = [ + "floor", + "ceil", + "round", + "trunc" + ]; + var validLargeArrayMechanisms = [ + "default", + "json-stringify" + ]; + var schemaIdCounter = 0; + function isValidSchema(schema, name) { + if (!validate(schema)) { + if (name) { + name = `"${name}" `; + } else { + name = ""; + } + const first = validate.errors[0]; + const err = new Error(`${name}schema is invalid: data${first.instancePath} ${first.message}`); + err.errors = isValidSchema.errors; + throw err; + } + } + function resolveRef(context, location) { + const ref = location.schema.$ref; + let hashIndex = ref.indexOf("#"); + if (hashIndex === -1) { + hashIndex = ref.length; + } + const schemaId = ref.slice(0, hashIndex) || location.schemaId; + const jsonPointer = ref.slice(hashIndex) || "#"; + const schema = context.refResolver.getSchema(schemaId, jsonPointer); + if (schema === null) { + throw new Error(`Cannot find reference "${ref}"`); + } + const newLocation = new Location(schema, schemaId, jsonPointer); + if (schema.$ref !== void 0) { + return resolveRef(context, newLocation); + } + return newLocation; + } + function getMergedLocation(context, mergedSchemaId) { + const mergedSchema = context.refResolver.getSchema(mergedSchemaId, "#"); + return new Location(mergedSchema, mergedSchemaId, "#"); + } + function getSchemaId(schema, rootSchemaId) { + if (schema.$id && schema.$id.charAt(0) !== "#") { + return schema.$id; + } + return rootSchemaId; + } + function build(schema, options) { + isValidSchema(schema); + options = options || {}; + const context = { + functions: [], + functionsCounter: 0, + functionsNamesBySchema: /* @__PURE__ */ new Map(), + options, + refResolver: new RefResolver(), + rootSchemaId: schema.$id || `__fjs_root_${schemaIdCounter++}`, + validatorSchemasIds: /* @__PURE__ */ new Set(), + mergedSchemasIds: /* @__PURE__ */ new Map() + }; + const schemaId = getSchemaId(schema, context.rootSchemaId); + if (!context.refResolver.hasSchema(schemaId)) { + context.refResolver.addSchema(schema, context.rootSchemaId); + } + if (options.schema) { + for (const key in options.schema) { + const schema2 = options.schema[key]; + const schemaId2 = getSchemaId(schema2, key); + if (!context.refResolver.hasSchema(schemaId2)) { + isValidSchema(schema2, key); + context.refResolver.addSchema(schema2, key); + } + } + } + if (options.rounding) { + if (!validRoundingMethods.includes(options.rounding)) { + throw new Error(`Unsupported integer rounding method ${options.rounding}`); + } + } + if (options.largeArrayMechanism) { + if (validLargeArrayMechanisms.includes(options.largeArrayMechanism)) { + largeArrayMechanism = options.largeArrayMechanism; + } else { + throw new Error(`Unsupported large array mechanism ${options.largeArrayMechanism}`); + } + } + if (options.largeArraySize) { + if (typeof options.largeArraySize === "string" && Number.isFinite(Number.parseInt(options.largeArraySize, 10))) { + largeArraySize = Number.parseInt(options.largeArraySize, 10); + } else if (typeof options.largeArraySize === "number" && Number.isInteger(options.largeArraySize)) { + largeArraySize = options.largeArraySize; + } else if (typeof options.largeArraySize === "bigint") { + largeArraySize = Number(options.largeArraySize); + } else { + throw new Error(`Unsupported large array size. Expected integer-like, got ${typeof options.largeArraySize} with value ${options.largeArraySize}`); + } + } + const location = new Location(schema, context.rootSchemaId); + const code = buildValue(context, location, "input"); + let contextFunctionCode = ` + const JSON_STR_BEGIN_OBJECT = '{' + const JSON_STR_END_OBJECT = '}' + const JSON_STR_BEGIN_ARRAY = '[' + const JSON_STR_END_ARRAY = ']' + const JSON_STR_COMMA = ',' + const JSON_STR_COLONS = ':' + const JSON_STR_QUOTE = '"' + const JSON_STR_EMPTY_OBJECT = JSON_STR_BEGIN_OBJECT + JSON_STR_END_OBJECT + const JSON_STR_EMPTY_ARRAY = JSON_STR_BEGIN_ARRAY + JSON_STR_END_ARRAY + const JSON_STR_EMPTY_STRING = JSON_STR_QUOTE + JSON_STR_QUOTE + const JSON_STR_NULL = 'null' + `; + if (code === "json += anonymous0(input)") { + contextFunctionCode += ` + ${context.functions.join("\n")} + const main = anonymous0 + return main + `; + } else { + contextFunctionCode += ` + function main (input) { + let json = '' + ${code} + return json + } + ${context.functions.join("\n")} + return main + `; + } + const serializer = new Serializer(options); + const validator = new Validator(options.ajv); + for (const schemaId2 of context.validatorSchemasIds) { + const schema2 = context.refResolver.getSchema(schemaId2); + validator.addSchema(schema2, schemaId2); + const dependencies = context.refResolver.getSchemaDependencies(schemaId2); + for (const [schemaId3, schema3] of Object.entries(dependencies)) { + validator.addSchema(schema3, schemaId3); + } + } + if (options.debugMode) { + options.mode = "debug"; + } + if (options.mode === "debug") { + return { + validator, + serializer, + code: `validator +serializer +${contextFunctionCode}`, + ajv: validator.ajv + }; + } + const contextFunc = new Function("validator", "serializer", contextFunctionCode); + if (options.mode === "standalone") { + const buildStandaloneCode = require_standalone(); + return buildStandaloneCode(contextFunc, context, serializer, validator); + } + return contextFunc(validator, serializer); + } + var objectKeywords = [ + "properties", + "required", + "additionalProperties", + "patternProperties", + "maxProperties", + "minProperties", + "dependencies" + ]; + var arrayKeywords = [ + "items", + "additionalItems", + "maxItems", + "minItems", + "uniqueItems", + "contains" + ]; + var stringKeywords = [ + "maxLength", + "minLength", + "pattern" + ]; + var numberKeywords = [ + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum" + ]; + function inferTypeByKeyword(schema) { + for (const keyword of objectKeywords) { + if (keyword in schema) return "object"; + } + for (const keyword of arrayKeywords) { + if (keyword in schema) return "array"; + } + for (const keyword of stringKeywords) { + if (keyword in schema) return "string"; + } + for (const keyword of numberKeywords) { + if (keyword in schema) return "number"; + } + return schema.type; + } + function buildExtraObjectPropertiesSerializer(context, location, addComma) { + const schema = location.schema; + const propertiesKeys = Object.keys(schema.properties || {}); + let code = ` + const propertiesKeys = ${JSON.stringify(propertiesKeys)} + for (const [key, value] of Object.entries(obj)) { + if ( + propertiesKeys.includes(key) || + value === undefined || + typeof value === 'function' || + typeof value === 'symbol' + ) continue + `; + const patternPropertiesLocation = location.getPropertyLocation("patternProperties"); + const patternPropertiesSchema = patternPropertiesLocation.schema; + if (patternPropertiesSchema !== void 0) { + for (const propertyKey in patternPropertiesSchema) { + const propertyLocation = patternPropertiesLocation.getPropertyLocation(propertyKey); + code += ` + if (/${propertyKey.replace(/\\*\//g, "\\/")}/.test(key)) { + ${addComma} + json += serializer.asString(key) + JSON_STR_COLONS + ${buildValue(context, propertyLocation, "value")} + continue + } + `; + } + } + const additionalPropertiesLocation = location.getPropertyLocation("additionalProperties"); + const additionalPropertiesSchema = additionalPropertiesLocation.schema; + if (additionalPropertiesSchema !== void 0) { + if (additionalPropertiesSchema === true) { + code += ` + ${addComma} + json += serializer.asString(key) + JSON_STR_COLONS + JSON.stringify(value) + `; + } else { + const propertyLocation = location.getPropertyLocation("additionalProperties"); + code += ` + ${addComma} + json += serializer.asString(key) + JSON_STR_COLONS + ${buildValue(context, propertyLocation, "value")} + `; + } + } + code += ` + } + `; + return code; + } + function buildInnerObject(context, location) { + const schema = location.schema; + const propertiesLocation = location.getPropertyLocation("properties"); + const requiredProperties = schema.required || []; + const propertiesKeys = Object.keys(schema.properties || {}).sort( + (key1, key2) => { + const required1 = requiredProperties.includes(key1); + const required2 = requiredProperties.includes(key2); + return required1 === required2 ? 0 : required1 ? -1 : 1; + } + ); + const hasRequiredProperties = requiredProperties.includes(propertiesKeys[0]); + let code = "let value\n"; + for (const key of requiredProperties) { + if (!propertiesKeys.includes(key)) { + const sanitizedKey = JSON.stringify(key); + code += `if (obj[${sanitizedKey}] === undefined) throw new Error('${sanitizedKey.replace(/'/g, "\\'")} is required!') +`; + } + } + code += "let json = JSON_STR_BEGIN_OBJECT\n"; + let addComma = ""; + if (!hasRequiredProperties) { + code += "let addComma = false\n"; + addComma = "!addComma && (addComma = true) || (json += JSON_STR_COMMA)"; + } + for (const key of propertiesKeys) { + let propertyLocation = propertiesLocation.getPropertyLocation(key); + if (propertyLocation.schema.$ref) { + propertyLocation = resolveRef(context, propertyLocation); + } + const sanitizedKey = JSON.stringify(key); + const defaultValue = propertyLocation.schema.default; + const isRequired = requiredProperties.includes(key); + code += ` + value = obj[${sanitizedKey}] + if (value !== undefined) { + ${addComma} + json += ${JSON.stringify(sanitizedKey + ":")} + ${buildValue(context, propertyLocation, "value")} + }`; + if (defaultValue !== void 0) { + code += ` else { + ${addComma} + json += ${JSON.stringify(sanitizedKey + ":" + JSON.stringify(defaultValue))} + } + `; + } else if (isRequired) { + code += ` else { + throw new Error('${sanitizedKey.replace(/'/g, "\\'")} is required!') + } + `; + } else { + code += "\n"; + } + if (hasRequiredProperties) { + addComma = "json += ','"; + } + } + if (schema.patternProperties || schema.additionalProperties) { + code += buildExtraObjectPropertiesSerializer(context, location, addComma); + } + code += ` + return json + JSON_STR_END_OBJECT + `; + return code; + } + function mergeLocations(context, mergedSchemaId, mergedLocations) { + for (let i = 0; i < mergedLocations.length; i++) { + const location = mergedLocations[i]; + const schema = location.schema; + if (schema.$ref) { + mergedLocations[i] = resolveRef(context, location); + } + } + const mergedSchemas = []; + for (const location of mergedLocations) { + const schema = cloneOriginSchema(context, location.schema, location.schemaId); + delete schema.$id; + mergedSchemas.push(schema); + } + const mergedSchema = mergeSchemas(mergedSchemas); + const mergedLocation = new Location(mergedSchema, mergedSchemaId); + context.refResolver.addSchema(mergedSchema, mergedSchemaId); + return mergedLocation; + } + function cloneOriginSchema(context, schema, schemaId) { + const clonedSchema = Array.isArray(schema) ? [] : {}; + if (schema.$id !== void 0 && schema.$id.charAt(0) !== "#") { + schemaId = schema.$id; + } + const mergedSchemaRef = context.mergedSchemasIds.get(schema); + if (mergedSchemaRef) { + context.mergedSchemasIds.set(clonedSchema, mergedSchemaRef); + } + for (const key in schema) { + let value = schema[key]; + if (key === "$ref" && typeof value === "string" && value.charAt(0) === "#") { + value = schemaId + value; + } + if (typeof value === "object" && value !== null) { + value = cloneOriginSchema(context, value, schemaId); + } + clonedSchema[key] = value; + } + return clonedSchema; + } + function toJSON(variableName) { + return `(${variableName} && typeof ${variableName}.toJSON === 'function') + ? ${variableName}.toJSON() + : ${variableName} + `; + } + function buildObject(context, location) { + const schema = location.schema; + if (context.functionsNamesBySchema.has(schema)) { + return context.functionsNamesBySchema.get(schema); + } + const functionName = generateFuncName(context); + context.functionsNamesBySchema.set(schema, functionName); + let schemaRef = location.getSchemaRef(); + if (schemaRef.startsWith(context.rootSchemaId)) { + schemaRef = schemaRef.replace(context.rootSchemaId, ""); + } + let functionCode = ` + `; + const nullable = schema.nullable === true; + functionCode += ` + // ${schemaRef} + function ${functionName} (input) { + const obj = ${toJSON("input")} + ${!nullable ? "if (obj === null) return JSON_STR_EMPTY_OBJECT" : ""} + + ${buildInnerObject(context, location)} + } + `; + context.functions.push(functionCode); + return functionName; + } + function buildArray(context, location) { + const schema = location.schema; + let itemsLocation = location.getPropertyLocation("items"); + itemsLocation.schema = itemsLocation.schema || {}; + if (itemsLocation.schema.$ref) { + itemsLocation = resolveRef(context, itemsLocation); + } + const itemsSchema = itemsLocation.schema; + if (context.functionsNamesBySchema.has(schema)) { + return context.functionsNamesBySchema.get(schema); + } + const functionName = generateFuncName(context); + context.functionsNamesBySchema.set(schema, functionName); + let schemaRef = location.getSchemaRef(); + if (schemaRef.startsWith(context.rootSchemaId)) { + schemaRef = schemaRef.replace(context.rootSchemaId, ""); + } + let functionCode = ` + function ${functionName} (obj) { + // ${schemaRef} + `; + const nullable = schema.nullable === true; + functionCode += ` + ${!nullable ? "if (obj === null) return JSON_STR_EMPTY_ARRAY" : ""} + if (!Array.isArray(obj)) { + throw new TypeError(\`The value of '${schemaRef}' does not match schema definition.\`) + } + const arrayLength = obj.length + `; + if (!schema.additionalItems && Array.isArray(itemsSchema)) { + functionCode += ` + if (arrayLength > ${itemsSchema.length}) { + throw new Error(\`Item at ${itemsSchema.length} does not match schema definition.\`) + } + `; + } + if (largeArrayMechanism === "json-stringify") { + functionCode += `if (arrayLength >= ${largeArraySize}) return JSON.stringify(obj) +`; + } + functionCode += ` + const arrayEnd = arrayLength - 1 + let value + let json = '' + `; + if (Array.isArray(itemsSchema)) { + for (let i = 0; i < itemsSchema.length; i++) { + const item = itemsSchema[i]; + functionCode += `value = obj[${i}]`; + const tmpRes = buildValue(context, itemsLocation.getPropertyLocation(i), "value"); + functionCode += ` + if (${i} < arrayLength) { + if (${buildArrayTypeCondition(item.type, `[${i}]`)}) { + ${tmpRes} + if (${i} < arrayEnd) { + json += JSON_STR_COMMA + } + } else { + throw new Error(\`Item at ${i} does not match schema definition.\`) + } + } + `; + } + if (schema.additionalItems) { + functionCode += ` + for (let i = ${itemsSchema.length}; i < arrayLength; i++) { + json += JSON.stringify(obj[i]) + if (i < arrayEnd) { + json += JSON_STR_COMMA + } + }`; + } + } else { + const code = buildValue(context, itemsLocation, "obj[i]"); + functionCode += ` + for (let i = 0; i < arrayLength; i++) { + ${code} + if (i < arrayEnd) { + json += JSON_STR_COMMA + } + }`; + } + functionCode += ` + return JSON_STR_BEGIN_ARRAY + json + JSON_STR_END_ARRAY + }`; + context.functions.push(functionCode); + return functionName; + } + function buildArrayTypeCondition(type, accessor) { + let condition; + switch (type) { + case "null": + condition = "value === null"; + break; + case "string": + condition = `typeof value === 'string' || + value === null || + value instanceof Date || + value instanceof RegExp || + ( + typeof value === "object" && + typeof value.toString === "function" && + value.toString !== Object.prototype.toString + )`; + break; + case "integer": + condition = "Number.isInteger(value)"; + break; + case "number": + condition = "Number.isFinite(value)"; + break; + case "boolean": + condition = "typeof value === 'boolean'"; + break; + case "object": + condition = "value && typeof value === 'object' && value.constructor === Object"; + break; + case "array": + condition = "Array.isArray(value)"; + break; + default: + if (Array.isArray(type)) { + const conditions = type.map((subType) => { + return buildArrayTypeCondition(subType, accessor); + }); + condition = `(${conditions.join(" || ")})`; + } + } + return condition; + } + function generateFuncName(context) { + return "anonymous" + context.functionsCounter++; + } + function buildMultiTypeSerializer(context, location, input) { + const schema = location.schema; + const types = schema.type.sort((t1) => t1 === "null" ? -1 : 1); + let code = ""; + types.forEach((type, index) => { + location.schema = { ...location.schema, type }; + const nestedResult = buildSingleTypeSerializer(context, location, input); + const statement = index === 0 ? "if" : "else if"; + switch (type) { + case "null": + code += ` + ${statement} (${input} === null) + ${nestedResult} + `; + break; + case "string": { + code += ` + ${statement}( + typeof ${input} === "string" || + ${input} === null || + ${input} instanceof Date || + ${input} instanceof RegExp || + ( + typeof ${input} === "object" && + typeof ${input}.toString === "function" && + ${input}.toString !== Object.prototype.toString + ) + ) + ${nestedResult} + `; + break; + } + case "array": { + code += ` + ${statement}(Array.isArray(${input})) + ${nestedResult} + `; + break; + } + case "integer": { + code += ` + ${statement}(Number.isInteger(${input}) || ${input} === null) + ${nestedResult} + `; + break; + } + default: { + code += ` + ${statement}(typeof ${input} === "${type}" || ${input} === null) + ${nestedResult} + `; + break; + } + } + }); + let schemaRef = location.getSchemaRef(); + if (schemaRef.startsWith(context.rootSchemaId)) { + schemaRef = schemaRef.replace(context.rootSchemaId, ""); + } + code += ` + else throw new TypeError(\`The value of '${schemaRef}' does not match schema definition.\`) + `; + return code; + } + function buildSingleTypeSerializer(context, location, input) { + const schema = location.schema; + switch (schema.type) { + case "null": + return "json += JSON_STR_NULL"; + case "string": { + if (schema.format === "date-time") { + return `json += serializer.asDateTime(${input})`; + } else if (schema.format === "date") { + return `json += serializer.asDate(${input})`; + } else if (schema.format === "time") { + return `json += serializer.asTime(${input})`; + } else if (schema.format === "unsafe") { + return `json += serializer.asUnsafeString(${input})`; + } else { + return ` + if (typeof ${input} !== 'string') { + if (${input} === null) { + json += JSON_STR_EMPTY_STRING + } else if (${input} instanceof Date) { + json += JSON_STR_QUOTE + ${input}.toISOString() + JSON_STR_QUOTE + } else if (${input} instanceof RegExp) { + json += serializer.asString(${input}.source) + } else { + json += serializer.asString(${input}.toString()) + } + } else { + json += serializer.asString(${input}) + } + `; + } + } + case "integer": + return `json += serializer.asInteger(${input})`; + case "number": + return `json += serializer.asNumber(${input})`; + case "boolean": + return `json += serializer.asBoolean(${input})`; + case "object": { + const funcName = buildObject(context, location); + return `json += ${funcName}(${input})`; + } + case "array": { + const funcName = buildArray(context, location); + return `json += ${funcName}(${input})`; + } + case void 0: + return `json += JSON.stringify(${input})`; + default: + throw new Error(`${schema.type} unsupported`); + } + } + function buildConstSerializer(location, input) { + const schema = location.schema; + const type = schema.type; + const hasNullType = Array.isArray(type) && type.includes("null"); + let code = ""; + if (hasNullType) { + code += ` + if (${input} === null) { + json += JSON_STR_NULL + } else { + `; + } + code += `json += '${JSON.stringify(schema.const).replace(SINGLE_TICK, "\\'")}'`; + if (hasNullType) { + code += ` + } + `; + } + return code; + } + function buildAllOf(context, location, input) { + const schema = location.schema; + let mergedSchemaId = context.mergedSchemasIds.get(schema); + if (mergedSchemaId) { + const mergedLocation2 = getMergedLocation(context, mergedSchemaId); + return buildValue(context, mergedLocation2, input); + } + mergedSchemaId = `__fjs_merged_${schemaIdCounter++}`; + context.mergedSchemasIds.set(schema, mergedSchemaId); + const { allOf, ...schemaWithoutAllOf } = location.schema; + const locations = [ + new Location( + schemaWithoutAllOf, + location.schemaId, + location.jsonPointer + ) + ]; + const allOfsLocation = location.getPropertyLocation("allOf"); + for (let i = 0; i < allOf.length; i++) { + locations.push(allOfsLocation.getPropertyLocation(i)); + } + const mergedLocation = mergeLocations(context, mergedSchemaId, locations); + return buildValue(context, mergedLocation, input); + } + function buildOneOf(context, location, input) { + context.validatorSchemasIds.add(location.schemaId); + const schema = location.schema; + const type = schema.anyOf ? "anyOf" : "oneOf"; + const { [type]: oneOfs, ...schemaWithoutAnyOf } = location.schema; + const locationWithoutOneOf = new Location( + schemaWithoutAnyOf, + location.schemaId, + location.jsonPointer + ); + const oneOfsLocation = location.getPropertyLocation(type); + let code = ""; + for (let index = 0; index < oneOfs.length; index++) { + const optionLocation = oneOfsLocation.getPropertyLocation(index); + const optionSchema = optionLocation.schema; + let mergedSchemaId = context.mergedSchemasIds.get(optionSchema); + let mergedLocation = null; + if (mergedSchemaId) { + mergedLocation = getMergedLocation(context, mergedSchemaId); + } else { + mergedSchemaId = `__fjs_merged_${schemaIdCounter++}`; + context.mergedSchemasIds.set(optionSchema, mergedSchemaId); + mergedLocation = mergeLocations(context, mergedSchemaId, [ + locationWithoutOneOf, + optionLocation + ]); + } + const nestedResult = buildValue(context, mergedLocation, input); + const schemaRef2 = optionLocation.getSchemaRef(); + code += ` + ${index === 0 ? "if" : "else if"}(validator.validate("${schemaRef2}", ${input})) + ${nestedResult} + `; + } + let schemaRef = location.getSchemaRef(); + if (schemaRef.startsWith(context.rootSchemaId)) { + schemaRef = schemaRef.replace(context.rootSchemaId, ""); + } + code += ` + else throw new TypeError(\`The value of '${schemaRef}' does not match schema definition.\`) + `; + return code; + } + function buildIfThenElse(context, location, input) { + context.validatorSchemasIds.add(location.schemaId); + const { + if: ifSchema, + then: thenSchema, + else: elseSchema, + ...schemaWithoutIfThenElse + } = location.schema; + const rootLocation = new Location( + schemaWithoutIfThenElse, + location.schemaId, + location.jsonPointer + ); + const ifLocation = location.getPropertyLocation("if"); + const ifSchemaRef = ifLocation.getSchemaRef(); + const thenLocation = location.getPropertyLocation("then"); + let thenMergedSchemaId = context.mergedSchemasIds.get(thenSchema); + let thenMergedLocation = null; + if (thenMergedSchemaId) { + thenMergedLocation = getMergedLocation(context, thenMergedSchemaId); + } else { + thenMergedSchemaId = `__fjs_merged_${schemaIdCounter++}`; + context.mergedSchemasIds.set(thenSchema, thenMergedSchemaId); + thenMergedLocation = mergeLocations(context, thenMergedSchemaId, [ + rootLocation, + thenLocation + ]); + } + if (!elseSchema) { + return ` + if (validator.validate("${ifSchemaRef}", ${input})) { + ${buildValue(context, thenMergedLocation, input)} + } else { + ${buildValue(context, rootLocation, input)} + } + `; + } + const elseLocation = location.getPropertyLocation("else"); + let elseMergedSchemaId = context.mergedSchemasIds.get(elseSchema); + let elseMergedLocation = null; + if (elseMergedSchemaId) { + elseMergedLocation = getMergedLocation(context, elseMergedSchemaId); + } else { + elseMergedSchemaId = `__fjs_merged_${schemaIdCounter++}`; + context.mergedSchemasIds.set(elseSchema, elseMergedSchemaId); + elseMergedLocation = mergeLocations(context, elseMergedSchemaId, [ + rootLocation, + elseLocation + ]); + } + return ` + if (validator.validate("${ifSchemaRef}", ${input})) { + ${buildValue(context, thenMergedLocation, input)} + } else { + ${buildValue(context, elseMergedLocation, input)} + } + `; + } + function buildValue(context, location, input) { + let schema = location.schema; + if (typeof schema === "boolean") { + return `json += JSON.stringify(${input})`; + } + if (schema.$ref) { + location = resolveRef(context, location); + schema = location.schema; + } + if (schema.allOf) { + return buildAllOf(context, location, input); + } + if (schema.anyOf || schema.oneOf) { + return buildOneOf(context, location, input); + } + if (schema.if && schema.then) { + return buildIfThenElse(context, location, input); + } + if (schema.type === void 0) { + const inferredType = inferTypeByKeyword(schema); + if (inferredType) { + schema.type = inferredType; + } + } + let code = ""; + const type = schema.type; + const nullable = schema.nullable === true; + if (nullable) { + code += ` + if (${input} === null) { + json += JSON_STR_NULL + } else { + `; + } + if (schema.const !== void 0) { + code += buildConstSerializer(location, input); + } else if (Array.isArray(type)) { + code += buildMultiTypeSerializer(context, location, input); + } else { + code += buildSingleTypeSerializer(context, location, input); + } + if (nullable) { + code += ` + } + `; + } + return code; + } + module2.exports = build; + module2.exports.default = build; + module2.exports.build = build; + module2.exports.validLargeArrayMechanisms = validLargeArrayMechanisms; + module2.exports.restore = function({ code, validator, serializer }) { + return Function.apply(null, ["validator", "serializer", code]).apply(null, [validator, serializer]); + }; + } +}); + +// node_modules/@fastify/fast-json-stringify-compiler/standalone.js +var require_standalone2 = __commonJS({ + "node_modules/@fastify/fast-json-stringify-compiler/standalone.js"(exports2, module2) { + "use strict"; + var fastJsonStringify = require_fast_json_stringify(); + function SerializerSelector() { + return function buildSerializerFactory(externalSchemas, serializerOpts) { + const fjsOpts = Object.assign({}, serializerOpts, { schema: externalSchemas }); + return responseSchemaCompiler.bind(null, fjsOpts); + }; + } + function responseSchemaCompiler(fjsOpts, { + schema + /* method, url, httpStatus */ + }) { + if (fjsOpts.schema && schema.$id && fjsOpts.schema[schema.$id]) { + fjsOpts.schema = { ...fjsOpts.schema }; + delete fjsOpts.schema[schema.$id]; + } + return fastJsonStringify(schema, fjsOpts); + } + function StandaloneSerializer(options = { readMode: true }) { + if (options.readMode === true && typeof options.restoreFunction !== "function") { + throw new Error("You must provide a function for the restoreFunction-option when readMode ON"); + } + if (options.readMode !== true && typeof options.storeFunction !== "function") { + throw new Error("You must provide a function for the storeFunction-option when readMode OFF"); + } + if (options.readMode === true) { + return function wrapper() { + return function(opts) { + return options.restoreFunction(opts); + }; + }; + } + const factory = SerializerSelector(); + return function wrapper(externalSchemas, serializerOpts = {}) { + serializerOpts.mode = "standalone"; + const compiler = factory(externalSchemas, serializerOpts); + return function(opts) { + const serializeFuncCode = compiler(opts); + options.storeFunction(opts, serializeFuncCode); + return new Function(serializeFuncCode); + }; + }; + } + module2.exports.SerializerSelector = SerializerSelector; + module2.exports.StandaloneSerializer = StandaloneSerializer; + module2.exports.default = StandaloneSerializer; + } +}); + +// node_modules/@fastify/fast-json-stringify-compiler/index.js +var require_fast_json_stringify_compiler = __commonJS({ + "node_modules/@fastify/fast-json-stringify-compiler/index.js"(exports2, module2) { + "use strict"; + var { SerializerSelector, StandaloneSerializer } = require_standalone2(); + module2.exports = SerializerSelector; + module2.exports.default = SerializerSelector; + module2.exports.SerializerSelector = SerializerSelector; + module2.exports.StandaloneSerializer = StandaloneSerializer; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/metadata.js +var require_metadata2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/metadata.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkMetadata = void 0; + var util_1 = require_util2(); + var def = { + keyword: "metadata", + schemaType: "object", + code(cxt) { + checkMetadata(cxt); + const { gen, schema, it: it2 } = cxt; + if ((0, util_1.alwaysValidSchema)(it2, schema)) + return; + const valid = gen.name("valid"); + cxt.subschema({ keyword: "metadata", jtdMetadata: true }, valid); + cxt.ok(valid); + } + }; + function checkMetadata({ it: it2, keyword }, metadata) { + if (it2.jtdMetadata !== metadata) { + throw new Error(`JTD: "${keyword}" cannot be used in this schema location`); + } + } + exports2.checkMetadata = checkMetadata; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/ref.js +var require_ref2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/ref.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRef = void 0; + var compile_1 = require_compile(); + var codegen_1 = require_codegen(); + var ref_error_1 = require_ref_error(); + var names_1 = require_names(); + var ref_1 = require_ref(); + var metadata_1 = require_metadata2(); + var def = { + keyword: "ref", + schemaType: "string", + code(cxt) { + (0, metadata_1.checkMetadata)(cxt); + const { gen, data, schema: ref, parentSchema, it: it2 } = cxt; + const { schemaEnv: { root } } = it2; + const valid = gen.name("valid"); + if (parentSchema.nullable) { + gen.var(valid, (0, codegen_1._)`${data} === null`); + gen.if((0, codegen_1.not)(valid), validateJtdRef); + } else { + gen.var(valid, false); + validateJtdRef(); + } + cxt.ok(valid); + function validateJtdRef() { + var _a; + const refSchema = (_a = root.schema.definitions) === null || _a === void 0 ? void 0 : _a[ref]; + if (!refSchema) { + throw new ref_error_1.default(it2.opts.uriResolver, "", ref, `No definition ${ref}`); + } + if (hasRef(refSchema) || !it2.opts.inlineRefs) + callValidate(refSchema); + else + inlineRefSchema(refSchema); + } + function callValidate(schema) { + const sch = compile_1.compileSchema.call(it2.self, new compile_1.SchemaEnv({ schema, root, schemaPath: `/definitions/${ref}` })); + const v = (0, ref_1.getValidate)(cxt, sch); + const errsCount = gen.const("_errs", names_1.default.errors); + (0, ref_1.callRef)(cxt, v, sch, sch.$async); + gen.assign(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + } + function inlineRefSchema(schema) { + const schName = gen.scopeValue("schema", it2.opts.code.source === true ? { ref: schema, code: (0, codegen_1.stringify)(schema) } : { ref: schema }); + cxt.subschema({ + schema, + dataTypes: [], + schemaPath: codegen_1.nil, + topSchemaRef: schName, + errSchemaPath: `/definitions/${ref}` + }, valid); + } + } + }; + function hasRef(schema) { + for (const key in schema) { + let sch; + if (key === "ref" || typeof (sch = schema[key]) == "object" && hasRef(sch)) + return true; + } + return false; + } + exports2.hasRef = hasRef; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/runtime/timestamp.js +var require_timestamp = __commonJS({ + "node_modules/ajv/dist/runtime/timestamp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var DT_SEPARATOR = /t|\s/i; + var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; + var TIME = /^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i; + var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + function validTimestamp(str, allowDate) { + const dt = str.split(DT_SEPARATOR); + return dt.length === 2 && validDate(dt[0]) && validTime(dt[1]) || allowDate && dt.length === 1 && validDate(dt[0]); + } + exports2.default = validTimestamp; + function validDate(str) { + const matches = DATE.exec(str); + if (!matches) + return false; + const y = +matches[1]; + const m = +matches[2]; + const d = +matches[3]; + return m >= 1 && m <= 12 && d >= 1 && (d <= DAYS[m] || // leap year: https://tools.ietf.org/html/rfc3339#appendix-C + m === 2 && d === 29 && (y % 100 === 0 ? y % 400 === 0 : y % 4 === 0)); + } + function validTime(str) { + const matches = TIME.exec(str); + if (!matches) + return false; + const hr = +matches[1]; + const min = +matches[2]; + const sec = +matches[3]; + const tzH = +(matches[4] || 0); + const tzM = +(matches[5] || 0); + return hr <= 23 && min <= 59 && sec <= 59 || // leap second + hr - tzH === 23 && min - tzM === 59 && sec === 60; + } + validTimestamp.code = 'require("ajv/dist/runtime/timestamp").default'; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/error.js +var require_error2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.typeErrorParams = exports2.typeErrorMessage = exports2.typeError = void 0; + var codegen_1 = require_codegen(); + function typeError(t) { + return { + message: (cxt) => typeErrorMessage(cxt, t), + params: (cxt) => typeErrorParams(cxt, t) + }; + } + exports2.typeError = typeError; + function typeErrorMessage({ parentSchema }, t) { + return (parentSchema === null || parentSchema === void 0 ? void 0 : parentSchema.nullable) ? `must be ${t} or null` : `must be ${t}`; + } + exports2.typeErrorMessage = typeErrorMessage; + function typeErrorParams({ parentSchema }, t) { + return (0, codegen_1._)`{type: ${t}, nullable: ${!!(parentSchema === null || parentSchema === void 0 ? void 0 : parentSchema.nullable)}}`; + } + exports2.typeErrorParams = typeErrorParams; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/type.js +var require_type = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.intRange = void 0; + var codegen_1 = require_codegen(); + var timestamp_1 = require_timestamp(); + var util_1 = require_util2(); + var metadata_1 = require_metadata2(); + var error_1 = require_error2(); + exports2.intRange = { + int8: [-128, 127, 3], + uint8: [0, 255, 3], + int16: [-32768, 32767, 5], + uint16: [0, 65535, 5], + int32: [-2147483648, 2147483647, 10], + uint32: [0, 4294967295, 10] + }; + var error = { + message: (cxt) => (0, error_1.typeErrorMessage)(cxt, cxt.schema), + params: (cxt) => (0, error_1.typeErrorParams)(cxt, cxt.schema) + }; + function timestampCode(cxt) { + const { gen, data, it: it2 } = cxt; + const { timestamp, allowDate } = it2.opts; + if (timestamp === "date") + return (0, codegen_1._)`${data} instanceof Date `; + const vts = (0, util_1.useFunc)(gen, timestamp_1.default); + const allowDateArg = allowDate ? (0, codegen_1._)`, true` : codegen_1.nil; + const validString = (0, codegen_1._)`typeof ${data} == "string" && ${vts}(${data}${allowDateArg})`; + return timestamp === "string" ? validString : (0, codegen_1.or)((0, codegen_1._)`${data} instanceof Date`, validString); + } + var def = { + keyword: "type", + schemaType: "string", + error, + code(cxt) { + (0, metadata_1.checkMetadata)(cxt); + const { data, schema, parentSchema, it: it2 } = cxt; + let cond; + switch (schema) { + case "boolean": + case "string": + cond = (0, codegen_1._)`typeof ${data} == ${schema}`; + break; + case "timestamp": { + cond = timestampCode(cxt); + break; + } + case "float32": + case "float64": + cond = (0, codegen_1._)`typeof ${data} == "number"`; + break; + default: { + const sch = schema; + cond = (0, codegen_1._)`typeof ${data} == "number" && isFinite(${data}) && !(${data} % 1)`; + if (!it2.opts.int32range && (sch === "int32" || sch === "uint32")) { + if (sch === "uint32") + cond = (0, codegen_1._)`${cond} && ${data} >= 0`; + } else { + const [min, max] = exports2.intRange[sch]; + cond = (0, codegen_1._)`${cond} && ${data} >= ${min} && ${data} <= ${max}`; + } + } + } + cxt.pass(parentSchema.nullable ? (0, codegen_1.or)((0, codegen_1._)`${data} === null`, cond) : cond); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/nullable.js +var require_nullable = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/nullable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkNullableObject = exports2.checkNullable = void 0; + var codegen_1 = require_codegen(); + function checkNullable({ gen, data, parentSchema }, cond = codegen_1.nil) { + const valid = gen.name("valid"); + if (parentSchema.nullable) { + gen.let(valid, (0, codegen_1._)`${data} === null`); + cond = (0, codegen_1.not)(valid); + } else { + gen.let(valid, false); + } + return [valid, cond]; + } + exports2.checkNullable = checkNullable; + function checkNullableObject(cxt, cond) { + const [valid, cond_] = checkNullable(cxt, cond); + return [valid, (0, codegen_1._)`${cond_} && typeof ${cxt.data} == "object" && !Array.isArray(${cxt.data})`]; + } + exports2.checkNullableObject = checkNullableObject; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/enum.js +var require_enum2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var metadata_1 = require_metadata2(); + var nullable_1 = require_nullable(); + var error = { + message: "must be equal to one of the allowed values", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}` + }; + var def = { + keyword: "enum", + schemaType: "array", + error, + code(cxt) { + (0, metadata_1.checkMetadata)(cxt); + const { gen, data, schema, schemaValue, parentSchema, it: it2 } = cxt; + if (schema.length === 0) + throw new Error("enum must have non-empty array"); + if (schema.length !== new Set(schema).size) + throw new Error("enum items must be unique"); + let valid; + const isString = (0, codegen_1._)`typeof ${data} == "string"`; + if (schema.length >= it2.opts.loopEnum) { + let cond; + [valid, cond] = (0, nullable_1.checkNullable)(cxt, isString); + gen.if(cond, loopEnum); + } else { + if (!Array.isArray(schema)) + throw new Error("ajv implementation error"); + valid = (0, codegen_1.and)(isString, (0, codegen_1.or)(...schema.map((value) => (0, codegen_1._)`${data} === ${value}`))); + if (parentSchema.nullable) + valid = (0, codegen_1.or)((0, codegen_1._)`${data} === null`, valid); + } + cxt.pass(valid); + function loopEnum() { + gen.forOf("v", schemaValue, (v) => gen.if((0, codegen_1._)`${valid} = ${data} === ${v}`, () => gen.break())); + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/elements.js +var require_elements = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/elements.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util2(); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var metadata_1 = require_metadata2(); + var nullable_1 = require_nullable(); + var error_1 = require_error2(); + var def = { + keyword: "elements", + schemaType: "object", + error: (0, error_1.typeError)("array"), + code(cxt) { + (0, metadata_1.checkMetadata)(cxt); + const { gen, data, schema, it: it2 } = cxt; + if ((0, util_1.alwaysValidSchema)(it2, schema)) + return; + const [valid] = (0, nullable_1.checkNullable)(cxt); + gen.if((0, codegen_1.not)(valid), () => gen.if((0, codegen_1._)`Array.isArray(${data})`, () => gen.assign(valid, (0, code_1.validateArray)(cxt)), () => cxt.error())); + cxt.ok(valid); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/properties.js +var require_properties2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/properties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateProperties = exports2.error = void 0; + var code_1 = require_code2(); + var util_1 = require_util2(); + var codegen_1 = require_codegen(); + var metadata_1 = require_metadata2(); + var nullable_1 = require_nullable(); + var error_1 = require_error2(); + var PropError; + (function(PropError2) { + PropError2["Additional"] = "additional"; + PropError2["Missing"] = "missing"; + })(PropError || (PropError = {})); + exports2.error = { + message: (cxt) => { + const { params } = cxt; + return params.propError ? params.propError === PropError.Additional ? "must NOT have additional properties" : `must have property '${params.missingProperty}'` : (0, error_1.typeErrorMessage)(cxt, "object"); + }, + params: (cxt) => { + const { params } = cxt; + return params.propError ? params.propError === PropError.Additional ? (0, codegen_1._)`{error: ${params.propError}, additionalProperty: ${params.additionalProperty}}` : (0, codegen_1._)`{error: ${params.propError}, missingProperty: ${params.missingProperty}}` : (0, error_1.typeErrorParams)(cxt, "object"); + } + }; + var def = { + keyword: "properties", + schemaType: "object", + error: exports2.error, + code: validateProperties + }; + function validateProperties(cxt) { + (0, metadata_1.checkMetadata)(cxt); + const { gen, data, parentSchema, it: it2 } = cxt; + const { additionalProperties, nullable } = parentSchema; + if (it2.jtdDiscriminator && nullable) + throw new Error("JTD: nullable inside discriminator mapping"); + if (commonProperties()) { + throw new Error("JTD: properties and optionalProperties have common members"); + } + const [allProps, properties] = schemaProperties("properties"); + const [allOptProps, optProperties] = schemaProperties("optionalProperties"); + if (properties.length === 0 && optProperties.length === 0 && additionalProperties) { + return; + } + const [valid, cond] = it2.jtdDiscriminator === void 0 ? (0, nullable_1.checkNullableObject)(cxt, data) : [gen.let("valid", false), true]; + gen.if(cond, () => gen.assign(valid, true).block(() => { + validateProps(properties, "properties", true); + validateProps(optProperties, "optionalProperties"); + if (!additionalProperties) + validateAdditional(); + })); + cxt.pass(valid); + function commonProperties() { + const props = parentSchema.properties; + const optProps = parentSchema.optionalProperties; + if (!(props && optProps)) + return false; + for (const p in props) { + if (Object.prototype.hasOwnProperty.call(optProps, p)) + return true; + } + return false; + } + function schemaProperties(keyword) { + const schema = parentSchema[keyword]; + const allPs = schema ? (0, code_1.allSchemaProperties)(schema) : []; + if (it2.jtdDiscriminator && allPs.some((p) => p === it2.jtdDiscriminator)) { + throw new Error(`JTD: discriminator tag used in ${keyword}`); + } + const ps2 = allPs.filter((p) => !(0, util_1.alwaysValidSchema)(it2, schema[p])); + return [allPs, ps2]; + } + function validateProps(props, keyword, required) { + const _valid = gen.var("valid"); + for (const prop of props) { + gen.if((0, code_1.propertyInData)(gen, data, prop, it2.opts.ownProperties), () => applyPropertySchema(prop, keyword, _valid), () => missingProperty(prop)); + cxt.ok(_valid); + } + function missingProperty(prop) { + if (required) { + gen.assign(_valid, false); + cxt.error(false, { propError: PropError.Missing, missingProperty: prop }, { schemaPath: prop }); + } else { + gen.assign(_valid, true); + } + } + } + function applyPropertySchema(prop, keyword, _valid) { + cxt.subschema({ + keyword, + schemaProp: prop, + dataProp: prop + }, _valid); + } + function validateAdditional() { + gen.forIn("key", data, (key) => { + const addProp = isAdditional(key, allProps, "properties", it2.jtdDiscriminator); + const addOptProp = isAdditional(key, allOptProps, "optionalProperties"); + const extra = addProp === true ? addOptProp : addOptProp === true ? addProp : (0, codegen_1.and)(addProp, addOptProp); + gen.if(extra, () => { + if (it2.opts.removeAdditional) { + gen.code((0, codegen_1._)`delete ${data}[${key}]`); + } else { + cxt.error(false, { propError: PropError.Additional, additionalProperty: key }, { instancePath: key, parentSchema: true }); + if (!it2.opts.allErrors) + gen.break(); + } + }); + }); + } + function isAdditional(key, props, keyword, jtdDiscriminator) { + let additional; + if (props.length > 8) { + const propsSchema = (0, util_1.schemaRefOrVal)(it2, parentSchema[keyword], keyword); + additional = (0, codegen_1.not)((0, code_1.isOwnProperty)(gen, propsSchema, key)); + if (jtdDiscriminator !== void 0) { + additional = (0, codegen_1.and)(additional, (0, codegen_1._)`${key} !== ${jtdDiscriminator}`); + } + } else if (props.length || jtdDiscriminator !== void 0) { + const ps2 = jtdDiscriminator === void 0 ? props : [jtdDiscriminator].concat(props); + additional = (0, codegen_1.and)(...ps2.map((p) => (0, codegen_1._)`${key} !== ${p}`)); + } else { + additional = true; + } + return additional; + } + } + exports2.validateProperties = validateProperties; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +var require_optionalProperties = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var properties_1 = require_properties2(); + var def = { + keyword: "optionalProperties", + schemaType: "object", + error: properties_1.error, + code(cxt) { + if (cxt.parentSchema.properties) + return; + (0, properties_1.validateProperties)(cxt); + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/discriminator.js +var require_discriminator2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/discriminator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var metadata_1 = require_metadata2(); + var nullable_1 = require_nullable(); + var error_1 = require_error2(); + var types_1 = require_types(); + var error = { + message: (cxt) => { + const { schema, params } = cxt; + return params.discrError ? params.discrError === types_1.DiscrError.Tag ? `tag "${schema}" must be string` : `value of tag "${schema}" must be in mapping` : (0, error_1.typeErrorMessage)(cxt, "object"); + }, + params: (cxt) => { + const { schema, params } = cxt; + return params.discrError ? (0, codegen_1._)`{error: ${params.discrError}, tag: ${schema}, tagValue: ${params.tag}}` : (0, error_1.typeErrorParams)(cxt, "object"); + } + }; + var def = { + keyword: "discriminator", + schemaType: "string", + implements: ["mapping"], + error, + code(cxt) { + (0, metadata_1.checkMetadata)(cxt); + const { gen, data, schema, parentSchema } = cxt; + const [valid, cond] = (0, nullable_1.checkNullableObject)(cxt, data); + gen.if(cond); + validateDiscriminator(); + gen.elseIf((0, codegen_1.not)(valid)); + cxt.error(); + gen.endIf(); + cxt.ok(valid); + function validateDiscriminator() { + const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(schema)}`); + gen.if((0, codegen_1._)`${tag} === undefined`); + cxt.error(false, { discrError: types_1.DiscrError.Tag, tag }); + gen.elseIf((0, codegen_1._)`typeof ${tag} == "string"`); + validateMapping(tag); + gen.else(); + cxt.error(false, { discrError: types_1.DiscrError.Tag, tag }, { instancePath: schema }); + gen.endIf(); + } + function validateMapping(tag) { + gen.if(false); + for (const tagValue in parentSchema.mapping) { + gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); + gen.assign(valid, applyTagSchema(tagValue)); + } + gen.else(); + cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag }, { instancePath: schema, schemaPath: "mapping", parentSchema: true }); + gen.endIf(); + } + function applyTagSchema(schemaProp) { + const _valid = gen.name("valid"); + cxt.subschema({ + keyword: "mapping", + schemaProp, + jtdDiscriminator: schema + }, _valid); + return _valid; + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/values.js +var require_values = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/values.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util2(); + var codegen_1 = require_codegen(); + var metadata_1 = require_metadata2(); + var nullable_1 = require_nullable(); + var error_1 = require_error2(); + var def = { + keyword: "values", + schemaType: "object", + error: (0, error_1.typeError)("object"), + code(cxt) { + (0, metadata_1.checkMetadata)(cxt); + const { gen, data, schema, it: it2 } = cxt; + const [valid, cond] = (0, nullable_1.checkNullableObject)(cxt, data); + if ((0, util_1.alwaysValidSchema)(it2, schema)) { + gen.if((0, codegen_1.not)((0, codegen_1.or)(cond, valid)), () => cxt.error()); + } else { + gen.if(cond); + gen.assign(valid, validateMap()); + gen.elseIf((0, codegen_1.not)(valid)); + cxt.error(); + gen.endIf(); + } + cxt.ok(valid); + function validateMap() { + const _valid = gen.name("valid"); + if (it2.allErrors) { + const validMap = gen.let("valid", true); + validateValues(() => gen.assign(validMap, false)); + return validMap; + } + gen.var(_valid, true); + validateValues(() => gen.break()); + return _valid; + function validateValues(notValid) { + gen.forIn("key", data, (key) => { + cxt.subschema({ + keyword: "values", + dataProp: key, + dataPropType: util_1.Type.Str + }, _valid); + gen.if((0, codegen_1.not)(_valid), notValid); + }); + } + } + } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/union.js +var require_union = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/union.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var def = { + keyword: "union", + schemaType: "array", + trackErrors: true, + code: code_1.validateUnion, + error: { message: "must match a schema in union" } + }; + exports2.default = def; + } +}); + +// node_modules/ajv/dist/vocabularies/jtd/index.js +var require_jtd = __commonJS({ + "node_modules/ajv/dist/vocabularies/jtd/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var ref_1 = require_ref2(); + var type_1 = require_type(); + var enum_1 = require_enum2(); + var elements_1 = require_elements(); + var properties_1 = require_properties2(); + var optionalProperties_1 = require_optionalProperties(); + var discriminator_1 = require_discriminator2(); + var values_1 = require_values(); + var union_1 = require_union(); + var metadata_1 = require_metadata2(); + var jtdVocabulary = [ + "definitions", + ref_1.default, + type_1.default, + enum_1.default, + elements_1.default, + properties_1.default, + optionalProperties_1.default, + discriminator_1.default, + values_1.default, + union_1.default, + metadata_1.default, + { keyword: "additionalProperties", schemaType: "boolean" }, + { keyword: "nullable", schemaType: "boolean" } + ]; + exports2.default = jtdVocabulary; + } +}); + +// node_modules/ajv/dist/refs/jtd-schema.js +var require_jtd_schema = __commonJS({ + "node_modules/ajv/dist/refs/jtd-schema.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var shared = (root) => { + const sch = { + nullable: { type: "boolean" }, + metadata: { + optionalProperties: { + union: { elements: { ref: "schema" } } + }, + additionalProperties: true + } + }; + if (root) + sch.definitions = { values: { ref: "schema" } }; + return sch; + }; + var emptyForm = (root) => ({ + optionalProperties: shared(root) + }); + var refForm = (root) => ({ + properties: { + ref: { type: "string" } + }, + optionalProperties: shared(root) + }); + var typeForm = (root) => ({ + properties: { + type: { + enum: [ + "boolean", + "timestamp", + "string", + "float32", + "float64", + "int8", + "uint8", + "int16", + "uint16", + "int32", + "uint32" + ] + } + }, + optionalProperties: shared(root) + }); + var enumForm = (root) => ({ + properties: { + enum: { elements: { type: "string" } } + }, + optionalProperties: shared(root) + }); + var elementsForm = (root) => ({ + properties: { + elements: { ref: "schema" } + }, + optionalProperties: shared(root) + }); + var propertiesForm = (root) => ({ + properties: { + properties: { values: { ref: "schema" } } + }, + optionalProperties: { + optionalProperties: { values: { ref: "schema" } }, + additionalProperties: { type: "boolean" }, + ...shared(root) + } + }); + var optionalPropertiesForm = (root) => ({ + properties: { + optionalProperties: { values: { ref: "schema" } } + }, + optionalProperties: { + additionalProperties: { type: "boolean" }, + ...shared(root) + } + }); + var discriminatorForm = (root) => ({ + properties: { + discriminator: { type: "string" }, + mapping: { + values: { + metadata: { + union: [propertiesForm(false), optionalPropertiesForm(false)] + } + } + } + }, + optionalProperties: shared(root) + }); + var valuesForm = (root) => ({ + properties: { + values: { ref: "schema" } + }, + optionalProperties: shared(root) + }); + var schema = (root) => ({ + metadata: { + union: [ + emptyForm, + refForm, + typeForm, + enumForm, + elementsForm, + propertiesForm, + optionalPropertiesForm, + discriminatorForm, + valuesForm + ].map((s) => s(root)) + } + }); + var jtdMetaSchema = { + definitions: { + schema: schema(false) + }, + ...schema(true) + }; + exports2.default = jtdMetaSchema; + } +}); + +// node_modules/ajv/dist/compile/jtd/types.js +var require_types2 = __commonJS({ + "node_modules/ajv/dist/compile/jtd/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.jtdForms = void 0; + exports2.jtdForms = [ + "elements", + "values", + "discriminator", + "properties", + "optionalProperties", + "enum", + "type", + "ref" + ]; + } +}); + +// node_modules/ajv/dist/runtime/quote.js +var require_quote = __commonJS({ + "node_modules/ajv/dist/runtime/quote.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rxEscapable = ( + // eslint-disable-next-line no-control-regex, no-misleading-character-class + /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g + ); + var escaped = { + "\b": "\\b", + " ": "\\t", + "\n": "\\n", + "\f": "\\f", + "\r": "\\r", + '"': '\\"', + "\\": "\\\\" + }; + function quote(s) { + rxEscapable.lastIndex = 0; + return '"' + (rxEscapable.test(s) ? s.replace(rxEscapable, (a) => { + const c = escaped[a]; + return typeof c === "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4); + }) : s) + '"'; + } + exports2.default = quote; + quote.code = 'require("ajv/dist/runtime/quote").default'; + } +}); + +// node_modules/ajv/dist/compile/jtd/serialize.js +var require_serialize = __commonJS({ + "node_modules/ajv/dist/compile/jtd/serialize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var types_1 = require_types2(); + var __1 = require_compile(); + var codegen_1 = require_codegen(); + var ref_error_1 = require_ref_error(); + var names_1 = require_names(); + var code_1 = require_code2(); + var ref_1 = require_ref2(); + var util_1 = require_util2(); + var quote_1 = require_quote(); + var genSerialize = { + elements: serializeElements, + values: serializeValues, + discriminator: serializeDiscriminator, + properties: serializeProperties, + optionalProperties: serializeProperties, + enum: serializeString, + type: serializeType, + ref: serializeRef + }; + function compileSerializer(sch, definitions) { + const _sch = __1.getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + const serializeName = gen.scopeName("serialize"); + const cxt = { + self: this, + gen, + schema: sch.schema, + schemaEnv: sch, + definitions, + data: names_1.default.data + }; + let sourceCode; + try { + this._compilations.add(sch); + sch.serializeName = serializeName; + gen.func(serializeName, names_1.default.data, false, () => { + gen.let(names_1.default.json, (0, codegen_1.str)``); + serializeCode(cxt); + gen.return(names_1.default.json); + }); + gen.optimize(this.opts.code.optimize); + const serializeFuncCode = gen.toString(); + sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${serializeFuncCode}`; + const makeSerialize = new Function(`${names_1.default.scope}`, sourceCode); + const serialize = makeSerialize(this.scope.get()); + this.scope.value(serializeName, { ref: serialize }); + sch.serialize = serialize; + } catch (e) { + if (sourceCode) + this.logger.error("Error compiling serializer, function code:", sourceCode); + delete sch.serialize; + delete sch.serializeName; + throw e; + } finally { + this._compilations.delete(sch); + } + return sch; + } + exports2.default = compileSerializer; + function serializeCode(cxt) { + let form; + for (const key of types_1.jtdForms) { + if (key in cxt.schema) { + form = key; + break; + } + } + serializeNullable(cxt, form ? genSerialize[form] : serializeEmpty); + } + function serializeNullable(cxt, serializeForm) { + const { gen, schema, data } = cxt; + if (!schema.nullable) + return serializeForm(cxt); + gen.if((0, codegen_1._)`${data} === undefined || ${data} === null`, () => gen.add(names_1.default.json, (0, codegen_1._)`"null"`), () => serializeForm(cxt)); + } + function serializeElements(cxt) { + const { gen, schema, data } = cxt; + gen.add(names_1.default.json, (0, codegen_1.str)`[`); + const first = gen.let("first", true); + gen.forOf("el", data, (el) => { + addComma(cxt, first); + serializeCode({ ...cxt, schema: schema.elements, data: el }); + }); + gen.add(names_1.default.json, (0, codegen_1.str)`]`); + } + function serializeValues(cxt) { + const { gen, schema, data } = cxt; + gen.add(names_1.default.json, (0, codegen_1.str)`{`); + const first = gen.let("first", true); + gen.forIn("key", data, (key) => serializeKeyValue(cxt, key, schema.values, first)); + gen.add(names_1.default.json, (0, codegen_1.str)`}`); + } + function serializeKeyValue(cxt, key, schema, first) { + const { gen, data } = cxt; + addComma(cxt, first); + serializeString({ ...cxt, data: key }); + gen.add(names_1.default.json, (0, codegen_1.str)`:`); + const value = gen.const("value", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(key)}`); + serializeCode({ ...cxt, schema, data: value }); + } + function serializeDiscriminator(cxt) { + const { gen, schema, data } = cxt; + const { discriminator } = schema; + gen.add(names_1.default.json, (0, codegen_1.str)`{${JSON.stringify(discriminator)}:`); + const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(discriminator)}`); + serializeString({ ...cxt, data: tag }); + gen.if(false); + for (const tagValue in schema.mapping) { + gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); + const sch = schema.mapping[tagValue]; + serializeSchemaProperties({ ...cxt, schema: sch }, discriminator); + } + gen.endIf(); + gen.add(names_1.default.json, (0, codegen_1.str)`}`); + } + function serializeProperties(cxt) { + const { gen } = cxt; + gen.add(names_1.default.json, (0, codegen_1.str)`{`); + serializeSchemaProperties(cxt); + gen.add(names_1.default.json, (0, codegen_1.str)`}`); + } + function serializeSchemaProperties(cxt, discriminator) { + const { gen, schema, data } = cxt; + const { properties, optionalProperties } = schema; + const props = keys(properties); + const optProps = keys(optionalProperties); + const allProps = allProperties(props.concat(optProps)); + let first = !discriminator; + let firstProp; + for (const key of props) { + if (first) + first = false; + else + gen.add(names_1.default.json, (0, codegen_1.str)`,`); + serializeProperty(key, properties[key], keyValue(key)); + } + if (first) + firstProp = gen.let("first", true); + for (const key of optProps) { + const value = keyValue(key); + gen.if((0, codegen_1.and)((0, codegen_1._)`${value} !== undefined`, (0, code_1.isOwnProperty)(gen, data, key)), () => { + addComma(cxt, firstProp); + serializeProperty(key, optionalProperties[key], value); + }); + } + if (schema.additionalProperties) { + gen.forIn("key", data, (key) => gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, firstProp))); + } + function keys(ps2) { + return ps2 ? Object.keys(ps2) : []; + } + function allProperties(ps2) { + if (discriminator) + ps2.push(discriminator); + if (new Set(ps2).size !== ps2.length) { + throw new Error("JTD: properties/optionalProperties/disciminator overlap"); + } + return ps2; + } + function keyValue(key) { + return gen.const("value", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(key)}`); + } + function serializeProperty(key, propSchema, value) { + gen.add(names_1.default.json, (0, codegen_1.str)`${JSON.stringify(key)}:`); + serializeCode({ ...cxt, schema: propSchema, data: value }); + } + function isAdditional(key, ps2) { + return ps2.length ? (0, codegen_1.and)(...ps2.map((p) => (0, codegen_1._)`${key} !== ${p}`)) : true; + } + } + function serializeType(cxt) { + const { gen, schema, data } = cxt; + switch (schema.type) { + case "boolean": + gen.add(names_1.default.json, (0, codegen_1._)`${data} ? "true" : "false"`); + break; + case "string": + serializeString(cxt); + break; + case "timestamp": + gen.if((0, codegen_1._)`${data} instanceof Date`, () => gen.add(names_1.default.json, (0, codegen_1._)`'"' + ${data}.toISOString() + '"'`), () => serializeString(cxt)); + break; + default: + serializeNumber(cxt); + } + } + function serializeString({ gen, data }) { + gen.add(names_1.default.json, (0, codegen_1._)`${(0, util_1.useFunc)(gen, quote_1.default)}(${data})`); + } + function serializeNumber({ gen, data }) { + gen.add(names_1.default.json, (0, codegen_1._)`"" + ${data}`); + } + function serializeRef(cxt) { + const { gen, self: self2, data, definitions, schema, schemaEnv } = cxt; + const { ref } = schema; + const refSchema = definitions[ref]; + if (!refSchema) + throw new ref_error_1.default(self2.opts.uriResolver, "", ref, `No definition ${ref}`); + if (!(0, ref_1.hasRef)(refSchema)) + return serializeCode({ ...cxt, schema: refSchema }); + const { root } = schemaEnv; + const sch = compileSerializer.call(self2, new __1.SchemaEnv({ schema: refSchema, root }), definitions); + gen.add(names_1.default.json, (0, codegen_1._)`${getSerialize(gen, sch)}(${data})`); + } + function getSerialize(gen, sch) { + return sch.serialize ? gen.scopeValue("serialize", { ref: sch.serialize }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.serialize`; + } + function serializeEmpty({ gen, data }) { + gen.add(names_1.default.json, (0, codegen_1._)`JSON.stringify(${data})`); + } + function addComma({ gen }, first) { + if (first) { + gen.if(first, () => gen.assign(first, false), () => gen.add(names_1.default.json, (0, codegen_1.str)`,`)); + } else { + gen.add(names_1.default.json, (0, codegen_1.str)`,`); + } + } + } +}); + +// node_modules/ajv/dist/runtime/parseJson.js +var require_parseJson = __commonJS({ + "node_modules/ajv/dist/runtime/parseJson.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseJsonString = exports2.parseJsonNumber = exports2.parseJson = void 0; + var rxParseJson = /position\s(\d+)(?: \(line \d+ column \d+\))?$/; + function parseJson(s, pos) { + let endPos; + parseJson.message = void 0; + let matches; + if (pos) + s = s.slice(pos); + try { + parseJson.position = pos + s.length; + return JSON.parse(s); + } catch (e) { + matches = rxParseJson.exec(e.message); + if (!matches) { + parseJson.message = "unexpected end"; + return void 0; + } + endPos = +matches[1]; + const c = s[endPos]; + s = s.slice(0, endPos); + parseJson.position = pos + endPos; + try { + return JSON.parse(s); + } catch (e1) { + parseJson.message = `unexpected token ${c}`; + return void 0; + } + } + } + exports2.parseJson = parseJson; + parseJson.message = void 0; + parseJson.position = 0; + parseJson.code = 'require("ajv/dist/runtime/parseJson").parseJson'; + function parseJsonNumber(s, pos, maxDigits) { + let numStr = ""; + let c; + parseJsonNumber.message = void 0; + if (s[pos] === "-") { + numStr += "-"; + pos++; + } + if (s[pos] === "0") { + numStr += "0"; + pos++; + } else { + if (!parseDigits(maxDigits)) { + errorMessage(); + return void 0; + } + } + if (maxDigits) { + parseJsonNumber.position = pos; + return +numStr; + } + if (s[pos] === ".") { + numStr += "."; + pos++; + if (!parseDigits()) { + errorMessage(); + return void 0; + } + } + if (c = s[pos], c === "e" || c === "E") { + numStr += "e"; + pos++; + if (c = s[pos], c === "+" || c === "-") { + numStr += c; + pos++; + } + if (!parseDigits()) { + errorMessage(); + return void 0; + } + } + parseJsonNumber.position = pos; + return +numStr; + function parseDigits(maxLen) { + let digit = false; + while (c = s[pos], c >= "0" && c <= "9" && (maxLen === void 0 || maxLen-- > 0)) { + digit = true; + numStr += c; + pos++; + } + return digit; + } + function errorMessage() { + parseJsonNumber.position = pos; + parseJsonNumber.message = pos < s.length ? `unexpected token ${s[pos]}` : "unexpected end"; + } + } + exports2.parseJsonNumber = parseJsonNumber; + parseJsonNumber.message = void 0; + parseJsonNumber.position = 0; + parseJsonNumber.code = 'require("ajv/dist/runtime/parseJson").parseJsonNumber'; + var escapedChars = { + b: "\b", + f: "\f", + n: "\n", + r: "\r", + t: " ", + '"': '"', + "/": "/", + "\\": "\\" + }; + var CODE_A = "a".charCodeAt(0); + var CODE_0 = "0".charCodeAt(0); + function parseJsonString(s, pos) { + let str = ""; + let c; + parseJsonString.message = void 0; + while (true) { + c = s[pos++]; + if (c === '"') + break; + if (c === "\\") { + c = s[pos]; + if (c in escapedChars) { + str += escapedChars[c]; + pos++; + } else if (c === "u") { + pos++; + let count = 4; + let code = 0; + while (count--) { + code <<= 4; + c = s[pos]; + if (c === void 0) { + errorMessage("unexpected end"); + return void 0; + } + c = c.toLowerCase(); + if (c >= "a" && c <= "f") { + code += c.charCodeAt(0) - CODE_A + 10; + } else if (c >= "0" && c <= "9") { + code += c.charCodeAt(0) - CODE_0; + } else { + errorMessage(`unexpected token ${c}`); + return void 0; + } + pos++; + } + str += String.fromCharCode(code); + } else { + errorMessage(`unexpected token ${c}`); + return void 0; + } + } else if (c === void 0) { + errorMessage("unexpected end"); + return void 0; + } else { + if (c.charCodeAt(0) >= 32) { + str += c; + } else { + errorMessage(`unexpected token ${c}`); + return void 0; + } + } + } + parseJsonString.position = pos; + return str; + function errorMessage(msg) { + parseJsonString.position = pos; + parseJsonString.message = msg; + } + } + exports2.parseJsonString = parseJsonString; + parseJsonString.message = void 0; + parseJsonString.position = 0; + parseJsonString.code = 'require("ajv/dist/runtime/parseJson").parseJsonString'; + } +}); + +// node_modules/ajv/dist/compile/jtd/parse.js +var require_parse3 = __commonJS({ + "node_modules/ajv/dist/compile/jtd/parse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var types_1 = require_types2(); + var __1 = require_compile(); + var codegen_1 = require_codegen(); + var ref_error_1 = require_ref_error(); + var names_1 = require_names(); + var code_1 = require_code2(); + var ref_1 = require_ref2(); + var type_1 = require_type(); + var parseJson_1 = require_parseJson(); + var util_1 = require_util2(); + var timestamp_1 = require_timestamp(); + var genParse = { + elements: parseElements, + values: parseValues, + discriminator: parseDiscriminator, + properties: parseProperties, + optionalProperties: parseProperties, + enum: parseEnum, + type: parseType, + ref: parseRef + }; + function compileParser(sch, definitions) { + const _sch = __1.getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + const parseName = gen.scopeName("parse"); + const cxt = { + self: this, + gen, + schema: sch.schema, + schemaEnv: sch, + definitions, + data: names_1.default.data, + parseName, + char: gen.name("c") + }; + let sourceCode; + try { + this._compilations.add(sch); + sch.parseName = parseName; + parserFunction(cxt); + gen.optimize(this.opts.code.optimize); + const parseFuncCode = gen.toString(); + sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${parseFuncCode}`; + const makeParse = new Function(`${names_1.default.scope}`, sourceCode); + const parse = makeParse(this.scope.get()); + this.scope.value(parseName, { ref: parse }); + sch.parse = parse; + } catch (e) { + if (sourceCode) + this.logger.error("Error compiling parser, function code:", sourceCode); + delete sch.parse; + delete sch.parseName; + throw e; + } finally { + this._compilations.delete(sch); + } + return sch; + } + exports2.default = compileParser; + var undef = (0, codegen_1._)`undefined`; + function parserFunction(cxt) { + const { gen, parseName, char } = cxt; + gen.func(parseName, (0, codegen_1._)`${names_1.default.json}, ${names_1.default.jsonPos}, ${names_1.default.jsonPart}`, false, () => { + gen.let(names_1.default.data); + gen.let(char); + gen.assign((0, codegen_1._)`${parseName}.message`, undef); + gen.assign((0, codegen_1._)`${parseName}.position`, undef); + gen.assign(names_1.default.jsonPos, (0, codegen_1._)`${names_1.default.jsonPos} || 0`); + gen.const(names_1.default.jsonLen, (0, codegen_1._)`${names_1.default.json}.length`); + parseCode(cxt); + skipWhitespace(cxt); + gen.if(names_1.default.jsonPart, () => { + gen.assign((0, codegen_1._)`${parseName}.position`, names_1.default.jsonPos); + gen.return(names_1.default.data); + }); + gen.if((0, codegen_1._)`${names_1.default.jsonPos} === ${names_1.default.jsonLen}`, () => gen.return(names_1.default.data)); + jsonSyntaxError(cxt); + }); + } + function parseCode(cxt) { + let form; + for (const key of types_1.jtdForms) { + if (key in cxt.schema) { + form = key; + break; + } + } + if (form) + parseNullable(cxt, genParse[form]); + else + parseEmpty(cxt); + } + var parseBoolean = parseBooleanToken(true, parseBooleanToken(false, jsonSyntaxError)); + function parseNullable(cxt, parseForm) { + const { gen, schema, data } = cxt; + if (!schema.nullable) + return parseForm(cxt); + tryParseToken(cxt, "null", parseForm, () => gen.assign(data, null)); + } + function parseElements(cxt) { + const { gen, schema, data } = cxt; + parseToken(cxt, "["); + const ix = gen.let("i", 0); + gen.assign(data, (0, codegen_1._)`[]`); + parseItems(cxt, "]", () => { + const el = gen.let("el"); + parseCode({ ...cxt, schema: schema.elements, data: el }); + gen.assign((0, codegen_1._)`${data}[${ix}++]`, el); + }); + } + function parseValues(cxt) { + const { gen, schema, data } = cxt; + parseToken(cxt, "{"); + gen.assign(data, (0, codegen_1._)`{}`); + parseItems(cxt, "}", () => parseKeyValue(cxt, schema.values)); + } + function parseItems(cxt, endToken, block) { + tryParseItems(cxt, endToken, block); + parseToken(cxt, endToken); + } + function tryParseItems(cxt, endToken, block) { + const { gen } = cxt; + gen.for((0, codegen_1._)`;${names_1.default.jsonPos}<${names_1.default.jsonLen} && ${jsonSlice(1)}!==${endToken};`, () => { + block(); + tryParseToken(cxt, ",", () => gen.break(), hasItem); + }); + function hasItem() { + tryParseToken(cxt, endToken, () => { + }, jsonSyntaxError); + } + } + function parseKeyValue(cxt, schema) { + const { gen } = cxt; + const key = gen.let("key"); + parseString({ ...cxt, data: key }); + parseToken(cxt, ":"); + parsePropertyValue(cxt, key, schema); + } + function parseDiscriminator(cxt) { + const { gen, data, schema } = cxt; + const { discriminator, mapping } = schema; + parseToken(cxt, "{"); + gen.assign(data, (0, codegen_1._)`{}`); + const startPos = gen.const("pos", names_1.default.jsonPos); + const value = gen.let("value"); + const tag = gen.let("tag"); + tryParseItems(cxt, "}", () => { + const key = gen.let("key"); + parseString({ ...cxt, data: key }); + parseToken(cxt, ":"); + gen.if( + (0, codegen_1._)`${key} === ${discriminator}`, + () => { + parseString({ ...cxt, data: tag }); + gen.assign((0, codegen_1._)`${data}[${key}]`, tag); + gen.break(); + }, + () => parseEmpty({ ...cxt, data: value }) + // can be discarded/skipped + ); + }); + gen.assign(names_1.default.jsonPos, startPos); + gen.if((0, codegen_1._)`${tag} === undefined`); + parsingError(cxt, (0, codegen_1.str)`discriminator tag not found`); + for (const tagValue in mapping) { + gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); + parseSchemaProperties({ ...cxt, schema: mapping[tagValue] }, discriminator); + } + gen.else(); + parsingError(cxt, (0, codegen_1.str)`discriminator value not in schema`); + gen.endIf(); + } + function parseProperties(cxt) { + const { gen, data } = cxt; + parseToken(cxt, "{"); + gen.assign(data, (0, codegen_1._)`{}`); + parseSchemaProperties(cxt); + } + function parseSchemaProperties(cxt, discriminator) { + const { gen, schema, data } = cxt; + const { properties, optionalProperties, additionalProperties } = schema; + parseItems(cxt, "}", () => { + const key = gen.let("key"); + parseString({ ...cxt, data: key }); + parseToken(cxt, ":"); + gen.if(false); + parseDefinedProperty(cxt, key, properties); + parseDefinedProperty(cxt, key, optionalProperties); + if (discriminator) { + gen.elseIf((0, codegen_1._)`${key} === ${discriminator}`); + const tag = gen.let("tag"); + parseString({ ...cxt, data: tag }); + } + gen.else(); + if (additionalProperties) { + parseEmpty({ ...cxt, data: (0, codegen_1._)`${data}[${key}]` }); + } else { + parsingError(cxt, (0, codegen_1.str)`property ${key} not allowed`); + } + gen.endIf(); + }); + if (properties) { + const hasProp = (0, code_1.hasPropFunc)(gen); + const allProps = (0, codegen_1.and)(...Object.keys(properties).map((p) => (0, codegen_1._)`${hasProp}.call(${data}, ${p})`)); + gen.if((0, codegen_1.not)(allProps), () => parsingError(cxt, (0, codegen_1.str)`missing required properties`)); + } + } + function parseDefinedProperty(cxt, key, schemas = {}) { + const { gen } = cxt; + for (const prop in schemas) { + gen.elseIf((0, codegen_1._)`${key} === ${prop}`); + parsePropertyValue(cxt, key, schemas[prop]); + } + } + function parsePropertyValue(cxt, key, schema) { + parseCode({ ...cxt, schema, data: (0, codegen_1._)`${cxt.data}[${key}]` }); + } + function parseType(cxt) { + const { gen, schema, data, self: self2 } = cxt; + switch (schema.type) { + case "boolean": + parseBoolean(cxt); + break; + case "string": + parseString(cxt); + break; + case "timestamp": { + parseString(cxt); + const vts = (0, util_1.useFunc)(gen, timestamp_1.default); + const { allowDate, parseDate } = self2.opts; + const notValid = allowDate ? (0, codegen_1._)`!${vts}(${data}, true)` : (0, codegen_1._)`!${vts}(${data})`; + const fail = parseDate ? (0, codegen_1.or)(notValid, (0, codegen_1._)`(${data} = new Date(${data}), false)`, (0, codegen_1._)`isNaN(${data}.valueOf())`) : notValid; + gen.if(fail, () => parsingError(cxt, (0, codegen_1.str)`invalid timestamp`)); + break; + } + case "float32": + case "float64": + parseNumber(cxt); + break; + default: { + const t = schema.type; + if (!self2.opts.int32range && (t === "int32" || t === "uint32")) { + parseNumber(cxt, 16); + if (t === "uint32") { + gen.if((0, codegen_1._)`${data} < 0`, () => parsingError(cxt, (0, codegen_1.str)`integer out of range`)); + } + } else { + const [min, max, maxDigits] = type_1.intRange[t]; + parseNumber(cxt, maxDigits); + gen.if((0, codegen_1._)`${data} < ${min} || ${data} > ${max}`, () => parsingError(cxt, (0, codegen_1.str)`integer out of range`)); + } + } + } + } + function parseString(cxt) { + parseToken(cxt, '"'); + parseWith(cxt, parseJson_1.parseJsonString); + } + function parseEnum(cxt) { + const { gen, data, schema } = cxt; + const enumSch = schema.enum; + parseToken(cxt, '"'); + gen.if(false); + for (const value of enumSch) { + const valueStr = JSON.stringify(value).slice(1); + gen.elseIf((0, codegen_1._)`${jsonSlice(valueStr.length)} === ${valueStr}`); + gen.assign(data, (0, codegen_1.str)`${value}`); + gen.add(names_1.default.jsonPos, valueStr.length); + } + gen.else(); + jsonSyntaxError(cxt); + gen.endIf(); + } + function parseNumber(cxt, maxDigits) { + const { gen } = cxt; + skipWhitespace(cxt); + gen.if((0, codegen_1._)`"-0123456789".indexOf(${jsonSlice(1)}) < 0`, () => jsonSyntaxError(cxt), () => parseWith(cxt, parseJson_1.parseJsonNumber, maxDigits)); + } + function parseBooleanToken(bool, fail) { + return (cxt) => { + const { gen, data } = cxt; + tryParseToken(cxt, `${bool}`, () => fail(cxt), () => gen.assign(data, bool)); + }; + } + function parseRef(cxt) { + const { gen, self: self2, definitions, schema, schemaEnv } = cxt; + const { ref } = schema; + const refSchema = definitions[ref]; + if (!refSchema) + throw new ref_error_1.default(self2.opts.uriResolver, "", ref, `No definition ${ref}`); + if (!(0, ref_1.hasRef)(refSchema)) + return parseCode({ ...cxt, schema: refSchema }); + const { root } = schemaEnv; + const sch = compileParser.call(self2, new __1.SchemaEnv({ schema: refSchema, root }), definitions); + partialParse(cxt, getParser(gen, sch), true); + } + function getParser(gen, sch) { + return sch.parse ? gen.scopeValue("parse", { ref: sch.parse }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.parse`; + } + function parseEmpty(cxt) { + parseWith(cxt, parseJson_1.parseJson); + } + function parseWith(cxt, parseFunc, args) { + partialParse(cxt, (0, util_1.useFunc)(cxt.gen, parseFunc), args); + } + function partialParse(cxt, parseFunc, args) { + const { gen, data } = cxt; + gen.assign(data, (0, codegen_1._)`${parseFunc}(${names_1.default.json}, ${names_1.default.jsonPos}${args ? (0, codegen_1._)`, ${args}` : codegen_1.nil})`); + gen.assign(names_1.default.jsonPos, (0, codegen_1._)`${parseFunc}.position`); + gen.if((0, codegen_1._)`${data} === undefined`, () => parsingError(cxt, (0, codegen_1._)`${parseFunc}.message`)); + } + function parseToken(cxt, tok) { + tryParseToken(cxt, tok, jsonSyntaxError); + } + function tryParseToken(cxt, tok, fail, success) { + const { gen } = cxt; + const n = tok.length; + skipWhitespace(cxt); + gen.if((0, codegen_1._)`${jsonSlice(n)} === ${tok}`, () => { + gen.add(names_1.default.jsonPos, n); + success === null || success === void 0 ? void 0 : success(cxt); + }, () => fail(cxt)); + } + function skipWhitespace({ gen, char: c }) { + gen.code((0, codegen_1._)`while((${c}=${names_1.default.json}[${names_1.default.jsonPos}],${c}===" "||${c}==="\\n"||${c}==="\\r"||${c}==="\\t"))${names_1.default.jsonPos}++;`); + } + function jsonSlice(len) { + return len === 1 ? (0, codegen_1._)`${names_1.default.json}[${names_1.default.jsonPos}]` : (0, codegen_1._)`${names_1.default.json}.slice(${names_1.default.jsonPos}, ${names_1.default.jsonPos}+${len})`; + } + function jsonSyntaxError(cxt) { + parsingError(cxt, (0, codegen_1._)`"unexpected token " + ${names_1.default.json}[${names_1.default.jsonPos}]`); + } + function parsingError({ gen, parseName }, msg) { + gen.assign((0, codegen_1._)`${parseName}.message`, msg); + gen.assign((0, codegen_1._)`${parseName}.position`, names_1.default.jsonPos); + gen.return(undef); + } + } +}); + +// node_modules/ajv/dist/jtd.js +var require_jtd2 = __commonJS({ + "node_modules/ajv/dist/jtd.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MissingRefError = exports2.ValidationError = exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = exports2.Ajv = void 0; + var core_1 = require_core(); + var jtd_1 = require_jtd(); + var jtd_schema_1 = require_jtd_schema(); + var serialize_1 = require_serialize(); + var parse_1 = require_parse3(); + var META_SCHEMA_ID = "JTD-meta-schema"; + var Ajv = class extends core_1.default { + constructor(opts = {}) { + super({ + ...opts, + jtd: true + }); + } + _addVocabularies() { + super._addVocabularies(); + this.addVocabulary(jtd_1.default); + } + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + if (!this.opts.meta) + return; + this.addMetaSchema(jtd_schema_1.default, META_SCHEMA_ID, false); + } + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); + } + compileSerializer(schema) { + const sch = this._addSchema(schema); + return sch.serialize || this._compileSerializer(sch); + } + compileParser(schema) { + const sch = this._addSchema(schema); + return sch.parse || this._compileParser(sch); + } + _compileSerializer(sch) { + serialize_1.default.call(this, sch, sch.schema.definitions || {}); + if (!sch.serialize) + throw new Error("ajv implementation error"); + return sch.serialize; + } + _compileParser(sch) { + parse_1.default.call(this, sch, sch.schema.definitions || {}); + if (!sch.parse) + throw new Error("ajv implementation error"); + return sch.parse; + } + }; + exports2.Ajv = Ajv; + module2.exports = exports2 = Ajv; + module2.exports.Ajv = Ajv; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = Ajv; + var validate_1 = require_validate(); + Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports2, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports2, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports2, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports2, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error(); + Object.defineProperty(exports2, "ValidationError", { enumerable: true, get: function() { + return validation_error_1.default; + } }); + var ref_error_1 = require_ref_error(); + Object.defineProperty(exports2, "MissingRefError", { enumerable: true, get: function() { + return ref_error_1.default; + } }); + } +}); + +// node_modules/@fastify/ajv-compiler/lib/default-ajv-options.js +var require_default_ajv_options = __commonJS({ + "node_modules/@fastify/ajv-compiler/lib/default-ajv-options.js"(exports2, module2) { + "use strict"; + var fastUri = require_fast_uri(); + module2.exports = Object.freeze({ + coerceTypes: "array", + useDefaults: true, + removeAdditional: true, + uriResolver: fastUri, + addUsedSchema: false, + // Explicitly set allErrors to `false`. + // When set to `true`, a DoS attack is possible. + allErrors: false + }); + } +}); + +// node_modules/@fastify/ajv-compiler/lib/validator-compiler.js +var require_validator_compiler = __commonJS({ + "node_modules/@fastify/ajv-compiler/lib/validator-compiler.js"(exports2, module2) { + "use strict"; + var Ajv = require_ajv().default; + var AjvJTD = require_jtd2(); + var defaultAjvOptions = require_default_ajv_options(); + var ValidatorCompiler = class { + constructor(externalSchemas, options) { + if (options.mode === "JTD") { + this.ajv = new AjvJTD(Object.assign({}, defaultAjvOptions, options.customOptions)); + } else { + this.ajv = new Ajv(Object.assign({}, defaultAjvOptions, options.customOptions)); + } + let addFormatPlugin = true; + if (options.plugins && options.plugins.length > 0) { + for (const plugin of options.plugins) { + if (Array.isArray(plugin)) { + addFormatPlugin = addFormatPlugin && plugin[0].name !== "formatsPlugin"; + plugin[0](this.ajv, plugin[1]); + } else { + addFormatPlugin = addFormatPlugin && plugin.name !== "formatsPlugin"; + plugin(this.ajv); + } + } + } + if (addFormatPlugin) { + require_dist2()(this.ajv); + } + options.onCreate?.(this.ajv); + const sourceSchemas = Object.values(externalSchemas); + for (const extSchema of sourceSchemas) { + this.ajv.addSchema(extSchema); + } + } + buildValidatorFunction({ + schema + /*, method, url, httpPart */ + }) { + if (schema.$id) { + const stored = this.ajv.getSchema(schema.$id); + if (stored) { + return stored; + } + } + return this.ajv.compile(schema); + } + }; + module2.exports = ValidatorCompiler; + } +}); + +// node_modules/@fastify/ajv-compiler/lib/serializer-compiler.js +var require_serializer_compiler = __commonJS({ + "node_modules/@fastify/ajv-compiler/lib/serializer-compiler.js"(exports2, module2) { + "use strict"; + var AjvJTD = require_jtd2(); + var defaultAjvOptions = require_default_ajv_options(); + var SerializerCompiler = class { + constructor(_externalSchemas, options) { + this.ajv = new AjvJTD(Object.assign({}, defaultAjvOptions, options)); + } + buildSerializerFunction({ + schema + /*, method, url, httpStatus */ + }) { + return this.ajv.compileSerializer(schema); + } + }; + module2.exports = SerializerCompiler; + } +}); + +// node_modules/ajv/dist/standalone/index.js +var require_standalone3 = __commonJS({ + "node_modules/ajv/dist/standalone/index.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var scope_1 = require_scope(); + var code_1 = require_code(); + function standaloneCode(ajv, refsOrFunc) { + if (!ajv.opts.code.source) { + throw new Error("moduleCode: ajv instance must have code.source option"); + } + const { _n } = ajv.scope.opts; + return typeof refsOrFunc == "function" ? funcExportCode(refsOrFunc.source) : refsOrFunc !== void 0 ? multiExportsCode(refsOrFunc, getValidate) : multiExportsCode(ajv.schemas, (sch) => sch.meta ? void 0 : ajv.compile(sch.schema)); + function getValidate(id2) { + const v = ajv.getSchema(id2); + if (!v) + throw new Error(`moduleCode: no schema with id ${id2}`); + return v; + } + function funcExportCode(source) { + const usedValues = {}; + const n = source === null || source === void 0 ? void 0 : source.validateName; + const vCode = validateCode(usedValues, source); + if (ajv.opts.code.esm) { + return `"use strict";${_n}export const validate = ${n};${_n}export default ${n};${_n}${vCode}`; + } + return `"use strict";${_n}module.exports = ${n};${_n}module.exports.default = ${n};${_n}${vCode}`; + } + function multiExportsCode(schemas, getValidateFunc) { + var _a; + const usedValues = {}; + let code = (0, code_1._)`"use strict";`; + for (const name in schemas) { + const v = getValidateFunc(schemas[name]); + if (v) { + const vCode = validateCode(usedValues, v.source); + const exportSyntax = ajv.opts.code.esm ? (0, code_1._)`export const ${(0, code_1.getEsmExportName)(name)}` : (0, code_1._)`exports${(0, code_1.getProperty)(name)}`; + code = (0, code_1._)`${code}${_n}${exportSyntax} = ${(_a = v.source) === null || _a === void 0 ? void 0 : _a.validateName};${_n}${vCode}`; + } + } + return `${code}`; + } + function validateCode(usedValues, s) { + if (!s) + throw new Error('moduleCode: function does not have "source" property'); + if (usedState(s.validateName) === scope_1.UsedValueState.Completed) + return code_1.nil; + setUsedState(s.validateName, scope_1.UsedValueState.Started); + const scopeCode = ajv.scope.scopeCode(s.scopeValues, usedValues, refValidateCode); + const code = new code_1._Code(`${scopeCode}${_n}${s.validateCode}`); + return s.evaluated ? (0, code_1._)`${code}${s.validateName}.evaluated = ${s.evaluated};${_n}` : code; + function refValidateCode(n) { + var _a; + const vRef = (_a = n.value) === null || _a === void 0 ? void 0 : _a.ref; + if (n.prefix === "validate" && typeof vRef == "function") { + const v = vRef; + return validateCode(usedValues, v.source); + } else if ((n.prefix === "root" || n.prefix === "wrapper") && typeof vRef == "object") { + const { validate, validateName } = vRef; + if (!validateName) + throw new Error("ajv internal error"); + const def = ajv.opts.code.es5 ? scope_1.varKinds.var : scope_1.varKinds.const; + const wrapper = (0, code_1._)`${def} ${n} = {validate: ${validateName}};`; + if (usedState(validateName) === scope_1.UsedValueState.Started) + return wrapper; + const vCode = validateCode(usedValues, validate === null || validate === void 0 ? void 0 : validate.source); + return (0, code_1._)`${wrapper}${_n}${vCode}`; + } + return void 0; + } + function usedState(name) { + var _a; + return (_a = usedValues[name.prefix]) === null || _a === void 0 ? void 0 : _a.get(name); + } + function setUsedState(name, state) { + const { prefix } = name; + const names = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map(); + names.set(name, state); + } + } + } + module2.exports = exports2 = standaloneCode; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = standaloneCode; + } +}); + +// node_modules/@fastify/ajv-compiler/standalone.js +var require_standalone4 = __commonJS({ + "node_modules/@fastify/ajv-compiler/standalone.js"(exports2, module2) { + "use strict"; + var ValidatorSelector = require_ajv_compiler(); + var standaloneCode = require_standalone3().default; + function StandaloneValidator(options = { readMode: true }) { + if (options.readMode === true && !options.restoreFunction) { + throw new Error("You must provide a restoreFunction options when readMode ON"); + } + if (options.readMode !== true && !options.storeFunction) { + throw new Error("You must provide a storeFunction options when readMode OFF"); + } + if (options.readMode === true) { + return function wrapper() { + return function(opts) { + return options.restoreFunction(opts); + }; + }; + } + const factory = ValidatorSelector(); + return function wrapper(externalSchemas, ajvOptions = {}) { + if (!ajvOptions.customOptions || !ajvOptions.customOptions.code) { + ajvOptions.customOptions = Object.assign({}, ajvOptions.customOptions, { code: { source: true } }); + } + const compiler = factory(externalSchemas, ajvOptions); + return function(opts) { + const validationFunc = compiler(opts); + const schemaValidationCode = standaloneCode(compiler[ValidatorSelector.AjvReference].ajv, validationFunc); + options.storeFunction(opts, schemaValidationCode); + return validationFunc; + }; + }; + } + module2.exports = StandaloneValidator; + } +}); + +// node_modules/@fastify/ajv-compiler/index.js +var require_ajv_compiler = __commonJS({ + "node_modules/@fastify/ajv-compiler/index.js"(exports2, module2) { + "use strict"; + var AjvReference = Symbol.for("fastify.ajv-compiler.reference"); + var ValidatorCompiler = require_validator_compiler(); + var SerializerCompiler = require_serializer_compiler(); + function AjvCompiler(opts) { + const validatorPool = /* @__PURE__ */ new Map(); + const serializerPool = /* @__PURE__ */ new Map(); + if (opts && opts.jtdSerializer === true) { + return function buildSerializerFromPool(externalSchemas, serializerOpts) { + const uniqueAjvKey = getPoolKey({}, serializerOpts); + if (serializerPool.has(uniqueAjvKey)) { + return serializerPool.get(uniqueAjvKey); + } + const compiler = new SerializerCompiler(externalSchemas, serializerOpts); + const ret = compiler.buildSerializerFunction.bind(compiler); + serializerPool.set(uniqueAjvKey, ret); + return ret; + }; + } + return function buildCompilerFromPool(externalSchemas, options) { + const uniqueAjvKey = getPoolKey(externalSchemas, options.customOptions); + if (validatorPool.has(uniqueAjvKey)) { + return validatorPool.get(uniqueAjvKey); + } + const compiler = new ValidatorCompiler(externalSchemas, options); + const ret = compiler.buildValidatorFunction.bind(compiler); + validatorPool.set(uniqueAjvKey, ret); + if (options.customOptions.code !== void 0) { + ret[AjvReference] = compiler; + } + return ret; + }; + } + function getPoolKey(externalSchemas, options) { + const externals = JSON.stringify(externalSchemas); + const ajvConfig = JSON.stringify(options); + return `${externals}${ajvConfig}`; + } + module2.exports = AjvCompiler; + module2.exports.default = AjvCompiler; + module2.exports.AjvCompiler = AjvCompiler; + module2.exports.AjvReference = AjvReference; + module2.exports.StandaloneValidator = require_standalone4(); + } +}); + +// node_modules/fastify/lib/schema-controller.js +var require_schema_controller = __commonJS({ + "node_modules/fastify/lib/schema-controller.js"(exports2, module2) { + "use strict"; + var { buildSchemas } = require_schemas(); + var SerializerSelector = require_fast_json_stringify_compiler(); + var ValidatorSelector = require_ajv_compiler(); + function buildSchemaController(parentSchemaCtrl, opts) { + if (parentSchemaCtrl) { + return new SchemaController(parentSchemaCtrl, opts); + } + const compilersFactory = Object.assign({ + buildValidator: null, + buildSerializer: null + }, opts?.compilersFactory); + if (!compilersFactory.buildValidator) { + compilersFactory.buildValidator = ValidatorSelector(); + } + if (!compilersFactory.buildSerializer) { + compilersFactory.buildSerializer = SerializerSelector(); + } + const option = { + bucket: opts && opts.bucket || buildSchemas, + compilersFactory, + isCustomValidatorCompiler: typeof opts?.compilersFactory?.buildValidator === "function", + isCustomSerializerCompiler: typeof opts?.compilersFactory?.buildValidator === "function" + }; + return new SchemaController(void 0, option); + } + var SchemaController = class { + constructor(parent, options) { + this.opts = options || parent?.opts; + this.addedSchemas = false; + this.compilersFactory = this.opts.compilersFactory; + if (parent) { + this.schemaBucket = this.opts.bucket(parent.getSchemas()); + this.validatorCompiler = parent.getValidatorCompiler(); + this.serializerCompiler = parent.getSerializerCompiler(); + this.isCustomValidatorCompiler = parent.isCustomValidatorCompiler; + this.isCustomSerializerCompiler = parent.isCustomSerializerCompiler; + this.parent = parent; + } else { + this.schemaBucket = this.opts.bucket(); + this.isCustomValidatorCompiler = this.opts.isCustomValidatorCompiler || false; + this.isCustomSerializerCompiler = this.opts.isCustomSerializerCompiler || false; + } + } + // Bucket interface + add(schema) { + this.addedSchemas = true; + return this.schemaBucket.add(schema); + } + getSchema(schemaId) { + return this.schemaBucket.getSchema(schemaId); + } + getSchemas() { + return this.schemaBucket.getSchemas(); + } + setValidatorCompiler(validatorCompiler) { + this.compilersFactory = Object.assign( + {}, + this.compilersFactory, + { buildValidator: () => validatorCompiler } + ); + this.validatorCompiler = validatorCompiler; + this.isCustomValidatorCompiler = true; + } + setSerializerCompiler(serializerCompiler) { + this.compilersFactory = Object.assign( + {}, + this.compilersFactory, + { buildSerializer: () => serializerCompiler } + ); + this.serializerCompiler = serializerCompiler; + this.isCustomSerializerCompiler = true; + } + getValidatorCompiler() { + return this.validatorCompiler || this.parent && this.parent.getValidatorCompiler(); + } + getSerializerCompiler() { + return this.serializerCompiler || this.parent && this.parent.getSerializerCompiler(); + } + getSerializerBuilder() { + return this.compilersFactory.buildSerializer || this.parent && this.parent.getSerializerBuilder(); + } + getValidatorBuilder() { + return this.compilersFactory.buildValidator || this.parent && this.parent.getValidatorBuilder(); + } + /** + * This method will be called when a validator must be setup. + * Do not setup the compiler more than once + * @param {object} serverOptions the fastify server options + */ + setupValidator(serverOptions) { + const isReady = this.validatorCompiler !== void 0 && !this.addedSchemas; + if (isReady) { + return; + } + this.validatorCompiler = this.getValidatorBuilder()(this.schemaBucket.getSchemas(), serverOptions.ajv); + } + /** + * This method will be called when a serializer must be setup. + * Do not setup the compiler more than once + * @param {object} serverOptions the fastify server options + */ + setupSerializer(serverOptions) { + const isReady = this.serializerCompiler !== void 0 && !this.addedSchemas; + if (isReady) { + return; + } + this.serializerCompiler = this.getSerializerBuilder()(this.schemaBucket.getSchemas(), serverOptions.serializerOpts); + } + }; + SchemaController.buildSchemaController = buildSchemaController; + module2.exports = SchemaController; + } +}); + +// node_modules/semver/internal/constants.js +var require_constants2 = __commonJS({ + "node_modules/semver/internal/constants.js"(exports2, module2) { + "use strict"; + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var RELEASE_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ]; + module2.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; + } +}); + +// node_modules/semver/internal/debug.js +var require_debug2 = __commonJS({ + "node_modules/semver/internal/debug.js"(exports2, module2) { + "use strict"; + var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { + }; + module2.exports = debug; + } +}); + +// node_modules/semver/internal/re.js +var require_re = __commonJS({ + "node_modules/semver/internal/re.js"(exports2, module2) { + "use strict"; + var { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH + } = require_constants2(); + var debug = require_debug2(); + exports2 = module2.exports = {}; + var re = exports2.re = []; + var safeRe = exports2.safeRe = []; + var src = exports2.src = []; + var safeSrc = exports2.safeSrc = []; + var t = exports2.t = {}; + var R = 0; + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + var makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); + } + return value; + }; + var createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value); + const index = R++; + debug(name, index, value); + t[name] = index; + src[index] = value; + safeSrc[index] = safe; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); + createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("COERCERTLFULL", src[t.COERCEFULL], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports2.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports2.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports2.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } +}); + +// node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "node_modules/semver/internal/parse-options.js"(exports2, module2) { + "use strict"; + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = (options) => { + if (!options) { + return emptyOpts; + } + if (typeof options !== "object") { + return looseOption; + } + return options; + }; + module2.exports = parseOptions; + } +}); + +// node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "node_modules/semver/internal/identifiers.js"(exports2, module2) { + "use strict"; + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "node_modules/semver/classes/semver.js"(exports2, module2) { + "use strict"; + var debug = require_debug2(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants2(); + var { safeRe: re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var SemVer = class _SemVer { + constructor(version2, options) { + options = parseOptions(options); + if (version2 instanceof _SemVer) { + if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { + return version2; + } else { + version2 = version2.version; + } + } else if (typeof version2 !== "string") { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`); + } + if (version2.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ); + } + debug("SemVer", version2, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version2}`); + } + this.raw = version2; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id2) => { + if (/^[0-9]+$/.test(id2)) { + const num = +id2; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id2; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof _SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new _SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + } + comparePre(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + compareBuild(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("build compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc(release, identifier, identifierBase) { + if (release.startsWith("pre")) { + if (!identifier && identifierBase === false) { + throw new Error("invalid increment argument: identifier is empty"); + } + if (identifier) { + const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); + if (!match || match[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`); + } + } + } + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier, identifierBase); + } + this.inc("pre", identifier, identifierBase); + break; + case "release": + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`); + } + this.prerelease.length = 0; + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (this.prerelease.length === 0) { + this.prerelease = [base]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + if (identifier === this.prerelease.join(".") && identifierBase === false) { + throw new Error("invalid increment argument: identifier already exists"); + } + this.prerelease.push(base); + } + } + if (identifier) { + let prerelease = [identifier, base]; + if (identifierBase === false) { + prerelease = [identifier]; + } + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = prerelease; + } + } else { + this.prerelease = prerelease; + } + } + break; + } + default: + throw new Error(`invalid increment argument: ${release}`); + } + this.raw = this.format(); + if (this.build.length) { + this.raw += `+${this.build.join(".")}`; + } + return this; + } + }; + module2.exports = SemVer; + } +}); + +// node_modules/semver/functions/parse.js +var require_parse4 = __commonJS({ + "node_modules/semver/functions/parse.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var parse = (version2, options, throwErrors = false) => { + if (version2 instanceof SemVer) { + return version2; + } + try { + return new SemVer(version2, options); + } catch (er) { + if (!throwErrors) { + return null; + } + throw er; + } + }; + module2.exports = parse; + } +}); + +// node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + "node_modules/semver/functions/valid.js"(exports2, module2) { + "use strict"; + var parse = require_parse4(); + var valid = (version2, options) => { + const v = parse(version2, options); + return v ? v.version : null; + }; + module2.exports = valid; + } +}); + +// node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + "node_modules/semver/functions/clean.js"(exports2, module2) { + "use strict"; + var parse = require_parse4(); + var clean = (version2, options) => { + const s = parse(version2.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }; + module2.exports = clean; + } +}); + +// node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + "node_modules/semver/functions/inc.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var inc = (version2, release, options, identifier, identifierBase) => { + if (typeof options === "string") { + identifierBase = identifier; + identifier = options; + options = void 0; + } + try { + return new SemVer( + version2 instanceof SemVer ? version2.version : version2, + options + ).inc(release, identifier, identifierBase).version; + } catch (er) { + return null; + } + }; + module2.exports = inc; + } +}); + +// node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + "node_modules/semver/functions/diff.js"(exports2, module2) { + "use strict"; + var parse = require_parse4(); + var diff = (version1, version2) => { + const v1 = parse(version1, null, true); + const v2 = parse(version2, null, true); + const comparison = v1.compare(v2); + if (comparison === 0) { + return null; + } + const v1Higher = comparison > 0; + const highVersion = v1Higher ? v1 : v2; + const lowVersion = v1Higher ? v2 : v1; + const highHasPre = !!highVersion.prerelease.length; + const lowHasPre = !!lowVersion.prerelease.length; + if (lowHasPre && !highHasPre) { + if (!lowVersion.patch && !lowVersion.minor) { + return "major"; + } + if (lowVersion.compareMain(highVersion) === 0) { + if (lowVersion.minor && !lowVersion.patch) { + return "minor"; + } + return "patch"; + } + } + const prefix = highHasPre ? "pre" : ""; + if (v1.major !== v2.major) { + return prefix + "major"; + } + if (v1.minor !== v2.minor) { + return prefix + "minor"; + } + if (v1.patch !== v2.patch) { + return prefix + "patch"; + } + return "prerelease"; + }; + module2.exports = diff; + } +}); + +// node_modules/semver/functions/major.js +var require_major = __commonJS({ + "node_modules/semver/functions/major.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var major = (a, loose) => new SemVer(a, loose).major; + module2.exports = major; + } +}); + +// node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + "node_modules/semver/functions/minor.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var minor = (a, loose) => new SemVer(a, loose).minor; + module2.exports = minor; + } +}); + +// node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + "node_modules/semver/functions/patch.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var patch = (a, loose) => new SemVer(a, loose).patch; + module2.exports = patch; + } +}); + +// node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + "node_modules/semver/functions/prerelease.js"(exports2, module2) { + "use strict"; + var parse = require_parse4(); + var prerelease = (version2, options) => { + const parsed = parse(version2, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }; + module2.exports = prerelease; + } +}); + +// node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "node_modules/semver/functions/compare.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module2.exports = compare; + } +}); + +// node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + "node_modules/semver/functions/rcompare.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var rcompare = (a, b, loose) => compare(b, a, loose); + module2.exports = rcompare; + } +}); + +// node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + "node_modules/semver/functions/compare-loose.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var compareLoose = (a, b) => compare(a, b, true); + module2.exports = compareLoose; + } +}); + +// node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + "node_modules/semver/functions/compare-build.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }; + module2.exports = compareBuild; + } +}); + +// node_modules/semver/functions/sort.js +var require_sort = __commonJS({ + "node_modules/semver/functions/sort.js"(exports2, module2) { + "use strict"; + var compareBuild = require_compare_build(); + var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module2.exports = sort; + } +}); + +// node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + "node_modules/semver/functions/rsort.js"(exports2, module2) { + "use strict"; + var compareBuild = require_compare_build(); + var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module2.exports = rsort; + } +}); + +// node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + "node_modules/semver/functions/gt.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var gt = (a, b, loose) => compare(a, b, loose) > 0; + module2.exports = gt; + } +}); + +// node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + "node_modules/semver/functions/lt.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var lt = (a, b, loose) => compare(a, b, loose) < 0; + module2.exports = lt; + } +}); + +// node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + "node_modules/semver/functions/eq.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + +// node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + "node_modules/semver/functions/neq.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var neq = (a, b, loose) => compare(a, b, loose) !== 0; + module2.exports = neq; + } +}); + +// node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "node_modules/semver/functions/gte.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte; + } +}); + +// node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + "node_modules/semver/functions/lte.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var lte = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte; + } +}); + +// node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + "node_modules/semver/functions/cmp.js"(exports2, module2) { + "use strict"; + var eq = require_eq(); + var neq = require_neq(); + var gt = require_gt(); + var gte = require_gte(); + var lt = require_lt(); + var lte = require_lte(); + var cmp = (a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a === b; + case "!==": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError(`Invalid operator: ${op}`); + } + }; + module2.exports = cmp; + } +}); + +// node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + "node_modules/semver/functions/coerce.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var parse = require_parse4(); + var { safeRe: re, t } = require_re(); + var coerce = (version2, options) => { + if (version2 instanceof SemVer) { + return version2; + } + if (typeof version2 === "number") { + version2 = String(version2); + } + if (typeof version2 !== "string") { + return null; + } + options = options || {}; + let match = null; + if (!options.rtl) { + match = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); + } else { + const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; + let next; + while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; + } + coerceRtlRegex.lastIndex = -1; + } + if (match === null) { + return null; + } + const major = match[2]; + const minor = match[3] || "0"; + const patch = match[4] || "0"; + const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ""; + const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; + return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options); + }; + module2.exports = coerce; + } +}); + +// node_modules/semver/internal/lrucache.js +var require_lrucache = __commonJS({ + "node_modules/semver/internal/lrucache.js"(exports2, module2) { + "use strict"; + var LRUCache2 = class { + constructor() { + this.max = 1e3; + this.map = /* @__PURE__ */ new Map(); + } + get(key) { + const value = this.map.get(key); + if (value === void 0) { + return void 0; + } else { + this.map.delete(key); + this.map.set(key, value); + return value; + } + } + delete(key) { + return this.map.delete(key); + } + set(key, value) { + const deleted = this.delete(key); + if (!deleted && value !== void 0) { + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value; + this.delete(firstKey); + } + this.map.set(key, value); + } + return this; + } + }; + module2.exports = LRUCache2; + } +}); + +// node_modules/semver/classes/range.js +var require_range = __commonJS({ + "node_modules/semver/classes/range.js"(exports2, module2) { + "use strict"; + var SPACE_CHARACTERS = /\s+/g; + var Range = class _Range { + constructor(range, options) { + options = parseOptions(options); + if (range instanceof _Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new _Range(range.raw, options); + } + } + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.formatted = void 0; + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range.trim().replace(SPACE_CHARACTERS, " "); + this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`); + } + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) { + this.set = [first]; + } else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + } + this.formatted = void 0; + } + get range() { + if (this.formatted === void 0) { + this.formatted = ""; + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += "||"; + } + const comps = this.set[i]; + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += " "; + } + this.formatted += comps[k].toString().trim(); + } + } + } + return this.formatted; + } + format() { + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); + const memoKey = memoOpts + ":" + range; + const cached = cache.get(memoKey); + if (cached) { + return cached; + } + const loose = this.options.loose; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + debug("tilde trim", range); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + debug("caret trim", range); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + if (loose) { + rangeList = rangeList.filter((comp) => { + debug("loose invalid filter", comp, this.options); + return !!comp.match(re[t.COMPARATORLOOSE]); + }); + } + debug("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp]; + } + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) { + rangeMap.delete(""); + } + const result = [...rangeMap.values()]; + cache.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof _Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + // if ANY of the sets match ALL of its comparators, then pass + test(version2) { + if (!version2) { + return false; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version2, this.options)) { + return true; + } + } + return false; + } + }; + module2.exports = Range; + var LRU = require_lrucache(); + var cache = new LRU(); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug = require_debug2(); + var SemVer = require_semver(); + var { + safeRe: re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants2(); + var isNullSet = (c) => c.value === "<0.0.0-0"; + var isAny = (c) => c.value === ""; + var isSatisfiable = (comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }; + var parseComparator = (comp, options) => { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + }; + var isX = (id2) => !id2 || id2.toLowerCase() === "x" || id2 === "*"; + var replaceTildes = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); + }; + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, (_, M, m, p, pr) => { + debug("tilde", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; + } else if (isX(p)) { + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; + } else if (pr) { + debug("replaceTilde pr", pr); + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug("tilde return", ret); + return ret; + }); + }; + var replaceCarets = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); + }; + var replaceCaret = (comp, options) => { + debug("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + const z2 = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_, M, m, p, pr) => { + debug("caret", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + if (M === "0") { + ret = `>=${M}.${m}.0${z2} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.0${z2} <${+M + 1}.0.0-0`; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}${z2} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}${z2} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + } + debug("caret return", ret); + return ret; + }); + }; + var replaceXRanges = (comp, options) => { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); + }; + var replaceXRange = (comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + if (gtlt === "<") { + pr = "-0"; + } + ret = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + } + debug("xRange return", ret); + return ret; + }); + }; + var replaceStars = (comp, options) => { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + }; + var replaceGTE0 = (comp, options) => { + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + }; + var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp2, tpr) => { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + } else if (fpr) { + from = `>=${from}`; + } else { + from = `>=${from}${incPr ? "-0" : ""}`; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0`; + } else if (isX(tp2)) { + to = `<${tM}.${+tm + 1}.0-0`; + } else if (tpr) { + to = `<=${tM}.${tm}.${tp2}-${tpr}`; + } else if (incPr) { + to = `<${tM}.${tm}.${+tp2 + 1}-0`; + } else { + to = `<=${to}`; + } + return `${from} ${to}`.trim(); + }; + var testSet = (set, version2, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version2)) { + return false; + } + } + if (version2.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) { + continue; + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { + return true; + } + } + } + return false; + } + return true; + }; + } +}); + +// node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + "node_modules/semver/classes/comparator.js"(exports2, module2) { + "use strict"; + var ANY = Symbol("SemVer ANY"); + var Comparator = class _Comparator { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof _Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + comp = comp.trim().split(/\s+/).join(" "); + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version2) { + debug("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { + return true; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + return cmp(version2, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof _Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (this.operator === "") { + if (this.value === "") { + return true; + } + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + return new Range(this.value, options).test(comp.semver); + } + options = parseOptions(options); + if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { + return false; + } + if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { + return false; + } + if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { + return true; + } + if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { + return true; + } + if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { + return true; + } + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { + return true; + } + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { + return true; + } + return false; + } + }; + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { safeRe: re, t } = require_re(); + var cmp = require_cmp(); + var debug = require_debug2(); + var SemVer = require_semver(); + var Range = require_range(); + } +}); + +// node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + "node_modules/semver/functions/satisfies.js"(exports2, module2) { + "use strict"; + var Range = require_range(); + var satisfies = (version2, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version2); + }; + module2.exports = satisfies; + } +}); + +// node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + "node_modules/semver/ranges/to-comparators.js"(exports2, module2) { + "use strict"; + var Range = require_range(); + var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module2.exports = toComparators; + } +}); + +// node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + "node_modules/semver/ranges/max-satisfying.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Range = require_range(); + var maxSatisfying = (versions, range, options) => { + let max = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + }; + module2.exports = maxSatisfying; + } +}); + +// node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + "node_modules/semver/ranges/min-satisfying.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Range = require_range(); + var minSatisfying = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + }; + module2.exports = minSatisfying; + } +}); + +// node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + "node_modules/semver/ranges/min-version.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Range = require_range(); + var gt = require_gt(); + var minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + /* fallthrough */ + case "": + case ">=": + if (!setMin || gt(compver, setMin)) { + setMin = compver; + } + break; + case "<": + case "<=": + break; + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`); + } + }); + if (setMin && (!minver || gt(minver, setMin))) { + minver = setMin; + } + } + if (minver && range.test(minver)) { + return minver; + } + return null; + }; + module2.exports = minVersion; + } +}); + +// node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + "node_modules/semver/ranges/valid.js"(exports2, module2) { + "use strict"; + var Range = require_range(); + var validRange = (range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + }; + module2.exports = validRange; + } +}); + +// node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + "node_modules/semver/ranges/outside.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var Range = require_range(); + var satisfies = require_satisfies(); + var gt = require_gt(); + var lt = require_lt(); + var lte = require_lte(); + var gte = require_gte(); + var outside = (version2, range, hilo, options) => { + version2 = new SemVer(version2, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version2, range, options)) { + return false; + } + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version2, low.semver)) { + return false; + } + } + return true; + }; + module2.exports = outside; + } +}); + +// node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + "node_modules/semver/ranges/gtr.js"(exports2, module2) { + "use strict"; + var outside = require_outside(); + var gtr = (version2, range, options) => outside(version2, range, ">", options); + module2.exports = gtr; + } +}); + +// node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + "node_modules/semver/ranges/ltr.js"(exports2, module2) { + "use strict"; + var outside = require_outside(); + var ltr = (version2, range, options) => outside(version2, range, "<", options); + module2.exports = ltr; + } +}); + +// node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + "node_modules/semver/ranges/intersects.js"(exports2, module2) { + "use strict"; + var Range = require_range(); + var intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2, options); + }; + module2.exports = intersects; + } +}); + +// node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + "node_modules/semver/ranges/simplify.js"(exports2, module2) { + "use strict"; + var satisfies = require_satisfies(); + var compare = require_compare(); + module2.exports = (versions, range, options) => { + const set = []; + let first = null; + let prev = null; + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version2 of v) { + const included = satisfies(version2, range, options); + if (included) { + prev = version2; + if (!first) { + first = version2; + } + } else { + if (prev) { + set.push([first, prev]); + } + prev = null; + first = null; + } + } + if (first) { + set.push([first, null]); + } + const ranges = []; + for (const [min, max] of set) { + if (min === max) { + ranges.push(min); + } else if (!max && min === v[0]) { + ranges.push("*"); + } else if (!max) { + ranges.push(`>=${min}`); + } else if (min === v[0]) { + ranges.push(`<=${max}`); + } else { + ranges.push(`${min} - ${max}`); + } + } + const simplified = ranges.join(" || "); + const original = typeof range.raw === "string" ? range.raw : String(range); + return simplified.length < original.length ? simplified : range; + }; + } +}); + +// node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + "node_modules/semver/ranges/subset.js"(exports2, module2) { + "use strict"; + var Range = require_range(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var satisfies = require_satisfies(); + var compare = require_compare(); + var subset = (sub, dom, options = {}) => { + if (sub === dom) { + return true; + } + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) { + continue OUTER; + } + } + if (sawNonNull) { + return false; + } + } + return true; + }; + var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; + var minimumVersion = [new Comparator(">=0.0.0")]; + var simpleSubset = (sub, dom, options) => { + if (sub === dom) { + return true; + } + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true; + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease; + } else { + sub = minimumVersion; + } + } + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true; + } else { + dom = minimumVersion; + } + } + const eqSet = /* @__PURE__ */ new Set(); + let gt, lt; + for (const c of sub) { + if (c.operator === ">" || c.operator === ">=") { + gt = higherGT(gt, c, options); + } else if (c.operator === "<" || c.operator === "<=") { + lt = lowerLT(lt, c, options); + } else { + eqSet.add(c.semver); + } + } + if (eqSet.size > 1) { + return null; + } + let gtltComp; + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); + if (gtltComp > 0) { + return null; + } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { + return null; + } + } + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) { + return null; + } + if (lt && !satisfies(eq, String(lt), options)) { + return null; + } + for (const c of dom) { + if (!satisfies(eq, String(c), options)) { + return false; + } + } + return true; + } + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false; + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false; + } + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) { + return false; + } + } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) { + return false; + } + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false; + } + } + if (c.operator === "<" || c.operator === "<=") { + lower = lowerLT(lt, c, options); + if (lower === c && lower !== lt) { + return false; + } + } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) { + return false; + } + } + if (!c.operator && (lt || gt) && gtltComp !== 0) { + return false; + } + } + if (gt && hasDomLT && !lt && gtltComp !== 0) { + return false; + } + if (lt && hasDomGT && !gt && gtltComp !== 0) { + return false; + } + if (needDomGTPre || needDomLTPre) { + return false; + } + return true; + }; + var higherGT = (a, b, options) => { + if (!a) { + return b; + } + const comp = compare(a.semver, b.semver, options); + return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; + }; + var lowerLT = (a, b, options) => { + if (!a) { + return b; + } + const comp = compare(a.semver, b.semver, options); + return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; + }; + module2.exports = subset; + } +}); + +// node_modules/semver/index.js +var require_semver2 = __commonJS({ + "node_modules/semver/index.js"(exports2, module2) { + "use strict"; + var internalRe = require_re(); + var constants2 = require_constants2(); + var SemVer = require_semver(); + var identifiers = require_identifiers(); + var parse = require_parse4(); + var valid = require_valid(); + var clean = require_clean(); + var inc = require_inc(); + var diff = require_diff(); + var major = require_major(); + var minor = require_minor(); + var patch = require_patch(); + var prerelease = require_prerelease(); + var compare = require_compare(); + var rcompare = require_rcompare(); + var compareLoose = require_compare_loose(); + var compareBuild = require_compare_build(); + var sort = require_sort(); + var rsort = require_rsort(); + var gt = require_gt(); + var lt = require_lt(); + var eq = require_eq(); + var neq = require_neq(); + var gte = require_gte(); + var lte = require_lte(); + var cmp = require_cmp(); + var coerce = require_coerce(); + var Comparator = require_comparator(); + var Range = require_range(); + var satisfies = require_satisfies(); + var toComparators = require_to_comparators(); + var maxSatisfying = require_max_satisfying(); + var minSatisfying = require_min_satisfying(); + var minVersion = require_min_version(); + var validRange = require_valid2(); + var outside = require_outside(); + var gtr = require_gtr(); + var ltr = require_ltr(); + var intersects = require_intersects(); + var simplifyRange = require_simplify(); + var subset = require_subset(); + module2.exports = { + parse, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants2.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants2.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers + }; + } +}); + +// node_modules/fastify/lib/pluginUtils.js +var require_pluginUtils = __commonJS({ + "node_modules/fastify/lib/pluginUtils.js"(exports2, module2) { + "use strict"; + var semver = require_semver2(); + var assert = require("node:assert"); + var kRegisteredPlugins = Symbol.for("registered-plugin"); + var { + kTestInternals + } = require_symbols2(); + var { exist, existReply, existRequest } = require_decorate(); + var { + FST_ERR_PLUGIN_VERSION_MISMATCH, + FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE, + FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER + } = require_errors2(); + var rcRegex = /-(?:rc|pre|alpha).+$/u; + function getMeta(fn) { + return fn[Symbol.for("plugin-meta")]; + } + function getPluginName(func) { + const display = getDisplayName(func); + if (display) { + return display; + } + const cache = require.cache; + if (cache) { + const keys = Object.keys(cache); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (cache[key].exports === func) { + return key; + } + } + } + if (func.name) { + return func.name; + } + return null; + } + function getFuncPreview(func) { + return func.toString().split("\n", 2).map((s) => s.trim()).join(" -- "); + } + function getDisplayName(fn) { + return fn[Symbol.for("fastify.display-name")]; + } + function shouldSkipOverride(fn) { + return !!fn[Symbol.for("skip-override")]; + } + function checkDependencies(fn) { + const meta = getMeta(fn); + if (!meta) return; + const dependencies = meta.dependencies; + if (!dependencies) return; + assert(Array.isArray(dependencies), "The dependencies should be an array of strings"); + dependencies.forEach((dependency) => { + assert( + this[kRegisteredPlugins].indexOf(dependency) > -1, + `The dependency '${dependency}' of plugin '${meta.name}' is not registered` + ); + }); + } + function checkDecorators(fn) { + const meta = getMeta(fn); + if (!meta) return; + const { decorators, name } = meta; + if (!decorators) return; + if (decorators.fastify) _checkDecorators(this, "Fastify", decorators.fastify, name); + if (decorators.reply) _checkDecorators(this, "Reply", decorators.reply, name); + if (decorators.request) _checkDecorators(this, "Request", decorators.request, name); + } + var checks2 = { + Fastify: exist, + Request: existRequest, + Reply: existReply + }; + function _checkDecorators(that, instance, decorators, name) { + assert(Array.isArray(decorators), "The decorators should be an array of strings"); + decorators.forEach((decorator) => { + const withPluginName = typeof name === "string" ? ` required by '${name}'` : ""; + if (!checks2[instance].call(that, decorator)) { + throw new FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE(decorator, withPluginName, instance); + } + }); + } + function checkVersion(fn) { + const meta = getMeta(fn); + if (meta?.fastify == null) return; + const requiredVersion = meta.fastify; + const fastifyRc = rcRegex.test(this.version); + if (fastifyRc === true && semver.gt(this.version, semver.coerce(requiredVersion)) === true) { + return; + } + if (requiredVersion && semver.satisfies(this.version, requiredVersion, { includePrerelease: fastifyRc }) === false) { + throw new FST_ERR_PLUGIN_VERSION_MISMATCH(meta.name, requiredVersion, this.version); + } + } + function registerPluginName(fn) { + const meta = getMeta(fn); + if (!meta) return; + const name = meta.name; + if (!name) return; + this[kRegisteredPlugins].push(name); + return name; + } + function checkPluginHealthiness(fn, pluginName) { + if (fn.constructor.name === "AsyncFunction" && fn.length === 3) { + throw new FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER(pluginName); + } + } + function registerPlugin(fn) { + const pluginName = registerPluginName.call(this, fn) || getPluginName(fn); + checkPluginHealthiness.call(this, fn, pluginName); + checkVersion.call(this, fn); + checkDecorators.call(this, fn); + checkDependencies.call(this, fn); + return shouldSkipOverride(fn); + } + module2.exports = { + getPluginName, + getFuncPreview, + kRegisteredPlugins, + getDisplayName, + registerPlugin + }; + module2.exports[kTestInternals] = { + shouldSkipOverride, + getMeta, + checkDecorators, + checkDependencies + }; + } +}); + +// node_modules/fastify/lib/reqIdGenFactory.js +var require_reqIdGenFactory = __commonJS({ + "node_modules/fastify/lib/reqIdGenFactory.js"(exports2, module2) { + "use strict"; + function reqIdGenFactory(requestIdHeader, optGenReqId) { + const genReqId = optGenReqId || buildDefaultGenReqId(); + if (requestIdHeader) { + return buildOptionalHeaderReqId(requestIdHeader, genReqId); + } + return genReqId; + } + function getGenReqId(contextServer, req) { + return contextServer.genReqId(req); + } + function buildDefaultGenReqId() { + const maxInt = 2147483647; + let nextReqId = 0; + return function defaultGenReqId() { + nextReqId = nextReqId + 1 & maxInt; + return `req-${nextReqId.toString(36)}`; + }; + } + function buildOptionalHeaderReqId(requestIdHeader, genReqId) { + return function(req) { + return req.headers[requestIdHeader] || genReqId(req); + }; + } + module2.exports = { + getGenReqId, + reqIdGenFactory + }; + } +}); + +// node_modules/fast-decode-uri-component/index.js +var require_fast_decode_uri_component = __commonJS({ + "node_modules/fast-decode-uri-component/index.js"(exports2, module2) { + "use strict"; + var UTF8_ACCEPT = 12; + var UTF8_REJECT = 0; + var UTF8_DATA = [ + // The first part of the table maps bytes to character to a transition. + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 4, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 6, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 8, + 7, + 7, + 10, + 9, + 9, + 9, + 11, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + // The second part of the table maps a state to a new state when adding a + // transition. + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 24, + 36, + 48, + 60, + 72, + 84, + 96, + 0, + 12, + 12, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 24, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 48, + 48, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 48, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // The third part maps the current transition to a mask that needs to apply + // to the byte. + 127, + 63, + 63, + 63, + 0, + 31, + 15, + 15, + 15, + 7, + 7, + 7 + ]; + function decodeURIComponent2(uri) { + var percentPosition = uri.indexOf("%"); + if (percentPosition === -1) return uri; + var length = uri.length; + var decoded = ""; + var last = 0; + var codepoint = 0; + var startOfOctets = percentPosition; + var state = UTF8_ACCEPT; + while (percentPosition > -1 && percentPosition < length) { + var high = hexCodeToInt(uri[percentPosition + 1], 4); + var low = hexCodeToInt(uri[percentPosition + 2], 0); + var byte = high | low; + var type = UTF8_DATA[byte]; + state = UTF8_DATA[256 + state + type]; + codepoint = codepoint << 6 | byte & UTF8_DATA[364 + type]; + if (state === UTF8_ACCEPT) { + decoded += uri.slice(last, startOfOctets); + decoded += codepoint <= 65535 ? String.fromCharCode(codepoint) : String.fromCharCode( + 55232 + (codepoint >> 10), + 56320 + (codepoint & 1023) + ); + codepoint = 0; + last = percentPosition + 3; + percentPosition = startOfOctets = uri.indexOf("%", last); + } else if (state === UTF8_REJECT) { + return null; + } else { + percentPosition += 3; + if (percentPosition < length && uri.charCodeAt(percentPosition) === 37) continue; + return null; + } + } + return decoded + uri.slice(last); + } + var HEX = { + "0": 0, + "1": 1, + "2": 2, + "3": 3, + "4": 4, + "5": 5, + "6": 6, + "7": 7, + "8": 8, + "9": 9, + "a": 10, + "A": 10, + "b": 11, + "B": 11, + "c": 12, + "C": 12, + "d": 13, + "D": 13, + "e": 14, + "E": 14, + "f": 15, + "F": 15 + }; + function hexCodeToInt(c, shift) { + var i = HEX[c]; + return i === void 0 ? 255 : i << shift; + } + module2.exports = decodeURIComponent2; + } +}); + +// node_modules/fast-querystring/lib/parse.js +var require_parse5 = __commonJS({ + "node_modules/fast-querystring/lib/parse.js"(exports2, module2) { + "use strict"; + var fastDecode = require_fast_decode_uri_component(); + var plusRegex = /\+/g; + var Empty = function() { + }; + Empty.prototype = /* @__PURE__ */ Object.create(null); + function parse(input) { + const result = new Empty(); + if (typeof input !== "string") { + return result; + } + let inputLength = input.length; + let key = ""; + let value = ""; + let startingIndex = -1; + let equalityIndex = -1; + let shouldDecodeKey = false; + let shouldDecodeValue = false; + let keyHasPlus = false; + let valueHasPlus = false; + let hasBothKeyValuePair = false; + let c = 0; + for (let i = 0; i < inputLength + 1; i++) { + c = i !== inputLength ? input.charCodeAt(i) : 38; + if (c === 38) { + hasBothKeyValuePair = equalityIndex > startingIndex; + if (!hasBothKeyValuePair) { + equalityIndex = i; + } + key = input.slice(startingIndex + 1, equalityIndex); + if (hasBothKeyValuePair || key.length > 0) { + if (keyHasPlus) { + key = key.replace(plusRegex, " "); + } + if (shouldDecodeKey) { + key = fastDecode(key) || key; + } + if (hasBothKeyValuePair) { + value = input.slice(equalityIndex + 1, i); + if (valueHasPlus) { + value = value.replace(plusRegex, " "); + } + if (shouldDecodeValue) { + value = fastDecode(value) || value; + } + } + const currentValue = result[key]; + if (currentValue === void 0) { + result[key] = value; + } else { + if (currentValue.pop) { + currentValue.push(value); + } else { + result[key] = [currentValue, value]; + } + } + } + value = ""; + startingIndex = i; + equalityIndex = i; + shouldDecodeKey = false; + shouldDecodeValue = false; + keyHasPlus = false; + valueHasPlus = false; + } else if (c === 61) { + if (equalityIndex <= startingIndex) { + equalityIndex = i; + } else { + shouldDecodeValue = true; + } + } else if (c === 43) { + if (equalityIndex > startingIndex) { + valueHasPlus = true; + } else { + keyHasPlus = true; + } + } else if (c === 37) { + if (equalityIndex > startingIndex) { + shouldDecodeValue = true; + } else { + shouldDecodeKey = true; + } + } + } + return result; + } + module2.exports = parse; + } +}); + +// node_modules/fast-querystring/lib/internals/querystring.js +var require_querystring = __commonJS({ + "node_modules/fast-querystring/lib/internals/querystring.js"(exports2, module2) { + var hexTable = Array.from( + { length: 256 }, + (_, i) => "%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase() + ); + var noEscape = new Int8Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 0 - 15 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 16 - 31 + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + // 32 - 47 + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + // 48 - 63 + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + // 64 - 79 + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + // 80 - 95 + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + // 96 - 111 + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0 + // 112 - 127 + ]); + function encodeString(str) { + const len = str.length; + if (len === 0) return ""; + let out = ""; + let lastPos = 0; + let i = 0; + outer: for (; i < len; i++) { + let c = str.charCodeAt(i); + while (c < 128) { + if (noEscape[c] !== 1) { + if (lastPos < i) out += str.slice(lastPos, i); + lastPos = i + 1; + out += hexTable[c]; + } + if (++i === len) break outer; + c = str.charCodeAt(i); + } + if (lastPos < i) out += str.slice(lastPos, i); + if (c < 2048) { + lastPos = i + 1; + out += hexTable[192 | c >> 6] + hexTable[128 | c & 63]; + continue; + } + if (c < 55296 || c >= 57344) { + lastPos = i + 1; + out += hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + continue; + } + ++i; + if (i >= len) { + throw new Error("URI malformed"); + } + const c2 = str.charCodeAt(i) & 1023; + lastPos = i + 1; + c = 65536 + ((c & 1023) << 10 | c2); + out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + } + if (lastPos === 0) return str; + if (lastPos < len) return out + str.slice(lastPos); + return out; + } + module2.exports = { encodeString }; + } +}); + +// node_modules/fast-querystring/lib/stringify.js +var require_stringify2 = __commonJS({ + "node_modules/fast-querystring/lib/stringify.js"(exports2, module2) { + "use strict"; + var { encodeString } = require_querystring(); + function getAsPrimitive(value) { + const type = typeof value; + if (type === "string") { + return encodeString(value); + } else if (type === "bigint") { + return value.toString(); + } else if (type === "boolean") { + return value ? "true" : "false"; + } else if (type === "number" && Number.isFinite(value)) { + return value < 1e21 ? "" + value : encodeString("" + value); + } + return ""; + } + function stringify(input) { + let result = ""; + if (input === null || typeof input !== "object") { + return result; + } + const separator = "&"; + const keys = Object.keys(input); + const keyLength = keys.length; + let valueLength = 0; + for (let i = 0; i < keyLength; i++) { + const key = keys[i]; + const value = input[key]; + const encodedKey = encodeString(key) + "="; + if (i) { + result += separator; + } + if (Array.isArray(value)) { + valueLength = value.length; + for (let j = 0; j < valueLength; j++) { + if (j) { + result += separator; + } + result += encodedKey; + result += getAsPrimitive(value[j]); + } + } else { + result += encodedKey; + result += getAsPrimitive(value); + } + } + return result; + } + module2.exports = stringify; + } +}); + +// node_modules/fast-querystring/lib/index.js +var require_lib2 = __commonJS({ + "node_modules/fast-querystring/lib/index.js"(exports2, module2) { + "use strict"; + var parse = require_parse5(); + var stringify = require_stringify2(); + var fastQuerystring = { + parse, + stringify + }; + module2.exports = fastQuerystring; + module2.exports.default = fastQuerystring; + module2.exports.parse = parse; + module2.exports.stringify = stringify; + } +}); + +// node_modules/ret/dist/types/tokens.js +var require_tokens = __commonJS({ + "node_modules/ret/dist/types/tokens.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/ret/dist/types/types.js +var require_types3 = __commonJS({ + "node_modules/ret/dist/types/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.types = void 0; + var types; + (function(types2) { + types2[types2["ROOT"] = 0] = "ROOT"; + types2[types2["GROUP"] = 1] = "GROUP"; + types2[types2["POSITION"] = 2] = "POSITION"; + types2[types2["SET"] = 3] = "SET"; + types2[types2["RANGE"] = 4] = "RANGE"; + types2[types2["REPETITION"] = 5] = "REPETITION"; + types2[types2["REFERENCE"] = 6] = "REFERENCE"; + types2[types2["CHAR"] = 7] = "CHAR"; + })(types = exports2.types || (exports2.types = {})); + } +}); + +// node_modules/ret/dist/types/set-lookup.js +var require_set_lookup = __commonJS({ + "node_modules/ret/dist/types/set-lookup.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/ret/dist/types/index.js +var require_types4 = __commonJS({ + "node_modules/ret/dist/types/index.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_tokens(), exports2); + __exportStar(require_types3(), exports2); + __exportStar(require_set_lookup(), exports2); + } +}); + +// node_modules/ret/dist/sets.js +var require_sets = __commonJS({ + "node_modules/ret/dist/sets.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.anyChar = exports2.notWhitespace = exports2.whitespace = exports2.notInts = exports2.ints = exports2.notWords = exports2.words = void 0; + var types_1 = require_types4(); + var INTS = () => [{ type: types_1.types.RANGE, from: 48, to: 57 }]; + var WORDS = () => [ + { type: types_1.types.CHAR, value: 95 }, + { type: types_1.types.RANGE, from: 97, to: 122 }, + { type: types_1.types.RANGE, from: 65, to: 90 }, + { type: types_1.types.RANGE, from: 48, to: 57 } + ]; + var WHITESPACE = () => [ + { type: types_1.types.CHAR, value: 9 }, + { type: types_1.types.CHAR, value: 10 }, + { type: types_1.types.CHAR, value: 11 }, + { type: types_1.types.CHAR, value: 12 }, + { type: types_1.types.CHAR, value: 13 }, + { type: types_1.types.CHAR, value: 32 }, + { type: types_1.types.CHAR, value: 160 }, + { type: types_1.types.CHAR, value: 5760 }, + { type: types_1.types.RANGE, from: 8192, to: 8202 }, + { type: types_1.types.CHAR, value: 8232 }, + { type: types_1.types.CHAR, value: 8233 }, + { type: types_1.types.CHAR, value: 8239 }, + { type: types_1.types.CHAR, value: 8287 }, + { type: types_1.types.CHAR, value: 12288 }, + { type: types_1.types.CHAR, value: 65279 } + ]; + var NOTANYCHAR = () => [ + { type: types_1.types.CHAR, value: 10 }, + { type: types_1.types.CHAR, value: 13 }, + { type: types_1.types.CHAR, value: 8232 }, + { type: types_1.types.CHAR, value: 8233 } + ]; + exports2.words = () => ({ type: types_1.types.SET, set: WORDS(), not: false }); + exports2.notWords = () => ({ type: types_1.types.SET, set: WORDS(), not: true }); + exports2.ints = () => ({ type: types_1.types.SET, set: INTS(), not: false }); + exports2.notInts = () => ({ type: types_1.types.SET, set: INTS(), not: true }); + exports2.whitespace = () => ({ type: types_1.types.SET, set: WHITESPACE(), not: false }); + exports2.notWhitespace = () => ({ type: types_1.types.SET, set: WHITESPACE(), not: true }); + exports2.anyChar = () => ({ type: types_1.types.SET, set: NOTANYCHAR(), not: true }); + } +}); + +// node_modules/ret/dist/util.js +var require_util3 = __commonJS({ + "node_modules/ret/dist/util.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tokenizeClass = exports2.strToChars = void 0; + var types_1 = require_types4(); + var sets = __importStar(require_sets()); + var CTRL = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?"; + exports2.strToChars = (str) => { + const charsRegex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g; + return str.replace(charsRegex, (s, b, lbs, a16, b16, dctrl, eslsh) => { + if (lbs) { + return s; + } + let code = b ? 8 : a16 ? parseInt(a16, 16) : b16 ? parseInt(b16, 16) : dctrl ? CTRL.indexOf(dctrl) : { + 0: 0, + t: 9, + n: 10, + v: 11, + f: 12, + r: 13 + }[eslsh]; + let c = String.fromCharCode(code); + return /[[\]{}^$.|?*+()]/.test(c) ? `\\${c}` : c; + }); + }; + exports2.tokenizeClass = (str, regexpStr) => { + var _a, _b, _c, _d, _e, _f, _g; + let tokens = [], rs, c; + const regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(((?:\\)])|(((?:\\)?([^\]])))))|(\])|(?:\\)?([^])/g; + while ((rs = regexp.exec(str)) !== null) { + const p = (_g = (_f = (_e = (_d = (_c = (_b = (_a = rs[1] && sets.words()) !== null && _a !== void 0 ? _a : rs[2] && sets.ints()) !== null && _b !== void 0 ? _b : rs[3] && sets.whitespace()) !== null && _c !== void 0 ? _c : rs[4] && sets.notWords()) !== null && _d !== void 0 ? _d : rs[5] && sets.notInts()) !== null && _e !== void 0 ? _e : rs[6] && sets.notWhitespace()) !== null && _f !== void 0 ? _f : rs[7] && { + type: types_1.types.RANGE, + from: (rs[8] || rs[9]).charCodeAt(0), + to: (c = rs[10]).charCodeAt(c.length - 1) + }) !== null && _g !== void 0 ? _g : (c = rs[16]) && { type: types_1.types.CHAR, value: c.charCodeAt(0) }; + if (p) { + tokens.push(p); + } else { + return [tokens, regexp.lastIndex]; + } + } + throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unterminated character class`); + }; + } +}); + +// node_modules/ret/dist/tokenizer.js +var require_tokenizer = __commonJS({ + "node_modules/ret/dist/tokenizer.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tokenizer = void 0; + var util = __importStar(require_util3()); + var types_1 = require_types4(); + var sets = __importStar(require_sets()); + var captureGroupFirstChar = /^[a-zA-Z_$]$/i; + var captureGroupChars = /^[a-zA-Z0-9_$]$/i; + var digit = /\d/; + exports2.tokenizer = (regexpStr) => { + let i = 0, c; + let start = { type: types_1.types.ROOT, stack: [] }; + let lastGroup = start; + let last = start.stack; + let groupStack = []; + let referenceQueue = []; + let groupCount = 0; + const repeatErr = (col) => { + throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Nothing to repeat at column ${col - 1}`); + }; + let str = util.strToChars(regexpStr); + while (i < str.length) { + switch (c = str[i++]) { + // Handle escaped characters, inclues a few sets. + case "\\": + if (i === str.length) { + throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: \\ at end of pattern`); + } + switch (c = str[i++]) { + case "b": + last.push({ type: types_1.types.POSITION, value: "b" }); + break; + case "B": + last.push({ type: types_1.types.POSITION, value: "B" }); + break; + case "w": + last.push(sets.words()); + break; + case "W": + last.push(sets.notWords()); + break; + case "d": + last.push(sets.ints()); + break; + case "D": + last.push(sets.notInts()); + break; + case "s": + last.push(sets.whitespace()); + break; + case "S": + last.push(sets.notWhitespace()); + break; + default: + if (digit.test(c)) { + let digits = c; + while (i < str.length && digit.test(str[i])) { + digits += str[i++]; + } + let value = parseInt(digits, 10); + const reference = { type: types_1.types.REFERENCE, value }; + last.push(reference); + referenceQueue.push({ reference, stack: last, index: last.length - 1 }); + } else { + last.push({ type: types_1.types.CHAR, value: c.charCodeAt(0) }); + } + } + break; + // Positionals. + case "^": + last.push({ type: types_1.types.POSITION, value: "^" }); + break; + case "$": + last.push({ type: types_1.types.POSITION, value: "$" }); + break; + // Handle custom sets. + case "[": { + let not; + if (str[i] === "^") { + not = true; + i++; + } else { + not = false; + } + let classTokens = util.tokenizeClass(str.slice(i), regexpStr); + i += classTokens[1]; + last.push({ + type: types_1.types.SET, + set: classTokens[0], + not + }); + break; + } + // Class of any character except \n. + case ".": + last.push(sets.anyChar()); + break; + // Push group onto stack. + case "(": { + let group = { + type: types_1.types.GROUP, + stack: [], + remember: true + }; + if (str[i] === "?") { + c = str[i + 1]; + i += 2; + if (c === "=") { + group.followedBy = true; + group.remember = false; + } else if (c === "!") { + group.notFollowedBy = true; + group.remember = false; + } else if (c === "<") { + let name = ""; + if (captureGroupFirstChar.test(str[i])) { + name += str[i]; + i++; + } else { + throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str[i]}' after '<' at column ${i + 1}`); + } + while (i < str.length && captureGroupChars.test(str[i])) { + name += str[i]; + i++; + } + if (!name) { + throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str[i]}' after '<' at column ${i + 1}`); + } + if (str[i] !== ">") { + throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unclosed capture group name, expected '>', found '${str[i]}' at column ${i + 1}`); + } + group.name = name; + i++; + } else if (c === ":") { + group.remember = false; + } else { + throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid group, character '${c}' after '?' at column ${i - 1}`); + } + } else { + groupCount += 1; + } + last.push(group); + groupStack.push(lastGroup); + lastGroup = group; + last = group.stack; + break; + } + // Pop group out of stack. + case ")": + if (groupStack.length === 0) { + throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unmatched ) at column ${i - 1}`); + } + lastGroup = groupStack.pop(); + last = lastGroup.options ? lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack; + break; + // Use pipe character to give more choices. + case "|": { + if (!lastGroup.options) { + lastGroup.options = [lastGroup.stack]; + delete lastGroup.stack; + } + let stack = []; + lastGroup.options.push(stack); + last = stack; + break; + } + // Repetition. + // For every repetition, remove last element from last stack + // then insert back a RANGE object. + // This design is chosen because there could be more than + // one repetition symbols in a regex i.e. `a?+{2,3}`. + case "{": { + let rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max; + if (rs !== null) { + if (last.length === 0) { + repeatErr(i); + } + min = parseInt(rs[1], 10); + max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min; + i += rs[0].length; + last.push({ + type: types_1.types.REPETITION, + min, + max, + value: last.pop() + }); + } else { + last.push({ + type: types_1.types.CHAR, + value: 123 + }); + } + break; + } + case "?": + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types_1.types.REPETITION, + min: 0, + max: 1, + value: last.pop() + }); + break; + case "+": + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types_1.types.REPETITION, + min: 1, + max: Infinity, + value: last.pop() + }); + break; + case "*": + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types_1.types.REPETITION, + min: 0, + max: Infinity, + value: last.pop() + }); + break; + // Default is a character that is not `\[](){}?+*^$`. + default: + last.push({ + type: types_1.types.CHAR, + value: c.charCodeAt(0) + }); + } + } + if (groupStack.length !== 0) { + throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unterminated group`); + } + updateReferences(referenceQueue, groupCount); + return start; + }; + function updateReferences(referenceQueue, groupCount) { + for (const elem of referenceQueue.reverse()) { + if (groupCount < elem.reference.value) { + elem.reference.type = types_1.types.CHAR; + const valueString = elem.reference.value.toString(); + elem.reference.value = parseInt(valueString, 8); + if (!/^[0-7]+$/.test(valueString)) { + let i = 0; + while (valueString[i] !== "8" && valueString[i] !== "9") { + i += 1; + } + if (i === 0) { + elem.reference.value = valueString.charCodeAt(0); + i += 1; + } else { + elem.reference.value = parseInt(valueString.slice(0, i), 8); + } + if (valueString.length > i) { + const tail = elem.stack.splice(elem.index + 1); + for (const char of valueString.slice(i)) { + elem.stack.push({ + type: types_1.types.CHAR, + value: char.charCodeAt(0) + }); + } + elem.stack.push(...tail); + } + } + } + } + } + } +}); + +// node_modules/ret/dist/sets-lookup.js +var require_sets_lookup = __commonJS({ + "node_modules/ret/dist/sets-lookup.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NOTANYCHAR = exports2.WHITESPACE = exports2.WORDS = exports2.INTS = void 0; + var Sets = __importStar(require_sets()); + var types_1 = require_types4(); + function setToLookup(tokens) { + let lookup = {}; + let len = 0; + for (const token of tokens) { + if (token.type === types_1.types.CHAR) { + lookup[token.value] = true; + } + if (token.type === types_1.types.RANGE) { + lookup[`${token.from}-${token.to}`] = true; + } + len += 1; + } + return { + lookup: () => Object.assign({}, lookup), + len + }; + } + exports2.INTS = setToLookup(Sets.ints().set); + exports2.WORDS = setToLookup(Sets.words().set); + exports2.WHITESPACE = setToLookup(Sets.whitespace().set); + exports2.NOTANYCHAR = setToLookup(Sets.anyChar().set); + } +}); + +// node_modules/ret/dist/write-set-tokens.js +var require_write_set_tokens = __commonJS({ + "node_modules/ret/dist/write-set-tokens.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeSetTokens = exports2.setChar = void 0; + var types_1 = require_types4(); + var sets = __importStar(require_sets_lookup()); + function setChar(charCode) { + return charCode === 94 ? "\\^" : charCode === 92 ? "\\\\" : charCode === 93 ? "\\]" : charCode === 45 ? "\\-" : String.fromCharCode(charCode); + } + exports2.setChar = setChar; + function isSameSet(set, { lookup, len }) { + if (len !== set.length) { + return false; + } + const map = lookup(); + for (const elem of set) { + if (elem.type === types_1.types.SET) { + return false; + } + const key = elem.type === types_1.types.CHAR ? elem.value : `${elem.from}-${elem.to}`; + if (map[key]) { + map[key] = false; + } else { + return false; + } + } + return true; + } + function writeSetTokens(set, isNested = false) { + if (isSameSet(set.set, sets.INTS)) { + return set.not ? "\\D" : "\\d"; + } + if (isSameSet(set.set, sets.WORDS)) { + return set.not ? "\\W" : "\\w"; + } + if (set.not && isSameSet(set.set, sets.NOTANYCHAR)) { + return "."; + } + if (isSameSet(set.set, sets.WHITESPACE)) { + return set.not ? "\\S" : "\\s"; + } + let tokenString = ""; + for (let i = 0; i < set.set.length; i++) { + const subset = set.set[i]; + tokenString += writeSetToken(subset); + } + const contents = `${set.not ? "^" : ""}${tokenString}`; + return isNested ? contents : `[${contents}]`; + } + exports2.writeSetTokens = writeSetTokens; + function writeSetToken(set) { + if (set.type === types_1.types.CHAR) { + return setChar(set.value); + } else if (set.type === types_1.types.RANGE) { + return `${setChar(set.from)}-${setChar(set.to)}`; + } + return writeSetTokens(set, true); + } + } +}); + +// node_modules/ret/dist/reconstruct.js +var require_reconstruct = __commonJS({ + "node_modules/ret/dist/reconstruct.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reconstruct = void 0; + var types_1 = require_types4(); + var write_set_tokens_1 = require_write_set_tokens(); + var reduceStack = (stack) => stack.map(exports2.reconstruct).join(""); + var createAlternate = (token) => { + if ("options" in token) { + return token.options.map(reduceStack).join("|"); + } else if ("stack" in token) { + return reduceStack(token.stack); + } else { + throw new Error(`options or stack must be Root or Group token`); + } + }; + exports2.reconstruct = (token) => { + switch (token.type) { + case types_1.types.ROOT: + return createAlternate(token); + case types_1.types.CHAR: { + const c = String.fromCharCode(token.value); + return (/[[\\{}$^.|?*+()]/.test(c) ? "\\" : "") + c; + } + case types_1.types.POSITION: + if (token.value === "^" || token.value === "$") { + return token.value; + } else { + return `\\${token.value}`; + } + case types_1.types.REFERENCE: + return `\\${token.value}`; + case types_1.types.SET: + return write_set_tokens_1.writeSetTokens(token); + case types_1.types.GROUP: { + const prefix = token.name ? `?<${token.name}>` : token.remember ? "" : token.followedBy ? "?=" : token.notFollowedBy ? "?!" : "?:"; + return `(${prefix}${createAlternate(token)})`; + } + case types_1.types.REPETITION: { + const { min, max } = token; + let endWith; + if (min === 0 && max === 1) { + endWith = "?"; + } else if (min === 1 && max === Infinity) { + endWith = "+"; + } else if (min === 0 && max === Infinity) { + endWith = "*"; + } else if (max === Infinity) { + endWith = `{${min},}`; + } else if (min === max) { + endWith = `{${min}}`; + } else { + endWith = `{${min},${max}}`; + } + return `${exports2.reconstruct(token.value)}${endWith}`; + } + case types_1.types.RANGE: + return `${write_set_tokens_1.setChar(token.from)}-${write_set_tokens_1.setChar(token.to)}`; + default: + throw new Error(`Invalid token type ${token}`); + } + }; + } +}); + +// node_modules/ret/dist/index.js +var require_dist3 = __commonJS({ + "node_modules/ret/dist/index.js"(exports2, module2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.types = void 0; + var types_1 = require_types4(); + Object.defineProperty(exports2, "types", { enumerable: true, get: function() { + return types_1.types; + } }); + __exportStar(require_tokenizer(), exports2); + __exportStar(require_reconstruct(), exports2); + var tokenizer_1 = require_tokenizer(); + var reconstruct_1 = require_reconstruct(); + __exportStar(require_types4(), exports2); + exports2.default = tokenizer_1.tokenizer; + module2.exports = tokenizer_1.tokenizer; + module2.exports.types = types_1.types; + module2.exports.reconstruct = reconstruct_1.reconstruct; + } +}); + +// node_modules/safe-regex2/index.js +var require_safe_regex2 = __commonJS({ + "node_modules/safe-regex2/index.js"(exports2, module2) { + "use strict"; + var parse = require_dist3(); + var types = parse.types; + function safeRegex(re, opts) { + if (!opts) opts = {}; + const replimit = opts.limit === void 0 ? 25 : opts.limit; + if (isRegExp(re)) re = re.source; + else if (typeof re !== "string") re = String(re); + try { + re = parse(re); + } catch { + return false; + } + let reps = 0; + return (function walk(node, starHeight) { + let i; + let ok; + let len; + if (node.type === types.REPETITION) { + starHeight++; + reps++; + if (starHeight > 1) return false; + if (reps > replimit) return false; + } + if (node.options) { + for (i = 0, len = node.options.length; i < len; i++) { + ok = walk({ stack: node.options[i] }, starHeight); + if (!ok) return false; + } + } + const stack = node.stack || node.value?.stack; + if (!stack) return true; + for (i = 0; i < stack.length; i++) { + ok = walk(stack[i], starHeight); + if (!ok) return false; + } + return true; + })(re, 0); + } + function isRegExp(x) { + return {}.toString.call(x) === "[object RegExp]"; + } + module2.exports = safeRegex; + module2.exports.default = safeRegex; + module2.exports.safeRegex = safeRegex; + } +}); + +// node_modules/find-my-way/lib/strategies/http-method.js +var require_http_method = __commonJS({ + "node_modules/find-my-way/lib/strategies/http-method.js"(exports2, module2) { + "use strict"; + module2.exports = { + name: "__fmw_internal_strategy_merged_tree_http_method__", + storage: function() { + const handlers = /* @__PURE__ */ new Map(); + return { + get: (type) => { + return handlers.get(type) || null; + }, + set: (type, store) => { + handlers.set(type, store); + } + }; + }, + /* c8 ignore next 1 */ + deriveConstraint: (req) => req.method, + mustMatchWhenDerived: true + }; + } +}); + +// node_modules/find-my-way/lib/pretty-print.js +var require_pretty_print = __commonJS({ + "node_modules/find-my-way/lib/pretty-print.js"(exports2, module2) { + "use strict"; + var deepEqual = require_fast_deep_equal(); + var httpMethodStrategy = require_http_method(); + var treeDataSymbol = Symbol("treeData"); + function printObjectTree(obj, parentPrefix = "") { + let tree = ""; + const keys = Object.keys(obj); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const value = obj[key]; + const isLast = i === keys.length - 1; + const nodePrefix = isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 "; + const childPrefix = isLast ? " " : "\u2502 "; + const nodeData = value[treeDataSymbol] || ""; + const prefixedNodeData = nodeData.replaceAll("\n", "\n" + parentPrefix + childPrefix); + tree += parentPrefix + nodePrefix + key + prefixedNodeData + "\n"; + tree += printObjectTree(value, parentPrefix + childPrefix); + } + return tree; + } + function parseFunctionName(fn) { + let fName = fn.name || ""; + fName = fName.replace("bound", "").trim(); + fName = (fName || "anonymous") + "()"; + return fName; + } + function parseMeta(meta) { + if (Array.isArray(meta)) return meta.map((m) => parseMeta(m)); + if (typeof meta === "symbol") return meta.toString(); + if (typeof meta === "function") return parseFunctionName(meta); + return meta; + } + function getRouteMetaData(route, options) { + if (!options.includeMeta) return {}; + const metaDataObject = options.buildPrettyMeta(route); + const filteredMetaData = {}; + let includeMetaKeys = options.includeMeta; + if (!Array.isArray(includeMetaKeys)) { + includeMetaKeys = Reflect.ownKeys(metaDataObject); + } + for (const metaKey of includeMetaKeys) { + if (!Object.prototype.hasOwnProperty.call(metaDataObject, metaKey)) continue; + const serializedKey = metaKey.toString(); + const metaValue = metaDataObject[metaKey]; + if (metaValue !== void 0 && metaValue !== null) { + const serializedValue = JSON.stringify(parseMeta(metaValue)); + filteredMetaData[serializedKey] = serializedValue; + } + } + return filteredMetaData; + } + function serializeMetaData(metaData) { + let serializedMetaData = ""; + for (const [key, value] of Object.entries(metaData)) { + serializedMetaData += ` +\u2022 (${key}) ${value}`; + } + return serializedMetaData; + } + function normalizeRoute(route) { + const constraints = { ...route.opts.constraints }; + const method = constraints[httpMethodStrategy.name]; + delete constraints[httpMethodStrategy.name]; + return { ...route, method, opts: { constraints } }; + } + function serializeRoute(route) { + let serializedRoute = ` (${route.method})`; + const constraints = route.opts.constraints || {}; + if (Object.keys(constraints).length !== 0) { + serializedRoute += " " + JSON.stringify(constraints); + } + serializedRoute += serializeMetaData(route.metaData); + return serializedRoute; + } + function mergeSimilarRoutes(routes) { + return routes.reduce((mergedRoutes, route) => { + for (const nodeRoute of mergedRoutes) { + if (deepEqual(route.opts.constraints, nodeRoute.opts.constraints) && deepEqual(route.metaData, nodeRoute.metaData)) { + nodeRoute.method += ", " + route.method; + return mergedRoutes; + } + } + mergedRoutes.push(route); + return mergedRoutes; + }, []); + } + function serializeNode(node, prefix, options) { + let routes = node.routes; + if (options.method === void 0) { + routes = routes.map(normalizeRoute); + } + routes = routes.map((route) => { + route.metaData = getRouteMetaData(route, options); + return route; + }); + if (options.method === void 0) { + routes = mergeSimilarRoutes(routes); + } + return routes.map(serializeRoute).join(` +${prefix}`); + } + function buildObjectTree(node, tree, prefix, options) { + if (node.isLeafNode || options.commonPrefix !== false) { + prefix = prefix || "(empty root node)"; + tree = tree[prefix] = {}; + if (node.isLeafNode) { + tree[treeDataSymbol] = serializeNode(node, prefix, options); + } + prefix = ""; + } + if (node.staticChildren) { + for (const child of Object.values(node.staticChildren)) { + buildObjectTree(child, tree, prefix + child.prefix, options); + } + } + if (node.parametricChildren) { + for (const child of Object.values(node.parametricChildren)) { + const childPrefix = Array.from(child.nodePaths).join("|"); + buildObjectTree(child, tree, prefix + childPrefix, options); + } + } + if (node.wildcardChild) { + buildObjectTree(node.wildcardChild, tree, "*", options); + } + } + function prettyPrintTree(root, options) { + const objectTree = {}; + buildObjectTree(root, objectTree, root.prefix, options); + return printObjectTree(objectTree); + } + module2.exports = { prettyPrintTree }; + } +}); + +// node_modules/find-my-way/lib/null-object.js +var require_null_object = __commonJS({ + "node_modules/find-my-way/lib/null-object.js"(exports2, module2) { + "use strict"; + var NullObject = function() { + }; + NullObject.prototype = /* @__PURE__ */ Object.create(null); + module2.exports = { + NullObject + }; + } +}); + +// node_modules/find-my-way/lib/handler-storage.js +var require_handler_storage = __commonJS({ + "node_modules/find-my-way/lib/handler-storage.js"(exports2, module2) { + "use strict"; + var { NullObject } = require_null_object(); + var httpMethodStrategy = require_http_method(); + var HandlerStorage = class { + constructor() { + this.unconstrainedHandler = null; + this.constraints = []; + this.handlers = []; + this.constrainedHandlerStores = null; + } + // This is the hot path for node handler finding -- change with care! + getMatchingHandler(derivedConstraints) { + if (derivedConstraints === void 0) { + return this.unconstrainedHandler; + } + return this._getHandlerMatchingConstraints(derivedConstraints); + } + addHandler(constrainer, route) { + const params = route.params; + const constraints = route.opts.constraints || {}; + const handlerObject = { + params, + constraints, + handler: route.handler, + store: route.store || null, + _createParamsObject: this._compileCreateParamsObject(params) + }; + const constraintsNames = Object.keys(constraints); + if (constraintsNames.length === 0) { + this.unconstrainedHandler = handlerObject; + } + for (const constraint of constraintsNames) { + if (!this.constraints.includes(constraint)) { + if (constraint === "version") { + this.constraints.unshift(constraint); + } else { + this.constraints.push(constraint); + } + } + } + const isMergedTree = constraintsNames.includes(httpMethodStrategy.name); + if (!isMergedTree && this.handlers.length >= 31) { + throw new Error("find-my-way supports a maximum of 31 route handlers per node when there are constraints, limit reached"); + } + this.handlers.push(handlerObject); + this.handlers.sort((a, b) => Object.keys(a.constraints).length - Object.keys(b.constraints).length); + if (!isMergedTree) { + this._compileGetHandlerMatchingConstraints(constrainer, constraints); + } + } + _compileCreateParamsObject(params) { + const fnBody = []; + fnBody.push("const fn = function _createParamsObject (paramsArray) {"); + fnBody.push("const params = new NullObject()"); + for (let i = 0; i < params.length; i++) { + fnBody.push(`params['${params[i]}'] = paramsArray[${i}]`); + } + fnBody.push("return params"); + fnBody.push("}"); + fnBody.push("return fn"); + return new Function("NullObject", fnBody.join("\n"))(NullObject); + } + _getHandlerMatchingConstraints() { + return null; + } + // Builds a store object that maps from constraint values to a bitmap of handler indexes which pass the constraint for a value + // So for a host constraint, this might look like { "fastify.io": 0b0010, "google.ca": 0b0101 }, meaning the 3rd handler is constrainted to fastify.io, and the 2nd and 4th handlers are constrained to google.ca. + // The store's implementation comes from the strategies provided to the Router. + _buildConstraintStore(store, constraint) { + for (let i = 0; i < this.handlers.length; i++) { + const handler = this.handlers[i]; + const constraintValue = handler.constraints[constraint]; + if (constraintValue !== void 0) { + let indexes = store.get(constraintValue) || 0; + indexes |= 1 << i; + store.set(constraintValue, indexes); + } + } + } + // Builds a bitmask for a given constraint that has a bit for each handler index that is 0 when that handler *is* constrained and 1 when the handler *isnt* constrainted. This is opposite to what might be obvious, but is just for convienience when doing the bitwise operations. + _constrainedIndexBitmask(constraint) { + let mask = 0; + for (let i = 0; i < this.handlers.length; i++) { + const handler = this.handlers[i]; + const constraintValue = handler.constraints[constraint]; + if (constraintValue !== void 0) { + mask |= 1 << i; + } + } + return ~mask; + } + // Compile a fast function to match the handlers for this node + // The function implements a general case multi-constraint matching algorithm. + // The general idea is this: we have a bunch of handlers, each with a potentially different set of constraints, and sometimes none at all. We're given a list of constraint values and we have to use the constraint-value-comparison strategies to see which handlers match the constraint values passed in. + // We do this by asking each constraint store which handler indexes match the given constraint value for each store. Trickily, the handlers that a store says match are the handlers constrained by that store, but handlers that aren't constrained at all by that store could still match just fine. So, each constraint store can only describe matches for it, and it won't have any bearing on the handlers it doesn't care about. For this reason, we have to ask each stores which handlers match and track which have been matched (or not cared about) by all of them. + // We use bitmaps to represent these lists of matches so we can use bitwise operations to implement this efficiently. Bitmaps are cheap to allocate, let us implement this masking behaviour in one CPU instruction, and are quite compact in memory. We start with a bitmap set to all 1s representing every handler that is a match candidate, and then for each constraint, see which handlers match using the store, and then mask the result by the mask of handlers that that store applies to, and bitwise AND with the candidate list. Phew. + // We consider all this compiling function complexity to be worth it, because the naive implementation that just loops over the handlers asking which stores match is quite a bit slower. + _compileGetHandlerMatchingConstraints(constrainer) { + this.constrainedHandlerStores = {}; + for (const constraint of this.constraints) { + const store = constrainer.newStoreForConstraint(constraint); + this.constrainedHandlerStores[constraint] = store; + this._buildConstraintStore(store, constraint); + } + const lines = []; + lines.push(` + let candidates = ${(1 << this.handlers.length) - 1} + let mask, matches + `); + for (const constraint of this.constraints) { + lines.push(` + mask = ${this._constrainedIndexBitmask(constraint)} + value = derivedConstraints.${constraint} + `); + const strategy = constrainer.strategies[constraint]; + const matchMask = strategy.mustMatchWhenDerived ? "matches" : "(matches | mask)"; + lines.push(` + if (value === undefined) { + candidates &= mask + } else { + matches = this.constrainedHandlerStores.${constraint}.get(value) || 0 + candidates &= ${matchMask} + } + if (candidates === 0) return null; + `); + } + for (const constraint in constrainer.strategies) { + const strategy = constrainer.strategies[constraint]; + if (strategy.mustMatchWhenDerived && !this.constraints.includes(constraint)) { + lines.push(`if (derivedConstraints.${constraint} !== undefined) return null`); + } + } + lines.push("return this.handlers[Math.floor(Math.log2(candidates))]"); + this._getHandlerMatchingConstraints = new Function("derivedConstraints", lines.join("\n")); + } + }; + module2.exports = HandlerStorage; + } +}); + +// node_modules/find-my-way/lib/node.js +var require_node = __commonJS({ + "node_modules/find-my-way/lib/node.js"(exports2, module2) { + "use strict"; + var HandlerStorage = require_handler_storage(); + var NODE_TYPES = { + STATIC: 0, + PARAMETRIC: 1, + WILDCARD: 2 + }; + var Node = class { + constructor() { + this.isLeafNode = false; + this.routes = null; + this.handlerStorage = null; + } + addRoute(route, constrainer) { + if (this.routes === null) { + this.routes = []; + } + if (this.handlerStorage === null) { + this.handlerStorage = new HandlerStorage(); + } + this.isLeafNode = true; + this.routes.push(route); + this.handlerStorage.addHandler(constrainer, route); + } + }; + var ParentNode = class extends Node { + constructor() { + super(); + this.staticChildren = {}; + } + findStaticMatchingChild(path7, pathIndex) { + const staticChild = this.staticChildren[path7.charAt(pathIndex)]; + if (staticChild === void 0 || !staticChild.matchPrefix(path7, pathIndex)) { + return null; + } + return staticChild; + } + getStaticChild(path7, pathIndex = 0) { + if (path7.length === pathIndex) { + return this; + } + const staticChild = this.findStaticMatchingChild(path7, pathIndex); + if (staticChild) { + return staticChild.getStaticChild(path7, pathIndex + staticChild.prefix.length); + } + return null; + } + createStaticChild(path7) { + if (path7.length === 0) { + return this; + } + let staticChild = this.staticChildren[path7.charAt(0)]; + if (staticChild) { + let i = 1; + for (; i < staticChild.prefix.length; i++) { + if (path7.charCodeAt(i) !== staticChild.prefix.charCodeAt(i)) { + staticChild = staticChild.split(this, i); + break; + } + } + return staticChild.createStaticChild(path7.slice(i)); + } + const label = path7.charAt(0); + this.staticChildren[label] = new StaticNode(path7); + return this.staticChildren[label]; + } + }; + var StaticNode = class _StaticNode extends ParentNode { + constructor(prefix) { + super(); + this.prefix = prefix; + this.wildcardChild = null; + this.parametricChildren = []; + this.kind = NODE_TYPES.STATIC; + this._compilePrefixMatch(); + } + getParametricChild(regex) { + const regexpSource = regex && regex.source; + const parametricChild = this.parametricChildren.find((child) => { + const childRegexSource = child.regex && child.regex.source; + return childRegexSource === regexpSource; + }); + if (parametricChild) { + return parametricChild; + } + return null; + } + createParametricChild(regex, staticSuffix, nodePath) { + let parametricChild = this.getParametricChild(regex); + if (parametricChild) { + parametricChild.nodePaths.add(nodePath); + return parametricChild; + } + parametricChild = new ParametricNode(regex, staticSuffix, nodePath); + this.parametricChildren.push(parametricChild); + this.parametricChildren.sort((child1, child2) => { + if (!child1.isRegex) return 1; + if (!child2.isRegex) return -1; + if (child1.staticSuffix === null) return 1; + if (child2.staticSuffix === null) return -1; + if (child2.staticSuffix.endsWith(child1.staticSuffix)) return 1; + if (child1.staticSuffix.endsWith(child2.staticSuffix)) return -1; + return 0; + }); + return parametricChild; + } + getWildcardChild() { + return this.wildcardChild; + } + createWildcardChild() { + this.wildcardChild = this.getWildcardChild() || new WildcardNode(); + return this.wildcardChild; + } + split(parentNode, length) { + const parentPrefix = this.prefix.slice(0, length); + const childPrefix = this.prefix.slice(length); + this.prefix = childPrefix; + this._compilePrefixMatch(); + const staticNode = new _StaticNode(parentPrefix); + staticNode.staticChildren[childPrefix.charAt(0)] = this; + parentNode.staticChildren[parentPrefix.charAt(0)] = staticNode; + return staticNode; + } + getNextNode(path7, pathIndex, nodeStack, paramsCount) { + let node = this.findStaticMatchingChild(path7, pathIndex); + let parametricBrotherNodeIndex = 0; + if (node === null) { + if (this.parametricChildren.length === 0) { + return this.wildcardChild; + } + node = this.parametricChildren[0]; + parametricBrotherNodeIndex = 1; + } + if (this.wildcardChild !== null) { + nodeStack.push({ + paramsCount, + brotherPathIndex: pathIndex, + brotherNode: this.wildcardChild + }); + } + for (let i = this.parametricChildren.length - 1; i >= parametricBrotherNodeIndex; i--) { + nodeStack.push({ + paramsCount, + brotherPathIndex: pathIndex, + brotherNode: this.parametricChildren[i] + }); + } + return node; + } + _compilePrefixMatch() { + if (this.prefix.length === 1) { + this.matchPrefix = () => true; + return; + } + const lines = []; + for (let i = 1; i < this.prefix.length; i++) { + const charCode = this.prefix.charCodeAt(i); + lines.push(`path.charCodeAt(i + ${i}) === ${charCode}`); + } + this.matchPrefix = new Function("path", "i", `return ${lines.join(" && ")}`); + } + }; + var ParametricNode = class extends ParentNode { + constructor(regex, staticSuffix, nodePath) { + super(); + this.isRegex = !!regex; + this.regex = regex || null; + this.staticSuffix = staticSuffix || null; + this.kind = NODE_TYPES.PARAMETRIC; + this.nodePaths = /* @__PURE__ */ new Set([nodePath]); + } + getNextNode(path7, pathIndex) { + return this.findStaticMatchingChild(path7, pathIndex); + } + }; + var WildcardNode = class extends Node { + constructor() { + super(); + this.kind = NODE_TYPES.WILDCARD; + } + getNextNode() { + return null; + } + }; + module2.exports = { StaticNode, ParametricNode, WildcardNode, NODE_TYPES }; + } +}); + +// node_modules/find-my-way/lib/strategies/accept-version.js +var require_accept_version = __commonJS({ + "node_modules/find-my-way/lib/strategies/accept-version.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + function SemVerStore() { + if (!(this instanceof SemVerStore)) { + return new SemVerStore(); + } + this.store = /* @__PURE__ */ new Map(); + this.maxMajor = 0; + this.maxMinors = {}; + this.maxPatches = {}; + } + SemVerStore.prototype.set = function(version2, store) { + if (typeof version2 !== "string") { + throw new TypeError("Version should be a string"); + } + let [major, minor, patch] = version2.split(".", 3); + if (isNaN(major)) { + throw new TypeError("Major version must be a numeric value"); + } + major = Number(major); + minor = Number(minor) || 0; + patch = Number(patch) || 0; + if (major >= this.maxMajor) { + this.maxMajor = major; + this.store.set("x", store); + this.store.set("*", store); + this.store.set("x.x", store); + this.store.set("x.x.x", store); + } + if (minor >= (this.maxMinors[major] || 0)) { + this.maxMinors[major] = minor; + this.store.set(`${major}.x`, store); + this.store.set(`${major}.x.x`, store); + } + if (patch >= (this.maxPatches[`${major}.${minor}`] || 0)) { + this.maxPatches[`${major}.${minor}`] = patch; + this.store.set(`${major}.${minor}.x`, store); + } + this.store.set(`${major}.${minor}.${patch}`, store); + return this; + }; + SemVerStore.prototype.get = function(version2) { + return this.store.get(version2); + }; + module2.exports = { + name: "version", + mustMatchWhenDerived: true, + storage: SemVerStore, + validate(value) { + assert(typeof value === "string", "Version should be a string"); + } + }; + } +}); + +// node_modules/find-my-way/lib/strategies/accept-host.js +var require_accept_host = __commonJS({ + "node_modules/find-my-way/lib/strategies/accept-host.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + function HostStorage() { + const hosts = /* @__PURE__ */ new Map(); + const regexHosts = []; + return { + get: (host) => { + const exact = hosts.get(host); + if (exact) { + return exact; + } + for (const regex of regexHosts) { + if (regex.host.test(host)) { + return regex.value; + } + } + }, + set: (host, value) => { + if (host instanceof RegExp) { + regexHosts.push({ host, value }); + } else { + hosts.set(host, value); + } + } + }; + } + module2.exports = { + name: "host", + mustMatchWhenDerived: false, + storage: HostStorage, + validate(value) { + assert(typeof value === "string" || Object.prototype.toString.call(value) === "[object RegExp]", "Host should be a string or a RegExp"); + } + }; + } +}); + +// node_modules/find-my-way/lib/constrainer.js +var require_constrainer = __commonJS({ + "node_modules/find-my-way/lib/constrainer.js"(exports2, module2) { + "use strict"; + var acceptVersionStrategy = require_accept_version(); + var acceptHostStrategy = require_accept_host(); + var assert = require("node:assert"); + var Constrainer = class { + constructor(customStrategies) { + this.strategies = { + version: acceptVersionStrategy, + host: acceptHostStrategy + }; + this.strategiesInUse = /* @__PURE__ */ new Set(); + this.asyncStrategiesInUse = /* @__PURE__ */ new Set(); + if (customStrategies) { + for (const strategy of Object.values(customStrategies)) { + this.addConstraintStrategy(strategy); + } + } + } + isStrategyUsed(strategyName) { + return this.strategiesInUse.has(strategyName) || this.asyncStrategiesInUse.has(strategyName); + } + hasConstraintStrategy(strategyName) { + const customConstraintStrategy = this.strategies[strategyName]; + if (customConstraintStrategy !== void 0) { + return customConstraintStrategy.isCustom || this.isStrategyUsed(strategyName); + } + return false; + } + addConstraintStrategy(strategy) { + assert(typeof strategy.name === "string" && strategy.name !== "", "strategy.name is required."); + assert(strategy.storage && typeof strategy.storage === "function", "strategy.storage function is required."); + assert(strategy.deriveConstraint && typeof strategy.deriveConstraint === "function", "strategy.deriveConstraint function is required."); + if (this.strategies[strategy.name] && this.strategies[strategy.name].isCustom) { + throw new Error(`There already exists a custom constraint with the name ${strategy.name}.`); + } + if (this.isStrategyUsed(strategy.name)) { + throw new Error(`There already exists a route with ${strategy.name} constraint.`); + } + strategy.isCustom = true; + strategy.isAsync = strategy.deriveConstraint.length === 3; + this.strategies[strategy.name] = strategy; + if (strategy.mustMatchWhenDerived) { + this.noteUsage({ [strategy.name]: strategy }); + } + } + deriveConstraints(req, ctx, done) { + const constraints = this.deriveSyncConstraints(req, ctx); + if (done === void 0) { + return constraints; + } + this.deriveAsyncConstraints(constraints, req, ctx, done); + } + deriveSyncConstraints(req, ctx) { + return void 0; + } + // When new constraints start getting used, we need to rebuild the deriver to derive them. Do so if we see novel constraints used. + noteUsage(constraints) { + if (constraints) { + const beforeSize = this.strategiesInUse.size; + for (const key in constraints) { + const strategy = this.strategies[key]; + if (strategy.isAsync) { + this.asyncStrategiesInUse.add(key); + } else { + this.strategiesInUse.add(key); + } + } + if (beforeSize !== this.strategiesInUse.size) { + this._buildDeriveConstraints(); + } + } + } + newStoreForConstraint(constraint) { + if (!this.strategies[constraint]) { + throw new Error(`No strategy registered for constraint key ${constraint}`); + } + return this.strategies[constraint].storage(); + } + validateConstraints(constraints) { + for (const key in constraints) { + const value = constraints[key]; + if (typeof value === "undefined") { + throw new Error("Can't pass an undefined constraint value, must pass null or no key at all"); + } + const strategy = this.strategies[key]; + if (!strategy) { + throw new Error(`No strategy registered for constraint key ${key}`); + } + if (strategy.validate) { + strategy.validate(value); + } + } + } + deriveAsyncConstraints(constraints, req, ctx, done) { + let asyncConstraintsCount = this.asyncStrategiesInUse.size; + if (asyncConstraintsCount === 0) { + done(null, constraints); + return; + } + constraints = constraints || {}; + for (const key of this.asyncStrategiesInUse) { + const strategy = this.strategies[key]; + strategy.deriveConstraint(req, ctx, (err, constraintValue) => { + if (err !== null) { + done(err); + return; + } + constraints[key] = constraintValue; + if (--asyncConstraintsCount === 0) { + done(null, constraints); + } + }); + } + } + // Optimization: build a fast function for deriving the constraints for all the strategies at once. We inline the definitions of the version constraint and the host constraint for performance. + // If no constraining strategies are in use (no routes constrain on host, or version, or any custom strategies) then we don't need to derive constraints for each route match, so don't do anything special, and just return undefined + // This allows us to not allocate an object to hold constraint values if no constraints are defined. + _buildDeriveConstraints() { + if (this.strategiesInUse.size === 0) return; + const lines = ["return {"]; + for (const key of this.strategiesInUse) { + const strategy = this.strategies[key]; + if (!strategy.isCustom) { + if (key === "version") { + lines.push(" version: req.headers['accept-version'],"); + } else { + lines.push(" host: req.headers.host || req.headers[':authority'],"); + } + } else { + lines.push(` ${strategy.name}: this.strategies.${key}.deriveConstraint(req, ctx),`); + } + } + lines.push("}"); + this.deriveSyncConstraints = new Function("req", "ctx", lines.join("\n")).bind(this); + } + }; + module2.exports = Constrainer; + } +}); + +// node_modules/find-my-way/lib/http-methods.js +var require_http_methods = __commonJS({ + "node_modules/find-my-way/lib/http-methods.js"(exports2, module2) { + "use strict"; + var httpMethods = [ + "ACL", + "BIND", + "CHECKOUT", + "CONNECT", + "COPY", + "DELETE", + "GET", + "HEAD", + "LINK", + "LOCK", + "M-SEARCH", + "MERGE", + "MKACTIVITY", + "MKCALENDAR", + "MKCOL", + "MOVE", + "NOTIFY", + "OPTIONS", + "PATCH", + "POST", + "PROPFIND", + "PROPPATCH", + "PURGE", + "PUT", + "QUERY", + "REBIND", + "REPORT", + "SEARCH", + "SOURCE", + "SUBSCRIBE", + "TRACE", + "UNBIND", + "UNLINK", + "UNLOCK", + "UNSUBSCRIBE" + ]; + module2.exports = httpMethods; + } +}); + +// node_modules/find-my-way/lib/url-sanitizer.js +var require_url_sanitizer = __commonJS({ + "node_modules/find-my-way/lib/url-sanitizer.js"(exports2, module2) { + "use strict"; + function decodeComponentChar(highCharCode, lowCharCode) { + if (highCharCode === 50) { + if (lowCharCode === 53) return "%"; + if (lowCharCode === 51) return "#"; + if (lowCharCode === 52) return "$"; + if (lowCharCode === 54) return "&"; + if (lowCharCode === 66) return "+"; + if (lowCharCode === 98) return "+"; + if (lowCharCode === 67) return ","; + if (lowCharCode === 99) return ","; + if (lowCharCode === 70) return "/"; + if (lowCharCode === 102) return "/"; + return null; + } + if (highCharCode === 51) { + if (lowCharCode === 65) return ":"; + if (lowCharCode === 97) return ":"; + if (lowCharCode === 66) return ";"; + if (lowCharCode === 98) return ";"; + if (lowCharCode === 68) return "="; + if (lowCharCode === 100) return "="; + if (lowCharCode === 70) return "?"; + if (lowCharCode === 102) return "?"; + return null; + } + if (highCharCode === 52 && lowCharCode === 48) { + return "@"; + } + return null; + } + function safeDecodeURI(path7, useSemicolonDelimiter) { + let shouldDecode = false; + let shouldDecodeParam = false; + let querystring = ""; + for (let i = 1; i < path7.length; i++) { + const charCode = path7.charCodeAt(i); + if (charCode === 37) { + const highCharCode = path7.charCodeAt(i + 1); + const lowCharCode = path7.charCodeAt(i + 2); + if (decodeComponentChar(highCharCode, lowCharCode) === null) { + shouldDecode = true; + } else { + shouldDecodeParam = true; + if (highCharCode === 50 && lowCharCode === 53) { + shouldDecode = true; + path7 = path7.slice(0, i + 1) + "25" + path7.slice(i + 1); + i += 2; + } + i += 2; + } + } else if (charCode === 63 || charCode === 35 || charCode === 59 && useSemicolonDelimiter) { + querystring = path7.slice(i + 1); + path7 = path7.slice(0, i); + break; + } + } + const decodedPath = shouldDecode ? decodeURI(path7) : path7; + return { path: decodedPath, querystring, shouldDecodeParam }; + } + function safeDecodeURIComponent(uriComponent) { + const startIndex = uriComponent.indexOf("%"); + if (startIndex === -1) return uriComponent; + let decoded = ""; + let lastIndex = startIndex; + for (let i = startIndex; i < uriComponent.length; i++) { + if (uriComponent.charCodeAt(i) === 37) { + const highCharCode = uriComponent.charCodeAt(i + 1); + const lowCharCode = uriComponent.charCodeAt(i + 2); + const decodedChar = decodeComponentChar(highCharCode, lowCharCode); + decoded += uriComponent.slice(lastIndex, i) + decodedChar; + lastIndex = i + 3; + } + } + return uriComponent.slice(0, startIndex) + decoded + uriComponent.slice(lastIndex); + } + module2.exports = { safeDecodeURI, safeDecodeURIComponent }; + } +}); + +// node_modules/find-my-way/index.js +var require_find_my_way = __commonJS({ + "node_modules/find-my-way/index.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var querystring = require_lib2(); + var isRegexSafe = require_safe_regex2(); + var deepEqual = require_fast_deep_equal(); + var { prettyPrintTree } = require_pretty_print(); + var { StaticNode, NODE_TYPES } = require_node(); + var Constrainer = require_constrainer(); + var httpMethods = require_http_methods(); + var httpMethodStrategy = require_http_method(); + var { safeDecodeURI, safeDecodeURIComponent } = require_url_sanitizer(); + var FULL_PATH_REGEXP = /^https?:\/\/.*?\//; + var OPTIONAL_PARAM_REGEXP = /(\/:[^/()]*?)\?(\/?)/; + var ESCAPE_REGEXP = /[.*+?^${}()|[\]\\]/g; + var REMOVE_DUPLICATE_SLASHES_REGEXP = /\/\/+/g; + if (!isRegexSafe(FULL_PATH_REGEXP)) { + throw new Error("the FULL_PATH_REGEXP is not safe, update this module"); + } + if (!isRegexSafe(OPTIONAL_PARAM_REGEXP)) { + throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module"); + } + if (!isRegexSafe(ESCAPE_REGEXP)) { + throw new Error("the ESCAPE_REGEXP is not safe, update this module"); + } + if (!isRegexSafe(REMOVE_DUPLICATE_SLASHES_REGEXP)) { + throw new Error("the REMOVE_DUPLICATE_SLASHES_REGEXP is not safe, update this module"); + } + function Router(opts) { + if (!(this instanceof Router)) { + return new Router(opts); + } + opts = opts || {}; + this._opts = opts; + if (opts.defaultRoute) { + assert(typeof opts.defaultRoute === "function", "The default route must be a function"); + this.defaultRoute = opts.defaultRoute; + } else { + this.defaultRoute = null; + } + if (opts.onBadUrl) { + assert(typeof opts.onBadUrl === "function", "The bad url handler must be a function"); + this.onBadUrl = opts.onBadUrl; + } else { + this.onBadUrl = null; + } + if (opts.buildPrettyMeta) { + assert(typeof opts.buildPrettyMeta === "function", "buildPrettyMeta must be a function"); + this.buildPrettyMeta = opts.buildPrettyMeta; + } else { + this.buildPrettyMeta = defaultBuildPrettyMeta; + } + if (opts.querystringParser) { + assert(typeof opts.querystringParser === "function", "querystringParser must be a function"); + this.querystringParser = opts.querystringParser; + } else { + this.querystringParser = (query) => query.length === 0 ? {} : querystring.parse(query); + } + this.caseSensitive = opts.caseSensitive === void 0 ? true : opts.caseSensitive; + this.ignoreTrailingSlash = opts.ignoreTrailingSlash || false; + this.ignoreDuplicateSlashes = opts.ignoreDuplicateSlashes || false; + this.maxParamLength = opts.maxParamLength || 100; + this.allowUnsafeRegex = opts.allowUnsafeRegex || false; + this.constrainer = new Constrainer(opts.constraints); + this.useSemicolonDelimiter = opts.useSemicolonDelimiter || false; + this.routes = []; + this.trees = {}; + } + Router.prototype.on = function on(method, path7, opts, handler, store) { + if (typeof opts === "function") { + if (handler !== void 0) { + store = handler; + } + handler = opts; + opts = {}; + } + assert(typeof path7 === "string", "Path should be a string"); + assert(path7.length > 0, "The path could not be empty"); + assert(path7[0] === "/" || path7[0] === "*", "The first character of a path should be `/` or `*`"); + assert(typeof handler === "function", "Handler should be a function"); + const optionalParamMatch = path7.match(OPTIONAL_PARAM_REGEXP); + if (optionalParamMatch) { + assert(path7.length === optionalParamMatch.index + optionalParamMatch[0].length, "Optional Parameter needs to be the last parameter of the path"); + const pathFull = path7.replace(OPTIONAL_PARAM_REGEXP, "$1$2"); + const pathOptional = path7.replace(OPTIONAL_PARAM_REGEXP, "$2") || "/"; + this.on(method, pathFull, opts, handler, store); + this.on(method, pathOptional, opts, handler, store); + return; + } + const route = path7; + if (this.ignoreDuplicateSlashes) { + path7 = removeDuplicateSlashes(path7); + } + if (this.ignoreTrailingSlash) { + path7 = trimLastSlash(path7); + } + const methods = Array.isArray(method) ? method : [method]; + for (const method2 of methods) { + assert(typeof method2 === "string", "Method should be a string"); + assert(httpMethods.includes(method2), `Method '${method2}' is not an http method.`); + this._on(method2, path7, opts, handler, store, route); + } + }; + Router.prototype._on = function _on(method, path7, opts, handler, store) { + let constraints = {}; + if (opts.constraints !== void 0) { + assert(typeof opts.constraints === "object" && opts.constraints !== null, "Constraints should be an object"); + if (Object.keys(opts.constraints).length !== 0) { + constraints = opts.constraints; + } + } + this.constrainer.validateConstraints(constraints); + this.constrainer.noteUsage(constraints); + if (this.trees[method] === void 0) { + this.trees[method] = new StaticNode("/"); + } + let pattern = path7; + if (pattern === "*" && this.trees[method].prefix.length !== 0) { + const currentRoot = this.trees[method]; + this.trees[method] = new StaticNode(""); + this.trees[method].staticChildren["/"] = currentRoot; + } + let currentNode = this.trees[method]; + let parentNodePathIndex = currentNode.prefix.length; + const params = []; + for (let i = 0; i <= pattern.length; i++) { + if (pattern.charCodeAt(i) === 58 && pattern.charCodeAt(i + 1) === 58) { + i++; + continue; + } + const isParametricNode = pattern.charCodeAt(i) === 58 && pattern.charCodeAt(i + 1) !== 58; + const isWildcardNode = pattern.charCodeAt(i) === 42; + if (isParametricNode || isWildcardNode || i === pattern.length && i !== parentNodePathIndex) { + let staticNodePath = pattern.slice(parentNodePathIndex, i); + if (!this.caseSensitive) { + staticNodePath = staticNodePath.toLowerCase(); + } + staticNodePath = staticNodePath.replaceAll("::", ":"); + staticNodePath = staticNodePath.replaceAll("%", "%25"); + currentNode = currentNode.createStaticChild(staticNodePath); + } + if (isParametricNode) { + let isRegexNode = false; + let isParamSafe = true; + let backtrack = ""; + const regexps = []; + let lastParamStartIndex = i + 1; + for (let j = lastParamStartIndex; ; j++) { + const charCode = pattern.charCodeAt(j); + const isRegexParam = charCode === 40; + const isStaticPart = charCode === 45 || charCode === 46; + const isEndOfNode = charCode === 47 || j === pattern.length; + if (isRegexParam || isStaticPart || isEndOfNode) { + const paramName = pattern.slice(lastParamStartIndex, j); + params.push(paramName); + isRegexNode = isRegexNode || isRegexParam || isStaticPart; + if (isRegexParam) { + const endOfRegexIndex = getClosingParenthensePosition(pattern, j); + const regexString = pattern.slice(j, endOfRegexIndex + 1); + if (!this.allowUnsafeRegex) { + assert(isRegexSafe(new RegExp(regexString)), `The regex '${regexString}' is not safe!`); + } + regexps.push(trimRegExpStartAndEnd(regexString)); + j = endOfRegexIndex + 1; + isParamSafe = true; + } else { + regexps.push(isParamSafe ? "(.*?)" : `(${backtrack}|(?:(?!${backtrack}).)*)`); + isParamSafe = false; + } + const staticPartStartIndex = j; + for (; j < pattern.length; j++) { + const charCode2 = pattern.charCodeAt(j); + if (charCode2 === 47) break; + if (charCode2 === 58) { + const nextCharCode = pattern.charCodeAt(j + 1); + if (nextCharCode === 58) j++; + else break; + } + } + let staticPart = pattern.slice(staticPartStartIndex, j); + if (staticPart) { + staticPart = staticPart.replaceAll("::", ":"); + staticPart = staticPart.replaceAll("%", "%25"); + regexps.push(backtrack = escapeRegExp(staticPart)); + } + lastParamStartIndex = j + 1; + if (isEndOfNode || pattern.charCodeAt(j) === 47 || j === pattern.length) { + const nodePattern = isRegexNode ? "()" + staticPart : staticPart; + const nodePath = pattern.slice(i, j); + pattern = pattern.slice(0, i + 1) + nodePattern + pattern.slice(j); + i += nodePattern.length; + const regex = isRegexNode ? new RegExp("^" + regexps.join("") + "$") : null; + currentNode = currentNode.createParametricChild(regex, staticPart || null, nodePath); + parentNodePathIndex = i + 1; + break; + } + } + } + } else if (isWildcardNode) { + params.push("*"); + currentNode = currentNode.createWildcardChild(); + parentNodePathIndex = i + 1; + if (i !== pattern.length - 1) { + throw new Error("Wildcard must be the last character in the route"); + } + } + } + if (!this.caseSensitive) { + pattern = pattern.toLowerCase(); + } + if (pattern === "*") { + pattern = "/*"; + } + for (const existRoute of this.routes) { + const routeConstraints = existRoute.opts.constraints || {}; + if (existRoute.method === method && existRoute.pattern === pattern && deepEqual(routeConstraints, constraints)) { + throw new Error(`Method '${method}' already declared for route '${pattern}' with constraints '${JSON.stringify(constraints)}'`); + } + } + const route = { method, path: path7, pattern, params, opts, handler, store }; + this.routes.push(route); + currentNode.addRoute(route, this.constrainer); + }; + Router.prototype.hasRoute = function hasRoute(method, path7, constraints) { + const route = this.findRoute(method, path7, constraints); + return route !== null; + }; + Router.prototype.findRoute = function findNode(method, path7, constraints = {}) { + if (this.trees[method] === void 0) { + return null; + } + let pattern = path7; + let currentNode = this.trees[method]; + let parentNodePathIndex = currentNode.prefix.length; + const params = []; + for (let i = 0; i <= pattern.length; i++) { + if (pattern.charCodeAt(i) === 58 && pattern.charCodeAt(i + 1) === 58) { + i++; + continue; + } + const isParametricNode = pattern.charCodeAt(i) === 58 && pattern.charCodeAt(i + 1) !== 58; + const isWildcardNode = pattern.charCodeAt(i) === 42; + if (isParametricNode || isWildcardNode || i === pattern.length && i !== parentNodePathIndex) { + let staticNodePath = pattern.slice(parentNodePathIndex, i); + if (!this.caseSensitive) { + staticNodePath = staticNodePath.toLowerCase(); + } + staticNodePath = staticNodePath.replaceAll("::", ":"); + staticNodePath = staticNodePath.replaceAll("%", "%25"); + currentNode = currentNode.getStaticChild(staticNodePath); + if (currentNode === null) { + return null; + } + } + if (isParametricNode) { + let isRegexNode = false; + let isParamSafe = true; + let backtrack = ""; + const regexps = []; + let lastParamStartIndex = i + 1; + for (let j = lastParamStartIndex; ; j++) { + const charCode = pattern.charCodeAt(j); + const isRegexParam = charCode === 40; + const isStaticPart = charCode === 45 || charCode === 46; + const isEndOfNode = charCode === 47 || j === pattern.length; + if (isRegexParam || isStaticPart || isEndOfNode) { + const paramName = pattern.slice(lastParamStartIndex, j); + params.push(paramName); + isRegexNode = isRegexNode || isRegexParam || isStaticPart; + if (isRegexParam) { + const endOfRegexIndex = getClosingParenthensePosition(pattern, j); + const regexString = pattern.slice(j, endOfRegexIndex + 1); + if (!this.allowUnsafeRegex) { + assert(isRegexSafe(new RegExp(regexString)), `The regex '${regexString}' is not safe!`); + } + regexps.push(trimRegExpStartAndEnd(regexString)); + j = endOfRegexIndex + 1; + isParamSafe = false; + } else { + regexps.push(isParamSafe ? "(.*?)" : `(${backtrack}|(?:(?!${backtrack}).)*)`); + isParamSafe = false; + } + const staticPartStartIndex = j; + for (; j < pattern.length; j++) { + const charCode2 = pattern.charCodeAt(j); + if (charCode2 === 47) break; + if (charCode2 === 58) { + const nextCharCode = pattern.charCodeAt(j + 1); + if (nextCharCode === 58) j++; + else break; + } + } + let staticPart = pattern.slice(staticPartStartIndex, j); + if (staticPart) { + staticPart = staticPart.replaceAll("::", ":"); + staticPart = staticPart.replaceAll("%", "%25"); + regexps.push(backtrack = escapeRegExp(staticPart)); + } + lastParamStartIndex = j + 1; + if (isEndOfNode || pattern.charCodeAt(j) === 47 || j === pattern.length) { + const nodePattern = isRegexNode ? "()" + staticPart : staticPart; + const nodePath = pattern.slice(i, j); + pattern = pattern.slice(0, i + 1) + nodePattern + pattern.slice(j); + i += nodePattern.length; + const regex = isRegexNode ? new RegExp("^" + regexps.join("") + "$") : null; + currentNode = currentNode.getParametricChild(regex, staticPart || null, nodePath); + if (currentNode === null) { + return null; + } + parentNodePathIndex = i + 1; + break; + } + } + } + } else if (isWildcardNode) { + params.push("*"); + currentNode = currentNode.getWildcardChild(); + parentNodePathIndex = i + 1; + if (i !== pattern.length - 1) { + throw new Error("Wildcard must be the last character in the route"); + } + } + } + if (!this.caseSensitive) { + pattern = pattern.toLowerCase(); + } + for (const existRoute of this.routes) { + const routeConstraints = existRoute.opts.constraints || {}; + if (existRoute.method === method && existRoute.pattern === pattern && deepEqual(routeConstraints, constraints)) { + return { + handler: existRoute.handler, + store: existRoute.store, + params: existRoute.params + }; + } + } + return null; + }; + Router.prototype.hasConstraintStrategy = function(strategyName) { + return this.constrainer.hasConstraintStrategy(strategyName); + }; + Router.prototype.addConstraintStrategy = function(constraints) { + this.constrainer.addConstraintStrategy(constraints); + this._rebuild(this.routes); + }; + Router.prototype.reset = function reset() { + this.trees = {}; + this.routes = []; + }; + Router.prototype.off = function off(method, path7, constraints) { + assert(typeof path7 === "string", "Path should be a string"); + assert(path7.length > 0, "The path could not be empty"); + assert(path7[0] === "/" || path7[0] === "*", "The first character of a path should be `/` or `*`"); + assert( + typeof constraints === "undefined" || typeof constraints === "object" && !Array.isArray(constraints) && constraints !== null, + "Constraints should be an object or undefined." + ); + const optionalParamMatch = path7.match(OPTIONAL_PARAM_REGEXP); + if (optionalParamMatch) { + assert(path7.length === optionalParamMatch.index + optionalParamMatch[0].length, "Optional Parameter needs to be the last parameter of the path"); + const pathFull = path7.replace(OPTIONAL_PARAM_REGEXP, "$1$2"); + const pathOptional = path7.replace(OPTIONAL_PARAM_REGEXP, "$2"); + this.off(method, pathFull, constraints); + this.off(method, pathOptional, constraints); + return; + } + if (this.ignoreDuplicateSlashes) { + path7 = removeDuplicateSlashes(path7); + } + if (this.ignoreTrailingSlash) { + path7 = trimLastSlash(path7); + } + const methods = Array.isArray(method) ? method : [method]; + for (const method2 of methods) { + this._off(method2, path7, constraints); + } + }; + Router.prototype._off = function _off(method, path7, constraints) { + assert(typeof method === "string", "Method should be a string"); + assert(httpMethods.includes(method), `Method '${method}' is not an http method.`); + function matcherWithoutConstraints(route) { + return method !== route.method || path7 !== route.path; + } + function matcherWithConstraints(route) { + return matcherWithoutConstraints(route) || !deepEqual(constraints, route.opts.constraints || {}); + } + const predicate = constraints ? matcherWithConstraints : matcherWithoutConstraints; + const newRoutes = this.routes.filter(predicate); + this._rebuild(newRoutes); + }; + Router.prototype.lookup = function lookup(req, res, ctx, done) { + if (typeof ctx === "function") { + done = ctx; + ctx = void 0; + } + if (done === void 0) { + const constraints = this.constrainer.deriveConstraints(req, ctx); + const handle = this.find(req.method, req.url, constraints); + return this.callHandler(handle, req, res, ctx); + } + this.constrainer.deriveConstraints(req, ctx, (err, constraints) => { + if (err !== null) { + done(err); + return; + } + try { + const handle = this.find(req.method, req.url, constraints); + const result = this.callHandler(handle, req, res, ctx); + done(null, result); + } catch (err2) { + done(err2); + } + }); + }; + Router.prototype.callHandler = function callHandler(handle, req, res, ctx) { + if (handle === null) return this._defaultRoute(req, res, ctx); + return ctx === void 0 ? handle.handler(req, res, handle.params, handle.store, handle.searchParams) : handle.handler.call(ctx, req, res, handle.params, handle.store, handle.searchParams); + }; + Router.prototype.find = function find(method, path7, derivedConstraints) { + let currentNode = this.trees[method]; + if (currentNode === void 0) return null; + if (path7.charCodeAt(0) !== 47) { + path7 = path7.replace(FULL_PATH_REGEXP, "/"); + } + if (this.ignoreDuplicateSlashes) { + path7 = removeDuplicateSlashes(path7); + } + let sanitizedUrl; + let querystring2; + let shouldDecodeParam; + try { + sanitizedUrl = safeDecodeURI(path7, this.useSemicolonDelimiter); + path7 = sanitizedUrl.path; + querystring2 = sanitizedUrl.querystring; + shouldDecodeParam = sanitizedUrl.shouldDecodeParam; + } catch (error) { + return this._onBadUrl(path7); + } + if (this.ignoreTrailingSlash) { + path7 = trimLastSlash(path7); + } + const originPath = path7; + if (this.caseSensitive === false) { + path7 = path7.toLowerCase(); + } + const maxParamLength = this.maxParamLength; + let pathIndex = currentNode.prefix.length; + const params = []; + const pathLen = path7.length; + const brothersNodesStack = []; + while (true) { + if (pathIndex === pathLen && currentNode.isLeafNode) { + const handle = currentNode.handlerStorage.getMatchingHandler(derivedConstraints); + if (handle !== null) { + return { + handler: handle.handler, + store: handle.store, + params: handle._createParamsObject(params), + searchParams: this.querystringParser(querystring2) + }; + } + } + let node = currentNode.getNextNode(path7, pathIndex, brothersNodesStack, params.length); + if (node === null) { + if (brothersNodesStack.length === 0) { + return null; + } + const brotherNodeState = brothersNodesStack.pop(); + pathIndex = brotherNodeState.brotherPathIndex; + params.splice(brotherNodeState.paramsCount); + node = brotherNodeState.brotherNode; + } + currentNode = node; + if (currentNode.kind === NODE_TYPES.STATIC) { + pathIndex += currentNode.prefix.length; + continue; + } + if (currentNode.kind === NODE_TYPES.WILDCARD) { + let param2 = originPath.slice(pathIndex); + if (shouldDecodeParam) { + param2 = safeDecodeURIComponent(param2); + } + params.push(param2); + pathIndex = pathLen; + continue; + } + let paramEndIndex = originPath.indexOf("/", pathIndex); + if (paramEndIndex === -1) { + paramEndIndex = pathLen; + } + let param = originPath.slice(pathIndex, paramEndIndex); + if (shouldDecodeParam) { + param = safeDecodeURIComponent(param); + } + if (currentNode.isRegex) { + const matchedParameters = currentNode.regex.exec(param); + if (matchedParameters === null) continue; + for (let i = 1; i < matchedParameters.length; i++) { + const matchedParam = matchedParameters[i]; + if (matchedParam.length > maxParamLength) { + return null; + } + params.push(matchedParam); + } + } else { + if (param.length > maxParamLength) { + return null; + } + params.push(param); + } + pathIndex = paramEndIndex; + } + }; + Router.prototype._rebuild = function(routes) { + this.reset(); + for (const route of routes) { + const { method, path: path7, opts, handler, store } = route; + this._on(method, path7, opts, handler, store); + } + }; + Router.prototype._defaultRoute = function(req, res, ctx) { + if (this.defaultRoute !== null) { + return ctx === void 0 ? this.defaultRoute(req, res) : this.defaultRoute.call(ctx, req, res); + } else { + res.statusCode = 404; + res.end(); + } + }; + Router.prototype._onBadUrl = function(path7) { + if (this.onBadUrl === null) { + return null; + } + const onBadUrl = this.onBadUrl; + return { + handler: (req, res, ctx) => onBadUrl(path7, req, res), + params: {}, + store: null + }; + }; + Router.prototype.prettyPrint = function(options = {}) { + const method = options.method; + options.buildPrettyMeta = this.buildPrettyMeta.bind(this); + let tree = null; + if (method === void 0) { + const { version: version2, host, ...constraints } = this.constrainer.strategies; + constraints[httpMethodStrategy.name] = httpMethodStrategy; + const mergedRouter = new Router({ ...this._opts, constraints }); + const mergedRoutes = this.routes.map((route) => { + const constraints2 = { + ...route.opts.constraints, + [httpMethodStrategy.name]: route.method + }; + return { ...route, method: "MERGED", opts: { constraints: constraints2 } }; + }); + mergedRouter._rebuild(mergedRoutes); + tree = mergedRouter.trees.MERGED; + } else { + tree = this.trees[method]; + } + if (tree == null) return "(empty tree)"; + return prettyPrintTree(tree, options); + }; + for (const i in httpMethods) { + if (!httpMethods.hasOwnProperty(i)) continue; + const m = httpMethods[i]; + const methodName = m.toLowerCase(); + Router.prototype[methodName] = function(path7, handler, store) { + return this.on(m, path7, handler, store); + }; + } + Router.prototype.all = function(path7, handler, store) { + this.on(httpMethods, path7, handler, store); + }; + module2.exports = Router; + function escapeRegExp(string) { + return string.replace(ESCAPE_REGEXP, "\\$&"); + } + function removeDuplicateSlashes(path7) { + return path7.indexOf("//") !== -1 ? path7.replace(REMOVE_DUPLICATE_SLASHES_REGEXP, "/") : path7; + } + function trimLastSlash(path7) { + if (path7.length > 1 && path7.charCodeAt(path7.length - 1) === 47) { + return path7.slice(0, -1); + } + return path7; + } + function trimRegExpStartAndEnd(regexString) { + if (regexString.charCodeAt(1) === 94) { + regexString = regexString.slice(0, 1) + regexString.slice(2); + } + if (regexString.charCodeAt(regexString.length - 2) === 36) { + regexString = regexString.slice(0, regexString.length - 2) + regexString.slice(regexString.length - 1); + } + return regexString; + } + function getClosingParenthensePosition(path7, idx) { + let parentheses = 1; + while (idx < path7.length) { + idx++; + if (path7.charCodeAt(idx) === 92) { + idx++; + continue; + } + if (path7.charCodeAt(idx) === 41) { + parentheses--; + } else if (path7.charCodeAt(idx) === 40) { + parentheses++; + } + if (!parentheses) return idx; + } + throw new TypeError('Invalid regexp expression in "' + path7 + '"'); + } + function defaultBuildPrettyMeta(route) { + if (!route) return {}; + if (!route.store) return {}; + return Object.assign({}, route.store); + } + } +}); + +// node_modules/fastify/lib/headRoute.js +var require_headRoute = __commonJS({ + "node_modules/fastify/lib/headRoute.js"(exports2, module2) { + "use strict"; + function headRouteOnSendHandler(req, reply, payload, done) { + if (payload === void 0) { + reply.header("content-length", "0"); + done(null, null); + return; + } + if (typeof payload.resume === "function") { + payload.on("error", (err) => { + reply.log.error({ err }, "Error on Stream found for HEAD route"); + }); + payload.resume(); + done(null, null); + return; + } + const size = "" + Buffer.byteLength(payload); + reply.header("content-length", size); + done(null, null); + } + function parseHeadOnSendHandlers(onSendHandlers) { + if (onSendHandlers == null) return headRouteOnSendHandler; + return Array.isArray(onSendHandlers) ? [...onSendHandlers, headRouteOnSendHandler] : [onSendHandlers, headRouteOnSendHandler]; + } + module2.exports = { + parseHeadOnSendHandlers + }; + } +}); + +// node_modules/fastify/lib/route.js +var require_route = __commonJS({ + "node_modules/fastify/lib/route.js"(exports2, module2) { + "use strict"; + var FindMyWay = require_find_my_way(); + var Context = require_context(); + var handleRequest = require_handleRequest(); + var { onRequestAbortHookRunner, lifecycleHooks, preParsingHookRunner, onTimeoutHookRunner, onRequestHookRunner } = require_hooks(); + var { normalizeSchema } = require_schemas(); + var { parseHeadOnSendHandlers } = require_headRoute(); + var { + compileSchemasForValidation, + compileSchemasForSerialization + } = require_validation(); + var { + FST_ERR_SCH_VALIDATION_BUILD, + FST_ERR_SCH_SERIALIZATION_BUILD, + FST_ERR_DUPLICATED_ROUTE, + FST_ERR_INVALID_URL, + FST_ERR_HOOK_INVALID_HANDLER, + FST_ERR_ROUTE_OPTIONS_NOT_OBJ, + FST_ERR_ROUTE_DUPLICATED_HANDLER, + FST_ERR_ROUTE_HANDLER_NOT_FN, + FST_ERR_ROUTE_MISSING_HANDLER, + FST_ERR_ROUTE_METHOD_NOT_SUPPORTED, + FST_ERR_ROUTE_METHOD_INVALID, + FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED, + FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT, + FST_ERR_HOOK_INVALID_ASYNC_HANDLER + } = require_errors2(); + var { FSTDEP022 } = require_warnings(); + var { + kRoutePrefix, + kSupportedHTTPMethods, + kLogLevel, + kLogSerializers, + kHooks, + kSchemaController, + kOptions, + kReplySerializerDefault, + kReplyIsError, + kRequestPayloadStream, + kDisableRequestLogging, + kSchemaErrorFormatter, + kErrorHandler, + kHasBeenDecorated, + kRequestAcceptVersion, + kRouteByFastify, + kRouteContext + } = require_symbols2(); + var { buildErrorHandler } = require_error_handler(); + var { createChildLogger } = require_logger_factory(); + var { getGenReqId } = require_reqIdGenFactory(); + var routerKeys = [ + "allowUnsafeRegex", + "buildPrettyMeta", + "caseSensitive", + "constraints", + "defaultRoute", + "ignoreDuplicateSlashes", + "ignoreTrailingSlash", + "maxParamLength", + "onBadUrl", + "querystringParser", + "useSemicolonDelimiter" + ]; + function buildRouting(options) { + const router2 = FindMyWay(options.config); + let avvio; + let fourOhFour; + let logger; + let hasLogger; + let setupResponseListeners; + let throwIfAlreadyStarted; + let disableRequestLogging; + let ignoreTrailingSlash; + let ignoreDuplicateSlashes; + let return503OnClosing; + let globalExposeHeadRoutes; + let keepAliveConnections; + let closing = false; + return { + /** + * @param {import('../fastify').FastifyServerOptions} options + * @param {*} fastifyArgs + */ + setup(options2, fastifyArgs) { + avvio = fastifyArgs.avvio; + fourOhFour = fastifyArgs.fourOhFour; + logger = fastifyArgs.logger; + hasLogger = fastifyArgs.hasLogger; + setupResponseListeners = fastifyArgs.setupResponseListeners; + throwIfAlreadyStarted = fastifyArgs.throwIfAlreadyStarted; + globalExposeHeadRoutes = options2.exposeHeadRoutes; + disableRequestLogging = options2.disableRequestLogging; + ignoreTrailingSlash = options2.routerOptions.ignoreTrailingSlash; + ignoreDuplicateSlashes = options2.routerOptions.ignoreDuplicateSlashes; + return503OnClosing = Object.hasOwn(options2, "return503OnClosing") ? options2.return503OnClosing : true; + keepAliveConnections = fastifyArgs.keepAliveConnections; + }, + routing: router2.lookup.bind(router2), + // router func to find the right handler to call + route, + // configure a route in the fastify instance + hasRoute, + prepareRoute, + routeHandler, + closeRoutes: () => { + closing = true; + }, + printRoutes: router2.prettyPrint.bind(router2), + addConstraintStrategy, + hasConstraintStrategy, + isAsyncConstraint, + findRoute + }; + function addConstraintStrategy(strategy) { + throwIfAlreadyStarted("Cannot add constraint strategy!"); + return router2.addConstraintStrategy(strategy); + } + function hasConstraintStrategy(strategyName) { + return router2.hasConstraintStrategy(strategyName); + } + function isAsyncConstraint() { + return router2.constrainer.asyncStrategiesInUse.size > 0; + } + function prepareRoute({ method, url, options: options2, handler, isFastify }) { + if (typeof url !== "string") { + throw new FST_ERR_INVALID_URL(typeof url); + } + if (!handler && typeof options2 === "function") { + handler = options2; + options2 = {}; + } else if (handler && typeof handler === "function") { + if (Object.prototype.toString.call(options2) !== "[object Object]") { + throw new FST_ERR_ROUTE_OPTIONS_NOT_OBJ(method, url); + } else if (options2.handler) { + if (typeof options2.handler === "function") { + throw new FST_ERR_ROUTE_DUPLICATED_HANDLER(method, url); + } else { + throw new FST_ERR_ROUTE_HANDLER_NOT_FN(method, url); + } + } + } + options2 = Object.assign({}, options2, { + method, + url, + path: url, + handler: handler || options2 && options2.handler + }); + return route.call(this, { options: options2, isFastify }); + } + function hasRoute({ options: options2 }) { + const normalizedMethod = options2.method?.toUpperCase() ?? ""; + return router2.hasRoute( + normalizedMethod, + options2.url || "", + options2.constraints + ); + } + function findRoute(options2) { + const route2 = router2.find( + options2.method, + options2.url || "", + options2.constraints + ); + if (route2) { + return { + handler: route2.handler, + params: route2.params, + searchParams: route2.searchParams + }; + } else { + return null; + } + } + function route({ options: options2, isFastify }) { + throwIfAlreadyStarted("Cannot add route!"); + const opts = { ...options2 }; + const path7 = opts.url || opts.path || ""; + if (!opts.handler) { + throw new FST_ERR_ROUTE_MISSING_HANDLER(opts.method, path7); + } + if (opts.errorHandler !== void 0 && typeof opts.errorHandler !== "function") { + throw new FST_ERR_ROUTE_HANDLER_NOT_FN(opts.method, path7); + } + validateBodyLimitOption(opts.bodyLimit); + const shouldExposeHead = opts.exposeHeadRoute ?? globalExposeHeadRoutes; + let isGetRoute = false; + let isHeadRoute = false; + if (Array.isArray(opts.method)) { + for (let i = 0; i < opts.method.length; ++i) { + opts.method[i] = normalizeAndValidateMethod.call(this, opts.method[i]); + validateSchemaBodyOption.call(this, opts.method[i], path7, opts.schema); + isGetRoute = opts.method.includes("GET"); + isHeadRoute = opts.method.includes("HEAD"); + } + } else { + opts.method = normalizeAndValidateMethod.call(this, opts.method); + validateSchemaBodyOption.call(this, opts.method, path7, opts.schema); + isGetRoute = opts.method === "GET"; + isHeadRoute = opts.method === "HEAD"; + } + const headOpts = shouldExposeHead && isGetRoute ? { ...options2 } : null; + const prefix = this[kRoutePrefix]; + if (path7 === "/" && prefix.length > 0 && opts.method !== "HEAD") { + switch (opts.prefixTrailingSlash) { + case "slash": + addNewRoute.call(this, { path: path7, isFastify }); + break; + case "no-slash": + addNewRoute.call(this, { path: "", isFastify }); + break; + case "both": + default: + addNewRoute.call(this, { path: "", isFastify }); + if (ignoreTrailingSlash !== true && (ignoreDuplicateSlashes !== true || !prefix.endsWith("/"))) { + addNewRoute.call(this, { path: path7, prefixing: true, isFastify }); + } + } + } else if (path7[0] === "/" && prefix.endsWith("/")) { + addNewRoute.call(this, { path: path7.slice(1), isFastify }); + } else { + addNewRoute.call(this, { path: path7, isFastify }); + } + return this; + function addNewRoute({ path: path8, prefixing = false, isFastify: isFastify2 = false }) { + const url = prefix + path8; + opts.url = url; + opts.path = url; + opts.routePath = path8; + opts.prefix = prefix; + opts.logLevel = opts.logLevel || this[kLogLevel]; + if (this[kLogSerializers] || opts.logSerializers) { + opts.logSerializers = Object.assign(Object.create(this[kLogSerializers]), opts.logSerializers); + } + if (opts.attachValidation == null) { + opts.attachValidation = false; + } + if (prefixing === false) { + for (const hook of this[kHooks].onRoute) { + hook.call(this, opts); + } + } + for (const hook of lifecycleHooks) { + if (opts && hook in opts) { + if (Array.isArray(opts[hook])) { + for (const func of opts[hook]) { + if (typeof func !== "function") { + throw new FST_ERR_HOOK_INVALID_HANDLER(hook, Object.prototype.toString.call(func)); + } + if (hook === "onSend" || hook === "preSerialization" || hook === "onError" || hook === "preParsing") { + if (func.constructor.name === "AsyncFunction" && func.length === 4) { + throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER(); + } + } else if (hook === "onRequestAbort") { + if (func.constructor.name === "AsyncFunction" && func.length !== 1) { + throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER(); + } + } else { + if (func.constructor.name === "AsyncFunction" && func.length === 3) { + throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER(); + } + } + } + } else if (opts[hook] !== void 0 && typeof opts[hook] !== "function") { + throw new FST_ERR_HOOK_INVALID_HANDLER(hook, Object.prototype.toString.call(opts[hook])); + } + } + } + const constraints = opts.constraints || {}; + const config = { + ...opts.config, + url, + method: opts.method + }; + const context = new Context({ + schema: opts.schema, + handler: opts.handler.bind(this), + config, + errorHandler: opts.errorHandler, + childLoggerFactory: opts.childLoggerFactory, + bodyLimit: opts.bodyLimit, + logLevel: opts.logLevel, + logSerializers: opts.logSerializers, + attachValidation: opts.attachValidation, + schemaErrorFormatter: opts.schemaErrorFormatter, + replySerializer: this[kReplySerializerDefault], + validatorCompiler: opts.validatorCompiler, + serializerCompiler: opts.serializerCompiler, + exposeHeadRoute: shouldExposeHead, + prefixTrailingSlash: opts.prefixTrailingSlash || "both", + server: this, + isFastify: isFastify2 + }); + const headHandler = router2.findRoute("HEAD", opts.url, constraints); + const hasHEADHandler = headHandler !== null; + try { + router2.on(opts.method, opts.url, { constraints }, routeHandler, context); + } catch (error) { + if (!context[kRouteByFastify]) { + const isDuplicatedRoute = error.message.includes(`Method '${opts.method}' already declared for route`); + if (isDuplicatedRoute) { + throw new FST_ERR_DUPLICATED_ROUTE(opts.method, opts.url); + } + throw error; + } + } + this.after((notHandledErr, done) => { + context.errorHandler = opts.errorHandler ? buildErrorHandler(this[kErrorHandler], opts.errorHandler) : this[kErrorHandler]; + context._parserOptions.limit = opts.bodyLimit || null; + context.logLevel = opts.logLevel; + context.logSerializers = opts.logSerializers; + context.attachValidation = opts.attachValidation; + context[kReplySerializerDefault] = this[kReplySerializerDefault]; + context.schemaErrorFormatter = opts.schemaErrorFormatter || this[kSchemaErrorFormatter] || context.schemaErrorFormatter; + avvio.once("preReady", () => { + for (const hook of lifecycleHooks) { + const toSet = this[kHooks][hook].concat(opts[hook] || []).map((h) => h.bind(this)); + context[hook] = toSet.length ? toSet : null; + } + while (!context.Request[kHasBeenDecorated] && context.Request.parent) { + context.Request = context.Request.parent; + } + while (!context.Reply[kHasBeenDecorated] && context.Reply.parent) { + context.Reply = context.Reply.parent; + } + fourOhFour.setContext(this, context); + if (opts.schema) { + context.schema = normalizeSchema(context.schema, this.initialConfig); + const schemaController = this[kSchemaController]; + if (!opts.validatorCompiler && (opts.schema.body || opts.schema.headers || opts.schema.querystring || opts.schema.params)) { + schemaController.setupValidator(this[kOptions]); + } + try { + const isCustom = typeof opts?.validatorCompiler === "function" || schemaController.isCustomValidatorCompiler; + compileSchemasForValidation(context, opts.validatorCompiler || schemaController.validatorCompiler, isCustom); + } catch (error) { + throw new FST_ERR_SCH_VALIDATION_BUILD(opts.method, url, error.message); + } + if (opts.schema.response && !opts.serializerCompiler) { + schemaController.setupSerializer(this[kOptions]); + } + try { + compileSchemasForSerialization(context, opts.serializerCompiler || schemaController.serializerCompiler); + } catch (error) { + throw new FST_ERR_SCH_SERIALIZATION_BUILD(opts.method, url, error.message); + } + } + }); + done(notHandledErr); + }); + if (shouldExposeHead && isGetRoute && !isHeadRoute && !hasHEADHandler) { + const onSendHandlers = parseHeadOnSendHandlers(headOpts.onSend); + prepareRoute.call(this, { method: "HEAD", url: path8, options: { ...headOpts, onSend: onSendHandlers }, isFastify: true }); + } + } + } + function routeHandler(req, res, params, context, query) { + const id2 = getGenReqId(context.server, req); + const loggerOpts = { + level: context.logLevel + }; + if (context.logSerializers) { + loggerOpts.serializers = context.logSerializers; + } + const childLogger = createChildLogger(context, logger, req, id2, loggerOpts); + childLogger[kDisableRequestLogging] = disableRequestLogging; + if (closing === true) { + if (req.httpVersionMajor !== 2) { + res.setHeader("Connection", "close"); + } + if (return503OnClosing) { + const headers = { + "Content-Type": "application/json", + "Content-Length": "80" + }; + res.writeHead(503, headers); + res.end('{"error":"Service Unavailable","message":"Service Unavailable","statusCode":503}'); + childLogger.info({ res: { statusCode: 503 } }, "request aborted - refusing to accept new requests as server is closing"); + return; + } + } + const connHeader = String.prototype.toLowerCase.call(req.headers.connection || ""); + if (connHeader === "keep-alive") { + if (keepAliveConnections.has(req.socket) === false) { + keepAliveConnections.add(req.socket); + req.socket.on("close", removeTrackedSocket.bind({ keepAliveConnections, socket: req.socket })); + } + } + if (req.headers[kRequestAcceptVersion] !== void 0) { + req.headers["accept-version"] = req.headers[kRequestAcceptVersion]; + req.headers[kRequestAcceptVersion] = void 0; + } + const request = new context.Request(id2, params, req, query, childLogger, context); + const reply = new context.Reply(res, request, childLogger); + if (disableRequestLogging === false) { + childLogger.info({ req: request }, "incoming request"); + } + if (hasLogger === true || context.onResponse !== null) { + setupResponseListeners(reply); + } + if (context.onRequest !== null) { + onRequestHookRunner( + context.onRequest, + request, + reply, + runPreParsing + ); + } else { + runPreParsing(null, request, reply); + } + if (context.onRequestAbort !== null) { + req.on("close", () => { + if (req.aborted) { + onRequestAbortHookRunner( + context.onRequestAbort, + request, + handleOnRequestAbortHooksErrors.bind(null, reply) + ); + } + }); + } + if (context.onTimeout !== null) { + if (!request.raw.socket._meta) { + request.raw.socket.on("timeout", handleTimeout); + } + request.raw.socket._meta = { context, request, reply }; + } + } + } + function handleOnRequestAbortHooksErrors(reply, err) { + if (err) { + reply.log.error({ err }, "onRequestAborted hook failed"); + } + } + function handleTimeout() { + const { context, request, reply } = this._meta; + onTimeoutHookRunner( + context.onTimeout, + request, + reply, + noop + ); + } + function normalizeAndValidateMethod(method) { + if (typeof method !== "string") { + throw new FST_ERR_ROUTE_METHOD_INVALID(); + } + method = method.toUpperCase(); + if (!this[kSupportedHTTPMethods].bodyless.has(method) && !this[kSupportedHTTPMethods].bodywith.has(method)) { + throw new FST_ERR_ROUTE_METHOD_NOT_SUPPORTED(method); + } + return method; + } + function validateSchemaBodyOption(method, path7, schema) { + if (this[kSupportedHTTPMethods].bodyless.has(method) && schema?.body) { + throw new FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED(method, path7); + } + } + function validateBodyLimitOption(bodyLimit) { + if (bodyLimit === void 0) return; + if (!Number.isInteger(bodyLimit) || bodyLimit <= 0) { + throw new FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT(bodyLimit); + } + } + function runPreParsing(err, request, reply) { + if (reply.sent === true) return; + if (err != null) { + reply[kReplyIsError] = true; + reply.send(err); + return; + } + request[kRequestPayloadStream] = request.raw; + if (request[kRouteContext].preParsing !== null) { + preParsingHookRunner(request[kRouteContext].preParsing, request, reply, handleRequest.bind(request.server)); + } else { + handleRequest.call(request.server, null, request, reply); + } + } + function buildRouterOptions(options, defaultOptions) { + const routerOptions = options.routerOptions || /* @__PURE__ */ Object.create(null); + const usedDeprecatedOptions = routerKeys.filter((key) => Object.hasOwn(options, key)); + if (usedDeprecatedOptions.length > 0) { + FSTDEP022(usedDeprecatedOptions.join(", ")); + } + for (const key of routerKeys) { + if (!Object.hasOwn(routerOptions, key)) { + routerOptions[key] = options[key] ?? defaultOptions[key]; + } + } + return routerOptions; + } + function removeTrackedSocket() { + this.keepAliveConnections.delete(this.socket); + } + function noop() { + } + module2.exports = { buildRouting, validateBodyLimitOption, buildRouterOptions }; + } +}); + +// node_modules/fastify/lib/fourOhFour.js +var require_fourOhFour = __commonJS({ + "node_modules/fastify/lib/fourOhFour.js"(exports2, module2) { + "use strict"; + var FindMyWay = require_find_my_way(); + var Reply = require_reply(); + var Request = require_request(); + var Context = require_context(); + var { + kRoutePrefix, + kCanSetNotFoundHandler, + kFourOhFourLevelInstance, + kFourOhFourContext, + kHooks, + kErrorHandler + } = require_symbols2(); + var { lifecycleHooks } = require_hooks(); + var { buildErrorHandler } = require_error_handler(); + var { + FST_ERR_NOT_FOUND + } = require_errors2(); + var { createChildLogger } = require_logger_factory(); + var { getGenReqId } = require_reqIdGenFactory(); + function fourOhFour(options) { + const { logger, disableRequestLogging } = options; + const router2 = FindMyWay({ onBadUrl: createOnBadUrl(), defaultRoute: fourOhFourFallBack }); + let _onBadUrlHandler = null; + return { router: router2, setNotFoundHandler, setContext, arrange404 }; + function arrange404(instance) { + instance[kFourOhFourLevelInstance] = instance; + instance[kCanSetNotFoundHandler] = true; + router2.onBadUrl = router2.onBadUrl.bind(instance); + router2.defaultRoute = router2.defaultRoute.bind(instance); + } + function basic404(request, reply) { + const { url, method } = request.raw; + const message = `Route ${method}:${url} not found`; + if (!disableRequestLogging) { + request.log.info(message); + } + reply.code(404).send({ + message, + error: "Not Found", + statusCode: 404 + }); + } + function createOnBadUrl() { + return function onBadUrl(path7, req, res) { + const fourOhFourContext = this[kFourOhFourLevelInstance][kFourOhFourContext]; + const id2 = getGenReqId(fourOhFourContext.server, req); + const childLogger = createChildLogger(fourOhFourContext, logger, req, id2); + const request = new Request(id2, null, req, null, childLogger, fourOhFourContext); + const reply = new Reply(res, request, childLogger); + _onBadUrlHandler(request, reply); + }; + } + function setContext(instance, context) { + const _404Context = Object.assign({}, instance[kFourOhFourContext]); + _404Context.onSend = context.onSend; + context[kFourOhFourContext] = _404Context; + } + function setNotFoundHandler(opts, handler, avvio, routeHandler) { + if (this[kCanSetNotFoundHandler] === void 0) { + this[kCanSetNotFoundHandler] = true; + } + if (this[kFourOhFourContext] === void 0) { + this[kFourOhFourContext] = null; + } + const _fastify = this; + const prefix = this[kRoutePrefix] || "/"; + if (this[kCanSetNotFoundHandler] === false) { + throw new Error(`Not found handler already set for Fastify instance with prefix: '${prefix}'`); + } + if (typeof opts === "object") { + if (opts.preHandler) { + if (Array.isArray(opts.preHandler)) { + opts.preHandler = opts.preHandler.map((hook) => hook.bind(_fastify)); + } else { + opts.preHandler = opts.preHandler.bind(_fastify); + } + } + if (opts.preValidation) { + if (Array.isArray(opts.preValidation)) { + opts.preValidation = opts.preValidation.map((hook) => hook.bind(_fastify)); + } else { + opts.preValidation = opts.preValidation.bind(_fastify); + } + } + } + if (typeof opts === "function") { + handler = opts; + opts = void 0; + } + opts = opts || {}; + if (handler) { + this[kFourOhFourLevelInstance][kCanSetNotFoundHandler] = false; + handler = handler.bind(this); + _onBadUrlHandler = handler; + } else { + handler = basic404; + _onBadUrlHandler = basic404; + } + this.after((notHandledErr, done) => { + _setNotFoundHandler.call(this, prefix, opts, handler, avvio, routeHandler); + done(notHandledErr); + }); + } + function _setNotFoundHandler(prefix, opts, handler, avvio, routeHandler) { + const context = new Context({ + schema: opts.schema, + handler, + config: opts.config || {}, + server: this + }); + avvio.once("preReady", () => { + const context2 = this[kFourOhFourContext]; + for (const hook of lifecycleHooks) { + const toSet = this[kHooks][hook].concat(opts[hook] || []).map((h) => h.bind(this)); + context2[hook] = toSet.length ? toSet : null; + } + context2.errorHandler = opts.errorHandler ? buildErrorHandler(this[kErrorHandler], opts.errorHandler) : this[kErrorHandler]; + }); + if (this[kFourOhFourContext] !== null && prefix === "/") { + Object.assign(this[kFourOhFourContext], context); + return; + } + this[kFourOhFourLevelInstance][kFourOhFourContext] = context; + router2.all(prefix + (prefix.endsWith("/") ? "*" : "/*"), routeHandler, context); + router2.all(prefix, routeHandler, context); + } + function fourOhFourFallBack(req, res) { + const fourOhFourContext = this[kFourOhFourLevelInstance][kFourOhFourContext]; + const id2 = getGenReqId(fourOhFourContext.server, req); + const childLogger = createChildLogger(fourOhFourContext, logger, req, id2); + childLogger.info({ req }, "incoming request"); + const request = new Request(id2, null, req, null, childLogger, fourOhFourContext); + const reply = new Reply(res, request, childLogger); + request.log.warn("the default handler for 404 did not catch this, this is likely a fastify bug, please report it"); + request.log.warn(router2.prettyPrint()); + reply.code(404).send(new FST_ERR_NOT_FOUND()); + } + } + module2.exports = fourOhFour; + } +}); + +// node_modules/fastify/lib/configValidator.js +var require_configValidator = __commonJS({ + "node_modules/fastify/lib/configValidator.js"(exports2, module2) { + "use strict"; + module2.exports = validate10; + module2.exports.default = validate10; + var schema11 = { "type": "object", "additionalProperties": false, "properties": { "connectionTimeout": { "type": "integer", "default": 0 }, "keepAliveTimeout": { "type": "integer", "default": 72e3 }, "forceCloseConnections": { "oneOf": [{ "type": "string", "pattern": "idle" }, { "type": "boolean" }] }, "maxRequestsPerSocket": { "type": "integer", "default": 0, "nullable": true }, "requestTimeout": { "type": "integer", "default": 0 }, "bodyLimit": { "type": "integer", "default": 1048576 }, "caseSensitive": { "type": "boolean", "default": true }, "allowUnsafeRegex": { "type": "boolean", "default": false }, "http2": { "type": "boolean" }, "https": { "if": { "not": { "oneOf": [{ "type": "boolean" }, { "type": "null" }, { "type": "object", "additionalProperties": false, "required": ["allowHTTP1"], "properties": { "allowHTTP1": { "type": "boolean" } } }] } }, "then": { "setDefaultValue": true } }, "ignoreTrailingSlash": { "type": "boolean", "default": false }, "ignoreDuplicateSlashes": { "type": "boolean", "default": false }, "disableRequestLogging": { "type": "boolean", "default": false }, "maxParamLength": { "type": "integer", "default": 100 }, "onProtoPoisoning": { "type": "string", "default": "error" }, "onConstructorPoisoning": { "type": "string", "default": "error" }, "pluginTimeout": { "type": "integer", "default": 1e4 }, "requestIdHeader": { "anyOf": [{ "type": "boolean" }, { "type": "string" }], "default": false }, "requestIdLogLabel": { "type": "string", "default": "reqId" }, "http2SessionTimeout": { "type": "integer", "default": 72e3 }, "exposeHeadRoutes": { "type": "boolean", "default": true }, "useSemicolonDelimiter": { "type": "boolean", "default": false }, "routerOptions": { "type": "object", "additionalProperties": false, "properties": { "ignoreTrailingSlash": { "type": "boolean", "default": false }, "ignoreDuplicateSlashes": { "type": "boolean", "default": false }, "maxParamLength": { "type": "integer", "default": 100 }, "allowUnsafeRegex": { "type": "boolean", "default": false }, "useSemicolonDelimiter": { "type": "boolean", "default": false } } }, "constraints": { "type": "object", "additionalProperties": { "type": "object", "required": ["name", "storage", "validate", "deriveConstraint"], "additionalProperties": true, "properties": { "name": { "type": "string" }, "storage": {}, "validate": {}, "deriveConstraint": {} } } } } }; + var func2 = Object.prototype.hasOwnProperty; + var pattern0 = new RegExp("idle", "u"); + function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == "object" && !Array.isArray(data)) { + if (data.connectionTimeout === void 0) { + data.connectionTimeout = 0; + } + if (data.keepAliveTimeout === void 0) { + data.keepAliveTimeout = 72e3; + } + if (data.maxRequestsPerSocket === void 0) { + data.maxRequestsPerSocket = 0; + } + if (data.requestTimeout === void 0) { + data.requestTimeout = 0; + } + if (data.bodyLimit === void 0) { + data.bodyLimit = 1048576; + } + if (data.caseSensitive === void 0) { + data.caseSensitive = true; + } + if (data.allowUnsafeRegex === void 0) { + data.allowUnsafeRegex = false; + } + if (data.ignoreTrailingSlash === void 0) { + data.ignoreTrailingSlash = false; + } + if (data.ignoreDuplicateSlashes === void 0) { + data.ignoreDuplicateSlashes = false; + } + if (data.disableRequestLogging === void 0) { + data.disableRequestLogging = false; + } + if (data.maxParamLength === void 0) { + data.maxParamLength = 100; + } + if (data.onProtoPoisoning === void 0) { + data.onProtoPoisoning = "error"; + } + if (data.onConstructorPoisoning === void 0) { + data.onConstructorPoisoning = "error"; + } + if (data.pluginTimeout === void 0) { + data.pluginTimeout = 1e4; + } + if (data.requestIdHeader === void 0) { + data.requestIdHeader = false; + } + if (data.requestIdLogLabel === void 0) { + data.requestIdLogLabel = "reqId"; + } + if (data.http2SessionTimeout === void 0) { + data.http2SessionTimeout = 72e3; + } + if (data.exposeHeadRoutes === void 0) { + data.exposeHeadRoutes = true; + } + if (data.useSemicolonDelimiter === void 0) { + data.useSemicolonDelimiter = false; + } + const _errs1 = errors; + for (const key0 in data) { + if (!func2.call(schema11.properties, key0)) { + delete data[key0]; + } + } + if (_errs1 === errors) { + let data0 = data.connectionTimeout; + const _errs2 = errors; + if (!(typeof data0 == "number" && (!(data0 % 1) && !isNaN(data0)) && isFinite(data0))) { + let dataType0 = typeof data0; + let coerced0 = void 0; + if (!(coerced0 !== void 0)) { + if (dataType0 === "boolean" || data0 === null || dataType0 === "string" && data0 && data0 == +data0 && !(data0 % 1)) { + coerced0 = +data0; + } else { + validate10.errors = [{ instancePath: instancePath + "/connectionTimeout", schemaPath: "#/properties/connectionTimeout/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + } + if (coerced0 !== void 0) { + data0 = coerced0; + if (data !== void 0) { + data["connectionTimeout"] = coerced0; + } + } + } + var valid0 = _errs2 === errors; + if (valid0) { + let data1 = data.keepAliveTimeout; + const _errs4 = errors; + if (!(typeof data1 == "number" && (!(data1 % 1) && !isNaN(data1)) && isFinite(data1))) { + let dataType1 = typeof data1; + let coerced1 = void 0; + if (!(coerced1 !== void 0)) { + if (dataType1 === "boolean" || data1 === null || dataType1 === "string" && data1 && data1 == +data1 && !(data1 % 1)) { + coerced1 = +data1; + } else { + validate10.errors = [{ instancePath: instancePath + "/keepAliveTimeout", schemaPath: "#/properties/keepAliveTimeout/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + } + if (coerced1 !== void 0) { + data1 = coerced1; + if (data !== void 0) { + data["keepAliveTimeout"] = coerced1; + } + } + } + var valid0 = _errs4 === errors; + if (valid0) { + if (data.forceCloseConnections !== void 0) { + let data2 = data.forceCloseConnections; + const _errs6 = errors; + const _errs7 = errors; + let valid1 = false; + let passing0 = null; + const _errs8 = errors; + if (typeof data2 !== "string") { + let dataType2 = typeof data2; + let coerced2 = void 0; + if (!(coerced2 !== void 0)) { + if (dataType2 == "number" || dataType2 == "boolean") { + coerced2 = "" + data2; + } else if (data2 === null) { + coerced2 = ""; + } else { + const err0 = { instancePath: instancePath + "/forceCloseConnections", schemaPath: "#/properties/forceCloseConnections/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + } + if (coerced2 !== void 0) { + data2 = coerced2; + if (data !== void 0) { + data["forceCloseConnections"] = coerced2; + } + } + } + if (errors === _errs8) { + if (typeof data2 === "string") { + if (!pattern0.test(data2)) { + const err1 = { instancePath: instancePath + "/forceCloseConnections", schemaPath: "#/properties/forceCloseConnections/oneOf/0/pattern", keyword: "pattern", params: { pattern: "idle" }, message: 'must match pattern "idle"' }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } + var _valid0 = _errs8 === errors; + if (_valid0) { + valid1 = true; + passing0 = 0; + } + const _errs10 = errors; + if (typeof data2 !== "boolean") { + let coerced3 = void 0; + if (!(coerced3 !== void 0)) { + if (data2 === "false" || data2 === 0 || data2 === null) { + coerced3 = false; + } else if (data2 === "true" || data2 === 1) { + coerced3 = true; + } else { + const err2 = { instancePath: instancePath + "/forceCloseConnections", schemaPath: "#/properties/forceCloseConnections/oneOf/1/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + if (coerced3 !== void 0) { + data2 = coerced3; + if (data !== void 0) { + data["forceCloseConnections"] = coerced3; + } + } + } + var _valid0 = _errs10 === errors; + if (_valid0 && valid1) { + valid1 = false; + passing0 = [passing0, 1]; + } else { + if (_valid0) { + valid1 = true; + passing0 = 1; + } + } + if (!valid1) { + const err3 = { instancePath: instancePath + "/forceCloseConnections", schemaPath: "#/properties/forceCloseConnections/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + validate10.errors = vErrors; + return false; + } else { + errors = _errs7; + if (vErrors !== null) { + if (_errs7) { + vErrors.length = _errs7; + } else { + vErrors = null; + } + } + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + if (valid0) { + let data3 = data.maxRequestsPerSocket; + const _errs12 = errors; + if (!(typeof data3 == "number" && (!(data3 % 1) && !isNaN(data3)) && isFinite(data3)) && data3 !== null) { + let dataType4 = typeof data3; + let coerced4 = void 0; + if (!(coerced4 !== void 0)) { + if (dataType4 === "boolean" || data3 === null || dataType4 === "string" && data3 && data3 == +data3 && !(data3 % 1)) { + coerced4 = +data3; + } else if (data3 === "" || data3 === 0 || data3 === false) { + coerced4 = null; + } else { + validate10.errors = [{ instancePath: instancePath + "/maxRequestsPerSocket", schemaPath: "#/properties/maxRequestsPerSocket/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + } + if (coerced4 !== void 0) { + data3 = coerced4; + if (data !== void 0) { + data["maxRequestsPerSocket"] = coerced4; + } + } + } + var valid0 = _errs12 === errors; + if (valid0) { + let data4 = data.requestTimeout; + const _errs15 = errors; + if (!(typeof data4 == "number" && (!(data4 % 1) && !isNaN(data4)) && isFinite(data4))) { + let dataType5 = typeof data4; + let coerced5 = void 0; + if (!(coerced5 !== void 0)) { + if (dataType5 === "boolean" || data4 === null || dataType5 === "string" && data4 && data4 == +data4 && !(data4 % 1)) { + coerced5 = +data4; + } else { + validate10.errors = [{ instancePath: instancePath + "/requestTimeout", schemaPath: "#/properties/requestTimeout/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + } + if (coerced5 !== void 0) { + data4 = coerced5; + if (data !== void 0) { + data["requestTimeout"] = coerced5; + } + } + } + var valid0 = _errs15 === errors; + if (valid0) { + let data5 = data.bodyLimit; + const _errs17 = errors; + if (!(typeof data5 == "number" && (!(data5 % 1) && !isNaN(data5)) && isFinite(data5))) { + let dataType6 = typeof data5; + let coerced6 = void 0; + if (!(coerced6 !== void 0)) { + if (dataType6 === "boolean" || data5 === null || dataType6 === "string" && data5 && data5 == +data5 && !(data5 % 1)) { + coerced6 = +data5; + } else { + validate10.errors = [{ instancePath: instancePath + "/bodyLimit", schemaPath: "#/properties/bodyLimit/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + } + if (coerced6 !== void 0) { + data5 = coerced6; + if (data !== void 0) { + data["bodyLimit"] = coerced6; + } + } + } + var valid0 = _errs17 === errors; + if (valid0) { + let data6 = data.caseSensitive; + const _errs19 = errors; + if (typeof data6 !== "boolean") { + let coerced7 = void 0; + if (!(coerced7 !== void 0)) { + if (data6 === "false" || data6 === 0 || data6 === null) { + coerced7 = false; + } else if (data6 === "true" || data6 === 1) { + coerced7 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/caseSensitive", schemaPath: "#/properties/caseSensitive/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced7 !== void 0) { + data6 = coerced7; + if (data !== void 0) { + data["caseSensitive"] = coerced7; + } + } + } + var valid0 = _errs19 === errors; + if (valid0) { + let data7 = data.allowUnsafeRegex; + const _errs21 = errors; + if (typeof data7 !== "boolean") { + let coerced8 = void 0; + if (!(coerced8 !== void 0)) { + if (data7 === "false" || data7 === 0 || data7 === null) { + coerced8 = false; + } else if (data7 === "true" || data7 === 1) { + coerced8 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/allowUnsafeRegex", schemaPath: "#/properties/allowUnsafeRegex/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced8 !== void 0) { + data7 = coerced8; + if (data !== void 0) { + data["allowUnsafeRegex"] = coerced8; + } + } + } + var valid0 = _errs21 === errors; + if (valid0) { + if (data.http2 !== void 0) { + let data8 = data.http2; + const _errs23 = errors; + if (typeof data8 !== "boolean") { + let coerced9 = void 0; + if (!(coerced9 !== void 0)) { + if (data8 === "false" || data8 === 0 || data8 === null) { + coerced9 = false; + } else if (data8 === "true" || data8 === 1) { + coerced9 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/http2", schemaPath: "#/properties/http2/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced9 !== void 0) { + data8 = coerced9; + if (data !== void 0) { + data["http2"] = coerced9; + } + } + } + var valid0 = _errs23 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.https !== void 0) { + let data9 = data.https; + const _errs25 = errors; + const _errs26 = errors; + let valid2 = true; + const _errs27 = errors; + const _errs28 = errors; + const _errs29 = errors; + const _errs30 = errors; + let valid4 = false; + let passing1 = null; + const _errs31 = errors; + if (typeof data9 !== "boolean") { + let coerced10 = void 0; + if (!(coerced10 !== void 0)) { + if (data9 === "false" || data9 === 0 || data9 === null) { + coerced10 = false; + } else if (data9 === "true" || data9 === 1) { + coerced10 = true; + } else { + const err4 = {}; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + if (coerced10 !== void 0) { + data9 = coerced10; + if (data !== void 0) { + data["https"] = coerced10; + } + } + } + var _valid2 = _errs31 === errors; + if (_valid2) { + valid4 = true; + passing1 = 0; + } + const _errs33 = errors; + if (data9 !== null) { + let coerced11 = void 0; + if (!(coerced11 !== void 0)) { + if (data9 === "" || data9 === 0 || data9 === false) { + coerced11 = null; + } else { + const err5 = {}; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + if (coerced11 !== void 0) { + data9 = coerced11; + if (data !== void 0) { + data["https"] = coerced11; + } + } + } + var _valid2 = _errs33 === errors; + if (_valid2 && valid4) { + valid4 = false; + passing1 = [passing1, 1]; + } else { + if (_valid2) { + valid4 = true; + passing1 = 1; + } + const _errs35 = errors; + if (errors === _errs35) { + if (data9 && typeof data9 == "object" && !Array.isArray(data9)) { + let missing0; + if (data9.allowHTTP1 === void 0 && (missing0 = "allowHTTP1")) { + const err6 = {}; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + const _errs37 = errors; + for (const key1 in data9) { + if (!(key1 === "allowHTTP1")) { + delete data9[key1]; + } + } + if (_errs37 === errors) { + if (data9.allowHTTP1 !== void 0) { + let data10 = data9.allowHTTP1; + if (typeof data10 !== "boolean") { + let coerced12 = void 0; + if (!(coerced12 !== void 0)) { + if (data10 === "false" || data10 === 0 || data10 === null) { + coerced12 = false; + } else if (data10 === "true" || data10 === 1) { + coerced12 = true; + } else { + const err7 = {}; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } + if (coerced12 !== void 0) { + data10 = coerced12; + if (data9 !== void 0) { + data9["allowHTTP1"] = coerced12; + } + } + } + } + } + } + } else { + const err8 = {}; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + var _valid2 = _errs35 === errors; + if (_valid2 && valid4) { + valid4 = false; + passing1 = [passing1, 2]; + } else { + if (_valid2) { + valid4 = true; + passing1 = 2; + } + } + } + if (!valid4) { + const err9 = {}; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } else { + errors = _errs30; + if (vErrors !== null) { + if (_errs30) { + vErrors.length = _errs30; + } else { + vErrors = null; + } + } + } + var valid3 = _errs29 === errors; + if (valid3) { + const err10 = {}; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } else { + errors = _errs28; + if (vErrors !== null) { + if (_errs28) { + vErrors.length = _errs28; + } else { + vErrors = null; + } + } + } + var _valid1 = _errs27 === errors; + errors = _errs26; + if (vErrors !== null) { + if (_errs26) { + vErrors.length = _errs26; + } else { + vErrors = null; + } + } + if (_valid1) { + const _errs40 = errors; + data["https"] = true; + var _valid1 = _errs40 === errors; + valid2 = _valid1; + } + if (!valid2) { + const err11 = { instancePath: instancePath + "/https", schemaPath: "#/properties/https/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + validate10.errors = vErrors; + return false; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + if (valid0) { + let data11 = data.ignoreTrailingSlash; + const _errs41 = errors; + if (typeof data11 !== "boolean") { + let coerced13 = void 0; + if (!(coerced13 !== void 0)) { + if (data11 === "false" || data11 === 0 || data11 === null) { + coerced13 = false; + } else if (data11 === "true" || data11 === 1) { + coerced13 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/ignoreTrailingSlash", schemaPath: "#/properties/ignoreTrailingSlash/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced13 !== void 0) { + data11 = coerced13; + if (data !== void 0) { + data["ignoreTrailingSlash"] = coerced13; + } + } + } + var valid0 = _errs41 === errors; + if (valid0) { + let data12 = data.ignoreDuplicateSlashes; + const _errs43 = errors; + if (typeof data12 !== "boolean") { + let coerced14 = void 0; + if (!(coerced14 !== void 0)) { + if (data12 === "false" || data12 === 0 || data12 === null) { + coerced14 = false; + } else if (data12 === "true" || data12 === 1) { + coerced14 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/ignoreDuplicateSlashes", schemaPath: "#/properties/ignoreDuplicateSlashes/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced14 !== void 0) { + data12 = coerced14; + if (data !== void 0) { + data["ignoreDuplicateSlashes"] = coerced14; + } + } + } + var valid0 = _errs43 === errors; + if (valid0) { + let data13 = data.disableRequestLogging; + const _errs45 = errors; + if (typeof data13 !== "boolean") { + let coerced15 = void 0; + if (!(coerced15 !== void 0)) { + if (data13 === "false" || data13 === 0 || data13 === null) { + coerced15 = false; + } else if (data13 === "true" || data13 === 1) { + coerced15 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/disableRequestLogging", schemaPath: "#/properties/disableRequestLogging/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced15 !== void 0) { + data13 = coerced15; + if (data !== void 0) { + data["disableRequestLogging"] = coerced15; + } + } + } + var valid0 = _errs45 === errors; + if (valid0) { + let data14 = data.maxParamLength; + const _errs47 = errors; + if (!(typeof data14 == "number" && (!(data14 % 1) && !isNaN(data14)) && isFinite(data14))) { + let dataType16 = typeof data14; + let coerced16 = void 0; + if (!(coerced16 !== void 0)) { + if (dataType16 === "boolean" || data14 === null || dataType16 === "string" && data14 && data14 == +data14 && !(data14 % 1)) { + coerced16 = +data14; + } else { + validate10.errors = [{ instancePath: instancePath + "/maxParamLength", schemaPath: "#/properties/maxParamLength/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + } + if (coerced16 !== void 0) { + data14 = coerced16; + if (data !== void 0) { + data["maxParamLength"] = coerced16; + } + } + } + var valid0 = _errs47 === errors; + if (valid0) { + let data15 = data.onProtoPoisoning; + const _errs49 = errors; + if (typeof data15 !== "string") { + let dataType17 = typeof data15; + let coerced17 = void 0; + if (!(coerced17 !== void 0)) { + if (dataType17 == "number" || dataType17 == "boolean") { + coerced17 = "" + data15; + } else if (data15 === null) { + coerced17 = ""; + } else { + validate10.errors = [{ instancePath: instancePath + "/onProtoPoisoning", schemaPath: "#/properties/onProtoPoisoning/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + if (coerced17 !== void 0) { + data15 = coerced17; + if (data !== void 0) { + data["onProtoPoisoning"] = coerced17; + } + } + } + var valid0 = _errs49 === errors; + if (valid0) { + let data16 = data.onConstructorPoisoning; + const _errs51 = errors; + if (typeof data16 !== "string") { + let dataType18 = typeof data16; + let coerced18 = void 0; + if (!(coerced18 !== void 0)) { + if (dataType18 == "number" || dataType18 == "boolean") { + coerced18 = "" + data16; + } else if (data16 === null) { + coerced18 = ""; + } else { + validate10.errors = [{ instancePath: instancePath + "/onConstructorPoisoning", schemaPath: "#/properties/onConstructorPoisoning/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + if (coerced18 !== void 0) { + data16 = coerced18; + if (data !== void 0) { + data["onConstructorPoisoning"] = coerced18; + } + } + } + var valid0 = _errs51 === errors; + if (valid0) { + let data17 = data.pluginTimeout; + const _errs53 = errors; + if (!(typeof data17 == "number" && (!(data17 % 1) && !isNaN(data17)) && isFinite(data17))) { + let dataType19 = typeof data17; + let coerced19 = void 0; + if (!(coerced19 !== void 0)) { + if (dataType19 === "boolean" || data17 === null || dataType19 === "string" && data17 && data17 == +data17 && !(data17 % 1)) { + coerced19 = +data17; + } else { + validate10.errors = [{ instancePath: instancePath + "/pluginTimeout", schemaPath: "#/properties/pluginTimeout/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + } + if (coerced19 !== void 0) { + data17 = coerced19; + if (data !== void 0) { + data["pluginTimeout"] = coerced19; + } + } + } + var valid0 = _errs53 === errors; + if (valid0) { + let data18 = data.requestIdHeader; + const _errs55 = errors; + const _errs56 = errors; + let valid6 = false; + const _errs57 = errors; + if (typeof data18 !== "boolean") { + let coerced20 = void 0; + if (!(coerced20 !== void 0)) { + if (data18 === "false" || data18 === 0 || data18 === null) { + coerced20 = false; + } else if (data18 === "true" || data18 === 1) { + coerced20 = true; + } else { + const err12 = { instancePath: instancePath + "/requestIdHeader", schemaPath: "#/properties/requestIdHeader/anyOf/0/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + if (coerced20 !== void 0) { + data18 = coerced20; + if (data !== void 0) { + data["requestIdHeader"] = coerced20; + } + } + } + var _valid3 = _errs57 === errors; + valid6 = valid6 || _valid3; + if (!valid6) { + const _errs59 = errors; + if (typeof data18 !== "string") { + let dataType21 = typeof data18; + let coerced21 = void 0; + if (!(coerced21 !== void 0)) { + if (dataType21 == "number" || dataType21 == "boolean") { + coerced21 = "" + data18; + } else if (data18 === null) { + coerced21 = ""; + } else { + const err13 = { instancePath: instancePath + "/requestIdHeader", schemaPath: "#/properties/requestIdHeader/anyOf/1/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + if (coerced21 !== void 0) { + data18 = coerced21; + if (data !== void 0) { + data["requestIdHeader"] = coerced21; + } + } + } + var _valid3 = _errs59 === errors; + valid6 = valid6 || _valid3; + } + if (!valid6) { + const err14 = { instancePath: instancePath + "/requestIdHeader", schemaPath: "#/properties/requestIdHeader/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + validate10.errors = vErrors; + return false; + } else { + errors = _errs56; + if (vErrors !== null) { + if (_errs56) { + vErrors.length = _errs56; + } else { + vErrors = null; + } + } + } + var valid0 = _errs55 === errors; + if (valid0) { + let data19 = data.requestIdLogLabel; + const _errs61 = errors; + if (typeof data19 !== "string") { + let dataType22 = typeof data19; + let coerced22 = void 0; + if (!(coerced22 !== void 0)) { + if (dataType22 == "number" || dataType22 == "boolean") { + coerced22 = "" + data19; + } else if (data19 === null) { + coerced22 = ""; + } else { + validate10.errors = [{ instancePath: instancePath + "/requestIdLogLabel", schemaPath: "#/properties/requestIdLogLabel/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + if (coerced22 !== void 0) { + data19 = coerced22; + if (data !== void 0) { + data["requestIdLogLabel"] = coerced22; + } + } + } + var valid0 = _errs61 === errors; + if (valid0) { + let data20 = data.http2SessionTimeout; + const _errs63 = errors; + if (!(typeof data20 == "number" && (!(data20 % 1) && !isNaN(data20)) && isFinite(data20))) { + let dataType23 = typeof data20; + let coerced23 = void 0; + if (!(coerced23 !== void 0)) { + if (dataType23 === "boolean" || data20 === null || dataType23 === "string" && data20 && data20 == +data20 && !(data20 % 1)) { + coerced23 = +data20; + } else { + validate10.errors = [{ instancePath: instancePath + "/http2SessionTimeout", schemaPath: "#/properties/http2SessionTimeout/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + } + if (coerced23 !== void 0) { + data20 = coerced23; + if (data !== void 0) { + data["http2SessionTimeout"] = coerced23; + } + } + } + var valid0 = _errs63 === errors; + if (valid0) { + let data21 = data.exposeHeadRoutes; + const _errs65 = errors; + if (typeof data21 !== "boolean") { + let coerced24 = void 0; + if (!(coerced24 !== void 0)) { + if (data21 === "false" || data21 === 0 || data21 === null) { + coerced24 = false; + } else if (data21 === "true" || data21 === 1) { + coerced24 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/exposeHeadRoutes", schemaPath: "#/properties/exposeHeadRoutes/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced24 !== void 0) { + data21 = coerced24; + if (data !== void 0) { + data["exposeHeadRoutes"] = coerced24; + } + } + } + var valid0 = _errs65 === errors; + if (valid0) { + let data22 = data.useSemicolonDelimiter; + const _errs67 = errors; + if (typeof data22 !== "boolean") { + let coerced25 = void 0; + if (!(coerced25 !== void 0)) { + if (data22 === "false" || data22 === 0 || data22 === null) { + coerced25 = false; + } else if (data22 === "true" || data22 === 1) { + coerced25 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/useSemicolonDelimiter", schemaPath: "#/properties/useSemicolonDelimiter/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced25 !== void 0) { + data22 = coerced25; + if (data !== void 0) { + data["useSemicolonDelimiter"] = coerced25; + } + } + } + var valid0 = _errs67 === errors; + if (valid0) { + if (data.routerOptions !== void 0) { + let data23 = data.routerOptions; + const _errs69 = errors; + if (errors === _errs69) { + if (data23 && typeof data23 == "object" && !Array.isArray(data23)) { + if (data23.ignoreTrailingSlash === void 0) { + data23.ignoreTrailingSlash = false; + } + if (data23.ignoreDuplicateSlashes === void 0) { + data23.ignoreDuplicateSlashes = false; + } + if (data23.maxParamLength === void 0) { + data23.maxParamLength = 100; + } + if (data23.allowUnsafeRegex === void 0) { + data23.allowUnsafeRegex = false; + } + if (data23.useSemicolonDelimiter === void 0) { + data23.useSemicolonDelimiter = false; + } + const _errs71 = errors; + for (const key2 in data23) { + if (!(key2 === "ignoreTrailingSlash" || key2 === "ignoreDuplicateSlashes" || key2 === "maxParamLength" || key2 === "allowUnsafeRegex" || key2 === "useSemicolonDelimiter")) { + delete data23[key2]; + } + } + if (_errs71 === errors) { + let data24 = data23.ignoreTrailingSlash; + const _errs72 = errors; + if (typeof data24 !== "boolean") { + let coerced26 = void 0; + if (!(coerced26 !== void 0)) { + if (data24 === "false" || data24 === 0 || data24 === null) { + coerced26 = false; + } else if (data24 === "true" || data24 === 1) { + coerced26 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/routerOptions/ignoreTrailingSlash", schemaPath: "#/properties/routerOptions/properties/ignoreTrailingSlash/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced26 !== void 0) { + data24 = coerced26; + if (data23 !== void 0) { + data23["ignoreTrailingSlash"] = coerced26; + } + } + } + var valid7 = _errs72 === errors; + if (valid7) { + let data25 = data23.ignoreDuplicateSlashes; + const _errs74 = errors; + if (typeof data25 !== "boolean") { + let coerced27 = void 0; + if (!(coerced27 !== void 0)) { + if (data25 === "false" || data25 === 0 || data25 === null) { + coerced27 = false; + } else if (data25 === "true" || data25 === 1) { + coerced27 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/routerOptions/ignoreDuplicateSlashes", schemaPath: "#/properties/routerOptions/properties/ignoreDuplicateSlashes/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced27 !== void 0) { + data25 = coerced27; + if (data23 !== void 0) { + data23["ignoreDuplicateSlashes"] = coerced27; + } + } + } + var valid7 = _errs74 === errors; + if (valid7) { + let data26 = data23.maxParamLength; + const _errs76 = errors; + if (!(typeof data26 == "number" && (!(data26 % 1) && !isNaN(data26)) && isFinite(data26))) { + let dataType28 = typeof data26; + let coerced28 = void 0; + if (!(coerced28 !== void 0)) { + if (dataType28 === "boolean" || data26 === null || dataType28 === "string" && data26 && data26 == +data26 && !(data26 % 1)) { + coerced28 = +data26; + } else { + validate10.errors = [{ instancePath: instancePath + "/routerOptions/maxParamLength", schemaPath: "#/properties/routerOptions/properties/maxParamLength/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }]; + return false; + } + } + if (coerced28 !== void 0) { + data26 = coerced28; + if (data23 !== void 0) { + data23["maxParamLength"] = coerced28; + } + } + } + var valid7 = _errs76 === errors; + if (valid7) { + let data27 = data23.allowUnsafeRegex; + const _errs78 = errors; + if (typeof data27 !== "boolean") { + let coerced29 = void 0; + if (!(coerced29 !== void 0)) { + if (data27 === "false" || data27 === 0 || data27 === null) { + coerced29 = false; + } else if (data27 === "true" || data27 === 1) { + coerced29 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/routerOptions/allowUnsafeRegex", schemaPath: "#/properties/routerOptions/properties/allowUnsafeRegex/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced29 !== void 0) { + data27 = coerced29; + if (data23 !== void 0) { + data23["allowUnsafeRegex"] = coerced29; + } + } + } + var valid7 = _errs78 === errors; + if (valid7) { + let data28 = data23.useSemicolonDelimiter; + const _errs80 = errors; + if (typeof data28 !== "boolean") { + let coerced30 = void 0; + if (!(coerced30 !== void 0)) { + if (data28 === "false" || data28 === 0 || data28 === null) { + coerced30 = false; + } else if (data28 === "true" || data28 === 1) { + coerced30 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/routerOptions/useSemicolonDelimiter", schemaPath: "#/properties/routerOptions/properties/useSemicolonDelimiter/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced30 !== void 0) { + data28 = coerced30; + if (data23 !== void 0) { + data23["useSemicolonDelimiter"] = coerced30; + } + } + } + var valid7 = _errs80 === errors; + } + } + } + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/routerOptions", schemaPath: "#/properties/routerOptions/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid0 = _errs69 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.constraints !== void 0) { + let data29 = data.constraints; + const _errs82 = errors; + if (errors === _errs82) { + if (data29 && typeof data29 == "object" && !Array.isArray(data29)) { + for (const key3 in data29) { + let data30 = data29[key3]; + const _errs85 = errors; + if (errors === _errs85) { + if (data30 && typeof data30 == "object" && !Array.isArray(data30)) { + let missing1; + if (data30.name === void 0 && (missing1 = "name") || data30.storage === void 0 && (missing1 = "storage") || data30.validate === void 0 && (missing1 = "validate") || data30.deriveConstraint === void 0 && (missing1 = "deriveConstraint")) { + validate10.errors = [{ instancePath: instancePath + "/constraints/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/constraints/additionalProperties/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }]; + return false; + } else { + if (data30.name !== void 0) { + let data31 = data30.name; + if (typeof data31 !== "string") { + let dataType31 = typeof data31; + let coerced31 = void 0; + if (!(coerced31 !== void 0)) { + if (dataType31 == "number" || dataType31 == "boolean") { + coerced31 = "" + data31; + } else if (data31 === null) { + coerced31 = ""; + } else { + validate10.errors = [{ instancePath: instancePath + "/constraints/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/name", schemaPath: "#/properties/constraints/additionalProperties/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + if (coerced31 !== void 0) { + data31 = coerced31; + if (data30 !== void 0) { + data30["name"] = coerced31; + } + } + } + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/constraints/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/constraints/additionalProperties/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid8 = _errs85 === errors; + if (!valid8) { + break; + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/constraints", schemaPath: "#/properties/constraints/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid0 = _errs82 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } else { + validate10.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + validate10.errors = vErrors; + return errors === 0; + } + module2.exports.defaultInitOptions = { "connectionTimeout": 0, "keepAliveTimeout": 72e3, "maxRequestsPerSocket": 0, "requestTimeout": 0, "bodyLimit": 1048576, "caseSensitive": true, "allowUnsafeRegex": false, "disableRequestLogging": false, "ignoreTrailingSlash": false, "ignoreDuplicateSlashes": false, "maxParamLength": 100, "onProtoPoisoning": "error", "onConstructorPoisoning": "error", "pluginTimeout": 1e4, "requestIdHeader": false, "requestIdLogLabel": "reqId", "http2SessionTimeout": 72e3, "exposeHeadRoutes": true, "useSemicolonDelimiter": false, "allowErrorHandlerOverride": true, "routerOptions": { "ignoreTrailingSlash": false, "ignoreDuplicateSlashes": false, "maxParamLength": 100, "allowUnsafeRegex": false, "useSemicolonDelimiter": false } }; + } +}); + +// node_modules/fastify/lib/initialConfigValidation.js +var require_initialConfigValidation = __commonJS({ + "node_modules/fastify/lib/initialConfigValidation.js"(exports2, module2) { + "use strict"; + var validate = require_configValidator(); + var deepClone = require_rfdc()({ circles: true, proto: false }); + var { FST_ERR_INIT_OPTS_INVALID } = require_errors2(); + function validateInitialConfig(options) { + const opts = deepClone(options); + if (!validate(opts)) { + const error = new FST_ERR_INIT_OPTS_INVALID(JSON.stringify(validate.errors.map((e) => e.message))); + error.errors = validate.errors; + throw error; + } + return deepFreezeObject(opts); + } + function deepFreezeObject(object) { + const properties = Object.getOwnPropertyNames(object); + for (const name of properties) { + const value = object[name]; + if (ArrayBuffer.isView(value) && !(value instanceof DataView)) { + continue; + } + object[name] = value && typeof value === "object" ? deepFreezeObject(value) : value; + } + return Object.freeze(object); + } + module2.exports = validateInitialConfig; + module2.exports.defaultInitOptions = validate.defaultInitOptions; + module2.exports.utils = { deepFreezeObject }; + } +}); + +// node_modules/fastify/lib/pluginOverride.js +var require_pluginOverride = __commonJS({ + "node_modules/fastify/lib/pluginOverride.js"(exports2, module2) { + "use strict"; + var { + kAvvioBoot, + kChildren, + kRoutePrefix, + kLogLevel, + kLogSerializers, + kHooks, + kSchemaController, + kContentTypeParser, + kReply, + kRequest, + kFourOhFour, + kPluginNameChain, + kErrorHandlerAlreadySet + } = require_symbols2(); + var Reply = require_reply(); + var Request = require_request(); + var SchemaController = require_schema_controller(); + var ContentTypeParser = require_contentTypeParser(); + var { buildHooks } = require_hooks(); + var pluginUtils = require_pluginUtils(); + module2.exports = function override(old, fn, opts) { + const shouldSkipOverride = pluginUtils.registerPlugin.call(old, fn); + const fnName = pluginUtils.getPluginName(fn) || pluginUtils.getFuncPreview(fn); + if (shouldSkipOverride) { + old[kPluginNameChain].push(fnName); + return old; + } + const instance = Object.create(old); + old[kChildren].push(instance); + instance.ready = old[kAvvioBoot].bind(instance); + instance[kChildren] = []; + instance[kReply] = Reply.buildReply(instance[kReply]); + instance[kRequest] = Request.buildRequest(instance[kRequest]); + instance[kContentTypeParser] = ContentTypeParser.helpers.buildContentTypeParser(instance[kContentTypeParser]); + instance[kHooks] = buildHooks(instance[kHooks]); + instance[kRoutePrefix] = buildRoutePrefix(instance[kRoutePrefix], opts.prefix); + instance[kLogLevel] = opts.logLevel || instance[kLogLevel]; + instance[kSchemaController] = SchemaController.buildSchemaController(old[kSchemaController]); + instance.getSchema = instance[kSchemaController].getSchema.bind(instance[kSchemaController]); + instance.getSchemas = instance[kSchemaController].getSchemas.bind(instance[kSchemaController]); + instance[pluginUtils.kRegisteredPlugins] = Object.create(instance[pluginUtils.kRegisteredPlugins]); + instance[kPluginNameChain] = [fnName]; + instance[kErrorHandlerAlreadySet] = false; + if (instance[kLogSerializers] || opts.logSerializers) { + instance[kLogSerializers] = Object.assign(Object.create(instance[kLogSerializers]), opts.logSerializers); + } + if (opts.prefix) { + instance[kFourOhFour].arrange404(instance); + } + for (const hook of instance[kHooks].onRegister) hook.call(old, instance, opts); + return instance; + }; + function buildRoutePrefix(instancePrefix, pluginPrefix) { + if (!pluginPrefix) { + return instancePrefix; + } + if (instancePrefix.endsWith("/") && pluginPrefix[0] === "/") { + pluginPrefix = pluginPrefix.slice(1); + } else if (pluginPrefix[0] !== "/") { + pluginPrefix = "/" + pluginPrefix; + } + return instancePrefix + pluginPrefix; + } + } +}); + +// node_modules/fastify/lib/noop-set.js +var require_noop_set = __commonJS({ + "node_modules/fastify/lib/noop-set.js"(exports2, module2) { + "use strict"; + module2.exports = function noopSet() { + return { + [Symbol.iterator]: function* () { + }, + add() { + }, + delete() { + }, + has() { + return true; + } + }; + }; + } +}); + +// node_modules/cookie/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/cookie/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parse = parse; + exports2.serialize = serialize; + var cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/; + var cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/; + var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i; + var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/; + var __toString = Object.prototype.toString; + var NullObject = /* @__PURE__ */ (() => { + const C = function() { + }; + C.prototype = /* @__PURE__ */ Object.create(null); + return C; + })(); + function parse(str, options) { + const obj = new NullObject(); + const len = str.length; + if (len < 2) + return obj; + const dec = options?.decode || decode; + let index = 0; + do { + const eqIdx = str.indexOf("=", index); + if (eqIdx === -1) + break; + const colonIdx = str.indexOf(";", index); + const endIdx = colonIdx === -1 ? len : colonIdx; + if (eqIdx > endIdx) { + index = str.lastIndexOf(";", eqIdx - 1) + 1; + continue; + } + const keyStartIdx = startIndex(str, index, eqIdx); + const keyEndIdx = endIndex(str, eqIdx, keyStartIdx); + const key = str.slice(keyStartIdx, keyEndIdx); + if (obj[key] === void 0) { + let valStartIdx = startIndex(str, eqIdx + 1, endIdx); + let valEndIdx = endIndex(str, endIdx, valStartIdx); + const value = dec(str.slice(valStartIdx, valEndIdx)); + obj[key] = value; + } + index = endIdx + 1; + } while (index < len); + return obj; + } + function startIndex(str, index, max) { + do { + const code = str.charCodeAt(index); + if (code !== 32 && code !== 9) + return index; + } while (++index < max); + return max; + } + function endIndex(str, index, min) { + while (index > min) { + const code = str.charCodeAt(--index); + if (code !== 32 && code !== 9) + return index + 1; + } + return min; + } + function serialize(name, val, options) { + const enc2 = options?.encode || encodeURIComponent; + if (!cookieNameRegExp.test(name)) { + throw new TypeError(`argument name is invalid: ${name}`); + } + const value = enc2(val); + if (!cookieValueRegExp.test(value)) { + throw new TypeError(`argument val is invalid: ${val}`); + } + let str = name + "=" + value; + if (!options) + return str; + if (options.maxAge !== void 0) { + if (!Number.isInteger(options.maxAge)) { + throw new TypeError(`option maxAge is invalid: ${options.maxAge}`); + } + str += "; Max-Age=" + options.maxAge; + } + if (options.domain) { + if (!domainValueRegExp.test(options.domain)) { + throw new TypeError(`option domain is invalid: ${options.domain}`); + } + str += "; Domain=" + options.domain; + } + if (options.path) { + if (!pathValueRegExp.test(options.path)) { + throw new TypeError(`option path is invalid: ${options.path}`); + } + str += "; Path=" + options.path; + } + if (options.expires) { + if (!isDate(options.expires) || !Number.isFinite(options.expires.valueOf())) { + throw new TypeError(`option expires is invalid: ${options.expires}`); + } + str += "; Expires=" + options.expires.toUTCString(); + } + if (options.httpOnly) { + str += "; HttpOnly"; + } + if (options.secure) { + str += "; Secure"; + } + if (options.partitioned) { + str += "; Partitioned"; + } + if (options.priority) { + const priority = typeof options.priority === "string" ? options.priority.toLowerCase() : void 0; + switch (priority) { + case "low": + str += "; Priority=Low"; + break; + case "medium": + str += "; Priority=Medium"; + break; + case "high": + str += "; Priority=High"; + break; + default: + throw new TypeError(`option priority is invalid: ${options.priority}`); + } + } + if (options.sameSite) { + const sameSite = typeof options.sameSite === "string" ? options.sameSite.toLowerCase() : options.sameSite; + switch (sameSite) { + case true: + case "strict": + str += "; SameSite=Strict"; + break; + case "lax": + str += "; SameSite=Lax"; + break; + case "none": + str += "; SameSite=None"; + break; + default: + throw new TypeError(`option sameSite is invalid: ${options.sameSite}`); + } + } + return str; + } + function decode(str) { + if (str.indexOf("%") === -1) + return str; + try { + return decodeURIComponent(str); + } catch (e) { + return str; + } + } + function isDate(val) { + return __toString.call(val) === "[object Date]"; + } + } +}); + +// node_modules/light-my-request/node_modules/process-warning/index.js +var require_process_warning2 = __commonJS({ + "node_modules/light-my-request/node_modules/process-warning/index.js"(exports2, module2) { + "use strict"; + var { format } = require("node:util"); + function createDeprecation(params) { + return createWarning({ ...params, name: "DeprecationWarning" }); + } + function createWarning({ name, code, message, unlimited = false } = {}) { + if (!name) throw new Error("Warning name must not be empty"); + if (!code) throw new Error("Warning code must not be empty"); + if (!message) throw new Error("Warning message must not be empty"); + if (typeof unlimited !== "boolean") throw new Error("Warning opts.unlimited must be a boolean"); + code = code.toUpperCase(); + let warningContainer = { + [name]: function(a, b, c) { + if (warning.emitted === true && warning.unlimited !== true) { + return; + } + warning.emitted = true; + process.emitWarning(warning.format(a, b, c), warning.name, warning.code); + } + }; + if (unlimited) { + warningContainer = { + [name]: function(a, b, c) { + warning.emitted = true; + process.emitWarning(warning.format(a, b, c), warning.name, warning.code); + } + }; + } + const warning = warningContainer[name]; + warning.emitted = false; + warning.message = message; + warning.unlimited = unlimited; + warning.code = code; + warning.format = function(a, b, c) { + let formatted; + if (a && b && c) { + formatted = format(message, a, b, c); + } else if (a && b) { + formatted = format(message, a, b); + } else if (a) { + formatted = format(message, a); + } else { + formatted = message; + } + return formatted; + }; + return warning; + } + var out = { createWarning, createDeprecation }; + module2.exports = out; + module2.exports.default = out; + module2.exports.processWarning = out; + } +}); + +// node_modules/light-my-request/lib/parse-url.js +var require_parse_url = __commonJS({ + "node_modules/light-my-request/lib/parse-url.js"(exports2, module2) { + "use strict"; + var { URL: URL2 } = require("node:url"); + var BASE_URL = "http://localhost"; + module2.exports = function parseURL(url, query) { + if ((typeof url === "string" || Object.prototype.toString.call(url) === "[object String]") && url.startsWith("//")) { + url = BASE_URL + url; + } + const result = typeof url === "object" ? Object.assign(new URL2(BASE_URL), url) : new URL2(url, BASE_URL); + if (typeof query === "string") { + query = new URLSearchParams(query); + for (const key of query.keys()) { + result.searchParams.delete(key); + for (const value of query.getAll(key)) { + result.searchParams.append(key, value); + } + } + } else { + const merged = Object.assign({}, url.query, query); + for (const key in merged) { + const value = merged[key]; + if (Array.isArray(value)) { + result.searchParams.delete(key); + for (const param of value) { + result.searchParams.append(key, param); + } + } else { + result.searchParams.set(key, value); + } + } + } + return result; + }; + } +}); + +// node_modules/light-my-request/lib/form-data.js +var require_form_data = __commonJS({ + "node_modules/light-my-request/lib/form-data.js"(exports2, module2) { + "use strict"; + var { randomUUID } = require("node:crypto"); + var { Readable } = require("node:stream"); + var textEncoder; + function isFormDataLike(payload) { + return payload && typeof payload === "object" && typeof payload.append === "function" && typeof payload.delete === "function" && typeof payload.get === "function" && typeof payload.getAll === "function" && typeof payload.has === "function" && typeof payload.set === "function" && payload[Symbol.toStringTag] === "FormData"; + } + function formDataToStream(formdata) { + textEncoder = textEncoder ?? new TextEncoder(); + const boundary = `----formdata-${randomUUID()}`; + const prefix = `--${boundary}\r +Content-Disposition: form-data`; + const escape2 = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const linebreak = new Uint8Array([13, 10]); + async function* asyncIterator() { + for (const [name, value] of formdata) { + if (typeof value === "string") { + yield textEncoder.encode(`${prefix}; name="${escape2(normalizeLinefeeds(name))}"\r +\r +`); + yield textEncoder.encode(`${normalizeLinefeeds(value)}\r +`); + } else { + let header = `${prefix}; name="${escape2(normalizeLinefeeds(name))}"`; + value.name && (header += `; filename="${escape2(value.name)}"`); + header += `\r +Content-Type: ${value.type || "application/octet-stream"}\r +\r +`; + yield textEncoder.encode(header); + if (value.stream) { + yield* value.stream(); + } else { + yield value; + } + yield linebreak; + } + } + yield textEncoder.encode(`--${boundary}--`); + } + const stream = Readable.from(asyncIterator()); + return { + stream, + contentType: `multipart/form-data; boundary=${boundary}` + }; + } + module2.exports.isFormDataLike = isFormDataLike; + module2.exports.formDataToStream = formDataToStream; + } +}); + +// node_modules/light-my-request/lib/request.js +var require_request2 = __commonJS({ + "node_modules/light-my-request/lib/request.js"(exports2, module2) { + "use strict"; + var { Readable, addAbortSignal } = require("node:stream"); + var util = require("node:util"); + var cookie = require_dist4(); + var assert = require("node:assert"); + var { createDeprecation } = require_process_warning2(); + var parseURL = require_parse_url(); + var { isFormDataLike, formDataToStream } = require_form_data(); + var { EventEmitter } = require("node:events"); + var FST_LIGHTMYREQUEST_DEP01 = createDeprecation({ + name: "FastifyDeprecationLightMyRequest", + code: "FST_LIGHTMYREQUEST_DEP01", + message: 'You are accessing "request.connection", use "request.socket" instead.' + }); + function hostHeaderFromURL(parsedURL) { + return parsedURL.port ? parsedURL.host : parsedURL.hostname + (parsedURL.protocol === "https:" ? ":443" : ":80"); + } + var MockSocket = class extends EventEmitter { + constructor(remoteAddress) { + super(); + this.remoteAddress = remoteAddress; + } + }; + function CustomRequest(options) { + return new _CustomLMRRequest(this); + function _CustomLMRRequest(obj) { + Request.call(obj, { + ...options, + Request: void 0 + }); + Object.assign(this, obj); + for (const fn of Object.keys(Request.prototype)) { + this.constructor.prototype[fn] = Request.prototype[fn]; + } + util.inherits(this.constructor, options.Request); + return this; + } + } + function Request(options) { + Readable.call(this, { + autoDestroy: false + }); + const parsedURL = parseURL(options.url || options.path, options.query); + this.url = parsedURL.pathname + parsedURL.search; + this.aborted = false; + this.httpVersionMajor = 1; + this.httpVersionMinor = 1; + this.httpVersion = "1.1"; + this.method = options.method ? options.method.toUpperCase() : "GET"; + this.headers = {}; + this.rawHeaders = []; + const headers = options.headers || {}; + for (const field in headers) { + const fieldLowerCase = field.toLowerCase(); + if ((fieldLowerCase === "user-agent" || fieldLowerCase === "content-type") && headers[field] === void 0) { + this.headers[fieldLowerCase] = void 0; + continue; + } + const value = headers[field]; + assert(value !== void 0, 'invalid value "undefined" for header ' + field); + this.headers[fieldLowerCase] = "" + value; + } + if ("user-agent" in this.headers === false) { + this.headers["user-agent"] = "lightMyRequest"; + } + this.headers.host = this.headers.host || options.authority || hostHeaderFromURL(parsedURL); + if (options.cookies) { + const { cookies } = options; + const cookieValues = Object.keys(cookies).map((key) => cookie.serialize(key, cookies[key])); + if (this.headers.cookie) { + cookieValues.unshift(this.headers.cookie); + } + this.headers.cookie = cookieValues.join("; "); + } + this.socket = new MockSocket(options.remoteAddress || "127.0.0.1"); + Object.defineProperty(this, "connection", { + get() { + FST_LIGHTMYREQUEST_DEP01(); + return this.socket; + }, + configurable: true + }); + let payload = options.payload || options.body || null; + let payloadResume = payload && typeof payload.resume === "function"; + if (isFormDataLike(payload)) { + const stream = formDataToStream(payload); + payload = stream.stream; + payloadResume = true; + this.headers["content-type"] = stream.contentType; + this.headers["transfer-encoding"] = "chunked"; + } + if (payload && typeof payload !== "string" && !payloadResume && !Buffer.isBuffer(payload)) { + payload = JSON.stringify(payload); + if ("content-type" in this.headers === false) { + this.headers["content-type"] = "application/json"; + } + } + if (payload && !payloadResume && !Object.hasOwn(this.headers, "content-length")) { + this.headers["content-length"] = (Buffer.isBuffer(payload) ? payload.length : Buffer.byteLength(payload)).toString(); + } + for (const header of Object.keys(this.headers)) { + this.rawHeaders.push(header, this.headers[header]); + } + this._lightMyRequest = { + payload, + isDone: false, + simulate: options.simulate || {}, + payloadAsStream: options.payloadAsStream, + signal: options.signal + }; + const signal = options.signal; + if (signal) { + addAbortSignal(signal, this); + } + { + const payload2 = this._lightMyRequest.payload; + if (payload2?._readableState) { + this._read = readStream; + payload2.on("error", (err) => { + this.destroy(err); + }); + payload2.on("end", () => { + this.push(null); + }); + } else { + this._read = readEverythingElse; + } + } + return this; + } + function readStream() { + const payload = this._lightMyRequest.payload; + let more = true; + let pushed = false; + let chunk; + while (more && (chunk = payload.read())) { + pushed = true; + more = this.push(chunk); + } + if (more && !pushed) { + this._lightMyRequest.payload.once("readable", this._read.bind(this)); + } + } + function readEverythingElse() { + setImmediate(() => { + if (this._lightMyRequest.isDone) { + if (this._lightMyRequest.simulate.end !== false) { + this.push(null); + } + return; + } + this._lightMyRequest.isDone = true; + if (this._lightMyRequest.payload) { + if (this._lightMyRequest.simulate.split) { + this.push(this._lightMyRequest.payload.slice(0, 1)); + this.push(this._lightMyRequest.payload.slice(1)); + } else { + this.push(this._lightMyRequest.payload); + } + } + if (this._lightMyRequest.simulate.error) { + this.emit("error", new Error("Simulated")); + } + if (this._lightMyRequest.simulate.close) { + this.emit("close"); + } + if (this._lightMyRequest.simulate.end !== false) { + this.push(null); + } + }); + } + util.inherits(Request, Readable); + util.inherits(CustomRequest, Request); + Request.prototype.destroy = function(error) { + if (this.destroyed || this._lightMyRequest.isDone) return; + this.destroyed = true; + if (error) { + this._error = true; + process.nextTick(() => this.emit("error", error)); + } + process.nextTick(() => this.emit("close")); + }; + module2.exports = Request; + module2.exports.Request = Request; + module2.exports.CustomRequest = CustomRequest; + } +}); + +// node_modules/set-cookie-parser/lib/set-cookie.js +var require_set_cookie = __commonJS({ + "node_modules/set-cookie-parser/lib/set-cookie.js"(exports2, module2) { + "use strict"; + var defaultParseOptions = { + decodeValues: true, + map: false, + silent: false + }; + function isNonEmptyString(str) { + return typeof str === "string" && !!str.trim(); + } + function parseString(setCookieValue, options) { + var parts = setCookieValue.split(";").filter(isNonEmptyString); + var nameValuePairStr = parts.shift(); + var parsed = parseNameValuePair(nameValuePairStr); + var name = parsed.name; + var value = parsed.value; + options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions; + try { + value = options.decodeValues ? decodeURIComponent(value) : value; + } catch (e) { + console.error( + "set-cookie-parser encountered an error while decoding a cookie with value '" + value + "'. Set options.decodeValues to false to disable this feature.", + e + ); + } + var cookie = { + name, + value + }; + parts.forEach(function(part) { + var sides = part.split("="); + var key = sides.shift().trimLeft().toLowerCase(); + var value2 = sides.join("="); + if (key === "expires") { + cookie.expires = new Date(value2); + } else if (key === "max-age") { + cookie.maxAge = parseInt(value2, 10); + } else if (key === "secure") { + cookie.secure = true; + } else if (key === "httponly") { + cookie.httpOnly = true; + } else if (key === "samesite") { + cookie.sameSite = value2; + } else if (key === "partitioned") { + cookie.partitioned = true; + } else { + cookie[key] = value2; + } + }); + return cookie; + } + function parseNameValuePair(nameValuePairStr) { + var name = ""; + var value = ""; + var nameValueArr = nameValuePairStr.split("="); + if (nameValueArr.length > 1) { + name = nameValueArr.shift(); + value = nameValueArr.join("="); + } else { + value = nameValuePairStr; + } + return { name, value }; + } + function parse(input, options) { + options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions; + if (!input) { + if (!options.map) { + return []; + } else { + return {}; + } + } + if (input.headers) { + if (typeof input.headers.getSetCookie === "function") { + input = input.headers.getSetCookie(); + } else if (input.headers["set-cookie"]) { + input = input.headers["set-cookie"]; + } else { + var sch = input.headers[Object.keys(input.headers).find(function(key) { + return key.toLowerCase() === "set-cookie"; + })]; + if (!sch && input.headers.cookie && !options.silent) { + console.warn( + "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning." + ); + } + input = sch; + } + } + if (!Array.isArray(input)) { + input = [input]; + } + if (!options.map) { + return input.filter(isNonEmptyString).map(function(str) { + return parseString(str, options); + }); + } else { + var cookies = {}; + return input.filter(isNonEmptyString).reduce(function(cookies2, str) { + var cookie = parseString(str, options); + cookies2[cookie.name] = cookie; + return cookies2; + }, cookies); + } + } + function splitCookiesString(cookiesString) { + if (Array.isArray(cookiesString)) { + return cookiesString; + } + if (typeof cookiesString !== "string") { + return []; + } + var cookiesStrings = []; + var pos = 0; + var start; + var ch2; + var lastComma; + var nextStart; + var cookiesSeparatorFound; + function skipWhitespace() { + while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { + pos += 1; + } + return pos < cookiesString.length; + } + function notSpecialChar() { + ch2 = cookiesString.charAt(pos); + return ch2 !== "=" && ch2 !== ";" && ch2 !== ","; + } + while (pos < cookiesString.length) { + start = pos; + cookiesSeparatorFound = false; + while (skipWhitespace()) { + ch2 = cookiesString.charAt(pos); + if (ch2 === ",") { + lastComma = pos; + pos += 1; + skipWhitespace(); + nextStart = pos; + while (pos < cookiesString.length && notSpecialChar()) { + pos += 1; + } + if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { + cookiesSeparatorFound = true; + pos = nextStart; + cookiesStrings.push(cookiesString.substring(start, lastComma)); + start = pos; + } else { + pos = lastComma + 1; + } + } else { + pos += 1; + } + } + if (!cookiesSeparatorFound || pos >= cookiesString.length) { + cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); + } + } + return cookiesStrings; + } + module2.exports = parse; + module2.exports.parse = parse; + module2.exports.parseString = parseString; + module2.exports.splitCookiesString = splitCookiesString; + } +}); + +// node_modules/light-my-request/lib/response.js +var require_response = __commonJS({ + "node_modules/light-my-request/lib/response.js"(exports2, module2) { + "use strict"; + var http = require("node:http"); + var { Writable: Writable2, Readable, addAbortSignal } = require("node:stream"); + var util = require("node:util"); + var setCookie = require_set_cookie(); + function Response2(req, onEnd, reject) { + http.ServerResponse.call(this, req); + if (req._lightMyRequest?.payloadAsStream) { + const read = this.emit.bind(this, "drain"); + this._lightMyRequest = { headers: null, trailers: {}, stream: new Readable({ read }) }; + const signal = req._lightMyRequest.signal; + if (signal) { + addAbortSignal(signal, this._lightMyRequest.stream); + } + } else { + this._lightMyRequest = { headers: null, trailers: {}, payloadChunks: [] }; + } + this.setHeader("foo", "bar"); + this.removeHeader("foo"); + this.assignSocket(getNullSocket()); + this._promiseCallback = typeof reject === "function"; + let called = false; + const onEndSuccess = (payload) => { + if (called) return; + called = true; + if (this._promiseCallback) { + return process.nextTick(() => onEnd(payload)); + } + process.nextTick(() => onEnd(null, payload)); + }; + this._lightMyRequest.onEndSuccess = onEndSuccess; + let finished = false; + const onEndFailure = (err) => { + if (called) { + if (this._lightMyRequest.stream && !finished) { + if (!err) { + err = new Error("response destroyed before completion"); + err.code = "LIGHT_ECONNRESET"; + } + this._lightMyRequest.stream.destroy(err); + this._lightMyRequest.stream.on("error", () => { + }); + } + return; + } + called = true; + if (!err) { + err = new Error("response destroyed before completion"); + err.code = "LIGHT_ECONNRESET"; + } + if (this._promiseCallback) { + return process.nextTick(() => reject(err)); + } + process.nextTick(() => onEnd(err, null)); + }; + if (this._lightMyRequest.stream) { + this.once("finish", () => { + finished = true; + this._lightMyRequest.stream.push(null); + }); + } else { + this.once("finish", () => { + const res = generatePayload(this); + res.raw.req = req; + onEndSuccess(res); + }); + } + this.connection.once("error", onEndFailure); + this.once("error", onEndFailure); + this.once("close", onEndFailure); + } + util.inherits(Response2, http.ServerResponse); + Response2.prototype.setTimeout = function(msecs, callback) { + this.timeoutHandle = setTimeout(() => { + this.emit("timeout"); + }, msecs); + this.on("timeout", callback); + return this; + }; + Response2.prototype.writeHead = function() { + const result = http.ServerResponse.prototype.writeHead.apply(this, arguments); + copyHeaders(this); + if (this._lightMyRequest.stream) { + this._lightMyRequest.onEndSuccess(generatePayload(this)); + } + return result; + }; + Response2.prototype.write = function(data, encoding, callback) { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + } + http.ServerResponse.prototype.write.call(this, data, encoding, callback); + if (this._lightMyRequest.stream) { + return this._lightMyRequest.stream.push(Buffer.from(data, encoding)); + } else { + this._lightMyRequest.payloadChunks.push(Buffer.from(data, encoding)); + return true; + } + }; + Response2.prototype.end = function(data, encoding, callback) { + if (data) { + this.write(data, encoding); + } + http.ServerResponse.prototype.end.call(this, callback); + this.emit("finish"); + this.destroy(); + }; + Response2.prototype.destroy = function(error) { + if (this.destroyed) return; + this.destroyed = true; + if (error) { + process.nextTick(() => this.emit("error", error)); + } + process.nextTick(() => this.emit("close")); + }; + Response2.prototype.addTrailers = function(trailers) { + for (const key in trailers) { + this._lightMyRequest.trailers[key.toLowerCase().trim()] = trailers[key].toString().trim(); + } + }; + function generatePayload(response) { + if (response._lightMyRequest.headers === null) { + copyHeaders(response); + } + serializeHeaders(response); + const res = { + raw: { + res: response + }, + headers: response._lightMyRequest.headers, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + trailers: {}, + get cookies() { + return setCookie.parse(this); + } + }; + res.trailers = response._lightMyRequest.trailers; + if (response._lightMyRequest.payloadChunks) { + const rawBuffer = Buffer.concat(response._lightMyRequest.payloadChunks); + res.rawPayload = rawBuffer; + res.payload = rawBuffer.toString(); + res.body = res.payload; + res.json = function parseJsonPayload() { + return JSON.parse(res.payload); + }; + } else { + res.json = function() { + throw new Error("Response payload is not available with payloadAsStream: true"); + }; + } + res.stream = function streamPayload() { + if (response._lightMyRequest.stream) { + return response._lightMyRequest.stream; + } + return Readable.from(response._lightMyRequest.payloadChunks); + }; + return res; + } + function getNullSocket() { + return new Writable2({ + write(_chunk, _encoding, callback) { + setImmediate(callback); + } + }); + } + function serializeHeaders(response) { + const headers = response._lightMyRequest.headers; + for (const headerName of Object.keys(headers)) { + const headerValue = headers[headerName]; + if (Array.isArray(headerValue)) { + headers[headerName] = headerValue.map((value) => "" + value); + } else { + headers[headerName] = "" + headerValue; + } + } + } + function copyHeaders(response) { + response._lightMyRequest.headers = Object.assign({}, response.getHeaders()); + ["Date", "Connection", "Transfer-Encoding"].forEach((name) => { + const regex = new RegExp("\\r\\n" + name + ": ([^\\r]*)\\r\\n"); + const field = response._header?.match(regex); + if (field) { + response._lightMyRequest.headers[name.toLowerCase()] = field[1]; + } + }); + } + module2.exports = Response2; + } +}); + +// node_modules/light-my-request/lib/config-validator.js +var require_config_validator = __commonJS({ + "node_modules/light-my-request/lib/config-validator.js"(exports2, module2) { + "use strict"; + module2.exports = validate10; + module2.exports.default = validate10; + var schema11 = { "type": "object", "properties": { "url": { "oneOf": [{ "type": "string" }, { "type": "object", "properties": { "protocol": { "type": "string" }, "hostname": { "type": "string" }, "pathname": { "type": "string" } }, "additionalProperties": true, "required": ["pathname"] }] }, "path": { "oneOf": [{ "type": "string" }, { "type": "object", "properties": { "protocol": { "type": "string" }, "hostname": { "type": "string" }, "pathname": { "type": "string" } }, "additionalProperties": true, "required": ["pathname"] }] }, "cookies": { "type": "object", "additionalProperties": true }, "headers": { "type": "object", "additionalProperties": true }, "query": { "anyOf": [{ "type": "object", "additionalProperties": true }, { "type": "string" }] }, "simulate": { "type": "object", "properties": { "end": { "type": "boolean" }, "split": { "type": "boolean" }, "error": { "type": "boolean" }, "close": { "type": "boolean" } } }, "authority": { "type": "string" }, "remoteAddress": { "type": "string" }, "method": { "type": "string", "enum": ["ACL", "BIND", "CHECKOUT", "CONNECT", "COPY", "DELETE", "GET", "HEAD", "LINK", "LOCK", "M-SEARCH", "MERGE", "MKACTIVITY", "MKCALENDAR", "MKCOL", "MOVE", "NOTIFY", "OPTIONS", "PATCH", "POST", "PROPFIND", "PROPPATCH", "PURGE", "PUT", "QUERY", "REBIND", "REPORT", "SEARCH", "SOURCE", "SUBSCRIBE", "TRACE", "UNBIND", "UNLINK", "UNLOCK", "UNSUBSCRIBE", "acl", "bind", "checkout", "connect", "copy", "delete", "get", "head", "link", "lock", "m-search", "merge", "mkactivity", "mkcalendar", "mkcol", "move", "notify", "options", "patch", "post", "propfind", "proppatch", "purge", "put", "query", "rebind", "report", "search", "source", "subscribe", "trace", "unbind", "unlink", "unlock", "unsubscribe"] }, "validate": { "type": "boolean" } }, "additionalProperties": true, "oneOf": [{ "required": ["url"] }, { "required": ["path"] }] }; + function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + const _errs1 = errors; + let valid0 = false; + let passing0 = null; + const _errs2 = errors; + if (data && typeof data == "object" && !Array.isArray(data)) { + let missing0; + if (data.url === void 0 && (missing0 = "url")) { + const err0 = { instancePath, schemaPath: "#/oneOf/0/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + } + var _valid0 = _errs2 === errors; + if (_valid0) { + valid0 = true; + passing0 = 0; + } + const _errs3 = errors; + if (data && typeof data == "object" && !Array.isArray(data)) { + let missing1; + if (data.path === void 0 && (missing1 = "path")) { + const err1 = { instancePath, schemaPath: "#/oneOf/1/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + var _valid0 = _errs3 === errors; + if (_valid0 && valid0) { + valid0 = false; + passing0 = [passing0, 1]; + } else { + if (_valid0) { + valid0 = true; + passing0 = 1; + } + } + if (!valid0) { + const err2 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + validate10.errors = vErrors; + return false; + } else { + errors = _errs1; + if (vErrors !== null) { + if (_errs1) { + vErrors.length = _errs1; + } else { + vErrors = null; + } + } + } + if (errors === 0) { + if (data && typeof data == "object" && !Array.isArray(data)) { + if (data.url !== void 0) { + let data0 = data.url; + const _errs5 = errors; + const _errs6 = errors; + let valid2 = false; + let passing1 = null; + const _errs7 = errors; + if (typeof data0 !== "string") { + let dataType0 = typeof data0; + let coerced0 = void 0; + if (!(coerced0 !== void 0)) { + if (dataType0 == "number" || dataType0 == "boolean") { + coerced0 = "" + data0; + } else if (data0 === null) { + coerced0 = ""; + } else { + const err3 = { instancePath: instancePath + "/url", schemaPath: "#/properties/url/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + } + if (coerced0 !== void 0) { + data0 = coerced0; + if (data !== void 0) { + data["url"] = coerced0; + } + } + } + var _valid1 = _errs7 === errors; + if (_valid1) { + valid2 = true; + passing1 = 0; + } + const _errs9 = errors; + if (errors === _errs9) { + if (data0 && typeof data0 == "object" && !Array.isArray(data0)) { + let missing2; + if (data0.pathname === void 0 && (missing2 = "pathname")) { + const err4 = { instancePath: instancePath + "/url", schemaPath: "#/properties/url/oneOf/1/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } else { + if (data0.protocol !== void 0) { + let data1 = data0.protocol; + const _errs12 = errors; + if (typeof data1 !== "string") { + let dataType1 = typeof data1; + let coerced1 = void 0; + if (!(coerced1 !== void 0)) { + if (dataType1 == "number" || dataType1 == "boolean") { + coerced1 = "" + data1; + } else if (data1 === null) { + coerced1 = ""; + } else { + const err5 = { instancePath: instancePath + "/url/protocol", schemaPath: "#/properties/url/oneOf/1/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + if (coerced1 !== void 0) { + data1 = coerced1; + if (data0 !== void 0) { + data0["protocol"] = coerced1; + } + } + } + var valid3 = _errs12 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data0.hostname !== void 0) { + let data2 = data0.hostname; + const _errs14 = errors; + if (typeof data2 !== "string") { + let dataType2 = typeof data2; + let coerced2 = void 0; + if (!(coerced2 !== void 0)) { + if (dataType2 == "number" || dataType2 == "boolean") { + coerced2 = "" + data2; + } else if (data2 === null) { + coerced2 = ""; + } else { + const err6 = { instancePath: instancePath + "/url/hostname", schemaPath: "#/properties/url/oneOf/1/properties/hostname/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + if (coerced2 !== void 0) { + data2 = coerced2; + if (data0 !== void 0) { + data0["hostname"] = coerced2; + } + } + } + var valid3 = _errs14 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data0.pathname !== void 0) { + let data3 = data0.pathname; + const _errs16 = errors; + if (typeof data3 !== "string") { + let dataType3 = typeof data3; + let coerced3 = void 0; + if (!(coerced3 !== void 0)) { + if (dataType3 == "number" || dataType3 == "boolean") { + coerced3 = "" + data3; + } else if (data3 === null) { + coerced3 = ""; + } else { + const err7 = { instancePath: instancePath + "/url/pathname", schemaPath: "#/properties/url/oneOf/1/properties/pathname/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } + if (coerced3 !== void 0) { + data3 = coerced3; + if (data0 !== void 0) { + data0["pathname"] = coerced3; + } + } + } + var valid3 = _errs16 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + const err8 = { instancePath: instancePath + "/url", schemaPath: "#/properties/url/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + var _valid1 = _errs9 === errors; + if (_valid1 && valid2) { + valid2 = false; + passing1 = [passing1, 1]; + } else { + if (_valid1) { + valid2 = true; + passing1 = 1; + } + } + if (!valid2) { + const err9 = { instancePath: instancePath + "/url", schemaPath: "#/properties/url/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + validate10.errors = vErrors; + return false; + } else { + errors = _errs6; + if (vErrors !== null) { + if (_errs6) { + vErrors.length = _errs6; + } else { + vErrors = null; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.path !== void 0) { + let data4 = data.path; + const _errs18 = errors; + const _errs19 = errors; + let valid4 = false; + let passing2 = null; + const _errs20 = errors; + if (typeof data4 !== "string") { + let dataType4 = typeof data4; + let coerced4 = void 0; + if (!(coerced4 !== void 0)) { + if (dataType4 == "number" || dataType4 == "boolean") { + coerced4 = "" + data4; + } else if (data4 === null) { + coerced4 = ""; + } else { + const err10 = { instancePath: instancePath + "/path", schemaPath: "#/properties/path/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + if (coerced4 !== void 0) { + data4 = coerced4; + if (data !== void 0) { + data["path"] = coerced4; + } + } + } + var _valid2 = _errs20 === errors; + if (_valid2) { + valid4 = true; + passing2 = 0; + } + const _errs22 = errors; + if (errors === _errs22) { + if (data4 && typeof data4 == "object" && !Array.isArray(data4)) { + let missing3; + if (data4.pathname === void 0 && (missing3 = "pathname")) { + const err11 = { instancePath: instancePath + "/path", schemaPath: "#/properties/path/oneOf/1/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data4.protocol !== void 0) { + let data5 = data4.protocol; + const _errs25 = errors; + if (typeof data5 !== "string") { + let dataType5 = typeof data5; + let coerced5 = void 0; + if (!(coerced5 !== void 0)) { + if (dataType5 == "number" || dataType5 == "boolean") { + coerced5 = "" + data5; + } else if (data5 === null) { + coerced5 = ""; + } else { + const err12 = { instancePath: instancePath + "/path/protocol", schemaPath: "#/properties/path/oneOf/1/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + if (coerced5 !== void 0) { + data5 = coerced5; + if (data4 !== void 0) { + data4["protocol"] = coerced5; + } + } + } + var valid5 = _errs25 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data4.hostname !== void 0) { + let data6 = data4.hostname; + const _errs27 = errors; + if (typeof data6 !== "string") { + let dataType6 = typeof data6; + let coerced6 = void 0; + if (!(coerced6 !== void 0)) { + if (dataType6 == "number" || dataType6 == "boolean") { + coerced6 = "" + data6; + } else if (data6 === null) { + coerced6 = ""; + } else { + const err13 = { instancePath: instancePath + "/path/hostname", schemaPath: "#/properties/path/oneOf/1/properties/hostname/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + if (coerced6 !== void 0) { + data6 = coerced6; + if (data4 !== void 0) { + data4["hostname"] = coerced6; + } + } + } + var valid5 = _errs27 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data4.pathname !== void 0) { + let data7 = data4.pathname; + const _errs29 = errors; + if (typeof data7 !== "string") { + let dataType7 = typeof data7; + let coerced7 = void 0; + if (!(coerced7 !== void 0)) { + if (dataType7 == "number" || dataType7 == "boolean") { + coerced7 = "" + data7; + } else if (data7 === null) { + coerced7 = ""; + } else { + const err14 = { instancePath: instancePath + "/path/pathname", schemaPath: "#/properties/path/oneOf/1/properties/pathname/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + if (coerced7 !== void 0) { + data7 = coerced7; + if (data4 !== void 0) { + data4["pathname"] = coerced7; + } + } + } + var valid5 = _errs29 === errors; + } else { + var valid5 = true; + } + } + } + } + } else { + const err15 = { instancePath: instancePath + "/path", schemaPath: "#/properties/path/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var _valid2 = _errs22 === errors; + if (_valid2 && valid4) { + valid4 = false; + passing2 = [passing2, 1]; + } else { + if (_valid2) { + valid4 = true; + passing2 = 1; + } + } + if (!valid4) { + const err16 = { instancePath: instancePath + "/path", schemaPath: "#/properties/path/oneOf", keyword: "oneOf", params: { passingSchemas: passing2 }, message: "must match exactly one schema in oneOf" }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + validate10.errors = vErrors; + return false; + } else { + errors = _errs19; + if (vErrors !== null) { + if (_errs19) { + vErrors.length = _errs19; + } else { + vErrors = null; + } + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.cookies !== void 0) { + let data8 = data.cookies; + const _errs31 = errors; + if (errors === _errs31) { + if (!(data8 && typeof data8 == "object" && !Array.isArray(data8))) { + validate10.errors = [{ instancePath: instancePath + "/cookies", schemaPath: "#/properties/cookies/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid1 = _errs31 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.headers !== void 0) { + let data9 = data.headers; + const _errs34 = errors; + if (errors === _errs34) { + if (!(data9 && typeof data9 == "object" && !Array.isArray(data9))) { + validate10.errors = [{ instancePath: instancePath + "/headers", schemaPath: "#/properties/headers/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid1 = _errs34 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.query !== void 0) { + let data10 = data.query; + const _errs37 = errors; + const _errs38 = errors; + let valid6 = false; + const _errs39 = errors; + if (errors === _errs39) { + if (!(data10 && typeof data10 == "object" && !Array.isArray(data10))) { + const err17 = { instancePath: instancePath + "/query", schemaPath: "#/properties/query/anyOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var _valid3 = _errs39 === errors; + valid6 = valid6 || _valid3; + if (!valid6) { + const _errs42 = errors; + if (typeof data10 !== "string") { + let dataType8 = typeof data10; + let coerced8 = void 0; + if (!(coerced8 !== void 0)) { + if (dataType8 == "number" || dataType8 == "boolean") { + coerced8 = "" + data10; + } else if (data10 === null) { + coerced8 = ""; + } else { + const err18 = { instancePath: instancePath + "/query", schemaPath: "#/properties/query/anyOf/1/type", keyword: "type", params: { type: "string" }, message: "must be string" }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + if (coerced8 !== void 0) { + data10 = coerced8; + if (data !== void 0) { + data["query"] = coerced8; + } + } + } + var _valid3 = _errs42 === errors; + valid6 = valid6 || _valid3; + } + if (!valid6) { + const err19 = { instancePath: instancePath + "/query", schemaPath: "#/properties/query/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + validate10.errors = vErrors; + return false; + } else { + errors = _errs38; + if (vErrors !== null) { + if (_errs38) { + vErrors.length = _errs38; + } else { + vErrors = null; + } + } + } + var valid1 = _errs37 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.simulate !== void 0) { + let data11 = data.simulate; + const _errs44 = errors; + if (errors === _errs44) { + if (data11 && typeof data11 == "object" && !Array.isArray(data11)) { + if (data11.end !== void 0) { + let data12 = data11.end; + const _errs46 = errors; + if (typeof data12 !== "boolean") { + let coerced9 = void 0; + if (!(coerced9 !== void 0)) { + if (data12 === "false" || data12 === 0 || data12 === null) { + coerced9 = false; + } else if (data12 === "true" || data12 === 1) { + coerced9 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/simulate/end", schemaPath: "#/properties/simulate/properties/end/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced9 !== void 0) { + data12 = coerced9; + if (data11 !== void 0) { + data11["end"] = coerced9; + } + } + } + var valid7 = _errs46 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data11.split !== void 0) { + let data13 = data11.split; + const _errs48 = errors; + if (typeof data13 !== "boolean") { + let coerced10 = void 0; + if (!(coerced10 !== void 0)) { + if (data13 === "false" || data13 === 0 || data13 === null) { + coerced10 = false; + } else if (data13 === "true" || data13 === 1) { + coerced10 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/simulate/split", schemaPath: "#/properties/simulate/properties/split/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced10 !== void 0) { + data13 = coerced10; + if (data11 !== void 0) { + data11["split"] = coerced10; + } + } + } + var valid7 = _errs48 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data11.error !== void 0) { + let data14 = data11.error; + const _errs50 = errors; + if (typeof data14 !== "boolean") { + let coerced11 = void 0; + if (!(coerced11 !== void 0)) { + if (data14 === "false" || data14 === 0 || data14 === null) { + coerced11 = false; + } else if (data14 === "true" || data14 === 1) { + coerced11 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/simulate/error", schemaPath: "#/properties/simulate/properties/error/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced11 !== void 0) { + data14 = coerced11; + if (data11 !== void 0) { + data11["error"] = coerced11; + } + } + } + var valid7 = _errs50 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data11.close !== void 0) { + let data15 = data11.close; + const _errs52 = errors; + if (typeof data15 !== "boolean") { + let coerced12 = void 0; + if (!(coerced12 !== void 0)) { + if (data15 === "false" || data15 === 0 || data15 === null) { + coerced12 = false; + } else if (data15 === "true" || data15 === 1) { + coerced12 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/simulate/close", schemaPath: "#/properties/simulate/properties/close/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced12 !== void 0) { + data15 = coerced12; + if (data11 !== void 0) { + data11["close"] = coerced12; + } + } + } + var valid7 = _errs52 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate10.errors = [{ instancePath: instancePath + "/simulate", schemaPath: "#/properties/simulate/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + var valid1 = _errs44 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.authority !== void 0) { + let data16 = data.authority; + const _errs54 = errors; + if (typeof data16 !== "string") { + let dataType13 = typeof data16; + let coerced13 = void 0; + if (!(coerced13 !== void 0)) { + if (dataType13 == "number" || dataType13 == "boolean") { + coerced13 = "" + data16; + } else if (data16 === null) { + coerced13 = ""; + } else { + validate10.errors = [{ instancePath: instancePath + "/authority", schemaPath: "#/properties/authority/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + if (coerced13 !== void 0) { + data16 = coerced13; + if (data !== void 0) { + data["authority"] = coerced13; + } + } + } + var valid1 = _errs54 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.remoteAddress !== void 0) { + let data17 = data.remoteAddress; + const _errs56 = errors; + if (typeof data17 !== "string") { + let dataType14 = typeof data17; + let coerced14 = void 0; + if (!(coerced14 !== void 0)) { + if (dataType14 == "number" || dataType14 == "boolean") { + coerced14 = "" + data17; + } else if (data17 === null) { + coerced14 = ""; + } else { + validate10.errors = [{ instancePath: instancePath + "/remoteAddress", schemaPath: "#/properties/remoteAddress/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + if (coerced14 !== void 0) { + data17 = coerced14; + if (data !== void 0) { + data["remoteAddress"] = coerced14; + } + } + } + var valid1 = _errs56 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.method !== void 0) { + let data18 = data.method; + const _errs58 = errors; + if (typeof data18 !== "string") { + let dataType15 = typeof data18; + let coerced15 = void 0; + if (!(coerced15 !== void 0)) { + if (dataType15 == "number" || dataType15 == "boolean") { + coerced15 = "" + data18; + } else if (data18 === null) { + coerced15 = ""; + } else { + validate10.errors = [{ instancePath: instancePath + "/method", schemaPath: "#/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }]; + return false; + } + } + if (coerced15 !== void 0) { + data18 = coerced15; + if (data !== void 0) { + data["method"] = coerced15; + } + } + } + if (!(data18 === "ACL" || data18 === "BIND" || data18 === "CHECKOUT" || data18 === "CONNECT" || data18 === "COPY" || data18 === "DELETE" || data18 === "GET" || data18 === "HEAD" || data18 === "LINK" || data18 === "LOCK" || data18 === "M-SEARCH" || data18 === "MERGE" || data18 === "MKACTIVITY" || data18 === "MKCALENDAR" || data18 === "MKCOL" || data18 === "MOVE" || data18 === "NOTIFY" || data18 === "OPTIONS" || data18 === "PATCH" || data18 === "POST" || data18 === "PROPFIND" || data18 === "PROPPATCH" || data18 === "PURGE" || data18 === "PUT" || data18 === "QUERY" || data18 === "REBIND" || data18 === "REPORT" || data18 === "SEARCH" || data18 === "SOURCE" || data18 === "SUBSCRIBE" || data18 === "TRACE" || data18 === "UNBIND" || data18 === "UNLINK" || data18 === "UNLOCK" || data18 === "UNSUBSCRIBE" || data18 === "acl" || data18 === "bind" || data18 === "checkout" || data18 === "connect" || data18 === "copy" || data18 === "delete" || data18 === "get" || data18 === "head" || data18 === "link" || data18 === "lock" || data18 === "m-search" || data18 === "merge" || data18 === "mkactivity" || data18 === "mkcalendar" || data18 === "mkcol" || data18 === "move" || data18 === "notify" || data18 === "options" || data18 === "patch" || data18 === "post" || data18 === "propfind" || data18 === "proppatch" || data18 === "purge" || data18 === "put" || data18 === "query" || data18 === "rebind" || data18 === "report" || data18 === "search" || data18 === "source" || data18 === "subscribe" || data18 === "trace" || data18 === "unbind" || data18 === "unlink" || data18 === "unlock" || data18 === "unsubscribe")) { + validate10.errors = [{ instancePath: instancePath + "/method", schemaPath: "#/properties/method/enum", keyword: "enum", params: { allowedValues: schema11.properties.method.enum }, message: "must be equal to one of the allowed values" }]; + return false; + } + var valid1 = _errs58 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.validate !== void 0) { + let data19 = data.validate; + const _errs60 = errors; + if (typeof data19 !== "boolean") { + let coerced16 = void 0; + if (!(coerced16 !== void 0)) { + if (data19 === "false" || data19 === 0 || data19 === null) { + coerced16 = false; + } else if (data19 === "true" || data19 === 1) { + coerced16 = true; + } else { + validate10.errors = [{ instancePath: instancePath + "/validate", schemaPath: "#/properties/validate/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }]; + return false; + } + } + if (coerced16 !== void 0) { + data19 = coerced16; + if (data !== void 0) { + data["validate"] = coerced16; + } + } + } + var valid1 = _errs60 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } + } + } else { + validate10.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }]; + return false; + } + } + validate10.errors = vErrors; + return errors === 0; + } + } +}); + +// node_modules/light-my-request/index.js +var require_light_my_request = __commonJS({ + "node_modules/light-my-request/index.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var Request = require_request2(); + var Response2 = require_response(); + var errorMessage = "The dispatch function has already been invoked"; + var optsValidator = require_config_validator(); + function inject(dispatchFunc, options, callback) { + if (callback === void 0) { + return new Chain(dispatchFunc, options); + } else { + return doInject(dispatchFunc, options, callback); + } + } + function supportStream1(req, next) { + const payload = req._lightMyRequest.payload; + if (!payload || payload._readableState || typeof payload.resume !== "function") { + return next(); + } + const chunks = []; + payload.on("data", (chunk) => chunks.push(Buffer.from(chunk))); + payload.on("end", () => { + const payload2 = Buffer.concat(chunks); + req.headers["content-length"] = req.headers["content-length"] || "" + payload2.length; + delete req.headers["transfer-encoding"]; + req._lightMyRequest.payload = payload2; + return next(); + }); + payload.resume(); + } + function makeRequest(dispatchFunc, server, req, res) { + req.once("error", function(err) { + if (this.destroyed) res.destroy(err); + }); + req.once("close", function() { + if (this.destroyed && !this._error) { + res.destroy(); + } + }); + return supportStream1(req, () => dispatchFunc.call(server, req, res)); + } + function doInject(dispatchFunc, options, callback) { + options = typeof options === "string" ? { url: options } : options; + if (options.validate !== false) { + assert(typeof dispatchFunc === "function", "dispatchFunc should be a function"); + const isOptionValid = optsValidator(options); + if (!isOptionValid) { + throw new Error(optsValidator.errors.map((e) => e.message)); + } + } + const server = options.server || {}; + const RequestConstructor = options.Request ? Request.CustomRequest : Request; + if (dispatchFunc.request && dispatchFunc.request.app === dispatchFunc) { + Object.setPrototypeOf(Object.getPrototypeOf(dispatchFunc.request), RequestConstructor.prototype); + Object.setPrototypeOf(Object.getPrototypeOf(dispatchFunc.response), Response2.prototype); + } + if (typeof callback === "function") { + const req = new RequestConstructor(options); + const res = new Response2(req, callback); + return makeRequest(dispatchFunc, server, req, res); + } else { + return new Promise((resolve, reject) => { + const req = new RequestConstructor(options); + const res = new Response2(req, resolve, reject); + makeRequest(dispatchFunc, server, req, res); + }); + } + } + function Chain(dispatch, option) { + if (typeof option === "string") { + this.option = { url: option }; + } else { + this.option = Object.assign({}, option); + } + this.dispatch = dispatch; + this._hasInvoked = false; + this._promise = null; + if (this.option.autoStart !== false) { + process.nextTick(() => { + if (!this._hasInvoked) { + this.end(); + } + }); + } + } + var httpMethods = [ + "delete", + "get", + "head", + "options", + "patch", + "post", + "put", + "trace" + ]; + httpMethods.forEach((method) => { + Chain.prototype[method] = function(url) { + if (this._hasInvoked === true || this._promise) { + throw new Error(errorMessage); + } + this.option.url = url; + this.option.method = method.toUpperCase(); + return this; + }; + }); + var chainMethods = [ + "body", + "cookies", + "headers", + "payload", + "query" + ]; + chainMethods.forEach((method) => { + Chain.prototype[method] = function(value) { + if (this._hasInvoked === true || this._promise) { + throw new Error(errorMessage); + } + this.option[method] = value; + return this; + }; + }); + Chain.prototype.end = function(callback) { + if (this._hasInvoked === true || this._promise) { + throw new Error(errorMessage); + } + this._hasInvoked = true; + if (typeof callback === "function") { + doInject(this.dispatch, this.option, callback); + } else { + this._promise = doInject(this.dispatch, this.option); + return this._promise; + } + }; + Object.getOwnPropertyNames(Promise.prototype).forEach((method) => { + if (method === "constructor") return; + Chain.prototype[method] = function(...args) { + if (!this._promise) { + if (this._hasInvoked === true) { + throw new Error(errorMessage); + } + this._hasInvoked = true; + this._promise = doInject(this.dispatch, this.option); + } + return this._promise[method](...args); + }; + }); + function isInjection(obj) { + return obj instanceof Request || obj instanceof Response2 || obj?.constructor?.name === "_CustomLMRRequest"; + } + module2.exports = inject; + module2.exports.default = inject; + module2.exports.inject = inject; + module2.exports.isInjection = isInjection; + } +}); + +// node_modules/fastify/fastify.js +var require_fastify = __commonJS({ + "node_modules/fastify/fastify.js"(exports2, module2) { + "use strict"; + var VERSION = "5.5.0"; + var Avvio = require_boot(); + var http = require("node:http"); + var diagnostics = require("node:diagnostics_channel"); + var lightMyRequest; + var { + kAvvioBoot, + kChildren, + kServerBindings, + kBodyLimit, + kSupportedHTTPMethods, + kRoutePrefix, + kLogLevel, + kLogSerializers, + kHooks, + kSchemaController, + kRequestAcceptVersion, + kReplySerializerDefault, + kContentTypeParser, + kReply, + kRequest, + kFourOhFour, + kState, + kOptions, + kPluginNameChain, + kSchemaErrorFormatter, + kErrorHandler, + kKeepAliveConnections, + kChildLoggerFactory, + kGenReqId, + kErrorHandlerAlreadySet + } = require_symbols2(); + var { createServer: createServer2 } = require_server(); + var Reply = require_reply(); + var Request = require_request(); + var Context = require_context(); + var decorator = require_decorate(); + var ContentTypeParser = require_contentTypeParser(); + var SchemaController = require_schema_controller(); + var { Hooks, hookRunnerApplication, supportedHooks } = require_hooks(); + var { createChildLogger, defaultChildLoggerFactory, createLogger } = require_logger_factory(); + var pluginUtils = require_pluginUtils(); + var { getGenReqId, reqIdGenFactory } = require_reqIdGenFactory(); + var { buildRouting, validateBodyLimitOption, buildRouterOptions } = require_route(); + var build404 = require_fourOhFour(); + var getSecuredInitialConfig = require_initialConfigValidation(); + var override = require_pluginOverride(); + var noopSet = require_noop_set(); + var { + appendStackTrace, + AVVIO_ERRORS_MAP, + ...errorCodes + } = require_errors2(); + var PonyPromise = require_promise(); + var { defaultInitOptions } = getSecuredInitialConfig; + var { + FST_ERR_ASYNC_CONSTRAINT, + FST_ERR_BAD_URL, + FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE, + FST_ERR_OPTIONS_NOT_OBJ, + FST_ERR_QSP_NOT_FN, + FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN, + FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ, + FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR, + FST_ERR_INSTANCE_ALREADY_LISTENING, + FST_ERR_REOPENED_CLOSE_SERVER, + FST_ERR_ROUTE_REWRITE_NOT_STR, + FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN, + FST_ERR_ERROR_HANDLER_NOT_FN, + FST_ERR_ERROR_HANDLER_ALREADY_SET, + FST_ERR_ROUTE_METHOD_INVALID + } = errorCodes; + var { buildErrorHandler } = require_error_handler(); + var { FSTWRN004 } = require_warnings(); + var initChannel = diagnostics.channel("fastify.initialization"); + function defaultBuildPrettyMeta(route) { + const cleanKeys = {}; + const allowedProps = ["errorHandler", "logLevel", "logSerializers"]; + allowedProps.concat(supportedHooks).forEach((k) => { + cleanKeys[k] = route.store[k]; + }); + return Object.assign({}, cleanKeys); + } + function fastify(options) { + if (options && typeof options !== "object") { + throw new FST_ERR_OPTIONS_NOT_OBJ(); + } else { + options = Object.assign({}, options); + } + if (options.querystringParser && typeof options.querystringParser !== "function" || options.routerOptions?.querystringParser && typeof options.routerOptions.querystringParser !== "function") { + throw new FST_ERR_QSP_NOT_FN(typeof (options.querystringParser ?? options.routerOptions.querystringParser)); + } + if (options.schemaController && options.schemaController.bucket && typeof options.schemaController.bucket !== "function") { + throw new FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN(typeof options.schemaController.bucket); + } + validateBodyLimitOption(options.bodyLimit); + const requestIdHeader = typeof options.requestIdHeader === "string" && options.requestIdHeader.length !== 0 ? options.requestIdHeader.toLowerCase() : options.requestIdHeader === true && "request-id"; + const genReqId = reqIdGenFactory(requestIdHeader, options.genReqId); + const requestIdLogLabel = options.requestIdLogLabel || "reqId"; + const bodyLimit = options.bodyLimit || defaultInitOptions.bodyLimit; + const disableRequestLogging = options.disableRequestLogging || false; + const ajvOptions = Object.assign({ + customOptions: {}, + plugins: [] + }, options.ajv); + const frameworkErrors = options.frameworkErrors; + if (!ajvOptions.customOptions || Object.prototype.toString.call(ajvOptions.customOptions) !== "[object Object]") { + throw new FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ(typeof ajvOptions.customOptions); + } + if (!ajvOptions.plugins || !Array.isArray(ajvOptions.plugins)) { + throw new FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR(typeof ajvOptions.plugins); + } + const { logger, hasLogger } = createLogger(options); + options.connectionTimeout = options.connectionTimeout || defaultInitOptions.connectionTimeout; + options.keepAliveTimeout = options.keepAliveTimeout || defaultInitOptions.keepAliveTimeout; + options.maxRequestsPerSocket = options.maxRequestsPerSocket || defaultInitOptions.maxRequestsPerSocket; + options.requestTimeout = options.requestTimeout || defaultInitOptions.requestTimeout; + options.logger = logger; + options.requestIdHeader = requestIdHeader; + options.requestIdLogLabel = requestIdLogLabel; + options.disableRequestLogging = disableRequestLogging; + options.ajv = ajvOptions; + options.clientErrorHandler = options.clientErrorHandler || defaultClientErrorHandler; + options.allowErrorHandlerOverride = options.allowErrorHandlerOverride ?? defaultInitOptions.allowErrorHandlerOverride; + const initialConfig = getSecuredInitialConfig(options); + options.exposeHeadRoutes = initialConfig.exposeHeadRoutes; + options.routerOptions = buildRouterOptions(options, { + defaultRoute, + onBadUrl, + ignoreTrailingSlash: defaultInitOptions.ignoreTrailingSlash, + ignoreDuplicateSlashes: defaultInitOptions.ignoreDuplicateSlashes, + maxParamLength: defaultInitOptions.maxParamLength, + allowUnsafeRegex: defaultInitOptions.allowUnsafeRegex, + buildPrettyMeta: defaultBuildPrettyMeta, + useSemicolonDelimiter: defaultInitOptions.useSemicolonDelimiter + }); + const router2 = buildRouting({ + config: options.routerOptions + }); + const fourOhFour = build404(options); + const httpHandler = wrapRouting(router2, options); + options.http2SessionTimeout = initialConfig.http2SessionTimeout; + const { server, listen } = createServer2(options, httpHandler); + const serverHasCloseAllConnections = typeof server.closeAllConnections === "function"; + const serverHasCloseIdleConnections = typeof server.closeIdleConnections === "function"; + let forceCloseConnections = options.forceCloseConnections; + if (forceCloseConnections === "idle" && !serverHasCloseIdleConnections) { + throw new FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE(); + } else if (typeof forceCloseConnections !== "boolean") { + forceCloseConnections = serverHasCloseIdleConnections ? "idle" : false; + } + const keepAliveConnections = !serverHasCloseAllConnections && forceCloseConnections === true ? /* @__PURE__ */ new Set() : noopSet(); + const setupResponseListeners = Reply.setupResponseListeners; + const schemaController = SchemaController.buildSchemaController(null, options.schemaController); + const fastify2 = { + // Fastify internals + [kState]: { + listening: false, + closing: false, + started: false, + ready: false, + booting: false, + aborted: false, + readyResolver: null + }, + [kKeepAliveConnections]: keepAliveConnections, + [kSupportedHTTPMethods]: { + bodyless: /* @__PURE__ */ new Set([ + // Standard + "GET", + "HEAD", + "TRACE" + ]), + bodywith: /* @__PURE__ */ new Set([ + // Standard + "DELETE", + "OPTIONS", + "PATCH", + "PUT", + "POST" + ]) + }, + [kOptions]: options, + [kChildren]: [], + [kServerBindings]: [], + [kBodyLimit]: bodyLimit, + [kRoutePrefix]: "", + [kLogLevel]: "", + [kLogSerializers]: null, + [kHooks]: new Hooks(), + [kSchemaController]: schemaController, + [kSchemaErrorFormatter]: null, + [kErrorHandler]: buildErrorHandler(), + [kErrorHandlerAlreadySet]: false, + [kChildLoggerFactory]: defaultChildLoggerFactory, + [kReplySerializerDefault]: null, + [kContentTypeParser]: new ContentTypeParser( + bodyLimit, + options.onProtoPoisoning || defaultInitOptions.onProtoPoisoning, + options.onConstructorPoisoning || defaultInitOptions.onConstructorPoisoning + ), + [kReply]: Reply.buildReply(Reply), + [kRequest]: Request.buildRequest(Request, options.trustProxy), + [kFourOhFour]: fourOhFour, + [pluginUtils.kRegisteredPlugins]: [], + [kPluginNameChain]: ["fastify"], + [kAvvioBoot]: null, + [kGenReqId]: genReqId, + // routing method + routing: httpHandler, + // routes shorthand methods + delete: function _delete(url, options2, handler) { + return router2.prepareRoute.call(this, { method: "DELETE", url, options: options2, handler }); + }, + get: function _get(url, options2, handler) { + return router2.prepareRoute.call(this, { method: "GET", url, options: options2, handler }); + }, + head: function _head(url, options2, handler) { + return router2.prepareRoute.call(this, { method: "HEAD", url, options: options2, handler }); + }, + trace: function _trace(url, options2, handler) { + return router2.prepareRoute.call(this, { method: "TRACE", url, options: options2, handler }); + }, + patch: function _patch(url, options2, handler) { + return router2.prepareRoute.call(this, { method: "PATCH", url, options: options2, handler }); + }, + post: function _post(url, options2, handler) { + return router2.prepareRoute.call(this, { method: "POST", url, options: options2, handler }); + }, + put: function _put(url, options2, handler) { + return router2.prepareRoute.call(this, { method: "PUT", url, options: options2, handler }); + }, + options: function _options(url, options2, handler) { + return router2.prepareRoute.call(this, { method: "OPTIONS", url, options: options2, handler }); + }, + all: function _all(url, options2, handler) { + return router2.prepareRoute.call(this, { method: this.supportedMethods, url, options: options2, handler }); + }, + // extended route + route: function _route(options2) { + return router2.route.call(this, { options: options2 }); + }, + hasRoute: function _route(options2) { + return router2.hasRoute.call(this, { options: options2 }); + }, + findRoute: function _findRoute(options2) { + return router2.findRoute(options2); + }, + // expose logger instance + log: logger, + // type provider + withTypeProvider, + // hooks + addHook, + // schemas + addSchema, + getSchema: schemaController.getSchema.bind(schemaController), + getSchemas: schemaController.getSchemas.bind(schemaController), + setValidatorCompiler, + setSerializerCompiler, + setSchemaController, + setReplySerializer, + setSchemaErrorFormatter, + // set generated request id + setGenReqId, + // custom parsers + addContentTypeParser: ContentTypeParser.helpers.addContentTypeParser, + hasContentTypeParser: ContentTypeParser.helpers.hasContentTypeParser, + getDefaultJsonParser: ContentTypeParser.defaultParsers.getDefaultJsonParser, + defaultTextParser: ContentTypeParser.defaultParsers.defaultTextParser, + removeContentTypeParser: ContentTypeParser.helpers.removeContentTypeParser, + removeAllContentTypeParsers: ContentTypeParser.helpers.removeAllContentTypeParsers, + // Fastify architecture methods (initialized by Avvio) + register: null, + after: null, + ready: null, + onClose: null, + close: null, + printPlugins: null, + hasPlugin: function(name) { + return this[pluginUtils.kRegisteredPlugins].includes(name) || this[kPluginNameChain].includes(name); + }, + // http server + listen, + server, + addresses: function() { + const binded = this[kServerBindings].map((b) => b.address()); + binded.push(this.server.address()); + return binded.filter((adr) => adr); + }, + // extend fastify objects + decorate: decorator.add, + hasDecorator: decorator.exist, + decorateReply: decorator.decorateReply, + decorateRequest: decorator.decorateRequest, + hasRequestDecorator: decorator.existRequest, + hasReplyDecorator: decorator.existReply, + getDecorator: decorator.getInstanceDecorator, + addHttpMethod, + // fake http injection + inject, + // pretty print of the registered routes + printRoutes, + // custom error handling + setNotFoundHandler, + setErrorHandler, + // child logger + setChildLoggerFactory, + // Set fastify initial configuration options read-only object + initialConfig, + // constraint strategies + addConstraintStrategy: router2.addConstraintStrategy.bind(router2), + hasConstraintStrategy: router2.hasConstraintStrategy.bind(router2) + }; + Object.defineProperties(fastify2, { + listeningOrigin: { + get() { + const address = this.addresses().slice(-1).pop(); + if (typeof address === "string") { + return address; + } + const host = address.family === "IPv6" ? `[${address.address}]` : address.address; + return `${this[kOptions].https ? "https" : "http"}://${host}:${address.port}`; + } + }, + pluginName: { + configurable: true, + get() { + if (this[kPluginNameChain].length > 1) { + return this[kPluginNameChain].join(" -> "); + } + return this[kPluginNameChain][0]; + } + }, + prefix: { + configurable: true, + get() { + return this[kRoutePrefix]; + } + }, + validatorCompiler: { + configurable: true, + get() { + return this[kSchemaController].getValidatorCompiler(); + } + }, + serializerCompiler: { + configurable: true, + get() { + return this[kSchemaController].getSerializerCompiler(); + } + }, + childLoggerFactory: { + configurable: true, + get() { + return this[kChildLoggerFactory]; + } + }, + version: { + configurable: true, + get() { + return VERSION; + } + }, + errorHandler: { + configurable: true, + get() { + return this[kErrorHandler].func; + } + }, + genReqId: { + configurable: true, + get() { + return this[kGenReqId]; + } + }, + supportedMethods: { + configurable: false, + get() { + return [ + ...this[kSupportedHTTPMethods].bodyless, + ...this[kSupportedHTTPMethods].bodywith + ]; + } + } + }); + if (options.schemaErrorFormatter) { + validateSchemaErrorFormatter(options.schemaErrorFormatter); + fastify2[kSchemaErrorFormatter] = options.schemaErrorFormatter.bind(fastify2); + } + const avvioPluginTimeout = Number(options.pluginTimeout); + const avvio = Avvio(fastify2, { + autostart: false, + timeout: isNaN(avvioPluginTimeout) === false ? avvioPluginTimeout : defaultInitOptions.pluginTimeout, + expose: { + use: "register" + } + }); + avvio.override = override; + avvio.on("start", () => fastify2[kState].started = true); + fastify2[kAvvioBoot] = fastify2.ready; + fastify2.ready = ready; + fastify2.printPlugins = avvio.prettyPrint.bind(avvio); + avvio.once("preReady", () => { + fastify2.onClose((instance, done) => { + fastify2[kState].closing = true; + router2.closeRoutes(); + hookRunnerApplication("preClose", fastify2[kAvvioBoot], fastify2, function() { + if (fastify2[kState].listening) { + if (forceCloseConnections === "idle") { + instance.server.closeIdleConnections(); + } else if (serverHasCloseAllConnections && forceCloseConnections) { + instance.server.closeAllConnections(); + } else if (forceCloseConnections === true) { + for (const conn of fastify2[kKeepAliveConnections]) { + conn.destroy(); + fastify2[kKeepAliveConnections].delete(conn); + } + } + } + if (!options.serverFactory || fastify2[kState].listening) { + instance.server.close(function(err) { + if (err && err.code !== "ERR_SERVER_NOT_RUNNING") { + done(null); + } else { + done(); + } + }); + } else { + process.nextTick(done, null); + } + }); + }); + }); + const onBadUrlContext = new Context({ + server: fastify2, + config: {} + }); + fastify2.setNotFoundHandler(); + fourOhFour.arrange404(fastify2); + router2.setup(options, { + avvio, + fourOhFour, + logger, + hasLogger, + setupResponseListeners, + throwIfAlreadyStarted, + keepAliveConnections + }); + server.on("clientError", options.clientErrorHandler.bind(fastify2)); + if (initChannel.hasSubscribers) { + initChannel.publish({ fastify: fastify2 }); + } + if ("asyncDispose" in Symbol) { + fastify2[Symbol.asyncDispose] = function dispose() { + return fastify2.close(); + }; + } + return fastify2; + function throwIfAlreadyStarted(msg) { + if (fastify2[kState].started) throw new FST_ERR_INSTANCE_ALREADY_LISTENING(msg); + } + function inject(opts, cb) { + if (lightMyRequest === void 0) { + lightMyRequest = require_light_my_request(); + } + if (fastify2[kState].started) { + if (fastify2[kState].closing) { + const error = new FST_ERR_REOPENED_CLOSE_SERVER(); + if (cb) { + cb(error); + return; + } else { + return Promise.reject(error); + } + } + return lightMyRequest(httpHandler, opts, cb); + } + if (cb) { + this.ready((err) => { + if (err) cb(err, null); + else lightMyRequest(httpHandler, opts, cb); + }); + } else { + return lightMyRequest((req, res) => { + this.ready(function(err) { + if (err) { + res.emit("error", err); + return; + } + httpHandler(req, res); + }); + }, opts); + } + } + function ready(cb) { + if (this[kState].readyResolver !== null) { + if (cb != null) { + this[kState].readyResolver.promise.then(() => cb(null, fastify2), cb); + return; + } + return this[kState].readyResolver.promise; + } + process.nextTick(runHooks); + this[kState].readyResolver = PonyPromise.withResolvers(); + if (!cb) { + return this[kState].readyResolver.promise; + } else { + this[kState].readyResolver.promise.then(() => cb(null, fastify2), cb); + } + function runHooks() { + fastify2[kAvvioBoot]((err, done) => { + if (err || fastify2[kState].started || fastify2[kState].ready || fastify2[kState].booting) { + manageErr(err); + } else { + fastify2[kState].booting = true; + hookRunnerApplication("onReady", fastify2[kAvvioBoot], fastify2, manageErr); + } + done(); + }); + } + function manageErr(err) { + err = err != null && AVVIO_ERRORS_MAP[err.code] != null ? appendStackTrace(err, new AVVIO_ERRORS_MAP[err.code](err.message)) : err; + if (err) { + return fastify2[kState].readyResolver.reject(err); + } + fastify2[kState].readyResolver.resolve(fastify2); + fastify2[kState].booting = false; + fastify2[kState].ready = true; + fastify2[kState].readyResolver = null; + } + } + function withTypeProvider() { + return this; + } + function addHook(name, fn) { + throwIfAlreadyStarted('Cannot call "addHook"!'); + if (fn == null) { + throw new errorCodes.FST_ERR_HOOK_INVALID_HANDLER(name, fn); + } + if (name === "onSend" || name === "preSerialization" || name === "onError" || name === "preParsing") { + if (fn.constructor.name === "AsyncFunction" && fn.length === 4) { + throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER(); + } + } else if (name === "onReady" || name === "onListen") { + if (fn.constructor.name === "AsyncFunction" && fn.length !== 0) { + throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER(); + } + } else if (name === "onRequestAbort") { + if (fn.constructor.name === "AsyncFunction" && fn.length !== 1) { + throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER(); + } + } else { + if (fn.constructor.name === "AsyncFunction" && fn.length === 3) { + throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER(); + } + } + if (name === "onClose") { + this.onClose(fn.bind(this)); + } else if (name === "onReady" || name === "onListen" || name === "onRoute") { + this[kHooks].add(name, fn); + } else { + this.after((err, done) => { + try { + _addHook.call(this, name, fn); + done(err); + } catch (err2) { + done(err2); + } + }); + } + return this; + function _addHook(name2, fn2) { + this[kHooks].add(name2, fn2); + this[kChildren].forEach((child) => _addHook.call(child, name2, fn2)); + } + } + function addSchema(schema) { + throwIfAlreadyStarted('Cannot call "addSchema"!'); + this[kSchemaController].add(schema); + this[kChildren].forEach((child) => child.addSchema(schema)); + return this; + } + function defaultClientErrorHandler(err, socket) { + if (err.code === "ECONNRESET" || socket.destroyed) { + return; + } + let body, errorCode, errorStatus, errorLabel; + if (err.code === "ERR_HTTP_REQUEST_TIMEOUT") { + errorCode = "408"; + errorStatus = http.STATUS_CODES[errorCode]; + body = `{"error":"${errorStatus}","message":"Client Timeout","statusCode":408}`; + errorLabel = "timeout"; + } else if (err.code === "HPE_HEADER_OVERFLOW") { + errorCode = "431"; + errorStatus = http.STATUS_CODES[errorCode]; + body = `{"error":"${errorStatus}","message":"Exceeded maximum allowed HTTP header size","statusCode":431}`; + errorLabel = "header_overflow"; + } else { + errorCode = "400"; + errorStatus = http.STATUS_CODES[errorCode]; + body = `{"error":"${errorStatus}","message":"Client Error","statusCode":400}`; + errorLabel = "error"; + } + this.log.trace({ err }, `client ${errorLabel}`); + if (socket.writable) { + socket.write(`HTTP/1.1 ${errorCode} ${errorStatus}\r +Content-Length: ${body.length}\r +Content-Type: application/json\r +\r +${body}`); + } + socket.destroy(err); + } + function defaultRoute(req, res) { + if (req.headers["accept-version"] !== void 0) { + req.headers[kRequestAcceptVersion] = req.headers["accept-version"]; + req.headers["accept-version"] = void 0; + } + fourOhFour.router.lookup(req, res); + } + function onBadUrl(path7, req, res) { + if (frameworkErrors) { + const id2 = getGenReqId(onBadUrlContext.server, req); + const childLogger = createChildLogger(onBadUrlContext, logger, req, id2); + const request = new Request(id2, null, req, null, childLogger, onBadUrlContext); + const reply = new Reply(res, request, childLogger); + if (disableRequestLogging === false) { + childLogger.info({ req: request }, "incoming request"); + } + return frameworkErrors(new FST_ERR_BAD_URL(path7), request, reply); + } + const body = `{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${path7}' is not a valid url component","statusCode":400}`; + res.writeHead(400, { + "Content-Type": "application/json", + "Content-Length": body.length + }); + res.end(body); + } + function buildAsyncConstraintCallback(isAsync, req, res) { + if (isAsync === false) return void 0; + return function onAsyncConstraintError(err) { + if (err) { + if (frameworkErrors) { + const id2 = getGenReqId(onBadUrlContext.server, req); + const childLogger = createChildLogger(onBadUrlContext, logger, req, id2); + const request = new Request(id2, null, req, null, childLogger, onBadUrlContext); + const reply = new Reply(res, request, childLogger); + if (disableRequestLogging === false) { + childLogger.info({ req: request }, "incoming request"); + } + return frameworkErrors(new FST_ERR_ASYNC_CONSTRAINT(), request, reply); + } + const body = '{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}'; + res.writeHead(500, { + "Content-Type": "application/json", + "Content-Length": body.length + }); + res.end(body); + } + }; + } + function setNotFoundHandler(opts, handler) { + throwIfAlreadyStarted('Cannot call "setNotFoundHandler"!'); + fourOhFour.setNotFoundHandler.call(this, opts, handler, avvio, router2.routeHandler); + return this; + } + function setValidatorCompiler(validatorCompiler) { + throwIfAlreadyStarted('Cannot call "setValidatorCompiler"!'); + this[kSchemaController].setValidatorCompiler(validatorCompiler); + return this; + } + function setSchemaErrorFormatter(errorFormatter) { + throwIfAlreadyStarted('Cannot call "setSchemaErrorFormatter"!'); + validateSchemaErrorFormatter(errorFormatter); + this[kSchemaErrorFormatter] = errorFormatter.bind(this); + return this; + } + function setSerializerCompiler(serializerCompiler) { + throwIfAlreadyStarted('Cannot call "setSerializerCompiler"!'); + this[kSchemaController].setSerializerCompiler(serializerCompiler); + return this; + } + function setSchemaController(schemaControllerOpts) { + throwIfAlreadyStarted('Cannot call "setSchemaController"!'); + const old = this[kSchemaController]; + const schemaController2 = SchemaController.buildSchemaController(old, Object.assign({}, old.opts, schemaControllerOpts)); + this[kSchemaController] = schemaController2; + this.getSchema = schemaController2.getSchema.bind(schemaController2); + this.getSchemas = schemaController2.getSchemas.bind(schemaController2); + return this; + } + function setReplySerializer(replySerializer) { + throwIfAlreadyStarted('Cannot call "setReplySerializer"!'); + this[kReplySerializerDefault] = replySerializer; + return this; + } + function setErrorHandler(func) { + throwIfAlreadyStarted('Cannot call "setErrorHandler"!'); + if (typeof func !== "function") { + throw new FST_ERR_ERROR_HANDLER_NOT_FN(); + } + if (!options.allowErrorHandlerOverride && this[kErrorHandlerAlreadySet]) { + throw new FST_ERR_ERROR_HANDLER_ALREADY_SET(); + } else if (this[kErrorHandlerAlreadySet]) { + FSTWRN004("To disable this behavior, set 'allowErrorHandlerOverride' to false or ignore this message. For more information, visit: https://fastify.dev/docs/latest/Reference/Server/#allowerrorhandleroverride"); + } + this[kErrorHandlerAlreadySet] = true; + this[kErrorHandler] = buildErrorHandler(this[kErrorHandler], func.bind(this)); + return this; + } + function setChildLoggerFactory(factory) { + throwIfAlreadyStarted('Cannot call "setChildLoggerFactory"!'); + this[kChildLoggerFactory] = factory; + return this; + } + function printRoutes(opts = {}) { + opts.includeMeta = opts.includeHooks ? opts.includeMeta ? supportedHooks.concat(opts.includeMeta) : supportedHooks : opts.includeMeta; + return router2.printRoutes(opts); + } + function wrapRouting(router3, { rewriteUrl, logger: logger2 }) { + let isAsync; + return function preRouting(req, res) { + if (isAsync === void 0) isAsync = router3.isAsyncConstraint(); + if (rewriteUrl) { + req.originalUrl = req.url; + const url = rewriteUrl.call(fastify2, req); + if (typeof url === "string") { + req.url = url; + } else { + const err = new FST_ERR_ROUTE_REWRITE_NOT_STR(req.url, typeof url); + req.destroy(err); + } + } + router3.routing(req, res, buildAsyncConstraintCallback(isAsync, req, res)); + }; + } + function setGenReqId(func) { + throwIfAlreadyStarted('Cannot call "setGenReqId"!'); + this[kGenReqId] = reqIdGenFactory(this[kOptions].requestIdHeader, func); + return this; + } + function addHttpMethod(method, { hasBody = false } = {}) { + if (typeof method !== "string" || http.METHODS.indexOf(method) === -1) { + throw new FST_ERR_ROUTE_METHOD_INVALID(); + } + if (hasBody === true) { + this[kSupportedHTTPMethods].bodywith.add(method); + this[kSupportedHTTPMethods].bodyless.delete(method); + } else { + this[kSupportedHTTPMethods].bodywith.delete(method); + this[kSupportedHTTPMethods].bodyless.add(method); + } + const _method = method.toLowerCase(); + if (!this.hasDecorator(_method)) { + this.decorate(_method, function(url, options2, handler) { + return router2.prepareRoute.call(this, { method, url, options: options2, handler }); + }); + } + return this; + } + } + function validateSchemaErrorFormatter(schemaErrorFormatter) { + if (typeof schemaErrorFormatter !== "function") { + throw new FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN(typeof schemaErrorFormatter); + } else if (schemaErrorFormatter.constructor.name === "AsyncFunction") { + throw new FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN("AsyncFunction"); + } + } + module2.exports = fastify; + module2.exports.errorCodes = errorCodes; + module2.exports.fastify = fastify; + module2.exports.default = fastify; + } +}); + +// node_modules/fastify-plugin/lib/getPluginName.js +var require_getPluginName = __commonJS({ + "node_modules/fastify-plugin/lib/getPluginName.js"(exports2, module2) { + "use strict"; + var fpStackTracePattern = /at\s{1}(?:.*\.)?plugin\s{1}.*\n\s*(.*)/; + var fileNamePattern = /(\w*(\.\w*)*)\..*/; + module2.exports = function getPluginName(fn) { + if (fn.name.length > 0) return fn.name; + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 10; + try { + throw new Error("anonymous function"); + } catch (e) { + Error.stackTraceLimit = stackTraceLimit; + return extractPluginName(e.stack); + } + }; + function extractPluginName(stack) { + const m = stack.match(fpStackTracePattern); + return m ? m[1].split(/[/\\]/).slice(-1)[0].match(fileNamePattern)[1] : "anonymous"; + } + module2.exports.extractPluginName = extractPluginName; + } +}); + +// node_modules/fastify-plugin/lib/toCamelCase.js +var require_toCamelCase = __commonJS({ + "node_modules/fastify-plugin/lib/toCamelCase.js"(exports2, module2) { + "use strict"; + module2.exports = function toCamelCase(name) { + if (name[0] === "@") { + name = name.slice(1).replace("/", "-"); + } + return name.replace(/-(.)/g, function(match, g1) { + return g1.toUpperCase(); + }); + }; + } +}); + +// node_modules/fastify-plugin/plugin.js +var require_plugin2 = __commonJS({ + "node_modules/fastify-plugin/plugin.js"(exports2, module2) { + "use strict"; + var getPluginName = require_getPluginName(); + var toCamelCase = require_toCamelCase(); + var count = 0; + function plugin(fn, options = {}) { + let autoName = false; + if (fn.default !== void 0) { + fn = fn.default; + } + if (typeof fn !== "function") { + throw new TypeError( + `fastify-plugin expects a function, instead got a '${typeof fn}'` + ); + } + if (typeof options === "string") { + options = { + fastify: options + }; + } + if (typeof options !== "object" || Array.isArray(options) || options === null) { + throw new TypeError("The options object should be an object"); + } + if (options.fastify !== void 0 && typeof options.fastify !== "string") { + throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof options.fastify}'`); + } + if (!options.name) { + autoName = true; + options.name = getPluginName(fn) + "-auto-" + count++; + } + fn[Symbol.for("skip-override")] = options.encapsulate !== true; + fn[Symbol.for("fastify.display-name")] = options.name; + fn[Symbol.for("plugin-meta")] = options; + if (!fn.default) { + fn.default = fn; + } + const camelCase = toCamelCase(options.name); + if (!autoName && !fn[camelCase]) { + fn[camelCase] = fn; + } + return fn; + } + module2.exports = plugin; + module2.exports.default = plugin; + module2.exports.fastifyPlugin = plugin; + } +}); + +// node_modules/@fastify/cors/vary.js +var require_vary = __commonJS({ + "node_modules/@fastify/cors/vary.js"(exports2, module2) { + "use strict"; + var { FifoMap: FifoCache } = require_toad_cache(); + var validFieldnameRE = /^[!#$%&'*+\-.^\w`|~]+$/u; + function validateFieldname(fieldname) { + if (validFieldnameRE.test(fieldname) === false) { + throw new TypeError("Fieldname contains invalid characters."); + } + } + function parse(header) { + header = header.trim().toLowerCase(); + const result = []; + if (header.length === 0) { + } else if (header.indexOf(",") === -1) { + result.push(header); + } else { + const il = header.length; + let i = 0; + let pos = 0; + let char; + for (i; i < il; ++i) { + char = header[i]; + if (char === " ") { + pos = i + 1; + } else if (char === ",") { + if (pos !== i) { + result.push(header.slice(pos, i)); + } + pos = i + 1; + } + } + if (pos !== i) { + result.push(header.slice(pos, i)); + } + } + return result; + } + function createAddFieldnameToVary(fieldname) { + const headerCache = new FifoCache(1e3); + validateFieldname(fieldname); + return function(reply) { + let header = reply.getHeader("Vary"); + if (!header) { + reply.header("Vary", fieldname); + return; + } + if (header === "*") { + return; + } + if (fieldname === "*") { + reply.header("Vary", "*"); + return; + } + if (Array.isArray(header)) { + header = header.join(", "); + } + if (headerCache.get(header) === void 0) { + const vals = parse(header); + if (vals.indexOf("*") !== -1) { + headerCache.set(header, "*"); + } else if (vals.indexOf(fieldname.toLowerCase()) === -1) { + headerCache.set(header, header + ", " + fieldname); + } else { + headerCache.set(header, null); + } + } + const cached = headerCache.get(header); + if (cached !== null) { + reply.header("Vary", cached); + } + }; + } + module2.exports.createAddFieldnameToVary = createAddFieldnameToVary; + module2.exports.addOriginToVaryHeader = createAddFieldnameToVary("Origin"); + module2.exports.addAccessControlRequestHeadersToVaryHeader = createAddFieldnameToVary("Access-Control-Request-Headers"); + module2.exports.parse = parse; + } +}); + +// node_modules/@fastify/cors/index.js +var require_cors = __commonJS({ + "node_modules/@fastify/cors/index.js"(exports2, module2) { + "use strict"; + var fp = require_plugin2(); + var { + addAccessControlRequestHeadersToVaryHeader, + addOriginToVaryHeader + } = require_vary(); + var defaultOptions = { + origin: "*", + methods: "GET,HEAD,POST", + hook: "onRequest", + preflightContinue: false, + optionsSuccessStatus: 204, + credentials: false, + exposedHeaders: null, + allowedHeaders: null, + maxAge: null, + preflight: true, + strictPreflight: true + }; + var validHooks = [ + "onRequest", + "preParsing", + "preValidation", + "preHandler", + "preSerialization", + "onSend" + ]; + var hookWithPayload = [ + "preSerialization", + "preParsing", + "onSend" + ]; + function validateHook(value, next) { + if (validHooks.indexOf(value) !== -1) { + return; + } + next(new TypeError("@fastify/cors: Invalid hook option provided.")); + } + function fastifyCors(fastify, opts, next) { + fastify.decorateRequest("corsPreflightEnabled", false); + let hideOptionsRoute = true; + let logLevel2; + if (typeof opts === "function") { + handleCorsOptionsDelegator(opts, fastify, { hook: defaultOptions.hook }, next); + } else if (opts.delegator) { + const { delegator, ...options } = opts; + handleCorsOptionsDelegator(delegator, fastify, options, next); + } else { + const corsOptions = normalizeCorsOptions(opts); + validateHook(corsOptions.hook, next); + if (hookWithPayload.indexOf(corsOptions.hook) !== -1) { + fastify.addHook(corsOptions.hook, function handleCors(req, reply, _payload, next2) { + addCorsHeadersHandler(fastify, corsOptions, req, reply, next2); + }); + } else { + fastify.addHook(corsOptions.hook, function handleCors(req, reply, next2) { + addCorsHeadersHandler(fastify, corsOptions, req, reply, next2); + }); + } + } + if (opts.logLevel !== void 0) logLevel2 = opts.logLevel; + if (opts.hideOptionsRoute !== void 0) hideOptionsRoute = opts.hideOptionsRoute; + fastify.options("*", { schema: { hide: hideOptionsRoute }, logLevel: logLevel2 }, (req, reply) => { + if (!req.corsPreflightEnabled) { + reply.callNotFound(); + return; + } + reply.send(); + }); + next(); + } + function handleCorsOptionsDelegator(optionsResolver, fastify, opts, next) { + const hook = opts?.hook || defaultOptions.hook; + validateHook(hook, next); + if (optionsResolver.length === 2) { + if (hookWithPayload.indexOf(hook) !== -1) { + fastify.addHook(hook, function handleCors(req, reply, _payload, next2) { + handleCorsOptionsCallbackDelegator(optionsResolver, fastify, req, reply, next2); + }); + } else { + fastify.addHook(hook, function handleCors(req, reply, next2) { + handleCorsOptionsCallbackDelegator(optionsResolver, fastify, req, reply, next2); + }); + } + } else { + if (hookWithPayload.indexOf(hook) !== -1) { + fastify.addHook(hook, function handleCors(req, reply, _payload, next2) { + const ret = optionsResolver(req); + if (ret && typeof ret.then === "function") { + ret.then((options) => addCorsHeadersHandler(fastify, normalizeCorsOptions(options, true), req, reply, next2)).catch(next2); + return; + } + next2(new Error("Invalid CORS origin option")); + }); + } else { + fastify.addHook(hook, function handleCors(req, reply, next2) { + const ret = optionsResolver(req); + if (ret && typeof ret.then === "function") { + ret.then((options) => addCorsHeadersHandler(fastify, normalizeCorsOptions(options, true), req, reply, next2)).catch(next2); + return; + } + next2(new Error("Invalid CORS origin option")); + }); + } + } + } + function handleCorsOptionsCallbackDelegator(optionsResolver, fastify, req, reply, next) { + optionsResolver(req, (err, options) => { + if (err) { + next(err); + } else { + addCorsHeadersHandler(fastify, normalizeCorsOptions(options, true), req, reply, next); + } + }); + } + function normalizeCorsOptions(opts, dynamic) { + const corsOptions = { ...defaultOptions, ...opts }; + if (Array.isArray(opts.origin) && opts.origin.indexOf("*") !== -1) { + corsOptions.origin = "*"; + } + if (Number.isInteger(corsOptions.cacheControl)) { + corsOptions.cacheControl = `max-age=${corsOptions.cacheControl}`; + } else if (typeof corsOptions.cacheControl !== "string") { + corsOptions.cacheControl = null; + } + corsOptions.dynamic = dynamic || false; + return corsOptions; + } + function addCorsHeadersHandler(fastify, options, req, reply, next) { + if (typeof options.origin !== "string" && options.origin !== false || options.dynamic) { + addOriginToVaryHeader(reply); + } + const resolveOriginOption = typeof options.origin === "function" ? resolveOriginWrapper(fastify, options.origin) : (_, cb) => cb(null, options.origin); + resolveOriginOption(req, (error, resolvedOriginOption) => { + if (error !== null) { + return next(error); + } + if (resolvedOriginOption === false) { + return next(); + } + if (req.routeOptions.config?.cors === false) { + return next(); + } + if (!resolvedOriginOption) { + return next(new Error("Invalid CORS origin option")); + } + addCorsHeaders(req, reply, resolvedOriginOption, options); + if (req.raw.method === "OPTIONS" && options.preflight === true) { + if (options.strictPreflight === true && (!req.headers.origin || !req.headers["access-control-request-method"])) { + reply.status(400).type("text/plain").send("Invalid Preflight Request"); + return; + } + req.corsPreflightEnabled = true; + addPreflightHeaders(req, reply, options); + if (!options.preflightContinue) { + reply.code(options.optionsSuccessStatus).header("Content-Length", "0").send(); + return; + } + } + return next(); + }); + } + function addCorsHeaders(req, reply, originOption, corsOptions) { + const origin = getAccessControlAllowOriginHeader(req.headers.origin, originOption); + if (origin) { + reply.header("Access-Control-Allow-Origin", origin); + } + if (corsOptions.credentials) { + reply.header("Access-Control-Allow-Credentials", "true"); + } + if (corsOptions.exposedHeaders !== null) { + reply.header( + "Access-Control-Expose-Headers", + Array.isArray(corsOptions.exposedHeaders) ? corsOptions.exposedHeaders.join(", ") : corsOptions.exposedHeaders + ); + } + } + function addPreflightHeaders(req, reply, corsOptions) { + reply.header( + "Access-Control-Allow-Methods", + Array.isArray(corsOptions.methods) ? corsOptions.methods.join(", ") : corsOptions.methods + ); + if (corsOptions.allowedHeaders === null) { + addAccessControlRequestHeadersToVaryHeader(reply); + const reqAllowedHeaders = req.headers["access-control-request-headers"]; + if (reqAllowedHeaders !== void 0) { + reply.header("Access-Control-Allow-Headers", reqAllowedHeaders); + } + } else { + reply.header( + "Access-Control-Allow-Headers", + Array.isArray(corsOptions.allowedHeaders) ? corsOptions.allowedHeaders.join(", ") : corsOptions.allowedHeaders + ); + } + if (corsOptions.maxAge !== null) { + reply.header("Access-Control-Max-Age", String(corsOptions.maxAge)); + } + if (corsOptions.cacheControl) { + reply.header("Cache-Control", corsOptions.cacheControl); + } + } + function resolveOriginWrapper(fastify, origin) { + return function(req, cb) { + const result = origin.call(fastify, req.headers.origin, cb); + if (result && typeof result.then === "function") { + result.then((res) => cb(null, res), cb); + } + }; + } + function getAccessControlAllowOriginHeader(reqOrigin, originOption) { + if (typeof originOption === "string") { + return originOption; + } + return isRequestOriginAllowed(reqOrigin, originOption) ? reqOrigin : false; + } + function isRequestOriginAllowed(reqOrigin, allowedOrigin) { + if (Array.isArray(allowedOrigin)) { + for (let i = 0; i < allowedOrigin.length; ++i) { + if (isRequestOriginAllowed(reqOrigin, allowedOrigin[i])) { + return true; + } + } + return false; + } else if (typeof allowedOrigin === "string") { + return reqOrigin === allowedOrigin; + } else if (allowedOrigin instanceof RegExp) { + allowedOrigin.lastIndex = 0; + return allowedOrigin.test(reqOrigin); + } else { + return !!allowedOrigin; + } + } + var _fastifyCors = fp(fastifyCors, { + fastify: "5.x", + name: "@fastify/cors" + }); + module2.exports = _fastifyCors; + module2.exports.fastifyCors = _fastifyCors; + module2.exports.default = _fastifyCors; + } +}); + +// node_modules/dotenv/package.json +var require_package2 = __commonJS({ + "node_modules/dotenv/package.json"(exports2, module2) { + module2.exports = { + name: "dotenv", + version: "16.6.1", + description: "Loads environment variables from .env file", + main: "lib/main.js", + types: "lib/main.d.ts", + exports: { + ".": { + types: "./lib/main.d.ts", + require: "./lib/main.js", + default: "./lib/main.js" + }, + "./config": "./config.js", + "./config.js": "./config.js", + "./lib/env-options": "./lib/env-options.js", + "./lib/env-options.js": "./lib/env-options.js", + "./lib/cli-options": "./lib/cli-options.js", + "./lib/cli-options.js": "./lib/cli-options.js", + "./package.json": "./package.json" + }, + scripts: { + "dts-check": "tsc --project tests/types/tsconfig.json", + lint: "standard", + pretest: "npm run lint && npm run dts-check", + test: "tap run --allow-empty-coverage --disable-coverage --timeout=60000", + "test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov", + prerelease: "npm test", + release: "standard-version" + }, + repository: { + type: "git", + url: "git://github.com/motdotla/dotenv.git" + }, + homepage: "https://github.com/motdotla/dotenv#readme", + funding: "https://dotenvx.com", + keywords: [ + "dotenv", + "env", + ".env", + "environment", + "variables", + "config", + "settings" + ], + readmeFilename: "README.md", + license: "BSD-2-Clause", + devDependencies: { + "@types/node": "^18.11.3", + decache: "^4.6.2", + sinon: "^14.0.1", + standard: "^17.0.0", + "standard-version": "^9.5.0", + tap: "^19.2.0", + typescript: "^4.8.4" + }, + engines: { + node: ">=12" + }, + browser: { + fs: false + } + }; + } +}); + +// node_modules/dotenv/lib/main.js +var require_main = __commonJS({ + "node_modules/dotenv/lib/main.js"(exports2, module2) { + var fs7 = require("fs"); + var path7 = require("path"); + var os2 = require("os"); + var crypto2 = require("crypto"); + var packageJson = require_package2(); + var version2 = packageJson.version; + var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; + function parse(src) { + const obj = {}; + let lines = src.toString(); + lines = lines.replace(/\r\n?/mg, "\n"); + let match; + while ((match = LINE.exec(lines)) != null) { + const key = match[1]; + let value = match[2] || ""; + value = value.trim(); + const maybeQuote = value[0]; + value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"); + if (maybeQuote === '"') { + value = value.replace(/\\n/g, "\n"); + value = value.replace(/\\r/g, "\r"); + } + obj[key] = value; + } + return obj; + } + function _parseVault(options) { + options = options || {}; + const vaultPath = _vaultPath(options); + options.path = vaultPath; + const result = DotenvModule.configDotenv(options); + if (!result.parsed) { + const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`); + err.code = "MISSING_DATA"; + throw err; + } + const keys = _dotenvKey(options).split(","); + const length = keys.length; + let decrypted; + for (let i = 0; i < length; i++) { + try { + const key = keys[i].trim(); + const attrs = _instructions(result, key); + decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); + break; + } catch (error) { + if (i + 1 >= length) { + throw error; + } + } + } + return DotenvModule.parse(decrypted); + } + function _warn(message) { + console.log(`[dotenv@${version2}][WARN] ${message}`); + } + function _debug(message) { + console.log(`[dotenv@${version2}][DEBUG] ${message}`); + } + function _log(message) { + console.log(`[dotenv@${version2}] ${message}`); + } + function _dotenvKey(options) { + if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) { + return options.DOTENV_KEY; + } + if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) { + return process.env.DOTENV_KEY; + } + return ""; + } + function _instructions(result, dotenvKey) { + let uri; + try { + uri = new URL(dotenvKey); + } catch (error) { + if (error.code === "ERR_INVALID_URL") { + const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } + throw error; + } + const key = uri.password; + if (!key) { + const err = new Error("INVALID_DOTENV_KEY: Missing key part"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } + const environment = uri.searchParams.get("environment"); + if (!environment) { + const err = new Error("INVALID_DOTENV_KEY: Missing environment part"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } + const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`; + const ciphertext = result.parsed[environmentKey]; + if (!ciphertext) { + const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`); + err.code = "NOT_FOUND_DOTENV_ENVIRONMENT"; + throw err; + } + return { ciphertext, key }; + } + function _vaultPath(options) { + let possibleVaultPath = null; + if (options && options.path && options.path.length > 0) { + if (Array.isArray(options.path)) { + for (const filepath of options.path) { + if (fs7.existsSync(filepath)) { + possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`; + } + } + } else { + possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`; + } + } else { + possibleVaultPath = path7.resolve(process.cwd(), ".env.vault"); + } + if (fs7.existsSync(possibleVaultPath)) { + return possibleVaultPath; + } + return null; + } + function _resolveHome(envPath) { + return envPath[0] === "~" ? path7.join(os2.homedir(), envPath.slice(1)) : envPath; + } + function _configVault(options) { + const debug = Boolean(options && options.debug); + const quiet = options && "quiet" in options ? options.quiet : true; + if (debug || !quiet) { + _log("Loading env from encrypted .env.vault"); + } + const parsed = DotenvModule._parseVault(options); + let processEnv = process.env; + if (options && options.processEnv != null) { + processEnv = options.processEnv; + } + DotenvModule.populate(processEnv, parsed, options); + return { parsed }; + } + function configDotenv(options) { + const dotenvPath = path7.resolve(process.cwd(), ".env"); + let encoding = "utf8"; + const debug = Boolean(options && options.debug); + const quiet = options && "quiet" in options ? options.quiet : true; + if (options && options.encoding) { + encoding = options.encoding; + } else { + if (debug) { + _debug("No encoding is specified. UTF-8 is used by default"); + } + } + let optionPaths = [dotenvPath]; + if (options && options.path) { + if (!Array.isArray(options.path)) { + optionPaths = [_resolveHome(options.path)]; + } else { + optionPaths = []; + for (const filepath of options.path) { + optionPaths.push(_resolveHome(filepath)); + } + } + } + let lastError; + const parsedAll = {}; + for (const path8 of optionPaths) { + try { + const parsed = DotenvModule.parse(fs7.readFileSync(path8, { encoding })); + DotenvModule.populate(parsedAll, parsed, options); + } catch (e) { + if (debug) { + _debug(`Failed to load ${path8} ${e.message}`); + } + lastError = e; + } + } + let processEnv = process.env; + if (options && options.processEnv != null) { + processEnv = options.processEnv; + } + DotenvModule.populate(processEnv, parsedAll, options); + if (debug || !quiet) { + const keysCount = Object.keys(parsedAll).length; + const shortPaths = []; + for (const filePath of optionPaths) { + try { + const relative = path7.relative(process.cwd(), filePath); + shortPaths.push(relative); + } catch (e) { + if (debug) { + _debug(`Failed to load ${filePath} ${e.message}`); + } + lastError = e; + } + } + _log(`injecting env (${keysCount}) from ${shortPaths.join(",")}`); + } + if (lastError) { + return { parsed: parsedAll, error: lastError }; + } else { + return { parsed: parsedAll }; + } + } + function config(options) { + if (_dotenvKey(options).length === 0) { + return DotenvModule.configDotenv(options); + } + const vaultPath = _vaultPath(options); + if (!vaultPath) { + _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`); + return DotenvModule.configDotenv(options); + } + return DotenvModule._configVault(options); + } + function decrypt(encrypted, keyStr) { + const key = Buffer.from(keyStr.slice(-64), "hex"); + let ciphertext = Buffer.from(encrypted, "base64"); + const nonce = ciphertext.subarray(0, 12); + const authTag = ciphertext.subarray(-16); + ciphertext = ciphertext.subarray(12, -16); + try { + const aesgcm = crypto2.createDecipheriv("aes-256-gcm", key, nonce); + aesgcm.setAuthTag(authTag); + return `${aesgcm.update(ciphertext)}${aesgcm.final()}`; + } catch (error) { + const isRange = error instanceof RangeError; + const invalidKeyLength = error.message === "Invalid key length"; + const decryptionFailed = error.message === "Unsupported state or unable to authenticate data"; + if (isRange || invalidKeyLength) { + const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } else if (decryptionFailed) { + const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY"); + err.code = "DECRYPTION_FAILED"; + throw err; + } else { + throw error; + } + } + } + function populate(processEnv, parsed, options = {}) { + const debug = Boolean(options && options.debug); + const override = Boolean(options && options.override); + if (typeof parsed !== "object") { + const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate"); + err.code = "OBJECT_REQUIRED"; + throw err; + } + for (const key of Object.keys(parsed)) { + if (Object.prototype.hasOwnProperty.call(processEnv, key)) { + if (override === true) { + processEnv[key] = parsed[key]; + } + if (debug) { + if (override === true) { + _debug(`"${key}" is already defined and WAS overwritten`); + } else { + _debug(`"${key}" is already defined and was NOT overwritten`); + } + } + } else { + processEnv[key] = parsed[key]; + } + } + } + var DotenvModule = { + configDotenv, + _configVault, + _parseVault, + config, + decrypt, + parse, + populate + }; + module2.exports.configDotenv = DotenvModule.configDotenv; + module2.exports._configVault = DotenvModule._configVault; + module2.exports._parseVault = DotenvModule._parseVault; + module2.exports.config = DotenvModule.config; + module2.exports.decrypt = DotenvModule.decrypt; + module2.exports.parse = DotenvModule.parse; + module2.exports.populate = DotenvModule.populate; + module2.exports = DotenvModule; + } +}); + +// node_modules/undici/lib/core/symbols.js +var require_symbols4 = __commonJS({ + "node_modules/undici/lib/core/symbols.js"(exports2, module2) { + "use strict"; + module2.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent") + }; + } +}); + +// node_modules/undici/lib/util/timers.js +var require_timers = __commonJS({ + "node_modules/undici/lib/util/timers.js"(exports2, module2) { + "use strict"; + var fastNow = 0; + var RESOLUTION_MS = 1e3; + var TICK_MS = (RESOLUTION_MS >> 1) - 1; + var fastNowTimeout; + var kFastTimer = Symbol("kFastTimer"); + var fastTimers = []; + var NOT_IN_LIST = -2; + var TO_BE_CLEARED = -1; + var PENDING = 0; + var ACTIVE = 1; + function onTick() { + fastNow += TICK_MS; + let idx = 0; + let len = fastTimers.length; + while (idx < len) { + const timer = fastTimers[idx]; + if (timer._state === PENDING) { + timer._idleStart = fastNow - TICK_MS; + timer._state = ACTIVE; + } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { + timer._state = TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + if (timer._state === TO_BE_CLEARED) { + timer._state = NOT_IN_LIST; + if (--len !== 0) { + fastTimers[idx] = fastTimers[len]; + } + } else { + ++idx; + } + } + fastTimers.length = len; + if (fastTimers.length !== 0) { + refreshTimeout(); + } + } + function refreshTimeout() { + if (fastNowTimeout?.refresh) { + fastNowTimeout.refresh(); + } else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + fastNowTimeout?.unref(); + } + } + var FastTimer = class { + [kFastTimer] = true; + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ + _state = NOT_IN_LIST; + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ + _idleTimeout = -1; + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ + _idleStart = -1; + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ + _onTimeout; + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ + _timerArg; + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ + constructor(callback, delay, arg) { + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + this.refresh(); + } + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ + refresh() { + if (this._state === NOT_IN_LIST) { + fastTimers.push(this); + } + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout(); + } + this._state = PENDING; + } + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ + clear() { + this._state = TO_BE_CLEARED; + this._idleStart = -1; + } + }; + module2.exports = { + /** + * The setTimeout() method sets a timer which executes a function once the + * timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {NodeJS.Timeout|FastTimer} + */ + setTimeout(callback, delay, arg) { + return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated Timer previously created + * by calling setTimeout. + * + * @param {NodeJS.Timeout|FastTimer} timeout + */ + clearTimeout(timeout) { + if (timeout[kFastTimer]) { + timeout.clear(); + } else { + clearTimeout(timeout); + } + }, + /** + * The setFastTimeout() method sets a fastTimer which executes a function once + * the timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {FastTimer} + */ + setFastTimeout(callback, delay, arg) { + return new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated FastTimer previously + * created by calling setFastTimeout. + * + * @param {FastTimer} timeout + */ + clearFastTimeout(timeout) { + timeout.clear(); + }, + /** + * The now method returns the value of the internal fast timer clock. + * + * @returns {number} + */ + now() { + return fastNow; + }, + /** + * Trigger the onTick function to process the fastTimers array. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + * @param {number} [delay=0] The delay in milliseconds to add to the now value. + */ + tick(delay = 0) { + fastNow += delay - RESOLUTION_MS + 1; + onTick(); + onTick(); + }, + /** + * Reset FastTimers. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + reset() { + fastNow = 0; + fastTimers.length = 0; + clearTimeout(fastNowTimeout); + fastNowTimeout = null; + }, + /** + * Exporting for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + kFastTimer + }; + } +}); + +// node_modules/undici/lib/core/errors.js +var require_errors5 = __commonJS({ + "node_modules/undici/lib/core/errors.js"(exports2, module2) { + "use strict"; + var UndiciError = class extends Error { + constructor(message, options) { + super(message, options); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + }; + var ConnectTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; + } + }; + var HeadersTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + }; + var HeadersOverflowError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + }; + var BodyTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + }; + var ResponseStatusCodeError = class extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + }; + var InvalidArgumentError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + }; + var InvalidReturnValueError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + }; + var AbortError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; + } + }; + var RequestAbortedError = class extends AbortError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + }; + var InformationalError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + }; + var RequestContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + }; + var ResponseContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + }; + var ClientDestroyedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + }; + var ClientClosedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + }; + var SocketError = class extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + }; + var NotSupportedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + }; + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + }; + var HTTPParserError = class extends Error { + constructor(message, code, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; + } + }; + var ResponseExceededMaxSizeError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + }; + var RequestRetryError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + }; + var ResponseError = class extends UndiciError { + constructor(message, code, { headers, body }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code; + this.body = body; + this.headers = headers; + } + }; + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options = {}) { + super(message, { cause, ...options }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; + } + }; + module2.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError + }; + } +}); + +// node_modules/undici/lib/core/constants.js +var require_constants3 = __commonJS({ + "node_modules/undici/lib/core/constants.js"(exports2, module2) { + "use strict"; + var wellknownHeaderNames = ( + /** @type {const} */ + [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ] + ); + var headerNameLowerCasedRecord = {}; + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + var wellknownHeaderNameBuffers = {}; + Object.setPrototypeOf(wellknownHeaderNameBuffers, null); + function getHeaderNameAsBuffer(header) { + let buffer = wellknownHeaderNameBuffers[header]; + if (buffer === void 0) { + buffer = Buffer.from(header); + } + return buffer; + } + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + module2.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord, + getHeaderNameAsBuffer + }; + } +}); + +// node_modules/undici/lib/core/tree.js +var require_tree = __commonJS({ + "node_modules/undici/lib/core/tree.js"(exports2, module2) { + "use strict"; + var { + wellknownHeaderNames, + headerNameLowerCasedRecord + } = require_constants3(); + var TstNode = class _TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === void 0 || index >= key.length) { + throw new TypeError("Unreachable"); + } + const code = this.code = key.charCodeAt(index); + if (code > 127) { + throw new TypeError("key must be ascii string"); + } + if (key.length !== ++index) { + this.middle = new _TstNode(key, value, index); + } else { + this.value = value; + } + } + /** + * @param {string} key + * @param {any} value + * @returns {void} + */ + add(key, value) { + const length = key.length; + if (length === 0) { + throw new TypeError("Unreachable"); + } + let index = 0; + let node = this; + while (true) { + const code = key.charCodeAt(index); + if (code > 127) { + throw new TypeError("key must be ascii string"); + } + if (node.code === code) { + if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) { + node = node.middle; + } else { + node.middle = new _TstNode(key, value, index); + break; + } + } else if (node.code < code) { + if (node.left !== null) { + node = node.left; + } else { + node.left = new _TstNode(key, value, index); + break; + } + } else if (node.right !== null) { + node = node.right; + } else { + node.right = new _TstNode(key, value, index); + break; + } + } + } + /** + * @param {Uint8Array} key + * @returns {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code = key[index]; + if (code <= 90 && code >= 65) { + code |= 32; + } + while (node !== null) { + if (code === node.code) { + if (keylength === ++index) { + return node; + } + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; + } + } + return null; + } + }; + var TernarySearchTree = class { + /** @type {TstNode | null} */ + node = null; + /** + * @param {string} key + * @param {any} value + * @returns {void} + * */ + insert(key, value) { + if (this.node === null) { + this.node = new TstNode(key, value, 0); + } else { + this.node.add(key, value); + } + } + /** + * @param {Uint8Array} key + * @returns {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + var tree = new TernarySearchTree(); + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); + } + module2.exports = { + TernarySearchTree, + tree + }; + } +}); + +// node_modules/undici/lib/core/util.js +var require_util4 = __commonJS({ + "node_modules/undici/lib/core/util.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols4(); + var { IncomingMessage } = require("node:http"); + var stream = require("node:stream"); + var net = require("node:net"); + var { stringify } = require("node:querystring"); + var { EventEmitter: EE } = require("node:events"); + var timers = require_timers(); + var { InvalidArgumentError, ConnectTimeoutError } = require_errors5(); + var { headerNameLowerCasedRecord } = require_constants3(); + var { tree } = require_tree(); + var [nodeMajor, nodeMinor] = process.versions.node.split(".", 2).map((v) => Number(v)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + function noop() { + } + function wrapRequestBody(body) { + if (isStream(body)) { + if (bodyLength(body) === 0) { + body.on("data", function() { + assert(false); + }); + } + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === "function") { + return new BodyAsyncIterable(body); + } else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) { + return new BodyAsyncIterable(body); + } else { + return body; + } + } + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike(object) { + if (object === null) { + return false; + } else if (object instanceof Blob) { + return true; + } else if (typeof object !== "object") { + return false; + } else { + const sTag = object[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); + } + } + function pathHasQueryOrFragment(url) { + return url.includes("?") || url.includes("#"); + } + function serializePathWithQuery(url, queryParams) { + if (pathHasQueryOrFragment(url)) { + throw new Error('Query params cannot be passed when url already contains "?" or "#".'); + } + const stringified = stringify(queryParams); + if (stringified) { + url += "?" + stringified; + } + return url; + } + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } + function isHttpOrHttpsPrefixed(value) { + return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + return url; + } + if (!url || typeof url !== "object") { + throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + } + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) { + throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + } + if (url.path != null && typeof url.path !== "string") { + throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + } + if (url.pathname != null && typeof url.pathname !== "string") { + throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + } + if (url.hostname != null && typeof url.hostname !== "string") { + throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + } + if (url.origin != null && typeof url.origin !== "string") { + throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; + let path7 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin[origin.length - 1] === "/") { + origin = origin.slice(0, origin.length - 1); + } + if (path7 && path7[0] !== "/") { + path7 = `/${path7}`; + } + return new URL(`${origin}${path7}`); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + return url; + } + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) { + throw new InvalidArgumentError("invalid url"); + } + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx2 = host.indexOf("]"); + assert(idx2 !== -1); + return host.substring(1, idx2); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) { + return null; + } + assert(typeof host === "string"); + const servername = getHostname(host); + if (net.isIP(servername)) { + return ""; + } + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) { + return 0; + } else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) { + return body.size != null ? body.size : null; + } else if (isBuffer(body)) { + return body.byteLength; + } + return null; + } + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); + } + function destroy(stream2, err) { + if (stream2 == null || !isStream(stream2) || isDestroyed(stream2)) { + return; + } + if (typeof stream2.destroy === "function") { + if (Object.getPrototypeOf(stream2).constructor === IncomingMessage) { + stream2.socket = null; + } + stream2.destroy(err); + } else if (err) { + queueMicrotask(() => { + stream2.emit("error", err); + }); + } + if (stream2.destroyed !== true) { + stream2[kDestroyed] = true; + } + } + var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val = obj[key]; + if (val) { + if (typeof val === "string") { + val = [val]; + obj[key] = val; + } + val.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") { + obj[key] = headersValue; + } else { + obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); + } + } + } + if ("content-length" in obj && "content-disposition" in obj) { + obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + } + return obj; + } + function parseRawHeaders(headers) { + const headersLength = headers.length; + const ret = new Array(headersLength); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + for (let n = 0; n < headersLength; n += 2) { + key = headers[n]; + val = headers[n + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("utf8")); + kLen = key.length; + if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) { + hasContentLength = true; + } else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { + contentDispositionIdx = n + 1; + } + ret[n] = key; + ret[n + 1] = val; + } + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + } + return ret; + } + function encodeRawHeaders(headers) { + if (!Array.isArray(headers)) { + throw new TypeError("expected headers to be an array"); + } + return headers.map((x) => Buffer.from(x)); + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function assertRequestHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") { + throw new InvalidArgumentError("handler must be an object"); + } + if (typeof handler.onRequestStart === "function") { + return; + } + if (typeof handler.onConnect !== "function") { + throw new InvalidArgumentError("invalid onConnect method"); + } + if (typeof handler.onError !== "function") { + throw new InvalidArgumentError("invalid onError method"); + } + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) { + throw new InvalidArgumentError("invalid onBodySent method"); + } + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") { + throw new InvalidArgumentError("invalid onUpgrade method"); + } + } else { + if (typeof handler.onHeaders !== "function") { + throw new InvalidArgumentError("invalid onHeaders method"); + } + if (typeof handler.onData !== "function") { + throw new InvalidArgumentError("invalid onData method"); + } + if (typeof handler.onComplete !== "function") { + throw new InvalidArgumentError("invalid onComplete method"); + } + } + } + function isDisturbed(body) { + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream( + { + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + pull(controller) { + async function pull() { + const { done, value } = await iterator.next(); + if (done) { + queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) { + controller.enqueue(new Uint8Array(buf)); + } else { + return await pull(); + } + } + } + return pull(); + }, + async cancel() { + await iterator.return(); + }, + type: "bytes" + } + ); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.once("abort", listener); + return () => signal.removeListener("abort", listener); + } + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: + return false; + default: + return c >= 33 && c <= 126; + } + } + function isValidHTTPToken(characters) { + if (characters.length === 0) { + return false; + } + for (let i = 0; i < characters.length; ++i) { + if (!isTokenCharCode(characters.charCodeAt(i))) { + return false; + } + } + return true; + } + var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); + } + var rangeHeaderRegex = /^bytes (\d+)-(\d+)\/(\d+)?$/; + function parseRangeHeader(range) { + if (range == null || range === "") return { start: 0, end: null, size: null }; + const m = range ? range.match(rangeHeaderRegex) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + function addListener(obj, name, listener) { + const listeners = obj[kListeners] ??= []; + listeners.push([name, listener]); + obj.on(name, listener); + return obj; + } + function removeAllListeners(obj) { + if (obj[kListeners] != null) { + for (const [name, listener] of obj[kListeners]) { + obj.removeListener(name, listener); + } + obj[kListeners] = null; + } + return obj; + } + function errorRequest(client, request, err) { + try { + request.onError(err); + assert(request.aborted); + } catch (err2) { + client.emit("error", err2); + } + } + var setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { + if (!opts.timeout) { + return noop; + } + let s1 = null; + let s2 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; + } : (socketWeakRef, opts) => { + if (!opts.timeout) { + return noop; + } + let s1 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + function onConnectTimeout(socket, opts) { + if (socket == null) { + return; + } + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { + message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + } else { + message += ` (attempted address: ${opts.hostname}:${opts.port},`; + } + message += ` timeout: ${opts.timeout}ms)`; + destroy(socket, new ConnectTimeoutError(message)); + } + var kEnumerableProperty = /* @__PURE__ */ Object.create(null); + kEnumerableProperty.enumerable = true; + var normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + var normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module2.exports = { + kEnumerableProperty, + isDisturbed, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + encodeRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + assertRequestHandler, + getSocketInfo, + isFormDataLike, + pathHasQueryOrFragment, + serializePathWithQuery, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: Object.freeze(["GET", "HEAD", "OPTIONS", "TRACE"]), + wrapRequestBody, + setupConnectTimeout + }; + } +}); + +// node_modules/undici/lib/util/stats.js +var require_stats = __commonJS({ + "node_modules/undici/lib/util/stats.js"(exports2, module2) { + "use strict"; + var { + kConnected, + kPending, + kRunning, + kSize, + kFree, + kQueued + } = require_symbols4(); + var ClientStats = class { + constructor(client) { + this.connected = client[kConnected]; + this.pending = client[kPending]; + this.running = client[kRunning]; + this.size = client[kSize]; + } + }; + var PoolStats = class { + constructor(pool) { + this.connected = pool[kConnected]; + this.free = pool[kFree]; + this.pending = pool[kPending]; + this.queued = pool[kQueued]; + this.running = pool[kRunning]; + this.size = pool[kSize]; + } + }; + module2.exports = { ClientStats, PoolStats }; + } +}); + +// node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = __commonJS({ + "node_modules/undici/lib/core/diagnostics.js"(exports2, module2) { + "use strict"; + var diagnosticsChannel = require("node:diagnostics_channel"); + var util = require("node:util"); + var undiciDebugLog = util.debuglog("undici"); + var fetchDebuglog = util.debuglog("fetch"); + var websocketDebuglog = util.debuglog("websocket"); + var channels = { + // Client + beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + // Request + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + bodyChunkSent: diagnosticsChannel.channel("undici:request:bodyChunkSent"), + bodyChunkReceived: diagnosticsChannel.channel("undici:request:bodyChunkReceived"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + // WebSocket + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong") + }; + var isTrackingClientEvents = false; + function trackClientEvents(debugLog = undiciDebugLog) { + if (isTrackingClientEvents) { + return; + } + isTrackingClientEvents = true; + diagnosticsChannel.subscribe( + "undici:client:beforeConnect", + (evt) => { + const { + connectParams: { version: version2, protocol, port, host } + } = evt; + debugLog( + "connecting to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version2 + ); + } + ); + diagnosticsChannel.subscribe( + "undici:client:connected", + (evt) => { + const { + connectParams: { version: version2, protocol, port, host } + } = evt; + debugLog( + "connected to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version2 + ); + } + ); + diagnosticsChannel.subscribe( + "undici:client:connectError", + (evt) => { + const { + connectParams: { version: version2, protocol, port, host }, + error + } = evt; + debugLog( + "connection to %s%s using %s%s errored - %s", + host, + port ? `:${port}` : "", + protocol, + version2, + error.message + ); + } + ); + diagnosticsChannel.subscribe( + "undici:client:sendHeaders", + (evt) => { + const { + request: { method, path: path7, origin } + } = evt; + debugLog("sending request to %s %s%s", method, origin, path7); + } + ); + } + var isTrackingRequestEvents = false; + function trackRequestEvents(debugLog = undiciDebugLog) { + if (isTrackingRequestEvents) { + return; + } + isTrackingRequestEvents = true; + diagnosticsChannel.subscribe( + "undici:request:headers", + (evt) => { + const { + request: { method, path: path7, origin }, + response: { statusCode } + } = evt; + debugLog( + "received response to %s %s%s - HTTP %d", + method, + origin, + path7, + statusCode + ); + } + ); + diagnosticsChannel.subscribe( + "undici:request:trailers", + (evt) => { + const { + request: { method, path: path7, origin } + } = evt; + debugLog("trailers received from %s %s%s", method, origin, path7); + } + ); + diagnosticsChannel.subscribe( + "undici:request:error", + (evt) => { + const { + request: { method, path: path7, origin }, + error + } = evt; + debugLog( + "request to %s %s%s errored - %s", + method, + origin, + path7, + error.message + ); + } + ); + } + var isTrackingWebSocketEvents = false; + function trackWebSocketEvents(debugLog = websocketDebuglog) { + if (isTrackingWebSocketEvents) { + return; + } + isTrackingWebSocketEvents = true; + diagnosticsChannel.subscribe( + "undici:websocket:open", + (evt) => { + const { + address: { address, port } + } = evt; + debugLog("connection opened %s%s", address, port ? `:${port}` : ""); + } + ); + diagnosticsChannel.subscribe( + "undici:websocket:close", + (evt) => { + const { websocket, code, reason } = evt; + debugLog( + "closed connection to %s - %s %s", + websocket.url, + code, + reason + ); + } + ); + diagnosticsChannel.subscribe( + "undici:websocket:socket_error", + (err) => { + debugLog("connection errored - %s", err.message); + } + ); + diagnosticsChannel.subscribe( + "undici:websocket:ping", + (evt) => { + debugLog("ping received"); + } + ); + diagnosticsChannel.subscribe( + "undici:websocket:pong", + (evt) => { + debugLog("pong received"); + } + ); + } + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + trackClientEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog); + trackRequestEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog); + } + if (websocketDebuglog.enabled) { + trackClientEvents(undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog); + trackWebSocketEvents(websocketDebuglog); + } + module2.exports = { + channels + }; + } +}); + +// node_modules/undici/lib/core/request.js +var require_request3 = __commonJS({ + "node_modules/undici/lib/core/request.js"(exports2, module2) { + "use strict"; + var { + InvalidArgumentError, + NotSupportedError + } = require_errors5(); + var assert = require("node:assert"); + var { + isValidHTTPToken, + isValidHeaderValue, + isStream, + destroy, + isBuffer, + isFormDataLike, + isIterable, + isBlobLike, + serializePathWithQuery, + assertRequestHandler, + getServerName, + normalizedMethodRecords + } = require_util4(); + var { channels } = require_diagnostics(); + var { headerNameLowerCasedRecord } = require_constants3(); + var invalidPathRegex = /[^\u0021-\u00ff]/; + var kHandler = Symbol("handler"); + var Request = class { + constructor(origin, { + path: path7, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset, + expectContinue, + servername, + throwOnError, + maxRedirections + }, handler) { + if (typeof path7 !== "string") { + throw new InvalidArgumentError("path must be a string"); + } else if (path7[0] !== "/" && !(path7.startsWith("http://") || path7.startsWith("https://")) && method !== "CONNECT") { + throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + } else if (invalidPathRegex.test(path7)) { + throw new InvalidArgumentError("invalid request path"); + } + if (typeof method !== "string") { + throw new InvalidArgumentError("method must be a string"); + } else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) { + throw new InvalidArgumentError("invalid request method"); + } + if (upgrade && typeof upgrade !== "string") { + throw new InvalidArgumentError("upgrade must be a string"); + } + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError("invalid headersTimeout"); + } + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError("invalid bodyTimeout"); + } + if (reset != null && typeof reset !== "boolean") { + throw new InvalidArgumentError("invalid reset"); + } + if (expectContinue != null && typeof expectContinue !== "boolean") { + throw new InvalidArgumentError("invalid expectContinue"); + } + if (throwOnError != null) { + throw new InvalidArgumentError("invalid throwOnError"); + } + if (maxRedirections != null && maxRedirections !== 0) { + throw new InvalidArgumentError("maxRedirections is not supported, use the redirect interceptor"); + } + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.method = method; + this.abort = null; + if (body == null) { + this.body = null; + } else if (isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) { + this.abort(err); + } else { + this.error = err; + } + }; + this.body.on("error", this.errorHandler); + } else if (isBuffer(body)) { + this.body = body.byteLength ? body : null; + } else if (ArrayBuffer.isView(body)) { + this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + } else if (body instanceof ArrayBuffer) { + this.body = body.byteLength ? Buffer.from(body) : null; + } else if (typeof body === "string") { + this.body = body.length ? Buffer.from(body) : null; + } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { + this.body = body; + } else { + throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + } + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? serializePathWithQuery(path7, query) : path7; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking ?? this.method !== "HEAD"; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError("headers array must be even"); + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(this, headers[i], headers[i + 1]); + } + } else if (headers && typeof headers === "object") { + if (headers[Symbol.iterator]) { + for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) { + throw new InvalidArgumentError("headers must be in key-value pair format"); + } + processHeader(this, header[0], header[1]); + } + } else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) { + processHeader(this, keys[i], headers[keys[i]]); + } + } + } else if (headers != null) { + throw new InvalidArgumentError("headers must be an object or an array"); + } + assertRequestHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host) || null; + this[kHandler] = handler; + if (channels.create.hasSubscribers) { + channels.create.publish({ request: this }); + } + } + onBodySent(chunk) { + if (channels.bodyChunkSent.hasSubscribers) { + channels.bodyChunkSent.publish({ request: this, chunk }); + } + if (this[kHandler].onBodySent) { + try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) { + channels.bodySent.publish({ request: this }); + } + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + } + onConnect(abort) { + assert(!this.aborted); + assert(!this.completed); + if (this.error) { + abort(this.error); + } else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); + } + onHeaders(statusCode, headers, resume, statusText) { + assert(!this.aborted); + assert(!this.completed); + if (channels.headers.hasSubscribers) { + channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); + } + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + assert(!this.aborted); + assert(!this.completed); + if (channels.bodyChunkReceived.hasSubscribers) { + channels.bodyChunkReceived.publish({ request: this, chunk }); + } + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert(!this.aborted); + assert(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert(!this.aborted); + assert(!this.completed); + this.completed = true; + if (channels.trailers.hasSubscribers) { + channels.trailers.publish({ request: this, trailers }); + } + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) { + channels.error.publish({ request: this, error }); + } + if (this.aborted) { + return; + } + this.aborted = true; + return this[kHandler].onError(error); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + }; + function processHeader(request, key, val) { + if (val && (typeof val === "object" && !Array.isArray(val))) { + throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === void 0) { + return; + } + let headerName = headerNameLowerCasedRecord[key]; + if (headerName === void 0) { + headerName = key.toLowerCase(); + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) { + throw new InvalidArgumentError("invalid header key"); + } + } + if (Array.isArray(val)) { + const arr = []; + for (let i = 0; i < val.length; i++) { + if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + arr.push(val[i]); + } else if (val[i] === null) { + arr.push(""); + } else if (typeof val[i] === "object") { + throw new InvalidArgumentError(`invalid ${key} header`); + } else { + arr.push(`${val[i]}`); + } + } + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + } else if (val === null) { + val = ""; + } else { + val = `${val}`; + } + if (request.host === null && headerName === "host") { + if (typeof val !== "string") { + throw new InvalidArgumentError("invalid host header"); + } + request.host = val; + } else if (request.contentLength === null && headerName === "content-length") { + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) { + throw new InvalidArgumentError("invalid content-length header"); + } + } else if (request.contentType === null && headerName === "content-type") { + request.contentType = val; + request.headers.push(key, val); + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") { + throw new InvalidArgumentError(`invalid ${headerName} header`); + } else if (headerName === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") { + throw new InvalidArgumentError("invalid connection header"); + } + if (value === "close") { + request.reset = true; + } + } else if (headerName === "expect") { + throw new NotSupportedError("expect header not supported"); + } else { + request.headers.push(key, val); + } + } + module2.exports = Request; + } +}); + +// node_modules/undici/lib/handler/wrap-handler.js +var require_wrap_handler = __commonJS({ + "node_modules/undici/lib/handler/wrap-handler.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError } = require_errors5(); + module2.exports = class WrapHandler { + #handler; + constructor(handler) { + this.#handler = handler; + } + static wrap(handler) { + return handler.onRequestStart ? handler : new WrapHandler(handler); + } + // Unwrap Interface + onConnect(abort, context) { + return this.#handler.onConnect?.(abort, context); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage); + } + onUpgrade(statusCode, rawHeaders, socket) { + return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket); + } + onData(data) { + return this.#handler.onData?.(data); + } + onComplete(trailers) { + return this.#handler.onComplete?.(trailers); + } + onError(err) { + if (!this.#handler.onError) { + throw err; + } + return this.#handler.onError?.(err); + } + // Wrap Interface + onRequestStart(controller, context) { + this.#handler.onConnect?.((reason) => controller.abort(reason), context); + } + onRequestUpgrade(controller, statusCode, headers, socket) { + const rawHeaders = []; + for (const [key, val] of Object.entries(headers)) { + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); + } + this.#handler.onUpgrade?.(statusCode, rawHeaders, socket); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + const rawHeaders = []; + for (const [key, val] of Object.entries(headers)) { + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); + } + if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) { + controller.pause(); + } + } + onResponseData(controller, data) { + if (this.#handler.onData?.(data) === false) { + controller.pause(); + } + } + onResponseEnd(controller, trailers) { + const rawTrailers = []; + for (const [key, val] of Object.entries(trailers)) { + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); + } + this.#handler.onComplete?.(rawTrailers); + } + onResponseError(controller, err) { + if (!this.#handler.onError) { + throw new InvalidArgumentError("invalid onError method"); + } + this.#handler.onError?.(err); + } + }; + } +}); + +// node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher = __commonJS({ + "node_modules/undici/lib/dispatcher/dispatcher.js"(exports2, module2) { + "use strict"; + var EventEmitter = require("node:events"); + var WrapHandler = require_wrap_handler(); + var wrapInterceptor = (dispatch) => (opts, handler) => dispatch(opts, WrapHandler.wrap(handler)); + var Dispatcher = class extends EventEmitter { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + compose(...args) { + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors) { + if (interceptor == null) { + continue; + } + if (typeof interceptor !== "function") { + throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + } + dispatch = interceptor(dispatch); + dispatch = wrapInterceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) { + throw new TypeError("invalid interceptor"); + } + } + return new Proxy(this, { + get: (target, key) => key === "dispatch" ? dispatch : target[key] + }); + } + }; + module2.exports = Dispatcher; + } +}); + +// node_modules/undici/lib/handler/unwrap-handler.js +var require_unwrap_handler = __commonJS({ + "node_modules/undici/lib/handler/unwrap-handler.js"(exports2, module2) { + "use strict"; + var { parseHeaders } = require_util4(); + var { InvalidArgumentError } = require_errors5(); + var kResume = Symbol("resume"); + var UnwrapController = class { + #paused = false; + #reason = null; + #aborted = false; + #abort; + [kResume] = null; + constructor(abort) { + this.#abort = abort; + } + pause() { + this.#paused = true; + } + resume() { + if (this.#paused) { + this.#paused = false; + this[kResume]?.(); + } + } + abort(reason) { + if (!this.#aborted) { + this.#aborted = true; + this.#reason = reason; + this.#abort(reason); + } + } + get aborted() { + return this.#aborted; + } + get reason() { + return this.#reason; + } + get paused() { + return this.#paused; + } + }; + module2.exports = class UnwrapHandler { + #handler; + #controller; + constructor(handler) { + this.#handler = handler; + } + static unwrap(handler) { + return !handler.onRequestStart ? handler : new UnwrapHandler(handler); + } + onConnect(abort, context) { + this.#controller = new UnwrapController(abort); + this.#handler.onRequestStart?.(this.#controller, context); + } + onUpgrade(statusCode, rawHeaders, socket) { + this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + this.#controller[kResume] = resume; + this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage); + return !this.#controller.paused; + } + onData(data) { + this.#handler.onResponseData?.(this.#controller, data); + return !this.#controller.paused; + } + onComplete(rawTrailers) { + this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers)); + } + onError(err) { + if (!this.#handler.onResponseError) { + throw new InvalidArgumentError("invalid onError method"); + } + this.#handler.onResponseError?.(this.#controller, err); + } + }; + } +}); + +// node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base = __commonJS({ + "node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports2, module2) { + "use strict"; + var Dispatcher = require_dispatcher(); + var UnwrapHandler = require_unwrap_handler(); + var { + ClientDestroyedError, + ClientClosedError, + InvalidArgumentError + } = require_errors5(); + var { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = require_symbols4(); + var kOnDestroyed = Symbol("onDestroyed"); + var kOnClosed = Symbol("onClosed"); + var DispatcherBase = class extends Dispatcher { + constructor() { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + close(callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) { + this[kOnClosed].push(callback); + } else { + queueMicrotask(() => callback(null, null)); + } + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null); + } + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) { + return new Promise((resolve, reject) => { + this.destroy(err, (err2, data) => { + return err2 ? ( + /* istanbul ignore next: should never error */ + reject(err2) + ) : resolve(data); + }); + }); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (this[kDestroyed]) { + if (this[kOnDestroyed]) { + this[kOnDestroyed].push(callback); + } else { + queueMicrotask(() => callback(null, null)); + } + return; + } + if (!err) { + err = new ClientDestroyedError(); + } + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null); + } + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") { + throw new InvalidArgumentError("handler must be an object"); + } + handler = UnwrapHandler.unwrap(handler); + try { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("opts must be an object."); + } + if (this[kDestroyed] || this[kOnDestroyed]) { + throw new ClientDestroyedError(); + } + if (this[kClosed]) { + throw new ClientClosedError(); + } + return this[kDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") { + throw err; + } + handler.onError(err); + return false; + } + } + }; + module2.exports = DispatcherBase; + } +}); + +// node_modules/undici/lib/core/connect.js +var require_connect = __commonJS({ + "node_modules/undici/lib/core/connect.js"(exports2, module2) { + "use strict"; + var net = require("node:net"); + var assert = require("node:assert"); + var util = require_util4(); + var { InvalidArgumentError } = require_errors5(); + var tls; + var SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { + return; + } + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) { + this._sessionCache.delete(key); + } + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) { + return; + } + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { + throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); + } + const options = { path: socketPath, ...opts }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) { + tls = require("node:tls"); + } + servername = servername || options.servername || util.getServerName(host) || null; + const sessionKey = servername || hostname; + assert(sessionKey); + const session = customSession || sessionCache.get(sessionKey) || null; + port = port || 443; + socket = tls.connect({ + highWaterMark: 16384, + // TLS in node can't have bigger HWM anyway... + ...options, + servername, + session, + localAddress, + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + // upgrade socket connection + port, + host: hostname + }); + socket.on("session", function(session2) { + sessionCache.set(sessionKey, session2); + }); + } else { + assert(!httpSocket, "httpSocket can only be sent on TLS update"); + port = port || 80; + socket = net.connect({ + highWaterMark: 64 * 1024, + // Same as nodejs fs streams. + ...options, + localAddress, + port, + host: hostname + }); + } + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = util.setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + module2.exports = buildConnector; + } +}); + +// node_modules/undici/lib/llhttp/utils.js +var require_utils2 = __commonJS({ + "node_modules/undici/lib/llhttp/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.enumToMap = enumToMap; + function enumToMap(obj, filter = [], exceptions = []) { + const emptyFilter = (filter?.length ?? 0) === 0; + const emptyExceptions = (exceptions?.length ?? 0) === 0; + return Object.fromEntries(Object.entries(obj).filter(([, value]) => { + return typeof value === "number" && (emptyFilter || filter.includes(value)) && (emptyExceptions || !exceptions.includes(value)); + })); + } + } +}); + +// node_modules/undici/lib/llhttp/constants.js +var require_constants4 = __commonJS({ + "node_modules/undici/lib/llhttp/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SPECIAL_HEADERS = exports2.MINOR = exports2.MAJOR = exports2.HTAB_SP_VCHAR_OBS_TEXT = exports2.QUOTED_STRING = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.STATUSES_HTTP = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.HEADER_STATE = exports2.FINISH = exports2.STATUSES = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; + var utils_1 = require_utils2(); + exports2.ERROR = { + OK: 0, + INTERNAL: 1, + STRICT: 2, + CR_EXPECTED: 25, + LF_EXPECTED: 3, + UNEXPECTED_CONTENT_LENGTH: 4, + UNEXPECTED_SPACE: 30, + CLOSED_CONNECTION: 5, + INVALID_METHOD: 6, + INVALID_URL: 7, + INVALID_CONSTANT: 8, + INVALID_VERSION: 9, + INVALID_HEADER_TOKEN: 10, + INVALID_CONTENT_LENGTH: 11, + INVALID_CHUNK_SIZE: 12, + INVALID_STATUS: 13, + INVALID_EOF_STATE: 14, + INVALID_TRANSFER_ENCODING: 15, + CB_MESSAGE_BEGIN: 16, + CB_HEADERS_COMPLETE: 17, + CB_MESSAGE_COMPLETE: 18, + CB_CHUNK_HEADER: 19, + CB_CHUNK_COMPLETE: 20, + PAUSED: 21, + PAUSED_UPGRADE: 22, + PAUSED_H2_UPGRADE: 23, + USER: 24, + CB_URL_COMPLETE: 26, + CB_STATUS_COMPLETE: 27, + CB_METHOD_COMPLETE: 32, + CB_VERSION_COMPLETE: 33, + CB_HEADER_FIELD_COMPLETE: 28, + CB_HEADER_VALUE_COMPLETE: 29, + CB_CHUNK_EXTENSION_NAME_COMPLETE: 34, + CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35, + CB_RESET: 31, + CB_PROTOCOL_COMPLETE: 38 + }; + exports2.TYPE = { + BOTH: 0, + // default + REQUEST: 1, + RESPONSE: 2 + }; + exports2.FLAGS = { + CONNECTION_KEEP_ALIVE: 1 << 0, + CONNECTION_CLOSE: 1 << 1, + CONNECTION_UPGRADE: 1 << 2, + CHUNKED: 1 << 3, + UPGRADE: 1 << 4, + CONTENT_LENGTH: 1 << 5, + SKIPBODY: 1 << 6, + TRAILING: 1 << 7, + // 1 << 8 is unused + TRANSFER_ENCODING: 1 << 9 + }; + exports2.LENIENT_FLAGS = { + HEADERS: 1 << 0, + CHUNKED_LENGTH: 1 << 1, + KEEP_ALIVE: 1 << 2, + TRANSFER_ENCODING: 1 << 3, + VERSION: 1 << 4, + DATA_AFTER_CLOSE: 1 << 5, + OPTIONAL_LF_AFTER_CR: 1 << 6, + OPTIONAL_CRLF_AFTER_CHUNK: 1 << 7, + OPTIONAL_CR_BEFORE_LF: 1 << 8, + SPACES_AFTER_CHUNK_SIZE: 1 << 9 + }; + exports2.METHODS = { + "DELETE": 0, + "GET": 1, + "HEAD": 2, + "POST": 3, + "PUT": 4, + /* pathological */ + "CONNECT": 5, + "OPTIONS": 6, + "TRACE": 7, + /* WebDAV */ + "COPY": 8, + "LOCK": 9, + "MKCOL": 10, + "MOVE": 11, + "PROPFIND": 12, + "PROPPATCH": 13, + "SEARCH": 14, + "UNLOCK": 15, + "BIND": 16, + "REBIND": 17, + "UNBIND": 18, + "ACL": 19, + /* subversion */ + "REPORT": 20, + "MKACTIVITY": 21, + "CHECKOUT": 22, + "MERGE": 23, + /* upnp */ + "M-SEARCH": 24, + "NOTIFY": 25, + "SUBSCRIBE": 26, + "UNSUBSCRIBE": 27, + /* RFC-5789 */ + "PATCH": 28, + "PURGE": 29, + /* CalDAV */ + "MKCALENDAR": 30, + /* RFC-2068, section 19.6.1.2 */ + "LINK": 31, + "UNLINK": 32, + /* icecast */ + "SOURCE": 33, + /* RFC-7540, section 11.6 */ + "PRI": 34, + /* RFC-2326 RTSP */ + "DESCRIBE": 35, + "ANNOUNCE": 36, + "SETUP": 37, + "PLAY": 38, + "PAUSE": 39, + "TEARDOWN": 40, + "GET_PARAMETER": 41, + "SET_PARAMETER": 42, + "REDIRECT": 43, + "RECORD": 44, + /* RAOP */ + "FLUSH": 45, + /* DRAFT https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.html */ + "QUERY": 46 + }; + exports2.STATUSES = { + CONTINUE: 100, + SWITCHING_PROTOCOLS: 101, + PROCESSING: 102, + EARLY_HINTS: 103, + RESPONSE_IS_STALE: 110, + // Unofficial + REVALIDATION_FAILED: 111, + // Unofficial + DISCONNECTED_OPERATION: 112, + // Unofficial + HEURISTIC_EXPIRATION: 113, + // Unofficial + MISCELLANEOUS_WARNING: 199, + // Unofficial + OK: 200, + CREATED: 201, + ACCEPTED: 202, + NON_AUTHORITATIVE_INFORMATION: 203, + NO_CONTENT: 204, + RESET_CONTENT: 205, + PARTIAL_CONTENT: 206, + MULTI_STATUS: 207, + ALREADY_REPORTED: 208, + TRANSFORMATION_APPLIED: 214, + // Unofficial + IM_USED: 226, + MISCELLANEOUS_PERSISTENT_WARNING: 299, + // Unofficial + MULTIPLE_CHOICES: 300, + MOVED_PERMANENTLY: 301, + FOUND: 302, + SEE_OTHER: 303, + NOT_MODIFIED: 304, + USE_PROXY: 305, + SWITCH_PROXY: 306, + // No longer used + TEMPORARY_REDIRECT: 307, + PERMANENT_REDIRECT: 308, + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + PAYMENT_REQUIRED: 402, + FORBIDDEN: 403, + NOT_FOUND: 404, + METHOD_NOT_ALLOWED: 405, + NOT_ACCEPTABLE: 406, + PROXY_AUTHENTICATION_REQUIRED: 407, + REQUEST_TIMEOUT: 408, + CONFLICT: 409, + GONE: 410, + LENGTH_REQUIRED: 411, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + URI_TOO_LONG: 414, + UNSUPPORTED_MEDIA_TYPE: 415, + RANGE_NOT_SATISFIABLE: 416, + EXPECTATION_FAILED: 417, + IM_A_TEAPOT: 418, + PAGE_EXPIRED: 419, + // Unofficial + ENHANCE_YOUR_CALM: 420, + // Unofficial + MISDIRECTED_REQUEST: 421, + UNPROCESSABLE_ENTITY: 422, + LOCKED: 423, + FAILED_DEPENDENCY: 424, + TOO_EARLY: 425, + UPGRADE_REQUIRED: 426, + PRECONDITION_REQUIRED: 428, + TOO_MANY_REQUESTS: 429, + REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430, + // Unofficial + REQUEST_HEADER_FIELDS_TOO_LARGE: 431, + LOGIN_TIMEOUT: 440, + // Unofficial + NO_RESPONSE: 444, + // Unofficial + RETRY_WITH: 449, + // Unofficial + BLOCKED_BY_PARENTAL_CONTROL: 450, + // Unofficial + UNAVAILABLE_FOR_LEGAL_REASONS: 451, + CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460, + // Unofficial + INVALID_X_FORWARDED_FOR: 463, + // Unofficial + REQUEST_HEADER_TOO_LARGE: 494, + // Unofficial + SSL_CERTIFICATE_ERROR: 495, + // Unofficial + SSL_CERTIFICATE_REQUIRED: 496, + // Unofficial + HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497, + // Unofficial + INVALID_TOKEN: 498, + // Unofficial + CLIENT_CLOSED_REQUEST: 499, + // Unofficial + INTERNAL_SERVER_ERROR: 500, + NOT_IMPLEMENTED: 501, + BAD_GATEWAY: 502, + SERVICE_UNAVAILABLE: 503, + GATEWAY_TIMEOUT: 504, + HTTP_VERSION_NOT_SUPPORTED: 505, + VARIANT_ALSO_NEGOTIATES: 506, + INSUFFICIENT_STORAGE: 507, + LOOP_DETECTED: 508, + BANDWIDTH_LIMIT_EXCEEDED: 509, + NOT_EXTENDED: 510, + NETWORK_AUTHENTICATION_REQUIRED: 511, + WEB_SERVER_UNKNOWN_ERROR: 520, + // Unofficial + WEB_SERVER_IS_DOWN: 521, + // Unofficial + CONNECTION_TIMEOUT: 522, + // Unofficial + ORIGIN_IS_UNREACHABLE: 523, + // Unofficial + TIMEOUT_OCCURED: 524, + // Unofficial + SSL_HANDSHAKE_FAILED: 525, + // Unofficial + INVALID_SSL_CERTIFICATE: 526, + // Unofficial + RAILGUN_ERROR: 527, + // Unofficial + SITE_IS_OVERLOADED: 529, + // Unofficial + SITE_IS_FROZEN: 530, + // Unofficial + IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561, + // Unofficial + NETWORK_READ_TIMEOUT: 598, + // Unofficial + NETWORK_CONNECT_TIMEOUT: 599 + // Unofficial + }; + exports2.FINISH = { + SAFE: 0, + SAFE_WITH_CB: 1, + UNSAFE: 2 + }; + exports2.HEADER_STATE = { + GENERAL: 0, + CONNECTION: 1, + CONTENT_LENGTH: 2, + TRANSFER_ENCODING: 3, + UPGRADE: 4, + CONNECTION_KEEP_ALIVE: 5, + CONNECTION_CLOSE: 6, + CONNECTION_UPGRADE: 7, + TRANSFER_ENCODING_CHUNKED: 8 + }; + exports2.METHODS_HTTP = [ + exports2.METHODS.DELETE, + exports2.METHODS.GET, + exports2.METHODS.HEAD, + exports2.METHODS.POST, + exports2.METHODS.PUT, + exports2.METHODS.CONNECT, + exports2.METHODS.OPTIONS, + exports2.METHODS.TRACE, + exports2.METHODS.COPY, + exports2.METHODS.LOCK, + exports2.METHODS.MKCOL, + exports2.METHODS.MOVE, + exports2.METHODS.PROPFIND, + exports2.METHODS.PROPPATCH, + exports2.METHODS.SEARCH, + exports2.METHODS.UNLOCK, + exports2.METHODS.BIND, + exports2.METHODS.REBIND, + exports2.METHODS.UNBIND, + exports2.METHODS.ACL, + exports2.METHODS.REPORT, + exports2.METHODS.MKACTIVITY, + exports2.METHODS.CHECKOUT, + exports2.METHODS.MERGE, + exports2.METHODS["M-SEARCH"], + exports2.METHODS.NOTIFY, + exports2.METHODS.SUBSCRIBE, + exports2.METHODS.UNSUBSCRIBE, + exports2.METHODS.PATCH, + exports2.METHODS.PURGE, + exports2.METHODS.MKCALENDAR, + exports2.METHODS.LINK, + exports2.METHODS.UNLINK, + exports2.METHODS.PRI, + // TODO(indutny): should we allow it with HTTP? + exports2.METHODS.SOURCE, + exports2.METHODS.QUERY + ]; + exports2.METHODS_ICE = [ + exports2.METHODS.SOURCE + ]; + exports2.METHODS_RTSP = [ + exports2.METHODS.OPTIONS, + exports2.METHODS.DESCRIBE, + exports2.METHODS.ANNOUNCE, + exports2.METHODS.SETUP, + exports2.METHODS.PLAY, + exports2.METHODS.PAUSE, + exports2.METHODS.TEARDOWN, + exports2.METHODS.GET_PARAMETER, + exports2.METHODS.SET_PARAMETER, + exports2.METHODS.REDIRECT, + exports2.METHODS.RECORD, + exports2.METHODS.FLUSH, + // For AirPlay + exports2.METHODS.GET, + exports2.METHODS.POST + ]; + exports2.METHOD_MAP = (0, utils_1.enumToMap)(exports2.METHODS); + exports2.H_METHOD_MAP = Object.fromEntries(Object.entries(exports2.METHODS).filter(([k]) => k.startsWith("H"))); + exports2.STATUSES_HTTP = [ + exports2.STATUSES.CONTINUE, + exports2.STATUSES.SWITCHING_PROTOCOLS, + exports2.STATUSES.PROCESSING, + exports2.STATUSES.EARLY_HINTS, + exports2.STATUSES.RESPONSE_IS_STALE, + exports2.STATUSES.REVALIDATION_FAILED, + exports2.STATUSES.DISCONNECTED_OPERATION, + exports2.STATUSES.HEURISTIC_EXPIRATION, + exports2.STATUSES.MISCELLANEOUS_WARNING, + exports2.STATUSES.OK, + exports2.STATUSES.CREATED, + exports2.STATUSES.ACCEPTED, + exports2.STATUSES.NON_AUTHORITATIVE_INFORMATION, + exports2.STATUSES.NO_CONTENT, + exports2.STATUSES.RESET_CONTENT, + exports2.STATUSES.PARTIAL_CONTENT, + exports2.STATUSES.MULTI_STATUS, + exports2.STATUSES.ALREADY_REPORTED, + exports2.STATUSES.TRANSFORMATION_APPLIED, + exports2.STATUSES.IM_USED, + exports2.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING, + exports2.STATUSES.MULTIPLE_CHOICES, + exports2.STATUSES.MOVED_PERMANENTLY, + exports2.STATUSES.FOUND, + exports2.STATUSES.SEE_OTHER, + exports2.STATUSES.NOT_MODIFIED, + exports2.STATUSES.USE_PROXY, + exports2.STATUSES.SWITCH_PROXY, + exports2.STATUSES.TEMPORARY_REDIRECT, + exports2.STATUSES.PERMANENT_REDIRECT, + exports2.STATUSES.BAD_REQUEST, + exports2.STATUSES.UNAUTHORIZED, + exports2.STATUSES.PAYMENT_REQUIRED, + exports2.STATUSES.FORBIDDEN, + exports2.STATUSES.NOT_FOUND, + exports2.STATUSES.METHOD_NOT_ALLOWED, + exports2.STATUSES.NOT_ACCEPTABLE, + exports2.STATUSES.PROXY_AUTHENTICATION_REQUIRED, + exports2.STATUSES.REQUEST_TIMEOUT, + exports2.STATUSES.CONFLICT, + exports2.STATUSES.GONE, + exports2.STATUSES.LENGTH_REQUIRED, + exports2.STATUSES.PRECONDITION_FAILED, + exports2.STATUSES.PAYLOAD_TOO_LARGE, + exports2.STATUSES.URI_TOO_LONG, + exports2.STATUSES.UNSUPPORTED_MEDIA_TYPE, + exports2.STATUSES.RANGE_NOT_SATISFIABLE, + exports2.STATUSES.EXPECTATION_FAILED, + exports2.STATUSES.IM_A_TEAPOT, + exports2.STATUSES.PAGE_EXPIRED, + exports2.STATUSES.ENHANCE_YOUR_CALM, + exports2.STATUSES.MISDIRECTED_REQUEST, + exports2.STATUSES.UNPROCESSABLE_ENTITY, + exports2.STATUSES.LOCKED, + exports2.STATUSES.FAILED_DEPENDENCY, + exports2.STATUSES.TOO_EARLY, + exports2.STATUSES.UPGRADE_REQUIRED, + exports2.STATUSES.PRECONDITION_REQUIRED, + exports2.STATUSES.TOO_MANY_REQUESTS, + exports2.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL, + exports2.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE, + exports2.STATUSES.LOGIN_TIMEOUT, + exports2.STATUSES.NO_RESPONSE, + exports2.STATUSES.RETRY_WITH, + exports2.STATUSES.BLOCKED_BY_PARENTAL_CONTROL, + exports2.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS, + exports2.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST, + exports2.STATUSES.INVALID_X_FORWARDED_FOR, + exports2.STATUSES.REQUEST_HEADER_TOO_LARGE, + exports2.STATUSES.SSL_CERTIFICATE_ERROR, + exports2.STATUSES.SSL_CERTIFICATE_REQUIRED, + exports2.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT, + exports2.STATUSES.INVALID_TOKEN, + exports2.STATUSES.CLIENT_CLOSED_REQUEST, + exports2.STATUSES.INTERNAL_SERVER_ERROR, + exports2.STATUSES.NOT_IMPLEMENTED, + exports2.STATUSES.BAD_GATEWAY, + exports2.STATUSES.SERVICE_UNAVAILABLE, + exports2.STATUSES.GATEWAY_TIMEOUT, + exports2.STATUSES.HTTP_VERSION_NOT_SUPPORTED, + exports2.STATUSES.VARIANT_ALSO_NEGOTIATES, + exports2.STATUSES.INSUFFICIENT_STORAGE, + exports2.STATUSES.LOOP_DETECTED, + exports2.STATUSES.BANDWIDTH_LIMIT_EXCEEDED, + exports2.STATUSES.NOT_EXTENDED, + exports2.STATUSES.NETWORK_AUTHENTICATION_REQUIRED, + exports2.STATUSES.WEB_SERVER_UNKNOWN_ERROR, + exports2.STATUSES.WEB_SERVER_IS_DOWN, + exports2.STATUSES.CONNECTION_TIMEOUT, + exports2.STATUSES.ORIGIN_IS_UNREACHABLE, + exports2.STATUSES.TIMEOUT_OCCURED, + exports2.STATUSES.SSL_HANDSHAKE_FAILED, + exports2.STATUSES.INVALID_SSL_CERTIFICATE, + exports2.STATUSES.RAILGUN_ERROR, + exports2.STATUSES.SITE_IS_OVERLOADED, + exports2.STATUSES.SITE_IS_FROZEN, + exports2.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR, + exports2.STATUSES.NETWORK_READ_TIMEOUT, + exports2.STATUSES.NETWORK_CONNECT_TIMEOUT + ]; + exports2.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports2.ALPHA.push(String.fromCharCode(i)); + exports2.ALPHA.push(String.fromCharCode(i + 32)); + } + exports2.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports2.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports2.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports2.ALPHANUM = exports2.ALPHA.concat(exports2.NUM); + exports2.MARK = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; + exports2.USERINFO_CHARS = exports2.ALPHANUM.concat(exports2.MARK).concat(["%", ";", ":", "&", "=", "+", "$", ","]); + exports2.URL_CHAR = [ + "!", + '"', + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports2.ALPHANUM); + exports2.HEX = exports2.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); + exports2.TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports2.ALPHANUM); + exports2.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) { + if (i !== 127) { + exports2.HEADER_CHARS.push(i); + } + } + exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c) => c !== 44); + exports2.QUOTED_STRING = [" ", " "]; + for (let i = 33; i <= 255; i++) { + if (i !== 34 && i !== 92) { + exports2.QUOTED_STRING.push(i); + } + } + exports2.HTAB_SP_VCHAR_OBS_TEXT = [" ", " "]; + for (let i = 33; i <= 126; i++) { + exports2.HTAB_SP_VCHAR_OBS_TEXT.push(i); + } + for (let i = 128; i <= 255; i++) { + exports2.HTAB_SP_VCHAR_OBS_TEXT.push(i); + } + exports2.MAJOR = exports2.NUM_MAP; + exports2.MINOR = exports2.MAJOR; + exports2.SPECIAL_HEADERS = { + "connection": exports2.HEADER_STATE.CONNECTION, + "content-length": exports2.HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": exports2.HEADER_STATE.CONNECTION, + "transfer-encoding": exports2.HEADER_STATE.TRANSFER_ENCODING, + "upgrade": exports2.HEADER_STATE.UPGRADE + }; + exports2.default = { + ERROR: exports2.ERROR, + TYPE: exports2.TYPE, + FLAGS: exports2.FLAGS, + LENIENT_FLAGS: exports2.LENIENT_FLAGS, + METHODS: exports2.METHODS, + STATUSES: exports2.STATUSES, + FINISH: exports2.FINISH, + HEADER_STATE: exports2.HEADER_STATE, + ALPHA: exports2.ALPHA, + NUM_MAP: exports2.NUM_MAP, + HEX_MAP: exports2.HEX_MAP, + NUM: exports2.NUM, + ALPHANUM: exports2.ALPHANUM, + MARK: exports2.MARK, + USERINFO_CHARS: exports2.USERINFO_CHARS, + URL_CHAR: exports2.URL_CHAR, + HEX: exports2.HEX, + TOKEN: exports2.TOKEN, + HEADER_CHARS: exports2.HEADER_CHARS, + CONNECTION_TOKEN_CHARS: exports2.CONNECTION_TOKEN_CHARS, + QUOTED_STRING: exports2.QUOTED_STRING, + HTAB_SP_VCHAR_OBS_TEXT: exports2.HTAB_SP_VCHAR_OBS_TEXT, + MAJOR: exports2.MAJOR, + MINOR: exports2.MINOR, + SPECIAL_HEADERS: exports2.SPECIAL_HEADERS, + METHODS_HTTP: exports2.METHODS_HTTP, + METHODS_ICE: exports2.METHODS_ICE, + METHODS_RTSP: exports2.METHODS_RTSP, + METHOD_MAP: exports2.METHOD_MAP, + H_METHOD_MAP: exports2.H_METHOD_MAP, + STATUSES_HTTP: exports2.STATUSES_HTTP + }; + } +}); + +// node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = __commonJS({ + "node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer2 } = require("node:buffer"); + var wasmBase64 = "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jAD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CCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAygCHCICQQJrDvwBAfkBAgMEBQYHCAkKCwwNDg8QERL4ARP3ARQV9gEWF/UBGBkaGxwdHh8g/QH7ASH0ASIjJCUmJygpKivzASwtLi8wMTLyAfEBMzTwAe8BNTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5P+gFQUVJT7gHtAVTsAVXrAV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LC0HUAQwKC0HVAQwJC0HWAQwIC0HjAQwHC0HXAQwGC0HYAQwFC0HZAQwEC0HaAQwDC0HbAQwCC0HdAQwBC0HcAQshAgNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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IAMgACABIAynaiIBEDIiAEUNKyADQQc2AhwgAyABNgIUIAMgADYCDAyRAwsgAy0ALkHAAHFFDQELQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDSsgAEEVRgRAIANBCjYCHCADIAE2AhQgA0HrGTYCECADQRU2AgxBACECDJADC0EAIQIgA0EANgIcIAMgATYCFCADQZMMNgIQIANBEzYCDAyPAwtBACECIANBADYCHCADIAE2AhQgA0GCFTYCECADQQI2AgwMjgMLQQAhAiADQQA2AhwgAyABNgIUIANB3RQ2AhAgA0EZNgIMDI0DC0EAIQIgA0EANgIcIAMgATYCFCADQeYdNgIQIANBGTYCDAyMAwsgAEEVRg09QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIsDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFDSggA0ENNgIcIAMgATYCFCADIAA2AgwMigMLIABBFUYNOkEAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAyJAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwoCyADQQ42AhwgAyAANgIMIAMgAUEBajYCFAyIAwsgAEEVRg03QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIcDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCcLIANBDzYCHCADIAA2AgwgAyABQQFqNgIUDIYDC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAyFAwsgAEEVRg0zQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIQDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFDSUgA0ERNgIcIAMgATYCFCADIAA2AgwMgwMLIABBFUYNMEEAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAyCAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwlCyADQRI2AhwgA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A0ACQCABLQAAQQprDgQCAAADAAsgBCABQQFqIgFHDQALQTQhAgzvAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDZ8CIANBMjYCHCADIAE2AhQgAyAANgIMQQAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFBEAgAUEBaiEBDJ8CCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM7QILIAEgBEcEQAJAA0AgAS0AAEEwayIAQf8BcUEKTwRAQTohAgzXAgsgAykDICILQpmz5syZs+bMGVYNASADIAtCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAMgCiALfDcDICAEIAFBAWoiAUcNAAtBwAAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgAUEBaiIBEDEiAA0XDOICC0HAACECDOwCCyABIARGBEBByQAhAgzsAgsCQANAAkAgAS0AAEEJaw4YAAKiAqICqQKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogIAogILIAQgAUEBaiIBRw0AC0HJACECDOwCCyABQQFqIQEgA0Evai0AAEEBcQ2lAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgzrAgsgASAERwRAA0AgAS0AAEEgRw0VIAQgAUEBaiIBRw0AC0H4ACECDOsCC0H4ACECDOoCCyADQQI6ACgMOAtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQM6AILQQAhAgzOAgtBDSECDM0CC0ETIQIMzAILQRUhAgzLAgtBFiECDMoCC0EYIQIMyQILQRkhAgzIAgtBGiECDMcCC0EbIQIMxgILQRwhAgzFAgtBHSECDMQCC0EeIQIMwwILQR8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgytAgtByAEhAgyTAgsgA0HhATYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDKsCCyABIARGBEBB4QEhAgyrAgsCQCABLQAAQSBGBEAgA0EAOwE0IAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBmRE2AhAgA0EJNgIMQQAhAgyrAgtBxwEhAgyRAgsgASAERgRAQeABIQIMqgILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyrAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqgILQcYBIQIMkAILIAEgBEYEQEHfASECDKkCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqgILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKkCC0HFASECDI8CCyABIARGBEBB3gEhAgyoAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKkCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyoAgtBxAEhAgyOAgsgASAERgRAQd0BIQIMpwILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUHDASECDI8CCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKcCCyADQQA2AhwgAyABNgIUIANBjQs2AhAgA0ENNgIMQQAhAgymAgsgASAERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAjwiAkUNACADIAIRAAAhAAsgAEUNoAEgAEEVRgRAIANB2QA2AhwgAyABNgIUIANBtxo2AhAgA0EVNgIMQQAhAgyfAgsgA0EANgIcIAMgATYCFCADQYANNgIQIANBGzYCDEEAIQIMngILIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDJ0CCyAB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AABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGeASECDOQBCyABQQFqIQFBnwEhAgzjAQtBtwEhAiABIARGDfsBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQezUAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPwBCyADQQA2AgAgBkEBaiEBQQ0MKAtBtgEhAiABIARGDfoBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPsBCyADQQA2AgAgBkEBaiEBQQwMJwtBtQEhAiABIARGDfkBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQerUAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPoBCyADQQA2AgAgBkEBaiEBQQMMJgtBtAEhAiABIARGDfgBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQejUAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPkBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQbMBIQIM+AELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBmQEhAgzfAQsgAUEBaiEBQZoBIQIM3gELQbIBIQIgASAERg32ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHm1ABqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz3AQsgA0EANgIAIAZBAWohAUEnDCMLQbEBIQIgASAERg31ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHk1ABqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz2AQsgA0EANgIAIAZBAWohAUEcDCILQbABIQIgASAERg30ASADKAIAIgAgBCABa2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AUEBaiIBRw0ACyADIAU2AgAM7QELIANBADYCACAGQQFqIQFBFQwZC0GnASECIAEgBEYN6wEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBx9QAai0AAEcNGCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7AELIANBADYCACAGQQFqIQFBFwwYC0GmASECIAEgBEYN6gEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBwdQAai0AAEcNFyAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6wELIANBADYCACAGQQFqIQFBGAwXCyABIARGBEBBpQEhAgzqAQsCQAJAIAEtAABByQBrDgcAGRkZGRkBGQsgAUEBaiEBQYsBIQIM0QELIAFBAWohAUGMASECDNABC0GkASECIAEgBEYN6AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBptUAai0AAEcNFSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6QELIANBADYCACAGQQFqIQFBCQwVC0GjASECIAEgBEYN5wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBpNUAai0AAEcNFCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6AELIANBADYCACAGQQFqIQFBHwwUC0GiASECIAEgBEYN5gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBvtQAai0AAEcNEyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5wELIANBADYCACAGQQFqIQFBAgwTC0GhASECIAEgBEYN5QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGA0AgAS0AACAAQbzUAGotAABHDREgAEEBRg0CIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOUBCyABIARGBEBBoAEhAgzlAQtBASABLQAAQd8ARw0RGiABQQFqIQFBhwEhAgzLAQsgA0EANgIA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A0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzaAQsgA0EANgIAIAZBAWohAUEFDAYLQZUBIQIgASAERg3YASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGm1ABqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzZAQsgA0EANgIAIAZBAWohAUEWDAULQZQBIQIgASAERg3XASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzYAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgzOAQtB9wAhAgy0AQsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDMwBCyABIARGBEBBjwEhAgzMAQsCQCABLQAAQSBGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GbHzYCECADQQY2AgxBACECDMwBC0ECIQIM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A2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQQAhAgynAQsgASAERg0BIAFBAWoLIQFBBiECDIwBC0H8ACECDKQBCwJAAkACQAJAA0AgAS0AAEGgyABqLQAAIgBBBUcEQCAAQQFrDgQpAgMEBQsgBCABQQFqIgFHDQALQfsAIQIMpwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMpgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMpQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMpAELIANBADYCHCADIAE2AhQgA0G8CjYCECADQQc2AgxBACECDKMBC0HPACECDIkBC0HRACECDIgBC0HnACECDIcBCyABIARGBEBB+gAhAgygAQsCQCABLQAAQQlrDgQgAAAgAAsgAUEBaiEBQeYAIQIMhgELIAEgBEYEQEH5ACECDJ8BCwJAIAEtAABBCWsOBB8AAB8AC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQRAQeIBIQIMhgELIABBFUcEQCADQQA2AhwgAyABNgIUIANByQ02AhAgA0EaNgIMQQ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DEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0ALkEBcQ09IANBADYCHCADIAE2AhQgA0HCHDYCECADQR42AgxBACECDHsLIAEgBEYEQEHYACECDHsLAkACQAJAAkACQCABLQAAIgBBCmsOBAIDAwABCyABQQFqIQFBLCECDGULIABBOkcNASADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgx9CyABQQFqIQEgA0Evai0AAEEBcUUNcyADLQAyQYABcUUEQCADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALAkACQCAADhZNTEsBAQEBAQEBAQEBAQEBAQEBAQEAAQsgA0EpNgIcIAMgATYCFCADQawZNgIQIANBFTYCDEEAIQIMfgsgA0EANgIcIAMgATYCFCADQeULNgIQIANBETYCDEEAIQIMfQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUNWSAAQRVHDQEgA0EFNgIcIAMgATYCFCADQZsbNgIQIANBFTYCDEEAIQIMfAtBywAhAgxiC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAx6CyADIAMvATJBgAFyOwEyDDsLIAEgBEcEQCADQRE2AgggAyABNgIEQcoAIQIMYAtB1wAhAgx4CyABIARG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AIAJFBEAgAygCDCEADAELIAMgAjYCHEEAIQAgAygCBCIBRQ0AIAMgASAEIAMoAggRAQAiAUUNACADIAQ2AhQgAyABNgIMIAEhAAsgAAu+AgECfyAAQQA6AAAgAEHkAGoiAUEBa0EAOgAAIABBADoAAiAAQQA6AAEgAUEDa0EAOgAAIAFBAmtBADoAACAAQQA6AAMgAUEEa0EAOgAAQQAgAGtBA3EiASAAaiIAQQA2AgBB5AAgAWtBfHEiAiAAaiIBQQRrQQA2AgACQCACQQlJDQAgAEEANgIIIABBADYCBCABQQhrQQA2AgAgAUEMa0EANgIAIAJBGUkNACAAQQA2AhggAEEANgIUIABBADYCECAAQQA2AgwgAUEQa0EANgIAIAFBFGtBADYCACABQRhrQQA2AgAgAUEca0EANgIAIAIgAEEEcUEYciICayIBQSBJDQAgACACaiEAA0AgAEIANwMYIABCADcDECAAQgA3AwggAEIANwMAIABBIGohACABQSBrIgFBH0sNAAsLC1YBAX8CQCAAKAIMDQACQAJAAkACQCAALQAxDgMBAAMCCyAAKAI4IgFFDQAgASgCMCIBRQ0AIAAgAREAACIBDQMLQQAPCwALIABByhk2AhBBDiEBCyABCxoAIAAoAgxFBEAgAEHeHzYCECAAQRU2AgwLCxQAIAAoAgxBFUYEQCAAQQA2AgwLCxQAIAAoAgxBFkYEQCAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsrAAJAIABBJ08NAEL//////wkgAK2IQgGDUA0AIABBAnRB0DhqKAIADwsACxcAIABBL08EQAALIABBAnRB7DlqKAIAC78JAQF/QfQtIQECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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QUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=="; + var wasmBuffer; + Object.defineProperty(module2, "exports", { + get: () => { + return wasmBuffer ? wasmBuffer : wasmBuffer = Buffer2.from(wasmBase64, "base64"); + } + }); + } +}); + +// node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = __commonJS({ + "node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer2 } = require("node:buffer"); + var wasmBase64 = "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl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CDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgMoAgwiAA0AIAMoAgQEQCADIAE2AgQLIwBBEGsiCSQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ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CADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQFqIgFHDQALQfgAIQIM6wILQfgAIQIM6gILIANBAjoAKAw4C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAzoAgtBACECDM4CC0ENIQIMz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jYCECADQRU2AgxBACECDMkCCyABIARGBEBB+gEhAgzJAgsgAS0AAEHIAEYNASADQQE6ACgLQcABIQIMrgILQdoBIQIMrQILIAEgBEcEQCADQQw2AgggAyABNgIEQdkBIQIMrQILQfkBIQIMxQILIAEgBEYEQEH4ASECDMUCCyABLQAAQcgARw0EIAFBAWohAUHYASECDKsCCyABIARGBEBB9wEhAgzEAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQdYBIQIMqwILIAFBAWohAUHXASECDKoCC0H2ASECIAEgBEYNwgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABButUAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMwwILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgBFBEBB4wEhAgyqAgsgA0H1ATYCHCADIAE2AhQgAyAANgIMQQAhAgzCAgtB9AEhAiABIARGDcECIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASAERgRAQeUBIQIMrQILQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDK8CCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmgIgA0HjATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5AE2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA2AhwgAyABNgI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aw4RAEFBQUFBQUFBQQFBQUFBQQJBCyABQQFqIQFBsQEhAgz5AQsgAUEBaiEBQbIBIQIM+AELIAFBAWohAUGzASECDPcBC0HLASECIAEgBEYNjwIgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBkdUAai0AAEcNPCAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkAILIANBADYCACAGQQFqIQFBGgw8C0HKASECIAEgBEYNjgIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBjdUAai0AAEcNOyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjwILIANBADYCACAGQQFqIQFBIQw7CyABIARGBEBByQEhAgyOAgsCQAJAIAEtAABBwQBrDhQAPT09PT09PT09PT09PT09PT09AT0LIAFBAWohAUGtASECDPUBCyABQQFqIQFBsAEhAgz0AQsgASAERgRAQcgBIQIMjQILAkACQCABLQAAQdUAaw4LADw8PDw8PDw8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQcUARw02IAFBAWohAUGrASECDO8BCyABIARGBEBBwwEhAgyIAgsCQAJAAkACQCABLQAAQcIAaw4PAAECOTk5OTk5OTk5OTkDOQsgAUEBaiEBQacBIQIM8QELI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IQFBkQEhAgzXAQsgAUEBaiEBQZIBIQIM1gELIAEgBEYEQEGqASECDO8BCyABLQAAQcwARw0cIAFBAWohAUEKDBsLQakBIQIgASAERg3tASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHR1ABqLQAARw0aIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzuAQsgA0EANgIAIAZBAWohAUEeDBoLQagBIQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAziAQsgA0EANgIAIAZBAWohAUEtDA4LIAEgBEYEQEGdASECDOEBCyABLQAAQcUARw0OIAFBAWohAUGEASECDMcBCyABIARGBEBBnAEhAgzgAQsCQAJAIAEtAABBzABrDggADw8PDw8PAQ8LIAFBAWohAUGCASECDMcBCyABQQFqIQFBgwEhAgzGAQtBmwEhAiABIARGDd4BIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQbPUAGotAABHDQsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN8BCyADQQA2AgAgBkEBaiEBQSMMCwtBmgEhAiABIARGDd0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDUAGotAABHDQogAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN4BCyADQQA2AgAgBkEBaiE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wM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNgAEgA0HuADYCHCADIAE2AhQgAyAANgIMQQAhAgyTAQtB3AAhAgx5C0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMkwELQdsAIQIMeQsgA0HsADYCHCADIAE2AhQgA0GAGzYCECADQRU2AgxBACECDJEBCyADLQApIgBBI0kNACAAQS5GDQAgA0EANgIcIAMgATYCFCADQckJNgIQIANBCDYCDEEAIQIMkAELQdoAIQIMdgsgASAERgRAQesAIQIMjwELAkAgAS0AAEEvRgRAIAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMQQAhAgyPAQtB2QAhAgx1CyABIARHBEAgA0EONgIIIAMgATYCBEHYACECDHULQeoAIQIMjQELIAEgBEYEQEHpACECDI0BCyABLQAAQTBrI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0GmDzYCECADQRw2AgxBACECDGgLIANBygA2AhwgAyABNgIUIANBhRw2AhAgA0EVNgIMQQAhAgxnCyABIARHBEAgASECA0AgBCACIgFrQRBOBEAgAUEQaiEC/Qz/////////////////////IAH9AAAAIg1BB/1sIA39DODg4ODg4ODg4ODg4ODg4OD9bv0MX19fX19fX19fX19fX19fX/0mIA39DAkJCQkJCQkJCQkJCQkJCQn9I/1Q/VL9ZEF/c2giAEEQRg0BIAAgAWohAQwYCyABIARGBEBBxAAhAgxpCyABLQAAQcDBAGotAABBAUcNFyAEIAFBAWoiAkcNAAtBxAAhAgxnC0HEACECDGYLIAEgBEcEQANAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXEiAEEJRg0AIABBIEYNAAJAAkACQAJAIABB4wBrDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTYhAgxSCyABQQFqIQFBNyECDFELIAFBAWohAUE4IQIMUAsMFQsgBCABQQFqIgFHDQALQTwhAgxmC0E8IQIMZQsgASAERgRAQcgAIQIMZQsgA0ESNgIIIAMgATYCBAJAAkACQAJAAkAgAy0ALEEBaw4EFAABAgkLIAMtADJBIHENA0HgASECDE8LAkAgAy8BMiIAQQhxRQ0AIAMtAChBAUcNACADLQAuQQhxRQ0CCyADIABB9/sDcUGABHI7ATIMCwsgAyADLwEyQRByOwEyDAQLIANBADYCBCADIAEgARAxIgAEQCADQcEANgIcIAMgADYCDCADIAFBAWo2AhRBACECDGYLIAFBAWohAQxYCyADQQA2AhwgAyABNgIUIANB9BM2AhAgA0EENgIMQQAhAgxkC0HHACECIAEgBEYNYyADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIABBwMUAai0AACABLQAAQSByRw0BIABBBkYNSiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAxkCyADQQA2AgAMBQsCQCABIARHBEADQCABLQAAQcDDAGotAAAiAEEBRwRAIABBAkcNAyABQQFqIQEMBQsgBCABQQFqIgFHDQALQc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UllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=="; + var wasmBuffer; + Object.defineProperty(module2, "exports", { + get: () => { + return wasmBuffer ? wasmBuffer : wasmBuffer = Buffer2.from(wasmBase64, "base64"); + } + }); + } +}); + +// node_modules/undici/lib/web/fetch/constants.js +var require_constants5 = __commonJS({ + "node_modules/undici/lib/web/fetch/constants.js"(exports2, module2) { + "use strict"; + var corsSafeListedMethods = ( + /** @type {const} */ + ["GET", "HEAD", "POST"] + ); + var corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + var nullBodyStatus = ( + /** @type {const} */ + [101, 204, 205, 304] + ); + var redirectStatus = ( + /** @type {const} */ + [301, 302, 303, 307, 308] + ); + var redirectStatusSet = new Set(redirectStatus); + var badPorts = ( + /** @type {const} */ + [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080" + ] + ); + var badPortsSet = new Set(badPorts); + var referrerPolicyTokens = ( + /** @type {const} */ + [ + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ] + ); + var referrerPolicy = ( + /** @type {const} */ + [ + "", + ...referrerPolicyTokens + ] + ); + var referrerPolicyTokensSet = new Set(referrerPolicyTokens); + var requestRedirect = ( + /** @type {const} */ + ["follow", "manual", "error"] + ); + var safeMethods = ( + /** @type {const} */ + ["GET", "HEAD", "OPTIONS", "TRACE"] + ); + var safeMethodsSet = new Set(safeMethods); + var requestMode = ( + /** @type {const} */ + ["navigate", "same-origin", "no-cors", "cors"] + ); + var requestCredentials = ( + /** @type {const} */ + ["omit", "same-origin", "include"] + ); + var requestCache = ( + /** @type {const} */ + [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ] + ); + var requestBodyHeader = ( + /** @type {const} */ + [ + "content-encoding", + "content-language", + "content-location", + "content-type", + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + "content-length" + ] + ); + var requestDuplex = ( + /** @type {const} */ + [ + "half" + ] + ); + var forbiddenMethods = ( + /** @type {const} */ + ["CONNECT", "TRACE", "TRACK"] + ); + var forbiddenMethodsSet = new Set(forbiddenMethods); + var subresource = ( + /** @type {const} */ + [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ] + ); + var subresourceSet = new Set(subresource); + module2.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicyTokens: referrerPolicyTokensSet + }; + } +}); + +// node_modules/undici/lib/web/fetch/global.js +var require_global = __commonJS({ + "node_modules/undici/lib/web/fetch/global.js"(exports2, module2) { + "use strict"; + var globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") { + throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + } + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module2.exports = { + getGlobalOrigin, + setGlobalOrigin + }; + } +}); + +// node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = __commonJS({ + "node_modules/undici/lib/web/fetch/data-url.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var encoder = new TextEncoder(); + var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; + var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; + var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; + function dataURLProcessor(dataURL) { + assert(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast( + ",", + input, + position + ); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) { + return "failure"; + } + position.position++; + const encodedBody = input.slice(mimeTypeLength + 1); + let body = stringPercentDecode(encodedBody); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + const stringBody = isomorphicDecode(body); + body = forgivingBase64(stringBody); + if (body === "failure") { + return "failure"; + } + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) { + mimeType = "text/plain" + mimeType; + } + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") { + mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + } + return { mimeType: mimeTypeRecord, body }; + } + function URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) { + return url.href; + } + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) { + return serialized.slice(0, -1); + } + return serialized; + } + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + function collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + function stringPercentDecode(input) { + const bytes = encoder.encode(input); + return percentDecode(bytes); + } + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; + } + function hexByteToNumber(byte) { + return ( + // 0-9 + byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55 + ); + } + function percentDecode(input) { + const length = input.length; + const output = new Uint8Array(length); + let j = 0; + for (let i = 0; i < length; ++i) { + const byte = input[i]; + if (byte !== 37) { + output[j++] = byte; + } else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) { + output[j++] = 37; + } else { + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; + } + } + return length === j ? output : output.subarray(0, j); + } + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast( + "/", + input, + position + ); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { + return "failure"; + } + if (position.position >= input.length) { + return "failure"; + } + position.position++; + let subtype = collectASequenceOfCodePointsFast( + ";", + input, + position + ); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { + return "failure"; + } + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + (char) => HTTP_WHITESPACE_REGEX.test(char), + input, + position + ); + let parameterName = collectASequenceOfCodePoints( + (char) => char !== ";" && char !== "=", + input, + position + ); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") { + continue; + } + position.position++; + } + if (position.position >= input.length) { + break; + } + let parameterValue = null; + if (input[position.position] === '"') { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast( + ";", + input, + position + ); + } else { + parameterValue = collectASequenceOfCodePointsFast( + ";", + input, + position + ); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) { + continue; + } + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) { + mimeType.parameters.set(parameterName, parameterValue); + } + } + return mimeType; + } + function forgivingBase64(data) { + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); + let dataLength = data.length; + if (dataLength % 4 === 0) { + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + } + } + } + if (dataLength % 4 === 1) { + return "failure"; + } + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { + return "failure"; + } + const buffer = Buffer.from(data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + function collectAnHTTPQuotedString(input, position, extractValue = false) { + const positionStart = position.position; + let value = ""; + assert(input[position.position] === '"'); + position.position++; + while (true) { + value += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== "\\", + input, + position + ); + if (position.position >= input.length) { + break; + } + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert(quoteOrBackslash === '"'); + break; + } + } + if (extractValue) { + return value; + } + return input.slice(positionStart, position.position); + } + function serializeAMimeType(mimeType) { + assert(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = '"' + value; + value += '"'; + } + serialization += value; + } + return serialization; + } + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + function isASCIIWhitespace(char) { + return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; + } + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) { + while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + } + if (trailing) { + while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + } + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); + } + function isomorphicDecode(input) { + const length = input.length; + if ((2 << 15) - 1 > length) { + return String.fromCharCode.apply(null, input); + } + let result = ""; + let i = 0; + let addition = (2 << 15) - 1; + while (i < length) { + if (i + addition > length) { + addition = length - i; + } + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; + } + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": + return "text/javascript"; + case "application/json": + case "text/json": + return "application/json"; + case "image/svg+xml": + return "image/svg+xml"; + case "text/xml": + case "application/xml": + return "application/xml"; + } + if (mimeType.subtype.endsWith("+json")) { + return "application/json"; + } + if (mimeType.subtype.endsWith("+xml")) { + return "application/xml"; + } + return ""; + } + module2.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode + }; + } +}); + +// node_modules/undici/lib/web/webidl/index.js +var require_webidl = __commonJS({ + "node_modules/undici/lib/web/webidl/index.js"(exports2, module2) { + "use strict"; + var { types, inspect } = require("node:util"); + var { markAsUncloneable } = require("node:worker_threads"); + var UNDEFINED = 1; + var BOOLEAN = 2; + var STRING = 3; + var SYMBOL = 4; + var NUMBER = 5; + var BIGINT = 6; + var NULL = 7; + var OBJECT = 8; + var FunctionPrototypeSymbolHasInstance = Function.call.bind(Function.prototype[Symbol.hasInstance]); + var webidl = { + converters: {}, + util: {}, + errors: {}, + is: {} + }; + webidl.errors.exception = function(message) { + return new TypeError(`${message.header}: ${message.message}`); + }; + webidl.errors.conversionFailed = function(opts) { + const plural = opts.types.length === 1 ? "" : " one of"; + const message = `${opts.argument} could not be converted to${plural}: ${opts.types.join(", ")}.`; + return webidl.errors.exception({ + header: opts.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I) { + if (!FunctionPrototypeSymbolHasInstance(I, V)) { + const err = new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + }; + webidl.brandCheckMultiple = function(List) { + const prototypes = List.map((c) => webidl.util.MakeTypeAssertion(c)); + return (V) => { + if (prototypes.every((typeCheck) => !typeCheck(V))) { + const err = new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + }; + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) { + throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); + } + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl.util.MakeTypeAssertion = function(I) { + return (O) => FunctionPrototypeSymbolHasInstance(I, O); + }; + webidl.util.Type = function(V) { + switch (typeof V) { + case "undefined": + return UNDEFINED; + case "boolean": + return BOOLEAN; + case "string": + return STRING; + case "symbol": + return SYMBOL; + case "number": + return NUMBER; + case "bigint": + return BIGINT; + case "function": + case "object": { + if (V === null) { + return NULL; + } + return OBJECT; + } + } + }; + webidl.util.Types = { + UNDEFINED, + BOOLEAN, + STRING, + SYMBOL, + NUMBER, + BIGINT, + NULL, + OBJECT + }; + webidl.util.TypeValueToString = function(o) { + switch (webidl.util.Type(o)) { + case UNDEFINED: + return "Undefined"; + case BOOLEAN: + return "Boolean"; + case STRING: + return "String"; + case SYMBOL: + return "Symbol"; + case NUMBER: + return "Number"; + case BIGINT: + return "BigInt"; + case NULL: + return "Null"; + case OBJECT: + return "Object"; + } + }; + webidl.util.markAsUncloneable = markAsUncloneable || (() => { + }); + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") { + lowerBound = 0; + } else { + lowerBound = Math.pow(-2, 53) + 1; + } + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) { + x = 0; + } + if (opts?.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); + } + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + } + return x; + } + if (!Number.isNaN(x) && opts?.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) { + x = Math.floor(x); + } else { + x = Math.ceil(x); + } + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { + return 0; + } + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) { + return x - Math.pow(2, bitLength); + } + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) { + return -1 * r; + } + return r; + }; + webidl.util.Stringify = function(V) { + const type = webidl.util.Type(V); + switch (type) { + case SYMBOL: + return `Symbol(${V.description})`; + case OBJECT: + return inspect(V); + case STRING: + return `"${V}"`; + case BIGINT: + return `${V}n`; + default: + return `${V}`; + } + }; + webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable) => { + if (webidl.util.Type(V) !== OBJECT) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); + } + const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + } + while (true) { + const { done, value } = method.next(); + if (done) { + break; + } + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + return seq; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument) => { + if (webidl.util.Type(O) !== OBJECT) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.TypeValueToString(O)}") is not an Object.` + }); + } + const result = {}; + if (!types.isProxy(O)) { + const keys2 = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; + for (const key of keys2) { + const keyName = webidl.util.Stringify(key); + const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`); + const typedValue = valueConverter(O[key], prefix, `${argument}[${keyName}]`); + result[typedKey] = typedValue; + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) { + const desc = Reflect.getOwnPropertyDescriptor(O, key); + if (desc?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + const typedValue = valueConverter(O[key], prefix, argument); + result[typedKey] = typedValue; + } + } + return result; + }; + }; + webidl.interfaceConverter = function(TypeCheck, name) { + return (V, prefix, argument) => { + if (!TypeCheck(V)) { + throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${name}.` + }); + } + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument) => { + const dict = {}; + if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) { + throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + } + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (dictionary == null || !Object.hasOwn(dictionary, key)) { + throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + } + let value = dictionary?.[key]; + const hasDefault = defaultValue !== void 0; + if (hasDefault && value === void 0) { + value = defaultValue(); + } + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) { + throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + } + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V, prefix, argument) => { + if (V === null) { + return V; + } + return converter(V, prefix, argument); + }; + }; + webidl.is.USVString = function(value) { + return typeof value === "string" && value.isWellFormed(); + }; + webidl.is.ReadableStream = webidl.util.MakeTypeAssertion(ReadableStream); + webidl.is.Blob = webidl.util.MakeTypeAssertion(Blob); + webidl.is.URLSearchParams = webidl.util.MakeTypeAssertion(URLSearchParams); + webidl.is.File = webidl.util.MakeTypeAssertion(File); + webidl.is.URL = webidl.util.MakeTypeAssertion(URL); + webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal); + webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort); + webidl.converters.DOMString = function(V, prefix, argument, opts) { + if (V === null && opts?.legacyNullToEmptyString) { + return ""; + } + if (typeof V === "symbol") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + } + return String(V); + }; + webidl.converters.ByteString = function(V, prefix, argument) { + if (typeof V === "symbol") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a ByteString.` + }); + } + const x = String(V); + for (let index = 0; index < x.length; index++) { + if (x.charCodeAt(index) > 255) { + throw new TypeError( + `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` + ); + } + } + return x; + }; + webidl.converters.USVString = function(value) { + if (typeof value === "string") { + return value.toWellFormed(); + } + return `${value}`.toWellFormed(); + }; + webidl.converters.boolean = function(V) { + const x = Boolean(V); + return x; + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V, prefix, argument) { + const x = webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); + return x; + }; + webidl.converters["unsigned long long"] = function(V, prefix, argument) { + const x = webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); + return x; + }; + webidl.converters["unsigned long"] = function(V, prefix, argument) { + const x = webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); + return x; + }; + webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { + const x = webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); + return x; + }; + webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + if (webidl.util.Type(V) !== OBJECT || !types.isAnyArrayBuffer(V)) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + } + if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + if (V.resizable || V.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + } + return V; + }; + webidl.converters.TypedArray = function(V, T, prefix, name, opts) { + if (webidl.util.Type(V) !== OBJECT || !types.isTypedArray(V) || V.constructor.name !== T.name) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + } + if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + if (V.buffer.resizable || V.buffer.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + } + return V; + }; + webidl.converters.DataView = function(V, prefix, name, opts) { + if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) { + throw webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.` + }); + } + if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + if (V.buffer.resizable || V.buffer.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + } + return V; + }; + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.ByteString + ); + webidl.converters["sequence>"] = webidl.sequenceConverter( + webidl.converters["sequence"] + ); + webidl.converters["record"] = webidl.recordConverter( + webidl.converters.ByteString, + webidl.converters.ByteString + ); + webidl.converters.Blob = webidl.interfaceConverter(webidl.is.Blob, "Blob"); + webidl.converters.AbortSignal = webidl.interfaceConverter( + webidl.is.AbortSignal, + "AbortSignal" + ); + module2.exports = { + webidl + }; + } +}); + +// node_modules/undici/lib/web/fetch/util.js +var require_util5 = __commonJS({ + "node_modules/undici/lib/web/fetch/util.js"(exports2, module2) { + "use strict"; + var { Transform } = require("node:stream"); + var zlib = require("node:zlib"); + var { redirectStatusSet, referrerPolicyTokens, badPortsSet } = require_constants5(); + var { getGlobalOrigin } = require_global(); + var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); + var { performance: performance2 } = require("node:perf_hooks"); + var { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util4(); + var assert = require("node:assert"); + var { isUint8Array } = require("node:util/types"); + var { webidl } = require_webidl(); + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) { + return null; + } + let location = response.headersList.get("location", true); + if (location !== null && isValidHeaderValue(location)) { + if (!isValidEncodedURL(location)) { + location = normalizeBinaryStringToUtf8(location); + } + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) { + location.hash = requestFragment; + } + return location; + } + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); + if (code > 126 || // Non-US-ASCII + DEL + code < 32) { + return false; + } + } + return true; + } + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; + } + function requestBadPort(request) { + const url = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + return "blocked"; + } + return "allowed"; + } + function isErrorLike(object) { + return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || // HTAB + c >= 32 && c <= 126 || // SP / VCHAR + c >= 128 && c <= 255)) { + return false; + } + } + return true; + } + var isValidHeaderName = isValidHTTPToken; + function isValidHeaderValue(potentialValue) { + return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + } + function parseReferrerPolicy(actualResponse) { + const policyHeader = (actualResponse.headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length) { + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + } + return policy; + } + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { + const policy = parseReferrerPolicy(actualResponse); + if (policy !== "") { + request.referrerPolicy = policy; + } + } + function crossOriginResourcePolicyCheck() { + return "allowed"; + } + function corsCheck() { + return "success"; + } + function TAOCheck() { + return "success"; + } + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); + } + function appendRequestOriginHeader(request) { + let serializedOrigin = request.origin; + if (serializedOrigin === "client" || serializedOrigin === void 0) { + return; + } + if (request.responseTainting === "cors" || request.mode === "websocket") { + request.headersList.append("origin", serializedOrigin, true); + } else if (request.method !== "GET" && request.method !== "HEAD") { + switch (request.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { + serializedOrigin = null; + } + break; + case "same-origin": + if (!sameOrigin(request, requestCurrentURL(request))) { + serializedOrigin = null; + } + break; + default: + } + request.headersList.append("origin", serializedOrigin, true); + } + } + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; + } + function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { + return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + } + return { + domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol + }; + } + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance2.now(), crossOriginIsolatedCapability); + } + function createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer() { + return { + referrerPolicy: "strict-origin-when-cross-origin" + }; + } + function clonePolicyContainer(policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy + }; + } + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; + assert(policy); + let referrerSource = null; + if (request.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") { + return "no-referrer"; + } + referrerSource = new URL(globalOrigin); + } else if (webidl.is.URL(request.referrer)) { + referrerSource = request.referrer; + } + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin; + } + switch (policy) { + case "no-referrer": + return "no-referrer"; + case "origin": + if (referrerOrigin != null) { + return referrerOrigin; + } + return stripURLForReferrer(referrerSource, true); + case "unsafe-url": + return referrerURL; + case "strict-origin": { + const currentURL = requestCurrentURL(request); + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return "no-referrer"; + } + return referrerOrigin; + } + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL(request); + if (sameOrigin(referrerURL, currentURL)) { + return referrerURL; + } + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return "no-referrer"; + } + return referrerOrigin; + } + case "same-origin": + if (sameOrigin(request, referrerURL)) { + return referrerURL; + } + return "no-referrer"; + case "origin-when-cross-origin": + if (sameOrigin(request, referrerURL)) { + return referrerURL; + } + return referrerOrigin; + case "no-referrer-when-downgrade": { + const currentURL = requestCurrentURL(request); + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return "no-referrer"; + } + return referrerOrigin; + } + } + } + function stripURLForReferrer(url, originOnly = false) { + assert(webidl.is.URL(url)); + url = new URL(url); + if (urlIsLocal(url)) { + return "no-referrer"; + } + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly === true) { + url.pathname = ""; + url.search = ""; + } + return url; + } + var potentialleTrustworthyIPv4RegExp = new RegExp("^(?:(?:127\\.)(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){2}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]))$"); + var potentialleTrustworthyIPv6RegExp = new RegExp("^(?:(?:(?:0{1,4}):){7}(?:(?:0{0,3}1))|(?:(?:0{1,4}):){1,6}(?::(?:0{0,3}1))|(?:::(?:0{0,3}1))|)$"); + function isOriginIPPotentiallyTrustworthy(origin) { + if (origin.includes(":")) { + if (origin[0] === "[" && origin[origin.length - 1] === "]") { + origin = origin.slice(1, -1); + } + return potentialleTrustworthyIPv6RegExp.test(origin); + } + return potentialleTrustworthyIPv4RegExp.test(origin); + } + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") { + return false; + } + origin = new URL(origin); + if (origin.protocol === "https:" || origin.protocol === "wss:") { + return true; + } + if (isOriginIPPotentiallyTrustworthy(origin.hostname)) { + return true; + } + if (origin.hostname === "localhost" || origin.hostname === "localhost.") { + return true; + } + if (origin.hostname.endsWith(".localhost") || origin.hostname.endsWith(".localhost.")) { + return true; + } + if (origin.protocol === "file:") { + return true; + } + return false; + } + function isURLPotentiallyTrustworthy(url) { + if (!webidl.is.URL(url)) { + return false; + } + if (url.href === "about:blank" || url.href === "about:srcdoc") { + return true; + } + if (url.protocol === "data:") return true; + if (url.protocol === "blob:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { + } + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") { + return true; + } + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { + return true; + } + return false; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) { + throw new TypeError("Value is not JSON serializable"); + } + assert(typeof result === "string"); + return result; + } + var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + if (typeof this !== "object" || this === null || !(#target in this)) { + throw new TypeError( + `'next' called on an object that does not implement interface ${name} Iterator.` + ); + } + const index = this.#index; + const values = kInternalIterator(this.#target); + const len = values.length; + if (index >= len) { + return { + value: void 0, + done: true + }; + } + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + this.#index = index + 1; + let result; + switch (this.#kind) { + case "key": + result = key; + break; + case "value": + result = value; + break; + case "key+value": + result = [key, value]; + break; + } + return { + value: result, + done: false + }; + } + } + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator` + }, + next: { writable: true, enumerable: true, configurable: true } + }); + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== "function") { + throw new TypeError( + `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` + ); + } + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) { + callbackfn.call(thisArg, value, key, this); + } + } + } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); + } + function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + try { + const reader = body.stream.getReader(); + readAllBytes(reader, successSteps, errorSteps); + } catch (e) { + errorSteps(e); + } + } + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) { + throw err; + } + } + } + var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + function isomorphicEncode(input) { + assert(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + async function readAllBytes(reader, successSteps, failureSteps) { + try { + const bytes = []; + let byteLength = 0; + do { + const { done, value: chunk } = await reader.read(); + if (done) { + successSteps(Buffer.concat(bytes, byteLength)); + return; + } + if (!isUint8Array(chunk)) { + failureSteps(new TypeError("Received non-Uint8Array chunk")); + return; + } + bytes.push(chunk); + byteLength += chunk.length; + } while (true); + } catch (e) { + failureSteps(e); + } + } + function urlIsLocal(url) { + assert("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + function urlHasHttpsScheme(url) { + return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; + } + function urlIsHttpHttpsScheme(url) { + assert("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + function simpleRangeHeaderValue(value, allowWhitespace) { + const data = value; + if (!data.startsWith("bytes")) { + return "failure"; + } + const position = { position: 5 }; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + if (data.charCodeAt(position.position) !== 61) { + return "failure"; + } + position.position++; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + const rangeStart = collectASequenceOfCodePoints( + (char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, + data, + position + ); + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + if (data.charCodeAt(position.position) !== 45) { + return "failure"; + } + position.position++; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + const rangeEnd = collectASequenceOfCodePoints( + (char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, + data, + position + ); + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + if (position.position < data.length) { + return "failure"; + } + if (rangeEndValue === null && rangeStartValue === null) { + return "failure"; + } + if (rangeStartValue > rangeEndValue) { + return "failure"; + } + return { rangeStartValue, rangeEndValue }; + } + function buildContentRange(rangeStart, rangeEnd, fullLength) { + let contentRange = "bytes "; + contentRange += isomorphicEncode(`${rangeStart}`); + contentRange += "-"; + contentRange += isomorphicEncode(`${rangeEnd}`); + contentRange += "/"; + contentRange += isomorphicEncode(`${fullLength}`); + return contentRange; + } + var InflateStream = class extends Transform { + #zlibOptions; + /** @param {zlib.ZlibOptions} [zlibOptions] */ + constructor(zlibOptions) { + super(); + this.#zlibOptions = zlibOptions; + } + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 15) === 8 ? zlib.createInflate(this.#zlibOptions) : zlib.createInflateRaw(this.#zlibOptions); + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + }; + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + function extractMimeType(headers) { + let charset = null; + let essence = null; + let mimeType = null; + const values = getDecodeSplit("content-type", headers); + if (values === null) { + return "failure"; + } + for (const value of values) { + const temporaryMimeType = parseMIMEType(value); + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") { + continue; + } + mimeType = temporaryMimeType; + if (mimeType.essence !== essence) { + charset = null; + if (mimeType.parameters.has("charset")) { + charset = mimeType.parameters.get("charset"); + } + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) { + mimeType.parameters.set("charset", charset); + } + } + if (mimeType == null) { + return "failure"; + } + return mimeType; + } + function gettingDecodingSplitting(value) { + const input = value; + const position = { position: 0 }; + const values = []; + let temporaryValue = ""; + while (position.position < input.length) { + temporaryValue += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== ",", + input, + position + ); + if (position.position < input.length) { + if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString( + input, + position + ); + if (position.position < input.length) { + continue; + } + } else { + assert(input.charCodeAt(position.position) === 44); + position.position++; + } + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; + } + function getDecodeSplit(name, list) { + const value = list.get(name, true); + if (value === null) { + return null; + } + return gettingDecodingSplitting(value); + } + var textDecoder = new TextDecoder(); + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) { + return ""; + } + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { + buffer = buffer.subarray(3); + } + const output = textDecoder.decode(buffer); + return output; + } + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + var environmentSettingsObject = new EnvironmentSettingsObject(); + module2.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject, + isOriginIPPotentiallyTrustworthy + }; + } +}); + +// node_modules/undici/lib/web/fetch/formdata.js +var require_formdata = __commonJS({ + "node_modules/undici/lib/web/fetch/formdata.js"(exports2, module2) { + "use strict"; + var { iteratorMixin } = require_util5(); + var { kEnumerableProperty } = require_util4(); + var { webidl } = require_webidl(); + var nodeUtil = require("node:util"); + var FormData2 = class _FormData { + #state = []; + constructor(form = void 0) { + webidl.util.markAsUncloneable(this); + if (form !== void 0) { + throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + } + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.USVString(name); + if (arguments.length === 3 || webidl.is.Blob(value)) { + value = webidl.converters.Blob(value, prefix, "value"); + if (filename !== void 0) { + filename = webidl.converters.USVString(filename); + } + } else { + value = webidl.converters.USVString(value); + } + const entry = makeEntry(name, value, filename); + this.#state.push(entry); + } + delete(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name); + this.#state = this.#state.filter((entry) => entry.name !== name); + } + get(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name); + const idx = this.#state.findIndex((entry) => entry.name === name); + if (idx === -1) { + return null; + } + return this.#state[idx].value; + } + getAll(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name); + return this.#state.filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name); + return this.#state.findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.USVString(name); + if (arguments.length === 3 || webidl.is.Blob(value)) { + value = webidl.converters.Blob(value, prefix, "value"); + if (filename !== void 0) { + filename = webidl.converters.USVString(filename); + } + } else { + value = webidl.converters.USVString(value); + } + const entry = makeEntry(name, value, filename); + const idx = this.#state.findIndex((entry2) => entry2.name === name); + if (idx !== -1) { + this.#state = [ + ...this.#state.slice(0, idx), + entry, + ...this.#state.slice(idx + 1).filter((entry2) => entry2.name !== name) + ]; + } else { + this.#state.push(entry); + } + } + [nodeUtil.inspect.custom](depth, options) { + const state = this.#state.reduce((a, b) => { + if (a[b.name]) { + if (Array.isArray(a[b.name])) { + a[b.name].push(b.value); + } else { + a[b.name] = [a[b.name], b.value]; + } + } else { + a[b.name] = b.value; + } + return a; + }, { __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = nodeUtil.formatWithOptions(options, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + /** + * @param {FormData} formData + */ + static getFormDataState(formData) { + return formData.#state; + } + /** + * @param {FormData} formData + * @param {any[]} newState + */ + static setFormDataState(formData, newState) { + formData.#state = newState; + } + }; + var { getFormDataState, setFormDataState } = FormData2; + Reflect.deleteProperty(FormData2, "getFormDataState"); + Reflect.deleteProperty(FormData2, "setFormDataState"); + iteratorMixin("FormData", FormData2, getFormDataState, "name", "value"); + Object.defineProperties(FormData2.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + function makeEntry(name, value, filename) { + if (typeof value === "string") { + } else { + if (!webidl.is.File(value)) { + value = new File([value], "blob", { type: value.type }); + } + if (filename !== void 0) { + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = new File([value], filename, options); + } + } + return { name, value }; + } + webidl.is.FormData = webidl.util.MakeTypeAssertion(FormData2); + module2.exports = { FormData: FormData2, makeEntry, setFormDataState }; + } +}); + +// node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = __commonJS({ + "node_modules/undici/lib/web/fetch/formdata-parser.js"(exports2, module2) { + "use strict"; + var { bufferToLowerCasedHeaderName } = require_util4(); + var { utf8DecodeBytes } = require_util5(); + var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); + var { makeEntry } = require_formdata(); + var { webidl } = require_webidl(); + var assert = require("node:assert"); + var formDataNameBuffer = Buffer.from('form-data; name="'); + var filenameBuffer = Buffer.from("filename"); + var dd2 = Buffer.from("--"); + var ddcrlf = Buffer.from("--\r\n"); + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) { + if ((chars.charCodeAt(i) & ~127) !== 0) { + return false; + } + } + return true; + } + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) { + return false; + } + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) { + return false; + } + } + return true; + } + function multipartFormDataParser(input, mimeType) { + assert(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) { + throw parsingError("missing boundary in content-type header"); + } + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + while (input[position.position] === 13 && input[position.position + 1] === 10) { + position.position += 2; + } + let trailing = input.length; + while (input[trailing - 1] === 10 && input[trailing - 2] === 13) { + trailing -= 2; + } + if (trailing !== input.length) { + input = input.subarray(0, trailing); + } + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { + position.position += boundary.length; + } else { + throw parsingError("expected a value starting with -- and the boundary"); + } + if (position.position === input.length - 2 && bufferStartsWith(input, dd2, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) { + return entryList; + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) { + throw parsingError("expected CRLF"); + } + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + let { name, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) { + throw parsingError("expected boundary after body"); + } + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") { + body = Buffer.from(body.toString(), "base64"); + } + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) { + throw parsingError("expected CRLF"); + } else { + position.position += 2; + } + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) { + contentType = ""; + } + value = new File([body], filename, { type: contentType }); + } else { + value = utf8DecodeBytes(Buffer.from(body)); + } + assert(webidl.is.USVString(name)); + assert(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value)); + entryList.push(makeEntry(name, value, filename)); + } + } + function parseMultipartFormDataHeaders(input, position) { + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + while (true) { + if (input[position.position] === 13 && input[position.position + 1] === 10) { + if (name === null) { + throw parsingError("header name is null"); + } + return { name, filename, contentType, encoding }; + } + let headerName = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13 && char !== 58, + input, + position + ); + headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { + throw parsingError("header name does not match the field-name token production"); + } + if (input[position.position] !== 58) { + throw parsingError("expected :"); + } + position.position++; + collectASequenceOfBytes( + (char) => char === 32 || char === 9, + input, + position + ); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": { + name = filename = null; + if (!bufferStartsWith(input, formDataNameBuffer, position)) { + throw parsingError('expected form-data; name=" for content-disposition header'); + } + position.position += 17; + name = parseMultipartFormDataName(input, position); + if (input[position.position] === 59 && input[position.position + 1] === 32) { + const at2 = { position: position.position + 2 }; + if (bufferStartsWith(input, filenameBuffer, at2)) { + if (input[at2.position + 8] === 42) { + at2.position += 10; + collectASequenceOfBytes( + (char) => char === 32 || char === 9, + input, + at2 + ); + const headerValue = collectASequenceOfBytes( + (char) => char !== 32 && char !== 13 && char !== 10, + // ' ' or CRLF + input, + at2 + ); + if (headerValue[0] !== 117 && headerValue[0] !== 85 || // u or U + headerValue[1] !== 116 && headerValue[1] !== 84 || // t or T + headerValue[2] !== 102 && headerValue[2] !== 70 || // f or F + headerValue[3] !== 45 || // - + headerValue[4] !== 56) { + throw parsingError("unknown encoding, expected utf-8''"); + } + filename = decodeURIComponent(new TextDecoder().decode(headerValue.subarray(7))); + position.position = at2.position; + } else { + position.position += 11; + collectASequenceOfBytes( + (char) => char === 32 || char === 9, + input, + position + ); + position.position++; + filename = parseMultipartFormDataName(input, position); + } + } + } + break; + } + case "content-type": { + let headerValue = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13, + input, + position + ); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + contentType = isomorphicDecode(headerValue); + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13, + input, + position + ); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + encoding = isomorphicDecode(headerValue); + break; + } + default: { + collectASequenceOfBytes( + (char) => char !== 10 && char !== 13, + input, + position + ); + } + } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) { + throw parsingError("expected CRLF"); + } else { + position.position += 2; + } + } + } + function parseMultipartFormDataName(input, position) { + assert(input[position.position - 1] === 34); + let name = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13 && char !== 34, + input, + position + ); + if (input[position.position] !== 34) { + throw parsingError('expected "'); + } else { + position.position++; + } + name = new TextDecoder().decode(name).replace(/%0A/ig, "\n").replace(/%0D/ig, "\r").replace(/%22/g, '"'); + return name; + } + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while (start < input.length && condition(input[start])) { + ++start; + } + return input.subarray(position.position, position.position = start); + } + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) { + while (lead < buf.length && predicate(buf[lead])) lead++; + } + if (trailing) { + while (trail > 0 && predicate(buf[trail])) trail--; + } + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); + } + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) { + return false; + } + for (let i = 0; i < start.length; i++) { + if (start[i] !== buffer[position.position + i]) { + return false; + } + } + return true; + } + function parsingError(cause) { + return new TypeError("Failed to parse body as FormData.", { cause: new TypeError(cause) }); + } + module2.exports = { + multipartFormDataParser, + validateBoundary + }; + } +}); + +// node_modules/undici/lib/util/promise.js +var require_promise2 = __commonJS({ + "node_modules/undici/lib/util/promise.js"(exports2, module2) { + "use strict"; + function createDeferredPromise() { + let res; + let rej; + const promise = new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }); + return { promise, resolve: res, reject: rej }; + } + module2.exports = { + createDeferredPromise + }; + } +}); + +// node_modules/undici/lib/web/fetch/body.js +var require_body = __commonJS({ + "node_modules/undici/lib/web/fetch/body.js"(exports2, module2) { + "use strict"; + var util = require_util4(); + var { + ReadableStreamFrom, + readableStreamClose, + fullyReadBody, + extractMimeType, + utf8DecodeBytes + } = require_util5(); + var { FormData: FormData2, setFormDataState } = require_formdata(); + var { webidl } = require_webidl(); + var assert = require("node:assert"); + var { isErrored, isDisturbed } = require("node:stream"); + var { isArrayBuffer } = require("node:util/types"); + var { serializeAMimeType } = require_data_url(); + var { multipartFormDataParser } = require_formdata_parser(); + var { createDeferredPromise } = require_promise2(); + var random; + try { + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random() * max); + } + var textEncoder = new TextEncoder(); + function noop() { + } + var streamRegistry = new FinalizationRegistry((weakRef) => { + const stream = weakRef.deref(); + if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { + stream.cancel("Response object has been garbage collected").catch(noop); + } + }); + function extractBody(object, keepalive = false) { + let stream = null; + if (webidl.is.ReadableStream(object)) { + stream = object; + } else if (webidl.is.Blob(object)) { + stream = object.stream(); + } else { + stream = new ReadableStream({ + async pull(controller) { + const buffer = typeof source === "string" ? textEncoder.encode(source) : source; + if (buffer.byteLength) { + controller.enqueue(buffer); + } + queueMicrotask(() => readableStreamClose(controller)); + }, + start() { + }, + type: "bytes" + }); + } + assert(webidl.is.ReadableStream(stream)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (webidl.is.URLSearchParams(object)) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) { + source = new Uint8Array(object.slice()); + } else if (ArrayBuffer.isView(object)) { + source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + } else if (webidl.is.FormData(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r +Content-Disposition: form-data`; + const formdataEscape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn2 = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) { + if (typeof value === "string") { + const chunk2 = textEncoder.encode(prefix + `; name="${formdataEscape(normalizeLinefeeds(name))}"\r +\r +${normalizeLinefeeds(value)}\r +`); + blobParts.push(chunk2); + length += chunk2.byteLength; + } else { + const chunk2 = textEncoder.encode(`${prefix}; name="${formdataEscape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${formdataEscape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r +\r +`); + blobParts.push(chunk2, value, rn2); + if (typeof value.size === "number") { + length += chunk2.byteLength + value.size + rn2.byteLength; + } else { + hasUnknownSizeValue = true; + } + } + } + const chunk = textEncoder.encode(`--${boundary}--\r +`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) { + length = null; + } + source = object; + action = async function* () { + for (const part of blobParts) { + if (part.stream) { + yield* part.stream(); + } else { + yield part; + } + } + }; + type = `multipart/form-data; boundary=${boundary}`; + } else if (webidl.is.Blob(object)) { + source = object; + length = object.size; + if (object.type) { + type = object.type; + } + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) { + throw new TypeError("keepalive"); + } + if (util.isDisturbed(object) || object.locked) { + throw new TypeError( + "Response body object should not be disturbed or locked" + ); + } + stream = webidl.is.ReadableStream(object) ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util.isBuffer(source)) { + length = Buffer.byteLength(source); + } + if (action != null) { + let iterator; + stream = new ReadableStream({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) { + queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + } else { + if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) { + controller.enqueue(buffer); + } + } + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + const body = { stream, source, length }; + return [body, type]; + } + function safelyExtractBody(object, keepalive = false) { + if (webidl.is.ReadableStream(object)) { + assert(!util.isDisturbed(object), "The body has already been consumed."); + assert(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); + } + function cloneBody(body) { + const { 0: out1, 1: out2 } = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function throwIfAborted(state) { + if (state.aborted) { + throw new DOMException("The operation was aborted.", "AbortError"); + } + } + function bodyMixinMethods(instance, getInternalState) { + const methods = { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(getInternalState(this)); + if (mimeType === null) { + mimeType = ""; + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType); + } + return new Blob([bytes], { type: mimeType }); + }, instance, getInternalState); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance, getInternalState); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance, getInternalState); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance, getInternalState); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(getInternalState(this)); + if (mimeType !== null) { + switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + const fd = new FormData2(); + setFormDataState(fd, parsed); + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData2(); + for (const [name, value2] of entries) { + fd.append(name, value2); + } + return fd; + } + } + } + throw new TypeError( + 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' + ); + }, instance, getInternalState); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance, getInternalState); + } + }; + return methods; + } + function mixinBody(prototype, getInternalState) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState)); + } + async function consumeBody(object, convertBytesToJSValue, instance, getInternalState) { + webidl.brandCheck(object, instance); + const state = getInternalState(object); + if (bodyUnusable(state)) { + throw new TypeError("Body is unusable: Body has already been read"); + } + throwIfAborted(state); + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (state.body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + fullyReadBody(state.body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(object) { + const body = object.body; + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + function bodyMimeType(requestOrResponse) { + const headers = requestOrResponse.headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") { + return null; + } + return mimeType; + } + module2.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + bodyUnusable + }; + } +}); + +// node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = __commonJS({ + "node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var util = require_util4(); + var { channels } = require_diagnostics(); + var timers = require_timers(); + var { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError + } = require_errors5(); + var { + kUrl, + kReset, + kClient, + kParser, + kBlocking, + kRunning, + kPending, + kSize, + kWriting, + kQueue, + kNoRef, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kSocket, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kMaxRequests, + kCounter, + kMaxResponseSize, + kOnError, + kResume, + kHTTPContext, + kClosed + } = require_symbols4(); + var constants2 = require_constants4(); + var EMPTY_BUF = Buffer.alloc(0); + var FastBuffer = Buffer[Symbol.species]; + var removeAllListeners = util.removeAllListeners; + var extractBody; + function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = new WebAssembly.Module(require_llhttp_simd_wasm()); + } catch { + mod = new WebAssembly.Module(llhttpWasmData || require_llhttp_wasm()); + } + return new WebAssembly.Instance(mod, { + env: { + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_url: (p, at2, len) => { + return 0; + }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_status: (p, at2, len) => { + assert(currentParser.ptr === p); + const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)); + }, + /** + * @param {number} p + * @returns {number} + */ + wasm_on_message_begin: (p) => { + assert(currentParser.ptr === p); + return currentParser.onMessageBegin(); + }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_header_field: (p, at2, len) => { + assert(currentParser.ptr === p); + const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)); + }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_header_value: (p, at2, len) => { + assert(currentParser.ptr === p); + const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)); + }, + /** + * @param {number} p + * @param {number} statusCode + * @param {0|1} upgrade + * @param {0|1} shouldKeepAlive + * @returns {number} + */ + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert(currentParser.ptr === p); + return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1); + }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_body: (p, at2, len) => { + assert(currentParser.ptr === p); + const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)); + }, + /** + * @param {number} p + * @returns {number} + */ + wasm_on_message_complete: (p) => { + assert(currentParser.ptr === p); + return currentParser.onMessageComplete(); + } + } + }); + } + var llhttpInstance = null; + var currentParser = null; + var currentBufferRef = null; + var currentBufferSize = 0; + var currentBufferPtr = null; + var USE_NATIVE_TIMER = 0; + var USE_FAST_TIMER = 1; + var TIMEOUT_HEADERS = 2 | USE_FAST_TIMER; + var TIMEOUT_BODY = 4 | USE_FAST_TIMER; + var TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER; + var Parser = class { + /** + * @param {import('./client.js')} client + * @param {import('net').Socket} socket + * @param {*} llhttp + */ + constructor(client, socket, { exports: exports3 }) { + this.llhttp = exports3; + this.ptr = this.llhttp.llhttp_alloc(constants2.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = 0; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(delay, type) { + if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) { + if (type & USE_FAST_TIMER) { + this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + } else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout?.unref(); + } + } + this.timeoutValue = delay; + } else if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + this.timeoutType = type; + } + resume() { + if (this.socket.destroyed || !this.paused) { + return; + } + assert(this.ptr != null); + assert(currentParser === null); + this.llhttp.llhttp_resume(this.ptr); + assert(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) { + break; + } + this.execute(chunk); + } + } + /** + * @param {Buffer} chunk + */ + execute(chunk) { + assert(currentParser === null); + assert(this.ptr != null); + assert(!this.paused); + const { socket, llhttp } = this; + if (chunk.length > currentBufferSize) { + if (currentBufferPtr) { + llhttp.free(currentBufferPtr); + } + currentBufferSize = Math.ceil(chunk.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(chunk); + try { + let ret; + try { + currentBufferRef = chunk; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length); + } catch (err) { + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + if (ret !== constants2.ERROR.OK) { + const data = chunk.subarray(llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr); + if (ret === constants2.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(data); + } else if (ret === constants2.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data); + } else { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants2.ERROR[ret], data); + } + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert(currentParser === null); + assert(this.ptr != null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + this.timeout && timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + /** + * @param {Buffer} buf + * @returns {0} + */ + onStatus(buf) { + this.statusText = buf.toString(); + return 0; + } + /** + * @returns {0|-1} + */ + onMessageBegin() { + const { socket, client } = this; + if (socket.destroyed) { + return -1; + } + const request = client[kQueue][client[kRunningIdx]]; + if (!request) { + return -1; + } + request.onResponseStarted(); + return 0; + } + /** + * @param {Buffer} buf + * @returns {number} + */ + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) { + this.headers.push(buf); + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + } + this.trackHeader(buf.length); + return 0; + } + /** + * @param {Buffer} buf + * @returns {number} + */ + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + } + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") { + this.keepAlive += buf.toString(); + } else if (headerName === "connection") { + this.connection += buf.toString(); + } + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") { + this.contentLength += buf.toString(); + } + this.trackHeader(buf.length); + return 0; + } + /** + * @param {number} len + */ + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) { + util.destroy(this.socket, new HeadersOverflowError()); + } + } + /** + * @param {Buffer} head + */ + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert(upgrade); + assert(client[kSocket] === socket); + assert(!socket.destroyed); + assert(!this.paused); + assert((headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert(request); + assert(request.upgrade || request.method === "CONNECT"); + this.statusCode = 0; + this.statusText = ""; + this.shouldKeepAlive = false; + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + removeAllListeners(socket); + client[kSocket] = null; + client[kHTTPContext] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request.onUpgrade(statusCode, headers, socket); + } catch (err) { + util.destroy(socket, err); + } + client[kResume](); + } + /** + * @param {number} statusCode + * @param {boolean} upgrade + * @param {boolean} shouldKeepAlive + * @returns {number} + */ + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + if (socket.destroyed) { + return -1; + } + const request = client[kQueue][client[kRunningIdx]]; + if (!request) { + return -1; + } + assert(!this.upgrade); + assert(this.statusCode < 200); + if (statusCode === 100) { + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + return -1; + } + assert(this.timeoutType === TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. + request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + if (request.method === "CONNECT") { + assert(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert((this.headers.length & 1) === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min( + keepAliveTimeout - client[kKeepAliveTimeoutThreshold], + client[kKeepAliveMaxTimeout] + ); + if (timeout <= 0) { + socket[kReset] = true; + } else { + client[kKeepAliveTimeoutValue] = timeout; + } + } else { + client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } + } else { + socket[kReset] = true; + } + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) { + return -1; + } + if (request.method === "HEAD") { + return 1; + } + if (statusCode < 200) { + return 1; + } + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause ? constants2.ERROR.PAUSED : 0; + } + /** + * @param {Buffer} buf + * @returns {number} + */ + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) { + return -1; + } + const request = client[kQueue][client[kRunningIdx]]; + assert(request); + assert(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + assert(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request.onData(buf) === false) { + return constants2.ERROR.PAUSED; + } + return 0; + } + /** + * @returns {number} + */ + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) { + return -1; + } + if (upgrade) { + return 0; + } + assert(statusCode >= 100); + assert((this.headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert(request); + this.statusCode = 0; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) { + return 0; + } + if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert(client[kRunning] === 0); + util.destroy(socket, new InformationalError("reset")); + return constants2.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError("reset")); + return constants2.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util.destroy(socket, new InformationalError("reset")); + return constants2.ERROR.PAUSED; + } else if (client[kPipelining] == null || client[kPipelining] === 1) { + setImmediate(client[kResume]); + } else { + client[kResume](); + } + return 0; + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client, paused } = parser.deref(); + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert(!paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!paused) { + util.destroy(socket, new BodyTimeoutError()); + } + } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { + assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + async function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = lazyllhttp(); + } + if (socket.errored) { + throw socket.errored; + } + if (socket.destroyed) { + throw new SocketError("destroyed"); + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + util.addListener(socket, "error", onHttpSocketError); + util.addListener(socket, "readable", onHttpSocketReadable); + util.addListener(socket, "end", onHttpSocketEnd); + util.addListener(socket, "close", onHttpSocketClose); + socket[kClosed] = false; + socket.on("close", onSocketClose); + return { + version: "h1", + defaultPipelining: 1, + write(request) { + return writeH1(client, request); + }, + resume() { + resumeH1(client); + }, + /** + * @param {Error|undefined} err + * @param {() => void} callback + */ + destroy(err, callback) { + if (socket[kClosed]) { + queueMicrotask(callback); + } else { + socket.on("close", callback); + socket.destroy(err); + } + }, + /** + * @returns {boolean} + */ + get destroyed() { + return socket.destroyed; + }, + /** + * @param {import('../core/request.js')} request + * @returns {boolean} + */ + busy(request) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { + return true; + } + if (request) { + if (client[kRunning] > 0 && !request.idempotent) { + return true; + } + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) { + return true; + } + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { + return true; + } + } + return false; + } + }; + } + function onHttpSocketError(err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + const parser = this[kParser]; + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + this[kError] = err; + this[kClient][kOnError](err); + } + function onHttpSocketReadable() { + this[kParser]?.readMore(); + } + function onHttpSocketEnd() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + } + function onHttpSocketClose() { + const parser = this[kParser]; + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + } + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (client.destroyed) { + assert(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function onSocketClose() { + this[kClosed] = true; + } + function resumeH1(client) { + const socket = client[kSocket]; + if (socket && !socket.destroyed) { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { + socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); + } + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH1(client, request) { + const { method, path: path7, host, upgrade, blocking, reset } = request; + let { body, headers, contentLength } = request; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; + if (util.isFormDataLike(body)) { + if (!extractBody) { + extractBody = require_body().extractBody; + } + const [bodyStream, contentType] = extractBody(body); + if (request.contentType == null) { + headers.push("content-type", contentType); + } + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if (util.isBlobLike(body) && request.contentType == null && body.type) { + headers.push("content-type", body.type); + } + if (body && typeof body.read === "function") { + body.read(0); + } + const bodyLength = util.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) { + contentLength = request.contentLength; + } + if (contentLength === 0 && !expectsPayload) { + contentLength = null; + } + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + const abort = (err) => { + if (request.aborted || request.completed) { + return; + } + util.errorRequest(client, request, err || new RequestAbortedError()); + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) { + return false; + } + if (method === "HEAD") { + socket[kReset] = true; + } + if (upgrade || method === "CONNECT") { + socket[kReset] = true; + } + if (reset != null) { + socket[kReset] = reset; + } + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { + socket[kReset] = true; + } + if (blocking) { + socket[kBlocking] = true; + } + let header = `${method} ${path7} HTTP/1.1\r +`; + if (typeof host === "string") { + header += `host: ${host}\r +`; + } else { + header += client[kHostHeader]; + } + if (upgrade) { + header += `connection: upgrade\r +upgrade: ${upgrade}\r +`; + } else if (client[kPipelining] && !socket[kReset]) { + header += "connection: keep-alive\r\n"; + } else { + header += "connection: close\r\n"; + } + if (Array.isArray(headers)) { + for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + header += `${key}: ${val[i]}\r +`; + } + } else { + header += `${key}: ${val}\r +`; + } + } + } + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request, headers: header, socket }); + } + if (!body || bodyLength === 0) { + writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + } else if (util.isBuffer(body)) { + writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + } else { + writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + } + } else if (util.isStream(body)) { + writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + } else if (util.isIterable(body)) { + writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + } else { + assert(false); + } + return true; + } + function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + let finished = false; + const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }); + const onData = function(chunk) { + if (finished) { + return; + } + try { + if (!writer.write(chunk) && this.pause) { + this.pause(); + } + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) { + return; + } + if (body.resume) { + body.resume(); + } + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) { + return; + } + finished = true; + assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); + if (!err) { + try { + writer.end(); + } catch (er) { + err = er; + } + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { + util.destroy(body, err); + } else { + util.destroy(body); + } + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); + if (body.resume) { + body.resume(); + } + socket.on("drain", onDrain).on("error", onFinished); + if (body.errorEmitted ?? body.errored) { + setImmediate(onFinished, body.errored); + } else if (body.endEmitted ?? body.readableEnded) { + setImmediate(onFinished, null); + } + if (body.closeEmitted ?? body.closed) { + setImmediate(onClose); + } + } + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + assert(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r +`, "latin1"); + } + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + socket.write(body); + socket.uncork(); + request.onBodySent(body); + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + } + request.onRequestSent(); + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError(); + } + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + socket.write(buffer); + socket.uncork(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert(callback === null); + if (socket[kError]) { + reject(socket[kError]); + } else { + callback = resolve; + } + }); + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }); + try { + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError]; + } + if (!writer.write(chunk)) { + await waitForDrain(); + } + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + /** + * + * @param {object} arg + * @param {AbortCallback} arg.abort + * @param {import('net').Socket} arg.socket + * @param {import('../core/request.js')} arg.request + * @param {number} arg.contentLength + * @param {import('./client.js')} arg.client + * @param {boolean} arg.expectsPayload + * @param {string} arg.header + */ + constructor({ abort, socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[kWriting] = true; + } + /** + * @param {Buffer} chunk + * @returns + */ + write(chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) { + throw socket[kError]; + } + if (socket.destroyed) { + return false; + } + const len = Buffer.byteLength(chunk); + if (!len) { + return true; + } + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + if (contentLength === null) { + socket.write(`${header}transfer-encoding: chunked\r +`, "latin1"); + } else { + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + } + } + if (contentLength === null) { + socket.write(`\r +${len.toString(16)}\r +`, "latin1"); + } + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } + } + return ret; + } + /** + * @returns {void} + */ + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; + request.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) { + throw socket[kError]; + } + if (socket.destroyed) { + return; + } + if (bytesWritten === 0) { + if (expectsPayload) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + socket.write(`${header}\r +`, "latin1"); + } + } else if (contentLength === null) { + socket.write("\r\n0\r\n\r\n", "latin1"); + } + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } else { + process.emitWarning(new RequestContentLengthMismatchError()); + } + } + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } + client[kResume](); + } + /** + * @param {Error} [err] + * @returns {void} + */ + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); + } + } + }; + module2.exports = connectH1; + } +}); + +// node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = __commonJS({ + "node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { pipeline } = require("node:stream"); + var util = require_util4(); + var { + RequestContentLengthMismatchError, + RequestAbortedError, + SocketError, + InformationalError + } = require_errors5(); + var { + kUrl, + kReset, + kClient, + kRunning, + kPending, + kQueue, + kPendingIdx, + kRunningIdx, + kError, + kSocket, + kStrictContentLength, + kOnError, + kMaxConcurrentStreams, + kHTTP2Session, + kResume, + kSize, + kHTTPContext, + kClosed, + kBodyTimeout + } = require_symbols4(); + var { channels } = require_diagnostics(); + var kOpenStreams = Symbol("open streams"); + var extractBody; + var http2; + try { + http2 = require("node:http2"); + } catch { + http2 = { constants: {} }; + } + var { + constants: { + HTTP2_HEADER_AUTHORITY, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_CONTENT_LENGTH, + HTTP2_HEADER_EXPECT, + HTTP2_HEADER_STATUS + } + } = http2; + function parseH2Headers(headers) { + const result = []; + for (const [name, value] of Object.entries(headers)) { + if (Array.isArray(value)) { + for (const subvalue of value) { + result.push(Buffer.from(name), Buffer.from(subvalue)); + } + } else { + result.push(Buffer.from(name), Buffer.from(value)); + } + } + return result; + } + async function connectH2(client, socket) { + client[kSocket] = socket; + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams], + settings: { + // TODO(metcoder95): add support for PUSH + enablePush: false + } + }); + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + session[kHTTP2Session] = null; + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHttp2SessionGoAway); + util.addListener(session, "close", onHttp2SessionClose); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", onHttp2SocketError); + util.addListener(socket, "end", onHttp2SocketEnd); + util.addListener(socket, "close", onHttp2SocketClose); + socket[kClosed] = false; + socket.on("close", onSocketClose); + return { + version: "h2", + defaultPipelining: Infinity, + write(request) { + return writeH2(client, request); + }, + resume() { + resumeH2(client); + }, + destroy(err, callback) { + if (socket[kClosed]) { + queueMicrotask(callback); + } else { + socket.destroy(err).on("close", callback); + } + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + } + }; + } + function resumeH2(client) { + const socket = client[kSocket]; + if (socket?.destroyed === false) { + if (client[kSize] === 0 || client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); + } + } + } + function onHttp2SessionError(err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type, code, id2) { + if (id2 === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + function onHttp2SessionEnd() { + const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + this.destroy(err); + util.destroy(this[kSocket], err); + } + function onHttp2SessionGoAway(errorCode) { + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode}`, util.getSocketInfo(this[kSocket])); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + this.close(); + this[kHTTP2Session] = null; + util.destroy(this[kSocket], err); + if (client[kRunningIdx] < client[kQueue].length) { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + client[kPendingIdx] = client[kRunningIdx]; + } + assert(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client.emit("connectionError", client[kUrl], [client], err); + client[kResume](); + } + function onHttp2SessionClose() { + const { [kClient]: client } = this; + const { [kSocket]: socket } = client; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket)); + client[kSocket] = null; + client[kHTTPContext] = null; + if (client.destroyed) { + assert(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } + } + function onHttp2SocketClose() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + const client = this[kHTTP2Session][kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (this[kHTTP2Session] !== null) { + this[kHTTP2Session].destroy(err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function onHttp2SocketError(err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + } + function onHttp2SocketEnd() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + } + function onSocketClose() { + this[kClosed] = true; + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request) { + const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout]; + const session = client[kHTTP2Session]; + const { method, path: path7, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + let { body } = request; + if (upgrade) { + util.errorRequest(client, request, new Error("Upgrade not supported for H2")); + return false; + } + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + if (headers[key]) { + headers[key] += `, ${val[i]}`; + } else { + headers[key] = val[i]; + } + } + } else if (headers[key]) { + headers[key] += `, ${val}`; + } else { + headers[key] = val; + } + } + let stream = null; + const { hostname, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + const abort = (err) => { + if (request.aborted || request.completed) { + return; + } + err = err || new RequestAbortedError(); + util.errorRequest(client, request, err); + if (stream != null) { + stream.removeAllListeners("data"); + stream.close(); + client[kOnError](err); + client[kResume](); + } + util.destroy(body, err); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) { + return false; + } + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { endStream: false, signal }); + if (!stream.pending) { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + } else { + stream.once("ready", () => { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + } + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + stream.setTimeout(requestTimeout); + return true; + } + headers[HTTP2_HEADER_PATH] = path7; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") { + body.read(0); + } + let contentLength = util.bodyLength(body); + if (util.isFormDataLike(body)) { + extractBody ??= require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + headers["content-type"] = contentType; + body = bodyStream.stream; + contentLength = bodyStream.length; + } + if (contentLength == null) { + contentLength = request.contentLength; + } + if (contentLength === 0 || !expectsPayload) { + contentLength = null; + } + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request, headers: header, socket: session[kSocket] }); + } + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { endStream: shouldEndStream, signal }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.setTimeout(requestTimeout); + stream.once("response", (headers2) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; + request.onResponseStarted(); + if (request.aborted) { + stream.removeAllListeners("data"); + return; + } + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) { + stream.pause(); + } + }); + stream.on("data", (chunk) => { + if (request.onData(chunk) === false) { + stream.pause(); + } + }); + stream.once("end", (err) => { + stream.removeAllListeners("data"); + if (stream.state?.state == null || stream.state.state < 6) { + if (!request.aborted && !request.completed) { + request.onComplete({}); + } + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + } else { + --session[kOpenStreams]; + if (session[kOpenStreams] === 0) { + session.unref(); + } + abort(err ?? new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); + } + }); + stream.once("close", () => { + stream.removeAllListeners("data"); + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) { + session.unref(); + } + }); + stream.once("error", function(err) { + stream.removeAllListeners("data"); + abort(err); + }); + stream.once("frameError", (type, code) => { + stream.removeAllListeners("data"); + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + }); + stream.on("aborted", () => { + stream.removeAllListeners("data"); + }); + stream.on("timeout", () => { + const err = new InformationalError(`HTTP/2: "stream timeout after ${requestTimeout}"`); + stream.removeAllListeners("data"); + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) { + session.unref(); + } + abort(err); + }); + stream.once("trailers", (trailers) => { + if (request.aborted || request.completed) { + return; + } + request.onComplete(trailers); + }); + return true; + function writeBodyH2() { + if (!body || contentLength === 0) { + writeBuffer( + abort, + stream, + null, + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } else if (util.isBuffer(body)) { + writeBuffer( + abort, + stream, + body, + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable( + abort, + stream, + body.stream(), + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } else { + writeBlob( + abort, + stream, + body, + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } + } else if (util.isStream(body)) { + writeStream( + abort, + client[kSocket], + expectsPayload, + stream, + body, + client, + request, + contentLength + ); + } else if (util.isIterable(body)) { + writeIterable( + abort, + stream, + body, + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } else { + assert(false); + } + } + } + function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + try { + if (body != null && util.isBuffer(body)) { + assert(contentLength === body.byteLength, "buffer body must have content length"); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(body); + } + if (!expectsPayload) { + socket[kReset] = true; + } + request.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe = pipeline( + body, + h2stream, + (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } + } + ); + util.addListener(pipe, "data", onPipeData); + function onPipeData(chunk) { + request.onBodySent(chunk); + } + } + async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError(); + } + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert(callback === null); + if (socket[kError]) { + reject(socket[kError]); + } else { + callback = resolve; + } + }); + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError]; + } + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) { + await waitForDrain(); + } + } + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + module2.exports = connectH2; + } +}); + +// node_modules/undici/lib/dispatcher/client.js +var require_client = __commonJS({ + "node_modules/undici/lib/dispatcher/client.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var net = require("node:net"); + var http = require("node:http"); + var util = require_util4(); + var { ClientStats } = require_stats(); + var { channels } = require_diagnostics(); + var Request = require_request3(); + var DispatcherBase = require_dispatcher_base(); + var { + InvalidArgumentError, + InformationalError, + ClientDestroyedError + } = require_errors5(); + var buildConnector = require_connect(); + var { + kUrl, + kServerName, + kClient, + kBusy, + kConnect, + kResuming, + kRunning, + kPending, + kSize, + kQueue, + kConnected, + kConnecting, + kNeedDrain, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kConnector, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kLocalAddress, + kMaxResponseSize, + kOnError, + kHTTPContext, + kMaxConcurrentStreams, + kResume + } = require_symbols4(); + var connectH1 = require_client_h1(); + var connectH2 = require_client_h2(); + var kClosedResolve = Symbol("kClosedResolve"); + var getDefaultNodeMaxHeaderSize = http && http.maxHeaderSize && Number.isInteger(http.maxHeaderSize) && http.maxHeaderSize > 0 ? () => http.maxHeaderSize : () => { + throw new InvalidArgumentError("http module not available or http.maxHeaderSize invalid"); + }; + var noop = () => { + }; + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; + } + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url, { + maxHeaderSize, + headersTimeout, + socketTimeout, + requestTimeout, + connectTimeout, + bodyTimeout, + idleTimeout, + keepAlive, + keepAliveTimeout, + maxKeepAliveTimeout, + keepAliveMaxTimeout, + keepAliveTimeoutThreshold, + socketPath, + pipelining, + tls, + strictContentLength, + maxCachedSessions, + connect: connect2, + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + maxConcurrentStreams, + allowH2 + } = {}) { + if (keepAlive !== void 0) { + throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + } + if (socketTimeout !== void 0) { + throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + } + if (requestTimeout !== void 0) { + throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + } + if (idleTimeout !== void 0) { + throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + } + if (maxKeepAliveTimeout !== void 0) { + throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + } + if (maxHeaderSize != null) { + if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) { + throw new InvalidArgumentError("invalid maxHeaderSize"); + } + } else { + maxHeaderSize = getDefaultNodeMaxHeaderSize(); + } + if (socketPath != null && typeof socketPath !== "string") { + throw new InvalidArgumentError("invalid socketPath"); + } + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { + throw new InvalidArgumentError("invalid connectTimeout"); + } + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveTimeout"); + } + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + } + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { + throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + } + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + } + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + } + if (connect2 != null && typeof connect2 !== "function" && typeof connect2 !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { + throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + } + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) { + throw new InvalidArgumentError("localAddress must be valid string IP address"); + } + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { + throw new InvalidArgumentError("maxResponseSize must be a positive number"); + } + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { + throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + } + if (allowH2 != null && typeof allowH2 !== "boolean") { + throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + } + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { + throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + } + super(); + if (typeof connect2 !== "function") { + connect2 = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...typeof autoSelectFamily === "boolean" ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect2 + }); + } + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect2; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r +`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTPContext] = null; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + this[kResume](true); + } + get stats() { + return new ClientStats(this); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + } + get [kBusy]() { + return Boolean( + this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0 + ); + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const origin = opts.origin || this[kUrl].origin; + const request = new Request(origin, opts, handler); + this[kQueue].push(request); + if (this[kResuming]) { + } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + this[kResuming] = 1; + queueMicrotask(() => resume(this)); + } else { + this[kResume](true); + } + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { + this[kNeedDrain] = 2; + } + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve) => { + if (this[kSize]) { + this[kClosedResolve] = resolve; + } else { + resolve(null); + } + }); + } + async [kDestroy](err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(this, request, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else { + queueMicrotask(callback); + } + this[kResume](); + }); + } + }; + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + assert(client[kSize] === 0); + } + } + async function connect(client) { + assert(!client[kConnecting]); + assert(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert(idx !== -1); + const ip = hostname.substring(1, idx); + assert(net.isIPv6(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) { + channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + } + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket2) => { + if (err) { + reject(err); + } else { + resolve(socket2); + } + }); + }); + if (client.destroyed) { + util.destroy(socket.on("error", noop), new ClientDestroyedError()); + return; + } + assert(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", noop); + throw err; + } + client[kConnecting] = false; + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + if (channels.connected.hasSubscribers) { + channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + } + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) { + return; + } + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) { + channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + } + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request, err); + } + } else { + onError(client, err); + } + client.emit("connectionError", client[kUrl], [client], err); + } + client[kResume](); + } + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) { + return; + } + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + if (client[kHTTPContext]) { + client[kHTTPContext].resume(); + } + if (client[kBusy]) { + client[kNeedDrain] = 2; + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else { + emitDrain(client); + } + continue; + } + if (client[kPending] === 0) { + return; + } + if (client[kRunning] >= (getPipelining(client) || 1)) { + return; + } + const request = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) { + return; + } + client[kServerName] = request.servername; + client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { + client[kHTTPContext] = null; + resume(client); + }); + } + if (client[kConnecting]) { + return; + } + if (!client[kHTTPContext]) { + connect(client); + return; + } + if (client[kHTTPContext].destroyed) { + return; + } + if (client[kHTTPContext].busy(request)) { + return; + } + if (!request.aborted && client[kHTTPContext].write(request)) { + client[kPendingIdx]++; + } else { + client[kQueue].splice(client[kPendingIdx], 1); + } + } + } + module2.exports = Client; + } +}); + +// node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue = __commonJS({ + "node_modules/undici/lib/dispatcher/fixed-queue.js"(exports2, module2) { + "use strict"; + var kSize = 2048; + var kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize).fill(void 0); + this.next = null; + } + /** + * @returns {boolean} + */ + isEmpty() { + return this.top === this.bottom; + } + /** + * @returns {boolean} + */ + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + /** + * @param {T} data + * @returns {void} + */ + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + /** + * @returns {T|null} + */ + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) { + return null; + } + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module2.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + /** + * @returns {boolean} + */ + isEmpty() { + return this.head.isEmpty(); + } + /** + * @param {T} data + */ + push(data) { + if (this.head.isFull()) { + this.head = this.head.next = new FixedCircularBuffer(); + } + this.head.push(data); + } + /** + * @returns {T|null} + */ + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) { + this.tail = tail.next; + tail.next = null; + } + return next; + } + }; + } +}); + +// node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base = __commonJS({ + "node_modules/undici/lib/dispatcher/pool-base.js"(exports2, module2) { + "use strict"; + var { PoolStats } = require_stats(); + var DispatcherBase = require_dispatcher_base(); + var FixedQueue = require_fixed_queue(); + var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols4(); + var kClients = Symbol("clients"); + var kNeedDrain = Symbol("needDrain"); + var kQueue = Symbol("queue"); + var kClosedResolve = Symbol("closed resolve"); + var kOnDrain = Symbol("onDrain"); + var kOnConnect = Symbol("onConnect"); + var kOnDisconnect = Symbol("onDisconnect"); + var kOnConnectionError = Symbol("onConnectionError"); + var kGetDispatcher = Symbol("get dispatcher"); + var kAddClient = Symbol("add client"); + var kRemoveClient = Symbol("remove client"); + var PoolBase = class extends DispatcherBase { + constructor() { + super(); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) { + break; + } + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) { + Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + } + }; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) { + ret += pending; + } + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) { + ret += running; + } + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) { + ret += size; + } + return ret; + } + get stats() { + return new PoolStats(this); + } + async [kClose]() { + if (this[kQueue].isEmpty()) { + await Promise.all(this[kClients].map((c) => c.close())); + } else { + await new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) { + break; + } + item.handler.onError(err); + } + await Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ opts, handler }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) { + queueMicrotask(() => { + if (this[kNeedDrain]) { + this[kOnDrain](client[kUrl], [this, client]); + } + }); + } + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) { + this[kClients].splice(idx, 1); + } + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module2.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; + } +}); + +// node_modules/undici/lib/dispatcher/pool.js +var require_pool = __commonJS({ + "node_modules/undici/lib/dispatcher/pool.js"(exports2, module2) { + "use strict"; + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher, + kRemoveClient + } = require_pool_base(); + var Client = require_client(); + var { + InvalidArgumentError + } = require_errors5(); + var util = require_util4(); + var { kUrl } = require_symbols4(); + var buildConnector = require_connect(); + var kOptions = Symbol("options"); + var kConnections = Symbol("connections"); + var kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { + connections, + factory = defaultFactory, + connect, + connectTimeout, + tls, + maxCachedSessions, + socketPath, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + allowH2, + clientTtl, + ...options + } = {}) { + if (connections != null && (!Number.isFinite(connections) || connections < 0)) { + throw new InvalidArgumentError("invalid connections"); + } + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + if (connect != null && typeof connect !== "function" && typeof connect !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + super(); + if (typeof connect !== "function") { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...typeof autoSelectFamily === "boolean" ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect + }); + } + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory] = factory; + this.on("connect", (origin2, targets) => { + if (clientTtl != null && clientTtl > 0) { + for (const target of targets) { + Object.assign(target, { ttl: Date.now() }); + } + } + }); + this.on("connectionError", (origin2, targets, error) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) { + this[kClients].splice(idx, 1); + } + } + }); + } + [kGetDispatcher]() { + const clientTtlOption = this[kOptions].clientTtl; + for (const client of this[kClients]) { + if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && Date.now() - client.ttl > clientTtlOption) { + this[kRemoveClient](client); + } else if (!client[kNeedDrain]) { + return client; + } + } + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + }; + module2.exports = Pool; + } +}); + +// node_modules/undici/lib/dispatcher/balanced-pool.js +var require_balanced_pool = __commonJS({ + "node_modules/undici/lib/dispatcher/balanced-pool.js"(exports2, module2) { + "use strict"; + var { + BalancedPoolMissingUpstreamError, + InvalidArgumentError + } = require_errors5(); + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + } = require_pool_base(); + var Pool = require_pool(); + var { kUrl } = require_symbols4(); + var { parseOrigin } = require_util4(); + var kFactory = Symbol("factory"); + var kOptions = Symbol("options"); + var kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + var kCurrentWeight = Symbol("kCurrentWeight"); + var kIndex = Symbol("kIndex"); + var kWeight = Symbol("kWeight"); + var kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + var kErrorPenalty = Symbol("kErrorPenalty"); + function getGreatestCommonDivisor(a, b) { + if (a === 0) return b; + while (b !== 0) { + const t = b; + b = a % b; + a = t; + } + return a; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + super(); + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) { + upstreams = [upstreams]; + } + this[kFactory] = factory; + for (const upstream of upstreams) { + this.addUpstream(upstream); + } + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true)) { + return this; + } + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients]) { + client[kWeight] = this[kMaxWeightPerServer]; + } + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + let result = 0; + for (let i = 0; i < this[kClients].length; i++) { + result = getGreatestCommonDivisor(this[kClients][i][kWeight], result); + } + this[kGreatestCommonDivisor] = result; + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true); + if (pool) { + this[kRemoveClient](pool); + } + return this; + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) { + throw new BalancedPoolMissingUpstreamError(); + } + const dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain] && dispatcher2.closed !== true && dispatcher2.destroyed !== true); + if (!dispatcher) { + return; + } + const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true); + if (allClientsBusy) { + return; + } + let counter = 0; + let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length; + const pool = this[kClients][this[kIndex]]; + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { + maxWeightIndex = this[kIndex]; + } + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) { + this[kCurrentWeight] = this[kMaxWeightPerServer]; + } + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) { + return pool; + } + } + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module2.exports = BalancedPool; + } +}); + +// node_modules/undici/lib/dispatcher/agent.js +var require_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/agent.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError } = require_errors5(); + var { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = require_symbols4(); + var DispatcherBase = require_dispatcher_base(); + var Pool = require_pool(); + var Client = require_client(); + var util = require_util4(); + var kOnConnect = Symbol("onConnect"); + var kOnDisconnect = Symbol("onDisconnect"); + var kOnConnectionError = Symbol("onConnectionError"); + var kOnDrain = Symbol("onDrain"); + var kFactory = Symbol("factory"); + var kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent = class extends DispatcherBase { + constructor({ factory = defaultFactory, connect, ...options } = {}) { + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + if (connect != null && typeof connect !== "function" && typeof connect !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + super(); + if (connect && typeof connect !== "function") { + connect = { ...connect }; + } + this[kOptions] = { ...util.deepClone(options), connect }; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const { dispatcher } of this[kClients].values()) { + ret += dispatcher[kRunning]; + } + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) { + key = String(opts.origin); + } else { + throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + } + const result = this[kClients].get(key); + let dispatcher = result && result.dispatcher; + if (!dispatcher) { + const closeClientIfUnused = (connected) => { + const result2 = this[kClients].get(key); + if (result2) { + if (connected) result2.count -= 1; + if (result2.count <= 0) { + this[kClients].delete(key); + result2.dispatcher.close(); + } + } + }; + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", (origin, targets) => { + const result2 = this[kClients].get(key); + if (result2) { + result2.count += 1; + } + this[kOnConnect](origin, targets); + }).on("disconnect", (origin, targets, err) => { + closeClientIfUnused(true); + this[kOnDisconnect](origin, targets, err); + }).on("connectionError", (origin, targets, err) => { + closeClientIfUnused(false); + this[kOnConnectionError](origin, targets, err); + }); + this[kClients].set(key, { count: 0, dispatcher }); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose]() { + const closePromises = []; + for (const { dispatcher } of this[kClients].values()) { + closePromises.push(dispatcher.close()); + } + this[kClients].clear(); + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const { dispatcher } of this[kClients].values()) { + destroyPromises.push(dispatcher.destroy(err)); + } + this[kClients].clear(); + await Promise.all(destroyPromises); + } + get stats() { + const allClientStats = {}; + for (const { dispatcher } of this[kClients].values()) { + if (dispatcher.stats) { + allClientStats[dispatcher[kUrl].origin] = dispatcher.stats; + } + } + return allClientStats; + } + }; + module2.exports = Agent; + } +}); + +// node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/proxy-agent.js"(exports2, module2) { + "use strict"; + var { kProxy, kClose, kDestroy, kDispatch } = require_symbols4(); + var Agent = require_agent(); + var Pool = require_pool(); + var DispatcherBase = require_dispatcher_base(); + var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors5(); + var buildConnector = require_connect(); + var Client = require_client(); + var kAgent = Symbol("proxy agent"); + var kClient = Symbol("proxy client"); + var kProxyHeaders = Symbol("proxy headers"); + var kRequestTls = Symbol("request tls settings"); + var kProxyTls = Symbol("proxy tls settings"); + var kConnectEndpoint = Symbol("connect endpoint function"); + var kTunnelProxy = Symbol("tunnel proxy"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var noop = () => { + }; + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) { + return new Client(origin, opts); + } + return new Pool(origin, opts); + } + var Http1ProxyWrapper = class extends DispatcherBase { + #client; + constructor(proxyUrl, { headers = {}, connect, factory }) { + super(); + if (!proxyUrl) { + throw new InvalidArgumentError("Proxy URL is mandatory"); + } + this[kProxyHeaders] = headers; + if (factory) { + this.#client = factory(proxyUrl, { connect }); + } else { + this.#client = new Client(proxyUrl, { connect }); + } + } + [kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function(statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === "function") { + handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); + } + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + const { + origin, + path: path7 = "/", + headers = {} + } = opts; + opts.path = origin + path7; + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL(origin); + headers.host = host; + } + opts.headers = { ...this[kProxyHeaders], ...headers }; + return this.#client[kDispatch](opts, handler); + } + async [kClose]() { + return this.#client.close(); + } + async [kDestroy](err) { + return this.#client.destroy(err); + } + }; + var ProxyAgent = class extends DispatcherBase { + constructor(opts) { + if (!opts || typeof opts === "object" && !(opts instanceof URL) && !opts.uri) { + throw new InvalidArgumentError("Proxy uri is mandatory"); + } + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") { + throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + } + const { proxyTunnel = true } = opts; + super(); + const url = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; + this[kProxy] = { uri: href, protocol }; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + this[kTunnelProxy] = proxyTunnel; + if (opts.auth && opts.token) { + throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + } else if (opts.auth) { + this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + } else if (opts.token) { + this[kProxyHeaders]["proxy-authorization"] = opts.token; + } else if (username && password) { + this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + } + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + const agentFactory = opts.factory || defaultAgentFactory; + const factory = (origin2, options) => { + const { protocol: protocol2 } = new URL(origin2); + if (!this[kTunnelProxy] && protocol2 === "http:" && this[kProxy].protocol === "http:") { + return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); + } + return agentFactory(origin2, options); + }; + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + factory, + connect: async (opts2, callback) => { + let requestedPath = opts2.host; + if (!opts2.port) { + requestedPath += `:${defaultProtocolPort(opts2.protocol)}`; + } + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts2.signal, + headers: { + ...this[kProxyHeaders], + host: opts2.host, + ...opts2.connections == null || opts2.connections > 0 ? { "proxy-connection": "keep-alive" } : {} + }, + servername: this[kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on("error", noop).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts2.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) { + servername = this[kRequestTls].servername; + } else { + servername = opts2.servername; + } + this[kConnectEndpoint]({ ...opts2, servername, httpSocket: socket }, callback); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + callback(new SecureProxyConnectionError(err)); + } else { + callback(err); + } + } + } + }); + } + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL(opts.origin); + headers.host = host; + } + return this[kAgent].dispatch( + { + ...opts, + headers + }, + handler + ); + } + /** + * @param {import('../../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") { + return new URL(opts); + } else if (opts instanceof URL) { + return opts; + } else { + return new URL(opts.uri); + } + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + function buildHeaders(headers) { + if (Array.isArray(headers)) { + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) { + headersPair[headers[i]] = headers[i + 1]; + } + return headersPair; + } + return headers; + } + function throwIfProxyAuthIsSent(headers) { + const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); + if (existProxyAuth) { + throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + } + module2.exports = ProxyAgent; + } +}); + +// node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +var require_env_http_proxy_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports2, module2) { + "use strict"; + var DispatcherBase = require_dispatcher_base(); + var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols4(); + var ProxyAgent = require_proxy_agent(); + var Agent = require_agent(); + var DEFAULT_PORTS = { + "http:": 80, + "https:": 443 + }; + var EnvHttpProxyAgent = class extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}) { + super(); + this.#opts = opts; + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + this[kNoProxyAgent] = new Agent(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) { + this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }); + } else { + this[kHttpProxyAgent] = this[kNoProxyAgent]; + } + const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) { + this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }); + } else { + this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + } + this.#parseNoProxy(); + } + [kDispatch](opts, handler) { + const url = new URL(opts.origin); + const agent = this.#getProxyAgentForUrl(url); + return agent.dispatch(opts, handler); + } + async [kClose]() { + await this[kNoProxyAgent].close(); + if (!this[kHttpProxyAgent][kClosed]) { + await this[kHttpProxyAgent].close(); + } + if (!this[kHttpsProxyAgent][kClosed]) { + await this[kHttpsProxyAgent].close(); + } + } + async [kDestroy](err) { + await this[kNoProxyAgent].destroy(err); + if (!this[kHttpProxyAgent][kDestroyed]) { + await this[kHttpProxyAgent].destroy(err); + } + if (!this[kHttpsProxyAgent][kDestroyed]) { + await this[kHttpsProxyAgent].destroy(err); + } + } + #getProxyAgentForUrl(url) { + let { protocol, host: hostname, port } = url; + hostname = hostname.replace(/:\d*$/, "").toLowerCase(); + port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) { + return this[kNoProxyAgent]; + } + if (protocol === "https:") { + return this[kHttpsProxyAgent]; + } + return this[kHttpProxyAgent]; + } + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) { + this.#parseNoProxy(); + } + if (this.#noProxyEntries.length === 0) { + return true; + } + if (this.#noProxyValue === "*") { + return false; + } + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) { + continue; + } + if (!/^[.*]/.test(entry.hostname)) { + if (hostname === entry.hostname) { + return false; + } + } else { + if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) { + return false; + } + } + } + return true; + } + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; + if (!entry) { + continue; + } + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); + } + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; + } + get #noProxyChanged() { + if (this.#opts.noProxy !== void 0) { + return false; + } + return this.#noProxyValue !== this.#noProxyEnv; + } + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + } + }; + module2.exports = EnvHttpProxyAgent; + } +}); + +// node_modules/undici/lib/handler/retry-handler.js +var require_retry_handler = __commonJS({ + "node_modules/undici/lib/handler/retry-handler.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { kRetryHandlerDefaultRetry } = require_symbols4(); + var { RequestRetryError } = require_errors5(); + var WrapHandler = require_wrap_handler(); + var { + isDisturbed, + parseRangeHeader, + wrapRequestBody + } = require_util4(); + function calculateRetryAfterHeader(retryAfter) { + const retryTime = new Date(retryAfter).getTime(); + return isNaN(retryTime) ? 0 : retryTime - Date.now(); + } + var RetryHandler = class _RetryHandler { + constructor(opts, { dispatch, handler }) { + const { retryOptions, ...dispatchOpts } = opts; + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + methods, + errorCodes, + retryAfter, + statusCodes, + throwOnError + } = retryOptions ?? {}; + this.error = null; + this.dispatch = dispatch; + this.handler = WrapHandler.wrap(handler); + this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) }; + this.retryOpts = { + throwOnError: throwOnError ?? true, + retry: retryFn ?? _RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + // 30s, + minTimeout: minTimeout ?? 500, + // .5s + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + // What errors we should retry + methods: methods ?? ["GET", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"], + // Indicates which errors to retry + statusCodes: statusCodes ?? [500, 502, 503, 504, 429], + // List of errors to retry + errorCodes: errorCodes ?? [ + "ECONNRESET", + "ECONNREFUSED", + "ENOTFOUND", + "ENETDOWN", + "ENETUNREACH", + "EHOSTDOWN", + "EHOSTUNREACH", + "EPIPE", + "UND_ERR_SOCKET" + ] + }; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.headersSent = false; + this.start = 0; + this.end = null; + this.etag = null; + } + onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err) { + if (this.retryOpts.throwOnError) { + if (this.retryOpts.statusCodes.includes(statusCode) === false) { + this.headersSent = true; + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); + } else { + this.error = err; + } + return; + } + if (isDisturbed(this.opts.body)) { + this.headersSent = true; + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); + return; + } + function shouldRetry(passedErr) { + if (passedErr) { + this.headersSent = true; + this.headersSent = true; + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); + controller.resume(); + return; + } + this.error = err; + controller.resume(); + } + controller.pause(); + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + shouldRetry.bind(this) + ); + } + onRequestStart(controller, context) { + if (!this.headersSent) { + this.handler.onRequestStart?.(controller, context); + } + } + onRequestUpgrade(controller, statusCode, headers, socket) { + this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { + maxRetries, + minTimeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods + } = retryOptions; + const { counter } = state; + if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(headers["retry-after"]) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(() => cb(null), retryTimeout); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + this.error = null; + this.retryCount += 1; + if (statusCode >= 300) { + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { + count: this.retryCount + } + }); + this.onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err); + return; + } + if (this.headersSent) { + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + throw new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { + headers, + data: { count: this.retryCount } + }); + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + throw new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + }); + } + if (this.etag != null && this.etag !== headers.etag) { + throw new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + }); + } + const { start, size, end = size ? size - 1 : null } = contentRange; + assert(this.start === start, "content-range mismatch"); + assert(this.end == null || this.end === end, "content-range mismatch"); + return; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) { + this.headersSent = true; + this.handler.onResponseStart?.( + controller, + statusCode, + headers, + statusMessage + ); + return; + } + const { start, size, end = size ? size - 1 : null } = range; + assert( + start != null && Number.isFinite(start), + "content-range mismatch" + ); + assert(end != null && Number.isFinite(end), "invalid content-length"); + this.start = start; + this.end = end; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) - 1 : null; + } + assert(Number.isFinite(this.start)); + assert( + this.end == null || Number.isFinite(this.end), + "invalid content-length" + ); + this.resume = true; + this.etag = headers.etag != null ? headers.etag : null; + if (this.etag != null && this.etag[0] === "W" && this.etag[1] === "/") { + this.etag = null; + } + this.headersSent = true; + this.handler.onResponseStart?.( + controller, + statusCode, + headers, + statusMessage + ); + } else { + throw new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); + } + } + onResponseData(controller, chunk) { + if (this.error) { + return; + } + this.start += chunk.length; + this.handler.onResponseData?.(controller, chunk); + } + onResponseEnd(controller, trailers) { + if (this.error && this.retryOpts.throwOnError) { + throw this.error; + } + if (!this.error) { + this.retryCount = 0; + return this.handler.onResponseEnd?.(controller, trailers); + } + this.retry(controller); + } + retry(controller) { + if (this.start !== 0) { + const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; + if (this.etag != null) { + headers["if-match"] = this.etag; + } + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + }; + } + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onResponseError?.(controller, err); + } + } + onResponseError(controller, err) { + if (controller?.aborted || isDisturbed(this.opts.body)) { + this.handler.onResponseError?.(controller, err); + return; + } + function shouldRetry(returnedErr) { + if (!returnedErr) { + this.retry(controller); + return; + } + this.handler?.onResponseError?.(controller, returnedErr); + } + if (this.retryCount - this.retryCountCheckpoint > 0) { + this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + } else { + this.retryCount += 1; + } + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + shouldRetry.bind(this) + ); + } + }; + module2.exports = RetryHandler; + } +}); + +// node_modules/undici/lib/dispatcher/retry-agent.js +var require_retry_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/retry-agent.js"(exports2, module2) { + "use strict"; + var Dispatcher = require_dispatcher(); + var RetryHandler = require_retry_handler(); + var RetryAgent = class extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options = {}) { + super(options); + this.#agent = agent; + this.#options = options; + } + dispatch(opts, handler) { + const retry = new RetryHandler({ + ...opts, + retryOptions: this.#options + }, { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler + }); + return this.#agent.dispatch(opts, retry); + } + close() { + return this.#agent.close(); + } + destroy() { + return this.#agent.destroy(); + } + }; + module2.exports = RetryAgent; + } +}); + +// node_modules/undici/lib/dispatcher/h2c-client.js +var require_h2c_client = __commonJS({ + "node_modules/undici/lib/dispatcher/h2c-client.js"(exports2, module2) { + "use strict"; + var { connect } = require("node:net"); + var { kClose, kDestroy } = require_symbols4(); + var { InvalidArgumentError } = require_errors5(); + var util = require_util4(); + var Client = require_client(); + var DispatcherBase = require_dispatcher_base(); + var H2CClient = class extends DispatcherBase { + #client = null; + constructor(origin, clientOpts) { + super(); + if (typeof origin === "string") { + origin = new URL(origin); + } + if (origin.protocol !== "http:") { + throw new InvalidArgumentError( + "h2c-client: Only h2c protocol is supported" + ); + } + const { connect: connect2, maxConcurrentStreams, pipelining, ...opts } = clientOpts ?? {}; + let defaultMaxConcurrentStreams = 100; + let defaultPipelining = 100; + if (maxConcurrentStreams != null && Number.isInteger(maxConcurrentStreams) && maxConcurrentStreams > 0) { + defaultMaxConcurrentStreams = maxConcurrentStreams; + } + if (pipelining != null && Number.isInteger(pipelining) && pipelining > 0) { + defaultPipelining = pipelining; + } + if (defaultPipelining > defaultMaxConcurrentStreams) { + throw new InvalidArgumentError( + "h2c-client: pipelining cannot be greater than maxConcurrentStreams" + ); + } + this.#client = new Client(origin, { + ...opts, + connect: this.#buildConnector(connect2), + maxConcurrentStreams: defaultMaxConcurrentStreams, + pipelining: defaultPipelining, + allowH2: true + }); + } + #buildConnector(connectOpts) { + return (opts, callback) => { + const timeout = connectOpts?.connectOpts ?? 1e4; + const { hostname, port, pathname } = opts; + const socket = connect({ + ...opts, + host: hostname, + port, + pathname + }); + if (opts.keepAlive == null || opts.keepAlive) { + const keepAliveInitialDelay = opts.keepAliveInitialDelay == null ? 6e4 : opts.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + socket.alpnProtocol = "h2"; + const clearConnectTimeout = util.setupConnectTimeout( + new WeakRef(socket), + { timeout, hostname, port } + ); + socket.setNoDelay(true).once("connect", function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + dispatch(opts, handler) { + return this.#client.dispatch(opts, handler); + } + async [kClose]() { + await this.#client.close(); + } + async [kDestroy]() { + await this.#client.destroy(); + } + }; + module2.exports = H2CClient; + } +}); + +// node_modules/undici/lib/api/readable.js +var require_readable = __commonJS({ + "node_modules/undici/lib/api/readable.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { Readable } = require("node:stream"); + var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors5(); + var util = require_util4(); + var { ReadableStreamFrom } = require_util4(); + var kConsume = Symbol("kConsume"); + var kReading = Symbol("kReading"); + var kBody = Symbol("kBody"); + var kAbort = Symbol("kAbort"); + var kContentType = Symbol("kContentType"); + var kContentLength = Symbol("kContentLength"); + var kUsed = Symbol("kUsed"); + var kBytesRead = Symbol("kBytesRead"); + var noop = () => { + }; + var BodyReadable = class extends Readable { + /** + * @param {object} opts + * @param {(this: Readable, size: number) => void} opts.resume + * @param {() => (void | null)} opts.abort + * @param {string} [opts.contentType = ''] + * @param {number} [opts.contentLength] + * @param {number} [opts.highWaterMark = 64 * 1024] + */ + constructor({ + resume, + abort, + contentType = "", + contentLength, + highWaterMark = 64 * 1024 + // Same as nodejs fs streams. + }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBytesRead] = 0; + this[kBody] = null; + this[kUsed] = false; + this[kContentType] = contentType; + this[kContentLength] = Number.isFinite(contentLength) ? contentLength : null; + this[kReading] = false; + } + /** + * @param {Error|null} err + * @param {(error:(Error|null)) => void} callback + * @returns {void} + */ + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); + } + if (err) { + this[kAbort](); + } + if (!this[kUsed]) { + setImmediate(callback, err); + } else { + callback(err); + } + } + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + on(event, listener) { + if (event === "data" || event === "readable") { + this[kReading] = true; + this[kUsed] = true; + } + return super.on(event, listener); + } + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + addListener(event, listener) { + return this.on(event, listener); + } + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + off(event, listener) { + const ret = super.off(event, listener); + if (event === "data" || event === "readable") { + this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + } + return ret; + } + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + removeListener(event, listener) { + return this.off(event, listener); + } + /** + * @param {Buffer|null} chunk + * @returns {boolean} + */ + push(chunk) { + if (chunk) { + this[kBytesRead] += chunk.length; + if (this[kConsume]) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + } + return super.push(chunk); + } + /** + * Consumes and returns the body as a string. + * + * @see https://fetch.spec.whatwg.org/#dom-body-text + * @returns {Promise} + */ + text() { + return consume(this, "text"); + } + /** + * Consumes and returns the body as a JavaScript Object. + * + * @see https://fetch.spec.whatwg.org/#dom-body-json + * @returns {Promise} + */ + json() { + return consume(this, "json"); + } + /** + * Consumes and returns the body as a Blob + * + * @see https://fetch.spec.whatwg.org/#dom-body-blob + * @returns {Promise} + */ + blob() { + return consume(this, "blob"); + } + /** + * Consumes and returns the body as an Uint8Array. + * + * @see https://fetch.spec.whatwg.org/#dom-body-bytes + * @returns {Promise} + */ + bytes() { + return consume(this, "bytes"); + } + /** + * Consumes and returns the body as an ArrayBuffer. + * + * @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer + * @returns {Promise} + */ + arrayBuffer() { + return consume(this, "arrayBuffer"); + } + /** + * Not implemented + * + * @see https://fetch.spec.whatwg.org/#dom-body-formdata + * @throws {NotSupportedError} + */ + async formData() { + throw new NotSupportedError(); + } + /** + * Returns true if the body is not null and the body has been consumed. + * Otherwise, returns false. + * + * @see https://fetch.spec.whatwg.org/#dom-body-bodyused + * @readonly + * @returns {boolean} + */ + get bodyUsed() { + return util.isDisturbed(this); + } + /** + * @see https://fetch.spec.whatwg.org/#dom-body-body + * @readonly + * @returns {ReadableStream} + */ + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert(this[kBody].locked); + } + } + return this[kBody]; + } + /** + * Dumps the response body by reading `limit` number of bytes. + * @param {object} opts + * @param {number} [opts.limit = 131072] Number of bytes to read. + * @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump. + * @returns {Promise} + */ + async dump(opts) { + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) { + throw new InvalidArgumentError("signal must be an AbortSignal"); + } + const limit = opts?.limit && Number.isFinite(opts.limit) ? opts.limit : 128 * 1024; + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) { + return null; + } + return await new Promise((resolve, reject) => { + if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) { + this.destroy(new AbortError()); + } + if (signal) { + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()); + }; + signal.addEventListener("abort", onAbort); + this.on("close", function() { + signal.removeEventListener("abort", onAbort); + if (signal.aborted) { + reject(signal.reason ?? new AbortError()); + } else { + resolve(null); + } + }); + } else { + this.on("close", resolve); + } + this.on("error", noop).on("data", () => { + if (this[kBytesRead] > limit) { + this.destroy(); + } + }).resume(); + }); + } + /** + * @param {BufferEncoding} encoding + * @returns {this} + */ + setEncoding(encoding) { + if (Buffer.isEncoding(encoding)) { + this._readableState.encoding = encoding; + } + return this; + } + }; + function isLocked(bodyReadable) { + return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null; + } + function isUnusable(bodyReadable) { + return util.isDisturbed(bodyReadable) || isLocked(bodyReadable); + } + function consume(stream, type) { + assert(!stream[kConsume]); + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) { + stream.on("error", reject).on("close", () => { + reject(new TypeError("unusable")); + }); + } else { + reject(rState.errored ?? new TypeError("unusable")); + } + } else { + queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) { + consumeFinish(this[kConsume], new RequestAbortedError()); + } + }); + consumeStart(stream[kConsume]); + }); + } + }); + } + function consumeStart(consume2) { + if (consume2.body === null) { + return; + } + const { _readableState: state } = consume2.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) { + consumePush(consume2, state.buffer[n]); + } + } else { + for (const chunk of state.buffer) { + consumePush(consume2, chunk); + } + } + if (state.endEmitted) { + consumeEnd(this[kConsume], this._readableState.encoding); + } else { + consume2.stream.on("end", function() { + consumeEnd(this[kConsume], this._readableState.encoding); + }); + } + consume2.stream.resume(); + while (consume2.stream.read() != null) { + } + } + function chunksDecode(chunks, length, encoding) { + if (chunks.length === 0 || length === 0) { + return ""; + } + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; + if (!encoding || encoding === "utf8" || encoding === "utf-8") { + return buffer.utf8Slice(start, bufferLength); + } else { + return buffer.subarray(start, bufferLength).toString(encoding); + } + } + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) { + return new Uint8Array(0); + } + if (chunks.length === 1) { + return new Uint8Array(chunks[0]); + } + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + let offset = 0; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; + } + return buffer; + } + function consumeEnd(consume2, encoding) { + const { type, body, resolve, stream, length } = consume2; + try { + if (type === "text") { + resolve(chunksDecode(body, length, encoding)); + } else if (type === "json") { + resolve(JSON.parse(chunksDecode(body, length, encoding))); + } else if (type === "arrayBuffer") { + resolve(chunksConcat(body, length).buffer); + } else if (type === "blob") { + resolve(new Blob(body, { type: stream[kContentType] })); + } else if (type === "bytes") { + resolve(chunksConcat(body, length)); + } + consumeFinish(consume2); + } catch (err) { + stream.destroy(err); + } + } + function consumePush(consume2, chunk) { + consume2.length += chunk.length; + consume2.body.push(chunk); + } + function consumeFinish(consume2, err) { + if (consume2.body === null) { + return; + } + if (err) { + consume2.reject(err); + } else { + consume2.resolve(); + } + consume2.type = null; + consume2.stream = null; + consume2.resolve = null; + consume2.reject = null; + consume2.length = 0; + consume2.body = null; + } + module2.exports = { + Readable: BodyReadable, + chunksDecode + }; + } +}); + +// node_modules/undici/lib/api/api-request.js +var require_api_request = __commonJS({ + "node_modules/undici/lib/api/api-request.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { AsyncResource } = require("node:async_hooks"); + var { Readable } = require_readable(); + var { InvalidArgumentError, RequestAbortedError } = require_errors5(); + var util = require_util4(); + function noop() { + } + var RequestHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + const { signal, method, opaque, body, onInfo, responseHeaders, highWaterMark } = opts; + try { + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) { + throw new InvalidArgumentError("invalid highWaterMark"); + } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_REQUEST"); + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on("error", noop), err); + } + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.highWaterMark = highWaterMark; + this.reason = null; + this.removeAbortListener = null; + if (signal?.aborted) { + this.reason = signal.reason ?? new RequestAbortedError(); + } else if (signal) { + this.removeAbortListener = util.addAbortListener(signal, () => { + this.reason = signal.reason ?? new RequestAbortedError(); + if (this.res) { + util.destroy(this.res.on("error", noop), this.reason); + } else if (this.abort) { + this.abort(this.reason); + } + }); + } + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }); + } + return; + } + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable({ + resume, + abort, + contentType, + contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, + highWaterMark + }); + if (this.removeAbortListener) { + res.on("close", this.removeAbortListener); + this.removeAbortListener = null; + } + this.callback = null; + this.res = res; + if (callback !== null) { + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res.on("error", noop), err); + }); + } + if (body) { + this.body = null; + if (util.isStream(body)) { + body.on("error", noop); + util.destroy(body, err); + } + } + if (this.removeAbortListener) { + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request(opts, callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + try { + const handler = new RequestHandler(opts, callback); + this.dispatch(opts, handler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module2.exports = request; + module2.exports.RequestHandler = RequestHandler; + } +}); + +// node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = __commonJS({ + "node_modules/undici/lib/api/abort-signal.js"(exports2, module2) { + "use strict"; + var { addAbortListener } = require_util4(); + var { RequestAbortedError } = require_errors5(); + var kListener = Symbol("kListener"); + var kSignal = Symbol("kSignal"); + function abort(self2) { + if (self2.abort) { + self2.abort(self2[kSignal]?.reason); + } else { + self2.reason = self2[kSignal]?.reason ?? new RequestAbortedError(); + } + removeSignal(self2); + } + function addSignal(self2, signal) { + self2.reason = null; + self2[kSignal] = null; + self2[kListener] = null; + if (!signal) { + return; + } + if (signal.aborted) { + abort(self2); + return; + } + self2[kSignal] = signal; + self2[kListener] = () => { + abort(self2); + }; + addAbortListener(self2[kSignal], self2[kListener]); + } + function removeSignal(self2) { + if (!self2[kSignal]) { + return; + } + if ("removeEventListener" in self2[kSignal]) { + self2[kSignal].removeEventListener("abort", self2[kListener]); + } else { + self2[kSignal].removeListener("abort", self2[kListener]); + } + self2[kSignal] = null; + self2[kListener] = null; + } + module2.exports = { + addSignal, + removeSignal + }; + } +}); + +// node_modules/undici/lib/api/api-stream.js +var require_api_stream = __commonJS({ + "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { finished } = require("node:stream"); + var { AsyncResource } = require("node:async_hooks"); + var { InvalidArgumentError, InvalidReturnValueError } = require_errors5(); + var util = require_util4(); + var { addSignal, removeSignal } = require_abort_signal(); + function noop() { + } + var StreamHandler = class extends AsyncResource { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + const { signal, method, opaque, body, onInfo, responseHeaders } = opts; + try { + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (typeof factory !== "function") { + throw new InvalidArgumentError("invalid factory"); + } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_STREAM"); + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on("error", noop), err); + } + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + if (util.isStream(body)) { + body.on("error", (err) => { + this.onError(err); + }); + } + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }); + } + return; + } + this.factory = null; + if (factory === null) { + return; + } + const res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { + throw new InvalidReturnValueError("expected Writable"); + } + finished(res, { readable: false }, (err) => { + const { callback, res: res2, opaque: opaque2, trailers, abort } = this; + this.res = null; + if (err || !res2?.readable) { + util.destroy(res2, err); + } + this.callback = null; + this.runInAsyncScope(callback, null, err || null, { opaque: opaque2, trailers }); + if (err) { + abort(); + } + }); + res.on("drain", resume); + this.res = res; + const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain; + return needDrain !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + if (!res) { + return; + } + this.trailers = util.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + util.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + try { + const handler = new StreamHandler(opts, factory, callback); + this.dispatch(opts, handler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module2.exports = stream; + } +}); + +// node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = __commonJS({ + "node_modules/undici/lib/api/api-pipeline.js"(exports2, module2) { + "use strict"; + var { + Readable, + Duplex, + PassThrough + } = require("node:stream"); + var assert = require("node:assert"); + var { AsyncResource } = require("node:async_hooks"); + var { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError + } = require_errors5(); + var util = require_util4(); + var { addSignal, removeSignal } = require_abort_signal(); + function noop() { + } + var kResume = Symbol("resume"); + var PipelineRequest = class extends Readable { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume } = this; + if (resume) { + this[kResume] = null; + resume(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable { + constructor(resume) { + super({ autoDestroy: true }); + this[kResume] = resume; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); + } + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (typeof handler !== "function") { + throw new InvalidArgumentError("invalid handler"); + } + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", noop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body?.resume) { + body.resume(); + } + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) { + callback(); + } else { + req[kResume] = callback; + } + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; + if (!err && !ret._readableState.endEmitted) { + err = new RequestAbortedError(); + } + if (abort && err) { + abort(); + } + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); + removeSignal(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal(this, signal); + } + onConnect(abort, context) { + const { res } = this; + if (this.reason) { + abort(this.reason); + return; + } + assert(!res, "pipeline cannot be retried"); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.onInfo({ statusCode, headers }); + } + return; + } + this.res = new PipelineResponse(resume); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", noop); + throw err; + } + if (!body || typeof body.on !== "function") { + throw new InvalidReturnValueError("expected Readable"); + } + body.on("data", (chunk) => { + const { ret, body: body2 } = this; + if (!ret.push(chunk) && body2.pause) { + body2.pause(); + } + }).on("error", (err) => { + const { ret } = this; + util.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) { + util.destroy(ret, new RequestAbortedError()); + } + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util.destroy(ret, err); + } + }; + function pipeline(opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler); + this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough().destroy(err); + } + } + module2.exports = pipeline; + } +}); + +// node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = __commonJS({ + "node_modules/undici/lib/api/api-upgrade.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError, SocketError } = require_errors5(); + var { AsyncResource } = require("node:async_hooks"); + var assert = require("node:assert"); + var util = require_util4(); + var { addSignal, removeSignal } = require_abort_signal(); + var UpgradeHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + super("UNDICI_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert(this.callback); + this.abort = abort; + this.context = null; + } + onHeaders() { + throw new SocketError("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + assert(statusCode === 101); + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + const upgradeOpts = { + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }; + this.dispatch(upgradeOpts, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module2.exports = upgrade; + } +}); + +// node_modules/undici/lib/api/api-connect.js +var require_api_connect = __commonJS({ + "node_modules/undici/lib/api/api-connect.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { AsyncResource } = require("node:async_hooks"); + var { InvalidArgumentError, SocketError } = require_errors5(); + var util = require_util4(); + var { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + super("UNDICI_CONNECT"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) { + headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + } + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function connect(opts, callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + try { + const connectHandler = new ConnectHandler(opts, callback); + const connectOptions = { ...opts, method: "CONNECT" }; + this.dispatch(connectOptions, connectHandler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module2.exports = connect; + } +}); + +// node_modules/undici/lib/api/index.js +var require_api = __commonJS({ + "node_modules/undici/lib/api/index.js"(exports2, module2) { + "use strict"; + module2.exports.request = require_api_request(); + module2.exports.stream = require_api_stream(); + module2.exports.pipeline = require_api_pipeline(); + module2.exports.upgrade = require_api_upgrade(); + module2.exports.connect = require_api_connect(); + } +}); + +// node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = __commonJS({ + "node_modules/undici/lib/mock/mock-errors.js"(exports2, module2) { + "use strict"; + var { UndiciError } = require_errors5(); + var MockNotMatchedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MockNotMatchedError"; + this.message = message || "The request does not match any registered mock dispatches"; + this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; + } + }; + module2.exports = { + MockNotMatchedError + }; + } +}); + +// node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = __commonJS({ + "node_modules/undici/lib/mock/mock-symbols.js"(exports2, module2) { + "use strict"; + module2.exports = { + kAgent: Symbol("agent"), + kOptions: Symbol("options"), + kFactory: Symbol("factory"), + kDispatches: Symbol("dispatches"), + kDispatchKey: Symbol("dispatch key"), + kDefaultHeaders: Symbol("default headers"), + kDefaultTrailers: Symbol("default trailers"), + kContentLength: Symbol("content length"), + kMockAgent: Symbol("mock agent"), + kMockAgentSet: Symbol("mock agent set"), + kMockAgentGet: Symbol("mock agent get"), + kMockDispatch: Symbol("mock dispatch"), + kClose: Symbol("close"), + kOriginalClose: Symbol("original agent close"), + kOriginalDispatch: Symbol("original dispatch"), + kOrigin: Symbol("origin"), + kIsMockActive: Symbol("is mock active"), + kNetConnect: Symbol("net connect"), + kGetNetConnect: Symbol("get net connect"), + kConnected: Symbol("connected"), + kIgnoreTrailingSlash: Symbol("ignore trailing slash"), + kMockAgentMockCallHistoryInstance: Symbol("mock agent mock call history name"), + kMockAgentRegisterCallHistory: Symbol("mock agent register mock call history"), + kMockAgentAddCallHistoryLog: Symbol("mock agent add call history log"), + kMockAgentIsCallHistoryEnabled: Symbol("mock agent is call history enabled"), + kMockAgentAcceptsNonStandardSearchParameters: Symbol("mock agent accepts non standard search parameters"), + kMockCallHistoryAddLog: Symbol("mock call history add log") + }; + } +}); + +// node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = __commonJS({ + "node_modules/undici/lib/mock/mock-utils.js"(exports2, module2) { + "use strict"; + var { MockNotMatchedError } = require_mock_errors(); + var { + kDispatches, + kMockAgent, + kOriginalDispatch, + kOrigin, + kGetNetConnect + } = require_mock_symbols(); + var { serializePathWithQuery } = require_util4(); + var { STATUS_CODES } = require("node:http"); + var { + types: { + isPromise + } + } = require("node:util"); + var { InvalidArgumentError } = require_errors5(); + function matchValue(match, value) { + if (typeof match === "string") { + return match === value; + } + if (match instanceof RegExp) { + return match.test(value); + } + if (typeof match === "function") { + return match(value) === true; + } + return false; + } + function lowerCaseEntries(headers) { + return Object.fromEntries( + Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + }) + ); + } + function getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { + return headers[i + 1]; + } + } + return void 0; + } else if (typeof headers.get === "function") { + return headers.get(key); + } else { + return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } + } + function buildHeadersFromArray(headers) { + const clone = headers.slice(); + const entries = []; + for (let index = 0; index < clone.length; index += 2) { + entries.push([clone[index], clone[index + 1]]); + } + return Object.fromEntries(entries); + } + function matchHeaders(mockDispatch2, headers) { + if (typeof mockDispatch2.headers === "function") { + if (Array.isArray(headers)) { + headers = buildHeadersFromArray(headers); + } + return mockDispatch2.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch2.headers === "undefined") { + return true; + } + if (typeof headers !== "object" || typeof mockDispatch2.headers !== "object") { + return false; + } + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch2.headers)) { + const headerValue = getHeaderByName(headers, matchHeaderName); + if (!matchValue(matchHeaderValue, headerValue)) { + return false; + } + } + return true; + } + function normalizeSearchParams(query) { + if (typeof query !== "string") { + return query; + } + const originalQp = new URLSearchParams(query); + const normalizedQp = new URLSearchParams(); + for (let [key, value] of originalQp.entries()) { + key = key.replace("[]", ""); + const valueRepresentsString = /^(['"]).*\1$/.test(value); + if (valueRepresentsString) { + normalizedQp.append(key, value); + continue; + } + if (value.includes(",")) { + const values = value.split(","); + for (const v of values) { + normalizedQp.append(key, v); + } + continue; + } + normalizedQp.append(key, value); + } + return normalizedQp; + } + function safeUrl(path7) { + if (typeof path7 !== "string") { + return path7; + } + const pathSegments = path7.split("?", 3); + if (pathSegments.length !== 2) { + return path7; + } + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch2, { path: path7, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path7); + const methodMatch = matchValue(mockDispatch2.method, method); + const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; + const headersMatch = matchHeaders(mockDispatch2, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; + } + function getResponseData(data) { + if (Buffer.isBuffer(data)) { + return data; + } else if (data instanceof Uint8Array) { + return data; + } else if (data instanceof ArrayBuffer) { + return data; + } else if (typeof data === "object") { + return JSON.stringify(data); + } else if (data) { + return data.toString(); + } else { + return ""; + } + } + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path7, ignoreTrailingSlash }) => { + return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path7)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path7), resolvedPath); + }); + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + } + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); + } + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); + } + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch2) => matchHeaders(mockDispatch2, key.headers)); + if (matchedMockDispatches.length === 0) { + const headers = typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers; + throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`); + } + return matchedMockDispatches[0]; + } + function addMockDispatch(mockDispatches, key, data, opts) { + const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false, ...opts }; + const replyData = typeof data === "function" ? { callback: data } : { ...data }; + const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }; + mockDispatches.push(newMockDispatch); + return newMockDispatch; + } + function deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch) => { + if (!dispatch.consumed) { + return false; + } + return matchKey(dispatch, key); + }); + if (index !== -1) { + mockDispatches.splice(index, 1); + } + } + function removeTrailingSlash(path7) { + while (path7.endsWith("/")) { + path7 = path7.slice(0, -1); + } + if (path7.length === 0) { + path7 = "/"; + } + return path7; + } + function buildKey(opts) { + const { path: path7, method, body, headers, query } = opts; + return { + path: path7, + method, + body, + headers, + query + }; + } + function generateKeyValues(data) { + const keys = Object.keys(data); + const result = []; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) { + for (let j = 0; j < value.length; ++j) { + result.push(name, Buffer.from(`${value[j]}`)); + } + } else { + result.push(name, Buffer.from(`${value}`)); + } + } + return result; + } + function getStatusText(statusCode) { + return STATUS_CODES[statusCode] || "unknown"; + } + async function getResponse(body) { + const buffers = []; + for await (const data of body) { + buffers.push(data); + } + return Buffer.concat(buffers).toString("utf8"); + } + function mockDispatch(opts, handler) { + const key = buildKey(opts); + const mockDispatch2 = getMockDispatch(this[kDispatches], key); + mockDispatch2.timesInvoked++; + if (mockDispatch2.data.callback) { + mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; + } + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch2; + const { timesInvoked, times } = mockDispatch2; + mockDispatch2.consumed = !persist && timesInvoked >= times; + mockDispatch2.pending = timesInvoked < times; + if (error !== null) { + deleteMockDispatch(this[kDispatches], key); + handler.onError(error); + return true; + } + if (typeof delay === "number" && delay > 0) { + setTimeout(() => { + handleReply(this[kDispatches]); + }, delay); + } else { + handleReply(this[kDispatches]); + } + function handleReply(mockDispatches, _data = data) { + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ ...opts, headers: optsHeaders }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); + return; + } + const responseData = getResponseData(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler.onConnect?.((err) => handler.onError(err), null); + handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume() { + } + return true; + } + function buildMockDispatch() { + const agent = this[kMockAgent]; + const origin = this[kOrigin]; + const originalDispatch = this[kOriginalDispatch]; + return function dispatch(opts, handler) { + if (agent.isMockActive) { + try { + mockDispatch.call(this, opts, handler); + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect](); + if (netConnect === false) { + throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + } + if (checkNetConnect(netConnect, origin)) { + originalDispatch.call(this, opts, handler); + } else { + throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } + } else { + throw error; + } + } + } else { + originalDispatch.call(this, opts, handler); + } + }; + } + function checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) { + return true; + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + return true; + } + return false; + } + function buildAndValidateMockOptions(opts) { + if (opts) { + const { agent, ...mockOptions } = opts; + if ("enableCallHistory" in mockOptions && typeof mockOptions.enableCallHistory !== "boolean") { + throw new InvalidArgumentError("options.enableCallHistory must to be a boolean"); + } + if ("acceptNonStandardSearchParameters" in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== "boolean") { + throw new InvalidArgumentError("options.acceptNonStandardSearchParameters must to be a boolean"); + } + return mockOptions; + } + } + module2.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildAndValidateMockOptions, + getHeaderByName, + buildHeadersFromArray, + normalizeSearchParams + }; + } +}); + +// node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = __commonJS({ + "node_modules/undici/lib/mock/mock-interceptor.js"(exports2, module2) { + "use strict"; + var { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); + var { + kDispatches, + kDispatchKey, + kDefaultHeaders, + kDefaultTrailers, + kContentLength, + kMockDispatch, + kIgnoreTrailingSlash + } = require_mock_symbols(); + var { InvalidArgumentError } = require_errors5(); + var { serializePathWithQuery } = require_util4(); + var MockScope = class { + constructor(mockDispatch) { + this[kMockDispatch] = mockDispatch; + } + /** + * Delay a reply by a set amount in ms. + */ + delay(waitInMs) { + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) { + throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); + } + this[kMockDispatch].delay = waitInMs; + return this; + } + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[kMockDispatch].persist = true; + return this; + } + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times(repeatTimes) { + if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { + throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); + } + this[kMockDispatch].times = repeatTimes; + return this; + } + }; + var MockInterceptor = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") { + throw new InvalidArgumentError("opts must be an object"); + } + if (typeof opts.path === "undefined") { + throw new InvalidArgumentError("opts.path must be defined"); + } + if (typeof opts.method === "undefined") { + opts.method = "GET"; + } + if (typeof opts.path === "string") { + if (opts.query) { + opts.path = serializePathWithQuery(opts.path, opts.query); + } else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + } + if (typeof opts.method === "string") { + opts.method = opts.method.toUpperCase(); + } + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + createMockScopeDispatchData({ statusCode, data, responseOptions }) { + const responseData = getResponseData(data); + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }; + const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }; + return { statusCode, data, headers, trailers }; + } + validateReplyParameters(replyParameters) { + if (typeof replyParameters.statusCode === "undefined") { + throw new InvalidArgumentError("statusCode must be defined"); + } + if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) { + throw new InvalidArgumentError("responseOptions must be an object"); + } + } + /** + * Mock an undici request with a defined reply. + */ + reply(replyOptionsCallbackOrStatusCode) { + if (typeof replyOptionsCallbackOrStatusCode === "function") { + const wrappedDefaultsCallback = (opts) => { + const resolvedData = replyOptionsCallbackOrStatusCode(opts); + if (typeof resolvedData !== "object" || resolvedData === null) { + throw new InvalidArgumentError("reply options callback must return an object"); + } + const replyParameters2 = { data: "", responseOptions: {}, ...resolvedData }; + this.validateReplyParameters(replyParameters2); + return { + ...this.createMockScopeDispatchData(replyParameters2) + }; + }; + const newMockDispatch2 = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); + return new MockScope(newMockDispatch2); + } + const replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === void 0 ? "" : arguments[1], + responseOptions: arguments[2] === void 0 ? {} : arguments[2] + }; + this.validateReplyParameters(replyParameters); + const dispatchData = this.createMockScopeDispatchData(replyParameters); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); + return new MockScope(newMockDispatch); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error) { + if (typeof error === "undefined") { + throw new InvalidArgumentError("error must be defined"); + } + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); + return new MockScope(newMockDispatch); + } + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders(headers) { + if (typeof headers === "undefined") { + throw new InvalidArgumentError("headers must be defined"); + } + this[kDefaultHeaders] = headers; + return this; + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") { + throw new InvalidArgumentError("trailers must be defined"); + } + this[kDefaultTrailers] = trailers; + return this; + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module2.exports.MockInterceptor = MockInterceptor; + module2.exports.MockScope = MockScope; + } +}); + +// node_modules/undici/lib/mock/mock-client.js +var require_mock_client = __commonJS({ + "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { + "use strict"; + var { promisify: promisify2 } = require("node:util"); + var Client = require_client(); + var { buildMockDispatch } = require_mock_utils(); + var { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected, + kIgnoreTrailingSlash + } = require_mock_symbols(); + var { MockInterceptor } = require_mock_interceptor(); + var Symbols = require_symbols4(); + var { InvalidArgumentError } = require_errors5(); + var MockClient = class extends Client { + constructor(origin, opts) { + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + } + super(origin, opts); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor( + opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, + this[kDispatches] + ); + } + cleanMocks() { + this[kDispatches] = []; + } + async [kClose]() { + await promisify2(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module2.exports = MockClient; + } +}); + +// node_modules/undici/lib/mock/mock-call-history.js +var require_mock_call_history = __commonJS({ + "node_modules/undici/lib/mock/mock-call-history.js"(exports2, module2) { + "use strict"; + var { kMockCallHistoryAddLog } = require_mock_symbols(); + var { InvalidArgumentError } = require_errors5(); + function handleFilterCallsWithOptions(criteria, options, handler, store) { + switch (options.operator) { + case "OR": + store.push(...handler(criteria)); + return store; + case "AND": + return handler.call({ logs: store }, criteria); + default: + throw new InvalidArgumentError("options.operator must to be a case insensitive string equal to 'OR' or 'AND'"); + } + } + function buildAndValidateFilterCallsOptions(options = {}) { + const finalOptions = {}; + if ("operator" in options) { + if (typeof options.operator !== "string" || options.operator.toUpperCase() !== "OR" && options.operator.toUpperCase() !== "AND") { + throw new InvalidArgumentError("options.operator must to be a case insensitive string equal to 'OR' or 'AND'"); + } + return { + ...finalOptions, + operator: options.operator.toUpperCase() + }; + } + return finalOptions; + } + function makeFilterCalls(parameterName) { + return (parameterValue) => { + if (typeof parameterValue === "string" || parameterValue == null) { + return this.logs.filter((log3) => { + return log3[parameterName] === parameterValue; + }); + } + if (parameterValue instanceof RegExp) { + return this.logs.filter((log3) => { + return parameterValue.test(log3[parameterName]); + }); + } + throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`); + }; + } + function computeUrlWithMaybeSearchParameters(requestInit) { + try { + const url = new URL(requestInit.path, requestInit.origin); + if (url.search.length !== 0) { + return url; + } + url.search = new URLSearchParams(requestInit.query).toString(); + return url; + } catch (error) { + throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error }); + } + } + var MockCallHistoryLog = class { + constructor(requestInit = {}) { + this.body = requestInit.body; + this.headers = requestInit.headers; + this.method = requestInit.method; + const url = computeUrlWithMaybeSearchParameters(requestInit); + this.fullUrl = url.toString(); + this.origin = url.origin; + this.path = url.pathname; + this.searchParams = Object.fromEntries(url.searchParams); + this.protocol = url.protocol; + this.host = url.host; + this.port = url.port; + this.hash = url.hash; + } + toMap() { + return /* @__PURE__ */ new Map( + [ + ["protocol", this.protocol], + ["host", this.host], + ["port", this.port], + ["origin", this.origin], + ["path", this.path], + ["hash", this.hash], + ["searchParams", this.searchParams], + ["fullUrl", this.fullUrl], + ["method", this.method], + ["body", this.body], + ["headers", this.headers] + ] + ); + } + toString() { + const options = { betweenKeyValueSeparator: "->", betweenPairSeparator: "|" }; + let result = ""; + this.toMap().forEach((value, key) => { + if (typeof value === "string" || value === void 0 || value === null) { + result = `${result}${key}${options.betweenKeyValueSeparator}${value}${options.betweenPairSeparator}`; + } + if (typeof value === "object" && value !== null || Array.isArray(value)) { + result = `${result}${key}${options.betweenKeyValueSeparator}${JSON.stringify(value)}${options.betweenPairSeparator}`; + } + }); + return result.slice(0, -1); + } + }; + var MockCallHistory = class { + logs = []; + calls() { + return this.logs; + } + firstCall() { + return this.logs.at(0); + } + lastCall() { + return this.logs.at(-1); + } + nthCall(number) { + if (typeof number !== "number") { + throw new InvalidArgumentError("nthCall must be called with a number"); + } + if (!Number.isInteger(number)) { + throw new InvalidArgumentError("nthCall must be called with an integer"); + } + if (Math.sign(number) !== 1) { + throw new InvalidArgumentError("nthCall must be called with a positive value. use firstCall or lastCall instead"); + } + return this.logs.at(number - 1); + } + filterCalls(criteria, options) { + if (this.logs.length === 0) { + return this.logs; + } + if (typeof criteria === "function") { + return this.logs.filter(criteria); + } + if (criteria instanceof RegExp) { + return this.logs.filter((log3) => { + return criteria.test(log3.toString()); + }); + } + if (typeof criteria === "object" && criteria !== null) { + if (Object.keys(criteria).length === 0) { + return this.logs; + } + const finalOptions = { operator: "OR", ...buildAndValidateFilterCallsOptions(options) }; + let maybeDuplicatedLogsFiltered = []; + if ("protocol" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered); + } + if ("host" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered); + } + if ("port" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered); + } + if ("origin" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered); + } + if ("path" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered); + } + if ("hash" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered); + } + if ("fullUrl" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered); + } + if ("method" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered); + } + const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)]; + return uniqLogsFiltered; + } + throw new InvalidArgumentError("criteria parameter should be one of function, regexp, or object"); + } + filterCallsByProtocol = makeFilterCalls.call(this, "protocol"); + filterCallsByHost = makeFilterCalls.call(this, "host"); + filterCallsByPort = makeFilterCalls.call(this, "port"); + filterCallsByOrigin = makeFilterCalls.call(this, "origin"); + filterCallsByPath = makeFilterCalls.call(this, "path"); + filterCallsByHash = makeFilterCalls.call(this, "hash"); + filterCallsByFullUrl = makeFilterCalls.call(this, "fullUrl"); + filterCallsByMethod = makeFilterCalls.call(this, "method"); + clear() { + this.logs = []; + } + [kMockCallHistoryAddLog](requestInit) { + const log3 = new MockCallHistoryLog(requestInit); + this.logs.push(log3); + return log3; + } + *[Symbol.iterator]() { + for (const log3 of this.calls()) { + yield log3; + } + } + }; + module2.exports.MockCallHistory = MockCallHistory; + module2.exports.MockCallHistoryLog = MockCallHistoryLog; + } +}); + +// node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = __commonJS({ + "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { + "use strict"; + var { promisify: promisify2 } = require("node:util"); + var Pool = require_pool(); + var { buildMockDispatch } = require_mock_utils(); + var { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected, + kIgnoreTrailingSlash + } = require_mock_symbols(); + var { MockInterceptor } = require_mock_interceptor(); + var Symbols = require_symbols4(); + var { InvalidArgumentError } = require_errors5(); + var MockPool = class extends Pool { + constructor(origin, opts) { + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + } + super(origin, opts); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor( + opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, + this[kDispatches] + ); + } + cleanMocks() { + this[kDispatches] = []; + } + async [kClose]() { + await promisify2(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module2.exports = MockPool; + } +}); + +// node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = __commonJS({ + "node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports2, module2) { + "use strict"; + var { Transform } = require("node:stream"); + var { Console } = require("node:console"); + var PERSISTENT = process.versions.icu ? "\u2705" : "Y "; + var NOT_PERSISTENT = process.versions.icu ? "\u274C" : "N "; + module2.exports = class PendingInterceptorsFormatter { + constructor({ disableColors } = {}) { + this.transform = new Transform({ + transform(chunk, _enc, cb) { + cb(null, chunk); + } + }); + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { + colors: !disableColors && !process.env.CI + } + }); + } + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map( + ({ method, path: path7, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path7, + "Status code": statusCode, + Persistent: persist ? PERSISTENT : NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + }) + ); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; + } +}); + +// node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = __commonJS({ + "node_modules/undici/lib/mock/mock-agent.js"(exports2, module2) { + "use strict"; + var { kClients } = require_symbols4(); + var Agent = require_agent(); + var { + kAgent, + kMockAgentSet, + kMockAgentGet, + kDispatches, + kIsMockActive, + kNetConnect, + kGetNetConnect, + kOptions, + kFactory, + kMockAgentRegisterCallHistory, + kMockAgentIsCallHistoryEnabled, + kMockAgentAddCallHistoryLog, + kMockAgentMockCallHistoryInstance, + kMockAgentAcceptsNonStandardSearchParameters, + kMockCallHistoryAddLog, + kIgnoreTrailingSlash + } = require_mock_symbols(); + var MockClient = require_mock_client(); + var MockPool = require_mock_pool(); + var { matchValue, normalizeSearchParams, buildAndValidateMockOptions } = require_mock_utils(); + var { InvalidArgumentError, UndiciError } = require_errors5(); + var Dispatcher = require_dispatcher(); + var PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var { MockCallHistory } = require_mock_call_history(); + var MockAgent = class extends Dispatcher { + constructor(opts) { + super(opts); + const mockOptions = buildAndValidateMockOptions(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + this[kMockAgentIsCallHistoryEnabled] = mockOptions?.enableCallHistory ?? false; + this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions?.acceptNonStandardSearchParameters ?? false; + this[kIgnoreTrailingSlash] = mockOptions?.ignoreTrailingSlash ?? false; + if (opts?.agent && typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + } + const agent = opts?.agent ? opts.agent : new Agent(opts); + this[kAgent] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = mockOptions; + if (this[kMockAgentIsCallHistoryEnabled]) { + this[kMockAgentRegisterCallHistory](); + } + } + get(origin) { + const originKey = this[kIgnoreTrailingSlash] ? origin.replace(/\/$/, "") : origin; + let dispatcher = this[kMockAgentGet](originKey); + if (!dispatcher) { + dispatcher = this[kFactory](originKey); + this[kMockAgentSet](originKey, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + this.get(opts.origin); + this[kMockAgentAddCallHistoryLog](opts); + const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters]; + const dispatchOpts = { ...opts }; + if (acceptNonStandardSearchParameters && dispatchOpts.path) { + const [path7, searchParams] = dispatchOpts.path.split("?"); + const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters); + dispatchOpts.path = `${path7}?${normalizedSearchParams}`; + } + return this[kAgent].dispatch(dispatchOpts, handler); + } + async close() { + this.clearCallHistory(); + await this[kAgent].close(); + this[kClients].clear(); + } + deactivate() { + this[kIsMockActive] = false; + } + activate() { + this[kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) { + if (Array.isArray(this[kNetConnect])) { + this[kNetConnect].push(matcher); + } else { + this[kNetConnect] = [matcher]; + } + } else if (typeof matcher === "undefined") { + this[kNetConnect] = true; + } else { + throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); + } + } + disableNetConnect() { + this[kNetConnect] = false; + } + enableCallHistory() { + this[kMockAgentIsCallHistoryEnabled] = true; + return this; + } + disableCallHistory() { + this[kMockAgentIsCallHistoryEnabled] = false; + return this; + } + getCallHistory() { + return this[kMockAgentMockCallHistoryInstance]; + } + clearCallHistory() { + if (this[kMockAgentMockCallHistoryInstance] !== void 0) { + this[kMockAgentMockCallHistoryInstance].clear(); + } + } + // This is required to bypass issues caused by using global symbols - see: + // https://github.com/nodejs/undici/issues/1447 + get isMockActive() { + return this[kIsMockActive]; + } + [kMockAgentRegisterCallHistory]() { + if (this[kMockAgentMockCallHistoryInstance] === void 0) { + this[kMockAgentMockCallHistoryInstance] = new MockCallHistory(); + } + } + [kMockAgentAddCallHistoryLog](opts) { + if (this[kMockAgentIsCallHistoryEnabled]) { + this[kMockAgentRegisterCallHistory](); + this[kMockAgentMockCallHistoryInstance][kMockCallHistoryAddLog](opts); + } + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, { count: 0, dispatcher }); + } + [kFactory](origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]); + return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); + } + [kMockAgentGet](origin) { + const result = this[kClients].get(origin); + if (result?.dispatcher) { + return result.dispatcher; + } + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, result2] of Array.from(this[kClients])) { + if (result2 && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = result2.dispatcher[kDispatches]; + return dispatcher; + } + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, result]) => result.dispatcher[kDispatches].map((dispatch) => ({ ...dispatch, origin }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) { + return; + } + throw new UndiciError( + pending.length === 1 ? `1 interceptor is pending: + +${pendingInterceptorsFormatter.format(pending)}`.trim() : `${pending.length} interceptors are pending: + +${pendingInterceptorsFormatter.format(pending)}`.trim() + ); + } + }; + module2.exports = MockAgent; + } +}); + +// node_modules/undici/lib/mock/snapshot-utils.js +var require_snapshot_utils = __commonJS({ + "node_modules/undici/lib/mock/snapshot-utils.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError } = require_errors5(); + function createHeaderFilters(matchOptions = {}) { + const { ignoreHeaders = [], excludeHeaders = [], matchHeaders = [], caseSensitive = false } = matchOptions; + return { + ignore: new Set(ignoreHeaders.map((header) => caseSensitive ? header : header.toLowerCase())), + exclude: new Set(excludeHeaders.map((header) => caseSensitive ? header : header.toLowerCase())), + match: new Set(matchHeaders.map((header) => caseSensitive ? header : header.toLowerCase())) + }; + } + var crypto2; + try { + crypto2 = require("node:crypto"); + } catch { + } + var hashId = crypto2?.hash ? (value) => crypto2.hash("sha256", value, "base64url") : (value) => Buffer.from(value).toString("base64url"); + function isUndiciHeaders(headers) { + return Array.isArray(headers) && (headers.length & 1) === 0; + } + function isUrlExcludedFactory(excludePatterns = []) { + if (excludePatterns.length === 0) { + return () => false; + } + return function isUrlExcluded(url) { + let urlLowerCased; + for (const pattern of excludePatterns) { + if (typeof pattern === "string") { + if (!urlLowerCased) { + urlLowerCased = url.toLowerCase(); + } + if (urlLowerCased.includes(pattern.toLowerCase())) { + return true; + } + } else if (pattern instanceof RegExp) { + if (pattern.test(url)) { + return true; + } + } + } + return false; + }; + } + function normalizeHeaders(headers) { + const normalizedHeaders = {}; + if (!headers) return normalizedHeaders; + if (isUndiciHeaders(headers)) { + for (let i = 0; i < headers.length; i += 2) { + const key = headers[i]; + const value = headers[i + 1]; + if (key && value !== void 0) { + const keyStr = Buffer.isBuffer(key) ? key.toString() : key; + const valueStr = Buffer.isBuffer(value) ? value.toString() : value; + normalizedHeaders[keyStr.toLowerCase()] = valueStr; + } + } + return normalizedHeaders; + } + if (headers && typeof headers === "object") { + for (const [key, value] of Object.entries(headers)) { + if (key && typeof key === "string") { + normalizedHeaders[key.toLowerCase()] = Array.isArray(value) ? value.join(", ") : String(value); + } + } + } + return normalizedHeaders; + } + var validSnapshotModes = ( + /** @type {const} */ + ["record", "playback", "update"] + ); + function validateSnapshotMode(mode) { + if (!validSnapshotModes.includes(mode)) { + throw new InvalidArgumentError(`Invalid snapshot mode: ${mode}. Must be one of: ${validSnapshotModes.join(", ")}`); + } + } + module2.exports = { + createHeaderFilters, + hashId, + isUndiciHeaders, + normalizeHeaders, + isUrlExcludedFactory, + validateSnapshotMode + }; + } +}); + +// node_modules/undici/lib/mock/snapshot-recorder.js +var require_snapshot_recorder = __commonJS({ + "node_modules/undici/lib/mock/snapshot-recorder.js"(exports2, module2) { + "use strict"; + var { writeFile: writeFile3, readFile: readFile2, mkdir: mkdir2 } = require("node:fs/promises"); + var { dirname, resolve } = require("node:path"); + var { setTimeout: setTimeout3, clearTimeout: clearTimeout2 } = require("node:timers"); + var { InvalidArgumentError, UndiciError } = require_errors5(); + var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils(); + function formatRequestKey(opts, headerFilters, matchOptions = {}) { + const url = new URL(opts.path, opts.origin); + const normalized = opts._normalizedHeaders || normalizeHeaders(opts.headers); + if (!opts._normalizedHeaders) { + opts._normalizedHeaders = normalized; + } + return { + method: opts.method || "GET", + url: matchOptions.matchQuery !== false ? url.toString() : `${url.origin}${url.pathname}`, + headers: filterHeadersForMatching(normalized, headerFilters, matchOptions), + body: matchOptions.matchBody !== false && opts.body ? String(opts.body) : "" + }; + } + function filterHeadersForMatching(headers, headerFilters, matchOptions = {}) { + if (!headers || typeof headers !== "object") return {}; + const { + caseSensitive = false + } = matchOptions; + const filtered = {}; + const { ignore, exclude, match } = headerFilters; + for (const [key, value] of Object.entries(headers)) { + const headerKey = caseSensitive ? key : key.toLowerCase(); + if (exclude.has(headerKey)) continue; + if (ignore.has(headerKey)) continue; + if (match.size !== 0) { + if (!match.has(headerKey)) continue; + } + filtered[headerKey] = value; + } + return filtered; + } + function filterHeadersForStorage(headers, headerFilters, matchOptions = {}) { + if (!headers || typeof headers !== "object") return {}; + const { + caseSensitive = false + } = matchOptions; + const filtered = {}; + const { exclude: excludeSet } = headerFilters; + for (const [key, value] of Object.entries(headers)) { + const headerKey = caseSensitive ? key : key.toLowerCase(); + if (excludeSet.has(headerKey)) continue; + filtered[headerKey] = value; + } + return filtered; + } + function createRequestHash(formattedRequest) { + const parts = [ + formattedRequest.method, + formattedRequest.url + ]; + if (formattedRequest.headers && typeof formattedRequest.headers === "object") { + const headerKeys = Object.keys(formattedRequest.headers).sort(); + for (const key of headerKeys) { + const values = Array.isArray(formattedRequest.headers[key]) ? formattedRequest.headers[key] : [formattedRequest.headers[key]]; + parts.push(key); + for (const value of values.sort()) { + parts.push(String(value)); + } + } + } + parts.push(formattedRequest.body); + const content = parts.join("|"); + return hashId(content); + } + var SnapshotRecorder = class { + /** @type {NodeJS.Timeout | null} */ + #flushTimeout; + /** @type {import('./snapshot-utils').IsUrlExcluded} */ + #isUrlExcluded; + /** @type {Map} */ + #snapshots = /* @__PURE__ */ new Map(); + /** @type {string|undefined} */ + #snapshotPath; + /** @type {number} */ + #maxSnapshots = Infinity; + /** @type {boolean} */ + #autoFlush = false; + /** @type {import('./snapshot-utils').HeaderFilters} */ + #headerFilters; + /** + * Creates a new SnapshotRecorder instance + * @param {SnapshotRecorderOptions&SnapshotRecorderMatchOptions} [options={}] - Configuration options for the recorder + */ + constructor(options = {}) { + this.#snapshotPath = options.snapshotPath; + this.#maxSnapshots = options.maxSnapshots || Infinity; + this.#autoFlush = options.autoFlush || false; + this.flushInterval = options.flushInterval || 3e4; + this._flushTimer = null; + this.matchOptions = { + matchHeaders: options.matchHeaders || [], + // empty means match all headers + ignoreHeaders: options.ignoreHeaders || [], + excludeHeaders: options.excludeHeaders || [], + matchBody: options.matchBody !== false, + // default: true + matchQuery: options.matchQuery !== false, + // default: true + caseSensitive: options.caseSensitive || false + }; + this.#headerFilters = createHeaderFilters(this.matchOptions); + this.shouldRecord = options.shouldRecord || (() => true); + this.shouldPlayback = options.shouldPlayback || (() => true); + this.#isUrlExcluded = isUrlExcludedFactory(options.excludeUrls); + if (this.#autoFlush && this.#snapshotPath) { + this.#startAutoFlush(); + } + } + /** + * Records a request-response interaction + * @param {SnapshotRequestOptions} requestOpts - Request options + * @param {SnapshotEntryResponse} response - Response data to record + * @return {Promise} - Resolves when the recording is complete + */ + async record(requestOpts, response) { + if (!this.shouldRecord(requestOpts)) { + return; + } + const url = new URL(requestOpts.path, requestOpts.origin).toString(); + if (this.#isUrlExcluded(url)) { + return; + } + const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); + const hash = createRequestHash(request); + const normalizedHeaders = normalizeHeaders(response.headers); + const responseData = { + statusCode: response.statusCode, + headers: filterHeadersForStorage(normalizedHeaders, this.#headerFilters, this.matchOptions), + body: Buffer.isBuffer(response.body) ? response.body.toString("base64") : Buffer.from(String(response.body || "")).toString("base64"), + trailers: response.trailers + }; + if (this.#snapshots.size >= this.#maxSnapshots && !this.#snapshots.has(hash)) { + const oldestKey = this.#snapshots.keys().next().value; + this.#snapshots.delete(oldestKey); + } + const existingSnapshot = this.#snapshots.get(hash); + if (existingSnapshot && existingSnapshot.responses) { + existingSnapshot.responses.push(responseData); + existingSnapshot.timestamp = (/* @__PURE__ */ new Date()).toISOString(); + } else { + this.#snapshots.set(hash, { + request, + responses: [responseData], + // Always store as array for consistency + callCount: 0, + timestamp: (/* @__PURE__ */ new Date()).toISOString() + }); + } + if (this.#autoFlush && this.#snapshotPath) { + this.#scheduleFlush(); + } + } + /** + * Finds a matching snapshot for the given request + * Returns the appropriate response based on call count for sequential responses + * + * @param {SnapshotRequestOptions} requestOpts - Request options to match + * @returns {SnapshotEntry&Record<'response', SnapshotEntryResponse>|undefined} - Matching snapshot response or undefined if not found + */ + findSnapshot(requestOpts) { + if (!this.shouldPlayback(requestOpts)) { + return void 0; + } + const url = new URL(requestOpts.path, requestOpts.origin).toString(); + if (this.#isUrlExcluded(url)) { + return void 0; + } + const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); + const hash = createRequestHash(request); + const snapshot = this.#snapshots.get(hash); + if (!snapshot) return void 0; + const currentCallCount = snapshot.callCount || 0; + const responseIndex = Math.min(currentCallCount, snapshot.responses.length - 1); + snapshot.callCount = currentCallCount + 1; + return { + ...snapshot, + response: snapshot.responses[responseIndex] + }; + } + /** + * Loads snapshots from file + * @param {string} [filePath] - Optional file path to load snapshots from + * @return {Promise} - Resolves when snapshots are loaded + */ + async loadSnapshots(filePath) { + const path7 = filePath || this.#snapshotPath; + if (!path7) { + throw new InvalidArgumentError("Snapshot path is required"); + } + try { + const data = await readFile2(resolve(path7), "utf8"); + const parsed = JSON.parse(data); + if (Array.isArray(parsed)) { + this.#snapshots.clear(); + for (const { hash, snapshot } of parsed) { + this.#snapshots.set(hash, snapshot); + } + } else { + this.#snapshots = new Map(Object.entries(parsed)); + } + } catch (error) { + if (error.code === "ENOENT") { + this.#snapshots.clear(); + } else { + throw new UndiciError(`Failed to load snapshots from ${path7}`, { cause: error }); + } + } + } + /** + * Saves snapshots to file + * + * @param {string} [filePath] - Optional file path to save snapshots + * @returns {Promise} - Resolves when snapshots are saved + */ + async saveSnapshots(filePath) { + const path7 = filePath || this.#snapshotPath; + if (!path7) { + throw new InvalidArgumentError("Snapshot path is required"); + } + const resolvedPath = resolve(path7); + await mkdir2(dirname(resolvedPath), { recursive: true }); + const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({ + hash, + snapshot + })); + await writeFile3(resolvedPath, JSON.stringify(data, null, 2), { flush: true }); + } + /** + * Clears all recorded snapshots + * @returns {void} + */ + clear() { + this.#snapshots.clear(); + } + /** + * Gets all recorded snapshots + * @return {Array} - Array of all recorded snapshots + */ + getSnapshots() { + return Array.from(this.#snapshots.values()); + } + /** + * Gets snapshot count + * @return {number} - Number of recorded snapshots + */ + size() { + return this.#snapshots.size; + } + /** + * Resets call counts for all snapshots (useful for test cleanup) + * @returns {void} + */ + resetCallCounts() { + for (const snapshot of this.#snapshots.values()) { + snapshot.callCount = 0; + } + } + /** + * Deletes a specific snapshot by request options + * @param {SnapshotRequestOptions} requestOpts - Request options to match + * @returns {boolean} - True if snapshot was deleted, false if not found + */ + deleteSnapshot(requestOpts) { + const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); + const hash = createRequestHash(request); + return this.#snapshots.delete(hash); + } + /** + * Gets information about a specific snapshot + * @param {SnapshotRequestOptions} requestOpts - Request options to match + * @returns {SnapshotInfo|null} - Snapshot information or null if not found + */ + getSnapshotInfo(requestOpts) { + const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); + const hash = createRequestHash(request); + const snapshot = this.#snapshots.get(hash); + if (!snapshot) return null; + return { + hash, + request: snapshot.request, + responseCount: snapshot.responses ? snapshot.responses.length : snapshot.response ? 1 : 0, + // .response for legacy snapshots + callCount: snapshot.callCount || 0, + timestamp: snapshot.timestamp + }; + } + /** + * Replaces all snapshots with new data (full replacement) + * @param {Array<{hash: string; snapshot: SnapshotEntry}>|Record} snapshotData - New snapshot data to replace existing ones + * @returns {void} + */ + replaceSnapshots(snapshotData) { + this.#snapshots.clear(); + if (Array.isArray(snapshotData)) { + for (const { hash, snapshot } of snapshotData) { + this.#snapshots.set(hash, snapshot); + } + } else if (snapshotData && typeof snapshotData === "object") { + this.#snapshots = new Map(Object.entries(snapshotData)); + } + } + /** + * Starts the auto-flush timer + * @returns {void} + */ + #startAutoFlush() { + return this.#scheduleFlush(); + } + /** + * Stops the auto-flush timer + * @returns {void} + */ + #stopAutoFlush() { + if (this.#flushTimeout) { + clearTimeout2(this.#flushTimeout); + this.saveSnapshots().catch(() => { + }); + this.#flushTimeout = null; + } + } + /** + * Schedules a flush (debounced to avoid excessive writes) + */ + #scheduleFlush() { + this.#flushTimeout = setTimeout3(() => { + this.saveSnapshots().catch(() => { + }); + if (this.#autoFlush) { + this.#flushTimeout?.refresh(); + } else { + this.#flushTimeout = null; + } + }, 1e3); + } + /** + * Cleanup method to stop timers + * @returns {void} + */ + destroy() { + this.#stopAutoFlush(); + if (this.#flushTimeout) { + clearTimeout2(this.#flushTimeout); + this.#flushTimeout = null; + } + } + /** + * Async close method that saves all recordings and performs cleanup + * @returns {Promise} + */ + async close() { + if (this.#snapshotPath && this.#snapshots.size !== 0) { + await this.saveSnapshots(); + } + this.destroy(); + } + }; + module2.exports = { SnapshotRecorder, formatRequestKey, createRequestHash, filterHeadersForMatching, filterHeadersForStorage, createHeaderFilters }; + } +}); + +// node_modules/undici/lib/mock/snapshot-agent.js +var require_snapshot_agent = __commonJS({ + "node_modules/undici/lib/mock/snapshot-agent.js"(exports2, module2) { + "use strict"; + var Agent = require_agent(); + var MockAgent = require_mock_agent(); + var { SnapshotRecorder } = require_snapshot_recorder(); + var WrapHandler = require_wrap_handler(); + var { InvalidArgumentError, UndiciError } = require_errors5(); + var { validateSnapshotMode } = require_snapshot_utils(); + var kSnapshotRecorder = Symbol("kSnapshotRecorder"); + var kSnapshotMode = Symbol("kSnapshotMode"); + var kSnapshotPath = Symbol("kSnapshotPath"); + var kSnapshotLoaded = Symbol("kSnapshotLoaded"); + var kRealAgent = Symbol("kRealAgent"); + var warningEmitted = false; + var SnapshotAgent = class extends MockAgent { + constructor(opts = {}) { + if (!warningEmitted) { + process.emitWarning( + "SnapshotAgent is experimental and subject to change", + "ExperimentalWarning" + ); + warningEmitted = true; + } + const { + mode = "record", + snapshotPath = null, + ...mockAgentOpts + } = opts; + super(mockAgentOpts); + validateSnapshotMode(mode); + if ((mode === "playback" || mode === "update") && !snapshotPath) { + throw new InvalidArgumentError(`snapshotPath is required when mode is '${mode}'`); + } + this[kSnapshotMode] = mode; + this[kSnapshotPath] = snapshotPath; + this[kSnapshotRecorder] = new SnapshotRecorder({ + snapshotPath: this[kSnapshotPath], + mode: this[kSnapshotMode], + maxSnapshots: opts.maxSnapshots, + autoFlush: opts.autoFlush, + flushInterval: opts.flushInterval, + matchHeaders: opts.matchHeaders, + ignoreHeaders: opts.ignoreHeaders, + excludeHeaders: opts.excludeHeaders, + matchBody: opts.matchBody, + matchQuery: opts.matchQuery, + caseSensitive: opts.caseSensitive, + shouldRecord: opts.shouldRecord, + shouldPlayback: opts.shouldPlayback, + excludeUrls: opts.excludeUrls + }); + this[kSnapshotLoaded] = false; + if (this[kSnapshotMode] === "record" || this[kSnapshotMode] === "update") { + this[kRealAgent] = new Agent(opts); + } + if ((this[kSnapshotMode] === "playback" || this[kSnapshotMode] === "update") && this[kSnapshotPath]) { + this.loadSnapshots().catch(() => { + }); + } + } + dispatch(opts, handler) { + handler = WrapHandler.wrap(handler); + const mode = this[kSnapshotMode]; + if (mode === "playback" || mode === "update") { + if (!this[kSnapshotLoaded]) { + return this.#asyncDispatch(opts, handler); + } + const snapshot = this[kSnapshotRecorder].findSnapshot(opts); + if (snapshot) { + return this.#replaySnapshot(snapshot, handler); + } else if (mode === "update") { + return this.#recordAndReplay(opts, handler); + } else { + const error = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); + if (handler.onError) { + handler.onError(error); + return; + } + throw error; + } + } else if (mode === "record") { + return this.#recordAndReplay(opts, handler); + } + } + /** + * Async version of dispatch for when we need to load snapshots first + */ + async #asyncDispatch(opts, handler) { + await this.loadSnapshots(); + return this.dispatch(opts, handler); + } + /** + * Records a real request and replays the response + */ + #recordAndReplay(opts, handler) { + const responseData = { + statusCode: null, + headers: {}, + trailers: {}, + body: [] + }; + const self2 = this; + const recordingHandler = { + onRequestStart(controller, context) { + return handler.onRequestStart(controller, { ...context, history: this.history }); + }, + onRequestUpgrade(controller, statusCode, headers, socket) { + return handler.onRequestUpgrade(controller, statusCode, headers, socket); + }, + onResponseStart(controller, statusCode, headers, statusMessage) { + responseData.statusCode = statusCode; + responseData.headers = headers; + return handler.onResponseStart(controller, statusCode, headers, statusMessage); + }, + onResponseData(controller, chunk) { + responseData.body.push(chunk); + return handler.onResponseData(controller, chunk); + }, + onResponseEnd(controller, trailers) { + responseData.trailers = trailers; + const responseBody = Buffer.concat(responseData.body); + self2[kSnapshotRecorder].record(opts, { + statusCode: responseData.statusCode, + headers: responseData.headers, + body: responseBody, + trailers: responseData.trailers + }).then(() => { + handler.onResponseEnd(controller, trailers); + }).catch((error) => { + handler.onResponseError(controller, error); + }); + } + }; + const agent = this[kRealAgent]; + return agent.dispatch(opts, recordingHandler); + } + /** + * Replays a recorded response + * + * @param {Object} snapshot - The recorded snapshot to replay. + * @param {Object} handler - The handler to call with the response data. + * @returns {void} + */ + #replaySnapshot(snapshot, handler) { + try { + const { response } = snapshot; + const controller = { + pause() { + }, + resume() { + }, + abort(reason) { + this.aborted = true; + this.reason = reason; + }, + aborted: false, + paused: false + }; + handler.onRequestStart(controller); + handler.onResponseStart(controller, response.statusCode, response.headers); + const body = Buffer.from(response.body, "base64"); + handler.onResponseData(controller, body); + handler.onResponseEnd(controller, response.trailers); + } catch (error) { + handler.onError?.(error); + } + } + /** + * Loads snapshots from file + * + * @param {string} [filePath] - Optional file path to load snapshots from. + * @returns {Promise} - Resolves when snapshots are loaded. + */ + async loadSnapshots(filePath) { + await this[kSnapshotRecorder].loadSnapshots(filePath || this[kSnapshotPath]); + this[kSnapshotLoaded] = true; + if (this[kSnapshotMode] === "playback") { + this.#setupMockInterceptors(); + } + } + /** + * Saves snapshots to file + * + * @param {string} [filePath] - Optional file path to save snapshots to. + * @returns {Promise} - Resolves when snapshots are saved. + */ + async saveSnapshots(filePath) { + return this[kSnapshotRecorder].saveSnapshots(filePath || this[kSnapshotPath]); + } + /** + * Sets up MockAgent interceptors based on recorded snapshots. + * + * This method creates MockAgent interceptors for each recorded snapshot, + * allowing the SnapshotAgent to fall back to MockAgent's standard intercept + * mechanism in playback mode. Each interceptor is configured to persist + * (remain active for multiple requests) and responds with the recorded + * response data. + * + * Called automatically when loading snapshots in playback mode. + * + * @returns {void} + */ + #setupMockInterceptors() { + for (const snapshot of this[kSnapshotRecorder].getSnapshots()) { + const { request, responses, response } = snapshot; + const url = new URL(request.url); + const mockPool = this.get(url.origin); + const responseData = responses ? responses[0] : response; + if (!responseData) continue; + mockPool.intercept({ + path: url.pathname + url.search, + method: request.method, + headers: request.headers, + body: request.body + }).reply(responseData.statusCode, responseData.body, { + headers: responseData.headers, + trailers: responseData.trailers + }).persist(); + } + } + /** + * Gets the snapshot recorder + * @return {SnapshotRecorder} - The snapshot recorder instance + */ + getRecorder() { + return this[kSnapshotRecorder]; + } + /** + * Gets the current mode + * @return {import('./snapshot-utils').SnapshotMode} - The current snapshot mode + */ + getMode() { + return this[kSnapshotMode]; + } + /** + * Clears all snapshots + * @returns {void} + */ + clearSnapshots() { + this[kSnapshotRecorder].clear(); + } + /** + * Resets call counts for all snapshots (useful for test cleanup) + * @returns {void} + */ + resetCallCounts() { + this[kSnapshotRecorder].resetCallCounts(); + } + /** + * Deletes a specific snapshot by request options + * @param {import('./snapshot-recorder').SnapshotRequestOptions} requestOpts - Request options to identify the snapshot + * @return {Promise} - Returns true if the snapshot was deleted, false if not found + */ + deleteSnapshot(requestOpts) { + return this[kSnapshotRecorder].deleteSnapshot(requestOpts); + } + /** + * Gets information about a specific snapshot + * @returns {import('./snapshot-recorder').SnapshotInfo|null} - Snapshot information or null if not found + */ + getSnapshotInfo(requestOpts) { + return this[kSnapshotRecorder].getSnapshotInfo(requestOpts); + } + /** + * Replaces all snapshots with new data (full replacement) + * @param {Array<{hash: string; snapshot: import('./snapshot-recorder').SnapshotEntryshotEntry}>|Record} snapshotData - New snapshot data to replace existing snapshots + * @returns {void} + */ + replaceSnapshots(snapshotData) { + this[kSnapshotRecorder].replaceSnapshots(snapshotData); + } + /** + * Closes the agent, saving snapshots and cleaning up resources. + * + * @returns {Promise} + */ + async close() { + await this[kSnapshotRecorder].close(); + await this[kRealAgent]?.close(); + await super.close(); + } + }; + module2.exports = SnapshotAgent; + } +}); + +// node_modules/undici/lib/global.js +var require_global2 = __commonJS({ + "node_modules/undici/lib/global.js"(exports2, module2) { + "use strict"; + var globalDispatcher = Symbol.for("undici.globalDispatcher.1"); + var { InvalidArgumentError } = require_errors5(); + var Agent = require_agent(); + if (getGlobalDispatcher() === void 0) { + setGlobalDispatcher(new Agent()); + } + function setGlobalDispatcher(agent) { + if (!agent || typeof agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument agent must implement Agent"); + } + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); + } + function getGlobalDispatcher() { + return globalThis[globalDispatcher]; + } + module2.exports = { + setGlobalDispatcher, + getGlobalDispatcher + }; + } +}); + +// node_modules/undici/lib/handler/decorator-handler.js +var require_decorator_handler = __commonJS({ + "node_modules/undici/lib/handler/decorator-handler.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var WrapHandler = require_wrap_handler(); + module2.exports = class DecoratorHandler { + #handler; + #onCompleteCalled = false; + #onErrorCalled = false; + #onResponseStartCalled = false; + constructor(handler) { + if (typeof handler !== "object" || handler === null) { + throw new TypeError("handler must be an object"); + } + this.#handler = WrapHandler.wrap(handler); + } + onRequestStart(...args) { + this.#handler.onRequestStart?.(...args); + } + onRequestUpgrade(...args) { + assert(!this.#onCompleteCalled); + assert(!this.#onErrorCalled); + return this.#handler.onRequestUpgrade?.(...args); + } + onResponseStart(...args) { + assert(!this.#onCompleteCalled); + assert(!this.#onErrorCalled); + assert(!this.#onResponseStartCalled); + this.#onResponseStartCalled = true; + return this.#handler.onResponseStart?.(...args); + } + onResponseData(...args) { + assert(!this.#onCompleteCalled); + assert(!this.#onErrorCalled); + return this.#handler.onResponseData?.(...args); + } + onResponseEnd(...args) { + assert(!this.#onCompleteCalled); + assert(!this.#onErrorCalled); + this.#onCompleteCalled = true; + return this.#handler.onResponseEnd?.(...args); + } + onResponseError(...args) { + this.#onErrorCalled = true; + return this.#handler.onResponseError?.(...args); + } + /** + * @deprecated + */ + onBodySent() { + } + }; + } +}); + +// node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = __commonJS({ + "node_modules/undici/lib/handler/redirect-handler.js"(exports2, module2) { + "use strict"; + var util = require_util4(); + var { kBodyUsed } = require_symbols4(); + var assert = require("node:assert"); + var { InvalidArgumentError } = require_errors5(); + var EE = require("node:events"); + var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; + var kBody = Symbol("body"); + var noop = () => { + }; + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class _RedirectHandler { + static buildDispatch(dispatcher, maxRedirections) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + const dispatch = dispatcher.dispatch.bind(dispatcher); + return (opts, originalHandler) => dispatch(opts, new _RedirectHandler(dispatch, maxRedirections, opts, originalHandler)); + } + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + this.dispatch = dispatch; + this.location = null; + const { maxRedirections: _, ...cleanOpts } = opts; + this.opts = cleanOpts; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) { + this.opts.body.on("data", function() { + assert(false); + }); + } + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { + this.opts.body = new BodyAsyncIterable(this.opts.body); + } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body) && !util.isFormDataLike(this.opts.body)) { + this.opts.body = new BodyAsyncIterable(this.opts.body); + } + } + onRequestStart(controller, context) { + this.handler.onRequestStart?.(controller, { ...context, history: this.history }); + } + onRequestUpgrade(controller, statusCode, headers, socket) { + this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + throw new Error("max redirects"); + } + if ((statusCode === 301 || statusCode === 302) && this.opts.method === "POST") { + this.opts.method = "GET"; + if (util.isStream(this.opts.body)) { + util.destroy(this.opts.body.on("error", noop)); + } + this.opts.body = null; + } + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + if (util.isStream(this.opts.body)) { + util.destroy(this.opts.body.on("error", noop)); + } + this.opts.body = null; + } + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1 ? null : headers.location; + if (this.opts.origin) { + this.history.push(new URL(this.opts.path, this.opts.origin)); + } + if (!this.location) { + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); + return; + } + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path7 = search ? `${pathname}${search}` : pathname; + const redirectUrlString = `${origin}${path7}`; + for (const historyUrl of this.history) { + if (historyUrl.toString() === redirectUrlString) { + throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`); + } + } + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path7; + this.opts.origin = origin; + this.opts.query = null; + } + onResponseData(controller, chunk) { + if (this.location) { + } else { + this.handler.onResponseData?.(controller, chunk); + } + } + onResponseEnd(controller, trailers) { + if (this.location) { + this.dispatch(this.opts, this); + } else { + this.handler.onResponseEnd(controller, trailers); + } + } + onResponseError(controller, error) { + this.handler.onResponseError?.(controller, error); + } + }; + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) { + return util.headerNameToString(header) === "host"; + } + if (removeContent && util.headerNameToString(header).startsWith("content-")) { + return true; + } + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { + ret.push(headers[i], headers[i + 1]); + } + } + } else if (headers && typeof headers === "object") { + const entries = typeof headers[Symbol.iterator] === "function" ? headers : Object.entries(headers); + for (const [key, value] of entries) { + if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { + ret.push(key, value); + } + } + } else { + assert(headers == null, "headers must be an object or an array"); + } + return ret; + } + module2.exports = RedirectHandler; + } +}); + +// node_modules/undici/lib/interceptor/redirect.js +var require_redirect = __commonJS({ + "node_modules/undici/lib/interceptor/redirect.js"(exports2, module2) { + "use strict"; + var RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections } = {}) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections, ...rest } = opts; + if (maxRedirections == null || maxRedirections === 0) { + return dispatch(opts, handler); + } + const dispatchOpts = { ...rest }; + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, dispatchOpts, handler); + return dispatch(dispatchOpts, redirectHandler); + }; + }; + } + module2.exports = createRedirectInterceptor; + } +}); + +// node_modules/undici/lib/interceptor/response-error.js +var require_response_error = __commonJS({ + "node_modules/undici/lib/interceptor/response-error.js"(exports2, module2) { + "use strict"; + var DecoratorHandler = require_decorator_handler(); + var { ResponseError } = require_errors5(); + var ResponseErrorHandler = class extends DecoratorHandler { + #statusCode; + #contentType; + #decoder; + #headers; + #body; + constructor(_opts, { handler }) { + super(handler); + } + #checkContentType(contentType) { + return (this.#contentType ?? "").indexOf(contentType) === 0; + } + onRequestStart(controller, context) { + this.#statusCode = 0; + this.#contentType = null; + this.#decoder = null; + this.#headers = null; + this.#body = ""; + return super.onRequestStart(controller, context); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + this.#statusCode = statusCode; + this.#headers = headers; + this.#contentType = headers["content-type"]; + if (this.#statusCode < 400) { + return super.onResponseStart(controller, statusCode, headers, statusMessage); + } + if (this.#checkContentType("application/json") || this.#checkContentType("text/plain")) { + this.#decoder = new TextDecoder("utf-8"); + } + } + onResponseData(controller, chunk) { + if (this.#statusCode < 400) { + return super.onResponseData(controller, chunk); + } + this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? ""; + } + onResponseEnd(controller, trailers) { + if (this.#statusCode >= 400) { + this.#body += this.#decoder?.decode(void 0, { stream: false }) ?? ""; + if (this.#checkContentType("application/json")) { + try { + this.#body = JSON.parse(this.#body); + } catch { + } + } + let err; + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + try { + err = new ResponseError("Response Error", this.#statusCode, { + body: this.#body, + headers: this.#headers + }); + } finally { + Error.stackTraceLimit = stackTraceLimit; + } + super.onResponseError(controller, err); + } else { + super.onResponseEnd(controller, trailers); + } + } + onResponseError(controller, err) { + super.onResponseError(controller, err); + } + }; + module2.exports = () => { + return (dispatch) => { + return function Intercept(opts, handler) { + return dispatch(opts, new ResponseErrorHandler(opts, { handler })); + }; + }; + }; + } +}); + +// node_modules/undici/lib/interceptor/retry.js +var require_retry = __commonJS({ + "node_modules/undici/lib/interceptor/retry.js"(exports2, module2) { + "use strict"; + var RetryHandler = require_retry_handler(); + module2.exports = (globalOpts) => { + return (dispatch) => { + return function retryInterceptor(opts, handler) { + return dispatch( + opts, + new RetryHandler( + { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, + { + handler, + dispatch + } + ) + ); + }; + }; + }; + } +}); + +// node_modules/undici/lib/interceptor/dump.js +var require_dump = __commonJS({ + "node_modules/undici/lib/interceptor/dump.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError, RequestAbortedError } = require_errors5(); + var DecoratorHandler = require_decorator_handler(); + var DumpHandler = class extends DecoratorHandler { + #maxSize = 1024 * 1024; + #dumped = false; + #size = 0; + #controller = null; + aborted = false; + reason = false; + constructor({ maxSize, signal }, handler) { + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { + throw new InvalidArgumentError("maxSize must be a number greater than 0"); + } + super(handler); + this.#maxSize = maxSize ?? this.#maxSize; + } + #abort(reason) { + this.aborted = true; + this.reason = reason; + } + onRequestStart(controller, context) { + controller.abort = this.#abort.bind(this); + this.#controller = controller; + return super.onRequestStart(controller, context); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + const contentLength = headers["content-length"]; + if (contentLength != null && contentLength > this.#maxSize) { + throw new RequestAbortedError( + `Response size (${contentLength}) larger than maxSize (${this.#maxSize})` + ); + } + if (this.aborted === true) { + return true; + } + return super.onResponseStart(controller, statusCode, headers, statusMessage); + } + onResponseError(controller, err) { + if (this.#dumped) { + return; + } + err = this.#controller?.reason ?? err; + super.onResponseError(controller, err); + } + onResponseData(controller, chunk) { + this.#size = this.#size + chunk.length; + if (this.#size >= this.#maxSize) { + this.#dumped = true; + if (this.aborted === true) { + super.onResponseError(controller, this.reason); + } else { + super.onResponseEnd(controller, {}); + } + } + return true; + } + onResponseEnd(controller, trailers) { + if (this.#dumped) { + return; + } + if (this.#controller.aborted === true) { + super.onResponseError(controller, this.reason); + return; + } + super.onResponseEnd(controller, trailers); + } + }; + function createDumpInterceptor({ maxSize: defaultMaxSize } = { + maxSize: 1024 * 1024 + }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { dumpMaxSize = defaultMaxSize } = opts; + const dumpHandler = new DumpHandler({ maxSize: dumpMaxSize, signal: opts.signal }, handler); + return dispatch(opts, dumpHandler); + }; + }; + } + module2.exports = createDumpInterceptor; + } +}); + +// node_modules/undici/lib/interceptor/dns.js +var require_dns = __commonJS({ + "node_modules/undici/lib/interceptor/dns.js"(exports2, module2) { + "use strict"; + var { isIP } = require("node:net"); + var { lookup } = require("node:dns"); + var DecoratorHandler = require_decorator_handler(); + var { InvalidArgumentError, InformationalError } = require_errors5(); + var maxInt = Math.pow(2, 31) - 1; + var DNSInstance = class { + #maxTTL = 0; + #maxItems = 0; + #records = /* @__PURE__ */ new Map(); + dualStack = true; + affinity = null; + lookup = null; + pick = null; + constructor(opts) { + this.#maxTTL = opts.maxTTL; + this.#maxItems = opts.maxItems; + this.dualStack = opts.dualStack; + this.affinity = opts.affinity; + this.lookup = opts.lookup ?? this.#defaultLookup; + this.pick = opts.pick ?? this.#defaultPick; + } + get full() { + return this.#records.size === this.#maxItems; + } + runLookup(origin, opts, cb) { + const ips = this.#records.get(origin.hostname); + if (ips == null && this.full) { + cb(null, origin); + return; + } + const newOpts = { + affinity: this.affinity, + dualStack: this.dualStack, + lookup: this.lookup, + pick: this.pick, + ...opts.dns, + maxTTL: this.#maxTTL, + maxItems: this.#maxItems + }; + if (ips == null) { + this.lookup(origin, newOpts, (err, addresses) => { + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new InformationalError("No DNS entries found")); + return; + } + this.setRecords(origin, addresses); + const records = this.#records.get(origin.hostname); + const ip = this.pick( + origin, + records, + newOpts.affinity + ); + let port; + if (typeof ip.port === "number") { + port = `:${ip.port}`; + } else if (origin.port !== "") { + port = `:${origin.port}`; + } else { + port = ""; + } + cb( + null, + new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`) + ); + }); + } else { + const ip = this.pick( + origin, + ips, + newOpts.affinity + ); + if (ip == null) { + this.#records.delete(origin.hostname); + this.runLookup(origin, opts, cb); + return; + } + let port; + if (typeof ip.port === "number") { + port = `:${ip.port}`; + } else if (origin.port !== "") { + port = `:${origin.port}`; + } else { + port = ""; + } + cb( + null, + new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`) + ); + } + } + #defaultLookup(origin, opts, cb) { + lookup( + origin.hostname, + { + all: true, + family: this.dualStack === false ? this.affinity : 0, + order: "ipv4first" + }, + (err, addresses) => { + if (err) { + return cb(err); + } + const results = /* @__PURE__ */ new Map(); + for (const addr of addresses) { + results.set(`${addr.address}:${addr.family}`, addr); + } + cb(null, results.values()); + } + ); + } + #defaultPick(origin, hostnameRecords, affinity) { + let ip = null; + const { records, offset } = hostnameRecords; + let family; + if (this.dualStack) { + if (affinity == null) { + if (offset == null || offset === maxInt) { + hostnameRecords.offset = 0; + affinity = 4; + } else { + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + } + if (records[affinity] != null && records[affinity].ips.length > 0) { + family = records[affinity]; + } else { + family = records[affinity === 4 ? 6 : 4]; + } + } else { + family = records[affinity]; + } + if (family == null || family.ips.length === 0) { + return ip; + } + if (family.offset == null || family.offset === maxInt) { + family.offset = 0; + } else { + family.offset++; + } + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + if (ip == null) { + return ip; + } + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); + } + return ip; + } + pickFamily(origin, ipFamily) { + const records = this.#records.get(origin.hostname)?.records; + if (!records) { + return null; + } + const family = records[ipFamily]; + if (!family) { + return null; + } + if (family.offset == null || family.offset === maxInt) { + family.offset = 0; + } else { + family.offset++; + } + const position = family.offset % family.ips.length; + const ip = family.ips[position] ?? null; + if (ip == null) { + return ip; + } + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + } + return ip; + } + setRecords(origin, addresses) { + const timestamp = Date.now(); + const records = { records: { 4: null, 6: null } }; + for (const record of addresses) { + record.timestamp = timestamp; + if (typeof record.ttl === "number") { + record.ttl = Math.min(record.ttl, this.#maxTTL); + } else { + record.ttl = this.#maxTTL; + } + const familyRecords = records.records[record.family] ?? { ips: [] }; + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; + } + this.#records.set(origin.hostname, records); + } + deleteRecords(origin) { + this.#records.delete(origin.hostname); + } + getHandler(meta, opts) { + return new DNSDispatchHandler(this, meta, opts); + } + }; + var DNSDispatchHandler = class extends DecoratorHandler { + #state = null; + #opts = null; + #dispatch = null; + #origin = null; + #controller = null; + #newOrigin = null; + #firstTry = true; + constructor(state, { origin, handler, dispatch, newOrigin }, opts) { + super(handler); + this.#origin = origin; + this.#newOrigin = newOrigin; + this.#opts = { ...opts }; + this.#state = state; + this.#dispatch = dispatch; + } + onResponseError(controller, err) { + switch (err.code) { + case "ETIMEDOUT": + case "ECONNREFUSED": { + if (this.#state.dualStack) { + if (!this.#firstTry) { + super.onResponseError(controller, err); + return; + } + this.#firstTry = false; + const otherFamily = this.#newOrigin.hostname[0] === "[" ? 4 : 6; + const ip = this.#state.pickFamily(this.#origin, otherFamily); + if (ip == null) { + super.onResponseError(controller, err); + return; + } + let port; + if (typeof ip.port === "number") { + port = `:${ip.port}`; + } else if (this.#origin.port !== "") { + port = `:${this.#origin.port}`; + } else { + port = ""; + } + const dispatchOpts = { + ...this.#opts, + origin: `${this.#origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}` + }; + this.#dispatch(dispatchOpts, this); + return; + } + super.onResponseError(controller, err); + break; + } + case "ENOTFOUND": + this.#state.deleteRecords(this.#origin); + super.onResponseError(controller, err); + break; + default: + super.onResponseError(controller, err); + break; + } + } + }; + module2.exports = (interceptorOpts) => { + if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) { + throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); + } + if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) { + throw new InvalidArgumentError( + "Invalid maxItems. Must be a positive number and greater than zero" + ); + } + if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) { + throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); + } + if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") { + throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); + } + if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") { + throw new InvalidArgumentError("Invalid lookup. Must be a function"); + } + if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") { + throw new InvalidArgumentError("Invalid pick. Must be a function"); + } + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) { + affinity = interceptorOpts?.affinity ?? null; + } else { + affinity = interceptorOpts?.affinity ?? 4; + } + const opts = { + maxTTL: interceptorOpts?.maxTTL ?? 1e4, + // Expressed in ms + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack, + affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity + }; + const instance = new DNSInstance(opts); + return (dispatch) => { + return function dnsInterceptor(origDispatchOpts, handler) { + const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); + if (isIP(origin.hostname) !== 0) { + return dispatch(origDispatchOpts, handler); + } + instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { + if (err) { + return handler.onResponseError(null, err); + } + const dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, + // For SNI on TLS + origin: newOrigin.origin, + headers: { + host: origin.host, + ...origDispatchOpts.headers + } + }; + dispatch( + dispatchOpts, + instance.getHandler( + { origin, dispatch, handler, newOrigin }, + origDispatchOpts + ) + ); + }); + return true; + }; + }; + }; + } +}); + +// node_modules/undici/lib/util/cache.js +var require_cache = __commonJS({ + "node_modules/undici/lib/util/cache.js"(exports2, module2) { + "use strict"; + var { + safeHTTPMethods, + pathHasQueryOrFragment + } = require_util4(); + var { serializePathWithQuery } = require_util4(); + function makeCacheKey(opts) { + if (!opts.origin) { + throw new Error("opts.origin is undefined"); + } + let fullPath = opts.path || "/"; + if (opts.query && !pathHasQueryOrFragment(opts.path)) { + fullPath = serializePathWithQuery(fullPath, opts.query); + } + return { + origin: opts.origin.toString(), + method: opts.method, + path: fullPath, + headers: opts.headers + }; + } + function normalizeHeaders(opts) { + let headers; + if (opts.headers == null) { + headers = {}; + } else if (typeof opts.headers[Symbol.iterator] === "function") { + headers = {}; + for (const x of opts.headers) { + if (!Array.isArray(x)) { + throw new Error("opts.headers is not a valid header map"); + } + const [key, val] = x; + if (typeof key !== "string" || typeof val !== "string") { + throw new Error("opts.headers is not a valid header map"); + } + headers[key.toLowerCase()] = val; + } + } else if (typeof opts.headers === "object") { + headers = {}; + for (const key of Object.keys(opts.headers)) { + headers[key.toLowerCase()] = opts.headers[key]; + } + } else { + throw new Error("opts.headers is not an object"); + } + return headers; + } + function assertCacheKey(key) { + if (typeof key !== "object") { + throw new TypeError(`expected key to be object, got ${typeof key}`); + } + for (const property of ["origin", "method", "path"]) { + if (typeof key[property] !== "string") { + throw new TypeError(`expected key.${property} to be string, got ${typeof key[property]}`); + } + } + if (key.headers !== void 0 && typeof key.headers !== "object") { + throw new TypeError(`expected headers to be object, got ${typeof key}`); + } + } + function assertCacheValue(value) { + if (typeof value !== "object") { + throw new TypeError(`expected value to be object, got ${typeof value}`); + } + for (const property of ["statusCode", "cachedAt", "staleAt", "deleteAt"]) { + if (typeof value[property] !== "number") { + throw new TypeError(`expected value.${property} to be number, got ${typeof value[property]}`); + } + } + if (typeof value.statusMessage !== "string") { + throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`); + } + if (value.headers != null && typeof value.headers !== "object") { + throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`); + } + if (value.vary !== void 0 && typeof value.vary !== "object") { + throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`); + } + if (value.etag !== void 0 && typeof value.etag !== "string") { + throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`); + } + } + function parseCacheControlHeader(header) { + const output = {}; + let directives; + if (Array.isArray(header)) { + directives = []; + for (const directive of header) { + directives.push(...directive.split(",")); + } + } else { + directives = header.split(","); + } + for (let i = 0; i < directives.length; i++) { + const directive = directives[i].toLowerCase(); + const keyValueDelimiter = directive.indexOf("="); + let key; + let value; + if (keyValueDelimiter !== -1) { + key = directive.substring(0, keyValueDelimiter).trimStart(); + value = directive.substring(keyValueDelimiter + 1); + } else { + key = directive.trim(); + } + switch (key) { + case "min-fresh": + case "max-stale": + case "max-age": + case "s-maxage": + case "stale-while-revalidate": + case "stale-if-error": { + if (value === void 0 || value[0] === " ") { + continue; + } + if (value.length >= 2 && value[0] === '"' && value[value.length - 1] === '"') { + value = value.substring(1, value.length - 1); + } + const parsedValue = parseInt(value, 10); + if (parsedValue !== parsedValue) { + continue; + } + if (key === "max-age" && key in output && output[key] >= parsedValue) { + continue; + } + output[key] = parsedValue; + break; + } + case "private": + case "no-cache": { + if (value) { + if (value[0] === '"') { + const headers = [value.substring(1)]; + let foundEndingQuote = value[value.length - 1] === '"'; + if (!foundEndingQuote) { + for (let j = i + 1; j < directives.length; j++) { + const nextPart = directives[j]; + const nextPartLength = nextPart.length; + headers.push(nextPart.trim()); + if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === '"') { + foundEndingQuote = true; + break; + } + } + } + if (foundEndingQuote) { + let lastHeader = headers[headers.length - 1]; + if (lastHeader[lastHeader.length - 1] === '"') { + lastHeader = lastHeader.substring(0, lastHeader.length - 1); + headers[headers.length - 1] = lastHeader; + } + if (key in output) { + output[key] = output[key].concat(headers); + } else { + output[key] = headers; + } + } + } else { + if (key in output) { + output[key] = output[key].concat(value); + } else { + output[key] = [value]; + } + } + break; + } + } + // eslint-disable-next-line no-fallthrough + case "public": + case "no-store": + case "must-revalidate": + case "proxy-revalidate": + case "immutable": + case "no-transform": + case "must-understand": + case "only-if-cached": + if (value) { + continue; + } + output[key] = true; + break; + default: + continue; + } + } + return output; + } + function parseVaryHeader(varyHeader, headers) { + if (typeof varyHeader === "string" && varyHeader.includes("*")) { + return headers; + } + const output = ( + /** @type {Record} */ + {} + ); + const varyingHeaders = typeof varyHeader === "string" ? varyHeader.split(",") : varyHeader; + for (const header of varyingHeaders) { + const trimmedHeader = header.trim().toLowerCase(); + output[trimmedHeader] = headers[trimmedHeader] ?? null; + } + return output; + } + function isEtagUsable(etag) { + if (etag.length <= 2) { + return false; + } + if (etag[0] === '"' && etag[etag.length - 1] === '"') { + return !(etag[1] === '"' || etag.startsWith('"W/')); + } + if (etag.startsWith('W/"') && etag[etag.length - 1] === '"') { + return etag.length !== 4; + } + return false; + } + function assertCacheStore(store, name = "CacheStore") { + if (typeof store !== "object" || store === null) { + throw new TypeError(`expected type of ${name} to be a CacheStore, got ${store === null ? "null" : typeof store}`); + } + for (const fn of ["get", "createWriteStream", "delete"]) { + if (typeof store[fn] !== "function") { + throw new TypeError(`${name} needs to have a \`${fn}()\` function`); + } + } + } + function assertCacheMethods(methods, name = "CacheMethods") { + if (!Array.isArray(methods)) { + throw new TypeError(`expected type of ${name} needs to be an array, got ${methods === null ? "null" : typeof methods}`); + } + if (methods.length === 0) { + throw new TypeError(`${name} needs to have at least one method`); + } + for (const method of methods) { + if (!safeHTTPMethods.includes(method)) { + throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(", ")}, got ${method}`); + } + } + } + module2.exports = { + makeCacheKey, + normalizeHeaders, + assertCacheKey, + assertCacheValue, + parseCacheControlHeader, + parseVaryHeader, + isEtagUsable, + assertCacheMethods, + assertCacheStore + }; + } +}); + +// node_modules/undici/lib/util/date.js +var require_date = __commonJS({ + "node_modules/undici/lib/util/date.js"(exports2, module2) { + "use strict"; + var IMF_DAYS = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]; + var IMF_SPACES = [4, 7, 11, 16, 25]; + var IMF_MONTHS = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"]; + var IMF_COLONS = [19, 22]; + var ASCTIME_SPACES = [3, 7, 10, 19]; + var RFC850_DAYS = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]; + function parseHttpDate(date, now) { + date = date.toLowerCase(); + switch (date[3]) { + case ",": + return parseImfDate(date); + case " ": + return parseAscTimeDate(date); + default: + return parseRfc850Date(date, now); + } + } + function parseImfDate(date) { + if (date.length !== 29) { + return void 0; + } + if (!date.endsWith("gmt")) { + return void 0; + } + for (const spaceInx of IMF_SPACES) { + if (date[spaceInx] !== " ") { + return void 0; + } + } + for (const colonIdx of IMF_COLONS) { + if (date[colonIdx] !== ":") { + return void 0; + } + } + const dayName = date.substring(0, 3); + if (!IMF_DAYS.includes(dayName)) { + return void 0; + } + const dayString = date.substring(5, 7); + const day = Number.parseInt(dayString); + if (isNaN(day) || day < 10 && dayString[0] !== "0") { + return void 0; + } + const month = date.substring(8, 11); + const monthIdx = IMF_MONTHS.indexOf(month); + if (monthIdx === -1) { + return void 0; + } + const year = Number.parseInt(date.substring(12, 16)); + if (isNaN(year)) { + return void 0; + } + const hourString = date.substring(17, 19); + const hour = Number.parseInt(hourString); + if (isNaN(hour) || hour < 10 && hourString[0] !== "0") { + return void 0; + } + const minuteString = date.substring(20, 22); + const minute = Number.parseInt(minuteString); + if (isNaN(minute) || minute < 10 && minuteString[0] !== "0") { + return void 0; + } + const secondString = date.substring(23, 25); + const second = Number.parseInt(secondString); + if (isNaN(second) || second < 10 && secondString[0] !== "0") { + return void 0; + } + return new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); + } + function parseAscTimeDate(date) { + if (date.length !== 24) { + return void 0; + } + for (const spaceIdx of ASCTIME_SPACES) { + if (date[spaceIdx] !== " ") { + return void 0; + } + } + const dayName = date.substring(0, 3); + if (!IMF_DAYS.includes(dayName)) { + return void 0; + } + const month = date.substring(4, 7); + const monthIdx = IMF_MONTHS.indexOf(month); + if (monthIdx === -1) { + return void 0; + } + const dayString = date.substring(8, 10); + const day = Number.parseInt(dayString); + if (isNaN(day) || day < 10 && dayString[0] !== " ") { + return void 0; + } + const hourString = date.substring(11, 13); + const hour = Number.parseInt(hourString); + if (isNaN(hour) || hour < 10 && hourString[0] !== "0") { + return void 0; + } + const minuteString = date.substring(14, 16); + const minute = Number.parseInt(minuteString); + if (isNaN(minute) || minute < 10 && minuteString[0] !== "0") { + return void 0; + } + const secondString = date.substring(17, 19); + const second = Number.parseInt(secondString); + if (isNaN(second) || second < 10 && secondString[0] !== "0") { + return void 0; + } + const year = Number.parseInt(date.substring(20, 24)); + if (isNaN(year)) { + return void 0; + } + return new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); + } + function parseRfc850Date(date, now = /* @__PURE__ */ new Date()) { + if (!date.endsWith("gmt")) { + return void 0; + } + const commaIndex = date.indexOf(","); + if (commaIndex === -1) { + return void 0; + } + if (date.length - commaIndex - 1 !== 23) { + return void 0; + } + const dayName = date.substring(0, commaIndex); + if (!RFC850_DAYS.includes(dayName)) { + return void 0; + } + if (date[commaIndex + 1] !== " " || date[commaIndex + 4] !== "-" || date[commaIndex + 8] !== "-" || date[commaIndex + 11] !== " " || date[commaIndex + 14] !== ":" || date[commaIndex + 17] !== ":" || date[commaIndex + 20] !== " ") { + return void 0; + } + const dayString = date.substring(commaIndex + 2, commaIndex + 4); + const day = Number.parseInt(dayString); + if (isNaN(day) || day < 10 && dayString[0] !== "0") { + return void 0; + } + const month = date.substring(commaIndex + 5, commaIndex + 8); + const monthIdx = IMF_MONTHS.indexOf(month); + if (monthIdx === -1) { + return void 0; + } + let year = Number.parseInt(date.substring(commaIndex + 9, commaIndex + 11)); + if (isNaN(year)) { + return void 0; + } + const currentYear = now.getUTCFullYear(); + const currentDecade = currentYear % 100; + const currentCentury = Math.floor(currentYear / 100); + if (year > currentDecade && year - currentDecade >= 50) { + year += (currentCentury - 1) * 100; + } else { + year += currentCentury * 100; + } + const hourString = date.substring(commaIndex + 12, commaIndex + 14); + const hour = Number.parseInt(hourString); + if (isNaN(hour) || hour < 10 && hourString[0] !== "0") { + return void 0; + } + const minuteString = date.substring(commaIndex + 15, commaIndex + 17); + const minute = Number.parseInt(minuteString); + if (isNaN(minute) || minute < 10 && minuteString[0] !== "0") { + return void 0; + } + const secondString = date.substring(commaIndex + 18, commaIndex + 20); + const second = Number.parseInt(secondString); + if (isNaN(second) || second < 10 && secondString[0] !== "0") { + return void 0; + } + return new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); + } + module2.exports = { + parseHttpDate + }; + } +}); + +// node_modules/undici/lib/handler/cache-handler.js +var require_cache_handler = __commonJS({ + "node_modules/undici/lib/handler/cache-handler.js"(exports2, module2) { + "use strict"; + var util = require_util4(); + var { + parseCacheControlHeader, + parseVaryHeader, + isEtagUsable + } = require_cache(); + var { parseHttpDate } = require_date(); + function noop() { + } + var HEURISTICALLY_CACHEABLE_STATUS_CODES = [ + 200, + 203, + 204, + 206, + 300, + 301, + 308, + 404, + 405, + 410, + 414, + 501 + ]; + var NOT_UNDERSTOOD_STATUS_CODES = [ + 206, + 304 + ]; + var MAX_RESPONSE_AGE = 2147483647e3; + var CacheHandler = class { + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey} + */ + #cacheKey; + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions['type']} + */ + #cacheType; + /** + * @type {number | undefined} + */ + #cacheByDefault; + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheStore} + */ + #store; + /** + * @type {import('../../types/dispatcher.d.ts').default.DispatchHandler} + */ + #handler; + /** + * @type {import('node:stream').Writable | undefined} + */ + #writeStream; + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} opts + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey + * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler + */ + constructor({ store, type, cacheByDefault }, cacheKey, handler) { + this.#store = store; + this.#cacheType = type; + this.#cacheByDefault = cacheByDefault; + this.#cacheKey = cacheKey; + this.#handler = handler; + } + onRequestStart(controller, context) { + this.#writeStream?.destroy(); + this.#writeStream = void 0; + this.#handler.onRequestStart?.(controller, context); + } + onRequestUpgrade(controller, statusCode, headers, socket) { + this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket); + } + /** + * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller + * @param {number} statusCode + * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders + * @param {string} statusMessage + */ + onResponseStart(controller, statusCode, resHeaders, statusMessage) { + const downstreamOnHeaders = () => this.#handler.onResponseStart?.( + controller, + statusCode, + resHeaders, + statusMessage + ); + if (!util.safeHTTPMethods.includes(this.#cacheKey.method) && statusCode >= 200 && statusCode <= 399) { + try { + this.#store.delete(this.#cacheKey)?.catch?.(noop); + } catch { + } + return downstreamOnHeaders(); + } + const cacheControlHeader = resHeaders["cache-control"]; + const heuristicallyCacheable = resHeaders["last-modified"] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode); + if (!cacheControlHeader && !resHeaders["expires"] && !heuristicallyCacheable && !this.#cacheByDefault) { + return downstreamOnHeaders(); + } + const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {}; + if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives)) { + return downstreamOnHeaders(); + } + const now = Date.now(); + const resAge = resHeaders.age ? getAge(resHeaders.age) : void 0; + if (resAge && resAge >= MAX_RESPONSE_AGE) { + return downstreamOnHeaders(); + } + const resDate = typeof resHeaders.date === "string" ? parseHttpDate(resHeaders.date) : void 0; + const staleAt = determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ?? this.#cacheByDefault; + if (staleAt === void 0 || resAge && resAge > staleAt) { + return downstreamOnHeaders(); + } + const baseTime = resDate ? resDate.getTime() : now; + const absoluteStaleAt = staleAt + baseTime; + if (now >= absoluteStaleAt) { + return downstreamOnHeaders(); + } + let varyDirectives; + if (this.#cacheKey.headers && resHeaders.vary) { + varyDirectives = parseVaryHeader(resHeaders.vary, this.#cacheKey.headers); + if (!varyDirectives) { + return downstreamOnHeaders(); + } + } + const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt); + const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives); + const value = { + statusCode, + statusMessage, + headers: strippedHeaders, + vary: varyDirectives, + cacheControlDirectives, + cachedAt: resAge ? now - resAge : now, + staleAt: absoluteStaleAt, + deleteAt + }; + if (typeof resHeaders.etag === "string" && isEtagUsable(resHeaders.etag)) { + value.etag = resHeaders.etag; + } + this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value); + if (!this.#writeStream) { + return downstreamOnHeaders(); + } + const handler = this; + this.#writeStream.on("drain", () => controller.resume()).on("error", function() { + handler.#writeStream = void 0; + handler.#store.delete(handler.#cacheKey); + }).on("close", function() { + if (handler.#writeStream === this) { + handler.#writeStream = void 0; + } + controller.resume(); + }); + return downstreamOnHeaders(); + } + onResponseData(controller, chunk) { + if (this.#writeStream?.write(chunk) === false) { + controller.pause(); + } + this.#handler.onResponseData?.(controller, chunk); + } + onResponseEnd(controller, trailers) { + this.#writeStream?.end(); + this.#handler.onResponseEnd?.(controller, trailers); + } + onResponseError(controller, err) { + this.#writeStream?.destroy(err); + this.#writeStream = void 0; + this.#handler.onResponseError?.(controller, err); + } + }; + function canCacheResponse(cacheType, statusCode, resHeaders, cacheControlDirectives) { + if (statusCode < 200 || NOT_UNDERSTOOD_STATUS_CODES.includes(statusCode)) { + return false; + } + if (!HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) && !resHeaders["expires"] && !cacheControlDirectives.public && cacheControlDirectives["max-age"] === void 0 && // RFC 9111: a private response directive, if the cache is not shared + !(cacheControlDirectives.private && cacheType === "private") && !(cacheControlDirectives["s-maxage"] !== void 0 && cacheType === "shared")) { + return false; + } + if (cacheControlDirectives["no-store"]) { + return false; + } + if (cacheType === "shared" && cacheControlDirectives.private === true) { + return false; + } + if (resHeaders.vary?.includes("*")) { + return false; + } + if (resHeaders.authorization) { + if (!cacheControlDirectives.public || typeof resHeaders.authorization !== "string") { + return false; + } + if (Array.isArray(cacheControlDirectives["no-cache"]) && cacheControlDirectives["no-cache"].includes("authorization")) { + return false; + } + if (Array.isArray(cacheControlDirectives["private"]) && cacheControlDirectives["private"].includes("authorization")) { + return false; + } + } + return true; + } + function getAge(ageHeader) { + const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader); + return isNaN(age) ? void 0 : age * 1e3; + } + function determineStaleAt(cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) { + if (cacheType === "shared") { + const sMaxAge = cacheControlDirectives["s-maxage"]; + if (sMaxAge !== void 0) { + return sMaxAge > 0 ? sMaxAge * 1e3 : void 0; + } + } + const maxAge = cacheControlDirectives["max-age"]; + if (maxAge !== void 0) { + return maxAge > 0 ? maxAge * 1e3 : void 0; + } + if (typeof resHeaders.expires === "string") { + const expiresDate = parseHttpDate(resHeaders.expires); + if (expiresDate) { + if (now >= expiresDate.getTime()) { + return void 0; + } + if (responseDate) { + if (responseDate >= expiresDate) { + return void 0; + } + if (age !== void 0 && age > expiresDate - responseDate) { + return void 0; + } + } + return expiresDate.getTime() - now; + } + } + if (typeof resHeaders["last-modified"] === "string") { + const lastModified = new Date(resHeaders["last-modified"]); + if (isValidDate(lastModified)) { + if (lastModified.getTime() >= now) { + return void 0; + } + const responseAge = now - lastModified.getTime(); + return responseAge * 0.1; + } + } + if (cacheControlDirectives.immutable) { + return 31536e3; + } + return void 0; + } + function determineDeleteAt(now, cacheControlDirectives, staleAt) { + let staleWhileRevalidate = -Infinity; + let staleIfError = -Infinity; + let immutable = -Infinity; + if (cacheControlDirectives["stale-while-revalidate"]) { + staleWhileRevalidate = staleAt + cacheControlDirectives["stale-while-revalidate"] * 1e3; + } + if (cacheControlDirectives["stale-if-error"]) { + staleIfError = staleAt + cacheControlDirectives["stale-if-error"] * 1e3; + } + if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity) { + immutable = now + 31536e6; + } + return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable); + } + function stripNecessaryHeaders(resHeaders, cacheControlDirectives) { + const headersToRemove = [ + "connection", + "proxy-authenticate", + "proxy-authentication-info", + "proxy-authorization", + "proxy-connection", + "te", + "transfer-encoding", + "upgrade", + // We'll add age back when serving it + "age" + ]; + if (resHeaders["connection"]) { + if (Array.isArray(resHeaders["connection"])) { + headersToRemove.push(...resHeaders["connection"].map((header) => header.trim())); + } else { + headersToRemove.push(...resHeaders["connection"].split(",").map((header) => header.trim())); + } + } + if (Array.isArray(cacheControlDirectives["no-cache"])) { + headersToRemove.push(...cacheControlDirectives["no-cache"]); + } + if (Array.isArray(cacheControlDirectives["private"])) { + headersToRemove.push(...cacheControlDirectives["private"]); + } + let strippedHeaders; + for (const headerName of headersToRemove) { + if (resHeaders[headerName]) { + strippedHeaders ??= { ...resHeaders }; + delete strippedHeaders[headerName]; + } + } + return strippedHeaders ?? resHeaders; + } + function isValidDate(date) { + return date instanceof Date && Number.isFinite(date.valueOf()); + } + module2.exports = CacheHandler; + } +}); + +// node_modules/undici/lib/cache/memory-cache-store.js +var require_memory_cache_store = __commonJS({ + "node_modules/undici/lib/cache/memory-cache-store.js"(exports2, module2) { + "use strict"; + var { Writable: Writable2 } = require("node:stream"); + var { EventEmitter } = require("node:events"); + var { assertCacheKey, assertCacheValue } = require_cache(); + var MemoryCacheStore = class extends EventEmitter { + #maxCount = 1024; + #maxSize = 104857600; + // 100MB + #maxEntrySize = 5242880; + // 5MB + #size = 0; + #count = 0; + #entries = /* @__PURE__ */ new Map(); + #hasEmittedMaxSizeEvent = false; + /** + * @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts] + */ + constructor(opts) { + super(); + if (opts) { + if (typeof opts !== "object") { + throw new TypeError("MemoryCacheStore options must be an object"); + } + if (opts.maxCount !== void 0) { + if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) { + throw new TypeError("MemoryCacheStore options.maxCount must be a non-negative integer"); + } + this.#maxCount = opts.maxCount; + } + if (opts.maxSize !== void 0) { + if (typeof opts.maxSize !== "number" || !Number.isInteger(opts.maxSize) || opts.maxSize < 0) { + throw new TypeError("MemoryCacheStore options.maxSize must be a non-negative integer"); + } + this.#maxSize = opts.maxSize; + } + if (opts.maxEntrySize !== void 0) { + if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) { + throw new TypeError("MemoryCacheStore options.maxEntrySize must be a non-negative integer"); + } + this.#maxEntrySize = opts.maxEntrySize; + } + } + } + /** + * Get the current size of the cache in bytes + * @returns {number} The current size of the cache in bytes + */ + get size() { + return this.#size; + } + /** + * Check if the cache is full (either max size or max count reached) + * @returns {boolean} True if the cache is full, false otherwise + */ + isFull() { + return this.#size >= this.#maxSize || this.#count >= this.#maxCount; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} req + * @returns {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} + */ + get(key) { + assertCacheKey(key); + const topLevelKey = `${key.origin}:${key.path}`; + const now = Date.now(); + const entries = this.#entries.get(topLevelKey); + const entry = entries ? findEntry(key, entries, now) : null; + return entry == null ? void 0 : { + statusMessage: entry.statusMessage, + statusCode: entry.statusCode, + headers: entry.headers, + body: entry.body, + vary: entry.vary ? entry.vary : void 0, + etag: entry.etag, + cacheControlDirectives: entry.cacheControlDirectives, + cachedAt: entry.cachedAt, + staleAt: entry.staleAt, + deleteAt: entry.deleteAt + }; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} val + * @returns {Writable | undefined} + */ + createWriteStream(key, val) { + assertCacheKey(key); + assertCacheValue(val); + const topLevelKey = `${key.origin}:${key.path}`; + const store = this; + const entry = { ...key, ...val, body: [], size: 0 }; + return new Writable2({ + write(chunk, encoding, callback) { + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + entry.size += chunk.byteLength; + if (entry.size >= store.#maxEntrySize) { + this.destroy(); + } else { + entry.body.push(chunk); + } + callback(null); + }, + final(callback) { + let entries = store.#entries.get(topLevelKey); + if (!entries) { + entries = []; + store.#entries.set(topLevelKey, entries); + } + const previousEntry = findEntry(key, entries, Date.now()); + if (previousEntry) { + const index = entries.indexOf(previousEntry); + entries.splice(index, 1, entry); + store.#size -= previousEntry.size; + } else { + entries.push(entry); + store.#count += 1; + } + store.#size += entry.size; + if (store.#size > store.#maxSize || store.#count > store.#maxCount) { + if (!store.#hasEmittedMaxSizeEvent) { + store.emit("maxSizeExceeded", { + size: store.#size, + maxSize: store.#maxSize, + count: store.#count, + maxCount: store.#maxCount + }); + store.#hasEmittedMaxSizeEvent = true; + } + for (const [key2, entries2] of store.#entries) { + for (const entry2 of entries2.splice(0, entries2.length / 2)) { + store.#size -= entry2.size; + store.#count -= 1; + } + if (entries2.length === 0) { + store.#entries.delete(key2); + } + } + if (store.#size < store.#maxSize && store.#count < store.#maxCount) { + store.#hasEmittedMaxSizeEvent = false; + } + } + callback(null); + } + }); + } + /** + * @param {CacheKey} key + */ + delete(key) { + if (typeof key !== "object") { + throw new TypeError(`expected key to be object, got ${typeof key}`); + } + const topLevelKey = `${key.origin}:${key.path}`; + for (const entry of this.#entries.get(topLevelKey) ?? []) { + this.#size -= entry.size; + this.#count -= 1; + } + this.#entries.delete(topLevelKey); + } + }; + function findEntry(key, entries, now) { + return entries.find((entry) => entry.deleteAt > now && entry.method === key.method && (entry.vary == null || Object.keys(entry.vary).every((headerName) => { + if (entry.vary[headerName] === null) { + return key.headers[headerName] === void 0; + } + return entry.vary[headerName] === key.headers[headerName]; + }))); + } + module2.exports = MemoryCacheStore; + } +}); + +// node_modules/undici/lib/handler/cache-revalidation-handler.js +var require_cache_revalidation_handler = __commonJS({ + "node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var CacheRevalidationHandler = class { + #successful = false; + /** + * @type {((boolean, any) => void) | null} + */ + #callback; + /** + * @type {(import('../../types/dispatcher.d.ts').default.DispatchHandler)} + */ + #handler; + #context; + /** + * @type {boolean} + */ + #allowErrorStatusCodes; + /** + * @param {(boolean) => void} callback Function to call if the cached value is valid + * @param {import('../../types/dispatcher.d.ts').default.DispatchHandlers} handler + * @param {boolean} allowErrorStatusCodes + */ + constructor(callback, handler, allowErrorStatusCodes) { + if (typeof callback !== "function") { + throw new TypeError("callback must be a function"); + } + this.#callback = callback; + this.#handler = handler; + this.#allowErrorStatusCodes = allowErrorStatusCodes; + } + onRequestStart(_, context) { + this.#successful = false; + this.#context = context; + } + onRequestUpgrade(controller, statusCode, headers, socket) { + this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + assert(this.#callback != null); + this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504; + this.#callback(this.#successful, this.#context); + this.#callback = null; + if (this.#successful) { + return true; + } + this.#handler.onRequestStart?.(controller, this.#context); + this.#handler.onResponseStart?.( + controller, + statusCode, + headers, + statusMessage + ); + } + onResponseData(controller, chunk) { + if (this.#successful) { + return; + } + return this.#handler.onResponseData?.(controller, chunk); + } + onResponseEnd(controller, trailers) { + if (this.#successful) { + return; + } + this.#handler.onResponseEnd?.(controller, trailers); + } + onResponseError(controller, err) { + if (this.#successful) { + return; + } + if (this.#callback) { + this.#callback(false); + this.#callback = null; + } + if (typeof this.#handler.onResponseError === "function") { + this.#handler.onResponseError(controller, err); + } else { + throw err; + } + } + }; + module2.exports = CacheRevalidationHandler; + } +}); + +// node_modules/undici/lib/interceptor/cache.js +var require_cache2 = __commonJS({ + "node_modules/undici/lib/interceptor/cache.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { Readable } = require("node:stream"); + var util = require_util4(); + var CacheHandler = require_cache_handler(); + var MemoryCacheStore = require_memory_cache_store(); + var CacheRevalidationHandler = require_cache_revalidation_handler(); + var { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = require_cache(); + var { AbortError } = require_errors5(); + function needsRevalidation(result, cacheControlDirectives) { + if (cacheControlDirectives?.["no-cache"]) { + return true; + } + if (result.cacheControlDirectives?.["no-cache"] && !Array.isArray(result.cacheControlDirectives["no-cache"])) { + return true; + } + const now = Date.now(); + if (now > result.staleAt) { + if (cacheControlDirectives?.["max-stale"]) { + const gracePeriod = result.staleAt + cacheControlDirectives["max-stale"] * 1e3; + return now > gracePeriod; + } + return true; + } + if (cacheControlDirectives?.["min-fresh"]) { + const timeLeftTillStale = result.staleAt - now; + const threshold = cacheControlDirectives["min-fresh"] * 1e3; + return timeLeftTillStale <= threshold; + } + return false; + } + function handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl) { + if (reqCacheControl?.["only-if-cached"]) { + let aborted = false; + try { + if (typeof handler.onConnect === "function") { + handler.onConnect(() => { + aborted = true; + }); + if (aborted) { + return; + } + } + if (typeof handler.onHeaders === "function") { + handler.onHeaders(504, [], () => { + }, "Gateway Timeout"); + if (aborted) { + return; + } + } + if (typeof handler.onComplete === "function") { + handler.onComplete([]); + } + } catch (err) { + if (typeof handler.onError === "function") { + handler.onError(err); + } + } + return true; + } + return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); + } + function sendCachedValue(handler, opts, result, age, context, isStale) { + const stream = util.isStream(result.body) ? result.body : Readable.from(result.body ?? []); + assert(!stream.destroyed, "stream should not be destroyed"); + assert(!stream.readableDidRead, "stream should not be readableDidRead"); + const controller = { + resume() { + stream.resume(); + }, + pause() { + stream.pause(); + }, + get paused() { + return stream.isPaused(); + }, + get aborted() { + return stream.destroyed; + }, + get reason() { + return stream.errored; + }, + abort(reason) { + stream.destroy(reason ?? new AbortError()); + } + }; + stream.on("error", function(err) { + if (!this.readableEnded) { + if (typeof handler.onResponseError === "function") { + handler.onResponseError(controller, err); + } else { + throw err; + } + } + }).on("close", function() { + if (!this.errored) { + handler.onResponseEnd?.(controller, {}); + } + }); + handler.onRequestStart?.(controller, context); + if (stream.destroyed) { + return; + } + const headers = { ...result.headers, age: String(age) }; + if (isStale) { + headers.warning = '110 - "response is stale"'; + } + handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage); + if (opts.method === "HEAD") { + stream.destroy(); + } else { + stream.on("data", function(chunk) { + handler.onResponseData?.(controller, chunk); + }); + } + } + function handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result) { + if (!result) { + return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl); + } + const now = Date.now(); + if (now > result.deleteAt) { + return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); + } + const age = Math.round((now - result.cachedAt) / 1e3); + if (reqCacheControl?.["max-age"] && age >= reqCacheControl["max-age"]) { + return dispatch(opts, handler); + } + if (needsRevalidation(result, reqCacheControl)) { + if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) { + return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); + } + let withinStaleIfErrorThreshold = false; + const staleIfErrorExpiry = result.cacheControlDirectives["stale-if-error"] ?? reqCacheControl?.["stale-if-error"]; + if (staleIfErrorExpiry) { + withinStaleIfErrorThreshold = now < result.staleAt + staleIfErrorExpiry * 1e3; + } + let headers = { + ...opts.headers, + "if-modified-since": new Date(result.cachedAt).toUTCString() + }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } + if (result.vary) { + headers = { + ...headers, + ...result.vary + }; + } + return dispatch( + { + ...opts, + headers + }, + new CacheRevalidationHandler( + (success, context) => { + if (success) { + sendCachedValue(handler, opts, result, age, context, true); + } else if (util.isStream(result.body)) { + result.body.on("error", () => { + }).destroy(); + } + }, + new CacheHandler(globalOpts, cacheKey, handler), + withinStaleIfErrorThreshold + ) + ); + } + if (util.isStream(opts.body)) { + opts.body.on("error", () => { + }).destroy(); + } + sendCachedValue(handler, opts, result, age, null, false); + } + module2.exports = (opts = {}) => { + const { + store = new MemoryCacheStore(), + methods = ["GET"], + cacheByDefault = void 0, + type = "shared" + } = opts; + if (typeof opts !== "object" || opts === null) { + throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`); + } + assertCacheStore(store, "opts.store"); + assertCacheMethods(methods, "opts.methods"); + if (typeof cacheByDefault !== "undefined" && typeof cacheByDefault !== "number") { + throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`); + } + if (typeof type !== "undefined" && type !== "shared" && type !== "private") { + throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type}`); + } + const globalOpts = { + store, + methods, + cacheByDefault, + type + }; + const safeMethodsToNotCache = util.safeHTTPMethods.filter((method) => methods.includes(method) === false); + return (dispatch) => { + return (opts2, handler) => { + if (!opts2.origin || safeMethodsToNotCache.includes(opts2.method)) { + return dispatch(opts2, handler); + } + opts2 = { + ...opts2, + headers: normalizeHeaders(opts2) + }; + const reqCacheControl = opts2.headers?.["cache-control"] ? parseCacheControlHeader(opts2.headers["cache-control"]) : void 0; + if (reqCacheControl?.["no-store"]) { + return dispatch(opts2, handler); + } + const cacheKey = makeCacheKey(opts2); + const result = store.get(cacheKey); + if (result && typeof result.then === "function") { + result.then((result2) => { + handleResult( + dispatch, + globalOpts, + cacheKey, + handler, + opts2, + reqCacheControl, + result2 + ); + }); + } else { + handleResult( + dispatch, + globalOpts, + cacheKey, + handler, + opts2, + reqCacheControl, + result + ); + } + return true; + }; + }; + }; + } +}); + +// node_modules/undici/lib/interceptor/decompress.js +var require_decompress = __commonJS({ + "node_modules/undici/lib/interceptor/decompress.js"(exports2, module2) { + "use strict"; + var { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = require("node:zlib"); + var { pipeline } = require("node:stream"); + var DecoratorHandler = require_decorator_handler(); + var supportedEncodings = { + gzip: createGunzip, + "x-gzip": createGunzip, + br: createBrotliDecompress, + deflate: createInflate, + compress: createInflate, + "x-compress": createInflate, + ...createZstdDecompress ? { zstd: createZstdDecompress } : {} + }; + var defaultSkipStatusCodes = ( + /** @type {const} */ + [204, 304] + ); + var warningEmitted = ( + /** @type {boolean} */ + false + ); + var DecompressHandler = class extends DecoratorHandler { + /** @type {Transform[]} */ + #decompressors = []; + /** @type {NodeJS.WritableStream&NodeJS.ReadableStream|null} */ + #pipelineStream; + /** @type {Readonly} */ + #skipStatusCodes; + /** @type {boolean} */ + #skipErrorResponses; + constructor(handler, { skipStatusCodes = defaultSkipStatusCodes, skipErrorResponses = true } = {}) { + super(handler); + this.#skipStatusCodes = skipStatusCodes; + this.#skipErrorResponses = skipErrorResponses; + } + /** + * Determines if decompression should be skipped based on encoding and status code + * @param {string} contentEncoding - Content-Encoding header value + * @param {number} statusCode - HTTP status code of the response + * @returns {boolean} - True if decompression should be skipped + */ + #shouldSkipDecompression(contentEncoding, statusCode) { + if (!contentEncoding || statusCode < 200) return true; + if (this.#skipStatusCodes.includes(statusCode)) return true; + if (this.#skipErrorResponses && statusCode >= 400) return true; + return false; + } + /** + * Creates a chain of decompressors for multiple content encodings + * + * @param {string} encodings - Comma-separated list of content encodings + * @returns {Array} - Array of decompressor streams + */ + #createDecompressionChain(encodings) { + const parts = encodings.split(","); + const decompressors = []; + for (let i = parts.length - 1; i >= 0; i--) { + const encoding = parts[i].trim(); + if (!encoding) continue; + if (!supportedEncodings[encoding]) { + decompressors.length = 0; + return decompressors; + } + decompressors.push(supportedEncodings[encoding]()); + } + return decompressors; + } + /** + * Sets up event handlers for a decompressor stream using readable events + * @param {DecompressorStream} decompressor - The decompressor stream + * @param {Controller} controller - The controller to coordinate with + * @returns {void} + */ + #setupDecompressorEvents(decompressor, controller) { + decompressor.on("readable", () => { + let chunk; + while ((chunk = decompressor.read()) !== null) { + const result = super.onResponseData(controller, chunk); + if (result === false) { + break; + } + } + }); + decompressor.on("error", (error) => { + super.onResponseError(controller, error); + }); + } + /** + * Sets up event handling for a single decompressor + * @param {Controller} controller - The controller to handle events + * @returns {void} + */ + #setupSingleDecompressor(controller) { + const decompressor = this.#decompressors[0]; + this.#setupDecompressorEvents(decompressor, controller); + decompressor.on("end", () => { + super.onResponseEnd(controller, {}); + }); + } + /** + * Sets up event handling for multiple chained decompressors using pipeline + * @param {Controller} controller - The controller to handle events + * @returns {void} + */ + #setupMultipleDecompressors(controller) { + const lastDecompressor = this.#decompressors[this.#decompressors.length - 1]; + this.#setupDecompressorEvents(lastDecompressor, controller); + this.#pipelineStream = pipeline(this.#decompressors, (err) => { + if (err) { + super.onResponseError(controller, err); + return; + } + super.onResponseEnd(controller, {}); + }); + } + /** + * Cleans up decompressor references to prevent memory leaks + * @returns {void} + */ + #cleanupDecompressors() { + this.#decompressors.length = 0; + this.#pipelineStream = null; + } + /** + * @param {Controller} controller + * @param {number} statusCode + * @param {Record} headers + * @param {string} statusMessage + * @returns {void} + */ + onResponseStart(controller, statusCode, headers, statusMessage) { + const contentEncoding = headers["content-encoding"]; + if (this.#shouldSkipDecompression(contentEncoding, statusCode)) { + return super.onResponseStart(controller, statusCode, headers, statusMessage); + } + const decompressors = this.#createDecompressionChain(contentEncoding.toLowerCase()); + if (decompressors.length === 0) { + this.#cleanupDecompressors(); + return super.onResponseStart(controller, statusCode, headers, statusMessage); + } + this.#decompressors = decompressors; + const { "content-encoding": _, "content-length": __2, ...newHeaders } = headers; + if (this.#decompressors.length === 1) { + this.#setupSingleDecompressor(controller); + } else { + this.#setupMultipleDecompressors(controller); + } + super.onResponseStart(controller, statusCode, newHeaders, statusMessage); + } + /** + * @param {Controller} controller + * @param {Buffer} chunk + * @returns {void} + */ + onResponseData(controller, chunk) { + if (this.#decompressors.length > 0) { + this.#decompressors[0].write(chunk); + return; + } + super.onResponseData(controller, chunk); + } + /** + * @param {Controller} controller + * @param {Record | undefined} trailers + * @returns {void} + */ + onResponseEnd(controller, trailers) { + if (this.#decompressors.length > 0) { + this.#decompressors[0].end(); + this.#cleanupDecompressors(); + return; + } + super.onResponseEnd(controller, trailers); + } + /** + * @param {Controller} controller + * @param {Error} err + * @returns {void} + */ + onResponseError(controller, err) { + if (this.#decompressors.length > 0) { + for (const decompressor of this.#decompressors) { + decompressor.destroy(err); + } + this.#cleanupDecompressors(); + } + super.onResponseError(controller, err); + } + }; + function createDecompressInterceptor(options = {}) { + if (!warningEmitted) { + process.emitWarning( + "DecompressInterceptor is experimental and subject to change", + "ExperimentalWarning" + ); + warningEmitted = true; + } + return (dispatch) => { + return (opts, handler) => { + const decompressHandler = new DecompressHandler(handler, options); + return dispatch(opts, decompressHandler); + }; + }; + } + module2.exports = createDecompressInterceptor; + } +}); + +// node_modules/undici/lib/cache/sqlite-cache-store.js +var require_sqlite_cache_store = __commonJS({ + "node_modules/undici/lib/cache/sqlite-cache-store.js"(exports2, module2) { + "use strict"; + var { Writable: Writable2 } = require("node:stream"); + var { assertCacheKey, assertCacheValue } = require_cache(); + var DatabaseSync; + var VERSION = 3; + var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; + module2.exports = class SqliteCacheStore { + #maxEntrySize = MAX_ENTRY_SIZE; + #maxCount = Infinity; + /** + * @type {import('node:sqlite').DatabaseSync} + */ + #db; + /** + * @type {import('node:sqlite').StatementSync} + */ + #getValuesQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #updateValueQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #insertValueQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #deleteExpiredValuesQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #deleteByUrlQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #countEntriesQuery; + /** + * @type {import('node:sqlite').StatementSync | null} + */ + #deleteOldValuesQuery; + /** + * @param {import('../../types/cache-interceptor.d.ts').default.SqliteCacheStoreOpts | undefined} opts + */ + constructor(opts) { + if (opts) { + if (typeof opts !== "object") { + throw new TypeError("SqliteCacheStore options must be an object"); + } + if (opts.maxEntrySize !== void 0) { + if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) { + throw new TypeError("SqliteCacheStore options.maxEntrySize must be a non-negative integer"); + } + if (opts.maxEntrySize > MAX_ENTRY_SIZE) { + throw new TypeError("SqliteCacheStore options.maxEntrySize must be less than 2gb"); + } + this.#maxEntrySize = opts.maxEntrySize; + } + if (opts.maxCount !== void 0) { + if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) { + throw new TypeError("SqliteCacheStore options.maxCount must be a non-negative integer"); + } + this.#maxCount = opts.maxCount; + } + } + if (!DatabaseSync) { + DatabaseSync = require("node:sqlite").DatabaseSync; + } + this.#db = new DatabaseSync(opts?.location ?? ":memory:"); + this.#db.exec(` + PRAGMA journal_mode = WAL; + PRAGMA synchronous = NORMAL; + PRAGMA temp_store = memory; + PRAGMA optimize; + + CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION} ( + -- Data specific to us + id INTEGER PRIMARY KEY AUTOINCREMENT, + url TEXT NOT NULL, + method TEXT NOT NULL, + + -- Data returned to the interceptor + body BUF NULL, + deleteAt INTEGER NOT NULL, + statusCode INTEGER NOT NULL, + statusMessage TEXT NOT NULL, + headers TEXT NULL, + cacheControlDirectives TEXT NULL, + etag TEXT NULL, + vary TEXT NULL, + cachedAt INTEGER NOT NULL, + staleAt INTEGER NOT NULL + ); + + CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_getValuesQuery ON cacheInterceptorV${VERSION}(url, method, deleteAt); + CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_deleteByUrlQuery ON cacheInterceptorV${VERSION}(deleteAt); + `); + this.#getValuesQuery = this.#db.prepare(` + SELECT + id, + body, + deleteAt, + statusCode, + statusMessage, + headers, + etag, + cacheControlDirectives, + vary, + cachedAt, + staleAt + FROM cacheInterceptorV${VERSION} + WHERE + url = ? + AND method = ? + ORDER BY + deleteAt ASC + `); + this.#updateValueQuery = this.#db.prepare(` + UPDATE cacheInterceptorV${VERSION} SET + body = ?, + deleteAt = ?, + statusCode = ?, + statusMessage = ?, + headers = ?, + etag = ?, + cacheControlDirectives = ?, + cachedAt = ?, + staleAt = ? + WHERE + id = ? + `); + this.#insertValueQuery = this.#db.prepare(` + INSERT INTO cacheInterceptorV${VERSION} ( + url, + method, + body, + deleteAt, + statusCode, + statusMessage, + headers, + etag, + cacheControlDirectives, + vary, + cachedAt, + staleAt + ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + `); + this.#deleteByUrlQuery = this.#db.prepare( + `DELETE FROM cacheInterceptorV${VERSION} WHERE url = ?` + ); + this.#countEntriesQuery = this.#db.prepare( + `SELECT COUNT(*) AS total FROM cacheInterceptorV${VERSION}` + ); + this.#deleteExpiredValuesQuery = this.#db.prepare( + `DELETE FROM cacheInterceptorV${VERSION} WHERE deleteAt <= ?` + ); + this.#deleteOldValuesQuery = this.#maxCount === Infinity ? null : this.#db.prepare(` + DELETE FROM cacheInterceptorV${VERSION} + WHERE id IN ( + SELECT + id + FROM cacheInterceptorV${VERSION} + ORDER BY cachedAt DESC + LIMIT ? + ) + `); + } + close() { + this.#db.close(); + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @returns {(import('../../types/cache-interceptor.d.ts').default.GetResult & { body?: Buffer }) | undefined} + */ + get(key) { + assertCacheKey(key); + const value = this.#findValue(key); + return value ? { + body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : void 0, + statusCode: value.statusCode, + statusMessage: value.statusMessage, + headers: value.headers ? JSON.parse(value.headers) : void 0, + etag: value.etag ? value.etag : void 0, + vary: value.vary ? JSON.parse(value.vary) : void 0, + cacheControlDirectives: value.cacheControlDirectives ? JSON.parse(value.cacheControlDirectives) : void 0, + cachedAt: value.cachedAt, + staleAt: value.staleAt, + deleteAt: value.deleteAt + } : void 0; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue & { body: null | Buffer | Array}} value + */ + set(key, value) { + assertCacheKey(key); + const url = this.#makeValueUrl(key); + const body = Array.isArray(value.body) ? Buffer.concat(value.body) : value.body; + const size = body?.byteLength; + if (size && size > this.#maxEntrySize) { + return; + } + const existingValue = this.#findValue(key, true); + if (existingValue) { + this.#updateValueQuery.run( + body, + value.deleteAt, + value.statusCode, + value.statusMessage, + value.headers ? JSON.stringify(value.headers) : null, + value.etag ? value.etag : null, + value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, + value.cachedAt, + value.staleAt, + existingValue.id + ); + } else { + this.#prune(); + this.#insertValueQuery.run( + url, + key.method, + body, + value.deleteAt, + value.statusCode, + value.statusMessage, + value.headers ? JSON.stringify(value.headers) : null, + value.etag ? value.etag : null, + value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, + value.vary ? JSON.stringify(value.vary) : null, + value.cachedAt, + value.staleAt + ); + } + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} value + * @returns {Writable | undefined} + */ + createWriteStream(key, value) { + assertCacheKey(key); + assertCacheValue(value); + let size = 0; + const body = []; + const store = this; + return new Writable2({ + decodeStrings: true, + write(chunk, encoding, callback) { + size += chunk.byteLength; + if (size < store.#maxEntrySize) { + body.push(chunk); + } else { + this.destroy(); + } + callback(); + }, + final(callback) { + store.set(key, { ...value, body }); + callback(); + } + }); + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + */ + delete(key) { + if (typeof key !== "object") { + throw new TypeError(`expected key to be object, got ${typeof key}`); + } + this.#deleteByUrlQuery.run(this.#makeValueUrl(key)); + } + #prune() { + if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) { + return 0; + } + { + const removed = this.#deleteExpiredValuesQuery.run(Date.now()).changes; + if (removed) { + return removed; + } + } + { + const removed = this.#deleteOldValuesQuery?.run(Math.max(Math.floor(this.#maxCount * 0.1), 1)).changes; + if (removed) { + return removed; + } + } + return 0; + } + /** + * Counts the number of rows in the cache + * @returns {Number} + */ + get size() { + const { total } = this.#countEntriesQuery.get(); + return total; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @returns {string} + */ + #makeValueUrl(key) { + return `${key.origin}/${key.path}`; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {boolean} [canBeExpired=false] + * @returns {SqliteStoreValue | undefined} + */ + #findValue(key, canBeExpired = false) { + const url = this.#makeValueUrl(key); + const { headers, method } = key; + const values = this.#getValuesQuery.all(url, method); + if (values.length === 0) { + return void 0; + } + const now = Date.now(); + for (const value of values) { + if (now >= value.deleteAt && !canBeExpired) { + return void 0; + } + let matches = true; + if (value.vary) { + const vary = JSON.parse(value.vary); + for (const header in vary) { + if (!headerValueEquals(headers[header], vary[header])) { + matches = false; + break; + } + } + } + if (matches) { + return value; + } + } + return void 0; + } + }; + function headerValueEquals(lhs, rhs) { + if (lhs == null && rhs == null) { + return true; + } + if (lhs == null && rhs != null || lhs != null && rhs == null) { + return false; + } + if (Array.isArray(lhs) && Array.isArray(rhs)) { + if (lhs.length !== rhs.length) { + return false; + } + return lhs.every((x, i) => x === rhs[i]); + } + return lhs === rhs; + } + } +}); + +// node_modules/undici/lib/web/fetch/headers.js +var require_headers = __commonJS({ + "node_modules/undici/lib/web/fetch/headers.js"(exports2, module2) { + "use strict"; + var { kConstruct } = require_symbols4(); + var { kEnumerableProperty } = require_util4(); + var { + iteratorMixin, + isValidHeaderName, + isValidHeaderValue + } = require_util5(); + var { webidl } = require_webidl(); + var assert = require("node:assert"); + var util = require("node:util"); + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + function headerValueNormalize(potentialValue) { + let i = 0; + let j = potentialValue.length; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); + } + function fill(headers, object) { + if (Array.isArray(object)) { + for (let i = 0; i < object.length; ++i) { + const header = object[i]; + if (header.length !== 2) { + throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` + }); + } + appendHeader(headers, header[0], header[1]); + } + } else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) { + appendHeader(headers, keys[i], object[keys[i]]); + } + } else { + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + } + } + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + } + if (getHeadersGuard(headers) === "immutable") { + throw new TypeError("immutable"); + } + return getHeadersList(headers).append(name, value, false); + } + function headersListSortAndCombine(target) { + const headersList = getHeadersList(target); + if (!headersList) { + return []; + } + if (headersList.sortedMap) { + return headersList.sortedMap; + } + const headers = []; + const names = headersList.toSortedArray(); + const cookies = headersList.cookies; + if (cookies === null || cookies.length === 1) { + return headersList.sortedMap = names; + } + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i]; + if (name === "set-cookie") { + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]); + } + } else { + headers.push([name, value]); + } + } + return headersList.sortedMap = headers; + } + function compareHeaderName(a, b) { + return a[0] < b[0] ? -1 : 1; + } + var HeadersList = class _HeadersList { + /** @type {[string, string][]|null} */ + cookies = null; + sortedMap; + headersMap; + constructor(init) { + if (init instanceof _HeadersList) { + this.headersMap = new Map(init.headersMap); + this.sortedMap = init.sortedMap; + this.cookies = init.cookies === null ? null : [...init.cookies]; + } else { + this.headersMap = new Map(init); + this.sortedMap = null; + } + } + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ + contains(name, isLowerCase) { + return this.headersMap.has(isLowerCase ? name : name.toLowerCase()); + } + clear() { + this.headersMap.clear(); + this.sortedMap = null; + this.cookies = null; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-append + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + append(name, value, isLowerCase) { + this.sortedMap = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists2 = this.headersMap.get(lowercaseName); + if (exists2) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this.headersMap.set(lowercaseName, { + name: exists2.name, + value: `${exists2.value}${delimiter}${value}` + }); + } else { + this.headersMap.set(lowercaseName, { name, value }); + } + if (lowercaseName === "set-cookie") { + (this.cookies ??= []).push(value); + } + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-set + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + set(name, value, isLowerCase) { + this.sortedMap = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + if (lowercaseName === "set-cookie") { + this.cookies = [value]; + } + this.headersMap.set(lowercaseName, { name, value }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ + delete(name, isLowerCase) { + this.sortedMap = null; + if (!isLowerCase) name = name.toLowerCase(); + if (name === "set-cookie") { + this.cookies = null; + } + this.headersMap.delete(name); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get + * @param {string} name + * @param {boolean} isLowerCase + * @returns {string | null} + */ + get(name, isLowerCase) { + return this.headersMap.get(isLowerCase ? name : name.toLowerCase())?.value ?? null; + } + *[Symbol.iterator]() { + for (const { 0: name, 1: { value } } of this.headersMap) { + yield [name, value]; + } + } + get entries() { + const headers = {}; + if (this.headersMap.size !== 0) { + for (const { name, value } of this.headersMap.values()) { + headers[name] = value; + } + } + return headers; + } + rawValues() { + return this.headersMap.values(); + } + get entriesList() { + const headers = []; + if (this.headersMap.size !== 0) { + for (const { 0: lowerName, 1: { name, value } } of this.headersMap) { + if (lowerName === "set-cookie") { + for (const cookie of this.cookies) { + headers.push([name, cookie]); + } + } else { + headers.push([name, value]); + } + } + } + return headers; + } + // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set + toSortedArray() { + const size = this.headersMap.size; + const array = new Array(size); + if (size <= 32) { + if (size === 0) { + return array; + } + const iterator = this.headersMap[Symbol.iterator](); + const firstValue = iterator.next().value; + array[0] = [firstValue[0], firstValue[1].value]; + assert(firstValue[1].value !== null); + for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { + value = iterator.next().value; + x = array[i] = [value[0], value[1].value]; + assert(x[1] !== null); + left = 0; + right = i; + while (left < right) { + pivot = left + (right - left >> 1); + if (array[pivot][0] <= x[0]) { + left = pivot + 1; + } else { + right = pivot; + } + } + if (i !== pivot) { + j = i; + while (j > left) { + array[j] = array[--j]; + } + array[left] = x; + } + } + if (!iterator.next().done) { + throw new TypeError("Unreachable"); + } + return array; + } else { + let i = 0; + for (const { 0: name, 1: { value } } of this.headersMap) { + array[i++] = [name, value]; + assert(value !== null); + } + return array.sort(compareHeaderName); + } + } + }; + var Headers2 = class _Headers { + #guard; + /** + * @type {HeadersList} + */ + #headersList; + /** + * @param {HeadersInit|Symbol} [init] + * @returns + */ + constructor(init = void 0) { + webidl.util.markAsUncloneable(this); + if (init === kConstruct) { + return; + } + this.#headersList = new HeadersList(); + this.#guard = "none"; + if (init !== void 0) { + init = webidl.converters.HeadersInit(init, "Headers constructor", "init"); + fill(this, init); + } + } + // https://fetch.spec.whatwg.org/#dom-headers-append + append(name, value) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.append"); + const prefix = "Headers.append"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + return appendHeader(this, name, value); + } + // https://fetch.spec.whatwg.org/#dom-headers-delete + delete(name) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); + const prefix = "Headers.delete"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + } + if (this.#guard === "immutable") { + throw new TypeError("immutable"); + } + if (!this.#headersList.contains(name, false)) { + return; + } + this.#headersList.delete(name, false); + } + // https://fetch.spec.whatwg.org/#dom-headers-get + get(name) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.get"); + const prefix = "Headers.get"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + } + return this.#headersList.get(name, false); + } + // https://fetch.spec.whatwg.org/#dom-headers-has + has(name) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.has"); + const prefix = "Headers.has"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + } + return this.#headersList.contains(name, false); + } + // https://fetch.spec.whatwg.org/#dom-headers-set + set(name, value) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.set"); + const prefix = "Headers.set"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix, + value, + type: "header value" + }); + } + if (this.#guard === "immutable") { + throw new TypeError("immutable"); + } + this.#headersList.set(name, value, false); + } + // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie + getSetCookie() { + webidl.brandCheck(this, _Headers); + const list = this.#headersList.cookies; + if (list) { + return [...list]; + } + return []; + } + [util.inspect.custom](depth, options) { + options.depth ??= depth; + return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`; + } + static getHeadersGuard(o) { + return o.#guard; + } + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + /** + * @param {Headers} o + */ + static getHeadersList(o) { + return o.#headersList; + } + /** + * @param {Headers} target + * @param {HeadersList} list + */ + static setHeadersList(target, list) { + target.#headersList = list; + } + }; + var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers2; + Reflect.deleteProperty(Headers2, "getHeadersGuard"); + Reflect.deleteProperty(Headers2, "setHeadersGuard"); + Reflect.deleteProperty(Headers2, "getHeadersList"); + Reflect.deleteProperty(Headers2, "setHeadersList"); + iteratorMixin("Headers", Headers2, headersListSortAndCombine, 0, 1); + Object.defineProperties(Headers2.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true + }, + [util.inspect.custom]: { + enumerable: false + } + }); + webidl.converters.HeadersInit = function(V, prefix, argument) { + if (webidl.util.Type(V) === webidl.util.Types.OBJECT) { + const iterator = Reflect.get(V, Symbol.iterator); + if (!util.types.isProxy(V) && iterator === Headers2.prototype.entries) { + try { + return getHeadersList(V).entriesList; + } catch { + } + } + if (typeof iterator === "function") { + return webidl.converters["sequence>"](V, prefix, argument, iterator.bind(V)); + } + return webidl.converters["record"](V, prefix, argument); + } + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + }; + module2.exports = { + fill, + // for test. + compareHeaderName, + Headers: Headers2, + HeadersList, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + getHeadersList + }; + } +}); + +// node_modules/undici/lib/web/fetch/response.js +var require_response2 = __commonJS({ + "node_modules/undici/lib/web/fetch/response.js"(exports2, module2) { + "use strict"; + var { Headers: Headers2, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + var { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require_body(); + var util = require_util4(); + var nodeUtil = require("node:util"); + var { kEnumerableProperty } = util; + var { + isValidReasonPhrase, + isCancelled, + isAborted, + serializeJavascriptValueToJSONString, + isErrorLike, + isomorphicEncode, + environmentSettingsObject: relevantRealm + } = require_util5(); + var { + redirectStatusSet, + nullBodyStatus + } = require_constants5(); + var { webidl } = require_webidl(); + var { URLSerializer } = require_data_url(); + var { kConstruct } = require_symbols4(); + var assert = require("node:assert"); + var { isArrayBuffer } = nodeUtil.types; + var textEncoder = new TextEncoder("utf-8"); + var Response2 = class _Response { + /** @type {Headers} */ + #headers; + #state; + // Creates network error Response. + static error() { + const responseObject = fromInnerResponse(makeNetworkError(), "immutable"); + return responseObject; + } + // https://fetch.spec.whatwg.org/#dom-response-json + static json(data, init = void 0) { + webidl.argumentLengthCheck(arguments, 1, "Response.json"); + if (init !== null) { + init = webidl.converters.ResponseInit(init); + } + const bytes = textEncoder.encode( + serializeJavascriptValueToJSONString(data) + ); + const body = extractBody(bytes); + const responseObject = fromInnerResponse(makeResponse({}), "response"); + initializeResponse(responseObject, init, { body: body[0], type: "application/json" }); + return responseObject; + } + // Creates a redirect Response that redirects to url with status status. + static redirect(url, status = 302) { + webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); + url = webidl.converters.USVString(url); + status = webidl.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); + } + if (!redirectStatusSet.has(status)) { + throw new RangeError(`Invalid status code ${status}`); + } + const responseObject = fromInnerResponse(makeResponse({}), "immutable"); + responseObject.#state.status = status; + const value = isomorphicEncode(URLSerializer(parsedURL)); + responseObject.#state.headersList.append("location", value, true); + return responseObject; + } + // https://fetch.spec.whatwg.org/#dom-response + constructor(body = null, init = void 0) { + webidl.util.markAsUncloneable(this); + if (body === kConstruct) { + return; + } + if (body !== null) { + body = webidl.converters.BodyInit(body); + } + init = webidl.converters.ResponseInit(init); + this.#state = makeResponse({}); + this.#headers = new Headers2(kConstruct); + setHeadersGuard(this.#headers, "response"); + setHeadersList(this.#headers, this.#state.headersList); + let bodyWithType = null; + if (body != null) { + const [extractedBody, type] = extractBody(body); + bodyWithType = { body: extractedBody, type }; + } + initializeResponse(this, init, bodyWithType); + } + // Returns response’s type, e.g., "cors". + get type() { + webidl.brandCheck(this, _Response); + return this.#state.type; + } + // Returns response’s URL, if it has one; otherwise the empty string. + get url() { + webidl.brandCheck(this, _Response); + const urlList = this.#state.urlList; + const url = urlList[urlList.length - 1] ?? null; + if (url === null) { + return ""; + } + return URLSerializer(url, true); + } + // Returns whether response was obtained through a redirect. + get redirected() { + webidl.brandCheck(this, _Response); + return this.#state.urlList.length > 1; + } + // Returns response’s status. + get status() { + webidl.brandCheck(this, _Response); + return this.#state.status; + } + // Returns whether response’s status is an ok status. + get ok() { + webidl.brandCheck(this, _Response); + return this.#state.status >= 200 && this.#state.status <= 299; + } + // Returns response’s status message. + get statusText() { + webidl.brandCheck(this, _Response); + return this.#state.statusText; + } + // Returns response’s headers as Headers. + get headers() { + webidl.brandCheck(this, _Response); + return this.#headers; + } + get body() { + webidl.brandCheck(this, _Response); + return this.#state.body ? this.#state.body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, _Response); + return !!this.#state.body && util.isDisturbed(this.#state.body.stream); + } + // Returns a clone of response. + clone() { + webidl.brandCheck(this, _Response); + if (bodyUnusable(this.#state)) { + throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); + } + const clonedResponse = cloneResponse(this.#state); + if (this.#state.body?.stream) { + streamRegistry.register(this, new WeakRef(this.#state.body.stream)); + } + return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers)); + } + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) { + options.depth = 2; + } + options.colors ??= true; + const properties = { + status: this.status, + statusText: this.statusText, + headers: this.headers, + body: this.body, + bodyUsed: this.bodyUsed, + ok: this.ok, + redirected: this.redirected, + type: this.type, + url: this.url + }; + return `Response ${nodeUtil.formatWithOptions(options, properties)}`; + } + /** + * @param {Response} response + */ + static getResponseHeaders(response) { + return response.#headers; + } + /** + * @param {Response} response + * @param {Headers} newHeaders + */ + static setResponseHeaders(response, newHeaders) { + response.#headers = newHeaders; + } + /** + * @param {Response} response + */ + static getResponseState(response) { + return response.#state; + } + /** + * @param {Response} response + * @param {any} newState + */ + static setResponseState(response, newState) { + response.#state = newState; + } + }; + var { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response2; + Reflect.deleteProperty(Response2, "getResponseHeaders"); + Reflect.deleteProperty(Response2, "setResponseHeaders"); + Reflect.deleteProperty(Response2, "getResponseState"); + Reflect.deleteProperty(Response2, "setResponseState"); + mixinBody(Response2, getResponseState); + Object.defineProperties(Response2.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Response", + configurable: true + } + }); + Object.defineProperties(Response2, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty + }); + function cloneResponse(response) { + if (response.internalResponse) { + return filterResponse( + cloneResponse(response.internalResponse), + response.type + ); + } + const newResponse = makeResponse({ ...response, body: null }); + if (response.body != null) { + newResponse.body = cloneBody(response.body); + } + return newResponse; + } + function makeResponse(init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init, + headersList: init?.headersList ? new HeadersList(init?.headersList) : new HeadersList(), + urlList: init?.urlList ? [...init.urlList] : [] + }; + } + function makeNetworkError(reason) { + const isError = isErrorLike(reason); + return makeResponse({ + type: "error", + status: 0, + error: isError ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === "AbortError" + }); + } + function isNetworkError(response) { + return ( + // A network error is a response whose type is "error", + response.type === "error" && // status is 0 + response.status === 0 + ); + } + function makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get(target, p) { + return p in state ? state[p] : target[p]; + }, + set(target, p, value) { + assert(!(p in state)); + target[p] = value; + return true; + } + }); + } + function filterResponse(response, type) { + if (type === "basic") { + return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + } else if (type === "cors") { + return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + } else if (type === "opaque") { + return makeFilteredResponse(response, { + type: "opaque", + urlList: Object.freeze([]), + status: 0, + statusText: "", + body: null + }); + } else if (type === "opaqueredirect") { + return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + } else { + assert(false); + } + } + function makeAppropriateNetworkError(fetchParams, err = null) { + assert(isCancelled(fetchParams)); + return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); + } + function initializeResponse(response, init, body) { + if (init.status !== null && (init.status < 200 || init.status > 599)) { + throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.'); + } + if ("statusText" in init && init.statusText != null) { + if (!isValidReasonPhrase(String(init.statusText))) { + throw new TypeError("Invalid statusText"); + } + } + if ("status" in init && init.status != null) { + getResponseState(response).status = init.status; + } + if ("statusText" in init && init.statusText != null) { + getResponseState(response).statusText = init.statusText; + } + if ("headers" in init && init.headers != null) { + fill(getResponseHeaders(response), init.headers); + } + if (body) { + if (nullBodyStatus.includes(response.status)) { + throw webidl.errors.exception({ + header: "Response constructor", + message: `Invalid response status code ${response.status}` + }); + } + getResponseState(response).body = body.body; + if (body.type != null && !getResponseState(response).headersList.contains("content-type", true)) { + getResponseState(response).headersList.append("content-type", body.type, true); + } + } + } + function fromInnerResponse(innerResponse, guard) { + const response = new Response2(kConstruct); + setResponseState(response, innerResponse); + const headers = new Headers2(kConstruct); + setResponseHeaders(response, headers); + setHeadersList(headers, innerResponse.headersList); + setHeadersGuard(headers, guard); + if (innerResponse.body?.stream) { + streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); + } + return response; + } + webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { + if (typeof V === "string") { + return webidl.converters.USVString(V, prefix, name); + } + if (webidl.is.Blob(V)) { + return V; + } + if (ArrayBuffer.isView(V) || isArrayBuffer(V)) { + return V; + } + if (webidl.is.FormData(V)) { + return V; + } + if (webidl.is.URLSearchParams(V)) { + return V; + } + return webidl.converters.DOMString(V, prefix, name); + }; + webidl.converters.BodyInit = function(V, prefix, argument) { + if (webidl.is.ReadableStream(V)) { + return V; + } + if (V?.[Symbol.asyncIterator]) { + return V; + } + return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); + }; + webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: "status", + converter: webidl.converters["unsigned short"], + defaultValue: () => 200 + }, + { + key: "statusText", + converter: webidl.converters.ByteString, + defaultValue: () => "" + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + } + ]); + webidl.is.Response = webidl.util.MakeTypeAssertion(Response2); + module2.exports = { + isNetworkError, + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response: Response2, + cloneResponse, + fromInnerResponse, + getResponseState + }; + } +}); + +// node_modules/undici/lib/web/fetch/request.js +var require_request4 = __commonJS({ + "node_modules/undici/lib/web/fetch/request.js"(exports2, module2) { + "use strict"; + var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); + var { Headers: Headers2, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + var util = require_util4(); + var nodeUtil = require("node:util"); + var { + isValidHTTPToken, + sameOrigin, + environmentSettingsObject + } = require_util5(); + var { + forbiddenMethodsSet, + corsSafeListedMethodsSet, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + requestDuplex + } = require_constants5(); + var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; + var { webidl } = require_webidl(); + var { URLSerializer } = require_data_url(); + var { kConstruct } = require_symbols4(); + var assert = require("node:assert"); + var { getMaxListeners, setMaxListeners, defaultMaxListeners } = require("node:events"); + var kAbortController = Symbol("abortController"); + var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + var dependentControllerMap = /* @__PURE__ */ new WeakMap(); + var abortSignalHasEventHandlerLeakWarning; + try { + abortSignalHasEventHandlerLeakWarning = getMaxListeners(new AbortController().signal) > 0; + } catch { + abortSignalHasEventHandlerLeakWarning = false; + } + function buildAbort(acRef) { + return abort; + function abort() { + const ac = acRef.deref(); + if (ac !== void 0) { + requestFinalizer.unregister(abort); + this.removeEventListener("abort", abort); + ac.abort(this.reason); + const controllerList = dependentControllerMap.get(ac.signal); + if (controllerList !== void 0) { + if (controllerList.size !== 0) { + for (const ref of controllerList) { + const ctrl = ref.deref(); + if (ctrl !== void 0) { + ctrl.abort(this.reason); + } + } + controllerList.clear(); + } + dependentControllerMap.delete(ac.signal); + } + } + } + } + var patchMethodWarning = false; + var Request = class _Request { + /** @type {AbortSignal} */ + #signal; + /** @type {import('../../dispatcher/dispatcher')} */ + #dispatcher; + /** @type {Headers} */ + #headers; + #state; + // https://fetch.spec.whatwg.org/#dom-request + constructor(input, init = void 0) { + webidl.util.markAsUncloneable(this); + if (input === kConstruct) { + return; + } + const prefix = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + input = webidl.converters.RequestInfo(input); + init = webidl.converters.RequestInit(init); + let request = null; + let fallbackMode = null; + const baseUrl = environmentSettingsObject.settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + this.#dispatcher = init.dispatcher; + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { cause: err }); + } + if (parsedURL.username || parsedURL.password) { + throw new TypeError( + "Request cannot be constructed from a URL that includes credentials: " + input + ); + } + request = makeRequest({ urlList: [parsedURL] }); + fallbackMode = "cors"; + } else { + assert(webidl.is.Request(input)); + request = input.#state; + signal = input.#signal; + this.#dispatcher = init.dispatcher || input.#dispatcher; + } + const origin = environmentSettingsObject.settingsObject.origin; + let window2 = "client"; + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) { + window2 = request.window; + } + if (init.window != null) { + throw new TypeError(`'window' option '${window2}' must be null`); + } + if ("window" in init) { + window2 = "no-window"; + } + request = makeRequest({ + // URL request’s URL. + // undici implementation note: this is set as the first item in request's urlList in makeRequest + // method request’s method. + method: request.method, + // header list A copy of request’s header list. + // undici implementation note: headersList is cloned in makeRequest + headersList: request.headersList, + // unsafe-request flag Set. + unsafeRequest: request.unsafeRequest, + // client This’s relevant settings object. + client: environmentSettingsObject.settingsObject, + // window window. + window: window2, + // priority request’s priority. + priority: request.priority, + // origin request’s origin. The propagation of the origin is only significant for navigation requests + // being handled by a service worker. In this scenario a request can have an origin that is different + // from the current client. + origin: request.origin, + // referrer request’s referrer. + referrer: request.referrer, + // referrer policy request’s referrer policy. + referrerPolicy: request.referrerPolicy, + // mode request’s mode. + mode: request.mode, + // credentials mode request’s credentials mode. + credentials: request.credentials, + // cache mode request’s cache mode. + cache: request.cache, + // redirect mode request’s redirect mode. + redirect: request.redirect, + // integrity metadata request’s integrity metadata. + integrity: request.integrity, + // keepalive request’s keepalive. + keepalive: request.keepalive, + // reload-navigation flag request’s reload-navigation flag. + reloadNavigation: request.reloadNavigation, + // history-navigation flag request’s history-navigation flag. + historyNavigation: request.historyNavigation, + // URL list A clone of request’s URL list. + urlList: [...request.urlList] + }); + const initHasKey = Object.keys(init).length !== 0; + if (initHasKey) { + if (request.mode === "navigate") { + request.mode = "same-origin"; + } + request.reloadNavigation = false; + request.historyNavigation = false; + request.origin = "client"; + request.referrer = "client"; + request.referrerPolicy = ""; + request.url = request.urlList[request.urlList.length - 1]; + request.urlList = [request.url]; + } + if (init.referrer !== void 0) { + const referrer = init.referrer; + if (referrer === "") { + request.referrer = "no-referrer"; + } else { + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); + } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) { + request.referrer = "client"; + } else { + request.referrer = parsedReferrer; + } + } + } + if (init.referrerPolicy !== void 0) { + request.referrerPolicy = init.referrerPolicy; + } + let mode; + if (init.mode !== void 0) { + mode = init.mode; + } else { + mode = fallbackMode; + } + if (mode === "navigate") { + throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + } + if (mode != null) { + request.mode = mode; + } + if (init.credentials !== void 0) { + request.credentials = init.credentials; + } + if (init.cache !== void 0) { + request.cache = init.cache; + } + if (request.cache === "only-if-cached" && request.mode !== "same-origin") { + throw new TypeError( + "'only-if-cached' can be set only with 'same-origin' mode" + ); + } + if (init.redirect !== void 0) { + request.redirect = init.redirect; + } + if (init.integrity != null) { + request.integrity = String(init.integrity); + } + if (init.keepalive !== void 0) { + request.keepalive = Boolean(init.keepalive); + } + if (init.method !== void 0) { + let method = init.method; + const mayBeNormalized = normalizedMethodRecords[method]; + if (mayBeNormalized !== void 0) { + request.method = mayBeNormalized; + } else { + if (!isValidHTTPToken(method)) { + throw new TypeError(`'${method}' is not a valid HTTP method.`); + } + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) { + throw new TypeError(`'${method}' HTTP method is unsupported.`); + } + method = normalizedMethodRecordsBase[upperCase] ?? method; + request.method = method; + } + if (!patchMethodWarning && request.method === "patch") { + process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { + code: "UNDICI-FETCH-patch" + }); + patchMethodWarning = true; + } + } + if (init.signal !== void 0) { + signal = init.signal; + } + this.#state = request; + const ac = new AbortController(); + this.#signal = ac.signal; + if (signal != null) { + if (signal.aborted) { + ac.abort(signal.reason); + } else { + this[kAbortController] = ac; + const acRef = new WeakRef(ac); + const abort = buildAbort(acRef); + if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) { + setMaxListeners(1500, signal); + } + util.addAbortListener(signal, abort); + requestFinalizer.register(ac, { signal, abort }, abort); + } + } + this.#headers = new Headers2(kConstruct); + setHeadersList(this.#headers, request.headersList); + setHeadersGuard(this.#headers, "request"); + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request.method)) { + throw new TypeError( + `'${request.method} is unsupported in no-cors mode.` + ); + } + setHeadersGuard(this.#headers, "request-no-cors"); + } + if (initHasKey) { + const headersList = getHeadersList(this.#headers); + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { + for (const { name, value } of headers.rawValues()) { + headersList.append(name, value, false); + } + headersList.cookies = headers.cookies; + } else { + fillHeaders(this.#headers, headers); + } + } + const inputBody = webidl.is.Request(input) ? input.#state.body : null; + if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) { + throw new TypeError("Request with GET/HEAD method cannot have body."); + } + let initBody = null; + if (init.body != null) { + const [extractedBody, contentType] = extractBody( + init.body, + request.keepalive + ); + initBody = extractedBody; + if (contentType && !getHeadersList(this.#headers).contains("content-type", true)) { + this.#headers.append("content-type", contentType, true); + } + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init.duplex == null) { + throw new TypeError("RequestInit: duplex option is required when sending a body."); + } + if (request.mode !== "same-origin" && request.mode !== "cors") { + throw new TypeError( + 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' + ); + } + request.useCORSPreflightFlag = true; + } + let finalBody = inputOrInitBody; + if (initBody == null && inputBody != null) { + if (bodyUnusable(input.#state)) { + throw new TypeError( + "Cannot construct a Request with a Request object that has already been used." + ); + } + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; + } + this.#state.body = finalBody; + } + // Returns request’s HTTP method, which is "GET" by default. + get method() { + webidl.brandCheck(this, _Request); + return this.#state.method; + } + // Returns the URL of request as a string. + get url() { + webidl.brandCheck(this, _Request); + return URLSerializer(this.#state.url); + } + // Returns a Headers object consisting of the headers associated with request. + // Note that headers added in the network layer by the user agent will not + // be accounted for in this object, e.g., the "Host" header. + get headers() { + webidl.brandCheck(this, _Request); + return this.#headers; + } + // Returns the kind of resource requested by request, e.g., "document" + // or "script". + get destination() { + webidl.brandCheck(this, _Request); + return this.#state.destination; + } + // Returns the referrer of request. Its value can be a same-origin URL if + // explicitly set in init, the empty string to indicate no referrer, and + // "about:client" when defaulting to the global’s default. This is used + // during fetching to determine the value of the `Referer` header of the + // request being made. + get referrer() { + webidl.brandCheck(this, _Request); + if (this.#state.referrer === "no-referrer") { + return ""; + } + if (this.#state.referrer === "client") { + return "about:client"; + } + return this.#state.referrer.toString(); + } + // Returns the referrer policy associated with request. + // This is used during fetching to compute the value of the request’s + // referrer. + get referrerPolicy() { + webidl.brandCheck(this, _Request); + return this.#state.referrerPolicy; + } + // Returns the mode associated with request, which is a string indicating + // whether the request will use CORS, or will be restricted to same-origin + // URLs. + get mode() { + webidl.brandCheck(this, _Request); + return this.#state.mode; + } + // Returns the credentials mode associated with request, + // which is a string indicating whether credentials will be sent with the + // request always, never, or only when sent to a same-origin URL. + get credentials() { + webidl.brandCheck(this, _Request); + return this.#state.credentials; + } + // Returns the cache mode associated with request, + // which is a string indicating how the request will + // interact with the browser’s cache when fetching. + get cache() { + webidl.brandCheck(this, _Request); + return this.#state.cache; + } + // Returns the redirect mode associated with request, + // which is a string indicating how redirects for the + // request will be handled during fetching. A request + // will follow redirects by default. + get redirect() { + webidl.brandCheck(this, _Request); + return this.#state.redirect; + } + // Returns request’s subresource integrity metadata, which is a + // cryptographic hash of the resource being fetched. Its value + // consists of multiple hashes separated by whitespace. [SRI] + get integrity() { + webidl.brandCheck(this, _Request); + return this.#state.integrity; + } + // Returns a boolean indicating whether or not request can outlive the + // global in which it was created. + get keepalive() { + webidl.brandCheck(this, _Request); + return this.#state.keepalive; + } + // Returns a boolean indicating whether or not request is for a reload + // navigation. + get isReloadNavigation() { + webidl.brandCheck(this, _Request); + return this.#state.reloadNavigation; + } + // Returns a boolean indicating whether or not request is for a history + // navigation (a.k.a. back-forward navigation). + get isHistoryNavigation() { + webidl.brandCheck(this, _Request); + return this.#state.historyNavigation; + } + // Returns the signal associated with request, which is an AbortSignal + // object indicating whether or not request has been aborted, and its + // abort event handler. + get signal() { + webidl.brandCheck(this, _Request); + return this.#signal; + } + get body() { + webidl.brandCheck(this, _Request); + return this.#state.body ? this.#state.body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, _Request); + return !!this.#state.body && util.isDisturbed(this.#state.body.stream); + } + get duplex() { + webidl.brandCheck(this, _Request); + return "half"; + } + // Returns a clone of request. + clone() { + webidl.brandCheck(this, _Request); + if (bodyUnusable(this.#state)) { + throw new TypeError("unusable"); + } + const clonedRequest = cloneRequest(this.#state); + const ac = new AbortController(); + if (this.signal.aborted) { + ac.abort(this.signal.reason); + } else { + let list = dependentControllerMap.get(this.signal); + if (list === void 0) { + list = /* @__PURE__ */ new Set(); + dependentControllerMap.set(this.signal, list); + } + const acRef = new WeakRef(ac); + list.add(acRef); + util.addAbortListener( + ac.signal, + buildAbort(acRef) + ); + } + return fromInnerRequest(clonedRequest, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers)); + } + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) { + options.depth = 2; + } + options.colors ??= true; + const properties = { + method: this.method, + url: this.url, + headers: this.headers, + destination: this.destination, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + mode: this.mode, + credentials: this.credentials, + cache: this.cache, + redirect: this.redirect, + integrity: this.integrity, + keepalive: this.keepalive, + isReloadNavigation: this.isReloadNavigation, + isHistoryNavigation: this.isHistoryNavigation, + signal: this.signal + }; + return `Request ${nodeUtil.formatWithOptions(options, properties)}`; + } + /** + * @param {Request} request + * @param {AbortSignal} newSignal + */ + static setRequestSignal(request, newSignal) { + request.#signal = newSignal; + return request; + } + /** + * @param {Request} request + */ + static getRequestDispatcher(request) { + return request.#dispatcher; + } + /** + * @param {Request} request + * @param {import('../../dispatcher/dispatcher')} newDispatcher + */ + static setRequestDispatcher(request, newDispatcher) { + request.#dispatcher = newDispatcher; + } + /** + * @param {Request} request + * @param {Headers} newHeaders + */ + static setRequestHeaders(request, newHeaders) { + request.#headers = newHeaders; + } + /** + * @param {Request} request + */ + static getRequestState(request) { + return request.#state; + } + /** + * @param {Request} request + * @param {any} newState + */ + static setRequestState(request, newState) { + request.#state = newState; + } + }; + var { setRequestSignal, getRequestDispatcher, setRequestDispatcher, setRequestHeaders, getRequestState, setRequestState } = Request; + Reflect.deleteProperty(Request, "setRequestSignal"); + Reflect.deleteProperty(Request, "getRequestDispatcher"); + Reflect.deleteProperty(Request, "setRequestDispatcher"); + Reflect.deleteProperty(Request, "setRequestHeaders"); + Reflect.deleteProperty(Request, "getRequestState"); + Reflect.deleteProperty(Request, "setRequestState"); + mixinBody(Request, getRequestState); + function makeRequest(init) { + return { + method: init.method ?? "GET", + localURLsOnly: init.localURLsOnly ?? false, + unsafeRequest: init.unsafeRequest ?? false, + body: init.body ?? null, + client: init.client ?? null, + reservedClient: init.reservedClient ?? null, + replacesClientId: init.replacesClientId ?? "", + window: init.window ?? "client", + keepalive: init.keepalive ?? false, + serviceWorkers: init.serviceWorkers ?? "all", + initiator: init.initiator ?? "", + destination: init.destination ?? "", + priority: init.priority ?? null, + origin: init.origin ?? "client", + policyContainer: init.policyContainer ?? "client", + referrer: init.referrer ?? "client", + referrerPolicy: init.referrerPolicy ?? "", + mode: init.mode ?? "no-cors", + useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, + credentials: init.credentials ?? "same-origin", + useCredentials: init.useCredentials ?? false, + cache: init.cache ?? "default", + redirect: init.redirect ?? "follow", + integrity: init.integrity ?? "", + cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init.parserMetadata ?? "", + reloadNavigation: init.reloadNavigation ?? false, + historyNavigation: init.historyNavigation ?? false, + userActivation: init.userActivation ?? false, + taintedOrigin: init.taintedOrigin ?? false, + redirectCount: init.redirectCount ?? 0, + responseTainting: init.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, + done: init.done ?? false, + timingAllowFailed: init.timingAllowFailed ?? false, + urlList: init.urlList, + url: init.urlList[0], + headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() + }; + } + function cloneRequest(request) { + const newRequest = makeRequest({ ...request, body: null }); + if (request.body != null) { + newRequest.body = cloneBody(request.body); + } + return newRequest; + } + function fromInnerRequest(innerRequest, dispatcher, signal, guard) { + const request = new Request(kConstruct); + setRequestState(request, innerRequest); + setRequestDispatcher(request, dispatcher); + setRequestSignal(request, signal); + const headers = new Headers2(kConstruct); + setRequestHeaders(request, headers); + setHeadersList(headers, innerRequest.headersList); + setHeadersGuard(headers, guard); + return request; + } + Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Request", + configurable: true + } + }); + webidl.is.Request = webidl.util.MakeTypeAssertion(Request); + webidl.converters.RequestInfo = function(V) { + if (typeof V === "string") { + return webidl.converters.USVString(V); + } + if (webidl.is.Request(V)) { + return V; + } + return webidl.converters.USVString(V); + }; + webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: "method", + converter: webidl.converters.ByteString + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + }, + { + key: "body", + converter: webidl.nullableConverter( + webidl.converters.BodyInit + ) + }, + { + key: "referrer", + converter: webidl.converters.USVString + }, + { + key: "referrerPolicy", + converter: webidl.converters.DOMString, + // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy + allowedValues: referrerPolicy + }, + { + key: "mode", + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#concept-request-mode + allowedValues: requestMode + }, + { + key: "credentials", + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcredentials + allowedValues: requestCredentials + }, + { + key: "cache", + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcache + allowedValues: requestCache + }, + { + key: "redirect", + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestredirect + allowedValues: requestRedirect + }, + { + key: "integrity", + converter: webidl.converters.DOMString + }, + { + key: "keepalive", + converter: webidl.converters.boolean + }, + { + key: "signal", + converter: webidl.nullableConverter( + (signal) => webidl.converters.AbortSignal( + signal, + "RequestInit", + "signal" + ) + ) + }, + { + key: "window", + converter: webidl.converters.any + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + }, + { + key: "dispatcher", + // undici specific option + converter: webidl.converters.any + } + ]); + module2.exports = { + Request, + makeRequest, + fromInnerRequest, + cloneRequest, + getRequestDispatcher, + getRequestState + }; + } +}); + +// node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +var require_subresource_integrity = __commonJS({ + "node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var validSRIHashAlgorithmTokenSet = /* @__PURE__ */ new Map([["sha256", 0], ["sha384", 1], ["sha512", 2]]); + var crypto2; + try { + crypto2 = require("node:crypto"); + const cryptoHashes = crypto2.getHashes(); + if (cryptoHashes.length === 0) { + validSRIHashAlgorithmTokenSet.clear(); + } + for (const algorithm of validSRIHashAlgorithmTokenSet.keys()) { + if (cryptoHashes.includes(algorithm) === false) { + validSRIHashAlgorithmTokenSet.delete(algorithm); + } + } + } catch { + validSRIHashAlgorithmTokenSet.clear(); + } + var getSRIHashAlgorithmIndex = ( + /** @type {GetSRIHashAlgorithmIndex} */ + Map.prototype.get.bind( + validSRIHashAlgorithmTokenSet + ) + ); + var isValidSRIHashAlgorithm = ( + /** @type {IsValidSRIHashAlgorithm} */ + Map.prototype.has.bind(validSRIHashAlgorithmTokenSet) + ); + var bytesMatch = crypto2 === void 0 || validSRIHashAlgorithmTokenSet.size === 0 ? () => true : (bytes, metadataList) => { + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata.length === 0) { + return true; + } + const metadata = getStrongestMetadata(parsedMetadata); + for (const item of metadata) { + const algorithm = item.alg; + const expectedValue = item.val; + const actualValue = applyAlgorithmToBytes(algorithm, bytes); + if (caseSensitiveMatch(actualValue, expectedValue)) { + return true; + } + } + return false; + }; + function getStrongestMetadata(metadataList) { + const result = []; + let strongest = null; + for (const item of metadataList) { + assert(isValidSRIHashAlgorithm(item.alg), "Invalid SRI hash algorithm token"); + if (result.length === 0) { + result.push(item); + strongest = item; + continue; + } + const currentAlgorithm = ( + /** @type {Metadata} */ + strongest.alg + ); + const currentAlgorithmIndex = getSRIHashAlgorithmIndex(currentAlgorithm); + const newAlgorithm = item.alg; + const newAlgorithmIndex = getSRIHashAlgorithmIndex(newAlgorithm); + if (newAlgorithmIndex < currentAlgorithmIndex) { + continue; + } else if (newAlgorithmIndex > currentAlgorithmIndex) { + strongest = item; + result[0] = item; + result.length = 1; + } else { + result.push(item); + } + } + return result; + } + function parseMetadata(metadata) { + const result = []; + for (const item of metadata.split(" ")) { + const expressionAndOptions = item.split("?", 1); + const algorithmExpression = expressionAndOptions[0]; + let base64Value = ""; + const algorithmAndValue = [algorithmExpression.slice(0, 6), algorithmExpression.slice(7)]; + const algorithm = algorithmAndValue[0]; + if (!isValidSRIHashAlgorithm(algorithm)) { + continue; + } + if (algorithmAndValue[1]) { + base64Value = algorithmAndValue[1]; + } + const metadata2 = { + alg: algorithm, + val: base64Value + }; + result.push(metadata2); + } + return result; + } + var applyAlgorithmToBytes = (algorithm, bytes) => { + return crypto2.hash(algorithm, bytes, "base64"); + }; + function caseSensitiveMatch(actualValue, expectedValue) { + let actualValueLength = actualValue.length; + if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") { + actualValueLength -= 1; + } + if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") { + actualValueLength -= 1; + } + let expectedValueLength = expectedValue.length; + if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") { + expectedValueLength -= 1; + } + if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") { + expectedValueLength -= 1; + } + if (actualValueLength !== expectedValueLength) { + return false; + } + for (let i = 0; i < actualValueLength; ++i) { + if (actualValue[i] === expectedValue[i] || actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") { + continue; + } + return false; + } + return true; + } + module2.exports = { + applyAlgorithmToBytes, + bytesMatch, + caseSensitiveMatch, + isValidSRIHashAlgorithm, + getStrongestMetadata, + parseMetadata + }; + } +}); + +// node_modules/undici/lib/web/fetch/index.js +var require_fetch = __commonJS({ + "node_modules/undici/lib/web/fetch/index.js"(exports2, module2) { + "use strict"; + var { + makeNetworkError, + makeAppropriateNetworkError, + filterResponse, + makeResponse, + fromInnerResponse, + getResponseState + } = require_response2(); + var { HeadersList } = require_headers(); + var { Request, cloneRequest, getRequestDispatcher, getRequestState } = require_request4(); + var zlib = require("node:zlib"); + var { + makePolicyContainer, + clonePolicyContainer, + requestBadPort, + TAOCheck, + appendRequestOriginHeader, + responseLocationURL, + requestCurrentURL, + setRequestReferrerPolicyOnRedirect, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + createOpaqueTimingInfo, + appendFetchMetadata, + corsCheck, + crossOriginResourcePolicyCheck, + determineRequestsReferrer, + coarsenedSharedCurrentTime, + sameOrigin, + isCancelled, + isAborted, + isErrorLike, + fullyReadBody, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlIsHttpHttpsScheme, + urlHasHttpsScheme, + clampAndCoarsenConnectionTimingInfo, + simpleRangeHeaderValue, + buildContentRange, + createInflate, + extractMimeType + } = require_util5(); + var assert = require("node:assert"); + var { safelyExtractBody, extractBody } = require_body(); + var { + redirectStatusSet, + nullBodyStatus, + safeMethodsSet, + requestBodyHeader, + subresourceSet + } = require_constants5(); + var EE = require("node:events"); + var { Readable, pipeline, finished, isErrored, isReadable } = require("node:stream"); + var { addAbortListener, bufferToLowerCasedHeaderName } = require_util4(); + var { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); + var { getGlobalDispatcher } = require_global2(); + var { webidl } = require_webidl(); + var { STATUS_CODES } = require("node:http"); + var { bytesMatch } = require_subresource_integrity(); + var { createDeferredPromise } = require_promise2(); + var GET_OR_HEAD = ["GET", "HEAD"]; + var defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; + var resolveObjectURL; + var Fetch = class extends EE { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + } + terminate(reason) { + if (this.state !== "ongoing") { + return; + } + this.state = "terminated"; + this.connection?.destroy(reason); + this.emit("terminated", reason); + } + // https://fetch.spec.whatwg.org/#fetch-controller-abort + abort(error) { + if (this.state !== "ongoing") { + return; + } + this.state = "aborted"; + if (!error) { + error = new DOMException("The operation was aborted.", "AbortError"); + } + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit("terminated", error); + } + }; + function handleFetchDone(response) { + finalizeAndReportTiming(response, "fetch"); + } + function fetch2(input, init = void 0) { + webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); + let p = createDeferredPromise(); + let requestObject; + try { + requestObject = new Request(input, init); + } catch (e) { + p.reject(e); + return p.promise; + } + const request = getRequestState(requestObject); + if (requestObject.signal.aborted) { + abortFetch(p, request, null, requestObject.signal.reason); + return p.promise; + } + const globalObject = request.client.globalObject; + if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") { + request.serviceWorkers = "none"; + } + let responseObject = null; + let locallyAborted = false; + let controller = null; + addAbortListener( + requestObject.signal, + () => { + locallyAborted = true; + assert(controller != null); + controller.abort(requestObject.signal.reason); + const realResponse = responseObject?.deref(); + abortFetch(p, request, realResponse, requestObject.signal.reason); + } + ); + const processResponse = (response) => { + if (locallyAborted) { + return; + } + if (response.aborted) { + abortFetch(p, request, responseObject, controller.serializedAbortReason); + return; + } + if (response.type === "error") { + p.reject(new TypeError("fetch failed", { cause: response.error })); + return; + } + responseObject = new WeakRef(fromInnerResponse(response, "immutable")); + p.resolve(responseObject.deref()); + p = null; + }; + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: getRequestDispatcher(requestObject) + // undici + }); + return p.promise; + } + function finalizeAndReportTiming(response, initiatorType = "other") { + if (response.type === "error" && response.aborted) { + return; + } + if (!response.urlList?.length) { + return; + } + const originalURL = response.urlList[0]; + let timingInfo = response.timingInfo; + let cacheState = response.cacheState; + if (!urlIsHttpHttpsScheme(originalURL)) { + return; + } + if (timingInfo === null) { + return; + } + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo({ + startTime: timingInfo.startTime + }); + cacheState = ""; + } + timingInfo.endTime = coarsenedSharedCurrentTime(); + response.timingInfo = timingInfo; + markResourceTiming( + timingInfo, + originalURL.href, + initiatorType, + globalThis, + cacheState, + "", + // bodyType + response.status + ); + } + var markResourceTiming = performance.markResourceTiming; + function abortFetch(p, request, responseObject, error) { + if (p) { + p.reject(error); + } + if (request.body?.stream != null && isReadable(request.body.stream)) { + request.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") { + return; + } + throw err; + }); + } + if (responseObject == null) { + return; + } + const response = getResponseState(responseObject); + if (response.body?.stream != null && isReadable(response.body.stream)) { + response.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") { + return; + } + throw err; + }); + } + } + function fetching({ + request, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseEndOfBody, + processResponseConsumeBody, + useParallelQueue = false, + dispatcher = getGlobalDispatcher() + // undici + }) { + assert(dispatcher); + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request.client != null) { + taskDestination = request.client.globalObject; + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; + } + const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); + const timingInfo = createOpaqueTimingInfo({ + startTime: currentTime + }); + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + }; + assert(!request.body || request.body.stream); + if (request.window === "client") { + request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; + } + if (request.origin === "client") { + request.origin = request.client.origin; + } + if (request.policyContainer === "client") { + if (request.client != null) { + request.policyContainer = clonePolicyContainer( + request.client.policyContainer + ); + } else { + request.policyContainer = makePolicyContainer(); + } + } + if (!request.headersList.contains("accept", true)) { + const value = "*/*"; + request.headersList.append("accept", value, true); + } + if (!request.headersList.contains("accept-language", true)) { + request.headersList.append("accept-language", "*", true); + } + if (request.priority === null) { + } + if (subresourceSet.has(request.destination)) { + } + mainFetch(fetchParams, false); + return fetchParams.controller; + } + async function mainFetch(fetchParams, recursive) { + try { + const request = fetchParams.request; + let response = null; + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { + response = makeNetworkError("local URLs only"); + } + tryUpgradeRequestToAPotentiallyTrustworthyURL(request); + if (requestBadPort(request) === "blocked") { + response = makeNetworkError("bad port"); + } + if (request.referrerPolicy === "") { + request.referrerPolicy = request.policyContainer.referrerPolicy; + } + if (request.referrer !== "no-referrer") { + request.referrer = determineRequestsReferrer(request); + } + if (response === null) { + const currentURL = requestCurrentURL(request); + if ( + // - request’s current URL’s origin is same origin with request’s origin, + // and request’s response tainting is "basic" + sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || // request’s current URL’s scheme is "data" + currentURL.protocol === "data:" || // - request’s mode is "navigate" or "websocket" + (request.mode === "navigate" || request.mode === "websocket") + ) { + request.responseTainting = "basic"; + response = await schemeFetch(fetchParams); + } else if (request.mode === "same-origin") { + response = makeNetworkError('request mode cannot be "same-origin"'); + } else if (request.mode === "no-cors") { + if (request.redirect !== "follow") { + response = makeNetworkError( + 'redirect mode cannot be "follow" for "no-cors" request' + ); + } else { + request.responseTainting = "opaque"; + response = await schemeFetch(fetchParams); + } + } else if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { + response = makeNetworkError("URL scheme must be a HTTP(S) scheme"); + } else { + request.responseTainting = "cors"; + response = await httpFetch(fetchParams); + } + } + if (recursive) { + return response; + } + if (response.status !== 0 && !response.internalResponse) { + if (request.responseTainting === "cors") { + } + if (request.responseTainting === "basic") { + response = filterResponse(response, "basic"); + } else if (request.responseTainting === "cors") { + response = filterResponse(response, "cors"); + } else if (request.responseTainting === "opaque") { + response = filterResponse(response, "opaque"); + } else { + assert(false); + } + } + let internalResponse = response.status === 0 ? response : response.internalResponse; + if (internalResponse.urlList.length === 0) { + internalResponse.urlList.push(...request.urlList); + } + if (!request.timingAllowFailed) { + response.timingAllowPassed = true; + } + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range", true)) { + response = internalResponse = makeNetworkError(); + } + if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; + } + if (request.integrity) { + const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + if (request.responseTainting === "opaque" || response.body == null) { + processBodyError(response.error); + return; + } + const processBody = (bytes) => { + if (!bytesMatch(bytes, request.integrity)) { + processBodyError("integrity mismatch"); + return; + } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + fullyReadBody(response.body, processBody, processBodyError); + } else { + fetchFinale(fetchParams, response); + } + } catch (err) { + fetchParams.controller.terminate(err); + } + } + function schemeFetch(fetchParams) { + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { + return Promise.resolve(makeAppropriateNetworkError(fetchParams)); + } + const { request } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request); + switch (scheme) { + case "about:": { + return Promise.resolve(makeNetworkError("about scheme is not supported")); + } + case "blob:": { + if (!resolveObjectURL) { + resolveObjectURL = require("node:buffer").resolveObjectURL; + } + const blobURLEntry = requestCurrentURL(request); + if (blobURLEntry.search.length !== 0) { + return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); + } + const blob = resolveObjectURL(blobURLEntry.toString()); + if (request.method !== "GET" || !webidl.is.Blob(blob)) { + return Promise.resolve(makeNetworkError("invalid method")); + } + const response = makeResponse(); + const fullLength = blob.size; + const serializedFullLength = isomorphicEncode(`${fullLength}`); + const type = blob.type; + if (!request.headersList.contains("range", true)) { + const bodyWithType = extractBody(blob); + response.statusText = "OK"; + response.body = bodyWithType[0]; + response.headersList.set("content-length", serializedFullLength, true); + response.headersList.set("content-type", type, true); + } else { + response.rangeRequested = true; + const rangeHeader = request.headersList.get("range", true); + const rangeValue = simpleRangeHeaderValue(rangeHeader, true); + if (rangeValue === "failure") { + return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + } + let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; + if (rangeStart === null) { + rangeStart = fullLength - rangeEnd; + rangeEnd = rangeStart + rangeEnd - 1; + } else { + if (rangeStart >= fullLength) { + return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); + } + if (rangeEnd === null || rangeEnd >= fullLength) { + rangeEnd = fullLength - 1; + } + } + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); + const slicedBodyWithType = extractBody(slicedBlob); + response.body = slicedBodyWithType[0]; + const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); + const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength); + response.status = 206; + response.statusText = "Partial Content"; + response.headersList.set("content-length", serializedSlicedLength, true); + response.headersList.set("content-type", type, true); + response.headersList.set("content-range", contentRange, true); + } + return Promise.resolve(response); + } + case "data:": { + const currentURL = requestCurrentURL(request); + const dataURLStruct = dataURLProcessor(currentURL); + if (dataURLStruct === "failure") { + return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + } + const mimeType = serializeAMimeType(dataURLStruct.mimeType); + return Promise.resolve(makeResponse({ + statusText: "OK", + headersList: [ + ["content-type", { name: "Content-Type", value: mimeType }] + ], + body: safelyExtractBody(dataURLStruct.body)[0] + })); + } + case "file:": { + return Promise.resolve(makeNetworkError("not implemented... yet...")); + } + case "http:": + case "https:": { + return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + } + default: { + return Promise.resolve(makeNetworkError("unknown scheme")); + } + } + } + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) { + queueMicrotask(() => fetchParams.processResponseDone(response)); + } + } + function fetchFinale(fetchParams, response) { + let timingInfo = fetchParams.timingInfo; + const processResponseEndOfBody = () => { + const unsafeEndTime = Date.now(); + if (fetchParams.request.destination === "document") { + fetchParams.controller.fullTimingInfo = timingInfo; + } + fetchParams.controller.reportTimingSteps = () => { + if (!urlIsHttpHttpsScheme(fetchParams.request.url)) { + return; + } + timingInfo.endTime = unsafeEndTime; + let cacheState = response.cacheState; + const bodyInfo = response.bodyInfo; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo(timingInfo); + cacheState = ""; + } + let responseStatus = 0; + if (fetchParams.request.mode !== "navigator" || !response.hasCrossOriginRedirects) { + responseStatus = response.status; + const mimeType = extractMimeType(response.headersList); + if (mimeType !== "failure") { + bodyInfo.contentType = minimizeSupportedMimeType(mimeType); + } + } + if (fetchParams.request.initiatorType != null) { + markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); + } + }; + const processResponseEndOfBodyTask = () => { + fetchParams.request.done = true; + if (fetchParams.processResponseEndOfBody != null) { + queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + } + if (fetchParams.request.initiatorType != null) { + fetchParams.controller.reportTimingSteps(); + } + }; + queueMicrotask(() => processResponseEndOfBodyTask()); + }; + if (fetchParams.processResponse != null) { + queueMicrotask(() => { + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); + } + const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; + if (internalResponse.body == null) { + processResponseEndOfBody(); + } else { + finished(internalResponse.body.stream, () => { + processResponseEndOfBody(); + }); + } + } + async function httpFetch(fetchParams) { + const request = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request.serviceWorkers === "all") { + } + if (response === null) { + if (request.redirect === "follow") { + request.serviceWorkers = "none"; + } + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); + if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") { + return makeNetworkError("cors failure"); + } + if (TAOCheck(request, response) === "failure") { + request.timingAllowFailed = true; + } + } + if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck( + request.origin, + request.client, + request.destination, + actualResponse + ) === "blocked") { + return makeNetworkError("blocked"); + } + if (redirectStatusSet.has(actualResponse.status)) { + if (request.redirect !== "manual") { + fetchParams.controller.connection.destroy(void 0, false); + } + if (request.redirect === "error") { + response = makeNetworkError("unexpected redirect"); + } else if (request.redirect === "manual") { + response = actualResponse; + } else if (request.redirect === "follow") { + response = await httpRedirectFetch(fetchParams, response); + } else { + assert(false); + } + } + response.timingInfo = timingInfo; + return response; + } + function httpRedirectFetch(fetchParams, response) { + const request = fetchParams.request; + const actualResponse = response.internalResponse ? response.internalResponse : response; + let locationURL; + try { + locationURL = responseLocationURL( + actualResponse, + requestCurrentURL(request).hash + ); + if (locationURL == null) { + return response; + } + } catch (err) { + return Promise.resolve(makeNetworkError(err)); + } + if (!urlIsHttpHttpsScheme(locationURL)) { + return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + } + if (request.redirectCount === 20) { + return Promise.resolve(makeNetworkError("redirect count exceeded")); + } + request.redirectCount += 1; + if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) { + return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')); + } + if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) { + return Promise.resolve(makeNetworkError( + 'URL cannot contain credentials for request mode "cors"' + )); + } + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) { + return Promise.resolve(makeNetworkError()); + } + if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { + request.method = "GET"; + request.body = null; + for (const headerName of requestBodyHeader) { + request.headersList.delete(headerName); + } + } + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + request.headersList.delete("authorization", true); + request.headersList.delete("proxy-authorization", true); + request.headersList.delete("cookie", true); + request.headersList.delete("host", true); + } + if (request.body != null) { + assert(request.body.source != null); + request.body = safelyExtractBody(request.body.source)[0]; + } + const timingInfo = fetchParams.timingInfo; + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + if (timingInfo.redirectStartTime === 0) { + timingInfo.redirectStartTime = timingInfo.startTime; + } + request.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request, actualResponse); + return mainFetch(fetchParams, true); + } + async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + const request = fetchParams.request; + let httpFetchParams = null; + let httpRequest = null; + let response = null; + const httpCache = null; + const revalidatingFlag = false; + if (request.window === "no-window" && request.redirect === "error") { + httpFetchParams = fetchParams; + httpRequest = request; + } else { + httpRequest = cloneRequest(request); + httpFetchParams = { ...fetchParams }; + httpFetchParams.request = httpRequest; + } + const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; + let contentLengthHeaderValue = null; + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) { + contentLengthHeaderValue = "0"; + } + if (contentLength != null) { + contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + } + if (contentLengthHeaderValue != null) { + httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); + } + if (contentLength != null && httpRequest.keepalive) { + } + if (webidl.is.URL(httpRequest.referrer)) { + httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); + } + appendRequestOriginHeader(httpRequest); + appendFetchMetadata(httpRequest); + if (!httpRequest.headersList.contains("user-agent", true)) { + httpRequest.headersList.append("user-agent", defaultUserAgent, true); + } + if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) { + httpRequest.cache = "no-store"; + } + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) { + httpRequest.headersList.append("cache-control", "max-age=0", true); + } + if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { + if (!httpRequest.headersList.contains("pragma", true)) { + httpRequest.headersList.append("pragma", "no-cache", true); + } + if (!httpRequest.headersList.contains("cache-control", true)) { + httpRequest.headersList.append("cache-control", "no-cache", true); + } + } + if (httpRequest.headersList.contains("range", true)) { + httpRequest.headersList.append("accept-encoding", "identity", true); + } + if (!httpRequest.headersList.contains("accept-encoding", true)) { + if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { + httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); + } else { + httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); + } + } + httpRequest.headersList.delete("host", true); + if (includeCredentials) { + } + if (httpCache == null) { + httpRequest.cache = "no-store"; + } + if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") { + } + if (response == null) { + if (httpRequest.cache === "only-if-cached") { + return makeNetworkError("only if cached"); + } + const forwardResponse = await httpNetworkFetch( + httpFetchParams, + includeCredentials, + isNewConnectionFetch + ); + if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) { + } + if (revalidatingFlag && forwardResponse.status === 304) { + } + if (response == null) { + response = forwardResponse; + } + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range", true)) { + response.rangeRequested = true; + } + response.requestIncludesCredentials = includeCredentials; + if (response.status === 407) { + if (request.window === "no-window") { + return makeNetworkError(); + } + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams); + } + return makeNetworkError("proxy authentication required"); + } + if ( + // response’s status is 421 + response.status === 421 && // isNewConnectionFetch is false + !isNewConnectionFetch && // request’s body is null, or request’s body is non-null and request’s body’s source is non-null + (request.body == null || request.body.source != null) + ) { + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams); + } + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch( + fetchParams, + isAuthenticationFetch, + true + ); + } + if (isAuthenticationFetch) { + } + return response; + } + async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy(err, abort = true) { + if (!this.destroyed) { + this.destroyed = true; + if (abort) { + this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); + } + } + } + }; + const request = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + const httpCache = null; + if (httpCache == null) { + request.cache = "no-store"; + } + const newConnection = forceNewConnection ? "yes" : "no"; + if (request.mode === "websocket") { + } else { + } + let requestBody = null; + if (request.body == null && fetchParams.processRequestEndOfBody) { + queueMicrotask(() => fetchParams.processRequestEndOfBody()); + } else if (request.body != null) { + const processBodyChunk = async function* (bytes) { + if (isCancelled(fetchParams)) { + return; + } + yield bytes; + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + }; + const processEndOfBody = () => { + if (isCancelled(fetchParams)) { + return; + } + if (fetchParams.processRequestEndOfBody) { + fetchParams.processRequestEndOfBody(); + } + }; + const processBodyError = (e) => { + if (isCancelled(fetchParams)) { + return; + } + if (e.name === "AbortError") { + fetchParams.controller.abort(); + } else { + fetchParams.controller.terminate(e); + } + }; + requestBody = (async function* () { + try { + for await (const bytes of request.body.stream) { + yield* processBodyChunk(bytes); + } + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + })(); + } + try { + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + if (socket) { + response = makeResponse({ status, statusText, headersList, socket }); + } else { + const iterator = body[Symbol.asyncIterator](); + fetchParams.controller.next = () => iterator.next(); + response = makeResponse({ status, statusText, headersList }); + } + } catch (err) { + if (err.name === "AbortError") { + fetchParams.controller.connection.destroy(); + return makeAppropriateNetworkError(fetchParams, err); + } + return makeNetworkError(err); + } + const pullAlgorithm = () => { + return fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + if (!isCancelled(fetchParams)) { + fetchParams.controller.abort(reason); + } + }; + const stream = new ReadableStream( + { + start(controller) { + fetchParams.controller.controller = controller; + }, + pull: pullAlgorithm, + cancel: cancelAlgorithm, + type: "bytes" + } + ); + response.body = { stream, source: null, length: null }; + if (!fetchParams.controller.resume) { + fetchParams.controller.on("terminated", onAborted); + } + fetchParams.controller.resume = async () => { + while (true) { + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + if (isAborted(fetchParams)) { + break; + } + bytes = done ? void 0 : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { + bytes = void 0; + } else { + bytes = err; + isFailure = true; + } + } + if (bytes === void 0) { + readableStreamClose(fetchParams.controller.controller); + finalizeResponse(fetchParams, response); + return; + } + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + const buffer = new Uint8Array(bytes); + if (buffer.byteLength) { + fetchParams.controller.controller.enqueue(buffer); + } + if (isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + if (fetchParams.controller.controller.desiredSize <= 0) { + return; + } + } + }; + function onAborted(reason) { + if (isAborted(fetchParams)) { + response.aborted = true; + if (isReadable(stream)) { + fetchParams.controller.controller.error( + fetchParams.controller.serializedAbortReason + ); + } + } else { + if (isReadable(stream)) { + fetchParams.controller.controller.error(new TypeError("terminated", { + cause: isErrorLike(reason) ? reason : void 0 + })); + } + } + fetchParams.controller.connection.destroy(); + } + return response; + function dispatch({ body }) { + const url = requestCurrentURL(request); + const agent = fetchParams.controller.dispatcher; + return new Promise((resolve, reject) => agent.dispatch( + { + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === "websocket" ? "websocket" : void 0 + }, + { + body: null, + abort: null, + onConnect(abort) { + const { connection } = fetchParams.controller; + timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); + if (connection.destroyed) { + abort(new DOMException("The operation was aborted.", "AbortError")); + } else { + fetchParams.controller.on("terminated", abort); + this.abort = connection.abort = abort; + } + timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onResponseStarted() { + timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onHeaders(status, rawHeaders, resume, statusText) { + if (status < 200) { + return false; + } + let codings = []; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) { + headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + } + const contentEncoding = headersList.get("content-encoding", true); + if (contentEncoding) { + codings = contentEncoding.toLowerCase().split(",").map((x) => x.trim()); + } + const location = headersList.get("location", true); + this.body = new Readable({ read: resume }); + const decoders = []; + const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); + if (codings.length !== 0 && request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + for (let i = codings.length - 1; i >= 0; --i) { + const coding = codings[i]; + if (coding === "x-gzip" || coding === "gzip") { + decoders.push(zlib.createGunzip({ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + } else if (coding === "deflate") { + decoders.push(createInflate({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + } else if (coding === "br") { + decoders.push(zlib.createBrotliDecompress({ + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH + })); + } else if (coding === "zstd" && typeof zlib.createZstdDecompress === "function") { + decoders.push(zlib.createZstdDecompress({ + flush: zlib.constants.ZSTD_e_continue, + finishFlush: zlib.constants.ZSTD_e_end + })); + } else { + decoders.length = 0; + break; + } + } + } + const onError = this.onError.bind(this); + resolve({ + status, + statusText, + headersList, + body: decoders.length ? pipeline(this.body, ...decoders, (err) => { + if (err) { + this.onError(err); + } + }).on("error", onError) : this.body.on("error", onError) + }); + return true; + }, + onData(chunk) { + if (fetchParams.controller.dump) { + return; + } + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + return this.body.push(bytes); + }, + onComplete() { + if (this.abort) { + fetchParams.controller.off("terminated", this.abort); + } + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError(error) { + if (this.abort) { + fetchParams.controller.off("terminated", this.abort); + } + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); + }, + onUpgrade(status, rawHeaders, socket) { + if (status !== 101) { + return; + } + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) { + headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + } + resolve({ + status, + statusText: STATUS_CODES[status], + headersList, + socket + }); + return true; + } + } + )); + } + } + module2.exports = { + fetch: fetch2, + Fetch, + fetching, + finalizeAndReportTiming + }; + } +}); + +// node_modules/undici/lib/web/cache/util.js +var require_util6 = __commonJS({ + "node_modules/undici/lib/web/cache/util.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { URLSerializer } = require_data_url(); + var { isValidHeaderName } = require_util5(); + function urlEquals(A, B, excludeFragment = false) { + const serializedA = URLSerializer(A, excludeFragment); + const serializedB = URLSerializer(B, excludeFragment); + return serializedA === serializedB; + } + function getFieldValues(header) { + assert(header !== null); + const values = []; + for (let value of header.split(",")) { + value = value.trim(); + if (isValidHeaderName(value)) { + values.push(value); + } + } + return values; + } + module2.exports = { + urlEquals, + getFieldValues + }; + } +}); + +// node_modules/undici/lib/web/cache/cache.js +var require_cache3 = __commonJS({ + "node_modules/undici/lib/web/cache/cache.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { kConstruct } = require_symbols4(); + var { urlEquals, getFieldValues } = require_util6(); + var { kEnumerableProperty, isDisturbed } = require_util4(); + var { webidl } = require_webidl(); + var { cloneResponse, fromInnerResponse, getResponseState } = require_response2(); + var { Request, fromInnerRequest, getRequestState } = require_request4(); + var { fetching } = require_fetch(); + var { urlIsHttpHttpsScheme, readAllBytes } = require_util5(); + var { createDeferredPromise } = require_promise2(); + var Cache = class _Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList; + constructor() { + if (arguments[0] !== kConstruct) { + webidl.illegalConstructor(); + } + webidl.util.markAsUncloneable(this); + this.#relevantRequestResponseList = arguments[1]; + } + async match(request, options = {}) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + const p = this.#internalMatchAll(request, options, 1); + if (p.length === 0) { + return; + } + return p[0]; + } + async matchAll(request = void 0, options = {}) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.matchAll"; + if (request !== void 0) request = webidl.converters.RequestInfo(request); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + return this.#internalMatchAll(request, options); + } + async add(request) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request); + const requests = [request]; + const responseArrayPromise = this.addAll(requests); + return await responseArrayPromise; + } + async addAll(requests) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.addAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const responsePromises = []; + const requestList = []; + for (let request of requests) { + if (request === void 0) { + throw webidl.errors.conversionFailed({ + prefix, + argument: "Argument 1", + types: ["undefined is not allowed"] + }); + } + request = webidl.converters.RequestInfo(request); + if (typeof request === "string") { + continue; + } + const r = getRequestState(request); + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") { + throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme when method is not GET." + }); + } + } + const fetchControllers = []; + for (const request of requests) { + const r = getRequestState(new Request(request)); + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme." + }); + } + r.initiator = "fetch"; + r.destination = "subresource"; + requestList.push(r); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching({ + request: r, + processResponse(response) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + } else if (response.headersList.contains("vary")) { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) { + controller.abort(); + } + return; + } + } + } + }, + processResponseEndOfBody(response) { + if (response.aborted) { + responsePromise.reject(new DOMException("aborted", "AbortError")); + return; + } + responsePromise.resolve(response); + } + })); + responsePromises.push(responsePromise.promise); + } + const p = Promise.all(responsePromises); + const responses = await p; + const operations = []; + let index = 0; + for (const response of responses) { + const operation = { + type: "put", + // 7.3.2 + request: requestList[index], + // 7.3.3 + response + // 7.3.4 + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(void 0); + } else { + cacheJobPromise.reject(errorData); + } + }); + return cacheJobPromise.promise; + } + async put(request, response) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.put"; + webidl.argumentLengthCheck(arguments, 2, prefix); + request = webidl.converters.RequestInfo(request); + response = webidl.converters.Response(response, prefix, "response"); + let innerRequest = null; + if (webidl.is.Request(request)) { + innerRequest = getRequestState(request); + } else { + innerRequest = getRequestState(new Request(request)); + } + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { + throw webidl.errors.exception({ + header: prefix, + message: "Expected an http/s scheme when method is not GET" + }); + } + const innerResponse = getResponseState(response); + if (innerResponse.status === 206) { + throw webidl.errors.exception({ + header: prefix, + message: "Got 206 status" + }); + } + if (innerResponse.headersList.contains("vary")) { + const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") { + throw webidl.errors.exception({ + header: prefix, + message: "Got * vary field value" + }); + } + } + } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { + throw webidl.errors.exception({ + header: prefix, + message: "Response body is locked or disturbed" + }); + } + const clonedResponse = cloneResponse(innerResponse); + const bodyReadPromise = createDeferredPromise(); + if (innerResponse.body != null) { + const stream = innerResponse.body.stream; + const reader = stream.getReader(); + readAllBytes(reader, bodyReadPromise.resolve, bodyReadPromise.reject); + } else { + bodyReadPromise.resolve(void 0); + } + const operations = []; + const operation = { + type: "put", + // 14. + request: innerRequest, + // 15. + response: clonedResponse + // 16. + }; + operations.push(operation); + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) { + clonedResponse.body.source = bytes; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(); + } else { + cacheJobPromise.reject(errorData); + } + }); + return cacheJobPromise.promise; + } + async delete(request, options = {}) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + let r = null; + if (webidl.is.Request(request)) { + r = getRequestState(request); + if (r.method !== "GET" && !options.ignoreMethod) { + return false; + } + } else { + assert(typeof request === "string"); + r = getRequestState(new Request(request)); + } + const operations = []; + const operation = { + type: "delete", + request: r, + options + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(!!requestResponses?.length); + } else { + cacheJobPromise.reject(errorData); + } + }); + return cacheJobPromise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../../types/cache').CacheQueryOptions} options + * @returns {Promise} + */ + async keys(request = void 0, options = {}) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.keys"; + if (request !== void 0) request = webidl.converters.RequestInfo(request); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + let r = null; + if (request !== void 0) { + if (webidl.is.Request(request)) { + r = getRequestState(request); + if (r.method !== "GET" && !options.ignoreMethod) { + return []; + } + } else if (typeof request === "string") { + r = getRequestState(new Request(request)); + } + } + const promise = createDeferredPromise(); + const requests = []; + if (request === void 0) { + for (const requestResponse of this.#relevantRequestResponseList) { + requests.push(requestResponse[0]); + } + } else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) { + requests.push(requestResponse[0]); + } + } + queueMicrotask(() => { + const requestList = []; + for (const request2 of requests) { + const requestObject = fromInnerRequest( + request2, + void 0, + new AbortController().signal, + "immutable" + ); + requestList.push(requestObject); + } + promise.resolve(Object.freeze(requestList)); + }); + return promise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations(operations) { + const cache = this.#relevantRequestResponseList; + const backupCache = [...cache]; + const addedItems = []; + const resultList = []; + try { + for (const operation of operations) { + if (operation.type !== "delete" && operation.type !== "put") { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: 'operation type does not match "delete" or "put"' + }); + } + if (operation.type === "delete" && operation.response != null) { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + } + if (this.#queryCache(operation.request, operation.options, addedItems).length) { + throw new DOMException("???", "InvalidStateError"); + } + let requestResponses; + if (operation.type === "delete") { + requestResponses = this.#queryCache(operation.request, operation.options); + if (requestResponses.length === 0) { + return []; + } + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert(idx !== -1); + cache.splice(idx, 1); + } + } else if (operation.type === "put") { + if (operation.response == null) { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); + } + const r = operation.request; + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + } + if (r.method !== "GET") { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + } + if (operation.options != null) { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); + } + requestResponses = this.#queryCache(operation.request); + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert(idx !== -1); + cache.splice(idx, 1); + } + cache.push([operation.request, operation.response]); + addedItems.push([operation.request, operation.response]); + } + resultList.push([operation.request, operation.response]); + } + return resultList; + } catch (e) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options, targetStorage) { + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { + resultList.push(requestResponse); + } + } + return resultList; + } + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem(requestQuery, request, response = null, options) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request.url); + if (options?.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) { + return false; + } + if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) { + return true; + } + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") { + return false; + } + const requestValue = request.headersList.get(fieldValue); + const queryValue = requestQuery.headersList.get(fieldValue); + if (requestValue !== queryValue) { + return false; + } + } + return true; + } + #internalMatchAll(request, options, maxResponses = Infinity) { + let r = null; + if (request !== void 0) { + if (webidl.is.Request(request)) { + r = getRequestState(request); + if (r.method !== "GET" && !options.ignoreMethod) { + return []; + } + } else if (typeof request === "string") { + r = getRequestState(new Request(request)); + } + } + const responses = []; + if (request === void 0) { + for (const requestResponse of this.#relevantRequestResponseList) { + responses.push(requestResponse[1]); + } + } else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) { + responses.push(requestResponse[1]); + } + } + const responseList = []; + for (const response of responses) { + const responseObject = fromInnerResponse(response, "immutable"); + responseList.push(responseObject.clone()); + if (responseList.length >= maxResponses) { + break; + } + } + return Object.freeze(responseList); + } + }; + Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: "Cache", + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + var cacheQueryOptionConverters = [ + { + key: "ignoreSearch", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreMethod", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreVary", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters); + webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ + ...cacheQueryOptionConverters, + { + key: "cacheName", + converter: webidl.converters.DOMString + } + ]); + webidl.converters.Response = webidl.interfaceConverter( + webidl.is.Response, + "Response" + ); + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.RequestInfo + ); + module2.exports = { + Cache + }; + } +}); + +// node_modules/undici/lib/web/cache/cachestorage.js +var require_cachestorage = __commonJS({ + "node_modules/undici/lib/web/cache/cachestorage.js"(exports2, module2) { + "use strict"; + var { Cache } = require_cache3(); + var { webidl } = require_webidl(); + var { kEnumerableProperty } = require_util4(); + var { kConstruct } = require_symbols4(); + var CacheStorage = class _CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl.brandCheck(this, _CacheStorage); + const prefix = "CacheStorage.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl.brandCheck(this, _CacheStorage); + const prefix = "CacheStorage.open"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + if (this.#caches.has(cacheName)) { + const cache2 = this.#caches.get(cacheName); + return new Cache(kConstruct, cache2); + } + const cache = []; + this.#caches.set(cacheName, cache); + return new Cache(kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete(cacheName) { + webidl.brandCheck(this, _CacheStorage); + const prefix = "CacheStorage.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {Promise} + */ + async keys() { + webidl.brandCheck(this, _CacheStorage); + const keys = this.#caches.keys(); + return [...keys]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + module2.exports = { + CacheStorage + }; + } +}); + +// node_modules/undici/lib/web/cookies/constants.js +var require_constants6 = __commonJS({ + "node_modules/undici/lib/web/cookies/constants.js"(exports2, module2) { + "use strict"; + var maxAttributeValueSize = 1024; + var maxNameValuePairSize = 4096; + module2.exports = { + maxAttributeValueSize, + maxNameValuePairSize + }; + } +}); + +// node_modules/undici/lib/web/cookies/util.js +var require_util7 = __commonJS({ + "node_modules/undici/lib/web/cookies/util.js"(exports2, module2) { + "use strict"; + function isCTLExcludingHtab(value) { + for (let i = 0; i < value.length; ++i) { + const code = value.charCodeAt(i); + if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) { + return true; + } + } + return false; + } + function validateCookieName(name) { + for (let i = 0; i < name.length; ++i) { + const code = name.charCodeAt(i); + if (code < 33 || // exclude CTLs (0-31), SP and HT + code > 126 || // exclude non-ascii and DEL + code === 34 || // " + code === 40 || // ( + code === 41 || // ) + code === 60 || // < + code === 62 || // > + code === 64 || // @ + code === 44 || // , + code === 59 || // ; + code === 58 || // : + code === 92 || // \ + code === 47 || // / + code === 91 || // [ + code === 93 || // ] + code === 63 || // ? + code === 61 || // = + code === 123 || // { + code === 125) { + throw new Error("Invalid cookie name"); + } + } + } + function validateCookieValue(value) { + let len = value.length; + let i = 0; + if (value[0] === '"') { + if (len === 1 || value[len - 1] !== '"') { + throw new Error("Invalid cookie value"); + } + --len; + ++i; + } + while (i < len) { + const code = value.charCodeAt(i++); + if (code < 33 || // exclude CTLs (0-31) + code > 126 || // non-ascii and DEL (127) + code === 34 || // " + code === 44 || // , + code === 59 || // ; + code === 92) { + throw new Error("Invalid cookie value"); + } + } + } + function validateCookiePath(path7) { + for (let i = 0; i < path7.length; ++i) { + const code = path7.charCodeAt(i); + if (code < 32 || // exclude CTLs (0-31) + code === 127 || // DEL + code === 59) { + throw new Error("Invalid cookie path"); + } + } + } + function validateCookieDomain(domain) { + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) { + throw new Error("Invalid cookie domain"); + } + } + var IMFDays = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + var IMFMonths = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + var IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); + function toIMFDate(date) { + if (typeof date === "number") { + date = new Date(date); + } + return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`; + } + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) { + throw new Error("Invalid cookie max-age"); + } + } + function stringify(cookie) { + if (cookie.name.length === 0) { + return null; + } + validateCookieName(cookie.name); + validateCookieValue(cookie.value); + const out = [`${cookie.name}=${cookie.value}`]; + if (cookie.name.startsWith("__Secure-")) { + cookie.secure = true; + } + if (cookie.name.startsWith("__Host-")) { + cookie.secure = true; + cookie.domain = null; + cookie.path = "/"; + } + if (cookie.secure) { + out.push("Secure"); + } + if (cookie.httpOnly) { + out.push("HttpOnly"); + } + if (typeof cookie.maxAge === "number") { + validateCookieMaxAge(cookie.maxAge); + out.push(`Max-Age=${cookie.maxAge}`); + } + if (cookie.domain) { + validateCookieDomain(cookie.domain); + out.push(`Domain=${cookie.domain}`); + } + if (cookie.path) { + validateCookiePath(cookie.path); + out.push(`Path=${cookie.path}`); + } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") { + out.push(`Expires=${toIMFDate(cookie.expires)}`); + } + if (cookie.sameSite) { + out.push(`SameSite=${cookie.sameSite}`); + } + for (const part of cookie.unparsed) { + if (!part.includes("=")) { + throw new Error("Invalid unparsed"); + } + const [key, ...value] = part.split("="); + out.push(`${key.trim()}=${value.join("=")}`); + } + return out.join("; "); + } + module2.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify + }; + } +}); + +// node_modules/undici/lib/web/cookies/parse.js +var require_parse6 = __commonJS({ + "node_modules/undici/lib/web/cookies/parse.js"(exports2, module2) { + "use strict"; + var { maxNameValuePairSize, maxAttributeValueSize } = require_constants6(); + var { isCTLExcludingHtab } = require_util7(); + var { collectASequenceOfCodePointsFast } = require_data_url(); + var assert = require("node:assert"); + var { unescape: qsUnescape } = require("node:querystring"); + function parseSetCookie(header) { + if (isCTLExcludingHtab(header)) { + return null; + } + let nameValuePair = ""; + let unparsedAttributes = ""; + let name = ""; + let value = ""; + if (header.includes(";")) { + const position = { position: 0 }; + nameValuePair = collectASequenceOfCodePointsFast(";", header, position); + unparsedAttributes = header.slice(position.position); + } else { + nameValuePair = header; + } + if (!nameValuePair.includes("=")) { + value = nameValuePair; + } else { + const position = { position: 0 }; + name = collectASequenceOfCodePointsFast( + "=", + nameValuePair, + position + ); + value = nameValuePair.slice(position.position + 1); + } + name = name.trim(); + value = value.trim(); + if (name.length + value.length > maxNameValuePairSize) { + return null; + } + return { + name, + value: qsUnescape(value), + ...parseUnparsedAttributes(unparsedAttributes) + }; + } + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) { + return cookieAttributeList; + } + assert(unparsedAttributes[0] === ";"); + unparsedAttributes = unparsedAttributes.slice(1); + let cookieAv = ""; + if (unparsedAttributes.includes(";")) { + cookieAv = collectASequenceOfCodePointsFast( + ";", + unparsedAttributes, + { position: 0 } + ); + unparsedAttributes = unparsedAttributes.slice(cookieAv.length); + } else { + cookieAv = unparsedAttributes; + unparsedAttributes = ""; + } + let attributeName = ""; + let attributeValue = ""; + if (cookieAv.includes("=")) { + const position = { position: 0 }; + attributeName = collectASequenceOfCodePointsFast( + "=", + cookieAv, + position + ); + attributeValue = cookieAv.slice(position.position + 1); + } else { + attributeName = cookieAv; + } + attributeName = attributeName.trim(); + attributeValue = attributeValue.trim(); + if (attributeValue.length > maxAttributeValueSize) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + const attributeNameLowercase = attributeName.toLowerCase(); + if (attributeNameLowercase === "expires") { + const expiryTime = new Date(attributeValue); + cookieAttributeList.expires = expiryTime; + } else if (attributeNameLowercase === "max-age") { + const charCode = attributeValue.charCodeAt(0); + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + if (!/^\d+$/.test(attributeValue)) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + const deltaSeconds = Number(attributeValue); + cookieAttributeList.maxAge = deltaSeconds; + } else if (attributeNameLowercase === "domain") { + let cookieDomain = attributeValue; + if (cookieDomain[0] === ".") { + cookieDomain = cookieDomain.slice(1); + } + cookieDomain = cookieDomain.toLowerCase(); + cookieAttributeList.domain = cookieDomain; + } else if (attributeNameLowercase === "path") { + let cookiePath = ""; + if (attributeValue.length === 0 || attributeValue[0] !== "/") { + cookiePath = "/"; + } else { + cookiePath = attributeValue; + } + cookieAttributeList.path = cookiePath; + } else if (attributeNameLowercase === "secure") { + cookieAttributeList.secure = true; + } else if (attributeNameLowercase === "httponly") { + cookieAttributeList.httpOnly = true; + } else if (attributeNameLowercase === "samesite") { + let enforcement = "Default"; + const attributeValueLowercase = attributeValue.toLowerCase(); + if (attributeValueLowercase.includes("none")) { + enforcement = "None"; + } + if (attributeValueLowercase.includes("strict")) { + enforcement = "Strict"; + } + if (attributeValueLowercase.includes("lax")) { + enforcement = "Lax"; + } + cookieAttributeList.sameSite = enforcement; + } else { + cookieAttributeList.unparsed ??= []; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); + } + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + module2.exports = { + parseSetCookie, + parseUnparsedAttributes + }; + } +}); + +// node_modules/undici/lib/web/cookies/index.js +var require_cookies = __commonJS({ + "node_modules/undici/lib/web/cookies/index.js"(exports2, module2) { + "use strict"; + var { parseSetCookie } = require_parse6(); + var { stringify } = require_util7(); + var { webidl } = require_webidl(); + var { Headers: Headers2 } = require_headers(); + var brandChecks = webidl.brandCheckMultiple([Headers2, globalThis.Headers].filter(Boolean)); + function getCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getCookies"); + brandChecks(headers); + const cookie = headers.get("cookie"); + const out = {}; + if (!cookie) { + return out; + } + for (const piece of cookie.split(";")) { + const [name, ...value] = piece.split("="); + out[name.trim()] = value.join("="); + } + return out; + } + function deleteCookie(headers, name, attributes) { + brandChecks(headers); + const prefix = "deleteCookie"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.DOMString(name, prefix, "name"); + attributes = webidl.converters.DeleteCookieAttributes(attributes); + setCookie(headers, { + name, + value: "", + expires: /* @__PURE__ */ new Date(0), + ...attributes + }); + } + function getSetCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); + brandChecks(headers); + const cookies = headers.getSetCookie(); + if (!cookies) { + return []; + } + return cookies.map((pair) => parseSetCookie(pair)); + } + function parseCookie(cookie) { + cookie = webidl.converters.DOMString(cookie); + return parseSetCookie(cookie); + } + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, "setCookie"); + brandChecks(headers); + cookie = webidl.converters.Cookie(cookie); + const str = stringify(cookie); + if (str) { + headers.append("set-cookie", str, true); + } + } + webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + } + ]); + webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: "name" + }, + { + converter: webidl.converters.DOMString, + key: "value" + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === "number") { + return webidl.converters["unsigned long long"](value); + } + return new Date(value); + }), + key: "expires", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters["long long"]), + key: "maxAge", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "secure", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "httpOnly", + defaultValue: () => null + }, + { + converter: webidl.converters.USVString, + key: "sameSite", + allowedValues: ["Strict", "Lax", "None"] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: "unparsed", + defaultValue: () => new Array(0) + } + ]); + module2.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie, + parseCookie + }; + } +}); + +// node_modules/undici/lib/web/websocket/events.js +var require_events = __commonJS({ + "node_modules/undici/lib/web/websocket/events.js"(exports2, module2) { + "use strict"; + var { webidl } = require_webidl(); + var { kEnumerableProperty } = require_util4(); + var { kConstruct } = require_symbols4(); + var MessageEvent = class _MessageEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { + super(arguments[1], arguments[2]); + webidl.util.markAsUncloneable(this); + return; + } + const prefix = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get data() { + webidl.brandCheck(this, _MessageEvent); + return this.#eventInit.data; + } + get origin() { + webidl.brandCheck(this, _MessageEvent); + return this.#eventInit.origin; + } + get lastEventId() { + webidl.brandCheck(this, _MessageEvent); + return this.#eventInit.lastEventId; + } + get source() { + webidl.brandCheck(this, _MessageEvent); + return this.#eventInit.source; + } + get ports() { + webidl.brandCheck(this, _MessageEvent); + if (!Object.isFrozen(this.#eventInit.ports)) { + Object.freeze(this.#eventInit.ports); + } + return this.#eventInit.ports; + } + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + webidl.brandCheck(this, _MessageEvent); + webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); + return new _MessageEvent(type, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports + }); + } + static createFastMessageEvent(type, init) { + const messageEvent = new _MessageEvent(kConstruct, type, init); + messageEvent.#eventInit = init; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ""; + messageEvent.#eventInit.lastEventId ??= ""; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; + } + }; + var { createFastMessageEvent } = MessageEvent; + delete MessageEvent.createFastMessageEvent; + var CloseEvent = class _CloseEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + const prefix = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get wasClean() { + webidl.brandCheck(this, _CloseEvent); + return this.#eventInit.wasClean; + } + get code() { + webidl.brandCheck(this, _CloseEvent); + return this.#eventInit.code; + } + get reason() { + webidl.brandCheck(this, _CloseEvent); + return this.#eventInit.reason; + } + }; + var ErrorEvent = class _ErrorEvent extends Event { + #eventInit; + constructor(type, eventInitDict) { + const prefix = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + super(type, eventInitDict); + webidl.util.markAsUncloneable(this); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; + } + get message() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.message; + } + get filename() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.filename; + } + get lineno() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.lineno; + } + get colno() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.colno; + } + get error() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.error; + } + }; + Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: "MessageEvent", + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty + }); + Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: "CloseEvent", + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty + }); + Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: "ErrorEvent", + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty + }); + webidl.converters.MessagePort = webidl.interfaceConverter( + webidl.is.MessagePort, + "MessagePort" + ); + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.MessagePort + ); + var eventInit = [ + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "data", + converter: webidl.converters.any, + defaultValue: () => null + }, + { + key: "origin", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lastEventId", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "source", + // Node doesn't implement WindowProxy or ServiceWorker, so the only + // valid value for source is a MessagePort. + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: () => null + }, + { + key: "ports", + converter: webidl.converters["sequence"], + defaultValue: () => new Array(0) + } + ]); + webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "wasClean", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "code", + converter: webidl.converters["unsigned short"], + defaultValue: () => 0 + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: () => "" + } + ]); + webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "message", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "filename", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lineno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "colno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "error", + converter: webidl.converters.any + } + ]); + module2.exports = { + MessageEvent, + CloseEvent, + ErrorEvent, + createFastMessageEvent + }; + } +}); + +// node_modules/undici/lib/web/websocket/constants.js +var require_constants7 = __commonJS({ + "node_modules/undici/lib/web/websocket/constants.js"(exports2, module2) { + "use strict"; + var uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + var staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + var states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }; + var sentCloseFrameState = { + SENT: 1, + RECEIVED: 2 + }; + var opcodes = { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }; + var maxUnsigned16Bit = 65535; + var parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }; + var emptyBuffer = Buffer.allocUnsafe(0); + var sendHints = { + text: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 + }; + module2.exports = { + uid, + sentCloseFrameState, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer, + sendHints + }; + } +}); + +// node_modules/undici/lib/web/websocket/util.js +var require_util8 = __commonJS({ + "node_modules/undici/lib/web/websocket/util.js"(exports2, module2) { + "use strict"; + var { states, opcodes } = require_constants7(); + var { isUtf8 } = require("node:buffer"); + var { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url(); + function isConnecting(readyState) { + return readyState === states.CONNECTING; + } + function isEstablished(readyState) { + return readyState === states.OPEN; + } + function isClosing(readyState) { + return readyState === states.CLOSING; + } + function isClosed(readyState) { + return readyState === states.CLOSED; + } + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { + const event = eventFactory(e, eventInitDict); + target.dispatchEvent(event); + } + function websocketMessageReceived(handler, type, data) { + handler.onMessage(type, data); + } + function toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) { + return buffer.buffer; + } + return new Uint8Array(buffer).buffer; + } + function isValidSubprotocol(protocol) { + if (protocol.length === 0) { + return false; + } + for (let i = 0; i < protocol.length; ++i) { + const code = protocol.charCodeAt(i); + if (code < 33 || // CTL, contains SP (0x20) and HT (0x09) + code > 126 || code === 34 || // " + code === 40 || // ( + code === 41 || // ) + code === 44 || // , + code === 47 || // / + code === 58 || // : + code === 59 || // ; + code === 60 || // < + code === 61 || // = + code === 62 || // > + code === 63 || // ? + code === 64 || // @ + code === 91 || // [ + code === 92 || // \ + code === 93 || // ] + code === 123 || // { + code === 125) { + return false; + } + } + return true; + } + function isValidStatusCode(code) { + if (code >= 1e3 && code < 1015) { + return code !== 1004 && // reserved + code !== 1005 && // "MUST NOT be set as a status code" + code !== 1006; + } + return code >= 3e3 && code <= 4999; + } + function isControlFrame(opcode) { + return opcode === opcodes.CLOSE || opcode === opcodes.PING || opcode === opcodes.PONG; + } + function isContinuationFrame(opcode) { + return opcode === opcodes.CONTINUATION; + } + function isTextBinaryFrame(opcode) { + return opcode === opcodes.TEXT || opcode === opcodes.BINARY; + } + function isValidOpcode(opcode) { + return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode); + } + function parseExtensions(extensions) { + const position = { position: 0 }; + const extensionList = /* @__PURE__ */ new Map(); + while (position.position < extensions.length) { + const pair = collectASequenceOfCodePointsFast(";", extensions, position); + const [name, value = ""] = pair.split("=", 2); + extensionList.set( + removeHTTPWhitespace(name, true, false), + removeHTTPWhitespace(value, false, true) + ); + position.position++; + } + return extensionList; + } + function isValidClientWindowBits(value) { + for (let i = 0; i < value.length; i++) { + const byte = value.charCodeAt(i); + if (byte < 48 || byte > 57) { + return false; + } + } + return true; + } + function getURLRecord(url, baseURL) { + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + if (urlRecord.protocol === "http:") { + urlRecord.protocol = "ws:"; + } else if (urlRecord.protocol === "https:") { + urlRecord.protocol = "wss:"; + } + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") { + throw new DOMException("expected a ws: or wss: url", "SyntaxError"); + } + if (urlRecord.hash.length || urlRecord.href.endsWith("#")) { + throw new DOMException("hash", "SyntaxError"); + } + return urlRecord; + } + function validateCloseCodeAndReason(code, reason) { + if (code !== null) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) { + throw new DOMException("invalid code", "InvalidAccessError"); + } + } + if (reason !== null) { + const reasonBytesLength = Buffer.byteLength(reason); + if (reasonBytesLength > 123) { + throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, "SyntaxError"); + } + } + } + var utf8Decode = (() => { + if (typeof process.versions.icu === "string") { + const fatalDecoder = new TextDecoder("utf-8", { fatal: true }); + return fatalDecoder.decode.bind(fatalDecoder); + } + return function(buffer) { + if (isUtf8(buffer)) { + return buffer.toString("utf-8"); + } + throw new TypeError("Invalid utf-8 received."); + }; + })(); + module2.exports = { + isConnecting, + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isContinuationFrame, + isTextBinaryFrame, + isValidOpcode, + parseExtensions, + isValidClientWindowBits, + toArrayBuffer, + getURLRecord, + validateCloseCodeAndReason + }; + } +}); + +// node_modules/undici/lib/web/websocket/frame.js +var require_frame = __commonJS({ + "node_modules/undici/lib/web/websocket/frame.js"(exports2, module2) { + "use strict"; + var { maxUnsigned16Bit, opcodes } = require_constants7(); + var BUFFER_SIZE = 8 * 1024; + var crypto2; + var buffer = null; + var bufIdx = BUFFER_SIZE; + try { + crypto2 = require("node:crypto"); + } catch { + crypto2 = { + // not full compatibility, but minimum. + randomFillSync: function randomFillSync(buffer2, _offset, _size) { + for (let i = 0; i < buffer2.length; ++i) { + buffer2[i] = Math.random() * 255 | 0; + } + return buffer2; + } + }; + } + function generateMask() { + if (bufIdx === BUFFER_SIZE) { + bufIdx = 0; + crypto2.randomFillSync(buffer ??= Buffer.allocUnsafeSlow(BUFFER_SIZE), 0, BUFFER_SIZE); + } + return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]]; + } + var WebsocketFrameSend = class { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + } + createFrame(opcode) { + const frameData = this.frameData; + const maskKey = generateMask(); + const bodyLength = frameData?.byteLength ?? 0; + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const buffer2 = Buffer.allocUnsafe(bodyLength + offset); + buffer2[0] = buffer2[1] = 0; + buffer2[0] |= 128; + buffer2[0] = (buffer2[0] & 240) + opcode; + buffer2[offset - 4] = maskKey[0]; + buffer2[offset - 3] = maskKey[1]; + buffer2[offset - 2] = maskKey[2]; + buffer2[offset - 1] = maskKey[3]; + buffer2[1] = payloadLength; + if (payloadLength === 126) { + buffer2.writeUInt16BE(bodyLength, 2); + } else if (payloadLength === 127) { + buffer2[2] = buffer2[3] = 0; + buffer2.writeUIntBE(bodyLength, 4, 6); + } + buffer2[1] |= 128; + for (let i = 0; i < bodyLength; ++i) { + buffer2[offset + i] = frameData[i] ^ maskKey[i & 3]; + } + return buffer2; + } + /** + * @param {Uint8Array} buffer + */ + static createFastTextFrame(buffer2) { + const maskKey = generateMask(); + const bodyLength = buffer2.length; + for (let i = 0; i < bodyLength; ++i) { + buffer2[i] ^= maskKey[i & 3]; + } + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const head = Buffer.allocUnsafeSlow(offset); + head[0] = 128 | opcodes.TEXT; + head[1] = payloadLength | 128; + head[offset - 4] = maskKey[0]; + head[offset - 3] = maskKey[1]; + head[offset - 2] = maskKey[2]; + head[offset - 1] = maskKey[3]; + if (payloadLength === 126) { + head.writeUInt16BE(bodyLength, 2); + } else if (payloadLength === 127) { + head[2] = head[3] = 0; + head.writeUIntBE(bodyLength, 4, 6); + } + return [head, buffer2]; + } + }; + module2.exports = { + WebsocketFrameSend, + generateMask + // for benchmark + }; + } +}); + +// node_modules/undici/lib/web/websocket/connection.js +var require_connection = __commonJS({ + "node_modules/undici/lib/web/websocket/connection.js"(exports2, module2) { + "use strict"; + var { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants7(); + var { parseExtensions, isClosed, isClosing, isEstablished, validateCloseCodeAndReason } = require_util8(); + var { makeRequest } = require_request4(); + var { fetching } = require_fetch(); + var { Headers: Headers2, getHeadersList } = require_headers(); + var { getDecodeSplit } = require_util5(); + var { WebsocketFrameSend } = require_frame(); + var assert = require("node:assert"); + var crypto2; + try { + crypto2 = require("node:crypto"); + } catch { + } + function establishWebSocketConnection(url, protocols, client, handler, options) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request = makeRequest({ + urlList: [requestURL], + client, + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error" + }); + if (options.headers) { + const headersList = getHeadersList(new Headers2(options.headers)); + request.headersList = headersList; + } + const keyValue = crypto2.randomBytes(16).toString("base64"); + request.headersList.append("sec-websocket-key", keyValue, true); + request.headersList.append("sec-websocket-version", "13", true); + for (const protocol of protocols) { + request.headersList.append("sec-websocket-protocol", protocol, true); + } + const permessageDeflate = "permessage-deflate; client_max_window_bits"; + request.headersList.append("sec-websocket-extensions", permessageDeflate, true); + const controller = fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher, + processResponse(response) { + if (response.type === "error") { + handler.readyState = states.CLOSED; + } + if (response.type === "error" || response.status !== 101) { + failWebsocketConnection(handler, 1002, "Received network error or non-101 status code.", response.error); + return; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(handler, 1002, "Server did not respond with sent protocols."); + return; + } + if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { + failWebsocketConnection(handler, 1002, 'Server did not set Upgrade header to "websocket".'); + return; + } + if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { + failWebsocketConnection(handler, 1002, 'Server did not set Connection header to "upgrade".'); + return; + } + const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); + if (secWSAccept !== digest) { + failWebsocketConnection(handler, 1002, "Incorrect hash received in Sec-WebSocket-Accept header."); + return; + } + const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); + let extensions; + if (secExtension !== null) { + extensions = parseExtensions(secExtension); + if (!extensions.has("permessage-deflate")) { + failWebsocketConnection(handler, 1002, "Sec-WebSocket-Extensions header does not match."); + return; + } + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null) { + const requestProtocols = getDecodeSplit("sec-websocket-protocol", request.headersList); + if (!requestProtocols.includes(secProtocol)) { + failWebsocketConnection(handler, 1002, "Protocol was not set in the opening handshake."); + return; + } + } + response.socket.on("data", handler.onSocketData); + response.socket.on("close", handler.onSocketClose); + response.socket.on("error", handler.onSocketError); + handler.wasEverConnected = true; + handler.onConnectionEstablished(response, extensions); + } + }); + return controller; + } + function closeWebSocketConnection(object, code, reason, validate = false) { + code ??= null; + reason ??= ""; + if (validate) validateCloseCodeAndReason(code, reason); + if (isClosed(object.readyState) || isClosing(object.readyState)) { + } else if (!isEstablished(object.readyState)) { + failWebsocketConnection(object); + object.readyState = states.CLOSING; + } else if (!object.closeState.has(sentCloseFrameState.SENT) && !object.closeState.has(sentCloseFrameState.RECEIVED)) { + const frame = new WebsocketFrameSend(); + if (reason.length !== 0 && code === null) { + code = 1e3; + } + assert(code === null || Number.isInteger(code)); + if (code === null && reason.length === 0) { + frame.frameData = emptyBuffer; + } else if (code !== null && reason === null) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== null && reason !== null) { + frame.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(reason)); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else { + frame.frameData = emptyBuffer; + } + object.socket.write(frame.createFrame(opcodes.CLOSE)); + object.closeState.add(sentCloseFrameState.SENT); + object.readyState = states.CLOSING; + } else { + object.readyState = states.CLOSING; + } + } + function failWebsocketConnection(handler, code, reason, cause) { + if (isEstablished(handler.readyState)) { + closeWebSocketConnection(handler, code, reason, false); + } + handler.controller.abort(); + if (handler.socket?.destroyed === false) { + handler.socket.destroy(); + } + handler.onFail(code, reason, cause); + } + module2.exports = { + establishWebSocketConnection, + failWebsocketConnection, + closeWebSocketConnection + }; + } +}); + +// node_modules/undici/lib/web/websocket/permessage-deflate.js +var require_permessage_deflate = __commonJS({ + "node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports2, module2) { + "use strict"; + var { createInflateRaw, Z_DEFAULT_WINDOWBITS } = require("node:zlib"); + var { isValidClientWindowBits } = require_util8(); + var tail = Buffer.from([0, 0, 255, 255]); + var kBuffer = Symbol("kBuffer"); + var kLength = Symbol("kLength"); + var PerMessageDeflate = class { + /** @type {import('node:zlib').InflateRaw} */ + #inflate; + #options = {}; + constructor(extensions) { + this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); + this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); + } + decompress(chunk, fin, callback) { + if (!this.#inflate) { + let windowBits = Z_DEFAULT_WINDOWBITS; + if (this.#options.serverMaxWindowBits) { + if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { + callback(new Error("Invalid server_max_window_bits")); + return; + } + windowBits = Number.parseInt(this.#options.serverMaxWindowBits); + } + this.#inflate = createInflateRaw({ windowBits }); + this.#inflate[kBuffer] = []; + this.#inflate[kLength] = 0; + this.#inflate.on("data", (data) => { + this.#inflate[kBuffer].push(data); + this.#inflate[kLength] += data.length; + }); + this.#inflate.on("error", (err) => { + this.#inflate = null; + callback(err); + }); + } + this.#inflate.write(chunk); + if (fin) { + this.#inflate.write(tail); + } + this.#inflate.flush(() => { + const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); + this.#inflate[kBuffer].length = 0; + this.#inflate[kLength] = 0; + callback(null, full); + }); + } + }; + module2.exports = { PerMessageDeflate }; + } +}); + +// node_modules/undici/lib/web/websocket/receiver.js +var require_receiver = __commonJS({ + "node_modules/undici/lib/web/websocket/receiver.js"(exports2, module2) { + "use strict"; + var { Writable: Writable2 } = require("node:stream"); + var assert = require("node:assert"); + var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants7(); + var { + isValidStatusCode, + isValidOpcode, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isTextBinaryFrame, + isContinuationFrame + } = require_util8(); + var { failWebsocketConnection } = require_connection(); + var { WebsocketFrameSend } = require_frame(); + var { PerMessageDeflate } = require_permessage_deflate(); + var ByteParser = class extends Writable2 { + #buffers = []; + #fragmentsBytes = 0; + #byteOffset = 0; + #loop = false; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + /** @type {Map} */ + #extensions; + /** @type {import('./websocket').Handler} */ + #handler; + constructor(handler, extensions) { + super(); + this.#handler = handler; + this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + if (this.#extensions.has("permessage-deflate")) { + this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions)); + } + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + this.run(callback); + } + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run(callback) { + while (this.#loop) { + if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) { + return callback(); + } + const buffer = this.consume(2); + const fin = (buffer[0] & 128) !== 0; + const opcode = buffer[0] & 15; + const masked = (buffer[1] & 128) === 128; + const fragmented = !fin && opcode !== opcodes.CONTINUATION; + const payloadLength = buffer[1] & 127; + const rsv1 = buffer[0] & 64; + const rsv2 = buffer[0] & 32; + const rsv3 = buffer[0] & 16; + if (!isValidOpcode(opcode)) { + failWebsocketConnection(this.#handler, 1002, "Invalid opcode received"); + return callback(); + } + if (masked) { + failWebsocketConnection(this.#handler, 1002, "Frame cannot be masked"); + return callback(); + } + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.#handler, 1002, "Expected RSV1 to be clear."); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection(this.#handler, 1002, "RSV1, RSV2, RSV3 must be clear"); + return; + } + if (fragmented && !isTextBinaryFrame(opcode)) { + failWebsocketConnection(this.#handler, 1002, "Invalid frame type was fragmented."); + return; + } + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.#handler, 1002, "Expected continuation frame"); + return; + } + if (this.#info.fragmented && fragmented) { + failWebsocketConnection(this.#handler, 1002, "Fragmented frame exceeded 125 bytes."); + return; + } + if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { + failWebsocketConnection(this.#handler, 1002, "Control frame either too large or fragmented"); + return; + } + if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + failWebsocketConnection(this.#handler, 1002, "Unexpected continuation frame"); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + } else if (payloadLength === 126) { + this.#state = parserStates.PAYLOADLENGTH_16; + } else if (payloadLength === 127) { + this.#state = parserStates.PAYLOADLENGTH_64; + } + if (isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) { + return callback(); + } + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) { + return callback(); + } + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + if (upper > 2 ** 31 - 1) { + failWebsocketConnection(this.#handler, 1009, "Received payload length > 2^31 bytes."); + return; + } + const lower = buffer.readUInt32BE(4); + this.#info.payloadLength = (upper << 8) + lower; + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) { + return callback(); + } + const body = this.consume(this.#info.payloadLength); + if (isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = parserStates.INFO; + } else { + if (!this.#info.compressed) { + this.writeFragments(body); + if (!this.#info.fragmented && this.#info.fin) { + websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); + } + this.#state = parserStates.INFO; + } else { + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { + if (error) { + failWebsocketConnection(this.#handler, 1007, error.message); + return; + } + this.writeFragments(data); + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); + this.#loop = true; + this.#state = parserStates.INFO; + this.run(callback); + }); + this.#loop = false; + break; + } + } + } + } + } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer} + */ + consume(n) { + if (n > this.#byteOffset) { + throw new Error("Called consume() before buffers satiated."); + } else if (n === 0) { + return emptyBuffer; + } + this.#byteOffset -= n; + const first = this.#buffers[0]; + if (first.length > n) { + this.#buffers[0] = first.subarray(n, first.length); + return first.subarray(0, n); + } else if (first.length === n) { + return this.#buffers.shift(); + } else { + let offset = 0; + const buffer = Buffer.allocUnsafeSlow(n); + while (offset !== n) { + const next = this.#buffers[0]; + const length = next.length; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset); + this.#buffers[0] = next.subarray(n - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += length; + } + } + return buffer; + } + } + writeFragments(fragment) { + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + } + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + let offset = 0; + const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes); + for (let i = 0; i < fragments.length; ++i) { + const buffer = fragments[i]; + output.set(buffer, offset); + offset += buffer.length; + } + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } + parseCloseBody(data) { + assert(data.length !== 1); + let code; + if (data.length >= 2) { + code = data.readUInt16BE(0); + } + if (code !== void 0 && !isValidStatusCode(code)) { + return { code: 1002, reason: "Invalid status code", error: true }; + } + let reason = data.subarray(2); + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) { + reason = reason.subarray(3); + } + try { + reason = utf8Decode(reason); + } catch { + return { code: 1007, reason: "Invalid UTF-8", error: true }; + } + return { code, reason, error: false }; + } + /** + * Parses control frames. + * @param {Buffer} body + */ + parseControlFrame(body) { + const { opcode, payloadLength } = this.#info; + if (opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.#handler, 1002, "Received close frame with a 1-byte body."); + return false; + } + this.#info.closeInfo = this.parseCloseBody(body); + if (this.#info.closeInfo.error) { + const { code, reason } = this.#info.closeInfo; + failWebsocketConnection(this.#handler, code, reason); + return false; + } + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + let body2 = emptyBuffer; + if (this.#info.closeInfo.code) { + body2 = Buffer.allocUnsafe(2); + body2.writeUInt16BE(this.#info.closeInfo.code, 0); + } + const closeFrame = new WebsocketFrameSend(body2); + this.#handler.socket.write(closeFrame.createFrame(opcodes.CLOSE)); + this.#handler.closeState.add(sentCloseFrameState.SENT); + } + this.#handler.readyState = states.CLOSING; + this.#handler.closeState.add(sentCloseFrameState.RECEIVED); + return false; + } else if (opcode === opcodes.PING) { + if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + const frame = new WebsocketFrameSend(body); + this.#handler.socket.write(frame.createFrame(opcodes.PONG)); + this.#handler.onPing(body); + } + } else if (opcode === opcodes.PONG) { + this.#handler.onPong(body); + } + return true; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module2.exports = { + ByteParser + }; + } +}); + +// node_modules/undici/lib/web/websocket/sender.js +var require_sender = __commonJS({ + "node_modules/undici/lib/web/websocket/sender.js"(exports2, module2) { + "use strict"; + var { WebsocketFrameSend } = require_frame(); + var { opcodes, sendHints } = require_constants7(); + var FixedQueue = require_fixed_queue(); + var SendQueue = class { + /** + * @type {FixedQueue} + */ + #queue = new FixedQueue(); + /** + * @type {boolean} + */ + #running = false; + /** @type {import('node:net').Socket} */ + #socket; + constructor(socket) { + this.#socket = socket; + } + add(item, cb, hint) { + if (hint !== sendHints.blob) { + if (!this.#running) { + if (hint === sendHints.text) { + const { 0: head, 1: body } = WebsocketFrameSend.createFastTextFrame(item); + this.#socket.cork(); + this.#socket.write(head); + this.#socket.write(body, cb); + this.#socket.uncork(); + } else { + this.#socket.write(createFrame(item, hint), cb); + } + } else { + const node2 = { + promise: null, + callback: cb, + frame: createFrame(item, hint) + }; + this.#queue.push(node2); + } + return; + } + const node = { + promise: item.arrayBuffer().then((ab) => { + node.promise = null; + node.frame = createFrame(ab, hint); + }), + callback: cb, + frame: null + }; + this.#queue.push(node); + if (!this.#running) { + this.#run(); + } + } + async #run() { + this.#running = true; + const queue = this.#queue; + while (!queue.isEmpty()) { + const node = queue.shift(); + if (node.promise !== null) { + await node.promise; + } + this.#socket.write(node.frame, node.callback); + node.callback = node.frame = null; + } + this.#running = false; + } + }; + function createFrame(data, hint) { + return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.text ? opcodes.TEXT : opcodes.BINARY); + } + function toBuffer(data, hint) { + switch (hint) { + case sendHints.text: + case sendHints.typedArray: + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength); + case sendHints.arrayBuffer: + case sendHints.blob: + return new Uint8Array(data); + } + } + module2.exports = { SendQueue }; + } +}); + +// node_modules/undici/lib/web/websocket/websocket.js +var require_websocket = __commonJS({ + "node_modules/undici/lib/web/websocket/websocket.js"(exports2, module2) { + "use strict"; + var { isArrayBuffer } = require("node:util/types"); + var { webidl } = require_webidl(); + var { URLSerializer } = require_data_url(); + var { environmentSettingsObject } = require_util5(); + var { staticPropertyDescriptors, states, sentCloseFrameState, sendHints, opcodes } = require_constants7(); + var { + isConnecting, + isEstablished, + isClosing, + isClosed, + isValidSubprotocol, + fireEvent, + utf8Decode, + toArrayBuffer, + getURLRecord + } = require_util8(); + var { establishWebSocketConnection, closeWebSocketConnection, failWebsocketConnection } = require_connection(); + var { ByteParser } = require_receiver(); + var { kEnumerableProperty } = require_util4(); + var { getGlobalDispatcher } = require_global2(); + var { ErrorEvent, CloseEvent, createFastMessageEvent } = require_events(); + var { SendQueue } = require_sender(); + var { WebsocketFrameSend } = require_frame(); + var { channels } = require_diagnostics(); + var WebSocket = class _WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + /** @type {SendQueue} */ + #sendQueue; + /** @type {Handler} */ + #handler = { + onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), + onFail: (code, reason, cause) => this.#onFail(code, reason, cause), + onMessage: (opcode, data) => this.#onMessage(opcode, data), + onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), + onParserDrain: () => this.#onParserDrain(), + onSocketData: (chunk) => { + if (!this.#parser.write(chunk)) { + this.#handler.socket.pause(); + } + }, + onSocketError: (err) => { + this.#handler.readyState = states.CLOSING; + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(err); + } + this.#handler.socket.destroy(); + }, + onSocketClose: () => this.#onSocketClose(), + onPing: (body) => { + if (channels.ping.hasSubscribers) { + channels.ping.publish({ + payload: body, + websocket: this + }); + } + }, + onPong: (body) => { + if (channels.pong.hasSubscribers) { + channels.pong.publish({ + payload: body, + websocket: this + }); + } + }, + readyState: states.CONNECTING, + socket: null, + closeState: /* @__PURE__ */ new Set(), + controller: null, + wasEverConnected: false + }; + #url; + #binaryType; + /** @type {import('./receiver').ByteParser} */ + #parser; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url, protocols = []) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); + url = webidl.converters.USVString(url); + protocols = options.protocols; + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + const urlRecord = getURLRecord(url, baseURL); + if (typeof protocols === "string") { + protocols = [protocols]; + } + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) { + throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) { + throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + this.#url = new URL(urlRecord.href); + const client = environmentSettingsObject.settingsObject; + this.#handler.controller = establishWebSocketConnection( + urlRecord, + protocols, + client, + this.#handler, + options + ); + this.#handler.readyState = _WebSocket.CONNECTING; + this.#binaryType = "blob"; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close(code = void 0, reason = void 0) { + webidl.brandCheck(this, _WebSocket); + const prefix = "WebSocket.close"; + if (code !== void 0) { + code = webidl.converters["unsigned short"](code, prefix, "code", { clamp: true }); + } + if (reason !== void 0) { + reason = webidl.converters.USVString(reason); + } + code ??= null; + reason ??= ""; + closeWebSocketConnection(this.#handler, code, reason, true); + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, _WebSocket); + const prefix = "WebSocket.send"; + webidl.argumentLengthCheck(arguments, 1, prefix); + data = webidl.converters.WebSocketSendData(data, prefix, "data"); + if (isConnecting(this.#handler.readyState)) { + throw new DOMException("Sent before connected.", "InvalidStateError"); + } + if (!isEstablished(this.#handler.readyState) || isClosing(this.#handler.readyState)) { + return; + } + if (typeof data === "string") { + const buffer = Buffer.from(data); + this.#bufferedAmount += buffer.byteLength; + this.#sendQueue.add(buffer, () => { + this.#bufferedAmount -= buffer.byteLength; + }, sendHints.text); + } else if (isArrayBuffer(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.arrayBuffer); + } else if (ArrayBuffer.isView(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.typedArray); + } else if (webidl.is.Blob(data)) { + this.#bufferedAmount += data.size; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.size; + }, sendHints.blob); + } + } + get readyState() { + webidl.brandCheck(this, _WebSocket); + return this.#handler.readyState; + } + get bufferedAmount() { + webidl.brandCheck(this, _WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, _WebSocket); + return URLSerializer(this.#url); + } + get extensions() { + webidl.brandCheck(this, _WebSocket); + return this.#extensions; + } + get protocol() { + webidl.brandCheck(this, _WebSocket); + return this.#protocol; + } + get onopen() { + webidl.brandCheck(this, _WebSocket); + return this.#events.open; + } + set onopen(fn) { + webidl.brandCheck(this, _WebSocket); + if (this.#events.open) { + this.removeEventListener("open", this.#events.open); + } + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else { + this.#events.open = null; + } + } + get onerror() { + webidl.brandCheck(this, _WebSocket); + return this.#events.error; + } + set onerror(fn) { + webidl.brandCheck(this, _WebSocket); + if (this.#events.error) { + this.removeEventListener("error", this.#events.error); + } + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else { + this.#events.error = null; + } + } + get onclose() { + webidl.brandCheck(this, _WebSocket); + return this.#events.close; + } + set onclose(fn) { + webidl.brandCheck(this, _WebSocket); + if (this.#events.close) { + this.removeEventListener("close", this.#events.close); + } + if (typeof fn === "function") { + this.#events.close = fn; + this.addEventListener("close", fn); + } else { + this.#events.close = null; + } + } + get onmessage() { + webidl.brandCheck(this, _WebSocket); + return this.#events.message; + } + set onmessage(fn) { + webidl.brandCheck(this, _WebSocket); + if (this.#events.message) { + this.removeEventListener("message", this.#events.message); + } + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else { + this.#events.message = null; + } + } + get binaryType() { + webidl.brandCheck(this, _WebSocket); + return this.#binaryType; + } + set binaryType(type) { + webidl.brandCheck(this, _WebSocket); + if (type !== "blob" && type !== "arraybuffer") { + this.#binaryType = "blob"; + } else { + this.#binaryType = type; + } + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response, parsedExtensions) { + this.#handler.socket = response.socket; + const parser = new ByteParser(this.#handler, parsedExtensions); + parser.on("drain", () => this.#handler.onParserDrain()); + parser.on("error", (err) => this.#handler.onParserError(err)); + this.#parser = parser; + this.#sendQueue = new SendQueue(response.socket); + this.#handler.readyState = states.OPEN; + const extensions = response.headersList.get("sec-websocket-extensions"); + if (extensions !== null) { + this.#extensions = extensions; + } + const protocol = response.headersList.get("sec-websocket-protocol"); + if (protocol !== null) { + this.#protocol = protocol; + } + fireEvent("open", this); + if (channels.open.hasSubscribers) { + const headers = response.headersList.entries; + channels.open.publish({ + address: response.socket.address(), + protocol: this.#protocol, + extensions: this.#extensions, + websocket: this, + handshakeResponse: { + status: response.status, + statusText: response.statusText, + headers + } + }); + } + } + #onFail(code, reason, cause) { + if (reason) { + fireEvent("error", this, (type, init) => new ErrorEvent(type, init), { + error: new Error(reason, cause ? { cause } : void 0), + message: reason + }); + } + if (!this.#handler.wasEverConnected) { + this.#handler.readyState = states.CLOSED; + fireEvent("close", this, (type, init) => new CloseEvent(type, init), { + wasClean: false, + code, + reason + }); + } + } + #onMessage(type, data) { + if (this.#handler.readyState !== states.OPEN) { + return; + } + let dataForEvent; + if (type === opcodes.TEXT) { + try { + dataForEvent = utf8Decode(data); + } catch { + failWebsocketConnection(this.#handler, 1007, "Received invalid UTF-8 in text frame."); + return; + } + } else if (type === opcodes.BINARY) { + if (this.#binaryType === "blob") { + dataForEvent = new Blob([data]); + } else { + dataForEvent = toArrayBuffer(data); + } + } + fireEvent("message", this, createFastMessageEvent, { + origin: this.#url.origin, + data: dataForEvent + }); + } + #onParserDrain() { + this.#handler.socket.resume(); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + #onSocketClose() { + const wasClean = this.#handler.closeState.has(sentCloseFrameState.SENT) && this.#handler.closeState.has(sentCloseFrameState.RECEIVED); + let code = 1005; + let reason = ""; + const result = this.#parser.closingInfo; + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + code = 1006; + } + this.#handler.readyState = states.CLOSED; + fireEvent("close", this, (type, init) => new CloseEvent(type, init), { + wasClean, + code, + reason + }); + if (channels.close.hasSubscribers) { + channels.close.publish({ + websocket: this, + code, + reason + }); + } + } + /** + * @param {WebSocket} ws + * @param {Buffer|undefined} buffer + */ + static ping(ws, buffer) { + if (Buffer.isBuffer(buffer)) { + if (buffer.length > 125) { + throw new TypeError("A PING frame cannot have a body larger than 125 bytes."); + } + } else if (buffer !== void 0) { + throw new TypeError("Expected buffer payload"); + } + const readyState = ws.#handler.readyState; + if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) { + const frame = new WebsocketFrameSend(buffer); + ws.#handler.socket.write(frame.createFrame(opcodes.PING)); + } + } + }; + var { ping } = WebSocket; + Reflect.deleteProperty(WebSocket, "ping"); + WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; + WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; + WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; + WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocket", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors + }); + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.DOMString + ); + webidl.converters["DOMString or sequence"] = function(V, prefix, argument) { + if (webidl.util.Type(V) === webidl.util.Types.OBJECT && Symbol.iterator in V) { + return webidl.converters["sequence"](V); + } + return webidl.converters.DOMString(V, prefix, argument); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + defaultValue: () => new Array(0) + }, + { + key: "dispatcher", + converter: webidl.converters.any, + defaultValue: () => getGlobalDispatcher() + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { + if (webidl.util.Type(V) === webidl.util.Types.OBJECT && !(Symbol.iterator in V)) { + return webidl.converters.WebSocketInit(V); + } + return { protocols: webidl.converters["DOMString or sequence"](V) }; + }; + webidl.converters.WebSocketSendData = function(V) { + if (webidl.util.Type(V) === webidl.util.Types.OBJECT) { + if (webidl.is.Blob(V)) { + return V; + } + if (ArrayBuffer.isView(V) || isArrayBuffer(V)) { + return V; + } + } + return webidl.converters.USVString(V); + }; + module2.exports = { + WebSocket, + ping + }; + } +}); + +// node_modules/undici/lib/web/websocket/stream/websocketerror.js +var require_websocketerror = __commonJS({ + "node_modules/undici/lib/web/websocket/stream/websocketerror.js"(exports2, module2) { + "use strict"; + var { webidl } = require_webidl(); + var { validateCloseCodeAndReason } = require_util8(); + var { kConstruct } = require_symbols4(); + var { kEnumerableProperty } = require_util4(); + var WebSocketError = class _WebSocketError extends DOMException { + #closeCode; + #reason; + constructor(message = "", init = void 0) { + message = webidl.converters.DOMString(message, "WebSocketError", "message"); + super(message, "WebSocketError"); + if (init === kConstruct) { + return; + } else if (init !== null) { + init = webidl.converters.WebSocketCloseInfo(init); + } + let code = init.closeCode ?? null; + const reason = init.reason ?? ""; + validateCloseCodeAndReason(code, reason); + if (reason.length !== 0 && code === null) { + code = 1e3; + } + this.#closeCode = code; + this.#reason = reason; + } + get closeCode() { + return this.#closeCode; + } + get reason() { + return this.#reason; + } + /** + * @param {string} message + * @param {number|null} code + * @param {string} reason + */ + static createUnvalidatedWebSocketError(message, code, reason) { + const error = new _WebSocketError(message, kConstruct); + error.#closeCode = code; + error.#reason = reason; + return error; + } + }; + var { createUnvalidatedWebSocketError } = WebSocketError; + delete WebSocketError.createUnvalidatedWebSocketError; + Object.defineProperties(WebSocketError.prototype, { + closeCode: kEnumerableProperty, + reason: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocketError", + writable: false, + enumerable: false, + configurable: true + } + }); + webidl.is.WebSocketError = webidl.util.MakeTypeAssertion(WebSocketError); + module2.exports = { WebSocketError, createUnvalidatedWebSocketError }; + } +}); + +// node_modules/undici/lib/web/websocket/stream/websocketstream.js +var require_websocketstream = __commonJS({ + "node_modules/undici/lib/web/websocket/stream/websocketstream.js"(exports2, module2) { + "use strict"; + var { createDeferredPromise } = require_promise2(); + var { environmentSettingsObject } = require_util5(); + var { states, opcodes, sentCloseFrameState } = require_constants7(); + var { webidl } = require_webidl(); + var { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = require_util8(); + var { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = require_connection(); + var { isArrayBuffer } = require("node:util/types"); + var { channels } = require_diagnostics(); + var { WebsocketFrameSend } = require_frame(); + var { ByteParser } = require_receiver(); + var { WebSocketError, createUnvalidatedWebSocketError } = require_websocketerror(); + var { utf8DecodeBytes } = require_util5(); + var { kEnumerableProperty } = require_util4(); + var emittedExperimentalWarning = false; + var WebSocketStream = class { + // Each WebSocketStream object has an associated url , which is a URL record . + /** @type {URL} */ + #url; + // Each WebSocketStream object has an associated opened promise , which is a promise. + /** @type {import('../../../util/promise').DeferredPromise} */ + #openedPromise; + // Each WebSocketStream object has an associated closed promise , which is a promise. + /** @type {import('../../../util/promise').DeferredPromise} */ + #closedPromise; + // Each WebSocketStream object has an associated readable stream , which is a ReadableStream . + /** @type {ReadableStream} */ + #readableStream; + /** @type {ReadableStreamDefaultController} */ + #readableStreamController; + // Each WebSocketStream object has an associated writable stream , which is a WritableStream . + /** @type {WritableStream} */ + #writableStream; + // Each WebSocketStream object has an associated boolean handshake aborted , which is initially false. + #handshakeAborted = false; + /** @type {import('../websocket').Handler} */ + #handler = { + // https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol + onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), + onFail: (_code, _reason) => { + }, + onMessage: (opcode, data) => this.#onMessage(opcode, data), + onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), + onParserDrain: () => this.#handler.socket.resume(), + onSocketData: (chunk) => { + if (!this.#parser.write(chunk)) { + this.#handler.socket.pause(); + } + }, + onSocketError: (err) => { + this.#handler.readyState = states.CLOSING; + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(err); + } + this.#handler.socket.destroy(); + }, + onSocketClose: () => this.#onSocketClose(), + onPing: () => { + }, + onPong: () => { + }, + readyState: states.CONNECTING, + socket: null, + closeState: /* @__PURE__ */ new Set(), + controller: null, + wasEverConnected: false + }; + /** @type {import('../receiver').ByteParser} */ + #parser; + constructor(url, options = void 0) { + if (!emittedExperimentalWarning) { + process.emitWarning("WebSocketStream is experimental! Expect it to change at any time.", { + code: "UNDICI-WSS" + }); + emittedExperimentalWarning = true; + } + webidl.argumentLengthCheck(arguments, 1, "WebSocket"); + url = webidl.converters.USVString(url); + if (options !== null) { + options = webidl.converters.WebSocketStreamOptions(options); + } + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + const urlRecord = getURLRecord(url, baseURL); + const protocols = options.protocols; + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) { + throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) { + throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + this.#url = urlRecord.toString(); + this.#openedPromise = createDeferredPromise(); + this.#closedPromise = createDeferredPromise(); + if (options.signal != null) { + const signal = options.signal; + if (signal.aborted) { + this.#openedPromise.reject(signal.reason); + this.#closedPromise.reject(signal.reason); + return; + } + signal.addEventListener("abort", () => { + if (!isEstablished(this.#handler.readyState)) { + failWebsocketConnection(this.#handler); + this.#handler.readyState = states.CLOSING; + this.#openedPromise.reject(signal.reason); + this.#closedPromise.reject(signal.reason); + this.#handshakeAborted = true; + } + }, { once: true }); + } + const client = environmentSettingsObject.settingsObject; + this.#handler.controller = establishWebSocketConnection( + urlRecord, + protocols, + client, + this.#handler, + options + ); + } + // The url getter steps are to return this 's url , serialized . + get url() { + return this.#url.toString(); + } + // The opened getter steps are to return this 's opened promise . + get opened() { + return this.#openedPromise.promise; + } + // The closed getter steps are to return this 's closed promise . + get closed() { + return this.#closedPromise.promise; + } + // The close( closeInfo ) method steps are: + close(closeInfo = void 0) { + if (closeInfo !== null) { + closeInfo = webidl.converters.WebSocketCloseInfo(closeInfo); + } + const code = closeInfo.closeCode ?? null; + const reason = closeInfo.reason; + closeWebSocketConnection(this.#handler, code, reason, true); + } + #write(chunk) { + const promise = createDeferredPromise(); + let data = null; + let opcode = null; + if (ArrayBuffer.isView(chunk) || isArrayBuffer(chunk)) { + data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk); + opcode = opcodes.BINARY; + } else { + let string; + try { + string = webidl.converters.DOMString(chunk); + } catch (e) { + promise.reject(e); + return; + } + data = new TextEncoder().encode(string); + opcode = opcodes.TEXT; + } + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + const frame = new WebsocketFrameSend(data); + this.#handler.socket.write(frame.createFrame(opcode), () => { + promise.resolve(void 0); + }); + } + return promise; + } + /** @type {import('../websocket').Handler['onConnectionEstablished']} */ + #onConnectionEstablished(response, parsedExtensions) { + this.#handler.socket = response.socket; + const parser = new ByteParser(this.#handler, parsedExtensions); + parser.on("drain", () => this.#handler.onParserDrain()); + parser.on("error", (err) => this.#handler.onParserError(err)); + this.#parser = parser; + this.#handler.readyState = states.OPEN; + const extensions = parsedExtensions ?? ""; + const protocol = response.headersList.get("sec-websocket-protocol") ?? ""; + const readable = new ReadableStream({ + start: (controller) => { + this.#readableStreamController = controller; + }, + pull(controller) { + let chunk; + while (controller.desiredSize > 0 && (chunk = response.socket.read()) !== null) { + controller.enqueue(chunk); + } + }, + cancel: (reason) => this.#cancel(reason) + }); + const writable = new WritableStream({ + write: (chunk) => this.#write(chunk), + close: () => closeWebSocketConnection(this.#handler, null, null), + abort: (reason) => this.#closeUsingReason(reason) + }); + this.#readableStream = readable; + this.#writableStream = writable; + this.#openedPromise.resolve({ + extensions, + protocol, + readable, + writable + }); + } + /** @type {import('../websocket').Handler['onMessage']} */ + #onMessage(type, data) { + if (this.#handler.readyState !== states.OPEN) { + return; + } + let chunk; + if (type === opcodes.TEXT) { + try { + chunk = utf8Decode(data); + } catch { + failWebsocketConnection(this.#handler, "Received invalid UTF-8 in text frame."); + return; + } + } else if (type === opcodes.BINARY) { + chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); + } + this.#readableStreamController.enqueue(chunk); + } + /** @type {import('../websocket').Handler['onSocketClose']} */ + #onSocketClose() { + const wasClean = this.#handler.closeState.has(sentCloseFrameState.SENT) && this.#handler.closeState.has(sentCloseFrameState.RECEIVED); + this.#handler.readyState = states.CLOSED; + if (this.#handshakeAborted) { + return; + } + if (!this.#handler.wasEverConnected) { + this.#openedPromise.reject(new WebSocketError("Socket never opened")); + } + const result = this.#parser.closingInfo; + let code = result?.code ?? 1005; + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + code = 1006; + } + const reason = result?.reason == null ? "" : utf8DecodeBytes(Buffer.from(result.reason)); + if (wasClean) { + this.#readableStreamController.close(); + if (!this.#writableStream.locked) { + this.#writableStream.abort(new DOMException("A closed WebSocketStream cannot be written to", "InvalidStateError")); + } + this.#closedPromise.resolve({ + closeCode: code, + reason + }); + } else { + const error = createUnvalidatedWebSocketError("unclean close", code, reason); + this.#readableStreamController.error(error); + this.#writableStream.abort(error); + this.#closedPromise.reject(error); + } + } + #closeUsingReason(reason) { + let code = null; + let reasonString = ""; + if (webidl.is.WebSocketError(reason)) { + code = reason.closeCode; + reasonString = reason.reason; + } + closeWebSocketConnection(this.#handler, code, reasonString); + } + // To cancel a WebSocketStream stream given reason , close using reason giving stream and reason . + #cancel(reason) { + this.#closeUsingReason(reason); + } + }; + Object.defineProperties(WebSocketStream.prototype, { + url: kEnumerableProperty, + opened: kEnumerableProperty, + closed: kEnumerableProperty, + close: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocketStream", + writable: false, + enumerable: false, + configurable: true + } + }); + webidl.converters.WebSocketStreamOptions = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.sequenceConverter(webidl.converters.USVString), + defaultValue: () => [] + }, + { + key: "signal", + converter: webidl.nullableConverter(webidl.converters.AbortSignal), + defaultValue: () => null + } + ]); + webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([ + { + key: "closeCode", + converter: (V) => webidl.converters["unsigned short"](V, { enforceRange: true }) + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: () => "" + } + ]); + module2.exports = { WebSocketStream }; + } +}); + +// node_modules/undici/lib/web/eventsource/util.js +var require_util9 = __commonJS({ + "node_modules/undici/lib/web/eventsource/util.js"(exports2, module2) { + "use strict"; + function isValidLastEventId(value) { + return value.indexOf("\0") === -1; + } + function isASCIINumber(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) { + if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; + } + return true; + } + function delay(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); + } + module2.exports = { + isValidLastEventId, + isASCIINumber, + delay + }; + } +}); + +// node_modules/undici/lib/web/eventsource/eventsource-stream.js +var require_eventsource_stream = __commonJS({ + "node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports2, module2) { + "use strict"; + var { Transform } = require("node:stream"); + var { isASCIINumber, isValidLastEventId } = require_util9(); + var BOM = [239, 187, 191]; + var LF = 10; + var CR = 13; + var COLON = 58; + var SPACE = 32; + var EventSourceStream = class extends Transform { + /** + * @type {eventSourceSettings} + */ + state; + /** + * Leading byte-order-mark check. + * @type {boolean} + */ + checkBOM = true; + /** + * @type {boolean} + */ + crlfCheck = false; + /** + * @type {boolean} + */ + eventEndCheck = false; + /** + * @type {Buffer|null} + */ + buffer = null; + pos = 0; + event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + /** + * @param {object} options + * @param {boolean} [options.readableObjectMode] + * @param {eventSourceSettings} [options.eventSourceSettings] + * @param {(chunk: any, encoding?: BufferEncoding | undefined) => boolean} [options.push] + */ + constructor(options = {}) { + options.readableObjectMode = true; + super(options); + this.state = options.eventSourceSettings || {}; + if (options.push) { + this.push = options.push; + } + } + /** + * @param {Buffer} chunk + * @param {string} _encoding + * @param {Function} callback + * @returns {void} + */ + _transform(chunk, _encoding, callback) { + if (chunk.length === 0) { + callback(); + return; + } + if (this.buffer) { + this.buffer = Buffer.concat([this.buffer, chunk]); + } else { + this.buffer = chunk; + } + if (this.checkBOM) { + switch (this.buffer.length) { + case 1: + if (this.buffer[0] === BOM[0]) { + callback(); + return; + } + this.checkBOM = false; + callback(); + return; + case 2: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { + callback(); + return; + } + this.checkBOM = false; + break; + case 3: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { + this.buffer = Buffer.alloc(0); + this.checkBOM = false; + callback(); + return; + } + this.checkBOM = false; + break; + default: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { + this.buffer = this.buffer.subarray(3); + } + this.checkBOM = false; + break; + } + } + while (this.pos < this.buffer.length) { + if (this.eventEndCheck) { + if (this.crlfCheck) { + if (this.buffer[this.pos] === LF) { + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.crlfCheck = false; + continue; + } + this.crlfCheck = false; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) { + this.crlfCheck = true; + } + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + if (this.event.data !== void 0 || this.event.event || this.event.id || this.event.retry) { + this.processEvent(this.event); + } + this.clearEvent(); + continue; + } + this.eventEndCheck = false; + continue; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) { + this.crlfCheck = true; + } + this.parseLine(this.buffer.subarray(0, this.pos), this.event); + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.eventEndCheck = true; + continue; + } + this.pos++; + } + callback(); + } + /** + * @param {Buffer} line + * @param {EventSourceStreamEvent} event + */ + parseLine(line, event) { + if (line.length === 0) { + return; + } + const colonPosition = line.indexOf(COLON); + if (colonPosition === 0) { + return; + } + let field = ""; + let value = ""; + if (colonPosition !== -1) { + field = line.subarray(0, colonPosition).toString("utf8"); + let valueStart = colonPosition + 1; + if (line[valueStart] === SPACE) { + ++valueStart; + } + value = line.subarray(valueStart).toString("utf8"); + } else { + field = line.toString("utf8"); + value = ""; + } + switch (field) { + case "data": + if (event[field] === void 0) { + event[field] = value; + } else { + event[field] += ` +${value}`; + } + break; + case "retry": + if (isASCIINumber(value)) { + event[field] = value; + } + break; + case "id": + if (isValidLastEventId(value)) { + event[field] = value; + } + break; + case "event": + if (value.length > 0) { + event[field] = value; + } + break; + } + } + /** + * @param {EventSourceStreamEvent} event + */ + processEvent(event) { + if (event.retry && isASCIINumber(event.retry)) { + this.state.reconnectionTime = parseInt(event.retry, 10); + } + if (event.id && isValidLastEventId(event.id)) { + this.state.lastEventId = event.id; + } + if (event.data !== void 0) { + this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin + } + }); + } + } + clearEvent() { + this.event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + } + }; + module2.exports = { + EventSourceStream + }; + } +}); + +// node_modules/undici/lib/web/eventsource/eventsource.js +var require_eventsource = __commonJS({ + "node_modules/undici/lib/web/eventsource/eventsource.js"(exports2, module2) { + "use strict"; + var { pipeline } = require("node:stream"); + var { fetching } = require_fetch(); + var { makeRequest } = require_request4(); + var { webidl } = require_webidl(); + var { EventSourceStream } = require_eventsource_stream(); + var { parseMIMEType } = require_data_url(); + var { createFastMessageEvent } = require_events(); + var { isNetworkError } = require_response2(); + var { delay } = require_util9(); + var { kEnumerableProperty } = require_util4(); + var { environmentSettingsObject } = require_util5(); + var experimentalWarned = false; + var defaultReconnectionTime = 3e3; + var CONNECTING = 0; + var OPEN = 1; + var CLOSED = 2; + var ANONYMOUS = "anonymous"; + var USE_CREDENTIALS = "use-credentials"; + var EventSource = class _EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null + }; + #url; + #withCredentials = false; + /** + * @type {ReadyState} + */ + #readyState = CONNECTING; + #request = null; + #controller = null; + #dispatcher; + /** + * @type {import('./eventsource-stream').eventSourceSettings} + */ + #state; + /** + * Creates a new EventSource object. + * @param {string} url + * @param {EventSourceInit} [eventSourceInitDict={}] + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface + */ + constructor(url, eventSourceInitDict = {}) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EventSource is experimental, expect them to change at any time.", { + code: "UNDICI-ES" + }); + } + url = webidl.converters.USVString(url); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + this.#dispatcher = eventSourceInitDict.node.dispatcher || eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: eventSourceInitDict.node.reconnectionTime + }; + const settings = environmentSettingsObject; + let urlRecord; + try { + urlRecord = new URL(url, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + this.#url = urlRecord.href; + let corsAttributeState = ANONYMOUS; + if (eventSourceInitDict.withCredentials === true) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; + } + const initRequest = { + redirect: "follow", + keepalive: true, + // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes + mode: "cors", + credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", + referrer: "no-referrer" + }; + initRequest.client = environmentSettingsObject.settingsObject; + initRequest.headersList = [["accept", { name: "accept", value: "text/event-stream" }]]; + initRequest.cache = "no-store"; + initRequest.initiator = "other"; + initRequest.urlList = [new URL(this.#url)]; + this.#request = makeRequest(initRequest); + this.#connect(); + } + /** + * Returns the state of this EventSource object's connection. It can have the + * values described below. + * @returns {ReadyState} + * @readonly + */ + get readyState() { + return this.#readyState; + } + /** + * Returns the URL providing the event stream. + * @readonly + * @returns {string} + */ + get url() { + return this.#url; + } + /** + * Returns a boolean indicating whether the EventSource object was + * instantiated with CORS credentials set (true), or not (false, the default). + */ + get withCredentials() { + return this.#withCredentials; + } + #connect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + const fetchParams = { + request: this.#request, + dispatcher: this.#dispatcher + }; + const processEventSourceEndOfBody = (response) => { + if (!isNetworkError(response)) { + return this.#reconnect(); + } + }; + fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; + fetchParams.processResponse = (response) => { + if (isNetworkError(response)) { + if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } else { + this.#reconnect(); + return; + } + } + const contentType = response.headersList.get("content-type", true); + const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; + const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; + if (response.status !== 200 || contentTypeValid === false) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } + this.#readyState = OPEN; + this.dispatchEvent(new Event("open")); + this.#state.origin = response.urlList[response.urlList.length - 1].origin; + const eventSourceStream = new EventSourceStream({ + eventSourceSettings: this.#state, + push: (event) => { + this.dispatchEvent(createFastMessageEvent( + event.type, + event.options + )); + } + }); + pipeline( + response.body.stream, + eventSourceStream, + (error) => { + if (error?.aborted === false) { + this.close(); + this.dispatchEvent(new Event("error")); + } + } + ); + }; + this.#controller = fetching(fetchParams); + } + /** + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + * @returns {Promise} + */ + async #reconnect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + this.dispatchEvent(new Event("error")); + await delay(this.#state.reconnectionTime); + if (this.#readyState !== CONNECTING) return; + if (this.#state.lastEventId.length) { + this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); + } + this.#connect(); + } + /** + * Closes the connection, if any, and sets the readyState attribute to + * CLOSED. + */ + close() { + webidl.brandCheck(this, _EventSource); + if (this.#readyState === CLOSED) return; + this.#readyState = CLOSED; + this.#controller.abort(); + this.#request = null; + } + get onopen() { + return this.#events.open; + } + set onopen(fn) { + if (this.#events.open) { + this.removeEventListener("open", this.#events.open); + } + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else { + this.#events.open = null; + } + } + get onmessage() { + return this.#events.message; + } + set onmessage(fn) { + if (this.#events.message) { + this.removeEventListener("message", this.#events.message); + } + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else { + this.#events.message = null; + } + } + get onerror() { + return this.#events.error; + } + set onerror(fn) { + if (this.#events.error) { + this.removeEventListener("error", this.#events.error); + } + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else { + this.#events.error = null; + } + } + }; + var constantsPropertyDescriptors = { + CONNECTING: { + __proto__: null, + configurable: false, + enumerable: true, + value: CONNECTING, + writable: false + }, + OPEN: { + __proto__: null, + configurable: false, + enumerable: true, + value: OPEN, + writable: false + }, + CLOSED: { + __proto__: null, + configurable: false, + enumerable: true, + value: CLOSED, + writable: false + } + }; + Object.defineProperties(EventSource, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, { + close: kEnumerableProperty, + onerror: kEnumerableProperty, + onmessage: kEnumerableProperty, + onopen: kEnumerableProperty, + readyState: kEnumerableProperty, + url: kEnumerableProperty, + withCredentials: kEnumerableProperty + }); + webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ + { + key: "withCredentials", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "dispatcher", + // undici only + converter: webidl.converters.any + }, + { + key: "node", + // undici only + converter: webidl.dictionaryConverter([ + { + key: "reconnectionTime", + converter: webidl.converters["unsigned long"], + defaultValue: () => defaultReconnectionTime + }, + { + key: "dispatcher", + converter: webidl.converters.any + } + ]), + defaultValue: () => ({}) + } + ]); + module2.exports = { + EventSource, + defaultReconnectionTime + }; + } +}); + +// node_modules/undici/index.js +var require_undici = __commonJS({ + "node_modules/undici/index.js"(exports2, module2) { + "use strict"; + var Client = require_client(); + var Dispatcher = require_dispatcher(); + var Pool = require_pool(); + var BalancedPool = require_balanced_pool(); + var Agent = require_agent(); + var ProxyAgent = require_proxy_agent(); + var EnvHttpProxyAgent = require_env_http_proxy_agent(); + var RetryAgent = require_retry_agent(); + var H2CClient = require_h2c_client(); + var errors = require_errors5(); + var util = require_util4(); + var { InvalidArgumentError } = errors; + var api = require_api(); + var buildConnector = require_connect(); + var MockClient = require_mock_client(); + var { MockCallHistory, MockCallHistoryLog } = require_mock_call_history(); + var MockAgent = require_mock_agent(); + var MockPool = require_mock_pool(); + var SnapshotAgent = require_snapshot_agent(); + var mockErrors = require_mock_errors(); + var RetryHandler = require_retry_handler(); + var { getGlobalDispatcher, setGlobalDispatcher } = require_global2(); + var DecoratorHandler = require_decorator_handler(); + var RedirectHandler = require_redirect_handler(); + Object.assign(Dispatcher.prototype, api); + module2.exports.Dispatcher = Dispatcher; + module2.exports.Client = Client; + module2.exports.Pool = Pool; + module2.exports.BalancedPool = BalancedPool; + module2.exports.Agent = Agent; + module2.exports.ProxyAgent = ProxyAgent; + module2.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; + module2.exports.RetryAgent = RetryAgent; + module2.exports.H2CClient = H2CClient; + module2.exports.RetryHandler = RetryHandler; + module2.exports.DecoratorHandler = DecoratorHandler; + module2.exports.RedirectHandler = RedirectHandler; + module2.exports.interceptors = { + redirect: require_redirect(), + responseError: require_response_error(), + retry: require_retry(), + dump: require_dump(), + dns: require_dns(), + cache: require_cache2(), + decompress: require_decompress() + }; + module2.exports.cacheStores = { + MemoryCacheStore: require_memory_cache_store() + }; + var SqliteCacheStore = require_sqlite_cache_store(); + module2.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; + module2.exports.buildConnector = buildConnector; + module2.exports.errors = errors; + module2.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString + }; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + throw new InvalidArgumentError("invalid url"); + } + if (opts != null && typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (opts && opts.path != null) { + if (typeof opts.path !== "string") { + throw new InvalidArgumentError("invalid opts.path"); + } + let path7 = opts.path; + if (!opts.path.startsWith("/")) { + path7 = `/${path7}`; + } + url = new URL(util.parseOrigin(url).origin + path7); + } else { + if (!opts) { + opts = typeof url === "object" ? url : {}; + } + url = util.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) { + throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + } + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; + } + module2.exports.setGlobalDispatcher = setGlobalDispatcher; + module2.exports.getGlobalDispatcher = getGlobalDispatcher; + var fetchImpl = require_fetch().fetch; + module2.exports.fetch = async function fetch2(init, options = void 0) { + try { + return await fetchImpl(init, options); + } catch (err) { + if (err && typeof err === "object") { + Error.captureStackTrace(err); + } + throw err; + } + }; + module2.exports.Headers = require_headers().Headers; + module2.exports.Response = require_response2().Response; + module2.exports.Request = require_request4().Request; + module2.exports.FormData = require_formdata().FormData; + var { setGlobalOrigin, getGlobalOrigin } = require_global(); + module2.exports.setGlobalOrigin = setGlobalOrigin; + module2.exports.getGlobalOrigin = getGlobalOrigin; + var { CacheStorage } = require_cachestorage(); + var { kConstruct } = require_symbols4(); + module2.exports.caches = new CacheStorage(kConstruct); + var { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = require_cookies(); + module2.exports.deleteCookie = deleteCookie; + module2.exports.getCookies = getCookies; + module2.exports.getSetCookies = getSetCookies; + module2.exports.setCookie = setCookie; + module2.exports.parseCookie = parseCookie; + var { parseMIMEType, serializeAMimeType } = require_data_url(); + module2.exports.parseMIMEType = parseMIMEType; + module2.exports.serializeAMimeType = serializeAMimeType; + var { CloseEvent, ErrorEvent, MessageEvent } = require_events(); + var { WebSocket, ping } = require_websocket(); + module2.exports.WebSocket = WebSocket; + module2.exports.CloseEvent = CloseEvent; + module2.exports.ErrorEvent = ErrorEvent; + module2.exports.MessageEvent = MessageEvent; + module2.exports.ping = ping; + module2.exports.WebSocketStream = require_websocketstream().WebSocketStream; + module2.exports.WebSocketError = require_websocketerror().WebSocketError; + module2.exports.request = makeDispatcher(api.request); + module2.exports.stream = makeDispatcher(api.stream); + module2.exports.pipeline = makeDispatcher(api.pipeline); + module2.exports.connect = makeDispatcher(api.connect); + module2.exports.upgrade = makeDispatcher(api.upgrade); + module2.exports.MockClient = MockClient; + module2.exports.MockCallHistory = MockCallHistory; + module2.exports.MockCallHistoryLog = MockCallHistoryLog; + module2.exports.MockPool = MockPool; + module2.exports.MockAgent = MockAgent; + module2.exports.SnapshotAgent = SnapshotAgent; + module2.exports.mockErrors = mockErrors; + var { EventSource } = require_eventsource(); + module2.exports.EventSource = EventSource; + function install() { + globalThis.fetch = module2.exports.fetch; + globalThis.Headers = module2.exports.Headers; + globalThis.Response = module2.exports.Response; + globalThis.Request = module2.exports.Request; + globalThis.FormData = module2.exports.FormData; + globalThis.WebSocket = module2.exports.WebSocket; + globalThis.CloseEvent = module2.exports.CloseEvent; + globalThis.ErrorEvent = module2.exports.ErrorEvent; + globalThis.MessageEvent = module2.exports.MessageEvent; + globalThis.EventSource = module2.exports.EventSource; + } + module2.exports.install = install; + } +}); + +// node_modules/@isaacs/balanced-match/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@isaacs/balanced-match/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.range = exports2.balanced = void 0; + var balanced = (a, b, str) => { + const ma = a instanceof RegExp ? maybeMatch(a, str) : a; + const mb = b instanceof RegExp ? maybeMatch(b, str) : b; + const r = ma !== null && mb != null && (0, exports2.range)(ma, mb, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + ma.length, r[1]), + post: str.slice(r[1] + mb.length) + }; + }; + exports2.balanced = balanced; + var maybeMatch = (reg, str) => { + const m = str.match(reg); + return m ? m[0] : null; + }; + var range = (a, b, str) => { + let begs, beg, left, right = void 0, result; + let ai = str.indexOf(a); + let bi = str.indexOf(b, ai + 1); + let i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i === ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length === 1) { + const r = begs.pop(); + if (r !== void 0) + result = [r, bi]; + } else { + beg = begs.pop(); + if (beg !== void 0 && beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length && right !== void 0) { + result = [left, right]; + } + } + return result; + }; + exports2.range = range; + } +}); + +// node_modules/@isaacs/brace-expansion/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@isaacs/brace-expansion/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.expand = expand; + var balanced_match_1 = require_commonjs(); + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + var escSlashPattern = new RegExp(escSlash, "g"); + var escOpenPattern = new RegExp(escOpen, "g"); + var escClosePattern = new RegExp(escClose, "g"); + var escCommaPattern = new RegExp(escComma, "g"); + var escPeriodPattern = new RegExp(escPeriod, "g"); + var slashPattern = /\\\\/g; + var openPattern = /\\{/g; + var closePattern = /\\}/g; + var commaPattern = /\\,/g; + var periodPattern = /\\./g; + function numeric(str) { + return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod); + } + function unescapeBraces(str) { + return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, "."); + } + function parseCommaParts(str) { + if (!str) { + return [""]; + } + const parts = []; + const m = (0, balanced_match_1.balanced)("{", "}", str); + if (!m) { + return str.split(","); + } + const { pre, body, post } = m; + const p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + const postParts = parseCommaParts(post); + if (post.length) { + ; + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expand(str) { + if (!str) { + return []; + } + if (str.slice(0, 2) === "{}") { + str = "\\{\\}" + str.slice(2); + } + return expand_(escapeBraces(str), true).map(unescapeBraces); + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function expand_(str, isTop) { + const expansions = []; + const m = (0, balanced_match_1.balanced)("{", "}", str); + if (!m) + return [str]; + const pre = m.pre; + const post = m.post.length ? expand_(m.post, false) : [""]; + if (/\$$/.test(m.pre)) { + for (let k = 0; k < post.length; k++) { + const expansion = pre + "{" + m.body + "}" + post[k]; + expansions.push(expansion); + } + } else { + const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + const isSequence = isNumericSequence || isAlphaSequence; + const isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + return expand_(str); + } + return [str]; + } + let n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== void 0) { + n = expand_(n[0], false).map(embrace); + if (n.length === 1) { + return post.map((p) => m.pre + n[0] + p); + } + } + } + let N; + if (isSequence && n[0] !== void 0 && n[1] !== void 0) { + const x = numeric(n[0]); + const y = numeric(n[1]); + const width = Math.max(n[0].length, n[1].length); + let incr = n.length === 3 && n[2] !== void 0 ? Math.abs(numeric(n[2])) : 1; + let test = lte; + const reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + const pad = n.some(isPadded); + N = []; + for (let i = x; test(i, y); i += incr) { + let c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") { + c = ""; + } + } else { + c = String(i); + if (pad) { + const need = width - c.length; + if (need > 0) { + const z2 = new Array(need + 1).join("0"); + if (i < 0) { + c = "-" + z2 + c.slice(1); + } else { + c = z2 + c; + } + } + } + } + N.push(c); + } + } else { + N = []; + for (let j = 0; j < n.length; j++) { + N.push.apply(N, expand_(n[j], false)); + } + } + for (let j = 0; j < N.length; j++) { + for (let k = 0; k < post.length; k++) { + const expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) { + expansions.push(expansion); + } + } + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +var require_assert_valid_pattern = __commonJS({ + "node_modules/minimatch/dist/commonjs/assert-valid-pattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.assertValidPattern = void 0; + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = (pattern) => { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + exports2.assertValidPattern = assertValidPattern; + } +}); + +// node_modules/minimatch/dist/commonjs/brace-expressions.js +var require_brace_expressions = __commonJS({ + "node_modules/minimatch/dist/commonjs/brace-expressions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseClass = void 0; + var posixClasses = { + "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true], + "[:alpha:]": ["\\p{L}\\p{Nl}", true], + "[:ascii:]": ["\\x00-\\x7f", false], + "[:blank:]": ["\\p{Zs}\\t", true], + "[:cntrl:]": ["\\p{Cc}", true], + "[:digit:]": ["\\p{Nd}", true], + "[:graph:]": ["\\p{Z}\\p{C}", true, true], + "[:lower:]": ["\\p{Ll}", true], + "[:print:]": ["\\p{C}", true], + "[:punct:]": ["\\p{P}", true], + "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true], + "[:upper:]": ["\\p{Lu}", true], + "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true], + "[:xdigit:]": ["A-Fa-f0-9", false] + }; + var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&"); + var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + var rangesToString = (ranges) => ranges.join(""); + var parseClass = (glob, position) => { + const pos = position; + if (glob.charAt(pos) !== "[") { + throw new Error("not in a brace expression"); + } + const ranges = []; + const negs = []; + let i = pos + 1; + let sawStart = false; + let uflag = false; + let escaping = false; + let negate = false; + let endPos = pos; + let rangeStart = ""; + WHILE: while (i < glob.length) { + const c = glob.charAt(i); + if ((c === "!" || c === "^") && i === pos + 1) { + negate = true; + i++; + continue; + } + if (c === "]" && sawStart && !escaping) { + endPos = i + 1; + break; + } + sawStart = true; + if (c === "\\") { + if (!escaping) { + escaping = true; + i++; + continue; + } + } + if (c === "[" && !escaping) { + for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + if (glob.startsWith(cls, i)) { + if (rangeStart) { + return ["$.", false, glob.length - pos, true]; + } + i += cls.length; + if (neg) + negs.push(unip); + else + ranges.push(unip); + uflag = uflag || u; + continue WHILE; + } + } + } + escaping = false; + if (rangeStart) { + if (c > rangeStart) { + ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c)); + } else if (c === rangeStart) { + ranges.push(braceEscape(c)); + } + rangeStart = ""; + i++; + continue; + } + if (glob.startsWith("-]", i + 1)) { + ranges.push(braceEscape(c + "-")); + i += 2; + continue; + } + if (glob.startsWith("-", i + 1)) { + rangeStart = c; + i += 2; + continue; + } + ranges.push(braceEscape(c)); + i++; + } + if (endPos < i) { + return ["", false, 0, false]; + } + if (!ranges.length && !negs.length) { + return ["$.", false, glob.length - pos, true]; + } + if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) { + const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; + return [regexpEscape(r), false, endPos - pos, false]; + } + const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]"; + const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]"; + const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs; + return [comb, uflag, endPos - pos, true]; + }; + exports2.parseClass = parseClass; + } +}); + +// node_modules/minimatch/dist/commonjs/unescape.js +var require_unescape = __commonJS({ + "node_modules/minimatch/dist/commonjs/unescape.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.unescape = void 0; + var unescape2 = (s, { windowsPathsNoEscape = false } = {}) => { + return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1"); + }; + exports2.unescape = unescape2; + } +}); + +// node_modules/minimatch/dist/commonjs/ast.js +var require_ast = __commonJS({ + "node_modules/minimatch/dist/commonjs/ast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AST = void 0; + var brace_expressions_js_1 = require_brace_expressions(); + var unescape_js_1 = require_unescape(); + var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]); + var isExtglobType = (c) => types.has(c); + var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))"; + var startNoDot = "(?!\\.)"; + var addPatternStart = /* @__PURE__ */ new Set(["[", "."]); + var justDots = /* @__PURE__ */ new Set(["..", "."]); + var reSpecials = new Set("().*{}+?[]^$\\!"); + var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + var qmark = "[^/]"; + var star = qmark + "*?"; + var starNoEmpty = qmark + "+?"; + var AST = class _AST { + type; + #root; + #hasMagic; + #uflag = false; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + #toString; + // set to true if it's an extglob with no children + // (which really means one child of '') + #emptyExt = false; + constructor(type, parent, options = {}) { + this.type = type; + if (type) + this.#hasMagic = true; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === "!" && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + get hasMagic() { + if (this.#hasMagic !== void 0) + return this.#hasMagic; + for (const p of this.#parts) { + if (typeof p === "string") + continue; + if (p.type || p.hasMagic) + return this.#hasMagic = true; + } + return this.#hasMagic; + } + // reconstructs the pattern + toString() { + if (this.#toString !== void 0) + return this.#toString; + if (!this.type) { + return this.#toString = this.#parts.map((p) => String(p)).join(""); + } else { + return this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")"; + } + } + #fillNegs() { + if (this !== this.#root) + throw new Error("should only call on root"); + if (this.#filledNegs) + return this; + this.toString(); + this.#filledNegs = true; + let n; + while (n = this.#negs.pop()) { + if (n.type !== "!") + continue; + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + if (typeof part === "string") { + throw new Error("string part in extglob AST??"); + } + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === "") + continue; + if (typeof p !== "string" && !(p instanceof _AST && p.#parent === this)) { + throw new Error("invalid part: " + p); + } + this.#parts.push(p); + } + } + toJSON() { + const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && this.#parent?.type === "!")) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + if (!this.#parent?.isStart()) + return false; + if (this.#parentIndex === 0) + return true; + const p = this.#parent; + for (let i = 0; i < this.#parentIndex; i++) { + const pp = p.#parts[i]; + if (!(pp instanceof _AST && pp.type === "!")) { + return false; + } + } + return true; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === "!") + return true; + if (!this.#parent?.isEnd()) + return false; + if (!this.type) + return this.#parent?.isEnd(); + const pl2 = this.#parent ? this.#parent.#parts.length : 0; + return this.#parentIndex === pl2 - 1; + } + copyIn(part) { + if (typeof part === "string") + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new _AST(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + let inBrace = false; + let braceStart = -1; + let braceNeg = false; + if (ast.type === null) { + let i2 = pos; + let acc2 = ""; + while (i2 < str.length) { + const c = str.charAt(i2++); + if (escaping || c === "\\") { + escaping = !escaping; + acc2 += c; + continue; + } + if (inBrace) { + if (i2 === braceStart + 1) { + if (c === "^" || c === "!") { + braceNeg = true; + } + } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc2 += c; + continue; + } else if (c === "[") { + inBrace = true; + braceStart = i2; + braceNeg = false; + acc2 += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") { + ast.push(acc2); + acc2 = ""; + const ext = new _AST(c, ast); + i2 = _AST.#parseAST(str, ext, i2, opt); + ast.push(ext); + continue; + } + acc2 += c; + } + ast.push(acc2); + return i2; + } + let i = pos + 1; + let part = new _AST(null, ast); + const parts = []; + let acc = ""; + while (i < str.length) { + const c = str.charAt(i++); + if (escaping || c === "\\") { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === "^" || c === "!") { + braceNeg = true; + } + } else if (c === "]" && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } else if (c === "[") { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === "(") { + part.push(acc); + acc = ""; + const ext = new _AST(c, part); + part.push(ext); + i = _AST.#parseAST(str, ext, i, opt); + continue; + } + if (c === "|") { + part.push(acc); + acc = ""; + parts.push(part); + part = new _AST(null, ast); + continue; + } + if (c === ")") { + if (acc === "" && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ""; + ast.push(...parts, part); + return i; + } + acc += c; + } + ast.type = null; + ast.#hasMagic = void 0; + ast.#parts = [str.substring(pos - 1)]; + return i; + } + static fromGlob(pattern, options = {}) { + const ast = new _AST(null, void 0, options); + _AST.#parseAST(pattern, ast, 0, options); + return ast; + } + // returns the regular expression if there's magic, or the unescaped + // string if not. + toMMPattern() { + if (this !== this.#root) + return this.#root.toMMPattern(); + const glob = this.toString(); + const [re, body, hasMagic, uflag] = this.toRegExpSource(); + const anyMagic = hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase(); + if (!anyMagic) { + return body; + } + const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : ""); + return Object.assign(new RegExp(`^${re}$`, flags), { + _src: re, + _glob: glob + }); + } + get options() { + return this.#options; + } + // returns the string match, the regexp source, whether there's magic + // in the regexp (so a regular expression is required) and whether or + // not the uflag is needed for the regular expression (for posix classes) + // TODO: instead of injecting the start/end at this point, just return + // the BODY of the regexp, along with the start/end portions suitable + // for binding the start/end in either a joined full-path makeRe context + // (where we bind to (^|/), or a standalone matchPart context (where + // we bind to ^, and not /). Otherwise slashes get duped! + // + // In part-matching mode, the start is: + // - if not isStart: nothing + // - if traversal possible, but not allowed: ^(?!\.\.?$) + // - if dots allowed or not possible: ^ + // - if dots possible and not allowed: ^(?!\.) + // end is: + // - if not isEnd(): nothing + // - else: $ + // + // In full-path matching mode, we put the slash at the START of the + // pattern, so start is: + // - if first pattern: same as part-matching mode + // - if not isStart(): nothing + // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) + // - if dots allowed or not possible: / + // - if dots possible and not allowed: /(?!\.) + // end is: + // - if last pattern, same as part-matching mode + // - else nothing + // + // Always put the (?:$|/) on negated tails, though, because that has to be + // there to bind the end of the negated pattern portion, and it's easier to + // just stick it in now rather than try to inject it later in the middle of + // the pattern. + // + // We can just always return the same end, and leave it up to the caller + // to know whether it's going to be used joined or in parts. + // And, if the start is adjusted slightly, can do the same there: + // - if not isStart: nothing + // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) + // - if dots allowed or not possible: (?:/|^) + // - if dots possible and not allowed: (?:/|^)(?!\.) + // + // But it's better to have a simpler binding without a conditional, for + // performance, so probably better to return both start options. + // + // Then the caller just ignores the end if it's not the first pattern, + // and the start always gets applied. + // + // But that's always going to be $ if it's the ending pattern, or nothing, + // so the caller can just attach $ at the end of the pattern when building. + // + // So the todo is: + // - better detect what kind of start is needed + // - return both flavors of starting pattern + // - attach $ at the end of the pattern when creating the actual RegExp + // + // Ah, but wait, no, that all only applies to the root when the first pattern + // is not an extglob. If the first pattern IS an extglob, then we need all + // that dot prevention biz to live in the extglob portions, because eg + // +(*|.x*) can match .xy but not .yx. + // + // So, return the two flavors if it's #root and the first child is not an + // AST, otherwise leave it to the child AST to handle it, and there, + // use the (?:^|/) style of start binding. + // + // Even simplified further: + // - Since the start for a join is eg /(?!\.) and the start for a part + // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root + // or start or whatever) and prepend ^ or / at the Regexp construction. + toRegExpSource(allowDot) { + const dot = allowDot ?? !!this.#options.dot; + if (this.#root === this) + this.#fillNegs(); + if (!this.type) { + const noEmpty = this.isStart() && this.isEnd(); + const src = this.#parts.map((p) => { + const [re, _, hasMagic, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot); + this.#hasMagic = this.#hasMagic || hasMagic; + this.#uflag = this.#uflag || uflag; + return re; + }).join(""); + let start2 = ""; + if (this.isStart()) { + if (typeof this.#parts[0] === "string") { + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (!dotTravAllowed) { + const aps = addPatternStart; + const needNoTrav = ( + // dots are allowed, and the pattern starts with [ or . + dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or . + src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or . + src.startsWith("\\.\\.") && aps.has(src.charAt(4)) + ); + const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); + start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ""; + } + } + } + let end = ""; + if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") { + end = "(?:$|\\/)"; + } + const final2 = start2 + src + end; + return [ + final2, + (0, unescape_js_1.unescape)(src), + this.#hasMagic = !!this.#hasMagic, + this.#uflag + ]; + } + const repeated = this.type === "*" || this.type === "+"; + const start = this.type === "!" ? "(?:(?!(?:" : "(?:"; + let body = this.#partsToRegExp(dot); + if (this.isStart() && this.isEnd() && !body && this.type !== "!") { + const s = this.toString(); + this.#parts = [s]; + this.type = null; + this.#hasMagic = void 0; + return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; + } + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true); + if (bodyDotAllowed === body) { + bodyDotAllowed = ""; + } + if (bodyDotAllowed) { + body = `(?:${body})(?:${bodyDotAllowed})*?`; + } + let final = ""; + if (this.type === "!" && this.#emptyExt) { + final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty; + } else { + const close = this.type === "!" ? ( + // !() must match something,but !(x) can match '' + "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")" + ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`; + final = start + body + close; + } + return [ + final, + (0, unescape_js_1.unescape)(body), + this.#hasMagic = !!this.#hasMagic, + this.#uflag + ]; + } + #partsToRegExp(dot) { + return this.#parts.map((p) => { + if (typeof p === "string") { + throw new Error("string type in extglob ast??"); + } + const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|"); + } + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ""; + let uflag = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? "\\" : "") + c; + continue; + } + if (c === "\\") { + if (i === glob.length - 1) { + re += "\\\\"; + } else { + escaping = true; + } + continue; + } + if (c === "[") { + const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === "*") { + if (noEmpty && glob === "*") + re += starNoEmpty; + else + re += star; + hasMagic = true; + continue; + } + if (c === "?") { + re += qmark; + hasMagic = true; + continue; + } + re += regExpEscape(c); + } + return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag]; + } + }; + exports2.AST = AST; + } +}); + +// node_modules/minimatch/dist/commonjs/escape.js +var require_escape = __commonJS({ + "node_modules/minimatch/dist/commonjs/escape.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escape = void 0; + var escape2 = (s, { windowsPathsNoEscape = false } = {}) => { + return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&"); + }; + exports2.escape = escape2; + } +}); + +// node_modules/minimatch/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/minimatch/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0; + var brace_expansion_1 = require_commonjs2(); + var assert_valid_pattern_js_1 = require_assert_valid_pattern(); + var ast_js_1 = require_ast(); + var escape_js_1 = require_escape(); + var unescape_js_1 = require_unescape(); + var minimatch = (p, pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + }; + exports2.minimatch = minimatch; + var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; + var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2); + var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2); + var starDotExtTestNocase = (ext2) => { + ext2 = ext2.toLowerCase(); + return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2); + }; + var starDotExtTestNocaseDot = (ext2) => { + ext2 = ext2.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext2); + }; + var starDotStarRE = /^\*+\.\*+$/; + var starDotStarTest = (f) => !f.startsWith(".") && f.includes("."); + var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes("."); + var dotStarRE = /^\.\*+$/; + var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith("."); + var starRE = /^\*+$/; + var starTest = (f) => f.length !== 0 && !f.startsWith("."); + var starTestDot = (f) => f.length !== 0 && f !== "." && f !== ".."; + var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; + var qmarksTestNocase = ([$0, ext2 = ""]) => { + const noext = qmarksTestNoExt([$0]); + if (!ext2) + return noext; + ext2 = ext2.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext2); + }; + var qmarksTestNocaseDot = ([$0, ext2 = ""]) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext2) + return noext; + ext2 = ext2.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext2); + }; + var qmarksTestDot = ([$0, ext2 = ""]) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2); + }; + var qmarksTest = ([$0, ext2 = ""]) => { + const noext = qmarksTestNoExt([$0]); + return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2); + }; + var qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith("."); + }; + var qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== "." && f !== ".."; + }; + var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; + var path7 = { + win32: { sep: "\\" }, + posix: { sep: "/" } + }; + exports2.sep = defaultPlatform === "win32" ? path7.win32.sep : path7.posix.sep; + exports2.minimatch.sep = exports2.sep; + exports2.GLOBSTAR = Symbol("globstar **"); + exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var filter = (pattern, options = {}) => (p) => (0, exports2.minimatch)(p, pattern, options); + exports2.filter = filter; + exports2.minimatch.filter = exports2.filter; + var ext = (a, b = {}) => Object.assign({}, a, b); + var defaults = (def) => { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return exports2.minimatch; + } + const orig = exports2.minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + AST: class AST extends orig.AST { + /* c8 ignore start */ + constructor(type, parent, options = {}) { + super(type, parent, ext(def, options)); + } + /* c8 ignore stop */ + static fromGlob(pattern, options = {}) { + return orig.AST.fromGlob(pattern, ext(def, options)); + } + }, + unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), + escape: (s, options = {}) => orig.escape(s, ext(def, options)), + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: exports2.GLOBSTAR + }); + }; + exports2.defaults = defaults; + exports2.minimatch.defaults = exports2.defaults; + var braceExpand = (pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return (0, brace_expansion_1.expand)(pattern); + }; + exports2.braceExpand = braceExpand; + exports2.minimatch.braceExpand = exports2.braceExpand; + var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); + exports2.makeRe = makeRe; + exports2.minimatch.makeRe = exports2.makeRe; + var match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter((f) => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + exports2.match = match; + exports2.minimatch.match = exports2.match; + var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; + var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + var Minimatch = class { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(pattern, options = {}) { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + options = options || {}; + this.options = options; + this.pattern = pattern; + this.platform = options.platform || defaultPlatform; + this.isWindows = this.platform === "win32"; + this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, "/"); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.nocase = !!this.options.nocase; + this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase); + this.globSet = []; + this.globParts = []; + this.set = []; + this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) { + return true; + } + for (const pattern of this.set) { + for (const part of pattern) { + if (typeof part !== "string") + return true; + } + } + return false; + } + debug(..._) { + } + make() { + const pattern = this.pattern; + const options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + this.globSet = [...new Set(this.braceExpand())]; + if (options.debug) { + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + const rawGlobParts = this.globSet.map((s) => this.slashSplit(s)); + this.globParts = this.preprocess(rawGlobParts); + this.debug(this.pattern, this.globParts); + let set = this.globParts.map((s, _, __2) => { + if (this.isWindows && this.windowsNoMagicRoot) { + const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]); + const isDrive = /^[a-z]:/i.test(s[0]); + if (isUNC) { + return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))]; + } else if (isDrive) { + return [s[0], ...s.slice(1).map((ss) => this.parse(ss))]; + } + } + return s.map((ss) => this.parse(ss)); + }); + this.debug(this.pattern, set); + this.set = set.filter((s) => s.indexOf(false) === -1); + if (this.isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) { + p[2] = "?"; + } + } + } + this.debug(this.pattern, this.set); + } + // various transforms to equivalent pattern sets that are + // faster to process in a filesystem walk. The goal is to + // eliminate what we can, and push all ** patterns as far + // to the right as possible, even if it increases the number + // of patterns that we have to process. + preprocess(globParts) { + if (this.options.noglobstar) { + for (let i = 0; i < globParts.length; i++) { + for (let j = 0; j < globParts[i].length; j++) { + if (globParts[i][j] === "**") { + globParts[i][j] = "*"; + } + } + } + } + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + globParts = this.firstPhasePreProcess(globParts); + globParts = this.secondPhasePreProcess(globParts); + } else if (optimizationLevel >= 1) { + globParts = this.levelOneOptimize(globParts); + } else { + globParts = this.adjascentGlobstarOptimize(globParts); + } + return globParts; + } + // just get rid of adjascent ** portions + adjascentGlobstarOptimize(globParts) { + return globParts.map((parts) => { + let gs = -1; + while (-1 !== (gs = parts.indexOf("**", gs + 1))) { + let i = gs; + while (parts[i + 1] === "**") { + i++; + } + if (i !== gs) { + parts.splice(gs, i - gs); + } + } + return parts; + }); + } + // get rid of adjascent ** and resolve .. portions + levelOneOptimize(globParts) { + return globParts.map((parts) => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === "**" && prev === "**") { + return set; + } + if (part === "..") { + if (prev && prev !== ".." && prev !== "." && prev !== "**") { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [""] : parts; + }); + } + levelTwoFileOptimize(parts) { + if (!Array.isArray(parts)) { + parts = this.slashSplit(parts); + } + let didSomething = false; + do { + didSomething = false; + if (!this.preserveMultipleSlashes) { + for (let i = 1; i < parts.length - 1; i++) { + const p = parts[i]; + if (i === 1 && p === "" && parts[0] === "") + continue; + if (p === "." || p === "") { + didSomething = true; + parts.splice(i, 1); + i--; + } + } + if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) { + didSomething = true; + parts.pop(); + } + } + let dd2 = 0; + while (-1 !== (dd2 = parts.indexOf("..", dd2 + 1))) { + const p = parts[dd2 - 1]; + if (p && p !== "." && p !== ".." && p !== "**") { + didSomething = true; + parts.splice(dd2 - 1, 2); + dd2 -= 2; + } + } + } while (didSomething); + return parts.length === 0 ? [""] : parts; + } + // First phase: single-pattern processing + //
 is 1 or more portions
+      //  is 1 or more portions
+      // 

is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + //

// -> 
/
+      // 
/

/../ ->

/
+      // **/**/ -> **/
+      //
+      // **/*/ -> */**/ <== not valid because ** doesn't follow
+      // this WOULD be allowed if ** did follow symlinks, or * didn't
+      firstPhasePreProcess(globParts) {
+        let didSomething = false;
+        do {
+          didSomething = false;
+          for (let parts of globParts) {
+            let gs = -1;
+            while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
+              let gss = gs;
+              while (parts[gss + 1] === "**") {
+                gss++;
+              }
+              if (gss > gs) {
+                parts.splice(gs + 1, gss - gs);
+              }
+              let next = parts[gs + 1];
+              const p = parts[gs + 2];
+              const p2 = parts[gs + 3];
+              if (next !== "..")
+                continue;
+              if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
+                continue;
+              }
+              didSomething = true;
+              parts.splice(gs, 1);
+              const other = parts.slice(0);
+              other[gs] = "**";
+              globParts.push(other);
+              gs--;
+            }
+            if (!this.preserveMultipleSlashes) {
+              for (let i = 1; i < parts.length - 1; i++) {
+                const p = parts[i];
+                if (i === 1 && p === "" && parts[0] === "")
+                  continue;
+                if (p === "." || p === "") {
+                  didSomething = true;
+                  parts.splice(i, 1);
+                  i--;
+                }
+              }
+              if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
+                didSomething = true;
+                parts.pop();
+              }
+            }
+            let dd2 = 0;
+            while (-1 !== (dd2 = parts.indexOf("..", dd2 + 1))) {
+              const p = parts[dd2 - 1];
+              if (p && p !== "." && p !== ".." && p !== "**") {
+                didSomething = true;
+                const needDot = dd2 === 1 && parts[dd2 + 1] === "**";
+                const splin = needDot ? ["."] : [];
+                parts.splice(dd2 - 1, 2, ...splin);
+                if (parts.length === 0)
+                  parts.push("");
+                dd2 -= 2;
+              }
+            }
+          }
+        } while (didSomething);
+        return globParts;
+      }
+      // second phase: multi-pattern dedupes
+      // {
/*/,
/

/} ->

/*/
+      // {
/,
/} -> 
/
+      // {
/**/,
/} -> 
/**/
+      //
+      // {
/**/,
/**/

/} ->

/**/
+      // ^-- not valid because ** doens't follow symlinks
+      secondPhasePreProcess(globParts) {
+        for (let i = 0; i < globParts.length - 1; i++) {
+          for (let j = i + 1; j < globParts.length; j++) {
+            const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+            if (matched) {
+              globParts[i] = [];
+              globParts[j] = matched;
+              break;
+            }
+          }
+        }
+        return globParts.filter((gs) => gs.length);
+      }
+      partsMatch(a, b, emptyGSMatch = false) {
+        let ai = 0;
+        let bi = 0;
+        let result = [];
+        let which = "";
+        while (ai < a.length && bi < b.length) {
+          if (a[ai] === b[bi]) {
+            result.push(which === "b" ? b[bi] : a[ai]);
+            ai++;
+            bi++;
+          } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
+            result.push(a[ai]);
+            ai++;
+          } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
+            result.push(b[bi]);
+            bi++;
+          } else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
+            if (which === "b")
+              return false;
+            which = "a";
+            result.push(a[ai]);
+            ai++;
+            bi++;
+          } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
+            if (which === "a")
+              return false;
+            which = "b";
+            result.push(b[bi]);
+            ai++;
+            bi++;
+          } else {
+            return false;
+          }
+        }
+        return a.length === b.length && result;
+      }
+      parseNegate() {
+        if (this.nonegate)
+          return;
+        const pattern = this.pattern;
+        let negate = false;
+        let negateOffset = 0;
+        for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
+          negate = !negate;
+          negateOffset++;
+        }
+        if (negateOffset)
+          this.pattern = pattern.slice(negateOffset);
+        this.negate = negate;
+      }
+      // set partial to true to test if, for example,
+      // "/a/b" matches the start of "/*/b/*/d"
+      // Partial means, if you run out of file before you run
+      // out of pattern, then that's fine, as long as all
+      // the parts match.
+      matchOne(file, pattern, partial = false) {
+        const options = this.options;
+        if (this.isWindows) {
+          const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
+          const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
+          const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
+          const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
+          const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
+          const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
+          if (typeof fdi === "number" && typeof pdi === "number") {
+            const [fd, pd2] = [file[fdi], pattern[pdi]];
+            if (fd.toLowerCase() === pd2.toLowerCase()) {
+              pattern[pdi] = fd;
+              if (pdi > fdi) {
+                pattern = pattern.slice(pdi);
+              } else if (fdi > pdi) {
+                file = file.slice(fdi);
+              }
+            }
+          }
+        }
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+          file = this.levelTwoFileOptimize(file);
+        }
+        this.debug("matchOne", this, { file, pattern });
+        this.debug("matchOne", file.length, pattern.length);
+        for (var fi = 0, pi = 0, fl2 = file.length, pl2 = pattern.length; fi < fl2 && pi < pl2; fi++, pi++) {
+          this.debug("matchOne loop");
+          var p = pattern[pi];
+          var f = file[fi];
+          this.debug(pattern, p, f);
+          if (p === false) {
+            return false;
+          }
+          if (p === exports2.GLOBSTAR) {
+            this.debug("GLOBSTAR", [pattern, p, f]);
+            var fr2 = fi;
+            var pr = pi + 1;
+            if (pr === pl2) {
+              this.debug("** at the end");
+              for (; fi < fl2; fi++) {
+                if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
+                  return false;
+              }
+              return true;
+            }
+            while (fr2 < fl2) {
+              var swallowee = file[fr2];
+              this.debug("\nglobstar while", file, fr2, pattern, pr, swallowee);
+              if (this.matchOne(file.slice(fr2), pattern.slice(pr), partial)) {
+                this.debug("globstar found match!", fr2, fl2, swallowee);
+                return true;
+              } else {
+                if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
+                  this.debug("dot detected!", file, fr2, pattern, pr);
+                  break;
+                }
+                this.debug("globstar swallow a segment, and continue");
+                fr2++;
+              }
+            }
+            if (partial) {
+              this.debug("\n>>> no match, partial?", file, fr2, pattern, pr);
+              if (fr2 === fl2) {
+                return true;
+              }
+            }
+            return false;
+          }
+          let hit;
+          if (typeof p === "string") {
+            hit = f === p;
+            this.debug("string match", p, f, hit);
+          } else {
+            hit = p.test(f);
+            this.debug("pattern match", p, f, hit);
+          }
+          if (!hit)
+            return false;
+        }
+        if (fi === fl2 && pi === pl2) {
+          return true;
+        } else if (fi === fl2) {
+          return partial;
+        } else if (pi === pl2) {
+          return fi === fl2 - 1 && file[fi] === "";
+        } else {
+          throw new Error("wtf?");
+        }
+      }
+      braceExpand() {
+        return (0, exports2.braceExpand)(this.pattern, this.options);
+      }
+      parse(pattern) {
+        (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
+        const options = this.options;
+        if (pattern === "**")
+          return exports2.GLOBSTAR;
+        if (pattern === "")
+          return "";
+        let m;
+        let fastTest = null;
+        if (m = pattern.match(starRE)) {
+          fastTest = options.dot ? starTestDot : starTest;
+        } else if (m = pattern.match(starDotExtRE)) {
+          fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
+        } else if (m = pattern.match(qmarksRE)) {
+          fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
+        } else if (m = pattern.match(starDotStarRE)) {
+          fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
+        } else if (m = pattern.match(dotStarRE)) {
+          fastTest = dotStarTest;
+        }
+        const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
+        if (fastTest && typeof re === "object") {
+          Reflect.defineProperty(re, "test", { value: fastTest });
+        }
+        return re;
+      }
+      makeRe() {
+        if (this.regexp || this.regexp === false)
+          return this.regexp;
+        const set = this.set;
+        if (!set.length) {
+          this.regexp = false;
+          return this.regexp;
+        }
+        const options = this.options;
+        const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
+        const flags = new Set(options.nocase ? ["i"] : []);
+        let re = set.map((pattern) => {
+          const pp = pattern.map((p) => {
+            if (p instanceof RegExp) {
+              for (const f of p.flags.split(""))
+                flags.add(f);
+            }
+            return typeof p === "string" ? regExpEscape(p) : p === exports2.GLOBSTAR ? exports2.GLOBSTAR : p._src;
+          });
+          pp.forEach((p, i) => {
+            const next = pp[i + 1];
+            const prev = pp[i - 1];
+            if (p !== exports2.GLOBSTAR || prev === exports2.GLOBSTAR) {
+              return;
+            }
+            if (prev === void 0) {
+              if (next !== void 0 && next !== exports2.GLOBSTAR) {
+                pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
+              } else {
+                pp[i] = twoStar;
+              }
+            } else if (next === void 0) {
+              pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
+            } else if (next !== exports2.GLOBSTAR) {
+              pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
+              pp[i + 1] = exports2.GLOBSTAR;
+            }
+          });
+          return pp.filter((p) => p !== exports2.GLOBSTAR).join("/");
+        }).join("|");
+        const [open2, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
+        re = "^" + open2 + re + close + "$";
+        if (this.negate)
+          re = "^(?!" + re + ").+$";
+        try {
+          this.regexp = new RegExp(re, [...flags].join(""));
+        } catch (ex) {
+          this.regexp = false;
+        }
+        return this.regexp;
+      }
+      slashSplit(p) {
+        if (this.preserveMultipleSlashes) {
+          return p.split("/");
+        } else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+          return ["", ...p.split(/\/+/)];
+        } else {
+          return p.split(/\/+/);
+        }
+      }
+      match(f, partial = this.partial) {
+        this.debug("match", f, this.pattern);
+        if (this.comment) {
+          return false;
+        }
+        if (this.empty) {
+          return f === "";
+        }
+        if (f === "/" && partial) {
+          return true;
+        }
+        const options = this.options;
+        if (this.isWindows) {
+          f = f.split("\\").join("/");
+        }
+        const ff = this.slashSplit(f);
+        this.debug(this.pattern, "split", ff);
+        const set = this.set;
+        this.debug(this.pattern, "set", set);
+        let filename = ff[ff.length - 1];
+        if (!filename) {
+          for (let i = ff.length - 2; !filename && i >= 0; i--) {
+            filename = ff[i];
+          }
+        }
+        for (let i = 0; i < set.length; i++) {
+          const pattern = set[i];
+          let file = ff;
+          if (options.matchBase && pattern.length === 1) {
+            file = [filename];
+          }
+          const hit = this.matchOne(file, pattern, partial);
+          if (hit) {
+            if (options.flipNegate) {
+              return true;
+            }
+            return !this.negate;
+          }
+        }
+        if (options.flipNegate) {
+          return false;
+        }
+        return this.negate;
+      }
+      static defaults(def) {
+        return exports2.minimatch.defaults(def).Minimatch;
+      }
+    };
+    exports2.Minimatch = Minimatch;
+    var ast_js_2 = require_ast();
+    Object.defineProperty(exports2, "AST", { enumerable: true, get: function() {
+      return ast_js_2.AST;
+    } });
+    var escape_js_2 = require_escape();
+    Object.defineProperty(exports2, "escape", { enumerable: true, get: function() {
+      return escape_js_2.escape;
+    } });
+    var unescape_js_2 = require_unescape();
+    Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() {
+      return unescape_js_2.unescape;
+    } });
+    exports2.minimatch.AST = ast_js_1.AST;
+    exports2.minimatch.Minimatch = Minimatch;
+    exports2.minimatch.escape = escape_js_1.escape;
+    exports2.minimatch.unescape = unescape_js_1.unescape;
+  }
+});
+
+// node_modules/lru-cache/dist/commonjs/index.js
+var require_commonjs4 = __commonJS({
+  "node_modules/lru-cache/dist/commonjs/index.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.LRUCache = void 0;
+    var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
+    var warned = /* @__PURE__ */ new Set();
+    var PROCESS = typeof process === "object" && !!process ? process : {};
+    var emitWarning = (msg, type, code, fn) => {
+      typeof PROCESS.emitWarning === "function" ? PROCESS.emitWarning(msg, type, code, fn) : console.error(`[${code}] ${type}: ${msg}`);
+    };
+    var AC = globalThis.AbortController;
+    var AS = globalThis.AbortSignal;
+    if (typeof AC === "undefined") {
+      AS = class AbortSignal {
+        onabort;
+        _onabort = [];
+        reason;
+        aborted = false;
+        addEventListener(_, fn) {
+          this._onabort.push(fn);
+        }
+      };
+      AC = class AbortController {
+        constructor() {
+          warnACPolyfill();
+        }
+        signal = new AS();
+        abort(reason) {
+          if (this.signal.aborted)
+            return;
+          this.signal.reason = reason;
+          this.signal.aborted = true;
+          for (const fn of this.signal._onabort) {
+            fn(reason);
+          }
+          this.signal.onabort?.(reason);
+        }
+      };
+      let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1";
+      const warnACPolyfill = () => {
+        if (!printACPolyfillWarning)
+          return;
+        printACPolyfillWarning = false;
+        emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill);
+      };
+    }
+    var shouldWarn = (code) => !warned.has(code);
+    var TYPE = Symbol("type");
+    var isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
+    var getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
+    var ZeroArray = class extends Array {
+      constructor(size) {
+        super(size);
+        this.fill(0);
+      }
+    };
+    var Stack = class _Stack {
+      heap;
+      length;
+      // private constructor
+      static #constructing = false;
+      static create(max) {
+        const HeapCls = getUintArray(max);
+        if (!HeapCls)
+          return [];
+        _Stack.#constructing = true;
+        const s = new _Stack(max, HeapCls);
+        _Stack.#constructing = false;
+        return s;
+      }
+      constructor(max, HeapCls) {
+        if (!_Stack.#constructing) {
+          throw new TypeError("instantiate Stack using Stack.create(n)");
+        }
+        this.heap = new HeapCls(max);
+        this.length = 0;
+      }
+      push(n) {
+        this.heap[this.length++] = n;
+      }
+      pop() {
+        return this.heap[--this.length];
+      }
+    };
+    var LRUCache2 = class _LRUCache {
+      // options that cannot be changed without disaster
+      #max;
+      #maxSize;
+      #dispose;
+      #onInsert;
+      #disposeAfter;
+      #fetchMethod;
+      #memoMethod;
+      /**
+       * {@link LRUCache.OptionsBase.ttl}
+       */
+      ttl;
+      /**
+       * {@link LRUCache.OptionsBase.ttlResolution}
+       */
+      ttlResolution;
+      /**
+       * {@link LRUCache.OptionsBase.ttlAutopurge}
+       */
+      ttlAutopurge;
+      /**
+       * {@link LRUCache.OptionsBase.updateAgeOnGet}
+       */
+      updateAgeOnGet;
+      /**
+       * {@link LRUCache.OptionsBase.updateAgeOnHas}
+       */
+      updateAgeOnHas;
+      /**
+       * {@link LRUCache.OptionsBase.allowStale}
+       */
+      allowStale;
+      /**
+       * {@link LRUCache.OptionsBase.noDisposeOnSet}
+       */
+      noDisposeOnSet;
+      /**
+       * {@link LRUCache.OptionsBase.noUpdateTTL}
+       */
+      noUpdateTTL;
+      /**
+       * {@link LRUCache.OptionsBase.maxEntrySize}
+       */
+      maxEntrySize;
+      /**
+       * {@link LRUCache.OptionsBase.sizeCalculation}
+       */
+      sizeCalculation;
+      /**
+       * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
+       */
+      noDeleteOnFetchRejection;
+      /**
+       * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
+       */
+      noDeleteOnStaleGet;
+      /**
+       * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
+       */
+      allowStaleOnFetchAbort;
+      /**
+       * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
+       */
+      allowStaleOnFetchRejection;
+      /**
+       * {@link LRUCache.OptionsBase.ignoreFetchAbort}
+       */
+      ignoreFetchAbort;
+      // computed properties
+      #size;
+      #calculatedSize;
+      #keyMap;
+      #keyList;
+      #valList;
+      #next;
+      #prev;
+      #head;
+      #tail;
+      #free;
+      #disposed;
+      #sizes;
+      #starts;
+      #ttls;
+      #hasDispose;
+      #hasFetchMethod;
+      #hasDisposeAfter;
+      #hasOnInsert;
+      /**
+       * Do not call this method unless you need to inspect the
+       * inner workings of the cache.  If anything returned by this
+       * object is modified in any way, strange breakage may occur.
+       *
+       * These fields are private for a reason!
+       *
+       * @internal
+       */
+      static unsafeExposeInternals(c) {
+        return {
+          // properties
+          starts: c.#starts,
+          ttls: c.#ttls,
+          sizes: c.#sizes,
+          keyMap: c.#keyMap,
+          keyList: c.#keyList,
+          valList: c.#valList,
+          next: c.#next,
+          prev: c.#prev,
+          get head() {
+            return c.#head;
+          },
+          get tail() {
+            return c.#tail;
+          },
+          free: c.#free,
+          // methods
+          isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
+          backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
+          moveToTail: (index) => c.#moveToTail(index),
+          indexes: (options) => c.#indexes(options),
+          rindexes: (options) => c.#rindexes(options),
+          isStale: (index) => c.#isStale(index)
+        };
+      }
+      // Protected read-only members
+      /**
+       * {@link LRUCache.OptionsBase.max} (read-only)
+       */
+      get max() {
+        return this.#max;
+      }
+      /**
+       * {@link LRUCache.OptionsBase.maxSize} (read-only)
+       */
+      get maxSize() {
+        return this.#maxSize;
+      }
+      /**
+       * The total computed size of items in the cache (read-only)
+       */
+      get calculatedSize() {
+        return this.#calculatedSize;
+      }
+      /**
+       * The number of items stored in the cache (read-only)
+       */
+      get size() {
+        return this.#size;
+      }
+      /**
+       * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
+       */
+      get fetchMethod() {
+        return this.#fetchMethod;
+      }
+      get memoMethod() {
+        return this.#memoMethod;
+      }
+      /**
+       * {@link LRUCache.OptionsBase.dispose} (read-only)
+       */
+      get dispose() {
+        return this.#dispose;
+      }
+      /**
+       * {@link LRUCache.OptionsBase.onInsert} (read-only)
+       */
+      get onInsert() {
+        return this.#onInsert;
+      }
+      /**
+       * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
+       */
+      get disposeAfter() {
+        return this.#disposeAfter;
+      }
+      constructor(options) {
+        const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, onInsert, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
+        if (max !== 0 && !isPosInt(max)) {
+          throw new TypeError("max option must be a nonnegative integer");
+        }
+        const UintArray = max ? getUintArray(max) : Array;
+        if (!UintArray) {
+          throw new Error("invalid max value: " + max);
+        }
+        this.#max = max;
+        this.#maxSize = maxSize;
+        this.maxEntrySize = maxEntrySize || this.#maxSize;
+        this.sizeCalculation = sizeCalculation;
+        if (this.sizeCalculation) {
+          if (!this.#maxSize && !this.maxEntrySize) {
+            throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
+          }
+          if (typeof this.sizeCalculation !== "function") {
+            throw new TypeError("sizeCalculation set to non-function");
+          }
+        }
+        if (memoMethod !== void 0 && typeof memoMethod !== "function") {
+          throw new TypeError("memoMethod must be a function if defined");
+        }
+        this.#memoMethod = memoMethod;
+        if (fetchMethod !== void 0 && typeof fetchMethod !== "function") {
+          throw new TypeError("fetchMethod must be a function if specified");
+        }
+        this.#fetchMethod = fetchMethod;
+        this.#hasFetchMethod = !!fetchMethod;
+        this.#keyMap = /* @__PURE__ */ new Map();
+        this.#keyList = new Array(max).fill(void 0);
+        this.#valList = new Array(max).fill(void 0);
+        this.#next = new UintArray(max);
+        this.#prev = new UintArray(max);
+        this.#head = 0;
+        this.#tail = 0;
+        this.#free = Stack.create(max);
+        this.#size = 0;
+        this.#calculatedSize = 0;
+        if (typeof dispose === "function") {
+          this.#dispose = dispose;
+        }
+        if (typeof onInsert === "function") {
+          this.#onInsert = onInsert;
+        }
+        if (typeof disposeAfter === "function") {
+          this.#disposeAfter = disposeAfter;
+          this.#disposed = [];
+        } else {
+          this.#disposeAfter = void 0;
+          this.#disposed = void 0;
+        }
+        this.#hasDispose = !!this.#dispose;
+        this.#hasOnInsert = !!this.#onInsert;
+        this.#hasDisposeAfter = !!this.#disposeAfter;
+        this.noDisposeOnSet = !!noDisposeOnSet;
+        this.noUpdateTTL = !!noUpdateTTL;
+        this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
+        this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
+        this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
+        this.ignoreFetchAbort = !!ignoreFetchAbort;
+        if (this.maxEntrySize !== 0) {
+          if (this.#maxSize !== 0) {
+            if (!isPosInt(this.#maxSize)) {
+              throw new TypeError("maxSize must be a positive integer if specified");
+            }
+          }
+          if (!isPosInt(this.maxEntrySize)) {
+            throw new TypeError("maxEntrySize must be a positive integer if specified");
+          }
+          this.#initializeSizeTracking();
+        }
+        this.allowStale = !!allowStale;
+        this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
+        this.updateAgeOnGet = !!updateAgeOnGet;
+        this.updateAgeOnHas = !!updateAgeOnHas;
+        this.ttlResolution = isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
+        this.ttlAutopurge = !!ttlAutopurge;
+        this.ttl = ttl || 0;
+        if (this.ttl) {
+          if (!isPosInt(this.ttl)) {
+            throw new TypeError("ttl must be a positive integer if specified");
+          }
+          this.#initializeTTLTracking();
+        }
+        if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
+          throw new TypeError("At least one of max, maxSize, or ttl is required");
+        }
+        if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
+          const code = "LRU_CACHE_UNBOUNDED";
+          if (shouldWarn(code)) {
+            warned.add(code);
+            const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
+            emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache);
+          }
+        }
+      }
+      /**
+       * Return the number of ms left in the item's TTL. If item is not in cache,
+       * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
+       */
+      getRemainingTTL(key) {
+        return this.#keyMap.has(key) ? Infinity : 0;
+      }
+      #initializeTTLTracking() {
+        const ttls = new ZeroArray(this.#max);
+        const starts = new ZeroArray(this.#max);
+        this.#ttls = ttls;
+        this.#starts = starts;
+        this.#setItemTTL = (index, ttl, start = perf.now()) => {
+          starts[index] = ttl !== 0 ? start : 0;
+          ttls[index] = ttl;
+          if (ttl !== 0 && this.ttlAutopurge) {
+            const t = setTimeout(() => {
+              if (this.#isStale(index)) {
+                this.#delete(this.#keyList[index], "expire");
+              }
+            }, ttl + 1);
+            if (t.unref) {
+              t.unref();
+            }
+          }
+        };
+        this.#updateItemAge = (index) => {
+          starts[index] = ttls[index] !== 0 ? perf.now() : 0;
+        };
+        this.#statusTTL = (status, index) => {
+          if (ttls[index]) {
+            const ttl = ttls[index];
+            const start = starts[index];
+            if (!ttl || !start)
+              return;
+            status.ttl = ttl;
+            status.start = start;
+            status.now = cachedNow || getNow();
+            const age = status.now - start;
+            status.remainingTTL = ttl - age;
+          }
+        };
+        let cachedNow = 0;
+        const getNow = () => {
+          const n = perf.now();
+          if (this.ttlResolution > 0) {
+            cachedNow = n;
+            const t = setTimeout(() => cachedNow = 0, this.ttlResolution);
+            if (t.unref) {
+              t.unref();
+            }
+          }
+          return n;
+        };
+        this.getRemainingTTL = (key) => {
+          const index = this.#keyMap.get(key);
+          if (index === void 0) {
+            return 0;
+          }
+          const ttl = ttls[index];
+          const start = starts[index];
+          if (!ttl || !start) {
+            return Infinity;
+          }
+          const age = (cachedNow || getNow()) - start;
+          return ttl - age;
+        };
+        this.#isStale = (index) => {
+          const s = starts[index];
+          const t = ttls[index];
+          return !!t && !!s && (cachedNow || getNow()) - s > t;
+        };
+      }
+      // conditionally set private methods related to TTL
+      #updateItemAge = () => {
+      };
+      #statusTTL = () => {
+      };
+      #setItemTTL = () => {
+      };
+      /* c8 ignore stop */
+      #isStale = () => false;
+      #initializeSizeTracking() {
+        const sizes = new ZeroArray(this.#max);
+        this.#calculatedSize = 0;
+        this.#sizes = sizes;
+        this.#removeItemSize = (index) => {
+          this.#calculatedSize -= sizes[index];
+          sizes[index] = 0;
+        };
+        this.#requireSize = (k, v, size, sizeCalculation) => {
+          if (this.#isBackgroundFetch(v)) {
+            return 0;
+          }
+          if (!isPosInt(size)) {
+            if (sizeCalculation) {
+              if (typeof sizeCalculation !== "function") {
+                throw new TypeError("sizeCalculation must be a function");
+              }
+              size = sizeCalculation(v, k);
+              if (!isPosInt(size)) {
+                throw new TypeError("sizeCalculation return invalid (expect positive integer)");
+              }
+            } else {
+              throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
+            }
+          }
+          return size;
+        };
+        this.#addItemSize = (index, size, status) => {
+          sizes[index] = size;
+          if (this.#maxSize) {
+            const maxSize = this.#maxSize - sizes[index];
+            while (this.#calculatedSize > maxSize) {
+              this.#evict(true);
+            }
+          }
+          this.#calculatedSize += sizes[index];
+          if (status) {
+            status.entrySize = size;
+            status.totalCalculatedSize = this.#calculatedSize;
+          }
+        };
+      }
+      #removeItemSize = (_i) => {
+      };
+      #addItemSize = (_i, _s2, _st) => {
+      };
+      #requireSize = (_k, _v, size, sizeCalculation) => {
+        if (size || sizeCalculation) {
+          throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
+        }
+        return 0;
+      };
+      *#indexes({ allowStale = this.allowStale } = {}) {
+        if (this.#size) {
+          for (let i = this.#tail; true; ) {
+            if (!this.#isValidIndex(i)) {
+              break;
+            }
+            if (allowStale || !this.#isStale(i)) {
+              yield i;
+            }
+            if (i === this.#head) {
+              break;
+            } else {
+              i = this.#prev[i];
+            }
+          }
+        }
+      }
+      *#rindexes({ allowStale = this.allowStale } = {}) {
+        if (this.#size) {
+          for (let i = this.#head; true; ) {
+            if (!this.#isValidIndex(i)) {
+              break;
+            }
+            if (allowStale || !this.#isStale(i)) {
+              yield i;
+            }
+            if (i === this.#tail) {
+              break;
+            } else {
+              i = this.#next[i];
+            }
+          }
+        }
+      }
+      #isValidIndex(index) {
+        return index !== void 0 && this.#keyMap.get(this.#keyList[index]) === index;
+      }
+      /**
+       * Return a generator yielding `[key, value]` pairs,
+       * in order from most recently used to least recently used.
+       */
+      *entries() {
+        for (const i of this.#indexes()) {
+          if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
+            yield [this.#keyList[i], this.#valList[i]];
+          }
+        }
+      }
+      /**
+       * Inverse order version of {@link LRUCache.entries}
+       *
+       * Return a generator yielding `[key, value]` pairs,
+       * in order from least recently used to most recently used.
+       */
+      *rentries() {
+        for (const i of this.#rindexes()) {
+          if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
+            yield [this.#keyList[i], this.#valList[i]];
+          }
+        }
+      }
+      /**
+       * Return a generator yielding the keys in the cache,
+       * in order from most recently used to least recently used.
+       */
+      *keys() {
+        for (const i of this.#indexes()) {
+          const k = this.#keyList[i];
+          if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
+            yield k;
+          }
+        }
+      }
+      /**
+       * Inverse order version of {@link LRUCache.keys}
+       *
+       * Return a generator yielding the keys in the cache,
+       * in order from least recently used to most recently used.
+       */
+      *rkeys() {
+        for (const i of this.#rindexes()) {
+          const k = this.#keyList[i];
+          if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
+            yield k;
+          }
+        }
+      }
+      /**
+       * Return a generator yielding the values in the cache,
+       * in order from most recently used to least recently used.
+       */
+      *values() {
+        for (const i of this.#indexes()) {
+          const v = this.#valList[i];
+          if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
+            yield this.#valList[i];
+          }
+        }
+      }
+      /**
+       * Inverse order version of {@link LRUCache.values}
+       *
+       * Return a generator yielding the values in the cache,
+       * in order from least recently used to most recently used.
+       */
+      *rvalues() {
+        for (const i of this.#rindexes()) {
+          const v = this.#valList[i];
+          if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
+            yield this.#valList[i];
+          }
+        }
+      }
+      /**
+       * Iterating over the cache itself yields the same results as
+       * {@link LRUCache.entries}
+       */
+      [Symbol.iterator]() {
+        return this.entries();
+      }
+      /**
+       * A String value that is used in the creation of the default string
+       * description of an object. Called by the built-in method
+       * `Object.prototype.toString`.
+       */
+      [Symbol.toStringTag] = "LRUCache";
+      /**
+       * Find a value for which the supplied fn method returns a truthy value,
+       * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
+       */
+      find(fn, getOptions = {}) {
+        for (const i of this.#indexes()) {
+          const v = this.#valList[i];
+          const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+          if (value === void 0)
+            continue;
+          if (fn(value, this.#keyList[i], this)) {
+            return this.get(this.#keyList[i], getOptions);
+          }
+        }
+      }
+      /**
+       * Call the supplied function on each item in the cache, in order from most
+       * recently used to least recently used.
+       *
+       * `fn` is called as `fn(value, key, cache)`.
+       *
+       * If `thisp` is provided, function will be called in the `this`-context of
+       * the provided object, or the cache if no `thisp` object is provided.
+       *
+       * Does not update age or recenty of use, or iterate over stale values.
+       */
+      forEach(fn, thisp = this) {
+        for (const i of this.#indexes()) {
+          const v = this.#valList[i];
+          const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+          if (value === void 0)
+            continue;
+          fn.call(thisp, value, this.#keyList[i], this);
+        }
+      }
+      /**
+       * The same as {@link LRUCache.forEach} but items are iterated over in
+       * reverse order.  (ie, less recently used items are iterated over first.)
+       */
+      rforEach(fn, thisp = this) {
+        for (const i of this.#rindexes()) {
+          const v = this.#valList[i];
+          const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+          if (value === void 0)
+            continue;
+          fn.call(thisp, value, this.#keyList[i], this);
+        }
+      }
+      /**
+       * Delete any stale entries. Returns true if anything was removed,
+       * false otherwise.
+       */
+      purgeStale() {
+        let deleted = false;
+        for (const i of this.#rindexes({ allowStale: true })) {
+          if (this.#isStale(i)) {
+            this.#delete(this.#keyList[i], "expire");
+            deleted = true;
+          }
+        }
+        return deleted;
+      }
+      /**
+       * Get the extended info about a given entry, to get its value, size, and
+       * TTL info simultaneously. Returns `undefined` if the key is not present.
+       *
+       * Unlike {@link LRUCache#dump}, which is designed to be portable and survive
+       * serialization, the `start` value is always the current timestamp, and the
+       * `ttl` is a calculated remaining time to live (negative if expired).
+       *
+       * Always returns stale values, if their info is found in the cache, so be
+       * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
+       * if relevant.
+       */
+      info(key) {
+        const i = this.#keyMap.get(key);
+        if (i === void 0)
+          return void 0;
+        const v = this.#valList[i];
+        const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+        if (value === void 0)
+          return void 0;
+        const entry = { value };
+        if (this.#ttls && this.#starts) {
+          const ttl = this.#ttls[i];
+          const start = this.#starts[i];
+          if (ttl && start) {
+            const remain = ttl - (perf.now() - start);
+            entry.ttl = remain;
+            entry.start = Date.now();
+          }
+        }
+        if (this.#sizes) {
+          entry.size = this.#sizes[i];
+        }
+        return entry;
+      }
+      /**
+       * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
+       * passed to {@link LRUCache#load}.
+       *
+       * The `start` fields are calculated relative to a portable `Date.now()`
+       * timestamp, even if `performance.now()` is available.
+       *
+       * Stale entries are always included in the `dump`, even if
+       * {@link LRUCache.OptionsBase.allowStale} is false.
+       *
+       * Note: this returns an actual array, not a generator, so it can be more
+       * easily passed around.
+       */
+      dump() {
+        const arr = [];
+        for (const i of this.#indexes({ allowStale: true })) {
+          const key = this.#keyList[i];
+          const v = this.#valList[i];
+          const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+          if (value === void 0 || key === void 0)
+            continue;
+          const entry = { value };
+          if (this.#ttls && this.#starts) {
+            entry.ttl = this.#ttls[i];
+            const age = perf.now() - this.#starts[i];
+            entry.start = Math.floor(Date.now() - age);
+          }
+          if (this.#sizes) {
+            entry.size = this.#sizes[i];
+          }
+          arr.unshift([key, entry]);
+        }
+        return arr;
+      }
+      /**
+       * Reset the cache and load in the items in entries in the order listed.
+       *
+       * The shape of the resulting cache may be different if the same options are
+       * not used in both caches.
+       *
+       * The `start` fields are assumed to be calculated relative to a portable
+       * `Date.now()` timestamp, even if `performance.now()` is available.
+       */
+      load(arr) {
+        this.clear();
+        for (const [key, entry] of arr) {
+          if (entry.start) {
+            const age = Date.now() - entry.start;
+            entry.start = perf.now() - age;
+          }
+          this.set(key, entry.value, entry);
+        }
+      }
+      /**
+       * Add a value to the cache.
+       *
+       * Note: if `undefined` is specified as a value, this is an alias for
+       * {@link LRUCache#delete}
+       *
+       * Fields on the {@link LRUCache.SetOptions} options param will override
+       * their corresponding values in the constructor options for the scope
+       * of this single `set()` operation.
+       *
+       * If `start` is provided, then that will set the effective start
+       * time for the TTL calculation. Note that this must be a previous
+       * value of `performance.now()` if supported, or a previous value of
+       * `Date.now()` if not.
+       *
+       * Options object may also include `size`, which will prevent
+       * calling the `sizeCalculation` function and just use the specified
+       * number if it is a positive integer, and `noDisposeOnSet` which
+       * will prevent calling a `dispose` function in the case of
+       * overwrites.
+       *
+       * If the `size` (or return value of `sizeCalculation`) for a given
+       * entry is greater than `maxEntrySize`, then the item will not be
+       * added to the cache.
+       *
+       * Will update the recency of the entry.
+       *
+       * If the value is `undefined`, then this is an alias for
+       * `cache.delete(key)`. `undefined` is never stored in the cache.
+       */
+      set(k, v, setOptions = {}) {
+        if (v === void 0) {
+          this.delete(k);
+          return this;
+        }
+        const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
+        let { noUpdateTTL = this.noUpdateTTL } = setOptions;
+        const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
+        if (this.maxEntrySize && size > this.maxEntrySize) {
+          if (status) {
+            status.set = "miss";
+            status.maxEntrySizeExceeded = true;
+          }
+          this.#delete(k, "set");
+          return this;
+        }
+        let index = this.#size === 0 ? void 0 : this.#keyMap.get(k);
+        if (index === void 0) {
+          index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size;
+          this.#keyList[index] = k;
+          this.#valList[index] = v;
+          this.#keyMap.set(k, index);
+          this.#next[this.#tail] = index;
+          this.#prev[index] = this.#tail;
+          this.#tail = index;
+          this.#size++;
+          this.#addItemSize(index, size, status);
+          if (status)
+            status.set = "add";
+          noUpdateTTL = false;
+          if (this.#hasOnInsert) {
+            this.#onInsert?.(v, k, "add");
+          }
+        } else {
+          this.#moveToTail(index);
+          const oldVal = this.#valList[index];
+          if (v !== oldVal) {
+            if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
+              oldVal.__abortController.abort(new Error("replaced"));
+              const { __staleWhileFetching: s } = oldVal;
+              if (s !== void 0 && !noDisposeOnSet) {
+                if (this.#hasDispose) {
+                  this.#dispose?.(s, k, "set");
+                }
+                if (this.#hasDisposeAfter) {
+                  this.#disposed?.push([s, k, "set"]);
+                }
+              }
+            } else if (!noDisposeOnSet) {
+              if (this.#hasDispose) {
+                this.#dispose?.(oldVal, k, "set");
+              }
+              if (this.#hasDisposeAfter) {
+                this.#disposed?.push([oldVal, k, "set"]);
+              }
+            }
+            this.#removeItemSize(index);
+            this.#addItemSize(index, size, status);
+            this.#valList[index] = v;
+            if (status) {
+              status.set = "replace";
+              const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
+              if (oldValue !== void 0)
+                status.oldValue = oldValue;
+            }
+          } else if (status) {
+            status.set = "update";
+          }
+          if (this.#hasOnInsert) {
+            this.onInsert?.(v, k, v === oldVal ? "update" : "replace");
+          }
+        }
+        if (ttl !== 0 && !this.#ttls) {
+          this.#initializeTTLTracking();
+        }
+        if (this.#ttls) {
+          if (!noUpdateTTL) {
+            this.#setItemTTL(index, ttl, start);
+          }
+          if (status)
+            this.#statusTTL(status, index);
+        }
+        if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
+          const dt = this.#disposed;
+          let task;
+          while (task = dt?.shift()) {
+            this.#disposeAfter?.(...task);
+          }
+        }
+        return this;
+      }
+      /**
+       * Evict the least recently used item, returning its value or
+       * `undefined` if cache is empty.
+       */
+      pop() {
+        try {
+          while (this.#size) {
+            const val = this.#valList[this.#head];
+            this.#evict(true);
+            if (this.#isBackgroundFetch(val)) {
+              if (val.__staleWhileFetching) {
+                return val.__staleWhileFetching;
+              }
+            } else if (val !== void 0) {
+              return val;
+            }
+          }
+        } finally {
+          if (this.#hasDisposeAfter && this.#disposed) {
+            const dt = this.#disposed;
+            let task;
+            while (task = dt?.shift()) {
+              this.#disposeAfter?.(...task);
+            }
+          }
+        }
+      }
+      #evict(free) {
+        const head = this.#head;
+        const k = this.#keyList[head];
+        const v = this.#valList[head];
+        if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
+          v.__abortController.abort(new Error("evicted"));
+        } else if (this.#hasDispose || this.#hasDisposeAfter) {
+          if (this.#hasDispose) {
+            this.#dispose?.(v, k, "evict");
+          }
+          if (this.#hasDisposeAfter) {
+            this.#disposed?.push([v, k, "evict"]);
+          }
+        }
+        this.#removeItemSize(head);
+        if (free) {
+          this.#keyList[head] = void 0;
+          this.#valList[head] = void 0;
+          this.#free.push(head);
+        }
+        if (this.#size === 1) {
+          this.#head = this.#tail = 0;
+          this.#free.length = 0;
+        } else {
+          this.#head = this.#next[head];
+        }
+        this.#keyMap.delete(k);
+        this.#size--;
+        return head;
+      }
+      /**
+       * Check if a key is in the cache, without updating the recency of use.
+       * Will return false if the item is stale, even though it is technically
+       * in the cache.
+       *
+       * Check if a key is in the cache, without updating the recency of
+       * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
+       * to `true` in either the options or the constructor.
+       *
+       * Will return `false` if the item is stale, even though it is technically in
+       * the cache. The difference can be determined (if it matters) by using a
+       * `status` argument, and inspecting the `has` field.
+       *
+       * Will not update item age unless
+       * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
+       */
+      has(k, hasOptions = {}) {
+        const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
+        const index = this.#keyMap.get(k);
+        if (index !== void 0) {
+          const v = this.#valList[index];
+          if (this.#isBackgroundFetch(v) && v.__staleWhileFetching === void 0) {
+            return false;
+          }
+          if (!this.#isStale(index)) {
+            if (updateAgeOnHas) {
+              this.#updateItemAge(index);
+            }
+            if (status) {
+              status.has = "hit";
+              this.#statusTTL(status, index);
+            }
+            return true;
+          } else if (status) {
+            status.has = "stale";
+            this.#statusTTL(status, index);
+          }
+        } else if (status) {
+          status.has = "miss";
+        }
+        return false;
+      }
+      /**
+       * Like {@link LRUCache#get} but doesn't update recency or delete stale
+       * items.
+       *
+       * Returns `undefined` if the item is stale, unless
+       * {@link LRUCache.OptionsBase.allowStale} is set.
+       */
+      peek(k, peekOptions = {}) {
+        const { allowStale = this.allowStale } = peekOptions;
+        const index = this.#keyMap.get(k);
+        if (index === void 0 || !allowStale && this.#isStale(index)) {
+          return;
+        }
+        const v = this.#valList[index];
+        return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+      }
+      #backgroundFetch(k, index, options, context) {
+        const v = index === void 0 ? void 0 : this.#valList[index];
+        if (this.#isBackgroundFetch(v)) {
+          return v;
+        }
+        const ac = new AC();
+        const { signal } = options;
+        signal?.addEventListener("abort", () => ac.abort(signal.reason), {
+          signal: ac.signal
+        });
+        const fetchOpts = {
+          signal: ac.signal,
+          options,
+          context
+        };
+        const cb = (v2, updateCache = false) => {
+          const { aborted } = ac.signal;
+          const ignoreAbort = options.ignoreFetchAbort && v2 !== void 0;
+          if (options.status) {
+            if (aborted && !updateCache) {
+              options.status.fetchAborted = true;
+              options.status.fetchError = ac.signal.reason;
+              if (ignoreAbort)
+                options.status.fetchAbortIgnored = true;
+            } else {
+              options.status.fetchResolved = true;
+            }
+          }
+          if (aborted && !ignoreAbort && !updateCache) {
+            return fetchFail(ac.signal.reason);
+          }
+          const bf2 = p;
+          if (this.#valList[index] === p) {
+            if (v2 === void 0) {
+              if (bf2.__staleWhileFetching) {
+                this.#valList[index] = bf2.__staleWhileFetching;
+              } else {
+                this.#delete(k, "fetch");
+              }
+            } else {
+              if (options.status)
+                options.status.fetchUpdated = true;
+              this.set(k, v2, fetchOpts.options);
+            }
+          }
+          return v2;
+        };
+        const eb = (er) => {
+          if (options.status) {
+            options.status.fetchRejected = true;
+            options.status.fetchError = er;
+          }
+          return fetchFail(er);
+        };
+        const fetchFail = (er) => {
+          const { aborted } = ac.signal;
+          const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
+          const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
+          const noDelete = allowStale || options.noDeleteOnFetchRejection;
+          const bf2 = p;
+          if (this.#valList[index] === p) {
+            const del = !noDelete || bf2.__staleWhileFetching === void 0;
+            if (del) {
+              this.#delete(k, "fetch");
+            } else if (!allowStaleAborted) {
+              this.#valList[index] = bf2.__staleWhileFetching;
+            }
+          }
+          if (allowStale) {
+            if (options.status && bf2.__staleWhileFetching !== void 0) {
+              options.status.returnedStale = true;
+            }
+            return bf2.__staleWhileFetching;
+          } else if (bf2.__returned === bf2) {
+            throw er;
+          }
+        };
+        const pcall = (res, rej) => {
+          const fmp = this.#fetchMethod?.(k, v, fetchOpts);
+          if (fmp && fmp instanceof Promise) {
+            fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
+          }
+          ac.signal.addEventListener("abort", () => {
+            if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
+              res(void 0);
+              if (options.allowStaleOnFetchAbort) {
+                res = (v2) => cb(v2, true);
+              }
+            }
+          });
+        };
+        if (options.status)
+          options.status.fetchDispatched = true;
+        const p = new Promise(pcall).then(cb, eb);
+        const bf = Object.assign(p, {
+          __abortController: ac,
+          __staleWhileFetching: v,
+          __returned: void 0
+        });
+        if (index === void 0) {
+          this.set(k, bf, { ...fetchOpts.options, status: void 0 });
+          index = this.#keyMap.get(k);
+        } else {
+          this.#valList[index] = bf;
+        }
+        return bf;
+      }
+      #isBackgroundFetch(p) {
+        if (!this.#hasFetchMethod)
+          return false;
+        const b = p;
+        return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
+      }
+      async fetch(k, fetchOptions = {}) {
+        const {
+          // get options
+          allowStale = this.allowStale,
+          updateAgeOnGet = this.updateAgeOnGet,
+          noDeleteOnStaleGet = this.noDeleteOnStaleGet,
+          // set options
+          ttl = this.ttl,
+          noDisposeOnSet = this.noDisposeOnSet,
+          size = 0,
+          sizeCalculation = this.sizeCalculation,
+          noUpdateTTL = this.noUpdateTTL,
+          // fetch exclusive options
+          noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,
+          allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
+          ignoreFetchAbort = this.ignoreFetchAbort,
+          allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
+          context,
+          forceRefresh = false,
+          status,
+          signal
+        } = fetchOptions;
+        if (!this.#hasFetchMethod) {
+          if (status)
+            status.fetch = "get";
+          return this.get(k, {
+            allowStale,
+            updateAgeOnGet,
+            noDeleteOnStaleGet,
+            status
+          });
+        }
+        const options = {
+          allowStale,
+          updateAgeOnGet,
+          noDeleteOnStaleGet,
+          ttl,
+          noDisposeOnSet,
+          size,
+          sizeCalculation,
+          noUpdateTTL,
+          noDeleteOnFetchRejection,
+          allowStaleOnFetchRejection,
+          allowStaleOnFetchAbort,
+          ignoreFetchAbort,
+          status,
+          signal
+        };
+        let index = this.#keyMap.get(k);
+        if (index === void 0) {
+          if (status)
+            status.fetch = "miss";
+          const p = this.#backgroundFetch(k, index, options, context);
+          return p.__returned = p;
+        } else {
+          const v = this.#valList[index];
+          if (this.#isBackgroundFetch(v)) {
+            const stale = allowStale && v.__staleWhileFetching !== void 0;
+            if (status) {
+              status.fetch = "inflight";
+              if (stale)
+                status.returnedStale = true;
+            }
+            return stale ? v.__staleWhileFetching : v.__returned = v;
+          }
+          const isStale = this.#isStale(index);
+          if (!forceRefresh && !isStale) {
+            if (status)
+              status.fetch = "hit";
+            this.#moveToTail(index);
+            if (updateAgeOnGet) {
+              this.#updateItemAge(index);
+            }
+            if (status)
+              this.#statusTTL(status, index);
+            return v;
+          }
+          const p = this.#backgroundFetch(k, index, options, context);
+          const hasStale = p.__staleWhileFetching !== void 0;
+          const staleVal = hasStale && allowStale;
+          if (status) {
+            status.fetch = isStale ? "stale" : "refresh";
+            if (staleVal && isStale)
+              status.returnedStale = true;
+          }
+          return staleVal ? p.__staleWhileFetching : p.__returned = p;
+        }
+      }
+      async forceFetch(k, fetchOptions = {}) {
+        const v = await this.fetch(k, fetchOptions);
+        if (v === void 0)
+          throw new Error("fetch() returned undefined");
+        return v;
+      }
+      memo(k, memoOptions = {}) {
+        const memoMethod = this.#memoMethod;
+        if (!memoMethod) {
+          throw new Error("no memoMethod provided to constructor");
+        }
+        const { context, forceRefresh, ...options } = memoOptions;
+        const v = this.get(k, options);
+        if (!forceRefresh && v !== void 0)
+          return v;
+        const vv = memoMethod(k, v, {
+          options,
+          context
+        });
+        this.set(k, vv, options);
+        return vv;
+      }
+      /**
+       * Return a value from the cache. Will update the recency of the cache
+       * entry found.
+       *
+       * If the key is not found, get() will return `undefined`.
+       */
+      get(k, getOptions = {}) {
+        const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions;
+        const index = this.#keyMap.get(k);
+        if (index !== void 0) {
+          const value = this.#valList[index];
+          const fetching = this.#isBackgroundFetch(value);
+          if (status)
+            this.#statusTTL(status, index);
+          if (this.#isStale(index)) {
+            if (status)
+              status.get = "stale";
+            if (!fetching) {
+              if (!noDeleteOnStaleGet) {
+                this.#delete(k, "expire");
+              }
+              if (status && allowStale)
+                status.returnedStale = true;
+              return allowStale ? value : void 0;
+            } else {
+              if (status && allowStale && value.__staleWhileFetching !== void 0) {
+                status.returnedStale = true;
+              }
+              return allowStale ? value.__staleWhileFetching : void 0;
+            }
+          } else {
+            if (status)
+              status.get = "hit";
+            if (fetching) {
+              return value.__staleWhileFetching;
+            }
+            this.#moveToTail(index);
+            if (updateAgeOnGet) {
+              this.#updateItemAge(index);
+            }
+            return value;
+          }
+        } else if (status) {
+          status.get = "miss";
+        }
+      }
+      #connect(p, n) {
+        this.#prev[n] = p;
+        this.#next[p] = n;
+      }
+      #moveToTail(index) {
+        if (index !== this.#tail) {
+          if (index === this.#head) {
+            this.#head = this.#next[index];
+          } else {
+            this.#connect(this.#prev[index], this.#next[index]);
+          }
+          this.#connect(this.#tail, index);
+          this.#tail = index;
+        }
+      }
+      /**
+       * Deletes a key out of the cache.
+       *
+       * Returns true if the key was deleted, false otherwise.
+       */
+      delete(k) {
+        return this.#delete(k, "delete");
+      }
+      #delete(k, reason) {
+        let deleted = false;
+        if (this.#size !== 0) {
+          const index = this.#keyMap.get(k);
+          if (index !== void 0) {
+            deleted = true;
+            if (this.#size === 1) {
+              this.#clear(reason);
+            } else {
+              this.#removeItemSize(index);
+              const v = this.#valList[index];
+              if (this.#isBackgroundFetch(v)) {
+                v.__abortController.abort(new Error("deleted"));
+              } else if (this.#hasDispose || this.#hasDisposeAfter) {
+                if (this.#hasDispose) {
+                  this.#dispose?.(v, k, reason);
+                }
+                if (this.#hasDisposeAfter) {
+                  this.#disposed?.push([v, k, reason]);
+                }
+              }
+              this.#keyMap.delete(k);
+              this.#keyList[index] = void 0;
+              this.#valList[index] = void 0;
+              if (index === this.#tail) {
+                this.#tail = this.#prev[index];
+              } else if (index === this.#head) {
+                this.#head = this.#next[index];
+              } else {
+                const pi = this.#prev[index];
+                this.#next[pi] = this.#next[index];
+                const ni = this.#next[index];
+                this.#prev[ni] = this.#prev[index];
+              }
+              this.#size--;
+              this.#free.push(index);
+            }
+          }
+        }
+        if (this.#hasDisposeAfter && this.#disposed?.length) {
+          const dt = this.#disposed;
+          let task;
+          while (task = dt?.shift()) {
+            this.#disposeAfter?.(...task);
+          }
+        }
+        return deleted;
+      }
+      /**
+       * Clear the cache entirely, throwing away all values.
+       */
+      clear() {
+        return this.#clear("delete");
+      }
+      #clear(reason) {
+        for (const index of this.#rindexes({ allowStale: true })) {
+          const v = this.#valList[index];
+          if (this.#isBackgroundFetch(v)) {
+            v.__abortController.abort(new Error("deleted"));
+          } else {
+            const k = this.#keyList[index];
+            if (this.#hasDispose) {
+              this.#dispose?.(v, k, reason);
+            }
+            if (this.#hasDisposeAfter) {
+              this.#disposed?.push([v, k, reason]);
+            }
+          }
+        }
+        this.#keyMap.clear();
+        this.#valList.fill(void 0);
+        this.#keyList.fill(void 0);
+        if (this.#ttls && this.#starts) {
+          this.#ttls.fill(0);
+          this.#starts.fill(0);
+        }
+        if (this.#sizes) {
+          this.#sizes.fill(0);
+        }
+        this.#head = 0;
+        this.#tail = 0;
+        this.#free.length = 0;
+        this.#calculatedSize = 0;
+        this.#size = 0;
+        if (this.#hasDisposeAfter && this.#disposed) {
+          const dt = this.#disposed;
+          let task;
+          while (task = dt?.shift()) {
+            this.#disposeAfter?.(...task);
+          }
+        }
+      }
+    };
+    exports2.LRUCache = LRUCache2;
+  }
+});
+
+// node_modules/minipass/dist/commonjs/index.js
+var require_commonjs5 = __commonJS({
+  "node_modules/minipass/dist/commonjs/index.js"(exports2) {
+    "use strict";
+    var __importDefault = exports2 && exports2.__importDefault || function(mod) {
+      return mod && mod.__esModule ? mod : { "default": mod };
+    };
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.Minipass = exports2.isWritable = exports2.isReadable = exports2.isStream = void 0;
+    var proc = typeof process === "object" && process ? process : {
+      stdout: null,
+      stderr: null
+    };
+    var node_events_1 = require("node:events");
+    var node_stream_1 = __importDefault(require("node:stream"));
+    var node_string_decoder_1 = require("node:string_decoder");
+    var isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof node_stream_1.default || (0, exports2.isReadable)(s) || (0, exports2.isWritable)(s));
+    exports2.isStream = isStream;
+    var isReadable = (s) => !!s && typeof s === "object" && s instanceof node_events_1.EventEmitter && typeof s.pipe === "function" && // node core Writable streams have a pipe() method, but it throws
+    s.pipe !== node_stream_1.default.Writable.prototype.pipe;
+    exports2.isReadable = isReadable;
+    var isWritable = (s) => !!s && typeof s === "object" && s instanceof node_events_1.EventEmitter && typeof s.write === "function" && typeof s.end === "function";
+    exports2.isWritable = isWritable;
+    var EOF = Symbol("EOF");
+    var MAYBE_EMIT_END = Symbol("maybeEmitEnd");
+    var EMITTED_END = Symbol("emittedEnd");
+    var EMITTING_END = Symbol("emittingEnd");
+    var EMITTED_ERROR = Symbol("emittedError");
+    var CLOSED = Symbol("closed");
+    var READ = Symbol("read");
+    var FLUSH = Symbol("flush");
+    var FLUSHCHUNK = Symbol("flushChunk");
+    var ENCODING = Symbol("encoding");
+    var DECODER = Symbol("decoder");
+    var FLOWING = Symbol("flowing");
+    var PAUSED = Symbol("paused");
+    var RESUME = Symbol("resume");
+    var BUFFER = Symbol("buffer");
+    var PIPES = Symbol("pipes");
+    var BUFFERLENGTH = Symbol("bufferLength");
+    var BUFFERPUSH = Symbol("bufferPush");
+    var BUFFERSHIFT = Symbol("bufferShift");
+    var OBJECTMODE = Symbol("objectMode");
+    var DESTROYED = Symbol("destroyed");
+    var ERROR = Symbol("error");
+    var EMITDATA = Symbol("emitData");
+    var EMITEND = Symbol("emitEnd");
+    var EMITEND2 = Symbol("emitEnd2");
+    var ASYNC = Symbol("async");
+    var ABORT = Symbol("abort");
+    var ABORTED = Symbol("aborted");
+    var SIGNAL = Symbol("signal");
+    var DATALISTENERS = Symbol("dataListeners");
+    var DISCARDED = Symbol("discarded");
+    var defer = (fn) => Promise.resolve().then(fn);
+    var nodefer = (fn) => fn();
+    var isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish";
+    var isArrayBufferLike = (b) => b instanceof ArrayBuffer || !!b && typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0;
+    var isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
+    var Pipe = class {
+      src;
+      dest;
+      opts;
+      ondrain;
+      constructor(src, dest, opts) {
+        this.src = src;
+        this.dest = dest;
+        this.opts = opts;
+        this.ondrain = () => src[RESUME]();
+        this.dest.on("drain", this.ondrain);
+      }
+      unpipe() {
+        this.dest.removeListener("drain", this.ondrain);
+      }
+      // only here for the prototype
+      /* c8 ignore start */
+      proxyErrors(_er) {
+      }
+      /* c8 ignore stop */
+      end() {
+        this.unpipe();
+        if (this.opts.end)
+          this.dest.end();
+      }
+    };
+    var PipeProxyErrors = class extends Pipe {
+      unpipe() {
+        this.src.removeListener("error", this.proxyErrors);
+        super.unpipe();
+      }
+      constructor(src, dest, opts) {
+        super(src, dest, opts);
+        this.proxyErrors = (er) => dest.emit("error", er);
+        src.on("error", this.proxyErrors);
+      }
+    };
+    var isObjectModeOptions = (o) => !!o.objectMode;
+    var isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== "buffer";
+    var Minipass = class extends node_events_1.EventEmitter {
+      [FLOWING] = false;
+      [PAUSED] = false;
+      [PIPES] = [];
+      [BUFFER] = [];
+      [OBJECTMODE];
+      [ENCODING];
+      [ASYNC];
+      [DECODER];
+      [EOF] = false;
+      [EMITTED_END] = false;
+      [EMITTING_END] = false;
+      [CLOSED] = false;
+      [EMITTED_ERROR] = null;
+      [BUFFERLENGTH] = 0;
+      [DESTROYED] = false;
+      [SIGNAL];
+      [ABORTED] = false;
+      [DATALISTENERS] = 0;
+      [DISCARDED] = false;
+      /**
+       * true if the stream can be written
+       */
+      writable = true;
+      /**
+       * true if the stream can be read
+       */
+      readable = true;
+      /**
+       * If `RType` is Buffer, then options do not need to be provided.
+       * Otherwise, an options object must be provided to specify either
+       * {@link Minipass.SharedOptions.objectMode} or
+       * {@link Minipass.SharedOptions.encoding}, as appropriate.
+       */
+      constructor(...args) {
+        const options = args[0] || {};
+        super();
+        if (options.objectMode && typeof options.encoding === "string") {
+          throw new TypeError("Encoding and objectMode may not be used together");
+        }
+        if (isObjectModeOptions(options)) {
+          this[OBJECTMODE] = true;
+          this[ENCODING] = null;
+        } else if (isEncodingOptions(options)) {
+          this[ENCODING] = options.encoding;
+          this[OBJECTMODE] = false;
+        } else {
+          this[OBJECTMODE] = false;
+          this[ENCODING] = null;
+        }
+        this[ASYNC] = !!options.async;
+        this[DECODER] = this[ENCODING] ? new node_string_decoder_1.StringDecoder(this[ENCODING]) : null;
+        if (options && options.debugExposeBuffer === true) {
+          Object.defineProperty(this, "buffer", { get: () => this[BUFFER] });
+        }
+        if (options && options.debugExposePipes === true) {
+          Object.defineProperty(this, "pipes", { get: () => this[PIPES] });
+        }
+        const { signal } = options;
+        if (signal) {
+          this[SIGNAL] = signal;
+          if (signal.aborted) {
+            this[ABORT]();
+          } else {
+            signal.addEventListener("abort", () => this[ABORT]());
+          }
+        }
+      }
+      /**
+       * The amount of data stored in the buffer waiting to be read.
+       *
+       * For Buffer strings, this will be the total byte length.
+       * For string encoding streams, this will be the string character length,
+       * according to JavaScript's `string.length` logic.
+       * For objectMode streams, this is a count of the items waiting to be
+       * emitted.
+       */
+      get bufferLength() {
+        return this[BUFFERLENGTH];
+      }
+      /**
+       * The `BufferEncoding` currently in use, or `null`
+       */
+      get encoding() {
+        return this[ENCODING];
+      }
+      /**
+       * @deprecated - This is a read only property
+       */
+      set encoding(_enc) {
+        throw new Error("Encoding must be set at instantiation time");
+      }
+      /**
+       * @deprecated - Encoding may only be set at instantiation time
+       */
+      setEncoding(_enc) {
+        throw new Error("Encoding must be set at instantiation time");
+      }
+      /**
+       * True if this is an objectMode stream
+       */
+      get objectMode() {
+        return this[OBJECTMODE];
+      }
+      /**
+       * @deprecated - This is a read-only property
+       */
+      set objectMode(_om) {
+        throw new Error("objectMode must be set at instantiation time");
+      }
+      /**
+       * true if this is an async stream
+       */
+      get ["async"]() {
+        return this[ASYNC];
+      }
+      /**
+       * Set to true to make this stream async.
+       *
+       * Once set, it cannot be unset, as this would potentially cause incorrect
+       * behavior.  Ie, a sync stream can be made async, but an async stream
+       * cannot be safely made sync.
+       */
+      set ["async"](a) {
+        this[ASYNC] = this[ASYNC] || !!a;
+      }
+      // drop everything and get out of the flow completely
+      [ABORT]() {
+        this[ABORTED] = true;
+        this.emit("abort", this[SIGNAL]?.reason);
+        this.destroy(this[SIGNAL]?.reason);
+      }
+      /**
+       * True if the stream has been aborted.
+       */
+      get aborted() {
+        return this[ABORTED];
+      }
+      /**
+       * No-op setter. Stream aborted status is set via the AbortSignal provided
+       * in the constructor options.
+       */
+      set aborted(_) {
+      }
+      write(chunk, encoding, cb) {
+        if (this[ABORTED])
+          return false;
+        if (this[EOF])
+          throw new Error("write after end");
+        if (this[DESTROYED]) {
+          this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" }));
+          return true;
+        }
+        if (typeof encoding === "function") {
+          cb = encoding;
+          encoding = "utf8";
+        }
+        if (!encoding)
+          encoding = "utf8";
+        const fn = this[ASYNC] ? defer : nodefer;
+        if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
+          if (isArrayBufferView(chunk)) {
+            chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
+          } else if (isArrayBufferLike(chunk)) {
+            chunk = Buffer.from(chunk);
+          } else if (typeof chunk !== "string") {
+            throw new Error("Non-contiguous data written to non-objectMode stream");
+          }
+        }
+        if (this[OBJECTMODE]) {
+          if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
+            this[FLUSH](true);
+          if (this[FLOWING])
+            this.emit("data", chunk);
+          else
+            this[BUFFERPUSH](chunk);
+          if (this[BUFFERLENGTH] !== 0)
+            this.emit("readable");
+          if (cb)
+            fn(cb);
+          return this[FLOWING];
+        }
+        if (!chunk.length) {
+          if (this[BUFFERLENGTH] !== 0)
+            this.emit("readable");
+          if (cb)
+            fn(cb);
+          return this[FLOWING];
+        }
+        if (typeof chunk === "string" && // unless it is a string already ready for us to use
+        !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) {
+          chunk = Buffer.from(chunk, encoding);
+        }
+        if (Buffer.isBuffer(chunk) && this[ENCODING]) {
+          chunk = this[DECODER].write(chunk);
+        }
+        if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
+          this[FLUSH](true);
+        if (this[FLOWING])
+          this.emit("data", chunk);
+        else
+          this[BUFFERPUSH](chunk);
+        if (this[BUFFERLENGTH] !== 0)
+          this.emit("readable");
+        if (cb)
+          fn(cb);
+        return this[FLOWING];
+      }
+      /**
+       * Low-level explicit read method.
+       *
+       * In objectMode, the argument is ignored, and one item is returned if
+       * available.
+       *
+       * `n` is the number of bytes (or in the case of encoding streams,
+       * characters) to consume. If `n` is not provided, then the entire buffer
+       * is returned, or `null` is returned if no data is available.
+       *
+       * If `n` is greater that the amount of data in the internal buffer,
+       * then `null` is returned.
+       */
+      read(n) {
+        if (this[DESTROYED])
+          return null;
+        this[DISCARDED] = false;
+        if (this[BUFFERLENGTH] === 0 || n === 0 || n && n > this[BUFFERLENGTH]) {
+          this[MAYBE_EMIT_END]();
+          return null;
+        }
+        if (this[OBJECTMODE])
+          n = null;
+        if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {
+          this[BUFFER] = [
+            this[ENCODING] ? this[BUFFER].join("") : Buffer.concat(this[BUFFER], this[BUFFERLENGTH])
+          ];
+        }
+        const ret = this[READ](n || null, this[BUFFER][0]);
+        this[MAYBE_EMIT_END]();
+        return ret;
+      }
+      [READ](n, chunk) {
+        if (this[OBJECTMODE])
+          this[BUFFERSHIFT]();
+        else {
+          const c = chunk;
+          if (n === c.length || n === null)
+            this[BUFFERSHIFT]();
+          else if (typeof c === "string") {
+            this[BUFFER][0] = c.slice(n);
+            chunk = c.slice(0, n);
+            this[BUFFERLENGTH] -= n;
+          } else {
+            this[BUFFER][0] = c.subarray(n);
+            chunk = c.subarray(0, n);
+            this[BUFFERLENGTH] -= n;
+          }
+        }
+        this.emit("data", chunk);
+        if (!this[BUFFER].length && !this[EOF])
+          this.emit("drain");
+        return chunk;
+      }
+      end(chunk, encoding, cb) {
+        if (typeof chunk === "function") {
+          cb = chunk;
+          chunk = void 0;
+        }
+        if (typeof encoding === "function") {
+          cb = encoding;
+          encoding = "utf8";
+        }
+        if (chunk !== void 0)
+          this.write(chunk, encoding);
+        if (cb)
+          this.once("end", cb);
+        this[EOF] = true;
+        this.writable = false;
+        if (this[FLOWING] || !this[PAUSED])
+          this[MAYBE_EMIT_END]();
+        return this;
+      }
+      // don't let the internal resume be overwritten
+      [RESUME]() {
+        if (this[DESTROYED])
+          return;
+        if (!this[DATALISTENERS] && !this[PIPES].length) {
+          this[DISCARDED] = true;
+        }
+        this[PAUSED] = false;
+        this[FLOWING] = true;
+        this.emit("resume");
+        if (this[BUFFER].length)
+          this[FLUSH]();
+        else if (this[EOF])
+          this[MAYBE_EMIT_END]();
+        else
+          this.emit("drain");
+      }
+      /**
+       * Resume the stream if it is currently in a paused state
+       *
+       * If called when there are no pipe destinations or `data` event listeners,
+       * this will place the stream in a "discarded" state, where all data will
+       * be thrown away. The discarded state is removed if a pipe destination or
+       * data handler is added, if pause() is called, or if any synchronous or
+       * asynchronous iteration is started.
+       */
+      resume() {
+        return this[RESUME]();
+      }
+      /**
+       * Pause the stream
+       */
+      pause() {
+        this[FLOWING] = false;
+        this[PAUSED] = true;
+        this[DISCARDED] = false;
+      }
+      /**
+       * true if the stream has been forcibly destroyed
+       */
+      get destroyed() {
+        return this[DESTROYED];
+      }
+      /**
+       * true if the stream is currently in a flowing state, meaning that
+       * any writes will be immediately emitted.
+       */
+      get flowing() {
+        return this[FLOWING];
+      }
+      /**
+       * true if the stream is currently in a paused state
+       */
+      get paused() {
+        return this[PAUSED];
+      }
+      [BUFFERPUSH](chunk) {
+        if (this[OBJECTMODE])
+          this[BUFFERLENGTH] += 1;
+        else
+          this[BUFFERLENGTH] += chunk.length;
+        this[BUFFER].push(chunk);
+      }
+      [BUFFERSHIFT]() {
+        if (this[OBJECTMODE])
+          this[BUFFERLENGTH] -= 1;
+        else
+          this[BUFFERLENGTH] -= this[BUFFER][0].length;
+        return this[BUFFER].shift();
+      }
+      [FLUSH](noDrain = false) {
+        do {
+        } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length);
+        if (!noDrain && !this[BUFFER].length && !this[EOF])
+          this.emit("drain");
+      }
+      [FLUSHCHUNK](chunk) {
+        this.emit("data", chunk);
+        return this[FLOWING];
+      }
+      /**
+       * Pipe all data emitted by this stream into the destination provided.
+       *
+       * Triggers the flow of data.
+       */
+      pipe(dest, opts) {
+        if (this[DESTROYED])
+          return dest;
+        this[DISCARDED] = false;
+        const ended = this[EMITTED_END];
+        opts = opts || {};
+        if (dest === proc.stdout || dest === proc.stderr)
+          opts.end = false;
+        else
+          opts.end = opts.end !== false;
+        opts.proxyErrors = !!opts.proxyErrors;
+        if (ended) {
+          if (opts.end)
+            dest.end();
+        } else {
+          this[PIPES].push(!opts.proxyErrors ? new Pipe(this, dest, opts) : new PipeProxyErrors(this, dest, opts));
+          if (this[ASYNC])
+            defer(() => this[RESUME]());
+          else
+            this[RESUME]();
+        }
+        return dest;
+      }
+      /**
+       * Fully unhook a piped destination stream.
+       *
+       * If the destination stream was the only consumer of this stream (ie,
+       * there are no other piped destinations or `'data'` event listeners)
+       * then the flow of data will stop until there is another consumer or
+       * {@link Minipass#resume} is explicitly called.
+       */
+      unpipe(dest) {
+        const p = this[PIPES].find((p2) => p2.dest === dest);
+        if (p) {
+          if (this[PIPES].length === 1) {
+            if (this[FLOWING] && this[DATALISTENERS] === 0) {
+              this[FLOWING] = false;
+            }
+            this[PIPES] = [];
+          } else
+            this[PIPES].splice(this[PIPES].indexOf(p), 1);
+          p.unpipe();
+        }
+      }
+      /**
+       * Alias for {@link Minipass#on}
+       */
+      addListener(ev, handler) {
+        return this.on(ev, handler);
+      }
+      /**
+       * Mostly identical to `EventEmitter.on`, with the following
+       * behavior differences to prevent data loss and unnecessary hangs:
+       *
+       * - Adding a 'data' event handler will trigger the flow of data
+       *
+       * - Adding a 'readable' event handler when there is data waiting to be read
+       *   will cause 'readable' to be emitted immediately.
+       *
+       * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
+       *   already passed will cause the event to be emitted immediately and all
+       *   handlers removed.
+       *
+       * - Adding an 'error' event handler after an error has been emitted will
+       *   cause the event to be re-emitted immediately with the error previously
+       *   raised.
+       */
+      on(ev, handler) {
+        const ret = super.on(ev, handler);
+        if (ev === "data") {
+          this[DISCARDED] = false;
+          this[DATALISTENERS]++;
+          if (!this[PIPES].length && !this[FLOWING]) {
+            this[RESUME]();
+          }
+        } else if (ev === "readable" && this[BUFFERLENGTH] !== 0) {
+          super.emit("readable");
+        } else if (isEndish(ev) && this[EMITTED_END]) {
+          super.emit(ev);
+          this.removeAllListeners(ev);
+        } else if (ev === "error" && this[EMITTED_ERROR]) {
+          const h = handler;
+          if (this[ASYNC])
+            defer(() => h.call(this, this[EMITTED_ERROR]));
+          else
+            h.call(this, this[EMITTED_ERROR]);
+        }
+        return ret;
+      }
+      /**
+       * Alias for {@link Minipass#off}
+       */
+      removeListener(ev, handler) {
+        return this.off(ev, handler);
+      }
+      /**
+       * Mostly identical to `EventEmitter.off`
+       *
+       * If a 'data' event handler is removed, and it was the last consumer
+       * (ie, there are no pipe destinations or other 'data' event listeners),
+       * then the flow of data will stop until there is another consumer or
+       * {@link Minipass#resume} is explicitly called.
+       */
+      off(ev, handler) {
+        const ret = super.off(ev, handler);
+        if (ev === "data") {
+          this[DATALISTENERS] = this.listeners("data").length;
+          if (this[DATALISTENERS] === 0 && !this[DISCARDED] && !this[PIPES].length) {
+            this[FLOWING] = false;
+          }
+        }
+        return ret;
+      }
+      /**
+       * Mostly identical to `EventEmitter.removeAllListeners`
+       *
+       * If all 'data' event handlers are removed, and they were the last consumer
+       * (ie, there are no pipe destinations), then the flow of data will stop
+       * until there is another consumer or {@link Minipass#resume} is explicitly
+       * called.
+       */
+      removeAllListeners(ev) {
+        const ret = super.removeAllListeners(ev);
+        if (ev === "data" || ev === void 0) {
+          this[DATALISTENERS] = 0;
+          if (!this[DISCARDED] && !this[PIPES].length) {
+            this[FLOWING] = false;
+          }
+        }
+        return ret;
+      }
+      /**
+       * true if the 'end' event has been emitted
+       */
+      get emittedEnd() {
+        return this[EMITTED_END];
+      }
+      [MAYBE_EMIT_END]() {
+        if (!this[EMITTING_END] && !this[EMITTED_END] && !this[DESTROYED] && this[BUFFER].length === 0 && this[EOF]) {
+          this[EMITTING_END] = true;
+          this.emit("end");
+          this.emit("prefinish");
+          this.emit("finish");
+          if (this[CLOSED])
+            this.emit("close");
+          this[EMITTING_END] = false;
+        }
+      }
+      /**
+       * Mostly identical to `EventEmitter.emit`, with the following
+       * behavior differences to prevent data loss and unnecessary hangs:
+       *
+       * If the stream has been destroyed, and the event is something other
+       * than 'close' or 'error', then `false` is returned and no handlers
+       * are called.
+       *
+       * If the event is 'end', and has already been emitted, then the event
+       * is ignored. If the stream is in a paused or non-flowing state, then
+       * the event will be deferred until data flow resumes. If the stream is
+       * async, then handlers will be called on the next tick rather than
+       * immediately.
+       *
+       * If the event is 'close', and 'end' has not yet been emitted, then
+       * the event will be deferred until after 'end' is emitted.
+       *
+       * If the event is 'error', and an AbortSignal was provided for the stream,
+       * and there are no listeners, then the event is ignored, matching the
+       * behavior of node core streams in the presense of an AbortSignal.
+       *
+       * If the event is 'finish' or 'prefinish', then all listeners will be
+       * removed after emitting the event, to prevent double-firing.
+       */
+      emit(ev, ...args) {
+        const data = args[0];
+        if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) {
+          return false;
+        } else if (ev === "data") {
+          return !this[OBJECTMODE] && !data ? false : this[ASYNC] ? (defer(() => this[EMITDATA](data)), true) : this[EMITDATA](data);
+        } else if (ev === "end") {
+          return this[EMITEND]();
+        } else if (ev === "close") {
+          this[CLOSED] = true;
+          if (!this[EMITTED_END] && !this[DESTROYED])
+            return false;
+          const ret2 = super.emit("close");
+          this.removeAllListeners("close");
+          return ret2;
+        } else if (ev === "error") {
+          this[EMITTED_ERROR] = data;
+          super.emit(ERROR, data);
+          const ret2 = !this[SIGNAL] || this.listeners("error").length ? super.emit("error", data) : false;
+          this[MAYBE_EMIT_END]();
+          return ret2;
+        } else if (ev === "resume") {
+          const ret2 = super.emit("resume");
+          this[MAYBE_EMIT_END]();
+          return ret2;
+        } else if (ev === "finish" || ev === "prefinish") {
+          const ret2 = super.emit(ev);
+          this.removeAllListeners(ev);
+          return ret2;
+        }
+        const ret = super.emit(ev, ...args);
+        this[MAYBE_EMIT_END]();
+        return ret;
+      }
+      [EMITDATA](data) {
+        for (const p of this[PIPES]) {
+          if (p.dest.write(data) === false)
+            this.pause();
+        }
+        const ret = this[DISCARDED] ? false : super.emit("data", data);
+        this[MAYBE_EMIT_END]();
+        return ret;
+      }
+      [EMITEND]() {
+        if (this[EMITTED_END])
+          return false;
+        this[EMITTED_END] = true;
+        this.readable = false;
+        return this[ASYNC] ? (defer(() => this[EMITEND2]()), true) : this[EMITEND2]();
+      }
+      [EMITEND2]() {
+        if (this[DECODER]) {
+          const data = this[DECODER].end();
+          if (data) {
+            for (const p of this[PIPES]) {
+              p.dest.write(data);
+            }
+            if (!this[DISCARDED])
+              super.emit("data", data);
+          }
+        }
+        for (const p of this[PIPES]) {
+          p.end();
+        }
+        const ret = super.emit("end");
+        this.removeAllListeners("end");
+        return ret;
+      }
+      /**
+       * Return a Promise that resolves to an array of all emitted data once
+       * the stream ends.
+       */
+      async collect() {
+        const buf = Object.assign([], {
+          dataLength: 0
+        });
+        if (!this[OBJECTMODE])
+          buf.dataLength = 0;
+        const p = this.promise();
+        this.on("data", (c) => {
+          buf.push(c);
+          if (!this[OBJECTMODE])
+            buf.dataLength += c.length;
+        });
+        await p;
+        return buf;
+      }
+      /**
+       * Return a Promise that resolves to the concatenation of all emitted data
+       * once the stream ends.
+       *
+       * Not allowed on objectMode streams.
+       */
+      async concat() {
+        if (this[OBJECTMODE]) {
+          throw new Error("cannot concat in objectMode");
+        }
+        const buf = await this.collect();
+        return this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
+      }
+      /**
+       * Return a void Promise that resolves once the stream ends.
+       */
+      async promise() {
+        return new Promise((resolve, reject) => {
+          this.on(DESTROYED, () => reject(new Error("stream destroyed")));
+          this.on("error", (er) => reject(er));
+          this.on("end", () => resolve());
+        });
+      }
+      /**
+       * Asynchronous `for await of` iteration.
+       *
+       * This will continue emitting all chunks until the stream terminates.
+       */
+      [Symbol.asyncIterator]() {
+        this[DISCARDED] = false;
+        let stopped = false;
+        const stop = async () => {
+          this.pause();
+          stopped = true;
+          return { value: void 0, done: true };
+        };
+        const next = () => {
+          if (stopped)
+            return stop();
+          const res = this.read();
+          if (res !== null)
+            return Promise.resolve({ done: false, value: res });
+          if (this[EOF])
+            return stop();
+          let resolve;
+          let reject;
+          const onerr = (er) => {
+            this.off("data", ondata);
+            this.off("end", onend);
+            this.off(DESTROYED, ondestroy);
+            stop();
+            reject(er);
+          };
+          const ondata = (value) => {
+            this.off("error", onerr);
+            this.off("end", onend);
+            this.off(DESTROYED, ondestroy);
+            this.pause();
+            resolve({ value, done: !!this[EOF] });
+          };
+          const onend = () => {
+            this.off("error", onerr);
+            this.off("data", ondata);
+            this.off(DESTROYED, ondestroy);
+            stop();
+            resolve({ done: true, value: void 0 });
+          };
+          const ondestroy = () => onerr(new Error("stream destroyed"));
+          return new Promise((res2, rej) => {
+            reject = rej;
+            resolve = res2;
+            this.once(DESTROYED, ondestroy);
+            this.once("error", onerr);
+            this.once("end", onend);
+            this.once("data", ondata);
+          });
+        };
+        return {
+          next,
+          throw: stop,
+          return: stop,
+          [Symbol.asyncIterator]() {
+            return this;
+          }
+        };
+      }
+      /**
+       * Synchronous `for of` iteration.
+       *
+       * The iteration will terminate when the internal buffer runs out, even
+       * if the stream has not yet terminated.
+       */
+      [Symbol.iterator]() {
+        this[DISCARDED] = false;
+        let stopped = false;
+        const stop = () => {
+          this.pause();
+          this.off(ERROR, stop);
+          this.off(DESTROYED, stop);
+          this.off("end", stop);
+          stopped = true;
+          return { done: true, value: void 0 };
+        };
+        const next = () => {
+          if (stopped)
+            return stop();
+          const value = this.read();
+          return value === null ? stop() : { done: false, value };
+        };
+        this.once("end", stop);
+        this.once(ERROR, stop);
+        this.once(DESTROYED, stop);
+        return {
+          next,
+          throw: stop,
+          return: stop,
+          [Symbol.iterator]() {
+            return this;
+          }
+        };
+      }
+      /**
+       * Destroy a stream, preventing it from being used for any further purpose.
+       *
+       * If the stream has a `close()` method, then it will be called on
+       * destruction.
+       *
+       * After destruction, any attempt to write data, read data, or emit most
+       * events will be ignored.
+       *
+       * If an error argument is provided, then it will be emitted in an
+       * 'error' event.
+       */
+      destroy(er) {
+        if (this[DESTROYED]) {
+          if (er)
+            this.emit("error", er);
+          else
+            this.emit(DESTROYED);
+          return this;
+        }
+        this[DESTROYED] = true;
+        this[DISCARDED] = true;
+        this[BUFFER].length = 0;
+        this[BUFFERLENGTH] = 0;
+        const wc = this;
+        if (typeof wc.close === "function" && !this[CLOSED])
+          wc.close();
+        if (er)
+          this.emit("error", er);
+        else
+          this.emit(DESTROYED);
+        return this;
+      }
+      /**
+       * Alias for {@link isStream}
+       *
+       * Former export location, maintained for backwards compatibility.
+       *
+       * @deprecated
+       */
+      static get isStream() {
+        return exports2.isStream;
+      }
+    };
+    exports2.Minipass = Minipass;
+  }
+});
+
+// node_modules/path-scurry/dist/commonjs/index.js
+var require_commonjs6 = __commonJS({
+  "node_modules/path-scurry/dist/commonjs/index.js"(exports2) {
+    "use strict";
+    var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      var desc = Object.getOwnPropertyDescriptor(m, k);
+      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+        desc = { enumerable: true, get: function() {
+          return m[k];
+        } };
+      }
+      Object.defineProperty(o, k2, desc);
+    }) : (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      o[k2] = m[k];
+    }));
+    var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
+      Object.defineProperty(o, "default", { enumerable: true, value: v });
+    }) : function(o, v) {
+      o["default"] = v;
+    });
+    var __importStar = exports2 && exports2.__importStar || function(mod) {
+      if (mod && mod.__esModule) return mod;
+      var result = {};
+      if (mod != null) {
+        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+      }
+      __setModuleDefault(result, mod);
+      return result;
+    };
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.PathScurry = exports2.Path = exports2.PathScurryDarwin = exports2.PathScurryPosix = exports2.PathScurryWin32 = exports2.PathScurryBase = exports2.PathPosix = exports2.PathWin32 = exports2.PathBase = exports2.ChildrenCache = exports2.ResolveCache = void 0;
+    var lru_cache_1 = require_commonjs4();
+    var node_path_1 = require("node:path");
+    var node_url_1 = require("node:url");
+    var fs_1 = require("fs");
+    var actualFS = __importStar(require("node:fs"));
+    var realpathSync = fs_1.realpathSync.native;
+    var promises_1 = require("node:fs/promises");
+    var minipass_1 = require_commonjs5();
+    var defaultFS = {
+      lstatSync: fs_1.lstatSync,
+      readdir: fs_1.readdir,
+      readdirSync: fs_1.readdirSync,
+      readlinkSync: fs_1.readlinkSync,
+      realpathSync,
+      promises: {
+        lstat: promises_1.lstat,
+        readdir: promises_1.readdir,
+        readlink: promises_1.readlink,
+        realpath: promises_1.realpath
+      }
+    };
+    var fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS ? defaultFS : {
+      ...defaultFS,
+      ...fsOption,
+      promises: {
+        ...defaultFS.promises,
+        ...fsOption.promises || {}
+      }
+    };
+    var uncDriveRegexp = /^\\\\\?\\([a-z]:)\\?$/i;
+    var uncToDrive = (rootPath) => rootPath.replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\");
+    var eitherSep = /[\\\/]/;
+    var UNKNOWN = 0;
+    var IFIFO = 1;
+    var IFCHR = 2;
+    var IFDIR = 4;
+    var IFBLK = 6;
+    var IFREG = 8;
+    var IFLNK = 10;
+    var IFSOCK = 12;
+    var IFMT = 15;
+    var IFMT_UNKNOWN = ~IFMT;
+    var READDIR_CALLED = 16;
+    var LSTAT_CALLED = 32;
+    var ENOTDIR = 64;
+    var ENOENT = 128;
+    var ENOREADLINK = 256;
+    var ENOREALPATH = 512;
+    var ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
+    var TYPEMASK = 1023;
+    var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN;
+    var normalizeCache = /* @__PURE__ */ new Map();
+    var normalize = (s) => {
+      const c = normalizeCache.get(s);
+      if (c)
+        return c;
+      const n = s.normalize("NFKD");
+      normalizeCache.set(s, n);
+      return n;
+    };
+    var normalizeNocaseCache = /* @__PURE__ */ new Map();
+    var normalizeNocase = (s) => {
+      const c = normalizeNocaseCache.get(s);
+      if (c)
+        return c;
+      const n = normalize(s.toLowerCase());
+      normalizeNocaseCache.set(s, n);
+      return n;
+    };
+    var ResolveCache = class extends lru_cache_1.LRUCache {
+      constructor() {
+        super({ max: 256 });
+      }
+    };
+    exports2.ResolveCache = ResolveCache;
+    var ChildrenCache = class extends lru_cache_1.LRUCache {
+      constructor(maxSize = 16 * 1024) {
+        super({
+          maxSize,
+          // parent + children
+          sizeCalculation: (a) => a.length + 1
+        });
+      }
+    };
+    exports2.ChildrenCache = ChildrenCache;
+    var setAsCwd = Symbol("PathScurry setAsCwd");
+    var PathBase = class {
+      /**
+       * the basename of this path
+       *
+       * **Important**: *always* test the path name against any test string
+       * usingthe {@link isNamed} method, and not by directly comparing this
+       * string. Otherwise, unicode path strings that the system sees as identical
+       * will not be properly treated as the same path, leading to incorrect
+       * behavior and possible security issues.
+       */
+      name;
+      /**
+       * the Path entry corresponding to the path root.
+       *
+       * @internal
+       */
+      root;
+      /**
+       * All roots found within the current PathScurry family
+       *
+       * @internal
+       */
+      roots;
+      /**
+       * a reference to the parent path, or undefined in the case of root entries
+       *
+       * @internal
+       */
+      parent;
+      /**
+       * boolean indicating whether paths are compared case-insensitively
+       * @internal
+       */
+      nocase;
+      /**
+       * boolean indicating that this path is the current working directory
+       * of the PathScurry collection that contains it.
+       */
+      isCWD = false;
+      // potential default fs override
+      #fs;
+      // Stats fields
+      #dev;
+      get dev() {
+        return this.#dev;
+      }
+      #mode;
+      get mode() {
+        return this.#mode;
+      }
+      #nlink;
+      get nlink() {
+        return this.#nlink;
+      }
+      #uid;
+      get uid() {
+        return this.#uid;
+      }
+      #gid;
+      get gid() {
+        return this.#gid;
+      }
+      #rdev;
+      get rdev() {
+        return this.#rdev;
+      }
+      #blksize;
+      get blksize() {
+        return this.#blksize;
+      }
+      #ino;
+      get ino() {
+        return this.#ino;
+      }
+      #size;
+      get size() {
+        return this.#size;
+      }
+      #blocks;
+      get blocks() {
+        return this.#blocks;
+      }
+      #atimeMs;
+      get atimeMs() {
+        return this.#atimeMs;
+      }
+      #mtimeMs;
+      get mtimeMs() {
+        return this.#mtimeMs;
+      }
+      #ctimeMs;
+      get ctimeMs() {
+        return this.#ctimeMs;
+      }
+      #birthtimeMs;
+      get birthtimeMs() {
+        return this.#birthtimeMs;
+      }
+      #atime;
+      get atime() {
+        return this.#atime;
+      }
+      #mtime;
+      get mtime() {
+        return this.#mtime;
+      }
+      #ctime;
+      get ctime() {
+        return this.#ctime;
+      }
+      #birthtime;
+      get birthtime() {
+        return this.#birthtime;
+      }
+      #matchName;
+      #depth;
+      #fullpath;
+      #fullpathPosix;
+      #relative;
+      #relativePosix;
+      #type;
+      #children;
+      #linkTarget;
+      #realpath;
+      /**
+       * This property is for compatibility with the Dirent class as of
+       * Node v20, where Dirent['parentPath'] refers to the path of the
+       * directory that was passed to readdir. For root entries, it's the path
+       * to the entry itself.
+       */
+      get parentPath() {
+        return (this.parent || this).fullpath();
+      }
+      /**
+       * Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,
+       * this property refers to the *parent* path, not the path object itself.
+       *
+       * @deprecated
+       */
+      get path() {
+        return this.parentPath;
+      }
+      /**
+       * Do not create new Path objects directly.  They should always be accessed
+       * via the PathScurry class or other methods on the Path class.
+       *
+       * @internal
+       */
+      constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
+        this.name = name;
+        this.#matchName = nocase ? normalizeNocase(name) : normalize(name);
+        this.#type = type & TYPEMASK;
+        this.nocase = nocase;
+        this.roots = roots;
+        this.root = root || this;
+        this.#children = children;
+        this.#fullpath = opts.fullpath;
+        this.#relative = opts.relative;
+        this.#relativePosix = opts.relativePosix;
+        this.parent = opts.parent;
+        if (this.parent) {
+          this.#fs = this.parent.#fs;
+        } else {
+          this.#fs = fsFromOption(opts.fs);
+        }
+      }
+      /**
+       * Returns the depth of the Path object from its root.
+       *
+       * For example, a path at `/foo/bar` would have a depth of 2.
+       */
+      depth() {
+        if (this.#depth !== void 0)
+          return this.#depth;
+        if (!this.parent)
+          return this.#depth = 0;
+        return this.#depth = this.parent.depth() + 1;
+      }
+      /**
+       * @internal
+       */
+      childrenCache() {
+        return this.#children;
+      }
+      /**
+       * Get the Path object referenced by the string path, resolved from this Path
+       */
+      resolve(path7) {
+        if (!path7) {
+          return this;
+        }
+        const rootPath = this.getRootString(path7);
+        const dir = path7.substring(rootPath.length);
+        const dirParts = dir.split(this.splitSep);
+        const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
+        return result;
+      }
+      #resolveParts(dirParts) {
+        let p = this;
+        for (const part of dirParts) {
+          p = p.child(part);
+        }
+        return p;
+      }
+      /**
+       * Returns the cached children Path objects, if still available.  If they
+       * have fallen out of the cache, then returns an empty array, and resets the
+       * READDIR_CALLED bit, so that future calls to readdir() will require an fs
+       * lookup.
+       *
+       * @internal
+       */
+      children() {
+        const cached = this.#children.get(this);
+        if (cached) {
+          return cached;
+        }
+        const children = Object.assign([], { provisional: 0 });
+        this.#children.set(this, children);
+        this.#type &= ~READDIR_CALLED;
+        return children;
+      }
+      /**
+       * Resolves a path portion and returns or creates the child Path.
+       *
+       * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is
+       * `'..'`.
+       *
+       * This should not be called directly.  If `pathPart` contains any path
+       * separators, it will lead to unsafe undefined behavior.
+       *
+       * Use `Path.resolve()` instead.
+       *
+       * @internal
+       */
+      child(pathPart, opts) {
+        if (pathPart === "" || pathPart === ".") {
+          return this;
+        }
+        if (pathPart === "..") {
+          return this.parent || this;
+        }
+        const children = this.children();
+        const name = this.nocase ? normalizeNocase(pathPart) : normalize(pathPart);
+        for (const p of children) {
+          if (p.#matchName === name) {
+            return p;
+          }
+        }
+        const s = this.parent ? this.sep : "";
+        const fullpath = this.#fullpath ? this.#fullpath + s + pathPart : void 0;
+        const pchild = this.newChild(pathPart, UNKNOWN, {
+          ...opts,
+          parent: this,
+          fullpath
+        });
+        if (!this.canReaddir()) {
+          pchild.#type |= ENOENT;
+        }
+        children.push(pchild);
+        return pchild;
+      }
+      /**
+       * The relative path from the cwd. If it does not share an ancestor with
+       * the cwd, then this ends up being equivalent to the fullpath()
+       */
+      relative() {
+        if (this.isCWD)
+          return "";
+        if (this.#relative !== void 0) {
+          return this.#relative;
+        }
+        const name = this.name;
+        const p = this.parent;
+        if (!p) {
+          return this.#relative = this.name;
+        }
+        const pv = p.relative();
+        return pv + (!pv || !p.parent ? "" : this.sep) + name;
+      }
+      /**
+       * The relative path from the cwd, using / as the path separator.
+       * If it does not share an ancestor with
+       * the cwd, then this ends up being equivalent to the fullpathPosix()
+       * On posix systems, this is identical to relative().
+       */
+      relativePosix() {
+        if (this.sep === "/")
+          return this.relative();
+        if (this.isCWD)
+          return "";
+        if (this.#relativePosix !== void 0)
+          return this.#relativePosix;
+        const name = this.name;
+        const p = this.parent;
+        if (!p) {
+          return this.#relativePosix = this.fullpathPosix();
+        }
+        const pv = p.relativePosix();
+        return pv + (!pv || !p.parent ? "" : "/") + name;
+      }
+      /**
+       * The fully resolved path string for this Path entry
+       */
+      fullpath() {
+        if (this.#fullpath !== void 0) {
+          return this.#fullpath;
+        }
+        const name = this.name;
+        const p = this.parent;
+        if (!p) {
+          return this.#fullpath = this.name;
+        }
+        const pv = p.fullpath();
+        const fp = pv + (!p.parent ? "" : this.sep) + name;
+        return this.#fullpath = fp;
+      }
+      /**
+       * On platforms other than windows, this is identical to fullpath.
+       *
+       * On windows, this is overridden to return the forward-slash form of the
+       * full UNC path.
+       */
+      fullpathPosix() {
+        if (this.#fullpathPosix !== void 0)
+          return this.#fullpathPosix;
+        if (this.sep === "/")
+          return this.#fullpathPosix = this.fullpath();
+        if (!this.parent) {
+          const p2 = this.fullpath().replace(/\\/g, "/");
+          if (/^[a-z]:\//i.test(p2)) {
+            return this.#fullpathPosix = `//?/${p2}`;
+          } else {
+            return this.#fullpathPosix = p2;
+          }
+        }
+        const p = this.parent;
+        const pfpp = p.fullpathPosix();
+        const fpp = pfpp + (!pfpp || !p.parent ? "" : "/") + this.name;
+        return this.#fullpathPosix = fpp;
+      }
+      /**
+       * Is the Path of an unknown type?
+       *
+       * Note that we might know *something* about it if there has been a previous
+       * filesystem operation, for example that it does not exist, or is not a
+       * link, or whether it has child entries.
+       */
+      isUnknown() {
+        return (this.#type & IFMT) === UNKNOWN;
+      }
+      isType(type) {
+        return this[`is${type}`]();
+      }
+      getType() {
+        return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : (
+          /* c8 ignore start */
+          this.isSocket() ? "Socket" : "Unknown"
+        );
+      }
+      /**
+       * Is the Path a regular file?
+       */
+      isFile() {
+        return (this.#type & IFMT) === IFREG;
+      }
+      /**
+       * Is the Path a directory?
+       */
+      isDirectory() {
+        return (this.#type & IFMT) === IFDIR;
+      }
+      /**
+       * Is the path a character device?
+       */
+      isCharacterDevice() {
+        return (this.#type & IFMT) === IFCHR;
+      }
+      /**
+       * Is the path a block device?
+       */
+      isBlockDevice() {
+        return (this.#type & IFMT) === IFBLK;
+      }
+      /**
+       * Is the path a FIFO pipe?
+       */
+      isFIFO() {
+        return (this.#type & IFMT) === IFIFO;
+      }
+      /**
+       * Is the path a socket?
+       */
+      isSocket() {
+        return (this.#type & IFMT) === IFSOCK;
+      }
+      /**
+       * Is the path a symbolic link?
+       */
+      isSymbolicLink() {
+        return (this.#type & IFLNK) === IFLNK;
+      }
+      /**
+       * Return the entry if it has been subject of a successful lstat, or
+       * undefined otherwise.
+       *
+       * Does not read the filesystem, so an undefined result *could* simply
+       * mean that we haven't called lstat on it.
+       */
+      lstatCached() {
+        return this.#type & LSTAT_CALLED ? this : void 0;
+      }
+      /**
+       * Return the cached link target if the entry has been the subject of a
+       * successful readlink, or undefined otherwise.
+       *
+       * Does not read the filesystem, so an undefined result *could* just mean we
+       * don't have any cached data. Only use it if you are very sure that a
+       * readlink() has been called at some point.
+       */
+      readlinkCached() {
+        return this.#linkTarget;
+      }
+      /**
+       * Returns the cached realpath target if the entry has been the subject
+       * of a successful realpath, or undefined otherwise.
+       *
+       * Does not read the filesystem, so an undefined result *could* just mean we
+       * don't have any cached data. Only use it if you are very sure that a
+       * realpath() has been called at some point.
+       */
+      realpathCached() {
+        return this.#realpath;
+      }
+      /**
+       * Returns the cached child Path entries array if the entry has been the
+       * subject of a successful readdir(), or [] otherwise.
+       *
+       * Does not read the filesystem, so an empty array *could* just mean we
+       * don't have any cached data. Only use it if you are very sure that a
+       * readdir() has been called recently enough to still be valid.
+       */
+      readdirCached() {
+        const children = this.children();
+        return children.slice(0, children.provisional);
+      }
+      /**
+       * Return true if it's worth trying to readlink.  Ie, we don't (yet) have
+       * any indication that readlink will definitely fail.
+       *
+       * Returns false if the path is known to not be a symlink, if a previous
+       * readlink failed, or if the entry does not exist.
+       */
+      canReadlink() {
+        if (this.#linkTarget)
+          return true;
+        if (!this.parent)
+          return false;
+        const ifmt = this.#type & IFMT;
+        return !(ifmt !== UNKNOWN && ifmt !== IFLNK || this.#type & ENOREADLINK || this.#type & ENOENT);
+      }
+      /**
+       * Return true if readdir has previously been successfully called on this
+       * path, indicating that cachedReaddir() is likely valid.
+       */
+      calledReaddir() {
+        return !!(this.#type & READDIR_CALLED);
+      }
+      /**
+       * Returns true if the path is known to not exist. That is, a previous lstat
+       * or readdir failed to verify its existence when that would have been
+       * expected, or a parent entry was marked either enoent or enotdir.
+       */
+      isENOENT() {
+        return !!(this.#type & ENOENT);
+      }
+      /**
+       * Return true if the path is a match for the given path name.  This handles
+       * case sensitivity and unicode normalization.
+       *
+       * Note: even on case-sensitive systems, it is **not** safe to test the
+       * equality of the `.name` property to determine whether a given pathname
+       * matches, due to unicode normalization mismatches.
+       *
+       * Always use this method instead of testing the `path.name` property
+       * directly.
+       */
+      isNamed(n) {
+        return !this.nocase ? this.#matchName === normalize(n) : this.#matchName === normalizeNocase(n);
+      }
+      /**
+       * Return the Path object corresponding to the target of a symbolic link.
+       *
+       * If the Path is not a symbolic link, or if the readlink call fails for any
+       * reason, `undefined` is returned.
+       *
+       * Result is cached, and thus may be outdated if the filesystem is mutated.
+       */
+      async readlink() {
+        const target = this.#linkTarget;
+        if (target) {
+          return target;
+        }
+        if (!this.canReadlink()) {
+          return void 0;
+        }
+        if (!this.parent) {
+          return void 0;
+        }
+        try {
+          const read = await this.#fs.promises.readlink(this.fullpath());
+          const linkTarget = (await this.parent.realpath())?.resolve(read);
+          if (linkTarget) {
+            return this.#linkTarget = linkTarget;
+          }
+        } catch (er) {
+          this.#readlinkFail(er.code);
+          return void 0;
+        }
+      }
+      /**
+       * Synchronous {@link PathBase.readlink}
+       */
+      readlinkSync() {
+        const target = this.#linkTarget;
+        if (target) {
+          return target;
+        }
+        if (!this.canReadlink()) {
+          return void 0;
+        }
+        if (!this.parent) {
+          return void 0;
+        }
+        try {
+          const read = this.#fs.readlinkSync(this.fullpath());
+          const linkTarget = this.parent.realpathSync()?.resolve(read);
+          if (linkTarget) {
+            return this.#linkTarget = linkTarget;
+          }
+        } catch (er) {
+          this.#readlinkFail(er.code);
+          return void 0;
+        }
+      }
+      #readdirSuccess(children) {
+        this.#type |= READDIR_CALLED;
+        for (let p = children.provisional; p < children.length; p++) {
+          const c = children[p];
+          if (c)
+            c.#markENOENT();
+        }
+      }
+      #markENOENT() {
+        if (this.#type & ENOENT)
+          return;
+        this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN;
+        this.#markChildrenENOENT();
+      }
+      #markChildrenENOENT() {
+        const children = this.children();
+        children.provisional = 0;
+        for (const p of children) {
+          p.#markENOENT();
+        }
+      }
+      #markENOREALPATH() {
+        this.#type |= ENOREALPATH;
+        this.#markENOTDIR();
+      }
+      // save the information when we know the entry is not a dir
+      #markENOTDIR() {
+        if (this.#type & ENOTDIR)
+          return;
+        let t = this.#type;
+        if ((t & IFMT) === IFDIR)
+          t &= IFMT_UNKNOWN;
+        this.#type = t | ENOTDIR;
+        this.#markChildrenENOENT();
+      }
+      #readdirFail(code = "") {
+        if (code === "ENOTDIR" || code === "EPERM") {
+          this.#markENOTDIR();
+        } else if (code === "ENOENT") {
+          this.#markENOENT();
+        } else {
+          this.children().provisional = 0;
+        }
+      }
+      #lstatFail(code = "") {
+        if (code === "ENOTDIR") {
+          const p = this.parent;
+          p.#markENOTDIR();
+        } else if (code === "ENOENT") {
+          this.#markENOENT();
+        }
+      }
+      #readlinkFail(code = "") {
+        let ter = this.#type;
+        ter |= ENOREADLINK;
+        if (code === "ENOENT")
+          ter |= ENOENT;
+        if (code === "EINVAL" || code === "UNKNOWN") {
+          ter &= IFMT_UNKNOWN;
+        }
+        this.#type = ter;
+        if (code === "ENOTDIR" && this.parent) {
+          this.parent.#markENOTDIR();
+        }
+      }
+      #readdirAddChild(e, c) {
+        return this.#readdirMaybePromoteChild(e, c) || this.#readdirAddNewChild(e, c);
+      }
+      #readdirAddNewChild(e, c) {
+        const type = entToType(e);
+        const child = this.newChild(e.name, type, { parent: this });
+        const ifmt = child.#type & IFMT;
+        if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {
+          child.#type |= ENOTDIR;
+        }
+        c.unshift(child);
+        c.provisional++;
+        return child;
+      }
+      #readdirMaybePromoteChild(e, c) {
+        for (let p = c.provisional; p < c.length; p++) {
+          const pchild = c[p];
+          const name = this.nocase ? normalizeNocase(e.name) : normalize(e.name);
+          if (name !== pchild.#matchName) {
+            continue;
+          }
+          return this.#readdirPromoteChild(e, pchild, p, c);
+        }
+      }
+      #readdirPromoteChild(e, p, index, c) {
+        const v = p.name;
+        p.#type = p.#type & IFMT_UNKNOWN | entToType(e);
+        if (v !== e.name)
+          p.name = e.name;
+        if (index !== c.provisional) {
+          if (index === c.length - 1)
+            c.pop();
+          else
+            c.splice(index, 1);
+          c.unshift(p);
+        }
+        c.provisional++;
+        return p;
+      }
+      /**
+       * Call lstat() on this Path, and update all known information that can be
+       * determined.
+       *
+       * Note that unlike `fs.lstat()`, the returned value does not contain some
+       * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
+       * information is required, you will need to call `fs.lstat` yourself.
+       *
+       * If the Path refers to a nonexistent file, or if the lstat call fails for
+       * any reason, `undefined` is returned.  Otherwise the updated Path object is
+       * returned.
+       *
+       * Results are cached, and thus may be out of date if the filesystem is
+       * mutated.
+       */
+      async lstat() {
+        if ((this.#type & ENOENT) === 0) {
+          try {
+            this.#applyStat(await this.#fs.promises.lstat(this.fullpath()));
+            return this;
+          } catch (er) {
+            this.#lstatFail(er.code);
+          }
+        }
+      }
+      /**
+       * synchronous {@link PathBase.lstat}
+       */
+      lstatSync() {
+        if ((this.#type & ENOENT) === 0) {
+          try {
+            this.#applyStat(this.#fs.lstatSync(this.fullpath()));
+            return this;
+          } catch (er) {
+            this.#lstatFail(er.code);
+          }
+        }
+      }
+      #applyStat(st) {
+        const { atime, atimeMs, birthtime, birthtimeMs, blksize, blocks, ctime, ctimeMs, dev, gid, ino, mode, mtime, mtimeMs, nlink, rdev, size, uid } = st;
+        this.#atime = atime;
+        this.#atimeMs = atimeMs;
+        this.#birthtime = birthtime;
+        this.#birthtimeMs = birthtimeMs;
+        this.#blksize = blksize;
+        this.#blocks = blocks;
+        this.#ctime = ctime;
+        this.#ctimeMs = ctimeMs;
+        this.#dev = dev;
+        this.#gid = gid;
+        this.#ino = ino;
+        this.#mode = mode;
+        this.#mtime = mtime;
+        this.#mtimeMs = mtimeMs;
+        this.#nlink = nlink;
+        this.#rdev = rdev;
+        this.#size = size;
+        this.#uid = uid;
+        const ifmt = entToType(st);
+        this.#type = this.#type & IFMT_UNKNOWN | ifmt | LSTAT_CALLED;
+        if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {
+          this.#type |= ENOTDIR;
+        }
+      }
+      #onReaddirCB = [];
+      #readdirCBInFlight = false;
+      #callOnReaddirCB(children) {
+        this.#readdirCBInFlight = false;
+        const cbs = this.#onReaddirCB.slice();
+        this.#onReaddirCB.length = 0;
+        cbs.forEach((cb) => cb(null, children));
+      }
+      /**
+       * Standard node-style callback interface to get list of directory entries.
+       *
+       * If the Path cannot or does not contain any children, then an empty array
+       * is returned.
+       *
+       * Results are cached, and thus may be out of date if the filesystem is
+       * mutated.
+       *
+       * @param cb The callback called with (er, entries).  Note that the `er`
+       * param is somewhat extraneous, as all readdir() errors are handled and
+       * simply result in an empty set of entries being returned.
+       * @param allowZalgo Boolean indicating that immediately known results should
+       * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release
+       * zalgo at your peril, the dark pony lord is devious and unforgiving.
+       */
+      readdirCB(cb, allowZalgo = false) {
+        if (!this.canReaddir()) {
+          if (allowZalgo)
+            cb(null, []);
+          else
+            queueMicrotask(() => cb(null, []));
+          return;
+        }
+        const children = this.children();
+        if (this.calledReaddir()) {
+          const c = children.slice(0, children.provisional);
+          if (allowZalgo)
+            cb(null, c);
+          else
+            queueMicrotask(() => cb(null, c));
+          return;
+        }
+        this.#onReaddirCB.push(cb);
+        if (this.#readdirCBInFlight) {
+          return;
+        }
+        this.#readdirCBInFlight = true;
+        const fullpath = this.fullpath();
+        this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {
+          if (er) {
+            this.#readdirFail(er.code);
+            children.provisional = 0;
+          } else {
+            for (const e of entries) {
+              this.#readdirAddChild(e, children);
+            }
+            this.#readdirSuccess(children);
+          }
+          this.#callOnReaddirCB(children.slice(0, children.provisional));
+          return;
+        });
+      }
+      #asyncReaddirInFlight;
+      /**
+       * Return an array of known child entries.
+       *
+       * If the Path cannot or does not contain any children, then an empty array
+       * is returned.
+       *
+       * Results are cached, and thus may be out of date if the filesystem is
+       * mutated.
+       */
+      async readdir() {
+        if (!this.canReaddir()) {
+          return [];
+        }
+        const children = this.children();
+        if (this.calledReaddir()) {
+          return children.slice(0, children.provisional);
+        }
+        const fullpath = this.fullpath();
+        if (this.#asyncReaddirInFlight) {
+          await this.#asyncReaddirInFlight;
+        } else {
+          let resolve = () => {
+          };
+          this.#asyncReaddirInFlight = new Promise((res) => resolve = res);
+          try {
+            for (const e of await this.#fs.promises.readdir(fullpath, {
+              withFileTypes: true
+            })) {
+              this.#readdirAddChild(e, children);
+            }
+            this.#readdirSuccess(children);
+          } catch (er) {
+            this.#readdirFail(er.code);
+            children.provisional = 0;
+          }
+          this.#asyncReaddirInFlight = void 0;
+          resolve();
+        }
+        return children.slice(0, children.provisional);
+      }
+      /**
+       * synchronous {@link PathBase.readdir}
+       */
+      readdirSync() {
+        if (!this.canReaddir()) {
+          return [];
+        }
+        const children = this.children();
+        if (this.calledReaddir()) {
+          return children.slice(0, children.provisional);
+        }
+        const fullpath = this.fullpath();
+        try {
+          for (const e of this.#fs.readdirSync(fullpath, {
+            withFileTypes: true
+          })) {
+            this.#readdirAddChild(e, children);
+          }
+          this.#readdirSuccess(children);
+        } catch (er) {
+          this.#readdirFail(er.code);
+          children.provisional = 0;
+        }
+        return children.slice(0, children.provisional);
+      }
+      canReaddir() {
+        if (this.#type & ENOCHILD)
+          return false;
+        const ifmt = IFMT & this.#type;
+        if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {
+          return false;
+        }
+        return true;
+      }
+      shouldWalk(dirs, walkFilter) {
+        return (this.#type & IFDIR) === IFDIR && !(this.#type & ENOCHILD) && !dirs.has(this) && (!walkFilter || walkFilter(this));
+      }
+      /**
+       * Return the Path object corresponding to path as resolved
+       * by realpath(3).
+       *
+       * If the realpath call fails for any reason, `undefined` is returned.
+       *
+       * Result is cached, and thus may be outdated if the filesystem is mutated.
+       * On success, returns a Path object.
+       */
+      async realpath() {
+        if (this.#realpath)
+          return this.#realpath;
+        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
+          return void 0;
+        try {
+          const rp2 = await this.#fs.promises.realpath(this.fullpath());
+          return this.#realpath = this.resolve(rp2);
+        } catch (_) {
+          this.#markENOREALPATH();
+        }
+      }
+      /**
+       * Synchronous {@link realpath}
+       */
+      realpathSync() {
+        if (this.#realpath)
+          return this.#realpath;
+        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
+          return void 0;
+        try {
+          const rp2 = this.#fs.realpathSync(this.fullpath());
+          return this.#realpath = this.resolve(rp2);
+        } catch (_) {
+          this.#markENOREALPATH();
+        }
+      }
+      /**
+       * Internal method to mark this Path object as the scurry cwd,
+       * called by {@link PathScurry#chdir}
+       *
+       * @internal
+       */
+      [setAsCwd](oldCwd) {
+        if (oldCwd === this)
+          return;
+        oldCwd.isCWD = false;
+        this.isCWD = true;
+        const changed = /* @__PURE__ */ new Set([]);
+        let rp2 = [];
+        let p = this;
+        while (p && p.parent) {
+          changed.add(p);
+          p.#relative = rp2.join(this.sep);
+          p.#relativePosix = rp2.join("/");
+          p = p.parent;
+          rp2.push("..");
+        }
+        p = oldCwd;
+        while (p && p.parent && !changed.has(p)) {
+          p.#relative = void 0;
+          p.#relativePosix = void 0;
+          p = p.parent;
+        }
+      }
+    };
+    exports2.PathBase = PathBase;
+    var PathWin32 = class _PathWin32 extends PathBase {
+      /**
+       * Separator for generating path strings.
+       */
+      sep = "\\";
+      /**
+       * Separator for parsing path strings.
+       */
+      splitSep = eitherSep;
+      /**
+       * Do not create new Path objects directly.  They should always be accessed
+       * via the PathScurry class or other methods on the Path class.
+       *
+       * @internal
+       */
+      constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
+        super(name, type, root, roots, nocase, children, opts);
+      }
+      /**
+       * @internal
+       */
+      newChild(name, type = UNKNOWN, opts = {}) {
+        return new _PathWin32(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
+      }
+      /**
+       * @internal
+       */
+      getRootString(path7) {
+        return node_path_1.win32.parse(path7).root;
+      }
+      /**
+       * @internal
+       */
+      getRoot(rootPath) {
+        rootPath = uncToDrive(rootPath.toUpperCase());
+        if (rootPath === this.root.name) {
+          return this.root;
+        }
+        for (const [compare, root] of Object.entries(this.roots)) {
+          if (this.sameRoot(rootPath, compare)) {
+            return this.roots[rootPath] = root;
+          }
+        }
+        return this.roots[rootPath] = new PathScurryWin32(rootPath, this).root;
+      }
+      /**
+       * @internal
+       */
+      sameRoot(rootPath, compare = this.root.name) {
+        rootPath = rootPath.toUpperCase().replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\");
+        return rootPath === compare;
+      }
+    };
+    exports2.PathWin32 = PathWin32;
+    var PathPosix = class _PathPosix extends PathBase {
+      /**
+       * separator for parsing path strings
+       */
+      splitSep = "/";
+      /**
+       * separator for generating path strings
+       */
+      sep = "/";
+      /**
+       * Do not create new Path objects directly.  They should always be accessed
+       * via the PathScurry class or other methods on the Path class.
+       *
+       * @internal
+       */
+      constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
+        super(name, type, root, roots, nocase, children, opts);
+      }
+      /**
+       * @internal
+       */
+      getRootString(path7) {
+        return path7.startsWith("/") ? "/" : "";
+      }
+      /**
+       * @internal
+       */
+      getRoot(_rootPath) {
+        return this.root;
+      }
+      /**
+       * @internal
+       */
+      newChild(name, type = UNKNOWN, opts = {}) {
+        return new _PathPosix(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
+      }
+    };
+    exports2.PathPosix = PathPosix;
+    var PathScurryBase = class {
+      /**
+       * The root Path entry for the current working directory of this Scurry
+       */
+      root;
+      /**
+       * The string path for the root of this Scurry's current working directory
+       */
+      rootPath;
+      /**
+       * A collection of all roots encountered, referenced by rootPath
+       */
+      roots;
+      /**
+       * The Path entry corresponding to this PathScurry's current working directory.
+       */
+      cwd;
+      #resolveCache;
+      #resolvePosixCache;
+      #children;
+      /**
+       * Perform path comparisons case-insensitively.
+       *
+       * Defaults true on Darwin and Windows systems, false elsewhere.
+       */
+      nocase;
+      #fs;
+      /**
+       * This class should not be instantiated directly.
+       *
+       * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry
+       *
+       * @internal
+       */
+      constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs7 = defaultFS } = {}) {
+        this.#fs = fsFromOption(fs7);
+        if (cwd instanceof URL || cwd.startsWith("file://")) {
+          cwd = (0, node_url_1.fileURLToPath)(cwd);
+        }
+        const cwdPath = pathImpl.resolve(cwd);
+        this.roots = /* @__PURE__ */ Object.create(null);
+        this.rootPath = this.parseRootPath(cwdPath);
+        this.#resolveCache = new ResolveCache();
+        this.#resolvePosixCache = new ResolveCache();
+        this.#children = new ChildrenCache(childrenCacheSize);
+        const split = cwdPath.substring(this.rootPath.length).split(sep2);
+        if (split.length === 1 && !split[0]) {
+          split.pop();
+        }
+        if (nocase === void 0) {
+          throw new TypeError("must provide nocase setting to PathScurryBase ctor");
+        }
+        this.nocase = nocase;
+        this.root = this.newRoot(this.#fs);
+        this.roots[this.rootPath] = this.root;
+        let prev = this.root;
+        let len = split.length - 1;
+        const joinSep = pathImpl.sep;
+        let abs = this.rootPath;
+        let sawFirst = false;
+        for (const part of split) {
+          const l = len--;
+          prev = prev.child(part, {
+            relative: new Array(l).fill("..").join(joinSep),
+            relativePosix: new Array(l).fill("..").join("/"),
+            fullpath: abs += (sawFirst ? "" : joinSep) + part
+          });
+          sawFirst = true;
+        }
+        this.cwd = prev;
+      }
+      /**
+       * Get the depth of a provided path, string, or the cwd
+       */
+      depth(path7 = this.cwd) {
+        if (typeof path7 === "string") {
+          path7 = this.cwd.resolve(path7);
+        }
+        return path7.depth();
+      }
+      /**
+       * Return the cache of child entries.  Exposed so subclasses can create
+       * child Path objects in a platform-specific way.
+       *
+       * @internal
+       */
+      childrenCache() {
+        return this.#children;
+      }
+      /**
+       * Resolve one or more path strings to a resolved string
+       *
+       * Same interface as require('path').resolve.
+       *
+       * Much faster than path.resolve() when called multiple times for the same
+       * path, because the resolved Path objects are cached.  Much slower
+       * otherwise.
+       */
+      resolve(...paths) {
+        let r = "";
+        for (let i = paths.length - 1; i >= 0; i--) {
+          const p = paths[i];
+          if (!p || p === ".")
+            continue;
+          r = r ? `${p}/${r}` : p;
+          if (this.isAbsolute(p)) {
+            break;
+          }
+        }
+        const cached = this.#resolveCache.get(r);
+        if (cached !== void 0) {
+          return cached;
+        }
+        const result = this.cwd.resolve(r).fullpath();
+        this.#resolveCache.set(r, result);
+        return result;
+      }
+      /**
+       * Resolve one or more path strings to a resolved string, returning
+       * the posix path.  Identical to .resolve() on posix systems, but on
+       * windows will return a forward-slash separated UNC path.
+       *
+       * Same interface as require('path').resolve.
+       *
+       * Much faster than path.resolve() when called multiple times for the same
+       * path, because the resolved Path objects are cached.  Much slower
+       * otherwise.
+       */
+      resolvePosix(...paths) {
+        let r = "";
+        for (let i = paths.length - 1; i >= 0; i--) {
+          const p = paths[i];
+          if (!p || p === ".")
+            continue;
+          r = r ? `${p}/${r}` : p;
+          if (this.isAbsolute(p)) {
+            break;
+          }
+        }
+        const cached = this.#resolvePosixCache.get(r);
+        if (cached !== void 0) {
+          return cached;
+        }
+        const result = this.cwd.resolve(r).fullpathPosix();
+        this.#resolvePosixCache.set(r, result);
+        return result;
+      }
+      /**
+       * find the relative path from the cwd to the supplied path string or entry
+       */
+      relative(entry = this.cwd) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        }
+        return entry.relative();
+      }
+      /**
+       * find the relative path from the cwd to the supplied path string or
+       * entry, using / as the path delimiter, even on Windows.
+       */
+      relativePosix(entry = this.cwd) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        }
+        return entry.relativePosix();
+      }
+      /**
+       * Return the basename for the provided string or Path object
+       */
+      basename(entry = this.cwd) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        }
+        return entry.name;
+      }
+      /**
+       * Return the dirname for the provided string or Path object
+       */
+      dirname(entry = this.cwd) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        }
+        return (entry.parent || entry).fullpath();
+      }
+      async readdir(entry = this.cwd, opts = {
+        withFileTypes: true
+      }) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          opts = entry;
+          entry = this.cwd;
+        }
+        const { withFileTypes } = opts;
+        if (!entry.canReaddir()) {
+          return [];
+        } else {
+          const p = await entry.readdir();
+          return withFileTypes ? p : p.map((e) => e.name);
+        }
+      }
+      readdirSync(entry = this.cwd, opts = {
+        withFileTypes: true
+      }) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          opts = entry;
+          entry = this.cwd;
+        }
+        const { withFileTypes = true } = opts;
+        if (!entry.canReaddir()) {
+          return [];
+        } else if (withFileTypes) {
+          return entry.readdirSync();
+        } else {
+          return entry.readdirSync().map((e) => e.name);
+        }
+      }
+      /**
+       * Call lstat() on the string or Path object, and update all known
+       * information that can be determined.
+       *
+       * Note that unlike `fs.lstat()`, the returned value does not contain some
+       * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
+       * information is required, you will need to call `fs.lstat` yourself.
+       *
+       * If the Path refers to a nonexistent file, or if the lstat call fails for
+       * any reason, `undefined` is returned.  Otherwise the updated Path object is
+       * returned.
+       *
+       * Results are cached, and thus may be out of date if the filesystem is
+       * mutated.
+       */
+      async lstat(entry = this.cwd) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        }
+        return entry.lstat();
+      }
+      /**
+       * synchronous {@link PathScurryBase.lstat}
+       */
+      lstatSync(entry = this.cwd) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        }
+        return entry.lstatSync();
+      }
+      async readlink(entry = this.cwd, { withFileTypes } = {
+        withFileTypes: false
+      }) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          withFileTypes = entry.withFileTypes;
+          entry = this.cwd;
+        }
+        const e = await entry.readlink();
+        return withFileTypes ? e : e?.fullpath();
+      }
+      readlinkSync(entry = this.cwd, { withFileTypes } = {
+        withFileTypes: false
+      }) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          withFileTypes = entry.withFileTypes;
+          entry = this.cwd;
+        }
+        const e = entry.readlinkSync();
+        return withFileTypes ? e : e?.fullpath();
+      }
+      async realpath(entry = this.cwd, { withFileTypes } = {
+        withFileTypes: false
+      }) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          withFileTypes = entry.withFileTypes;
+          entry = this.cwd;
+        }
+        const e = await entry.realpath();
+        return withFileTypes ? e : e?.fullpath();
+      }
+      realpathSync(entry = this.cwd, { withFileTypes } = {
+        withFileTypes: false
+      }) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          withFileTypes = entry.withFileTypes;
+          entry = this.cwd;
+        }
+        const e = entry.realpathSync();
+        return withFileTypes ? e : e?.fullpath();
+      }
+      async walk(entry = this.cwd, opts = {}) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          opts = entry;
+          entry = this.cwd;
+        }
+        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
+        const results = [];
+        if (!filter || filter(entry)) {
+          results.push(withFileTypes ? entry : entry.fullpath());
+        }
+        const dirs = /* @__PURE__ */ new Set();
+        const walk = (dir, cb) => {
+          dirs.add(dir);
+          dir.readdirCB((er, entries) => {
+            if (er) {
+              return cb(er);
+            }
+            let len = entries.length;
+            if (!len)
+              return cb();
+            const next = () => {
+              if (--len === 0) {
+                cb();
+              }
+            };
+            for (const e of entries) {
+              if (!filter || filter(e)) {
+                results.push(withFileTypes ? e : e.fullpath());
+              }
+              if (follow && e.isSymbolicLink()) {
+                e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r).then((r) => r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next());
+              } else {
+                if (e.shouldWalk(dirs, walkFilter)) {
+                  walk(e, next);
+                } else {
+                  next();
+                }
+              }
+            }
+          }, true);
+        };
+        const start = entry;
+        return new Promise((res, rej) => {
+          walk(start, (er) => {
+            if (er)
+              return rej(er);
+            res(results);
+          });
+        });
+      }
+      walkSync(entry = this.cwd, opts = {}) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          opts = entry;
+          entry = this.cwd;
+        }
+        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
+        const results = [];
+        if (!filter || filter(entry)) {
+          results.push(withFileTypes ? entry : entry.fullpath());
+        }
+        const dirs = /* @__PURE__ */ new Set([entry]);
+        for (const dir of dirs) {
+          const entries = dir.readdirSync();
+          for (const e of entries) {
+            if (!filter || filter(e)) {
+              results.push(withFileTypes ? e : e.fullpath());
+            }
+            let r = e;
+            if (e.isSymbolicLink()) {
+              if (!(follow && (r = e.realpathSync())))
+                continue;
+              if (r.isUnknown())
+                r.lstatSync();
+            }
+            if (r.shouldWalk(dirs, walkFilter)) {
+              dirs.add(r);
+            }
+          }
+        }
+        return results;
+      }
+      /**
+       * Support for `for await`
+       *
+       * Alias for {@link PathScurryBase.iterate}
+       *
+       * Note: As of Node 19, this is very slow, compared to other methods of
+       * walking.  Consider using {@link PathScurryBase.stream} if memory overhead
+       * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
+       */
+      [Symbol.asyncIterator]() {
+        return this.iterate();
+      }
+      iterate(entry = this.cwd, options = {}) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          options = entry;
+          entry = this.cwd;
+        }
+        return this.stream(entry, options)[Symbol.asyncIterator]();
+      }
+      /**
+       * Iterating over a PathScurry performs a synchronous walk.
+       *
+       * Alias for {@link PathScurryBase.iterateSync}
+       */
+      [Symbol.iterator]() {
+        return this.iterateSync();
+      }
+      *iterateSync(entry = this.cwd, opts = {}) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          opts = entry;
+          entry = this.cwd;
+        }
+        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
+        if (!filter || filter(entry)) {
+          yield withFileTypes ? entry : entry.fullpath();
+        }
+        const dirs = /* @__PURE__ */ new Set([entry]);
+        for (const dir of dirs) {
+          const entries = dir.readdirSync();
+          for (const e of entries) {
+            if (!filter || filter(e)) {
+              yield withFileTypes ? e : e.fullpath();
+            }
+            let r = e;
+            if (e.isSymbolicLink()) {
+              if (!(follow && (r = e.realpathSync())))
+                continue;
+              if (r.isUnknown())
+                r.lstatSync();
+            }
+            if (r.shouldWalk(dirs, walkFilter)) {
+              dirs.add(r);
+            }
+          }
+        }
+      }
+      stream(entry = this.cwd, opts = {}) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          opts = entry;
+          entry = this.cwd;
+        }
+        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
+        const results = new minipass_1.Minipass({ objectMode: true });
+        if (!filter || filter(entry)) {
+          results.write(withFileTypes ? entry : entry.fullpath());
+        }
+        const dirs = /* @__PURE__ */ new Set();
+        const queue = [entry];
+        let processing = 0;
+        const process2 = () => {
+          let paused = false;
+          while (!paused) {
+            const dir = queue.shift();
+            if (!dir) {
+              if (processing === 0)
+                results.end();
+              return;
+            }
+            processing++;
+            dirs.add(dir);
+            const onReaddir = (er, entries, didRealpaths = false) => {
+              if (er)
+                return results.emit("error", er);
+              if (follow && !didRealpaths) {
+                const promises = [];
+                for (const e of entries) {
+                  if (e.isSymbolicLink()) {
+                    promises.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r));
+                  }
+                }
+                if (promises.length) {
+                  Promise.all(promises).then(() => onReaddir(null, entries, true));
+                  return;
+                }
+              }
+              for (const e of entries) {
+                if (e && (!filter || filter(e))) {
+                  if (!results.write(withFileTypes ? e : e.fullpath())) {
+                    paused = true;
+                  }
+                }
+              }
+              processing--;
+              for (const e of entries) {
+                const r = e.realpathCached() || e;
+                if (r.shouldWalk(dirs, walkFilter)) {
+                  queue.push(r);
+                }
+              }
+              if (paused && !results.flowing) {
+                results.once("drain", process2);
+              } else if (!sync) {
+                process2();
+              }
+            };
+            let sync = true;
+            dir.readdirCB(onReaddir, true);
+            sync = false;
+          }
+        };
+        process2();
+        return results;
+      }
+      streamSync(entry = this.cwd, opts = {}) {
+        if (typeof entry === "string") {
+          entry = this.cwd.resolve(entry);
+        } else if (!(entry instanceof PathBase)) {
+          opts = entry;
+          entry = this.cwd;
+        }
+        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
+        const results = new minipass_1.Minipass({ objectMode: true });
+        const dirs = /* @__PURE__ */ new Set();
+        if (!filter || filter(entry)) {
+          results.write(withFileTypes ? entry : entry.fullpath());
+        }
+        const queue = [entry];
+        let processing = 0;
+        const process2 = () => {
+          let paused = false;
+          while (!paused) {
+            const dir = queue.shift();
+            if (!dir) {
+              if (processing === 0)
+                results.end();
+              return;
+            }
+            processing++;
+            dirs.add(dir);
+            const entries = dir.readdirSync();
+            for (const e of entries) {
+              if (!filter || filter(e)) {
+                if (!results.write(withFileTypes ? e : e.fullpath())) {
+                  paused = true;
+                }
+              }
+            }
+            processing--;
+            for (const e of entries) {
+              let r = e;
+              if (e.isSymbolicLink()) {
+                if (!(follow && (r = e.realpathSync())))
+                  continue;
+                if (r.isUnknown())
+                  r.lstatSync();
+              }
+              if (r.shouldWalk(dirs, walkFilter)) {
+                queue.push(r);
+              }
+            }
+          }
+          if (paused && !results.flowing)
+            results.once("drain", process2);
+        };
+        process2();
+        return results;
+      }
+      chdir(path7 = this.cwd) {
+        const oldCwd = this.cwd;
+        this.cwd = typeof path7 === "string" ? this.cwd.resolve(path7) : path7;
+        this.cwd[setAsCwd](oldCwd);
+      }
+    };
+    exports2.PathScurryBase = PathScurryBase;
+    var PathScurryWin32 = class extends PathScurryBase {
+      /**
+       * separator for generating path strings
+       */
+      sep = "\\";
+      constructor(cwd = process.cwd(), opts = {}) {
+        const { nocase = true } = opts;
+        super(cwd, node_path_1.win32, "\\", { ...opts, nocase });
+        this.nocase = nocase;
+        for (let p = this.cwd; p; p = p.parent) {
+          p.nocase = this.nocase;
+        }
+      }
+      /**
+       * @internal
+       */
+      parseRootPath(dir) {
+        return node_path_1.win32.parse(dir).root.toUpperCase();
+      }
+      /**
+       * @internal
+       */
+      newRoot(fs7) {
+        return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs7 });
+      }
+      /**
+       * Return true if the provided path string is an absolute path
+       */
+      isAbsolute(p) {
+        return p.startsWith("/") || p.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(p);
+      }
+    };
+    exports2.PathScurryWin32 = PathScurryWin32;
+    var PathScurryPosix = class extends PathScurryBase {
+      /**
+       * separator for generating path strings
+       */
+      sep = "/";
+      constructor(cwd = process.cwd(), opts = {}) {
+        const { nocase = false } = opts;
+        super(cwd, node_path_1.posix, "/", { ...opts, nocase });
+        this.nocase = nocase;
+      }
+      /**
+       * @internal
+       */
+      parseRootPath(_dir) {
+        return "/";
+      }
+      /**
+       * @internal
+       */
+      newRoot(fs7) {
+        return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs7 });
+      }
+      /**
+       * Return true if the provided path string is an absolute path
+       */
+      isAbsolute(p) {
+        return p.startsWith("/");
+      }
+    };
+    exports2.PathScurryPosix = PathScurryPosix;
+    var PathScurryDarwin = class extends PathScurryPosix {
+      constructor(cwd = process.cwd(), opts = {}) {
+        const { nocase = true } = opts;
+        super(cwd, { ...opts, nocase });
+      }
+    };
+    exports2.PathScurryDarwin = PathScurryDarwin;
+    exports2.Path = process.platform === "win32" ? PathWin32 : PathPosix;
+    exports2.PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
+  }
+});
+
+// node_modules/glob/dist/commonjs/pattern.js
+var require_pattern2 = __commonJS({
+  "node_modules/glob/dist/commonjs/pattern.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.Pattern = void 0;
+    var minimatch_1 = require_commonjs3();
+    var isPatternList = (pl2) => pl2.length >= 1;
+    var isGlobList = (gl2) => gl2.length >= 1;
+    var Pattern = class _Pattern {
+      #patternList;
+      #globList;
+      #index;
+      length;
+      #platform;
+      #rest;
+      #globString;
+      #isDrive;
+      #isUNC;
+      #isAbsolute;
+      #followGlobstar = true;
+      constructor(patternList, globList, index, platform) {
+        if (!isPatternList(patternList)) {
+          throw new TypeError("empty pattern list");
+        }
+        if (!isGlobList(globList)) {
+          throw new TypeError("empty glob list");
+        }
+        if (globList.length !== patternList.length) {
+          throw new TypeError("mismatched pattern list and glob list lengths");
+        }
+        this.length = patternList.length;
+        if (index < 0 || index >= this.length) {
+          throw new TypeError("index out of range");
+        }
+        this.#patternList = patternList;
+        this.#globList = globList;
+        this.#index = index;
+        this.#platform = platform;
+        if (this.#index === 0) {
+          if (this.isUNC()) {
+            const [p02, p1, p2, p3, ...prest] = this.#patternList;
+            const [g02, g1, g2, g3, ...grest] = this.#globList;
+            if (prest[0] === "") {
+              prest.shift();
+              grest.shift();
+            }
+            const p = [p02, p1, p2, p3, ""].join("/");
+            const g = [g02, g1, g2, g3, ""].join("/");
+            this.#patternList = [p, ...prest];
+            this.#globList = [g, ...grest];
+            this.length = this.#patternList.length;
+          } else if (this.isDrive() || this.isAbsolute()) {
+            const [p1, ...prest] = this.#patternList;
+            const [g1, ...grest] = this.#globList;
+            if (prest[0] === "") {
+              prest.shift();
+              grest.shift();
+            }
+            const p = p1 + "/";
+            const g = g1 + "/";
+            this.#patternList = [p, ...prest];
+            this.#globList = [g, ...grest];
+            this.length = this.#patternList.length;
+          }
+        }
+      }
+      /**
+       * The first entry in the parsed list of patterns
+       */
+      pattern() {
+        return this.#patternList[this.#index];
+      }
+      /**
+       * true of if pattern() returns a string
+       */
+      isString() {
+        return typeof this.#patternList[this.#index] === "string";
+      }
+      /**
+       * true of if pattern() returns GLOBSTAR
+       */
+      isGlobstar() {
+        return this.#patternList[this.#index] === minimatch_1.GLOBSTAR;
+      }
+      /**
+       * true if pattern() returns a regexp
+       */
+      isRegExp() {
+        return this.#patternList[this.#index] instanceof RegExp;
+      }
+      /**
+       * The /-joined set of glob parts that make up this pattern
+       */
+      globString() {
+        return this.#globString = this.#globString || (this.#index === 0 ? this.isAbsolute() ? this.#globList[0] + this.#globList.slice(1).join("/") : this.#globList.join("/") : this.#globList.slice(this.#index).join("/"));
+      }
+      /**
+       * true if there are more pattern parts after this one
+       */
+      hasMore() {
+        return this.length > this.#index + 1;
+      }
+      /**
+       * The rest of the pattern after this part, or null if this is the end
+       */
+      rest() {
+        if (this.#rest !== void 0)
+          return this.#rest;
+        if (!this.hasMore())
+          return this.#rest = null;
+        this.#rest = new _Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform);
+        this.#rest.#isAbsolute = this.#isAbsolute;
+        this.#rest.#isUNC = this.#isUNC;
+        this.#rest.#isDrive = this.#isDrive;
+        return this.#rest;
+      }
+      /**
+       * true if the pattern represents a //unc/path/ on windows
+       */
+      isUNC() {
+        const pl2 = this.#patternList;
+        return this.#isUNC !== void 0 ? this.#isUNC : this.#isUNC = this.#platform === "win32" && this.#index === 0 && pl2[0] === "" && pl2[1] === "" && typeof pl2[2] === "string" && !!pl2[2] && typeof pl2[3] === "string" && !!pl2[3];
+      }
+      // pattern like C:/...
+      // split = ['C:', ...]
+      // XXX: would be nice to handle patterns like `c:*` to test the cwd
+      // in c: for *, but I don't know of a way to even figure out what that
+      // cwd is without actually chdir'ing into it?
+      /**
+       * True if the pattern starts with a drive letter on Windows
+       */
+      isDrive() {
+        const pl2 = this.#patternList;
+        return this.#isDrive !== void 0 ? this.#isDrive : this.#isDrive = this.#platform === "win32" && this.#index === 0 && this.length > 1 && typeof pl2[0] === "string" && /^[a-z]:$/i.test(pl2[0]);
+      }
+      // pattern = '/' or '/...' or '/x/...'
+      // split = ['', ''] or ['', ...] or ['', 'x', ...]
+      // Drive and UNC both considered absolute on windows
+      /**
+       * True if the pattern is rooted on an absolute path
+       */
+      isAbsolute() {
+        const pl2 = this.#patternList;
+        return this.#isAbsolute !== void 0 ? this.#isAbsolute : this.#isAbsolute = pl2[0] === "" && pl2.length > 1 || this.isDrive() || this.isUNC();
+      }
+      /**
+       * consume the root of the pattern, and return it
+       */
+      root() {
+        const p = this.#patternList[0];
+        return typeof p === "string" && this.isAbsolute() && this.#index === 0 ? p : "";
+      }
+      /**
+       * Check to see if the current globstar pattern is allowed to follow
+       * a symbolic link.
+       */
+      checkFollowGlobstar() {
+        return !(this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar);
+      }
+      /**
+       * Mark that the current globstar pattern is following a symbolic link
+       */
+      markFollowGlobstar() {
+        if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)
+          return false;
+        this.#followGlobstar = false;
+        return true;
+      }
+    };
+    exports2.Pattern = Pattern;
+  }
+});
+
+// node_modules/glob/dist/commonjs/ignore.js
+var require_ignore = __commonJS({
+  "node_modules/glob/dist/commonjs/ignore.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.Ignore = void 0;
+    var minimatch_1 = require_commonjs3();
+    var pattern_js_1 = require_pattern2();
+    var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
+    var Ignore = class {
+      relative;
+      relativeChildren;
+      absolute;
+      absoluteChildren;
+      platform;
+      mmopts;
+      constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform }) {
+        this.relative = [];
+        this.absolute = [];
+        this.relativeChildren = [];
+        this.absoluteChildren = [];
+        this.platform = platform;
+        this.mmopts = {
+          dot: true,
+          nobrace,
+          nocase,
+          noext,
+          noglobstar,
+          optimizationLevel: 2,
+          platform,
+          nocomment: true,
+          nonegate: true
+        };
+        for (const ign of ignored)
+          this.add(ign);
+      }
+      add(ign) {
+        const mm = new minimatch_1.Minimatch(ign, this.mmopts);
+        for (let i = 0; i < mm.set.length; i++) {
+          const parsed = mm.set[i];
+          const globParts = mm.globParts[i];
+          if (!parsed || !globParts) {
+            throw new Error("invalid pattern object");
+          }
+          while (parsed[0] === "." && globParts[0] === ".") {
+            parsed.shift();
+            globParts.shift();
+          }
+          const p = new pattern_js_1.Pattern(parsed, globParts, 0, this.platform);
+          const m = new minimatch_1.Minimatch(p.globString(), this.mmopts);
+          const children = globParts[globParts.length - 1] === "**";
+          const absolute = p.isAbsolute();
+          if (absolute)
+            this.absolute.push(m);
+          else
+            this.relative.push(m);
+          if (children) {
+            if (absolute)
+              this.absoluteChildren.push(m);
+            else
+              this.relativeChildren.push(m);
+          }
+        }
+      }
+      ignored(p) {
+        const fullpath = p.fullpath();
+        const fullpaths = `${fullpath}/`;
+        const relative = p.relative() || ".";
+        const relatives = `${relative}/`;
+        for (const m of this.relative) {
+          if (m.match(relative) || m.match(relatives))
+            return true;
+        }
+        for (const m of this.absolute) {
+          if (m.match(fullpath) || m.match(fullpaths))
+            return true;
+        }
+        return false;
+      }
+      childrenIgnored(p) {
+        const fullpath = p.fullpath() + "/";
+        const relative = (p.relative() || ".") + "/";
+        for (const m of this.relativeChildren) {
+          if (m.match(relative))
+            return true;
+        }
+        for (const m of this.absoluteChildren) {
+          if (m.match(fullpath))
+            return true;
+        }
+        return false;
+      }
+    };
+    exports2.Ignore = Ignore;
+  }
+});
+
+// node_modules/glob/dist/commonjs/processor.js
+var require_processor = __commonJS({
+  "node_modules/glob/dist/commonjs/processor.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0;
+    var minimatch_1 = require_commonjs3();
+    var HasWalkedCache = class _HasWalkedCache {
+      store;
+      constructor(store = /* @__PURE__ */ new Map()) {
+        this.store = store;
+      }
+      copy() {
+        return new _HasWalkedCache(new Map(this.store));
+      }
+      hasWalked(target, pattern) {
+        return this.store.get(target.fullpath())?.has(pattern.globString());
+      }
+      storeWalked(target, pattern) {
+        const fullpath = target.fullpath();
+        const cached = this.store.get(fullpath);
+        if (cached)
+          cached.add(pattern.globString());
+        else
+          this.store.set(fullpath, /* @__PURE__ */ new Set([pattern.globString()]));
+      }
+    };
+    exports2.HasWalkedCache = HasWalkedCache;
+    var MatchRecord = class {
+      store = /* @__PURE__ */ new Map();
+      add(target, absolute, ifDir) {
+        const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0);
+        const current = this.store.get(target);
+        this.store.set(target, current === void 0 ? n : n & current);
+      }
+      // match, absolute, ifdir
+      entries() {
+        return [...this.store.entries()].map(([path7, n]) => [
+          path7,
+          !!(n & 2),
+          !!(n & 1)
+        ]);
+      }
+    };
+    exports2.MatchRecord = MatchRecord;
+    var SubWalks = class {
+      store = /* @__PURE__ */ new Map();
+      add(target, pattern) {
+        if (!target.canReaddir()) {
+          return;
+        }
+        const subs = this.store.get(target);
+        if (subs) {
+          if (!subs.find((p) => p.globString() === pattern.globString())) {
+            subs.push(pattern);
+          }
+        } else
+          this.store.set(target, [pattern]);
+      }
+      get(target) {
+        const subs = this.store.get(target);
+        if (!subs) {
+          throw new Error("attempting to walk unknown path");
+        }
+        return subs;
+      }
+      entries() {
+        return this.keys().map((k) => [k, this.store.get(k)]);
+      }
+      keys() {
+        return [...this.store.keys()].filter((t) => t.canReaddir());
+      }
+    };
+    exports2.SubWalks = SubWalks;
+    var Processor = class _Processor {
+      hasWalkedCache;
+      matches = new MatchRecord();
+      subwalks = new SubWalks();
+      patterns;
+      follow;
+      dot;
+      opts;
+      constructor(opts, hasWalkedCache) {
+        this.opts = opts;
+        this.follow = !!opts.follow;
+        this.dot = !!opts.dot;
+        this.hasWalkedCache = hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache();
+      }
+      processPatterns(target, patterns) {
+        this.patterns = patterns;
+        const processingSet = patterns.map((p) => [target, p]);
+        for (let [t, pattern] of processingSet) {
+          this.hasWalkedCache.storeWalked(t, pattern);
+          const root = pattern.root();
+          const absolute = pattern.isAbsolute() && this.opts.absolute !== false;
+          if (root) {
+            t = t.resolve(root === "/" && this.opts.root !== void 0 ? this.opts.root : root);
+            const rest2 = pattern.rest();
+            if (!rest2) {
+              this.matches.add(t, true, false);
+              continue;
+            } else {
+              pattern = rest2;
+            }
+          }
+          if (t.isENOENT())
+            continue;
+          let p;
+          let rest;
+          let changed = false;
+          while (typeof (p = pattern.pattern()) === "string" && (rest = pattern.rest())) {
+            const c = t.resolve(p);
+            t = c;
+            pattern = rest;
+            changed = true;
+          }
+          p = pattern.pattern();
+          rest = pattern.rest();
+          if (changed) {
+            if (this.hasWalkedCache.hasWalked(t, pattern))
+              continue;
+            this.hasWalkedCache.storeWalked(t, pattern);
+          }
+          if (typeof p === "string") {
+            const ifDir = p === ".." || p === "" || p === ".";
+            this.matches.add(t.resolve(p), absolute, ifDir);
+            continue;
+          } else if (p === minimatch_1.GLOBSTAR) {
+            if (!t.isSymbolicLink() || this.follow || pattern.checkFollowGlobstar()) {
+              this.subwalks.add(t, pattern);
+            }
+            const rp2 = rest?.pattern();
+            const rrest = rest?.rest();
+            if (!rest || (rp2 === "" || rp2 === ".") && !rrest) {
+              this.matches.add(t, absolute, rp2 === "" || rp2 === ".");
+            } else {
+              if (rp2 === "..") {
+                const tp2 = t.parent || t;
+                if (!rrest)
+                  this.matches.add(tp2, absolute, true);
+                else if (!this.hasWalkedCache.hasWalked(tp2, rrest)) {
+                  this.subwalks.add(tp2, rrest);
+                }
+              }
+            }
+          } else if (p instanceof RegExp) {
+            this.subwalks.add(t, pattern);
+          }
+        }
+        return this;
+      }
+      subwalkTargets() {
+        return this.subwalks.keys();
+      }
+      child() {
+        return new _Processor(this.opts, this.hasWalkedCache);
+      }
+      // return a new Processor containing the subwalks for each
+      // child entry, and a set of matches, and
+      // a hasWalkedCache that's a copy of this one
+      // then we're going to call
+      filterEntries(parent, entries) {
+        const patterns = this.subwalks.get(parent);
+        const results = this.child();
+        for (const e of entries) {
+          for (const pattern of patterns) {
+            const absolute = pattern.isAbsolute();
+            const p = pattern.pattern();
+            const rest = pattern.rest();
+            if (p === minimatch_1.GLOBSTAR) {
+              results.testGlobstar(e, pattern, rest, absolute);
+            } else if (p instanceof RegExp) {
+              results.testRegExp(e, p, rest, absolute);
+            } else {
+              results.testString(e, p, rest, absolute);
+            }
+          }
+        }
+        return results;
+      }
+      testGlobstar(e, pattern, rest, absolute) {
+        if (this.dot || !e.name.startsWith(".")) {
+          if (!pattern.hasMore()) {
+            this.matches.add(e, absolute, false);
+          }
+          if (e.canReaddir()) {
+            if (this.follow || !e.isSymbolicLink()) {
+              this.subwalks.add(e, pattern);
+            } else if (e.isSymbolicLink()) {
+              if (rest && pattern.checkFollowGlobstar()) {
+                this.subwalks.add(e, rest);
+              } else if (pattern.markFollowGlobstar()) {
+                this.subwalks.add(e, pattern);
+              }
+            }
+          }
+        }
+        if (rest) {
+          const rp2 = rest.pattern();
+          if (typeof rp2 === "string" && // dots and empty were handled already
+          rp2 !== ".." && rp2 !== "" && rp2 !== ".") {
+            this.testString(e, rp2, rest.rest(), absolute);
+          } else if (rp2 === "..") {
+            const ep2 = e.parent || e;
+            this.subwalks.add(ep2, rest);
+          } else if (rp2 instanceof RegExp) {
+            this.testRegExp(e, rp2, rest.rest(), absolute);
+          }
+        }
+      }
+      testRegExp(e, p, rest, absolute) {
+        if (!p.test(e.name))
+          return;
+        if (!rest) {
+          this.matches.add(e, absolute, false);
+        } else {
+          this.subwalks.add(e, rest);
+        }
+      }
+      testString(e, p, rest, absolute) {
+        if (!e.isNamed(p))
+          return;
+        if (!rest) {
+          this.matches.add(e, absolute, false);
+        } else {
+          this.subwalks.add(e, rest);
+        }
+      }
+    };
+    exports2.Processor = Processor;
+  }
+});
+
+// node_modules/glob/dist/commonjs/walker.js
+var require_walker = __commonJS({
+  "node_modules/glob/dist/commonjs/walker.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0;
+    var minipass_1 = require_commonjs5();
+    var ignore_js_1 = require_ignore();
+    var processor_js_1 = require_processor();
+    var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore;
+    var GlobUtil = class {
+      path;
+      patterns;
+      opts;
+      seen = /* @__PURE__ */ new Set();
+      paused = false;
+      aborted = false;
+      #onResume = [];
+      #ignore;
+      #sep;
+      signal;
+      maxDepth;
+      includeChildMatches;
+      constructor(patterns, path7, opts) {
+        this.patterns = patterns;
+        this.path = path7;
+        this.opts = opts;
+        this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
+        this.includeChildMatches = opts.includeChildMatches !== false;
+        if (opts.ignore || !this.includeChildMatches) {
+          this.#ignore = makeIgnore(opts.ignore ?? [], opts);
+          if (!this.includeChildMatches && typeof this.#ignore.add !== "function") {
+            const m = "cannot ignore child matches, ignore lacks add() method.";
+            throw new Error(m);
+          }
+        }
+        this.maxDepth = opts.maxDepth || Infinity;
+        if (opts.signal) {
+          this.signal = opts.signal;
+          this.signal.addEventListener("abort", () => {
+            this.#onResume.length = 0;
+          });
+        }
+      }
+      #ignored(path7) {
+        return this.seen.has(path7) || !!this.#ignore?.ignored?.(path7);
+      }
+      #childrenIgnored(path7) {
+        return !!this.#ignore?.childrenIgnored?.(path7);
+      }
+      // backpressure mechanism
+      pause() {
+        this.paused = true;
+      }
+      resume() {
+        if (this.signal?.aborted)
+          return;
+        this.paused = false;
+        let fn = void 0;
+        while (!this.paused && (fn = this.#onResume.shift())) {
+          fn();
+        }
+      }
+      onResume(fn) {
+        if (this.signal?.aborted)
+          return;
+        if (!this.paused) {
+          fn();
+        } else {
+          this.#onResume.push(fn);
+        }
+      }
+      // do the requisite realpath/stat checking, and return the path
+      // to add or undefined to filter it out.
+      async matchCheck(e, ifDir) {
+        if (ifDir && this.opts.nodir)
+          return void 0;
+        let rpc;
+        if (this.opts.realpath) {
+          rpc = e.realpathCached() || await e.realpath();
+          if (!rpc)
+            return void 0;
+          e = rpc;
+        }
+        const needStat = e.isUnknown() || this.opts.stat;
+        const s = needStat ? await e.lstat() : e;
+        if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
+          const target = await s.realpath();
+          if (target && (target.isUnknown() || this.opts.stat)) {
+            await target.lstat();
+          }
+        }
+        return this.matchCheckTest(s, ifDir);
+      }
+      matchCheckTest(e, ifDir) {
+        return e && (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && (!ifDir || e.canReaddir()) && (!this.opts.nodir || !e.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !e.isSymbolicLink() || !e.realpathCached()?.isDirectory()) && !this.#ignored(e) ? e : void 0;
+      }
+      matchCheckSync(e, ifDir) {
+        if (ifDir && this.opts.nodir)
+          return void 0;
+        let rpc;
+        if (this.opts.realpath) {
+          rpc = e.realpathCached() || e.realpathSync();
+          if (!rpc)
+            return void 0;
+          e = rpc;
+        }
+        const needStat = e.isUnknown() || this.opts.stat;
+        const s = needStat ? e.lstatSync() : e;
+        if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
+          const target = s.realpathSync();
+          if (target && (target?.isUnknown() || this.opts.stat)) {
+            target.lstatSync();
+          }
+        }
+        return this.matchCheckTest(s, ifDir);
+      }
+      matchFinish(e, absolute) {
+        if (this.#ignored(e))
+          return;
+        if (!this.includeChildMatches && this.#ignore?.add) {
+          const ign = `${e.relativePosix()}/**`;
+          this.#ignore.add(ign);
+        }
+        const abs = this.opts.absolute === void 0 ? absolute : this.opts.absolute;
+        this.seen.add(e);
+        const mark = this.opts.mark && e.isDirectory() ? this.#sep : "";
+        if (this.opts.withFileTypes) {
+          this.matchEmit(e);
+        } else if (abs) {
+          const abs2 = this.opts.posix ? e.fullpathPosix() : e.fullpath();
+          this.matchEmit(abs2 + mark);
+        } else {
+          const rel = this.opts.posix ? e.relativePosix() : e.relative();
+          const pre = this.opts.dotRelative && !rel.startsWith(".." + this.#sep) ? "." + this.#sep : "";
+          this.matchEmit(!rel ? "." + mark : pre + rel + mark);
+        }
+      }
+      async match(e, absolute, ifDir) {
+        const p = await this.matchCheck(e, ifDir);
+        if (p)
+          this.matchFinish(p, absolute);
+      }
+      matchSync(e, absolute, ifDir) {
+        const p = this.matchCheckSync(e, ifDir);
+        if (p)
+          this.matchFinish(p, absolute);
+      }
+      walkCB(target, patterns, cb) {
+        if (this.signal?.aborted)
+          cb();
+        this.walkCB2(target, patterns, new processor_js_1.Processor(this.opts), cb);
+      }
+      walkCB2(target, patterns, processor, cb) {
+        if (this.#childrenIgnored(target))
+          return cb();
+        if (this.signal?.aborted)
+          cb();
+        if (this.paused) {
+          this.onResume(() => this.walkCB2(target, patterns, processor, cb));
+          return;
+        }
+        processor.processPatterns(target, patterns);
+        let tasks = 1;
+        const next = () => {
+          if (--tasks === 0)
+            cb();
+        };
+        for (const [m, absolute, ifDir] of processor.matches.entries()) {
+          if (this.#ignored(m))
+            continue;
+          tasks++;
+          this.match(m, absolute, ifDir).then(() => next());
+        }
+        for (const t of processor.subwalkTargets()) {
+          if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
+            continue;
+          }
+          tasks++;
+          const childrenCached = t.readdirCached();
+          if (t.calledReaddir())
+            this.walkCB3(t, childrenCached, processor, next);
+          else {
+            t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true);
+          }
+        }
+        next();
+      }
+      walkCB3(target, entries, processor, cb) {
+        processor = processor.filterEntries(target, entries);
+        let tasks = 1;
+        const next = () => {
+          if (--tasks === 0)
+            cb();
+        };
+        for (const [m, absolute, ifDir] of processor.matches.entries()) {
+          if (this.#ignored(m))
+            continue;
+          tasks++;
+          this.match(m, absolute, ifDir).then(() => next());
+        }
+        for (const [target2, patterns] of processor.subwalks.entries()) {
+          tasks++;
+          this.walkCB2(target2, patterns, processor.child(), next);
+        }
+        next();
+      }
+      walkCBSync(target, patterns, cb) {
+        if (this.signal?.aborted)
+          cb();
+        this.walkCB2Sync(target, patterns, new processor_js_1.Processor(this.opts), cb);
+      }
+      walkCB2Sync(target, patterns, processor, cb) {
+        if (this.#childrenIgnored(target))
+          return cb();
+        if (this.signal?.aborted)
+          cb();
+        if (this.paused) {
+          this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb));
+          return;
+        }
+        processor.processPatterns(target, patterns);
+        let tasks = 1;
+        const next = () => {
+          if (--tasks === 0)
+            cb();
+        };
+        for (const [m, absolute, ifDir] of processor.matches.entries()) {
+          if (this.#ignored(m))
+            continue;
+          this.matchSync(m, absolute, ifDir);
+        }
+        for (const t of processor.subwalkTargets()) {
+          if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
+            continue;
+          }
+          tasks++;
+          const children = t.readdirSync();
+          this.walkCB3Sync(t, children, processor, next);
+        }
+        next();
+      }
+      walkCB3Sync(target, entries, processor, cb) {
+        processor = processor.filterEntries(target, entries);
+        let tasks = 1;
+        const next = () => {
+          if (--tasks === 0)
+            cb();
+        };
+        for (const [m, absolute, ifDir] of processor.matches.entries()) {
+          if (this.#ignored(m))
+            continue;
+          this.matchSync(m, absolute, ifDir);
+        }
+        for (const [target2, patterns] of processor.subwalks.entries()) {
+          tasks++;
+          this.walkCB2Sync(target2, patterns, processor.child(), next);
+        }
+        next();
+      }
+    };
+    exports2.GlobUtil = GlobUtil;
+    var GlobWalker = class extends GlobUtil {
+      matches = /* @__PURE__ */ new Set();
+      constructor(patterns, path7, opts) {
+        super(patterns, path7, opts);
+      }
+      matchEmit(e) {
+        this.matches.add(e);
+      }
+      async walk() {
+        if (this.signal?.aborted)
+          throw this.signal.reason;
+        if (this.path.isUnknown()) {
+          await this.path.lstat();
+        }
+        await new Promise((res, rej) => {
+          this.walkCB(this.path, this.patterns, () => {
+            if (this.signal?.aborted) {
+              rej(this.signal.reason);
+            } else {
+              res(this.matches);
+            }
+          });
+        });
+        return this.matches;
+      }
+      walkSync() {
+        if (this.signal?.aborted)
+          throw this.signal.reason;
+        if (this.path.isUnknown()) {
+          this.path.lstatSync();
+        }
+        this.walkCBSync(this.path, this.patterns, () => {
+          if (this.signal?.aborted)
+            throw this.signal.reason;
+        });
+        return this.matches;
+      }
+    };
+    exports2.GlobWalker = GlobWalker;
+    var GlobStream = class extends GlobUtil {
+      results;
+      constructor(patterns, path7, opts) {
+        super(patterns, path7, opts);
+        this.results = new minipass_1.Minipass({
+          signal: this.signal,
+          objectMode: true
+        });
+        this.results.on("drain", () => this.resume());
+        this.results.on("resume", () => this.resume());
+      }
+      matchEmit(e) {
+        this.results.write(e);
+        if (!this.results.flowing)
+          this.pause();
+      }
+      stream() {
+        const target = this.path;
+        if (target.isUnknown()) {
+          target.lstat().then(() => {
+            this.walkCB(target, this.patterns, () => this.results.end());
+          });
+        } else {
+          this.walkCB(target, this.patterns, () => this.results.end());
+        }
+        return this.results;
+      }
+      streamSync() {
+        if (this.path.isUnknown()) {
+          this.path.lstatSync();
+        }
+        this.walkCBSync(this.path, this.patterns, () => this.results.end());
+        return this.results;
+      }
+    };
+    exports2.GlobStream = GlobStream;
+  }
+});
+
+// node_modules/glob/dist/commonjs/glob.js
+var require_glob = __commonJS({
+  "node_modules/glob/dist/commonjs/glob.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.Glob = void 0;
+    var minimatch_1 = require_commonjs3();
+    var node_url_1 = require("node:url");
+    var path_scurry_1 = require_commonjs6();
+    var pattern_js_1 = require_pattern2();
+    var walker_js_1 = require_walker();
+    var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
+    var Glob = class {
+      absolute;
+      cwd;
+      root;
+      dot;
+      dotRelative;
+      follow;
+      ignore;
+      magicalBraces;
+      mark;
+      matchBase;
+      maxDepth;
+      nobrace;
+      nocase;
+      nodir;
+      noext;
+      noglobstar;
+      pattern;
+      platform;
+      realpath;
+      scurry;
+      stat;
+      signal;
+      windowsPathsNoEscape;
+      withFileTypes;
+      includeChildMatches;
+      /**
+       * The options provided to the constructor.
+       */
+      opts;
+      /**
+       * An array of parsed immutable {@link Pattern} objects.
+       */
+      patterns;
+      /**
+       * All options are stored as properties on the `Glob` object.
+       *
+       * See {@link GlobOptions} for full options descriptions.
+       *
+       * Note that a previous `Glob` object can be passed as the
+       * `GlobOptions` to another `Glob` instantiation to re-use settings
+       * and caches with a new pattern.
+       *
+       * Traversal functions can be called multiple times to run the walk
+       * again.
+       */
+      constructor(pattern, opts) {
+        if (!opts)
+          throw new TypeError("glob options required");
+        this.withFileTypes = !!opts.withFileTypes;
+        this.signal = opts.signal;
+        this.follow = !!opts.follow;
+        this.dot = !!opts.dot;
+        this.dotRelative = !!opts.dotRelative;
+        this.nodir = !!opts.nodir;
+        this.mark = !!opts.mark;
+        if (!opts.cwd) {
+          this.cwd = "";
+        } else if (opts.cwd instanceof URL || opts.cwd.startsWith("file://")) {
+          opts.cwd = (0, node_url_1.fileURLToPath)(opts.cwd);
+        }
+        this.cwd = opts.cwd || "";
+        this.root = opts.root;
+        this.magicalBraces = !!opts.magicalBraces;
+        this.nobrace = !!opts.nobrace;
+        this.noext = !!opts.noext;
+        this.realpath = !!opts.realpath;
+        this.absolute = opts.absolute;
+        this.includeChildMatches = opts.includeChildMatches !== false;
+        this.noglobstar = !!opts.noglobstar;
+        this.matchBase = !!opts.matchBase;
+        this.maxDepth = typeof opts.maxDepth === "number" ? opts.maxDepth : Infinity;
+        this.stat = !!opts.stat;
+        this.ignore = opts.ignore;
+        if (this.withFileTypes && this.absolute !== void 0) {
+          throw new Error("cannot set absolute and withFileTypes:true");
+        }
+        if (typeof pattern === "string") {
+          pattern = [pattern];
+        }
+        this.windowsPathsNoEscape = !!opts.windowsPathsNoEscape || opts.allowWindowsEscape === false;
+        if (this.windowsPathsNoEscape) {
+          pattern = pattern.map((p) => p.replace(/\\/g, "/"));
+        }
+        if (this.matchBase) {
+          if (opts.noglobstar) {
+            throw new TypeError("base matching requires globstar");
+          }
+          pattern = pattern.map((p) => p.includes("/") ? p : `./**/${p}`);
+        }
+        this.pattern = pattern;
+        this.platform = opts.platform || defaultPlatform;
+        this.opts = { ...opts, platform: this.platform };
+        if (opts.scurry) {
+          this.scurry = opts.scurry;
+          if (opts.nocase !== void 0 && opts.nocase !== opts.scurry.nocase) {
+            throw new Error("nocase option contradicts provided scurry option");
+          }
+        } else {
+          const Scurry = opts.platform === "win32" ? path_scurry_1.PathScurryWin32 : opts.platform === "darwin" ? path_scurry_1.PathScurryDarwin : opts.platform ? path_scurry_1.PathScurryPosix : path_scurry_1.PathScurry;
+          this.scurry = new Scurry(this.cwd, {
+            nocase: opts.nocase,
+            fs: opts.fs
+          });
+        }
+        this.nocase = this.scurry.nocase;
+        const nocaseMagicOnly = this.platform === "darwin" || this.platform === "win32";
+        const mmo = {
+          // default nocase based on platform
+          ...opts,
+          dot: this.dot,
+          matchBase: this.matchBase,
+          nobrace: this.nobrace,
+          nocase: this.nocase,
+          nocaseMagicOnly,
+          nocomment: true,
+          noext: this.noext,
+          nonegate: true,
+          optimizationLevel: 2,
+          platform: this.platform,
+          windowsPathsNoEscape: this.windowsPathsNoEscape,
+          debug: !!this.opts.debug
+        };
+        const mms = this.pattern.map((p) => new minimatch_1.Minimatch(p, mmo));
+        const [matchSet, globParts] = mms.reduce((set, m) => {
+          set[0].push(...m.set);
+          set[1].push(...m.globParts);
+          return set;
+        }, [[], []]);
+        this.patterns = matchSet.map((set, i) => {
+          const g = globParts[i];
+          if (!g)
+            throw new Error("invalid pattern object");
+          return new pattern_js_1.Pattern(set, g, 0, this.platform);
+        });
+      }
+      async walk() {
+        return [
+          ...await new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
+            ...this.opts,
+            maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
+            platform: this.platform,
+            nocase: this.nocase,
+            includeChildMatches: this.includeChildMatches
+          }).walk()
+        ];
+      }
+      walkSync() {
+        return [
+          ...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
+            ...this.opts,
+            maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
+            platform: this.platform,
+            nocase: this.nocase,
+            includeChildMatches: this.includeChildMatches
+          }).walkSync()
+        ];
+      }
+      stream() {
+        return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
+          ...this.opts,
+          maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
+          platform: this.platform,
+          nocase: this.nocase,
+          includeChildMatches: this.includeChildMatches
+        }).stream();
+      }
+      streamSync() {
+        return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
+          ...this.opts,
+          maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
+          platform: this.platform,
+          nocase: this.nocase,
+          includeChildMatches: this.includeChildMatches
+        }).streamSync();
+      }
+      /**
+       * Default sync iteration function. Returns a Generator that
+       * iterates over the results.
+       */
+      iterateSync() {
+        return this.streamSync()[Symbol.iterator]();
+      }
+      [Symbol.iterator]() {
+        return this.iterateSync();
+      }
+      /**
+       * Default async iteration function. Returns an AsyncGenerator that
+       * iterates over the results.
+       */
+      iterate() {
+        return this.stream()[Symbol.asyncIterator]();
+      }
+      [Symbol.asyncIterator]() {
+        return this.iterate();
+      }
+    };
+    exports2.Glob = Glob;
+  }
+});
+
+// node_modules/glob/dist/commonjs/has-magic.js
+var require_has_magic = __commonJS({
+  "node_modules/glob/dist/commonjs/has-magic.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.hasMagic = void 0;
+    var minimatch_1 = require_commonjs3();
+    var hasMagic = (pattern, options = {}) => {
+      if (!Array.isArray(pattern)) {
+        pattern = [pattern];
+      }
+      for (const p of pattern) {
+        if (new minimatch_1.Minimatch(p, options).hasMagic())
+          return true;
+      }
+      return false;
+    };
+    exports2.hasMagic = hasMagic;
+  }
+});
+
+// node_modules/glob/dist/commonjs/index.js
+var require_commonjs7 = __commonJS({
+  "node_modules/glob/dist/commonjs/index.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.glob = exports2.sync = exports2.iterate = exports2.iterateSync = exports2.stream = exports2.streamSync = exports2.Ignore = exports2.hasMagic = exports2.Glob = exports2.unescape = exports2.escape = void 0;
+    exports2.globStreamSync = globStreamSync;
+    exports2.globStream = globStream;
+    exports2.globSync = globSync;
+    exports2.globIterateSync = globIterateSync;
+    exports2.globIterate = globIterate;
+    var minimatch_1 = require_commonjs3();
+    var glob_js_1 = require_glob();
+    var has_magic_js_1 = require_has_magic();
+    var minimatch_2 = require_commonjs3();
+    Object.defineProperty(exports2, "escape", { enumerable: true, get: function() {
+      return minimatch_2.escape;
+    } });
+    Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() {
+      return minimatch_2.unescape;
+    } });
+    var glob_js_2 = require_glob();
+    Object.defineProperty(exports2, "Glob", { enumerable: true, get: function() {
+      return glob_js_2.Glob;
+    } });
+    var has_magic_js_2 = require_has_magic();
+    Object.defineProperty(exports2, "hasMagic", { enumerable: true, get: function() {
+      return has_magic_js_2.hasMagic;
+    } });
+    var ignore_js_1 = require_ignore();
+    Object.defineProperty(exports2, "Ignore", { enumerable: true, get: function() {
+      return ignore_js_1.Ignore;
+    } });
+    function globStreamSync(pattern, options = {}) {
+      return new glob_js_1.Glob(pattern, options).streamSync();
+    }
+    function globStream(pattern, options = {}) {
+      return new glob_js_1.Glob(pattern, options).stream();
+    }
+    function globSync(pattern, options = {}) {
+      return new glob_js_1.Glob(pattern, options).walkSync();
+    }
+    async function glob_(pattern, options = {}) {
+      return new glob_js_1.Glob(pattern, options).walk();
+    }
+    function globIterateSync(pattern, options = {}) {
+      return new glob_js_1.Glob(pattern, options).iterateSync();
+    }
+    function globIterate(pattern, options = {}) {
+      return new glob_js_1.Glob(pattern, options).iterate();
+    }
+    exports2.streamSync = globStreamSync;
+    exports2.stream = Object.assign(globStream, { sync: globStreamSync });
+    exports2.iterateSync = globIterateSync;
+    exports2.iterate = Object.assign(globIterate, {
+      sync: globIterateSync
+    });
+    exports2.sync = Object.assign(globSync, {
+      stream: globStreamSync,
+      iterate: globIterateSync
+    });
+    exports2.glob = Object.assign(glob_, {
+      glob: glob_,
+      globSync,
+      sync: exports2.sync,
+      globStream,
+      stream: exports2.stream,
+      globStreamSync,
+      streamSync: exports2.streamSync,
+      globIterate,
+      iterate: exports2.iterate,
+      globIterateSync,
+      iterateSync: exports2.iterateSync,
+      Glob: glob_js_1.Glob,
+      hasMagic: has_magic_js_1.hasMagic,
+      escape: minimatch_1.escape,
+      unescape: minimatch_1.unescape
+    });
+    exports2.glob.glob = exports2.glob;
+  }
+});
+
+// node_modules/@fastify/send/lib/isUtf8MimeType.js
+var require_isUtf8MimeType = __commonJS({
+  "node_modules/@fastify/send/lib/isUtf8MimeType.js"(exports2, module2) {
+    "use strict";
+    function isUtf8MimeType(value) {
+      const len = value.length;
+      return len > 21 && value.indexOf("application/javascript") === 0 || len > 14 && value.indexOf("application/json") === 0 || len > 5 && value.indexOf("text/") === 0;
+    }
+    module2.exports.isUtf8MimeType = isUtf8MimeType;
+  }
+});
+
+// node_modules/mime/Mime.js
+var require_Mime = __commonJS({
+  "node_modules/mime/Mime.js"(exports2, module2) {
+    "use strict";
+    function Mime() {
+      this._types = /* @__PURE__ */ Object.create(null);
+      this._extensions = /* @__PURE__ */ Object.create(null);
+      for (let i = 0; i < arguments.length; i++) {
+        this.define(arguments[i]);
+      }
+      this.define = this.define.bind(this);
+      this.getType = this.getType.bind(this);
+      this.getExtension = this.getExtension.bind(this);
+    }
+    Mime.prototype.define = function(typeMap, force) {
+      for (let type in typeMap) {
+        let extensions = typeMap[type].map(function(t) {
+          return t.toLowerCase();
+        });
+        type = type.toLowerCase();
+        for (let i = 0; i < extensions.length; i++) {
+          const ext = extensions[i];
+          if (ext[0] === "*") {
+            continue;
+          }
+          if (!force && ext in this._types) {
+            throw new Error(
+              'Attempt to change mapping for "' + ext + '" extension from "' + this._types[ext] + '" to "' + type + '". Pass `force=true` to allow this, otherwise remove "' + ext + '" from the list of extensions for "' + type + '".'
+            );
+          }
+          this._types[ext] = type;
+        }
+        if (force || !this._extensions[type]) {
+          const ext = extensions[0];
+          this._extensions[type] = ext[0] !== "*" ? ext : ext.substr(1);
+        }
+      }
+    };
+    Mime.prototype.getType = function(path7) {
+      path7 = String(path7);
+      let last = path7.replace(/^.*[/\\]/, "").toLowerCase();
+      let ext = last.replace(/^.*\./, "").toLowerCase();
+      let hasPath = last.length < path7.length;
+      let hasDot = ext.length < last.length - 1;
+      return (hasDot || !hasPath) && this._types[ext] || null;
+    };
+    Mime.prototype.getExtension = function(type) {
+      type = /^\s*([^;\s]*)/.test(type) && RegExp.$1;
+      return type && this._extensions[type.toLowerCase()] || null;
+    };
+    module2.exports = Mime;
+  }
+});
+
+// node_modules/mime/types/standard.js
+var require_standard = __commonJS({
+  "node_modules/mime/types/standard.js"(exports2, module2) {
+    module2.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
+  }
+});
+
+// node_modules/mime/types/other.js
+var require_other = __commonJS({
+  "node_modules/mime/types/other.js"(exports2, module2) {
+    module2.exports = { "application/prs.cww": ["cww"], "application/vnd.1000minds.decision-model+xml": ["1km"], "application/vnd.3gpp.pic-bw-large": ["plb"], "application/vnd.3gpp.pic-bw-small": ["psb"], "application/vnd.3gpp.pic-bw-var": ["pvb"], "application/vnd.3gpp2.tcap": ["tcap"], "application/vnd.3m.post-it-notes": ["pwn"], "application/vnd.accpac.simply.aso": ["aso"], "application/vnd.accpac.simply.imp": ["imp"], "application/vnd.acucobol": ["acu"], "application/vnd.acucorp": ["atc", "acutc"], "application/vnd.adobe.air-application-installer-package+zip": ["air"], "application/vnd.adobe.formscentral.fcdt": ["fcdt"], "application/vnd.adobe.fxp": ["fxp", "fxpl"], "application/vnd.adobe.xdp+xml": ["xdp"], "application/vnd.adobe.xfdf": ["xfdf"], "application/vnd.ahead.space": ["ahead"], "application/vnd.airzip.filesecure.azf": ["azf"], "application/vnd.airzip.filesecure.azs": ["azs"], "application/vnd.amazon.ebook": ["azw"], "application/vnd.americandynamics.acc": ["acc"], "application/vnd.amiga.ami": ["ami"], "application/vnd.android.package-archive": ["apk"], "application/vnd.anser-web-certificate-issue-initiation": ["cii"], "application/vnd.anser-web-funds-transfer-initiation": ["fti"], "application/vnd.antix.game-component": ["atx"], "application/vnd.apple.installer+xml": ["mpkg"], "application/vnd.apple.keynote": ["key"], "application/vnd.apple.mpegurl": ["m3u8"], "application/vnd.apple.numbers": ["numbers"], "application/vnd.apple.pages": ["pages"], "application/vnd.apple.pkpass": ["pkpass"], "application/vnd.aristanetworks.swi": ["swi"], "application/vnd.astraea-software.iota": ["iota"], "application/vnd.audiograph": ["aep"], "application/vnd.balsamiq.bmml+xml": ["bmml"], "application/vnd.blueice.multipass": ["mpm"], "application/vnd.bmi": ["bmi"], "application/vnd.businessobjects": ["rep"], "application/vnd.chemdraw+xml": ["cdxml"], "application/vnd.chipnuts.karaoke-mmd": ["mmd"], "application/vnd.cinderella": ["cdy"], "application/vnd.citationstyles.style+xml": ["csl"], "application/vnd.claymore": ["cla"], "application/vnd.cloanto.rp9": ["rp9"], "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], "application/vnd.cluetrust.cartomobile-config": ["c11amc"], "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], "application/vnd.commonspace": ["csp"], "application/vnd.contact.cmsg": ["cdbcmsg"], "application/vnd.cosmocaller": ["cmc"], "application/vnd.crick.clicker": ["clkx"], "application/vnd.crick.clicker.keyboard": ["clkk"], "application/vnd.crick.clicker.palette": ["clkp"], "application/vnd.crick.clicker.template": ["clkt"], "application/vnd.crick.clicker.wordbank": ["clkw"], "application/vnd.criticaltools.wbs+xml": ["wbs"], "application/vnd.ctc-posml": ["pml"], "application/vnd.cups-ppd": ["ppd"], "application/vnd.curl.car": ["car"], "application/vnd.curl.pcurl": ["pcurl"], "application/vnd.dart": ["dart"], "application/vnd.data-vision.rdz": ["rdz"], "application/vnd.dbf": ["dbf"], "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], "application/vnd.dece.ttml+xml": ["uvt", "uvvt"], "application/vnd.dece.unspecified": ["uvx", "uvvx"], "application/vnd.dece.zip": ["uvz", "uvvz"], "application/vnd.denovo.fcselayout-link": ["fe_launch"], "application/vnd.dna": ["dna"], "application/vnd.dolby.mlp": ["mlp"], "application/vnd.dpgraph": ["dpg"], "application/vnd.dreamfactory": ["dfac"], "application/vnd.ds-keypoint": ["kpxx"], "application/vnd.dvb.ait": ["ait"], "application/vnd.dvb.service": ["svc"], "application/vnd.dynageo": ["geo"], "application/vnd.ecowin.chart": ["mag"], "application/vnd.enliven": ["nml"], "application/vnd.epson.esf": ["esf"], "application/vnd.epson.msf": ["msf"], "application/vnd.epson.quickanime": ["qam"], "application/vnd.epson.salt": ["slt"], "application/vnd.epson.ssf": ["ssf"], "application/vnd.eszigno3+xml": ["es3", "et3"], "application/vnd.ezpix-album": ["ez2"], "application/vnd.ezpix-package": ["ez3"], "application/vnd.fdf": ["fdf"], "application/vnd.fdsn.mseed": ["mseed"], "application/vnd.fdsn.seed": ["seed", "dataless"], "application/vnd.flographit": ["gph"], "application/vnd.fluxtime.clip": ["ftc"], "application/vnd.framemaker": ["fm", "frame", "maker", "book"], "application/vnd.frogans.fnc": ["fnc"], "application/vnd.frogans.ltf": ["ltf"], "application/vnd.fsc.weblaunch": ["fsc"], "application/vnd.fujitsu.oasys": ["oas"], "application/vnd.fujitsu.oasys2": ["oa2"], "application/vnd.fujitsu.oasys3": ["oa3"], "application/vnd.fujitsu.oasysgp": ["fg5"], "application/vnd.fujitsu.oasysprs": ["bh2"], "application/vnd.fujixerox.ddd": ["ddd"], "application/vnd.fujixerox.docuworks": ["xdw"], "application/vnd.fujixerox.docuworks.binder": ["xbd"], "application/vnd.fuzzysheet": ["fzs"], "application/vnd.genomatix.tuxedo": ["txd"], "application/vnd.geogebra.file": ["ggb"], "application/vnd.geogebra.tool": ["ggt"], "application/vnd.geometry-explorer": ["gex", "gre"], "application/vnd.geonext": ["gxt"], "application/vnd.geoplan": ["g2w"], "application/vnd.geospace": ["g3w"], "application/vnd.gmx": ["gmx"], "application/vnd.google-apps.document": ["gdoc"], "application/vnd.google-apps.presentation": ["gslides"], "application/vnd.google-apps.spreadsheet": ["gsheet"], "application/vnd.google-earth.kml+xml": ["kml"], "application/vnd.google-earth.kmz": ["kmz"], "application/vnd.grafeq": ["gqf", "gqs"], "application/vnd.groove-account": ["gac"], "application/vnd.groove-help": ["ghf"], "application/vnd.groove-identity-message": ["gim"], "application/vnd.groove-injector": ["grv"], "application/vnd.groove-tool-message": ["gtm"], "application/vnd.groove-tool-template": ["tpl"], "application/vnd.groove-vcard": ["vcg"], "application/vnd.hal+xml": ["hal"], "application/vnd.handheld-entertainment+xml": ["zmm"], "application/vnd.hbci": ["hbci"], "application/vnd.hhe.lesson-player": ["les"], "application/vnd.hp-hpgl": ["hpgl"], "application/vnd.hp-hpid": ["hpid"], "application/vnd.hp-hps": ["hps"], "application/vnd.hp-jlyt": ["jlt"], "application/vnd.hp-pcl": ["pcl"], "application/vnd.hp-pclxl": ["pclxl"], "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], "application/vnd.ibm.minipay": ["mpy"], "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"], "application/vnd.ibm.rights-management": ["irm"], "application/vnd.ibm.secure-container": ["sc"], "application/vnd.iccprofile": ["icc", "icm"], "application/vnd.igloader": ["igl"], "application/vnd.immervision-ivp": ["ivp"], "application/vnd.immervision-ivu": ["ivu"], "application/vnd.insors.igm": ["igm"], "application/vnd.intercon.formnet": ["xpw", "xpx"], "application/vnd.intergeo": ["i2g"], "application/vnd.intu.qbo": ["qbo"], "application/vnd.intu.qfx": ["qfx"], "application/vnd.ipunplugged.rcprofile": ["rcprofile"], "application/vnd.irepository.package+xml": ["irp"], "application/vnd.is-xpr": ["xpr"], "application/vnd.isac.fcs": ["fcs"], "application/vnd.jam": ["jam"], "application/vnd.jcp.javame.midlet-rms": ["rms"], "application/vnd.jisp": ["jisp"], "application/vnd.joost.joda-archive": ["joda"], "application/vnd.kahootz": ["ktz", "ktr"], "application/vnd.kde.karbon": ["karbon"], "application/vnd.kde.kchart": ["chrt"], "application/vnd.kde.kformula": ["kfo"], "application/vnd.kde.kivio": ["flw"], "application/vnd.kde.kontour": ["kon"], "application/vnd.kde.kpresenter": ["kpr", "kpt"], "application/vnd.kde.kspread": ["ksp"], "application/vnd.kde.kword": ["kwd", "kwt"], "application/vnd.kenameaapp": ["htke"], "application/vnd.kidspiration": ["kia"], "application/vnd.kinar": ["kne", "knp"], "application/vnd.koan": ["skp", "skd", "skt", "skm"], "application/vnd.kodak-descriptor": ["sse"], "application/vnd.las.las+xml": ["lasxml"], "application/vnd.llamagraphics.life-balance.desktop": ["lbd"], "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], "application/vnd.lotus-1-2-3": ["123"], "application/vnd.lotus-approach": ["apr"], "application/vnd.lotus-freelance": ["pre"], "application/vnd.lotus-notes": ["nsf"], "application/vnd.lotus-organizer": ["org"], "application/vnd.lotus-screencam": ["scm"], "application/vnd.lotus-wordpro": ["lwp"], "application/vnd.macports.portpkg": ["portpkg"], "application/vnd.mapbox-vector-tile": ["mvt"], "application/vnd.mcd": ["mcd"], "application/vnd.medcalcdata": ["mc1"], "application/vnd.mediastation.cdkey": ["cdkey"], "application/vnd.mfer": ["mwf"], "application/vnd.mfmp": ["mfm"], "application/vnd.micrografx.flo": ["flo"], "application/vnd.micrografx.igx": ["igx"], "application/vnd.mif": ["mif"], "application/vnd.mobius.daf": ["daf"], "application/vnd.mobius.dis": ["dis"], "application/vnd.mobius.mbk": ["mbk"], "application/vnd.mobius.mqy": ["mqy"], "application/vnd.mobius.msl": ["msl"], "application/vnd.mobius.plc": ["plc"], "application/vnd.mobius.txf": ["txf"], "application/vnd.mophun.application": ["mpn"], "application/vnd.mophun.certificate": ["mpc"], "application/vnd.mozilla.xul+xml": ["xul"], "application/vnd.ms-artgalry": ["cil"], "application/vnd.ms-cab-compressed": ["cab"], "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], "application/vnd.ms-excel.template.macroenabled.12": ["xltm"], "application/vnd.ms-fontobject": ["eot"], "application/vnd.ms-htmlhelp": ["chm"], "application/vnd.ms-ims": ["ims"], "application/vnd.ms-lrm": ["lrm"], "application/vnd.ms-officetheme": ["thmx"], "application/vnd.ms-outlook": ["msg"], "application/vnd.ms-pki.seccat": ["cat"], "application/vnd.ms-pki.stl": ["*stl"], "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"], "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], "application/vnd.ms-project": ["mpp", "mpt"], "application/vnd.ms-word.document.macroenabled.12": ["docm"], "application/vnd.ms-word.template.macroenabled.12": ["dotm"], "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"], "application/vnd.ms-wpl": ["wpl"], "application/vnd.ms-xpsdocument": ["xps"], "application/vnd.mseq": ["mseq"], "application/vnd.musician": ["mus"], "application/vnd.muvee.style": ["msty"], "application/vnd.mynfc": ["taglet"], "application/vnd.neurolanguage.nlu": ["nlu"], "application/vnd.nitf": ["ntf", "nitf"], "application/vnd.noblenet-directory": ["nnd"], "application/vnd.noblenet-sealer": ["nns"], "application/vnd.noblenet-web": ["nnw"], "application/vnd.nokia.n-gage.ac+xml": ["*ac"], "application/vnd.nokia.n-gage.data": ["ngdat"], "application/vnd.nokia.n-gage.symbian.install": ["n-gage"], "application/vnd.nokia.radio-preset": ["rpst"], "application/vnd.nokia.radio-presets": ["rpss"], "application/vnd.novadigm.edm": ["edm"], "application/vnd.novadigm.edx": ["edx"], "application/vnd.novadigm.ext": ["ext"], "application/vnd.oasis.opendocument.chart": ["odc"], "application/vnd.oasis.opendocument.chart-template": ["otc"], "application/vnd.oasis.opendocument.database": ["odb"], "application/vnd.oasis.opendocument.formula": ["odf"], "application/vnd.oasis.opendocument.formula-template": ["odft"], "application/vnd.oasis.opendocument.graphics": ["odg"], "application/vnd.oasis.opendocument.graphics-template": ["otg"], "application/vnd.oasis.opendocument.image": ["odi"], "application/vnd.oasis.opendocument.image-template": ["oti"], "application/vnd.oasis.opendocument.presentation": ["odp"], "application/vnd.oasis.opendocument.presentation-template": ["otp"], "application/vnd.oasis.opendocument.spreadsheet": ["ods"], "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], "application/vnd.oasis.opendocument.text": ["odt"], "application/vnd.oasis.opendocument.text-master": ["odm"], "application/vnd.oasis.opendocument.text-template": ["ott"], "application/vnd.oasis.opendocument.text-web": ["oth"], "application/vnd.olpc-sugar": ["xo"], "application/vnd.oma.dd2+xml": ["dd2"], "application/vnd.openblox.game+xml": ["obgx"], "application/vnd.openofficeorg.extension": ["oxt"], "application/vnd.openstreetmap.data+xml": ["osm"], "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], "application/vnd.osgeo.mapguide.package": ["mgp"], "application/vnd.osgi.dp": ["dp"], "application/vnd.osgi.subsystem": ["esa"], "application/vnd.palm": ["pdb", "pqa", "oprc"], "application/vnd.pawaafile": ["paw"], "application/vnd.pg.format": ["str"], "application/vnd.pg.osasli": ["ei6"], "application/vnd.picsel": ["efif"], "application/vnd.pmi.widget": ["wg"], "application/vnd.pocketlearn": ["plf"], "application/vnd.powerbuilder6": ["pbd"], "application/vnd.previewsystems.box": ["box"], "application/vnd.proteus.magazine": ["mgz"], "application/vnd.publishare-delta-tree": ["qps"], "application/vnd.pvi.ptid1": ["ptid"], "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], "application/vnd.rar": ["rar"], "application/vnd.realvnc.bed": ["bed"], "application/vnd.recordare.musicxml": ["mxl"], "application/vnd.recordare.musicxml+xml": ["musicxml"], "application/vnd.rig.cryptonote": ["cryptonote"], "application/vnd.rim.cod": ["cod"], "application/vnd.rn-realmedia": ["rm"], "application/vnd.rn-realmedia-vbr": ["rmvb"], "application/vnd.route66.link66+xml": ["link66"], "application/vnd.sailingtracker.track": ["st"], "application/vnd.seemail": ["see"], "application/vnd.sema": ["sema"], "application/vnd.semd": ["semd"], "application/vnd.semf": ["semf"], "application/vnd.shana.informed.formdata": ["ifm"], "application/vnd.shana.informed.formtemplate": ["itp"], "application/vnd.shana.informed.interchange": ["iif"], "application/vnd.shana.informed.package": ["ipk"], "application/vnd.simtech-mindmapper": ["twd", "twds"], "application/vnd.smaf": ["mmf"], "application/vnd.smart.teacher": ["teacher"], "application/vnd.software602.filler.form+xml": ["fo"], "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"], "application/vnd.spotfire.dxp": ["dxp"], "application/vnd.spotfire.sfs": ["sfs"], "application/vnd.stardivision.calc": ["sdc"], "application/vnd.stardivision.draw": ["sda"], "application/vnd.stardivision.impress": ["sdd"], "application/vnd.stardivision.math": ["smf"], "application/vnd.stardivision.writer": ["sdw", "vor"], "application/vnd.stardivision.writer-global": ["sgl"], "application/vnd.stepmania.package": ["smzip"], "application/vnd.stepmania.stepchart": ["sm"], "application/vnd.sun.wadl+xml": ["wadl"], "application/vnd.sun.xml.calc": ["sxc"], "application/vnd.sun.xml.calc.template": ["stc"], "application/vnd.sun.xml.draw": ["sxd"], "application/vnd.sun.xml.draw.template": ["std"], "application/vnd.sun.xml.impress": ["sxi"], "application/vnd.sun.xml.impress.template": ["sti"], "application/vnd.sun.xml.math": ["sxm"], "application/vnd.sun.xml.writer": ["sxw"], "application/vnd.sun.xml.writer.global": ["sxg"], "application/vnd.sun.xml.writer.template": ["stw"], "application/vnd.sus-calendar": ["sus", "susp"], "application/vnd.svd": ["svd"], "application/vnd.symbian.install": ["sis", "sisx"], "application/vnd.syncml+xml": ["xsm"], "application/vnd.syncml.dm+wbxml": ["bdm"], "application/vnd.syncml.dm+xml": ["xdm"], "application/vnd.syncml.dmddf+xml": ["ddf"], "application/vnd.tao.intent-module-archive": ["tao"], "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], "application/vnd.tmobile-livetv": ["tmo"], "application/vnd.trid.tpt": ["tpt"], "application/vnd.triscape.mxs": ["mxs"], "application/vnd.trueapp": ["tra"], "application/vnd.ufdl": ["ufd", "ufdl"], "application/vnd.uiq.theme": ["utz"], "application/vnd.umajin": ["umj"], "application/vnd.unity": ["unityweb"], "application/vnd.uoml+xml": ["uoml"], "application/vnd.vcx": ["vcx"], "application/vnd.visio": ["vsd", "vst", "vss", "vsw"], "application/vnd.visionary": ["vis"], "application/vnd.vsf": ["vsf"], "application/vnd.wap.wbxml": ["wbxml"], "application/vnd.wap.wmlc": ["wmlc"], "application/vnd.wap.wmlscriptc": ["wmlsc"], "application/vnd.webturbo": ["wtb"], "application/vnd.wolfram.player": ["nbp"], "application/vnd.wordperfect": ["wpd"], "application/vnd.wqd": ["wqd"], "application/vnd.wt.stf": ["stf"], "application/vnd.xara": ["xar"], "application/vnd.xfdl": ["xfdl"], "application/vnd.yamaha.hv-dic": ["hvd"], "application/vnd.yamaha.hv-script": ["hvs"], "application/vnd.yamaha.hv-voice": ["hvp"], "application/vnd.yamaha.openscoreformat": ["osf"], "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], "application/vnd.yamaha.smaf-audio": ["saf"], "application/vnd.yamaha.smaf-phrase": ["spf"], "application/vnd.yellowriver-custom-menu": ["cmp"], "application/vnd.zul": ["zir", "zirz"], "application/vnd.zzazz.deck+xml": ["zaz"], "application/x-7z-compressed": ["7z"], "application/x-abiword": ["abw"], "application/x-ace-compressed": ["ace"], "application/x-apple-diskimage": ["*dmg"], "application/x-arj": ["arj"], "application/x-authorware-bin": ["aab", "x32", "u32", "vox"], "application/x-authorware-map": ["aam"], "application/x-authorware-seg": ["aas"], "application/x-bcpio": ["bcpio"], "application/x-bdoc": ["*bdoc"], "application/x-bittorrent": ["torrent"], "application/x-blorb": ["blb", "blorb"], "application/x-bzip": ["bz"], "application/x-bzip2": ["bz2", "boz"], "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"], "application/x-cdlink": ["vcd"], "application/x-cfs-compressed": ["cfs"], "application/x-chat": ["chat"], "application/x-chess-pgn": ["pgn"], "application/x-chrome-extension": ["crx"], "application/x-cocoa": ["cco"], "application/x-conference": ["nsc"], "application/x-cpio": ["cpio"], "application/x-csh": ["csh"], "application/x-debian-package": ["*deb", "udeb"], "application/x-dgc-compressed": ["dgc"], "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], "application/x-doom": ["wad"], "application/x-dtbncx+xml": ["ncx"], "application/x-dtbook+xml": ["dtb"], "application/x-dtbresource+xml": ["res"], "application/x-dvi": ["dvi"], "application/x-envoy": ["evy"], "application/x-eva": ["eva"], "application/x-font-bdf": ["bdf"], "application/x-font-ghostscript": ["gsf"], "application/x-font-linux-psf": ["psf"], "application/x-font-pcf": ["pcf"], "application/x-font-snf": ["snf"], "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"], "application/x-freearc": ["arc"], "application/x-futuresplash": ["spl"], "application/x-gca-compressed": ["gca"], "application/x-glulx": ["ulx"], "application/x-gnumeric": ["gnumeric"], "application/x-gramps-xml": ["gramps"], "application/x-gtar": ["gtar"], "application/x-hdf": ["hdf"], "application/x-httpd-php": ["php"], "application/x-install-instructions": ["install"], "application/x-iso9660-image": ["*iso"], "application/x-iwork-keynote-sffkey": ["*key"], "application/x-iwork-numbers-sffnumbers": ["*numbers"], "application/x-iwork-pages-sffpages": ["*pages"], "application/x-java-archive-diff": ["jardiff"], "application/x-java-jnlp-file": ["jnlp"], "application/x-keepass2": ["kdbx"], "application/x-latex": ["latex"], "application/x-lua-bytecode": ["luac"], "application/x-lzh-compressed": ["lzh", "lha"], "application/x-makeself": ["run"], "application/x-mie": ["mie"], "application/x-mobipocket-ebook": ["prc", "mobi"], "application/x-ms-application": ["application"], "application/x-ms-shortcut": ["lnk"], "application/x-ms-wmd": ["wmd"], "application/x-ms-wmz": ["wmz"], "application/x-ms-xbap": ["xbap"], "application/x-msaccess": ["mdb"], "application/x-msbinder": ["obd"], "application/x-mscardfile": ["crd"], "application/x-msclip": ["clp"], "application/x-msdos-program": ["*exe"], "application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"], "application/x-msmediaview": ["mvb", "m13", "m14"], "application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"], "application/x-msmoney": ["mny"], "application/x-mspublisher": ["pub"], "application/x-msschedule": ["scd"], "application/x-msterminal": ["trm"], "application/x-mswrite": ["wri"], "application/x-netcdf": ["nc", "cdf"], "application/x-ns-proxy-autoconfig": ["pac"], "application/x-nzb": ["nzb"], "application/x-perl": ["pl", "pm"], "application/x-pilot": ["*prc", "*pdb"], "application/x-pkcs12": ["p12", "pfx"], "application/x-pkcs7-certificates": ["p7b", "spc"], "application/x-pkcs7-certreqresp": ["p7r"], "application/x-rar-compressed": ["*rar"], "application/x-redhat-package-manager": ["rpm"], "application/x-research-info-systems": ["ris"], "application/x-sea": ["sea"], "application/x-sh": ["sh"], "application/x-shar": ["shar"], "application/x-shockwave-flash": ["swf"], "application/x-silverlight-app": ["xap"], "application/x-sql": ["sql"], "application/x-stuffit": ["sit"], "application/x-stuffitx": ["sitx"], "application/x-subrip": ["srt"], "application/x-sv4cpio": ["sv4cpio"], "application/x-sv4crc": ["sv4crc"], "application/x-t3vm-image": ["t3"], "application/x-tads": ["gam"], "application/x-tar": ["tar"], "application/x-tcl": ["tcl", "tk"], "application/x-tex": ["tex"], "application/x-tex-tfm": ["tfm"], "application/x-texinfo": ["texinfo", "texi"], "application/x-tgif": ["*obj"], "application/x-ustar": ["ustar"], "application/x-virtualbox-hdd": ["hdd"], "application/x-virtualbox-ova": ["ova"], "application/x-virtualbox-ovf": ["ovf"], "application/x-virtualbox-vbox": ["vbox"], "application/x-virtualbox-vbox-extpack": ["vbox-extpack"], "application/x-virtualbox-vdi": ["vdi"], "application/x-virtualbox-vhd": ["vhd"], "application/x-virtualbox-vmdk": ["vmdk"], "application/x-wais-source": ["src"], "application/x-web-app-manifest+json": ["webapp"], "application/x-x509-ca-cert": ["der", "crt", "pem"], "application/x-xfig": ["fig"], "application/x-xliff+xml": ["*xlf"], "application/x-xpinstall": ["xpi"], "application/x-xz": ["xz"], "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], "audio/vnd.dece.audio": ["uva", "uvva"], "audio/vnd.digital-winds": ["eol"], "audio/vnd.dra": ["dra"], "audio/vnd.dts": ["dts"], "audio/vnd.dts.hd": ["dtshd"], "audio/vnd.lucent.voice": ["lvp"], "audio/vnd.ms-playready.media.pya": ["pya"], "audio/vnd.nuera.ecelp4800": ["ecelp4800"], "audio/vnd.nuera.ecelp7470": ["ecelp7470"], "audio/vnd.nuera.ecelp9600": ["ecelp9600"], "audio/vnd.rip": ["rip"], "audio/x-aac": ["aac"], "audio/x-aiff": ["aif", "aiff", "aifc"], "audio/x-caf": ["caf"], "audio/x-flac": ["flac"], "audio/x-m4a": ["*m4a"], "audio/x-matroska": ["mka"], "audio/x-mpegurl": ["m3u"], "audio/x-ms-wax": ["wax"], "audio/x-ms-wma": ["wma"], "audio/x-pn-realaudio": ["ram", "ra"], "audio/x-pn-realaudio-plugin": ["rmp"], "audio/x-realaudio": ["*ra"], "audio/x-wav": ["*wav"], "chemical/x-cdx": ["cdx"], "chemical/x-cif": ["cif"], "chemical/x-cmdf": ["cmdf"], "chemical/x-cml": ["cml"], "chemical/x-csml": ["csml"], "chemical/x-xyz": ["xyz"], "image/prs.btif": ["btif"], "image/prs.pti": ["pti"], "image/vnd.adobe.photoshop": ["psd"], "image/vnd.airzip.accelerator.azv": ["azv"], "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], "image/vnd.djvu": ["djvu", "djv"], "image/vnd.dvb.subtitle": ["*sub"], "image/vnd.dwg": ["dwg"], "image/vnd.dxf": ["dxf"], "image/vnd.fastbidsheet": ["fbs"], "image/vnd.fpx": ["fpx"], "image/vnd.fst": ["fst"], "image/vnd.fujixerox.edmics-mmr": ["mmr"], "image/vnd.fujixerox.edmics-rlc": ["rlc"], "image/vnd.microsoft.icon": ["ico"], "image/vnd.ms-dds": ["dds"], "image/vnd.ms-modi": ["mdi"], "image/vnd.ms-photo": ["wdp"], "image/vnd.net-fpx": ["npx"], "image/vnd.pco.b16": ["b16"], "image/vnd.tencent.tap": ["tap"], "image/vnd.valve.source.texture": ["vtf"], "image/vnd.wap.wbmp": ["wbmp"], "image/vnd.xiff": ["xif"], "image/vnd.zbrush.pcx": ["pcx"], "image/x-3ds": ["3ds"], "image/x-cmu-raster": ["ras"], "image/x-cmx": ["cmx"], "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], "image/x-icon": ["*ico"], "image/x-jng": ["jng"], "image/x-mrsid-image": ["sid"], "image/x-ms-bmp": ["*bmp"], "image/x-pcx": ["*pcx"], "image/x-pict": ["pic", "pct"], "image/x-portable-anymap": ["pnm"], "image/x-portable-bitmap": ["pbm"], "image/x-portable-graymap": ["pgm"], "image/x-portable-pixmap": ["ppm"], "image/x-rgb": ["rgb"], "image/x-tga": ["tga"], "image/x-xbitmap": ["xbm"], "image/x-xpixmap": ["xpm"], "image/x-xwindowdump": ["xwd"], "message/vnd.wfa.wsc": ["wsc"], "model/vnd.collada+xml": ["dae"], "model/vnd.dwf": ["dwf"], "model/vnd.gdl": ["gdl"], "model/vnd.gtw": ["gtw"], "model/vnd.mts": ["mts"], "model/vnd.opengex": ["ogex"], "model/vnd.parasolid.transmit.binary": ["x_b"], "model/vnd.parasolid.transmit.text": ["x_t"], "model/vnd.sap.vds": ["vds"], "model/vnd.usdz+zip": ["usdz"], "model/vnd.valve.source.compiled-map": ["bsp"], "model/vnd.vtu": ["vtu"], "text/prs.lines.tag": ["dsc"], "text/vnd.curl": ["curl"], "text/vnd.curl.dcurl": ["dcurl"], "text/vnd.curl.mcurl": ["mcurl"], "text/vnd.curl.scurl": ["scurl"], "text/vnd.dvb.subtitle": ["sub"], "text/vnd.fly": ["fly"], "text/vnd.fmi.flexstor": ["flx"], "text/vnd.graphviz": ["gv"], "text/vnd.in3d.3dml": ["3dml"], "text/vnd.in3d.spot": ["spot"], "text/vnd.sun.j2me.app-descriptor": ["jad"], "text/vnd.wap.wml": ["wml"], "text/vnd.wap.wmlscript": ["wmls"], "text/x-asm": ["s", "asm"], "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], "text/x-component": ["htc"], "text/x-fortran": ["f", "for", "f77", "f90"], "text/x-handlebars-template": ["hbs"], "text/x-java-source": ["java"], "text/x-lua": ["lua"], "text/x-markdown": ["mkd"], "text/x-nfo": ["nfo"], "text/x-opml": ["opml"], "text/x-org": ["*org"], "text/x-pascal": ["p", "pas"], "text/x-processing": ["pde"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "text/x-setext": ["etx"], "text/x-sfv": ["sfv"], "text/x-suse-ymp": ["ymp"], "text/x-uuencode": ["uu"], "text/x-vcalendar": ["vcs"], "text/x-vcard": ["vcf"], "video/vnd.dece.hd": ["uvh", "uvvh"], "video/vnd.dece.mobile": ["uvm", "uvvm"], "video/vnd.dece.pd": ["uvp", "uvvp"], "video/vnd.dece.sd": ["uvs", "uvvs"], "video/vnd.dece.video": ["uvv", "uvvv"], "video/vnd.dvb.file": ["dvb"], "video/vnd.fvt": ["fvt"], "video/vnd.mpegurl": ["mxu", "m4u"], "video/vnd.ms-playready.media.pyv": ["pyv"], "video/vnd.uvvu.mp4": ["uvu", "uvvu"], "video/vnd.vivo": ["viv"], "video/x-f4v": ["f4v"], "video/x-fli": ["fli"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-mng": ["mng"], "video/x-ms-asf": ["asf", "asx"], "video/x-ms-vob": ["vob"], "video/x-ms-wm": ["wm"], "video/x-ms-wmv": ["wmv"], "video/x-ms-wmx": ["wmx"], "video/x-ms-wvx": ["wvx"], "video/x-msvideo": ["avi"], "video/x-sgi-movie": ["movie"], "video/x-smv": ["smv"], "x-conference/x-cooltalk": ["ice"] };
+  }
+});
+
+// node_modules/mime/index.js
+var require_mime = __commonJS({
+  "node_modules/mime/index.js"(exports2, module2) {
+    "use strict";
+    var Mime = require_Mime();
+    module2.exports = new Mime(require_standard(), require_other());
+  }
+});
+
+// node_modules/escape-html/index.js
+var require_escape_html = __commonJS({
+  "node_modules/escape-html/index.js"(exports2, module2) {
+    "use strict";
+    var matchHtmlRegExp = /["'&<>]/;
+    module2.exports = escapeHtml;
+    function escapeHtml(string) {
+      var str = "" + string;
+      var match = matchHtmlRegExp.exec(str);
+      if (!match) {
+        return str;
+      }
+      var escape2;
+      var html = "";
+      var index = 0;
+      var lastIndex = 0;
+      for (index = match.index; index < str.length; index++) {
+        switch (str.charCodeAt(index)) {
+          case 34:
+            escape2 = """;
+            break;
+          case 38:
+            escape2 = "&";
+            break;
+          case 39:
+            escape2 = "'";
+            break;
+          case 60:
+            escape2 = "<";
+            break;
+          case 62:
+            escape2 = ">";
+            break;
+          default:
+            continue;
+        }
+        if (lastIndex !== index) {
+          html += str.substring(lastIndex, index);
+        }
+        lastIndex = index + 1;
+        html += escape2;
+      }
+      return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
+    }
+  }
+});
+
+// node_modules/@lukeed/ms/dist/index.js
+var require_dist5 = __commonJS({
+  "node_modules/@lukeed/ms/dist/index.js"(exports2) {
+    var RGX = /^(-?(?:\d+)?\.?\d+) *(m(?:illiseconds?|s(?:ecs?)?))?(s(?:ec(?:onds?|s)?)?)?(m(?:in(?:utes?|s)?)?)?(h(?:ours?|rs?)?)?(d(?:ays?)?)?(w(?:eeks?|ks?)?)?(y(?:ears?|rs?)?)?$/;
+    var SEC = 1e3;
+    var MIN = SEC * 60;
+    var HOUR = MIN * 60;
+    var DAY = HOUR * 24;
+    var YEAR = DAY * 365.25;
+    function parse(val) {
+      var num, arr = val.toLowerCase().match(RGX);
+      if (arr != null && (num = parseFloat(arr[1]))) {
+        if (arr[3] != null) return num * SEC;
+        if (arr[4] != null) return num * MIN;
+        if (arr[5] != null) return num * HOUR;
+        if (arr[6] != null) return num * DAY;
+        if (arr[7] != null) return num * DAY * 7;
+        if (arr[8] != null) return num * YEAR;
+        return num;
+      }
+    }
+    function fmt(val, pfx, str, long) {
+      var num = (val | 0) === val ? val : ~~(val + 0.5);
+      return pfx + num + (long ? " " + str + (num != 1 ? "s" : "") : str[0]);
+    }
+    function format(num, long) {
+      var pfx = num < 0 ? "-" : "", abs = num < 0 ? -num : num;
+      if (abs < SEC) return num + (long ? " ms" : "ms");
+      if (abs < MIN) return fmt(abs / SEC, pfx, "second", long);
+      if (abs < HOUR) return fmt(abs / MIN, pfx, "minute", long);
+      if (abs < DAY) return fmt(abs / HOUR, pfx, "hour", long);
+      if (abs < YEAR) return fmt(abs / DAY, pfx, "day", long);
+      return fmt(abs / YEAR, pfx, "year", long);
+    }
+    exports2.format = format;
+    exports2.parse = parse;
+  }
+});
+
+// node_modules/@fastify/send/lib/collapseLeadingSlashes.js
+var require_collapseLeadingSlashes = __commonJS({
+  "node_modules/@fastify/send/lib/collapseLeadingSlashes.js"(exports2, module2) {
+    "use strict";
+    function collapseLeadingSlashes(str) {
+      if (str[0] !== "/" || str[1] !== "/") {
+        return str;
+      }
+      for (let i = 2, il = str.length; i < il; ++i) {
+        if (str[i] !== "/") {
+          return str.slice(i - 1);
+        }
+      }
+    }
+    module2.exports.collapseLeadingSlashes = collapseLeadingSlashes;
+  }
+});
+
+// node_modules/@fastify/send/lib/containsDotFile.js
+var require_containsDotFile = __commonJS({
+  "node_modules/@fastify/send/lib/containsDotFile.js"(exports2, module2) {
+    "use strict";
+    function containsDotFile(parts) {
+      for (let i = 0, il = parts.length; i < il; ++i) {
+        if (parts[i].length !== 1 && parts[i][0] === ".") {
+          return true;
+        }
+      }
+      return false;
+    }
+    module2.exports.containsDotFile = containsDotFile;
+  }
+});
+
+// node_modules/@fastify/send/lib/contentRange.js
+var require_contentRange = __commonJS({
+  "node_modules/@fastify/send/lib/contentRange.js"(exports2) {
+    "use strict";
+    function contentRange(type, size, range) {
+      return type + " " + (range ? range.start + "-" + range.end : "*") + "/" + size;
+    }
+    exports2.contentRange = contentRange;
+  }
+});
+
+// node_modules/@fastify/send/lib/createHtmlDocument.js
+var require_createHtmlDocument = __commonJS({
+  "node_modules/@fastify/send/lib/createHtmlDocument.js"(exports2) {
+    "use strict";
+    function createHtmlDocument(title, body) {
+      const html = '\n\n\n\n' + title + "\n\n\n
" + body + "
\n\n\n"; + return [html, Buffer.byteLength(html)]; + } + exports2.createHtmlDocument = createHtmlDocument; + } +}); + +// node_modules/@fastify/send/lib/normalizeList.js +var require_normalizeList = __commonJS({ + "node_modules/@fastify/send/lib/normalizeList.js"(exports2, module2) { + "use strict"; + function normalizeList(val, name) { + if (typeof val === "string") { + return [val]; + } else if (val === false) { + return []; + } else if (Array.isArray(val)) { + for (let i = 0, il = val.length; i < il; ++i) { + if (typeof val[i] !== "string") { + throw new TypeError(name + " must be array of strings or false"); + } + } + return val; + } else { + throw new TypeError(name + " must be array of strings or false"); + } + } + module2.exports.normalizeList = normalizeList; + } +}); + +// node_modules/@fastify/send/lib/parseBytesRange.js +var require_parseBytesRange = __commonJS({ + "node_modules/@fastify/send/lib/parseBytesRange.js"(exports2, module2) { + "use strict"; + function parseBytesRange(size, str) { + const values = str.slice(str.indexOf("=") + 1); + const ranges = []; + const len = values.length; + let i = 0; + let il = 0; + let j = 0; + let start; + let end; + let commaIdx = values.indexOf(","); + let dashIdx = values.indexOf("-"); + let prevIdx = -1; + while (true) { + commaIdx === -1 && (commaIdx = len); + start = parseInt(values.slice(prevIdx + 1, dashIdx), 10); + end = parseInt(values.slice(dashIdx + 1, commaIdx), 10); + if (start !== start) { + start = size - end; + end = size - 1; + } else if (end !== end) { + end = size - 1; + } else if (end > size - 1) { + end = size - 1; + } + if ( + // eslint-disable-next-line no-self-compare + start === start && // fast path of isNaN(number) + // eslint-disable-next-line no-self-compare + end === end && // fast path of isNaN(number) + start > -1 && start <= end + ) { + ranges.push({ + start, + end, + index: j++ + }); + } + if (commaIdx === len) { + break; + } + prevIdx = commaIdx++; + dashIdx = values.indexOf("-", commaIdx); + commaIdx = values.indexOf(",", commaIdx); + } + if (j < 2) { + return ranges; + } + ranges.sort(sortByRangeStart); + il = j; + j = 0; + i = 1; + while (i < il) { + const range = ranges[i++]; + const current = ranges[j]; + if (range.start > current.end + 1) { + ranges[++j] = range; + } else if (range.end > current.end) { + current.end = range.end; + current.index > range.index && (current.index = range.index); + } + } + ranges.length = j + 1; + ranges.sort(sortByRangeIndex); + return ranges; + } + function sortByRangeIndex(a, b) { + return a.index - b.index; + } + function sortByRangeStart(a, b) { + return a.start - b.start; + } + module2.exports.parseBytesRange = parseBytesRange; + } +}); + +// node_modules/@fastify/send/lib/parseTokenList.js +var require_parseTokenList = __commonJS({ + "node_modules/@fastify/send/lib/parseTokenList.js"(exports2, module2) { + "use strict"; + var slice = String.prototype.slice; + function parseTokenList(str, cb) { + let end = 0; + let start = 0; + let result; + for (let i = 0, len = str.length; i < len; i++) { + switch (str.charCodeAt(i)) { + case 32: + if (start === end) { + start = end = i + 1; + } + break; + case 44: + if (start !== end) { + result = cb(slice.call(str, start, end)); + if (result !== void 0) { + return result; + } + } + start = end = i + 1; + break; + default: + end = i + 1; + break; + } + } + if (start !== end) { + return cb(slice.call(str, start, end)); + } + } + module2.exports.parseTokenList = parseTokenList; + } +}); + +// node_modules/depd/index.js +var require_depd = __commonJS({ + "node_modules/depd/index.js"(exports2, module2) { + var relative = require("path").relative; + module2.exports = depd; + var basePath = process.cwd(); + function containsNamespace(str, namespace) { + var vals = str.split(/[ ,]+/); + var ns = String(namespace).toLowerCase(); + for (var i = 0; i < vals.length; i++) { + var val = vals[i]; + if (val && (val === "*" || val.toLowerCase() === ns)) { + return true; + } + } + return false; + } + function convertDataDescriptorToAccessor(obj, prop, message) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + var value = descriptor.value; + descriptor.get = function getter() { + return value; + }; + if (descriptor.writable) { + descriptor.set = function setter(val) { + return value = val; + }; + } + delete descriptor.value; + delete descriptor.writable; + Object.defineProperty(obj, prop, descriptor); + return descriptor; + } + function createArgumentsString(arity) { + var str = ""; + for (var i = 0; i < arity; i++) { + str += ", arg" + i; + } + return str.substr(2); + } + function createStackString(stack) { + var str = this.name + ": " + this.namespace; + if (this.message) { + str += " deprecated " + this.message; + } + for (var i = 0; i < stack.length; i++) { + str += "\n at " + stack[i].toString(); + } + return str; + } + function depd(namespace) { + if (!namespace) { + throw new TypeError("argument namespace is required"); + } + var stack = getStack(); + var site = callSiteLocation(stack[1]); + var file = site[0]; + function deprecate(message) { + log3.call(deprecate, message); + } + deprecate._file = file; + deprecate._ignored = isignored(namespace); + deprecate._namespace = namespace; + deprecate._traced = istraced(namespace); + deprecate._warned = /* @__PURE__ */ Object.create(null); + deprecate.function = wrapfunction; + deprecate.property = wrapproperty; + return deprecate; + } + function eehaslisteners(emitter, type) { + var count = typeof emitter.listenerCount !== "function" ? emitter.listeners(type).length : emitter.listenerCount(type); + return count > 0; + } + function isignored(namespace) { + if (process.noDeprecation) { + return true; + } + var str = process.env.NO_DEPRECATION || ""; + return containsNamespace(str, namespace); + } + function istraced(namespace) { + if (process.traceDeprecation) { + return true; + } + var str = process.env.TRACE_DEPRECATION || ""; + return containsNamespace(str, namespace); + } + function log3(message, site) { + var haslisteners = eehaslisteners(process, "deprecation"); + if (!haslisteners && this._ignored) { + return; + } + var caller; + var callFile; + var callSite; + var depSite; + var i = 0; + var seen = false; + var stack = getStack(); + var file = this._file; + if (site) { + depSite = site; + callSite = callSiteLocation(stack[1]); + callSite.name = depSite.name; + file = callSite[0]; + } else { + i = 2; + depSite = callSiteLocation(stack[i]); + callSite = depSite; + } + for (; i < stack.length; i++) { + caller = callSiteLocation(stack[i]); + callFile = caller[0]; + if (callFile === file) { + seen = true; + } else if (callFile === this._file) { + file = this._file; + } else if (seen) { + break; + } + } + var key = caller ? depSite.join(":") + "__" + caller.join(":") : void 0; + if (key !== void 0 && key in this._warned) { + return; + } + this._warned[key] = true; + var msg = message; + if (!msg) { + msg = callSite === depSite || !callSite.name ? defaultMessage(depSite) : defaultMessage(callSite); + } + if (haslisteners) { + var err = DeprecationError(this._namespace, msg, stack.slice(i)); + process.emit("deprecation", err); + return; + } + var format = process.stderr.isTTY ? formatColor : formatPlain; + var output = format.call(this, msg, caller, stack.slice(i)); + process.stderr.write(output + "\n", "utf8"); + } + function callSiteLocation(callSite) { + var file = callSite.getFileName() || ""; + var line = callSite.getLineNumber(); + var colm = callSite.getColumnNumber(); + if (callSite.isEval()) { + file = callSite.getEvalOrigin() + ", " + file; + } + var site = [file, line, colm]; + site.callSite = callSite; + site.name = callSite.getFunctionName(); + return site; + } + function defaultMessage(site) { + var callSite = site.callSite; + var funcName = site.name; + if (!funcName) { + funcName = ""; + } + var context = callSite.getThis(); + var typeName = context && callSite.getTypeName(); + if (typeName === "Object") { + typeName = void 0; + } + if (typeName === "Function") { + typeName = context.name || typeName; + } + return typeName && callSite.getMethodName() ? typeName + "." + funcName : funcName; + } + function formatPlain(msg, caller, stack) { + var timestamp = (/* @__PURE__ */ new Date()).toUTCString(); + var formatted = timestamp + " " + this._namespace + " deprecated " + msg; + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += "\n at " + stack[i].toString(); + } + return formatted; + } + if (caller) { + formatted += " at " + formatLocation(caller); + } + return formatted; + } + function formatColor(msg, caller, stack) { + var formatted = "\x1B[36;1m" + this._namespace + "\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m" + msg + "\x1B[39m"; + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += "\n \x1B[36mat " + stack[i].toString() + "\x1B[39m"; + } + return formatted; + } + if (caller) { + formatted += " \x1B[36m" + formatLocation(caller) + "\x1B[39m"; + } + return formatted; + } + function formatLocation(callSite) { + return relative(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2]; + } + function getStack() { + var limit = Error.stackTraceLimit; + var obj = {}; + var prep = Error.prepareStackTrace; + Error.prepareStackTrace = prepareObjectStackTrace; + Error.stackTraceLimit = Math.max(10, limit); + Error.captureStackTrace(obj); + var stack = obj.stack.slice(1); + Error.prepareStackTrace = prep; + Error.stackTraceLimit = limit; + return stack; + } + function prepareObjectStackTrace(obj, stack) { + return stack; + } + function wrapfunction(fn, message) { + if (typeof fn !== "function") { + throw new TypeError("argument fn must be a function"); + } + var args = createArgumentsString(fn.length); + var stack = getStack(); + var site = callSiteLocation(stack[1]); + site.name = fn.name; + var deprecatedfn = new Function( + "fn", + "log", + "deprecate", + "message", + "site", + '"use strict"\nreturn function (' + args + ") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}" + )(fn, log3, this, message, site); + return deprecatedfn; + } + function wrapproperty(obj, prop, message) { + if (!obj || typeof obj !== "object" && typeof obj !== "function") { + throw new TypeError("argument obj must be object"); + } + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + if (!descriptor) { + throw new TypeError("must call property on owner object"); + } + if (!descriptor.configurable) { + throw new TypeError("property must be configurable"); + } + var deprecate = this; + var stack = getStack(); + var site = callSiteLocation(stack[1]); + site.name = prop; + if ("value" in descriptor) { + descriptor = convertDataDescriptorToAccessor(obj, prop, message); + } + var get = descriptor.get; + var set = descriptor.set; + if (typeof get === "function") { + descriptor.get = function getter() { + log3.call(deprecate, message, site); + return get.apply(this, arguments); + }; + } + if (typeof set === "function") { + descriptor.set = function setter() { + log3.call(deprecate, message, site); + return set.apply(this, arguments); + }; + } + Object.defineProperty(obj, prop, descriptor); + } + function DeprecationError(namespace, message, stack) { + var error = new Error(); + var stackString; + Object.defineProperty(error, "constructor", { + value: DeprecationError + }); + Object.defineProperty(error, "message", { + configurable: true, + enumerable: false, + value: message, + writable: true + }); + Object.defineProperty(error, "name", { + enumerable: false, + configurable: true, + value: "DeprecationError", + writable: true + }); + Object.defineProperty(error, "namespace", { + configurable: true, + enumerable: false, + value: namespace, + writable: true + }); + Object.defineProperty(error, "stack", { + configurable: true, + enumerable: false, + get: function() { + if (stackString !== void 0) { + return stackString; + } + return stackString = createStackString.call(this, stack); + }, + set: function setter(val) { + stackString = val; + } + }); + return error; + } + } +}); + +// node_modules/setprototypeof/index.js +var require_setprototypeof = __commonJS({ + "node_modules/setprototypeof/index.js"(exports2, module2) { + "use strict"; + module2.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); + function setProtoOf(obj, proto) { + obj.__proto__ = proto; + return obj; + } + function mixinProperties(obj, proto) { + for (var prop in proto) { + if (!Object.prototype.hasOwnProperty.call(obj, prop)) { + obj[prop] = proto[prop]; + } + } + return obj; + } + } +}); + +// node_modules/statuses/codes.json +var require_codes = __commonJS({ + "node_modules/statuses/codes.json"(exports2, module2) { + module2.exports = { + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "103": "Early Hints", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a Teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Too Early", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" + }; + } +}); + +// node_modules/statuses/index.js +var require_statuses = __commonJS({ + "node_modules/statuses/index.js"(exports2, module2) { + "use strict"; + var codes = require_codes(); + module2.exports = status; + status.message = codes; + status.code = createMessageToStatusCodeMap(codes); + status.codes = createStatusCodeList(codes); + status.redirect = { + 300: true, + 301: true, + 302: true, + 303: true, + 305: true, + 307: true, + 308: true + }; + status.empty = { + 204: true, + 205: true, + 304: true + }; + status.retry = { + 502: true, + 503: true, + 504: true + }; + function createMessageToStatusCodeMap(codes2) { + var map = {}; + Object.keys(codes2).forEach(function forEachCode(code) { + var message = codes2[code]; + var status2 = Number(code); + map[message.toLowerCase()] = status2; + }); + return map; + } + function createStatusCodeList(codes2) { + return Object.keys(codes2).map(function mapCode(code) { + return Number(code); + }); + } + function getStatusCode(message) { + var msg = message.toLowerCase(); + if (!Object.prototype.hasOwnProperty.call(status.code, msg)) { + throw new Error('invalid status message: "' + message + '"'); + } + return status.code[msg]; + } + function getStatusMessage(code) { + if (!Object.prototype.hasOwnProperty.call(status.message, code)) { + throw new Error("invalid status code: " + code); + } + return status.message[code]; + } + function status(code) { + if (typeof code === "number") { + return getStatusMessage(code); + } + if (typeof code !== "string") { + throw new TypeError("code must be a number or string"); + } + var n = parseInt(code, 10); + if (!isNaN(n)) { + return getStatusMessage(n); + } + return getStatusCode(code); + } + } +}); + +// node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "node_modules/inherits/inherits_browser.js"(exports2, module2) { + if (typeof Object.create === "function") { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; + } else { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; + } + } +}); + +// node_modules/inherits/inherits.js +var require_inherits = __commonJS({ + "node_modules/inherits/inherits.js"(exports2, module2) { + try { + util = require("util"); + if (typeof util.inherits !== "function") throw ""; + module2.exports = util.inherits; + } catch (e) { + module2.exports = require_inherits_browser(); + } + var util; + } +}); + +// node_modules/toidentifier/index.js +var require_toidentifier = __commonJS({ + "node_modules/toidentifier/index.js"(exports2, module2) { + "use strict"; + module2.exports = toIdentifier; + function toIdentifier(str) { + return str.split(" ").map(function(token) { + return token.slice(0, 1).toUpperCase() + token.slice(1); + }).join("").replace(/[^ _0-9a-z]/gi, ""); + } + } +}); + +// node_modules/http-errors/index.js +var require_http_errors = __commonJS({ + "node_modules/http-errors/index.js"(exports2, module2) { + "use strict"; + var deprecate = require_depd()("http-errors"); + var setPrototypeOf = require_setprototypeof(); + var statuses = require_statuses(); + var inherits = require_inherits(); + var toIdentifier = require_toidentifier(); + module2.exports = createError; + module2.exports.HttpError = createHttpErrorConstructor(); + module2.exports.isHttpError = createIsHttpErrorFunction(module2.exports.HttpError); + populateConstructorExports(module2.exports, statuses.codes, module2.exports.HttpError); + function codeClass(status) { + return Number(String(status).charAt(0) + "00"); + } + function createError() { + var err; + var msg; + var status = 500; + var props = {}; + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + var type = typeof arg; + if (type === "object" && arg instanceof Error) { + err = arg; + status = err.status || err.statusCode || status; + } else if (type === "number" && i === 0) { + status = arg; + } else if (type === "string") { + msg = arg; + } else if (type === "object") { + props = arg; + } else { + throw new TypeError("argument #" + (i + 1) + " unsupported type " + type); + } + } + if (typeof status === "number" && (status < 400 || status >= 600)) { + deprecate("non-error status code; use only 4xx or 5xx status codes"); + } + if (typeof status !== "number" || !statuses.message[status] && (status < 400 || status >= 600)) { + status = 500; + } + var HttpError = createError[status] || createError[codeClass(status)]; + if (!err) { + err = HttpError ? new HttpError(msg) : new Error(msg || statuses.message[status]); + Error.captureStackTrace(err, createError); + } + if (!HttpError || !(err instanceof HttpError) || err.status !== status) { + err.expose = status < 500; + err.status = err.statusCode = status; + } + for (var key in props) { + if (key !== "status" && key !== "statusCode") { + err[key] = props[key]; + } + } + return err; + } + function createHttpErrorConstructor() { + function HttpError() { + throw new TypeError("cannot construct abstract class"); + } + inherits(HttpError, Error); + return HttpError; + } + function createClientErrorConstructor(HttpError, name, code) { + var className = toClassName(name); + function ClientError(message) { + var msg = message != null ? message : statuses.message[code]; + var err = new Error(msg); + Error.captureStackTrace(err, ClientError); + setPrototypeOf(err, ClientError.prototype); + Object.defineProperty(err, "message", { + enumerable: true, + configurable: true, + value: msg, + writable: true + }); + Object.defineProperty(err, "name", { + enumerable: false, + configurable: true, + value: className, + writable: true + }); + return err; + } + inherits(ClientError, HttpError); + nameFunc(ClientError, className); + ClientError.prototype.status = code; + ClientError.prototype.statusCode = code; + ClientError.prototype.expose = true; + return ClientError; + } + function createIsHttpErrorFunction(HttpError) { + return function isHttpError(val) { + if (!val || typeof val !== "object") { + return false; + } + if (val instanceof HttpError) { + return true; + } + return val instanceof Error && typeof val.expose === "boolean" && typeof val.statusCode === "number" && val.status === val.statusCode; + }; + } + function createServerErrorConstructor(HttpError, name, code) { + var className = toClassName(name); + function ServerError(message) { + var msg = message != null ? message : statuses.message[code]; + var err = new Error(msg); + Error.captureStackTrace(err, ServerError); + setPrototypeOf(err, ServerError.prototype); + Object.defineProperty(err, "message", { + enumerable: true, + configurable: true, + value: msg, + writable: true + }); + Object.defineProperty(err, "name", { + enumerable: false, + configurable: true, + value: className, + writable: true + }); + return err; + } + inherits(ServerError, HttpError); + nameFunc(ServerError, className); + ServerError.prototype.status = code; + ServerError.prototype.statusCode = code; + ServerError.prototype.expose = false; + return ServerError; + } + function nameFunc(func, name) { + var desc = Object.getOwnPropertyDescriptor(func, "name"); + if (desc && desc.configurable) { + desc.value = name; + Object.defineProperty(func, "name", desc); + } + } + function populateConstructorExports(exports3, codes, HttpError) { + codes.forEach(function forEachCode(code) { + var CodeError; + var name = toIdentifier(statuses.message[code]); + switch (codeClass(code)) { + case 400: + CodeError = createClientErrorConstructor(HttpError, name, code); + break; + case 500: + CodeError = createServerErrorConstructor(HttpError, name, code); + break; + } + if (CodeError) { + exports3[code] = CodeError; + exports3[name] = CodeError; + } + }); + } + function toClassName(name) { + return name.substr(-5) !== "Error" ? name + "Error" : name; + } + } +}); + +// node_modules/@fastify/send/lib/createHttpError.js +var require_createHttpError = __commonJS({ + "node_modules/@fastify/send/lib/createHttpError.js"(exports2, module2) { + "use strict"; + var createError = require_http_errors(); + function createHttpError(status, err) { + if (!err) { + return createError(status); + } + return err instanceof Error ? createError(status, err, { expose: false }) : createError(status, err); + } + module2.exports.createHttpError = createHttpError; + } +}); + +// node_modules/@fastify/send/lib/send.js +var require_send = __commonJS({ + "node_modules/@fastify/send/lib/send.js"(exports2, module2) { + "use strict"; + var fs7 = require("node:fs"); + var path7 = require("node:path"); + var stream = require("node:stream"); + var debug = require("node:util").debuglog("send"); + var decode = require_fast_decode_uri_component(); + var escapeHtml = require_escape_html(); + var mime = require_mime(); + var ms = require_dist5(); + var { collapseLeadingSlashes } = require_collapseLeadingSlashes(); + var { containsDotFile } = require_containsDotFile(); + var { contentRange } = require_contentRange(); + var { createHtmlDocument } = require_createHtmlDocument(); + var { isUtf8MimeType } = require_isUtf8MimeType(); + var { normalizeList } = require_normalizeList(); + var { parseBytesRange } = require_parseBytesRange(); + var { parseTokenList } = require_parseTokenList(); + var { createHttpError } = require_createHttpError(); + var extname = path7.extname; + var join5 = path7.join; + var normalize = path7.normalize; + var resolve = path7.resolve; + var sep2 = path7.sep; + var Readable = stream.Readable; + var BYTES_RANGE_REGEXP = /^ *bytes=/; + var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1e3; + var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/; + var ERROR_RESPONSES = { + 400: createHtmlDocument("Error", "Bad Request"), + 403: createHtmlDocument("Error", "Forbidden"), + 404: createHtmlDocument("Error", "Not Found"), + 412: createHtmlDocument("Error", "Precondition Failed"), + 416: createHtmlDocument("Error", "Range Not Satisfiable"), + 500: createHtmlDocument("Error", "Internal Server Error") + }; + var validDotFilesOptions = [ + "allow", + "ignore", + "deny" + ]; + function normalizeMaxAge(_maxage) { + let maxage; + if (typeof _maxage === "string") { + maxage = ms.parse(_maxage); + } else { + maxage = Number(_maxage); + } + if (maxage !== maxage) { + return 0; + } + return Math.min(Math.max(0, maxage), MAX_MAXAGE); + } + function normalizeOptions(options) { + options = options ?? {}; + const acceptRanges = options.acceptRanges !== void 0 ? Boolean(options.acceptRanges) : true; + const cacheControl = options.cacheControl !== void 0 ? Boolean(options.cacheControl) : true; + const contentType = options.contentType !== void 0 ? Boolean(options.contentType) : true; + const etag = options.etag !== void 0 ? Boolean(options.etag) : true; + const dotfiles = options.dotfiles !== void 0 ? validDotFilesOptions.indexOf(options.dotfiles) : 1; + if (dotfiles === -1) { + throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"'); + } + const extensions = options.extensions !== void 0 ? normalizeList(options.extensions, "extensions option") : []; + const immutable = options.immutable !== void 0 ? Boolean(options.immutable) : false; + const index = options.index !== void 0 ? normalizeList(options.index, "index option") : ["index.html"]; + const lastModified = options.lastModified !== void 0 ? Boolean(options.lastModified) : true; + const maxage = normalizeMaxAge(options.maxAge ?? options.maxage); + const maxContentRangeChunkSize = options.maxContentRangeChunkSize !== void 0 ? Number(options.maxContentRangeChunkSize) : null; + const root = options.root ? resolve(options.root) : null; + const highWaterMark = Number.isSafeInteger(options.highWaterMark) && options.highWaterMark > 0 ? options.highWaterMark : null; + return { + acceptRanges, + cacheControl, + contentType, + etag, + dotfiles, + extensions, + immutable, + index, + lastModified, + maxage, + maxContentRangeChunkSize, + root, + highWaterMark, + start: options.start, + end: options.end + }; + } + function normalizePath(_path, root) { + let path8 = decode(_path); + if (path8 == null) { + return { statusCode: 400 }; + } + if (~path8.indexOf("\0")) { + return { statusCode: 400 }; + } + let parts; + if (root !== null) { + if (path8) { + path8 = normalize("." + sep2 + path8); + } + if (UP_PATH_REGEXP.test(path8)) { + debug('malicious path "%s"', path8); + return { statusCode: 403 }; + } + parts = path8.split(sep2); + path8 = normalize(join5(root, path8)); + } else { + if (UP_PATH_REGEXP.test(path8)) { + debug('malicious path "%s"', path8); + return { statusCode: 403 }; + } + parts = normalize(path8).split(sep2); + path8 = resolve(path8); + } + return { path: path8, parts }; + } + function hasTrailingSlash(path8) { + return path8[path8.length - 1] === "/"; + } + function isConditionalGET(request) { + return request.headers["if-match"] || request.headers["if-unmodified-since"] || request.headers["if-none-match"] || request.headers["if-modified-since"]; + } + function isNotModifiedFailure(request, headers) { + if ("cache-control" in request.headers && request.headers["cache-control"].indexOf("no-cache") !== -1) { + return false; + } + if ("if-none-match" in request.headers) { + const ifNoneMatch = request.headers["if-none-match"]; + if (ifNoneMatch === "*") { + return true; + } + const etag = headers.ETag; + if (typeof etag !== "string") { + return false; + } + const etagL = etag.length; + const isMatching = parseTokenList(ifNoneMatch, function(match) { + const mL = match.length; + if (etagL === mL && match === etag || etagL > mL && "W/" + match === etag) { + return true; + } + }); + if (isMatching) { + return true; + } + return false; + } + if ("if-modified-since" in request.headers) { + const ifModifiedSince = request.headers["if-modified-since"]; + const lastModified = headers["Last-Modified"]; + if (!lastModified || Date.parse(lastModified) <= Date.parse(ifModifiedSince)) { + return true; + } + } + return false; + } + function isPreconditionFailure(request, headers) { + const ifMatch = request.headers["if-match"]; + if (ifMatch) { + const etag = headers.ETag; + if (ifMatch !== "*") { + const isMatching = parseTokenList(ifMatch, function(match) { + if (match === etag || "W/" + match === etag) { + return true; + } + }) || false; + if (isMatching !== true) { + return true; + } + } + } + if ("if-unmodified-since" in request.headers) { + const ifUnmodifiedSince = request.headers["if-unmodified-since"]; + const unmodifiedSince = Date.parse(ifUnmodifiedSince); + if (unmodifiedSince === unmodifiedSince) { + const lastModified = Date.parse(headers["Last-Modified"]); + if ( + // eslint-disable-next-line no-self-compare + lastModified !== lastModified || // fast path of isNaN(number) + lastModified > unmodifiedSince + ) { + return true; + } + } + } + return false; + } + function isRangeFresh(request, headers) { + if (!("if-range" in request.headers)) { + return true; + } + const ifRange = request.headers["if-range"]; + if (ifRange.indexOf('"') !== -1) { + const etag = headers.ETag; + return etag && ifRange.indexOf(etag) !== -1 || false; + } + const ifRangeTimestamp = Date.parse(ifRange); + if (ifRangeTimestamp !== ifRangeTimestamp) { + return false; + } + const lastModified = Date.parse(headers["Last-Modified"]); + return ( + // eslint-disable-next-line no-self-compare + lastModified !== lastModified || // fast path of isNaN(number) + lastModified <= ifRangeTimestamp + ); + } + function tryStat(path8) { + return new Promise((resolve2) => { + fs7.stat(path8, function onstat(error, stat2) { + resolve2({ error, stat: stat2 }); + }); + }); + } + function sendError(statusCode, err) { + const headers = {}; + if (err && err.headers) { + for (const headerName in err.headers) { + headers[headerName] = err.headers[headerName]; + } + } + const doc = ERROR_RESPONSES[statusCode]; + headers["Content-Type"] = "text/html; charset=utf-8"; + headers["Content-Length"] = doc[1]; + headers["Content-Security-Policy"] = "default-src 'none'"; + headers["X-Content-Type-Options"] = "nosniff"; + return { + statusCode, + headers, + stream: Readable.from(doc[0]), + // metadata + type: "error", + metadata: { error: createHttpError(statusCode, err) } + }; + } + function sendStatError(err) { + switch (err.code) { + case "ENAMETOOLONG": + case "ENOTDIR": + case "ENOENT": + return sendError(404, err); + default: + return sendError(500, err); + } + } + function sendNotModified(headers, path8, stat2) { + debug("not modified"); + delete headers["Content-Encoding"]; + delete headers["Content-Language"]; + delete headers["Content-Length"]; + delete headers["Content-Range"]; + delete headers["Content-Type"]; + return { + statusCode: 304, + headers, + stream: Readable.from(""), + // metadata + type: "file", + metadata: { path: path8, stat: stat2 } + }; + } + function sendFileDirectly(request, path8, stat2, options) { + let len = stat2.size; + let offset = options.start ?? 0; + let statusCode = 200; + const headers = {}; + debug('send "%s"', path8); + if (options.acceptRanges) { + debug("accept ranges"); + headers["Accept-Ranges"] = "bytes"; + } + if (options.cacheControl) { + let cacheControl = "public, max-age=" + Math.floor(options.maxage / 1e3); + if (options.immutable) { + cacheControl += ", immutable"; + } + debug("cache-control %s", cacheControl); + headers["Cache-Control"] = cacheControl; + } + if (options.lastModified) { + const modified = stat2.mtime.toUTCString(); + debug("modified %s", modified); + headers["Last-Modified"] = modified; + } + if (options.etag) { + const etag = 'W/"' + stat2.size.toString(16) + "-" + stat2.mtime.getTime().toString(16) + '"'; + debug("etag %s", etag); + headers.ETag = etag; + } + if (options.contentType) { + let type = mime.getType(path8) || mime.default_type; + debug("content-type %s", type); + if (type && isUtf8MimeType(type)) { + type += "; charset=utf-8"; + } + if (type) { + headers["Content-Type"] = type; + } + } + if (isConditionalGET(request)) { + if (isPreconditionFailure(request, headers)) { + return sendError(412); + } + if (isNotModifiedFailure(request, headers)) { + return sendNotModified(headers, path8, stat2); + } + } + len = Math.max(0, len - offset); + if (options.end !== void 0) { + const bytes = options.end - offset + 1; + if (len > bytes) len = bytes; + } + if (options.acceptRanges) { + const rangeHeader = request.headers.range; + if (rangeHeader !== void 0 && BYTES_RANGE_REGEXP.test(rangeHeader)) { + if (isRangeFresh(request, headers)) { + const ranges = parseBytesRange(len, rangeHeader); + if (ranges.length === 0) { + debug("range unsatisfiable"); + headers["Content-Range"] = contentRange("bytes", len); + return sendError(416, { + headers: { "Content-Range": headers["Content-Range"] } + }); + } else if (ranges.length === 1) { + debug("range %j", ranges); + statusCode = 206; + if (options.maxContentRangeChunkSize) { + ranges[0].end = Math.min(ranges[0].end, ranges[0].start + options.maxContentRangeChunkSize - 1); + } + headers["Content-Range"] = contentRange("bytes", len, ranges[0]); + offset += ranges[0].start; + len = ranges[0].end - ranges[0].start + 1; + } + } else { + debug("range stale"); + } + } + } + headers["Content-Length"] = len; + if (request.method === "HEAD") { + return { + statusCode, + headers, + stream: Readable.from(""), + // metadata + type: "file", + metadata: { path: path8, stat: stat2 } + }; + } + const stream2 = fs7.createReadStream(path8, { + highWaterMark: options.highWaterMark, + start: offset, + end: Math.max(offset, offset + len - 1) + }); + return { + statusCode, + headers, + stream: stream2, + // metadata + type: "file", + metadata: { path: path8, stat: stat2 } + }; + } + function sendRedirect(path8, options) { + if (hasTrailingSlash(options.path)) { + return sendError(403); + } + const loc = encodeURI(collapseLeadingSlashes(options.path + "/")); + const doc = createHtmlDocument("Redirecting", "Redirecting to " + escapeHtml(loc)); + const headers = {}; + headers["Content-Type"] = "text/html; charset=utf-8"; + headers["Content-Length"] = doc[1]; + headers["Content-Security-Policy"] = "default-src 'none'"; + headers["X-Content-Type-Options"] = "nosniff"; + headers.Location = loc; + return { + statusCode: 301, + headers, + stream: Readable.from(doc[0]), + // metadata + type: "directory", + metadata: { requestPath: options.path, path: path8 } + }; + } + async function sendIndex(request, path8, options) { + let err; + for (let i = 0; i < options.index.length; i++) { + const index = options.index[i]; + const p = join5(path8, index); + const { error, stat: stat2 } = await tryStat(p); + if (error) { + err = error; + continue; + } + if (stat2.isDirectory()) continue; + return sendFileDirectly(request, p, stat2, options); + } + if (err) { + return sendStatError(err); + } + return sendError(404); + } + async function sendFile(request, path8, options) { + const { error, stat: stat2 } = await tryStat(path8); + if (error && error.code === "ENOENT" && !extname(path8) && path8[path8.length - 1] !== sep2) { + let err = error; + for (let i = 0; i < options.extensions.length; i++) { + const extension = options.extensions[i]; + const p = path8 + "." + extension; + const { error: error2, stat: stat3 } = await tryStat(p); + if (error2) { + err = error2; + continue; + } + if (stat3.isDirectory()) { + err = null; + continue; + } + return sendFileDirectly(request, p, stat3, options); + } + if (err) { + return sendStatError(err); + } + return sendError(404); + } + if (error) return sendStatError(error); + if (stat2.isDirectory()) return sendRedirect(path8, options); + return sendFileDirectly(request, path8, stat2, options); + } + async function send(request, _path, options) { + const opts = normalizeOptions(options); + opts.path = _path; + const parsed = normalizePath(_path, opts.root); + const { path: path8, parts } = parsed; + if (parsed.statusCode !== void 0) { + return sendError(parsed.statusCode); + } + if ((debug.enabled || // if debugging is enabled, then check for all cases to log allow case + opts.dotfiles !== 0) && containsDotFile(parts)) { + switch (opts.dotfiles) { + /* c8 ignore start */ + /* unreachable, because NODE_DEBUG can not be set after process is running */ + case 0: + debug('allow dotfile "%s"', path8); + break; + /* c8 ignore stop */ + case 2: + debug('deny dotfile "%s"', path8); + return sendError(403); + case 1: + // 'ignore' + default: + debug('ignore dotfile "%s"', path8); + return sendError(404); + } + } + if (opts.index.length && hasTrailingSlash(_path)) { + return sendIndex(request, path8, opts); + } + return sendFile(request, path8, opts); + } + module2.exports.send = send; + } +}); + +// node_modules/@fastify/send/index.js +var require_send2 = __commonJS({ + "node_modules/@fastify/send/index.js"(exports2, module2) { + "use strict"; + var isUtf8MimeType = require_isUtf8MimeType().isUtf8MimeType; + var mime = require_mime(); + var send = require_send().send; + module2.exports = send; + module2.exports.default = send; + module2.exports.send = send; + module2.exports.isUtf8MimeType = isUtf8MimeType; + module2.exports.mime = mime; + } +}); + +// node_modules/@fastify/accept-negotiator/index.js +var require_accept_negotiator = __commonJS({ + "node_modules/@fastify/accept-negotiator/index.js"(exports2, module2) { + "use strict"; + function Negotiator(options) { + if (!new.target) { + return new Negotiator(options); + } + const { + supportedValues = [], + cache + } = options && typeof options === "object" && options || {}; + this.supportedValues = supportedValues; + this.cache = cache; + } + Negotiator.prototype.negotiate = function(header) { + if (typeof header !== "string") { + return null; + } + if (!this.cache) { + return negotiate(header, this.supportedValues); + } + if (!this.cache.has(header)) { + this.cache.set(header, negotiate(header, this.supportedValues)); + } + return this.cache.get(header); + }; + function negotiate(header, supportedValues) { + if (!header || !Array.isArray(supportedValues) || supportedValues.length === 0) { + return null; + } + if (header === "*") { + return supportedValues[0]; + } + let preferredEncoding = null; + let preferredEncodingPriority = Infinity; + let preferredEncodingQuality = 0; + function processMatch(enc2, quality) { + if (quality === 0 || preferredEncodingQuality > quality) { + return false; + } + const encoding = enc2 === "*" && supportedValues[0] || enc2; + const priority = supportedValues.indexOf(encoding); + if (priority === -1) { + return false; + } + if (priority === 0 && quality === 1) { + preferredEncoding = encoding; + return true; + } else if (preferredEncodingQuality < quality) { + preferredEncoding = encoding; + preferredEncodingPriority = priority; + preferredEncodingQuality = quality; + } else if (preferredEncodingPriority > priority) { + preferredEncoding = encoding; + preferredEncodingPriority = priority; + preferredEncodingQuality = quality; + } + return false; + } + parse(header, processMatch); + return preferredEncoding; + } + var BEGIN = 0; + var TOKEN = 1; + var QUALITY = 2; + var END = 3; + function parse(header, processMatch) { + let str = ""; + let quality; + let state = BEGIN; + for (let i = 0, il = header.length; i < il; ++i) { + const char = header[i]; + if (char === " " || char === " ") { + continue; + } else if (char === ";") { + if (state === TOKEN) { + state = QUALITY; + quality = ""; + } + continue; + } else if (char === ",") { + if (state === TOKEN) { + if (processMatch(str, 1)) { + state = END; + break; + } + state = BEGIN; + str = ""; + } else if (state === QUALITY) { + if (processMatch(str, parseFloat(quality) || 0)) { + state = END; + break; + } + state = BEGIN; + str = ""; + quality = ""; + } + continue; + } else if (state === QUALITY) { + if (char === "q" || char === "=") { + continue; + } else if (char === "." || char === "1" || char === "0" || char === "2" || char === "3" || char === "4" || char === "5" || char === "6" || char === "7" || char === "8" || char === "9") { + quality += char; + continue; + } + } else if (state === BEGIN) { + state = TOKEN; + str += char; + continue; + } + if (state === TOKEN) { + const prevChar = header[i - 1]; + if (prevChar === " " || prevChar === " ") { + str = ""; + } + str += char; + continue; + } + if (processMatch(str, parseFloat(quality) || 0)) { + state = END; + break; + } + state = BEGIN; + str = char; + quality = ""; + } + if (state === TOKEN) { + processMatch(str, 1); + } else if (state === QUALITY) { + processMatch(str, parseFloat(quality) || 0); + } + } + module2.exports = negotiate; + module2.exports.default = negotiate; + module2.exports.negotiate = negotiate; + module2.exports.Negotiator = Negotiator; + } +}); + +// node_modules/safe-buffer/index.js +var require_safe_buffer = __commonJS({ + "node_modules/safe-buffer/index.js"(exports2, module2) { + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + SafeBuffer.prototype = Object.create(Buffer2.prototype); + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + } +}); + +// node_modules/content-disposition/index.js +var require_content_disposition = __commonJS({ + "node_modules/content-disposition/index.js"(exports2, module2) { + "use strict"; + module2.exports = contentDisposition; + module2.exports.parse = parse; + var basename = require("path").basename; + var Buffer2 = require_safe_buffer().Buffer; + var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g; + var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/; + var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g; + var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g; + var QESC_REGEXP = /\\([\u0000-\u007f])/g; + var QUOTE_REGEXP = /([\\"])/g; + var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g; + var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/; + var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/; + var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/; + var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/; + function contentDisposition(filename, options) { + var opts = options || {}; + var type = opts.type || "attachment"; + var params = createparams(filename, opts.fallback); + return format(new ContentDisposition(type, params)); + } + function createparams(filename, fallback) { + if (filename === void 0) { + return; + } + var params = {}; + if (typeof filename !== "string") { + throw new TypeError("filename must be a string"); + } + if (fallback === void 0) { + fallback = true; + } + if (typeof fallback !== "string" && typeof fallback !== "boolean") { + throw new TypeError("fallback must be a string or boolean"); + } + if (typeof fallback === "string" && NON_LATIN1_REGEXP.test(fallback)) { + throw new TypeError("fallback must be ISO-8859-1 string"); + } + var name = basename(filename); + var isQuotedString = TEXT_REGEXP.test(name); + var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name) : basename(fallback); + var hasFallback = typeof fallbackName === "string" && fallbackName !== name; + if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) { + params["filename*"] = name; + } + if (isQuotedString || hasFallback) { + params.filename = hasFallback ? fallbackName : name; + } + return params; + } + function format(obj) { + var parameters = obj.parameters; + var type = obj.type; + if (!type || typeof type !== "string" || !TOKEN_REGEXP.test(type)) { + throw new TypeError("invalid type"); + } + var string = String(type).toLowerCase(); + if (parameters && typeof parameters === "object") { + var param; + var params = Object.keys(parameters).sort(); + for (var i = 0; i < params.length; i++) { + param = params[i]; + var val = param.substr(-1) === "*" ? ustring(parameters[param]) : qstring(parameters[param]); + string += "; " + param + "=" + val; + } + } + return string; + } + function decodefield(str) { + var match = EXT_VALUE_REGEXP.exec(str); + if (!match) { + throw new TypeError("invalid extended field value"); + } + var charset = match[1].toLowerCase(); + var encoded = match[2]; + var value; + var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode); + switch (charset) { + case "iso-8859-1": + value = getlatin1(binary); + break; + case "utf-8": + value = Buffer2.from(binary, "binary").toString("utf8"); + break; + default: + throw new TypeError("unsupported charset in extended field"); + } + return value; + } + function getlatin1(val) { + return String(val).replace(NON_LATIN1_REGEXP, "?"); + } + function parse(string) { + if (!string || typeof string !== "string") { + throw new TypeError("argument string is required"); + } + var match = DISPOSITION_TYPE_REGEXP.exec(string); + if (!match) { + throw new TypeError("invalid type format"); + } + var index = match[0].length; + var type = match[1].toLowerCase(); + var key; + var names = []; + var params = {}; + var value; + index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ";" ? index - 1 : index; + while (match = PARAM_REGEXP.exec(string)) { + if (match.index !== index) { + throw new TypeError("invalid parameter format"); + } + index += match[0].length; + key = match[1].toLowerCase(); + value = match[2]; + if (names.indexOf(key) !== -1) { + throw new TypeError("invalid duplicate parameter"); + } + names.push(key); + if (key.indexOf("*") + 1 === key.length) { + key = key.slice(0, -1); + value = decodefield(value); + params[key] = value; + continue; + } + if (typeof params[key] === "string") { + continue; + } + if (value[0] === '"') { + value = value.substr(1, value.length - 2).replace(QESC_REGEXP, "$1"); + } + params[key] = value; + } + if (index !== -1 && index !== string.length) { + throw new TypeError("invalid parameter format"); + } + return new ContentDisposition(type, params); + } + function pdecode(str, hex) { + return String.fromCharCode(parseInt(hex, 16)); + } + function pencode(char) { + return "%" + String(char).charCodeAt(0).toString(16).toUpperCase(); + } + function qstring(val) { + var str = String(val); + return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"'; + } + function ustring(val) { + var str = String(val); + var encoded = encodeURIComponent(str).replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode); + return "UTF-8''" + encoded; + } + function ContentDisposition(type, parameters) { + this.type = type; + this.parameters = parameters; + } + } +}); + +// node_modules/@fastify/static/lib/dirList.js +var require_dirList = __commonJS({ + "node_modules/@fastify/static/lib/dirList.js"(exports2, module2) { + "use strict"; + var os2 = require("node:os"); + var path7 = require("node:path"); + var fs7 = require("node:fs/promises"); + var fastq = require_queue(); + var fastqConcurrency = Math.max(1, os2.cpus().length - 1); + var dirList = { + _getExtendedInfo: async function(dir, info) { + const depth = dir.split(path7.sep).length; + const files = await fs7.readdir(dir); + const worker = async (filename) => { + const filePath = path7.join(dir, filename); + let stats; + try { + stats = await fs7.stat(filePath); + } catch { + return; + } + if (stats.isDirectory()) { + info.totalFolderCount++; + filePath.split(path7.sep).length === depth + 1 && info.folderCount++; + await dirList._getExtendedInfo(filePath, info); + } else { + info.totalSize += stats.size; + info.totalFileCount++; + filePath.split(path7.sep).length === depth + 1 && info.fileCount++; + info.lastModified = Math.max(info.lastModified, stats.mtimeMs); + } + }; + const queue = fastq.promise(worker, fastqConcurrency); + await Promise.all(files.map((filename) => queue.push(filename))); + }, + /** + * get extended info about a folder + * @param {string} folderPath full path fs dir + * @return {Promise} + */ + getExtendedInfo: async function(folderPath) { + const info = { + totalSize: 0, + fileCount: 0, + totalFileCount: 0, + folderCount: 0, + totalFolderCount: 0, + lastModified: 0 + }; + await dirList._getExtendedInfo(folderPath, info); + return info; + }, + /** + * get files and dirs from dir, or error + * @param {string} dir full path fs dir + * @param {(boolean | ListOptionsJsonFormat | ListOptionsHtmlFormat)} options + * @param {string} dotfiles + * note: can't use glob because don't get error on non existing dir + */ + list: async function(dir, options, dotfiles) { + const entries = { dirs: [], files: [] }; + let files = await fs7.readdir(dir); + if (dotfiles === "deny" || dotfiles === "ignore") { + files = files.filter((file) => file.charAt(0) !== "."); + } + if (files.length < 1) { + return entries; + } + const worker = async (filename) => { + let stats; + try { + stats = await fs7.stat(path7.join(dir, filename)); + } catch { + return; + } + const entry = { name: filename, stats }; + if (stats.isDirectory()) { + if (options.extendedFolderInfo) { + entry.extendedInfo = await dirList.getExtendedInfo(path7.join(dir, filename)); + } + entries.dirs.push(entry); + } else { + entries.files.push(entry); + } + }; + const queue = fastq.promise(worker, fastqConcurrency); + await Promise.all(files.map((filename) => queue.push(filename))); + entries.dirs.sort((a, b) => a.name.localeCompare(b.name)); + entries.files.sort((a, b) => a.name.localeCompare(b.name)); + return entries; + }, + /** + * send dir list content, or 404 on error + * @param {Fastify.Reply} reply + * @param {string} dir full path fs dir + * @param {(boolean | ListOptionsJsonFormat | ListOptionsHtmlFormat)} options + * @param {string} route request route + * @param {string} dotfiles + */ + send: async function({ reply, dir, options, route, prefix, dotfiles }) { + if (reply.request.query.format === "html" && typeof options.render !== "function") { + throw new TypeError("The `list.render` option must be a function and is required with the URL parameter `format=html`"); + } + let entries; + try { + entries = await dirList.list(dir, options, dotfiles); + } catch { + return reply.callNotFound(); + } + const format = reply.request.query.format || options.format; + if (format !== "html") { + if (options.jsonFormat !== "extended") { + const nameEntries = { dirs: [], files: [] }; + entries.dirs.forEach((entry) => nameEntries.dirs.push(entry.name)); + entries.files.forEach((entry) => nameEntries.files.push(entry.name)); + await reply.send(nameEntries); + } else { + await reply.send(entries); + } + return; + } + const html = options.render( + entries.dirs.map((entry) => dirList.htmlInfo(entry, route, prefix, options)), + entries.files.map((entry) => dirList.htmlInfo(entry, route, prefix, options)) + ); + await reply.type("text/html").send(html); + }, + /** + * provide the html information about entry and route, to get name and full route + * @param entry file or dir name and stats + * @param {string} route request route + * @return {ListFile} + */ + htmlInfo: function(entry, route, prefix, options) { + if (options.names?.includes(path7.basename(route))) { + route = path7.normalize(path7.join(route, "..")); + } + return { + href: encodeURI(path7.join(prefix, route, entry.name).replace(/\\/gu, "/")), + name: entry.name, + stats: entry.stats, + extendedInfo: entry.extendedInfo + }; + }, + /** + * say if the route can be handled by dir list or not + * @param {string} route request route + * @param {(boolean | ListOptionsJsonFormat | ListOptionsHtmlFormat)} options + * @return {boolean} + */ + handle: function(route, options) { + return options.names?.includes(path7.basename(route)) || // match trailing slash + ((options.names?.includes("/") && route[route.length - 1] === "/") ?? false); + }, + /** + * get path from route and fs root paths, considering trailing slash + * @param {string} root fs root path + * @param {string} route request route + */ + path: function(root, route) { + const _route = route[route.length - 1] === "/" ? route + "none" : route; + return path7.dirname(path7.join(root, _route)); + }, + /** + * validate options + * @return {Error} + */ + validateOptions: function(options) { + if (!options.list) { + return; + } + if (Array.isArray(options.root)) { + return new TypeError("multi-root with list option is not supported"); + } + if (options.list.format && options.list.format !== "json" && options.list.format !== "html") { + return new TypeError("The `list.format` option must be json or html"); + } + if (options.list.names && !Array.isArray(options.list.names)) { + return new TypeError("The `list.names` option must be an array"); + } + if (options.list.jsonFormat != null && options.list.jsonFormat !== "names" && options.list.jsonFormat !== "extended") { + return new TypeError("The `list.jsonFormat` option must be name or extended"); + } + if (options.list.format === "html" && typeof options.list.render !== "function") { + return new TypeError("The `list.render` option must be a function and is required with html format"); + } + } + }; + module2.exports = dirList; + } +}); + +// node_modules/@fastify/static/index.js +var require_static = __commonJS({ + "node_modules/@fastify/static/index.js"(exports2, module2) { + "use strict"; + var path7 = require("node:path"); + var { fileURLToPath } = require("node:url"); + var { statSync } = require("node:fs"); + var { glob } = require_commonjs7(); + var fp = require_plugin2(); + var send = require_send2(); + var encodingNegotiator = require_accept_negotiator(); + var contentDisposition = require_content_disposition(); + var dirList = require_dirList(); + var endForwardSlashRegex = /\/$/u; + var asteriskRegex = /\*/gu; + var supportedEncodings = ["br", "gzip", "deflate"]; + send.mime.default_type = "application/octet-stream"; + async function fastifyStatic2(fastify, opts) { + opts.root = normalizeRoot(opts.root); + checkRootPathForErrors(fastify, opts.root); + const setHeaders = opts.setHeaders; + if (setHeaders !== void 0 && typeof setHeaders !== "function") { + throw new TypeError("The `setHeaders` option must be a function"); + } + const invalidDirListOpts = dirList.validateOptions(opts); + if (invalidDirListOpts) { + throw invalidDirListOpts; + } + if (opts.dotfiles === void 0) { + opts.dotfiles = "allow"; + } + const sendOptions = { + root: opts.root, + acceptRanges: opts.acceptRanges, + contentType: opts.contentType, + cacheControl: opts.cacheControl, + dotfiles: opts.dotfiles, + etag: opts.etag, + extensions: opts.extensions, + immutable: opts.immutable, + index: opts.index, + lastModified: opts.lastModified, + maxAge: opts.maxAge + }; + let prefix = opts.prefix ?? (opts.prefix = "/"); + if (!opts.prefixAvoidTrailingSlash) { + prefix = prefix[prefix.length - 1] === "/" ? prefix : prefix + "/"; + } + const routeOpts = { + constraints: opts.constraints, + schema: { + hide: opts.schemaHide !== void 0 ? opts.schemaHide : true + }, + logLevel: opts.logLevel, + errorHandler(error, request, reply) { + if (error?.code === "ERR_STREAM_PREMATURE_CLOSE") { + reply.request.raw.destroy(); + return; + } + fastify.errorHandler(error, request, reply); + } + }; + if (opts.decorateReply !== false) { + fastify.decorateReply("sendFile", function(filePath, rootPath, options) { + const opts2 = typeof rootPath === "object" ? rootPath : options; + const root = typeof rootPath === "string" ? rootPath : opts2?.root; + pumpSendToReply( + this.request, + this, + filePath, + root || sendOptions.root, + 0, + opts2 + ); + return this; + }); + fastify.decorateReply( + "download", + function(filePath, fileName, options = {}) { + const { root, ...opts2 } = typeof fileName === "object" ? fileName : options; + fileName = typeof fileName === "string" ? fileName : filePath; + this.header("content-disposition", contentDisposition(fileName)); + pumpSendToReply(this.request, this, filePath, root, 0, opts2); + return this; + } + ); + } + if (opts.serve !== false) { + if (opts.wildcard && typeof opts.wildcard !== "boolean") { + throw new TypeError('"wildcard" option must be a boolean'); + } + if (opts.wildcard === void 0 || opts.wildcard === true) { + fastify.route({ + ...routeOpts, + method: ["HEAD", "GET"], + path: prefix + "*", + handler(req, reply) { + pumpSendToReply(req, reply, "/" + req.params["*"], sendOptions.root); + } + }); + if (opts.redirect === true && prefix !== opts.prefix) { + fastify.get(opts.prefix, routeOpts, (req, reply) => { + reply.redirect(getRedirectUrl(req.raw.url), 301); + }); + } + } else { + const indexes = opts.index === void 0 ? ["index.html"] : [].concat(opts.index); + const indexDirs = /* @__PURE__ */ new Map(); + const routes = /* @__PURE__ */ new Set(); + const roots = Array.isArray(sendOptions.root) ? sendOptions.root : [sendOptions.root]; + for (let rootPath of roots) { + rootPath = rootPath.split(path7.win32.sep).join(path7.posix.sep); + !rootPath.endsWith("/") && (rootPath += "/"); + const files = await glob("**/**", { + cwd: rootPath, + absolute: false, + follow: true, + nodir: true, + dot: opts.serveDotFiles, + ignore: opts.globIgnore + }); + for (let file of files) { + file = file.split(path7.win32.sep).join(path7.posix.sep); + const route = prefix + file; + if (routes.has(route)) { + continue; + } + routes.add(route); + setUpHeadAndGet(routeOpts, route, `/${file}`, rootPath); + const key = path7.posix.basename(route); + if (indexes.includes(key) && !indexDirs.has(key)) { + indexDirs.set(path7.posix.dirname(route), rootPath); + } + } + } + for (const [dirname, rootPath] of indexDirs.entries()) { + const pathname = dirname + (dirname.endsWith("/") ? "" : "/"); + const file = "/" + pathname.replace(prefix, ""); + setUpHeadAndGet(routeOpts, pathname, file, rootPath); + if (opts.redirect === true) { + setUpHeadAndGet(routeOpts, pathname.replace(endForwardSlashRegex, ""), file.replace(endForwardSlashRegex, ""), rootPath); + } + } + } + } + const allowedPath = opts.allowedPath; + async function pumpSendToReply(request, reply, pathname, rootPath, rootPathOffset = 0, pumpOptions, checkedEncodings) { + const pathnameOrig = pathname; + const options = Object.assign({}, sendOptions, pumpOptions); + if (rootPath) { + if (Array.isArray(rootPath)) { + options.root = rootPath[rootPathOffset]; + } else { + options.root = rootPath; + } + } + if (allowedPath && !allowedPath(pathname, options.root, request)) { + return reply.callNotFound(); + } + let encoding; + let pathnameForSend = pathname; + if (opts.preCompressed) { + if (!checkedEncodings) { + checkedEncodings = /* @__PURE__ */ new Set(); + } + encoding = getEncodingHeader(request.headers, checkedEncodings); + if (encoding) { + if (pathname.endsWith("/")) { + pathname = findIndexFile(pathname, options.root, options.index); + if (!pathname) { + return reply.callNotFound(); + } + pathnameForSend = pathnameForSend + pathname + "." + getEncodingExtension(encoding); + } else { + pathnameForSend = pathname + "." + getEncodingExtension(encoding); + } + } + } + const { + statusCode, + headers, + stream, + type, + metadata + } = await send(request.raw, encodeURI(pathnameForSend), options); + switch (type) { + case "directory": { + const path8 = metadata.path; + if (opts.list) { + await dirList.send({ + reply, + dir: path8, + options: opts.list, + route: pathname, + prefix, + dotfiles: opts.dotfiles + }).catch((err) => reply.send(err)); + } + if (opts.redirect === true) { + try { + reply.redirect(getRedirectUrl(request.raw.url), 301); + } catch (error) { + await reply.send(error); + } + } else { + if (!pathname.endsWith("/") && findIndexFile(pathname, options.root, options.index)) { + return pumpSendToReply( + request, + reply, + pathname + "/", + rootPath, + void 0, + void 0, + checkedEncodings + ); + } + reply.callNotFound(); + } + break; + } + case "error": { + if (statusCode === 403 && (!options.index || !options.index.length) && pathnameForSend[pathnameForSend.length - 1] === "/") { + if (opts.list) { + await dirList.send({ + reply, + dir: dirList.path(opts.root, pathname), + options: opts.list, + route: pathname, + prefix, + dotfiles: opts.dotfiles + }).catch((err) => reply.send(err)); + return; + } + } + if (metadata.error.code === "ENOENT") { + if (opts.preCompressed && encoding) { + if (opts.redirect !== true) { + const indexPathname = findIndexFile(pathname, options.root, options.index); + if (indexPathname) { + return pumpSendToReply( + request, + reply, + pathname + "/", + rootPath, + void 0, + void 0, + checkedEncodings + ); + } + } + } + if (opts.list && dirList.handle(pathname, opts.list)) { + await dirList.send({ + reply, + dir: dirList.path(opts.root, pathname), + options: opts.list, + route: pathname, + prefix, + dotfiles: opts.dotfiles + }).catch((err) => reply.send(err)); + return; + } + if (Array.isArray(rootPath) && rootPathOffset < rootPath.length - 1) { + return pumpSendToReply(request, reply, pathname, rootPath, rootPathOffset + 1); + } + if (opts.preCompressed && !checkedEncodings.has(encoding)) { + checkedEncodings.add(encoding); + return pumpSendToReply( + request, + reply, + pathnameOrig, + rootPath, + rootPathOffset, + void 0, + checkedEncodings + ); + } + return reply.callNotFound(); + } + if (metadata.error.status === 404) { + return reply.callNotFound(); + } + await reply.send(metadata.error); + break; + } + case "file": { + const newStatusCode = reply.statusCode !== 200 ? reply.statusCode : statusCode; + reply.code(newStatusCode); + if (setHeaders !== void 0) { + setHeaders(reply.raw, metadata.path, metadata.stat); + } + reply.headers(headers); + if (encoding) { + reply.header("content-type", getContentType(pathname)); + reply.header("content-encoding", encoding); + } + await reply.send(stream); + break; + } + } + } + function setUpHeadAndGet(routeOpts2, route, file, rootPath) { + const toSetUp = Object.assign({}, routeOpts2, { + method: ["HEAD", "GET"], + url: route, + handler: serveFileHandler + }); + toSetUp.config = toSetUp.config || {}; + toSetUp.config.file = file; + toSetUp.config.rootPath = rootPath; + fastify.route(toSetUp); + } + async function serveFileHandler(req, reply) { + const routeConfig = req.routeOptions?.config || req.routeConfig; + return pumpSendToReply(req, reply, routeConfig.file, routeConfig.rootPath); + } + } + function normalizeRoot(root) { + if (root === void 0) { + return root; + } + if (root instanceof URL && root.protocol === "file:") { + return fileURLToPath(root); + } + if (Array.isArray(root)) { + const result = []; + for (let i = 0, il = root.length; i < il; ++i) { + if (root[i] instanceof URL && root[i].protocol === "file:") { + result.push(fileURLToPath(root[i])); + } else { + result.push(root[i]); + } + } + return result; + } + return root; + } + function checkRootPathForErrors(fastify, rootPath) { + if (rootPath === void 0) { + throw new Error('"root" option is required'); + } + if (Array.isArray(rootPath)) { + if (!rootPath.length) { + throw new Error('"root" option array requires one or more paths'); + } + if (new Set(rootPath).size !== rootPath.length) { + throw new Error( + '"root" option array contains one or more duplicate paths' + ); + } + rootPath.map((path8) => checkPath(fastify, path8)); + return; + } + if (typeof rootPath === "string") { + return checkPath(fastify, rootPath); + } + throw new Error('"root" option must be a string or array of strings'); + } + function checkPath(fastify, rootPath) { + if (typeof rootPath !== "string") { + throw new TypeError('"root" option must be a string'); + } + if (path7.isAbsolute(rootPath) === false) { + throw new Error('"root" option must be an absolute path'); + } + let pathStat; + try { + pathStat = statSync(rootPath); + } catch (e) { + if (e.code === "ENOENT") { + fastify.log.warn(`"root" path "${rootPath}" must exist`); + return; + } + throw e; + } + if (pathStat.isDirectory() === false) { + throw new Error('"root" option must point to a directory'); + } + } + function getContentType(path8) { + const type = send.mime.getType(path8) || send.mime.default_type; + if (!send.isUtf8MimeType(type)) { + return type; + } + return `${type}; charset=utf-8`; + } + function findIndexFile(pathname, root, indexFiles = ["index.html"]) { + if (Array.isArray(indexFiles)) { + return indexFiles.find((filename) => { + const p = path7.join(root, pathname, filename); + try { + const stats = statSync(p); + return !stats.isDirectory(); + } catch { + return false; + } + }); + } + return false; + } + function getEncodingHeader(headers, checked) { + if (!("accept-encoding" in headers)) return; + const header = headers["accept-encoding"].toLowerCase().replace(asteriskRegex, "gzip"); + return encodingNegotiator.negotiate( + header, + supportedEncodings.filter((enc2) => !checked.has(enc2)) + ); + } + function getEncodingExtension(encoding) { + switch (encoding) { + case "br": + return "br"; + case "gzip": + return "gz"; + } + } + function getRedirectUrl(url) { + let i = 0; + for (; i < url.length; ++i) { + if (url[i] !== "/" && url[i] !== "\\") break; + } + url = "/" + url.substr(i); + try { + const parsed = new URL(url, "http://localhost.com/"); + const parsedPathname = parsed.pathname; + return parsedPathname + (parsedPathname[parsedPathname.length - 1] !== "/" ? "/" : "") + (parsed.search || ""); + } catch { + const err = new Error(`Invalid redirect URL: ${url}`); + err.statusCode = 400; + throw err; + } + } + module2.exports = fp(fastifyStatic2, { + fastify: "5.x", + name: "@fastify/static" + }); + module2.exports.default = fastifyStatic2; + module2.exports.fastifyStatic = fastifyStatic2; + } +}); + +// package.json +var require_package3 = __commonJS({ + "package.json"(exports2, module2) { + module2.exports = { + name: "@musistudio/claude-code-router", + version: "1.0.43", + description: "Use Claude Code without an Anthropics account and route it to another LLM provider", + bin: { + ccr: "./dist/cli.js" + }, + scripts: { + build: "node scripts/build.js", + release: "npm run build && npm publish" + }, + keywords: [ + "claude", + "code", + "router", + "llm", + "anthropic" + ], + author: "musistudio", + license: "MIT", + dependencies: { + "@fastify/static": "^8.2.0", + "@musistudio/llms": "^1.0.28", + dotenv: "^16.4.7", + json5: "^2.2.3", + openurl: "^1.1.1", + "pino-rotating-file-stream": "^0.0.2", + tiktoken: "^1.0.21", + uuid: "^11.1.0" + }, + devDependencies: { + "@types/node": "^24.0.15", + esbuild: "^0.25.1", + fastify: "^5.4.0", + shx: "^0.4.0", + typescript: "^5.8.2" + }, + publishConfig: { + ignore: [ + "!build/", + "src/", + "screenshots/" + ] + } + }; + } +}); + +// node_modules/tiktoken/tiktoken_bg.cjs +var require_tiktoken_bg = __commonJS({ + "node_modules/tiktoken/tiktoken_bg.cjs"(exports2, module2) { + var wasm; + module2.exports.__wbg_set_wasm = function(val) { + wasm = val; + }; + var lTextDecoder = typeof TextDecoder === "undefined" ? (0, module2.require)("util").TextDecoder : TextDecoder; + var cachedTextDecoder = new lTextDecoder("utf-8", { ignoreBOM: true, fatal: true }); + cachedTextDecoder.decode(); + var cachedUint8ArrayMemory0 = null; + function getUint8ArrayMemory0() { + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8ArrayMemory0; + } + function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); + } + var heap = new Array(128).fill(void 0); + heap.push(void 0, null, true, false); + var heap_next = heap.length; + function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + heap[idx] = obj; + return idx; + } + function handleError(f, args) { + try { + return f.apply(this, args); + } catch (e) { + wasm.__wbindgen_export_0(addHeapObject(e)); + } + } + function getObject(idx) { + return heap[idx]; + } + function dropObject(idx) { + if (idx < 132) return; + heap[idx] = heap_next; + heap_next = idx; + } + function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; + } + var WASM_VECTOR_LEN = 0; + var lTextEncoder = typeof TextEncoder === "undefined" ? (0, module2.require)("util").TextEncoder : TextEncoder; + var cachedTextEncoder = new lTextEncoder("utf-8"); + var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) { + return cachedTextEncoder.encodeInto(arg, view); + } : function(arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length + }; + }; + function passStringToWasm0(arg, malloc, realloc) { + if (realloc === void 0) { + const buf = cachedTextEncoder.encode(arg); + const ptr2 = malloc(buf.length, 1) >>> 0; + getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr2; + } + let len = arg.length; + let ptr = malloc(len, 1) >>> 0; + const mem = getUint8ArrayMemory0(); + let offset = 0; + for (; offset < len; offset++) { + const code = arg.charCodeAt(offset); + if (code > 127) break; + mem[ptr + offset] = code; + } + if (offset !== len) { + if (offset !== 0) { + arg = arg.slice(offset); + } + ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; + const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + offset += ret.written; + ptr = realloc(ptr, len, offset, 1) >>> 0; + } + WASM_VECTOR_LEN = offset; + return ptr; + } + function isLikeNone(x) { + return x === void 0 || x === null; + } + var cachedDataViewMemory0 = null; + function getDataViewMemory0() { + if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) { + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); + } + return cachedDataViewMemory0; + } + var cachedUint32ArrayMemory0 = null; + function getUint32ArrayMemory0() { + if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) { + cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer); + } + return cachedUint32ArrayMemory0; + } + function getArrayU32FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); + } + function passArray8ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 1, 1) >>> 0; + getUint8ArrayMemory0().set(arg, ptr / 1); + WASM_VECTOR_LEN = arg.length; + return ptr; + } + function passArray32ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 4, 4) >>> 0; + getUint32ArrayMemory0().set(arg, ptr / 4); + WASM_VECTOR_LEN = arg.length; + return ptr; + } + function getArrayU8FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); + } + module2.exports.get_encoding = function(encoding, extend_special_tokens) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(encoding, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2); + const len0 = WASM_VECTOR_LEN; + wasm.get_encoding(retptr, ptr0, len0, addHeapObject(extend_special_tokens)); + var r02 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return Tiktoken.__wrap(r02); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + }; + module2.exports.encoding_for_model = function(model, extend_special_tokens) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(model, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2); + const len0 = WASM_VECTOR_LEN; + wasm.encoding_for_model(retptr, ptr0, len0, addHeapObject(extend_special_tokens)); + var r02 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return Tiktoken.__wrap(r02); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + }; + module2.exports.get_encoding_name_for_model = function(model) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + let deferred3_0; + let deferred3_1; + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(model, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2); + const len0 = WASM_VECTOR_LEN; + wasm.get_encoding_name_for_model(retptr, ptr0, len0); + var r02 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); + var ptr2 = r02; + var len2 = r1; + if (r3) { + ptr2 = 0; + len2 = 0; + throw takeObject(r2); + } + deferred3_0 = ptr2; + deferred3_1 = len2; + return getStringFromWasm0(ptr2, len2); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_export_3(deferred3_0, deferred3_1, 1); + } + }; + var TiktokenFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => { + }, unregister: () => { + } } : new FinalizationRegistry((ptr) => wasm.__wbg_tiktoken_free(ptr >>> 0, 1)); + var Tiktoken = class _Tiktoken { + /** + * @param {string} tiktoken_bfe + * @param {any} special_tokens + * @param {string} pat_str + */ + constructor(tiktoken_bfe, special_tokens, pat_str) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + const ptr0 = passStringToWasm0(tiktoken_bfe, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(pat_str, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.tiktoken_new(ptr0, len0, addHeapObject(special_tokens), ptr1, len1); + this.__wbg_ptr = ret >>> 0; + TiktokenFinalization.register(this, this.__wbg_ptr, this); + return this; + } + /** @returns {string | undefined} */ + get name() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.tiktoken_name(retptr, this.__wbg_ptr); + var r02 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + let v1; + if (r02 !== 0) { + v1 = getStringFromWasm0(r02, r1).slice(); + wasm.__wbindgen_export_3(r02, r1 * 1, 1); + } + return v1; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + static __wrap(ptr) { + ptr = ptr >>> 0; + const obj = Object.create(_Tiktoken.prototype); + obj.__wbg_ptr = ptr; + TiktokenFinalization.register(obj, obj.__wbg_ptr, obj); + return obj; + } + __destroy_into_raw() { + const ptr = this.__wbg_ptr; + this.__wbg_ptr = 0; + TiktokenFinalization.unregister(this); + return ptr; + } + free() { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + const ptr = this.__destroy_into_raw(); + wasm.__wbg_tiktoken_free(ptr, 0); + } + /** + * @param {string} text + * @param {any} allowed_special + * @param {any} disallowed_special + * @returns {Uint32Array} + */ + encode(text, allowed_special, disallowed_special) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2); + const len0 = WASM_VECTOR_LEN; + wasm.tiktoken_encode(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(allowed_special), addHeapObject(disallowed_special)); + var r02 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); + if (r3) { + throw takeObject(r2); + } + var v2 = getArrayU32FromWasm0(r02, r1).slice(); + wasm.__wbindgen_export_3(r02, r1 * 4, 4); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {string} text + * @returns {Uint32Array} + */ + encode_ordinary(text) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2); + const len0 = WASM_VECTOR_LEN; + wasm.tiktoken_encode_ordinary(retptr, this.__wbg_ptr, ptr0, len0); + var r02 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var v2 = getArrayU32FromWasm0(r02, r1).slice(); + wasm.__wbindgen_export_3(r02, r1 * 4, 4); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {string} text + * @param {any} allowed_special + * @param {any} disallowed_special + * @returns {any} + */ + encode_with_unstable(text, allowed_special, disallowed_special) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2); + const len0 = WASM_VECTOR_LEN; + wasm.tiktoken_encode_with_unstable(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(allowed_special), addHeapObject(disallowed_special)); + var r02 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return takeObject(r02); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {Uint8Array} bytes + * @returns {number} + */ + encode_single_token(bytes) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + const ret = wasm.tiktoken_encode_single_token(this.__wbg_ptr, ptr0, len0); + return ret >>> 0; + } + /** + * @param {Uint32Array} tokens + * @returns {Uint8Array} + */ + decode(tokens) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray32ToWasm0(tokens, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.tiktoken_decode(retptr, this.__wbg_ptr, ptr0, len0); + var r02 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var v2 = getArrayU8FromWasm0(r02, r1).slice(); + wasm.__wbindgen_export_3(r02, r1 * 1, 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {number} token + * @returns {Uint8Array} + */ + decode_single_token_bytes(token) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.tiktoken_decode_single_token_bytes(retptr, this.__wbg_ptr, token); + var r02 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var v1 = getArrayU8FromWasm0(r02, r1).slice(); + wasm.__wbindgen_export_3(r02, r1 * 1, 1); + return v1; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** @returns {any} */ + token_byte_values() { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + const ret = wasm.tiktoken_token_byte_values(this.__wbg_ptr); + return takeObject(ret); + } + }; + module2.exports.Tiktoken = Tiktoken; + module2.exports.__wbg_parse_def2e24ef1252aff = function() { + return handleError(function(arg0, arg1) { + const ret = JSON.parse(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); + }, arguments); + }; + module2.exports.__wbg_stringify_f7ed6987935b4a24 = function() { + return handleError(function(arg0) { + const ret = JSON.stringify(getObject(arg0)); + return addHeapObject(ret); + }, arguments); + }; + module2.exports.__wbindgen_error_new = function(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); + }; + module2.exports.__wbindgen_is_undefined = function(arg0) { + const ret = getObject(arg0) === void 0; + return ret; + }; + module2.exports.__wbindgen_object_drop_ref = function(arg0) { + takeObject(arg0); + }; + module2.exports.__wbindgen_string_get = function(arg0, arg1) { + if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); + const obj = getObject(arg1); + const ret = typeof obj === "string" ? obj : void 0; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2); + var len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + module2.exports.__wbindgen_throw = function(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); + }; + } +}); + +// node_modules/tiktoken/tiktoken.cjs +var require_tiktoken = __commonJS({ + "node_modules/tiktoken/tiktoken.cjs"(exports2) { + var wasm = require_tiktoken_bg(); + var imports = {}; + imports["./tiktoken_bg.js"] = wasm; + var path7 = require("path"); + var fs7 = require("fs"); + var candidates = __dirname.split(path7.sep).reduce((memo, _, index, array) => { + const prefix = array.slice(0, index + 1).join(path7.sep) + path7.sep; + if (!prefix.includes("node_modules" + path7.sep)) { + memo.unshift( + path7.join( + prefix, + "node_modules", + "tiktoken", + "", + "./tiktoken_bg.wasm" + ) + ); + } + return memo; + }, []); + candidates.unshift(path7.join(__dirname, "./tiktoken_bg.wasm")); + var bytes = null; + for (const candidate of candidates) { + try { + bytes = fs7.readFileSync(candidate); + break; + } catch { + } + } + if (bytes == null) throw new Error("Missing tiktoken_bg.wasm"); + var wasmModule = new WebAssembly.Module(bytes); + var wasmInstance = new WebAssembly.Instance(wasmModule, imports); + wasm.__wbg_set_wasm(wasmInstance.exports); + exports2["get_encoding"] = wasm["get_encoding"]; + exports2["encoding_for_model"] = wasm["encoding_for_model"]; + exports2["get_encoding_name_for_model"] = wasm["get_encoding_name_for_model"]; + exports2["Tiktoken"] = wasm["Tiktoken"]; + } +}); + +// src/index.ts +var import_fs4 = require("fs"); +var import_promises4 = require("fs/promises"); +var import_os = require("os"); +var import_path4 = require("path"); +init_utils(); + +// node_modules/@musistudio/llms/dist/esm/server.mjs +var import_node_fs = require("node:fs"); +var import_node_path4 = require("node:path"); +var import_node_stream = __toESM(require("node:stream"), 1); +var import_node_util = require("node:util"); +var import_node_buffer = require("node:buffer"); +var import_node_util2 = require("node:util"); +var import_node_http = __toESM(require("node:http"), 1); +var import_node_net = require("node:net"); +var import_node_url = require("node:url"); +var import_node_util3 = require("node:util"); +var import_node_http2 = __toESM(require("node:http"), 1); +var import_node_https = __toESM(require("node:https"), 1); +var import_node_zlib = __toESM(require("node:zlib"), 1); +var import_node_stream2 = __toESM(require("node:stream"), 1); +var import_node_buffer2 = require("node:buffer"); +var import_fastify = __toESM(require_fastify(), 1); +var import_cors = __toESM(require_cors(), 1); +var import_fs = require("fs"); +var import_path = require("path"); +var import_dotenv = __toESM(require_main(), 1); +var import_undici = __toESM(require_undici(), 1); +var import_crypto = require("crypto"); +var import_crypto2 = require("crypto"); +var My = Object.create; +var Pa = Object.defineProperty; +var $y = Object.getOwnPropertyDescriptor; +var Hy = Object.getOwnPropertyNames; +var Gy = Object.getPrototypeOf; +var Wy = Object.prototype.hasOwnProperty; +var X = ((r) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(r, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : r)(function(r) { + if (typeof require < "u") return require.apply(this, arguments); + throw Error('Dynamic require of "' + r + '" is not supported'); +}); +var Me = (r, e) => () => (r && (e = r(r = 0)), e); +var z = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports); +var Af = (r, e) => { + for (var t in e) Pa(r, t, { get: e[t], enumerable: true }); +}; +var zy = (r, e, t, n) => { + if (e && typeof e == "object" || typeof e == "function") for (let o of Hy(e)) !Wy.call(r, o) && o !== t && Pa(r, o, { get: () => e[o], enumerable: !(n = $y(e, o)) || n.enumerable }); + return r; +}; +var zr = (r, e, t) => (t = r != null ? My(Gy(r)) : {}, zy(e || !r || !r.__esModule ? Pa(t, "default", { value: r, enumerable: true }) : t, r)); +var Df = z((sA, lo) => { + lo.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; + lo.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA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\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\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DE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; + lo.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uD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5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC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= z((oA, Sf) => { + var xa = Df(); + Sf.exports = { isSpaceSeparator(r) { + return typeof r == "string" && xa.Space_Separator.test(r); + }, isIdStartChar(r) { + return typeof r == "string" && (r >= "a" && r <= "z" || r >= "A" && r <= "Z" || r === "$" || r === "_" || xa.ID_Start.test(r)); + }, isIdContinueChar(r) { + return typeof r == "string" && (r >= "a" && r <= "z" || r >= "A" && r <= "Z" || r >= "0" && r <= "9" || r === "$" || r === "_" || r === "\u200C" || r === "\u200D" || xa.ID_Continue.test(r)); + }, isDigit(r) { + return typeof r == "string" && /[0-9]/.test(r); + }, isHexDigit(r) { + return typeof r == "string" && /[0-9A-Fa-f]/.test(r); + } }; +}); +var Ff = z((iA, kf) => { + var $e = Ba(), Na, Ze, cr, ho, vr, Pt, He, La, os2; + kf.exports = function(e, t) { + Na = String(e), Ze = "start", cr = [], ho = 0, vr = 1, Pt = 0, He = void 0, La = void 0, os2 = void 0; + do + He = Jy(), Yy[Ze](); + while (He.type !== "eof"); + return typeof t == "function" ? qa({ "": os2 }, "", t) : os2; + }; + function qa(r, e, t) { + let n = r[e]; + if (n != null && typeof n == "object") if (Array.isArray(n)) for (let o = 0; o < n.length; o++) { + let a = String(o), u = qa(n, a, t); + u === void 0 ? delete n[a] : Object.defineProperty(n, a, { value: u, writable: true, enumerable: true, configurable: true }); + } + else for (let o in n) { + let a = qa(n, o, t); + a === void 0 ? delete n[o] : Object.defineProperty(n, o, { value: a, writable: true, enumerable: true, configurable: true }); + } + return t.call(r, e, n); + } + var me, le, ss, ur, Ce; + function Jy() { + for (me = "default", le = "", ss = false, ur = 1; ; ) { + Ce = lr(); + let r = Tf[me](); + if (r) return r; + } + } + function lr() { + if (Na[ho]) return String.fromCodePoint(Na.codePointAt(ho)); + } + function $() { + let r = lr(); + return r === ` +` ? (vr++, Pt = 0) : r ? Pt += r.length : Pt++, r && (ho += r.length), r; + } + var Tf = { default() { + switch (Ce) { + case " ": + case "\v": + case "\f": + case " ": + case "\xA0": + case "\uFEFF": + case ` +`: + case "\r": + case "\u2028": + case "\u2029": + $(); + return; + case "/": + $(), me = "comment"; + return; + case void 0: + return $(), Oe("eof"); + } + if ($e.isSpaceSeparator(Ce)) { + $(); + return; + } + return Tf[Ze](); + }, comment() { + switch (Ce) { + case "*": + $(), me = "multiLineComment"; + return; + case "/": + $(), me = "singleLineComment"; + return; + } + throw Pe($()); + }, multiLineComment() { + switch (Ce) { + case "*": + $(), me = "multiLineCommentAsterisk"; + return; + case void 0: + throw Pe($()); + } + $(); + }, multiLineCommentAsterisk() { + switch (Ce) { + case "*": + $(); + return; + case "/": + $(), me = "default"; + return; + case void 0: + throw Pe($()); + } + $(), me = "multiLineComment"; + }, singleLineComment() { + switch (Ce) { + case ` +`: + case "\r": + case "\u2028": + case "\u2029": + $(), me = "default"; + return; + case void 0: + return $(), Oe("eof"); + } + $(); + }, value() { + switch (Ce) { + case "{": + case "[": + return Oe("punctuator", $()); + case "n": + return $(), Jr("ull"), Oe("null", null); + case "t": + return $(), Jr("rue"), Oe("boolean", true); + case "f": + return $(), Jr("alse"), Oe("boolean", false); + case "-": + case "+": + $() === "-" && (ur = -1), me = "sign"; + return; + case ".": + le = $(), me = "decimalPointLeading"; + return; + case "0": + le = $(), me = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + le = $(), me = "decimalInteger"; + return; + case "I": + return $(), Jr("nfinity"), Oe("numeric", 1 / 0); + case "N": + return $(), Jr("aN"), Oe("numeric", NaN); + case '"': + case "'": + ss = $() === '"', le = "", me = "string"; + return; + } + throw Pe($()); + }, identifierNameStartEscape() { + if (Ce !== "u") throw Pe($()); + $(); + let r = ja(); + switch (r) { + case "$": + case "_": + break; + default: + if (!$e.isIdStartChar(r)) throw vf(); + break; + } + le += r, me = "identifierName"; + }, identifierName() { + switch (Ce) { + case "$": + case "_": + case "\u200C": + case "\u200D": + le += $(); + return; + case "\\": + $(), me = "identifierNameEscape"; + return; + } + if ($e.isIdContinueChar(Ce)) { + le += $(); + return; + } + return Oe("identifier", le); + }, identifierNameEscape() { + if (Ce !== "u") throw Pe($()); + $(); + let r = ja(); + switch (r) { + case "$": + case "_": + case "\u200C": + case "\u200D": + break; + default: + if (!$e.isIdContinueChar(r)) throw vf(); + break; + } + le += r, me = "identifierName"; + }, sign() { + switch (Ce) { + case ".": + le = $(), me = "decimalPointLeading"; + return; + case "0": + le = $(), me = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + le = $(), me = "decimalInteger"; + return; + case "I": + return $(), Jr("nfinity"), Oe("numeric", ur * (1 / 0)); + case "N": + return $(), Jr("aN"), Oe("numeric", NaN); + } + throw Pe($()); + }, zero() { + switch (Ce) { + case ".": + le += $(), me = "decimalPoint"; + return; + case "e": + case "E": + le += $(), me = "decimalExponent"; + return; + case "x": + case "X": + le += $(), me = "hexadecimal"; + return; + } + return Oe("numeric", ur * 0); + }, decimalInteger() { + switch (Ce) { + case ".": + le += $(), me = "decimalPoint"; + return; + case "e": + case "E": + le += $(), me = "decimalExponent"; + return; + } + if ($e.isDigit(Ce)) { + le += $(); + return; + } + return Oe("numeric", ur * Number(le)); + }, decimalPointLeading() { + if ($e.isDigit(Ce)) { + le += $(), me = "decimalFraction"; + return; + } + throw Pe($()); + }, decimalPoint() { + switch (Ce) { + case "e": + case "E": + le += $(), me = "decimalExponent"; + return; + } + if ($e.isDigit(Ce)) { + le += $(), me = "decimalFraction"; + return; + } + return Oe("numeric", ur * Number(le)); + }, decimalFraction() { + switch (Ce) { + case "e": + case "E": + le += $(), me = "decimalExponent"; + return; + } + if ($e.isDigit(Ce)) { + le += $(); + return; + } + return Oe("numeric", ur * Number(le)); + }, decimalExponent() { + switch (Ce) { + case "+": + case "-": + le += $(), me = "decimalExponentSign"; + return; + } + if ($e.isDigit(Ce)) { + le += $(), me = "decimalExponentInteger"; + return; + } + throw Pe($()); + }, decimalExponentSign() { + if ($e.isDigit(Ce)) { + le += $(), me = "decimalExponentInteger"; + return; + } + throw Pe($()); + }, decimalExponentInteger() { + if ($e.isDigit(Ce)) { + le += $(); + return; + } + return Oe("numeric", ur * Number(le)); + }, hexadecimal() { + if ($e.isHexDigit(Ce)) { + le += $(), me = "hexadecimalInteger"; + return; + } + throw Pe($()); + }, hexadecimalInteger() { + if ($e.isHexDigit(Ce)) { + le += $(); + return; + } + return Oe("numeric", ur * Number(le)); + }, string() { + switch (Ce) { + case "\\": + $(), le += Vy(); + return; + case '"': + if (ss) return $(), Oe("string", le); + le += $(); + return; + case "'": + if (!ss) return $(), Oe("string", le); + le += $(); + return; + case ` +`: + case "\r": + throw Pe($()); + case "\u2028": + case "\u2029": + Xy(Ce); + break; + case void 0: + throw Pe($()); + } + le += $(); + }, start() { + switch (Ce) { + case "{": + case "[": + return Oe("punctuator", $()); + } + me = "value"; + }, beforePropertyName() { + switch (Ce) { + case "$": + case "_": + le = $(), me = "identifierName"; + return; + case "\\": + $(), me = "identifierNameStartEscape"; + return; + case "}": + return Oe("punctuator", $()); + case '"': + case "'": + ss = $() === '"', me = "string"; + return; + } + if ($e.isIdStartChar(Ce)) { + le += $(), me = "identifierName"; + return; + } + throw Pe($()); + }, afterPropertyName() { + if (Ce === ":") return Oe("punctuator", $()); + throw Pe($()); + }, beforePropertyValue() { + me = "value"; + }, afterPropertyValue() { + switch (Ce) { + case ",": + case "}": + return Oe("punctuator", $()); + } + throw Pe($()); + }, beforeArrayValue() { + if (Ce === "]") return Oe("punctuator", $()); + me = "value"; + }, afterArrayValue() { + switch (Ce) { + case ",": + case "]": + return Oe("punctuator", $()); + } + throw Pe($()); + }, end() { + throw Pe($()); + } }; + function Oe(r, e) { + return { type: r, value: e, line: vr, column: Pt }; + } + function Jr(r) { + for (let e of r) { + if (lr() !== e) throw Pe($()); + $(); + } + } + function Vy() { + switch (lr()) { + case "b": + return $(), "\b"; + case "f": + return $(), "\f"; + case "n": + return $(), ` +`; + case "r": + return $(), "\r"; + case "t": + return $(), " "; + case "v": + return $(), "\v"; + case "0": + if ($(), $e.isDigit(lr())) throw Pe($()); + return "\0"; + case "x": + return $(), Ky(); + case "u": + return $(), ja(); + case ` +`: + case "\u2028": + case "\u2029": + return $(), ""; + case "\r": + return $(), lr() === ` +` && $(), ""; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + throw Pe($()); + case void 0: + throw Pe($()); + } + return $(); + } + function Ky() { + let r = "", e = lr(); + if (!$e.isHexDigit(e) || (r += $(), e = lr(), !$e.isHexDigit(e))) throw Pe($()); + return r += $(), String.fromCodePoint(parseInt(r, 16)); + } + function ja() { + let r = "", e = 4; + for (; e-- > 0; ) { + let t = lr(); + if (!$e.isHexDigit(t)) throw Pe($()); + r += $(); + } + return String.fromCodePoint(parseInt(r, 16)); + } + var Yy = { start() { + if (He.type === "eof") throw Vr(); + Ia(); + }, beforePropertyName() { + switch (He.type) { + case "identifier": + case "string": + La = He.value, Ze = "afterPropertyName"; + return; + case "punctuator": + fo(); + return; + case "eof": + throw Vr(); + } + }, afterPropertyName() { + if (He.type === "eof") throw Vr(); + Ze = "beforePropertyValue"; + }, beforePropertyValue() { + if (He.type === "eof") throw Vr(); + Ia(); + }, beforeArrayValue() { + if (He.type === "eof") throw Vr(); + if (He.type === "punctuator" && He.value === "]") { + fo(); + return; + } + Ia(); + }, afterPropertyValue() { + if (He.type === "eof") throw Vr(); + switch (He.value) { + case ",": + Ze = "beforePropertyName"; + return; + case "}": + fo(); + } + }, afterArrayValue() { + if (He.type === "eof") throw Vr(); + switch (He.value) { + case ",": + Ze = "beforeArrayValue"; + return; + case "]": + fo(); + } + }, end() { + } }; + function Ia() { + let r; + switch (He.type) { + case "punctuator": + switch (He.value) { + case "{": + r = {}; + break; + case "[": + r = []; + break; + } + break; + case "null": + case "boolean": + case "numeric": + case "string": + r = He.value; + break; + } + if (os2 === void 0) os2 = r; + else { + let e = cr[cr.length - 1]; + Array.isArray(e) ? e.push(r) : Object.defineProperty(e, La, { value: r, writable: true, enumerable: true, configurable: true }); + } + if (r !== null && typeof r == "object") cr.push(r), Array.isArray(r) ? Ze = "beforeArrayValue" : Ze = "beforePropertyName"; + else { + let e = cr[cr.length - 1]; + e == null ? Ze = "end" : Array.isArray(e) ? Ze = "afterArrayValue" : Ze = "afterPropertyValue"; + } + } + function fo() { + cr.pop(); + let r = cr[cr.length - 1]; + r == null ? Ze = "end" : Array.isArray(r) ? Ze = "afterArrayValue" : Ze = "afterPropertyValue"; + } + function Pe(r) { + return po(r === void 0 ? `JSON5: invalid end of input at ${vr}:${Pt}` : `JSON5: invalid character '${Rf(r)}' at ${vr}:${Pt}`); + } + function Vr() { + return po(`JSON5: invalid end of input at ${vr}:${Pt}`); + } + function vf() { + return Pt -= 5, po(`JSON5: invalid identifier character at ${vr}:${Pt}`); + } + function Xy(r) { + console.warn(`JSON5: '${Rf(r)}' in strings is not valid ECMAScript; consider escaping`); + } + function Rf(r) { + let e = { "'": "\\'", '"': '\\"', "\\": "\\\\", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t", "\v": "\\v", "\0": "\\0", "\u2028": "\\u2028", "\u2029": "\\u2029" }; + if (e[r]) return e[r]; + if (r < " ") { + let t = r.charCodeAt(0).toString(16); + return "\\x" + ("00" + t).substring(t.length); + } + return r; + } + function po(r) { + let e = new SyntaxError(r); + return e.lineNumber = vr, e.columnNumber = Pt, e; + } +}); +var Pf = z((aA, Of) => { + var Ua = Ba(); + Of.exports = function(e, t, n) { + let o = [], a = "", u, l, f = "", h; + if (t != null && typeof t == "object" && !Array.isArray(t) && (n = t.space, h = t.quote, t = t.replacer), typeof t == "function") l = t; + else if (Array.isArray(t)) { + u = []; + for (let w of t) { + let g; + typeof w == "string" ? g = w : (typeof w == "number" || w instanceof String || w instanceof Number) && (g = String(w)), g !== void 0 && u.indexOf(g) < 0 && u.push(g); + } + } + return n instanceof Number ? n = Number(n) : n instanceof String && (n = String(n)), typeof n == "number" ? n > 0 && (n = Math.min(10, Math.floor(n)), f = " ".substr(0, n)) : typeof n == "string" && (f = n.substr(0, 10)), d("", { "": e }); + function d(w, g) { + let C = g[w]; + switch (C != null && (typeof C.toJSON5 == "function" ? C = C.toJSON5(w) : typeof C.toJSON == "function" && (C = C.toJSON(w))), l && (C = l.call(g, w, C)), C instanceof Number ? C = Number(C) : C instanceof String ? C = String(C) : C instanceof Boolean && (C = C.valueOf()), C) { + case null: + return "null"; + case true: + return "true"; + case false: + return "false"; + } + if (typeof C == "string") return _(C, false); + if (typeof C == "number") return String(C); + if (typeof C == "object") return Array.isArray(C) ? v(C) : E(C); + } + function _(w) { + let g = { "'": 0.1, '"': 0.2 }, C = { "'": "\\'", '"': '\\"', "\\": "\\\\", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t", "\v": "\\v", "\0": "\\0", "\u2028": "\\u2028", "\u2029": "\\u2029" }, R = ""; + for (let N = 0; N < w.length; N++) { + let j = w[N]; + switch (j) { + case "'": + case '"': + g[j]++, R += j; + continue; + case "\0": + if (Ua.isDigit(w[N + 1])) { + R += "\\x00"; + continue; + } + } + if (C[j]) { + R += C[j]; + continue; + } + if (j < " ") { + let L = j.charCodeAt(0).toString(16); + R += "\\x" + ("00" + L).substring(L.length); + continue; + } + R += j; + } + let S = h || Object.keys(g).reduce((N, j) => g[N] < g[j] ? N : j); + return R = R.replace(new RegExp(S, "g"), C[S]), S + R + S; + } + function E(w) { + if (o.indexOf(w) >= 0) throw TypeError("Converting circular structure to JSON5"); + o.push(w); + let g = a; + a = a + f; + let C = u || Object.keys(w), R = []; + for (let N of C) { + let j = d(N, w); + if (j !== void 0) { + let L = P(N) + ":"; + f !== "" && (L += " "), L += j, R.push(L); + } + } + let S; + if (R.length === 0) S = "{}"; + else { + let N; + if (f === "") N = R.join(","), S = "{" + N + "}"; + else { + let j = `, +` + a; + N = R.join(j), S = `{ +` + a + N + `, +` + g + "}"; + } + } + return o.pop(), a = g, S; + } + function P(w) { + if (w.length === 0) return _(w, true); + let g = String.fromCodePoint(w.codePointAt(0)); + if (!Ua.isIdStartChar(g)) return _(w, true); + for (let C = g.length; C < w.length; C++) if (!Ua.isIdContinueChar(String.fromCodePoint(w.codePointAt(C)))) return _(w, true); + return w; + } + function v(w) { + if (o.indexOf(w) >= 0) throw TypeError("Converting circular structure to JSON5"); + o.push(w); + let g = a; + a = a + f; + let C = []; + for (let S = 0; S < w.length; S++) { + let N = d(String(S), w); + C.push(N !== void 0 ? N : "null"); + } + let R; + if (C.length === 0) R = "[]"; + else if (f === "") R = "[" + C.join(",") + "]"; + else { + let S = `, +` + a, N = C.join(S); + R = `[ +` + a + N + `, +` + g + "]"; + } + return o.pop(), a = g, R; + } + }; +}); +var Ma = z((uA, xf) => { + var Qy = Ff(), Zy = Pf(), e0 = { parse: Qy, stringify: Zy }; + xf.exports = e0; +}); +var Ga = z(($A, Yf) => { + "use strict"; + var So = Object.prototype.hasOwnProperty, Kf = Object.prototype.toString, Hf = Object.defineProperty, Gf = Object.getOwnPropertyDescriptor, Wf = function(e) { + return typeof Array.isArray == "function" ? Array.isArray(e) : Kf.call(e) === "[object Array]"; + }, zf = function(e) { + if (!e || Kf.call(e) !== "[object Object]") return false; + var t = So.call(e, "constructor"), n = e.constructor && e.constructor.prototype && So.call(e.constructor.prototype, "isPrototypeOf"); + if (e.constructor && !t && !n) return false; + var o; + for (o in e) ; + return typeof o > "u" || So.call(e, o); + }, Jf = function(e, t) { + Hf && t.name === "__proto__" ? Hf(e, t.name, { enumerable: true, configurable: true, value: t.newValue, writable: true }) : e[t.name] = t.newValue; + }, Vf = function(e, t) { + if (t === "__proto__") if (So.call(e, t)) { + if (Gf) return Gf(e, t).value; + } else return; + return e[t]; + }; + Yf.exports = function r() { + var e, t, n, o, a, u, l = arguments[0], f = 1, h = arguments.length, d = false; + for (typeof l == "boolean" && (d = l, l = arguments[1] || {}, f = 2), (l == null || typeof l != "object" && typeof l != "function") && (l = {}); f < h; ++f) if (e = arguments[f], e != null) for (t in e) n = Vf(l, t), o = Vf(e, t), l !== o && (d && o && (zf(o) || (a = Wf(o))) ? (a ? (a = false, u = n && Wf(n) ? n : []) : u = n && zf(n) ? n : {}, Jf(l, { name: t, newValue: r(d, u, o) })) : typeof o < "u" && Jf(l, { name: t, newValue: o })); + return l; + }; +}); +var Xf = z((HA, y0) => { + y0.exports = { name: "gaxios", version: "7.1.1", description: "A simple common HTTP client specifically for Google APIs and services.", main: "build/cjs/src/index.js", types: "build/cjs/src/index.d.ts", files: ["build/"], exports: { ".": { import: { types: "./build/esm/src/index.d.ts", default: "./build/esm/src/index.js" }, require: { types: "./build/cjs/src/index.d.ts", default: "./build/cjs/src/index.js" } } }, scripts: { lint: "gts check --no-inline-config", test: "c8 mocha build/esm/test", "presystem-test": "npm run compile", "system-test": "mocha build/esm/system-test --timeout 80000", compile: "tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs", fix: "gts fix", prepare: "npm run compile", pretest: "npm run compile", webpack: "webpack", "prebrowser-test": "npm run compile", "browser-test": "node build/browser-test/browser-test-runner.js", docs: "jsdoc -c .jsdoc.js", "docs-test": "linkinator docs", "predocs-test": "npm run docs", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", prelint: "cd samples; npm link ../; npm install", clean: "gts clean" }, repository: "googleapis/gaxios", keywords: ["google"], engines: { node: ">=18" }, author: "Google, LLC", license: "Apache-2.0", devDependencies: { "@babel/plugin-proposal-private-methods": "^7.18.6", "@types/cors": "^2.8.6", "@types/express": "^5.0.0", "@types/extend": "^3.0.1", "@types/mocha": "^10.0.10", "@types/multiparty": "4.2.1", "@types/mv": "^2.1.0", "@types/ncp": "^2.0.1", "@types/node": "^22.0.0", "@types/sinon": "^17.0.0", "@types/tmp": "0.2.6", assert: "^2.0.0", browserify: "^17.0.0", c8: "^10.0.0", cors: "^2.8.5", express: "^5.0.0", gts: "^6.0.0", "is-docker": "^3.0.0", jsdoc: "^4.0.0", "jsdoc-fresh": "^4.0.0", "jsdoc-region-tag": "^3.0.0", karma: "^6.0.0", "karma-chrome-launcher": "^3.0.0", "karma-coverage": "^2.0.0", "karma-firefox-launcher": "^2.0.0", "karma-mocha": "^2.0.0", "karma-remap-coverage": "^0.1.5", "karma-sourcemap-loader": "^0.4.0", "karma-webpack": "^5.0.1", linkinator: "^6.1.2", mocha: "^11.1.0", multiparty: "^4.2.1", mv: "^2.1.1", ncp: "^2.0.0", nock: "^14.0.0-beta.13", "null-loader": "^4.0.0", "pack-n-play": "^3.0.0", puppeteer: "^24.0.0", sinon: "^20.0.0", "stream-browserify": "^3.0.0", tmp: "0.2.3", "ts-loader": "^9.5.2", typescript: "^5.8.3", webpack: "^5.35.0", "webpack-cli": "^6.0.1" }, dependencies: { extend: "^3.0.2", "https-proxy-agent": "^7.0.1", "node-fetch": "^3.3.2" } }; +}); +var Zf = z((GA, Qf) => { + "use strict"; + var _0 = Xf(); + Qf.exports = { pkg: _0 }; +}); +var Ja = z((Et) => { + "use strict"; + var td = Et && Et.__importDefault || function(r) { + return r && r.__esModule ? r : { default: r }; + }; + Object.defineProperty(Et, "__esModule", { value: true }); + Et.GaxiosError = Et.GAXIOS_ERROR_SYMBOL = void 0; + Et.defaultErrorRedactor = rd; + var ed = td(Ga()), C0 = td(Zf()), Wa = C0.default.pkg; + Et.GAXIOS_ERROR_SYMBOL = Symbol.for(`${Wa.name}-gaxios-error`); + var za = class r extends Error { + config; + response; + code; + status; + error; + [Et.GAXIOS_ERROR_SYMBOL] = Wa.version; + static [Symbol.hasInstance](e) { + return e && typeof e == "object" && Et.GAXIOS_ERROR_SYMBOL in e && e[Et.GAXIOS_ERROR_SYMBOL] === Wa.version ? true : Function.prototype[Symbol.hasInstance].call(r, e); + } + constructor(e, t, n, o) { + if (super(e, { cause: o }), this.config = t, this.response = n, this.error = o instanceof Error ? o : void 0, this.config = (0, ed.default)(true, {}, t), this.response && (this.response.config = (0, ed.default)(true, {}, this.response.config)), this.response) { + try { + this.response.data = b0(this.config.responseType, this.response?.bodyUsed ? this.response?.data : void 0); + } catch { + } + this.status = this.response.status; + } + o instanceof DOMException ? this.code = o.name : o && typeof o == "object" && "code" in o && (typeof o.code == "string" || typeof o.code == "number") && (this.code = o.code); + } + static extractAPIErrorFromResponse(e, t = "The request failed") { + let n = t; + if (typeof e.data == "string" && (n = e.data), e.data && typeof e.data == "object" && "error" in e.data && e.data.error && !e.ok) { + if (typeof e.data.error == "string") return { message: e.data.error, code: e.status, status: e.statusText }; + if (typeof e.data.error == "object") { + n = "message" in e.data.error && typeof e.data.error.message == "string" ? e.data.error.message : n; + let o = "status" in e.data.error && typeof e.data.error.status == "string" ? e.data.error.status : e.statusText, a = "code" in e.data.error && typeof e.data.error.code == "number" ? e.data.error.code : e.status; + if ("errors" in e.data.error && Array.isArray(e.data.error.errors)) { + let u = []; + for (let l of e.data.error.errors) typeof l == "object" && "message" in l && typeof l.message == "string" && u.push(l.message); + return Object.assign({ message: u.join(` +`) || n, code: a, status: o }, e.data.error); + } + return Object.assign({ message: n, code: a, status: o }, e.data.error); + } + } + return { message: n, code: e.status, status: e.statusText }; + } + }; + Et.GaxiosError = za; + function b0(r, e) { + switch (r) { + case "stream": + return e; + case "json": + return JSON.parse(JSON.stringify(e)); + case "arraybuffer": + return JSON.parse(Buffer.from(e).toString("utf8")); + case "blob": + return JSON.parse(e.text()); + default: + return e; + } + } + function rd(r) { + let e = "< - See `errorRedactor` option in `gaxios` for configuration>."; + function t(a) { + a && a.forEach((u, l) => { + (/^authentication$/i.test(l) || /^authorization$/i.test(l) || /secret/i.test(l)) && a.set(l, e); + }); + } + function n(a, u) { + if (typeof a == "object" && a !== null && typeof a[u] == "string") { + let l = a[u]; + (/grant_type=/i.test(l) || /assertion=/i.test(l) || /secret/i.test(l)) && (a[u] = e); + } + } + function o(a) { + !a || typeof a != "object" || (a instanceof FormData || a instanceof URLSearchParams || "forEach" in a && "set" in a ? a.forEach((u, l) => { + (["grant_type", "assertion"].includes(l) || /secret/.test(l)) && a.set(l, e); + }) : ("grant_type" in a && (a.grant_type = e), "assertion" in a && (a.assertion = e), "client_secret" in a && (a.client_secret = e))); + } + return r.config && (t(r.config.headers), n(r.config, "data"), o(r.config.data), n(r.config, "body"), o(r.config.body), r.config.url.searchParams.has("token") && r.config.url.searchParams.set("token", e), r.config.url.searchParams.has("client_secret") && r.config.url.searchParams.set("client_secret", e)), r.response && (rd({ config: r.response.config }), t(r.response.headers), r.response.bodyUsed && (n(r.response, "data"), o(r.response.data))), r; + } +}); +var sd = z((Va) => { + "use strict"; + Object.defineProperty(Va, "__esModule", { value: true }); + Va.getRetryConfig = E0; + async function E0(r) { + let e = nd(r); + if (!r || !r.config || !e && !r.config.retry) return { shouldRetry: false }; + e = e || {}, e.currentRetryAttempt = e.currentRetryAttempt || 0, e.retry = e.retry === void 0 || e.retry === null ? 3 : e.retry, e.httpMethodsToRetry = e.httpMethodsToRetry || ["GET", "HEAD", "PUT", "OPTIONS", "DELETE"], e.noResponseRetries = e.noResponseRetries === void 0 || e.noResponseRetries === null ? 2 : e.noResponseRetries, e.retryDelayMultiplier = e.retryDelayMultiplier ? e.retryDelayMultiplier : 2, e.timeOfFirstRequest = e.timeOfFirstRequest ? e.timeOfFirstRequest : Date.now(), e.totalTimeout = e.totalTimeout ? e.totalTimeout : Number.MAX_SAFE_INTEGER, e.maxRetryDelay = e.maxRetryDelay ? e.maxRetryDelay : Number.MAX_SAFE_INTEGER; + let t = [[100, 199], [408, 408], [429, 429], [500, 599]]; + if (e.statusCodesToRetry = e.statusCodesToRetry || t, r.config.retryConfig = e, !await (e.shouldRetry || w0)(r)) return { shouldRetry: false, config: r.config }; + let o = A0(e); + r.config.retryConfig.currentRetryAttempt += 1; + let a = e.retryBackoff ? e.retryBackoff(r, o) : new Promise((u) => { + setTimeout(u, o); + }); + return e.onRetryAttempt && await e.onRetryAttempt(r), await a, { shouldRetry: true, config: r.config }; + } + function w0(r) { + let e = nd(r); + if (r.config.signal?.aborted && r.code !== "TimeoutError" || r.code === "AbortError" || !e || e.retry === 0 || !r.response && (e.currentRetryAttempt || 0) >= e.noResponseRetries || !e.httpMethodsToRetry || !e.httpMethodsToRetry.includes(r.config.method?.toUpperCase() || "GET")) return false; + if (r.response && r.response.status) { + let t = false; + for (let [n, o] of e.statusCodesToRetry) { + let a = r.response.status; + if (a >= n && a <= o) { + t = true; + break; + } + } + if (!t) return false; + } + return e.currentRetryAttempt = e.currentRetryAttempt || 0, !(e.currentRetryAttempt >= e.retry); + } + function nd(r) { + if (r && r.config && r.config.retryConfig) return r.config.retryConfig; + } + function A0(r) { + let t = (r.currentRetryAttempt ? 0 : r.retryDelay ?? 100) + (Math.pow(r.retryDelayMultiplier, r.currentRetryAttempt) - 1) / 2 * 1e3, n = r.totalTimeout - (Date.now() - r.timeOfFirstRequest); + return Math.min(t, n, r.maxRetryDelay); + } +}); +var Ya = z((vo) => { + "use strict"; + Object.defineProperty(vo, "__esModule", { value: true }); + vo.GaxiosInterceptorManager = void 0; + var Ka = class extends Set { + }; + vo.GaxiosInterceptorManager = Ka; +}); +var id = z((VA, od) => { + var bn = 1e3, En = bn * 60, wn = En * 60, Kr = wn * 24, D0 = Kr * 7, S0 = Kr * 365.25; + od.exports = function(r, e) { + e = e || {}; + var t = typeof r; + if (t === "string" && r.length > 0) return v0(r); + if (t === "number" && isFinite(r)) return e.long ? R0(r) : T0(r); + throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(r)); + }; + function v0(r) { + if (r = String(r), !(r.length > 100)) { + var e = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r); + if (e) { + var t = parseFloat(e[1]), n = (e[2] || "ms").toLowerCase(); + switch (n) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return t * S0; + case "weeks": + case "week": + case "w": + return t * D0; + case "days": + case "day": + case "d": + return t * Kr; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return t * wn; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return t * En; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return t * bn; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return t; + default: + return; + } + } + } + } + function T0(r) { + var e = Math.abs(r); + return e >= Kr ? Math.round(r / Kr) + "d" : e >= wn ? Math.round(r / wn) + "h" : e >= En ? Math.round(r / En) + "m" : e >= bn ? Math.round(r / bn) + "s" : r + "ms"; + } + function R0(r) { + var e = Math.abs(r); + return e >= Kr ? To(r, e, Kr, "day") : e >= wn ? To(r, e, wn, "hour") : e >= En ? To(r, e, En, "minute") : e >= bn ? To(r, e, bn, "second") : r + " ms"; + } + function To(r, e, t, n) { + var o = e >= t * 1.5; + return Math.round(r / t) + " " + n + (o ? "s" : ""); + } +}); +var Xa = z((KA, ad) => { + function k0(r) { + t.debug = t, t.default = t, t.coerce = f, t.disable = u, t.enable = o, t.enabled = l, t.humanize = id(), t.destroy = h, Object.keys(r).forEach((d) => { + t[d] = r[d]; + }), t.names = [], t.skips = [], t.formatters = {}; + function e(d) { + let _ = 0; + for (let E = 0; E < d.length; E++) _ = (_ << 5) - _ + d.charCodeAt(E), _ |= 0; + return t.colors[Math.abs(_) % t.colors.length]; + } + t.selectColor = e; + function t(d) { + let _, E = null, P, v; + function w(...g) { + if (!w.enabled) return; + let C = w, R = Number(/* @__PURE__ */ new Date()), S = R - (_ || R); + C.diff = S, C.prev = _, C.curr = R, _ = R, g[0] = t.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O"); + let N = 0; + g[0] = g[0].replace(/%([a-zA-Z%])/g, (L, H) => { + if (L === "%%") return "%"; + N++; + let K = t.formatters[H]; + if (typeof K == "function") { + let W = g[N]; + L = K.call(C, W), g.splice(N, 1), N--; + } + return L; + }), t.formatArgs.call(C, g), (C.log || t.log).apply(C, g); + } + return w.namespace = d, w.useColors = t.useColors(), w.color = t.selectColor(d), w.extend = n, w.destroy = t.destroy, Object.defineProperty(w, "enabled", { enumerable: true, configurable: false, get: () => E !== null ? E : (P !== t.namespaces && (P = t.namespaces, v = t.enabled(d)), v), set: (g) => { + E = g; + } }), typeof t.init == "function" && t.init(w), w; + } + function n(d, _) { + let E = t(this.namespace + (typeof _ > "u" ? ":" : _) + d); + return E.log = this.log, E; + } + function o(d) { + t.save(d), t.namespaces = d, t.names = [], t.skips = []; + let _ = (typeof d == "string" ? d : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); + for (let E of _) E[0] === "-" ? t.skips.push(E.slice(1)) : t.names.push(E); + } + function a(d, _) { + let E = 0, P = 0, v = -1, w = 0; + for (; E < d.length; ) if (P < _.length && (_[P] === d[E] || _[P] === "*")) _[P] === "*" ? (v = P, w = E, P++) : (E++, P++); + else if (v !== -1) P = v + 1, w++, E = w; + else return false; + for (; P < _.length && _[P] === "*"; ) P++; + return P === _.length; + } + function u() { + let d = [...t.names, ...t.skips.map((_) => "-" + _)].join(","); + return t.enable(""), d; + } + function l(d) { + for (let _ of t.skips) if (a(d, _)) return false; + for (let _ of t.names) if (a(d, _)) return true; + return false; + } + function f(d) { + return d instanceof Error ? d.stack || d.message : d; + } + function h() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + return t.enable(t.load()), t; + } + ad.exports = k0; +}); +var ud = z((st, Ro) => { + st.formatArgs = O0; + st.save = P0; + st.load = x0; + st.useColors = F0; + st.storage = B0(); + st.destroy = /* @__PURE__ */ (() => { + let r = false; + return () => { + r || (r = true, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")); + }; + })(); + st.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"]; + function F0() { + if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return true; + if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false; + let r; + return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && (r = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(r[1], 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function O0(r) { + if (r[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + r[0] + (this.useColors ? "%c " : " ") + "+" + Ro.exports.humanize(this.diff), !this.useColors) return; + let e = "color: " + this.color; + r.splice(1, 0, e, "color: inherit"); + let t = 0, n = 0; + r[0].replace(/%[a-zA-Z%]/g, (o) => { + o !== "%%" && (t++, o === "%c" && (n = t)); + }), r.splice(n, 0, e); + } + st.log = console.debug || console.log || (() => { + }); + function P0(r) { + try { + r ? st.storage.setItem("debug", r) : st.storage.removeItem("debug"); + } catch { + } + } + function x0() { + let r; + try { + r = st.storage.getItem("debug") || st.storage.getItem("DEBUG"); + } catch { + } + return !r && typeof process < "u" && "env" in process && (r = process.env.DEBUG), r; + } + function B0() { + try { + return localStorage; + } catch { + } + } + Ro.exports = Xa()(st); + var { formatters: I0 } = Ro.exports; + I0.j = function(r) { + try { + return JSON.stringify(r); + } catch (e) { + return "[UnexpectedJSONParseError]: " + e.message; + } + }; +}); +var ld = z((YA, cd) => { + "use strict"; + cd.exports = (r, e) => { + e = e || process.argv; + let t = r.startsWith("-") ? "" : r.length === 1 ? "-" : "--", n = e.indexOf(t + r), o = e.indexOf("--"); + return n !== -1 && (o === -1 ? true : n < o); + }; +}); +var dd = z((XA, fd) => { + "use strict"; + var N0 = X("os"), xt = ld(), Ye = process.env, An; + xt("no-color") || xt("no-colors") || xt("color=false") ? An = false : (xt("color") || xt("colors") || xt("color=true") || xt("color=always")) && (An = true); + "FORCE_COLOR" in Ye && (An = Ye.FORCE_COLOR.length === 0 || parseInt(Ye.FORCE_COLOR, 10) !== 0); + function q0(r) { + return r === 0 ? false : { level: r, hasBasic: true, has256: r >= 2, has16m: r >= 3 }; + } + function j0(r) { + if (An === false) return 0; + if (xt("color=16m") || xt("color=full") || xt("color=truecolor")) return 3; + if (xt("color=256")) return 2; + if (r && !r.isTTY && An !== true) return 0; + let e = An ? 1 : 0; + if (process.platform === "win32") { + let t = N0.release().split("."); + return Number(process.versions.node.split(".")[0]) >= 8 && Number(t[0]) >= 10 && Number(t[2]) >= 10586 ? Number(t[2]) >= 14931 ? 3 : 2 : 1; + } + if ("CI" in Ye) return ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((t) => t in Ye) || Ye.CI_NAME === "codeship" ? 1 : e; + if ("TEAMCITY_VERSION" in Ye) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ye.TEAMCITY_VERSION) ? 1 : 0; + if (Ye.COLORTERM === "truecolor") return 3; + if ("TERM_PROGRAM" in Ye) { + let t = parseInt((Ye.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (Ye.TERM_PROGRAM) { + case "iTerm.app": + return t >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; + } + } + return /-256(color)?$/i.test(Ye.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ye.TERM) || "COLORTERM" in Ye ? 1 : (Ye.TERM === "dumb", e); + } + function Qa(r) { + let e = j0(r); + return q0(e); + } + fd.exports = { supportsColor: Qa, stdout: Qa(process.stdout), stderr: Qa(process.stderr) }; +}); +var pd = z((Ge, Fo) => { + var L0 = X("tty"), ko = X("util"); + Ge.init = z0; + Ge.log = H0; + Ge.formatArgs = M0; + Ge.save = G0; + Ge.load = W0; + Ge.useColors = U0; + Ge.destroy = ko.deprecate(() => { + }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + Ge.colors = [6, 2, 3, 4, 5, 1]; + try { + let r = dd(); + r && (r.stderr || r).level >= 2 && (Ge.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221]); + } catch { + } + Ge.inspectOpts = Object.keys(process.env).filter((r) => /^debug_/i.test(r)).reduce((r, e) => { + let t = e.substring(6).toLowerCase().replace(/_([a-z])/g, (o, a) => a.toUpperCase()), n = process.env[e]; + return /^(yes|on|true|enabled)$/i.test(n) ? n = true : /^(no|off|false|disabled)$/i.test(n) ? n = false : n === "null" ? n = null : n = Number(n), r[t] = n, r; + }, {}); + function U0() { + return "colors" in Ge.inspectOpts ? !!Ge.inspectOpts.colors : L0.isatty(process.stderr.fd); + } + function M0(r) { + let { namespace: e, useColors: t } = this; + if (t) { + let n = this.color, o = "\x1B[3" + (n < 8 ? n : "8;5;" + n), a = ` ${o};1m${e} \x1B[0m`; + r[0] = a + r[0].split(` +`).join(` +` + a), r.push(o + "m+" + Fo.exports.humanize(this.diff) + "\x1B[0m"); + } else r[0] = $0() + e + " " + r[0]; + } + function $0() { + return Ge.inspectOpts.hideDate ? "" : (/* @__PURE__ */ new Date()).toISOString() + " "; + } + function H0(...r) { + return process.stderr.write(ko.formatWithOptions(Ge.inspectOpts, ...r) + ` +`); + } + function G0(r) { + r ? process.env.DEBUG = r : delete process.env.DEBUG; + } + function W0() { + return process.env.DEBUG; + } + function z0(r) { + r.inspectOpts = {}; + let e = Object.keys(Ge.inspectOpts); + for (let t = 0; t < e.length; t++) r.inspectOpts[e[t]] = Ge.inspectOpts[e[t]]; + } + Fo.exports = Xa()(Ge); + var { formatters: hd } = Fo.exports; + hd.o = function(r) { + return this.inspectOpts.colors = this.useColors, ko.inspect(r, this.inspectOpts).split(` +`).map((e) => e.trim()).join(" "); + }; + hd.O = function(r) { + return this.inspectOpts.colors = this.useColors, ko.inspect(r, this.inspectOpts); + }; +}); +var eu = z((QA, Za) => { + typeof process > "u" || process.type === "renderer" || process.browser === true || process.__nwjs ? Za.exports = ud() : Za.exports = pd(); +}); +var yd = z((ot) => { + "use strict"; + var J0 = ot && ot.__createBinding || (Object.create ? function(r, e, t, n) { + n === void 0 && (n = t); + var o = Object.getOwnPropertyDescriptor(e, t); + (!o || ("get" in o ? !e.__esModule : o.writable || o.configurable)) && (o = { enumerable: true, get: function() { + return e[t]; + } }), Object.defineProperty(r, n, o); + } : function(r, e, t, n) { + n === void 0 && (n = t), r[n] = e[t]; + }), V0 = ot && ot.__setModuleDefault || (Object.create ? function(r, e) { + Object.defineProperty(r, "default", { enumerable: true, value: e }); + } : function(r, e) { + r.default = e; + }), md = ot && ot.__importStar || function(r) { + if (r && r.__esModule) return r; + var e = {}; + if (r != null) for (var t in r) t !== "default" && Object.prototype.hasOwnProperty.call(r, t) && J0(e, r, t); + return V0(e, r), e; + }; + Object.defineProperty(ot, "__esModule", { value: true }); + ot.req = ot.json = ot.toBuffer = void 0; + var K0 = md(X("http")), Y0 = md(X("https")); + async function gd(r) { + let e = 0, t = []; + for await (let n of r) e += n.length, t.push(n); + return Buffer.concat(t, e); + } + ot.toBuffer = gd; + async function X0(r) { + let t = (await gd(r)).toString("utf8"); + try { + return JSON.parse(t); + } catch (n) { + let o = n; + throw o.message += ` (input: ${t})`, o; + } + } + ot.json = X0; + function Q0(r, e = {}) { + let n = ((typeof r == "string" ? r : r.href).startsWith("https:") ? Y0 : K0).request(r, e), o = new Promise((a, u) => { + n.once("response", a).once("error", u).end(); + }); + return n.then = o.then.bind(o), n; + } + ot.req = Q0; +}); +var Ed = z((lt) => { + "use strict"; + var Cd = lt && lt.__createBinding || (Object.create ? function(r, e, t, n) { + n === void 0 && (n = t); + var o = Object.getOwnPropertyDescriptor(e, t); + (!o || ("get" in o ? !e.__esModule : o.writable || o.configurable)) && (o = { enumerable: true, get: function() { + return e[t]; + } }), Object.defineProperty(r, n, o); + } : function(r, e, t, n) { + n === void 0 && (n = t), r[n] = e[t]; + }), Z0 = lt && lt.__setModuleDefault || (Object.create ? function(r, e) { + Object.defineProperty(r, "default", { enumerable: true, value: e }); + } : function(r, e) { + r.default = e; + }), bd = lt && lt.__importStar || function(r) { + if (r && r.__esModule) return r; + var e = {}; + if (r != null) for (var t in r) t !== "default" && Object.prototype.hasOwnProperty.call(r, t) && Cd(e, r, t); + return Z0(e, r), e; + }, e_ = lt && lt.__exportStar || function(r, e) { + for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && Cd(e, r, t); + }; + Object.defineProperty(lt, "__esModule", { value: true }); + lt.Agent = void 0; + var t_ = bd(X("net")), _d = bd(X("http")), r_ = X("https"); + e_(yd(), lt); + var Gt = Symbol("AgentBaseInternalState"), tu = class extends _d.Agent { + constructor(e) { + super(e), this[Gt] = {}; + } + isSecureEndpoint(e) { + if (e) { + if (typeof e.secureEndpoint == "boolean") return e.secureEndpoint; + if (typeof e.protocol == "string") return e.protocol === "https:"; + } + let { stack: t } = new Error(); + return typeof t != "string" ? false : t.split(` +`).some((n) => n.indexOf("(https.js:") !== -1 || n.indexOf("node:https:") !== -1); + } + incrementSockets(e) { + if (this.maxSockets === 1 / 0 && this.maxTotalSockets === 1 / 0) return null; + this.sockets[e] || (this.sockets[e] = []); + let t = new t_.Socket({ writable: false }); + return this.sockets[e].push(t), this.totalSocketCount++, t; + } + decrementSockets(e, t) { + if (!this.sockets[e] || t === null) return; + let n = this.sockets[e], o = n.indexOf(t); + o !== -1 && (n.splice(o, 1), this.totalSocketCount--, n.length === 0 && delete this.sockets[e]); + } + getName(e) { + return this.isSecureEndpoint(e) ? r_.Agent.prototype.getName.call(this, e) : super.getName(e); + } + createSocket(e, t, n) { + let o = { ...t, secureEndpoint: this.isSecureEndpoint(t) }, a = this.getName(o), u = this.incrementSockets(a); + Promise.resolve().then(() => this.connect(e, o)).then((l) => { + if (this.decrementSockets(a, u), l instanceof _d.Agent) try { + return l.addRequest(e, o); + } catch (f) { + return n(f); + } + this[Gt].currentSocket = l, super.createSocket(e, t, n); + }, (l) => { + this.decrementSockets(a, u), n(l); + }); + } + createConnection() { + let e = this[Gt].currentSocket; + if (this[Gt].currentSocket = void 0, !e) throw new Error("No socket was returned in the `connect()` function"); + return e; + } + get defaultPort() { + return this[Gt].defaultPort ?? (this.protocol === "https:" ? 443 : 80); + } + set defaultPort(e) { + this[Gt] && (this[Gt].defaultPort = e); + } + get protocol() { + return this[Gt].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:"); + } + set protocol(e) { + this[Gt] && (this[Gt].protocol = e); + } + }; + lt.Agent = tu; +}); +var wd = z((Dn) => { + "use strict"; + var n_ = Dn && Dn.__importDefault || function(r) { + return r && r.__esModule ? r : { default: r }; + }; + Object.defineProperty(Dn, "__esModule", { value: true }); + Dn.parseProxyResponse = void 0; + var s_ = n_(eu()), Oo = (0, s_.default)("https-proxy-agent:parse-proxy-response"); + function o_(r) { + return new Promise((e, t) => { + let n = 0, o = []; + function a() { + let d = r.read(); + d ? h(d) : r.once("readable", a); + } + function u() { + r.removeListener("end", l), r.removeListener("error", f), r.removeListener("readable", a); + } + function l() { + u(), Oo("onend"), t(new Error("Proxy connection ended before receiving CONNECT response")); + } + function f(d) { + u(), Oo("onerror %o", d), t(d); + } + function h(d) { + o.push(d), n += d.length; + let _ = Buffer.concat(o, n), E = _.indexOf(`\r +\r +`); + if (E === -1) { + Oo("have not received end of HTTP headers yet..."), a(); + return; + } + let P = _.slice(0, E).toString("ascii").split(`\r +`), v = P.shift(); + if (!v) return r.destroy(), t(new Error("No header received from proxy CONNECT response")); + let w = v.split(" "), g = +w[1], C = w.slice(2).join(" "), R = {}; + for (let S of P) { + if (!S) continue; + let N = S.indexOf(":"); + if (N === -1) return r.destroy(), t(new Error(`Invalid header from proxy CONNECT response: "${S}"`)); + let j = S.slice(0, N).toLowerCase(), L = S.slice(N + 1).trimStart(), H = R[j]; + typeof H == "string" ? R[j] = [H, L] : Array.isArray(H) ? H.push(L) : R[j] = L; + } + Oo("got proxy server response: %o %o", v, R), u(), e({ connect: { statusCode: g, statusText: C, headers: R }, buffered: _ }); + } + r.on("error", f), r.on("end", l), a(); + }); + } + Dn.parseProxyResponse = o_; +}); +var Rd = z((wt) => { + "use strict"; + var i_ = wt && wt.__createBinding || (Object.create ? function(r, e, t, n) { + n === void 0 && (n = t); + var o = Object.getOwnPropertyDescriptor(e, t); + (!o || ("get" in o ? !e.__esModule : o.writable || o.configurable)) && (o = { enumerable: true, get: function() { + return e[t]; + } }), Object.defineProperty(r, n, o); + } : function(r, e, t, n) { + n === void 0 && (n = t), r[n] = e[t]; + }), a_ = wt && wt.__setModuleDefault || (Object.create ? function(r, e) { + Object.defineProperty(r, "default", { enumerable: true, value: e }); + } : function(r, e) { + r.default = e; + }), vd = wt && wt.__importStar || function(r) { + if (r && r.__esModule) return r; + var e = {}; + if (r != null) for (var t in r) t !== "default" && Object.prototype.hasOwnProperty.call(r, t) && i_(e, r, t); + return a_(e, r), e; + }, Td = wt && wt.__importDefault || function(r) { + return r && r.__esModule ? r : { default: r }; + }; + Object.defineProperty(wt, "__esModule", { value: true }); + wt.HttpsProxyAgent = void 0; + var Po = vd(X("net")), Ad = vd(X("tls")), u_ = Td(X("assert")), c_ = Td(eu()), l_ = Ed(), f_ = X("url"), d_ = wd(), as = (0, c_.default)("https-proxy-agent"), Dd = (r) => r.servername === void 0 && r.host && !Po.isIP(r.host) ? { ...r, servername: r.host } : r, xo = class extends l_.Agent { + constructor(e, t) { + super(t), this.options = { path: void 0 }, this.proxy = typeof e == "string" ? new f_.URL(e) : e, this.proxyHeaders = t?.headers ?? {}, as("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + let n = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""), o = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; + this.connectOpts = { ALPNProtocols: ["http/1.1"], ...t ? Sd(t, "headers") : null, host: n, port: o }; + } + async connect(e, t) { + let { proxy: n } = this; + if (!t.host) throw new TypeError('No "host" provided'); + let o; + n.protocol === "https:" ? (as("Creating `tls.Socket`: %o", this.connectOpts), o = Ad.connect(Dd(this.connectOpts))) : (as("Creating `net.Socket`: %o", this.connectOpts), o = Po.connect(this.connectOpts)); + let a = typeof this.proxyHeaders == "function" ? this.proxyHeaders() : { ...this.proxyHeaders }, u = Po.isIPv6(t.host) ? `[${t.host}]` : t.host, l = `CONNECT ${u}:${t.port} HTTP/1.1\r +`; + if (n.username || n.password) { + let E = `${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`; + a["Proxy-Authorization"] = `Basic ${Buffer.from(E).toString("base64")}`; + } + a.Host = `${u}:${t.port}`, a["Proxy-Connection"] || (a["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"); + for (let E of Object.keys(a)) l += `${E}: ${a[E]}\r +`; + let f = (0, d_.parseProxyResponse)(o); + o.write(`${l}\r +`); + let { connect: h, buffered: d } = await f; + if (e.emit("proxyConnect", h), this.emit("proxyConnect", h, e), h.statusCode === 200) return e.once("socket", h_), t.secureEndpoint ? (as("Upgrading socket connection to TLS"), Ad.connect({ ...Sd(Dd(t), "host", "path", "port"), socket: o })) : o; + o.destroy(); + let _ = new Po.Socket({ writable: false }); + return _.readable = true, e.once("socket", (E) => { + as("Replaying proxy buffer for failed request"), (0, u_.default)(E.listenerCount("data") > 0), E.push(d), E.push(null); + }), _; + } + }; + xo.protocols = ["http", "https"]; + wt.HttpsProxyAgent = xo; + function h_(r) { + r.resume(); + } + function Sd(r, ...e) { + let t = {}, n; + for (n in r) e.includes(n) || (t[n] = r[n]); + return t; + } +}); +function p_(r) { + if (!/^data:/i.test(r)) throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")'); + r = r.replace(/\r?\n/g, ""); + let e = r.indexOf(","); + if (e === -1 || e <= 4) throw new TypeError("malformed data: URI"); + let t = r.substring(5, e).split(";"), n = "", o = false, a = t[0] || "text/plain", u = a; + for (let d = 1; d < t.length; d++) t[d] === "base64" ? o = true : t[d] && (u += `;${t[d]}`, t[d].indexOf("charset=") === 0 && (n = t[d].substring(8))); + !t[0] && !n.length && (u += ";charset=US-ASCII", n = "US-ASCII"); + let l = o ? "base64" : "ascii", f = unescape(r.substring(e + 1)), h = Buffer.from(f, l); + return h.type = a, h.typeFull = u, h.charset = n, h; +} +var kd; +var Fd = Me(() => { + kd = p_; +}); +var Pd = z((Bo, Od) => { + (function(r, e) { + typeof Bo == "object" && typeof Od < "u" ? e(Bo) : typeof define == "function" && define.amd ? define(["exports"], e) : (r = typeof globalThis < "u" ? globalThis : r || self, e(r.WebStreamsPolyfill = {})); + })(Bo, function(r) { + "use strict"; + function e() { + } + function t(s) { + return typeof s == "object" && s !== null || typeof s == "function"; + } + let n = e; + function o(s, i) { + try { + Object.defineProperty(s, "name", { value: i, configurable: true }); + } catch { + } + } + let a = Promise, u = Promise.prototype.then, l = Promise.reject.bind(a); + function f(s) { + return new a(s); + } + function h(s) { + return f((i) => i(s)); + } + function d(s) { + return l(s); + } + function _(s, i, c) { + return u.call(s, i, c); + } + function E(s, i, c) { + _(_(s, i, c), void 0, n); + } + function P(s, i) { + E(s, i); + } + function v(s, i) { + E(s, void 0, i); + } + function w(s, i, c) { + return _(s, i, c); + } + function g(s) { + _(s, void 0, n); + } + let C = (s) => { + if (typeof queueMicrotask == "function") C = queueMicrotask; + else { + let i = h(void 0); + C = (c) => _(i, c); + } + return C(s); + }; + function R(s, i, c) { + if (typeof s != "function") throw new TypeError("Argument is not a function"); + return Function.prototype.apply.call(s, i, c); + } + function S(s, i, c) { + try { + return h(R(s, i, c)); + } catch (m) { + return d(m); + } + } + let N = 16384; + class j { + constructor() { + this._cursor = 0, this._size = 0, this._front = { _elements: [], _next: void 0 }, this._back = this._front, this._cursor = 0, this._size = 0; + } + get length() { + return this._size; + } + push(i) { + let c = this._back, m = c; + c._elements.length === N - 1 && (m = { _elements: [], _next: void 0 }), c._elements.push(i), m !== c && (this._back = m, c._next = m), ++this._size; + } + shift() { + let i = this._front, c = i, m = this._cursor, A = m + 1, I = i._elements, U = I[m]; + return A === N && (c = i._next, A = 0), --this._size, this._cursor = A, i !== c && (this._front = c), I[m] = void 0, U; + } + forEach(i) { + let c = this._cursor, m = this._front, A = m._elements; + for (; (c !== A.length || m._next !== void 0) && !(c === A.length && (m = m._next, A = m._elements, c = 0, A.length === 0)); ) i(A[c]), ++c; + } + peek() { + let i = this._front, c = this._cursor; + return i._elements[c]; + } + } + let L = Symbol("[[AbortSteps]]"), H = Symbol("[[ErrorSteps]]"), K = Symbol("[[CancelSteps]]"), W = Symbol("[[PullSteps]]"), Ae = Symbol("[[ReleaseSteps]]"); + function he(s, i) { + s._ownerReadableStream = i, i._reader = s, i._state === "readable" ? de(s) : i._state === "closed" ? ue(s) : Z(s, i._storedError); + } + function fe(s, i) { + let c = s._ownerReadableStream; + return Ft(c, i); + } + function ye(s) { + let i = s._ownerReadableStream; + i._state === "readable" ? J(s, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")) : se(s, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")), i._readableStreamController[Ae](), i._reader = void 0, s._ownerReadableStream = void 0; + } + function re(s) { + return new TypeError("Cannot " + s + " a stream using a released reader"); + } + function de(s) { + s._closedPromise = f((i, c) => { + s._closedPromise_resolve = i, s._closedPromise_reject = c; + }); + } + function Z(s, i) { + de(s), J(s, i); + } + function ue(s) { + de(s), oe(s); + } + function J(s, i) { + s._closedPromise_reject !== void 0 && (g(s._closedPromise), s._closedPromise_reject(i), s._closedPromise_resolve = void 0, s._closedPromise_reject = void 0); + } + function se(s, i) { + Z(s, i); + } + function oe(s) { + s._closedPromise_resolve !== void 0 && (s._closedPromise_resolve(void 0), s._closedPromise_resolve = void 0, s._closedPromise_reject = void 0); + } + let Ie = Number.isFinite || function(s) { + return typeof s == "number" && isFinite(s); + }, je = Math.trunc || function(s) { + return s < 0 ? Math.ceil(s) : Math.floor(s); + }; + function G(s) { + return typeof s == "object" || typeof s == "function"; + } + function pe(s, i) { + if (s !== void 0 && !G(s)) throw new TypeError(`${i} is not an object.`); + } + function Ee(s, i) { + if (typeof s != "function") throw new TypeError(`${i} is not a function.`); + } + function er(s) { + return typeof s == "object" && s !== null || typeof s == "function"; + } + function xe(s, i) { + if (!er(s)) throw new TypeError(`${i} is not an object.`); + } + function Ne(s, i, c) { + if (s === void 0) throw new TypeError(`Parameter ${i} is required in '${c}'.`); + } + function p(s, i, c) { + if (s === void 0) throw new TypeError(`${i} is required in '${c}'.`); + } + function y(s) { + return Number(s); + } + function b(s) { + return s === 0 ? 0 : s; + } + function x(s) { + return b(je(s)); + } + function T(s, i) { + let m = Number.MAX_SAFE_INTEGER, A = Number(s); + if (A = b(A), !Ie(A)) throw new TypeError(`${i} is not a finite number`); + if (A = x(A), A < 0 || A > m) throw new TypeError(`${i} is outside the accepted range of 0 to ${m}, inclusive`); + return !Ie(A) || A === 0 ? 0 : A; + } + function F(s, i) { + if (!wr(s)) throw new TypeError(`${i} is not a ReadableStream.`); + } + function q(s) { + return new M(s); + } + function D(s, i) { + s._reader._readRequests.push(i); + } + function k(s, i, c) { + let A = s._reader._readRequests.shift(); + c ? A._closeSteps() : A._chunkSteps(i); + } + function B(s) { + return s._reader._readRequests.length; + } + function O(s) { + let i = s._reader; + return !(i === void 0 || !Y(i)); + } + class M { + constructor(i) { + if (Ne(i, 1, "ReadableStreamDefaultReader"), F(i, "First parameter"), Ar(i)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); + he(this, i), this._readRequests = new j(); + } + get closed() { + return Y(this) ? this._closedPromise : d(Be("closed")); + } + cancel(i = void 0) { + return Y(this) ? this._ownerReadableStream === void 0 ? d(re("cancel")) : fe(this, i) : d(Be("cancel")); + } + read() { + if (!Y(this)) return d(Be("read")); + if (this._ownerReadableStream === void 0) return d(re("read from")); + let i, c, m = f((I, U) => { + i = I, c = U; + }); + return Q(this, { _chunkSteps: (I) => i({ value: I, done: false }), _closeSteps: () => i({ value: void 0, done: true }), _errorSteps: (I) => c(I) }), m; + } + releaseLock() { + if (!Y(this)) throw Be("releaseLock"); + this._ownerReadableStream !== void 0 && we(this); + } + } + Object.defineProperties(M.prototype, { cancel: { enumerable: true }, read: { enumerable: true }, releaseLock: { enumerable: true }, closed: { enumerable: true } }), o(M.prototype.cancel, "cancel"), o(M.prototype.read, "read"), o(M.prototype.releaseLock, "releaseLock"), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(M.prototype, Symbol.toStringTag, { value: "ReadableStreamDefaultReader", configurable: true }); + function Y(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_readRequests") ? false : s instanceof M; + } + function Q(s, i) { + let c = s._ownerReadableStream; + c._disturbed = true, c._state === "closed" ? i._closeSteps() : c._state === "errored" ? i._errorSteps(c._storedError) : c._readableStreamController[W](i); + } + function we(s) { + ye(s); + let i = new TypeError("Reader was released"); + Fe(s, i); + } + function Fe(s, i) { + let c = s._readRequests; + s._readRequests = new j(), c.forEach((m) => { + m._errorSteps(i); + }); + } + function Be(s) { + return new TypeError(`ReadableStreamDefaultReader.prototype.${s} can only be used on a ReadableStreamDefaultReader`); + } + let be = Object.getPrototypeOf(Object.getPrototypeOf(async function* () { + }).prototype); + class De { + constructor(i, c) { + this._ongoingPromise = void 0, this._isFinished = false, this._reader = i, this._preventCancel = c; + } + next() { + let i = () => this._nextSteps(); + return this._ongoingPromise = this._ongoingPromise ? w(this._ongoingPromise, i, i) : i(), this._ongoingPromise; + } + return(i) { + let c = () => this._returnSteps(i); + return this._ongoingPromise ? w(this._ongoingPromise, c, c) : c(); + } + _nextSteps() { + if (this._isFinished) return Promise.resolve({ value: void 0, done: true }); + let i = this._reader, c, m, A = f((U, V) => { + c = U, m = V; + }); + return Q(i, { _chunkSteps: (U) => { + this._ongoingPromise = void 0, C(() => c({ value: U, done: false })); + }, _closeSteps: () => { + this._ongoingPromise = void 0, this._isFinished = true, ye(i), c({ value: void 0, done: true }); + }, _errorSteps: (U) => { + this._ongoingPromise = void 0, this._isFinished = true, ye(i), m(U); + } }), A; + } + _returnSteps(i) { + if (this._isFinished) return Promise.resolve({ value: i, done: true }); + this._isFinished = true; + let c = this._reader; + if (!this._preventCancel) { + let m = fe(c, i); + return ye(c), w(m, () => ({ value: i, done: true })); + } + return ye(c), h({ value: i, done: true }); + } + } + let Le = { next() { + return on(this) ? this._asyncIteratorImpl.next() : d(an("next")); + }, return(s) { + return on(this) ? this._asyncIteratorImpl.return(s) : d(an("return")); + } }; + Object.setPrototypeOf(Le, be); + function sn(s, i) { + let c = q(s), m = new De(c, i), A = Object.create(Le); + return A._asyncIteratorImpl = m, A; + } + function on(s) { + if (!t(s) || !Object.prototype.hasOwnProperty.call(s, "_asyncIteratorImpl")) return false; + try { + return s._asyncIteratorImpl instanceof De; + } catch { + return false; + } + } + function an(s) { + return new TypeError(`ReadableStreamAsyncIterator.${s} can only be used on a ReadableSteamAsyncIterator`); + } + let ut = Number.isNaN || function(s) { + return s !== s; + }; + var tr, Ve, Ue; + function Se(s) { + return s.slice(); + } + function bl(s, i, c, m, A) { + new Uint8Array(s).set(new Uint8Array(c, m, A), i); + } + let rr = (s) => (typeof s.transfer == "function" ? rr = (i) => i.transfer() : typeof structuredClone == "function" ? rr = (i) => structuredClone(i, { transfer: [i] }) : rr = (i) => i, rr(s)), _r = (s) => (typeof s.detached == "boolean" ? _r = (i) => i.detached : _r = (i) => i.byteLength === 0, _r(s)); + function El(s, i, c) { + if (s.slice) return s.slice(i, c); + let m = c - i, A = new ArrayBuffer(m); + return bl(A, 0, s, i, m), A; + } + function qs(s, i) { + let c = s[i]; + if (c != null) { + if (typeof c != "function") throw new TypeError(`${String(i)} is not a function`); + return c; + } + } + function ig(s) { + let i = { [Symbol.iterator]: () => s.iterator }, c = (async function* () { + return yield* i; + })(), m = c.next; + return { iterator: c, nextMethod: m, done: false }; + } + let oa = (Ue = (tr = Symbol.asyncIterator) !== null && tr !== void 0 ? tr : (Ve = Symbol.for) === null || Ve === void 0 ? void 0 : Ve.call(Symbol, "Symbol.asyncIterator")) !== null && Ue !== void 0 ? Ue : "@@asyncIterator"; + function wl(s, i = "sync", c) { + if (c === void 0) if (i === "async") { + if (c = qs(s, oa), c === void 0) { + let I = qs(s, Symbol.iterator), U = wl(s, "sync", I); + return ig(U); + } + } else c = qs(s, Symbol.iterator); + if (c === void 0) throw new TypeError("The object is not iterable"); + let m = R(c, s, []); + if (!t(m)) throw new TypeError("The iterator method must return an object"); + let A = m.next; + return { iterator: m, nextMethod: A, done: false }; + } + function ag(s) { + let i = R(s.nextMethod, s.iterator, []); + if (!t(i)) throw new TypeError("The iterator.next() method must return an object"); + return i; + } + function ug(s) { + return !!s.done; + } + function cg(s) { + return s.value; + } + function lg(s) { + return !(typeof s != "number" || ut(s) || s < 0); + } + function Al(s) { + let i = El(s.buffer, s.byteOffset, s.byteOffset + s.byteLength); + return new Uint8Array(i); + } + function ia(s) { + let i = s._queue.shift(); + return s._queueTotalSize -= i.size, s._queueTotalSize < 0 && (s._queueTotalSize = 0), i.value; + } + function aa(s, i, c) { + if (!lg(c) || c === 1 / 0) throw new RangeError("Size must be a finite, non-NaN, non-negative number."); + s._queue.push({ value: i, size: c }), s._queueTotalSize += c; + } + function fg(s) { + return s._queue.peek().value; + } + function Cr(s) { + s._queue = new j(), s._queueTotalSize = 0; + } + function Dl(s) { + return s === DataView; + } + function dg(s) { + return Dl(s.constructor); + } + function hg(s) { + return Dl(s) ? 1 : s.BYTES_PER_ELEMENT; + } + class jr { + constructor() { + throw new TypeError("Illegal constructor"); + } + get view() { + if (!ua(this)) throw ha("view"); + return this._view; + } + respond(i) { + if (!ua(this)) throw ha("respond"); + if (Ne(i, 1, "respond"), i = T(i, "First parameter"), this._associatedReadableByteStreamController === void 0) throw new TypeError("This BYOB request has been invalidated"); + if (_r(this._view.buffer)) throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response"); + Ms(this._associatedReadableByteStreamController, i); + } + respondWithNewView(i) { + if (!ua(this)) throw ha("respondWithNewView"); + if (Ne(i, 1, "respondWithNewView"), !ArrayBuffer.isView(i)) throw new TypeError("You can only respond with array buffer views"); + if (this._associatedReadableByteStreamController === void 0) throw new TypeError("This BYOB request has been invalidated"); + if (_r(i.buffer)) throw new TypeError("The given view's buffer has been detached and so cannot be used as a response"); + $s(this._associatedReadableByteStreamController, i); + } + } + Object.defineProperties(jr.prototype, { respond: { enumerable: true }, respondWithNewView: { enumerable: true }, view: { enumerable: true } }), o(jr.prototype.respond, "respond"), o(jr.prototype.respondWithNewView, "respondWithNewView"), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(jr.prototype, Symbol.toStringTag, { value: "ReadableStreamBYOBRequest", configurable: true }); + class nr { + constructor() { + throw new TypeError("Illegal constructor"); + } + get byobRequest() { + if (!Lr(this)) throw Xn("byobRequest"); + return da(this); + } + get desiredSize() { + if (!Lr(this)) throw Xn("desiredSize"); + return Bl(this); + } + close() { + if (!Lr(this)) throw Xn("close"); + if (this._closeRequested) throw new TypeError("The stream has already been closed; do not close it again!"); + let i = this._controlledReadableByteStream._state; + if (i !== "readable") throw new TypeError(`The stream (in ${i} state) is not in the readable state and cannot be closed`); + Yn(this); + } + enqueue(i) { + if (!Lr(this)) throw Xn("enqueue"); + if (Ne(i, 1, "enqueue"), !ArrayBuffer.isView(i)) throw new TypeError("chunk must be an array buffer view"); + if (i.byteLength === 0) throw new TypeError("chunk must have non-zero byteLength"); + if (i.buffer.byteLength === 0) throw new TypeError("chunk's buffer must have non-zero byteLength"); + if (this._closeRequested) throw new TypeError("stream is closed or draining"); + let c = this._controlledReadableByteStream._state; + if (c !== "readable") throw new TypeError(`The stream (in ${c} state) is not in the readable state and cannot be enqueued to`); + Us(this, i); + } + error(i = void 0) { + if (!Lr(this)) throw Xn("error"); + Ct(this, i); + } + [K](i) { + Sl(this), Cr(this); + let c = this._cancelAlgorithm(i); + return Ls(this), c; + } + [W](i) { + let c = this._controlledReadableByteStream; + if (this._queueTotalSize > 0) { + xl(this, i); + return; + } + let m = this._autoAllocateChunkSize; + if (m !== void 0) { + let A; + try { + A = new ArrayBuffer(m); + } catch (U) { + i._errorSteps(U); + return; + } + let I = { buffer: A, bufferByteLength: m, byteOffset: 0, byteLength: m, bytesFilled: 0, minimumFill: 1, elementSize: 1, viewConstructor: Uint8Array, readerType: "default" }; + this._pendingPullIntos.push(I); + } + D(c, i), Ur(this); + } + [Ae]() { + if (this._pendingPullIntos.length > 0) { + let i = this._pendingPullIntos.peek(); + i.readerType = "none", this._pendingPullIntos = new j(), this._pendingPullIntos.push(i); + } + } + } + Object.defineProperties(nr.prototype, { close: { enumerable: true }, enqueue: { enumerable: true }, error: { enumerable: true }, byobRequest: { enumerable: true }, desiredSize: { enumerable: true } }), o(nr.prototype.close, "close"), o(nr.prototype.enqueue, "enqueue"), o(nr.prototype.error, "error"), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(nr.prototype, Symbol.toStringTag, { value: "ReadableByteStreamController", configurable: true }); + function Lr(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_controlledReadableByteStream") ? false : s instanceof nr; + } + function ua(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_associatedReadableByteStreamController") ? false : s instanceof jr; + } + function Ur(s) { + if (!_g(s)) return; + if (s._pulling) { + s._pullAgain = true; + return; + } + s._pulling = true; + let c = s._pullAlgorithm(); + E(c, () => (s._pulling = false, s._pullAgain && (s._pullAgain = false, Ur(s)), null), (m) => (Ct(s, m), null)); + } + function Sl(s) { + la(s), s._pendingPullIntos = new j(); + } + function ca(s, i) { + let c = false; + s._state === "closed" && (c = true); + let m = vl(i); + i.readerType === "default" ? k(s, m, c) : Dg(s, m, c); + } + function vl(s) { + let i = s.bytesFilled, c = s.elementSize; + return new s.viewConstructor(s.buffer, s.byteOffset, i / c); + } + function js(s, i, c, m) { + s._queue.push({ buffer: i, byteOffset: c, byteLength: m }), s._queueTotalSize += m; + } + function Tl(s, i, c, m) { + let A; + try { + A = El(i, c, c + m); + } catch (I) { + throw Ct(s, I), I; + } + js(s, A, 0, m); + } + function Rl(s, i) { + i.bytesFilled > 0 && Tl(s, i.buffer, i.byteOffset, i.bytesFilled), un(s); + } + function kl(s, i) { + let c = Math.min(s._queueTotalSize, i.byteLength - i.bytesFilled), m = i.bytesFilled + c, A = c, I = false, U = m % i.elementSize, V = m - U; + V >= i.minimumFill && (A = V - i.bytesFilled, I = true); + let ae = s._queue; + for (; A > 0; ) { + let te = ae.peek(), ce = Math.min(A, te.byteLength), ge = i.byteOffset + i.bytesFilled; + bl(i.buffer, ge, te.buffer, te.byteOffset, ce), te.byteLength === ce ? ae.shift() : (te.byteOffset += ce, te.byteLength -= ce), s._queueTotalSize -= ce, Fl(s, ce, i), A -= ce; + } + return I; + } + function Fl(s, i, c) { + c.bytesFilled += i; + } + function Ol(s) { + s._queueTotalSize === 0 && s._closeRequested ? (Ls(s), ns(s._controlledReadableByteStream)) : Ur(s); + } + function la(s) { + s._byobRequest !== null && (s._byobRequest._associatedReadableByteStreamController = void 0, s._byobRequest._view = null, s._byobRequest = null); + } + function fa(s) { + for (; s._pendingPullIntos.length > 0; ) { + if (s._queueTotalSize === 0) return; + let i = s._pendingPullIntos.peek(); + kl(s, i) && (un(s), ca(s._controlledReadableByteStream, i)); + } + } + function pg(s) { + let i = s._controlledReadableByteStream._reader; + for (; i._readRequests.length > 0; ) { + if (s._queueTotalSize === 0) return; + let c = i._readRequests.shift(); + xl(s, c); + } + } + function mg(s, i, c, m) { + let A = s._controlledReadableByteStream, I = i.constructor, U = hg(I), { byteOffset: V, byteLength: ae } = i, te = c * U, ce; + try { + ce = rr(i.buffer); + } catch (Te) { + m._errorSteps(Te); + return; + } + let ge = { buffer: ce, bufferByteLength: ce.byteLength, byteOffset: V, byteLength: ae, bytesFilled: 0, minimumFill: te, elementSize: U, viewConstructor: I, readerType: "byob" }; + if (s._pendingPullIntos.length > 0) { + s._pendingPullIntos.push(ge), ql(A, m); + return; + } + if (A._state === "closed") { + let Te = new I(ge.buffer, ge.byteOffset, 0); + m._closeSteps(Te); + return; + } + if (s._queueTotalSize > 0) { + if (kl(s, ge)) { + let Te = vl(ge); + Ol(s), m._chunkSteps(Te); + return; + } + if (s._closeRequested) { + let Te = new TypeError("Insufficient bytes to fill elements in the given buffer"); + Ct(s, Te), m._errorSteps(Te); + return; + } + } + s._pendingPullIntos.push(ge), ql(A, m), Ur(s); + } + function gg(s, i) { + i.readerType === "none" && un(s); + let c = s._controlledReadableByteStream; + if (pa(c)) for (; jl(c) > 0; ) { + let m = un(s); + ca(c, m); + } + } + function yg(s, i, c) { + if (Fl(s, i, c), c.readerType === "none") { + Rl(s, c), fa(s); + return; + } + if (c.bytesFilled < c.minimumFill) return; + un(s); + let m = c.bytesFilled % c.elementSize; + if (m > 0) { + let A = c.byteOffset + c.bytesFilled; + Tl(s, c.buffer, A - m, m); + } + c.bytesFilled -= m, ca(s._controlledReadableByteStream, c), fa(s); + } + function Pl(s, i) { + let c = s._pendingPullIntos.peek(); + la(s), s._controlledReadableByteStream._state === "closed" ? gg(s, c) : yg(s, i, c), Ur(s); + } + function un(s) { + return s._pendingPullIntos.shift(); + } + function _g(s) { + let i = s._controlledReadableByteStream; + return i._state !== "readable" || s._closeRequested || !s._started ? false : !!(O(i) && B(i) > 0 || pa(i) && jl(i) > 0 || Bl(s) > 0); + } + function Ls(s) { + s._pullAlgorithm = void 0, s._cancelAlgorithm = void 0; + } + function Yn(s) { + let i = s._controlledReadableByteStream; + if (!(s._closeRequested || i._state !== "readable")) { + if (s._queueTotalSize > 0) { + s._closeRequested = true; + return; + } + if (s._pendingPullIntos.length > 0) { + let c = s._pendingPullIntos.peek(); + if (c.bytesFilled % c.elementSize !== 0) { + let m = new TypeError("Insufficient bytes to fill elements in the given buffer"); + throw Ct(s, m), m; + } + } + Ls(s), ns(i); + } + } + function Us(s, i) { + let c = s._controlledReadableByteStream; + if (s._closeRequested || c._state !== "readable") return; + let { buffer: m, byteOffset: A, byteLength: I } = i; + if (_r(m)) throw new TypeError("chunk's buffer is detached and so cannot be enqueued"); + let U = rr(m); + if (s._pendingPullIntos.length > 0) { + let V = s._pendingPullIntos.peek(); + if (_r(V.buffer)) throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk"); + la(s), V.buffer = rr(V.buffer), V.readerType === "none" && Rl(s, V); + } + if (O(c)) if (pg(s), B(c) === 0) js(s, U, A, I); + else { + s._pendingPullIntos.length > 0 && un(s); + let V = new Uint8Array(U, A, I); + k(c, V, false); + } + else pa(c) ? (js(s, U, A, I), fa(s)) : js(s, U, A, I); + Ur(s); + } + function Ct(s, i) { + let c = s._controlledReadableByteStream; + c._state === "readable" && (Sl(s), Cr(s), Ls(s), cf(c, i)); + } + function xl(s, i) { + let c = s._queue.shift(); + s._queueTotalSize -= c.byteLength, Ol(s); + let m = new Uint8Array(c.buffer, c.byteOffset, c.byteLength); + i._chunkSteps(m); + } + function da(s) { + if (s._byobRequest === null && s._pendingPullIntos.length > 0) { + let i = s._pendingPullIntos.peek(), c = new Uint8Array(i.buffer, i.byteOffset + i.bytesFilled, i.byteLength - i.bytesFilled), m = Object.create(jr.prototype); + bg(m, s, c), s._byobRequest = m; + } + return s._byobRequest; + } + function Bl(s) { + let i = s._controlledReadableByteStream._state; + return i === "errored" ? null : i === "closed" ? 0 : s._strategyHWM - s._queueTotalSize; + } + function Ms(s, i) { + let c = s._pendingPullIntos.peek(); + if (s._controlledReadableByteStream._state === "closed") { + if (i !== 0) throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream"); + } else { + if (i === 0) throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream"); + if (c.bytesFilled + i > c.byteLength) throw new RangeError("bytesWritten out of range"); + } + c.buffer = rr(c.buffer), Pl(s, i); + } + function $s(s, i) { + let c = s._pendingPullIntos.peek(); + if (s._controlledReadableByteStream._state === "closed") { + if (i.byteLength !== 0) throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream"); + } else if (i.byteLength === 0) throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream"); + if (c.byteOffset + c.bytesFilled !== i.byteOffset) throw new RangeError("The region specified by view does not match byobRequest"); + if (c.bufferByteLength !== i.buffer.byteLength) throw new RangeError("The buffer of view has different capacity than byobRequest"); + if (c.bytesFilled + i.byteLength > c.byteLength) throw new RangeError("The region specified by view is larger than byobRequest"); + let A = i.byteLength; + c.buffer = rr(i.buffer), Pl(s, A); + } + function Il(s, i, c, m, A, I, U) { + i._controlledReadableByteStream = s, i._pullAgain = false, i._pulling = false, i._byobRequest = null, i._queue = i._queueTotalSize = void 0, Cr(i), i._closeRequested = false, i._started = false, i._strategyHWM = I, i._pullAlgorithm = m, i._cancelAlgorithm = A, i._autoAllocateChunkSize = U, i._pendingPullIntos = new j(), s._readableStreamController = i; + let V = c(); + E(h(V), () => (i._started = true, Ur(i), null), (ae) => (Ct(i, ae), null)); + } + function Cg(s, i, c) { + let m = Object.create(nr.prototype), A, I, U; + i.start !== void 0 ? A = () => i.start(m) : A = () => { + }, i.pull !== void 0 ? I = () => i.pull(m) : I = () => h(void 0), i.cancel !== void 0 ? U = (ae) => i.cancel(ae) : U = () => h(void 0); + let V = i.autoAllocateChunkSize; + if (V === 0) throw new TypeError("autoAllocateChunkSize must be greater than 0"); + Il(s, m, A, I, U, c, V); + } + function bg(s, i, c) { + s._associatedReadableByteStreamController = i, s._view = c; + } + function ha(s) { + return new TypeError(`ReadableStreamBYOBRequest.prototype.${s} can only be used on a ReadableStreamBYOBRequest`); + } + function Xn(s) { + return new TypeError(`ReadableByteStreamController.prototype.${s} can only be used on a ReadableByteStreamController`); + } + function Eg(s, i) { + pe(s, i); + let c = s?.mode; + return { mode: c === void 0 ? void 0 : wg(c, `${i} has member 'mode' that`) }; + } + function wg(s, i) { + if (s = `${s}`, s !== "byob") throw new TypeError(`${i} '${s}' is not a valid enumeration value for ReadableStreamReaderMode`); + return s; + } + function Ag(s, i) { + var c; + pe(s, i); + let m = (c = s?.min) !== null && c !== void 0 ? c : 1; + return { min: T(m, `${i} has member 'min' that`) }; + } + function Nl(s) { + return new br(s); + } + function ql(s, i) { + s._reader._readIntoRequests.push(i); + } + function Dg(s, i, c) { + let A = s._reader._readIntoRequests.shift(); + c ? A._closeSteps(i) : A._chunkSteps(i); + } + function jl(s) { + return s._reader._readIntoRequests.length; + } + function pa(s) { + let i = s._reader; + return !(i === void 0 || !Mr(i)); + } + class br { + constructor(i) { + if (Ne(i, 1, "ReadableStreamBYOBReader"), F(i, "First parameter"), Ar(i)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); + if (!Lr(i._readableStreamController)) throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source"); + he(this, i), this._readIntoRequests = new j(); + } + get closed() { + return Mr(this) ? this._closedPromise : d(Hs("closed")); + } + cancel(i = void 0) { + return Mr(this) ? this._ownerReadableStream === void 0 ? d(re("cancel")) : fe(this, i) : d(Hs("cancel")); + } + read(i, c = {}) { + if (!Mr(this)) return d(Hs("read")); + if (!ArrayBuffer.isView(i)) return d(new TypeError("view must be an array buffer view")); + if (i.byteLength === 0) return d(new TypeError("view must have non-zero byteLength")); + if (i.buffer.byteLength === 0) return d(new TypeError("view's buffer must have non-zero byteLength")); + if (_r(i.buffer)) return d(new TypeError("view's buffer has been detached")); + let m; + try { + m = Ag(c, "options"); + } catch (te) { + return d(te); + } + let A = m.min; + if (A === 0) return d(new TypeError("options.min must be greater than 0")); + if (dg(i)) { + if (A > i.byteLength) return d(new RangeError("options.min must be less than or equal to view's byteLength")); + } else if (A > i.length) return d(new RangeError("options.min must be less than or equal to view's length")); + if (this._ownerReadableStream === void 0) return d(re("read from")); + let I, U, V = f((te, ce) => { + I = te, U = ce; + }); + return Ll(this, i, A, { _chunkSteps: (te) => I({ value: te, done: false }), _closeSteps: (te) => I({ value: te, done: true }), _errorSteps: (te) => U(te) }), V; + } + releaseLock() { + if (!Mr(this)) throw Hs("releaseLock"); + this._ownerReadableStream !== void 0 && Sg(this); + } + } + Object.defineProperties(br.prototype, { cancel: { enumerable: true }, read: { enumerable: true }, releaseLock: { enumerable: true }, closed: { enumerable: true } }), o(br.prototype.cancel, "cancel"), o(br.prototype.read, "read"), o(br.prototype.releaseLock, "releaseLock"), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(br.prototype, Symbol.toStringTag, { value: "ReadableStreamBYOBReader", configurable: true }); + function Mr(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_readIntoRequests") ? false : s instanceof br; + } + function Ll(s, i, c, m) { + let A = s._ownerReadableStream; + A._disturbed = true, A._state === "errored" ? m._errorSteps(A._storedError) : mg(A._readableStreamController, i, c, m); + } + function Sg(s) { + ye(s); + let i = new TypeError("Reader was released"); + Ul(s, i); + } + function Ul(s, i) { + let c = s._readIntoRequests; + s._readIntoRequests = new j(), c.forEach((m) => { + m._errorSteps(i); + }); + } + function Hs(s) { + return new TypeError(`ReadableStreamBYOBReader.prototype.${s} can only be used on a ReadableStreamBYOBReader`); + } + function Qn(s, i) { + let { highWaterMark: c } = s; + if (c === void 0) return i; + if (ut(c) || c < 0) throw new RangeError("Invalid highWaterMark"); + return c; + } + function Gs(s) { + let { size: i } = s; + return i || (() => 1); + } + function Ws(s, i) { + pe(s, i); + let c = s?.highWaterMark, m = s?.size; + return { highWaterMark: c === void 0 ? void 0 : y(c), size: m === void 0 ? void 0 : vg(m, `${i} has member 'size' that`) }; + } + function vg(s, i) { + return Ee(s, i), (c) => y(s(c)); + } + function Tg(s, i) { + pe(s, i); + let c = s?.abort, m = s?.close, A = s?.start, I = s?.type, U = s?.write; + return { abort: c === void 0 ? void 0 : Rg(c, s, `${i} has member 'abort' that`), close: m === void 0 ? void 0 : kg(m, s, `${i} has member 'close' that`), start: A === void 0 ? void 0 : Fg(A, s, `${i} has member 'start' that`), write: U === void 0 ? void 0 : Og(U, s, `${i} has member 'write' that`), type: I }; + } + function Rg(s, i, c) { + return Ee(s, c), (m) => S(s, i, [m]); + } + function kg(s, i, c) { + return Ee(s, c), () => S(s, i, []); + } + function Fg(s, i, c) { + return Ee(s, c), (m) => R(s, i, [m]); + } + function Og(s, i, c) { + return Ee(s, c), (m, A) => S(s, i, [m, A]); + } + function Ml(s, i) { + if (!cn(s)) throw new TypeError(`${i} is not a WritableStream.`); + } + function Pg(s) { + if (typeof s != "object" || s === null) return false; + try { + return typeof s.aborted == "boolean"; + } catch { + return false; + } + } + let xg = typeof AbortController == "function"; + function Bg() { + if (xg) return new AbortController(); + } + class Er { + constructor(i = {}, c = {}) { + i === void 0 ? i = null : xe(i, "First parameter"); + let m = Ws(c, "Second parameter"), A = Tg(i, "First parameter"); + if (Hl(this), A.type !== void 0) throw new RangeError("Invalid type is specified"); + let U = Gs(m), V = Qn(m, 1); + Vg(this, A, V, U); + } + get locked() { + if (!cn(this)) throw Ys("locked"); + return ln(this); + } + abort(i = void 0) { + return cn(this) ? ln(this) ? d(new TypeError("Cannot abort a stream that already has a writer")) : zs(this, i) : d(Ys("abort")); + } + close() { + return cn(this) ? ln(this) ? d(new TypeError("Cannot close a stream that already has a writer")) : Ht(this) ? d(new TypeError("Cannot close an already-closing stream")) : Gl(this) : d(Ys("close")); + } + getWriter() { + if (!cn(this)) throw Ys("getWriter"); + return $l(this); + } + } + Object.defineProperties(Er.prototype, { abort: { enumerable: true }, close: { enumerable: true }, getWriter: { enumerable: true }, locked: { enumerable: true } }), o(Er.prototype.abort, "abort"), o(Er.prototype.close, "close"), o(Er.prototype.getWriter, "getWriter"), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(Er.prototype, Symbol.toStringTag, { value: "WritableStream", configurable: true }); + function $l(s) { + return new sr(s); + } + function Ig(s, i, c, m, A = 1, I = () => 1) { + let U = Object.create(Er.prototype); + Hl(U); + let V = Object.create(fn.prototype); + return Yl(U, V, s, i, c, m, A, I), U; + } + function Hl(s) { + s._state = "writable", s._storedError = void 0, s._writer = void 0, s._writableStreamController = void 0, s._writeRequests = new j(), s._inFlightWriteRequest = void 0, s._closeRequest = void 0, s._inFlightCloseRequest = void 0, s._pendingAbortRequest = void 0, s._backpressure = false; + } + function cn(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_writableStreamController") ? false : s instanceof Er; + } + function ln(s) { + return s._writer !== void 0; + } + function zs(s, i) { + var c; + if (s._state === "closed" || s._state === "errored") return h(void 0); + s._writableStreamController._abortReason = i, (c = s._writableStreamController._abortController) === null || c === void 0 || c.abort(i); + let m = s._state; + if (m === "closed" || m === "errored") return h(void 0); + if (s._pendingAbortRequest !== void 0) return s._pendingAbortRequest._promise; + let A = false; + m === "erroring" && (A = true, i = void 0); + let I = f((U, V) => { + s._pendingAbortRequest = { _promise: void 0, _resolve: U, _reject: V, _reason: i, _wasAlreadyErroring: A }; + }); + return s._pendingAbortRequest._promise = I, A || ga(s, i), I; + } + function Gl(s) { + let i = s._state; + if (i === "closed" || i === "errored") return d(new TypeError(`The stream (in ${i} state) is not in the writable state and cannot be closed`)); + let c = f((A, I) => { + let U = { _resolve: A, _reject: I }; + s._closeRequest = U; + }), m = s._writer; + return m !== void 0 && s._backpressure && i === "writable" && Da(m), Kg(s._writableStreamController), c; + } + function Ng(s) { + return f((c, m) => { + let A = { _resolve: c, _reject: m }; + s._writeRequests.push(A); + }); + } + function ma(s, i) { + if (s._state === "writable") { + ga(s, i); + return; + } + ya(s); + } + function ga(s, i) { + let c = s._writableStreamController; + s._state = "erroring", s._storedError = i; + let m = s._writer; + m !== void 0 && zl(m, i), !Mg(s) && c._started && ya(s); + } + function ya(s) { + s._state = "errored", s._writableStreamController[H](); + let i = s._storedError; + if (s._writeRequests.forEach((A) => { + A._reject(i); + }), s._writeRequests = new j(), s._pendingAbortRequest === void 0) { + Js(s); + return; + } + let c = s._pendingAbortRequest; + if (s._pendingAbortRequest = void 0, c._wasAlreadyErroring) { + c._reject(i), Js(s); + return; + } + let m = s._writableStreamController[L](c._reason); + E(m, () => (c._resolve(), Js(s), null), (A) => (c._reject(A), Js(s), null)); + } + function qg(s) { + s._inFlightWriteRequest._resolve(void 0), s._inFlightWriteRequest = void 0; + } + function jg(s, i) { + s._inFlightWriteRequest._reject(i), s._inFlightWriteRequest = void 0, ma(s, i); + } + function Lg(s) { + s._inFlightCloseRequest._resolve(void 0), s._inFlightCloseRequest = void 0, s._state === "erroring" && (s._storedError = void 0, s._pendingAbortRequest !== void 0 && (s._pendingAbortRequest._resolve(), s._pendingAbortRequest = void 0)), s._state = "closed"; + let c = s._writer; + c !== void 0 && ef(c); + } + function Ug(s, i) { + s._inFlightCloseRequest._reject(i), s._inFlightCloseRequest = void 0, s._pendingAbortRequest !== void 0 && (s._pendingAbortRequest._reject(i), s._pendingAbortRequest = void 0), ma(s, i); + } + function Ht(s) { + return !(s._closeRequest === void 0 && s._inFlightCloseRequest === void 0); + } + function Mg(s) { + return !(s._inFlightWriteRequest === void 0 && s._inFlightCloseRequest === void 0); + } + function $g(s) { + s._inFlightCloseRequest = s._closeRequest, s._closeRequest = void 0; + } + function Hg(s) { + s._inFlightWriteRequest = s._writeRequests.shift(); + } + function Js(s) { + s._closeRequest !== void 0 && (s._closeRequest._reject(s._storedError), s._closeRequest = void 0); + let i = s._writer; + i !== void 0 && wa(i, s._storedError); + } + function _a(s, i) { + let c = s._writer; + c !== void 0 && i !== s._backpressure && (i ? ry(c) : Da(c)), s._backpressure = i; + } + class sr { + constructor(i) { + if (Ne(i, 1, "WritableStreamDefaultWriter"), Ml(i, "First parameter"), ln(i)) throw new TypeError("This stream has already been locked for exclusive writing by another writer"); + this._ownerWritableStream = i, i._writer = this; + let c = i._state; + if (c === "writable") !Ht(i) && i._backpressure ? Qs(this) : tf(this), Xs(this); + else if (c === "erroring") Aa(this, i._storedError), Xs(this); + else if (c === "closed") tf(this), ey(this); + else { + let m = i._storedError; + Aa(this, m), Zl(this, m); + } + } + get closed() { + return $r(this) ? this._closedPromise : d(Hr("closed")); + } + get desiredSize() { + if (!$r(this)) throw Hr("desiredSize"); + if (this._ownerWritableStream === void 0) throw es("desiredSize"); + return Jg(this); + } + get ready() { + return $r(this) ? this._readyPromise : d(Hr("ready")); + } + abort(i = void 0) { + return $r(this) ? this._ownerWritableStream === void 0 ? d(es("abort")) : Gg(this, i) : d(Hr("abort")); + } + close() { + if (!$r(this)) return d(Hr("close")); + let i = this._ownerWritableStream; + return i === void 0 ? d(es("close")) : Ht(i) ? d(new TypeError("Cannot close an already-closing stream")) : Wl(this); + } + releaseLock() { + if (!$r(this)) throw Hr("releaseLock"); + this._ownerWritableStream !== void 0 && Jl(this); + } + write(i = void 0) { + return $r(this) ? this._ownerWritableStream === void 0 ? d(es("write to")) : Vl(this, i) : d(Hr("write")); + } + } + Object.defineProperties(sr.prototype, { abort: { enumerable: true }, close: { enumerable: true }, releaseLock: { enumerable: true }, write: { enumerable: true }, closed: { enumerable: true }, desiredSize: { enumerable: true }, ready: { enumerable: true } }), o(sr.prototype.abort, "abort"), o(sr.prototype.close, "close"), o(sr.prototype.releaseLock, "releaseLock"), o(sr.prototype.write, "write"), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(sr.prototype, Symbol.toStringTag, { value: "WritableStreamDefaultWriter", configurable: true }); + function $r(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_ownerWritableStream") ? false : s instanceof sr; + } + function Gg(s, i) { + let c = s._ownerWritableStream; + return zs(c, i); + } + function Wl(s) { + let i = s._ownerWritableStream; + return Gl(i); + } + function Wg(s) { + let i = s._ownerWritableStream, c = i._state; + return Ht(i) || c === "closed" ? h(void 0) : c === "errored" ? d(i._storedError) : Wl(s); + } + function zg(s, i) { + s._closedPromiseState === "pending" ? wa(s, i) : ty(s, i); + } + function zl(s, i) { + s._readyPromiseState === "pending" ? rf(s, i) : ny(s, i); + } + function Jg(s) { + let i = s._ownerWritableStream, c = i._state; + return c === "errored" || c === "erroring" ? null : c === "closed" ? 0 : Xl(i._writableStreamController); + } + function Jl(s) { + let i = s._ownerWritableStream, c = new TypeError("Writer was released and can no longer be used to monitor the stream's closedness"); + zl(s, c), zg(s, c), i._writer = void 0, s._ownerWritableStream = void 0; + } + function Vl(s, i) { + let c = s._ownerWritableStream, m = c._writableStreamController, A = Yg(m, i); + if (c !== s._ownerWritableStream) return d(es("write to")); + let I = c._state; + if (I === "errored") return d(c._storedError); + if (Ht(c) || I === "closed") return d(new TypeError("The stream is closing or closed and cannot be written to")); + if (I === "erroring") return d(c._storedError); + let U = Ng(c); + return Xg(m, i, A), U; + } + let Kl = {}; + class fn { + constructor() { + throw new TypeError("Illegal constructor"); + } + get abortReason() { + if (!Ca(this)) throw Ea("abortReason"); + return this._abortReason; + } + get signal() { + if (!Ca(this)) throw Ea("signal"); + if (this._abortController === void 0) throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported"); + return this._abortController.signal; + } + error(i = void 0) { + if (!Ca(this)) throw Ea("error"); + this._controlledWritableStream._state === "writable" && Ql(this, i); + } + [L](i) { + let c = this._abortAlgorithm(i); + return Vs(this), c; + } + [H]() { + Cr(this); + } + } + Object.defineProperties(fn.prototype, { abortReason: { enumerable: true }, signal: { enumerable: true }, error: { enumerable: true } }), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(fn.prototype, Symbol.toStringTag, { value: "WritableStreamDefaultController", configurable: true }); + function Ca(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_controlledWritableStream") ? false : s instanceof fn; + } + function Yl(s, i, c, m, A, I, U, V) { + i._controlledWritableStream = s, s._writableStreamController = i, i._queue = void 0, i._queueTotalSize = void 0, Cr(i), i._abortReason = void 0, i._abortController = Bg(), i._started = false, i._strategySizeAlgorithm = V, i._strategyHWM = U, i._writeAlgorithm = m, i._closeAlgorithm = A, i._abortAlgorithm = I; + let ae = ba(i); + _a(s, ae); + let te = c(), ce = h(te); + E(ce, () => (i._started = true, Ks(i), null), (ge) => (i._started = true, ma(s, ge), null)); + } + function Vg(s, i, c, m) { + let A = Object.create(fn.prototype), I, U, V, ae; + i.start !== void 0 ? I = () => i.start(A) : I = () => { + }, i.write !== void 0 ? U = (te) => i.write(te, A) : U = () => h(void 0), i.close !== void 0 ? V = () => i.close() : V = () => h(void 0), i.abort !== void 0 ? ae = (te) => i.abort(te) : ae = () => h(void 0), Yl(s, A, I, U, V, ae, c, m); + } + function Vs(s) { + s._writeAlgorithm = void 0, s._closeAlgorithm = void 0, s._abortAlgorithm = void 0, s._strategySizeAlgorithm = void 0; + } + function Kg(s) { + aa(s, Kl, 0), Ks(s); + } + function Yg(s, i) { + try { + return s._strategySizeAlgorithm(i); + } catch (c) { + return Zn(s, c), 1; + } + } + function Xl(s) { + return s._strategyHWM - s._queueTotalSize; + } + function Xg(s, i, c) { + try { + aa(s, i, c); + } catch (A) { + Zn(s, A); + return; + } + let m = s._controlledWritableStream; + if (!Ht(m) && m._state === "writable") { + let A = ba(s); + _a(m, A); + } + Ks(s); + } + function Ks(s) { + let i = s._controlledWritableStream; + if (!s._started || i._inFlightWriteRequest !== void 0) return; + if (i._state === "erroring") { + ya(i); + return; + } + if (s._queue.length === 0) return; + let m = fg(s); + m === Kl ? Qg(s) : Zg(s, m); + } + function Zn(s, i) { + s._controlledWritableStream._state === "writable" && Ql(s, i); + } + function Qg(s) { + let i = s._controlledWritableStream; + $g(i), ia(s); + let c = s._closeAlgorithm(); + Vs(s), E(c, () => (Lg(i), null), (m) => (Ug(i, m), null)); + } + function Zg(s, i) { + let c = s._controlledWritableStream; + Hg(c); + let m = s._writeAlgorithm(i); + E(m, () => { + qg(c); + let A = c._state; + if (ia(s), !Ht(c) && A === "writable") { + let I = ba(s); + _a(c, I); + } + return Ks(s), null; + }, (A) => (c._state === "writable" && Vs(s), jg(c, A), null)); + } + function ba(s) { + return Xl(s) <= 0; + } + function Ql(s, i) { + let c = s._controlledWritableStream; + Vs(s), ga(c, i); + } + function Ys(s) { + return new TypeError(`WritableStream.prototype.${s} can only be used on a WritableStream`); + } + function Ea(s) { + return new TypeError(`WritableStreamDefaultController.prototype.${s} can only be used on a WritableStreamDefaultController`); + } + function Hr(s) { + return new TypeError(`WritableStreamDefaultWriter.prototype.${s} can only be used on a WritableStreamDefaultWriter`); + } + function es(s) { + return new TypeError("Cannot " + s + " a stream using a released writer"); + } + function Xs(s) { + s._closedPromise = f((i, c) => { + s._closedPromise_resolve = i, s._closedPromise_reject = c, s._closedPromiseState = "pending"; + }); + } + function Zl(s, i) { + Xs(s), wa(s, i); + } + function ey(s) { + Xs(s), ef(s); + } + function wa(s, i) { + s._closedPromise_reject !== void 0 && (g(s._closedPromise), s._closedPromise_reject(i), s._closedPromise_resolve = void 0, s._closedPromise_reject = void 0, s._closedPromiseState = "rejected"); + } + function ty(s, i) { + Zl(s, i); + } + function ef(s) { + s._closedPromise_resolve !== void 0 && (s._closedPromise_resolve(void 0), s._closedPromise_resolve = void 0, s._closedPromise_reject = void 0, s._closedPromiseState = "resolved"); + } + function Qs(s) { + s._readyPromise = f((i, c) => { + s._readyPromise_resolve = i, s._readyPromise_reject = c; + }), s._readyPromiseState = "pending"; + } + function Aa(s, i) { + Qs(s), rf(s, i); + } + function tf(s) { + Qs(s), Da(s); + } + function rf(s, i) { + s._readyPromise_reject !== void 0 && (g(s._readyPromise), s._readyPromise_reject(i), s._readyPromise_resolve = void 0, s._readyPromise_reject = void 0, s._readyPromiseState = "rejected"); + } + function ry(s) { + Qs(s); + } + function ny(s, i) { + Aa(s, i); + } + function Da(s) { + s._readyPromise_resolve !== void 0 && (s._readyPromise_resolve(void 0), s._readyPromise_resolve = void 0, s._readyPromise_reject = void 0, s._readyPromiseState = "fulfilled"); + } + function sy() { + if (typeof globalThis < "u") return globalThis; + if (typeof self < "u") return self; + if (typeof global < "u") return global; + } + let Sa = sy(); + function oy(s) { + if (!(typeof s == "function" || typeof s == "object") || s.name !== "DOMException") return false; + try { + return new s(), true; + } catch { + return false; + } + } + function iy() { + let s = Sa?.DOMException; + return oy(s) ? s : void 0; + } + function ay() { + let s = function(c, m) { + this.message = c || "", this.name = m || "Error", Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); + }; + return o(s, "DOMException"), s.prototype = Object.create(Error.prototype), Object.defineProperty(s.prototype, "constructor", { value: s, writable: true, configurable: true }), s; + } + let uy = iy() || ay(); + function nf(s, i, c, m, A, I) { + let U = q(s), V = $l(i); + s._disturbed = true; + let ae = false, te = h(void 0); + return f((ce, ge) => { + let Te; + if (I !== void 0) { + if (Te = () => { + let ne = I.reason !== void 0 ? I.reason : new uy("Aborted", "AbortError"), _e = []; + m || _e.push(() => i._state === "writable" ? zs(i, ne) : h(void 0)), A || _e.push(() => s._state === "readable" ? Ft(s, ne) : h(void 0)), rt(() => Promise.all(_e.map((Re) => Re())), true, ne); + }, I.aborted) { + Te(); + return; + } + I.addEventListener("abort", Te); + } + function Ot() { + return f((ne, _e) => { + function Re(ct) { + ct ? ne() : _(mn(), Re, _e); + } + Re(false); + }); + } + function mn() { + return ae ? h(true) : _(V._readyPromise, () => f((ne, _e) => { + Q(U, { _chunkSteps: (Re) => { + te = _(Vl(V, Re), void 0, e), ne(false); + }, _closeSteps: () => ne(true), _errorSteps: _e }); + })); + } + if (ir(s, U._closedPromise, (ne) => (m ? bt(true, ne) : rt(() => zs(i, ne), true, ne), null)), ir(i, V._closedPromise, (ne) => (A ? bt(true, ne) : rt(() => Ft(s, ne), true, ne), null)), Qe(s, U._closedPromise, () => (c ? bt() : rt(() => Wg(V)), null)), Ht(i) || i._state === "closed") { + let ne = new TypeError("the destination writable stream closed before all data could be piped to it"); + A ? bt(true, ne) : rt(() => Ft(s, ne), true, ne); + } + g(Ot()); + function Sr() { + let ne = te; + return _(te, () => ne !== te ? Sr() : void 0); + } + function ir(ne, _e, Re) { + ne._state === "errored" ? Re(ne._storedError) : v(_e, Re); + } + function Qe(ne, _e, Re) { + ne._state === "closed" ? Re() : P(_e, Re); + } + function rt(ne, _e, Re) { + if (ae) return; + ae = true, i._state === "writable" && !Ht(i) ? P(Sr(), ct) : ct(); + function ct() { + return E(ne(), () => ar(_e, Re), (gn) => ar(true, gn)), null; + } + } + function bt(ne, _e) { + ae || (ae = true, i._state === "writable" && !Ht(i) ? P(Sr(), () => ar(ne, _e)) : ar(ne, _e)); + } + function ar(ne, _e) { + return Jl(V), ye(U), I !== void 0 && I.removeEventListener("abort", Te), ne ? ge(_e) : ce(void 0), null; + } + }); + } + class or { + constructor() { + throw new TypeError("Illegal constructor"); + } + get desiredSize() { + if (!Zs(this)) throw to("desiredSize"); + return va(this); + } + close() { + if (!Zs(this)) throw to("close"); + if (!hn(this)) throw new TypeError("The stream is not in a state that permits close"); + Gr(this); + } + enqueue(i = void 0) { + if (!Zs(this)) throw to("enqueue"); + if (!hn(this)) throw new TypeError("The stream is not in a state that permits enqueue"); + return dn(this, i); + } + error(i = void 0) { + if (!Zs(this)) throw to("error"); + kt(this, i); + } + [K](i) { + Cr(this); + let c = this._cancelAlgorithm(i); + return eo(this), c; + } + [W](i) { + let c = this._controlledReadableStream; + if (this._queue.length > 0) { + let m = ia(this); + this._closeRequested && this._queue.length === 0 ? (eo(this), ns(c)) : ts(this), i._chunkSteps(m); + } else D(c, i), ts(this); + } + [Ae]() { + } + } + Object.defineProperties(or.prototype, { close: { enumerable: true }, enqueue: { enumerable: true }, error: { enumerable: true }, desiredSize: { enumerable: true } }), o(or.prototype.close, "close"), o(or.prototype.enqueue, "enqueue"), o(or.prototype.error, "error"), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(or.prototype, Symbol.toStringTag, { value: "ReadableStreamDefaultController", configurable: true }); + function Zs(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_controlledReadableStream") ? false : s instanceof or; + } + function ts(s) { + if (!sf(s)) return; + if (s._pulling) { + s._pullAgain = true; + return; + } + s._pulling = true; + let c = s._pullAlgorithm(); + E(c, () => (s._pulling = false, s._pullAgain && (s._pullAgain = false, ts(s)), null), (m) => (kt(s, m), null)); + } + function sf(s) { + let i = s._controlledReadableStream; + return !hn(s) || !s._started ? false : !!(Ar(i) && B(i) > 0 || va(s) > 0); + } + function eo(s) { + s._pullAlgorithm = void 0, s._cancelAlgorithm = void 0, s._strategySizeAlgorithm = void 0; + } + function Gr(s) { + if (!hn(s)) return; + let i = s._controlledReadableStream; + s._closeRequested = true, s._queue.length === 0 && (eo(s), ns(i)); + } + function dn(s, i) { + if (!hn(s)) return; + let c = s._controlledReadableStream; + if (Ar(c) && B(c) > 0) k(c, i, false); + else { + let m; + try { + m = s._strategySizeAlgorithm(i); + } catch (A) { + throw kt(s, A), A; + } + try { + aa(s, i, m); + } catch (A) { + throw kt(s, A), A; + } + } + ts(s); + } + function kt(s, i) { + let c = s._controlledReadableStream; + c._state === "readable" && (Cr(s), eo(s), cf(c, i)); + } + function va(s) { + let i = s._controlledReadableStream._state; + return i === "errored" ? null : i === "closed" ? 0 : s._strategyHWM - s._queueTotalSize; + } + function cy(s) { + return !sf(s); + } + function hn(s) { + let i = s._controlledReadableStream._state; + return !s._closeRequested && i === "readable"; + } + function of(s, i, c, m, A, I, U) { + i._controlledReadableStream = s, i._queue = void 0, i._queueTotalSize = void 0, Cr(i), i._started = false, i._closeRequested = false, i._pullAgain = false, i._pulling = false, i._strategySizeAlgorithm = U, i._strategyHWM = I, i._pullAlgorithm = m, i._cancelAlgorithm = A, s._readableStreamController = i; + let V = c(); + E(h(V), () => (i._started = true, ts(i), null), (ae) => (kt(i, ae), null)); + } + function ly(s, i, c, m) { + let A = Object.create(or.prototype), I, U, V; + i.start !== void 0 ? I = () => i.start(A) : I = () => { + }, i.pull !== void 0 ? U = () => i.pull(A) : U = () => h(void 0), i.cancel !== void 0 ? V = (ae) => i.cancel(ae) : V = () => h(void 0), of(s, A, I, U, V, c, m); + } + function to(s) { + return new TypeError(`ReadableStreamDefaultController.prototype.${s} can only be used on a ReadableStreamDefaultController`); + } + function fy(s, i) { + return Lr(s._readableStreamController) ? hy(s) : dy(s); + } + function dy(s, i) { + let c = q(s), m = false, A = false, I = false, U = false, V, ae, te, ce, ge, Te = f((Qe) => { + ge = Qe; + }); + function Ot() { + return m ? (A = true, h(void 0)) : (m = true, Q(c, { _chunkSteps: (rt) => { + C(() => { + A = false; + let bt = rt, ar = rt; + I || dn(te._readableStreamController, bt), U || dn(ce._readableStreamController, ar), m = false, A && Ot(); + }); + }, _closeSteps: () => { + m = false, I || Gr(te._readableStreamController), U || Gr(ce._readableStreamController), (!I || !U) && ge(void 0); + }, _errorSteps: () => { + m = false; + } }), h(void 0)); + } + function mn(Qe) { + if (I = true, V = Qe, U) { + let rt = Se([V, ae]), bt = Ft(s, rt); + ge(bt); + } + return Te; + } + function Sr(Qe) { + if (U = true, ae = Qe, I) { + let rt = Se([V, ae]), bt = Ft(s, rt); + ge(bt); + } + return Te; + } + function ir() { + } + return te = rs(ir, Ot, mn), ce = rs(ir, Ot, Sr), v(c._closedPromise, (Qe) => (kt(te._readableStreamController, Qe), kt(ce._readableStreamController, Qe), (!I || !U) && ge(void 0), null)), [te, ce]; + } + function hy(s) { + let i = q(s), c = false, m = false, A = false, I = false, U = false, V, ae, te, ce, ge, Te = f((ne) => { + ge = ne; + }); + function Ot(ne) { + v(ne._closedPromise, (_e) => (ne !== i || (Ct(te._readableStreamController, _e), Ct(ce._readableStreamController, _e), (!I || !U) && ge(void 0)), null)); + } + function mn() { + Mr(i) && (ye(i), i = q(s), Ot(i)), Q(i, { _chunkSteps: (_e) => { + C(() => { + m = false, A = false; + let Re = _e, ct = _e; + if (!I && !U) try { + ct = Al(_e); + } catch (gn) { + Ct(te._readableStreamController, gn), Ct(ce._readableStreamController, gn), ge(Ft(s, gn)); + return; + } + I || Us(te._readableStreamController, Re), U || Us(ce._readableStreamController, ct), c = false, m ? ir() : A && Qe(); + }); + }, _closeSteps: () => { + c = false, I || Yn(te._readableStreamController), U || Yn(ce._readableStreamController), te._readableStreamController._pendingPullIntos.length > 0 && Ms(te._readableStreamController, 0), ce._readableStreamController._pendingPullIntos.length > 0 && Ms(ce._readableStreamController, 0), (!I || !U) && ge(void 0); + }, _errorSteps: () => { + c = false; + } }); + } + function Sr(ne, _e) { + Y(i) && (ye(i), i = Nl(s), Ot(i)); + let Re = _e ? ce : te, ct = _e ? te : ce; + Ll(i, ne, 1, { _chunkSteps: (yn) => { + C(() => { + m = false, A = false; + let _n = _e ? U : I; + if (_e ? I : U) _n || $s(Re._readableStreamController, yn); + else { + let wf; + try { + wf = Al(yn); + } catch (Oa) { + Ct(Re._readableStreamController, Oa), Ct(ct._readableStreamController, Oa), ge(Ft(s, Oa)); + return; + } + _n || $s(Re._readableStreamController, yn), Us(ct._readableStreamController, wf); + } + c = false, m ? ir() : A && Qe(); + }); + }, _closeSteps: (yn) => { + c = false; + let _n = _e ? U : I, co = _e ? I : U; + _n || Yn(Re._readableStreamController), co || Yn(ct._readableStreamController), yn !== void 0 && (_n || $s(Re._readableStreamController, yn), !co && ct._readableStreamController._pendingPullIntos.length > 0 && Ms(ct._readableStreamController, 0)), (!_n || !co) && ge(void 0); + }, _errorSteps: () => { + c = false; + } }); + } + function ir() { + if (c) return m = true, h(void 0); + c = true; + let ne = da(te._readableStreamController); + return ne === null ? mn() : Sr(ne._view, false), h(void 0); + } + function Qe() { + if (c) return A = true, h(void 0); + c = true; + let ne = da(ce._readableStreamController); + return ne === null ? mn() : Sr(ne._view, true), h(void 0); + } + function rt(ne) { + if (I = true, V = ne, U) { + let _e = Se([V, ae]), Re = Ft(s, _e); + ge(Re); + } + return Te; + } + function bt(ne) { + if (U = true, ae = ne, I) { + let _e = Se([V, ae]), Re = Ft(s, _e); + ge(Re); + } + return Te; + } + function ar() { + } + return te = uf(ar, ir, rt), ce = uf(ar, Qe, bt), Ot(i), [te, ce]; + } + function py(s) { + return t(s) && typeof s.getReader < "u"; + } + function my(s) { + return py(s) ? yy(s.getReader()) : gy(s); + } + function gy(s) { + let i, c = wl(s, "async"), m = e; + function A() { + let U; + try { + U = ag(c); + } catch (ae) { + return d(ae); + } + let V = h(U); + return w(V, (ae) => { + if (!t(ae)) throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object"); + if (ug(ae)) Gr(i._readableStreamController); + else { + let ce = cg(ae); + dn(i._readableStreamController, ce); + } + }); + } + function I(U) { + let V = c.iterator, ae; + try { + ae = qs(V, "return"); + } catch (ge) { + return d(ge); + } + if (ae === void 0) return h(void 0); + let te; + try { + te = R(ae, V, [U]); + } catch (ge) { + return d(ge); + } + let ce = h(te); + return w(ce, (ge) => { + if (!t(ge)) throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object"); + }); + } + return i = rs(m, A, I, 0), i; + } + function yy(s) { + let i, c = e; + function m() { + let I; + try { + I = s.read(); + } catch (U) { + return d(U); + } + return w(I, (U) => { + if (!t(U)) throw new TypeError("The promise returned by the reader.read() method must fulfill with an object"); + if (U.done) Gr(i._readableStreamController); + else { + let V = U.value; + dn(i._readableStreamController, V); + } + }); + } + function A(I) { + try { + return h(s.cancel(I)); + } catch (U) { + return d(U); + } + } + return i = rs(c, m, A, 0), i; + } + function _y(s, i) { + pe(s, i); + let c = s, m = c?.autoAllocateChunkSize, A = c?.cancel, I = c?.pull, U = c?.start, V = c?.type; + return { autoAllocateChunkSize: m === void 0 ? void 0 : T(m, `${i} has member 'autoAllocateChunkSize' that`), cancel: A === void 0 ? void 0 : Cy(A, c, `${i} has member 'cancel' that`), pull: I === void 0 ? void 0 : by(I, c, `${i} has member 'pull' that`), start: U === void 0 ? void 0 : Ey(U, c, `${i} has member 'start' that`), type: V === void 0 ? void 0 : wy(V, `${i} has member 'type' that`) }; + } + function Cy(s, i, c) { + return Ee(s, c), (m) => S(s, i, [m]); + } + function by(s, i, c) { + return Ee(s, c), (m) => S(s, i, [m]); + } + function Ey(s, i, c) { + return Ee(s, c), (m) => R(s, i, [m]); + } + function wy(s, i) { + if (s = `${s}`, s !== "bytes") throw new TypeError(`${i} '${s}' is not a valid enumeration value for ReadableStreamType`); + return s; + } + function Ay(s, i) { + return pe(s, i), { preventCancel: !!s?.preventCancel }; + } + function af(s, i) { + pe(s, i); + let c = s?.preventAbort, m = s?.preventCancel, A = s?.preventClose, I = s?.signal; + return I !== void 0 && Dy(I, `${i} has member 'signal' that`), { preventAbort: !!c, preventCancel: !!m, preventClose: !!A, signal: I }; + } + function Dy(s, i) { + if (!Pg(s)) throw new TypeError(`${i} is not an AbortSignal.`); + } + function Sy(s, i) { + pe(s, i); + let c = s?.readable; + p(c, "readable", "ReadableWritablePair"), F(c, `${i} has member 'readable' that`); + let m = s?.writable; + return p(m, "writable", "ReadableWritablePair"), Ml(m, `${i} has member 'writable' that`), { readable: c, writable: m }; + } + class Ke { + constructor(i = {}, c = {}) { + i === void 0 ? i = null : xe(i, "First parameter"); + let m = Ws(c, "Second parameter"), A = _y(i, "First parameter"); + if (Ta(this), A.type === "bytes") { + if (m.size !== void 0) throw new RangeError("The strategy for a byte stream cannot have a size function"); + let I = Qn(m, 0); + Cg(this, A, I); + } else { + let I = Gs(m), U = Qn(m, 1); + ly(this, A, U, I); + } + } + get locked() { + if (!wr(this)) throw Wr("locked"); + return Ar(this); + } + cancel(i = void 0) { + return wr(this) ? Ar(this) ? d(new TypeError("Cannot cancel a stream that already has a reader")) : Ft(this, i) : d(Wr("cancel")); + } + getReader(i = void 0) { + if (!wr(this)) throw Wr("getReader"); + return Eg(i, "First parameter").mode === void 0 ? q(this) : Nl(this); + } + pipeThrough(i, c = {}) { + if (!wr(this)) throw Wr("pipeThrough"); + Ne(i, 1, "pipeThrough"); + let m = Sy(i, "First parameter"), A = af(c, "Second parameter"); + if (Ar(this)) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream"); + if (ln(m.writable)) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream"); + let I = nf(this, m.writable, A.preventClose, A.preventAbort, A.preventCancel, A.signal); + return g(I), m.readable; + } + pipeTo(i, c = {}) { + if (!wr(this)) return d(Wr("pipeTo")); + if (i === void 0) return d("Parameter 1 is required in 'pipeTo'."); + if (!cn(i)) return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")); + let m; + try { + m = af(c, "Second parameter"); + } catch (A) { + return d(A); + } + return Ar(this) ? d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")) : ln(i) ? d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")) : nf(this, i, m.preventClose, m.preventAbort, m.preventCancel, m.signal); + } + tee() { + if (!wr(this)) throw Wr("tee"); + let i = fy(this); + return Se(i); + } + values(i = void 0) { + if (!wr(this)) throw Wr("values"); + let c = Ay(i, "First parameter"); + return sn(this, c.preventCancel); + } + [oa](i) { + return this.values(i); + } + static from(i) { + return my(i); + } + } + Object.defineProperties(Ke, { from: { enumerable: true } }), Object.defineProperties(Ke.prototype, { cancel: { enumerable: true }, getReader: { enumerable: true }, pipeThrough: { enumerable: true }, pipeTo: { enumerable: true }, tee: { enumerable: true }, values: { enumerable: true }, locked: { enumerable: true } }), o(Ke.from, "from"), o(Ke.prototype.cancel, "cancel"), o(Ke.prototype.getReader, "getReader"), o(Ke.prototype.pipeThrough, "pipeThrough"), o(Ke.prototype.pipeTo, "pipeTo"), o(Ke.prototype.tee, "tee"), o(Ke.prototype.values, "values"), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(Ke.prototype, Symbol.toStringTag, { value: "ReadableStream", configurable: true }), Object.defineProperty(Ke.prototype, oa, { value: Ke.prototype.values, writable: true, configurable: true }); + function rs(s, i, c, m = 1, A = () => 1) { + let I = Object.create(Ke.prototype); + Ta(I); + let U = Object.create(or.prototype); + return of(I, U, s, i, c, m, A), I; + } + function uf(s, i, c) { + let m = Object.create(Ke.prototype); + Ta(m); + let A = Object.create(nr.prototype); + return Il(m, A, s, i, c, 0, void 0), m; + } + function Ta(s) { + s._state = "readable", s._reader = void 0, s._storedError = void 0, s._disturbed = false; + } + function wr(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_readableStreamController") ? false : s instanceof Ke; + } + function Ar(s) { + return s._reader !== void 0; + } + function Ft(s, i) { + if (s._disturbed = true, s._state === "closed") return h(void 0); + if (s._state === "errored") return d(s._storedError); + ns(s); + let c = s._reader; + if (c !== void 0 && Mr(c)) { + let A = c._readIntoRequests; + c._readIntoRequests = new j(), A.forEach((I) => { + I._closeSteps(void 0); + }); + } + let m = s._readableStreamController[K](i); + return w(m, e); + } + function ns(s) { + s._state = "closed"; + let i = s._reader; + if (i !== void 0 && (oe(i), Y(i))) { + let c = i._readRequests; + i._readRequests = new j(), c.forEach((m) => { + m._closeSteps(); + }); + } + } + function cf(s, i) { + s._state = "errored", s._storedError = i; + let c = s._reader; + c !== void 0 && (J(c, i), Y(c) ? Fe(c, i) : Ul(c, i)); + } + function Wr(s) { + return new TypeError(`ReadableStream.prototype.${s} can only be used on a ReadableStream`); + } + function lf(s, i) { + pe(s, i); + let c = s?.highWaterMark; + return p(c, "highWaterMark", "QueuingStrategyInit"), { highWaterMark: y(c) }; + } + let ff = (s) => s.byteLength; + o(ff, "size"); + class ro { + constructor(i) { + Ne(i, 1, "ByteLengthQueuingStrategy"), i = lf(i, "First parameter"), this._byteLengthQueuingStrategyHighWaterMark = i.highWaterMark; + } + get highWaterMark() { + if (!hf(this)) throw df("highWaterMark"); + return this._byteLengthQueuingStrategyHighWaterMark; + } + get size() { + if (!hf(this)) throw df("size"); + return ff; + } + } + Object.defineProperties(ro.prototype, { highWaterMark: { enumerable: true }, size: { enumerable: true } }), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(ro.prototype, Symbol.toStringTag, { value: "ByteLengthQueuingStrategy", configurable: true }); + function df(s) { + return new TypeError(`ByteLengthQueuingStrategy.prototype.${s} can only be used on a ByteLengthQueuingStrategy`); + } + function hf(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_byteLengthQueuingStrategyHighWaterMark") ? false : s instanceof ro; + } + let pf = () => 1; + o(pf, "size"); + class no { + constructor(i) { + Ne(i, 1, "CountQueuingStrategy"), i = lf(i, "First parameter"), this._countQueuingStrategyHighWaterMark = i.highWaterMark; + } + get highWaterMark() { + if (!gf(this)) throw mf("highWaterMark"); + return this._countQueuingStrategyHighWaterMark; + } + get size() { + if (!gf(this)) throw mf("size"); + return pf; + } + } + Object.defineProperties(no.prototype, { highWaterMark: { enumerable: true }, size: { enumerable: true } }), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(no.prototype, Symbol.toStringTag, { value: "CountQueuingStrategy", configurable: true }); + function mf(s) { + return new TypeError(`CountQueuingStrategy.prototype.${s} can only be used on a CountQueuingStrategy`); + } + function gf(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_countQueuingStrategyHighWaterMark") ? false : s instanceof no; + } + function vy(s, i) { + pe(s, i); + let c = s?.cancel, m = s?.flush, A = s?.readableType, I = s?.start, U = s?.transform, V = s?.writableType; + return { cancel: c === void 0 ? void 0 : Fy(c, s, `${i} has member 'cancel' that`), flush: m === void 0 ? void 0 : Ty(m, s, `${i} has member 'flush' that`), readableType: A, start: I === void 0 ? void 0 : Ry(I, s, `${i} has member 'start' that`), transform: U === void 0 ? void 0 : ky(U, s, `${i} has member 'transform' that`), writableType: V }; + } + function Ty(s, i, c) { + return Ee(s, c), (m) => S(s, i, [m]); + } + function Ry(s, i, c) { + return Ee(s, c), (m) => R(s, i, [m]); + } + function ky(s, i, c) { + return Ee(s, c), (m, A) => S(s, i, [m, A]); + } + function Fy(s, i, c) { + return Ee(s, c), (m) => S(s, i, [m]); + } + class so { + constructor(i = {}, c = {}, m = {}) { + i === void 0 && (i = null); + let A = Ws(c, "Second parameter"), I = Ws(m, "Third parameter"), U = vy(i, "First parameter"); + if (U.readableType !== void 0) throw new RangeError("Invalid readableType specified"); + if (U.writableType !== void 0) throw new RangeError("Invalid writableType specified"); + let V = Qn(I, 0), ae = Gs(I), te = Qn(A, 1), ce = Gs(A), ge, Te = f((Ot) => { + ge = Ot; + }); + Oy(this, Te, te, ce, V, ae), xy(this, U), U.start !== void 0 ? ge(U.start(this._transformStreamController)) : ge(void 0); + } + get readable() { + if (!yf(this)) throw Ef("readable"); + return this._readable; + } + get writable() { + if (!yf(this)) throw Ef("writable"); + return this._writable; + } + } + Object.defineProperties(so.prototype, { readable: { enumerable: true }, writable: { enumerable: true } }), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(so.prototype, Symbol.toStringTag, { value: "TransformStream", configurable: true }); + function Oy(s, i, c, m, A, I) { + function U() { + return i; + } + function V(Te) { + return Ny(s, Te); + } + function ae(Te) { + return qy(s, Te); + } + function te() { + return jy(s); + } + s._writable = Ig(U, V, te, ae, c, m); + function ce() { + return Ly(s); + } + function ge(Te) { + return Uy(s, Te); + } + s._readable = rs(U, ce, ge, A, I), s._backpressure = void 0, s._backpressureChangePromise = void 0, s._backpressureChangePromise_resolve = void 0, oo(s, true), s._transformStreamController = void 0; + } + function yf(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_transformStreamController") ? false : s instanceof so; + } + function _f(s, i) { + kt(s._readable._readableStreamController, i), Ra(s, i); + } + function Ra(s, i) { + ao(s._transformStreamController), Zn(s._writable._writableStreamController, i), ka(s); + } + function ka(s) { + s._backpressure && oo(s, false); + } + function oo(s, i) { + s._backpressureChangePromise !== void 0 && s._backpressureChangePromise_resolve(), s._backpressureChangePromise = f((c) => { + s._backpressureChangePromise_resolve = c; + }), s._backpressure = i; + } + class Dr { + constructor() { + throw new TypeError("Illegal constructor"); + } + get desiredSize() { + if (!io(this)) throw uo("desiredSize"); + let i = this._controlledTransformStream._readable._readableStreamController; + return va(i); + } + enqueue(i = void 0) { + if (!io(this)) throw uo("enqueue"); + Cf(this, i); + } + error(i = void 0) { + if (!io(this)) throw uo("error"); + By(this, i); + } + terminate() { + if (!io(this)) throw uo("terminate"); + Iy(this); + } + } + Object.defineProperties(Dr.prototype, { enqueue: { enumerable: true }, error: { enumerable: true }, terminate: { enumerable: true }, desiredSize: { enumerable: true } }), o(Dr.prototype.enqueue, "enqueue"), o(Dr.prototype.error, "error"), o(Dr.prototype.terminate, "terminate"), typeof Symbol.toStringTag == "symbol" && Object.defineProperty(Dr.prototype, Symbol.toStringTag, { value: "TransformStreamDefaultController", configurable: true }); + function io(s) { + return !t(s) || !Object.prototype.hasOwnProperty.call(s, "_controlledTransformStream") ? false : s instanceof Dr; + } + function Py(s, i, c, m, A) { + i._controlledTransformStream = s, s._transformStreamController = i, i._transformAlgorithm = c, i._flushAlgorithm = m, i._cancelAlgorithm = A, i._finishPromise = void 0, i._finishPromise_resolve = void 0, i._finishPromise_reject = void 0; + } + function xy(s, i) { + let c = Object.create(Dr.prototype), m, A, I; + i.transform !== void 0 ? m = (U) => i.transform(U, c) : m = (U) => { + try { + return Cf(c, U), h(void 0); + } catch (V) { + return d(V); + } + }, i.flush !== void 0 ? A = () => i.flush(c) : A = () => h(void 0), i.cancel !== void 0 ? I = (U) => i.cancel(U) : I = () => h(void 0), Py(s, c, m, A, I); + } + function ao(s) { + s._transformAlgorithm = void 0, s._flushAlgorithm = void 0, s._cancelAlgorithm = void 0; + } + function Cf(s, i) { + let c = s._controlledTransformStream, m = c._readable._readableStreamController; + if (!hn(m)) throw new TypeError("Readable side is not in a state that permits enqueue"); + try { + dn(m, i); + } catch (I) { + throw Ra(c, I), c._readable._storedError; + } + cy(m) !== c._backpressure && oo(c, true); + } + function By(s, i) { + _f(s._controlledTransformStream, i); + } + function bf(s, i) { + let c = s._transformAlgorithm(i); + return w(c, void 0, (m) => { + throw _f(s._controlledTransformStream, m), m; + }); + } + function Iy(s) { + let i = s._controlledTransformStream, c = i._readable._readableStreamController; + Gr(c); + let m = new TypeError("TransformStream terminated"); + Ra(i, m); + } + function Ny(s, i) { + let c = s._transformStreamController; + if (s._backpressure) { + let m = s._backpressureChangePromise; + return w(m, () => { + let A = s._writable; + if (A._state === "erroring") throw A._storedError; + return bf(c, i); + }); + } + return bf(c, i); + } + function qy(s, i) { + let c = s._transformStreamController; + if (c._finishPromise !== void 0) return c._finishPromise; + let m = s._readable; + c._finishPromise = f((I, U) => { + c._finishPromise_resolve = I, c._finishPromise_reject = U; + }); + let A = c._cancelAlgorithm(i); + return ao(c), E(A, () => (m._state === "errored" ? pn(c, m._storedError) : (kt(m._readableStreamController, i), Fa(c)), null), (I) => (kt(m._readableStreamController, I), pn(c, I), null)), c._finishPromise; + } + function jy(s) { + let i = s._transformStreamController; + if (i._finishPromise !== void 0) return i._finishPromise; + let c = s._readable; + i._finishPromise = f((A, I) => { + i._finishPromise_resolve = A, i._finishPromise_reject = I; + }); + let m = i._flushAlgorithm(); + return ao(i), E(m, () => (c._state === "errored" ? pn(i, c._storedError) : (Gr(c._readableStreamController), Fa(i)), null), (A) => (kt(c._readableStreamController, A), pn(i, A), null)), i._finishPromise; + } + function Ly(s) { + return oo(s, false), s._backpressureChangePromise; + } + function Uy(s, i) { + let c = s._transformStreamController; + if (c._finishPromise !== void 0) return c._finishPromise; + let m = s._writable; + c._finishPromise = f((I, U) => { + c._finishPromise_resolve = I, c._finishPromise_reject = U; + }); + let A = c._cancelAlgorithm(i); + return ao(c), E(A, () => (m._state === "errored" ? pn(c, m._storedError) : (Zn(m._writableStreamController, i), ka(s), Fa(c)), null), (I) => (Zn(m._writableStreamController, I), ka(s), pn(c, I), null)), c._finishPromise; + } + function uo(s) { + return new TypeError(`TransformStreamDefaultController.prototype.${s} can only be used on a TransformStreamDefaultController`); + } + function Fa(s) { + s._finishPromise_resolve !== void 0 && (s._finishPromise_resolve(), s._finishPromise_resolve = void 0, s._finishPromise_reject = void 0); + } + function pn(s, i) { + s._finishPromise_reject !== void 0 && (g(s._finishPromise), s._finishPromise_reject(i), s._finishPromise_resolve = void 0, s._finishPromise_reject = void 0); + } + function Ef(s) { + return new TypeError(`TransformStream.prototype.${s} can only be used on a TransformStream`); + } + r.ByteLengthQueuingStrategy = ro, r.CountQueuingStrategy = no, r.ReadableByteStreamController = nr, r.ReadableStream = Ke, r.ReadableStreamBYOBReader = br, r.ReadableStreamBYOBRequest = jr, r.ReadableStreamDefaultController = or, r.ReadableStreamDefaultReader = M, r.TransformStream = so, r.TransformStreamDefaultController = Dr, r.WritableStream = Er, r.WritableStreamDefaultController = fn, r.WritableStreamDefaultWriter = sr; + }); +}); +var xd = z(() => { + if (!globalThis.ReadableStream) try { + let r = X("node:process"), { emitWarning: e } = r; + try { + r.emitWarning = () => { + }, Object.assign(globalThis, X("node:stream/web")), r.emitWarning = e; + } catch (t) { + throw r.emitWarning = e, t; + } + } catch { + Object.assign(globalThis, Pd()); + } + try { + let { Blob: r } = X("buffer"); + r && !r.prototype.stream && (r.prototype.stream = function(t) { + let n = 0, o = this; + return new ReadableStream({ type: "bytes", async pull(a) { + let l = await o.slice(n, Math.min(o.size, n + 65536)).arrayBuffer(); + n += l.byteLength, a.enqueue(new Uint8Array(l)), n === o.size && a.close(); + } }); + }); + } catch { + } +}); +async function* ru(r, e = true) { + for (let t of r) if ("stream" in t) yield* t.stream(); + else if (ArrayBuffer.isView(t)) if (e) { + let n = t.byteOffset, o = t.byteOffset + t.byteLength; + for (; n !== o; ) { + let a = Math.min(o - n, Bd), u = t.buffer.slice(n, n + a); + n += u.byteLength, yield new Uint8Array(u); + } + } else yield t; + else { + let n = 0, o = t; + for (; n !== o.size; ) { + let u = await o.slice(n, Math.min(o.size, n + Bd)).arrayBuffer(); + n += u.byteLength, yield new Uint8Array(u); + } + } +} +var iD; +var Bd; +var Id; +var m_; +var Bt; +var us = Me(() => { + iD = zr(xd(), 1); + Bd = 65536; + Id = class nu { + #e = []; + #t = ""; + #r = 0; + #n = "transparent"; + constructor(e = [], t = {}) { + if (typeof e != "object" || e === null) throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence."); + if (typeof e[Symbol.iterator] != "function") throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property."); + if (typeof t != "object" && typeof t != "function") throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary."); + t === null && (t = {}); + let n = new TextEncoder(); + for (let a of e) { + let u; + ArrayBuffer.isView(a) ? u = new Uint8Array(a.buffer.slice(a.byteOffset, a.byteOffset + a.byteLength)) : a instanceof ArrayBuffer ? u = new Uint8Array(a.slice(0)) : a instanceof nu ? u = a : u = n.encode(`${a}`), this.#r += ArrayBuffer.isView(u) ? u.byteLength : u.size, this.#e.push(u); + } + this.#n = `${t.endings === void 0 ? "transparent" : t.endings}`; + let o = t.type === void 0 ? "" : String(t.type); + this.#t = /^[\x20-\x7E]*$/.test(o) ? o : ""; + } + get size() { + return this.#r; + } + get type() { + return this.#t; + } + async text() { + let e = new TextDecoder(), t = ""; + for await (let n of ru(this.#e, false)) t += e.decode(n, { stream: true }); + return t += e.decode(), t; + } + async arrayBuffer() { + let e = new Uint8Array(this.size), t = 0; + for await (let n of ru(this.#e, false)) e.set(n, t), t += n.length; + return e.buffer; + } + stream() { + let e = ru(this.#e, true); + return new globalThis.ReadableStream({ type: "bytes", async pull(t) { + let n = await e.next(); + n.done ? t.close() : t.enqueue(n.value); + }, async cancel() { + await e.return(); + } }); + } + slice(e = 0, t = this.size, n = "") { + let { size: o } = this, a = e < 0 ? Math.max(o + e, 0) : Math.min(e, o), u = t < 0 ? Math.max(o + t, 0) : Math.min(t, o), l = Math.max(u - a, 0), f = this.#e, h = [], d = 0; + for (let E of f) { + if (d >= l) break; + let P = ArrayBuffer.isView(E) ? E.byteLength : E.size; + if (a && P <= a) a -= P, u -= P; + else { + let v; + ArrayBuffer.isView(E) ? (v = E.subarray(a, Math.min(P, u)), d += v.byteLength) : (v = E.slice(a, Math.min(P, u)), d += v.size), u -= P, h.push(v), a = 0; + } + } + let _ = new nu([], { type: String(n).toLowerCase() }); + return _.#r = l, _.#e = h, _; + } + get [Symbol.toStringTag]() { + return "Blob"; + } + static [Symbol.hasInstance](e) { + return e && typeof e == "object" && typeof e.constructor == "function" && (typeof e.stream == "function" || typeof e.arrayBuffer == "function") && /^(Blob|File)$/.test(e[Symbol.toStringTag]); + } + }; + Object.defineProperties(Id.prototype, { size: { enumerable: true }, type: { enumerable: true }, slice: { enumerable: true } }); + m_ = Id, Bt = m_; +}); +var g_; +var y_; +var Rr; +var su = Me(() => { + us(); + g_ = class extends Bt { + #e = 0; + #t = ""; + constructor(e, t, n = {}) { + if (arguments.length < 2) throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`); + super(e, n), n === null && (n = {}); + let o = n.lastModified === void 0 ? Date.now() : Number(n.lastModified); + Number.isNaN(o) || (this.#e = o), this.#t = String(t); + } + get name() { + return this.#t; + } + get lastModified() { + return this.#e; + } + get [Symbol.toStringTag]() { + return "File"; + } + static [Symbol.hasInstance](e) { + return !!e && e instanceof Bt && /^(File)$/.test(e[Symbol.toStringTag]); + } + }, y_ = g_, Rr = y_; +}); +function jd(r, e = Bt) { + var t = `${Nd()}${Nd()}`.replace(/\./g, "").slice(-28).padStart(32, "-"), n = [], o = `--${t}\r +Content-Disposition: form-data; name="`; + return r.forEach((a, u) => typeof a == "string" ? n.push(o + ou(u) + `"\r +\r +${a.replace(/\r(?!\n)|(? { + us(); + su(); + ({ toStringTag: cs, iterator: __, hasInstance: C_ } = Symbol), Nd = Math.random, b_ = "append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","), qd = (r, e, t) => (r += "", /^(Blob|File)$/.test(e && e[cs]) ? [(t = t !== void 0 ? t + "" : e[cs] == "File" ? e.name : "blob", r), e.name !== t || e[cs] == "blob" ? new Rr([e], t, e) : e] : [r, e + ""]), ou = (r, e) => (e ? r : r.replace(/\r?\n|\r/g, `\r +`)).replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), Yr = (r, e, t) => { + if (e.length < t) throw new TypeError(`Failed to execute '${r}' on 'FormData': ${t} arguments required, but only ${e.length} present.`); + }, kr = class { + #e = []; + constructor(...e) { + if (e.length) throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'."); + } + get [cs]() { + return "FormData"; + } + [__]() { + return this.entries(); + } + static [C_](e) { + return e && typeof e == "object" && e[cs] === "FormData" && !b_.some((t) => typeof e[t] != "function"); + } + append(...e) { + Yr("append", arguments, 2), this.#e.push(qd(...e)); + } + delete(e) { + Yr("delete", arguments, 1), e += "", this.#e = this.#e.filter(([t]) => t !== e); + } + get(e) { + Yr("get", arguments, 1), e += ""; + for (var t = this.#e, n = t.length, o = 0; o < n; o++) if (t[o][0] === e) return t[o][1]; + return null; + } + getAll(e, t) { + return Yr("getAll", arguments, 1), t = [], e += "", this.#e.forEach((n) => n[0] === e && t.push(n[1])), t; + } + has(e) { + return Yr("has", arguments, 1), e += "", this.#e.some((t) => t[0] === e); + } + forEach(e, t) { + Yr("forEach", arguments, 1); + for (var [n, o] of this) e.call(t, o, n, this); + } + set(...e) { + Yr("set", arguments, 2); + var t = [], n = true; + e = qd(...e), this.#e.forEach((o) => { + o[0] === e[0] ? n && (n = !t.push(e)) : t.push(o); + }), n && t.push(e), this.#e = t; + } + *entries() { + yield* this.#e; + } + *keys() { + for (var [e] of this) yield e; + } + *values() { + for (var [, e] of this) yield e; + } + }; +}); +var fr; +var No = Me(() => { + fr = class extends Error { + constructor(e, t) { + super(e), Error.captureStackTrace(this, this.constructor), this.type = t; + } + get name() { + return this.constructor.name; + } + get [Symbol.toStringTag]() { + return this.constructor.name; + } + }; +}); +var et; +var iu = Me(() => { + No(); + et = class extends fr { + constructor(e, t, n) { + super(e, t), n && (this.code = this.errno = n.code, this.erroredSysCall = n.syscall); + } + }; +}); +var qo; +var au; +var ls; +var Ld; +var Ud; +var Md; +var jo = Me(() => { + qo = Symbol.toStringTag, au = (r) => typeof r == "object" && typeof r.append == "function" && typeof r.delete == "function" && typeof r.get == "function" && typeof r.getAll == "function" && typeof r.has == "function" && typeof r.set == "function" && typeof r.sort == "function" && r[qo] === "URLSearchParams", ls = (r) => r && typeof r == "object" && typeof r.arrayBuffer == "function" && typeof r.type == "string" && typeof r.stream == "function" && typeof r.constructor == "function" && /^(Blob|File)$/.test(r[qo]), Ld = (r) => typeof r == "object" && (r[qo] === "AbortSignal" || r[qo] === "EventTarget"), Ud = (r, e) => { + let t = new URL(e).hostname, n = new URL(r).hostname; + return t === n || t.endsWith(`.${n}`); + }, Md = (r, e) => { + let t = new URL(e).protocol, n = new URL(r).protocol; + return t === n; + }; +}); +var Hd = z((CD, $d) => { + if (!globalThis.DOMException) try { + let { MessageChannel: r } = X("worker_threads"), e = new r().port1, t = new ArrayBuffer(); + e.postMessage(t, [t, t]); + } catch (r) { + r.constructor.name === "DOMException" && (globalThis.DOMException = r.constructor); + } + $d.exports = globalThis.DOMException; +}); +var Wd; +var uu; +var zd; +var Jd; +var Vd; +var Kd; +var Yd; +var Xd; +var Lo; +var cu = Me(() => { + Wd = zr(Hd(), 1); + su(); + us(); + ({ stat: uu } = import_node_fs.promises), zd = (r, e) => Yd((0, import_node_fs.statSync)(r), r, e), Jd = (r, e) => uu(r).then((t) => Yd(t, r, e)), Vd = (r, e) => uu(r).then((t) => Xd(t, r, e)), Kd = (r, e) => Xd((0, import_node_fs.statSync)(r), r, e), Yd = (r, e, t = "") => new Bt([new Lo({ path: e, size: r.size, lastModified: r.mtimeMs, start: 0 })], { type: t }), Xd = (r, e, t = "") => new Rr([new Lo({ path: e, size: r.size, lastModified: r.mtimeMs, start: 0 })], (0, import_node_path4.basename)(e), { type: t, lastModified: r.mtimeMs }), Lo = class r { + #e; + #t; + constructor(e) { + this.#e = e.path, this.#t = e.start, this.size = e.size, this.lastModified = e.lastModified; + } + slice(e, t) { + return new r({ path: this.#e, lastModified: this.lastModified, size: t - e, start: this.#t + e }); + } + async *stream() { + let { mtimeMs: e } = await uu(this.#e); + if (e > this.lastModified) throw new Wd.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.", "NotReadableError"); + yield* (0, import_node_fs.createReadStream)(this.#e, { start: this.#t, end: this.#t + this.size - 1 }); + } + get [Symbol.toStringTag]() { + return "Blob"; + } + }; +}); +var Zd = {}; +Af(Zd, { toFormData: () => F_ }); +function k_(r) { + let e = r.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i); + if (!e) return; + let t = e[2] || e[3] || "", n = t.slice(t.lastIndexOf("\\") + 1); + return n = n.replace(/%22/g, '"'), n = n.replace(/&#(\d{4});/g, (o, a) => String.fromCharCode(a)), n; +} +async function F_(r, e) { + if (!/multipart/i.test(e)) throw new TypeError("Failed to fetch"); + let t = e.match(/boundary=(?:"([^"]+)"|([^;]+))/i); + if (!t) throw new TypeError("no or bad content-type header, no multipart boundary"); + let n = new lu(t[1] || t[2]), o, a, u, l, f, h, d = [], _ = new kr(), E = (C) => { + u += g.decode(C, { stream: true }); + }, P = (C) => { + d.push(C); + }, v = () => { + let C = new Rr(d, h, { type: f }); + _.append(l, C); + }, w = () => { + _.append(l, u); + }, g = new TextDecoder("utf-8"); + g.decode(), n.onPartBegin = function() { + n.onPartData = E, n.onPartEnd = w, o = "", a = "", u = "", l = "", f = "", h = null, d.length = 0; + }, n.onHeaderField = function(C) { + o += g.decode(C, { stream: true }); + }, n.onHeaderValue = function(C) { + a += g.decode(C, { stream: true }); + }, n.onHeaderEnd = function() { + if (a += g.decode(), o = o.toLowerCase(), o === "content-disposition") { + let C = a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i); + C && (l = C[2] || C[3] || ""), h = k_(a), h && (n.onPartData = P, n.onPartEnd = v); + } else o === "content-type" && (f = a); + a = "", o = ""; + }; + for await (let C of r) n.write(C); + return n.end(), _; +} +var Wt; +var ke; +var Qd; +var Fr; +var Uo; +var Mo; +var D_; +var fs3; +var S_; +var v_; +var T_; +var R_; +var Xr; +var lu; +var eh = Me(() => { + cu(); + Io(); + Wt = 0, ke = { START_BOUNDARY: Wt++, HEADER_FIELD_START: Wt++, HEADER_FIELD: Wt++, HEADER_VALUE_START: Wt++, HEADER_VALUE: Wt++, HEADER_VALUE_ALMOST_DONE: Wt++, HEADERS_ALMOST_DONE: Wt++, PART_DATA_START: Wt++, PART_DATA: Wt++, END: Wt++ }, Qd = 1, Fr = { PART_BOUNDARY: Qd, LAST_BOUNDARY: Qd *= 2 }, Uo = 10, Mo = 13, D_ = 32, fs3 = 45, S_ = 58, v_ = 97, T_ = 122, R_ = (r) => r | 32, Xr = () => { + }, lu = class { + constructor(e) { + this.index = 0, this.flags = 0, this.onHeaderEnd = Xr, this.onHeaderField = Xr, this.onHeadersEnd = Xr, this.onHeaderValue = Xr, this.onPartBegin = Xr, this.onPartData = Xr, this.onPartEnd = Xr, this.boundaryChars = {}, e = `\r +--` + e; + let t = new Uint8Array(e.length); + for (let n = 0; n < e.length; n++) t[n] = e.charCodeAt(n), this.boundaryChars[t[n]] = true; + this.boundary = t, this.lookbehind = new Uint8Array(this.boundary.length + 8), this.state = ke.START_BOUNDARY; + } + write(e) { + let t = 0, n = e.length, o = this.index, { lookbehind: a, boundary: u, boundaryChars: l, index: f, state: h, flags: d } = this, _ = this.boundary.length, E = _ - 1, P = e.length, v, w, g = (N) => { + this[N + "Mark"] = t; + }, C = (N) => { + delete this[N + "Mark"]; + }, R = (N, j, L, H) => { + (j === void 0 || j !== L) && this[N](H && H.subarray(j, L)); + }, S = (N, j) => { + let L = N + "Mark"; + L in this && (j ? (R(N, this[L], t, e), delete this[L]) : (R(N, this[L], e.length, e), this[L] = 0)); + }; + for (t = 0; t < n; t++) switch (v = e[t], h) { + case ke.START_BOUNDARY: + if (f === u.length - 2) { + if (v === fs3) d |= Fr.LAST_BOUNDARY; + else if (v !== Mo) return; + f++; + break; + } else if (f - 1 === u.length - 2) { + if (d & Fr.LAST_BOUNDARY && v === fs3) h = ke.END, d = 0; + else if (!(d & Fr.LAST_BOUNDARY) && v === Uo) f = 0, R("onPartBegin"), h = ke.HEADER_FIELD_START; + else return; + break; + } + v !== u[f + 2] && (f = -2), v === u[f + 2] && f++; + break; + case ke.HEADER_FIELD_START: + h = ke.HEADER_FIELD, g("onHeaderField"), f = 0; + case ke.HEADER_FIELD: + if (v === Mo) { + C("onHeaderField"), h = ke.HEADERS_ALMOST_DONE; + break; + } + if (f++, v === fs3) break; + if (v === S_) { + if (f === 1) return; + S("onHeaderField", true), h = ke.HEADER_VALUE_START; + break; + } + if (w = R_(v), w < v_ || w > T_) return; + break; + case ke.HEADER_VALUE_START: + if (v === D_) break; + g("onHeaderValue"), h = ke.HEADER_VALUE; + case ke.HEADER_VALUE: + v === Mo && (S("onHeaderValue", true), R("onHeaderEnd"), h = ke.HEADER_VALUE_ALMOST_DONE); + break; + case ke.HEADER_VALUE_ALMOST_DONE: + if (v !== Uo) return; + h = ke.HEADER_FIELD_START; + break; + case ke.HEADERS_ALMOST_DONE: + if (v !== Uo) return; + R("onHeadersEnd"), h = ke.PART_DATA_START; + break; + case ke.PART_DATA_START: + h = ke.PART_DATA, g("onPartData"); + case ke.PART_DATA: + if (o = f, f === 0) { + for (t += E; t < P && !(e[t] in l); ) t += _; + t -= E, v = e[t]; + } + if (f < u.length) u[f] === v ? (f === 0 && S("onPartData", true), f++) : f = 0; + else if (f === u.length) f++, v === Mo ? d |= Fr.PART_BOUNDARY : v === fs3 ? d |= Fr.LAST_BOUNDARY : f = 0; + else if (f - 1 === u.length) if (d & Fr.PART_BOUNDARY) { + if (f = 0, v === Uo) { + d &= ~Fr.PART_BOUNDARY, R("onPartEnd"), R("onPartBegin"), h = ke.HEADER_FIELD_START; + break; + } + } else d & Fr.LAST_BOUNDARY && v === fs3 ? (R("onPartEnd"), h = ke.END, d = 0) : f = 0; + if (f > 0) a[f - 1] = v; + else if (o > 0) { + let N = new Uint8Array(a.buffer, a.byteOffset, a.byteLength); + R("onPartData", 0, o, N), o = 0, g("onPartData"), t--; + } + break; + case ke.END: + break; + default: + throw new Error(`Unexpected state entered: ${h}`); + } + S("onHeaderField"), S("onHeaderValue"), S("onPartData"), this.index = f, this.state = h, this.flags = d; + } + end() { + if (this.state === ke.HEADER_FIELD_START && this.index === 0 || this.state === ke.PART_DATA && this.index === this.boundary.length) this.onPartEnd(); + else if (this.state !== ke.END) throw new Error("MultipartParser.end(): stream ended unexpectedly"); + } + }; +}); +async function fu(r) { + if (r[it].disturbed) throw new TypeError(`body used already for: ${r.url}`); + if (r[it].disturbed = true, r[it].error) throw r[it].error; + let { body: e } = r; + if (e === null) return import_node_buffer.Buffer.alloc(0); + if (!(e instanceof import_node_stream.default)) return import_node_buffer.Buffer.alloc(0); + let t = [], n = 0; + try { + for await (let o of e) { + if (r.size > 0 && n + o.length > r.size) { + let a = new et(`content size at ${r.url} over limit: ${r.size}`, "max-size"); + throw e.destroy(a), a; + } + n += o.length, t.push(o); + } + } catch (o) { + throw o instanceof fr ? o : new et(`Invalid response body while trying to fetch ${r.url}: ${o.message}`, "system", o); + } + if (e.readableEnded === true || e._readableState.ended === true) try { + return t.every((o) => typeof o == "string") ? import_node_buffer.Buffer.from(t.join("")) : import_node_buffer.Buffer.concat(t, n); + } catch (o) { + throw new et(`Could not create Buffer from response body for ${r.url}: ${o.message}`, "system", o); + } + else throw new et(`Premature close of server response while trying to fetch ${r.url}`); +} +var P_; +var it; +var zt; +var Sn; +var x_; +var $o; +var nh; +var sh; +var Ho = Me(() => { + us(); + Io(); + iu(); + No(); + jo(); + P_ = (0, import_node_util.promisify)(import_node_stream.default.pipeline), it = Symbol("Body internals"), zt = class { + constructor(e, { size: t = 0 } = {}) { + let n = null; + e === null ? e = null : au(e) ? e = import_node_buffer.Buffer.from(e.toString()) : ls(e) || import_node_buffer.Buffer.isBuffer(e) || (import_node_util.types.isAnyArrayBuffer(e) ? e = import_node_buffer.Buffer.from(e) : ArrayBuffer.isView(e) ? e = import_node_buffer.Buffer.from(e.buffer, e.byteOffset, e.byteLength) : e instanceof import_node_stream.default || (e instanceof kr ? (e = jd(e), n = e.type.split("=")[1]) : e = import_node_buffer.Buffer.from(String(e)))); + let o = e; + import_node_buffer.Buffer.isBuffer(e) ? o = import_node_stream.default.Readable.from(e) : ls(e) && (o = import_node_stream.default.Readable.from(e.stream())), this[it] = { body: e, stream: o, boundary: n, disturbed: false, error: null }, this.size = t, e instanceof import_node_stream.default && e.on("error", (a) => { + let u = a instanceof fr ? a : new et(`Invalid response body while trying to fetch ${this.url}: ${a.message}`, "system", a); + this[it].error = u; + }); + } + get body() { + return this[it].stream; + } + get bodyUsed() { + return this[it].disturbed; + } + async arrayBuffer() { + let { buffer: e, byteOffset: t, byteLength: n } = await fu(this); + return e.slice(t, t + n); + } + async formData() { + let e = this.headers.get("content-type"); + if (e.startsWith("application/x-www-form-urlencoded")) { + let n = new kr(), o = new URLSearchParams(await this.text()); + for (let [a, u] of o) n.append(a, u); + return n; + } + let { toFormData: t } = await Promise.resolve().then(() => (eh(), Zd)); + return t(this.body, e); + } + async blob() { + let e = this.headers && this.headers.get("content-type") || this[it].body && this[it].body.type || "", t = await this.arrayBuffer(); + return new Bt([t], { type: e }); + } + async json() { + let e = await this.text(); + return JSON.parse(e); + } + async text() { + let e = await fu(this); + return new TextDecoder().decode(e); + } + buffer() { + return fu(this); + } + }; + zt.prototype.buffer = (0, import_node_util.deprecate)(zt.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer"); + Object.defineProperties(zt.prototype, { body: { enumerable: true }, bodyUsed: { enumerable: true }, arrayBuffer: { enumerable: true }, blob: { enumerable: true }, json: { enumerable: true }, text: { enumerable: true }, data: { get: (0, import_node_util.deprecate)(() => { + }, "data doesn't exist, use json(), text(), arrayBuffer(), or body instead", "https://github.com/node-fetch/node-fetch/issues/1000 (response)") } }); + Sn = (r, e) => { + let t, n, { body: o } = r[it]; + if (r.bodyUsed) throw new Error("cannot clone body after it is used"); + return o instanceof import_node_stream.default && typeof o.getBoundary != "function" && (t = new import_node_stream.PassThrough({ highWaterMark: e }), n = new import_node_stream.PassThrough({ highWaterMark: e }), o.pipe(t), o.pipe(n), r[it].stream = t, o = n), o; + }, x_ = (0, import_node_util.deprecate)((r) => r.getBoundary(), "form-data doesn't follow the spec and requires special treatment. Use alternative package", "https://github.com/node-fetch/node-fetch/issues/1167"), $o = (r, e) => r === null ? null : typeof r == "string" ? "text/plain;charset=UTF-8" : au(r) ? "application/x-www-form-urlencoded;charset=UTF-8" : ls(r) ? r.type || null : import_node_buffer.Buffer.isBuffer(r) || import_node_util.types.isAnyArrayBuffer(r) || ArrayBuffer.isView(r) ? null : r instanceof kr ? `multipart/form-data; boundary=${e[it].boundary}` : r && typeof r.getBoundary == "function" ? `multipart/form-data;boundary=${x_(r)}` : r instanceof import_node_stream.default ? null : "text/plain;charset=UTF-8", nh = (r) => { + let { body: e } = r[it]; + return e === null ? 0 : ls(e) ? e.size : import_node_buffer.Buffer.isBuffer(e) ? e.length : e && typeof e.getLengthSync == "function" && e.hasKnownLength && e.hasKnownLength() ? e.getLengthSync() : null; + }, sh = async (r, { body: e }) => { + e === null ? r.end() : await P_(e, r); + }; +}); +function ih(r = []) { + return new at(r.reduce((e, t, n, o) => (n % 2 === 0 && e.push(o.slice(n, n + 2)), e), []).filter(([e, t]) => { + try { + return Go(e), hu(e, String(t)), true; + } catch { + return false; + } + })); +} +var Go; +var hu; +var at; +var zo = Me(() => { + Go = typeof import_node_http.default.validateHeaderName == "function" ? import_node_http.default.validateHeaderName : (r) => { + if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(r)) { + let e = new TypeError(`Header name must be a valid HTTP token [${r}]`); + throw Object.defineProperty(e, "code", { value: "ERR_INVALID_HTTP_TOKEN" }), e; + } + }, hu = typeof import_node_http.default.validateHeaderValue == "function" ? import_node_http.default.validateHeaderValue : (r, e) => { + if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)) { + let t = new TypeError(`Invalid character in header content ["${r}"]`); + throw Object.defineProperty(t, "code", { value: "ERR_INVALID_CHAR" }), t; + } + }, at = class r extends URLSearchParams { + constructor(e) { + let t = []; + if (e instanceof r) { + let n = e.raw(); + for (let [o, a] of Object.entries(n)) t.push(...a.map((u) => [o, u])); + } else if (e != null) if (typeof e == "object" && !import_node_util2.types.isBoxedPrimitive(e)) { + let n = e[Symbol.iterator]; + if (n == null) t.push(...Object.entries(e)); + else { + if (typeof n != "function") throw new TypeError("Header pairs must be iterable"); + t = [...e].map((o) => { + if (typeof o != "object" || import_node_util2.types.isBoxedPrimitive(o)) throw new TypeError("Each header pair must be an iterable object"); + return [...o]; + }).map((o) => { + if (o.length !== 2) throw new TypeError("Each header pair must be a name/value tuple"); + return [...o]; + }); + } + } else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence> or record)"); + return t = t.length > 0 ? t.map(([n, o]) => (Go(n), hu(n, String(o)), [String(n).toLowerCase(), String(o)])) : void 0, super(t), new Proxy(this, { get(n, o, a) { + switch (o) { + case "append": + case "set": + return (u, l) => (Go(u), hu(u, String(l)), URLSearchParams.prototype[o].call(n, String(u).toLowerCase(), String(l))); + case "delete": + case "has": + case "getAll": + return (u) => (Go(u), URLSearchParams.prototype[o].call(n, String(u).toLowerCase())); + case "keys": + return () => (n.sort(), new Set(URLSearchParams.prototype.keys.call(n)).keys()); + default: + return Reflect.get(n, o, a); + } + } }); + } + get [Symbol.toStringTag]() { + return this.constructor.name; + } + toString() { + return Object.prototype.toString.call(this); + } + get(e) { + let t = this.getAll(e); + if (t.length === 0) return null; + let n = t.join(", "); + return /^content-encoding$/i.test(e) && (n = n.toLowerCase()), n; + } + forEach(e, t = void 0) { + for (let n of this.keys()) Reflect.apply(e, t, [this.get(n), n, this]); + } + *values() { + for (let e of this.keys()) yield this.get(e); + } + *entries() { + for (let e of this.keys()) yield [e, this.get(e)]; + } + [Symbol.iterator]() { + return this.entries(); + } + raw() { + return [...this.keys()].reduce((e, t) => (e[t] = this.getAll(t), e), {}); + } + [Symbol.for("nodejs.util.inspect.custom")]() { + return [...this.keys()].reduce((e, t) => { + let n = this.getAll(t); + return t === "host" ? e[t] = n[0] : e[t] = n.length > 1 ? n : n[0], e; + }, {}); + } + }; + Object.defineProperties(at.prototype, ["get", "entries", "forEach", "values"].reduce((r, e) => (r[e] = { enumerable: true }, r), {})); +}); +var B_; +var ds; +var pu = Me(() => { + B_ = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]), ds = (r) => B_.has(r); +}); +var It; +var ft; +var ah = Me(() => { + zo(); + Ho(); + pu(); + It = Symbol("Response internals"), ft = class r extends zt { + constructor(e = null, t = {}) { + super(e, t); + let n = t.status != null ? t.status : 200, o = new at(t.headers); + if (e !== null && !o.has("Content-Type")) { + let a = $o(e, this); + a && o.append("Content-Type", a); + } + this[It] = { type: "default", url: t.url, status: n, statusText: t.statusText || "", headers: o, counter: t.counter, highWaterMark: t.highWaterMark }; + } + get type() { + return this[It].type; + } + get url() { + return this[It].url || ""; + } + get status() { + return this[It].status; + } + get ok() { + return this[It].status >= 200 && this[It].status < 300; + } + get redirected() { + return this[It].counter > 0; + } + get statusText() { + return this[It].statusText; + } + get headers() { + return this[It].headers; + } + get highWaterMark() { + return this[It].highWaterMark; + } + clone() { + return new r(Sn(this, this.highWaterMark), { type: this.type, url: this.url, status: this.status, statusText: this.statusText, headers: this.headers, ok: this.ok, redirected: this.redirected, size: this.size, highWaterMark: this.highWaterMark }); + } + static redirect(e, t = 302) { + if (!ds(t)) throw new RangeError('Failed to execute "redirect" on "response": Invalid status code'); + return new r(null, { headers: { location: new URL(e).toString() }, status: t }); + } + static error() { + let e = new r(null, { status: 0, statusText: "" }); + return e[It].type = "error", e; + } + static json(e = void 0, t = {}) { + let n = JSON.stringify(e); + if (n === void 0) throw new TypeError("data is not JSON serializable"); + let o = new at(t && t.headers); + return o.has("content-type") || o.set("content-type", "application/json"), new r(n, { ...t, headers: o }); + } + get [Symbol.toStringTag]() { + return "Response"; + } + }; + Object.defineProperties(ft.prototype, { type: { enumerable: true }, url: { enumerable: true }, status: { enumerable: true }, ok: { enumerable: true }, redirected: { enumerable: true }, statusText: { enumerable: true }, headers: { enumerable: true }, clone: { enumerable: true } }); +}); +var uh; +var ch = Me(() => { + uh = (r) => { + if (r.search) return r.search; + let e = r.href.length - 1, t = r.hash || (r.href[e] === "#" ? "#" : ""); + return r.href[e - t.length] === "?" ? "?" : ""; + }; +}); +function lh(r, e = false) { + return r == null || (r = new URL(r), /^(about|blob|data):$/.test(r.protocol)) ? "no-referrer" : (r.username = "", r.password = "", r.hash = "", e && (r.pathname = "", r.search = ""), r); +} +function hh(r) { + if (!fh.has(r)) throw new TypeError(`Invalid referrerPolicy: ${r}`); + return r; +} +function N_(r) { + if (/^(http|ws)s:$/.test(r.protocol)) return true; + let e = r.host.replace(/(^\[)|(]$)/g, ""), t = (0, import_node_net.isIP)(e); + return t === 4 && /^127\./.test(e) || t === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e) ? true : r.host === "localhost" || r.host.endsWith(".localhost") ? false : r.protocol === "file:"; +} +function vn(r) { + return /^about:(blank|srcdoc)$/.test(r) || r.protocol === "data:" || /^(blob|filesystem):$/.test(r.protocol) ? true : N_(r); +} +function ph(r, { referrerURLCallback: e, referrerOriginCallback: t } = {}) { + if (r.referrer === "no-referrer" || r.referrerPolicy === "") return null; + let n = r.referrerPolicy; + if (r.referrer === "about:client") return "no-referrer"; + let o = r.referrer, a = lh(o), u = lh(o, true); + a.toString().length > 4096 && (a = u), e && (a = e(a)), t && (u = t(u)); + let l = new URL(r.url); + switch (n) { + case "no-referrer": + return "no-referrer"; + case "origin": + return u; + case "unsafe-url": + return a; + case "strict-origin": + return vn(a) && !vn(l) ? "no-referrer" : u.toString(); + case "strict-origin-when-cross-origin": + return a.origin === l.origin ? a : vn(a) && !vn(l) ? "no-referrer" : u; + case "same-origin": + return a.origin === l.origin ? a : "no-referrer"; + case "origin-when-cross-origin": + return a.origin === l.origin ? a : u; + case "no-referrer-when-downgrade": + return vn(a) && !vn(l) ? "no-referrer" : a; + default: + throw new TypeError(`Invalid referrerPolicy: ${n}`); + } +} +function mh(r) { + let e = (r.get("referrer-policy") || "").split(/[,\s]+/), t = ""; + for (let n of e) n && fh.has(n) && (t = n); + return t; +} +var fh; +var dh; +var mu = Me(() => { + fh = /* @__PURE__ */ new Set(["", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url"]), dh = "strict-origin-when-cross-origin"; +}); +var We; +var hs; +var L_; +var Pr; +var gh; +var yh = Me(() => { + zo(); + Ho(); + jo(); + ch(); + mu(); + We = Symbol("Request internals"), hs = (r) => typeof r == "object" && typeof r[We] == "object", L_ = (0, import_node_util3.deprecate)(() => { + }, ".data is not a valid RequestInit property, use .body instead", "https://github.com/node-fetch/node-fetch/issues/1000 (request)"), Pr = class r extends zt { + constructor(e, t = {}) { + let n; + if (hs(e) ? n = new URL(e.url) : (n = new URL(e), e = {}), n.username !== "" || n.password !== "") throw new TypeError(`${n} is an url with embedded credentials.`); + let o = t.method || e.method || "GET"; + if (/^(delete|get|head|options|post|put)$/i.test(o) && (o = o.toUpperCase()), !hs(t) && "data" in t && L_(), (t.body != null || hs(e) && e.body !== null) && (o === "GET" || o === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body"); + let a = t.body ? t.body : hs(e) && e.body !== null ? Sn(e) : null; + super(a, { size: t.size || e.size || 0 }); + let u = new at(t.headers || e.headers || {}); + if (a !== null && !u.has("Content-Type")) { + let h = $o(a, this); + h && u.set("Content-Type", h); + } + let l = hs(e) ? e.signal : null; + if ("signal" in t && (l = t.signal), l != null && !Ld(l)) throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget"); + let f = t.referrer == null ? e.referrer : t.referrer; + if (f === "") f = "no-referrer"; + else if (f) { + let h = new URL(f); + f = /^about:(\/\/)?client$/.test(h) ? "client" : h; + } else f = void 0; + this[We] = { method: o, redirect: t.redirect || e.redirect || "follow", headers: u, parsedURL: n, signal: l, referrer: f }, this.follow = t.follow === void 0 ? e.follow === void 0 ? 20 : e.follow : t.follow, this.compress = t.compress === void 0 ? e.compress === void 0 ? true : e.compress : t.compress, this.counter = t.counter || e.counter || 0, this.agent = t.agent || e.agent, this.highWaterMark = t.highWaterMark || e.highWaterMark || 16384, this.insecureHTTPParser = t.insecureHTTPParser || e.insecureHTTPParser || false, this.referrerPolicy = t.referrerPolicy || e.referrerPolicy || ""; + } + get method() { + return this[We].method; + } + get url() { + return (0, import_node_url.format)(this[We].parsedURL); + } + get headers() { + return this[We].headers; + } + get redirect() { + return this[We].redirect; + } + get signal() { + return this[We].signal; + } + get referrer() { + if (this[We].referrer === "no-referrer") return ""; + if (this[We].referrer === "client") return "about:client"; + if (this[We].referrer) return this[We].referrer.toString(); + } + get referrerPolicy() { + return this[We].referrerPolicy; + } + set referrerPolicy(e) { + this[We].referrerPolicy = hh(e); + } + clone() { + return new r(this); + } + get [Symbol.toStringTag]() { + return "Request"; + } + }; + Object.defineProperties(Pr.prototype, { method: { enumerable: true }, url: { enumerable: true }, headers: { enumerable: true }, redirect: { enumerable: true }, clone: { enumerable: true }, signal: { enumerable: true }, referrer: { enumerable: true }, referrerPolicy: { enumerable: true } }); + gh = (r) => { + let { parsedURL: e } = r[We], t = new at(r[We].headers); + t.has("Accept") || t.set("Accept", "*/*"); + let n = null; + if (r.body === null && /^(post|put)$/i.test(r.method) && (n = "0"), r.body !== null) { + let l = nh(r); + typeof l == "number" && !Number.isNaN(l) && (n = String(l)); + } + n && t.set("Content-Length", n), r.referrerPolicy === "" && (r.referrerPolicy = dh), r.referrer && r.referrer !== "no-referrer" ? r[We].referrer = ph(r) : r[We].referrer = "no-referrer", r[We].referrer instanceof URL && t.set("Referer", r.referrer), t.has("User-Agent") || t.set("User-Agent", "node-fetch"), r.compress && !t.has("Accept-Encoding") && t.set("Accept-Encoding", "gzip, deflate, br"); + let { agent: o } = r; + typeof o == "function" && (o = o(e)); + let a = uh(e), u = { path: e.pathname + a, method: r.method, headers: t[Symbol.for("nodejs.util.inspect.custom")](), insecureHTTPParser: r.insecureHTTPParser, agent: o }; + return { parsedURL: e, options: u }; + }; +}); +var ps; +var _h = Me(() => { + No(); + ps = class extends fr { + constructor(e, t = "aborted") { + super(e, t); + } + }; +}); +var Eh = {}; +Af(Eh, { AbortError: () => ps, Blob: () => Bt, FetchError: () => et, File: () => Rr, FormData: () => kr, Headers: () => at, Request: () => Pr, Response: () => ft, blobFrom: () => Jd, blobFromSync: () => zd, default: () => gu, fileFrom: () => Vd, fileFromSync: () => Kd, isRedirect: () => ds }); +async function gu(r, e) { + return new Promise((t, n) => { + let o = new Pr(r, e), { parsedURL: a, options: u } = gh(o); + if (!$_.has(a.protocol)) throw new TypeError(`node-fetch cannot load ${r}. URL scheme "${a.protocol.replace(/:$/, "")}" is not supported.`); + if (a.protocol === "data:") { + let v = kd(o.url), w = new ft(v, { headers: { "Content-Type": v.typeFull } }); + t(w); + return; + } + let l = (a.protocol === "https:" ? import_node_https.default : import_node_http2.default).request, { signal: f } = o, h = null, d = () => { + let v = new ps("The operation was aborted."); + n(v), o.body && o.body instanceof import_node_stream2.default.Readable && o.body.destroy(v), !(!h || !h.body) && h.body.emit("error", v); + }; + if (f && f.aborted) { + d(); + return; + } + let _ = () => { + d(), P(); + }, E = l(a.toString(), u); + f && f.addEventListener("abort", _); + let P = () => { + E.abort(), f && f.removeEventListener("abort", _); + }; + E.on("error", (v) => { + n(new et(`request to ${o.url} failed, reason: ${v.message}`, "system", v)), P(); + }), H_(E, (v) => { + h && h.body && h.body.destroy(v); + }), process.version < "v14" && E.on("socket", (v) => { + let w; + v.prependListener("end", () => { + w = v._eventsCount; + }), v.prependListener("close", (g) => { + if (h && w < v._eventsCount && !g) { + let C = new Error("Premature close"); + C.code = "ERR_STREAM_PREMATURE_CLOSE", h.body.emit("error", C); + } + }); + }), E.on("response", (v) => { + E.setTimeout(0); + let w = ih(v.rawHeaders); + if (ds(v.statusCode)) { + let N = w.get("Location"), j = null; + try { + j = N === null ? null : new URL(N, o.url); + } catch { + if (o.redirect !== "manual") { + n(new et(`uri requested responds with an invalid redirect URL: ${N}`, "invalid-redirect")), P(); + return; + } + } + switch (o.redirect) { + case "error": + n(new et(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`, "no-redirect")), P(); + return; + case "manual": + break; + case "follow": { + if (j === null) break; + if (o.counter >= o.follow) { + n(new et(`maximum redirect reached at: ${o.url}`, "max-redirect")), P(); + return; + } + let L = { headers: new at(o.headers), follow: o.follow, counter: o.counter + 1, agent: o.agent, compress: o.compress, method: o.method, body: Sn(o), signal: o.signal, size: o.size, referrer: o.referrer, referrerPolicy: o.referrerPolicy }; + if (!Ud(o.url, j) || !Md(o.url, j)) for (let K of ["authorization", "www-authenticate", "cookie", "cookie2"]) L.headers.delete(K); + if (v.statusCode !== 303 && o.body && e.body instanceof import_node_stream2.default.Readable) { + n(new et("Cannot follow redirect with body being a readable stream", "unsupported-redirect")), P(); + return; + } + (v.statusCode === 303 || (v.statusCode === 301 || v.statusCode === 302) && o.method === "POST") && (L.method = "GET", L.body = void 0, L.headers.delete("content-length")); + let H = mh(w); + H && (L.referrerPolicy = H), t(gu(new Pr(j, L))), P(); + return; + } + default: + return n(new TypeError(`Redirect option '${o.redirect}' is not a valid value of RequestRedirect`)); + } + } + f && v.once("end", () => { + f.removeEventListener("abort", _); + }); + let g = (0, import_node_stream2.pipeline)(v, new import_node_stream2.PassThrough(), (N) => { + N && n(N); + }); + process.version < "v12.10" && v.on("aborted", _); + let C = { url: o.url, status: v.statusCode, statusText: v.statusMessage, headers: w, size: o.size, counter: o.counter, highWaterMark: o.highWaterMark }, R = w.get("Content-Encoding"); + if (!o.compress || o.method === "HEAD" || R === null || v.statusCode === 204 || v.statusCode === 304) { + h = new ft(g, C), t(h); + return; + } + let S = { flush: import_node_zlib.default.Z_SYNC_FLUSH, finishFlush: import_node_zlib.default.Z_SYNC_FLUSH }; + if (R === "gzip" || R === "x-gzip") { + g = (0, import_node_stream2.pipeline)(g, import_node_zlib.default.createGunzip(S), (N) => { + N && n(N); + }), h = new ft(g, C), t(h); + return; + } + if (R === "deflate" || R === "x-deflate") { + let N = (0, import_node_stream2.pipeline)(v, new import_node_stream2.PassThrough(), (j) => { + j && n(j); + }); + N.once("data", (j) => { + (j[0] & 15) === 8 ? g = (0, import_node_stream2.pipeline)(g, import_node_zlib.default.createInflate(), (L) => { + L && n(L); + }) : g = (0, import_node_stream2.pipeline)(g, import_node_zlib.default.createInflateRaw(), (L) => { + L && n(L); + }), h = new ft(g, C), t(h); + }), N.once("end", () => { + h || (h = new ft(g, C), t(h)); + }); + return; + } + if (R === "br") { + g = (0, import_node_stream2.pipeline)(g, import_node_zlib.default.createBrotliDecompress(), (N) => { + N && n(N); + }), h = new ft(g, C), t(h); + return; + } + h = new ft(g, C), t(h); + }), sh(E, o).catch(n); + }); +} +function H_(r, e) { + let t = import_node_buffer2.Buffer.from(`0\r +\r +`), n = false, o = false, a; + r.on("response", (u) => { + let { headers: l } = u; + n = l["transfer-encoding"] === "chunked" && !l["content-length"]; + }), r.on("socket", (u) => { + let l = () => { + if (n && !o) { + let h = new Error("Premature close"); + h.code = "ERR_STREAM_PREMATURE_CLOSE", e(h); + } + }, f = (h) => { + o = import_node_buffer2.Buffer.compare(h.slice(-5), t) === 0, !o && a && (o = import_node_buffer2.Buffer.compare(a.slice(-3), t.slice(0, 3)) === 0 && import_node_buffer2.Buffer.compare(h.slice(-2), t.slice(3)) === 0), a = h; + }; + u.prependListener("close", l), u.on("data", f), r.on("close", () => { + u.removeListener("close", l), u.removeListener("data", f); + }); + }); +} +var $_; +var wh = Me(() => { + Fd(); + Ho(); + ah(); + zo(); + yh(); + iu(); + _h(); + pu(); + Io(); + jo(); + mu(); + cu(); + $_ = /* @__PURE__ */ new Set(["data:", "http:", "https:"]); +}); +var Sh = z((Fn) => { + "use strict"; + var G_ = Fn && Fn.__importDefault || function(r) { + return r && r.__esModule ? r : { default: r }; + }, kn; + Object.defineProperty(Fn, "__esModule", { value: true }); + Fn.Gaxios = void 0; + var W_ = G_(Ga()), z_ = X("https"), Qr = Ja(), J_ = sd(), Ah = X("stream"), Dh = Ya(), V_ = async () => globalThis.crypto?.randomUUID() || (await import("crypto")).randomUUID(), Vo = class { + agentCache = /* @__PURE__ */ new Map(); + defaults; + interceptors; + constructor(e) { + this.defaults = e || {}, this.interceptors = { request: new Dh.GaxiosInterceptorManager(), response: new Dh.GaxiosInterceptorManager() }; + } + fetch(...e) { + let t = e[0], n = e[1], o, a = new Headers(); + return typeof t == "string" ? o = new URL(t) : t instanceof URL ? o = t : t && t.url && (o = new URL(t.url)), t && typeof t == "object" && "headers" in t && kn.mergeHeaders(a, t.headers), n && kn.mergeHeaders(a, new Headers(n.headers)), typeof t == "object" && !(t instanceof URL) ? this.request({ ...n, ...t, headers: a, url: o }) : this.request({ ...n, headers: a, url: o }); + } + async request(e = {}) { + let t = await this.#n(e); + return t = await this.#t(t), this.#r(this._request(t)); + } + async _defaultAdapter(e) { + let t = e.fetchImplementation || this.defaults.fetchImplementation || await kn.#u(), n = { ...e }; + delete n.data; + let o = await t(e.url, n), a = await this.getResponseData(e, o); + return Object.getOwnPropertyDescriptor(o, "data")?.configurable || Object.defineProperties(o, { data: { configurable: true, writable: true, enumerable: true, value: a } }), Object.assign(o, { config: e, data: a }); + } + async _request(e) { + try { + let t; + if (e.adapter ? t = await e.adapter(e, this._defaultAdapter.bind(this)) : t = await this._defaultAdapter(e), !e.validateStatus(t.status)) { + if (e.responseType === "stream") { + let o = []; + for await (let a of e.data ?? []) o.push(a); + t.data = o; + } + let n = Qr.GaxiosError.extractAPIErrorFromResponse(t, `Request failed with status code ${t.status}`); + throw new Qr.GaxiosError(n?.message, e, t, n); + } + return t; + } catch (t) { + let n; + t instanceof Qr.GaxiosError ? n = t : t instanceof Error ? n = new Qr.GaxiosError(t.message, e, void 0, t) : n = new Qr.GaxiosError("Unexpected Gaxios Error", e, void 0, t); + let { shouldRetry: o, config: a } = await (0, J_.getRetryConfig)(n); + if (o && a) return n.config.retryConfig.currentRetryAttempt = a.retryConfig.currentRetryAttempt, e.retryConfig = n.config?.retryConfig, this.#s(e), this._request(e); + throw e.errorRedactor && e.errorRedactor(n), n; + } + } + async getResponseData(e, t) { + if (e.maxContentLength && t.headers.has("content-length") && e.maxContentLength < Number.parseInt(t.headers?.get("content-length") || "")) throw new Qr.GaxiosError("Response's `Content-Length` is over the limit.", e, Object.assign(t, { config: e })); + switch (e.responseType) { + case "stream": + return t.body; + case "json": + return t.json(); + case "arraybuffer": + return t.arrayBuffer(); + case "blob": + return t.blob(); + case "text": + return t.text(); + default: + return this.getResponseDataFromContentType(t); + } + } + #e(e, t = []) { + let n = new URL(e), o = [...t], a = (process.env.NO_PROXY ?? process.env.no_proxy)?.split(",") || []; + for (let u of a) o.push(u.trim()); + for (let u of o) if (u instanceof RegExp) { + if (u.test(n.toString())) return false; + } else if (u instanceof URL) { + if (u.origin === n.origin) return false; + } else if (u.startsWith("*.") || u.startsWith(".")) { + let l = u.replace(/^\*\./, "."); + if (n.hostname.endsWith(l)) return false; + } else if (u === n.origin || u === n.hostname || u === n.href) return false; + return true; + } + async #t(e) { + let t = Promise.resolve(e); + for (let n of this.interceptors.request.values()) n && (t = t.then(n.resolved, n.rejected)); + return t; + } + async #r(e) { + let t = Promise.resolve(e); + for (let n of this.interceptors.response.values()) n && (t = t.then(n.resolved, n.rejected)); + return t; + } + async #n(e) { + let t = new Headers(this.defaults.headers); + kn.mergeHeaders(t, e.headers); + let n = (0, W_.default)(true, {}, this.defaults, e); + if (!n.url) throw new Error("URL is required."); + if (n.baseURL && (n.url = new URL(n.url, n.baseURL)), n.url = new URL(n.url), n.params) if (n.paramsSerializer) { + let u = n.paramsSerializer(n.params); + u.startsWith("?") && (u = u.slice(1)); + let l = n.url.toString().includes("?") ? "&" : "?"; + n.url = n.url + l + u; + } else { + let u = n.url instanceof URL ? n.url : new URL(n.url); + for (let [l, f] of new URLSearchParams(n.params)) u.searchParams.append(l, f); + n.url = u; + } + typeof e.maxContentLength == "number" && (n.size = e.maxContentLength), typeof e.maxRedirects == "number" && (n.follow = e.maxRedirects); + let o = typeof n.data == "string" || n.data instanceof ArrayBuffer || n.data instanceof Blob || globalThis.File && n.data instanceof File || n.data instanceof FormData || n.data instanceof Ah.Readable || n.data instanceof ReadableStream || n.data instanceof String || n.data instanceof URLSearchParams || ArrayBuffer.isView(n.data) || ["Blob", "File", "FormData"].includes(n.data?.constructor?.name || ""); + if (n.multipart?.length) { + let u = await V_(); + t.set("content-type", `multipart/related; boundary=${u}`), n.body = Ah.Readable.from(this.getMultipartRequest(n.multipart, u)); + } else o ? n.body = n.data : typeof n.data == "object" ? t.get("Content-Type") === "application/x-www-form-urlencoded" ? n.body = n.paramsSerializer ? n.paramsSerializer(n.data) : new URLSearchParams(n.data) : (t.has("content-type") || t.set("content-type", "application/json"), n.body = JSON.stringify(n.data)) : n.data && (n.body = n.data); + n.validateStatus = n.validateStatus || this.validateStatus, n.responseType = n.responseType || "unknown", !t.has("accept") && n.responseType === "json" && t.set("accept", "application/json"); + let a = n.proxy || process?.env?.HTTPS_PROXY || process?.env?.https_proxy || process?.env?.HTTP_PROXY || process?.env?.http_proxy; + if (!n.agent) if (a && this.#e(n.url, n.noProxy)) { + let u = await kn.#a(); + this.agentCache.has(a) ? n.agent = this.agentCache.get(a) : (n.agent = new u(a, { cert: n.cert, key: n.key }), this.agentCache.set(a, n.agent)); + } else n.cert && n.key && (this.agentCache.has(n.key) ? n.agent = this.agentCache.get(n.key) : (n.agent = new z_.Agent({ cert: n.cert, key: n.key }), this.agentCache.set(n.key, n.agent))); + return typeof n.errorRedactor != "function" && n.errorRedactor !== false && (n.errorRedactor = Qr.defaultErrorRedactor), n.body && !("duplex" in n) && (n.duplex = "half"), this.#s(n), Object.assign(n, { headers: t, url: n.url instanceof URL ? n.url : new URL(n.url) }); + } + #s(e) { + if (e.timeout) { + let t = AbortSignal.timeout(e.timeout); + e.signal && !e.signal.aborted ? e.signal = AbortSignal.any([e.signal, t]) : e.signal = t; + } + } + validateStatus(e) { + return e >= 200 && e < 300; + } + async getResponseDataFromContentType(e) { + let t = e.headers.get("Content-Type"); + if (t === null) return e.text(); + if (t = t.toLowerCase(), t.includes("application/json")) { + let n = await e.text(); + try { + n = JSON.parse(n); + } catch { + } + return n; + } else return t.match(/^text\//) ? e.text() : e.blob(); + } + async *getMultipartRequest(e, t) { + let n = `--${t}--`; + for (let o of e) { + let a = o.headers.get("Content-Type") || "application/octet-stream"; + yield `--${t}\r +Content-Type: ${a}\r +\r +`, typeof o.content == "string" ? yield o.content : yield* o.content, yield `\r +`; + } + yield n; + } + static #o; + static #i; + static async #a() { + return this.#o ||= (await Promise.resolve().then(() => zr(Rd()))).HttpsProxyAgent, this.#o; + } + static async #u() { + let e = typeof window < "u" && !!window; + return this.#i ||= e ? window.fetch : (await Promise.resolve().then(() => (wh(), Eh))).default, this.#i; + } + static mergeHeaders(e, ...t) { + e = e instanceof Headers ? e : new Headers(e); + for (let n of t) (n instanceof Headers ? n : new Headers(n)).forEach((a, u) => { + u === "set-cookie" ? e.append(u, a) : e.set(u, a); + }); + return e; + } + }; + Fn.Gaxios = Vo; + kn = Vo; +}); +var Je = z((tt) => { + "use strict"; + var K_ = tt && tt.__createBinding || (Object.create ? function(r, e, t, n) { + n === void 0 && (n = t); + var o = Object.getOwnPropertyDescriptor(e, t); + (!o || ("get" in o ? !e.__esModule : o.writable || o.configurable)) && (o = { enumerable: true, get: function() { + return e[t]; + } }), Object.defineProperty(r, n, o); + } : function(r, e, t, n) { + n === void 0 && (n = t), r[n] = e[t]; + }), Y_ = tt && tt.__exportStar || function(r, e) { + for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && K_(e, r, t); + }; + Object.defineProperty(tt, "__esModule", { value: true }); + tt.instance = tt.Gaxios = tt.GaxiosError = void 0; + tt.request = Q_; + var vh = Sh(); + Object.defineProperty(tt, "Gaxios", { enumerable: true, get: function() { + return vh.Gaxios; + } }); + var X_ = Ja(); + Object.defineProperty(tt, "GaxiosError", { enumerable: true, get: function() { + return X_.GaxiosError; + } }); + Y_(Ya(), tt); + tt.instance = new vh.Gaxios(); + async function Q_(r) { + return tt.instance.request(r); + } +}); +var yu = z((Th, Ko) => { + (function(r) { + "use strict"; + var e, t = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, n = Math.ceil, o = Math.floor, a = "[BigNumber Error] ", u = a + "Number primitive has more than 15 significant digits: ", l = 1e14, f = 14, h = 9007199254740991, d = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], _ = 1e7, E = 1e9; + function P(j) { + var L, H, K, W = G.prototype = { constructor: G, toString: null, valueOf: null }, Ae = new G(1), he = 20, fe = 4, ye = -7, re = 21, de = -1e7, Z = 1e7, ue = false, J = 1, se = 0, oe = { prefix: "", groupSize: 3, secondaryGroupSize: 0, groupSeparator: ",", decimalSeparator: ".", fractionGroupSize: 0, fractionGroupSeparator: "\xA0", suffix: "" }, Ie = "0123456789abcdefghijklmnopqrstuvwxyz", je = true; + function G(p, y) { + var b, x, T, F, q, D, k, B, O = this; + if (!(O instanceof G)) return new G(p, y); + if (y == null) { + if (p && p._isBigNumber === true) { + O.s = p.s, !p.c || p.e > Z ? O.c = O.e = null : p.e < de ? O.c = [O.e = 0] : (O.e = p.e, O.c = p.c.slice()); + return; + } + if ((D = typeof p == "number") && p * 0 == 0) { + if (O.s = 1 / p < 0 ? (p = -p, -1) : 1, p === ~~p) { + for (F = 0, q = p; q >= 10; q /= 10, F++) ; + F > Z ? O.c = O.e = null : (O.e = F, O.c = [p]); + return; + } + B = String(p); + } else { + if (!t.test(B = String(p))) return K(O, B, D); + O.s = B.charCodeAt(0) == 45 ? (B = B.slice(1), -1) : 1; + } + (F = B.indexOf(".")) > -1 && (B = B.replace(".", "")), (q = B.search(/e/i)) > 0 ? (F < 0 && (F = q), F += +B.slice(q + 1), B = B.substring(0, q)) : F < 0 && (F = B.length); + } else { + if (C(y, 2, Ie.length, "Base"), y == 10 && je) return O = new G(p), xe(O, he + O.e + 1, fe); + if (B = String(p), D = typeof p == "number") { + if (p * 0 != 0) return K(O, B, D, y); + if (O.s = 1 / p < 0 ? (B = B.slice(1), -1) : 1, G.DEBUG && B.replace(/^0\.0*|\./, "").length > 15) throw Error(u + p); + } else O.s = B.charCodeAt(0) === 45 ? (B = B.slice(1), -1) : 1; + for (b = Ie.slice(0, y), F = q = 0, k = B.length; q < k; q++) if (b.indexOf(x = B.charAt(q)) < 0) { + if (x == ".") { + if (q > F) { + F = k; + continue; + } + } else if (!T && (B == B.toUpperCase() && (B = B.toLowerCase()) || B == B.toLowerCase() && (B = B.toUpperCase()))) { + T = true, q = -1, F = 0; + continue; + } + return K(O, String(p), D, y); + } + D = false, B = H(B, y, 10, O.s), (F = B.indexOf(".")) > -1 ? B = B.replace(".", "") : F = B.length; + } + for (q = 0; B.charCodeAt(q) === 48; q++) ; + for (k = B.length; B.charCodeAt(--k) === 48; ) ; + if (B = B.slice(q, ++k)) { + if (k -= q, D && G.DEBUG && k > 15 && (p > h || p !== o(p))) throw Error(u + O.s * p); + if ((F = F - q - 1) > Z) O.c = O.e = null; + else if (F < de) O.c = [O.e = 0]; + else { + if (O.e = F, O.c = [], q = (F + 1) % f, F < 0 && (q += f), q < k) { + for (q && O.c.push(+B.slice(0, q)), k -= f; q < k; ) O.c.push(+B.slice(q, q += f)); + q = f - (B = B.slice(q)).length; + } else q -= k; + for (; q--; B += "0") ; + O.c.push(+B); + } + } else O.c = [O.e = 0]; + } + G.clone = P, G.ROUND_UP = 0, G.ROUND_DOWN = 1, G.ROUND_CEIL = 2, G.ROUND_FLOOR = 3, G.ROUND_HALF_UP = 4, G.ROUND_HALF_DOWN = 5, G.ROUND_HALF_EVEN = 6, G.ROUND_HALF_CEIL = 7, G.ROUND_HALF_FLOOR = 8, G.EUCLID = 9, G.config = G.set = function(p) { + var y, b; + if (p != null) if (typeof p == "object") { + if (p.hasOwnProperty(y = "DECIMAL_PLACES") && (b = p[y], C(b, 0, E, y), he = b), p.hasOwnProperty(y = "ROUNDING_MODE") && (b = p[y], C(b, 0, 8, y), fe = b), p.hasOwnProperty(y = "EXPONENTIAL_AT") && (b = p[y], b && b.pop ? (C(b[0], -E, 0, y), C(b[1], 0, E, y), ye = b[0], re = b[1]) : (C(b, -E, E, y), ye = -(re = b < 0 ? -b : b))), p.hasOwnProperty(y = "RANGE")) if (b = p[y], b && b.pop) C(b[0], -E, -1, y), C(b[1], 1, E, y), de = b[0], Z = b[1]; + else if (C(b, -E, E, y), b) de = -(Z = b < 0 ? -b : b); + else throw Error(a + y + " cannot be zero: " + b); + if (p.hasOwnProperty(y = "CRYPTO")) if (b = p[y], b === !!b) if (b) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) ue = b; + else throw ue = !b, Error(a + "crypto unavailable"); + else ue = b; + else throw Error(a + y + " not true or false: " + b); + if (p.hasOwnProperty(y = "MODULO_MODE") && (b = p[y], C(b, 0, 9, y), J = b), p.hasOwnProperty(y = "POW_PRECISION") && (b = p[y], C(b, 0, E, y), se = b), p.hasOwnProperty(y = "FORMAT")) if (b = p[y], typeof b == "object") oe = b; + else throw Error(a + y + " not an object: " + b); + if (p.hasOwnProperty(y = "ALPHABET")) if (b = p[y], typeof b == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(b)) je = b.slice(0, 10) == "0123456789", Ie = b; + else throw Error(a + y + " invalid: " + b); + } else throw Error(a + "Object expected: " + p); + return { DECIMAL_PLACES: he, ROUNDING_MODE: fe, EXPONENTIAL_AT: [ye, re], RANGE: [de, Z], CRYPTO: ue, MODULO_MODE: J, POW_PRECISION: se, FORMAT: oe, ALPHABET: Ie }; + }, G.isBigNumber = function(p) { + if (!p || p._isBigNumber !== true) return false; + if (!G.DEBUG) return true; + var y, b, x = p.c, T = p.e, F = p.s; + e: if ({}.toString.call(x) == "[object Array]") { + if ((F === 1 || F === -1) && T >= -E && T <= E && T === o(T)) { + if (x[0] === 0) { + if (T === 0 && x.length === 1) return true; + break e; + } + if (y = (T + 1) % f, y < 1 && (y += f), String(x[0]).length == y) { + for (y = 0; y < x.length; y++) if (b = x[y], b < 0 || b >= l || b !== o(b)) break e; + if (b !== 0) return true; + } + } + } else if (x === null && T === null && (F === null || F === 1 || F === -1)) return true; + throw Error(a + "Invalid BigNumber: " + p); + }, G.maximum = G.max = function() { + return Ee(arguments, -1); + }, G.minimum = G.min = function() { + return Ee(arguments, 1); + }, G.random = (function() { + var p = 9007199254740992, y = Math.random() * p & 2097151 ? function() { + return o(Math.random() * p); + } : function() { + return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0); + }; + return function(b) { + var x, T, F, q, D, k = 0, B = [], O = new G(Ae); + if (b == null ? b = he : C(b, 0, E), q = n(b / f), ue) if (crypto.getRandomValues) { + for (x = crypto.getRandomValues(new Uint32Array(q *= 2)); k < q; ) D = x[k] * 131072 + (x[k + 1] >>> 11), D >= 9e15 ? (T = crypto.getRandomValues(new Uint32Array(2)), x[k] = T[0], x[k + 1] = T[1]) : (B.push(D % 1e14), k += 2); + k = q / 2; + } else if (crypto.randomBytes) { + for (x = crypto.randomBytes(q *= 7); k < q; ) D = (x[k] & 31) * 281474976710656 + x[k + 1] * 1099511627776 + x[k + 2] * 4294967296 + x[k + 3] * 16777216 + (x[k + 4] << 16) + (x[k + 5] << 8) + x[k + 6], D >= 9e15 ? crypto.randomBytes(7).copy(x, k) : (B.push(D % 1e14), k += 7); + k = q / 7; + } else throw ue = false, Error(a + "crypto unavailable"); + if (!ue) for (; k < q; ) D = y(), D < 9e15 && (B[k++] = D % 1e14); + for (q = B[--k], b %= f, q && b && (D = d[f - b], B[k] = o(q / D) * D); B[k] === 0; B.pop(), k--) ; + if (k < 0) B = [F = 0]; + else { + for (F = -1; B[0] === 0; B.splice(0, 1), F -= f) ; + for (k = 1, D = B[0]; D >= 10; D /= 10, k++) ; + k < f && (F -= f - k); + } + return O.e = F, O.c = B, O; + }; + })(), G.sum = function() { + for (var p = 1, y = arguments, b = new G(y[0]); p < y.length; ) b = b.plus(y[p++]); + return b; + }, H = /* @__PURE__ */ (function() { + var p = "0123456789"; + function y(b, x, T, F) { + for (var q, D = [0], k, B = 0, O = b.length; B < O; ) { + for (k = D.length; k--; D[k] *= x) ; + for (D[0] += F.indexOf(b.charAt(B++)), q = 0; q < D.length; q++) D[q] > T - 1 && (D[q + 1] == null && (D[q + 1] = 0), D[q + 1] += D[q] / T | 0, D[q] %= T); + } + return D.reverse(); + } + return function(b, x, T, F, q) { + var D, k, B, O, M, Y, Q, we, Fe = b.indexOf("."), Be = he, be = fe; + for (Fe >= 0 && (O = se, se = 0, b = b.replace(".", ""), we = new G(x), Y = we.pow(b.length - Fe), se = O, we.c = y(N(w(Y.c), Y.e, "0"), 10, T, p), we.e = we.c.length), Q = y(b, x, T, q ? (D = Ie, p) : (D = p, Ie)), B = O = Q.length; Q[--O] == 0; Q.pop()) ; + if (!Q[0]) return D.charAt(0); + if (Fe < 0 ? --B : (Y.c = Q, Y.e = B, Y.s = F, Y = L(Y, we, Be, be, T), Q = Y.c, M = Y.r, B = Y.e), k = B + Be + 1, Fe = Q[k], O = T / 2, M = M || k < 0 || Q[k + 1] != null, M = be < 4 ? (Fe != null || M) && (be == 0 || be == (Y.s < 0 ? 3 : 2)) : Fe > O || Fe == O && (be == 4 || M || be == 6 && Q[k - 1] & 1 || be == (Y.s < 0 ? 8 : 7)), k < 1 || !Q[0]) b = M ? N(D.charAt(1), -Be, D.charAt(0)) : D.charAt(0); + else { + if (Q.length = k, M) for (--T; ++Q[--k] > T; ) Q[k] = 0, k || (++B, Q = [1].concat(Q)); + for (O = Q.length; !Q[--O]; ) ; + for (Fe = 0, b = ""; Fe <= O; b += D.charAt(Q[Fe++])) ; + b = N(b, B, D.charAt(0)); + } + return b; + }; + })(), L = /* @__PURE__ */ (function() { + function p(x, T, F) { + var q, D, k, B, O = 0, M = x.length, Y = T % _, Q = T / _ | 0; + for (x = x.slice(); M--; ) k = x[M] % _, B = x[M] / _ | 0, q = Q * k + B * Y, D = Y * k + q % _ * _ + O, O = (D / F | 0) + (q / _ | 0) + Q * B, x[M] = D % F; + return O && (x = [O].concat(x)), x; + } + function y(x, T, F, q) { + var D, k; + if (F != q) k = F > q ? 1 : -1; + else for (D = k = 0; D < F; D++) if (x[D] != T[D]) { + k = x[D] > T[D] ? 1 : -1; + break; + } + return k; + } + function b(x, T, F, q) { + for (var D = 0; F--; ) x[F] -= D, D = x[F] < T[F] ? 1 : 0, x[F] = D * q + x[F] - T[F]; + for (; !x[0] && x.length > 1; x.splice(0, 1)) ; + } + return function(x, T, F, q, D) { + var k, B, O, M, Y, Q, we, Fe, Be, be, De, Le, sn, on, an, ut, tr, Ve = x.s == T.s ? 1 : -1, Ue = x.c, Se = T.c; + if (!Ue || !Ue[0] || !Se || !Se[0]) return new G(!x.s || !T.s || (Ue ? Se && Ue[0] == Se[0] : !Se) ? NaN : Ue && Ue[0] == 0 || !Se ? Ve * 0 : Ve / 0); + for (Fe = new G(Ve), Be = Fe.c = [], B = x.e - T.e, Ve = F + B + 1, D || (D = l, B = v(x.e / f) - v(T.e / f), Ve = Ve / f | 0), O = 0; Se[O] == (Ue[O] || 0); O++) ; + if (Se[O] > (Ue[O] || 0) && B--, Ve < 0) Be.push(1), M = true; + else { + for (on = Ue.length, ut = Se.length, O = 0, Ve += 2, Y = o(D / (Se[0] + 1)), Y > 1 && (Se = p(Se, Y, D), Ue = p(Ue, Y, D), ut = Se.length, on = Ue.length), sn = ut, be = Ue.slice(0, ut), De = be.length; De < ut; be[De++] = 0) ; + tr = Se.slice(), tr = [0].concat(tr), an = Se[0], Se[1] >= D / 2 && an++; + do { + if (Y = 0, k = y(Se, be, ut, De), k < 0) { + if (Le = be[0], ut != De && (Le = Le * D + (be[1] || 0)), Y = o(Le / an), Y > 1) for (Y >= D && (Y = D - 1), Q = p(Se, Y, D), we = Q.length, De = be.length; y(Q, be, we, De) == 1; ) Y--, b(Q, ut < we ? tr : Se, we, D), we = Q.length, k = 1; + else Y == 0 && (k = Y = 1), Q = Se.slice(), we = Q.length; + if (we < De && (Q = [0].concat(Q)), b(be, Q, De, D), De = be.length, k == -1) for (; y(Se, be, ut, De) < 1; ) Y++, b(be, ut < De ? tr : Se, De, D), De = be.length; + } else k === 0 && (Y++, be = [0]); + Be[O++] = Y, be[0] ? be[De++] = Ue[sn] || 0 : (be = [Ue[sn]], De = 1); + } while ((sn++ < on || be[0] != null) && Ve--); + M = be[0] != null, Be[0] || Be.splice(0, 1); + } + if (D == l) { + for (O = 1, Ve = Be[0]; Ve >= 10; Ve /= 10, O++) ; + xe(Fe, F + (Fe.e = O + B * f - 1) + 1, q, M); + } else Fe.e = B, Fe.r = +M; + return Fe; + }; + })(); + function pe(p, y, b, x) { + var T, F, q, D, k; + if (b == null ? b = fe : C(b, 0, 8), !p.c) return p.toString(); + if (T = p.c[0], q = p.e, y == null) k = w(p.c), k = x == 1 || x == 2 && (q <= ye || q >= re) ? S(k, q) : N(k, q, "0"); + else if (p = xe(new G(p), y, b), F = p.e, k = w(p.c), D = k.length, x == 1 || x == 2 && (y <= F || F <= ye)) { + for (; D < y; k += "0", D++) ; + k = S(k, F); + } else if (y -= q + (x === 2 && F > q), k = N(k, F, "0"), F + 1 > D) { + if (--y > 0) for (k += "."; y--; k += "0") ; + } else if (y += F - D, y > 0) for (F + 1 == D && (k += "."); y--; k += "0") ; + return p.s < 0 && T ? "-" + k : k; + } + function Ee(p, y) { + for (var b, x, T = 1, F = new G(p[0]); T < p.length; T++) x = new G(p[T]), (!x.s || (b = g(F, x)) === y || b === 0 && F.s === y) && (F = x); + return F; + } + function er(p, y, b) { + for (var x = 1, T = y.length; !y[--T]; y.pop()) ; + for (T = y[0]; T >= 10; T /= 10, x++) ; + return (b = x + b * f - 1) > Z ? p.c = p.e = null : b < de ? p.c = [p.e = 0] : (p.e = b, p.c = y), p; + } + K = /* @__PURE__ */ (function() { + var p = /^(-?)0([xbo])(?=\w[\w.]*$)/i, y = /^([^.]+)\.$/, b = /^\.([^.]+)$/, x = /^-?(Infinity|NaN)$/, T = /^\s*\+(?=[\w.])|^\s+|\s+$/g; + return function(F, q, D, k) { + var B, O = D ? q : q.replace(T, ""); + if (x.test(O)) F.s = isNaN(O) ? null : O < 0 ? -1 : 1; + else { + if (!D && (O = O.replace(p, function(M, Y, Q) { + return B = (Q = Q.toLowerCase()) == "x" ? 16 : Q == "b" ? 2 : 8, !k || k == B ? Y : M; + }), k && (B = k, O = O.replace(y, "$1").replace(b, "0.$1")), q != O)) return new G(O, B); + if (G.DEBUG) throw Error(a + "Not a" + (k ? " base " + k : "") + " number: " + q); + F.s = null; + } + F.c = F.e = null; + }; + })(); + function xe(p, y, b, x) { + var T, F, q, D, k, B, O, M = p.c, Y = d; + if (M) { + e: { + for (T = 1, D = M[0]; D >= 10; D /= 10, T++) ; + if (F = y - T, F < 0) F += f, q = y, k = M[B = 0], O = o(k / Y[T - q - 1] % 10); + else if (B = n((F + 1) / f), B >= M.length) if (x) { + for (; M.length <= B; M.push(0)) ; + k = O = 0, T = 1, F %= f, q = F - f + 1; + } else break e; + else { + for (k = D = M[B], T = 1; D >= 10; D /= 10, T++) ; + F %= f, q = F - f + T, O = q < 0 ? 0 : o(k / Y[T - q - 1] % 10); + } + if (x = x || y < 0 || M[B + 1] != null || (q < 0 ? k : k % Y[T - q - 1]), x = b < 4 ? (O || x) && (b == 0 || b == (p.s < 0 ? 3 : 2)) : O > 5 || O == 5 && (b == 4 || x || b == 6 && (F > 0 ? q > 0 ? k / Y[T - q] : 0 : M[B - 1]) % 10 & 1 || b == (p.s < 0 ? 8 : 7)), y < 1 || !M[0]) return M.length = 0, x ? (y -= p.e + 1, M[0] = Y[(f - y % f) % f], p.e = -y || 0) : M[0] = p.e = 0, p; + if (F == 0 ? (M.length = B, D = 1, B--) : (M.length = B + 1, D = Y[f - F], M[B] = q > 0 ? o(k / Y[T - q] % Y[q]) * D : 0), x) for (; ; ) if (B == 0) { + for (F = 1, q = M[0]; q >= 10; q /= 10, F++) ; + for (q = M[0] += D, D = 1; q >= 10; q /= 10, D++) ; + F != D && (p.e++, M[0] == l && (M[0] = 1)); + break; + } else { + if (M[B] += D, M[B] != l) break; + M[B--] = 0, D = 1; + } + for (F = M.length; M[--F] === 0; M.pop()) ; + } + p.e > Z ? p.c = p.e = null : p.e < de && (p.c = [p.e = 0]); + } + return p; + } + function Ne(p) { + var y, b = p.e; + return b === null ? p.toString() : (y = w(p.c), y = b <= ye || b >= re ? S(y, b) : N(y, b, "0"), p.s < 0 ? "-" + y : y); + } + return W.absoluteValue = W.abs = function() { + var p = new G(this); + return p.s < 0 && (p.s = 1), p; + }, W.comparedTo = function(p, y) { + return g(this, new G(p, y)); + }, W.decimalPlaces = W.dp = function(p, y) { + var b, x, T, F = this; + if (p != null) return C(p, 0, E), y == null ? y = fe : C(y, 0, 8), xe(new G(F), p + F.e + 1, y); + if (!(b = F.c)) return null; + if (x = ((T = b.length - 1) - v(this.e / f)) * f, T = b[T]) for (; T % 10 == 0; T /= 10, x--) ; + return x < 0 && (x = 0), x; + }, W.dividedBy = W.div = function(p, y) { + return L(this, new G(p, y), he, fe); + }, W.dividedToIntegerBy = W.idiv = function(p, y) { + return L(this, new G(p, y), 0, 1); + }, W.exponentiatedBy = W.pow = function(p, y) { + var b, x, T, F, q, D, k, B, O, M = this; + if (p = new G(p), p.c && !p.isInteger()) throw Error(a + "Exponent not an integer: " + Ne(p)); + if (y != null && (y = new G(y)), D = p.e > 14, !M.c || !M.c[0] || M.c[0] == 1 && !M.e && M.c.length == 1 || !p.c || !p.c[0]) return O = new G(Math.pow(+Ne(M), D ? p.s * (2 - R(p)) : +Ne(p))), y ? O.mod(y) : O; + if (k = p.s < 0, y) { + if (y.c ? !y.c[0] : !y.s) return new G(NaN); + x = !k && M.isInteger() && y.isInteger(), x && (M = M.mod(y)); + } else { + if (p.e > 9 && (M.e > 0 || M.e < -1 || (M.e == 0 ? M.c[0] > 1 || D && M.c[1] >= 24e7 : M.c[0] < 8e13 || D && M.c[0] <= 9999975e7))) return F = M.s < 0 && R(p) ? -0 : 0, M.e > -1 && (F = 1 / F), new G(k ? 1 / F : F); + se && (F = n(se / f + 2)); + } + for (D ? (b = new G(0.5), k && (p.s = 1), B = R(p)) : (T = Math.abs(+Ne(p)), B = T % 2), O = new G(Ae); ; ) { + if (B) { + if (O = O.times(M), !O.c) break; + F ? O.c.length > F && (O.c.length = F) : x && (O = O.mod(y)); + } + if (T) { + if (T = o(T / 2), T === 0) break; + B = T % 2; + } else if (p = p.times(b), xe(p, p.e + 1, 1), p.e > 14) B = R(p); + else { + if (T = +Ne(p), T === 0) break; + B = T % 2; + } + M = M.times(M), F ? M.c && M.c.length > F && (M.c.length = F) : x && (M = M.mod(y)); + } + return x ? O : (k && (O = Ae.div(O)), y ? O.mod(y) : F ? xe(O, se, fe, q) : O); + }, W.integerValue = function(p) { + var y = new G(this); + return p == null ? p = fe : C(p, 0, 8), xe(y, y.e + 1, p); + }, W.isEqualTo = W.eq = function(p, y) { + return g(this, new G(p, y)) === 0; + }, W.isFinite = function() { + return !!this.c; + }, W.isGreaterThan = W.gt = function(p, y) { + return g(this, new G(p, y)) > 0; + }, W.isGreaterThanOrEqualTo = W.gte = function(p, y) { + return (y = g(this, new G(p, y))) === 1 || y === 0; + }, W.isInteger = function() { + return !!this.c && v(this.e / f) > this.c.length - 2; + }, W.isLessThan = W.lt = function(p, y) { + return g(this, new G(p, y)) < 0; + }, W.isLessThanOrEqualTo = W.lte = function(p, y) { + return (y = g(this, new G(p, y))) === -1 || y === 0; + }, W.isNaN = function() { + return !this.s; + }, W.isNegative = function() { + return this.s < 0; + }, W.isPositive = function() { + return this.s > 0; + }, W.isZero = function() { + return !!this.c && this.c[0] == 0; + }, W.minus = function(p, y) { + var b, x, T, F, q = this, D = q.s; + if (p = new G(p, y), y = p.s, !D || !y) return new G(NaN); + if (D != y) return p.s = -y, q.plus(p); + var k = q.e / f, B = p.e / f, O = q.c, M = p.c; + if (!k || !B) { + if (!O || !M) return O ? (p.s = -y, p) : new G(M ? q : NaN); + if (!O[0] || !M[0]) return M[0] ? (p.s = -y, p) : new G(O[0] ? q : fe == 3 ? -0 : 0); + } + if (k = v(k), B = v(B), O = O.slice(), D = k - B) { + for ((F = D < 0) ? (D = -D, T = O) : (B = k, T = M), T.reverse(), y = D; y--; T.push(0)) ; + T.reverse(); + } else for (x = (F = (D = O.length) < (y = M.length)) ? D : y, D = y = 0; y < x; y++) if (O[y] != M[y]) { + F = O[y] < M[y]; + break; + } + if (F && (T = O, O = M, M = T, p.s = -p.s), y = (x = M.length) - (b = O.length), y > 0) for (; y--; O[b++] = 0) ; + for (y = l - 1; x > D; ) { + if (O[--x] < M[x]) { + for (b = x; b && !O[--b]; O[b] = y) ; + --O[b], O[x] += l; + } + O[x] -= M[x]; + } + for (; O[0] == 0; O.splice(0, 1), --B) ; + return O[0] ? er(p, O, B) : (p.s = fe == 3 ? -1 : 1, p.c = [p.e = 0], p); + }, W.modulo = W.mod = function(p, y) { + var b, x, T = this; + return p = new G(p, y), !T.c || !p.s || p.c && !p.c[0] ? new G(NaN) : !p.c || T.c && !T.c[0] ? new G(T) : (J == 9 ? (x = p.s, p.s = 1, b = L(T, p, 0, 3), p.s = x, b.s *= x) : b = L(T, p, 0, J), p = T.minus(b.times(p)), !p.c[0] && J == 1 && (p.s = T.s), p); + }, W.multipliedBy = W.times = function(p, y) { + var b, x, T, F, q, D, k, B, O, M, Y, Q, we, Fe, Be, be = this, De = be.c, Le = (p = new G(p, y)).c; + if (!De || !Le || !De[0] || !Le[0]) return !be.s || !p.s || De && !De[0] && !Le || Le && !Le[0] && !De ? p.c = p.e = p.s = null : (p.s *= be.s, !De || !Le ? p.c = p.e = null : (p.c = [0], p.e = 0)), p; + for (x = v(be.e / f) + v(p.e / f), p.s *= be.s, k = De.length, M = Le.length, k < M && (we = De, De = Le, Le = we, T = k, k = M, M = T), T = k + M, we = []; T--; we.push(0)) ; + for (Fe = l, Be = _, T = M; --T >= 0; ) { + for (b = 0, Y = Le[T] % Be, Q = Le[T] / Be | 0, q = k, F = T + q; F > T; ) B = De[--q] % Be, O = De[q] / Be | 0, D = Q * B + O * Y, B = Y * B + D % Be * Be + we[F] + b, b = (B / Fe | 0) + (D / Be | 0) + Q * O, we[F--] = B % Fe; + we[F] = b; + } + return b ? ++x : we.splice(0, 1), er(p, we, x); + }, W.negated = function() { + var p = new G(this); + return p.s = -p.s || null, p; + }, W.plus = function(p, y) { + var b, x = this, T = x.s; + if (p = new G(p, y), y = p.s, !T || !y) return new G(NaN); + if (T != y) return p.s = -y, x.minus(p); + var F = x.e / f, q = p.e / f, D = x.c, k = p.c; + if (!F || !q) { + if (!D || !k) return new G(T / 0); + if (!D[0] || !k[0]) return k[0] ? p : new G(D[0] ? x : T * 0); + } + if (F = v(F), q = v(q), D = D.slice(), T = F - q) { + for (T > 0 ? (q = F, b = k) : (T = -T, b = D), b.reverse(); T--; b.push(0)) ; + b.reverse(); + } + for (T = D.length, y = k.length, T - y < 0 && (b = k, k = D, D = b, y = T), T = 0; y; ) T = (D[--y] = D[y] + k[y] + T) / l | 0, D[y] = l === D[y] ? 0 : D[y] % l; + return T && (D = [T].concat(D), ++q), er(p, D, q); + }, W.precision = W.sd = function(p, y) { + var b, x, T, F = this; + if (p != null && p !== !!p) return C(p, 1, E), y == null ? y = fe : C(y, 0, 8), xe(new G(F), p, y); + if (!(b = F.c)) return null; + if (T = b.length - 1, x = T * f + 1, T = b[T]) { + for (; T % 10 == 0; T /= 10, x--) ; + for (T = b[0]; T >= 10; T /= 10, x++) ; + } + return p && F.e + 1 > x && (x = F.e + 1), x; + }, W.shiftedBy = function(p) { + return C(p, -h, h), this.times("1e" + p); + }, W.squareRoot = W.sqrt = function() { + var p, y, b, x, T, F = this, q = F.c, D = F.s, k = F.e, B = he + 4, O = new G("0.5"); + if (D !== 1 || !q || !q[0]) return new G(!D || D < 0 && (!q || q[0]) ? NaN : q ? F : 1 / 0); + if (D = Math.sqrt(+Ne(F)), D == 0 || D == 1 / 0 ? (y = w(q), (y.length + k) % 2 == 0 && (y += "0"), D = Math.sqrt(+y), k = v((k + 1) / 2) - (k < 0 || k % 2), D == 1 / 0 ? y = "5e" + k : (y = D.toExponential(), y = y.slice(0, y.indexOf("e") + 1) + k), b = new G(y)) : b = new G(D + ""), b.c[0]) { + for (k = b.e, D = k + B, D < 3 && (D = 0); ; ) if (T = b, b = O.times(T.plus(L(F, T, B, 1))), w(T.c).slice(0, D) === (y = w(b.c)).slice(0, D)) if (b.e < k && --D, y = y.slice(D - 3, D + 1), y == "9999" || !x && y == "4999") { + if (!x && (xe(T, T.e + he + 2, 0), T.times(T).eq(F))) { + b = T; + break; + } + B += 4, D += 4, x = 1; + } else { + (!+y || !+y.slice(1) && y.charAt(0) == "5") && (xe(b, b.e + he + 2, 1), p = !b.times(b).eq(F)); + break; + } + } + return xe(b, b.e + he + 1, fe, p); + }, W.toExponential = function(p, y) { + return p != null && (C(p, 0, E), p++), pe(this, p, y, 1); + }, W.toFixed = function(p, y) { + return p != null && (C(p, 0, E), p = p + this.e + 1), pe(this, p, y); + }, W.toFormat = function(p, y, b) { + var x, T = this; + if (b == null) p != null && y && typeof y == "object" ? (b = y, y = null) : p && typeof p == "object" ? (b = p, p = y = null) : b = oe; + else if (typeof b != "object") throw Error(a + "Argument not an object: " + b); + if (x = T.toFixed(p, y), T.c) { + var F, q = x.split("."), D = +b.groupSize, k = +b.secondaryGroupSize, B = b.groupSeparator || "", O = q[0], M = q[1], Y = T.s < 0, Q = Y ? O.slice(1) : O, we = Q.length; + if (k && (F = D, D = k, k = F, we -= F), D > 0 && we > 0) { + for (F = we % D || D, O = Q.substr(0, F); F < we; F += D) O += B + Q.substr(F, D); + k > 0 && (O += B + Q.slice(F)), Y && (O = "-" + O); + } + x = M ? O + (b.decimalSeparator || "") + ((k = +b.fractionGroupSize) ? M.replace(new RegExp("\\d{" + k + "}\\B", "g"), "$&" + (b.fractionGroupSeparator || "")) : M) : O; + } + return (b.prefix || "") + x + (b.suffix || ""); + }, W.toFraction = function(p) { + var y, b, x, T, F, q, D, k, B, O, M, Y, Q = this, we = Q.c; + if (p != null && (D = new G(p), !D.isInteger() && (D.c || D.s !== 1) || D.lt(Ae))) throw Error(a + "Argument " + (D.isInteger() ? "out of range: " : "not an integer: ") + Ne(D)); + if (!we) return new G(Q); + for (y = new G(Ae), B = b = new G(Ae), x = k = new G(Ae), Y = w(we), F = y.e = Y.length - Q.e - 1, y.c[0] = d[(q = F % f) < 0 ? f + q : q], p = !p || D.comparedTo(y) > 0 ? F > 0 ? y : B : D, q = Z, Z = 1 / 0, D = new G(Y), k.c[0] = 0; O = L(D, y, 0, 1), T = b.plus(O.times(x)), T.comparedTo(p) != 1; ) b = x, x = T, B = k.plus(O.times(T = B)), k = T, y = D.minus(O.times(T = y)), D = T; + return T = L(p.minus(b), x, 0, 1), k = k.plus(T.times(B)), b = b.plus(T.times(x)), k.s = B.s = Q.s, F = F * 2, M = L(B, x, F, fe).minus(Q).abs().comparedTo(L(k, b, F, fe).minus(Q).abs()) < 1 ? [B, x] : [k, b], Z = q, M; + }, W.toNumber = function() { + return +Ne(this); + }, W.toPrecision = function(p, y) { + return p != null && C(p, 1, E), pe(this, p, y, 2); + }, W.toString = function(p) { + var y, b = this, x = b.s, T = b.e; + return T === null ? x ? (y = "Infinity", x < 0 && (y = "-" + y)) : y = "NaN" : (p == null ? y = T <= ye || T >= re ? S(w(b.c), T) : N(w(b.c), T, "0") : p === 10 && je ? (b = xe(new G(b), he + T + 1, fe), y = N(w(b.c), b.e, "0")) : (C(p, 2, Ie.length, "Base"), y = H(N(w(b.c), T, "0"), 10, p, x, true)), x < 0 && b.c[0] && (y = "-" + y)), y; + }, W.valueOf = W.toJSON = function() { + return Ne(this); + }, W._isBigNumber = true, j != null && G.set(j), G; + } + function v(j) { + var L = j | 0; + return j > 0 || j === L ? L : L - 1; + } + function w(j) { + for (var L, H, K = 1, W = j.length, Ae = j[0] + ""; K < W; ) { + for (L = j[K++] + "", H = f - L.length; H--; L = "0" + L) ; + Ae += L; + } + for (W = Ae.length; Ae.charCodeAt(--W) === 48; ) ; + return Ae.slice(0, W + 1 || 1); + } + function g(j, L) { + var H, K, W = j.c, Ae = L.c, he = j.s, fe = L.s, ye = j.e, re = L.e; + if (!he || !fe) return null; + if (H = W && !W[0], K = Ae && !Ae[0], H || K) return H ? K ? 0 : -fe : he; + if (he != fe) return he; + if (H = he < 0, K = ye == re, !W || !Ae) return K ? 0 : !W ^ H ? 1 : -1; + if (!K) return ye > re ^ H ? 1 : -1; + for (fe = (ye = W.length) < (re = Ae.length) ? ye : re, he = 0; he < fe; he++) if (W[he] != Ae[he]) return W[he] > Ae[he] ^ H ? 1 : -1; + return ye == re ? 0 : ye > re ^ H ? 1 : -1; + } + function C(j, L, H, K) { + if (j < L || j > H || j !== o(j)) throw Error(a + (K || "Argument") + (typeof j == "number" ? j < L || j > H ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(j)); + } + function R(j) { + var L = j.c.length - 1; + return v(j.e / f) == L && j.c[L] % 2 != 0; + } + function S(j, L) { + return (j.length > 1 ? j.charAt(0) + "." + j.slice(1) : j) + (L < 0 ? "e" : "e+") + L; + } + function N(j, L, H) { + var K, W; + if (L < 0) { + for (W = H + "."; ++L; W += H) ; + j = W + j; + } else if (K = j.length, ++L > K) { + for (W = H, L -= K; --L; W += H) ; + j += W; + } else L < K && (j = j.slice(0, L) + "." + j.slice(L)); + return j; + } + e = P(), e.default = e.BigNumber = e, typeof define == "function" && define.amd ? define(function() { + return e; + }) : typeof Ko < "u" && Ko.exports ? Ko.exports = e : (r || (r = typeof self < "u" && self ? self : window), r.BigNumber = e); + })(Th); +}); +var Oh = z((wS, Fh) => { + var Rh = yu(), kh = Fh.exports; + (function() { + "use strict"; + function r(h) { + return h < 10 ? "0" + h : h; + } + var e = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, t = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, n, o, a = { "\b": "\\b", " ": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, u; + function l(h) { + return t.lastIndex = 0, t.test(h) ? '"' + h.replace(t, function(d) { + var _ = a[d]; + return typeof _ == "string" ? _ : "\\u" + ("0000" + d.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + h + '"'; + } + function f(h, d) { + var _, E, P, v, w = n, g, C = d[h], R = C != null && (C instanceof Rh || Rh.isBigNumber(C)); + switch (C && typeof C == "object" && typeof C.toJSON == "function" && (C = C.toJSON(h)), typeof u == "function" && (C = u.call(d, h, C)), typeof C) { + case "string": + return R ? C : l(C); + case "number": + return isFinite(C) ? String(C) : "null"; + case "boolean": + case "null": + case "bigint": + return String(C); + case "object": + if (!C) return "null"; + if (n += o, g = [], Object.prototype.toString.apply(C) === "[object Array]") { + for (v = C.length, _ = 0; _ < v; _ += 1) g[_] = f(_, C) || "null"; + return P = g.length === 0 ? "[]" : n ? `[ +` + n + g.join(`, +` + n) + ` +` + w + "]" : "[" + g.join(",") + "]", n = w, P; + } + if (u && typeof u == "object") for (v = u.length, _ = 0; _ < v; _ += 1) typeof u[_] == "string" && (E = u[_], P = f(E, C), P && g.push(l(E) + (n ? ": " : ":") + P)); + else Object.keys(C).forEach(function(S) { + var N = f(S, C); + N && g.push(l(S) + (n ? ": " : ":") + N); + }); + return P = g.length === 0 ? "{}" : n ? `{ +` + n + g.join(`, +` + n) + ` +` + w + "}" : "{" + g.join(",") + "}", n = w, P; + } + } + typeof kh.stringify != "function" && (kh.stringify = function(h, d, _) { + var E; + if (n = "", o = "", typeof _ == "number") for (E = 0; E < _; E += 1) o += " "; + else typeof _ == "string" && (o = _); + if (u = d, d && typeof d != "function" && (typeof d != "object" || typeof d.length != "number")) throw new Error("JSON.stringify"); + return f("", { "": h }); + }); + })(); +}); +var xh = z((AS, Ph) => { + var Yo = null, Z_ = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/, eC = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/, tC = function(r) { + "use strict"; + var e = { strict: false, storeAsString: false, alwaysParseAsBig: false, useNativeBigInt: false, protoAction: "error", constructorAction: "error" }; + if (r != null) { + if (r.strict === true && (e.strict = true), r.storeAsString === true && (e.storeAsString = true), e.alwaysParseAsBig = r.alwaysParseAsBig === true ? r.alwaysParseAsBig : false, e.useNativeBigInt = r.useNativeBigInt === true ? r.useNativeBigInt : false, typeof r.constructorAction < "u") if (r.constructorAction === "error" || r.constructorAction === "ignore" || r.constructorAction === "preserve") e.constructorAction = r.constructorAction; + else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${r.constructorAction}`); + if (typeof r.protoAction < "u") if (r.protoAction === "error" || r.protoAction === "ignore" || r.protoAction === "preserve") e.protoAction = r.protoAction; + else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${r.protoAction}`); + } + var t, n, o = { '"': '"', "\\": "\\", "/": "/", b: "\b", f: "\f", n: ` +`, r: "\r", t: " " }, a, u = function(w) { + throw { name: "SyntaxError", message: w, at: t, text: a }; + }, l = function(w) { + return w && w !== n && u("Expected '" + w + "' instead of '" + n + "'"), n = a.charAt(t), t += 1, n; + }, f = function() { + var w, g = ""; + for (n === "-" && (g = "-", l("-")); n >= "0" && n <= "9"; ) g += n, l(); + if (n === ".") for (g += "."; l() && n >= "0" && n <= "9"; ) g += n; + if (n === "e" || n === "E") for (g += n, l(), (n === "-" || n === "+") && (g += n, l()); n >= "0" && n <= "9"; ) g += n, l(); + if (w = +g, !isFinite(w)) u("Bad number"); + else return Yo == null && (Yo = yu()), g.length > 15 ? e.storeAsString ? g : e.useNativeBigInt ? BigInt(g) : new Yo(g) : e.alwaysParseAsBig ? e.useNativeBigInt ? BigInt(w) : new Yo(w) : w; + }, h = function() { + var w, g, C = "", R; + if (n === '"') for (var S = t; l(); ) { + if (n === '"') return t - 1 > S && (C += a.substring(S, t - 1)), l(), C; + if (n === "\\") { + if (t - 1 > S && (C += a.substring(S, t - 1)), l(), n === "u") { + for (R = 0, g = 0; g < 4 && (w = parseInt(l(), 16), !!isFinite(w)); g += 1) R = R * 16 + w; + C += String.fromCharCode(R); + } else if (typeof o[n] == "string") C += o[n]; + else break; + S = t; + } + } + u("Bad string"); + }, d = function() { + for (; n && n <= " "; ) l(); + }, _ = function() { + switch (n) { + case "t": + return l("t"), l("r"), l("u"), l("e"), true; + case "f": + return l("f"), l("a"), l("l"), l("s"), l("e"), false; + case "n": + return l("n"), l("u"), l("l"), l("l"), null; + } + u("Unexpected '" + n + "'"); + }, E, P = function() { + var w = []; + if (n === "[") { + if (l("["), d(), n === "]") return l("]"), w; + for (; n; ) { + if (w.push(E()), d(), n === "]") return l("]"), w; + l(","), d(); + } + } + u("Bad array"); + }, v = function() { + var w, g = /* @__PURE__ */ Object.create(null); + if (n === "{") { + if (l("{"), d(), n === "}") return l("}"), g; + for (; n; ) { + if (w = h(), d(), l(":"), e.strict === true && Object.hasOwnProperty.call(g, w) && u('Duplicate key "' + w + '"'), Z_.test(w) === true ? e.protoAction === "error" ? u("Object contains forbidden prototype property") : e.protoAction === "ignore" ? E() : g[w] = E() : eC.test(w) === true ? e.constructorAction === "error" ? u("Object contains forbidden constructor property") : e.constructorAction === "ignore" ? E() : g[w] = E() : g[w] = E(), d(), n === "}") return l("}"), g; + l(","), d(); + } + } + u("Bad object"); + }; + return E = function() { + switch (d(), n) { + case "{": + return v(); + case "[": + return P(); + case '"': + return h(); + case "-": + return f(); + default: + return n >= "0" && n <= "9" ? f() : _(); + } + }, function(w, g) { + var C; + return a = w + "", t = 0, n = " ", C = E(), d(), n && u("Syntax error"), typeof g == "function" ? (function R(S, N) { + var j, L, H = S[N]; + return H && typeof H == "object" && Object.keys(H).forEach(function(K) { + L = R(H, K), L !== void 0 ? H[K] = L : delete H[K]; + }), g.call(S, N, H); + })({ "": C }, "") : C; + }; + }; + Ph.exports = tC; +}); +var Nh = z((DS, Xo) => { + var Bh = Oh().stringify, Ih = xh(); + Xo.exports = function(r) { + return { parse: Ih(r), stringify: Bh }; + }; + Xo.exports.parse = Ih(); + Xo.exports.stringify = Bh; +}); +var _u = z((Nt) => { + "use strict"; + Object.defineProperty(Nt, "__esModule", { value: true }); + Nt.GCE_LINUX_BIOS_PATHS = void 0; + Nt.isGoogleCloudServerless = Lh; + Nt.isGoogleComputeEngineLinux = Uh; + Nt.isGoogleComputeEngineMACAddress = Mh; + Nt.isGoogleComputeEngine = $h; + Nt.detectGCPResidency = nC; + var qh = X("fs"), jh = X("os"); + Nt.GCE_LINUX_BIOS_PATHS = { BIOS_DATE: "/sys/class/dmi/id/bios_date", BIOS_VENDOR: "/sys/class/dmi/id/bios_vendor" }; + var rC = /^42:01/; + function Lh() { + return !!(process.env.CLOUD_RUN_JOB || process.env.FUNCTION_NAME || process.env.K_SERVICE); + } + function Uh() { + if ((0, jh.platform)() !== "linux") return false; + try { + (0, qh.statSync)(Nt.GCE_LINUX_BIOS_PATHS.BIOS_DATE); + let r = (0, qh.readFileSync)(Nt.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR, "utf8"); + return /Google/.test(r); + } catch { + return false; + } + } + function Mh() { + let r = (0, jh.networkInterfaces)(); + for (let e of Object.values(r)) if (e) { + for (let { mac: t } of e) if (rC.test(t)) return true; + } + return false; + } + function $h() { + return Uh() || Mh(); + } + function nC() { + return Lh() || $h(); + } +}); +var Hh = z((Qo) => { + "use strict"; + Object.defineProperty(Qo, "__esModule", { value: true }); + Qo.Colours = void 0; + var Xe = class r { + static isEnabled(e) { + return e && e.isTTY && (typeof e.getColorDepth == "function" ? e.getColorDepth() > 2 : true); + } + static refresh() { + r.enabled = r.isEnabled(process == null ? void 0 : process.stderr), this.enabled ? (r.reset = "\x1B[0m", r.bright = "\x1B[1m", r.dim = "\x1B[2m", r.red = "\x1B[31m", r.green = "\x1B[32m", r.yellow = "\x1B[33m", r.blue = "\x1B[34m", r.magenta = "\x1B[35m", r.cyan = "\x1B[36m", r.white = "\x1B[37m", r.grey = "\x1B[90m") : (r.reset = "", r.bright = "", r.dim = "", r.red = "", r.green = "", r.yellow = "", r.blue = "", r.magenta = "", r.cyan = "", r.white = "", r.grey = ""); + } + }; + Qo.Colours = Xe; + Xe.enabled = false; + Xe.reset = ""; + Xe.bright = ""; + Xe.dim = ""; + Xe.red = ""; + Xe.green = ""; + Xe.yellow = ""; + Xe.blue = ""; + Xe.magenta = ""; + Xe.cyan = ""; + Xe.white = ""; + Xe.grey = ""; + Xe.refresh(); +}); +var Jh = z((ve) => { + "use strict"; + var sC = ve && ve.__createBinding || (Object.create ? function(r, e, t, n) { + n === void 0 && (n = t); + var o = Object.getOwnPropertyDescriptor(e, t); + (!o || ("get" in o ? !e.__esModule : o.writable || o.configurable)) && (o = { enumerable: true, get: function() { + return e[t]; + } }), Object.defineProperty(r, n, o); + } : function(r, e, t, n) { + n === void 0 && (n = t), r[n] = e[t]; + }), oC = ve && ve.__setModuleDefault || (Object.create ? function(r, e) { + Object.defineProperty(r, "default", { enumerable: true, value: e }); + } : function(r, e) { + r.default = e; + }), Gh = ve && ve.__importStar || /* @__PURE__ */ (function() { + var r = function(e) { + return r = Object.getOwnPropertyNames || function(t) { + var n = []; + for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (n[n.length] = o); + return n; + }, r(e); + }; + return function(e) { + if (e && e.__esModule) return e; + var t = {}; + if (e != null) for (var n = r(e), o = 0; o < n.length; o++) n[o] !== "default" && sC(t, e, n[o]); + return oC(t, e), t; + }; + })(); + Object.defineProperty(ve, "__esModule", { value: true }); + ve.env = ve.DebugLogBackendBase = ve.placeholder = ve.AdhocDebugLogger = ve.LogSeverity = void 0; + ve.getNodeBackend = bu; + ve.getDebugBackend = aC; + ve.getStructuredBackend = uC; + ve.setBackend = cC; + ve.log = zh; + var iC = X("events"), ms = Gh(X("process")), Wh = Gh(X("util")), dt = Hh(), qt; + (function(r) { + r.DEFAULT = "DEFAULT", r.DEBUG = "DEBUG", r.INFO = "INFO", r.WARNING = "WARNING", r.ERROR = "ERROR"; + })(qt || (ve.LogSeverity = qt = {})); + var gs = class extends iC.EventEmitter { + constructor(e, t) { + super(), this.namespace = e, this.upstream = t, this.func = Object.assign(this.invoke.bind(this), { instance: this, on: (n, o) => this.on(n, o) }), this.func.debug = (...n) => this.invokeSeverity(qt.DEBUG, ...n), this.func.info = (...n) => this.invokeSeverity(qt.INFO, ...n), this.func.warn = (...n) => this.invokeSeverity(qt.WARNING, ...n), this.func.error = (...n) => this.invokeSeverity(qt.ERROR, ...n), this.func.sublog = (n) => zh(n, this.func); + } + invoke(e, ...t) { + if (this.upstream) try { + this.upstream(e, ...t); + } catch { + } + try { + this.emit("log", e, t); + } catch { + } + } + invokeSeverity(e, ...t) { + this.invoke({ severity: e }, ...t); + } + }; + ve.AdhocDebugLogger = gs; + ve.placeholder = new gs("", () => { + }).func; + var On = class { + constructor() { + var e; + this.cached = /* @__PURE__ */ new Map(), this.filters = [], this.filtersSet = false; + let t = (e = ms.env[ve.env.nodeEnables]) !== null && e !== void 0 ? e : "*"; + t === "all" && (t = "*"), this.filters = t.split(","); + } + log(e, t, ...n) { + try { + this.filtersSet || (this.setFilters(), this.filtersSet = true); + let o = this.cached.get(e); + o || (o = this.makeLogger(e), this.cached.set(e, o)), o(t, ...n); + } catch (o) { + console.error(o); + } + } + }; + ve.DebugLogBackendBase = On; + var Cu = class extends On { + constructor() { + super(...arguments), this.enabledRegexp = /.*/g; + } + isEnabled(e) { + return this.enabledRegexp.test(e); + } + makeLogger(e) { + return this.enabledRegexp.test(e) ? (t, ...n) => { + var o; + let a = `${dt.Colours.green}${e}${dt.Colours.reset}`, u = `${dt.Colours.yellow}${ms.pid}${dt.Colours.reset}`, l; + switch (t.severity) { + case qt.ERROR: + l = `${dt.Colours.red}${t.severity}${dt.Colours.reset}`; + break; + case qt.INFO: + l = `${dt.Colours.magenta}${t.severity}${dt.Colours.reset}`; + break; + case qt.WARNING: + l = `${dt.Colours.yellow}${t.severity}${dt.Colours.reset}`; + break; + default: + l = (o = t.severity) !== null && o !== void 0 ? o : qt.DEFAULT; + break; + } + let f = Wh.formatWithOptions({ colors: dt.Colours.enabled }, ...n), h = Object.assign({}, t); + delete h.severity; + let d = Object.getOwnPropertyNames(h).length ? JSON.stringify(h) : "", _ = d ? `${dt.Colours.grey}${d}${dt.Colours.reset}` : ""; + console.error("%s [%s|%s] %s%s", u, a, l, f, d ? ` ${_}` : ""); + } : () => { + }; + } + setFilters() { + let t = this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^"); + this.enabledRegexp = new RegExp(`^${t}$`, "i"); + } + }; + function bu() { + return new Cu(); + } + var Eu = class extends On { + constructor(e) { + super(), this.debugPkg = e; + } + makeLogger(e) { + let t = this.debugPkg(e); + return (n, ...o) => { + t(o[0], ...o.slice(1)); + }; + } + setFilters() { + var e; + let t = (e = ms.env.NODE_DEBUG) !== null && e !== void 0 ? e : ""; + ms.env.NODE_DEBUG = `${t}${t ? "," : ""}${this.filters.join(",")}`; + } + }; + function aC(r) { + return new Eu(r); + } + var wu = class extends On { + constructor(e) { + var t; + super(), this.upstream = (t = e) !== null && t !== void 0 ? t : void 0; + } + makeLogger(e) { + var t; + let n = (t = this.upstream) === null || t === void 0 ? void 0 : t.makeLogger(e); + return (o, ...a) => { + var u; + let l = (u = o.severity) !== null && u !== void 0 ? u : qt.INFO, f = Object.assign({ severity: l, message: Wh.format(...a) }, o), h = JSON.stringify(f); + n ? n(o, h) : console.log("%s", h); + }; + } + setFilters() { + var e; + (e = this.upstream) === null || e === void 0 || e.setFilters(); + } + }; + function uC(r) { + return new wu(r); + } + ve.env = { nodeEnables: "GOOGLE_SDK_NODE_LOGGING" }; + var Au = /* @__PURE__ */ new Map(), ht; + function cC(r) { + ht = r, Au.clear(); + } + function zh(r, e) { + if (!ht && !ms.env[ve.env.nodeEnables] || !r) return ve.placeholder; + e && (r = `${e.instance.namespace}:${r}`); + let t = Au.get(r); + if (t) return t.func; + if (ht === null) return ve.placeholder; + ht === void 0 && (ht = bu()); + let n = (() => { + let o; + return new gs(r, (u, ...l) => { + if (o !== ht) { + if (ht === null) return; + ht === void 0 && (ht = bu()), o = ht; + } + ht?.log(r, u, ...l); + }); + })(); + return Au.set(r, n), n.func; + } +}); +var Du = z((Zr) => { + "use strict"; + var lC = Zr && Zr.__createBinding || (Object.create ? function(r, e, t, n) { + n === void 0 && (n = t); + var o = Object.getOwnPropertyDescriptor(e, t); + (!o || ("get" in o ? !e.__esModule : o.writable || o.configurable)) && (o = { enumerable: true, get: function() { + return e[t]; + } }), Object.defineProperty(r, n, o); + } : function(r, e, t, n) { + n === void 0 && (n = t), r[n] = e[t]; + }), fC = Zr && Zr.__exportStar || function(r, e) { + for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && lC(e, r, t); + }; + Object.defineProperty(Zr, "__esModule", { value: true }); + fC(Jh(), Zr); +}); +var _s = z((ie) => { + "use strict"; + var Kh = ie && ie.__createBinding || (Object.create ? function(r, e, t, n) { + n === void 0 && (n = t); + var o = Object.getOwnPropertyDescriptor(e, t); + (!o || ("get" in o ? !e.__esModule : o.writable || o.configurable)) && (o = { enumerable: true, get: function() { + return e[t]; + } }), Object.defineProperty(r, n, o); + } : function(r, e, t, n) { + n === void 0 && (n = t), r[n] = e[t]; + }), dC = ie && ie.__setModuleDefault || (Object.create ? function(r, e) { + Object.defineProperty(r, "default", { enumerable: true, value: e }); + } : function(r, e) { + r.default = e; + }), hC = ie && ie.__importStar || /* @__PURE__ */ (function() { + var r = function(e) { + return r = Object.getOwnPropertyNames || function(t) { + var n = []; + for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (n[n.length] = o); + return n; + }, r(e); + }; + return function(e) { + if (e && e.__esModule) return e; + var t = {}; + if (e != null) for (var n = r(e), o = 0; o < n.length; o++) n[o] !== "default" && Kh(t, e, n[o]); + return dC(t, e), t; + }; + })(), pC = ie && ie.__exportStar || function(r, e) { + for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && Kh(e, r, t); + }; + Object.defineProperty(ie, "__esModule", { value: true }); + ie.gcpResidencyCache = ie.METADATA_SERVER_DETECTION = ie.HEADERS = ie.HEADER_VALUE = ie.HEADER_NAME = ie.SECONDARY_HOST_ADDRESS = ie.HOST_ADDRESS = ie.BASE_PATH = void 0; + ie.instance = bC; + ie.project = EC; + ie.universe = wC; + ie.bulk = AC; + ie.isAvailable = SC; + ie.resetIsAvailableCache = vC; + ie.getGCPResidency = Tu; + ie.setGCPResidency = Yh; + ie.requestTimeout = Xh; + var Su = Je(), mC = Nh(), gC = _u(), yC = hC(Du()); + ie.BASE_PATH = "/computeMetadata/v1"; + ie.HOST_ADDRESS = "http://169.254.169.254"; + ie.SECONDARY_HOST_ADDRESS = "http://metadata.google.internal."; + ie.HEADER_NAME = "Metadata-Flavor"; + ie.HEADER_VALUE = "Google"; + ie.HEADERS = Object.freeze({ [ie.HEADER_NAME]: ie.HEADER_VALUE }); + var Vh = yC.log("gcp-metadata"); + ie.METADATA_SERVER_DETECTION = Object.freeze({ "assume-present": "don't try to ping the metadata server, but assume it's present", none: "don't try to ping the metadata server, but don't try to use it either", "bios-only": "treat the result of a BIOS probe as canonical (don't fall back to pinging)", "ping-only": "skip the BIOS probe, and go straight to pinging" }); + function vu(r) { + return r || (r = process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST || ie.HOST_ADDRESS), /^https?:\/\//.test(r) || (r = `http://${r}`), new URL(ie.BASE_PATH, r).href; + } + function _C(r) { + Object.keys(r).forEach((e) => { + switch (e) { + case "params": + case "property": + case "headers": + break; + case "qs": + throw new Error("'qs' is not a valid configuration option. Please use 'params' instead."); + default: + throw new Error(`'${e}' is not a valid configuration option.`); + } + }); + } + async function ys(r, e = {}, t = 3, n = false) { + let o = new Headers(ie.HEADERS), a = "", u = {}; + if (typeof r == "object") { + let _ = r; + new Headers(_.headers).forEach((E, P) => o.set(P, E)), a = _.metadataKey, u = _.params || u, t = _.noResponseRetries || t, n = _.fastFail || n; + } else a = r; + typeof e == "string" ? a += `/${e}` : (_C(e), e.property && (a += `/${e.property}`), new Headers(e.headers).forEach((_, E) => o.set(E, _)), u = e.params || u); + let l = n ? CC : Su.request, f = { url: `${vu()}/${a}`, headers: o, retryConfig: { noResponseRetries: t }, params: u, responseType: "text", timeout: Xh() }; + Vh.info("instance request %j", f); + let h = await l(f); + Vh.info("instance metadata is %s", h.data); + let d = h.headers.get(ie.HEADER_NAME); + if (d !== ie.HEADER_VALUE) throw new RangeError(`Invalid response from metadata service: incorrect ${ie.HEADER_NAME} header. Expected '${ie.HEADER_VALUE}', got ${d ? `'${d}'` : "no header"}`); + if (typeof h.data == "string") try { + return mC.parse(h.data); + } catch { + } + return h.data; + } + async function CC(r) { + let e = { ...r, url: r.url?.toString().replace(vu(), vu(ie.SECONDARY_HOST_ADDRESS)) }, t = (0, Su.request)(r), n = (0, Su.request)(e); + return Promise.any([t, n]); + } + function bC(r) { + return ys("instance", r); + } + function EC(r) { + return ys("project", r); + } + function wC(r) { + return ys("universe", r); + } + async function AC(r) { + let e = {}; + return await Promise.all(r.map((t) => (async () => { + let n = await ys(t), o = t.metadataKey; + e[o] = n; + })())), e; + } + function DC() { + return process.env.DETECT_GCP_RETRIES ? Number(process.env.DETECT_GCP_RETRIES) : 0; + } + var Zo; + async function SC() { + if (process.env.METADATA_SERVER_DETECTION) { + let r = process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase(); + if (!(r in ie.METADATA_SERVER_DETECTION)) throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${r}\`, but it should be \`${Object.keys(ie.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`); + switch (r) { + case "assume-present": + return true; + case "none": + return false; + case "bios-only": + return Tu(); + case "ping-only": + } + } + try { + return Zo === void 0 && (Zo = ys("instance", void 0, DC(), !(process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST))), await Zo, true; + } catch (r) { + let e = r; + if (process.env.DEBUG_AUTH && console.info(e), e.type === "request-timeout" || e.response && e.response.status === 404) return false; + if (!(e.response && e.response.status === 404) && (!e.code || !["EHOSTDOWN", "EHOSTUNREACH", "ENETUNREACH", "ENOENT", "ENOTFOUND", "ECONNREFUSED"].includes(e.code.toString()))) { + let t = "UNKNOWN"; + e.code && (t = e.code.toString()), process.emitWarning(`received unexpected error = ${e.message} code = ${t}`, "MetadataLookupWarning"); + } + return false; + } + } + function vC() { + Zo = void 0; + } + ie.gcpResidencyCache = null; + function Tu() { + return ie.gcpResidencyCache === null && Yh(), ie.gcpResidencyCache; + } + function Yh(r = null) { + ie.gcpResidencyCache = r !== null ? r : (0, gC.detectGCPResidency)(); + } + function Xh() { + return Tu() ? 0 : 3e3; + } + pC(_u(), ie); +}); +var ep = z((ei) => { + "use strict"; + ei.byteLength = RC; + ei.toByteArray = FC; + ei.fromByteArray = xC; + var Jt = [], Dt = [], TC = typeof Uint8Array < "u" ? Uint8Array : Array, Ru = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + for (en = 0, Qh = Ru.length; en < Qh; ++en) Jt[en] = Ru[en], Dt[Ru.charCodeAt(en)] = en; + var en, Qh; + Dt[45] = 62; + Dt[95] = 63; + function Zh(r) { + var e = r.length; + if (e % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); + var t = r.indexOf("="); + t === -1 && (t = e); + var n = t === e ? 0 : 4 - t % 4; + return [t, n]; + } + function RC(r) { + var e = Zh(r), t = e[0], n = e[1]; + return (t + n) * 3 / 4 - n; + } + function kC(r, e, t) { + return (e + t) * 3 / 4 - t; + } + function FC(r) { + var e, t = Zh(r), n = t[0], o = t[1], a = new TC(kC(r, n, o)), u = 0, l = o > 0 ? n - 4 : n, f; + for (f = 0; f < l; f += 4) e = Dt[r.charCodeAt(f)] << 18 | Dt[r.charCodeAt(f + 1)] << 12 | Dt[r.charCodeAt(f + 2)] << 6 | Dt[r.charCodeAt(f + 3)], a[u++] = e >> 16 & 255, a[u++] = e >> 8 & 255, a[u++] = e & 255; + return o === 2 && (e = Dt[r.charCodeAt(f)] << 2 | Dt[r.charCodeAt(f + 1)] >> 4, a[u++] = e & 255), o === 1 && (e = Dt[r.charCodeAt(f)] << 10 | Dt[r.charCodeAt(f + 1)] << 4 | Dt[r.charCodeAt(f + 2)] >> 2, a[u++] = e >> 8 & 255, a[u++] = e & 255), a; + } + function OC(r) { + return Jt[r >> 18 & 63] + Jt[r >> 12 & 63] + Jt[r >> 6 & 63] + Jt[r & 63]; + } + function PC(r, e, t) { + for (var n, o = [], a = e; a < t; a += 3) n = (r[a] << 16 & 16711680) + (r[a + 1] << 8 & 65280) + (r[a + 2] & 255), o.push(OC(n)); + return o.join(""); + } + function xC(r) { + for (var e, t = r.length, n = t % 3, o = [], a = 16383, u = 0, l = t - n; u < l; u += a) o.push(PC(r, u, u + a > l ? l : u + a)); + return n === 1 ? (e = r[t - 1], o.push(Jt[e >> 2] + Jt[e << 4 & 63] + "==")) : n === 2 && (e = (r[t - 2] << 8) + r[t - 1], o.push(Jt[e >> 10] + Jt[e >> 4 & 63] + Jt[e << 2 & 63] + "=")), o.join(""); + } +}); +var Fu = z((ku) => { + "use strict"; + Object.defineProperty(ku, "__esModule", { value: true }); + ku.fromArrayBufferToHex = BC; + function BC(r) { + return Array.from(new Uint8Array(r)).map((t) => t.toString(16).padStart(2, "0")).join(""); + } +}); +var tp = z((ti) => { + "use strict"; + Object.defineProperty(ti, "__esModule", { value: true }); + ti.BrowserCrypto = void 0; + var Pn = ep(), IC = Fu(), Ou = class r { + constructor() { + if (typeof window > "u" || window.crypto === void 0 || window.crypto.subtle === void 0) throw new Error("SubtleCrypto not found. Make sure it's an https:// website."); + } + async sha256DigestBase64(e) { + let t = new TextEncoder().encode(e), n = await window.crypto.subtle.digest("SHA-256", t); + return Pn.fromByteArray(new Uint8Array(n)); + } + randomBytesBase64(e) { + let t = new Uint8Array(e); + return window.crypto.getRandomValues(t), Pn.fromByteArray(t); + } + static padBase64(e) { + for (; e.length % 4 !== 0; ) e += "="; + return e; + } + async verify(e, t, n) { + let o = { name: "RSASSA-PKCS1-v1_5", hash: { name: "SHA-256" } }, a = new TextEncoder().encode(t), u = Pn.toByteArray(r.padBase64(n)), l = await window.crypto.subtle.importKey("jwk", e, o, true, ["verify"]); + return await window.crypto.subtle.verify(o, l, u, a); + } + async sign(e, t) { + let n = { name: "RSASSA-PKCS1-v1_5", hash: { name: "SHA-256" } }, o = new TextEncoder().encode(t), a = await window.crypto.subtle.importKey("jwk", e, n, true, ["sign"]), u = await window.crypto.subtle.sign(n, a, o); + return Pn.fromByteArray(new Uint8Array(u)); + } + decodeBase64StringUtf8(e) { + let t = Pn.toByteArray(r.padBase64(e)); + return new TextDecoder().decode(t); + } + encodeBase64StringUtf8(e) { + let t = new TextEncoder().encode(e); + return Pn.fromByteArray(t); + } + async sha256DigestHex(e) { + let t = new TextEncoder().encode(e), n = await window.crypto.subtle.digest("SHA-256", t); + return (0, IC.fromArrayBufferToHex)(n); + } + async signWithHmacSha256(e, t) { + let n = typeof e == "string" ? e : String.fromCharCode(...new Uint16Array(e)), o = new TextEncoder(), a = await window.crypto.subtle.importKey("raw", o.encode(n), { name: "HMAC", hash: { name: "SHA-256" } }, false, ["sign"]); + return window.crypto.subtle.sign("HMAC", a, o.encode(t)); + } + }; + ti.BrowserCrypto = Ou; +}); +var rp = z((ri) => { + "use strict"; + Object.defineProperty(ri, "__esModule", { value: true }); + ri.NodeCrypto = void 0; + var xn = X("crypto"), Pu = class { + async sha256DigestBase64(e) { + return xn.createHash("sha256").update(e).digest("base64"); + } + randomBytesBase64(e) { + return xn.randomBytes(e).toString("base64"); + } + async verify(e, t, n) { + let o = xn.createVerify("RSA-SHA256"); + return o.update(t), o.end(), o.verify(e, n, "base64"); + } + async sign(e, t) { + let n = xn.createSign("RSA-SHA256"); + return n.update(t), n.end(), n.sign(e, "base64"); + } + decodeBase64StringUtf8(e) { + return Buffer.from(e, "base64").toString("utf-8"); + } + encodeBase64StringUtf8(e) { + return Buffer.from(e, "utf-8").toString("base64"); + } + async sha256DigestHex(e) { + return xn.createHash("sha256").update(e).digest("hex"); + } + async signWithHmacSha256(e, t) { + let n = typeof e == "string" ? e : qC(e); + return NC(xn.createHmac("sha256", n).update(t).digest()); + } + }; + ri.NodeCrypto = Pu; + function NC(r) { + return r.buffer.slice(r.byteOffset, r.byteOffset + r.byteLength); + } + function qC(r) { + return Buffer.from(r); + } +}); +var Cs = z((dr) => { + "use strict"; + var jC = dr && dr.__createBinding || (Object.create ? function(r, e, t, n) { + n === void 0 && (n = t); + var o = Object.getOwnPropertyDescriptor(e, t); + (!o || ("get" in o ? !e.__esModule : o.writable || o.configurable)) && (o = { enumerable: true, get: function() { + return e[t]; + } }), Object.defineProperty(r, n, o); + } : function(r, e, t, n) { + n === void 0 && (n = t), r[n] = e[t]; + }), LC = dr && dr.__exportStar || function(r, e) { + for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && jC(e, r, t); + }; + Object.defineProperty(dr, "__esModule", { value: true }); + dr.createCrypto = $C; + dr.hasBrowserCrypto = np; + var UC = tp(), MC = rp(); + LC(Fu(), dr); + function $C() { + return np() ? new UC.BrowserCrypto() : new MC.NodeCrypto(); + } + function np() { + return typeof window < "u" && typeof window.crypto < "u" && typeof window.crypto.subtle < "u"; + } +}); +var Bn = z((xu, op) => { + var ni = X("buffer"), Vt = ni.Buffer; + function sp(r, e) { + for (var t in r) e[t] = r[t]; + } + Vt.from && Vt.alloc && Vt.allocUnsafe && Vt.allocUnsafeSlow ? op.exports = ni : (sp(ni, xu), xu.Buffer = tn); + function tn(r, e, t) { + return Vt(r, e, t); + } + tn.prototype = Object.create(Vt.prototype); + sp(Vt, tn); + tn.from = function(r, e, t) { + if (typeof r == "number") throw new TypeError("Argument must not be a number"); + return Vt(r, e, t); + }; + tn.alloc = function(r, e, t) { + if (typeof r != "number") throw new TypeError("Argument must be a number"); + var n = Vt(r); + return e !== void 0 ? typeof t == "string" ? n.fill(e, t) : n.fill(e) : n.fill(0), n; + }; + tn.allocUnsafe = function(r) { + if (typeof r != "number") throw new TypeError("Argument must be a number"); + return Vt(r); + }; + tn.allocUnsafeSlow = function(r) { + if (typeof r != "number") throw new TypeError("Argument must be a number"); + return ni.SlowBuffer(r); + }; +}); +var ap = z((IS, ip) => { + "use strict"; + function Bu(r) { + var e = (r / 8 | 0) + (r % 8 === 0 ? 0 : 1); + return e; + } + var HC = { ES256: Bu(256), ES384: Bu(384), ES512: Bu(521) }; + function GC(r) { + var e = HC[r]; + if (e) return e; + throw new Error('Unknown algorithm "' + r + '"'); + } + ip.exports = GC; +}); +var Iu = z((NS, hp) => { + "use strict"; + var si = Bn().Buffer, cp = ap(), oi = 128, lp = 0, WC = 32, zC = 16, JC = 2, fp = zC | WC | lp << 6, ii = JC | lp << 6; + function VC(r) { + return r.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function dp(r) { + if (si.isBuffer(r)) return r; + if (typeof r == "string") return si.from(r, "base64"); + throw new TypeError("ECDSA signature must be a Base64 string or a Buffer"); + } + function KC(r, e) { + r = dp(r); + var t = cp(e), n = t + 1, o = r.length, a = 0; + if (r[a++] !== fp) throw new Error('Could not find expected "seq"'); + var u = r[a++]; + if (u === (oi | 1) && (u = r[a++]), o - a < u) throw new Error('"seq" specified length of "' + u + '", only "' + (o - a) + '" remaining'); + if (r[a++] !== ii) throw new Error('Could not find expected "int" for "r"'); + var l = r[a++]; + if (o - a - 2 < l) throw new Error('"r" specified length of "' + l + '", only "' + (o - a - 2) + '" available'); + if (n < l) throw new Error('"r" specified length of "' + l + '", max of "' + n + '" is acceptable'); + var f = a; + if (a += l, r[a++] !== ii) throw new Error('Could not find expected "int" for "s"'); + var h = r[a++]; + if (o - a !== h) throw new Error('"s" specified length of "' + h + '", expected "' + (o - a) + '"'); + if (n < h) throw new Error('"s" specified length of "' + h + '", max of "' + n + '" is acceptable'); + var d = a; + if (a += h, a !== o) throw new Error('Expected to consume entire buffer, but "' + (o - a) + '" bytes remain'); + var _ = t - l, E = t - h, P = si.allocUnsafe(_ + l + E + h); + for (a = 0; a < _; ++a) P[a] = 0; + r.copy(P, a, f + Math.max(-_, 0), f + l), a = t; + for (var v = a; a < v + E; ++a) P[a] = 0; + return r.copy(P, a, d + Math.max(-E, 0), d + h), P = P.toString("base64"), P = VC(P), P; + } + function up(r, e, t) { + for (var n = 0; e + n < t && r[e + n] === 0; ) ++n; + var o = r[e + n] >= oi; + return o && --n, n; + } + function YC(r, e) { + r = dp(r); + var t = cp(e), n = r.length; + if (n !== t * 2) throw new TypeError('"' + e + '" signatures must be "' + t * 2 + '" bytes, saw "' + n + '"'); + var o = up(r, 0, t), a = up(r, t, r.length), u = t - o, l = t - a, f = 2 + u + 1 + 1 + l, h = f < oi, d = si.allocUnsafe((h ? 2 : 3) + f), _ = 0; + return d[_++] = fp, h ? d[_++] = f : (d[_++] = oi | 1, d[_++] = f & 255), d[_++] = ii, d[_++] = u, o < 0 ? (d[_++] = 0, _ += r.copy(d, _, 0, t)) : _ += r.copy(d, _, o, t), d[_++] = ii, d[_++] = l, a < 0 ? (d[_++] = 0, r.copy(d, _, t)) : r.copy(d, _, t + a), d; + } + hp.exports = { derToJose: KC, joseToDer: YC }; +}); +var jt = z((hr) => { + "use strict"; + Object.defineProperty(hr, "__esModule", { value: true }); + hr.LRUCache = void 0; + hr.snakeToCamel = mp; + hr.originalOrCamelOptions = eb; + hr.removeUndefinedValuesInObject = tb; + hr.isValidFile = rb; + hr.getWellKnownCertificateConfigFileLocation = nb; + var XC = X("fs"), QC = X("os"), Nu = X("path"), ZC = "certificate_config.json", pp = "gcloud"; + function mp(r) { + return r.replace(/([_][^_])/g, (e) => e.slice(1).toUpperCase()); + } + function eb(r) { + function e(t) { + let n = r || {}; + return n[t] ?? n[mp(t)]; + } + return { get: e }; + } + var qu = class { + capacity; + #e = /* @__PURE__ */ new Map(); + maxAge; + constructor(e) { + this.capacity = e.capacity, this.maxAge = e.maxAge; + } + #t(e, t) { + this.#e.delete(e), this.#e.set(e, { value: t, lastAccessed: Date.now() }); + } + set(e, t) { + this.#t(e, t), this.#r(); + } + get(e) { + let t = this.#e.get(e); + if (t) return this.#t(e, t.value), this.#r(), t.value; + } + #r() { + let e = this.maxAge ? Date.now() - this.maxAge : 0, t = this.#e.entries().next(); + for (; !t.done && (this.#e.size > this.capacity || t.value[1].lastAccessed < e); ) this.#e.delete(t.value[0]), t = this.#e.entries().next(); + } + }; + hr.LRUCache = qu; + function tb(r) { + return Object.entries(r).forEach(([e, t]) => { + (t === void 0 || t === "undefined") && delete r[e]; + }), r; + } + async function rb(r) { + try { + return (await XC.promises.lstat(r)).isFile(); + } catch { + return false; + } + } + function nb() { + let r = process.env.CLOUDSDK_CONFIG || (sb() ? Nu.join(process.env.APPDATA || "", pp) : Nu.join(process.env.HOME || "", ".config", pp)); + return Nu.join(r, ZC); + } + function sb() { + return QC.platform().startsWith("win"); + } +}); +var gp = z((jS, ob) => { + ob.exports = { name: "google-auth-library", version: "10.2.0", author: "Google Inc.", description: "Google APIs Authentication Client Library for Node.js", engines: { node: ">=18" }, main: "./build/src/index.js", types: "./build/src/index.d.ts", repository: "googleapis/google-auth-library-nodejs.git", keywords: ["google", "api", "google apis", "client", "client library"], dependencies: { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", gaxios: "^7.0.0", "gcp-metadata": "^7.0.0", "google-logging-utils": "^1.0.0", gtoken: "^8.0.0", jws: "^4.0.0" }, devDependencies: { "@types/base64-js": "^1.2.5", "@types/jws": "^3.1.0", "@types/mocha": "^10.0.10", "@types/mv": "^2.1.0", "@types/ncp": "^2.0.1", "@types/node": "^22.0.0", "@types/sinon": "^17.0.0", "assert-rejects": "^1.0.0", c8: "^10.0.0", codecov: "^3.0.2", gts: "^6.0.0", "is-docker": "^3.0.0", jsdoc: "^4.0.0", "jsdoc-fresh": "^4.0.0", "jsdoc-region-tag": "^3.0.0", karma: "^6.0.0", "karma-chrome-launcher": "^3.0.0", "karma-coverage": "^2.0.0", "karma-firefox-launcher": "^2.0.0", "karma-mocha": "^2.0.0", "karma-sourcemap-loader": "^0.4.0", "karma-webpack": "^5.0.1", keypair: "^1.0.4", linkinator: "^6.1.2", mocha: "^11.1.0", mv: "^2.1.1", ncp: "^2.0.0", nock: "^14.0.1", "null-loader": "^4.0.0", puppeteer: "^24.0.0", sinon: "^21.0.0", "ts-loader": "^8.0.0", typescript: "^5.1.6", webpack: "^5.21.2", "webpack-cli": "^4.0.0" }, files: ["build/src", "!build/src/**/*.map"], scripts: { test: "c8 mocha build/test", clean: "gts clean", prepare: "npm run compile", lint: "gts check --no-inline-config", compile: "tsc -p .", fix: "gts fix", pretest: "npm run compile -- --sourceMap", docs: "jsdoc -c .jsdoc.js", "samples-setup": "cd samples/ && npm link ../ && npm run setup && cd ../", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "system-test": "mocha build/system-test --timeout 60000", "presystem-test": "npm run compile -- --sourceMap", webpack: "webpack", "browser-test": "karma start", "docs-test": "linkinator docs", "predocs-test": "npm run docs", prelint: "cd samples; npm link ../; npm install" }, license: "Apache-2.0" }; +}); +var ju = z((xr) => { + "use strict"; + Object.defineProperty(xr, "__esModule", { value: true }); + xr.USER_AGENT = xr.PRODUCT_NAME = xr.pkg = void 0; + var yp = gp(); + xr.pkg = yp; + var _p = "google-api-nodejs-client"; + xr.PRODUCT_NAME = _p; + var ib = `${_p}/${yp.version}`; + xr.USER_AGENT = ib; +}); +var pt = z((Lt) => { + "use strict"; + Object.defineProperty(Lt, "__esModule", { value: true }); + Lt.AuthClient = Lt.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = Lt.DEFAULT_UNIVERSE = void 0; + var ab = X("events"), Lu = Je(), ub = jt(), cb = Du(), Uu = ju(); + Lt.DEFAULT_UNIVERSE = "googleapis.com"; + Lt.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = 5 * 60 * 1e3; + var Mu = class r extends ab.EventEmitter { + apiKey; + projectId; + quotaProjectId; + transporter; + credentials = {}; + eagerRefreshThresholdMillis = Lt.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS; + forceRefreshOnFailure = false; + universeDomain = Lt.DEFAULT_UNIVERSE; + static RequestMethodNameSymbol = Symbol("request method name"); + static RequestLogIdSymbol = Symbol("request log id"); + constructor(e = {}) { + super(); + let t = (0, ub.originalOrCamelOptions)(e); + this.apiKey = e.apiKey, this.projectId = t.get("project_id") ?? null, this.quotaProjectId = t.get("quota_project_id"), this.credentials = t.get("credentials") ?? {}, this.universeDomain = t.get("universe_domain") ?? Lt.DEFAULT_UNIVERSE, this.transporter = e.transporter ?? new Lu.Gaxios(e.transporterOptions), t.get("useAuthRequestParameters") !== false && (this.transporter.interceptors.request.add(r.DEFAULT_REQUEST_INTERCEPTOR), this.transporter.interceptors.response.add(r.DEFAULT_RESPONSE_INTERCEPTOR)), e.eagerRefreshThresholdMillis && (this.eagerRefreshThresholdMillis = e.eagerRefreshThresholdMillis), this.forceRefreshOnFailure = e.forceRefreshOnFailure ?? false; + } + fetch(...e) { + let t = e[0], n = e[1], o, a = new Headers(); + return typeof t == "string" ? o = new URL(t) : t instanceof URL ? o = t : t && t.url && (o = new URL(t.url)), t && typeof t == "object" && "headers" in t && Lu.Gaxios.mergeHeaders(a, t.headers), n && Lu.Gaxios.mergeHeaders(a, new Headers(n.headers)), typeof t == "object" && !(t instanceof URL) ? this.request({ ...n, ...t, headers: a, url: o }) : this.request({ ...n, headers: a, url: o }); + } + setCredentials(e) { + this.credentials = e; + } + addSharedMetadataHeaders(e) { + return !e.has("x-goog-user-project") && this.quotaProjectId && e.set("x-goog-user-project", this.quotaProjectId), e; + } + addUserProjectAndAuthHeaders(e, t) { + let n = t.get("x-goog-user-project"), o = t.get("authorization"); + return n && e.set("x-goog-user-project", n), o && e.set("authorization", o), e; + } + static log = (0, cb.log)("auth"); + static DEFAULT_REQUEST_INTERCEPTOR = { resolved: async (e) => { + if (!e.headers.has("x-goog-api-client")) { + let n = process.version.replace(/^v/, ""); + e.headers.set("x-goog-api-client", `gl-node/${n}`); + } + let t = e.headers.get("User-Agent"); + t ? t.includes(`${Uu.PRODUCT_NAME}/`) || e.headers.set("User-Agent", `${t} ${Uu.USER_AGENT}`) : e.headers.set("User-Agent", Uu.USER_AGENT); + try { + let n = e, o = n[r.RequestMethodNameSymbol], a = `${Math.floor(Math.random() * 1e3)}`; + n[r.RequestLogIdSymbol] = a; + let u = { url: e.url, headers: e.headers }; + o ? r.log.info("%s [%s] request %j", o, a, u) : r.log.info("[%s] request %j", a, u); + } catch { + } + return e; + } }; + static DEFAULT_RESPONSE_INTERCEPTOR = { resolved: async (e) => { + try { + let t = e.config, n = t[r.RequestMethodNameSymbol], o = t[r.RequestLogIdSymbol]; + n ? r.log.info("%s [%s] response %j", n, o, e.data) : r.log.info("[%s] response %j", o, e.data); + } catch { + } + return e; + }, rejected: async (e) => { + try { + let t = e.config, n = t[r.RequestMethodNameSymbol], o = t[r.RequestLogIdSymbol]; + n ? r.log.info("%s [%s] error %j", n, o, e.response?.data) : r.log.error("[%s] error %j", o, e.response?.data); + } catch { + } + throw e; + } }; + static setMethodName(e, t) { + try { + let n = e; + n[r.RequestMethodNameSymbol] = t; + } catch { + } + } + static get RETRY_CONFIG() { + return { retry: true, retryConfig: { httpMethodsToRetry: ["GET", "PUT", "POST", "HEAD", "OPTIONS", "DELETE"] } }; + } + }; + Lt.AuthClient = Mu; +}); +var Hu = z((ai) => { + "use strict"; + Object.defineProperty(ai, "__esModule", { value: true }); + ai.LoginTicket = void 0; + var $u = class { + envelope; + payload; + constructor(e, t) { + this.envelope = e, this.payload = t; + } + getEnvelope() { + return this.envelope; + } + getPayload() { + return this.payload; + } + getUserId() { + let e = this.getPayload(); + return e && e.sub ? e.sub : null; + } + getAttributes() { + return { envelope: this.getEnvelope(), payload: this.getPayload() }; + } + }; + ai.LoginTicket = $u; +}); +var rn = z((Kt) => { + "use strict"; + Object.defineProperty(Kt, "__esModule", { value: true }); + Kt.OAuth2Client = Kt.ClientAuthentication = Kt.CertificateFormat = Kt.CodeChallengeMethod = void 0; + var Cp = Je(), lb = X("querystring"), fb = X("stream"), db = Iu(), bp = jt(), Gu = Cs(), In = pt(), hb = Hu(), Ep; + (function(r) { + r.Plain = "plain", r.S256 = "S256"; + })(Ep || (Kt.CodeChallengeMethod = Ep = {})); + var pr; + (function(r) { + r.PEM = "PEM", r.JWK = "JWK"; + })(pr || (Kt.CertificateFormat = pr = {})); + var bs; + (function(r) { + r.ClientSecretPost = "ClientSecretPost", r.ClientSecretBasic = "ClientSecretBasic", r.None = "None"; + })(bs || (Kt.ClientAuthentication = bs = {})); + var Wu = class r extends In.AuthClient { + redirectUri; + certificateCache = {}; + certificateExpiry = null; + certificateCacheFormat = pr.PEM; + refreshTokenPromises = /* @__PURE__ */ new Map(); + endpoints; + issuers; + clientAuthentication; + _clientId; + _clientSecret; + refreshHandler; + constructor(e = {}, t, n) { + super(typeof e == "object" ? e : {}), typeof e != "object" && (e = { clientId: e, clientSecret: t, redirectUri: n }), this._clientId = e.clientId || e.client_id, this._clientSecret = e.clientSecret || e.client_secret, this.redirectUri = e.redirectUri || e.redirect_uris?.[0], this.endpoints = { tokenInfoUrl: "https://oauth2.googleapis.com/tokeninfo", oauth2AuthBaseUrl: "https://accounts.google.com/o/oauth2/v2/auth", oauth2TokenUrl: "https://oauth2.googleapis.com/token", oauth2RevokeUrl: "https://oauth2.googleapis.com/revoke", oauth2FederatedSignonPemCertsUrl: "https://www.googleapis.com/oauth2/v1/certs", oauth2FederatedSignonJwkCertsUrl: "https://www.googleapis.com/oauth2/v3/certs", oauth2IapPublicKeyUrl: "https://www.gstatic.com/iap/verify/public_key", ...e.endpoints }, this.clientAuthentication = e.clientAuthentication || bs.ClientSecretPost, this.issuers = e.issuers || ["accounts.google.com", "https://accounts.google.com", this.universeDomain]; + } + static GOOGLE_TOKEN_INFO_URL = "https://oauth2.googleapis.com/tokeninfo"; + static CLOCK_SKEW_SECS_ = 300; + static DEFAULT_MAX_TOKEN_LIFETIME_SECS_ = 86400; + generateAuthUrl(e = {}) { + if (e.code_challenge_method && !e.code_challenge) throw new Error("If a code_challenge_method is provided, code_challenge must be included."); + return e.response_type = e.response_type || "code", e.client_id = e.client_id || this._clientId, e.redirect_uri = e.redirect_uri || this.redirectUri, Array.isArray(e.scope) && (e.scope = e.scope.join(" ")), this.endpoints.oauth2AuthBaseUrl.toString() + "?" + lb.stringify(e); + } + generateCodeVerifier() { + throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead."); + } + async generateCodeVerifierAsync() { + let e = (0, Gu.createCrypto)(), n = e.randomBytesBase64(96).replace(/\+/g, "~").replace(/=/g, "_").replace(/\//g, "-"), a = (await e.sha256DigestBase64(n)).split("=")[0].replace(/\+/g, "-").replace(/\//g, "_"); + return { codeVerifier: n, codeChallenge: a }; + } + getToken(e, t) { + let n = typeof e == "string" ? { code: e } : e; + if (t) this.getTokenAsync(n).then((o) => t(null, o.tokens, o.res), (o) => t(o, null, o.response)); + else return this.getTokenAsync(n); + } + async getTokenAsync(e) { + let t = this.endpoints.oauth2TokenUrl.toString(), n = new Headers(), o = { client_id: e.client_id || this._clientId, code_verifier: e.codeVerifier, code: e.code, grant_type: "authorization_code", redirect_uri: e.redirect_uri || this.redirectUri }; + if (this.clientAuthentication === bs.ClientSecretBasic) { + let f = Buffer.from(`${this._clientId}:${this._clientSecret}`); + n.set("authorization", `Basic ${f.toString("base64")}`); + } + this.clientAuthentication === bs.ClientSecretPost && (o.client_secret = this._clientSecret); + let a = { ...r.RETRY_CONFIG, method: "POST", url: t, data: new URLSearchParams((0, bp.removeUndefinedValuesInObject)(o)), headers: n }; + In.AuthClient.setMethodName(a, "getTokenAsync"); + let u = await this.transporter.request(a), l = u.data; + return u.data && u.data.expires_in && (l.expiry_date = (/* @__PURE__ */ new Date()).getTime() + u.data.expires_in * 1e3, delete l.expires_in), this.emit("tokens", l), { tokens: l, res: u }; + } + async refreshToken(e) { + if (!e) return this.refreshTokenNoCache(e); + if (this.refreshTokenPromises.has(e)) return this.refreshTokenPromises.get(e); + let t = this.refreshTokenNoCache(e).then((n) => (this.refreshTokenPromises.delete(e), n), (n) => { + throw this.refreshTokenPromises.delete(e), n; + }); + return this.refreshTokenPromises.set(e, t), t; + } + async refreshTokenNoCache(e) { + if (!e) throw new Error("No refresh token is set."); + let t = this.endpoints.oauth2TokenUrl.toString(), n = { refresh_token: e, client_id: this._clientId, client_secret: this._clientSecret, grant_type: "refresh_token" }, o; + try { + let u = { ...r.RETRY_CONFIG, method: "POST", url: t, data: new URLSearchParams((0, bp.removeUndefinedValuesInObject)(n)) }; + In.AuthClient.setMethodName(u, "refreshTokenNoCache"), o = await this.transporter.request(u); + } catch (u) { + throw u instanceof Cp.GaxiosError && u.message === "invalid_grant" && u.response?.data && /ReAuth/i.test(u.response.data.error_description) && (u.message = JSON.stringify(u.response.data)), u; + } + let a = o.data; + return o.data && o.data.expires_in && (a.expiry_date = (/* @__PURE__ */ new Date()).getTime() + o.data.expires_in * 1e3, delete a.expires_in), this.emit("tokens", a), { tokens: a, res: o }; + } + refreshAccessToken(e) { + if (e) this.refreshAccessTokenAsync().then((t) => e(null, t.credentials, t.res), e); + else return this.refreshAccessTokenAsync(); + } + async refreshAccessTokenAsync() { + let e = await this.refreshToken(this.credentials.refresh_token), t = e.tokens; + return t.refresh_token = this.credentials.refresh_token, this.credentials = t, { credentials: this.credentials, res: e.res }; + } + getAccessToken(e) { + if (e) this.getAccessTokenAsync().then((t) => e(null, t.token, t.res), e); + else return this.getAccessTokenAsync(); + } + async getAccessTokenAsync() { + if (!this.credentials.access_token || this.isTokenExpiring()) { + if (!this.credentials.refresh_token) if (this.refreshHandler) { + let n = await this.processAndValidateRefreshHandler(); + if (n?.access_token) return this.setCredentials(n), { token: this.credentials.access_token }; + } else throw new Error("No refresh token or refresh handler callback is set."); + let t = await this.refreshAccessTokenAsync(); + if (!t.credentials || t.credentials && !t.credentials.access_token) throw new Error("Could not refresh access token."); + return { token: t.credentials.access_token, res: t.res }; + } else return { token: this.credentials.access_token }; + } + async getRequestHeaders(e) { + return (await this.getRequestMetadataAsync(e)).headers; + } + async getRequestMetadataAsync(e) { + let t = this.credentials; + if (!t.access_token && !t.refresh_token && !this.apiKey && !this.refreshHandler) throw new Error("No access, refresh token, API key or refresh handler callback is set."); + if (t.access_token && !this.isTokenExpiring()) { + t.token_type = t.token_type || "Bearer"; + let l = new Headers({ authorization: t.token_type + " " + t.access_token }); + return { headers: this.addSharedMetadataHeaders(l) }; + } + if (this.refreshHandler) { + let l = await this.processAndValidateRefreshHandler(); + if (l?.access_token) { + this.setCredentials(l); + let f = new Headers({ authorization: "Bearer " + this.credentials.access_token }); + return { headers: this.addSharedMetadataHeaders(f) }; + } + } + if (this.apiKey) return { headers: new Headers({ "X-Goog-Api-Key": this.apiKey }) }; + let n = null, o = null; + try { + n = await this.refreshToken(t.refresh_token), o = n.tokens; + } catch (l) { + let f = l; + throw f.response && (f.response.status === 403 || f.response.status === 404) && (f.message = `Could not refresh access token: ${f.message}`), f; + } + let a = this.credentials; + a.token_type = a.token_type || "Bearer", o.refresh_token = a.refresh_token, this.credentials = o; + let u = new Headers({ authorization: a.token_type + " " + o.access_token }); + return { headers: this.addSharedMetadataHeaders(u), res: n.res }; + } + static getRevokeTokenUrl(e) { + return new r().getRevokeTokenURL(e).toString(); + } + getRevokeTokenURL(e) { + let t = new URL(this.endpoints.oauth2RevokeUrl); + return t.searchParams.append("token", e), t; + } + revokeToken(e, t) { + let n = { ...r.RETRY_CONFIG, url: this.getRevokeTokenURL(e).toString(), method: "POST" }; + if (In.AuthClient.setMethodName(n, "revokeToken"), t) this.transporter.request(n).then((o) => t(null, o), t); + else return this.transporter.request(n); + } + revokeCredentials(e) { + if (e) this.revokeCredentialsAsync().then((t) => e(null, t), e); + else return this.revokeCredentialsAsync(); + } + async revokeCredentialsAsync() { + let e = this.credentials.access_token; + if (this.credentials = {}, e) return this.revokeToken(e); + throw new Error("No access token to revoke."); + } + request(e, t) { + if (t) this.requestAsync(e).then((n) => t(null, n), (n) => t(n, n.response)); + else return this.requestAsync(e); + } + async requestAsync(e, t = false) { + try { + let n = await this.getRequestMetadataAsync(); + return e.headers = Cp.Gaxios.mergeHeaders(e.headers), this.addUserProjectAndAuthHeaders(e.headers, n.headers), this.apiKey && e.headers.set("X-Goog-Api-Key", this.apiKey), await this.transporter.request(e); + } catch (n) { + let o = n.response; + if (o) { + let a = o.status, u = this.credentials && this.credentials.access_token && this.credentials.refresh_token && (!this.credentials.expiry_date || this.forceRefreshOnFailure), l = this.credentials && this.credentials.access_token && !this.credentials.refresh_token && (!this.credentials.expiry_date || this.forceRefreshOnFailure) && this.refreshHandler, f = o.config.data instanceof fb.Readable, h = a === 401 || a === 403; + if (!t && h && !f && u) return await this.refreshAccessTokenAsync(), this.requestAsync(e, true); + if (!t && h && !f && l) { + let d = await this.processAndValidateRefreshHandler(); + return d?.access_token && this.setCredentials(d), this.requestAsync(e, true); + } + } + throw n; + } + } + verifyIdToken(e, t) { + if (t && typeof t != "function") throw new Error("This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry."); + if (t) this.verifyIdTokenAsync(e).then((n) => t(null, n), t); + else return this.verifyIdTokenAsync(e); + } + async verifyIdTokenAsync(e) { + if (!e.idToken) throw new Error("The verifyIdToken method requires an ID Token"); + let t = await this.getFederatedSignonCertsAsync(); + return await this.verifySignedJwtWithCertsAsync(e.idToken, t.certs, e.audience, this.issuers, e.maxExpiry); + } + async getTokenInfo(e) { + let { data: t } = await this.transporter.request({ ...r.RETRY_CONFIG, method: "POST", headers: { "content-type": "application/x-www-form-urlencoded;charset=UTF-8", authorization: `Bearer ${e}` }, url: this.endpoints.tokenInfoUrl.toString() }), n = Object.assign({ expiry_date: (/* @__PURE__ */ new Date()).getTime() + t.expires_in * 1e3, scopes: t.scope.split(" ") }, t); + return delete n.expires_in, delete n.scope, n; + } + getFederatedSignonCerts(e) { + if (e) this.getFederatedSignonCertsAsync().then((t) => e(null, t.certs, t.res), e); + else return this.getFederatedSignonCertsAsync(); + } + async getFederatedSignonCertsAsync() { + let e = (/* @__PURE__ */ new Date()).getTime(), t = (0, Gu.hasBrowserCrypto)() ? pr.JWK : pr.PEM; + if (this.certificateExpiry && e < this.certificateExpiry.getTime() && this.certificateCacheFormat === t) return { certs: this.certificateCache, format: t }; + let n, o; + switch (t) { + case pr.PEM: + o = this.endpoints.oauth2FederatedSignonPemCertsUrl.toString(); + break; + case pr.JWK: + o = this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString(); + break; + default: + throw new Error(`Unsupported certificate format ${t}`); + } + try { + let h = { ...r.RETRY_CONFIG, url: o }; + In.AuthClient.setMethodName(h, "getFederatedSignonCertsAsync"), n = await this.transporter.request(h); + } catch (h) { + throw h instanceof Error && (h.message = `Failed to retrieve verification certificates: ${h.message}`), h; + } + let a = n?.headers.get("cache-control"), u = -1; + if (a) { + let h = /max-age=(?[0-9]+)/.exec(a)?.groups?.maxAge; + h && (u = Number(h) * 1e3); + } + let l = {}; + switch (t) { + case pr.PEM: + l = n.data; + break; + case pr.JWK: + for (let h of n.data.keys) l[h.kid] = h; + break; + default: + throw new Error(`Unsupported certificate format ${t}`); + } + let f = /* @__PURE__ */ new Date(); + return this.certificateExpiry = u === -1 ? null : new Date(f.getTime() + u), this.certificateCache = l, this.certificateCacheFormat = t, { certs: l, format: t, res: n }; + } + getIapPublicKeys(e) { + if (e) this.getIapPublicKeysAsync().then((t) => e(null, t.pubkeys, t.res), e); + else return this.getIapPublicKeysAsync(); + } + async getIapPublicKeysAsync() { + let e, t = this.endpoints.oauth2IapPublicKeyUrl.toString(); + try { + let n = { ...r.RETRY_CONFIG, url: t }; + In.AuthClient.setMethodName(n, "getIapPublicKeysAsync"), e = await this.transporter.request(n); + } catch (n) { + throw n instanceof Error && (n.message = `Failed to retrieve verification certificates: ${n.message}`), n; + } + return { pubkeys: e.data, res: e }; + } + verifySignedJwtWithCerts() { + throw new Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead."); + } + async verifySignedJwtWithCertsAsync(e, t, n, o, a) { + let u = (0, Gu.createCrypto)(); + a || (a = r.DEFAULT_MAX_TOKEN_LIFETIME_SECS_); + let l = e.split("."); + if (l.length !== 3) throw new Error("Wrong number of segments in token: " + e); + let f = l[0] + "." + l[1], h = l[2], d, _; + try { + d = JSON.parse(u.decodeBase64StringUtf8(l[0])); + } catch (S) { + throw S instanceof Error && (S.message = `Can't parse token envelope: ${l[0]}': ${S.message}`), S; + } + if (!d) throw new Error("Can't parse token envelope: " + l[0]); + try { + _ = JSON.parse(u.decodeBase64StringUtf8(l[1])); + } catch (S) { + throw S instanceof Error && (S.message = `Can't parse token payload '${l[0]}`), S; + } + if (!_) throw new Error("Can't parse token payload: " + l[1]); + if (!Object.prototype.hasOwnProperty.call(t, d.kid)) throw new Error("No pem found for envelope: " + JSON.stringify(d)); + let E = t[d.kid]; + if (d.alg === "ES256" && (h = db.joseToDer(h, "ES256").toString("base64")), !await u.verify(E, f, h)) throw new Error("Invalid token signature: " + e); + if (!_.iat) throw new Error("No issue time in token: " + JSON.stringify(_)); + if (!_.exp) throw new Error("No expiration time in token: " + JSON.stringify(_)); + let v = Number(_.iat); + if (isNaN(v)) throw new Error("iat field using invalid format"); + let w = Number(_.exp); + if (isNaN(w)) throw new Error("exp field using invalid format"); + let g = (/* @__PURE__ */ new Date()).getTime() / 1e3; + if (w >= g + a) throw new Error("Expiration time too far in future: " + JSON.stringify(_)); + let C = v - r.CLOCK_SKEW_SECS_, R = w + r.CLOCK_SKEW_SECS_; + if (g < C) throw new Error("Token used too early, " + g + " < " + C + ": " + JSON.stringify(_)); + if (g > R) throw new Error("Token used too late, " + g + " > " + R + ": " + JSON.stringify(_)); + if (o && o.indexOf(_.iss) < 0) throw new Error("Invalid issuer, expected one of [" + o + "], but got " + _.iss); + if (typeof n < "u" && n !== null) { + let S = _.aud, N = false; + if (n.constructor === Array ? N = n.indexOf(S) > -1 : N = S === n, !N) throw new Error("Wrong recipient, payload audience != requiredAudience"); + } + return new hb.LoginTicket(d, _); + } + async processAndValidateRefreshHandler() { + if (this.refreshHandler) { + let e = await this.refreshHandler(); + if (!e.access_token) throw new Error("No access token is returned by the refreshHandler callback."); + return e; + } + } + isTokenExpiring() { + let e = this.credentials.expiry_date; + return e ? e <= (/* @__PURE__ */ new Date()).getTime() + this.eagerRefreshThresholdMillis : false; + } + }; + Kt.OAuth2Client = Wu; +}); +var Ju = z((ui) => { + "use strict"; + Object.defineProperty(ui, "__esModule", { value: true }); + ui.Compute = void 0; + var pb = Je(), wp = _s(), mb = rn(), zu = class extends mb.OAuth2Client { + serviceAccountEmail; + scopes; + constructor(e = {}) { + super(e), this.credentials = { expiry_date: 1, refresh_token: "compute-placeholder" }, this.serviceAccountEmail = e.serviceAccountEmail || "default", this.scopes = Array.isArray(e.scopes) ? e.scopes : e.scopes ? [e.scopes] : []; + } + async refreshTokenNoCache() { + let e = `service-accounts/${this.serviceAccountEmail}/token`, t; + try { + let o = { property: e }; + this.scopes.length > 0 && (o.params = { scopes: this.scopes.join(",") }), t = await wp.instance(o); + } catch (o) { + throw o instanceof pb.GaxiosError && (o.message = `Could not refresh access token: ${o.message}`, this.wrapError(o)), o; + } + let n = t; + return t && t.expires_in && (n.expiry_date = (/* @__PURE__ */ new Date()).getTime() + t.expires_in * 1e3, delete n.expires_in), this.emit("tokens", n), { tokens: n, res: null }; + } + async fetchIdToken(e) { + let t = `service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${e}`, n; + try { + let o = { property: t }; + n = await wp.instance(o); + } catch (o) { + throw o instanceof Error && (o.message = `Could not fetch ID token: ${o.message}`), o; + } + return n; + } + wrapError(e) { + let t = e.response; + t && t.status && (e.status = t.status, t.status === 403 ? e.message = "A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: " + e.message : t.status === 404 && (e.message = "A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: " + e.message)); + } + }; + ui.Compute = zu; +}); +var Ku = z((ci) => { + "use strict"; + Object.defineProperty(ci, "__esModule", { value: true }); + ci.IdTokenClient = void 0; + var gb = rn(), Vu = class extends gb.OAuth2Client { + targetAudience; + idTokenProvider; + constructor(e) { + super(e), this.targetAudience = e.targetAudience, this.idTokenProvider = e.idTokenProvider; + } + async getRequestMetadataAsync() { + if (!this.credentials.id_token || !this.credentials.expiry_date || this.isTokenExpiring()) { + let t = await this.idTokenProvider.fetchIdToken(this.targetAudience); + this.credentials = { id_token: t, expiry_date: this.getIdTokenExpiryDate(t) }; + } + return { headers: new Headers({ authorization: "Bearer " + this.credentials.id_token }) }; + } + getIdTokenExpiryDate(e) { + let t = e.split(".")[1]; + if (t) return JSON.parse(Buffer.from(t, "base64").toString("ascii")).exp * 1e3; + } + }; + ci.IdTokenClient = Vu; +}); +var Yu = z((Nn) => { + "use strict"; + Object.defineProperty(Nn, "__esModule", { value: true }); + Nn.GCPEnv = void 0; + Nn.clear = yb; + Nn.getEnv = _b; + var Ap = _s(), mr; + (function(r) { + r.APP_ENGINE = "APP_ENGINE", r.KUBERNETES_ENGINE = "KUBERNETES_ENGINE", r.CLOUD_FUNCTIONS = "CLOUD_FUNCTIONS", r.COMPUTE_ENGINE = "COMPUTE_ENGINE", r.CLOUD_RUN = "CLOUD_RUN", r.NONE = "NONE"; + })(mr || (Nn.GCPEnv = mr = {})); + var Es; + function yb() { + Es = void 0; + } + async function _b() { + return Es || (Es = Cb(), Es); + } + async function Cb() { + let r = mr.NONE; + return bb() ? r = mr.APP_ENGINE : Eb() ? r = mr.CLOUD_FUNCTIONS : await Db() ? await Ab() ? r = mr.KUBERNETES_ENGINE : wb() ? r = mr.CLOUD_RUN : r = mr.COMPUTE_ENGINE : r = mr.NONE, r; + } + function bb() { + return !!(process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME); + } + function Eb() { + return !!(process.env.FUNCTION_NAME || process.env.FUNCTION_TARGET); + } + function wb() { + return !!process.env.K_CONFIGURATION; + } + async function Ab() { + try { + return await Ap.instance("attributes/cluster-name"), true; + } catch { + return false; + } + } + async function Db() { + return Ap.isAvailable(); + } +}); +var Xu = z((zS, Dp) => { + var li = Bn().Buffer, Sb = X("stream"), vb = X("util"); + function fi(r) { + if (this.buffer = null, this.writable = true, this.readable = true, !r) return this.buffer = li.alloc(0), this; + if (typeof r.pipe == "function") return this.buffer = li.alloc(0), r.pipe(this), this; + if (r.length || typeof r == "object") return this.buffer = r, this.writable = false, process.nextTick(function() { + this.emit("end", r), this.readable = false, this.emit("close"); + }.bind(this)), this; + throw new TypeError("Unexpected data type (" + typeof r + ")"); + } + vb.inherits(fi, Sb); + fi.prototype.write = function(e) { + this.buffer = li.concat([this.buffer, li.from(e)]), this.emit("data", e); + }; + fi.prototype.end = function(e) { + e && this.write(e), this.emit("end", e), this.emit("close"), this.writable = false, this.readable = false; + }; + Dp.exports = fi; +}); +var vp = z((JS, Sp) => { + "use strict"; + var ws = X("buffer").Buffer, Qu = X("buffer").SlowBuffer; + Sp.exports = di; + function di(r, e) { + if (!ws.isBuffer(r) || !ws.isBuffer(e) || r.length !== e.length) return false; + for (var t = 0, n = 0; n < r.length; n++) t |= r[n] ^ e[n]; + return t === 0; + } + di.install = function() { + ws.prototype.equal = Qu.prototype.equal = function(e) { + return di(this, e); + }; + }; + var Tb = ws.prototype.equal, Rb = Qu.prototype.equal; + di.restore = function() { + ws.prototype.equal = Tb, Qu.prototype.equal = Rb; + }; +}); +var rc = z((VS, Ip) => { + var jn = Bn().Buffer, St = X("crypto"), Rp = Iu(), Tp = X("util"), kb = `"%s" is not a valid algorithm. + Supported algorithms are: + "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`, As = "secret must be a string or buffer", qn = "key must be a string or a buffer", Fb = "key must be a string, a buffer or an object", ec = typeof St.createPublicKey == "function"; + ec && (qn += " or a KeyObject", As += "or a KeyObject"); + function kp(r) { + if (!jn.isBuffer(r) && typeof r != "string" && (!ec || typeof r != "object" || typeof r.type != "string" || typeof r.asymmetricKeyType != "string" || typeof r.export != "function")) throw Ut(qn); + } + function Fp(r) { + if (!jn.isBuffer(r) && typeof r != "string" && typeof r != "object") throw Ut(Fb); + } + function Ob(r) { + if (!jn.isBuffer(r)) { + if (typeof r == "string") return r; + if (!ec || typeof r != "object" || r.type !== "secret" || typeof r.export != "function") throw Ut(As); + } + } + function tc(r) { + return r.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function Op(r) { + r = r.toString(); + var e = 4 - r.length % 4; + if (e !== 4) for (var t = 0; t < e; ++t) r += "="; + return r.replace(/\-/g, "+").replace(/_/g, "/"); + } + function Ut(r) { + var e = [].slice.call(arguments, 1), t = Tp.format.bind(Tp, r).apply(null, e); + return new TypeError(t); + } + function Pb(r) { + return jn.isBuffer(r) || typeof r == "string"; + } + function Ds(r) { + return Pb(r) || (r = JSON.stringify(r)), r; + } + function Pp(r) { + return function(t, n) { + Ob(n), t = Ds(t); + var o = St.createHmac("sha" + r, n), a = (o.update(t), o.digest("base64")); + return tc(a); + }; + } + var Zu, xb = "timingSafeEqual" in St ? function(e, t) { + return e.byteLength !== t.byteLength ? false : St.timingSafeEqual(e, t); + } : function(e, t) { + return Zu || (Zu = vp()), Zu(e, t); + }; + function Bb(r) { + return function(t, n, o) { + var a = Pp(r)(t, o); + return xb(jn.from(n), jn.from(a)); + }; + } + function xp(r) { + return function(t, n) { + Fp(n), t = Ds(t); + var o = St.createSign("RSA-SHA" + r), a = (o.update(t), o.sign(n, "base64")); + return tc(a); + }; + } + function Bp(r) { + return function(t, n, o) { + kp(o), t = Ds(t), n = Op(n); + var a = St.createVerify("RSA-SHA" + r); + return a.update(t), a.verify(o, n, "base64"); + }; + } + function Ib(r) { + return function(t, n) { + Fp(n), t = Ds(t); + var o = St.createSign("RSA-SHA" + r), a = (o.update(t), o.sign({ key: n, padding: St.constants.RSA_PKCS1_PSS_PADDING, saltLength: St.constants.RSA_PSS_SALTLEN_DIGEST }, "base64")); + return tc(a); + }; + } + function Nb(r) { + return function(t, n, o) { + kp(o), t = Ds(t), n = Op(n); + var a = St.createVerify("RSA-SHA" + r); + return a.update(t), a.verify({ key: o, padding: St.constants.RSA_PKCS1_PSS_PADDING, saltLength: St.constants.RSA_PSS_SALTLEN_DIGEST }, n, "base64"); + }; + } + function qb(r) { + var e = xp(r); + return function() { + var n = e.apply(null, arguments); + return n = Rp.derToJose(n, "ES" + r), n; + }; + } + function jb(r) { + var e = Bp(r); + return function(n, o, a) { + o = Rp.joseToDer(o, "ES" + r).toString("base64"); + var u = e(n, o, a); + return u; + }; + } + function Lb() { + return function() { + return ""; + }; + } + function Ub() { + return function(e, t) { + return t === ""; + }; + } + Ip.exports = function(e) { + var t = { hs: Pp, rs: xp, ps: Ib, es: qb, none: Lb }, n = { hs: Bb, rs: Bp, ps: Nb, es: jb, none: Ub }, o = e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); + if (!o) throw Ut(kb, e); + var a = (o[1] || o[3]).toLowerCase(), u = o[2]; + return { sign: t[a](u), verify: n[a](u) }; + }; +}); +var nc = z((KS, Np) => { + var Mb = X("buffer").Buffer; + Np.exports = function(e) { + return typeof e == "string" ? e : typeof e == "number" || Mb.isBuffer(e) ? e.toString() : JSON.stringify(e); + }; +}); +var $p = z((YS, Mp) => { + var $b = Bn().Buffer, qp = Xu(), Hb = rc(), Gb = X("stream"), jp = nc(), sc = X("util"); + function Lp(r, e) { + return $b.from(r, e).toString("base64").replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function Wb(r, e, t) { + t = t || "utf8"; + var n = Lp(jp(r), "binary"), o = Lp(jp(e), t); + return sc.format("%s.%s", n, o); + } + function Up(r) { + var e = r.header, t = r.payload, n = r.secret || r.privateKey, o = r.encoding, a = Hb(e.alg), u = Wb(e, t, o), l = a.sign(u, n); + return sc.format("%s.%s", u, l); + } + function hi(r) { + var e = r.secret || r.privateKey || r.key, t = new qp(e); + this.readable = true, this.header = r.header, this.encoding = r.encoding, this.secret = this.privateKey = this.key = t, this.payload = new qp(r.payload), this.secret.once("close", function() { + !this.payload.writable && this.readable && this.sign(); + }.bind(this)), this.payload.once("close", function() { + !this.secret.writable && this.readable && this.sign(); + }.bind(this)); + } + sc.inherits(hi, Gb); + hi.prototype.sign = function() { + try { + var e = Up({ header: this.header, payload: this.payload.buffer, secret: this.secret.buffer, encoding: this.encoding }); + return this.emit("done", e), this.emit("data", e), this.emit("end"), this.readable = false, e; + } catch (t) { + this.readable = false, this.emit("error", t), this.emit("close"); + } + }; + hi.sign = Up; + Mp.exports = hi; +}); +var Qp = z((XS, Xp) => { + var Gp = Bn().Buffer, Hp = Xu(), zb = rc(), Jb = X("stream"), Wp = nc(), Vb = X("util"), Kb = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; + function Yb(r) { + return Object.prototype.toString.call(r) === "[object Object]"; + } + function Xb(r) { + if (Yb(r)) return r; + try { + return JSON.parse(r); + } catch { + return; + } + } + function zp(r) { + var e = r.split(".", 1)[0]; + return Xb(Gp.from(e, "base64").toString("binary")); + } + function Qb(r) { + return r.split(".", 2).join("."); + } + function Jp(r) { + return r.split(".")[2]; + } + function Zb(r, e) { + e = e || "utf8"; + var t = r.split(".")[1]; + return Gp.from(t, "base64").toString(e); + } + function Vp(r) { + return Kb.test(r) && !!zp(r); + } + function Kp(r, e, t) { + if (!e) { + var n = new Error("Missing algorithm parameter for jws.verify"); + throw n.code = "MISSING_ALGORITHM", n; + } + r = Wp(r); + var o = Jp(r), a = Qb(r), u = zb(e); + return u.verify(a, o, t); + } + function Yp(r, e) { + if (e = e || {}, r = Wp(r), !Vp(r)) return null; + var t = zp(r); + if (!t) return null; + var n = Zb(r); + return (t.typ === "JWT" || e.json) && (n = JSON.parse(n, e.encoding)), { header: t, payload: n, signature: Jp(r) }; + } + function Ln(r) { + r = r || {}; + var e = r.secret || r.publicKey || r.key, t = new Hp(e); + this.readable = true, this.algorithm = r.algorithm, this.encoding = r.encoding, this.secret = this.publicKey = this.key = t, this.signature = new Hp(r.signature), this.secret.once("close", function() { + !this.signature.writable && this.readable && this.verify(); + }.bind(this)), this.signature.once("close", function() { + !this.secret.writable && this.readable && this.verify(); + }.bind(this)); + } + Vb.inherits(Ln, Jb); + Ln.prototype.verify = function() { + try { + var e = Kp(this.signature.buffer, this.algorithm, this.key.buffer), t = Yp(this.signature.buffer, this.encoding); + return this.emit("done", e, t), this.emit("data", e), this.emit("end"), this.readable = false, e; + } catch (n) { + this.readable = false, this.emit("error", n), this.emit("close"); + } + }; + Ln.decode = Yp; + Ln.isValid = Vp; + Ln.verify = Kp; + Xp.exports = Ln; +}); +var oc = z((Br) => { + var Zp = $p(), pi = Qp(), eE = ["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512"]; + Br.ALGORITHMS = eE; + Br.sign = Zp.sign; + Br.verify = pi.verify; + Br.decode = pi.decode; + Br.isValid = pi.isValid; + Br.createSign = function(e) { + return new Zp(e); + }; + Br.createVerify = function(e) { + return new pi(e); + }; +}); +var pm = z((gi) => { + "use strict"; + Object.defineProperty(gi, "__esModule", { value: true }); + gi.GoogleToken = void 0; + var em = mi(X("fs")), tE = Je(), rE = mi(oc()), nE = mi(X("path")), sE = X("util"); + function mi(r, e) { + if (typeof WeakMap == "function") var t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (mi = function(a, u) { + if (!u && a && a.__esModule) return a; + var l, f, h = { __proto__: null, default: a }; + if (a === null || gr(a) != "object" && typeof a != "function") return h; + if (l = u ? n : t) { + if (l.has(a)) return l.get(a); + l.set(a, h); + } + for (var d in a) d !== "default" && {}.hasOwnProperty.call(a, d) && ((f = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(a, d)) && (f.get || f.set) ? l(h, d, f) : h[d] = a[d]); + return h; + })(r, e); + } + function gr(r) { + "@babel/helpers - typeof"; + return gr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { + return typeof e; + } : function(e) { + return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; + }, gr(r); + } + function oE(r, e) { + cm(r, e), e.add(r); + } + function iE(r, e, t) { + cm(r, e), e.set(r, t); + } + function cm(r, e) { + if (e.has(r)) throw new TypeError("Cannot initialize the same private elements twice on an object"); + } + function tm(r, e, t) { + return r.set(Mt(r, e), t), t; + } + function rm(r, e) { + return r.get(Mt(r, e)); + } + function Mt(r, e, t) { + if (typeof r == "function" ? r === e : r.has(e)) return arguments.length < 3 ? e : t; + throw new TypeError("Private element is not present on this object"); + } + function nm(r, e) { + for (var t = 0; t < e.length; t++) { + var n = e[t]; + n.enumerable = n.enumerable || false, n.configurable = true, "value" in n && (n.writable = true), Object.defineProperty(r, dm(n.key), n); + } + } + function lm(r, e, t) { + return e && nm(r.prototype, e), t && nm(r, t), Object.defineProperty(r, "prototype", { writable: false }), r; + } + function fm(r, e) { + if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function aE(r, e, t) { + return e = Rs(e), uE(r, fc() ? Reflect.construct(e, t || [], Rs(r).constructor) : e.apply(r, t)); + } + function uE(r, e) { + if (e && (gr(e) == "object" || typeof e == "function")) return e; + if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); + return cE(r); + } + function cE(r) { + if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return r; + } + function lE(r, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function"); + r.prototype = Object.create(e && e.prototype, { constructor: { value: r, writable: true, configurable: true } }), Object.defineProperty(r, "prototype", { writable: false }), e && Ts(r, e); + } + function ic(r) { + var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; + return ic = function(n) { + if (n === null || !dE(n)) return n; + if (typeof n != "function") throw new TypeError("Super expression must either be null or a function"); + if (e !== void 0) { + if (e.has(n)) return e.get(n); + e.set(n, o); + } + function o() { + return fE(n, arguments, Rs(this).constructor); + } + return o.prototype = Object.create(n.prototype, { constructor: { value: o, enumerable: false, writable: true, configurable: true } }), Ts(o, n); + }, ic(r); + } + function fE(r, e, t) { + if (fc()) return Reflect.construct.apply(null, arguments); + var n = [null]; + n.push.apply(n, e); + var o = new (r.bind.apply(r, n))(); + return t && Ts(o, t.prototype), o; + } + function fc() { + try { + var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + } catch { + } + return (fc = function() { + return !!r; + })(); + } + function dE(r) { + try { + return Function.toString.call(r).indexOf("[native code]") !== -1; + } catch { + return typeof r == "function"; + } + } + function Ts(r, e) { + return Ts = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { + return t.__proto__ = n, t; + }, Ts(r, e); + } + function Rs(r) { + return Rs = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { + return e.__proto__ || Object.getPrototypeOf(e); + }, Rs(r); + } + function mt(r, e, t) { + return (e = dm(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: true, configurable: true, writable: true }) : r[e] = t, r; + } + function dm(r) { + var e = hE(r, "string"); + return gr(e) == "symbol" ? e : e + ""; + } + function hE(r, e) { + if (gr(r) != "object" || !r) return r; + var t = r[Symbol.toPrimitive]; + if (t !== void 0) { + var n = t.call(r, e || "default"); + if (gr(n) != "object") return n; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (e === "string" ? String : Number)(r); + } + function yt() { + var r, e, t = typeof Symbol == "function" ? Symbol : {}, n = t.iterator || "@@iterator", o = t.toStringTag || "@@toStringTag"; + function a(P, v, w, g) { + var C = v && v.prototype instanceof l ? v : l, R = Object.create(C.prototype); + return gt(R, "_invoke", (function(S, N, j) { + var L, H, K, W = 0, Ae = j || [], he = false, fe = { p: 0, n: 0, v: r, a: ye, f: ye.bind(r, 4), d: function(de, Z) { + return L = de, H = 0, K = r, fe.n = Z, u; + } }; + function ye(re, de) { + for (H = re, K = de, e = 0; !he && W && !Z && e < Ae.length; e++) { + var Z, ue = Ae[e], J = fe.p, se = ue[2]; + re > 3 ? (Z = se === de) && (K = ue[(H = ue[4]) ? 5 : (H = 3, 3)], ue[4] = ue[5] = r) : ue[0] <= J && ((Z = re < 2 && J < ue[1]) ? (H = 0, fe.v = de, fe.n = ue[1]) : J < se && (Z = re < 3 || ue[0] > de || de > se) && (ue[4] = re, ue[5] = de, fe.n = se, H = 0)); + } + if (Z || re > 1) return u; + throw he = true, de; + } + return function(re, de, Z) { + if (W > 1) throw TypeError("Generator is already running"); + for (he && de === 1 && ye(de, Z), H = de, K = Z; (e = H < 2 ? r : K) || !he; ) { + L || (H ? H < 3 ? (H > 1 && (fe.n = -1), ye(H, K)) : fe.n = K : fe.v = K); + try { + if (W = 2, L) { + if (H || (re = "next"), e = L[re]) { + if (!(e = e.call(L, K))) throw TypeError("iterator result is not an object"); + if (!e.done) return e; + K = e.value, H < 2 && (H = 0); + } else H === 1 && (e = L.return) && e.call(L), H < 2 && (K = TypeError("The iterator does not provide a '" + re + "' method"), H = 1); + L = r; + } else if ((e = (he = fe.n < 0) ? K : S.call(N, fe)) !== u) break; + } catch (ue) { + L = r, H = 1, K = ue; + } finally { + W = 1; + } + } + return { value: e, done: he }; + }; + })(P, w, g), true), R; + } + var u = {}; + function l() { + } + function f() { + } + function h() { + } + e = Object.getPrototypeOf; + var d = [][n] ? e(e([][n]())) : (gt(e = {}, n, function() { + return this; + }), e), _ = h.prototype = l.prototype = Object.create(d); + function E(P) { + return Object.setPrototypeOf ? Object.setPrototypeOf(P, h) : (P.__proto__ = h, gt(P, o, "GeneratorFunction")), P.prototype = Object.create(_), P; + } + return f.prototype = h, gt(_, "constructor", h), gt(h, "constructor", f), f.displayName = "GeneratorFunction", gt(h, o, "GeneratorFunction"), gt(_), gt(_, o, "Generator"), gt(_, n, function() { + return this; + }), gt(_, "toString", function() { + return "[object Generator]"; + }), (yt = function() { + return { w: a, m: E }; + })(); + } + function gt(r, e, t, n) { + var o = Object.defineProperty; + try { + o({}, "", {}); + } catch { + o = 0; + } + gt = function(u, l, f, h) { + if (l) o ? o(u, l, { value: f, enumerable: !h, configurable: !h, writable: !h }) : u[l] = f; + else { + var d = function(E, P) { + gt(u, E, function(v) { + return this._invoke(E, P, v); + }); + }; + d("next", 0), d("throw", 1), d("return", 2); + } + }, gt(r, e, t, n); + } + function sm(r, e, t, n, o, a, u) { + try { + var l = r[a](u), f = l.value; + } catch (h) { + return void t(h); + } + l.done ? e(f) : Promise.resolve(f).then(n, o); + } + function Un(r) { + return function() { + var e = this, t = arguments; + return new Promise(function(n, o) { + var a = r.apply(e, t); + function u(f) { + sm(a, n, o, u, l, "next", f); + } + function l(f) { + sm(a, n, o, u, l, "throw", f); + } + u(void 0); + }); + }; + } + var om = em.readFile ? (0, sE.promisify)(em.readFile) : Un(yt().m(function r() { + return yt().w(function(e) { + for (; ; ) switch (e.n) { + case 0: + throw new vs("use key rather than keyFile.", "MISSING_CREDENTIALS"); + case 1: + return e.a(2); + } + }, r); + })), im = "https://oauth2.googleapis.com/token", pE = "https://oauth2.googleapis.com/revoke?token=", vs = (function(r) { + function e(t, n) { + var o; + return fm(this, e), o = aE(this, e, [t]), mt(o, "code", void 0), o.code = n, o; + } + return lE(e, r), lm(e); + })(ic(Error)), Ss = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakSet(), ZS = gi.GoogleToken = (function() { + function r(e) { + fm(this, r), oE(this, Yt), mt(this, "expiresAt", void 0), mt(this, "key", void 0), mt(this, "keyFile", void 0), mt(this, "iss", void 0), mt(this, "sub", void 0), mt(this, "scope", void 0), mt(this, "rawToken", void 0), mt(this, "tokenExpires", void 0), mt(this, "email", void 0), mt(this, "additionalClaims", void 0), mt(this, "eagerRefreshThresholdMillis", void 0), mt(this, "transporter", { request: function(n) { + return (0, tE.request)(n); + } }), iE(this, Ss, void 0), Mt(Yt, this, hm).call(this, e); + } + return lm(r, [{ key: "accessToken", get: function() { + return this.rawToken ? this.rawToken.access_token : void 0; + } }, { key: "idToken", get: function() { + return this.rawToken ? this.rawToken.id_token : void 0; + } }, { key: "tokenType", get: function() { + return this.rawToken ? this.rawToken.token_type : void 0; + } }, { key: "refreshToken", get: function() { + return this.rawToken ? this.rawToken.refresh_token : void 0; + } }, { key: "hasExpired", value: function() { + var t = (/* @__PURE__ */ new Date()).getTime(); + return this.rawToken && this.expiresAt ? t >= this.expiresAt : true; + } }, { key: "isTokenExpiring", value: function() { + var t, n = (/* @__PURE__ */ new Date()).getTime(), o = (t = this.eagerRefreshThresholdMillis) !== null && t !== void 0 ? t : 0; + return this.rawToken && this.expiresAt ? this.expiresAt <= n + o : true; + } }, { key: "getToken", value: function(t) { + var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + if (gr(t) === "object" && (n = t, t = void 0), n = Object.assign({ forceRefresh: false }, n), t) { + var o = t; + Mt(Yt, this, am).call(this, n).then(function(a) { + return o(null, a); + }, t); + return; + } + return Mt(Yt, this, am).call(this, n); + } }, { key: "getCredentials", value: (function() { + var e = Un(yt().m(function n(o) { + var a, u, l, f, h, d, _; + return yt().w(function(E) { + for (; ; ) switch (E.n) { + case 0: + a = nE.extname(o), _ = a, E.n = _ === ".json" ? 1 : _ === ".der" || _ === ".crt" || _ === ".pem" ? 4 : _ === ".p12" || _ === ".pfx" ? 6 : 7; + break; + case 1: + return E.n = 2, om(o, "utf8"); + case 2: + if (u = E.v, l = JSON.parse(u), f = l.private_key, h = l.client_email, !(!f || !h)) { + E.n = 3; + break; + } + throw new vs("private_key and client_email are required.", "MISSING_CREDENTIALS"); + case 3: + return E.a(2, { privateKey: f, clientEmail: h }); + case 4: + return E.n = 5, om(o, "utf8"); + case 5: + return d = E.v, E.a(2, { privateKey: d }); + case 6: + throw new vs("*.p12 certificates are not supported after v6.1.2. Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.", "UNKNOWN_CERTIFICATE_TYPE"); + case 7: + throw new vs("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.", "UNKNOWN_CERTIFICATE_TYPE"); + case 8: + return E.a(2); + } + }, n); + })); + function t(n) { + return e.apply(this, arguments); + } + return t; + })() }, { key: "revokeToken", value: function(t) { + if (t) { + Mt(Yt, this, um).call(this).then(function() { + return t(); + }, t); + return; + } + return Mt(Yt, this, um).call(this); + } }]); + })(); + function am(r) { + return ac.apply(this, arguments); + } + function ac() { + return ac = Un(yt().m(function r(e) { + return yt().w(function(t) { + for (; ; ) switch (t.n) { + case 0: + if (!(rm(Ss, this) && !e.forceRefresh)) { + t.n = 1; + break; + } + return t.a(2, rm(Ss, this)); + case 1: + return t.p = 1, t.n = 2, tm(Ss, this, Mt(Yt, this, mE).call(this, e)); + case 2: + return t.a(2, t.v); + case 3: + return t.p = 3, tm(Ss, this, void 0), t.f(3); + case 4: + return t.a(2); + } + }, r, this, [[1, , 3, 4]]); + })), ac.apply(this, arguments); + } + function mE(r) { + return uc.apply(this, arguments); + } + function uc() { + return uc = Un(yt().m(function r(e) { + var t; + return yt().w(function(n) { + for (; ; ) switch (n.n) { + case 0: + if (!(this.isTokenExpiring() === false && e.forceRefresh === false)) { + n.n = 1; + break; + } + return n.a(2, Promise.resolve(this.rawToken)); + case 1: + if (!(!this.key && !this.keyFile)) { + n.n = 2; + break; + } + throw new Error("No key or keyFile set."); + case 2: + if (!(!this.key && this.keyFile)) { + n.n = 4; + break; + } + return n.n = 3, this.getCredentials(this.keyFile); + case 3: + t = n.v, this.key = t.privateKey, this.iss = t.clientEmail || this.iss, t.clientEmail || Mt(Yt, this, gE).call(this); + case 4: + return n.a(2, Mt(Yt, this, yE).call(this)); + } + }, r, this); + })), uc.apply(this, arguments); + } + function gE() { + if (!this.iss) throw new vs("email is required.", "MISSING_CREDENTIALS"); + } + function um() { + return cc.apply(this, arguments); + } + function cc() { + return cc = Un(yt().m(function r() { + var e; + return yt().w(function(t) { + for (; ; ) switch (t.n) { + case 0: + if (this.accessToken) { + t.n = 1; + break; + } + throw new Error("No token to revoke."); + case 1: + return e = pE + this.accessToken, t.n = 2, this.transporter.request({ url: e, retry: true }); + case 2: + Mt(Yt, this, hm).call(this, { email: this.iss, sub: this.sub, key: this.key, keyFile: this.keyFile, scope: this.scope, additionalClaims: this.additionalClaims }); + case 3: + return t.a(2); + } + }, r, this); + })), cc.apply(this, arguments); + } + function hm() { + var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + this.keyFile = r.keyFile, this.key = r.key, this.rawToken = void 0, this.iss = r.email || r.iss, this.sub = r.sub, this.additionalClaims = r.additionalClaims, gr(r.scope) === "object" ? this.scope = r.scope.join(" ") : this.scope = r.scope, this.eagerRefreshThresholdMillis = r.eagerRefreshThresholdMillis, r.transporter && (this.transporter = r.transporter); + } + function yE() { + return lc.apply(this, arguments); + } + function lc() { + return lc = Un(yt().m(function r() { + var e, t, n, o, a, u, l, f, h, d; + return yt().w(function(_) { + for (; ; ) switch (_.n) { + case 0: + return e = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3), t = this.additionalClaims || {}, n = Object.assign({ iss: this.iss, scope: this.scope, aud: im, exp: e + 3600, iat: e, sub: this.sub }, t), o = rE.sign({ header: { alg: "RS256" }, payload: n, secret: this.key }), _.p = 1, _.n = 2, this.transporter.request({ method: "POST", url: im, data: new URLSearchParams({ grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer", assertion: o }), responseType: "json", retryConfig: { httpMethodsToRetry: ["POST"] } }); + case 2: + return a = _.v, this.rawToken = a.data, this.expiresAt = a.data.expires_in === null || a.data.expires_in === void 0 ? void 0 : (e + a.data.expires_in) * 1e3, _.a(2, this.rawToken); + case 3: + throw _.p = 3, d = _.v, this.rawToken = void 0, this.tokenExpires = void 0, f = d.response && (u = d.response) !== null && u !== void 0 && u.data ? (l = d.response) === null || l === void 0 ? void 0 : l.data : {}, f.error && (h = f.error_description ? ": ".concat(f.error_description) : "", d.message = "".concat(f.error).concat(h)), d; + case 4: + return _.a(2); + } + }, r, this, [[1, 3]]); + })), lc.apply(this, arguments); + } +}); +var hc = z((yi) => { + "use strict"; + Object.defineProperty(yi, "__esModule", { value: true }); + yi.JWTAccess = void 0; + var _E = oc(), CE = jt(), mm = { alg: "RS256", typ: "JWT" }, dc = class r { + email; + key; + keyId; + projectId; + eagerRefreshThresholdMillis; + cache = new CE.LRUCache({ capacity: 500, maxAge: 60 * 60 * 1e3 }); + constructor(e, t, n, o) { + this.email = e, this.key = t, this.keyId = n, this.eagerRefreshThresholdMillis = o ?? 5 * 60 * 1e3; + } + getCachedKey(e, t) { + let n = e; + if (t && Array.isArray(t) && t.length ? n = e ? `${e}_${t.join("_")}` : `${t.join("_")}` : typeof t == "string" && (n = e ? `${e}_${t}` : t), !n) throw Error("Scopes or url must be provided"); + return n; + } + getRequestHeaders(e, t, n) { + let o = this.getCachedKey(e, n), a = this.cache.get(o), u = Date.now(); + if (a && a.expiration - u > this.eagerRefreshThresholdMillis) return new Headers(a.headers); + let l = Math.floor(Date.now() / 1e3), f = r.getExpirationTime(l), h; + if (Array.isArray(n) && (n = n.join(" ")), n ? h = { iss: this.email, sub: this.email, scope: n, exp: f, iat: l } : h = { iss: this.email, sub: this.email, aud: e, exp: f, iat: l }, t) { + for (let v in h) if (t[v]) throw new Error(`The '${v}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`); + } + let d = this.keyId ? { ...mm, kid: this.keyId } : mm, _ = Object.assign(h, t), E = _E.sign({ header: d, payload: _, secret: this.key }), P = new Headers({ authorization: `Bearer ${E}` }); + return this.cache.set(o, { expiration: f * 1e3, headers: P }), P; + } + static getExpirationTime(e) { + return e + 3600; + } + fromJSON(e) { + if (!e) throw new Error("Must pass in a JSON object containing the service account auth settings."); + if (!e.client_email) throw new Error("The incoming JSON object does not contain a client_email field"); + if (!e.private_key) throw new Error("The incoming JSON object does not contain a private_key field"); + this.email = e.client_email, this.key = e.private_key, this.keyId = e.private_key_id, this.projectId = e.project_id; + } + fromStream(e, t) { + if (t) this.fromStreamAsync(e).then(() => t(), t); + else return this.fromStreamAsync(e); + } + fromStreamAsync(e) { + return new Promise((t, n) => { + e || n(new Error("Must pass in a stream containing the service account auth settings.")); + let o = ""; + e.setEncoding("utf8").on("data", (a) => o += a).on("error", n).on("end", () => { + try { + let a = JSON.parse(o); + this.fromJSON(a), t(); + } catch (a) { + n(a); + } + }); + }); + } + }; + yi.JWTAccess = dc; +}); +var mc = z((Ci) => { + "use strict"; + Object.defineProperty(Ci, "__esModule", { value: true }); + Ci.JWT = void 0; + var gm = pm(), bE = hc(), EE = rn(), _i = pt(), pc = class r extends EE.OAuth2Client { + email; + keyFile; + key; + keyId; + defaultScopes; + scopes; + scope; + subject; + gtoken; + additionalClaims; + useJWTAccessWithScope; + defaultServicePath; + access; + constructor(e = {}) { + super(e), this.email = e.email, this.keyFile = e.keyFile, this.key = e.key, this.keyId = e.keyId, this.scopes = e.scopes, this.subject = e.subject, this.additionalClaims = e.additionalClaims, this.credentials = { refresh_token: "jwt-placeholder", expiry_date: 1 }; + } + createScoped(e) { + let t = new r(this); + return t.scopes = e, t; + } + async getRequestMetadataAsync(e) { + e = this.defaultServicePath ? `https://${this.defaultServicePath}/` : e; + let t = !this.hasUserScopes() && e || this.useJWTAccessWithScope && this.hasAnyScopes() || this.universeDomain !== _i.DEFAULT_UNIVERSE; + if (this.subject && this.universeDomain !== _i.DEFAULT_UNIVERSE) throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${_i.DEFAULT_UNIVERSE}`); + if (!this.apiKey && t) if (this.additionalClaims && this.additionalClaims.target_audience) { + let { tokens: n } = await this.refreshToken(); + return { headers: this.addSharedMetadataHeaders(new Headers({ authorization: `Bearer ${n.id_token}` })) }; + } else { + this.access || (this.access = new bE.JWTAccess(this.email, this.key, this.keyId, this.eagerRefreshThresholdMillis)); + let n; + this.hasUserScopes() ? n = this.scopes : e || (n = this.defaultScopes); + let o = this.useJWTAccessWithScope || this.universeDomain !== _i.DEFAULT_UNIVERSE, a = await this.access.getRequestHeaders(e ?? void 0, this.additionalClaims, o ? n : void 0); + return { headers: this.addSharedMetadataHeaders(a) }; + } + else return this.hasAnyScopes() || this.apiKey ? super.getRequestMetadataAsync(e) : { headers: new Headers() }; + } + async fetchIdToken(e) { + let t = new gm.GoogleToken({ iss: this.email, sub: this.subject, scope: this.scopes || this.defaultScopes, keyFile: this.keyFile, key: this.key, additionalClaims: { target_audience: e }, transporter: this.transporter }); + if (await t.getToken({ forceRefresh: true }), !t.idToken) throw new Error("Unknown error: Failed to fetch ID token"); + return t.idToken; + } + hasUserScopes() { + return this.scopes ? this.scopes.length > 0 : false; + } + hasAnyScopes() { + return !!(this.scopes && this.scopes.length > 0 || this.defaultScopes && this.defaultScopes.length > 0); + } + authorize(e) { + if (e) this.authorizeAsync().then((t) => e(null, t), e); + else return this.authorizeAsync(); + } + async authorizeAsync() { + let e = await this.refreshToken(); + if (!e) throw new Error("No result returned"); + return this.credentials = e.tokens, this.credentials.refresh_token = "jwt-placeholder", this.key = this.gtoken.key, this.email = this.gtoken.iss, e.tokens; + } + async refreshTokenNoCache() { + let e = this.createGToken(), n = { access_token: (await e.getToken({ forceRefresh: this.isTokenExpiring() })).access_token, token_type: "Bearer", expiry_date: e.expiresAt, id_token: e.idToken }; + return this.emit("tokens", n), { res: null, tokens: n }; + } + createGToken() { + return this.gtoken || (this.gtoken = new gm.GoogleToken({ iss: this.email, sub: this.subject, scope: this.scopes || this.defaultScopes, keyFile: this.keyFile, key: this.key, additionalClaims: this.additionalClaims, transporter: this.transporter })), this.gtoken; + } + fromJSON(e) { + if (!e) throw new Error("Must pass in a JSON object containing the service account auth settings."); + if (!e.client_email) throw new Error("The incoming JSON object does not contain a client_email field"); + if (!e.private_key) throw new Error("The incoming JSON object does not contain a private_key field"); + this.email = e.client_email, this.key = e.private_key, this.keyId = e.private_key_id, this.projectId = e.project_id, this.quotaProjectId = e.quota_project_id, this.universeDomain = e.universe_domain || this.universeDomain; + } + fromStream(e, t) { + if (t) this.fromStreamAsync(e).then(() => t(), t); + else return this.fromStreamAsync(e); + } + fromStreamAsync(e) { + return new Promise((t, n) => { + if (!e) throw new Error("Must pass in a stream containing the service account auth settings."); + let o = ""; + e.setEncoding("utf8").on("error", n).on("data", (a) => o += a).on("end", () => { + try { + let a = JSON.parse(o); + this.fromJSON(a), t(); + } catch (a) { + n(a); + } + }); + }); + } + fromAPIKey(e) { + if (typeof e != "string") throw new Error("Must provide an API Key string."); + this.apiKey = e; + } + async getCredentials() { + if (this.key) return { private_key: this.key, client_email: this.email }; + if (this.keyFile) { + let t = await this.createGToken().getCredentials(this.keyFile); + return { private_key: t.privateKey, client_email: t.clientEmail }; + } + throw new Error("A key or a keyFile must be provided to getCredentials."); + } + }; + Ci.JWT = pc; +}); +var yc = z((Mn) => { + "use strict"; + Object.defineProperty(Mn, "__esModule", { value: true }); + Mn.UserRefreshClient = Mn.USER_REFRESH_ACCOUNT_TYPE = void 0; + var wE = rn(), AE = pt(); + Mn.USER_REFRESH_ACCOUNT_TYPE = "authorized_user"; + var gc = class r extends wE.OAuth2Client { + _refreshToken; + constructor(e, t, n, o, a) { + let u = e && typeof e == "object" ? e : { clientId: e, clientSecret: t, refreshToken: n, eagerRefreshThresholdMillis: o, forceRefreshOnFailure: a }; + super(u), this._refreshToken = u.refreshToken, this.credentials.refresh_token = u.refreshToken; + } + async refreshTokenNoCache() { + return super.refreshTokenNoCache(this._refreshToken); + } + async fetchIdToken(e) { + let t = { ...r.RETRY_CONFIG, url: this.endpoints.oauth2TokenUrl, method: "POST", data: new URLSearchParams({ client_id: this._clientId, client_secret: this._clientSecret, grant_type: "refresh_token", refresh_token: this._refreshToken, target_audience: e }) }; + return AE.AuthClient.setMethodName(t, "fetchIdToken"), (await this.transporter.request(t)).data.id_token; + } + fromJSON(e) { + if (!e) throw new Error("Must pass in a JSON object containing the user refresh token"); + if (e.type !== "authorized_user") throw new Error('The incoming JSON object does not have the "authorized_user" type'); + if (!e.client_id) throw new Error("The incoming JSON object does not contain a client_id field"); + if (!e.client_secret) throw new Error("The incoming JSON object does not contain a client_secret field"); + if (!e.refresh_token) throw new Error("The incoming JSON object does not contain a refresh_token field"); + this._clientId = e.client_id, this._clientSecret = e.client_secret, this._refreshToken = e.refresh_token, this.credentials.refresh_token = e.refresh_token, this.quotaProjectId = e.quota_project_id, this.universeDomain = e.universe_domain || this.universeDomain; + } + fromStream(e, t) { + if (t) this.fromStreamAsync(e).then(() => t(), t); + else return this.fromStreamAsync(e); + } + async fromStreamAsync(e) { + return new Promise((t, n) => { + if (!e) return n(new Error("Must pass in a stream containing the user refresh token.")); + let o = ""; + e.setEncoding("utf8").on("error", n).on("data", (a) => o += a).on("end", () => { + try { + let a = JSON.parse(o); + return this.fromJSON(a), t(); + } catch (a) { + return n(a); + } + }); + }); + } + static fromJSON(e) { + let t = new r(); + return t.fromJSON(e), t; + } + }; + Mn.UserRefreshClient = gc; +}); +var Cc = z(($n) => { + "use strict"; + Object.defineProperty($n, "__esModule", { value: true }); + $n.Impersonated = $n.IMPERSONATED_ACCOUNT_TYPE = void 0; + var ym = rn(), DE = Je(), SE = jt(); + $n.IMPERSONATED_ACCOUNT_TYPE = "impersonated_service_account"; + var _c = class r extends ym.OAuth2Client { + sourceClient; + targetPrincipal; + targetScopes; + delegates; + lifetime; + endpoint; + constructor(e = {}) { + if (super(e), this.credentials = { expiry_date: 1, refresh_token: "impersonated-placeholder" }, this.sourceClient = e.sourceClient ?? new ym.OAuth2Client(), this.targetPrincipal = e.targetPrincipal ?? "", this.delegates = e.delegates ?? [], this.targetScopes = e.targetScopes ?? [], this.lifetime = e.lifetime ?? 3600, !!!(0, SE.originalOrCamelOptions)(e).get("universe_domain")) this.universeDomain = this.sourceClient.universeDomain; + else if (this.sourceClient.universeDomain !== this.universeDomain) throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`); + this.endpoint = e.endpoint ?? `https://iamcredentials.${this.universeDomain}`; + } + async sign(e) { + await this.sourceClient.getAccessToken(); + let t = `projects/-/serviceAccounts/${this.targetPrincipal}`, n = `${this.endpoint}/v1/${t}:signBlob`, o = { delegates: this.delegates, payload: Buffer.from(e).toString("base64") }; + return (await this.sourceClient.request({ ...r.RETRY_CONFIG, url: n, data: o, method: "POST" })).data; + } + getTargetPrincipal() { + return this.targetPrincipal; + } + async refreshToken() { + try { + await this.sourceClient.getAccessToken(); + let e = "projects/-/serviceAccounts/" + this.targetPrincipal, t = `${this.endpoint}/v1/${e}:generateAccessToken`, n = { delegates: this.delegates, scope: this.targetScopes, lifetime: this.lifetime + "s" }, o = await this.sourceClient.request({ ...r.RETRY_CONFIG, url: t, data: n, method: "POST" }), a = o.data; + return this.credentials.access_token = a.accessToken, this.credentials.expiry_date = Date.parse(a.expireTime), { tokens: this.credentials, res: o }; + } catch (e) { + if (!(e instanceof Error)) throw e; + let t = 0, n = ""; + throw e instanceof DE.GaxiosError && (t = e?.response?.data?.error?.status, n = e?.response?.data?.error?.message), t && n ? (e.message = `${t}: unable to impersonate: ${n}`, e) : (e.message = `unable to impersonate: ${e}`, e); + } + } + async fetchIdToken(e, t) { + await this.sourceClient.getAccessToken(); + let n = `projects/-/serviceAccounts/${this.targetPrincipal}`, o = `${this.endpoint}/v1/${n}:generateIdToken`, a = { delegates: this.delegates, audience: e, includeEmail: t?.includeEmail ?? true, useEmailAzp: t?.includeEmail ?? true }; + return (await this.sourceClient.request({ ...r.RETRY_CONFIG, url: o, data: a, method: "POST" })).data.token; + } + }; + $n.Impersonated = _c; +}); +var Ec = z((ks) => { + "use strict"; + Object.defineProperty(ks, "__esModule", { value: true }); + ks.OAuthClientAuthHandler = void 0; + ks.getErrorFromOAuthErrorResponse = RE; + var Hn = Je(), vE = Cs(), TE = ["PUT", "POST", "PATCH"], bc = class { + #e = (0, vE.createCrypto)(); + #t; + transporter; + constructor(e) { + e && "clientId" in e ? (this.#t = e, this.transporter = new Hn.Gaxios()) : (this.#t = e?.clientAuthentication, this.transporter = e?.transporter || new Hn.Gaxios()); + } + applyClientAuthenticationOptions(e, t) { + e.headers = Hn.Gaxios.mergeHeaders(e.headers), this.injectAuthenticatedHeaders(e, t), t || this.injectAuthenticatedRequestBody(e); + } + injectAuthenticatedHeaders(e, t) { + if (t) e.headers = Hn.Gaxios.mergeHeaders(e.headers, { authorization: `Bearer ${t}` }); + else if (this.#t?.confidentialClientType === "basic") { + e.headers = Hn.Gaxios.mergeHeaders(e.headers); + let n = this.#t.clientId, o = this.#t.clientSecret || "", a = this.#e.encodeBase64StringUtf8(`${n}:${o}`); + Hn.Gaxios.mergeHeaders(e.headers, { authorization: `Basic ${a}` }); + } + } + injectAuthenticatedRequestBody(e) { + if (this.#t?.confidentialClientType === "request-body") { + let t = (e.method || "GET").toUpperCase(); + if (!TE.includes(t)) throw new Error(`${t} HTTP method does not support ${this.#t.confidentialClientType} client authentication`); + let o = new Headers(e.headers).get("content-type"); + if (o?.startsWith("application/x-www-form-urlencoded") || e.data instanceof URLSearchParams) { + let a = new URLSearchParams(e.data ?? ""); + a.append("client_id", this.#t.clientId), a.append("client_secret", this.#t.clientSecret || ""), e.data = a; + } else if (o?.startsWith("application/json")) e.data = e.data || {}, Object.assign(e.data, { client_id: this.#t.clientId, client_secret: this.#t.clientSecret || "" }); + else throw new Error(`${o} content-types are not supported with ${this.#t.confidentialClientType} client authentication`); + } + } + static get RETRY_CONFIG() { + return { retry: true, retryConfig: { httpMethodsToRetry: ["GET", "PUT", "POST", "HEAD", "OPTIONS", "DELETE"] } }; + } + }; + ks.OAuthClientAuthHandler = bc; + function RE(r, e) { + let t = r.error, n = r.error_description, o = r.error_uri, a = `Error code ${t}`; + typeof n < "u" && (a += `: ${n}`), typeof o < "u" && (a += ` - ${o}`); + let u = new Error(a); + if (e) { + let l = Object.keys(e); + e.stack && l.push("stack"), l.forEach((f) => { + f !== "message" && Object.defineProperty(u, f, { value: e[f], writable: false, enumerable: true }); + }); + } + return u; + } +}); +var Ei = z((bi) => { + "use strict"; + Object.defineProperty(bi, "__esModule", { value: true }); + bi.StsCredentials = void 0; + var kE = Je(), FE = pt(), _m = Ec(), OE = jt(), wc = class r extends _m.OAuthClientAuthHandler { + #e; + constructor(e = { tokenExchangeEndpoint: "" }, t) { + (typeof e != "object" || e instanceof URL) && (e = { tokenExchangeEndpoint: e, clientAuthentication: t }), super(e), this.#e = e.tokenExchangeEndpoint; + } + async exchangeToken(e, t, n) { + let o = { grant_type: e.grantType, resource: e.resource, audience: e.audience, scope: e.scope?.join(" "), requested_token_type: e.requestedTokenType, subject_token: e.subjectToken, subject_token_type: e.subjectTokenType, actor_token: e.actingParty?.actorToken, actor_token_type: e.actingParty?.actorTokenType, options: n && JSON.stringify(n) }, a = { ...r.RETRY_CONFIG, url: this.#e.toString(), method: "POST", headers: t, data: new URLSearchParams((0, OE.removeUndefinedValuesInObject)(o)) }; + FE.AuthClient.setMethodName(a, "exchangeToken"), this.applyClientAuthenticationOptions(a); + try { + let u = await this.transporter.request(a), l = u.data; + return l.res = u, l; + } catch (u) { + throw u instanceof kE.GaxiosError && u.response ? (0, _m.getErrorFromOAuthErrorResponse)(u.response.data, u) : u; + } + } + }; + bi.StsCredentials = wc; +}); +var Ir = z((vt) => { + "use strict"; + Object.defineProperty(vt, "__esModule", { value: true }); + vt.BaseExternalAccountClient = vt.CLOUD_RESOURCE_MANAGER = vt.EXTERNAL_ACCOUNT_TYPE = vt.EXPIRATION_TIME_OFFSET = void 0; + var PE = Je(), xE = X("stream"), Ac = pt(), BE = Ei(), Cm = jt(), IE = ju(), NE = "urn:ietf:params:oauth:grant-type:token-exchange", qE = "urn:ietf:params:oauth:token-type:access_token", Dc = "https://www.googleapis.com/auth/cloud-platform", jE = 3600; + vt.EXPIRATION_TIME_OFFSET = 5 * 60 * 1e3; + vt.EXTERNAL_ACCOUNT_TYPE = "external_account"; + vt.CLOUD_RESOURCE_MANAGER = "https://cloudresourcemanager.googleapis.com/v1/projects/"; + var LE = "//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+", UE = "https://sts.{universeDomain}/v1/token", Sc = class r extends Ac.AuthClient { + scopes; + projectNumber; + audience; + subjectTokenType; + stsCredential; + clientAuth; + credentialSourceType; + cachedAccessToken; + serviceAccountImpersonationUrl; + serviceAccountImpersonationLifetime; + workforcePoolUserProject; + configLifetimeRequested; + tokenUrl; + cloudResourceManagerURL; + supplierContext; + #e = null; + constructor(e) { + super(e); + let t = (0, Cm.originalOrCamelOptions)(e), n = t.get("type"); + if (n && n !== vt.EXTERNAL_ACCOUNT_TYPE) throw new Error(`Expected "${vt.EXTERNAL_ACCOUNT_TYPE}" type but received "${e.type}"`); + let o = t.get("client_id"), a = t.get("client_secret"); + this.tokenUrl = t.get("token_url") ?? UE.replace("{universeDomain}", this.universeDomain); + let u = t.get("subject_token_type"), l = t.get("workforce_pool_user_project"), f = t.get("service_account_impersonation_url"), h = t.get("service_account_impersonation"), d = (0, Cm.originalOrCamelOptions)(h).get("token_lifetime_seconds"); + this.cloudResourceManagerURL = new URL(t.get("cloud_resource_manager_url") || `https://cloudresourcemanager.${this.universeDomain}/v1/projects/`), o && (this.clientAuth = { confidentialClientType: "basic", clientId: o, clientSecret: a }), this.stsCredential = new BE.StsCredentials({ tokenExchangeEndpoint: this.tokenUrl, clientAuthentication: this.clientAuth }), this.scopes = t.get("scopes") || [Dc], this.cachedAccessToken = null, this.audience = t.get("audience"), this.subjectTokenType = u, this.workforcePoolUserProject = l; + let _ = new RegExp(LE); + if (this.workforcePoolUserProject && !this.audience.match(_)) throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials."); + this.serviceAccountImpersonationUrl = f, this.serviceAccountImpersonationLifetime = d, this.serviceAccountImpersonationLifetime ? this.configLifetimeRequested = true : (this.configLifetimeRequested = false, this.serviceAccountImpersonationLifetime = jE), this.projectNumber = this.getProjectNumber(this.audience), this.supplierContext = { audience: this.audience, subjectTokenType: this.subjectTokenType, transporter: this.transporter }; + } + getServiceAccountEmail() { + if (this.serviceAccountImpersonationUrl) { + if (this.serviceAccountImpersonationUrl.length > 256) throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`); + return /serviceAccounts\/(?[^:]+):generateAccessToken$/.exec(this.serviceAccountImpersonationUrl)?.groups?.email || null; + } + return null; + } + setCredentials(e) { + super.setCredentials(e), this.cachedAccessToken = e; + } + async getAccessToken() { + return (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) && await this.refreshAccessTokenAsync(), { token: this.cachedAccessToken.access_token, res: this.cachedAccessToken.res }; + } + async getRequestHeaders() { + let e = await this.getAccessToken(), t = new Headers({ authorization: `Bearer ${e.token}` }); + return this.addSharedMetadataHeaders(t); + } + request(e, t) { + if (t) this.requestAsync(e).then((n) => t(null, n), (n) => t(n, n.response)); + else return this.requestAsync(e); + } + async getProjectId() { + let e = this.projectNumber || this.workforcePoolUserProject; + if (this.projectId) return this.projectId; + if (e) { + let t = await this.getRequestHeaders(), n = { ...r.RETRY_CONFIG, headers: t, url: `${this.cloudResourceManagerURL.toString()}${e}` }; + Ac.AuthClient.setMethodName(n, "getProjectId"); + let o = await this.transporter.request(n); + return this.projectId = o.data.projectId, this.projectId; + } + return null; + } + async requestAsync(e, t = false) { + let n; + try { + let o = await this.getRequestHeaders(); + e.headers = PE.Gaxios.mergeHeaders(e.headers), this.addUserProjectAndAuthHeaders(e.headers, o), n = await this.transporter.request(e); + } catch (o) { + let a = o.response; + if (a) { + let u = a.status, l = a.config.data instanceof xE.Readable; + if (!t && (u === 401 || u === 403) && !l && this.forceRefreshOnFailure) return await this.refreshAccessTokenAsync(), await this.requestAsync(e, true); + } + throw o; + } + return n; + } + async refreshAccessTokenAsync() { + this.#e = this.#e || this.#t(); + try { + return await this.#e; + } finally { + this.#e = null; + } + } + async #t() { + let e = await this.retrieveSubjectToken(), t = { grantType: NE, audience: this.audience, requestedTokenType: qE, subjectToken: e, subjectTokenType: this.subjectTokenType, scope: this.serviceAccountImpersonationUrl ? [Dc] : this.getScopesArray() }, n = !this.clientAuth && this.workforcePoolUserProject ? { userProject: this.workforcePoolUserProject } : void 0, o = new Headers({ "x-goog-api-client": this.getMetricsHeaderValue() }), a = await this.stsCredential.exchangeToken(t, o, n); + return this.serviceAccountImpersonationUrl ? this.cachedAccessToken = await this.getImpersonatedAccessToken(a.access_token) : a.expires_in ? this.cachedAccessToken = { access_token: a.access_token, expiry_date: (/* @__PURE__ */ new Date()).getTime() + a.expires_in * 1e3, res: a.res } : this.cachedAccessToken = { access_token: a.access_token, res: a.res }, this.credentials = {}, Object.assign(this.credentials, this.cachedAccessToken), delete this.credentials.res, this.emit("tokens", { refresh_token: null, expiry_date: this.cachedAccessToken.expiry_date, access_token: this.cachedAccessToken.access_token, token_type: "Bearer", id_token: null }), this.cachedAccessToken; + } + getProjectNumber(e) { + let t = e.match(/\/projects\/([^/]+)/); + return t ? t[1] : null; + } + async getImpersonatedAccessToken(e) { + let t = { ...r.RETRY_CONFIG, url: this.serviceAccountImpersonationUrl, method: "POST", headers: { "content-type": "application/json", authorization: `Bearer ${e}` }, data: { scope: this.getScopesArray(), lifetime: this.serviceAccountImpersonationLifetime + "s" } }; + Ac.AuthClient.setMethodName(t, "getImpersonatedAccessToken"); + let n = await this.transporter.request(t), o = n.data; + return { access_token: o.accessToken, expiry_date: new Date(o.expireTime).getTime(), res: n }; + } + isExpired(e) { + let t = (/* @__PURE__ */ new Date()).getTime(); + return e.expiry_date ? t >= e.expiry_date - this.eagerRefreshThresholdMillis : false; + } + getScopesArray() { + return typeof this.scopes == "string" ? [this.scopes] : this.scopes || [Dc]; + } + getMetricsHeaderValue() { + let e = process.version.replace(/^v/, ""), t = this.serviceAccountImpersonationUrl !== void 0, n = this.credentialSourceType ? this.credentialSourceType : "unknown"; + return `gl-node/${e} auth/${IE.pkg.version} google-byoid-sdk source/${n} sa-impersonation/${t} config-lifetime/${this.configLifetimeRequested}`; + } + getTokenUrl() { + return this.tokenUrl; + } + }; + vt.BaseExternalAccountClient = Sc; +}); +var bm = z((wi) => { + "use strict"; + Object.defineProperty(wi, "__esModule", { value: true }); + wi.FileSubjectTokenSupplier = void 0; + var Tc = X("util"), Rc = X("fs"), ME = (0, Tc.promisify)(Rc.readFile ?? (() => { + })), $E = (0, Tc.promisify)(Rc.realpath ?? (() => { + })), HE = (0, Tc.promisify)(Rc.lstat ?? (() => { + })), vc = class { + filePath; + formatType; + subjectTokenFieldName; + constructor(e) { + this.filePath = e.filePath, this.formatType = e.formatType, this.subjectTokenFieldName = e.subjectTokenFieldName; + } + async getSubjectToken() { + let e = this.filePath; + try { + if (e = await $E(e), !(await HE(e)).isFile()) throw new Error(); + } catch (o) { + throw o instanceof Error && (o.message = `The file at ${e} does not exist, or it is not a file. ${o.message}`), o; + } + let t, n = await ME(e, { encoding: "utf8" }); + if (this.formatType === "text" ? t = n : this.formatType === "json" && this.subjectTokenFieldName && (t = JSON.parse(n)[this.subjectTokenFieldName]), !t) throw new Error("Unable to parse the subject_token from the credential_source file"); + return t; + } + }; + wi.FileSubjectTokenSupplier = vc; +}); +var Em = z((Ai) => { + "use strict"; + Object.defineProperty(Ai, "__esModule", { value: true }); + Ai.UrlSubjectTokenSupplier = void 0; + var GE = pt(), kc = class { + url; + headers; + formatType; + subjectTokenFieldName; + additionalGaxiosOptions; + constructor(e) { + this.url = e.url, this.formatType = e.formatType, this.subjectTokenFieldName = e.subjectTokenFieldName, this.headers = e.headers, this.additionalGaxiosOptions = e.additionalGaxiosOptions; + } + async getSubjectToken(e) { + let t = { ...this.additionalGaxiosOptions, url: this.url, method: "GET", headers: this.headers }; + GE.AuthClient.setMethodName(t, "getSubjectToken"); + let n; + if (this.formatType === "text" ? n = (await e.transporter.request(t)).data : this.formatType === "json" && this.subjectTokenFieldName && (n = (await e.transporter.request(t)).data[this.subjectTokenFieldName]), !n) throw new Error("Unable to parse the subject_token from the credential_source URL"); + return n; + } + }; + Ai.UrlSubjectTokenSupplier = kc; +}); +var wm = z((_t) => { + "use strict"; + Object.defineProperty(_t, "__esModule", { value: true }); + _t.CertificateSubjectTokenSupplier = _t.InvalidConfigurationError = _t.CertificateSourceUnavailableError = _t.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = void 0; + var Di = jt(), Si = X("fs"), vi = X("crypto"), WE = X("https"); + _t.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = "GOOGLE_API_CERTIFICATE_CONFIG"; + var Xt = class extends Error { + constructor(e) { + super(e), this.name = "CertificateSourceUnavailableError"; + } + }; + _t.CertificateSourceUnavailableError = Xt; + var Tt = class extends Error { + constructor(e) { + super(e), this.name = "InvalidConfigurationError"; + } + }; + _t.InvalidConfigurationError = Tt; + var Fc = class { + certificateConfigPath; + trustChainPath; + cert; + key; + constructor(e) { + if (!e.useDefaultCertificateConfig && !e.certificateConfigLocation) throw new Tt("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided."); + if (e.useDefaultCertificateConfig && e.certificateConfigLocation) throw new Tt("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided."); + this.trustChainPath = e.trustChainPath, this.certificateConfigPath = e.certificateConfigLocation ?? ""; + } + async createMtlsHttpsAgent() { + if (!this.key || !this.cert) throw new Tt("Cannot create mTLS Agent with missing certificate or key"); + return new WE.Agent({ key: this.key, cert: this.cert }); + } + async getSubjectToken() { + this.certificateConfigPath = await this.#e(); + let { certPath: e, keyPath: t } = await this.#t(); + return { cert: this.cert, key: this.key } = await this.#r(e, t), await this.#n(this.cert); + } + async #e() { + let e = this.certificateConfigPath; + if (e) { + if (await (0, Di.isValidFile)(e)) return e; + throw new Xt(`Provided certificate config path is invalid: ${e}`); + } + let t = process.env[_t.CERTIFICATE_CONFIGURATION_ENV_VARIABLE]; + if (t) { + if (await (0, Di.isValidFile)(t)) return t; + throw new Xt(`Path from environment variable "${_t.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${t}`); + } + let n = (0, Di.getWellKnownCertificateConfigFileLocation)(); + if (await (0, Di.isValidFile)(n)) return n; + throw new Xt(`Could not find certificate configuration file. Searched override path, the "${_t.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${n}).`); + } + async #t() { + let e = this.certificateConfigPath, t; + try { + t = await Si.promises.readFile(e, "utf8"); + } catch { + throw new Xt(`Failed to read certificate config file at: ${e}`); + } + try { + let n = JSON.parse(t), o = n?.cert_configs?.workload?.cert_path, a = n?.cert_configs?.workload?.key_path; + if (!o || !a) throw new Tt(`Certificate config file (${e}) is missing required "cert_path" or "key_path" in the workload config.`); + return { certPath: o, keyPath: a }; + } catch (n) { + throw n instanceof Tt ? n : new Tt(`Failed to parse certificate config from ${e}: ${n.message}`); + } + } + async #r(e, t) { + let n, o; + try { + n = await Si.promises.readFile(e), new vi.X509Certificate(n); + } catch (a) { + let u = a instanceof Error ? a.message : String(a); + throw new Xt(`Failed to read certificate file at ${e}: ${u}`); + } + try { + o = await Si.promises.readFile(t), (0, vi.createPrivateKey)(o); + } catch (a) { + let u = a instanceof Error ? a.message : String(a); + throw new Xt(`Failed to read private key file at ${t}: ${u}`); + } + return { cert: n, key: o }; + } + async #n(e) { + let t = new vi.X509Certificate(e); + if (!this.trustChainPath) return JSON.stringify([t.raw.toString("base64")]); + try { + let a = ((await Si.promises.readFile(this.trustChainPath, "utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g) ?? []).map((f, h) => { + try { + return new vi.X509Certificate(f); + } catch (d) { + let _ = d instanceof Error ? d.message : String(d); + throw new Tt(`Failed to parse certificate at index ${h} in trust chain file ${this.trustChainPath}: ${_}`); + } + }), u = a.findIndex((f) => t.raw.equals(f.raw)), l; + if (u === -1) l = [t, ...a]; + else if (u === 0) l = a; + else throw new Tt(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${u}).`); + return JSON.stringify(l.map((f) => f.raw.toString("base64"))); + } catch (n) { + if (n instanceof Tt) throw n; + let o = n instanceof Error ? n.message : String(n); + throw new Xt(`Failed to process certificate chain from ${this.trustChainPath}: ${o}`); + } + } + }; + _t.CertificateSubjectTokenSupplier = Fc; +}); +var xc = z((Ti) => { + "use strict"; + Object.defineProperty(Ti, "__esModule", { value: true }); + Ti.IdentityPoolClient = void 0; + var zE = Ir(), Oc = jt(), JE = bm(), VE = Em(), Am = wm(), KE = Ei(), Dm = Je(), Pc = class r extends zE.BaseExternalAccountClient { + subjectTokenSupplier; + constructor(e) { + super(e); + let t = (0, Oc.originalOrCamelOptions)(e), n = t.get("credential_source"), o = t.get("subject_token_supplier"); + if (!n && !o) throw new Error("A credential source or subject token supplier must be specified."); + if (n && o) throw new Error("Only one of credential source or subject token supplier can be specified."); + if (o) this.subjectTokenSupplier = o, this.credentialSourceType = "programmatic"; + else { + let a = (0, Oc.originalOrCamelOptions)(n), u = (0, Oc.originalOrCamelOptions)(a.get("format")), l = u.get("type") || "text", f = u.get("subject_token_field_name"); + if (l !== "json" && l !== "text") throw new Error(`Invalid credential_source format "${l}"`); + if (l === "json" && !f) throw new Error("Missing subject_token_field_name for JSON credential_source format"); + let h = a.get("file"), d = a.get("url"), _ = a.get("certificate"), E = a.get("headers"); + if (h && d || d && _ || h && _) throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.'); + if (h) this.credentialSourceType = "file", this.subjectTokenSupplier = new JE.FileSubjectTokenSupplier({ filePath: h, formatType: l, subjectTokenFieldName: f }); + else if (d) this.credentialSourceType = "url", this.subjectTokenSupplier = new VE.UrlSubjectTokenSupplier({ url: d, formatType: l, subjectTokenFieldName: f, headers: E, additionalGaxiosOptions: r.RETRY_CONFIG }); + else if (_) { + this.credentialSourceType = "certificate"; + let P = new Am.CertificateSubjectTokenSupplier({ useDefaultCertificateConfig: _.use_default_certificate_config, certificateConfigLocation: _.certificate_config_location, trustChainPath: _.trust_chain_path }); + this.subjectTokenSupplier = P; + } else throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.'); + } + } + async retrieveSubjectToken() { + let e = await this.subjectTokenSupplier.getSubjectToken(this.supplierContext); + if (this.subjectTokenSupplier instanceof Am.CertificateSubjectTokenSupplier) { + let t = await this.subjectTokenSupplier.createMtlsHttpsAgent(); + this.stsCredential = new KE.StsCredentials({ tokenExchangeEndpoint: this.getTokenUrl(), clientAuthentication: this.clientAuth, transporter: new Dm.Gaxios({ agent: t }) }), this.transporter = new Dm.Gaxios({ ...this.transporter.defaults || {}, agent: t }); + } + return e; + } + }; + Ti.IdentityPoolClient = Pc; +}); +var Ic = z((ki) => { + "use strict"; + Object.defineProperty(ki, "__esModule", { value: true }); + ki.AwsRequestSigner = void 0; + var Ri = Je(), vm = Cs(), Sm = "AWS4-HMAC-SHA256", YE = "aws4_request", Bc = class { + getCredentials; + region; + crypto; + constructor(e, t) { + this.getCredentials = e, this.region = t, this.crypto = (0, vm.createCrypto)(); + } + async getRequestOptions(e) { + if (!e.url) throw new RangeError('"url" is required in "amzOptions"'); + let t = typeof e.data == "object" ? JSON.stringify(e.data) : e.data, n = e.url, o = e.method || "GET", a = e.body || t, u = e.headers, l = await this.getCredentials(), f = new URL(n); + if (typeof a != "string" && a !== void 0) throw new TypeError(`'requestPayload' is expected to be a string if provided. Got: ${a}`); + let h = await QE({ crypto: this.crypto, host: f.host, canonicalUri: f.pathname, canonicalQuerystring: f.search.slice(1), method: o, region: this.region, securityCredentials: l, requestPayload: a, additionalAmzHeaders: u }), d = Ri.Gaxios.mergeHeaders(h.amzDate ? { "x-amz-date": h.amzDate } : {}, { authorization: h.authorizationHeader, host: f.host }, u || {}); + l.token && Ri.Gaxios.mergeHeaders(d, { "x-amz-security-token": l.token }); + let _ = { url: n, method: o, headers: d }; + return a !== void 0 && (_.body = a), _; + } + }; + ki.AwsRequestSigner = Bc; + async function Fs(r, e, t) { + return await r.signWithHmacSha256(e, t); + } + async function XE(r, e, t, n, o) { + let a = await Fs(r, `AWS4${e}`, t), u = await Fs(r, a, n), l = await Fs(r, u, o); + return await Fs(r, l, "aws4_request"); + } + async function QE(r) { + let e = Ri.Gaxios.mergeHeaders(r.additionalAmzHeaders), t = r.requestPayload || "", n = r.host.split(".")[0], o = /* @__PURE__ */ new Date(), a = o.toISOString().replace(/[-:]/g, "").replace(/\.[0-9]+/, ""), u = o.toISOString().replace(/[-]/g, "").replace(/T.*/, ""); + r.securityCredentials.token && e.set("x-amz-security-token", r.securityCredentials.token); + let l = Ri.Gaxios.mergeHeaders({ host: r.host }, e.has("date") ? {} : { "x-amz-date": a }, e), f = "", h = [...l.keys()].sort(); + h.forEach((R) => { + f += `${R}:${l.get(R)} +`; + }); + let d = h.join(";"), _ = await r.crypto.sha256DigestHex(t), E = `${r.method.toUpperCase()} +${r.canonicalUri} +${r.canonicalQuerystring} +${f} +${d} +${_}`, P = `${u}/${r.region}/${n}/${YE}`, v = `${Sm} +${a} +${P} +` + await r.crypto.sha256DigestHex(E), w = await XE(r.crypto, r.securityCredentials.secretAccessKey, u, r.region, n), g = await Fs(r.crypto, w, v), C = `${Sm} Credential=${r.securityCredentials.accessKeyId}/${P}, SignedHeaders=${d}, Signature=${(0, vm.fromArrayBufferToHex)(g)}`; + return { amzDate: e.has("date") ? void 0 : a, authorizationHeader: C, canonicalQuerystring: r.canonicalQuerystring }; + } +}); +var Tm = z((Oi) => { + "use strict"; + Object.defineProperty(Oi, "__esModule", { value: true }); + Oi.DefaultAwsSecurityCredentialsSupplier = void 0; + var Fi = pt(), Nc = class { + regionUrl; + securityCredentialsUrl; + imdsV2SessionTokenUrl; + additionalGaxiosOptions; + constructor(e) { + this.regionUrl = e.regionUrl, this.securityCredentialsUrl = e.securityCredentialsUrl, this.imdsV2SessionTokenUrl = e.imdsV2SessionTokenUrl, this.additionalGaxiosOptions = e.additionalGaxiosOptions; + } + async getAwsRegion(e) { + if (this.#n) return this.#n; + let t = new Headers(); + if (!this.#n && this.imdsV2SessionTokenUrl && t.set("x-aws-ec2-metadata-token", await this.#e(e.transporter)), !this.regionUrl) throw new RangeError('Unable to determine AWS region due to missing "options.credential_source.region_url"'); + let n = { ...this.additionalGaxiosOptions, url: this.regionUrl, method: "GET", headers: t }; + Fi.AuthClient.setMethodName(n, "getAwsRegion"); + let o = await e.transporter.request(n); + return o.data.substr(0, o.data.length - 1); + } + async getAwsSecurityCredentials(e) { + if (this.#s) return this.#s; + let t = new Headers(); + this.imdsV2SessionTokenUrl && t.set("x-aws-ec2-metadata-token", await this.#e(e.transporter)); + let n = await this.#t(t, e.transporter), o = await this.#r(n, t, e.transporter); + return { accessKeyId: o.AccessKeyId, secretAccessKey: o.SecretAccessKey, token: o.Token }; + } + async #e(e) { + let t = { ...this.additionalGaxiosOptions, url: this.imdsV2SessionTokenUrl, method: "PUT", headers: { "x-aws-ec2-metadata-token-ttl-seconds": "300" } }; + return Fi.AuthClient.setMethodName(t, "#getImdsV2SessionToken"), (await e.request(t)).data; + } + async #t(e, t) { + if (!this.securityCredentialsUrl) throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"'); + let n = { ...this.additionalGaxiosOptions, url: this.securityCredentialsUrl, method: "GET", headers: e }; + return Fi.AuthClient.setMethodName(n, "#getAwsRoleName"), (await t.request(n)).data; + } + async #r(e, t, n) { + let o = { ...this.additionalGaxiosOptions, url: `${this.securityCredentialsUrl}/${e}`, headers: t }; + return Fi.AuthClient.setMethodName(o, "#retrieveAwsSecurityCredentials"), (await n.request(o)).data; + } + get #n() { + return process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || null; + } + get #s() { + return process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY ? { accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, token: process.env.AWS_SESSION_TOKEN } : null; + } + }; + Oi.DefaultAwsSecurityCredentialsSupplier = Nc; +}); +var jc = z((Pi) => { + "use strict"; + Object.defineProperty(Pi, "__esModule", { value: true }); + Pi.AwsClient = void 0; + var ZE = Ic(), ew = Ir(), tw = Tm(), Rm = jt(), rw = Je(), qc = class r extends ew.BaseExternalAccountClient { + environmentId; + awsSecurityCredentialsSupplier; + regionalCredVerificationUrl; + awsRequestSigner; + region; + static #e = "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15"; + static AWS_EC2_METADATA_IPV4_ADDRESS = "169.254.169.254"; + static AWS_EC2_METADATA_IPV6_ADDRESS = "fd00:ec2::254"; + constructor(e) { + super(e); + let t = (0, Rm.originalOrCamelOptions)(e), n = t.get("credential_source"), o = t.get("aws_security_credentials_supplier"); + if (!n && !o) throw new Error("A credential source or AWS security credentials supplier must be specified."); + if (n && o) throw new Error("Only one of credential source or AWS security credentials supplier can be specified."); + if (o) this.awsSecurityCredentialsSupplier = o, this.regionalCredVerificationUrl = r.#e, this.credentialSourceType = "programmatic"; + else { + let a = (0, Rm.originalOrCamelOptions)(n); + this.environmentId = a.get("environment_id"); + let u = a.get("region_url"), l = a.get("url"), f = a.get("imdsv2_session_token_url"); + this.awsSecurityCredentialsSupplier = new tw.DefaultAwsSecurityCredentialsSupplier({ regionUrl: u, securityCredentialsUrl: l, imdsV2SessionTokenUrl: f }), this.regionalCredVerificationUrl = a.get("regional_cred_verification_url"), this.credentialSourceType = "aws", this.validateEnvironmentId(); + } + this.awsRequestSigner = null, this.region = ""; + } + validateEnvironmentId() { + let e = this.environmentId?.match(/^(aws)(\d+)$/); + if (!e || !this.regionalCredVerificationUrl) throw new Error('No valid AWS "credential_source" provided'); + if (parseInt(e[2], 10) !== 1) throw new Error(`aws version "${e[2]}" is not supported in the current build.`); + } + async retrieveSubjectToken() { + this.awsRequestSigner || (this.region = await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext), this.awsRequestSigner = new ZE.AwsRequestSigner(async () => this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext), this.region)); + let e = await this.awsRequestSigner.getRequestOptions({ ...r.RETRY_CONFIG, url: this.regionalCredVerificationUrl.replace("{region}", this.region), method: "POST" }), t = []; + return rw.Gaxios.mergeHeaders({ "x-goog-cloud-target-resource": this.audience }, e.headers).forEach((o, a) => t.push({ key: a, value: o })), encodeURIComponent(JSON.stringify({ url: e.url, method: e.method, headers: t })); + } + }; + Pi.AwsClient = qc; +}); +var Hc = z((qe) => { + "use strict"; + Object.defineProperty(qe, "__esModule", { value: true }); + qe.InvalidSubjectTokenError = qe.InvalidMessageFieldError = qe.InvalidCodeFieldError = qe.InvalidTokenTypeFieldError = qe.InvalidExpirationTimeFieldError = qe.InvalidSuccessFieldError = qe.InvalidVersionFieldError = qe.ExecutableResponseError = qe.ExecutableResponse = void 0; + var xi = "urn:ietf:params:oauth:token-type:saml2", Lc = "urn:ietf:params:oauth:token-type:id_token", Uc = "urn:ietf:params:oauth:token-type:jwt", Mc = class { + version; + success; + expirationTime; + tokenType; + errorCode; + errorMessage; + subjectToken; + constructor(e) { + if (!e.version) throw new Bi("Executable response must contain a 'version' field."); + if (e.success === void 0) throw new Ii("Executable response must contain a 'success' field."); + if (this.version = e.version, this.success = e.success, this.success) { + if (this.expirationTime = e.expiration_time, this.tokenType = e.token_type, this.tokenType !== xi && this.tokenType !== Lc && this.tokenType !== Uc) throw new Ni(`Executable response must contain a 'token_type' field when successful and it must be one of ${Lc}, ${Uc}, or ${xi}.`); + if (this.tokenType === xi) { + if (!e.saml_response) throw new Os(`Executable response must contain a 'saml_response' field when token_type=${xi}.`); + this.subjectToken = e.saml_response; + } else { + if (!e.id_token) throw new Os(`Executable response must contain a 'id_token' field when token_type=${Lc} or ${Uc}.`); + this.subjectToken = e.id_token; + } + } else { + if (!e.code) throw new qi("Executable response must contain a 'code' field when unsuccessful."); + if (!e.message) throw new ji("Executable response must contain a 'message' field when unsuccessful."); + this.errorCode = e.code, this.errorMessage = e.message; + } + } + isValid() { + return !this.isExpired() && this.success; + } + isExpired() { + return this.expirationTime !== void 0 && this.expirationTime < Math.round(Date.now() / 1e3); + } + }; + qe.ExecutableResponse = Mc; + var Qt = class extends Error { + constructor(e) { + super(e), Object.setPrototypeOf(this, new.target.prototype); + } + }; + qe.ExecutableResponseError = Qt; + var Bi = class extends Qt { + }; + qe.InvalidVersionFieldError = Bi; + var Ii = class extends Qt { + }; + qe.InvalidSuccessFieldError = Ii; + var $c = class extends Qt { + }; + qe.InvalidExpirationTimeFieldError = $c; + var Ni = class extends Qt { + }; + qe.InvalidTokenTypeFieldError = Ni; + var qi = class extends Qt { + }; + qe.InvalidCodeFieldError = qi; + var ji = class extends Qt { + }; + qe.InvalidMessageFieldError = ji; + var Os = class extends Qt { + }; + qe.InvalidSubjectTokenError = Os; +}); +var zc = z((Gn) => { + "use strict"; + Object.defineProperty(Gn, "__esModule", { value: true }); + Gn.PluggableAuthHandler = Gn.ExecutableError = void 0; + var nn = Hc(), nw = X("child_process"), Gc = X("fs"), Li = class extends Error { + code; + constructor(e, t) { + super(`The executable failed with exit code: ${t} and error message: ${e}.`), this.code = t, Object.setPrototypeOf(this, new.target.prototype); + } + }; + Gn.ExecutableError = Li; + var Wc = class r { + commandComponents; + timeoutMillis; + outputFile; + constructor(e) { + if (!e.command) throw new Error("No command provided."); + if (this.commandComponents = r.parseCommand(e.command), this.timeoutMillis = e.timeoutMillis, !this.timeoutMillis) throw new Error("No timeoutMillis provided."); + this.outputFile = e.outputFile; + } + retrieveResponseFromExecutable(e) { + return new Promise((t, n) => { + let o = nw.spawn(this.commandComponents[0], this.commandComponents.slice(1), { env: { ...process.env, ...Object.fromEntries(e) } }), a = ""; + o.stdout.on("data", (l) => { + a += l; + }), o.stderr.on("data", (l) => { + a += l; + }); + let u = setTimeout(() => (o.removeAllListeners(), o.kill(), n(new Error("The executable failed to finish within the timeout specified."))), this.timeoutMillis); + o.on("close", (l) => { + if (clearTimeout(u), l === 0) try { + let f = JSON.parse(a), h = new nn.ExecutableResponse(f); + return t(h); + } catch (f) { + return f instanceof nn.ExecutableResponseError ? n(f) : n(new nn.ExecutableResponseError(`The executable returned an invalid response: ${a}`)); + } + else return n(new Li(a, l.toString())); + }); + }); + } + async retrieveCachedResponse() { + if (!this.outputFile || this.outputFile.length === 0) return; + let e; + try { + e = await Gc.promises.realpath(this.outputFile); + } catch { + return; + } + if (!(await Gc.promises.lstat(e)).isFile()) return; + let t = await Gc.promises.readFile(e, { encoding: "utf8" }); + if (t !== "") try { + let n = JSON.parse(t); + return new nn.ExecutableResponse(n).isValid() ? new nn.ExecutableResponse(n) : void 0; + } catch (n) { + throw n instanceof nn.ExecutableResponseError ? n : new nn.ExecutableResponseError(`The output file contained an invalid response: ${t}`); + } + } + static parseCommand(e) { + let t = e.match(/(?:[^\s"]+|"[^"]*")+/g); + if (!t) throw new Error(`Provided command: "${e}" could not be parsed.`); + for (let n = 0; n < t.length; n++) t[n][0] === '"' && t[n].slice(-1) === '"' && (t[n] = t[n].slice(1, -1)); + return t; + } + }; + Gn.PluggableAuthHandler = Wc; +}); +var Vc = z((Wn) => { + "use strict"; + Object.defineProperty(Wn, "__esModule", { value: true }); + Wn.PluggableAuthClient = Wn.ExecutableError = void 0; + var sw = Ir(), ow = Hc(), km = zc(), iw = zc(); + Object.defineProperty(Wn, "ExecutableError", { enumerable: true, get: function() { + return iw.ExecutableError; + } }); + var aw = 30 * 1e3, Fm = 5 * 1e3, Om = 120 * 1e3, uw = "GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES", Pm = 1, Jc = class extends sw.BaseExternalAccountClient { + command; + timeoutMillis; + outputFile; + handler; + constructor(e) { + if (super(e), !e.credential_source.executable) throw new Error('No valid Pluggable Auth "credential_source" provided.'); + if (this.command = e.credential_source.executable.command, !this.command) throw new Error('No valid Pluggable Auth "credential_source" provided.'); + if (e.credential_source.executable.timeout_millis === void 0) this.timeoutMillis = aw; + else if (this.timeoutMillis = e.credential_source.executable.timeout_millis, this.timeoutMillis < Fm || this.timeoutMillis > Om) throw new Error(`Timeout must be between ${Fm} and ${Om} milliseconds.`); + this.outputFile = e.credential_source.executable.output_file, this.handler = new km.PluggableAuthHandler({ command: this.command, timeoutMillis: this.timeoutMillis, outputFile: this.outputFile }), this.credentialSourceType = "executable"; + } + async retrieveSubjectToken() { + if (process.env[uw] !== "1") throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1."); + let e; + if (this.outputFile && (e = await this.handler.retrieveCachedResponse()), !e) { + let t = /* @__PURE__ */ new Map(); + t.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE", this.audience), t.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE", this.subjectTokenType), t.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE", "0"), this.outputFile && t.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE", this.outputFile); + let n = this.getServiceAccountEmail(); + n && t.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL", n), e = await this.handler.retrieveResponseFromExecutable(t); + } + if (e.version > Pm) throw new Error(`Version of executable is not currently supported, maximum supported version is ${Pm}.`); + if (!e.success) throw new km.ExecutableError(e.errorMessage, e.errorCode); + if (this.outputFile && !e.expirationTime) throw new ow.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration."); + if (e.isExpired()) throw new Error("Executable response is expired."); + return e.subjectToken; + } + }; + Wn.PluggableAuthClient = Jc; +}); +var Yc = z((Ui) => { + "use strict"; + Object.defineProperty(Ui, "__esModule", { value: true }); + Ui.ExternalAccountClient = void 0; + var cw = Ir(), lw = xc(), fw = jc(), dw = Vc(), Kc = class { + constructor() { + throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()"); + } + static fromJSON(e) { + return e && e.type === cw.EXTERNAL_ACCOUNT_TYPE ? e.credential_source?.environment_id ? new fw.AwsClient(e) : e.credential_source?.executable ? new dw.PluggableAuthClient(e) : new lw.IdentityPoolClient(e) : null; + } + }; + Ui.ExternalAccountClient = Kc; +}); +var Nm = z((zn) => { + "use strict"; + Object.defineProperty(zn, "__esModule", { value: true }); + zn.ExternalAccountAuthorizedUserClient = zn.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = void 0; + var Bm = pt(), xm = Ec(), Im = Je(), hw = X("stream"), pw = Ir(); + zn.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = "external_account_authorized_user"; + var mw = "https://sts.{universeDomain}/v1/oauthtoken", Xc = class r extends xm.OAuthClientAuthHandler { + #e; + constructor(e) { + super(e), this.#e = e.tokenRefreshEndpoint; + } + async refreshToken(e, t) { + let n = { ...r.RETRY_CONFIG, url: this.#e, method: "POST", headers: t, data: new URLSearchParams({ grant_type: "refresh_token", refresh_token: e }) }; + Bm.AuthClient.setMethodName(n, "refreshToken"), this.applyClientAuthenticationOptions(n); + try { + let o = await this.transporter.request(n), a = o.data; + return a.res = o, a; + } catch (o) { + throw o instanceof Im.GaxiosError && o.response ? (0, xm.getErrorFromOAuthErrorResponse)(o.response.data, o) : o; + } + } + }, Qc = class extends Bm.AuthClient { + cachedAccessToken; + externalAccountAuthorizedUserHandler; + refreshToken; + constructor(e) { + super(e), e.universe_domain && (this.universeDomain = e.universe_domain), this.refreshToken = e.refresh_token; + let t = { confidentialClientType: "basic", clientId: e.client_id, clientSecret: e.client_secret }; + this.externalAccountAuthorizedUserHandler = new Xc({ tokenRefreshEndpoint: e.token_url ?? mw.replace("{universeDomain}", this.universeDomain), transporter: this.transporter, clientAuthentication: t }), this.cachedAccessToken = null, this.quotaProjectId = e.quota_project_id, typeof e?.eagerRefreshThresholdMillis != "number" ? this.eagerRefreshThresholdMillis = pw.EXPIRATION_TIME_OFFSET : this.eagerRefreshThresholdMillis = e.eagerRefreshThresholdMillis, this.forceRefreshOnFailure = !!e?.forceRefreshOnFailure; + } + async getAccessToken() { + return (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) && await this.refreshAccessTokenAsync(), { token: this.cachedAccessToken.access_token, res: this.cachedAccessToken.res }; + } + async getRequestHeaders() { + let e = await this.getAccessToken(), t = new Headers({ authorization: `Bearer ${e.token}` }); + return this.addSharedMetadataHeaders(t); + } + request(e, t) { + if (t) this.requestAsync(e).then((n) => t(null, n), (n) => t(n, n.response)); + else return this.requestAsync(e); + } + async requestAsync(e, t = false) { + let n; + try { + let o = await this.getRequestHeaders(); + e.headers = Im.Gaxios.mergeHeaders(e.headers), this.addUserProjectAndAuthHeaders(e.headers, o), n = await this.transporter.request(e); + } catch (o) { + let a = o.response; + if (a) { + let u = a.status, l = a.config.data instanceof hw.Readable; + if (!t && (u === 401 || u === 403) && !l && this.forceRefreshOnFailure) return await this.refreshAccessTokenAsync(), await this.requestAsync(e, true); + } + throw o; + } + return n; + } + async refreshAccessTokenAsync() { + let e = await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken); + return this.cachedAccessToken = { access_token: e.access_token, expiry_date: (/* @__PURE__ */ new Date()).getTime() + e.expires_in * 1e3, res: e.res }, e.refresh_token !== void 0 && (this.refreshToken = e.refresh_token), this.cachedAccessToken; + } + isExpired(e) { + let t = (/* @__PURE__ */ new Date()).getTime(); + return e.expiry_date ? t >= e.expiry_date - this.eagerRefreshThresholdMillis : false; + } + }; + zn.ExternalAccountAuthorizedUserClient = Qc; +}); +var Um = z(($t) => { + "use strict"; + Object.defineProperty($t, "__esModule", { value: true }); + $t.GoogleAuth = $t.GoogleAuthExceptionMessages = void 0; + var gw = X("child_process"), Ps = X("fs"), yw = Je(), xs = _s(), _w = X("os"), Zc = X("path"), Cw = Cs(), bw = Ju(), Ew = Ku(), ww = Yu(), Jn = mc(), qm = yc(), Vn = Cc(), Aw = Yc(), Bs = Ir(), el = pt(), jm = Nm(), Lm = jt(); + $t.GoogleAuthExceptionMessages = { API_KEY_WITH_CREDENTIALS: "API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.", NO_PROJECT_ID_FOUND: `Unable to detect a Project Id in the current environment. +To learn more about authentication and Google APIs, visit: +https://cloud.google.com/docs/authentication/getting-started`, NO_CREDENTIALS_FOUND: `Unable to find credentials in current environment. +To learn more about authentication and Google APIs, visit: +https://cloud.google.com/docs/authentication/getting-started`, NO_ADC_FOUND: "Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.", NO_UNIVERSE_DOMAIN_FOUND: `Unable to detect a Universe Domain in the current environment. +To learn more about Universe Domain retrieval, visit: +https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys` }; + var tl = class { + checkIsGCE = void 0; + useJWTAccessWithScope; + defaultServicePath; + get isGCE() { + return this.checkIsGCE; + } + _findProjectIdPromise; + _cachedProjectId; + jsonContent = null; + apiKey; + cachedCredential = null; + #e = null; + defaultScopes; + keyFilename; + scopes; + clientOptions = {}; + constructor(e = {}) { + if (this._cachedProjectId = e.projectId || null, this.cachedCredential = e.authClient || null, this.keyFilename = e.keyFilename || e.keyFile, this.scopes = e.scopes, this.clientOptions = e.clientOptions || {}, this.jsonContent = e.credentials || null, this.apiKey = e.apiKey || this.clientOptions.apiKey || null, this.apiKey && (this.jsonContent || this.clientOptions.credentials)) throw new RangeError($t.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS); + e.universeDomain && (this.clientOptions.universeDomain = e.universeDomain); + } + setGapicJWTValues(e) { + e.defaultServicePath = this.defaultServicePath, e.useJWTAccessWithScope = this.useJWTAccessWithScope, e.defaultScopes = this.defaultScopes; + } + getProjectId(e) { + if (e) this.getProjectIdAsync().then((t) => e(null, t), e); + else return this.getProjectIdAsync(); + } + async getProjectIdOptional() { + try { + return await this.getProjectId(); + } catch (e) { + if (e instanceof Error && e.message === $t.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND) return null; + throw e; + } + } + async findAndCacheProjectId() { + let e = null; + if (e ||= await this.getProductionProjectId(), e ||= await this.getFileProjectId(), e ||= await this.getDefaultServiceProjectId(), e ||= await this.getGCEProjectId(), e ||= await this.getExternalAccountClientProjectId(), e) return this._cachedProjectId = e, e; + throw new Error($t.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND); + } + async getProjectIdAsync() { + return this._cachedProjectId ? this._cachedProjectId : (this._findProjectIdPromise || (this._findProjectIdPromise = this.findAndCacheProjectId()), this._findProjectIdPromise); + } + async getUniverseDomainFromMetadataServer() { + let e; + try { + e = await xs.universe("universe-domain"), e ||= el.DEFAULT_UNIVERSE; + } catch (t) { + if (t && t?.response?.status === 404) e = el.DEFAULT_UNIVERSE; + else throw t; + } + return e; + } + async getUniverseDomain() { + let e = (0, Lm.originalOrCamelOptions)(this.clientOptions).get("universe_domain"); + try { + e ??= (await this.getClient()).universeDomain; + } catch { + e ??= el.DEFAULT_UNIVERSE; + } + return e; + } + getAnyScopes() { + return this.scopes || this.defaultScopes; + } + getApplicationDefault(e = {}, t) { + let n; + if (typeof e == "function" ? t = e : n = e, t) this.getApplicationDefaultAsync(n).then((o) => t(null, o.credential, o.projectId), t); + else return this.getApplicationDefaultAsync(n); + } + async getApplicationDefaultAsync(e = {}) { + if (this.cachedCredential) return await this.#t(this.cachedCredential, null); + let t; + if (t = await this._tryGetApplicationCredentialsFromEnvironmentVariable(e), t) return t instanceof Jn.JWT ? t.scopes = this.scopes : t instanceof Bs.BaseExternalAccountClient && (t.scopes = this.getAnyScopes()), await this.#t(t); + if (t = await this._tryGetApplicationCredentialsFromWellKnownFile(e), t) return t instanceof Jn.JWT ? t.scopes = this.scopes : t instanceof Bs.BaseExternalAccountClient && (t.scopes = this.getAnyScopes()), await this.#t(t); + if (await this._checkIsGCE()) return e.scopes = this.getAnyScopes(), await this.#t(new bw.Compute(e)); + throw new Error($t.GoogleAuthExceptionMessages.NO_ADC_FOUND); + } + async #t(e, t = process.env.GOOGLE_CLOUD_QUOTA_PROJECT || null) { + let n = await this.getProjectIdOptional(); + return t && (e.quotaProjectId = t), this.cachedCredential = e, { credential: e, projectId: n }; + } + async _checkIsGCE() { + return this.checkIsGCE === void 0 && (this.checkIsGCE = xs.getGCPResidency() || await xs.isAvailable()), this.checkIsGCE; + } + async _tryGetApplicationCredentialsFromEnvironmentVariable(e) { + let t = process.env.GOOGLE_APPLICATION_CREDENTIALS || process.env.google_application_credentials; + if (!t || t.length === 0) return null; + try { + return this._getApplicationCredentialsFromFilePath(t, e); + } catch (n) { + throw n instanceof Error && (n.message = `Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${n.message}`), n; + } + } + async _tryGetApplicationCredentialsFromWellKnownFile(e) { + let t = null; + if (this._isWindows()) t = process.env.APPDATA; + else { + let o = process.env.HOME; + o && (t = Zc.join(o, ".config")); + } + return t && (t = Zc.join(t, "gcloud", "application_default_credentials.json"), Ps.existsSync(t) || (t = null)), t ? await this._getApplicationCredentialsFromFilePath(t, e) : null; + } + async _getApplicationCredentialsFromFilePath(e, t = {}) { + if (!e || e.length === 0) throw new Error("The file path is invalid."); + try { + if (e = Ps.realpathSync(e), !Ps.lstatSync(e).isFile()) throw new Error(); + } catch (o) { + throw o instanceof Error && (o.message = `The file at ${e} does not exist, or it is not a file. ${o.message}`), o; + } + let n = Ps.createReadStream(e); + return this.fromStream(n, t); + } + fromImpersonatedJSON(e) { + if (!e) throw new Error("Must pass in a JSON object containing an impersonated refresh token"); + if (e.type !== Vn.IMPERSONATED_ACCOUNT_TYPE) throw new Error(`The incoming JSON object does not have the "${Vn.IMPERSONATED_ACCOUNT_TYPE}" type`); + if (!e.source_credentials) throw new Error("The incoming JSON object does not contain a source_credentials field"); + if (!e.service_account_impersonation_url) throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field"); + let t = this.fromJSON(e.source_credentials); + if (e.service_account_impersonation_url?.length > 256) throw new RangeError(`Target principal is too long: ${e.service_account_impersonation_url}`); + let n = /(?[^/]+):(generateAccessToken|generateIdToken)$/.exec(e.service_account_impersonation_url)?.groups?.target; + if (!n) throw new RangeError(`Cannot extract target principal from ${e.service_account_impersonation_url}`); + let o = this.getAnyScopes() ?? []; + return new Vn.Impersonated({ ...e, sourceClient: t, targetPrincipal: n, targetScopes: Array.isArray(o) ? o : [o] }); + } + fromJSON(e, t = {}) { + let n, o = (0, Lm.originalOrCamelOptions)(t).get("universe_domain"); + return e.type === qm.USER_REFRESH_ACCOUNT_TYPE ? (n = new qm.UserRefreshClient(t), n.fromJSON(e)) : e.type === Vn.IMPERSONATED_ACCOUNT_TYPE ? n = this.fromImpersonatedJSON(e) : e.type === Bs.EXTERNAL_ACCOUNT_TYPE ? (n = Aw.ExternalAccountClient.fromJSON({ ...e, ...t }), n.scopes = this.getAnyScopes()) : e.type === jm.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE ? n = new jm.ExternalAccountAuthorizedUserClient({ ...e, ...t }) : (t.scopes = this.scopes, n = new Jn.JWT(t), this.setGapicJWTValues(n), n.fromJSON(e)), o && (n.universeDomain = o), n; + } + _cacheClientFromJSON(e, t) { + let n = this.fromJSON(e, t); + return this.jsonContent = e, this.cachedCredential = n, n; + } + fromStream(e, t = {}, n) { + let o = {}; + if (typeof t == "function" ? n = t : o = t, n) this.fromStreamAsync(e, o).then((a) => n(null, a), n); + else return this.fromStreamAsync(e, o); + } + fromStreamAsync(e, t) { + return new Promise((n, o) => { + if (!e) throw new Error("Must pass in a stream containing the Google auth settings."); + let a = []; + e.setEncoding("utf8").on("error", o).on("data", (u) => a.push(u)).on("end", () => { + try { + try { + let u = JSON.parse(a.join("")), l = this._cacheClientFromJSON(u, t); + return n(l); + } catch (u) { + if (!this.keyFilename) throw u; + let l = new Jn.JWT({ ...this.clientOptions, keyFile: this.keyFilename }); + return this.cachedCredential = l, this.setGapicJWTValues(l), n(l); + } + } catch (u) { + return o(u); + } + }); + }); + } + fromAPIKey(e, t = {}) { + return new Jn.JWT({ ...t, apiKey: e }); + } + _isWindows() { + let e = _w.platform(); + return !!(e && e.length >= 3 && e.substring(0, 3).toLowerCase() === "win"); + } + async getDefaultServiceProjectId() { + return new Promise((e) => { + (0, gw.exec)("gcloud config config-helper --format json", (t, n) => { + if (!t && n) try { + let o = JSON.parse(n).configuration.properties.core.project; + e(o); + return; + } catch { + } + e(null); + }); + }); + } + getProductionProjectId() { + return process.env.GCLOUD_PROJECT || process.env.GOOGLE_CLOUD_PROJECT || process.env.gcloud_project || process.env.google_cloud_project; + } + async getFileProjectId() { + if (this.cachedCredential) return this.cachedCredential.projectId; + if (this.keyFilename) { + let t = await this.getClient(); + if (t && t.projectId) return t.projectId; + } + let e = await this._tryGetApplicationCredentialsFromEnvironmentVariable(); + return e ? e.projectId : null; + } + async getExternalAccountClientProjectId() { + return !this.jsonContent || this.jsonContent.type !== Bs.EXTERNAL_ACCOUNT_TYPE ? null : await (await this.getClient()).getProjectId(); + } + async getGCEProjectId() { + try { + return await xs.project("project-id"); + } catch { + return null; + } + } + getCredentials(e) { + if (e) this.getCredentialsAsync().then((t) => e(null, t), e); + else return this.getCredentialsAsync(); + } + async getCredentialsAsync() { + let e = await this.getClient(); + if (e instanceof Vn.Impersonated) return { client_email: e.getTargetPrincipal() }; + if (e instanceof Bs.BaseExternalAccountClient) { + let t = e.getServiceAccountEmail(); + if (t) return { client_email: t, universe_domain: e.universeDomain }; + } + if (this.jsonContent) return { client_email: this.jsonContent.client_email, private_key: this.jsonContent.private_key, universe_domain: this.jsonContent.universe_domain }; + if (await this._checkIsGCE()) { + let [t, n] = await Promise.all([xs.instance("service-accounts/default/email"), this.getUniverseDomain()]); + return { client_email: t, universe_domain: n }; + } + throw new Error($t.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND); + } + async getClient() { + if (this.cachedCredential) return this.cachedCredential; + this.#e = this.#e || this.#r(); + try { + return await this.#e; + } finally { + this.#e = null; + } + } + async #r() { + if (this.jsonContent) return this._cacheClientFromJSON(this.jsonContent, this.clientOptions); + if (this.keyFilename) { + let e = Zc.resolve(this.keyFilename), t = Ps.createReadStream(e); + return await this.fromStreamAsync(t, this.clientOptions); + } else if (this.apiKey) { + let e = await this.fromAPIKey(this.apiKey, this.clientOptions); + e.scopes = this.scopes; + let { credential: t } = await this.#t(e); + return t; + } else { + let { credential: e } = await this.getApplicationDefaultAsync(this.clientOptions); + return e; + } + } + async getIdTokenClient(e) { + let t = await this.getClient(); + if (!("fetchIdToken" in t)) throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file."); + return new Ew.IdTokenClient({ targetAudience: e, idTokenProvider: t }); + } + async getAccessToken() { + return (await (await this.getClient()).getAccessToken()).token; + } + async getRequestHeaders(e) { + return (await this.getClient()).getRequestHeaders(e); + } + async authorizeRequest(e = {}) { + let t = e.url, o = await (await this.getClient()).getRequestHeaders(t); + return e.headers = yw.Gaxios.mergeHeaders(e.headers, o), e; + } + async fetch(...e) { + return (await this.getClient()).fetch(...e); + } + async request(e) { + return (await this.getClient()).request(e); + } + getEnv() { + return (0, ww.getEnv)(); + } + async sign(e, t) { + let n = await this.getClient(), o = await this.getUniverseDomain(); + if (t = t || `https://iamcredentials.${o}/v1/projects/-/serviceAccounts/`, n instanceof Vn.Impersonated) return (await n.sign(e)).signedBlob; + let a = (0, Cw.createCrypto)(); + if (n instanceof Jn.JWT && n.key) return await a.sign(n.key, e); + let u = await this.getCredentials(); + if (!u.client_email) throw new Error("Cannot sign data without `client_email`."); + return this.signBlob(a, u.client_email, e, t); + } + async signBlob(e, t, n, o) { + let a = new URL(o + `${t}:signBlob`); + return (await this.request({ method: "POST", url: a.href, data: { payload: e.encodeBase64StringUtf8(n) }, retry: true, retryConfig: { httpMethodsToRetry: ["POST"] } })).data.signedBlob; + } + }; + $t.GoogleAuth = tl; +}); +var Mm = z((Mi) => { + "use strict"; + Object.defineProperty(Mi, "__esModule", { value: true }); + Mi.IAMAuth = void 0; + var rl = class { + selector; + token; + constructor(e, t) { + this.selector = e, this.token = t, this.selector = e, this.token = t; + } + getRequestHeaders() { + return { "x-goog-iam-authority-selector": this.selector, "x-goog-iam-authorization-token": this.token }; + } + }; + Mi.IAMAuth = rl; +}); +var $m = z((Zt) => { + "use strict"; + Object.defineProperty(Zt, "__esModule", { value: true }); + Zt.DownscopedClient = Zt.EXPIRATION_TIME_OFFSET = Zt.MAX_ACCESS_BOUNDARY_RULES_COUNT = void 0; + var Dw = Je(), Sw = X("stream"), nl = pt(), vw = Ei(), Tw = "urn:ietf:params:oauth:grant-type:token-exchange", Rw = "urn:ietf:params:oauth:token-type:access_token", kw = "urn:ietf:params:oauth:token-type:access_token"; + Zt.MAX_ACCESS_BOUNDARY_RULES_COUNT = 10; + Zt.EXPIRATION_TIME_OFFSET = 5 * 60 * 1e3; + var sl = class extends nl.AuthClient { + authClient; + credentialAccessBoundary; + cachedDownscopedAccessToken; + stsCredential; + constructor(e, t = { accessBoundary: { accessBoundaryRules: [] } }) { + if (super(e instanceof nl.AuthClient ? {} : e), e instanceof nl.AuthClient ? (this.authClient = e, this.credentialAccessBoundary = t) : (this.authClient = e.authClient, this.credentialAccessBoundary = e.credentialAccessBoundary), this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length === 0) throw new Error("At least one access boundary rule needs to be defined."); + if (this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length > Zt.MAX_ACCESS_BOUNDARY_RULES_COUNT) throw new Error(`The provided access boundary has more than ${Zt.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`); + for (let n of this.credentialAccessBoundary.accessBoundary.accessBoundaryRules) if (n.availablePermissions.length === 0) throw new Error("At least one permission should be defined in access boundary rules."); + this.stsCredential = new vw.StsCredentials({ tokenExchangeEndpoint: `https://sts.${this.universeDomain}/v1/token` }), this.cachedDownscopedAccessToken = null; + } + setCredentials(e) { + if (!e.expiry_date) throw new Error("The access token expiry_date field is missing in the provided credentials."); + super.setCredentials(e), this.cachedDownscopedAccessToken = e; + } + async getAccessToken() { + return (!this.cachedDownscopedAccessToken || this.isExpired(this.cachedDownscopedAccessToken)) && await this.refreshAccessTokenAsync(), { token: this.cachedDownscopedAccessToken.access_token, expirationTime: this.cachedDownscopedAccessToken.expiry_date, res: this.cachedDownscopedAccessToken.res }; + } + async getRequestHeaders() { + let e = await this.getAccessToken(), t = new Headers({ authorization: `Bearer ${e.token}` }); + return this.addSharedMetadataHeaders(t); + } + request(e, t) { + if (t) this.requestAsync(e).then((n) => t(null, n), (n) => t(n, n.response)); + else return this.requestAsync(e); + } + async requestAsync(e, t = false) { + let n; + try { + let o = await this.getRequestHeaders(); + e.headers = Dw.Gaxios.mergeHeaders(e.headers), this.addUserProjectAndAuthHeaders(e.headers, o), n = await this.transporter.request(e); + } catch (o) { + let a = o.response; + if (a) { + let u = a.status, l = a.config.data instanceof Sw.Readable; + if (!t && (u === 401 || u === 403) && !l && this.forceRefreshOnFailure) return await this.refreshAccessTokenAsync(), await this.requestAsync(e, true); + } + throw o; + } + return n; + } + async refreshAccessTokenAsync() { + let e = (await this.authClient.getAccessToken()).token, t = { grantType: Tw, requestedTokenType: Rw, subjectToken: e, subjectTokenType: kw }, n = await this.stsCredential.exchangeToken(t, void 0, this.credentialAccessBoundary), o = this.authClient.credentials?.expiry_date || null, a = n.expires_in ? (/* @__PURE__ */ new Date()).getTime() + n.expires_in * 1e3 : o; + return this.cachedDownscopedAccessToken = { access_token: n.access_token, expiry_date: a, res: n.res }, this.credentials = {}, Object.assign(this.credentials, this.cachedDownscopedAccessToken), delete this.credentials.res, this.emit("tokens", { refresh_token: null, expiry_date: this.cachedDownscopedAccessToken.expiry_date, access_token: this.cachedDownscopedAccessToken.access_token, token_type: "Bearer", id_token: null }), this.cachedDownscopedAccessToken; + } + isExpired(e) { + let t = (/* @__PURE__ */ new Date()).getTime(); + return e.expiry_date ? t >= e.expiry_date - this.eagerRefreshThresholdMillis : false; + } + }; + Zt.DownscopedClient = sl; +}); +var Hm = z(($i) => { + "use strict"; + Object.defineProperty($i, "__esModule", { value: true }); + $i.PassThroughClient = void 0; + var Fw = pt(), ol = class extends Fw.AuthClient { + async request(e) { + return this.transporter.request(e); + } + async getAccessToken() { + return {}; + } + async getRequestHeaders() { + return new Headers(); + } + }; + $i.PassThroughClient = ol; +}); +var al = z((ee) => { + "use strict"; + Object.defineProperty(ee, "__esModule", { value: true }); + ee.GoogleAuth = ee.auth = ee.PassThroughClient = ee.ExecutableError = ee.PluggableAuthClient = ee.DownscopedClient = ee.BaseExternalAccountClient = ee.ExternalAccountClient = ee.IdentityPoolClient = ee.AwsRequestSigner = ee.AwsClient = ee.UserRefreshClient = ee.LoginTicket = ee.ClientAuthentication = ee.OAuth2Client = ee.CodeChallengeMethod = ee.Impersonated = ee.JWT = ee.JWTAccess = ee.IdTokenClient = ee.IAMAuth = ee.GCPEnv = ee.Compute = ee.DEFAULT_UNIVERSE = ee.AuthClient = ee.gaxios = ee.gcpMetadata = void 0; + var Gm = Um(); + Object.defineProperty(ee, "GoogleAuth", { enumerable: true, get: function() { + return Gm.GoogleAuth; + } }); + ee.gcpMetadata = _s(); + ee.gaxios = Je(); + var Wm = pt(); + Object.defineProperty(ee, "AuthClient", { enumerable: true, get: function() { + return Wm.AuthClient; + } }); + Object.defineProperty(ee, "DEFAULT_UNIVERSE", { enumerable: true, get: function() { + return Wm.DEFAULT_UNIVERSE; + } }); + var Ow = Ju(); + Object.defineProperty(ee, "Compute", { enumerable: true, get: function() { + return Ow.Compute; + } }); + var Pw = Yu(); + Object.defineProperty(ee, "GCPEnv", { enumerable: true, get: function() { + return Pw.GCPEnv; + } }); + var xw = Mm(); + Object.defineProperty(ee, "IAMAuth", { enumerable: true, get: function() { + return xw.IAMAuth; + } }); + var Bw = Ku(); + Object.defineProperty(ee, "IdTokenClient", { enumerable: true, get: function() { + return Bw.IdTokenClient; + } }); + var Iw = hc(); + Object.defineProperty(ee, "JWTAccess", { enumerable: true, get: function() { + return Iw.JWTAccess; + } }); + var Nw = mc(); + Object.defineProperty(ee, "JWT", { enumerable: true, get: function() { + return Nw.JWT; + } }); + var qw = Cc(); + Object.defineProperty(ee, "Impersonated", { enumerable: true, get: function() { + return qw.Impersonated; + } }); + var il = rn(); + Object.defineProperty(ee, "CodeChallengeMethod", { enumerable: true, get: function() { + return il.CodeChallengeMethod; + } }); + Object.defineProperty(ee, "OAuth2Client", { enumerable: true, get: function() { + return il.OAuth2Client; + } }); + Object.defineProperty(ee, "ClientAuthentication", { enumerable: true, get: function() { + return il.ClientAuthentication; + } }); + var jw = Hu(); + Object.defineProperty(ee, "LoginTicket", { enumerable: true, get: function() { + return jw.LoginTicket; + } }); + var Lw = yc(); + Object.defineProperty(ee, "UserRefreshClient", { enumerable: true, get: function() { + return Lw.UserRefreshClient; + } }); + var Uw = jc(); + Object.defineProperty(ee, "AwsClient", { enumerable: true, get: function() { + return Uw.AwsClient; + } }); + var Mw = Ic(); + Object.defineProperty(ee, "AwsRequestSigner", { enumerable: true, get: function() { + return Mw.AwsRequestSigner; + } }); + var $w = xc(); + Object.defineProperty(ee, "IdentityPoolClient", { enumerable: true, get: function() { + return $w.IdentityPoolClient; + } }); + var Hw = Yc(); + Object.defineProperty(ee, "ExternalAccountClient", { enumerable: true, get: function() { + return Hw.ExternalAccountClient; + } }); + var Gw = Ir(); + Object.defineProperty(ee, "BaseExternalAccountClient", { enumerable: true, get: function() { + return Gw.BaseExternalAccountClient; + } }); + var Ww = $m(); + Object.defineProperty(ee, "DownscopedClient", { enumerable: true, get: function() { + return Ww.DownscopedClient; + } }); + var zm = Vc(); + Object.defineProperty(ee, "PluggableAuthClient", { enumerable: true, get: function() { + return zm.PluggableAuthClient; + } }); + Object.defineProperty(ee, "ExecutableError", { enumerable: true, get: function() { + return zm.ExecutableError; + } }); + var zw = Hm(); + Object.defineProperty(ee, "PassThroughClient", { enumerable: true, get: function() { + return zw.PassThroughClient; + } }); + var Jw = new Gm.GoogleAuth(); + ee.auth = Jw; +}); +var Nf = zr(Ma(), 1); +var mo = class { + config = {}; + options; + constructor(e = { jsonPath: "./config.json" }) { + this.options = { envPath: e.envPath || ".env", jsonPath: e.jsonPath, useEnvFile: false, useJsonFile: e.useJsonFile !== false, useEnvironmentVariables: e.useEnvironmentVariables !== false, ...e }, this.loadConfig(); + } + loadConfig() { + this.options.useJsonFile && this.options.jsonPath && this.loadJsonConfig(), this.options.initialConfig && (this.config = { ...this.config, ...this.options.initialConfig }), this.options.useEnvFile && this.loadEnvConfig(), this.config.LOG_FILE && (process.env.LOG_FILE = this.config.LOG_FILE), this.config.LOG && (process.env.LOG = this.config.LOG); + } + loadJsonConfig() { + if (!this.options.jsonPath) return; + let e = this.isAbsolutePath(this.options.jsonPath) ? this.options.jsonPath : (0, import_path.join)(process.cwd(), this.options.jsonPath); + if ((0, import_fs.existsSync)(e)) try { + let t = (0, import_fs.readFileSync)(e, "utf-8"), n = Nf.default.parse(t); + this.config = { ...this.config, ...n }, console.log(`Loaded JSON config from: ${e}`); + } catch (t) { + console.warn(`Failed to load JSON config from ${e}:`, t); + } + else console.warn(`JSON config file not found: ${e}`); + } + loadEnvConfig() { + let e = this.isAbsolutePath(this.options.envPath) ? this.options.envPath : (0, import_path.join)(process.cwd(), this.options.envPath); + if ((0, import_fs.existsSync)(e)) try { + let t = (0, import_dotenv.config)({ path: e }); + t.parsed && (this.config = { ...this.config, ...this.parseEnvConfig(t.parsed) }); + } catch (t) { + console.warn(`Failed to load .env config from ${e}:`, t); + } + } + loadEnvironmentVariables() { + let e = this.parseEnvConfig(process.env); + this.config = { ...this.config, ...e }; + } + parseEnvConfig(e) { + let t = {}; + return Object.assign(t, e), t; + } + isAbsolutePath(e) { + return e.startsWith("/") || e.includes(":"); + } + get(e, t) { + let n = this.config[e]; + return n !== void 0 ? n : t; + } + getAll() { + return { ...this.config }; + } + getHttpsProxy() { + return this.get("HTTPS_PROXY") || this.get("https_proxy") || this.get("httpsProxy") || this.get("PROXY_URL"); + } + has(e) { + return this.config[e] !== void 0; + } + set(e, t) { + this.config[e] = t; + } + reload() { + this.config = {}, this.loadConfig(); + } + getConfigSummary() { + let e = []; + return this.options.initialConfig && e.push("Initial Config"), this.options.useJsonFile && this.options.jsonPath && e.push(`JSON: ${this.options.jsonPath}`), this.options.useEnvFile && e.push(`ENV: ${this.options.envPath}`), this.options.useEnvironmentVariables && e.push("Environment Variables"), `Config sources: ${e.join(", ")}`; + } +}; +function nt(r, e = 500, t = "internal_error", n = "api_error") { + let o = new Error(r); + return o.statusCode = e, o.code = t, o.type = n, o; +} +async function qf(r, e, t) { + e.log.error(r); + let n = r.statusCode || 500, o = { error: { message: r.message + r.stack || "Internal Server Error", type: r.type || "api_error", code: r.code || "internal_error" } }; + return t.code(n).send(o); +} +function jf(r, e, t, n) { + let o = new Headers({ "Content-Type": "application/json" }); + t.headers && Object.entries(t.headers).forEach(([f, h]) => { + h && o.set(f, h); + }); + let a, u = AbortSignal.timeout(t.TIMEOUT ?? 60 * 1e3 * 60); + if (t.signal) { + let f = new AbortController(), h = () => f.abort(); + t.signal.addEventListener("abort", h), u.addEventListener("abort", h), a = f.signal; + } else a = u; + let l = { method: "POST", headers: o, body: JSON.stringify(e), signal: a }; + return t.httpsProxy && (l.dispatcher = new import_undici.ProxyAgent(new URL(t.httpsProxy).toString())), n?.debug({ request: l, headers: Object.fromEntries(o.entries()), requestUrl: typeof r == "string" ? r : r.toString(), useProxy: t.httpsProxy }, "final request"), fetch(typeof r == "string" ? r : r.toString(), l); +} +var Lf = "1.0.28"; +async function o0(r, e, t, n) { + let o = r.body, a = r.provider, u = t._server.providerService.getProvider(a); + if (!u) throw nt(`Provider '${a}' not found`, 404, "provider_not_found"); + let { requestBody: l, config: f, bypass: h } = await i0(o, u, n, r.headers), d = await u0(l, f, u, t, h, n), _ = await c0(l, d, u, n, h); + return l0(_, e, o); +} +async function i0(r, e, t, n) { + let o = r, a = {}, u = false; + if (u = a0(e, t, r), u && (n instanceof Headers ? n.delete("content-length") : delete n["content-length"], a.headers = n), !u && typeof t.transformRequestOut == "function") { + let l = await t.transformRequestOut(o); + l.body ? (o = l.body, a = l.config || {}) : o = l; + } + if (!u && e.transformer?.use?.length) for (let l of e.transformer.use) { + if (!l || typeof l.transformRequestIn != "function") continue; + let f = await l.transformRequestIn(o, e); + f.body ? (o = f.body, a = { ...a, ...f.config }) : o = f; + } + if (!u && e.transformer?.[r.model]?.use?.length) for (let l of e.transformer[r.model].use) !l || typeof l.transformRequestIn != "function" || (o = await l.transformRequestIn(o, e)); + return { requestBody: o, config: a, bypass: u }; +} +function a0(r, e, t) { + return r.transformer?.use?.length === 1 && r.transformer.use[0].name === e.name && (!r.transformer?.[t.model]?.use.length || r.transformer?.[t.model]?.use.length === 1 && r.transformer?.[t.model]?.use[0].name === e.name); +} +async function u0(r, e, t, n, o, a) { + let u = e.url || new URL(t.baseUrl); + if (o && typeof a.auth == "function") { + let f = await a.auth(r, t); + if (f.body) { + r = f.body; + let h = e.headers || {}; + f.config?.headers && (h = { ...h, ...f.config.headers }, delete h.host, delete f.config.headers), e = { ...e, ...f.config, headers: h }; + } else r = f; + } + let l = await jf(u, r, { httpsProxy: n._server.configService.getHttpsProxy(), ...e, headers: { Authorization: `Bearer ${t.apiKey}`, ...e?.headers || {} } }, n.log); + if (!l.ok) { + let f = await l.text(); + throw nt(`Error from provider(${t.name},${r.model}: ${l.status}): ${f}`, l.status, "provider_response_error"); + } + return l; +} +async function c0(r, e, t, n, o) { + let a = e; + if (!o && t.transformer?.use?.length) for (let u of Array.from(t.transformer.use).reverse()) !u || typeof u.transformResponseOut != "function" || (a = await u.transformResponseOut(a)); + if (!o && t.transformer?.[r.model]?.use?.length) for (let u of Array.from(t.transformer[r.model].use).reverse()) !u || typeof u.transformResponseOut != "function" || (a = await u.transformResponseOut(a)); + return !o && n.transformResponseIn && (a = await n.transformResponseIn(a)), a; +} +function l0(r, e, t) { + return r.ok || e.code(r.status), t.stream === true ? (e.header("Content-Type", "text/event-stream"), e.header("Cache-Control", "no-cache"), e.header("Connection", "keep-alive"), e.send(r.body)) : r.json(); +} +var Uf = async (r) => { + r.get("/", async () => ({ message: "LLMs API", version: Lf })), r.get("/health", async () => ({ status: "ok", timestamp: (/* @__PURE__ */ new Date()).toISOString() })); + let e = r._server.transformerService.getTransformersWithEndpoint(); + for (let { transformer: t } of e) t.endPoint && r.post(t.endPoint, async (n, o) => o0(n, o, r, t)); + r.post("/providers", { schema: { body: { type: "object", properties: { id: { type: "string" }, name: { type: "string" }, type: { type: "string", enum: ["openai", "anthropic"] }, baseUrl: { type: "string" }, apiKey: { type: "string" }, models: { type: "array", items: { type: "string" } } }, required: ["id", "name", "type", "baseUrl", "apiKey", "models"] } } }, async (t, n) => { + let { name: o, baseUrl: a, apiKey: u, models: l } = t.body; + if (!o?.trim()) throw nt("Provider name is required", 400, "invalid_request"); + if (!a || !f0(a)) throw nt("Valid base URL is required", 400, "invalid_request"); + if (!u?.trim()) throw nt("API key is required", 400, "invalid_request"); + if (!l || !Array.isArray(l) || l.length === 0) throw nt("At least one model is required", 400, "invalid_request"); + if (r._server.providerService.getProvider(t.body.name)) throw nt(`Provider with name '${t.body.name}' already exists`, 400, "provider_exists"); + return r._server.providerService.registerProvider(t.body); + }), r.get("/providers", async () => r._server.providerService.getProviders()), r.get("/providers/:id", { schema: { params: { type: "object", properties: { id: { type: "string" } }, required: ["id"] } } }, async (t) => { + let n = r._server.providerService.getProvider(t.params.id); + if (!n) throw nt("Provider not found", 404, "provider_not_found"); + return n; + }), r.put("/providers/:id", { schema: { params: { type: "object", properties: { id: { type: "string" } }, required: ["id"] }, body: { type: "object", properties: { name: { type: "string" }, type: { type: "string", enum: ["openai", "anthropic"] }, baseUrl: { type: "string" }, apiKey: { type: "string" }, models: { type: "array", items: { type: "string" } }, enabled: { type: "boolean" } } } } }, async (t, n) => { + let o = r._server.providerService.updateProvider(t.params.id, t.body); + if (!o) throw nt("Provider not found", 404, "provider_not_found"); + return o; + }), r.delete("/providers/:id", { schema: { params: { type: "object", properties: { id: { type: "string" } }, required: ["id"] } } }, async (t) => { + if (!r._server.providerService.deleteProvider(t.params.id)) throw nt("Provider not found", 404, "provider_not_found"); + return { message: "Provider deleted successfully" }; + }), r.patch("/providers/:id/toggle", { schema: { params: { type: "object", properties: { id: { type: "string" } }, required: ["id"] }, body: { type: "object", properties: { enabled: { type: "boolean" } }, required: ["enabled"] } } }, async (t, n) => { + if (!r._server.providerService.toggleProvider(t.params.id, t.body.enabled)) throw nt("Provider not found", 404, "provider_not_found"); + return { message: `Provider ${t.body.enabled ? "enabled" : "disabled"} successfully` }; + }); +}; +function f0(r) { + try { + return new URL(r), true; + } catch { + return false; + } +} +var go = class { + constructor(e) { + this.providerService = e; + } + registerProvider(e) { + return this.providerService.registerProvider(e); + } + getProviders() { + return this.providerService.getProviders(); + } + getProvider(e) { + return this.providerService.getProvider(e); + } + updateProvider(e, t) { + return this.providerService.updateProvider(e, t); + } + deleteProvider(e) { + return this.providerService.deleteProvider(e); + } + toggleProvider(e, t) { + return this.providerService.toggleProvider(e, t); + } + resolveRoute(e) { + let t = this.providerService.resolveModelRoute(e); + if (!t) throw new Error(`Model ${e} not found. Available models: ${this.getAvailableModelNames().join(", ")}`); + return t; + } + async getAvailableModels() { + return { object: "list", data: this.providerService.getAvailableModels().flatMap((t) => t.models.map((n) => ({ id: n, object: "model", provider: t.provider, created: Math.floor(Date.now() / 1e3), owned_by: t.provider }))) }; + } + getAvailableModelNames() { + return this.providerService.getModelRoutes().map((e) => e.fullModel); + } + getModelRoutes() { + return this.providerService.getModelRoutes(); + } +}; +var yo = class { + constructor(e, t, n) { + this.configService = e; + this.transformerService = t; + this.logger = n; + this.initializeCustomProviders(); + } + providers = /* @__PURE__ */ new Map(); + modelRoutes = /* @__PURE__ */ new Map(); + initializeCustomProviders() { + let e = this.configService.get("providers"); + if (e && Array.isArray(e)) { + this.initializeFromProvidersArray(e); + return; + } + } + initializeFromProvidersArray(e) { + e.forEach((t) => { + try { + if (!t.name || !t.api_base_url || !t.api_key) return; + let n = {}; + t.transformer && Object.keys(t.transformer).forEach((o) => { + o === "use" ? Array.isArray(t.transformer.use) && (n.use = t.transformer.use.map((a) => { + if (Array.isArray(a) && typeof a[0] == "string") { + let u = this.transformerService.getTransformer(a[0]); + if (u) return new u(a[1]); + } + if (typeof a == "string") { + let u = this.transformerService.getTransformer(a); + return typeof u == "function" ? new u() : u; + } + }).filter((a) => typeof a < "u")) : Array.isArray(t.transformer[o]?.use) && (n[o] = { use: t.transformer[o].use.map((a) => { + if (Array.isArray(a) && typeof a[0] == "string") { + let u = this.transformerService.getTransformer(a[0]); + if (u) return new u(a[1]); + } + if (typeof a == "string") { + let u = this.transformerService.getTransformer(a); + return typeof u == "function" ? new u() : u; + } + }).filter((a) => typeof a < "u") }); + }), this.registerProvider({ name: t.name, baseUrl: t.api_base_url, apiKey: t.api_key, models: t.models || [], transformer: t.transformer ? n : void 0 }), this.logger.info(`${t.name} provider registered`); + } catch (n) { + this.logger.error(`${t.name} provider registered error: ${n}`); + } + }); + } + registerProvider(e) { + let t = { ...e }; + return this.providers.set(t.name, t), e.models.forEach((n) => { + let o = `${t.name},${n}`, a = { provider: t.name, model: n, fullModel: o }; + this.modelRoutes.set(o, a), this.modelRoutes.has(n) || this.modelRoutes.set(n, a); + }), t; + } + getProviders() { + return Array.from(this.providers.values()); + } + getProvider(e) { + return this.providers.get(e); + } + updateProvider(e, t) { + let n = this.providers.get(e); + if (!n) return null; + let o = { ...n, ...t, updatedAt: /* @__PURE__ */ new Date() }; + return this.providers.set(e, o), t.models && (n.models.forEach((a) => { + let u = `${n.id},${a}`; + this.modelRoutes.delete(u), this.modelRoutes.delete(a); + }), t.models.forEach((a) => { + let u = `${n.name},${a}`, l = { provider: n.name, model: a, fullModel: u }; + this.modelRoutes.set(u, l), this.modelRoutes.has(a) || this.modelRoutes.set(a, l); + })), o; + } + deleteProvider(e) { + let t = this.providers.get(e); + return t ? (t.models.forEach((n) => { + let o = `${t.name},${n}`; + this.modelRoutes.delete(o), this.modelRoutes.delete(n); + }), this.providers.delete(e), true) : false; + } + toggleProvider(e, t) { + return !!this.providers.get(e); + } + resolveModelRoute(e) { + let t = this.modelRoutes.get(e); + if (!t) return null; + let n = this.providers.get(t.provider); + return n ? { provider: n, originalModel: e, targetModel: t.model } : null; + } + getAvailableModelNames() { + let e = []; + return this.providers.forEach((t) => { + t.models.forEach((n) => { + e.push(n), e.push(`${t.name},${n}`); + }); + }), e; + } + getModelRoutes() { + return Array.from(this.modelRoutes.values()); + } + parseTransformerConfig(e) { + return e ? Array.isArray(e) ? e.reduce((t, n) => { + if (Array.isArray(n)) { + let [o, a = {}] = n; + t[o] = a; + } else t[n] = {}; + return t; + }, {}) : e : {}; + } + async getAvailableModels() { + let e = []; + return this.providers.forEach((t) => { + t.models.forEach((n) => { + e.push({ id: n, object: "model", owned_by: t.name, provider: t.name }), e.push({ id: `${t.name},${n}`, object: "model", owned_by: t.name, provider: t.name }); + }); + }), { object: "list", data: e }; + } +}; +var ze = []; +for (let r = 0; r < 256; ++r) ze.push((r + 256).toString(16).slice(1)); +function Mf(r, e = 0) { + return (ze[r[e + 0]] + ze[r[e + 1]] + ze[r[e + 2]] + ze[r[e + 3]] + "-" + ze[r[e + 4]] + ze[r[e + 5]] + "-" + ze[r[e + 6]] + ze[r[e + 7]] + "-" + ze[r[e + 8]] + ze[r[e + 9]] + "-" + ze[r[e + 10]] + ze[r[e + 11]] + ze[r[e + 12]] + ze[r[e + 13]] + ze[r[e + 14]] + ze[r[e + 15]]).toLowerCase(); +} +var Co = new Uint8Array(256); +var _o = Co.length; +function $a() { + return _o > Co.length - 16 && ((0, import_crypto.randomFillSync)(Co), _o = 0), Co.slice(_o, _o += 16); +} +var Ha = { randomUUID: import_crypto2.randomUUID }; +function p0(r, e, t) { + if (Ha.randomUUID && !e && !r) return Ha.randomUUID(); + r = r || {}; + let n = r.random ?? r.rng?.() ?? $a(); + if (n.length < 16) throw new Error("Random bytes length must be >= 16"); + if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) { + if (t = t || 0, t < 0 || t + 16 > e.length) throw new RangeError(`UUID byte range ${t}:${t + 15} is out of buffer bounds`); + for (let o = 0; o < 16; ++o) e[t + o] = n[o]; + return e; + } + return Mf(n); +} +var Tr = p0; +var $f = (r) => r <= 0 ? "none" : r <= 1024 ? "low" : r <= 8192 ? "medium" : "high"; +var bo = class { + name = "Anthropic"; + endPoint = "/v1/messages"; + async auth(e, t) { + return { body: e, config: { headers: { "x-api-key": t.apiKey, authorization: void 0 } } }; + } + async transformRequestOut(e) { + let t = []; + if (e.system) { + if (typeof e.system == "string") t.push({ role: "system", content: e.system }); + else if (Array.isArray(e.system) && e.system.length) { + let a = e.system.filter((u) => u.type === "text" && u.text).map((u) => ({ type: "text", text: u.text, cache_control: u.cache_control })); + t.push({ role: "system", content: a }); + } + } + JSON.parse(JSON.stringify(e.messages || []))?.forEach((a, u) => { + if (a.role === "user" || a.role === "assistant") { + if (typeof a.content == "string") { + t.push({ role: a.role, content: a.content }); + return; + } + if (Array.isArray(a.content)) { + if (a.role === "user") { + let l = a.content.filter((h) => h.type === "tool_result" && h.tool_use_id); + l.length && l.forEach((h, d) => { + let _ = { role: "tool", content: typeof h.content == "string" ? h.content : JSON.stringify(h.content), tool_call_id: h.tool_use_id, cache_control: h.cache_control }; + t.push(_); + }); + let f = a.content.filter((h) => h.type === "text" && h.text || h.type === "image" && h.source); + f.length && t.push({ role: "user", content: f.map((h) => h?.type === "image" ? { type: "image_url", image_url: { url: h.source?.type === "base64" ? h.source.data : h.source.url }, media_type: h.source.media_type } : h) }); + } else if (a.role === "assistant") { + let l = { role: "assistant", content: null }, f = a.content.filter((d) => d.type === "text" && d.text); + f.length && (l.content = f.map((d) => d.text).join(` +`)); + let h = a.content.filter((d) => d.type === "tool_use" && d.id); + h.length && (l.tool_calls = h.map((d) => ({ id: d.id, type: "function", function: { name: d.name, arguments: JSON.stringify(d.input || {}) } }))), t.push(l); + } + return; + } + } + }); + let o = { messages: t, model: e.model, max_tokens: e.max_tokens, temperature: e.temperature, stream: e.stream, tools: e.tools?.length ? this.convertAnthropicToolsToUnified(e.tools) : void 0, tool_choice: e.tool_choice }; + return e.thinking && (o.reasoning = { effort: $f(e.thinking.budget_tokens), enabled: e.thinking.type === "enabled" }), e.tool_choice && (e.tool_choice.type === "tool" ? o.tool_choice = { type: "function", function: { name: e.tool_choice.name } } : o.tool_choice = e.tool_choice.type), o; + } + async transformResponseIn(e, t) { + if (e.headers.get("Content-Type")?.includes("text/event-stream")) { + if (!e.body) throw new Error("Stream response body is null"); + let o = await this.convertOpenAIStreamToAnthropic(e.body); + return new Response(o, { headers: { "Content-Type": "text/event-stream", "Cache-Control": "no-cache", Connection: "keep-alive" } }); + } else { + let o = await e.json(), a = this.convertOpenAIResponseToAnthropic(o); + return new Response(JSON.stringify(a), { headers: { "Content-Type": "application/json" } }); + } + } + convertAnthropicToolsToUnified(e) { + return e.map((t) => ({ type: "function", function: { name: t.name, description: t.description || "", parameters: t.input_schema } })); + } + async convertOpenAIStreamToAnthropic(e) { + return new ReadableStream({ start: async (n) => { + let o = new TextEncoder(), a = `msg_${Date.now()}`, u = null, l = "unknown", f = false, h = false, d = false, _ = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), P = 0, v = 0, w = 0, g = false, C = false, R = 0, S = -1, N = (H) => { + if (!g) try { + n.enqueue(H); + let K = new TextDecoder().decode(H); + this.logger.debug({ dataStr: K }, "send data"); + } catch (K) { + if (K instanceof TypeError && K.message.includes("Controller is already closed")) g = true; + else throw this.logger.debug(`send data error: ${K.message}`), K; + } + }, j = () => { + if (!g) try { + if (S >= 0) { + let K = { type: "content_block_stop", index: S }; + N(o.encode(`event: content_block_stop +data: ${JSON.stringify(K)} + +`)), S = -1; + } + u ? (N(o.encode(`event: message_delta +data: ${JSON.stringify(u)} + +`)), u = null) : N(o.encode(`event: message_delta +data: ${JSON.stringify({ type: "message_delta", delta: { stop_reason: "end_turn", stop_sequence: null }, usage: { input_tokens: 0, output_tokens: 0, cache_read_input_tokens: 0 } })} + +`)); + let H = { type: "message_stop" }; + N(o.encode(`event: message_stop +data: ${JSON.stringify(H)} + +`)), n.close(), g = true; + } catch (H) { + if (H instanceof TypeError && H.message.includes("Controller is already closed")) g = true; + else throw H; + } + }, L = null; + try { + L = e.getReader(); + let H = new TextDecoder(), K = ""; + for (; !g; ) { + let { done: W, value: Ae } = await L.read(); + if (W) break; + K += H.decode(Ae, { stream: true }); + let he = K.split(` +`); + K = he.pop() || ""; + for (let fe of he) { + if (g || d) break; + if (!fe.startsWith("data:")) continue; + let ye = fe.slice(5).trim(); + if (this.logger.debug(`recieved data: ${ye}`), ye !== "[DONE]") try { + let re = JSON.parse(ye); + if (P++, this.logger.debug({ response: re }, "Original Response"), re.error) { + let Z = { type: "error", message: { type: "api_error", message: JSON.stringify(re.error) } }; + N(o.encode(`event: error +data: ${JSON.stringify(Z)} + +`)); + continue; + } + if (l = re.model || l, !f && !g && !d) { + f = true; + let Z = { type: "message_start", message: { id: a, type: "message", role: "assistant", content: [], model: l, stop_reason: null, stop_sequence: null, usage: { input_tokens: 0, output_tokens: 0 } } }; + N(o.encode(`event: message_start +data: ${JSON.stringify(Z)} + +`)); + } + let de = re.choices?.[0]; + if (re.usage && (u ? u.usage = { input_tokens: re.usage?.prompt_tokens || 0, output_tokens: re.usage?.completion_tokens || 0, cache_read_input_tokens: re.usage?.cache_read_input_tokens || 0 } : u = { type: "message_delta", delta: { stop_reason: "end_turn", stop_sequence: null }, usage: { input_tokens: re.usage?.prompt_tokens || 0, output_tokens: re.usage?.completion_tokens || 0, cache_read_input_tokens: re.usage?.cache_read_input_tokens || 0 } }), !de) continue; + if (de?.delta?.thinking && !g && !d) { + if (S >= 0) { + let Z = { type: "content_block_stop", index: S }; + N(o.encode(`event: content_block_stop +data: ${JSON.stringify(Z)} + +`)), S = -1; + } + if (!C) { + let Z = { type: "content_block_start", index: R, content_block: { type: "thinking", thinking: "" } }; + N(o.encode(`event: content_block_start +data: ${JSON.stringify(Z)} + +`)), S = R, C = true; + } + if (de.delta.thinking.signature) { + let Z = { type: "content_block_delta", index: R, delta: { type: "signature_delta", signature: de.delta.thinking.signature } }; + N(o.encode(`event: content_block_delta +data: ${JSON.stringify(Z)} + +`)); + let ue = { type: "content_block_stop", index: R }; + N(o.encode(`event: content_block_stop +data: ${JSON.stringify(ue)} + +`)), S = -1, R++; + } else if (de.delta.thinking.content) { + let Z = { type: "content_block_delta", index: R, delta: { type: "thinking_delta", thinking: de.delta.thinking.content || "" } }; + N(o.encode(`event: content_block_delta +data: ${JSON.stringify(Z)} + +`)); + } + } + if (de?.delta?.content && !g && !d) { + if (v++, S >= 0 && !h) { + let ue = { type: "content_block_stop", index: S }; + N(o.encode(`event: content_block_stop +data: ${JSON.stringify(ue)} + +`)), S = -1; + } + if (!h && !d) { + h = true; + let Z = { type: "content_block_start", index: R, content_block: { type: "text", text: "" } }; + N(o.encode(`event: content_block_start +data: ${JSON.stringify(Z)} + +`)), S = R; + } + if (!g && !d) { + let Z = { type: "content_block_delta", index: S, delta: { type: "text_delta", text: de.delta.content } }; + N(o.encode(`event: content_block_delta +data: ${JSON.stringify(Z)} + +`)); + } + } + if (de?.delta?.annotations?.length && !g && !d) { + if (S >= 0 && h) { + let Z = { type: "content_block_stop", index: S }; + N(o.encode(`event: content_block_stop +data: ${JSON.stringify(Z)} + +`)), S = -1, h = false; + } + de?.delta?.annotations.forEach((Z) => { + R++; + let ue = { type: "content_block_start", index: R, content_block: { type: "web_search_tool_result", tool_use_id: `srvtoolu_${Tr()}`, content: [{ type: "web_search_result", title: Z.url_citation.title, url: Z.url_citation.url }] } }; + N(o.encode(`event: content_block_start +data: ${JSON.stringify(ue)} + +`)); + let J = { type: "content_block_stop", index: R }; + N(o.encode(`event: content_block_stop +data: ${JSON.stringify(J)} + +`)), S = -1; + }); + } + if (de?.delta?.tool_calls && !g && !d) { + w++; + let Z = /* @__PURE__ */ new Set(); + for (let ue of de.delta.tool_calls) { + if (g) break; + let J = ue.index ?? 0; + if (Z.has(J)) continue; + if (Z.add(J), !E.has(J)) { + if (S >= 0) { + let Ee = { type: "content_block_stop", index: S }; + N(o.encode(`event: content_block_stop +data: ${JSON.stringify(Ee)} + +`)), S = -1; + } + let oe = R; + E.set(J, oe), R++; + let Ie = ue.id || `call_${Date.now()}_${J}`, je = ue.function?.name || `tool_${J}`, G = { type: "content_block_start", index: oe, content_block: { type: "tool_use", id: Ie, name: je, input: {} } }; + N(o.encode(`event: content_block_start +data: ${JSON.stringify(G)} + +`)), S = oe; + let pe = { id: Ie, name: je, arguments: "", contentBlockIndex: oe }; + _.set(J, pe); + } else if (ue.id && ue.function?.name) { + let oe = _.get(J); + oe.id.startsWith("call_") && oe.name.startsWith("tool_") && (oe.id = ue.id, oe.name = ue.function.name); + } + if (ue.function?.arguments && !g && !d) { + let oe = E.get(J); + if (oe === void 0) continue; + let Ie = _.get(J); + Ie && (Ie.arguments += ue.function.arguments); + try { + let je = { type: "content_block_delta", index: oe, delta: { type: "input_json_delta", partial_json: ue.function.arguments } }; + N(o.encode(`event: content_block_delta +data: ${JSON.stringify(je)} + +`)); + } catch { + try { + let G = ue.function.arguments.replace(/[\x00-\x1F\x7F-\x9F]/g, "").replace(/\\/g, "\\\\").replace(/"/g, '\\"'), pe = { type: "content_block_delta", index: oe, delta: { type: "input_json_delta", partial_json: G } }; + N(o.encode(`event: content_block_delta +data: ${JSON.stringify(pe)} + +`)); + } catch (G) { + console.error(G); + } + } + } + } + } + if (de?.finish_reason && !g && !d) { + if (v === 0 && w === 0 && console.error("Warning: No content in the stream response!"), S >= 0) { + let Z = { type: "content_block_stop", index: S }; + N(o.encode(`event: content_block_stop +data: ${JSON.stringify(Z)} + +`)), S = -1; + } + g || (u = { type: "message_delta", delta: { stop_reason: { stop: "end_turn", length: "max_tokens", tool_calls: "tool_use", content_filter: "stop_sequence" }[de.finish_reason] || "end_turn", stop_sequence: null }, usage: { input_tokens: re.usage?.prompt_tokens || 0, output_tokens: re.usage?.completion_tokens || 0, cache_read_input_tokens: re.usage?.cache_read_input_tokens || 0 } }); + break; + } + } catch (re) { + this.logger?.error(`parseError: ${re.name} message: ${re.message} stack: ${re.stack} data: ${ye}`); + } + } + } + j(); + } catch (H) { + if (!g) try { + n.error(H); + } catch (K) { + console.error(K); + } + } finally { + if (L) try { + L.releaseLock(); + } catch (H) { + console.error(H); + } + } + }, cancel: (n) => { + this.logger.debug(`cancle stream: ${n}`); + } }); + } + convertOpenAIResponseToAnthropic(e) { + this.logger.debug({ response: e }, "Original OpenAI response"); + try { + let t = e.choices[0]; + if (!t) throw new Error("No choices found in OpenAI response"); + let n = []; + if (t.message.annotations) { + let a = `srvtoolu_${Tr()}`; + n.push({ type: "server_tool_use", id: a, name: "web_search", input: { query: "" } }), n.push({ type: "web_search_tool_result", tool_use_id: a, content: t.message.annotations.map((u) => ({ type: "web_search_result", url: u.url_citation.url, title: u.url_citation.title })) }); + } + t.message.content && n.push({ type: "text", text: t.message.content }), t.message.tool_calls && t.message.tool_calls.length > 0 && t.message.tool_calls.forEach((a, u) => { + let l = {}; + try { + let f = a.function.arguments || "{}"; + typeof f == "object" ? l = f : typeof f == "string" && (l = JSON.parse(f)); + } catch { + l = { text: a.function.arguments || "" }; + } + n.push({ type: "tool_use", id: a.id, name: a.function.name, input: l }); + }); + let o = { id: e.id, type: "message", role: "assistant", model: e.model, content: n, stop_reason: t.finish_reason === "stop" ? "end_turn" : t.finish_reason === "length" ? "max_tokens" : t.finish_reason === "tool_calls" ? "tool_use" : t.finish_reason === "content_filter" ? "stop_sequence" : "end_turn", stop_sequence: null, usage: { input_tokens: e.usage?.prompt_tokens || 0, output_tokens: e.usage?.completion_tokens || 0 } }; + return this.logger.debug({ result: o }, "Conversion complete, final Anthropic response"), o; + } catch { + throw nt(`Provider error: ${JSON.stringify(e)}`, 500, "provider_error"); + } + } +}; +var Cn = { TYPE_UNSPECIFIED: "TYPE_UNSPECIFIED", STRING: "STRING", NUMBER: "NUMBER", INTEGER: "INTEGER", BOOLEAN: "BOOLEAN", ARRAY: "ARRAY", OBJECT: "OBJECT", NULL: "NULL" }; +function m0(r, e) { + r.includes("null") && (e.nullable = true); + let t = r.filter((n) => n !== "null"); + if (t.length === 1) { + let n = t[0].toUpperCase(); + e.type = Object.values(Cn).includes(n) ? n : Cn.TYPE_UNSPECIFIED; + } else { + e.anyOf = []; + for (let n of t) { + let o = n.toUpperCase(); + e.anyOf.push({ type: Object.values(Cn).includes(o) ? o : Cn.TYPE_UNSPECIFIED }); + } + } +} +function is(r) { + let e = {}, t = ["items"], n = ["anyOf"], o = ["properties"]; + if (r.type && r.anyOf) throw new Error("type and anyOf cannot be both populated."); + let a = r.anyOf; + a != null && Array.isArray(a) && a.length == 2 && (a[0] && a[0].type === "null" ? (e.nullable = true, r = a[1]) : a[1] && a[1].type === "null" && (e.nullable = true, r = a[0])), r.type && Array.isArray(r.type) && m0(r.type, e); + for (let [u, l] of Object.entries(r)) if (l != null) if (u == "type") { + if (l === "null") throw new Error("type: null can not be the only possible type for the field."); + if (Array.isArray(l)) continue; + let f = l.toUpperCase(); + e.type = Object.values(Cn).includes(f) ? f : Cn.TYPE_UNSPECIFIED; + } else if (t.includes(u)) e[u] = is(l); + else if (n.includes(u)) { + let f = []; + for (let h of l) { + if (h.type == "null") { + e.nullable = true; + continue; + } + f.push(is(h)); + } + e[u] = f; + } else if (o.includes(u)) { + let f = {}; + for (let [h, d] of Object.entries(l)) f[h] = is(d); + e[u] = f; + } else { + if (u === "additionalProperties") continue; + e[u] = l; + } + return e; +} +function g0(r) { + if (r.functionDeclarations) for (let e of r.functionDeclarations) e.parameters && (Object.keys(e.parameters).includes("$schema") ? e.parametersJsonSchema || (e.parametersJsonSchema = e.parameters, delete e.parameters) : e.parameters = is(e.parameters)), e.response && (Object.keys(e.response).includes("$schema") ? e.responseJsonSchema || (e.responseJsonSchema = e.response, delete e.response) : e.response = is(e.response)); + return r; +} +function Eo(r) { + let e = [], t = r.tools?.filter((u) => u.function.name !== "web_search")?.map((u) => ({ name: u.function.name, description: u.function.description, parametersJsonSchema: u.function.parameters })); + t?.length && e.push(g0({ functionDeclarations: t })), r.tools?.find((u) => u.function.name === "web_search") && e.push({ googleSearch: {} }); + let a = { contents: r.messages.map((u) => { + let l; + u.role === "assistant" ? l = "model" : (["user", "system", "tool"].includes(u.role), l = "user"); + let f = []; + return typeof u.content == "string" ? f.push({ text: u.content }) : Array.isArray(u.content) && f.push(...u.content.map((h) => { + if (h.type === "text") return { text: h.text || "" }; + if (h.type === "image_url") return h.image_url.url.startsWith("http") ? { file_data: { mime_type: h.media_type, file_uri: h.image_url.url } } : { inlineData: { mime_type: h.media_type, data: h.image_url.url } }; + })), Array.isArray(u.tool_calls) && f.push(...u.tool_calls.map((h) => ({ functionCall: { id: h.id || `tool_${Math.random().toString(36).substring(2, 15)}`, name: h.function.name, args: JSON.parse(h.function.arguments || "{}") } }))), { role: l, parts: f }; + }), tools: e.length ? e : void 0 }; + if (r.tool_choice) { + let u = { functionCallingConfig: {} }; + r.tool_choice === "auto" ? u.functionCallingConfig.mode = "auto" : r.tool_choice === "none" ? u.functionCallingConfig.mode = "none" : r.tool_choice === "required" ? u.functionCallingConfig.mode = "any" : r.tool_choice?.function?.name && (u.functionCallingConfig.mode = "any", u.functionCallingConfig.allowedFunctionNames = [r.tool_choice?.function?.name]), a.toolConfig = u; + } + return a; +} +function wo(r) { + let e = r.contents, t = r.tools, n = r.model, o = r.max_tokens, a = r.temperature, u = r.stream, l = r.tool_choice, f = { messages: [], model: n, max_tokens: o, temperature: a, stream: u, tool_choice: l }; + return Array.isArray(e) && e.forEach((h) => { + typeof h == "string" ? f.messages.push({ role: "user", content: h }) : typeof h.text == "string" ? f.messages.push({ role: "user", content: h.text || null }) : h.role === "user" ? f.messages.push({ role: "user", content: h?.parts?.map((d) => ({ type: "text", text: d.text || "" })) || [] }) : h.role === "model" && f.messages.push({ role: "assistant", content: h?.parts?.map((d) => ({ type: "text", text: d.text || "" })) || [] }); + }), Array.isArray(t) && (f.tools = [], t.forEach((h) => { + Array.isArray(h.functionDeclarations) && h.functionDeclarations.forEach((d) => { + f.tools.push({ type: "function", function: { name: d.name, description: d.description, parameters: d.parameters } }); + }); + })), f; +} +async function Ao(r, e, t) { + if (r.headers.get("Content-Type")?.includes("application/json")) { + let n = await r.json(), o = n.candidates[0].content?.parts?.filter((u) => u.functionCall)?.map((u) => ({ id: u.functionCall?.id || `tool_${Math.random().toString(36).substring(2, 15)}`, type: "function", function: { name: u.functionCall?.name, arguments: JSON.stringify(u.functionCall?.args || {}) } })) || [], a = { id: n.responseId, choices: [{ finish_reason: n.candidates[0].finishReason?.toLowerCase() || null, index: 0, message: { content: n.candidates[0].content?.parts?.filter((u) => u.text)?.map((u) => u.text)?.join(` +`) || "", role: "assistant", tool_calls: o.length > 0 ? o : void 0 } }], created: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3 + "", 10), model: n.modelVersion, object: "chat.completion", usage: { completion_tokens: n.usageMetadata.candidatesTokenCount, prompt_tokens: n.usageMetadata.promptTokenCount, cached_content_token_count: n.usageMetadata.cachedContentTokenCount || null, total_tokens: n.usageMetadata.totalTokenCount } }; + return new Response(JSON.stringify(a), { status: r.status, statusText: r.statusText, headers: r.headers }); + } else if (r.headers.get("Content-Type")?.includes("stream")) { + if (!r.body) return r; + let n = new TextDecoder(), o = new TextEncoder(), a = (l, f) => { + if (l.startsWith("data: ")) { + let h = l.slice(6).trim(); + if (h) { + t?.debug({ chunkStr: h }, `${e} chunk:`); + try { + let d = JSON.parse(h); + if (!d.candidates || !d.candidates[0]) { + log("Invalid chunk structure:", h); + return; + } + let _ = d.candidates[0], E = _.content?.parts || [], P = E.filter((g) => g.functionCall).map((g) => ({ id: g.functionCall?.id || `tool_${Math.random().toString(36).substring(2, 15)}`, type: "function", function: { name: g.functionCall?.name, arguments: JSON.stringify(g.functionCall?.args || {}) } })), w = { choices: [{ delta: { role: "assistant", content: E.filter((g) => g.text).map((g) => g.text).join(` +`) || "", tool_calls: P.length > 0 ? P : void 0 }, finish_reason: _.finishReason?.toLowerCase() || null, index: _.index || (P.length > 0 ? 1 : 0), logprobs: null }], created: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3 + "", 10), id: d.responseId || "", model: d.modelVersion || "", object: "chat.completion.chunk", system_fingerprint: "fp_a49d71b8a1", usage: { completion_tokens: d.usageMetadata?.candidatesTokenCount || 0, prompt_tokens: d.usageMetadata?.promptTokenCount || 0, cached_content_token_count: d.usageMetadata?.cachedContentTokenCount || null, total_tokens: d.usageMetadata?.totalTokenCount || 0 } }; + _?.groundingMetadata?.groundingChunks?.length && (w.choices[0].delta.annotations = _.groundingMetadata.groundingChunks.map((g, C) => { + let R = _?.groundingMetadata?.groundingSupports?.filter((S) => S.groundingChunkIndices?.includes(C)); + return { type: "url_citation", url_citation: { url: g?.web?.uri || "", title: g?.web?.title || "", content: R?.[0]?.segment?.text || "", start_index: R?.[0]?.segment?.startIndex || 0, end_index: R?.[0]?.segment?.endIndex || 0 } }; + })), f.enqueue(o.encode(`data: ${JSON.stringify(w)} + +`)); + } catch (d) { + t?.error(`Error parsing ${e} stream chunk`, h, d.message); + } + } + } + }, u = new ReadableStream({ async start(l) { + let f = r.body.getReader(), h = ""; + try { + for (; ; ) { + let { done: d, value: _ } = await f.read(); + if (d) { + h && a(h, l); + break; + } + h += n.decode(_, { stream: true }); + let E = h.split(` +`); + h = E.pop() || ""; + for (let P of E) a(P, l); + } + } catch (d) { + l.error(d); + } finally { + l.close(); + } + } }); + return new Response(u, { status: r.status, statusText: r.statusText, headers: r.headers }); + } + return r; +} +var Do = class { + name = "gemini"; + endPoint = "/v1beta/models/:modelAndAction"; + async transformRequestIn(e, t) { + return { body: Eo(e), config: { url: new URL(`./${e.model}:${e.stream ? "streamGenerateContent?alt=sse" : "generateContent"}`, t.baseUrl), headers: { "x-goog-api-key": t.apiKey, Authorization: void 0 } } }; + } + transformRequestOut = wo; + async transformResponseOut(e) { + return Ao(e, this.name, this.logger); + } +}; +async function Vw() { + try { + let { GoogleAuth: r } = await Promise.resolve().then(() => zr(al(), 1)); + return (await (await new r({ scopes: ["https://www.googleapis.com/auth/cloud-platform"] }).getClient()).getAccessToken()).token || ""; + } catch (r) { + throw console.error("Error getting access token:", r), new Error(`Failed to get access token for Vertex AI. Please ensure you have set up authentication using one of these methods: +1. Set GOOGLE_APPLICATION_CREDENTIALS to point to service account key file +2. Run "gcloud auth application-default login" +3. Use Google Cloud environment with default service account`); + } +} +var Hi = class { + name = "vertex-gemini"; + async transformRequestIn(e, t) { + let n = process.env.GOOGLE_CLOUD_PROJECT, o = process.env.GOOGLE_CLOUD_LOCATION || "us-central1"; + if (!n && process.env.GOOGLE_APPLICATION_CREDENTIALS) try { + let l = (await import("fs")).readFileSync(process.env.GOOGLE_APPLICATION_CREDENTIALS, "utf8"), f = JSON.parse(l); + f && f.project_id && (n = f.project_id); + } catch (u) { + console.error("Error extracting project_id from GOOGLE_APPLICATION_CREDENTIALS:", u); + } + if (!n) throw new Error("Project ID is required for Vertex AI. Set GOOGLE_CLOUD_PROJECT environment variable or ensure project_id is in GOOGLE_APPLICATION_CREDENTIALS file."); + let a = await Vw(); + return { body: Eo(e), config: { url: new URL(`./v1beta1/projects/${n}/locations/${o}/publishers/google/models/${e.model}:${e.stream ? "streamGenerateContent" : "generateContent"}`, t.baseUrl.endsWith("/") ? t.baseUrl : t.baseUrl + "/" || `https://${o}-aiplatform.googleapis.com`), headers: { Authorization: `Bearer ${a}`, "x-goog-api-key": void 0 } } }; + } + transformRequestOut = wo; + async transformResponseOut(e) { + return Ao(e, this.name); + } +}; +var Gi = class { + name = "deepseek"; + async transformRequestIn(e) { + return e.max_tokens && e.max_tokens > 8192 && (e.max_tokens = 8192), e; + } + async transformResponseOut(e) { + if (e.headers.get("Content-Type")?.includes("application/json")) { + let t = await e.json(); + return new Response(JSON.stringify(t), { status: e.status, statusText: e.statusText, headers: e.headers }); + } else if (e.headers.get("Content-Type")?.includes("stream")) { + if (!e.body) return e; + let t = new TextDecoder(), n = new TextEncoder(), o = "", a = false, u = "", l = new ReadableStream({ async start(f) { + let h = e.body.getReader(), d = (E, P, v) => { + let w = E.split(` +`); + for (let g of w) g.trim() && P.enqueue(v.encode(g + ` +`)); + }, _ = (E, P) => { + let { controller: v, encoder: w } = P; + if (E.startsWith("data: ") && E.trim() !== "data: [DONE]") try { + let g = JSON.parse(E.slice(6)); + if (g.choices?.[0]?.delta?.reasoning_content) { + P.appendReasoningContent(g.choices[0].delta.reasoning_content); + let C = { ...g, choices: [{ ...g.choices[0], delta: { ...g.choices[0].delta, thinking: { content: g.choices[0].delta.reasoning_content } } }] }; + delete C.choices[0].delta.reasoning_content; + let R = `data: ${JSON.stringify(C)} + +`; + v.enqueue(w.encode(R)); + return; + } + if (g.choices?.[0]?.delta?.content && P.reasoningContent() && !P.isReasoningComplete()) { + P.setReasoningComplete(true); + let C = Date.now().toString(), R = { ...g, choices: [{ ...g.choices[0], delta: { ...g.choices[0].delta, content: null, thinking: { content: P.reasoningContent(), signature: C } } }] }; + delete R.choices[0].delta.reasoning_content; + let S = `data: ${JSON.stringify(R)} + +`; + v.enqueue(w.encode(S)); + } + if (g.choices[0]?.delta?.reasoning_content && delete g.choices[0].delta.reasoning_content, g.choices?.[0]?.delta && Object.keys(g.choices[0].delta).length > 0) { + P.isReasoningComplete() && g.choices[0].index++; + let C = `data: ${JSON.stringify(g)} + +`; + v.enqueue(w.encode(C)); + } + } catch { + v.enqueue(w.encode(E + ` +`)); + } + else v.enqueue(w.encode(E + ` +`)); + }; + try { + for (; ; ) { + let { done: E, value: P } = await h.read(); + if (E) { + u.trim() && d(u, f, n); + break; + } + let v = t.decode(P, { stream: true }); + u += v; + let w = u.split(` +`); + u = w.pop() || ""; + for (let g of w) if (g.trim()) try { + _(g, { controller: f, encoder: n, reasoningContent: () => o, appendReasoningContent: (C) => o += C, isReasoningComplete: () => a, setReasoningComplete: (C) => a = C }); + } catch (C) { + console.error("Error processing line:", g, C), f.enqueue(n.encode(g + ` +`)); + } + } + } catch (E) { + console.error("Stream error:", E), f.error(E); + } finally { + try { + h.releaseLock(); + } catch (E) { + console.error("Error releasing reader lock:", E); + } + f.close(); + } + } }); + return new Response(l, { status: e.status, statusText: e.statusText, headers: { "Content-Type": e.headers.get("Content-Type") || "text/plain", "Cache-Control": "no-cache", Connection: "keep-alive" } }); + } + return e; + } +}; +var Wi = class { + name = "tooluse"; + transformRequestIn(e) { + return e.messages.push({ role: "system", content: "Tool mode is active. The user expects you to proactively execute the most suitable tool to help complete the task. \nBefore invoking a tool, you must carefully evaluate whether it matches the current task. If no available tool is appropriate for the task, you MUST call the `ExitTool` to exit tool mode \u2014 this is the only valid way to terminate tool mode.\nAlways prioritize completing the user's task effectively and efficiently by using tools whenever appropriate." }), e.tools?.length && (e.tool_choice = "required", e.tools.push({ type: "function", function: { name: "ExitTool", description: `Use this tool when you are in tool mode and have completed the task. This is the only valid way to exit tool mode. +IMPORTANT: Before using this tool, ensure that none of the available tools are applicable to the current task. You must evaluate all available options \u2014 only if no suitable tool can help you complete the task should you use ExitTool to terminate tool mode. +Examples: +1. Task: "Use a tool to summarize this document" \u2014 Do not use ExitTool if a summarization tool is available. +2. Task: "What\u2019s the weather today?" \u2014 If no tool is available to answer, use ExitTool after reasoning that none can fulfill the task.`, parameters: { type: "object", properties: { response: { type: "string", description: "Your response will be forwarded to the user exactly as returned \u2014 the tool will not modify or post-process it in any way." } }, required: ["response"] } } })), e; + } + async transformResponseOut(e) { + if (e.headers.get("Content-Type")?.includes("application/json")) { + let t = await e.json(); + if (t?.choices?.[0]?.message.tool_calls?.length && t?.choices?.[0]?.message.tool_calls[0]?.function?.name === "ExitTool") { + let n = t?.choices[0]?.message.tool_calls[0], o = JSON.parse(n.function.arguments || "{}"); + t.choices[0].message.content = o.response || "", delete t.choices[0].message.tool_calls; + } + return new Response(JSON.stringify(t), { status: e.status, statusText: e.statusText, headers: e.headers }); + } else if (e.headers.get("Content-Type")?.includes("stream")) { + if (!e.body) return e; + let t = new TextDecoder(), n = new TextEncoder(), o = -1, a = "", u = "", l = new ReadableStream({ async start(f) { + let h = e.body.getReader(), d = (E, P, v) => { + let w = E.split(` +`); + for (let g of w) g.trim() && P.enqueue(v.encode(g + ` +`)); + }, _ = (E, P) => { + let { controller: v, encoder: w, exitToolIndex: g, setExitToolIndex: C, appendExitToolResponse: R } = P; + if (E.startsWith("data: ") && E.trim() !== "data: [DONE]") try { + let S = JSON.parse(E.slice(6)); + if (S.choices[0]?.delta?.tool_calls?.length) { + let N = S.choices[0].delta.tool_calls[0]; + if (N.function?.name === "ExitTool") { + C(N.index); + return; + } else if (g() > -1 && N.index === g() && N.function.arguments) { + R(N.function.arguments); + try { + let j = JSON.parse(P.exitToolResponse()); + S.choices = [{ delta: { role: "assistant", content: j.response || "" } }]; + let L = `data: ${JSON.stringify(S)} + +`; + v.enqueue(w.encode(L)); + } catch { + } + return; + } + } + if (S.choices?.[0]?.delta && Object.keys(S.choices[0].delta).length > 0) { + let N = `data: ${JSON.stringify(S)} + +`; + v.enqueue(w.encode(N)); + } + } catch { + v.enqueue(w.encode(E + ` +`)); + } + else v.enqueue(w.encode(E + ` +`)); + }; + try { + for (; ; ) { + let { done: E, value: P } = await h.read(); + if (E) { + u.trim() && d(u, f, n); + break; + } + let v = t.decode(P, { stream: true }); + u += v; + let w = u.split(` +`); + u = w.pop() || ""; + for (let g of w) if (g.trim()) try { + _(g, { controller: f, encoder: n, exitToolIndex: () => o, setExitToolIndex: (C) => o = C, exitToolResponse: () => a, appendExitToolResponse: (C) => a += C }); + } catch (C) { + console.error("Error processing line:", g, C), f.enqueue(n.encode(g + ` +`)); + } + } + } catch (E) { + console.error("Stream error:", E), f.error(E); + } finally { + try { + h.releaseLock(); + } catch (E) { + console.error("Error releasing reader lock:", E); + } + f.close(); + } + } }); + return new Response(l, { status: e.status, statusText: e.statusText, headers: { "Content-Type": "text/event-stream", "Cache-Control": "no-cache", Connection: "keep-alive" } }); + } + return e; + } +}; +var zi = class { + constructor(e) { + this.options = e; + } + static TransformerName = "openrouter"; + async transformRequestIn(e) { + return e.model.includes("claude") ? e.messages.forEach((t) => { + Array.isArray(t.content) && t.content.forEach((n) => { + n.type === "image_url" && (n.image_url.url.startsWith("http") || (n.image_url.url = `data:${n.media_type};base64,${n.image_url.url}`), delete n.media_type); + }); + }) : e.messages.forEach((t) => { + Array.isArray(t.content) ? t.content.forEach((n) => { + n.cache_control && delete n.cache_control, n.type === "image_url" && (n.image_url.url.startsWith("http") || (n.image_url.url = `data:${n.media_type};base64,${n.image_url.url}`), delete n.media_type); + }) : t.cache_control && delete t.cache_control; + }), Object.assign(e, this.options || {}), e; + } + async transformResponseOut(e) { + if (e.headers.get("Content-Type")?.includes("application/json")) { + let t = await e.json(); + return new Response(JSON.stringify(t), { status: e.status, statusText: e.statusText, headers: e.headers }); + } else if (e.headers.get("Content-Type")?.includes("stream")) { + if (!e.body) return e; + let t = new TextDecoder(), n = new TextEncoder(), o = false, a = "", u = false, l = false, f = "", h = new ReadableStream({ async start(d) { + let _ = e.body.getReader(), E = (v, w, g) => { + let C = v.split(` +`); + for (let R of C) R.trim() && w.enqueue(g.encode(R + ` +`)); + }, P = (v, w) => { + let { controller: g, encoder: C } = w; + if (v.startsWith("data: ") && v.trim() !== "data: [DONE]") { + let R = v.slice(6); + try { + let S = JSON.parse(R); + if (S.usage && (this.logger?.debug({ usage: S.usage, hasToolCall: l }, "usage"), S.choices[0].finish_reason = l ? "tool_calls" : "stop"), S.choices?.[0]?.finish_reason === "error" && g.enqueue(C.encode(`data: ${JSON.stringify({ error: S.choices?.[0].error })} + +`)), S.choices?.[0]?.delta?.content && !w.hasTextContent() && w.setHasTextContent(true), S.choices?.[0]?.delta?.reasoning) { + w.appendReasoningContent(S.choices[0].delta.reasoning); + let j = { ...S, choices: [{ ...S.choices?.[0], delta: { ...S.choices[0].delta, thinking: { content: S.choices[0].delta.reasoning } } }] }; + j.choices?.[0]?.delta && delete j.choices[0].delta.reasoning; + let L = `data: ${JSON.stringify(j)} + +`; + g.enqueue(C.encode(L)); + return; + } + if (S.choices?.[0]?.delta?.content && w.reasoningContent() && !w.isReasoningComplete()) { + w.setReasoningComplete(true); + let j = Date.now().toString(), L = { ...S, choices: [{ ...S.choices?.[0], delta: { ...S.choices[0].delta, content: null, thinking: { content: w.reasoningContent(), signature: j } } }] }; + L.choices?.[0]?.delta && delete L.choices[0].delta.reasoning; + let H = `data: ${JSON.stringify(L)} + +`; + g.enqueue(C.encode(H)); + } + S.choices?.[0]?.delta?.reasoning && delete S.choices[0].delta.reasoning, S.choices?.[0]?.delta?.tool_calls?.length && !Number.isNaN(parseInt(S.choices?.[0]?.delta?.tool_calls[0].id, 10)) && S.choices?.[0]?.delta?.tool_calls.forEach((j) => { + j.id = `call_${Tr()}`; + }), S.choices?.[0]?.delta?.tool_calls?.length && !l && (l = true), S.choices?.[0]?.delta?.tool_calls?.length && w.hasTextContent() && (typeof S.choices[0].index == "number" ? S.choices[0].index += 1 : S.choices[0].index = 1); + let N = `data: ${JSON.stringify(S)} + +`; + g.enqueue(C.encode(N)); + } catch { + g.enqueue(C.encode(v + ` +`)); + } + } else g.enqueue(C.encode(v + ` +`)); + }; + try { + for (; ; ) { + let { done: v, value: w } = await _.read(); + if (v) { + f.trim() && E(f, d, n); + break; + } + if (!w || w.length === 0) continue; + let g; + try { + g = t.decode(w, { stream: true }); + } catch (R) { + console.warn("Failed to decode chunk", R); + continue; + } + if (g.length === 0) continue; + if (f += g, f.length > 1e6) { + console.warn("Buffer size exceeds limit, processing partial data"); + let R = f.split(` +`); + f = R.pop() || ""; + for (let S of R) if (S.trim()) try { + P(S, { controller: d, encoder: n, hasTextContent: () => o, setHasTextContent: (N) => o = N, reasoningContent: () => a, appendReasoningContent: (N) => a += N, isReasoningComplete: () => u, setReasoningComplete: (N) => u = N }); + } catch (N) { + console.error("Error processing line:", S, N), d.enqueue(n.encode(S + ` +`)); + } + continue; + } + let C = f.split(` +`); + f = C.pop() || ""; + for (let R of C) if (R.trim()) try { + P(R, { controller: d, encoder: n, hasTextContent: () => o, setHasTextContent: (S) => o = S, reasoningContent: () => a, appendReasoningContent: (S) => a += S, isReasoningComplete: () => u, setReasoningComplete: (S) => u = S }); + } catch (S) { + console.error("Error processing line:", R, S), d.enqueue(n.encode(R + ` +`)); + } + } + } catch (v) { + console.error("Stream error:", v), d.error(v); + } finally { + try { + _.releaseLock(); + } catch (v) { + console.error("Error releasing reader lock:", v); + } + d.close(); + } + } }); + return new Response(h, { status: e.status, statusText: e.statusText, headers: { "Content-Type": "text/event-stream", "Cache-Control": "no-cache", Connection: "keep-alive" } }); + } + return e; + } +}; +var Ji = class { + constructor(e) { + this.options = e; + this.max_tokens = this.options?.max_tokens; + } + static TransformerName = "maxtoken"; + max_tokens; + async transformRequestIn(e) { + return e.max_tokens && e.max_tokens > this.max_tokens && (e.max_tokens = this.max_tokens), e; + } +}; +var Vi = class { + name = "groq"; + async transformRequestIn(e) { + return e.messages.forEach((t) => { + Array.isArray(t.content) ? t.content.forEach((n) => { + n.cache_control && delete n.cache_control; + }) : t.cache_control && delete t.cache_control; + }), Array.isArray(e.tools) && e.tools.forEach((t) => { + delete t.function.parameters.$schema; + }), e; + } + async transformResponseOut(e) { + if (e.headers.get("Content-Type")?.includes("application/json")) { + let t = await e.json(); + return new Response(JSON.stringify(t), { status: e.status, statusText: e.statusText, headers: e.headers }); + } else if (e.headers.get("Content-Type")?.includes("stream")) { + if (!e.body) return e; + let t = new TextDecoder(), n = new TextEncoder(), o = false, a = "", u = false, l = "", f = new ReadableStream({ async start(h) { + let d = e.body.getReader(), _ = (P, v, w) => { + let g = P.split(` +`); + for (let C of g) C.trim() && v.enqueue(w.encode(C + ` +`)); + }, E = (P, v) => { + let { controller: w, encoder: g } = v; + if (P.startsWith("data: ") && P.trim() !== "data: [DONE]") { + let C = P.slice(6); + try { + let R = JSON.parse(C); + if (R.error) throw new Error(JSON.stringify(R)); + R.choices?.[0]?.delta?.content && !v.hasTextContent() && v.setHasTextContent(true), R.choices?.[0]?.delta?.tool_calls?.length && R.choices?.[0]?.delta?.tool_calls.forEach((N) => { + N.id = `call_${Tr()}`; + }), R.choices?.[0]?.delta?.tool_calls?.length && v.hasTextContent() && (typeof R.choices[0].index == "number" ? R.choices[0].index += 1 : R.choices[0].index = 1); + let S = `data: ${JSON.stringify(R)} + +`; + w.enqueue(g.encode(S)); + } catch { + w.enqueue(g.encode(P + ` +`)); + } + } else w.enqueue(g.encode(P + ` +`)); + }; + try { + for (; ; ) { + let { done: P, value: v } = await d.read(); + if (P) { + l.trim() && _(l, h, n); + break; + } + if (!v || v.length === 0) continue; + let w; + try { + w = t.decode(v, { stream: true }); + } catch (C) { + console.warn("Failed to decode chunk", C); + continue; + } + if (w.length === 0) continue; + if (l += w, l.length > 1e6) { + console.warn("Buffer size exceeds limit, processing partial data"); + let C = l.split(` +`); + l = C.pop() || ""; + for (let R of C) if (R.trim()) try { + E(R, { controller: h, encoder: n, hasTextContent: () => o, setHasTextContent: (S) => o = S, reasoningContent: () => a, appendReasoningContent: (S) => a += S, isReasoningComplete: () => u, setReasoningComplete: (S) => u = S }); + } catch (S) { + console.error("Error processing line:", R, S), h.enqueue(n.encode(R + ` +`)); + } + continue; + } + let g = l.split(` +`); + l = g.pop() || ""; + for (let C of g) if (C.trim()) try { + E(C, { controller: h, encoder: n, hasTextContent: () => o, setHasTextContent: (R) => o = R, reasoningContent: () => a, appendReasoningContent: (R) => a += R, isReasoningComplete: () => u, setReasoningComplete: (R) => u = R }); + } catch (R) { + console.error("Error processing line:", C, R), h.enqueue(n.encode(C + ` +`)); + } + } + } catch (P) { + console.error("Stream error:", P), h.error(P); + } finally { + try { + d.releaseLock(); + } catch (P) { + console.error("Error releasing reader lock:", P); + } + h.close(); + } + } }); + return new Response(f, { status: e.status, statusText: e.statusText, headers: { "Content-Type": "text/event-stream", "Cache-Control": "no-cache", Connection: "keep-alive" } }); + } + return e; + } +}; +var Ki = class { + name = "cleancache"; + async transformRequestIn(e) { + return Array.isArray(e.messages) && e.messages.forEach((t) => { + Array.isArray(t.content) ? t.content.forEach((n) => { + n.cache_control && delete n.cache_control; + }) : t.cache_control && delete t.cache_control; + }), e; + } +}; +var eg = zr(Ma(), 1); +var yr = class extends Error { + constructor(e, t) { + super(`${e} at position ${t}`), this.position = t; + } +}; +function Jm(r) { + return /^[0-9A-Fa-f]$/.test(r); +} +function qr(r) { + return r >= "0" && r <= "9"; +} +function Vm(r) { + return r >= " "; +} +function Is(r) { + return `,:[]/{}() ++`.includes(r); +} +function ul(r) { + return r >= "a" && r <= "z" || r >= "A" && r <= "Z" || r === "_" || r === "$"; +} +function cl(r) { + return r >= "a" && r <= "z" || r >= "A" && r <= "Z" || r === "_" || r === "$" || r >= "0" && r <= "9"; +} +var ll = /^(http|https|ftp|mailto|file|data|irc):\/\/$/; +var fl = /^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/; +function dl(r) { + return `,[]/{} ++`.includes(r); +} +function hl(r) { + return Ns(r) || Kw.test(r); +} +var Kw = /^[[{\w-]$/; +function Km(r) { + return r === ` +` || r === "\r" || r === " " || r === "\b" || r === "\f"; +} +function Nr(r, e) { + let t = r.charCodeAt(e); + return t === 32 || t === 10 || t === 9 || t === 13; +} +function Ym(r, e) { + let t = r.charCodeAt(e); + return t === 32 || t === 9 || t === 13; +} +function Xm(r, e) { + let t = r.charCodeAt(e); + return t === 160 || t >= 8192 && t <= 8202 || t === 8239 || t === 8287 || t === 12288; +} +function Ns(r) { + return pl(r) || Yi(r); +} +function pl(r) { + return r === '"' || r === "\u201C" || r === "\u201D"; +} +function ml(r) { + return r === '"'; +} +function Yi(r) { + return r === "'" || r === "\u2018" || r === "\u2019" || r === "`" || r === "\xB4"; +} +function gl(r) { + return r === "'"; +} +function Kn(r, e) { + let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, n = r.lastIndexOf(e); + return n !== -1 ? r.substring(0, n) + (t ? "" : r.substring(n + 1)) : r; +} +function Rt(r, e) { + let t = r.length; + if (!Nr(r, t - 1)) return r + e; + for (; Nr(r, t - 1); ) t--; + return r.substring(0, t) + e + r.substring(t); +} +function Qm(r, e, t) { + return r.substring(0, e) + r.substring(e + t); +} +function Zm(r) { + return /[,\n][ \t\r]*$/.test(r); +} +var Yw = { "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t" }; +var Xw = { '"': '"', "\\": "\\", "/": "/", b: "\b", f: "\f", n: ` +`, r: "\r", t: " " }; +function yl(r) { + let e = 0, t = ""; + h(["```", "[```", "{```"]), a() || re(), h(["```", "```]", "```}"]); + let o = _(","); + for (o && u(), hl(r[e]) && Zm(t) ? (o || (t = Rt(t, ",")), C()) : o && (t = Kn(t, ",")); r[e] === "}" || r[e] === "]"; ) e++, u(); + if (e >= r.length) return t; + ye(); + function a() { + u(); + let J = w() || g() || R() || N() || j() || H(false) || K(); + return u(), J; + } + function u() { + let J = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true, se = e, oe = l(J); + do + oe = f(), oe && (oe = l(J)); + while (oe); + return e > se; + } + function l(J) { + let se = J ? Nr : Ym, oe = ""; + for (; ; ) if (se(r, e)) oe += r[e], e++; + else if (Xm(r, e)) oe += " ", e++; + else break; + return oe.length > 0 ? (t += oe, true) : false; + } + function f() { + if (r[e] === "/" && r[e + 1] === "*") { + for (; e < r.length && !Qw(r, e); ) e++; + return e += 2, true; + } + if (r[e] === "/" && r[e + 1] === "/") { + for (; e < r.length && r[e] !== ` +`; ) e++; + return true; + } + return false; + } + function h(J) { + if (d(J)) { + if (ul(r[e])) for (; e < r.length && cl(r[e]); ) e++; + return u(), true; + } + return false; + } + function d(J) { + for (let se of J) { + let oe = e + se.length; + if (r.slice(e, oe) === se) return e = oe, true; + } + return false; + } + function _(J) { + return r[e] === J ? (t += r[e], e++, true) : false; + } + function E(J) { + return r[e] === J ? (e++, true) : false; + } + function P() { + return E("\\"); + } + function v() { + return u(), r[e] === "." && r[e + 1] === "." && r[e + 2] === "." ? (e += 3, u(), E(","), true) : false; + } + function w() { + if (r[e] === "{") { + t += "{", e++, u(), E(",") && u(); + let J = true; + for (; e < r.length && r[e] !== "}"; ) { + let se; + if (J ? (se = true, J = false) : (se = _(","), se || (t = Rt(t, ",")), u()), v(), !(R() || H(true))) { + r[e] === "}" || r[e] === "{" || r[e] === "]" || r[e] === "[" || r[e] === void 0 ? t = Kn(t, ",") : de(); + break; + } + u(); + let Ie = _(":"), je = e >= r.length; + Ie || (hl(r[e]) || je ? t = Rt(t, ":") : Z()), a() || (Ie || je ? t += "null" : Z()); + } + return r[e] === "}" ? (t += "}", e++) : t = Rt(t, "}"), true; + } + return false; + } + function g() { + if (r[e] === "[") { + t += "[", e++, u(), E(",") && u(); + let J = true; + for (; e < r.length && r[e] !== "]"; ) if (J ? J = false : _(",") || (t = Rt(t, ",")), v(), !a()) { + t = Kn(t, ","); + break; + } + return r[e] === "]" ? (t += "]", e++) : t = Rt(t, "]"), true; + } + return false; + } + function C() { + let J = true, se = true; + for (; se; ) J ? J = false : _(",") || (t = Rt(t, ",")), se = a(); + se || (t = Kn(t, ",")), t = `[ +${t} +]`; + } + function R() { + let J = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false, se = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1, oe = r[e] === "\\"; + if (oe && (e++, oe = true), Ns(r[e])) { + let Ie = ml(r[e]) ? ml : gl(r[e]) ? gl : Yi(r[e]) ? Yi : pl, je = e, G = t.length, pe = '"'; + for (e++; ; ) { + if (e >= r.length) { + let Ee = W(e - 1); + return !J && Is(r.charAt(Ee)) ? (e = je, t = t.substring(0, G), R(true)) : (pe = Rt(pe, '"'), t += pe, true); + } + if (e === se) return pe = Rt(pe, '"'), t += pe, true; + if (Ie(r[e])) { + let Ee = e, er = pe.length; + if (pe += '"', e++, t += pe, u(false), J || e >= r.length || Is(r[e]) || Ns(r[e]) || qr(r[e])) return S(), true; + let xe = W(Ee - 1), Ne = r.charAt(xe); + if (Ne === ",") return e = je, t = t.substring(0, G), R(false, xe); + if (Is(Ne)) return e = je, t = t.substring(0, G), R(true); + t = t.substring(0, G), e = Ee + 1, pe = `${pe.substring(0, er)}\\${pe.substring(er)}`; + } else if (J && dl(r[e])) { + if (r[e - 1] === ":" && ll.test(r.substring(je + 1, e + 2))) for (; e < r.length && fl.test(r[e]); ) pe += r[e], e++; + return pe = Rt(pe, '"'), t += pe, S(), true; + } else if (r[e] === "\\") { + let Ee = r.charAt(e + 1); + if (Xw[Ee] !== void 0) pe += r.slice(e, e + 2), e += 2; + else if (Ee === "u") { + let xe = 2; + for (; xe < 6 && Jm(r[e + xe]); ) xe++; + xe === 6 ? (pe += r.slice(e, e + 6), e += 6) : e + xe >= r.length ? e = r.length : ue(); + } else pe += Ee, e += 2; + } else { + let Ee = r.charAt(e); + Ee === '"' && r[e - 1] !== "\\" ? (pe += `\\${Ee}`, e++) : Km(Ee) ? (pe += Yw[Ee], e++) : (Vm(Ee) || fe(Ee), pe += Ee, e++); + } + oe && P(); + } + } + return false; + } + function S() { + let J = false; + for (u(); r[e] === "+"; ) { + J = true, e++, u(), t = Kn(t, '"', true); + let se = t.length; + R() ? t = Qm(t, se, 1) : t = Rt(t, '"'); + } + return J; + } + function N() { + let J = e; + if (r[e] === "-") { + if (e++, Ae()) return he(J), true; + if (!qr(r[e])) return e = J, false; + } + for (; qr(r[e]); ) e++; + if (r[e] === ".") { + if (e++, Ae()) return he(J), true; + if (!qr(r[e])) return e = J, false; + for (; qr(r[e]); ) e++; + } + if (r[e] === "e" || r[e] === "E") { + if (e++, (r[e] === "-" || r[e] === "+") && e++, Ae()) return he(J), true; + if (!qr(r[e])) return e = J, false; + for (; qr(r[e]); ) e++; + } + if (!Ae()) return e = J, false; + if (e > J) { + let se = r.slice(J, e), oe = /^0\d/.test(se); + return t += oe ? `"${se}"` : se, true; + } + return false; + } + function j() { + return L("true", "true") || L("false", "false") || L("null", "null") || L("True", "true") || L("False", "false") || L("None", "null"); + } + function L(J, se) { + return r.slice(e, e + J.length) === J ? (t += se, e += J.length, true) : false; + } + function H(J) { + let se = e; + if (ul(r[e])) { + for (; e < r.length && cl(r[e]); ) e++; + let oe = e; + for (; Nr(r, oe); ) oe++; + if (r[oe] === "(") return e = oe + 1, a(), r[e] === ")" && (e++, r[e] === ";" && e++), true; + } + for (; e < r.length && !dl(r[e]) && !Ns(r[e]) && (!J || r[e] !== ":"); ) e++; + if (r[e - 1] === ":" && ll.test(r.substring(se, e + 2))) for (; e < r.length && fl.test(r[e]); ) e++; + if (e > se) { + for (; Nr(r, e - 1) && e > 0; ) e--; + let oe = r.slice(se, e); + return t += oe === "undefined" ? "null" : JSON.stringify(oe), r[e] === '"' && e++, true; + } + } + function K() { + if (r[e] === "/") { + let J = e; + for (e++; e < r.length && (r[e] !== "/" || r[e - 1] === "\\"); ) e++; + return e++, t += `"${r.substring(J, e)}"`, true; + } + } + function W(J) { + let se = J; + for (; se > 0 && Nr(r, se); ) se--; + return se; + } + function Ae() { + return e >= r.length || Is(r[e]) || Nr(r, e); + } + function he(J) { + t += `${r.slice(J, e)}0`; + } + function fe(J) { + throw new yr(`Invalid character ${JSON.stringify(J)}`, e); + } + function ye() { + throw new yr(`Unexpected character ${JSON.stringify(r[e])}`, e); + } + function re() { + throw new yr("Unexpected end of json string", r.length); + } + function de() { + throw new yr("Object key expected", e); + } + function Z() { + throw new yr("Colon expected", e); + } + function ue() { + let J = r.slice(e, e + 6); + throw new yr(`Invalid unicode character "${J}"`, e); + } +} +function Qw(r, e) { + return r[e] === "*" && r[e + 1] === "/"; +} +function _l(r, e) { + if (!r || r.trim() === "" || r === "{}") return "{}"; + try { + return JSON.parse(r), e?.debug("\u5DE5\u5177\u8C03\u7528\u53C2\u6570\u6807\u51C6JSON\u89E3\u6790\u6210\u529F / Tool arguments standard JSON parsing successful"), r; + } catch (t) { + try { + let n = eg.default.parse(r); + return e?.debug("\u5DE5\u5177\u8C03\u7528\u53C2\u6570JSON5\u89E3\u6790\u6210\u529F / Tool arguments JSON5 parsing successful"), JSON.stringify(n); + } catch (n) { + try { + let o = yl(r); + return e?.debug("\u5DE5\u5177\u8C03\u7528\u53C2\u6570\u5B89\u5168\u4FEE\u590D\u6210\u529F / Tool arguments safely repaired"), o; + } catch (o) { + return e?.error(`JSON\u89E3\u6790\u5931\u8D25 / JSON parsing failed: ${t.message}. JSON5\u89E3\u6790\u5931\u8D25 / JSON5 parsing failed: ${n.message}. JSON\u4FEE\u590D\u5931\u8D25 / JSON repair failed: ${o.message}. \u8F93\u5165\u6570\u636E / Input data: ${JSON.stringify(r)}`), e?.debug("\u8FD4\u56DE\u5B89\u5168\u7684\u7A7A\u5BF9\u8C61\u4F5C\u4E3A\u540E\u5907\u65B9\u6848 / Returning safe empty object as fallback"), "{}"; + } + } + } +} +var Xi = class { + name = "enhancetool"; + async transformResponseOut(e) { + if (e.headers.get("Content-Type")?.includes("application/json")) { + let t = await e.json(); + if (t?.choices?.[0]?.message?.tool_calls?.length) for (let n of t.choices[0].message.tool_calls) n.function?.arguments && (n.function.arguments = _l(n.function.arguments, this.logger)); + return new Response(JSON.stringify(t), { status: e.status, statusText: e.statusText, headers: e.headers }); + } else if (e.headers.get("Content-Type")?.includes("stream")) { + if (!e.body) return e; + let t = new TextDecoder(), n = new TextEncoder(), o = {}, a = false, u = "", l = false, f = false, h = "", d = new ReadableStream({ async start(_) { + let E = e.body.getReader(), P = (g, C, R) => { + let S = g.split(` +`); + for (let N of S) N.trim() && C.enqueue(R.encode(N + ` +`)); + }, v = (g, C, R) => { + let S = ""; + try { + S = _l(o.arguments || "", this.logger); + } catch (H) { + console.error(`${H.message} ${H.stack} \u5DE5\u5177\u8C03\u7528\u53C2\u6570\u89E3\u6790\u5931\u8D25: ${JSON.stringify(o)}`), S = o.arguments || ""; + } + let N = { role: "assistant", tool_calls: [{ function: { name: o.name, arguments: S }, id: o.id, index: o.index, type: "function" }] }, j = { ...g, choices: [{ ...g.choices[0], delta: N }] }; + j.choices[0].delta.content !== void 0 && delete j.choices[0].delta.content; + let L = `data: ${JSON.stringify(j)} + +`; + C.enqueue(R.encode(L)); + }, w = (g, C) => { + let { controller: R, encoder: S } = C; + if (g.startsWith("data: ") && g.trim() !== "data: [DONE]") { + let N = g.slice(6); + try { + let j = JSON.parse(N); + if (j.choices?.[0]?.delta?.tool_calls?.length) { + let H = j.choices[0].delta.tool_calls[0]; + if (typeof o.index > "u") { + o = { index: H.index, name: H.function?.name || "", id: H.id || "", arguments: H.function?.arguments || "" }, H.function?.arguments && (H.function.arguments = ""); + let K = `data: ${JSON.stringify(j)} + +`; + R.enqueue(S.encode(K)); + return; + } else if (o.index === H.index) { + H.function?.arguments && (o.arguments += H.function.arguments); + return; + } else { + v(j, R, S), o = { index: H.index, name: H.function?.name || "", id: H.id || "", arguments: H.function?.arguments || "" }; + return; + } + } + if (j.choices?.[0]?.finish_reason === "tool_calls" && o.index !== void 0) { + v(j, R, S), o = {}; + return; + } + j.choices?.[0]?.delta?.tool_calls?.length && C.hasTextContent() && (typeof j.choices[0].index == "number" ? j.choices[0].index += 1 : j.choices[0].index = 1); + let L = `data: ${JSON.stringify(j)} + +`; + R.enqueue(S.encode(L)); + } catch { + R.enqueue(S.encode(g + ` +`)); + } + } else R.enqueue(S.encode(g + ` +`)); + }; + try { + for (; ; ) { + let { done: g, value: C } = await E.read(); + if (g) { + h.trim() && P(h, _, n); + break; + } + if (!C || C.length === 0) continue; + let R; + try { + R = t.decode(C, { stream: true }); + } catch (N) { + console.warn("Failed to decode chunk", N); + continue; + } + if (R.length === 0) continue; + if (h += R, h.length > 1e6) { + console.warn("Buffer size exceeds limit, processing partial data"); + let N = h.split(` +`); + h = N.pop() || ""; + for (let j of N) if (j.trim()) try { + w(j, { controller: _, encoder: n, hasTextContent: () => a, setHasTextContent: (L) => a = L, reasoningContent: () => u, appendReasoningContent: (L) => u += L, isReasoningComplete: () => l, setReasoningComplete: (L) => l = L }); + } catch (L) { + console.error("Error processing line:", j, L), _.enqueue(n.encode(j + ` +`)); + } + continue; + } + let S = h.split(` +`); + h = S.pop() || ""; + for (let N of S) if (N.trim()) try { + w(N, { controller: _, encoder: n, hasTextContent: () => a, setHasTextContent: (j) => a = j, reasoningContent: () => u, appendReasoningContent: (j) => u += j, isReasoningComplete: () => l, setReasoningComplete: (j) => l = j }); + } catch (j) { + console.error("Error processing line:", N, j), _.enqueue(n.encode(N + ` +`)); + } + } + } catch (g) { + console.error("Stream error:", g), _.error(g); + } finally { + try { + E.releaseLock(); + } catch (g) { + console.error("Error releasing reader lock:", g); + } + _.close(); + } + } }); + return new Response(d, { status: e.status, statusText: e.statusText, headers: { "Content-Type": "text/event-stream", "Cache-Control": "no-cache", Connection: "keep-alive" } }); + } + return e; + } +}; +var Qi = class { + constructor(e) { + this.options = e; + this.enable = this.options?.enable ?? true; + } + static TransformerName = "reasoning"; + enable; + async transformRequestIn(e) { + return this.enable ? (e.reasoning && (e.thinking = { type: "enabled", budget_tokens: e.reasoning.max_tokens }, e.enable_thinking = true), e) : (e.thinking = { type: "disabled", budget_tokens: -1 }, e.enable_thinking = false, e); + } + async transformResponseOut(e) { + if (!this.enable) return e; + if (e.headers.get("Content-Type")?.includes("application/json")) { + let t = await e.json(); + return new Response(JSON.stringify(t), { status: e.status, statusText: e.statusText, headers: e.headers }); + } else if (e.headers.get("Content-Type")?.includes("stream")) { + if (!e.body) return e; + let t = new TextDecoder(), n = new TextEncoder(), o = "", a = false, u = "", l = new ReadableStream({ async start(f) { + let h = e.body.getReader(), d = (E, P, v) => { + let w = E.split(` +`); + for (let g of w) g.trim() && P.enqueue(v.encode(g + ` +`)); + }, _ = (E, P) => { + let { controller: v, encoder: w } = P; + if (this.logger?.debug({ line: E }, "Processing reason line"), E.startsWith("data: ") && E.trim() !== "data: [DONE]") try { + let g = JSON.parse(E.slice(6)); + if (g.choices?.[0]?.delta?.reasoning_content) { + P.appendReasoningContent(g.choices[0].delta.reasoning_content); + let C = { ...g, choices: [{ ...g.choices[0], delta: { ...g.choices[0].delta, thinking: { content: g.choices[0].delta.reasoning_content } } }] }; + delete C.choices[0].delta.reasoning_content; + let R = `data: ${JSON.stringify(C)} + +`; + v.enqueue(w.encode(R)); + return; + } + if ((g.choices?.[0]?.delta?.content || g.choices?.[0]?.delta?.tool_calls) && P.reasoningContent() && !P.isReasoningComplete()) { + P.setReasoningComplete(true); + let C = Date.now().toString(), R = { ...g, choices: [{ ...g.choices[0], delta: { ...g.choices[0].delta, content: null, thinking: { content: P.reasoningContent(), signature: C } } }] }; + delete R.choices[0].delta.reasoning_content; + let S = `data: ${JSON.stringify(R)} + +`; + v.enqueue(w.encode(S)); + } + if (g.choices?.[0]?.delta?.reasoning_content && delete g.choices[0].delta.reasoning_content, g.choices?.[0]?.delta && Object.keys(g.choices[0].delta).length > 0) { + P.isReasoningComplete() && g.choices[0].index++; + let C = `data: ${JSON.stringify(g)} + +`; + v.enqueue(w.encode(C)); + } + } catch { + v.enqueue(w.encode(E + ` +`)); + } + else v.enqueue(w.encode(E + ` +`)); + }; + try { + for (; ; ) { + let { done: E, value: P } = await h.read(); + if (E) { + u.trim() && d(u, f, n); + break; + } + let v = t.decode(P, { stream: true }); + u += v; + let w = u.split(` +`); + u = w.pop() || ""; + for (let g of w) if (g.trim()) try { + _(g, { controller: f, encoder: n, reasoningContent: () => o, appendReasoningContent: (C) => o += C, isReasoningComplete: () => a, setReasoningComplete: (C) => a = C }); + } catch (C) { + console.error("Error processing line:", g, C), f.enqueue(n.encode(g + ` +`)); + } + } + } catch (E) { + console.error("Stream error:", E), f.error(E); + } finally { + try { + h.releaseLock(); + } catch (E) { + console.error("Error releasing reader lock:", E); + } + f.close(); + } + } }); + return new Response(l, { status: e.status, statusText: e.statusText, headers: { "Content-Type": "text/event-stream", "Cache-Control": "no-cache", Connection: "keep-alive" } }); + } + return e; + } +}; +var Zi = class { + constructor(e) { + this.options = e; + this.max_tokens = this.options?.max_tokens, this.temperature = this.options?.temperature, this.top_p = this.options?.top_p, this.top_k = this.options?.top_k, this.repetition_penalty = this.options?.repetition_penalty; + } + name = "sampling"; + max_tokens; + temperature; + top_p; + top_k; + repetition_penalty; + async transformRequestIn(e) { + return e.max_tokens && e.max_tokens > this.max_tokens && (e.max_tokens = this.max_tokens), typeof this.temperature < "u" && (e.temperature = this.temperature), typeof this.top_p < "u" && (e.top_p = this.top_p), typeof this.top_k < "u" && (e.top_k = this.top_k), typeof this.repetition_penalty < "u" && (e.repetition_penalty = this.repetition_penalty), e; + } +}; +var ea = class { + static TransformerName = "maxcompletiontokens"; + async transformRequestIn(e) { + return e.max_tokens && (e.max_completion_tokens = e.max_tokens, delete e.max_tokens), e; + } +}; +function tg(r) { + let e = []; + for (let n = 0; n < r.messages.length; n++) { + let o = r.messages[n], a = n === r.messages.length - 1, u = o.role === "assistant", l = []; + typeof o.content == "string" ? l.push({ type: "text", text: o.content }) : Array.isArray(o.content) && o.content.forEach((f) => { + f.type === "text" ? l.push({ type: "text", text: f.text || "" }) : f.type === "image_url" && l.push({ type: "image", source: { type: "base64", media_type: f.media_type || "image/jpeg", data: f.image_url.url } }); + }), !(!a && l.length === 0 && !o.tool_calls && !o.content) && (a && u && l.length === 0 && o.tool_calls && l.push({ type: "text", text: "" }), e.push({ role: o.role === "assistant" ? "assistant" : "user", content: l })); + } + let t = { anthropic_version: "vertex-2023-10-16", messages: e, max_tokens: r.max_tokens || 1e3, stream: r.stream || false, ...r.temperature && { temperature: r.temperature } }; + return r.tools && r.tools.length > 0 && (t.tools = r.tools.map((n) => ({ name: n.function.name, description: n.function.description, input_schema: n.function.parameters }))), r.tool_choice && (r.tool_choice === "auto" || r.tool_choice === "none" ? t.tool_choice = r.tool_choice : typeof r.tool_choice == "string" && (t.tool_choice = { type: "tool", name: r.tool_choice })), t; +} +function rg(r) { + let e = r, n = { messages: e.messages.map((o) => { + let a = o.content.map((u) => u.type === "text" ? { type: "text", text: u.text || "" } : u.type === "image" && u.source ? { type: "image_url", image_url: { url: u.source.data }, media_type: u.source.media_type } : { type: "text", text: "" }); + return { role: o.role, content: a }; + }), model: r.model || "claude-sonnet-4@20250514", max_tokens: e.max_tokens, temperature: e.temperature, stream: e.stream }; + return e.tools && e.tools.length > 0 && (n.tools = e.tools.map((o) => ({ type: "function", function: { name: o.name, description: o.description, parameters: { type: "object", properties: o.input_schema.properties, required: o.input_schema.required, additionalProperties: o.input_schema.additionalProperties, $schema: o.input_schema.$schema } } }))), e.tool_choice && (typeof e.tool_choice == "string" ? n.tool_choice = e.tool_choice : e.tool_choice.type === "tool" && (n.tool_choice = e.tool_choice.name)), n; +} +async function ng(r, e, t) { + if (r.headers.get("Content-Type")?.includes("application/json")) { + let n = await r.json(), o; + n.tool_use && n.tool_use.length > 0 && (o = n.tool_use.map((u) => ({ id: u.id, type: "function", function: { name: u.name, arguments: JSON.stringify(u.input) } }))); + let a = { id: n.id, choices: [{ finish_reason: n.stop_reason || null, index: 0, message: { content: n.content[0]?.text || "", role: "assistant", ...o && { tool_calls: o } } }], created: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3 + "", 10), model: n.model, object: "chat.completion", usage: { completion_tokens: n.usage.output_tokens, prompt_tokens: n.usage.input_tokens, total_tokens: n.usage.input_tokens + n.usage.output_tokens } }; + return new Response(JSON.stringify(a), { status: r.status, statusText: r.statusText, headers: r.headers }); + } else if (r.headers.get("Content-Type")?.includes("stream")) { + if (!r.body) return r; + let n = new TextDecoder(), o = new TextEncoder(), a = (l, f) => { + if (l.startsWith("data: ")) { + let h = l.slice(6).trim(); + if (h) { + t?.debug({ chunkStr: h }, `${e} chunk:`); + try { + let d = JSON.parse(h); + if (d.type === "content_block_delta" && d.delta?.type === "text_delta") { + let _ = { choices: [{ delta: { role: "assistant", content: d.delta.text || "" }, finish_reason: null, index: 0, logprobs: null }], created: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3 + "", 10), id: d.id || "", model: d.model || "", object: "chat.completion.chunk", system_fingerprint: "fp_a49d71b8a1", usage: { completion_tokens: d.usage?.output_tokens || 0, prompt_tokens: d.usage?.input_tokens || 0, total_tokens: (d.usage?.input_tokens || 0) + (d.usage?.output_tokens || 0) } }; + f.enqueue(o.encode(`data: ${JSON.stringify(_)} + +`)); + } else if (d.type === "content_block_delta" && d.delta?.type === "input_json_delta") { + let _ = { choices: [{ delta: { tool_calls: [{ index: d.index || 0, function: { arguments: d.delta.partial_json || "" } }] }, finish_reason: null, index: 0, logprobs: null }], created: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3 + "", 10), id: d.id || "", model: d.model || "", object: "chat.completion.chunk", system_fingerprint: "fp_a49d71b8a1", usage: { completion_tokens: d.usage?.output_tokens || 0, prompt_tokens: d.usage?.input_tokens || 0, total_tokens: (d.usage?.input_tokens || 0) + (d.usage?.output_tokens || 0) } }; + f.enqueue(o.encode(`data: ${JSON.stringify(_)} + +`)); + } else if (d.type === "content_block_start" && d.content_block?.type === "tool_use") { + let _ = { choices: [{ delta: { tool_calls: [{ index: d.index || 0, id: d.content_block.id, type: "function", function: { name: d.content_block.name, arguments: "" } }] }, finish_reason: null, index: 0, logprobs: null }], created: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3 + "", 10), id: d.id || "", model: d.model || "", object: "chat.completion.chunk", system_fingerprint: "fp_a49d71b8a1", usage: { completion_tokens: d.usage?.output_tokens || 0, prompt_tokens: d.usage?.input_tokens || 0, total_tokens: (d.usage?.input_tokens || 0) + (d.usage?.output_tokens || 0) } }; + f.enqueue(o.encode(`data: ${JSON.stringify(_)} + +`)); + } else if (d.type === "message_delta") { + let _ = { choices: [{ delta: {}, finish_reason: d.delta?.stop_reason === "tool_use" ? "tool_calls" : d.delta?.stop_reason === "max_tokens" ? "length" : d.delta?.stop_reason === "stop_sequence" ? "content_filter" : "stop", index: 0, logprobs: null }], created: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3 + "", 10), id: d.id || "", model: d.model || "", object: "chat.completion.chunk", system_fingerprint: "fp_a49d71b8a1", usage: { completion_tokens: d.usage?.output_tokens || 0, prompt_tokens: d.usage?.input_tokens || 0, total_tokens: (d.usage?.input_tokens || 0) + (d.usage?.output_tokens || 0) } }; + f.enqueue(o.encode(`data: ${JSON.stringify(_)} + +`)); + } else if (d.type === "message_stop") f.enqueue(o.encode(`data: [DONE] + +`)); + else { + let _ = { choices: [{ delta: { role: "assistant", content: d.content?.[0]?.text || "" }, finish_reason: d.stop_reason?.toLowerCase() || null, index: 0, logprobs: null }], created: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3 + "", 10), id: d.id || "", model: d.model || "", object: "chat.completion.chunk", system_fingerprint: "fp_a49d71b8a1", usage: { completion_tokens: d.usage?.output_tokens || 0, prompt_tokens: d.usage?.input_tokens || 0, total_tokens: (d.usage?.input_tokens || 0) + (d.usage?.output_tokens || 0) } }; + f.enqueue(o.encode(`data: ${JSON.stringify(_)} + +`)); + } + } catch (d) { + t?.error(`Error parsing ${e} stream chunk`, h, d.message); + } + } + } + }, u = new ReadableStream({ async start(l) { + let f = r.body.getReader(), h = ""; + try { + for (; ; ) { + let { done: d, value: _ } = await f.read(); + if (d) { + h && a(h, l); + break; + } + h += n.decode(_, { stream: true }); + let E = h.split(` +`); + h = E.pop() || ""; + for (let P of E) a(P, l); + } + } catch (d) { + l.error(d); + } finally { + l.close(); + } + } }); + return new Response(u, { status: r.status, statusText: r.statusText, headers: r.headers }); + } + return r; +} +async function Zw() { + try { + let { GoogleAuth: r } = await Promise.resolve().then(() => zr(al(), 1)); + return (await (await new r({ scopes: ["https://www.googleapis.com/auth/cloud-platform"] }).getClient()).getAccessToken()).token || ""; + } catch (r) { + throw console.error("Error getting access token:", r), new Error(`Failed to get access token for Vertex AI. Please ensure you have set up authentication using one of these methods: +1. Set GOOGLE_APPLICATION_CREDENTIALS to point to service account key file +2. Run "gcloud auth application-default login" +3. Use Google Cloud environment with default service account`); + } +} +var ta = class { + name = "vertex-claude"; + async transformRequestIn(e, t) { + let n = process.env.GOOGLE_CLOUD_PROJECT, o = process.env.GOOGLE_CLOUD_LOCATION || "us-east5"; + if (!n && process.env.GOOGLE_APPLICATION_CREDENTIALS) try { + let l = (await import("fs")).readFileSync(process.env.GOOGLE_APPLICATION_CREDENTIALS, "utf8"), f = JSON.parse(l); + f && f.project_id && (n = f.project_id); + } catch (u) { + console.error("Error extracting project_id from GOOGLE_APPLICATION_CREDENTIALS:", u); + } + if (!n) throw new Error("Project ID is required for Vertex AI. Set GOOGLE_CLOUD_PROJECT environment variable or ensure project_id is in GOOGLE_APPLICATION_CREDENTIALS file."); + let a = await Zw(); + return { body: tg(e), config: { url: new URL(`/v1/projects/${n}/locations/${o}/publishers/anthropic/models/${e.model}:${e.stream ? "streamRawPredict" : "rawPredict"}`, `https://${o}-aiplatform.googleapis.com`).toString(), headers: { Authorization: `Bearer ${a}`, "Content-Type": "application/json" } } }; + } + async transformRequestOut(e) { + return rg(e); + } + async transformResponseOut(e) { + return ng(e, this.name, this.logger); + } +}; +function sg(r) { + return typeof r == "string" ? r : Array.isArray(r) ? r.map((e) => typeof e == "string" ? e : typeof e == "object" && e !== null && "type" in e && e.type === "text" && "text" in e && typeof e.text == "string" ? e.text : "").join("") : ""; +} +var ra = class { + name = "cerebras"; + async transformRequestIn(e, t) { + let n = JSON.parse(JSON.stringify(e)); + if (!n.model && t.models && t.models.length > 0 && (n.model = t.models[0]), n.system !== void 0) { + let o = sg(n.system); + n.messages || (n.messages = []), n.messages.unshift({ role: "system", content: o }), delete n.system; + } + return n.messages && Array.isArray(n.messages) && (n.messages = n.messages.map((o) => { + let a = { ...o }; + return a.content !== void 0 && (a.content = sg(a.content)), a; + })), { body: n, config: { headers: { Authorization: `Bearer ${t.apiKey}`, "Content-Type": "application/json" } } }; + } + async transformResponseOut(e) { + return e; + } +}; +var na = class { + name = "streamoptions"; + async transformRequestIn(e) { + return e.stream && (e.stream_options = { include_usage: true }), e; + } +}; +var og = { AnthropicTransformer: bo, GeminiTransformer: Do, VertexGeminiTransformer: Hi, VertexClaudeTransformer: ta, DeepseekTransformer: Gi, TooluseTransformer: Wi, OpenrouterTransformer: zi, MaxTokenTransformer: Ji, GroqTransformer: Vi, CleancacheTransformer: Ki, EnhanceToolTransformer: Xi, ReasoningTransformer: Qi, SamplingTransformer: Zi, MaxCompletionTokens: ea, CerebrasTransformer: ra, StreamOptionsTransformer: na }; +var sa = class { + constructor(e, t) { + this.configService = e; + this.logger = t; + } + transformers = /* @__PURE__ */ new Map(); + registerTransformer(e, t) { + this.transformers.set(e, t), this.logger.info(`register transformer: ${e}${t.endPoint ? ` (endpoint: ${t.endPoint})` : " (no endpoint)"}`); + } + getTransformer(e) { + return this.transformers.get(e); + } + getAllTransformers() { + return new Map(this.transformers); + } + getTransformersWithEndpoint() { + let e = []; + return this.transformers.forEach((t, n) => { + t.endPoint && e.push({ name: n, transformer: t }); + }), e; + } + getTransformersWithoutEndpoint() { + let e = []; + return this.transformers.forEach((t, n) => { + t.endPoint || e.push({ name: n, transformer: t }); + }), e; + } + removeTransformer(e) { + return this.transformers.delete(e); + } + hasTransformer(e) { + return this.transformers.has(e); + } + async registerTransformerFromConfig(e) { + try { + if (e.path) { + let t = X(X.resolve(e.path)); + if (t) { + let n = new t(e.options); + if (n && typeof n == "object" && (n.logger = this.logger), !n.name) throw new Error(`Transformer instance from ${e.path} does not have a name property.`); + return this.registerTransformer(n.name, n), true; + } + } + return false; + } catch (t) { + return this.logger.error(`load transformer (${e.path}) +error: ${t.message} +stack: ${t.stack}`), false; + } + } + async initialize() { + try { + await this.registerDefaultTransformersInternal(), await this.loadFromConfig(); + } catch (e) { + this.logger.error(`TransformerService init error: ${e.message} +Stack: ${e.stack}`); + } + } + async registerDefaultTransformersInternal() { + try { + Object.values(og).forEach((e) => { + if ("TransformerName" in e && typeof e.TransformerName == "string") this.registerTransformer(e.TransformerName, e); + else { + let t = new e(); + t && typeof t == "object" && (t.logger = this.logger), this.registerTransformer(t.name, t); + } + }); + } catch (e) { + this.logger.error({ error: e }, "transformer regist error:"); + } + } + async loadFromConfig() { + let e = this.configService.get("transformers", []); + for (let t of e) await this.registerTransformerFromConfig(t); + } +}; +function rA(r) { + let e = (0, import_fastify.default)({ bodyLimit: 52428800, logger: r }); + return e.setErrorHandler(qf), e.register(import_cors.default), e; +} +var Cl = class { + app; + configService; + llmService; + providerService; + transformerService; + constructor(e = {}) { + this.app = rA(e.logger ?? true), this.configService = new mo(e), this.transformerService = new sa(this.configService, this.app.log), this.transformerService.initialize().finally(() => { + this.providerService = new yo(this.configService, this.transformerService, this.app.log), this.llmService = new go(this.providerService); + }); + } + async register(e, t) { + await this.app.register(e, t); + } + addHook(e, t) { + this.app.addHook(e, t); + } + async start() { + try { + this.app._server = this, this.app.addHook("preHandler", (n, o, a) => { + n.url.startsWith("/v1/messages") && n.body && (n.log.info({ body: n.body }, "request body"), n.body.stream, n.body.stream || (n.body.stream = false)), a(); + }), this.app.addHook("preHandler", async (n, o) => { + if (!(n.url.startsWith("/api") || n.method !== "POST")) try { + let a = n.body; + if (!a || !a.model) return o.code(400).send({ error: "Missing model in request body" }); + let [u, l] = a.model.split(","); + a.model = l, n.provider = u; + return; + } catch (a) { + return n.log.error("Error in modelProviderMiddleware:", a), o.code(500).send({ error: "Internal server error" }); + } + }), this.app.register(Uf); + let e = await this.app.listen({ port: parseInt(this.configService.get("PORT") || "3000", 10), host: this.configService.get("HOST") || "127.0.0.1" }); + this.app.log.info(`\u{1F680} LLMs API server listening on ${e}`); + let t = async (n) => { + this.app.log.info(`Received ${n}, shutting down gracefully...`), await this.app.close(), process.exit(0); + }; + process.on("SIGINT", () => t("SIGINT")), process.on("SIGTERM", () => t("SIGTERM")); + } catch (e) { + this.app.log.error(`Error starting server: ${e}`), process.exit(1); + } + } +}; +var QT = Cl; + +// src/server.ts +init_utils(); +init_utils(); +var import_path2 = require("path"); +var import_static = __toESM(require_static()); +var createServer = (config) => { + const server = new QT(config); + server.app.get("/api/config", async (req, reply) => { + return await readConfigFile(); + }); + server.app.get("/api/transformers", async () => { + const transformers = server.app._server.transformerService.getAllTransformers(); + const transformerList = Array.from(transformers.entries()).map( + ([name, transformer]) => ({ + name, + endpoint: transformer.endPoint || null + }) + ); + return { transformers: transformerList }; + }); + server.app.post("/api/config", async (req, reply) => { + const newConfig = req.body; + const backupPath = await backupConfigFile(); + if (backupPath) { + console.log(`Backed up existing configuration file to ${backupPath}`); + } + await writeConfigFile(newConfig); + return { success: true, message: "Config saved successfully" }; + }); + server.app.post("/api/restart", async (req, reply) => { + reply.send({ success: true, message: "Service restart initiated" }); + setTimeout(() => { + const { spawn: spawn3 } = require("child_process"); + spawn3(process.execPath, [process.argv[1], "restart"], { + detached: true, + stdio: "ignore" + }); + }, 1e3); + }); + server.app.register(import_static.default, { + root: (0, import_path2.join)(__dirname, "..", "dist"), + prefix: "/ui/", + maxAge: "1h" + }); + server.app.get("/ui", async (_, reply) => { + return reply.redirect("/ui/"); + }); + server.app.get("/api/update/check", async (req, reply) => { + try { + const currentVersion = require_package3().version; + const { hasUpdate, latestVersion, changelog } = await checkForUpdates(currentVersion); + return { + hasUpdate, + latestVersion: hasUpdate ? latestVersion : void 0, + changelog: hasUpdate ? changelog : void 0 + }; + } catch (error) { + console.error("Failed to check for updates:", error); + reply.status(500).send({ error: "Failed to check for updates" }); + } + }); + server.app.post("/api/update/perform", async (req, reply) => { + try { + const accessLevel = req.accessLevel || "restricted"; + if (accessLevel !== "full") { + reply.status(403).send("Full access required to perform updates"); + return; + } + const result = await performUpdate(); + return result; + } catch (error) { + console.error("Failed to perform update:", error); + reply.status(500).send({ error: "Failed to perform update" }); + } + }); + return server; +}; + +// src/utils/router.ts +var import_tiktoken = __toESM(require_tiktoken()); + +// src/utils/log.ts +var import_node_fs2 = __toESM(require("node:fs")); +var import_node_path5 = __toESM(require("node:path")); +init_constants(); +var LOG_FILE = import_node_path5.default.join(HOME_DIR, "claude-code-router.log"); +if (!import_node_fs2.default.existsSync(HOME_DIR)) { + import_node_fs2.default.mkdirSync(HOME_DIR, { recursive: true }); +} +var isLogEnabled = null; +var logLevel = "info"; +function configureLogging(config) { + isLogEnabled = config.LOG !== false; + logLevel = config.LOG_LEVEL || "debug"; +} +function log2(...args) { + if (isLogEnabled === null) { + isLogEnabled = true; + } + if (!isLogEnabled) { + return; + } + const timestamp = (/* @__PURE__ */ new Date()).toISOString(); + const logMessage = `[${timestamp}] ${Array.isArray(args) ? args.map( + (arg) => typeof arg === "object" ? JSON.stringify(arg) : String(arg) + ).join(" ") : ""} +`; + import_node_fs2.default.appendFileSync(LOG_FILE, logMessage, "utf8"); +} + +// src/utils/cache.ts +var LRUCache = class { + capacity; + cache; + constructor(capacity) { + this.capacity = capacity; + this.cache = /* @__PURE__ */ new Map(); + } + get(key) { + if (!this.cache.has(key)) { + return void 0; + } + const value = this.cache.get(key); + this.cache.delete(key); + this.cache.set(key, value); + return value; + } + put(key, value) { + if (this.cache.has(key)) { + this.cache.delete(key); + } else if (this.cache.size >= this.capacity) { + const leastRecentlyUsedKey = this.cache.keys().next().value; + if (leastRecentlyUsedKey !== void 0) { + this.cache.delete(leastRecentlyUsedKey); + } + } + this.cache.set(key, value); + } + values() { + return Array.from(this.cache.values()); + } +}; +var sessionUsageCache = new LRUCache(100); + +// src/utils/router.ts +var enc = (0, import_tiktoken.get_encoding)("cl100k_base"); +var calculateTokenCount = (messages, system, tools) => { + let tokenCount = 0; + if (Array.isArray(messages)) { + messages.forEach((message) => { + if (typeof message.content === "string") { + tokenCount += enc.encode(message.content).length; + } else if (Array.isArray(message.content)) { + message.content.forEach((contentPart) => { + if (contentPart.type === "text") { + tokenCount += enc.encode(contentPart.text).length; + } else if (contentPart.type === "tool_use") { + tokenCount += enc.encode(JSON.stringify(contentPart.input)).length; + } else if (contentPart.type === "tool_result") { + tokenCount += enc.encode( + typeof contentPart.content === "string" ? contentPart.content : JSON.stringify(contentPart.content) + ).length; + } + }); + } + }); + } + if (typeof system === "string") { + tokenCount += enc.encode(system).length; + } else if (Array.isArray(system)) { + system.forEach((item) => { + if (item.type !== "text") return; + if (typeof item.text === "string") { + tokenCount += enc.encode(item.text).length; + } else if (Array.isArray(item.text)) { + item.text.forEach((textPart) => { + tokenCount += enc.encode(textPart || "").length; + }); + } + }); + } + if (tools) { + tools.forEach((tool) => { + if (tool.description) { + tokenCount += enc.encode(tool.name + tool.description).length; + } + if (tool.input_schema) { + tokenCount += enc.encode(JSON.stringify(tool.input_schema)).length; + } + }); + } + return tokenCount; +}; +var getUseModel = async (req, tokenCount, config, lastUsage) => { + if (req.body.model.includes(",")) { + const [provider, model] = req.body.model.split(","); + const finalProvider = config.Providers.find( + (p) => p.name.toLowerCase() === provider + ); + const finalModel = finalProvider?.models?.find( + (m) => m.toLowerCase() === model + ); + if (finalProvider && finalModel) { + return `${finalProvider.name},${finalModel}`; + } + return req.body.model; + } + const longContextThreshold = config.Router.longContextThreshold || 6e4; + const lastUsageThreshold = lastUsage && lastUsage.input_tokens > longContextThreshold && tokenCount > 2e4; + const tokenCountThreshold = tokenCount > longContextThreshold; + if ((lastUsageThreshold || tokenCountThreshold) && config.Router.longContext) { + log2( + "Using long context model due to token count:", + tokenCount, + "threshold:", + longContextThreshold + ); + return config.Router.longContext; + } + if (req.body?.system?.length > 1 && req.body?.system[1]?.text?.startsWith("")) { + const model = req.body?.system[1].text.match( + /(.*?)<\/CCR-SUBAGENT-MODEL>/s + ); + if (model) { + req.body.system[1].text = req.body.system[1].text.replace( + `${model[1]}`, + "" + ); + return model[1]; + } + } + if (req.body.model?.startsWith("claude-3-5-haiku") && config.Router.background) { + log2("Using background model for ", req.body.model); + return config.Router.background; + } + if (req.body.thinking && config.Router.think) { + log2("Using think model for ", req.body.thinking); + return config.Router.think; + } + if (Array.isArray(req.body.tools) && req.body.tools.some((tool) => tool.type?.startsWith("web_search")) && config.Router.webSearch) { + return config.Router.webSearch; + } + return config.Router.default; +}; +var router = async (req, _res, config) => { + if (req.body.metadata?.user_id) { + const parts = req.body.metadata.user_id.split("_session_"); + if (parts.length > 1) { + req.sessionId = parts[1]; + } + } + const lastMessageUsage = sessionUsageCache.get(req.sessionId); + const { messages, system = [], tools } = req.body; + try { + const tokenCount = calculateTokenCount( + messages, + system, + tools + ); + let model; + if (config.CUSTOM_ROUTER_PATH) { + try { + const customRouter = require(config.CUSTOM_ROUTER_PATH); + req.tokenCount = tokenCount; + model = await customRouter(req, config); + } catch (e) { + log2("failed to load custom router", e.message); + } + } + if (!model) { + model = await getUseModel(req, tokenCount, config, lastMessageUsage); + } + req.body.model = model; + } catch (error) { + log2("Error in router middleware:", error.message); + req.body.model = config.Router.default; + } + return; +}; + +// src/middleware/auth.ts +var apiKeyAuth = (config) => async (req, reply, done) => { + if (["/", "/health"].includes(req.url) || req.url.startsWith("/ui")) { + return done(); + } + const apiKey = config.APIKEY; + if (!apiKey) { + const allowedOrigins = [ + `http://127.0.0.1:${config.PORT || 3456}`, + `http://localhost:${config.PORT || 3456}` + ]; + if (req.headers.origin && !allowedOrigins.includes(req.headers.origin)) { + reply.status(403).send("CORS not allowed for this origin"); + return; + } else { + reply.header("Access-Control-Allow-Origin", `http://127.0.0.1:${config.PORT || 3456}`); + reply.header("Access-Control-Allow-Origin", `http://localhost:${config.PORT || 3456}`); + } + return done(); + } + const isConfigEndpoint = req.url.startsWith("/api/config"); + const isRestartEndpoint = req.url === "/api/restart"; + if (isConfigEndpoint || isRestartEndpoint) { + req.accessLevel = "restricted"; + if (!apiKey) { + req.accessLevel = "restricted"; + return done(); + } + const authHeaderValue2 = req.headers.authorization || req.headers["x-api-key"]; + const authKey2 = Array.isArray(authHeaderValue2) ? authHeaderValue2[0] : authHeaderValue2 || ""; + if (!authKey2) { + req.accessLevel = "restricted"; + return done(); + } + let token2 = ""; + if (authKey2.startsWith("Bearer")) { + token2 = authKey2.split(" ")[1]; + } else { + token2 = authKey2; + } + if (token2 !== apiKey) { + req.accessLevel = "restricted"; + return done(); + } + req.accessLevel = "full"; + return done(); + } + const authHeaderValue = req.headers.authorization || req.headers["x-api-key"]; + const authKey = Array.isArray(authHeaderValue) ? authHeaderValue[0] : authHeaderValue || ""; + if (!authKey) { + reply.status(401).send("APIKEY is missing"); + return; + } + let token = ""; + if (authKey.startsWith("Bearer")) { + token = authKey.split(" ")[1]; + } else { + token = authKey; + } + if (token !== apiKey) { + reply.status(401).send("Invalid API key"); + return; + } + done(); +}; + +// src/utils/processCheck.ts +var import_fs2 = require("fs"); +init_constants(); +init_utils(); +function incrementReferenceCount() { + let count = 0; + if ((0, import_fs2.existsSync)(REFERENCE_COUNT_FILE)) { + count = parseInt((0, import_fs2.readFileSync)(REFERENCE_COUNT_FILE, "utf-8")) || 0; + } + count++; + (0, import_fs2.writeFileSync)(REFERENCE_COUNT_FILE, count.toString()); +} +function decrementReferenceCount() { + let count = 0; + if ((0, import_fs2.existsSync)(REFERENCE_COUNT_FILE)) { + count = parseInt((0, import_fs2.readFileSync)(REFERENCE_COUNT_FILE, "utf-8")) || 0; + } + count = Math.max(0, count - 1); + (0, import_fs2.writeFileSync)(REFERENCE_COUNT_FILE, count.toString()); +} +function getReferenceCount() { + if (!(0, import_fs2.existsSync)(REFERENCE_COUNT_FILE)) { + return 0; + } + return parseInt((0, import_fs2.readFileSync)(REFERENCE_COUNT_FILE, "utf-8")) || 0; +} +function isServiceRunning() { + if (!(0, import_fs2.existsSync)(PID_FILE)) { + return false; + } + try { + const pid = parseInt((0, import_fs2.readFileSync)(PID_FILE, "utf-8")); + process.kill(pid, 0); + return true; + } catch (e) { + cleanupPidFile(); + return false; + } +} +function savePid(pid) { + (0, import_fs2.writeFileSync)(PID_FILE, pid.toString()); +} +function cleanupPidFile() { + if ((0, import_fs2.existsSync)(PID_FILE)) { + try { + const fs7 = require("fs"); + fs7.unlinkSync(PID_FILE); + } catch (e) { + } + } +} +function getServicePid() { + if (!(0, import_fs2.existsSync)(PID_FILE)) { + return null; + } + try { + const pid = parseInt((0, import_fs2.readFileSync)(PID_FILE, "utf-8")); + return isNaN(pid) ? null : pid; + } catch (e) { + return null; + } +} +async function getServiceInfo() { + const pid = getServicePid(); + const running = isServiceRunning(); + const config = await readConfigFile(); + const port = config.PORT || 3456; + return { + running, + pid, + port, + endpoint: `http://127.0.0.1:${port}`, + pidFile: PID_FILE, + referenceCount: getReferenceCount() + }; +} + +// src/index.ts +init_constants(); + +// node_modules/rotating-file-stream/dist/esm/index.js +var import_child_process2 = require("child_process"); +var import_zlib = require("zlib"); +var import_stream = require("stream"); +var import_fs3 = require("fs"); +var import_promises3 = require("fs/promises"); +var import_path3 = require("path"); +var import_util2 = require("util"); +var import_timers = require("timers"); +async function exists(filename) { + return new Promise((resolve) => (0, import_fs3.access)(filename, import_fs3.constants.F_OK, (error) => resolve(!error))); +} +var RotatingFileStreamError = class extends Error { + code = "RFS-TOO-MANY"; + constructor() { + super("Too many destination file attempts"); + } +}; +var RotatingFileStream = class extends import_stream.Writable { + createGzip; + exec; + file; + filename; + finished; + fsCreateReadStream; + fsCreateWriteStream; + fsOpen; + fsReadFile; + fsStat; + fsUnlink; + generator; + initPromise; + last; + maxTimeout; + next; + options; + prev; + rotation; + size; + stdout; + timeout; + timeoutPromise; + constructor(generator, options) { + const { encoding, history, maxFiles, maxSize, path: path7 } = options; + super({ decodeStrings: true, defaultEncoding: encoding }); + this.createGzip = import_zlib.createGzip; + this.exec = import_child_process2.exec; + this.filename = path7 + generator(null); + this.fsCreateReadStream = import_fs3.createReadStream; + this.fsCreateWriteStream = import_fs3.createWriteStream; + this.fsOpen = import_promises3.open; + this.fsReadFile = import_promises3.readFile; + this.fsStat = import_promises3.stat; + this.fsUnlink = import_promises3.unlink; + this.generator = generator; + this.maxTimeout = 2147483640; + this.options = options; + this.stdout = process.stdout; + if (maxFiles || maxSize) + options.history = path7 + (history ? history : this.generator(null) + ".txt"); + this.on("close", () => this.finished ? null : this.emit("finish")); + this.on("finish", () => this.finished = this.clear()); + (async () => { + try { + this.initPromise = this.init(); + await this.initPromise; + delete this.initPromise; + } catch (e) { + } + })(); + } + _destroy(error, callback) { + this.refinal(error, callback); + } + _final(callback) { + this.refinal(void 0, callback); + } + _write(chunk, encoding, callback) { + this.rewrite([{ chunk, encoding }], 0, callback); + } + _writev(chunks, callback) { + this.rewrite(chunks, 0, callback); + } + async refinal(error, callback) { + try { + this.clear(); + if (this.initPromise) + await this.initPromise; + if (this.timeoutPromise) + await this.timeoutPromise; + await this.reclose(); + } catch (e) { + return callback(error || e); + } + callback(error); + } + async rewrite(chunks, index, callback) { + const { size, teeToStdout } = this.options; + try { + if (this.initPromise) + await this.initPromise; + for (let i = 0; i < chunks.length; ++i) { + const { chunk } = chunks[i]; + this.size += chunk.length; + if (this.timeoutPromise) + await this.timeoutPromise; + await this.file.write(chunk); + if (teeToStdout && !this.stdout.destroyed) + this.stdout.write(chunk); + if (size && this.size >= size) + await this.rotate(); + } + } catch (e) { + return callback(e); + } + callback(); + } + async init() { + const { immutable, initialRotation, interval, size } = this.options; + if (immutable) + return new Promise((resolve, reject) => process.nextTick(() => this.immutate(true).then(resolve).catch(reject))); + let stats; + try { + stats = await (0, import_promises3.stat)(this.filename); + } catch (e) { + if (e.code !== "ENOENT") + throw e; + return this.reopen(0); + } + if (!stats.isFile()) + throw new Error(`Can't write on: ${this.filename} (it is not a file)`); + if (initialRotation) { + this.intervalBounds(this.now()); + const prev = this.prev; + this.intervalBounds(new Date(stats.mtime.getTime())); + if (prev !== this.prev) + return this.rotate(); + } + this.size = stats.size; + if (!size || stats.size < size) + return this.reopen(stats.size); + if (interval) + this.intervalBounds(this.now()); + return this.rotate(); + } + async makePath(name) { + return (0, import_promises3.mkdir)(name.split(import_path3.sep).slice(0, -1).join(import_path3.sep), { recursive: true }); + } + async reopen(size) { + let file; + try { + file = await (0, import_promises3.open)(this.filename, "a", this.options.mode); + } catch (e) { + if (e.code !== "ENOENT") + throw e; + await this.makePath(this.filename); + file = await (0, import_promises3.open)(this.filename, "a", this.options.mode); + } + this.file = file; + this.size = size; + this.interval(); + this.emit("open", this.filename); + } + async reclose() { + const { file } = this; + if (!file) + return; + delete this.file; + return file.close(); + } + now() { + return /* @__PURE__ */ new Date(); + } + async rotate() { + const { immutable, rotate } = this.options; + this.size = 0; + this.rotation = this.now(); + this.clear(); + this.emit("rotation"); + await this.reclose(); + if (rotate) + return this.classical(); + if (immutable) + return this.immutate(false); + return this.move(); + } + async findName() { + const { interval, path: path7, intervalBoundary } = this.options; + for (let index = 1; index < 1e3; ++index) { + const filename = path7 + this.generator(interval && intervalBoundary ? new Date(this.prev) : this.rotation, index); + if (!await exists(filename)) + return filename; + } + throw new RotatingFileStreamError(); + } + async move() { + const { compress } = this.options; + const filename = await this.findName(); + await this.touch(filename); + if (compress) + await this.compress(filename); + else + await (0, import_promises3.rename)(this.filename, filename); + return this.rotated(filename); + } + async touch(filename) { + let file; + try { + file = await this.fsOpen(filename, "a"); + } catch (e) { + if (e.code !== "ENOENT") + throw e; + await this.makePath(filename); + file = await (0, import_promises3.open)(filename, "a"); + } + await file.close(); + return this.unlink(filename); + } + async classical() { + const { compress, path: path7, rotate } = this.options; + let rotatedName = ""; + for (let count = rotate; count > 0; --count) { + const currName = path7 + this.generator(count); + const prevName = count === 1 ? this.filename : path7 + this.generator(count - 1); + if (!await exists(prevName)) + continue; + if (!rotatedName) + rotatedName = currName; + if (count === 1 && compress) + await this.compress(currName); + else { + try { + await (0, import_promises3.rename)(prevName, currName); + } catch (e) { + if (e.code !== "ENOENT") + throw e; + await this.makePath(currName); + await (0, import_promises3.rename)(prevName, currName); + } + } + } + return this.rotated(rotatedName); + } + clear() { + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + return true; + } + intervalBoundsBig(now) { + const year = this.options.intervalUTC ? now.getUTCFullYear() : now.getFullYear(); + let month = this.options.intervalUTC ? now.getUTCMonth() : now.getMonth(); + let day = this.options.intervalUTC ? now.getUTCDate() : now.getDate(); + let hours = this.options.intervalUTC ? now.getUTCHours() : now.getHours(); + const { num, unit } = this.options.interval; + if (unit === "M") { + day = 1; + hours = 0; + } else if (unit === "d") + hours = 0; + else + hours = parseInt(hours / num, 10) * num; + this.prev = new Date(year, month, day, hours, 0, 0, 0).getTime(); + if (unit === "M") + month += num; + else if (unit === "d") + day += num; + else + hours += num; + this.next = new Date(year, month, day, hours, 0, 0, 0).getTime(); + } + intervalBounds(now) { + const unit = this.options.interval.unit; + if (unit === "M" || unit === "d" || unit === "h") + this.intervalBoundsBig(now); + else { + let period = 1e3 * this.options.interval.num; + if (unit === "m") + period *= 60; + this.prev = parseInt(now.getTime() / period, 10) * period; + this.next = this.prev + period; + } + return new Date(this.prev); + } + interval() { + if (!this.options.interval) + return; + this.intervalBounds(this.now()); + const set = async () => { + const time = this.next - this.now().getTime(); + if (time <= 0) { + try { + this.timeoutPromise = this.rotate(); + await this.timeoutPromise; + delete this.timeoutPromise; + } catch (e) { + } + } else { + this.timeout = (0, import_timers.setTimeout)(set, time > this.maxTimeout ? this.maxTimeout : time); + this.timeout.unref(); + } + }; + set(); + } + async compress(filename) { + const { compress } = this.options; + if (typeof compress === "function") { + await new Promise((resolve, reject) => { + this.exec(compress(this.filename, filename), (error, stdout, stderr) => { + this.emit("external", stdout, stderr); + error ? reject(error) : resolve(); + }); + }); + } else + await this.gzip(filename); + return this.unlink(this.filename); + } + async gzip(filename) { + const { mode } = this.options; + const options = mode ? { mode } : {}; + const inp = this.fsCreateReadStream(this.filename, {}); + const out = this.fsCreateWriteStream(filename, options); + const zip = this.createGzip(); + return new Promise((resolve, reject) => { + inp.once("error", reject); + out.once("error", reject); + zip.once("error", reject); + out.once("finish", resolve); + inp.pipe(zip).pipe(out); + }); + } + async rotated(filename) { + const { maxFiles, maxSize } = this.options; + if (maxFiles || maxSize) + await this.history(filename); + this.emit("rotated", filename); + return this.reopen(0); + } + async history(filename) { + const { history, maxFiles, maxSize } = this.options; + const res = []; + let files = [filename]; + try { + const content = await this.fsReadFile(history, "utf8"); + files = [...content.toString().split("\n"), filename]; + } catch (e) { + if (e.code !== "ENOENT") + throw e; + } + for (const file of files) { + if (file) { + try { + const stats = await this.fsStat(file); + if (stats.isFile()) { + res.push({ + name: file, + size: stats.size, + time: stats.mtime.getTime() + }); + } else + this.emit("warning", new Error(`File '${file}' contained in history is not a regular file`)); + } catch (e) { + if (e.code !== "ENOENT") + throw e; + } + } + } + res.sort((a, b) => a.time - b.time); + if (maxFiles) { + while (res.length > maxFiles) { + const file = res.shift(); + await this.unlink(file.name); + this.emit("removed", file.name, true); + } + } + if (maxSize) { + while (res.reduce((size, file) => size + file.size, 0) > maxSize) { + const file = res.shift(); + await this.unlink(file.name); + this.emit("removed", file.name, false); + } + } + await (0, import_promises3.writeFile)(history, res.map((e) => e.name).join("\n") + "\n", "utf-8"); + this.emit("history"); + } + async immutate(first) { + const { size } = this.options; + const now = this.now(); + for (let index = 1; index < 1e3; ++index) { + let fileSize = 0; + let stats = void 0; + this.filename = this.options.path + this.generator(now, index); + try { + stats = await this.fsStat(this.filename); + } catch (e) { + if (e.code !== "ENOENT") + throw e; + } + if (stats) { + fileSize = stats.size; + if (!stats.isFile()) + throw new Error(`Can't write on: '${this.filename}' (it is not a file)`); + if (size && fileSize >= size) + continue; + } + if (first) { + this.last = this.filename; + return this.reopen(fileSize); + } + await this.rotated(this.last); + this.last = this.filename; + return; + } + throw new RotatingFileStreamError(); + } + async unlink(filename) { + try { + await this.fsUnlink(filename); + } catch (e) { + if (e.code !== "ENOENT") + throw e; + this.emit("warning", e); + } + } +}; +function buildNumberCheck(field) { + return (type, options, value) => { + const converted = parseInt(value, 10); + if (type !== "number" || converted !== value || converted <= 0) + throw new Error(`'${field}' option must be a positive integer number`); + }; +} +function buildStringCheck(field, check) { + return (type, options, value) => { + if (type !== "string") + throw new Error(`Don't know how to handle 'options.${field}' type: ${type}`); + options[field] = check(value); + }; +} +function checkMeasure(value, what, units) { + const ret = {}; + ret.num = parseInt(value, 10); + if (isNaN(ret.num)) + throw new Error(`Unknown 'options.${what}' format: ${value}`); + if (ret.num <= 0) + throw new Error(`A positive integer number is expected for 'options.${what}'`); + ret.unit = value.replace(/^[ 0]*/g, "").substr((ret.num + "").length, 1); + if (ret.unit.length === 0) + throw new Error(`Missing unit for 'options.${what}'`); + if (!units[ret.unit]) + throw new Error(`Unknown 'options.${what}' unit: ${ret.unit}`); + return ret; +} +var intervalUnits = { M: true, d: true, h: true, m: true, s: true }; +function checkIntervalUnit(ret, unit, amount) { + if (parseInt(amount / ret.num, 10) * ret.num !== amount) + throw new Error(`An integer divider of ${amount} is expected as ${unit} for 'options.interval'`); +} +function checkInterval(value) { + const ret = checkMeasure(value, "interval", intervalUnits); + switch (ret.unit) { + case "h": + checkIntervalUnit(ret, "hours", 24); + break; + case "m": + checkIntervalUnit(ret, "minutes", 60); + break; + case "s": + checkIntervalUnit(ret, "seconds", 60); + break; + } + return ret; +} +var sizeUnits = { B: true, G: true, K: true, M: true }; +function checkSize(value) { + const ret = checkMeasure(value, "size", sizeUnits); + if (ret.unit === "K") + return ret.num * 1024; + if (ret.unit === "M") + return ret.num * 1048576; + if (ret.unit === "G") + return ret.num * 1073741824; + return ret.num; +} +var checks = { + encoding: (type, options, value) => new import_util2.TextDecoder(value), + immutable: () => { + }, + initialRotation: () => { + }, + interval: buildStringCheck("interval", checkInterval), + intervalBoundary: () => { + }, + intervalUTC: () => { + }, + maxFiles: buildNumberCheck("maxFiles"), + maxSize: buildStringCheck("maxSize", checkSize), + mode: () => { + }, + omitExtension: () => { + }, + rotate: buildNumberCheck("rotate"), + size: buildStringCheck("size", checkSize), + teeToStdout: () => { + }, + ...{ + compress: (type, options, value) => { + if (value === false) + return; + if (!value) + throw new Error("A value for 'options.compress' must be specified"); + if (type === "boolean") + return options.compress = (source, dest) => `cat ${source} | gzip -c9 > ${dest}`; + if (type === "function") + return; + if (type !== "string") + throw new Error(`Don't know how to handle 'options.compress' type: ${type}`); + if (value !== "gzip") + throw new Error(`Don't know how to handle compression method: ${value}`); + }, + history: (type) => { + if (type !== "string") + throw new Error(`Don't know how to handle 'options.history' type: ${type}`); + }, + path: (type, options, value) => { + if (type !== "string") + throw new Error(`Don't know how to handle 'options.path' type: ${type}`); + if (value[value.length - 1] !== import_path3.sep) + options.path = value + import_path3.sep; + } + } +}; +function checkOpts(options) { + const ret = {}; + let opt; + for (opt in options) { + const value = options[opt]; + const type = typeof value; + if (!(opt in checks)) + throw new Error(`Unknown option: ${opt}`); + ret[opt] = options[opt]; + checks[opt](type, ret, value); + } + if (!ret.path) + ret.path = ""; + if (!ret.interval) { + delete ret.immutable; + delete ret.initialRotation; + delete ret.intervalBoundary; + delete ret.intervalUTC; + } + if (ret.rotate) { + delete ret.history; + delete ret.immutable; + delete ret.maxFiles; + delete ret.maxSize; + delete ret.intervalBoundary; + delete ret.intervalUTC; + } + if (ret.immutable) + delete ret.compress; + if (!ret.intervalBoundary) + delete ret.initialRotation; + return ret; +} +function createClassical(filename, compress, omitExtension) { + return (index) => index ? `${filename}.${index}${compress && !omitExtension ? ".gz" : ""}` : filename; +} +function createGenerator(filename, compress, omitExtension) { + const pad = (num) => (num > 9 ? "" : "0") + num; + return (time, index) => { + if (!time) + return filename; + const month = time.getFullYear() + "" + pad(time.getMonth() + 1); + const day = pad(time.getDate()); + const hour = pad(time.getHours()); + const minute = pad(time.getMinutes()); + return month + day + "-" + hour + minute + "-" + pad(index) + "-" + filename + (compress && !omitExtension ? ".gz" : ""); + }; +} +function createStream(filename, options) { + if (typeof options === "undefined") + options = {}; + else if (typeof options !== "object") + throw new Error(`The "options" argument must be of type object. Received type ${typeof options}`); + const opts = checkOpts(options); + const { compress, omitExtension } = opts; + let generator; + if (typeof filename === "string") + generator = options.rotate ? createClassical(filename, !!compress, omitExtension) : createGenerator(filename, !!compress, omitExtension); + else if (typeof filename === "function") + generator = filename; + else + throw new Error(`The "filename" argument must be one of type string or function. Received type ${typeof filename}`); + return new RotatingFileStream(generator, opts); +} + +// node_modules/pino-rotating-file-stream/dist/mjs/index.js +var mjs_default = (options) => { + const { filename, size, maxSize, interval, compress, path: path7, ...otherOptions } = options; + return createStream(filename, { + ...otherOptions, + // Set some default values + size: size || "100M", + maxSize: maxSize || "1G", + interval: interval || "7d", + compress: compress || "gzip", + path: path7 + }); +}; + +// src/index.ts +init_constants(); +var import_node_stream3 = __toESM(require("node:stream")); +async function initializeClaudeConfig() { + const homeDir = (0, import_os.homedir)(); + const configPath = (0, import_path4.join)(homeDir, ".claude.json"); + if (!(0, import_fs4.existsSync)(configPath)) { + const userID = Array.from( + { length: 64 }, + () => Math.random().toString(16)[2] + ).join(""); + const configContent = { + numStartups: 184, + autoUpdaterStatus: "enabled", + userID, + hasCompletedOnboarding: true, + lastOnboardingVersion: "1.0.17", + projects: {} + }; + await (0, import_promises4.writeFile)(configPath, JSON.stringify(configContent, null, 2)); + } +} +async function run(options = {}) { + if (isServiceRunning()) { + console.log("\u2705 Service is already running in the background."); + return; + } + await initializeClaudeConfig(); + await initDir(); + await cleanupLogFiles(); + const config = await initConfig(); + configureLogging(config); + let HOST = config.HOST; + if (config.HOST && !config.APIKEY) { + HOST = "127.0.0.1"; + console.warn("\u26A0\uFE0F API key is not set. HOST is forced to 127.0.0.1."); + } + const port = config.PORT || 3456; + savePid(process.pid); + process.on("SIGINT", () => { + console.log("Received SIGINT, cleaning up..."); + cleanupPidFile(); + process.exit(0); + }); + process.on("SIGTERM", () => { + cleanupPidFile(); + process.exit(0); + }); + console.log(HOST); + const servicePort = process.env.SERVICE_PORT ? parseInt(process.env.SERVICE_PORT) : port; + const loggerConfig = config.LOG !== false ? { + level: config.LOG_LEVEL || "debug", + stream: mjs_default({ + path: HOME_DIR, + filename: config.LOGNAME || `./logs/ccr-${+/* @__PURE__ */ new Date()}.log`, + maxFiles: 3, + interval: "1d" + }) + } : false; + const server = createServer({ + jsonPath: CONFIG_FILE, + initialConfig: { + // ...config, + providers: config.Providers || config.providers, + HOST, + PORT: servicePort, + LOG_FILE: (0, import_path4.join)( + (0, import_os.homedir)(), + ".claude-code-router", + "claude-code-router.log" + ) + }, + logger: loggerConfig + }); + server.addHook("preHandler", async (req, reply) => { + return new Promise((resolve, reject) => { + const done = (err) => { + if (err) reject(err); + else resolve(); + }; + apiKeyAuth(config)(req, reply, done).catch(reject); + }); + }); + server.addHook("preHandler", async (req, reply) => { + if (req.url.startsWith("/v1/messages")) { + router(req, reply, config); + } + }); + server.addHook("onSend", (req, reply, payload, done) => { + if (req.sessionId && req.url.startsWith("/v1/messages")) { + if (payload instanceof ReadableStream) { + const [originalStream, clonedStream] = payload.tee(); + const read = async (stream) => { + const reader = stream.getReader(); + while (true) { + const { done: done2, value } = await reader.read(); + if (done2) break; + const dataStr = new TextDecoder().decode(value); + if (!dataStr.startsWith("event: message_delta")) { + continue; + } + const str = dataStr.slice(27); + try { + const message = JSON.parse(str); + sessionUsageCache.put(req.sessionId, message.usage); + } catch { + } + } + }; + read(clonedStream); + done(null, originalStream); + } else { + req.log.debug({ payload }, "onSend Hook"); + sessionUsageCache.put(req.sessionId, payload.usage); + if (payload instanceof Buffer || payload instanceof Response) { + done(null, payload); + } else if (typeof payload === "object") { + done(null, JSON.stringify(payload)); + } else { + done(null, payload); + } + } + } else { + if (payload instanceof Buffer || payload instanceof Response || payload === null || payload instanceof ReadableStream || payload instanceof import_node_stream3.default) { + done(null, payload); + } else if (typeof payload === "object") { + req.log.debug({ payload }, "onSend Hook"); + done(null, JSON.stringify(payload)); + } else { + done(null, payload); + } + } + }); + server.start(); +} + +// src/utils/status.ts +async function showStatus() { + const info = await getServiceInfo(); + console.log("\n\u{1F4CA} Claude Code Router Status"); + console.log("\u2550".repeat(40)); + if (info.running) { + console.log("\u2705 Status: Running"); + console.log(`\u{1F194} Process ID: ${info.pid}`); + console.log(`\u{1F310} Port: ${info.port}`); + console.log(`\u{1F4E1} API Endpoint: ${info.endpoint}`); + console.log(`\u{1F4C4} PID File: ${info.pidFile}`); + console.log(""); + console.log("\u{1F680} Ready to use! Run the following commands:"); + console.log(" ccr code # Start coding with Claude"); + console.log(" ccr stop # Stop the service"); + } else { + console.log("\u274C Status: Not Running"); + console.log(""); + console.log("\u{1F4A1} To start the service:"); + console.log(" ccr start"); + } + console.log(""); +} + +// src/utils/codeCommand.ts +var import_child_process3 = require("child_process"); +init_utils(); + +// src/utils/close.ts +var import_fs5 = require("fs"); +init_constants(); +var import_path5 = require("path"); +async function closeService() { + const PID_FILE2 = (0, import_path5.join)(HOME_DIR, ".claude-code-router.pid"); + if (!isServiceRunning()) { + console.log("No service is currently running."); + return; + } + if (getReferenceCount() > 0) { + return; + } + try { + const pid = parseInt((0, import_fs5.readFileSync)(PID_FILE2, "utf-8")); + process.kill(pid); + cleanupPidFile(); + console.log("claude code router service has been successfully stopped."); + } catch (e) { + console.log("Failed to stop the service. It may have already been stopped."); + cleanupPidFile(); + } +} + +// src/utils/codeCommand.ts +async function executeCodeCommand(args = []) { + const config = await readConfigFile(); + const env = { + ...process.env, + ANTHROPIC_AUTH_TOKEN: config?.APIKEY || "test", + ANTHROPIC_API_KEY: "", + ANTHROPIC_BASE_URL: `http://127.0.0.1:${config.PORT || 3456}`, + API_TIMEOUT_MS: String(config.API_TIMEOUT_MS ?? 6e5) + // Default to 10 minutes if not set + }; + let settingsFlag; + if (config?.StatusLine?.enabled) { + settingsFlag = { + statusLine: { + type: "command", + command: "ccr statusline", + padding: 0 + } + }; + args.push(`--settings=${JSON.stringify(settingsFlag)}`); + } + if (config.NON_INTERACTIVE_MODE) { + env.CI = "true"; + env.FORCE_COLOR = "0"; + env.NODE_NO_READLINE = "1"; + env.TERM = "dumb"; + } + if (config?.ANTHROPIC_SMALL_FAST_MODEL) { + env.ANTHROPIC_SMALL_FAST_MODEL = config.ANTHROPIC_SMALL_FAST_MODEL; + } + incrementReferenceCount(); + const claudePath = config?.CLAUDE_PATH || process.env.CLAUDE_PATH || "claude"; + const joinedArgs = args.length > 0 ? args.map((arg) => `"${arg.replace(/\"/g, '\\"')}"`).join(" ") : ""; + const stdioConfig = config.NON_INTERACTIVE_MODE ? ["pipe", "inherit", "inherit"] : "inherit"; + const claudeProcess = (0, import_child_process3.spawn)( + claudePath + (joinedArgs ? ` ${joinedArgs}` : ""), + [], + { + env, + stdio: stdioConfig, + shell: true + } + ); + if (config.NON_INTERACTIVE_MODE) { + claudeProcess.stdin?.end(); + } + claudeProcess.on("error", (error) => { + console.error("Failed to start claude command:", error.message); + console.log( + "Make sure Claude Code is installed: npm install -g @anthropic-ai/claude-code" + ); + decrementReferenceCount(); + process.exit(1); + }); + claudeProcess.on("close", (code) => { + decrementReferenceCount(); + closeService(); + process.exit(code || 0); + }); +} + +// src/utils/statusline.ts +var import_promises5 = __toESM(require("node:fs/promises")); +var import_child_process4 = require("child_process"); +var import_node_path6 = __toESM(require("node:path")); +init_constants(); +var import_json52 = __toESM(require_lib()); +var COLORS = { + reset: "\x1B[0m", + bold: "\x1B[1m", + dim: "\x1B[2m", + // 标准颜色 + black: "\x1B[30m", + red: "\x1B[31m", + green: "\x1B[32m", + yellow: "\x1B[33m", + blue: "\x1B[34m", + magenta: "\x1B[35m", + cyan: "\x1B[36m", + white: "\x1B[37m", + // 亮色 + bright_black: "\x1B[90m", + bright_red: "\x1B[91m", + bright_green: "\x1B[92m", + bright_yellow: "\x1B[93m", + bright_blue: "\x1B[94m", + bright_magenta: "\x1B[95m", + bright_cyan: "\x1B[96m", + bright_white: "\x1B[97m", + // 背景颜色 + bg_black: "\x1B[40m", + bg_red: "\x1B[41m", + bg_green: "\x1B[42m", + bg_yellow: "\x1B[43m", + bg_blue: "\x1B[44m", + bg_magenta: "\x1B[45m", + bg_cyan: "\x1B[46m", + bg_white: "\x1B[47m", + // 亮背景色 + bg_bright_black: "\x1B[100m", + bg_bright_red: "\x1B[101m", + bg_bright_green: "\x1B[102m", + bg_bright_yellow: "\x1B[103m", + bg_bright_blue: "\x1B[104m", + bg_bright_magenta: "\x1B[105m", + bg_bright_cyan: "\x1B[106m", + bg_bright_white: "\x1B[107m" +}; +var TRUE_COLOR_PREFIX = "\x1B[38;2;"; +function hexToRgb(hex) { + hex = hex.replace(/^#/, "").trim(); + if (hex.length === 3) { + hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; + } + if (hex.length !== 6) { + return null; + } + const r = parseInt(hex.substring(0, 2), 16); + const g = parseInt(hex.substring(2, 4), 16); + const b = parseInt(hex.substring(4, 6), 16); + if (isNaN(r) || isNaN(g) || isNaN(b) || r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) { + return null; + } + return { r, g, b }; +} +function getColorCode(colorName) { + if (colorName.startsWith("#") || /^[0-9a-fA-F]{6}$/.test(colorName) || /^[0-9a-fA-F]{3}$/.test(colorName)) { + const rgb = hexToRgb(colorName); + if (rgb) { + return `${TRUE_COLOR_PREFIX}${rgb.r};${rgb.g};${rgb.b}m`; + } + } + return ""; +} +function replaceVariables(text, variables) { + return text.replace(/\{\{(\w+)\}\}/g, (_match, varName) => { + return variables[varName] || ""; + }); +} +async function executeScript(scriptPath, variables) { + try { + await import_promises5.default.access(scriptPath); + const scriptModule = require(scriptPath); + if (typeof scriptModule === "function") { + const result = scriptModule(variables); + if (result instanceof Promise) { + return await result; + } + return result; + } + if (scriptModule.default && typeof scriptModule.default === "function") { + const result = scriptModule.default(variables); + if (result instanceof Promise) { + return await result; + } + return result; + } + if (typeof scriptModule === "string") { + return scriptModule; + } + if (scriptModule.default && typeof scriptModule.default === "string") { + return scriptModule.default; + } + return ""; + } catch (error) { + console.error(`\u6267\u884C\u811A\u672C ${scriptPath} \u65F6\u51FA\u9519:`, error); + return ""; + } +} +var DEFAULT_THEME = { + modules: [ + { + type: "workDir", + icon: "\u{F024B}", + // nf-md-folder_outline + text: "{{workDirName}}", + color: "bright_blue" + }, + { + type: "gitBranch", + icon: "\uE725", + // nf-dev-git_branch + text: "{{gitBranch}}", + color: "bright_magenta" + }, + { + type: "model", + icon: "\u{F06A9}", + // nf-md-robot_outline + text: "{{model}}", + color: "bright_cyan" + }, + { + type: "usage", + icon: "\u2191", + // 上箭头 + text: "{{inputTokens}}", + color: "bright_green" + }, + { + type: "usage", + icon: "\u2193", + // 下箭头 + text: "{{outputTokens}}", + color: "bright_yellow" + } + ] +}; +var POWERLINE_THEME = { + modules: [ + { + type: "workDir", + icon: "\u{F024B}", + // nf-md-folder_outline + text: "{{workDirName}}", + color: "white", + background: "bg_bright_blue" + }, + { + type: "gitBranch", + icon: "\uE725", + // nf-dev-git_branch + text: "{{gitBranch}}", + color: "white", + background: "bg_bright_magenta" + }, + { + type: "model", + icon: "\u{F06A9}", + // nf-md-robot_outline + text: "{{model}}", + color: "white", + background: "bg_bright_cyan" + }, + { + type: "usage", + icon: "\u2191", + // 上箭头 + text: "{{inputTokens}}", + color: "white", + background: "bg_bright_green" + }, + { + type: "usage", + icon: "\u2193", + // 下箭头 + text: "{{outputTokens}}", + color: "white", + background: "bg_bright_yellow" + } + ] +}; +var SIMPLE_THEME = { + modules: [ + { + type: "workDir", + icon: "", + text: "{{workDirName}}", + color: "bright_blue" + }, + { + type: "gitBranch", + icon: "", + text: "{{gitBranch}}", + color: "bright_magenta" + }, + { + type: "model", + icon: "", + text: "{{model}}", + color: "bright_cyan" + }, + { + type: "usage", + icon: "\u2191", + text: "{{inputTokens}}", + color: "bright_green" + }, + { + type: "usage", + icon: "\u2193", + text: "{{outputTokens}}", + color: "bright_yellow" + } + ] +}; +function formatUsage(input_tokens, output_tokens) { + if (input_tokens > 1e3 || output_tokens > 1e3) { + const inputFormatted = input_tokens > 1e3 ? `${(input_tokens / 1e3).toFixed(1)}k` : `${input_tokens}`; + const outputFormatted = output_tokens > 1e3 ? `${(output_tokens / 1e3).toFixed(1)}k` : `${output_tokens}`; + return `${inputFormatted} ${outputFormatted}`; + } + return `${input_tokens} ${output_tokens}`; +} +async function getProjectThemeConfig() { + try { + const configPath = CONFIG_FILE; + try { + await import_promises5.default.access(configPath); + } catch { + return { theme: null, style: "default" }; + } + const configContent = await import_promises5.default.readFile(configPath, "utf-8"); + const config = import_json52.default.parse(configContent); + if (config.StatusLine) { + const currentStyle = config.StatusLine.currentStyle || "default"; + if (config.StatusLine[currentStyle] && config.StatusLine[currentStyle].modules) { + return { theme: config.StatusLine[currentStyle], style: currentStyle }; + } + } + } catch (error) { + } + return { theme: null, style: "default" }; +} +function shouldUseSimpleTheme() { + if (process.env.USE_SIMPLE_ICONS === "true") { + return true; + } + const term = process.env.TERM || ""; + const unsupportedTerms = ["dumb", "unknown"]; + if (unsupportedTerms.includes(term)) { + return true; + } + return false; +} +function canDisplayNerdFonts() { + if (process.env.USE_SIMPLE_ICONS === "true") { + return false; + } + const fontEnvVars = ["NERD_FONT", "NERDFONT", "FONT"]; + for (const envVar of fontEnvVars) { + const value = process.env[envVar]; + if (value && (value.includes("Nerd") || value.includes("nerd"))) { + return true; + } + } + const termProgram = process.env.TERM_PROGRAM || ""; + const supportedTerminals = ["iTerm.app", "vscode", "Hyper", "kitty", "alacritty"]; + if (supportedTerminals.includes(termProgram)) { + return true; + } + const colorTerm = process.env.COLORTERM || ""; + if (colorTerm.includes("truecolor") || colorTerm.includes("24bit")) { + return true; + } + return process.env.USE_SIMPLE_ICONS !== "true"; +} +async function parseStatusLineData(input) { + try { + const useSimpleTheme = shouldUseSimpleTheme(); + const canDisplayNerd = canDisplayNerdFonts(); + const effectiveTheme = useSimpleTheme || !canDisplayNerd ? SIMPLE_THEME : DEFAULT_THEME; + const { theme: projectTheme, style: currentStyle } = await getProjectThemeConfig(); + const theme = projectTheme || effectiveTheme; + const workDir = input.workspace.current_dir; + let gitBranch = ""; + try { + gitBranch = (0, import_child_process4.execSync)("git branch --show-current", { + cwd: workDir, + stdio: ["pipe", "pipe", "ignore"] + }).toString().trim(); + } catch (error) { + } + const transcriptContent = await import_promises5.default.readFile(input.transcript_path, "utf-8"); + const lines = transcriptContent.trim().split("\n"); + let model = ""; + let inputTokens = 0; + let outputTokens = 0; + for (let i = lines.length - 1; i >= 0; i--) { + try { + const message = JSON.parse(lines[i]); + if (message.type === "assistant" && message.message.model) { + model = message.message.model; + if (message.message.usage) { + inputTokens = message.message.usage.input_tokens; + outputTokens = message.message.usage.output_tokens; + } + break; + } + } catch (parseError) { + continue; + } + } + if (!model) { + try { + const projectConfigPath = import_node_path6.default.join(workDir, ".claude-code-router", "config.json"); + let configPath = projectConfigPath; + try { + await import_promises5.default.access(projectConfigPath); + } catch { + configPath = CONFIG_FILE; + } + const configContent = await import_promises5.default.readFile(configPath, "utf-8"); + const config = import_json52.default.parse(configContent); + if (config.Router && config.Router.default) { + const [, defaultModel] = config.Router.default.split(","); + if (defaultModel) { + model = defaultModel.trim(); + } + } + } catch (configError) { + } + } + if (!model) { + model = input.model.display_name; + } + const workDirName = workDir.split("/").pop() || ""; + const usage = formatUsage(inputTokens, outputTokens); + const [formattedInputTokens, formattedOutputTokens] = usage.split(" "); + const variables = { + workDirName, + gitBranch, + model, + inputTokens: formattedInputTokens, + outputTokens: formattedOutputTokens + }; + const isPowerline = currentStyle === "powerline"; + if (isPowerline) { + return await renderPowerlineStyle(theme, variables); + } else { + return await renderDefaultStyle(theme, variables); + } + } catch (error) { + return ""; + } +} +async function renderDefaultStyle(theme, variables) { + const modules = theme.modules || DEFAULT_THEME.modules; + const parts = []; + for (let i = 0; i < Math.min(modules.length, 5); i++) { + const module2 = modules[i]; + const color = module2.color ? getColorCode(module2.color) : ""; + const background = module2.background ? getColorCode(module2.background) : ""; + const icon = module2.icon || ""; + let text = ""; + if (module2.type === "script" && module2.scriptPath) { + text = await executeScript(module2.scriptPath, variables); + } else { + text = replaceVariables(module2.text, variables); + } + let displayText = ""; + if (icon) { + displayText += `${icon} `; + } + displayText += text; + if (!displayText || !text) { + continue; + } + let part = `${background}${color}`; + part += `${displayText}${COLORS.reset}`; + parts.push(part); + } + return parts.join(" "); +} +var SEP_RIGHT = "\uE0B0"; +var COLOR_MAP = { + // 基础颜色映射到256色 + black: 0, + red: 1, + green: 2, + yellow: 3, + blue: 4, + magenta: 5, + cyan: 6, + white: 7, + bright_black: 8, + bright_red: 9, + bright_green: 10, + bright_yellow: 11, + bright_blue: 12, + bright_magenta: 13, + bright_cyan: 14, + bright_white: 15, + // 亮背景色映射 + bg_black: 0, + bg_red: 1, + bg_green: 2, + bg_yellow: 3, + bg_blue: 4, + bg_magenta: 5, + bg_cyan: 6, + bg_white: 7, + bg_bright_black: 8, + bg_bright_red: 9, + bg_bright_green: 10, + bg_bright_yellow: 11, + bg_bright_blue: 12, + bg_bright_magenta: 13, + bg_bright_cyan: 14, + bg_bright_white: 15, + // 自定义颜色映射 + bg_bright_orange: 202, + bg_bright_purple: 129 +}; +function getTrueColorRgb(colorName) { + if (COLOR_MAP[colorName] !== void 0) { + const color256 = COLOR_MAP[colorName]; + return color256ToRgb(color256); + } + if (colorName.startsWith("#") || /^[0-9a-fA-F]{6}$/.test(colorName) || /^[0-9a-fA-F]{3}$/.test(colorName)) { + return hexToRgb(colorName); + } + if (colorName.startsWith("bg_#")) { + return hexToRgb(colorName.substring(3)); + } + return null; +} +function color256ToRgb(index) { + if (index < 0 || index > 255) return null; + if (index < 16) { + const basicColors = [ + [0, 0, 0], + [128, 0, 0], + [0, 128, 0], + [128, 128, 0], + [0, 0, 128], + [128, 0, 128], + [0, 128, 128], + [192, 192, 192], + [128, 128, 128], + [255, 0, 0], + [0, 255, 0], + [255, 255, 0], + [0, 0, 255], + [255, 0, 255], + [0, 255, 255], + [255, 255, 255] + ]; + return { r: basicColors[index][0], g: basicColors[index][1], b: basicColors[index][2] }; + } else if (index < 232) { + const i = index - 16; + const r = Math.floor(i / 36); + const g = Math.floor(i % 36 / 6); + const b = i % 6; + const rgb = [0, 95, 135, 175, 215, 255]; + return { r: rgb[r], g: rgb[g], b: rgb[b] }; + } else { + const gray = 8 + (index - 232) * 10; + return { r: gray, g: gray, b: gray }; + } +} +function segment(text, textFg, bgColor, nextBgColor) { + const bgRgb = getTrueColorRgb(bgColor); + if (!bgRgb) { + const defaultBlueRgb = { r: 33, g: 150, b: 243 }; + const curBg2 = `\x1B[48;2;${defaultBlueRgb.r};${defaultBlueRgb.g};${defaultBlueRgb.b}m`; + const fgColor2 = `\x1B[38;2;255;255;255m`; + const body2 = `${curBg2}${fgColor2} ${text} \x1B[0m`; + return body2; + } + const curBg = `\x1B[48;2;${bgRgb.r};${bgRgb.g};${bgRgb.b}m`; + let fgRgb = { r: 255, g: 255, b: 255 }; + const textFgRgb = getTrueColorRgb(textFg); + if (textFgRgb) { + fgRgb = textFgRgb; + } + const fgColor = `\x1B[38;2;${fgRgb.r};${fgRgb.g};${fgRgb.b}m`; + const body = `${curBg}${fgColor} ${text} \x1B[0m`; + if (nextBgColor != null) { + const nextBgRgb = getTrueColorRgb(nextBgColor); + if (nextBgRgb) { + const sepCurFg2 = `\x1B[38;2;${bgRgb.r};${bgRgb.g};${bgRgb.b}m`; + const sepNextBg2 = `\x1B[48;2;${nextBgRgb.r};${nextBgRgb.g};${nextBgRgb.b}m`; + const sep3 = `${sepCurFg2}${sepNextBg2}${SEP_RIGHT}\x1B[0m`; + return body + sep3; + } + const sepCurFg = `\x1B[38;2;${bgRgb.r};${bgRgb.g};${bgRgb.b}m`; + const sepNextBg = `\x1B[48;2;0;0;0m`; + const sep2 = `${sepCurFg}${sepNextBg}${SEP_RIGHT}\x1B[0m`; + return body + sep2; + } + return body; +} +async function renderPowerlineStyle(theme, variables) { + const modules = theme.modules || POWERLINE_THEME.modules; + const segments = []; + for (let i = 0; i < Math.min(modules.length, 5); i++) { + const module2 = modules[i]; + const color = module2.color || "white"; + const backgroundName = module2.background || ""; + const icon = module2.icon || ""; + let text = ""; + if (module2.type === "script" && module2.scriptPath) { + text = await executeScript(module2.scriptPath, variables); + } else { + text = replaceVariables(module2.text, variables); + } + let displayText = ""; + if (icon) { + displayText += `${icon} `; + } + displayText += text; + if (!displayText || !text) { + continue; + } + let nextBackground = null; + if (i < modules.length - 1) { + const nextModule = modules[i + 1]; + nextBackground = nextModule.background || null; + } + const actualBackground = backgroundName || "bg_bright_blue"; + const segmentStr = segment(displayText, color, actualBackground, nextBackground); + segments.push(segmentStr); + } + return segments.join(""); +} + +// src/cli.ts +var import_package = __toESM(require_package3()); +var import_child_process5 = require("child_process"); +init_constants(); +var import_fs6 = __toESM(require("fs")); +var import_path6 = require("path"); +var command = process.argv[2]; +var HELP_TEXT = ` +Usage: ccr [command] + +Commands: + start Start server + stop Stop server + restart Restart server + status Show server status + statusline Integrated statusline + code Execute claude command + ui Open the web UI in browser + -v, version Show version information + -h, help Show help information + +Example: + ccr start + ccr code "Write a Hello World" + ccr ui +`; +async function waitForService(timeout = 1e4, initialDelay = 1e3) { + await new Promise((resolve) => setTimeout(resolve, initialDelay)); + const startTime = Date.now(); + while (Date.now() - startTime < timeout) { + if (isServiceRunning()) { + await new Promise((resolve) => setTimeout(resolve, 500)); + return true; + } + await new Promise((resolve) => setTimeout(resolve, 100)); + } + return false; +} +async function main() { + switch (command) { + case "start": + run(); + break; + case "stop": + try { + const pid = parseInt((0, import_fs6.readFileSync)(PID_FILE, "utf-8")); + process.kill(pid); + cleanupPidFile(); + if ((0, import_fs6.existsSync)(REFERENCE_COUNT_FILE)) { + try { + import_fs6.default.unlinkSync(REFERENCE_COUNT_FILE); + } catch (e) { + } + } + console.log( + "claude code router service has been successfully stopped." + ); + } catch (e) { + console.log( + "Failed to stop the service. It may have already been stopped." + ); + cleanupPidFile(); + } + break; + case "status": + await showStatus(); + break; + case "statusline": + let inputData = ""; + process.stdin.setEncoding("utf-8"); + process.stdin.on("readable", () => { + let chunk; + while ((chunk = process.stdin.read()) !== null) { + inputData += chunk; + } + }); + process.stdin.on("end", async () => { + try { + const input = JSON.parse(inputData); + const statusLine = await parseStatusLineData(input); + console.log(statusLine); + } catch (error) { + console.error("Error parsing status line data:", error); + process.exit(1); + } + }); + break; + case "code": + if (!isServiceRunning()) { + console.log("Service not running, starting service..."); + const cliPath2 = (0, import_path6.join)(__dirname, "cli.js"); + const startProcess2 = (0, import_child_process5.spawn)("node", [cliPath2, "start"], { + detached: true, + stdio: "ignore" + }); + startProcess2.on("error", (error) => { + console.error("Failed to start service:", error.message); + process.exit(1); + }); + startProcess2.unref(); + if (await waitForService()) { + const codeArgs = process.argv.slice(3); + executeCodeCommand(codeArgs); + } else { + console.error( + "Service startup timeout, please manually run `ccr start` to start the service" + ); + process.exit(1); + } + } else { + const codeArgs = process.argv.slice(3); + executeCodeCommand(codeArgs); + } + break; + case "ui": + if (!isServiceRunning()) { + console.log("Service not running, starting service..."); + const cliPath2 = (0, import_path6.join)(__dirname, "cli.js"); + const startProcess2 = (0, import_child_process5.spawn)("node", [cliPath2, "start"], { + detached: true, + stdio: "ignore" + }); + startProcess2.on("error", (error) => { + console.error("Failed to start service:", error.message); + process.exit(1); + }); + startProcess2.unref(); + if (!await waitForService()) { + console.log( + "Service startup timeout, trying to start with default configuration..." + ); + const { + initDir: initDir2, + writeConfigFile: writeConfigFile2, + backupConfigFile: backupConfigFile2 + } = (init_utils(), __toCommonJS(utils_exports)); + try { + await initDir2(); + const backupPath = await backupConfigFile2(); + if (backupPath) { + console.log( + `Backed up existing configuration file to ${backupPath}` + ); + } + await writeConfigFile2({ + PORT: 3456, + Providers: [], + Router: {} + }); + console.log( + "Created minimal default configuration file at ~/.claude-code-router/config.json" + ); + console.log( + "Please edit this file with your actual configuration." + ); + const restartProcess = (0, import_child_process5.spawn)("node", [cliPath2, "start"], { + detached: true, + stdio: "ignore" + }); + restartProcess.on("error", (error) => { + console.error( + "Failed to start service with default config:", + error.message + ); + process.exit(1); + }); + restartProcess.unref(); + if (!await waitForService(15e3)) { + console.error( + "Service startup still failing. Please manually run `ccr start` to start the service and check the logs." + ); + process.exit(1); + } + } catch (error) { + console.error( + "Failed to create default configuration:", + error.message + ); + process.exit(1); + } + } + } + const serviceInfo = await getServiceInfo(); + const uiUrl = `${serviceInfo.endpoint}/ui/`; + console.log(`Opening UI at ${uiUrl}`); + const platform = process.platform; + let openCommand = ""; + if (platform === "win32") { + openCommand = `start ${uiUrl}`; + } else if (platform === "darwin") { + openCommand = `open ${uiUrl}`; + } else if (platform === "linux") { + openCommand = `xdg-open ${uiUrl}`; + } else { + console.error("Unsupported platform for opening browser"); + process.exit(1); + } + (0, import_child_process5.exec)(openCommand, (error) => { + if (error) { + console.error("Failed to open browser:", error.message); + process.exit(1); + } + }); + break; + case "-v": + case "version": + console.log(`claude-code-router version: ${import_package.version}`); + break; + case "restart": + try { + const pid = parseInt((0, import_fs6.readFileSync)(PID_FILE, "utf-8")); + process.kill(pid); + cleanupPidFile(); + if ((0, import_fs6.existsSync)(REFERENCE_COUNT_FILE)) { + try { + import_fs6.default.unlinkSync(REFERENCE_COUNT_FILE); + } catch (e) { + } + } + console.log("claude code router service has been stopped."); + } catch (e) { + console.log("Service was not running or failed to stop."); + cleanupPidFile(); + } + console.log("Starting claude code router service..."); + const cliPath = (0, import_path6.join)(__dirname, "cli.js"); + const startProcess = (0, import_child_process5.spawn)("node", [cliPath, "start"], { + detached: true, + stdio: "ignore" + }); + startProcess.on("error", (error) => { + console.error("Failed to start service:", error); + process.exit(1); + }); + startProcess.unref(); + console.log("\u2705 Service started successfully in the background."); + break; + case "-h": + case "help": + console.log(HELP_TEXT); + break; + default: + console.log(HELP_TEXT); + process.exit(1); + } +} +main().catch(console.error); +/*! Bundled license information: + +@fastify/forwarded/index.js: + (*! + * forwarded + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +@fastify/proxy-addr/index.js: + (*! + * proxy-addr + * Copyright(c) 2021 Fastify collaborators + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +toad-cache/dist/toad-cache.cjs: + (** + * toad-cache + * + * @copyright 2024 Igor Savin + * @license MIT + * @version 3.7.0 + *) + +light-my-request/lib/form-data.js: +undici/lib/web/fetch/body.js: + (*! formdata-polyfill. MIT License. Jimmy Wärting *) + +undici/lib/web/websocket/frame.js: + (*! ws. MIT License. Einar Otto Stangvik *) + +escape-html/index.js: + (*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + *) + +@fastify/send/lib/containsDotFile.js: +@fastify/send/lib/contentRange.js: +@fastify/send/lib/createHtmlDocument.js: +@fastify/send/index.js: + (*! + * send + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +@fastify/send/lib/parseBytesRange.js: + (*! + * Based on range-parser + * + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +depd/index.js: + (*! + * depd + * Copyright(c) 2014-2018 Douglas Christopher Wilson + * MIT Licensed + *) + +statuses/index.js: + (*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +toidentifier/index.js: + (*! + * toidentifier + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +http-errors/index.js: + (*! + * http-errors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + +content-disposition/index.js: + (*! + * content-disposition + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +@musistudio/llms/dist/esm/server.mjs: + (*! Bundled license information: + + web-streams-polyfill/dist/ponyfill.es2018.js: + (** + * @license + * web-streams-polyfill v3.3.3 + * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors. + * This code is released under the MIT license. + * SPDX-License-Identifier: MIT + *) + + fetch-blob/index.js: + (*! fetch-blob. MIT License. Jimmy Wärting *) + + formdata-polyfill/esm.min.js: + (*! formdata-polyfill. MIT License. Jimmy Wärting *) + + node-domexception/index.js: + (*! node-domexception. MIT License. Jimmy Wärting *) + + safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + + gtoken/build/cjs/src/index.cjs: + (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *) + *) +*/ diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/dockerfile b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c52bd823f4370197a0afb99898509d4d0f288421 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/dockerfile @@ -0,0 +1,24 @@ +FROM node:20-alpine + +WORKDIR /app + +# Copy all files +COPY . . + +# Install pnpm globally +RUN npm install -g pnpm + +# Install dependencies +RUN pnpm install --frozen-lockfile + +# Fix rollup optional dependencies issue +RUN cd ui && npm install + +# Build the entire project including UI +RUN pnpm run build + +# Expose port +EXPOSE 3456 + +# Start the router service +CMD ["node", "dist/cli.js", "start"] diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/CHANGELOG.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..48dee06a16c8b321b6cbec91a72786ac362b71d7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/CHANGELOG.md @@ -0,0 +1,1735 @@ +# Changelog + +## 0.54.0 (2025-06-11) + +Full Changelog: [sdk-v0.53.0...sdk-v0.54.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.53.0...sdk-v0.54.0) + +### Features + +* **api:** api update ([e923aa1](https://github.com/anthropics/anthropic-sdk-typescript/commit/e923aa1b48b1739def4d5d97756678979b4c01a3)) +* **api:** api update ([4877181](https://github.com/anthropics/anthropic-sdk-typescript/commit/4877181c118ebcf1b5d98ca4bfd26acf5dbdedab)) +* **api:** manual updates ([99b0111](https://github.com/anthropics/anthropic-sdk-typescript/commit/99b0111ec289eb4454c1290f80600d653a5a9c30)) +* **client:** add support for fine-grained-tool-streaming-2025-05-14 ([6b35dd9](https://github.com/anthropics/anthropic-sdk-typescript/commit/6b35dd968b47e6ed486ed6d0a7b8d29cf1928aaf)) + + +### Bug Fixes + +* **client:** deprecate BetaBase64PDFBlock in favor of BetaRequestDocumentBlock ([7fa10db](https://github.com/anthropics/anthropic-sdk-typescript/commit/7fa10db38d56f8839be3a3197b77a4c8f24fa42a)) +* **client:** improve error message in parsing JSON ([7c0cb84](https://github.com/anthropics/anthropic-sdk-typescript/commit/7c0cb8414473ffff3939f105d1bdb92b7d02ab5e)) +* **internal:** revert unintentional changes ([28dccec](https://github.com/anthropics/anthropic-sdk-typescript/commit/28dccec451d0426e7a0afe6de1122e5fddb057f5)) + + +### Chores + +* avoid type error in certain environments ([48c1a41](https://github.com/anthropics/anthropic-sdk-typescript/commit/48c1a4143bf2a6cae73007532e8292922a0b4fb8)) +* **tests:** add testing for invalid json raising ([52260c1](https://github.com/anthropics/anthropic-sdk-typescript/commit/52260c196ab91be10354770362b0e2191607337b)) + +## 0.53.0 (2025-06-04) + +Full Changelog: [sdk-v0.52.0...sdk-v0.53.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.52.0...sdk-v0.53.0) + +### Features + +* **client:** add support for new text_editor_20250429 tool ([e49ebfb](https://github.com/anthropics/anthropic-sdk-typescript/commit/e49ebfb23729c5554796a2ef6b19869d2fb8854e)) + + +### Bug Fixes + +* **client:** correctly track input from server_tool_use input deltas ([4a14253](https://github.com/anthropics/anthropic-sdk-typescript/commit/4a142533c0e56b6cca120b15dc78779000496bc2)) +* **client:** fix link to streaming responses docs ([2ad98be](https://github.com/anthropics/anthropic-sdk-typescript/commit/2ad98be9088517715571438ef0cd577f428b50a4)) +* compat with more runtimes ([3c70ae3](https://github.com/anthropics/anthropic-sdk-typescript/commit/3c70ae35411566ae39428d1b0583fd9fe1b4f2a6)) + + +### Chores + +* adjust eslint.config.mjs ignore pattern ([ab404cf](https://github.com/anthropics/anthropic-sdk-typescript/commit/ab404cfddd74d6203acfb63c8e56c6727ab9ec9a)) +* **ci:** fix release workflow ([7e2e566](https://github.com/anthropics/anthropic-sdk-typescript/commit/7e2e5666b65168e926d32500a73f849e9d61fb17)) +* **deps:** bump eslint-plugin-prettier ([8f973c4](https://github.com/anthropics/anthropic-sdk-typescript/commit/8f973c428734fe37710f46cbbcb2c79a046246d9)) +* **docs:** use top-level-await in example snippets ([b4a60ee](https://github.com/anthropics/anthropic-sdk-typescript/commit/b4a60ee8a6912d7cfb68849b6369124260da69ed)) +* **examples:** show how to pass an authorization token to an MCP server ([340461b](https://github.com/anthropics/anthropic-sdk-typescript/commit/340461b39d9e27e281affda7ff9359c04bde3878)) +* improve publish-npm script --latest tag logic ([4a7bdc0](https://github.com/anthropics/anthropic-sdk-typescript/commit/4a7bdc07f5bbc0da266daaa163319665400318c9)) +* **internal:** codegen related update ([345af47](https://github.com/anthropics/anthropic-sdk-typescript/commit/345af474e599d8083aa473d043061ed64d9bd284)) +* **internal:** codegen related update ([6d924ef](https://github.com/anthropics/anthropic-sdk-typescript/commit/6d924efc8669b6cdadf4bb23612ca08afa3c7885)) +* **internal:** fix readablestream types in node 20 ([b68745b](https://github.com/anthropics/anthropic-sdk-typescript/commit/b68745b6a98aa0f12b9ce2e97d24a0cbed47758e)) +* **internal:** fix release workflows ([a8da56f](https://github.com/anthropics/anthropic-sdk-typescript/commit/a8da56f2ce042804925ec882cbdbe2ba1d66a183)) + + +### Documentation + +* **pagination:** improve naming ([8e62803](https://github.com/anthropics/anthropic-sdk-typescript/commit/8e62803aca24e182bf2202b1ea8ae9c6e3061883)) + +## 0.52.0 (2025-05-22) + +Full Changelog: [sdk-v0.51.0...sdk-v0.52.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.51.0...sdk-v0.52.0) + +### Features + +* **api:** add claude 4 models, files API, code execution tool, MCP connector and more ([769f9da](https://github.com/anthropics/anthropic-sdk-typescript/commit/769f9da91cf4480d1e4aa4bb488d6d9cc2471985)) + + +### Chores + +* **internal:** codegen related update ([2ed236d](https://github.com/anthropics/anthropic-sdk-typescript/commit/2ed236ddb9977a91289c4799692a583f460ce8b6)) +* **internal:** version bump ([8ebaf61](https://github.com/anthropics/anthropic-sdk-typescript/commit/8ebaf616d2e5c6aebc153f19a403dde41ab5a9f1)) + +## 0.51.0 (2025-05-15) + +Full Changelog: [sdk-v0.50.4...sdk-v0.51.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.50.4...sdk-v0.51.0) + +### Features + +* **bedrock:** support skipAuth on Bedrock client to bypass local auth requirements ([b661c5f](https://github.com/anthropics/anthropic-sdk-typescript/commit/b661c5fe4d93fa749de5b7cbbce98dc224a68adc)) + + +### Bug Fixes + +* **bedrock:** support model names with slashes ([cb5fa8a](https://github.com/anthropics/anthropic-sdk-typescript/commit/cb5fa8a8f55ed12382aeb5f09110b0d5fefc46bb)) + + +### Chores + +* **package:** remove engines ([f0378ec](https://github.com/anthropics/anthropic-sdk-typescript/commit/f0378ec0be0cac0b165d169a05548692f8ef3b69)) + +## 0.50.4 (2025-05-12) + +Full Changelog: [sdk-v0.50.3...sdk-v0.50.4](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.50.3...sdk-v0.50.4) + +### Bug Fixes + +* **stream:** correctly accumulate usage ([c55b4f0](https://github.com/anthropics/anthropic-sdk-typescript/commit/c55b4f01cdd545faf93d6f463caef6f6c5839f07)) + +## 0.50.3 (2025-05-09) + +Full Changelog: [sdk-v0.50.2...sdk-v0.50.3](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.50.2...sdk-v0.50.3) + +### Bug Fixes + +* **client:** always overwrite when merging headers ([657912a](https://github.com/anthropics/anthropic-sdk-typescript/commit/657912ad66f86e878291a4cab5436844efbb633b)) +* **client:** always overwrite when merging headers ([bf70c9f](https://github.com/anthropics/anthropic-sdk-typescript/commit/bf70c9f6c8031616cb3927d86272dbcce2158b4e)) + +## 0.50.2 (2025-05-09) + +Full Changelog: [sdk-v0.50.1...sdk-v0.50.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.50.1...sdk-v0.50.2) + +### Bug Fixes + +* **ci:** bump publish workflow to node 20 ([306a081](https://github.com/anthropics/anthropic-sdk-typescript/commit/306a0816c3fe383ae8ac78a43ebb57927597417e)) + + +### Chores + +* **internal:** minor sync ([d89476f](https://github.com/anthropics/anthropic-sdk-typescript/commit/d89476ffacccdf1c30c03bbfac8ae3280a4e8d08)) +* sync repo ([508e385](https://github.com/anthropics/anthropic-sdk-typescript/commit/508e38511c13ba8842065d0dafbc7f462abe0322)) + + +### Documentation + +* update readme ([ef0c60a](https://github.com/anthropics/anthropic-sdk-typescript/commit/ef0c60afc9ebc690c6179466a22d3e26c77f71db)) + +## 0.50.1 (2025-05-09) + +Full Changelog: [sdk-v0.50.0...sdk-v0.50.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.50.0...sdk-v0.50.1) + +## 0.50.0 (2025-05-09) + +Full Changelog: [sdk-v0.41.0...sdk-v0.50.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.41.0...sdk-v0.42.0) + +### Features + +* **api:** adds web search capabilities to the Claude API ([b36623f](https://github.com/anthropics/anthropic-sdk-typescript/commit/b36623f33134e937ba8fc7585ab5fab3b31203ed)) +* **api:** manual updates ([80d5daa](https://github.com/anthropics/anthropic-sdk-typescript/commit/80d5daaff943536fbf300f5f19d7c9922294e837)) +* **api:** manual updates ([3124e2b](https://github.com/anthropics/anthropic-sdk-typescript/commit/3124e2b5fc5d279403f409168186cb08de3b0d13)) +* **client:** add withOptions helper ([caab783](https://github.com/anthropics/anthropic-sdk-typescript/commit/caab78382741526d50e0c6d3a3e2834ac889fbd7)) + + +### Bug Fixes + +* **bedrock,vertex:** update to new SDK version ([cb620bb](https://github.com/anthropics/anthropic-sdk-typescript/commit/cb620bbb60e64f27168f74db7a48ad8c2d5f953e)) +* **client:** send all configured auth headers ([3961628](https://github.com/anthropics/anthropic-sdk-typescript/commit/3961628811d807cc967b9f0f781e55415b578f5d)) +* **internal:** fix file uploads in node 18 jest ([1071b34](https://github.com/anthropics/anthropic-sdk-typescript/commit/1071b342d56a81d375f2b373c649843f800a3ad5)) +* **mcp:** remove unused tools.ts ([4c4d763](https://github.com/anthropics/anthropic-sdk-typescript/commit/4c4d7635bf6c6ef3fd810adefb3a290ad0f59576)) +* **messages:** updates for server tools ([c2709b2](https://github.com/anthropics/anthropic-sdk-typescript/commit/c2709b27b17a5a80daf399b7bfca41b953706d51)) +* update old links ([f33a68a](https://github.com/anthropics/anthropic-sdk-typescript/commit/f33a68abddd29ef8f8fe1a334d7dcd259595c4cb)) +* **vertex,bedrock:** correct build script ([df895a7](https://github.com/anthropics/anthropic-sdk-typescript/commit/df895a7d7cbd51422343fca95ab9f1d58918b2a1)) + + +### Chores + +* **bedrock:** add `skipAuth` option to allow users to let authorization be handled elsewhere ([ee58772](https://github.com/anthropics/anthropic-sdk-typescript/commit/ee587723718109797efa80b020076c43a300f1b9)) +* **bedrock:** bump [@aws-sdk](https://github.com/aws-sdk) dependencies ([ff925db](https://github.com/anthropics/anthropic-sdk-typescript/commit/ff925db987a66950c997ec50b9c55e67152d1945)) +* **bedrock:** bump @aws-sdk/credential-providers ([9f611d6](https://github.com/anthropics/anthropic-sdk-typescript/commit/9f611d6ba8c6b3de02c3183e4f2f42d1540525f0)) +* **ci:** add timeout thresholds for CI jobs ([385f900](https://github.com/anthropics/anthropic-sdk-typescript/commit/385f900ae36892a8c65e2568faf46ce7bb011206)) +* **ci:** only use depot for staging repos ([1f05880](https://github.com/anthropics/anthropic-sdk-typescript/commit/1f058806ccd549aa99194fc8b808ab21c7655bcf)) +* **ci:** run on more branches and use depot runners ([7176150](https://github.com/anthropics/anthropic-sdk-typescript/commit/7176150915334f06ac2ee3ed854ddf6752c1e113)) +* **client:** drop support for EOL node versions ([ffbb2da](https://github.com/anthropics/anthropic-sdk-typescript/commit/ffbb2dac2b9e3b82c57d043dfb279ab95948cbc0)) +* **client:** minor internal fixes ([595678f](https://github.com/anthropics/anthropic-sdk-typescript/commit/595678f2b8588f20d7ca3d9219878a4d72c56c7d)) +* **internal:** codegen related update ([a6ae129](https://github.com/anthropics/anthropic-sdk-typescript/commit/a6ae12953f6f841d4585a8cf8cf03fa24f17d57c)) +* **internal:** fix format script ([9ce30ba](https://github.com/anthropics/anthropic-sdk-typescript/commit/9ce30ba225a37feb50c0089164bbec830ab18a1c)) +* **internal:** formatting fixes ([7bd4594](https://github.com/anthropics/anthropic-sdk-typescript/commit/7bd45941a46703db869161fd0585cd209efc782c)) +* **internal:** improve index signature formatting ([7dc3e19](https://github.com/anthropics/anthropic-sdk-typescript/commit/7dc3e190c854623c030d20530cef2f16798dae50)) +* **internal:** improve node 18 shims ([c6780dd](https://github.com/anthropics/anthropic-sdk-typescript/commit/c6780ddc12282ae1e6796825c713bacf5a50812c)) +* **internal:** reduce CI branch coverage ([464431d](https://github.com/anthropics/anthropic-sdk-typescript/commit/464431d1e57954812b10baa04d12795f4cba6b76)) +* **internal:** refactor utils ([b3dee57](https://github.com/anthropics/anthropic-sdk-typescript/commit/b3dee573e69afe41d1c588e732780b5d370980dd)) +* **internal:** share typescript helpers ([74187db](https://github.com/anthropics/anthropic-sdk-typescript/commit/74187dbc73585c68aa6ae0f05bcba6053d257434)) +* **internal:** upload builds and expand CI branch coverage ([bbda5d3](https://github.com/anthropics/anthropic-sdk-typescript/commit/bbda5d3ccd5c10abbd0727c33c9d63bd366ef557)) +* **perf:** faster base64 decoding ([975795a](https://github.com/anthropics/anthropic-sdk-typescript/commit/975795a61b3067396035621638feb631a7e44dbc)) +* **tests:** improve enum examples ([66cf6d4](https://github.com/anthropics/anthropic-sdk-typescript/commit/66cf6d4d460f93c728aeee069af4f134b853b7d7)) + + +### Documentation + +* **readme:** fix typo ([6f8fce9](https://github.com/anthropics/anthropic-sdk-typescript/commit/6f8fce9cf7a921b0fc7a5cf0aada0ce130667082)) + +## 0.41.0 (2025-05-07) + +Full Changelog: [sdk-v0.40.1...sdk-v0.41.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.40.1...sdk-v0.41.0) + +### Features + +* **api:** adds web search capabilities to the Claude API ([fae7e52](https://github.com/anthropics/anthropic-sdk-typescript/commit/fae7e521568d9659e376d13c4e4a6c320b13b1d4)) + + +### Chores + +* **ci:** bump node version for release workflows ([3502747](https://github.com/anthropics/anthropic-sdk-typescript/commit/350274792ed3d9b7ea237ee60876883373344016)) + + +### Documentation + +* add examples to tsdocs ([19a9285](https://github.com/anthropics/anthropic-sdk-typescript/commit/19a928512b1616f2cac9c82f02e7bd9a158dab95)) +* **readme:** fix typo ([735574e](https://github.com/anthropics/anthropic-sdk-typescript/commit/735574e23b7956cbfd0c05d0374079391d5d4e96)) + +## 0.40.1 (2025-04-28) + +Full Changelog: [sdk-v0.40.0...sdk-v0.40.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.40.0...sdk-v0.40.1) + +### Chores + +* **bedrock:** bump [@aws-sdk](https://github.com/aws-sdk) dependencies ([6440e1d](https://github.com/anthropics/anthropic-sdk-typescript/commit/6440e1db992779aeead231b420a55002ec0991d1)) + +## 0.40.0 (2025-04-25) + +Full Changelog: [sdk-v0.39.0...sdk-v0.40.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.39.0...sdk-v0.40.0) + +### Features + +* add SKIP_BREW env var to ./scripts/bootstrap ([#710](https://github.com/anthropics/anthropic-sdk-typescript/issues/710)) ([1b8376a](https://github.com/anthropics/anthropic-sdk-typescript/commit/1b8376aac5475e1bb6b5f79c7c5684ab77908c1f)) +* **api:** extract ContentBlockDelta events into their own schemas ([#732](https://github.com/anthropics/anthropic-sdk-typescript/issues/732)) ([fd0ec83](https://github.com/anthropics/anthropic-sdk-typescript/commit/fd0ec836ab9244c05b913a68224f806b4ac8da60)) +* **api:** manual updates ([39b64c9](https://github.com/anthropics/anthropic-sdk-typescript/commit/39b64c96679efa08e9220c6c3ecff297c6aa8b7c)) +* **api:** manual updates ([771e05b](https://github.com/anthropics/anthropic-sdk-typescript/commit/771e05b24690dbda1d2118f10fd19304db4f0826)) +* **api:** manual updates ([ca6dbd6](https://github.com/anthropics/anthropic-sdk-typescript/commit/ca6dbd6b1588b94da6d1763cb52f54cc42aacaa1)) +* **api:** manual updates ([14df8cc](https://github.com/anthropics/anthropic-sdk-typescript/commit/14df8cce890993e7056dfe5432f86b53faf7a044)) +* **client:** accept RFC6838 JSON content types ([#713](https://github.com/anthropics/anthropic-sdk-typescript/issues/713)) ([fc32787](https://github.com/anthropics/anthropic-sdk-typescript/commit/fc3278702b3d27f792006e9710432f612e856af1)) +* **mcp:** allow opt-in mcp resources and endpoints ([#720](https://github.com/anthropics/anthropic-sdk-typescript/issues/720)) ([9f3a54e](https://github.com/anthropics/anthropic-sdk-typescript/commit/9f3a54e868feb78e63a4593aae3b7fffc4ce588f)) + + +### Bug Fixes + +* **api:** improve type resolution when importing as a package ([#738](https://github.com/anthropics/anthropic-sdk-typescript/issues/738)) ([8992ed4](https://github.com/anthropics/anthropic-sdk-typescript/commit/8992ed4b8fa3ce7216c0d8414b79ad71adefdf42)) +* avoid type error in certain environments ([#723](https://github.com/anthropics/anthropic-sdk-typescript/issues/723)) ([208fdaf](https://github.com/anthropics/anthropic-sdk-typescript/commit/208fdaf0e00ab4cb12c0172cda870f3f1e13098c)) +* **client:** deduplicate stop reason type ([#726](https://github.com/anthropics/anthropic-sdk-typescript/issues/726)) ([2d7cef1](https://github.com/anthropics/anthropic-sdk-typescript/commit/2d7cef14ecdb0501deac02ca270b355ffa5275f2)) +* **client:** send `X-Stainless-Timeout` in seconds ([#733](https://github.com/anthropics/anthropic-sdk-typescript/issues/733)) ([cae4f77](https://github.com/anthropics/anthropic-sdk-typescript/commit/cae4f77474a84d2ce81b890dfb39d3b28c8b5834)) +* **client:** send all configured auth headers ([#742](https://github.com/anthropics/anthropic-sdk-typescript/issues/742)) ([86708b4](https://github.com/anthropics/anthropic-sdk-typescript/commit/86708b496558fe52d46bd6a77f705273fad374b1)) +* **exports:** ensure resource imports don't require /index ([#717](https://github.com/anthropics/anthropic-sdk-typescript/issues/717)) ([56b2a80](https://github.com/anthropics/anthropic-sdk-typescript/commit/56b2a80145999256d4c075cf48be891df7832aad)) +* **internal:** work around https://github.com/vercel/next.js/issues/76881 ([#727](https://github.com/anthropics/anthropic-sdk-typescript/issues/727)) ([36ea0ef](https://github.com/anthropics/anthropic-sdk-typescript/commit/36ea0efd017d48931b3954034744234aec084a42)) +* **mcp:** remove unused tools.ts ([#740](https://github.com/anthropics/anthropic-sdk-typescript/issues/740)) ([26793e7](https://github.com/anthropics/anthropic-sdk-typescript/commit/26793e7fe5a7c03d5adac69564a588e5a030c01c)) +* remove duplicate exports ([2df4cdd](https://github.com/anthropics/anthropic-sdk-typescript/commit/2df4cdd6f3a4f35a858fde57ce6327c50d3319d8)) + + +### Chores + +* add hash of OpenAPI spec/config inputs to .stats.yml ([#725](https://github.com/anthropics/anthropic-sdk-typescript/issues/725)) ([271be7d](https://github.com/anthropics/anthropic-sdk-typescript/commit/271be7d6d3cc615df3c8c48d4e1fb907d286df62)) +* **bedrock:** bump @aws-sdk/credential-providers ([a4d88d7](https://github.com/anthropics/anthropic-sdk-typescript/commit/a4d88d7807e2cf1a0836dc05d9deff5bfc0c665f)) +* **ci:** add timeout thresholds for CI jobs ([1080c70](https://github.com/anthropics/anthropic-sdk-typescript/commit/1080c704f2e6c08d396aec7e3782c86c705cfe49)) +* **ci:** only use depot for staging repos ([359dafa](https://github.com/anthropics/anthropic-sdk-typescript/commit/359dafae718f626d1b0883fb40c0df3421d5939c)) +* **ci:** run on more branches and use depot runners ([3331315](https://github.com/anthropics/anthropic-sdk-typescript/commit/333131560d0e1557e037fbc2bc7b60b74d0c3fed)) +* **client:** minor internal fixes ([fcf3e35](https://github.com/anthropics/anthropic-sdk-typescript/commit/fcf3e3559692d09e5b5568a6cfa90c342bb33c60)) +* **internal:** add aliases for Record and Array ([#735](https://github.com/anthropics/anthropic-sdk-typescript/issues/735)) ([e0a4bec](https://github.com/anthropics/anthropic-sdk-typescript/commit/e0a4becfdd79898b1187b50b18bb5a082e67c7cd)) +* **internal:** add back release workflow ([68d54e5](https://github.com/anthropics/anthropic-sdk-typescript/commit/68d54e5540bf5cc9c9bf21c8e21a3d7225e17bba)) +* **internal:** codegen related update ([#737](https://github.com/anthropics/anthropic-sdk-typescript/issues/737)) ([2a368bb](https://github.com/anthropics/anthropic-sdk-typescript/commit/2a368bbb8d13d409116881ece456af3c36998c8f)) +* **internal:** fix lint ([2cf3641](https://github.com/anthropics/anthropic-sdk-typescript/commit/2cf3641681fdfc01bd8ffbb7154d2ebcb5d8a8d3)) +* **internal:** import ordering changes ([#708](https://github.com/anthropics/anthropic-sdk-typescript/issues/708)) ([a5680e1](https://github.com/anthropics/anthropic-sdk-typescript/commit/a5680e1466a6ea1bed0ddc4c880dd4e342ea1350)) +* **internal:** improve index signature formatting ([#739](https://github.com/anthropics/anthropic-sdk-typescript/issues/739)) ([627c5fa](https://github.com/anthropics/anthropic-sdk-typescript/commit/627c5fadfb1a0b84dd4715d96cb9234607952957)) +* **internal:** reduce CI branch coverage ([6ed0bd6](https://github.com/anthropics/anthropic-sdk-typescript/commit/6ed0bd6fa8e3076ff908a1cd1cec3f110afef431)) +* **internal:** remove CI condition ([#730](https://github.com/anthropics/anthropic-sdk-typescript/issues/730)) ([cc31518](https://github.com/anthropics/anthropic-sdk-typescript/commit/cc3151809070c885450f0884fb5120e0276e2d66)) +* **internal:** remove extra empty newlines ([#716](https://github.com/anthropics/anthropic-sdk-typescript/issues/716)) ([4d3c024](https://github.com/anthropics/anthropic-sdk-typescript/commit/4d3c02496ee09625fbcb5da545e90faa3890a885)) +* **internal:** update config ([#728](https://github.com/anthropics/anthropic-sdk-typescript/issues/728)) ([ababd80](https://github.com/anthropics/anthropic-sdk-typescript/commit/ababd809519fb31ae82395c77b997fd76a3d804e)) +* **internal:** upload builds and expand CI branch coverage ([#744](https://github.com/anthropics/anthropic-sdk-typescript/issues/744)) ([0b7432a](https://github.com/anthropics/anthropic-sdk-typescript/commit/0b7432a3f1088f36ae4c45f99872d18ad9167d80)) +* **tests:** improve enum examples ([#743](https://github.com/anthropics/anthropic-sdk-typescript/issues/743)) ([c1c93a7](https://github.com/anthropics/anthropic-sdk-typescript/commit/c1c93a7ecf17b4cd1956344678d325b36fafd598)) + +## 0.39.0 (2025-02-28) + +Full Changelog: [sdk-v0.38.0...sdk-v0.39.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.38.0...sdk-v0.39.0) + +### Features + +* **api:** add support for disabling tool calls ([#701](https://github.com/anthropics/anthropic-sdk-typescript/issues/701)) ([1602b51](https://github.com/anthropics/anthropic-sdk-typescript/commit/1602b5156432d587c3fd55abb719cab98ef50928)) + + +### Documentation + +* update URLs from stainlessapi.com to stainless.com ([#699](https://github.com/anthropics/anthropic-sdk-typescript/issues/699)) ([05e33b7](https://github.com/anthropics/anthropic-sdk-typescript/commit/05e33b7f5fbcc2adacd2c3ab1d4c7806ea7d40fd)) + +## 0.38.0 (2025-02-27) + +Full Changelog: [sdk-v0.37.0...sdk-v0.38.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.37.0...sdk-v0.38.0) + +### Features + +* **api:** add URL source blocks for images and PDFs ([#698](https://github.com/anthropics/anthropic-sdk-typescript/issues/698)) ([16e7336](https://github.com/anthropics/anthropic-sdk-typescript/commit/16e7336ca99f261ab21efabfadc927f3e3c34198)) + + +### Chores + +* **internal:** update spec ([#692](https://github.com/anthropics/anthropic-sdk-typescript/issues/692)) ([142f221](https://github.com/anthropics/anthropic-sdk-typescript/commit/142f221d364c7450f3397563f59e56f8d9a41e02)) + + +### Documentation + +* add thinking examples ([db6f761](https://github.com/anthropics/anthropic-sdk-typescript/commit/db6f761007b29b2ace293723f20728ad31b316dd)) + +## 0.37.0 (2025-02-24) + +Full Changelog: [sdk-v0.36.3...sdk-v0.37.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.36.3...sdk-v0.37.0) + +### Features + +* **api:** add claude-3.7 + support for thinking ([ffab311](https://github.com/anthropics/anthropic-sdk-typescript/commit/ffab3113ddb042951a35d71e571727f8cce184ee)) +* **client:** send `X-Stainless-Timeout` header ([#679](https://github.com/anthropics/anthropic-sdk-typescript/issues/679)) ([1172430](https://github.com/anthropics/anthropic-sdk-typescript/commit/1172430c87ba42acd2e16f4960247fe4003641a5)) +* **pagination:** avoid fetching when has_more: false ([#680](https://github.com/anthropics/anthropic-sdk-typescript/issues/680)) ([d4df248](https://github.com/anthropics/anthropic-sdk-typescript/commit/d4df248ff4eafa15b5f4b21b3da69d1a710052fa)) + + +### Bug Fixes + +* **client:** fix export map for index exports ([#684](https://github.com/anthropics/anthropic-sdk-typescript/issues/684)) ([56d9c7a](https://github.com/anthropics/anthropic-sdk-typescript/commit/56d9c7ab269af132d2ac374b6b7b9e5e523e0720)) +* correctly decode multi-byte characters over multiple chunks ([#681](https://github.com/anthropics/anthropic-sdk-typescript/issues/681)) ([e369e3d](https://github.com/anthropics/anthropic-sdk-typescript/commit/e369e3d650f2d761c3479935502615cab2a42b8d)) +* optimize sse chunk reading off-by-one error ([#686](https://github.com/anthropics/anthropic-sdk-typescript/issues/686)) ([53669af](https://github.com/anthropics/anthropic-sdk-typescript/commit/53669af8507c503dfd109ea34896dd018fbb1fc8)) + + +### Chores + +* **api:** update openapi spec url ([#678](https://github.com/anthropics/anthropic-sdk-typescript/issues/678)) ([84401b1](https://github.com/anthropics/anthropic-sdk-typescript/commit/84401b1068a11ae241a03643d32c459d837a82c6)) +* **internal:** add missing return type annotation ([#685](https://github.com/anthropics/anthropic-sdk-typescript/issues/685)) ([a8862b9](https://github.com/anthropics/anthropic-sdk-typescript/commit/a8862b9d39f688707ecf2142b002aa27a3cbd09b)) +* **internal:** fix devcontainers setup ([#689](https://github.com/anthropics/anthropic-sdk-typescript/issues/689)) ([8665946](https://github.com/anthropics/anthropic-sdk-typescript/commit/8665946ded8472e892301449569aae30613175fa)) +* **internal:** reorder model constants ([#676](https://github.com/anthropics/anthropic-sdk-typescript/issues/676)) ([52a2a11](https://github.com/anthropics/anthropic-sdk-typescript/commit/52a2a11467e4c117b50516104eb9b29aca86e232)) +* **internal:** update models used in tests ([52a2a11](https://github.com/anthropics/anthropic-sdk-typescript/commit/52a2a11467e4c117b50516104eb9b29aca86e232)) + +## 0.36.3 (2025-01-27) + +Full Changelog: [sdk-v0.36.2...sdk-v0.36.3](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.36.2...sdk-v0.36.3) + +### Bug Fixes + +* **streaming:** accumulate citations ([#675](https://github.com/anthropics/anthropic-sdk-typescript/issues/675)) ([522118f](https://github.com/anthropics/anthropic-sdk-typescript/commit/522118ffeab327e8476f12d9b9fa1f19042ed714)) + + +### Chores + +* **docs:** updates ([#673](https://github.com/anthropics/anthropic-sdk-typescript/issues/673)) ([751ecd0](https://github.com/anthropics/anthropic-sdk-typescript/commit/751ecd0d44707b21ccb390c81716937fae3d8e35)) + +## 0.36.2 (2025-01-23) + +Full Changelog: [sdk-v0.36.1...sdk-v0.36.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.36.1...sdk-v0.36.2) + +### Bug Fixes + +* **bedrock:** update streaming util import ([255c059](https://github.com/anthropics/anthropic-sdk-typescript/commit/255c0599e333e6fae582255e3b0631538b168c69)) + +## 0.36.1 (2025-01-23) + +Full Changelog: [sdk-v0.36.0...sdk-v0.36.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.36.0...sdk-v0.36.1) + +### Chores + +* **tests:** fix types ([9efe3ee](https://github.com/anthropics/anthropic-sdk-typescript/commit/9efe3eebf64bd762a34caf362a1cd1a0f0858f92)) + +## 0.36.0 (2025-01-23) + +Full Changelog: [sdk-v0.35.0...sdk-v0.36.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.35.0...sdk-v0.36.0) + +### Features + +* **api:** add citations ([#668](https://github.com/anthropics/anthropic-sdk-typescript/issues/668)) ([1fef177](https://github.com/anthropics/anthropic-sdk-typescript/commit/1fef17749adbbeb243480b96c04941be29c0746c)) +* **client:** support results endpoint ([#666](https://github.com/anthropics/anthropic-sdk-typescript/issues/666)) ([db5fffe](https://github.com/anthropics/anthropic-sdk-typescript/commit/db5fffeb38a99a3e9283ebf001fbf767d756162e)) +* **stream:** expose `response` property as well ([b0235c7](https://github.com/anthropics/anthropic-sdk-typescript/commit/b0235c7b3ac174b3c8e670e381b4aa038e61c826)) + + +### Chores + +* **bedrock:** bump dependency on @anthropic-ai/sdk ([8745ca2](https://github.com/anthropics/anthropic-sdk-typescript/commit/8745ca2160f5af4d89e5732a44e560c5e2787aa8)) +* **internal:** fix import ([628b55e](https://github.com/anthropics/anthropic-sdk-typescript/commit/628b55ef5ff8f0245287ecaea688480a0174e2e9)) +* **internal:** minor restructuring ([#664](https://github.com/anthropics/anthropic-sdk-typescript/issues/664)) ([57aefa7](https://github.com/anthropics/anthropic-sdk-typescript/commit/57aefa73230d54da24d787a89adc277481986d02)) +* **vertex:** bump dependency on @anthropic-ai/sdk ([a1c7fcd](https://github.com/anthropics/anthropic-sdk-typescript/commit/a1c7fcdce081f860cbb1148c3862e3303ddb8a62)) + +## 0.35.0 (2025-01-21) + +Full Changelog: [sdk-v0.34.0...sdk-v0.35.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.34.0...sdk-v0.35.0) + +### Features + +* add beta message streaming helpers ([#655](https://github.com/anthropics/anthropic-sdk-typescript/issues/655)) ([d7b5af1](https://github.com/anthropics/anthropic-sdk-typescript/commit/d7b5af1629dbcefdb7bfdca271ab497567830227)) +* **stream:** add `.withResponse()` ([#654](https://github.com/anthropics/anthropic-sdk-typescript/issues/654)) ([b54477f](https://github.com/anthropics/anthropic-sdk-typescript/commit/b54477f20c92db4c2c5ed89af5d46c36b035bf1e)) +* **streaming:** add `.request_id` getter ([4572478](https://github.com/anthropics/anthropic-sdk-typescript/commit/4572478266a67e12e32ffef69817cbc495943b1d)) + + +### Bug Fixes + +* **docs:** correct results return type ([#657](https://github.com/anthropics/anthropic-sdk-typescript/issues/657)) ([4e6d031](https://github.com/anthropics/anthropic-sdk-typescript/commit/4e6d031a41625ebf9c4311638e0c149179fcae0c)) +* **examples:** add token counting example ([2498e2e](https://github.com/anthropics/anthropic-sdk-typescript/commit/2498e2eaf49d66a664ed1fdcd7bbd331979cf5b2)) +* send correct Accept header for certain endpoints ([#651](https://github.com/anthropics/anthropic-sdk-typescript/issues/651)) ([17ffaeb](https://github.com/anthropics/anthropic-sdk-typescript/commit/17ffaeba5af48d13b08483973b82cfe1ae79347f)) +* **vertex:** add beta.messages.countTokens method ([51d3f23](https://github.com/anthropics/anthropic-sdk-typescript/commit/51d3f23a7cc1bea798cc8e4041e08114ebc3a4eb)) + + +### Chores + +* deprecate more models ([661f5f9](https://github.com/anthropics/anthropic-sdk-typescript/commit/661f5f9d9b24f3661df246dcf101dd9812b3e19e)) +* **internal:** add test ([#660](https://github.com/anthropics/anthropic-sdk-typescript/issues/660)) ([3ec7d1a](https://github.com/anthropics/anthropic-sdk-typescript/commit/3ec7d1a9eea30255b24cdb16c1a26705bdfea0ac)) +* **internal:** temporary revert commit ([#643](https://github.com/anthropics/anthropic-sdk-typescript/issues/643)) ([43dd43c](https://github.com/anthropics/anthropic-sdk-typescript/commit/43dd43c4c8ab69d5a60e59473af7dff5f7799048)) +* **internal:** update examples ([#649](https://github.com/anthropics/anthropic-sdk-typescript/issues/649)) ([036a239](https://github.com/anthropics/anthropic-sdk-typescript/commit/036a239800fec7e6cbc439f125101d5475eae5b3)) +* **types:** add `| undefined` to client options properties ([#656](https://github.com/anthropics/anthropic-sdk-typescript/issues/656)) ([d642298](https://github.com/anthropics/anthropic-sdk-typescript/commit/d642298334529ff95b9d7ac497d548a6b04dbcfb)) + + +### Documentation + +* **readme:** fix misplaced period ([#650](https://github.com/anthropics/anthropic-sdk-typescript/issues/650)) ([8754744](https://github.com/anthropics/anthropic-sdk-typescript/commit/87547448c8b4bf69a61756af1f12927f33b68680)) +* **readme:** fix Request IDs example ([#659](https://github.com/anthropics/anthropic-sdk-typescript/issues/659)) ([6d3162d](https://github.com/anthropics/anthropic-sdk-typescript/commit/6d3162da1ddb964b75e575376f278468ba1ed9f5)) + +## 0.34.0 (2024-12-20) + +Full Changelog: [sdk-v0.33.1...sdk-v0.34.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.33.1...sdk-v0.34.0) + +### Features + +* **api:** add message batch delete endpoint ([#640](https://github.com/anthropics/anthropic-sdk-typescript/issues/640)) ([54f7e1f](https://github.com/anthropics/anthropic-sdk-typescript/commit/54f7e1ffb9a2956ee27a4a715b84717aa681eb7c)) + + +### Bug Fixes + +* **client:** normalize method ([#639](https://github.com/anthropics/anthropic-sdk-typescript/issues/639)) ([384bb04](https://github.com/anthropics/anthropic-sdk-typescript/commit/384bb042dd854ed753c6bd8e25f522d0e042bfbf)) + + +### Chores + +* bump testing data uri ([#637](https://github.com/anthropics/anthropic-sdk-typescript/issues/637)) ([3f23530](https://github.com/anthropics/anthropic-sdk-typescript/commit/3f23530fb55d9fec7278967ea02600e44e9f58e2)) +* **internal:** temporary revert commit ([#643](https://github.com/anthropics/anthropic-sdk-typescript/issues/643)) ([8057b1e](https://github.com/anthropics/anthropic-sdk-typescript/commit/8057b1eb67ccccee042a45f2efe53cccced15682)) + + +### Documentation + +* minor formatting changes ([#641](https://github.com/anthropics/anthropic-sdk-typescript/issues/641)) ([8b362ee](https://github.com/anthropics/anthropic-sdk-typescript/commit/8b362ee72954b31b4de920b35aed97255efa5e2e)) +* **readme:** add alpha callout ([#646](https://github.com/anthropics/anthropic-sdk-typescript/issues/646)) ([640304c](https://github.com/anthropics/anthropic-sdk-typescript/commit/640304c7c7e8bc67cbf799a646169736d89ad4c8)) + +## 0.33.1 (2024-12-17) + +Full Changelog: [sdk-v0.33.0...sdk-v0.33.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.33.0...sdk-v0.33.1) + +### Bug Fixes + +* **vertex:** remove `anthropic_version` deletion for token counting ([88221be](https://github.com/anthropics/anthropic-sdk-typescript/commit/88221be305d6e13ccf92e6e9cdb00daba45b57db)) + + +### Chores + +* **internal:** fix some typos ([#633](https://github.com/anthropics/anthropic-sdk-typescript/issues/633)) ([a0298f5](https://github.com/anthropics/anthropic-sdk-typescript/commit/a0298f5f67b8ecd25de416dbb3eada68b86befd7)) + +## 0.33.0 (2024-12-17) + +Full Changelog: [sdk-v0.32.1...sdk-v0.33.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.32.1...sdk-v0.33.0) + +### Features + +* **api:** general availability updates ([93d1316](https://github.com/anthropics/anthropic-sdk-typescript/commit/93d13168f950b2cdfc3b7c6664205b06418fea79)) +* **api:** general availability updates ([#631](https://github.com/anthropics/anthropic-sdk-typescript/issues/631)) ([b5c92e5](https://github.com/anthropics/anthropic-sdk-typescript/commit/b5c92e5b74c370ac3f9ba28e915bd54588a42be0)) +* **client:** add ._request_id property to object responses ([#596](https://github.com/anthropics/anthropic-sdk-typescript/issues/596)) ([9d6d584](https://github.com/anthropics/anthropic-sdk-typescript/commit/9d6d58430a216df9888434158bf628ae4b067aba)) +* **internal:** make git install file structure match npm ([#617](https://github.com/anthropics/anthropic-sdk-typescript/issues/617)) ([d3dd7d5](https://github.com/anthropics/anthropic-sdk-typescript/commit/d3dd7d5f8cad460dd18725d5c0f3c8db3f00115d)) +* **vertex:** support token counting ([9e76b4d](https://github.com/anthropics/anthropic-sdk-typescript/commit/9e76b4dc22d62b1239b382bb771b69ad8cff9442)) + + +### Bug Fixes + +* **docs:** add missing await to pagination example ([#609](https://github.com/anthropics/anthropic-sdk-typescript/issues/609)) ([e303077](https://github.com/anthropics/anthropic-sdk-typescript/commit/e303077ebab73c41adee7d25375b767c3fc78998)) +* **types:** remove anthropic-instant-1.2 model ([#599](https://github.com/anthropics/anthropic-sdk-typescript/issues/599)) ([e222a4d](https://github.com/anthropics/anthropic-sdk-typescript/commit/e222a4d0518aa80671c66ee2a25d87dc87a51316)) + + +### Chores + +* **api:** update spec version ([#607](https://github.com/anthropics/anthropic-sdk-typescript/issues/607)) ([ea44f9a](https://github.com/anthropics/anthropic-sdk-typescript/commit/ea44f9ac49dcc25a5dfa53880ebf61318ee90f6c)) +* **api:** update spec version ([#629](https://github.com/anthropics/anthropic-sdk-typescript/issues/629)) ([a25295c](https://github.com/anthropics/anthropic-sdk-typescript/commit/a25295cd6db7b57162fdd9049eb8a3c37bb94f08)) +* **bedrock,vertex:** remove unsupported countTokens method ([#597](https://github.com/anthropics/anthropic-sdk-typescript/issues/597)) ([17b7da5](https://github.com/anthropics/anthropic-sdk-typescript/commit/17b7da5ee6f35ea2bdd53a66a662871affae6341)) +* **bedrock:** remove unsupported methods ([6458dc1](https://github.com/anthropics/anthropic-sdk-typescript/commit/6458dc14544c16240a6580a21a36fcf5bde594b2)) +* **ci:** remove unneeded workflow ([#594](https://github.com/anthropics/anthropic-sdk-typescript/issues/594)) ([7572e48](https://github.com/anthropics/anthropic-sdk-typescript/commit/7572e48dbccb2090562399c7ff2d01503c86f445)) +* **client:** drop unused devDependency ([#610](https://github.com/anthropics/anthropic-sdk-typescript/issues/610)) ([5d0d523](https://github.com/anthropics/anthropic-sdk-typescript/commit/5d0d523390d8c34cae836c423940b67defb9d2aa)) +* improve browser error message ([#613](https://github.com/anthropics/anthropic-sdk-typescript/issues/613)) ([c26121e](https://github.com/anthropics/anthropic-sdk-typescript/commit/c26121e84039b7430995b6363876ea9795ba31ed)) +* **internal:** bump cross-spawn to v7.0.6 ([#624](https://github.com/anthropics/anthropic-sdk-typescript/issues/624)) ([e58ba9a](https://github.com/anthropics/anthropic-sdk-typescript/commit/e58ba9a177ec5c8545fd3a3f4fd3d2e7c722f023)) +* **internal:** remove unnecessary getRequestClient function ([#623](https://github.com/anthropics/anthropic-sdk-typescript/issues/623)) ([882c45f](https://github.com/anthropics/anthropic-sdk-typescript/commit/882c45f5a0bd1f4b996d59e6589a205c2111f46b)) +* **internal:** update isAbsoluteURL ([#627](https://github.com/anthropics/anthropic-sdk-typescript/issues/627)) ([2528ea0](https://github.com/anthropics/anthropic-sdk-typescript/commit/2528ea0dcfc83f38e76b58eaadaa5e8c5c0b188d)) +* **internal:** update spec ([#630](https://github.com/anthropics/anthropic-sdk-typescript/issues/630)) ([82cac06](https://github.com/anthropics/anthropic-sdk-typescript/commit/82cac065e2711467773c0ea62848cdf139ed5a11)) +* **internal:** use reexports not destructuring ([#604](https://github.com/anthropics/anthropic-sdk-typescript/issues/604)) ([e4daff2](https://github.com/anthropics/anthropic-sdk-typescript/commit/e4daff2b6a3fb42876ebd06ed4947c88cff919d8)) +* remove redundant word in comment ([#615](https://github.com/anthropics/anthropic-sdk-typescript/issues/615)) ([ef57a10](https://github.com/anthropics/anthropic-sdk-typescript/commit/ef57a103bcfc922a724a7c878f970dbd369b305e)) +* **tests:** limit array example length ([#611](https://github.com/anthropics/anthropic-sdk-typescript/issues/611)) ([91dc181](https://github.com/anthropics/anthropic-sdk-typescript/commit/91dc1812db2cc9e1f4660a13106bad932518b7cf)) +* **types:** nicer error class types + jsdocs ([#626](https://github.com/anthropics/anthropic-sdk-typescript/issues/626)) ([0287993](https://github.com/anthropics/anthropic-sdk-typescript/commit/0287993912ef81bd2c49603d120f49f4f979d75e)) + + +### Documentation + +* remove suggestion to use `npm` call out ([#614](https://github.com/anthropics/anthropic-sdk-typescript/issues/614)) ([6369261](https://github.com/anthropics/anthropic-sdk-typescript/commit/6369261e3597351f17b8f1a3945ca56b00eba177)) +* use latest sonnet in example snippets ([#625](https://github.com/anthropics/anthropic-sdk-typescript/issues/625)) ([f70882b](https://github.com/anthropics/anthropic-sdk-typescript/commit/f70882b0e8119a414b01b9f0b85fbe1ccb06f122)) + +## 0.32.1 (2024-11-05) + +Full Changelog: [sdk-v0.32.0...sdk-v0.32.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.32.0...sdk-v0.32.1) + +### Bug Fixes + +* **bedrock:** don't mutate request body inputs ([f83b535](https://github.com/anthropics/anthropic-sdk-typescript/commit/f83b53520262219229cecc388f95d92be83c09d5)) +* **vertex:** don't mutate request body inputs ([e9a82e5](https://github.com/anthropics/anthropic-sdk-typescript/commit/e9a82e56f0d7fff956c2ebd19e103a190f8beb83)) + +## 0.32.0 (2024-11-04) + +Full Changelog: [sdk-v0.31.0...sdk-v0.32.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.31.0...sdk-v0.32.0) + +### Features + +* **api:** add new haiku model ([#587](https://github.com/anthropics/anthropic-sdk-typescript/issues/587)) ([983b13c](https://github.com/anthropics/anthropic-sdk-typescript/commit/983b13c9e4f55b832fc4fddfd46bed89756d745e)) + + +### Bug Fixes + +* don't require deno to run build-deno ([#586](https://github.com/anthropics/anthropic-sdk-typescript/issues/586)) ([0e431d6](https://github.com/anthropics/anthropic-sdk-typescript/commit/0e431d61ec318aae09687dee0bfb922ccb8ddd15)) +* **types:** add missing token-counting-2024-11-01 ([#583](https://github.com/anthropics/anthropic-sdk-typescript/issues/583)) ([13d629c](https://github.com/anthropics/anthropic-sdk-typescript/commit/13d629c9b444a32b69729df7792199556a2b95f2)) + + +### Chores + +* remove unused build-deno condition ([#585](https://github.com/anthropics/anthropic-sdk-typescript/issues/585)) ([491e8fe](https://github.com/anthropics/anthropic-sdk-typescript/commit/491e8fe28745aeb55217809f94ad4e37900f4675)) + +## 0.31.0 (2024-11-01) + +Full Changelog: [sdk-v0.30.1...sdk-v0.31.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.30.1...sdk-v0.31.0) + +### Features + +* **api:** add message token counting & PDFs support ([#582](https://github.com/anthropics/anthropic-sdk-typescript/issues/582)) ([b593837](https://github.com/anthropics/anthropic-sdk-typescript/commit/b593837ae2d320414a26b5ec53aa6d3f30a3e6bc)) + + +### Bug Fixes + +* **countTokens:** correctly set beta header ([1680757](https://github.com/anthropics/anthropic-sdk-typescript/commit/16807572af923831e384869a0a6ccccaa8dbec84)) +* **internal:** support pnpm git installs ([#579](https://github.com/anthropics/anthropic-sdk-typescript/issues/579)) ([86bb102](https://github.com/anthropics/anthropic-sdk-typescript/commit/86bb102ce33346930a8b0a553a909fcc7d964a36)) +* **types:** add missing token-counting-2024-11-01 ([aff1546](https://github.com/anthropics/anthropic-sdk-typescript/commit/aff1546cd84ce50a52d17bcdcaba54e60e92955a)) + + +### Reverts + +* disable isolatedModules and change imports ([#575](https://github.com/anthropics/anthropic-sdk-typescript/issues/575)) ([2c3b176](https://github.com/anthropics/anthropic-sdk-typescript/commit/2c3b176fc551c21abef240b4fa6a98d33ca52048)) + + +### Chores + +* **internal:** update spec version ([#571](https://github.com/anthropics/anthropic-sdk-typescript/issues/571)) ([5760012](https://github.com/anthropics/anthropic-sdk-typescript/commit/576001245f0b5222cb9b17fafb8619f68d51bec3)) + + +### Documentation + +* **readme:** minor typo fixes ([#577](https://github.com/anthropics/anthropic-sdk-typescript/issues/577)) ([8412854](https://github.com/anthropics/anthropic-sdk-typescript/commit/8412854c05837cdb8b8ff898bef2a4e0dbb23cd2)) + + +### Refactors + +* enable isolatedModules and change imports ([#573](https://github.com/anthropics/anthropic-sdk-typescript/issues/573)) ([9068b4b](https://github.com/anthropics/anthropic-sdk-typescript/commit/9068b4b0a0a08a69a9330ce03418135e11aa539e)) +* use type imports for type-only imports ([#580](https://github.com/anthropics/anthropic-sdk-typescript/issues/580)) ([2c8a337](https://github.com/anthropics/anthropic-sdk-typescript/commit/2c8a337033e850b7282d35b37c3ce36d5b0dabbe)) + +## 0.30.1 (2024-10-23) + +Full Changelog: [sdk-v0.30.0...sdk-v0.30.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.30.0...sdk-v0.30.1) + +### Bug Fixes + +* **bedrock:** correct messages beta handling ([9b57586](https://github.com/anthropics/anthropic-sdk-typescript/commit/9b57586456221f8900902b8e85c7c017959c150a)) +* **vertex:** correct messages beta handling ([26f21ee](https://github.com/anthropics/anthropic-sdk-typescript/commit/26f21ee5f524f4cbfb7a97d40aa62553608b1d99)) + + +### Chores + +* **internal:** bumps eslint and related dependencies ([#570](https://github.com/anthropics/anthropic-sdk-typescript/issues/570)) ([0b3ebb0](https://github.com/anthropics/anthropic-sdk-typescript/commit/0b3ebb01c07356e09f0100c235200ca91384aa6a)) + +## 0.30.0 (2024-10-22) + +Full Changelog: [sdk-v0.29.2...sdk-v0.30.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.29.2...sdk-v0.30.0) + +### Features + +* **api:** add new model and `computer-use-2024-10-22` beta ([6981d89](https://github.com/anthropics/anthropic-sdk-typescript/commit/6981d89d3efe6ae8d35c7562527a6c81ad8ed78f)) +* **bedrock:** add beta.messages.create() method ([6317592](https://github.com/anthropics/anthropic-sdk-typescript/commit/63175920a016a2ad187dd1127d263357cf6c007e)) +* **vertex:** add beta.messages.create() ([22cfdba](https://github.com/anthropics/anthropic-sdk-typescript/commit/22cfdba2a3a54e916f2efcbce62990544d3e5f5f)) + + +### Bug Fixes + +* **client:** respect x-stainless-retry-count default headers ([#562](https://github.com/anthropics/anthropic-sdk-typescript/issues/562)) ([274573f](https://github.com/anthropics/anthropic-sdk-typescript/commit/274573f5bc74e382302071850dee058ea2920f0c)) + + +### Chores + +* **api:** add title ([#564](https://github.com/anthropics/anthropic-sdk-typescript/issues/564)) ([a8b7544](https://github.com/anthropics/anthropic-sdk-typescript/commit/a8b7544e56d4a1dfa1f6de530ddaa728ae52c87f)) +* **internal:** update spec ([#566](https://github.com/anthropics/anthropic-sdk-typescript/issues/566)) ([5b998ea](https://github.com/anthropics/anthropic-sdk-typescript/commit/5b998eaf3216fba2283e7762faa115bd5f47a239)) + +## 0.29.2 (2024-10-17) + +Full Changelog: [sdk-v0.29.1...sdk-v0.29.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.29.1...sdk-v0.29.2) + +### Bug Fixes + +* **types:** remove misleading betas TypedDict property for the Batch API ([#559](https://github.com/anthropics/anthropic-sdk-typescript/issues/559)) ([4de5d0a](https://github.com/anthropics/anthropic-sdk-typescript/commit/4de5d0a9d0a8733987d13dcef968146620d3b110)) + +## 0.29.1 (2024-10-15) + +Full Changelog: [sdk-v0.29.0...sdk-v0.29.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.29.0...sdk-v0.29.1) + +### Bug Fixes + +* **beta:** merge betas param with the default value ([#556](https://github.com/anthropics/anthropic-sdk-typescript/issues/556)) ([5520bbc](https://github.com/anthropics/anthropic-sdk-typescript/commit/5520bbccaa75fbab5aa321402637c77651ae3c87)) + + +### Chores + +* **internal:** update spec URL ([#554](https://github.com/anthropics/anthropic-sdk-typescript/issues/554)) ([1fb6448](https://github.com/anthropics/anthropic-sdk-typescript/commit/1fb64489aa1b13c266692c7d14d2dd9b5350b7fc)) + +## 0.29.0 (2024-10-08) + +Full Changelog: [sdk-v0.28.0...sdk-v0.29.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.28.0...sdk-v0.29.0) + +### Features + +* **api:** add message batches api ([4f114d5](https://github.com/anthropics/anthropic-sdk-typescript/commit/4f114d5121f5c66619c7bdd18d0aa2b7a627e3ff)) + + +### Chores + +* **internal:** move LineDecoder to a separate file ([#541](https://github.com/anthropics/anthropic-sdk-typescript/issues/541)) ([fd42469](https://github.com/anthropics/anthropic-sdk-typescript/commit/fd4246928d11347147955ca19efcd4c5b0accb10)) +* **internal:** pass props through internal parser ([#549](https://github.com/anthropics/anthropic-sdk-typescript/issues/549)) ([dd71955](https://github.com/anthropics/anthropic-sdk-typescript/commit/dd7195501e0419ca1e6bafd7341b0726e8b809ab)) + + +### Refactors + +* **types:** improve metadata type names ([#547](https://github.com/anthropics/anthropic-sdk-typescript/issues/547)) ([cef499c](https://github.com/anthropics/anthropic-sdk-typescript/commit/cef499cf3b01643f7e5e3c09524f49e198b940be)) +* **types:** improve metadata types ([#546](https://github.com/anthropics/anthropic-sdk-typescript/issues/546)) ([3fe538b](https://github.com/anthropics/anthropic-sdk-typescript/commit/3fe538bb8cd50e6d68cacc0846f287dc539238d3)) +* **types:** improve tool type names ([#543](https://github.com/anthropics/anthropic-sdk-typescript/issues/543)) ([18dbe77](https://github.com/anthropics/anthropic-sdk-typescript/commit/18dbe7773781eb3917c9609bf490b515d75e6841)) +* **types:** improve tool type names ([#544](https://github.com/anthropics/anthropic-sdk-typescript/issues/544)) ([fc2d823](https://github.com/anthropics/anthropic-sdk-typescript/commit/fc2d8230c6fb68e247743ffa82c3ba9f8b989adf)) + +## 0.28.0 (2024-10-04) + +Full Changelog: [sdk-v0.27.3...sdk-v0.28.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.27.3...sdk-v0.28.0) + +### Features + +* **api:** support disabling parallel tool use ([#540](https://github.com/anthropics/anthropic-sdk-typescript/issues/540)) ([df0032f](https://github.com/anthropics/anthropic-sdk-typescript/commit/df0032f263884190b31a63ddcb20429372617deb)) +* **client:** allow overriding retry count header ([#536](https://github.com/anthropics/anthropic-sdk-typescript/issues/536)) ([ec11f91](https://github.com/anthropics/anthropic-sdk-typescript/commit/ec11f9189e9a24f413a9d48b21a10ce88e367ac3)) +* **client:** send retry count header ([#533](https://github.com/anthropics/anthropic-sdk-typescript/issues/533)) ([401b81c](https://github.com/anthropics/anthropic-sdk-typescript/commit/401b81c55c1f998dc917fc268884c162f214df20)) + + +### Bug Fixes + +* **types:** remove leftover polyfill usage ([#532](https://github.com/anthropics/anthropic-sdk-typescript/issues/532)) ([ac188b2](https://github.com/anthropics/anthropic-sdk-typescript/commit/ac188b29670d409c15e740bca26f8ef488cb7d05)) + + +### Chores + +* better object fallback behaviour for casting errors ([#503](https://github.com/anthropics/anthropic-sdk-typescript/issues/503)) ([3660e97](https://github.com/anthropics/anthropic-sdk-typescript/commit/3660e977e7127b10446b24b0a76b0133b3f666de)) +* better object fallback behaviour for casting errors ([#526](https://github.com/anthropics/anthropic-sdk-typescript/issues/526)) ([4ffb2e4](https://github.com/anthropics/anthropic-sdk-typescript/commit/4ffb2e4e1f5fef3ae58d9f4c99a63e75dd459c5b)) +* **internal:** add dev dependency ([#531](https://github.com/anthropics/anthropic-sdk-typescript/issues/531)) ([a9c127b](https://github.com/anthropics/anthropic-sdk-typescript/commit/a9c127b2854d0cf7efd49e7d46ff10fe52372949)) + + +### Documentation + +* improve and reference contributing documentation ([#539](https://github.com/anthropics/anthropic-sdk-typescript/issues/539)) ([cbef925](https://github.com/anthropics/anthropic-sdk-typescript/commit/cbef925519c63f09626ea7aa61ab8ba9d36bc35d)) +* update CONTRIBUTING.md ([#528](https://github.com/anthropics/anthropic-sdk-typescript/issues/528)) ([2609dec](https://github.com/anthropics/anthropic-sdk-typescript/commit/2609dec770d33b828c957e431f2d03871e67e629)) + +## 0.27.3 (2024-09-09) + +Full Changelog: [sdk-v0.27.2...sdk-v0.27.3](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.27.2...sdk-v0.27.3) + +### Bug Fixes + +* **streaming:** correct error message serialisation ([#524](https://github.com/anthropics/anthropic-sdk-typescript/issues/524)) ([e150fa4](https://github.com/anthropics/anthropic-sdk-typescript/commit/e150fa47d0cd4cbbe1269e3971085d4a434fc3ba)) +* **uploads:** avoid making redundant memory copies ([#520](https://github.com/anthropics/anthropic-sdk-typescript/issues/520)) ([b6d2638](https://github.com/anthropics/anthropic-sdk-typescript/commit/b6d2638387612def84cebac2dedd5fbbea776d09)) + + +### Chores + +* **docs:** update browser support information ([#522](https://github.com/anthropics/anthropic-sdk-typescript/issues/522)) ([ce7aeb5](https://github.com/anthropics/anthropic-sdk-typescript/commit/ce7aeb59ccba4e4d19cb9aa88d7055fb585865ae)) + +## 0.27.2 (2024-09-04) + +Full Changelog: [sdk-v0.27.1...sdk-v0.27.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.27.1...sdk-v0.27.2) + +### Bug Fixes + +* **client:** correct File construction from node-fetch Responses ([#518](https://github.com/anthropics/anthropic-sdk-typescript/issues/518)) ([62ae46f](https://github.com/anthropics/anthropic-sdk-typescript/commit/62ae46fb1e1b360850aafc9e935411c9b7d1c3bb)) + + +### Chores + +* **api:** deprecate claude-1 models ([53644d2](https://github.com/anthropics/anthropic-sdk-typescript/commit/53644d2690e62623afc04383cad0126f98ea37e8)) +* **ci:** install deps via ./script/bootstrap ([#515](https://github.com/anthropics/anthropic-sdk-typescript/issues/515)) ([90a8da1](https://github.com/anthropics/anthropic-sdk-typescript/commit/90a8da1dc937e9aea9fdf6862c3ddb414b39963a)) +* **internal:** dependency updates ([#519](https://github.com/anthropics/anthropic-sdk-typescript/issues/519)) ([b7b0cd6](https://github.com/anthropics/anthropic-sdk-typescript/commit/b7b0cd6579cd987662e7118f8563f68c0903f8da)) +* run tsc as part of lint script ([#513](https://github.com/anthropics/anthropic-sdk-typescript/issues/513)) ([c8127cf](https://github.com/anthropics/anthropic-sdk-typescript/commit/c8127cfa3bdd1370934fe122018e20fc659a4dbb)) + +## 0.27.1 (2024-08-27) + +Full Changelog: [sdk-v0.27.0...sdk-v0.27.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.27.0...sdk-v0.27.1) + +### Chores + +* **ci:** check for build errors ([#511](https://github.com/anthropics/anthropic-sdk-typescript/issues/511)) ([3ab1d3d](https://github.com/anthropics/anthropic-sdk-typescript/commit/3ab1d3d936f5ba3500f2ce87012c38bd198c3cbd)) + +## 0.27.0 (2024-08-21) + +Full Changelog: [sdk-v0.26.1...sdk-v0.27.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.26.1...sdk-v0.27.0) + +### Features + +* **client:** add support for browser usage ([#504](https://github.com/anthropics/anthropic-sdk-typescript/issues/504)) ([93c5f16](https://github.com/anthropics/anthropic-sdk-typescript/commit/93c5f16b4b8c3404bd67d6eb5a0556a8b0a5d027)) + + +### Documentation + +* **readme:** update formatting and clarity for CORS flag ([9cb2c35](https://github.com/anthropics/anthropic-sdk-typescript/commit/9cb2c35f92827eb8654b1669db5ba702770fcae4)) + +## 0.26.1 (2024-08-15) + +Full Changelog: [sdk-v0.26.0...sdk-v0.26.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.26.0...sdk-v0.26.1) + +### Chores + +* **ci:** add CODEOWNERS file ([#498](https://github.com/anthropics/anthropic-sdk-typescript/issues/498)) ([c34433f](https://github.com/anthropics/anthropic-sdk-typescript/commit/c34433fb6528fdd00d189ea0a3b177d95c7c7fa9)) +* **docs/api:** update prompt caching helpers ([04195a3](https://github.com/anthropics/anthropic-sdk-typescript/commit/04195a345d62c98f826e5eecdad20f497db5b3e5)) + +## 0.26.0 (2024-08-14) + +Full Changelog: [sdk-v0.25.2...sdk-v0.26.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.25.2...sdk-v0.26.0) + +### Features + +* **api:** add prompt caching beta ([c920b77](https://github.com/anthropics/anthropic-sdk-typescript/commit/c920b77fc67bd839bfeb6716ceab9d7c9bbe7393)) +* **client:** add streaming helpers ([39abc26](https://github.com/anthropics/anthropic-sdk-typescript/commit/39abc2635517d564ac8b7e63235f0a338fc4bed0)) + + +### Chores + +* **examples:** minor formatting changes ([#491](https://github.com/anthropics/anthropic-sdk-typescript/issues/491)) ([8afef58](https://github.com/anthropics/anthropic-sdk-typescript/commit/8afef584895ffa3f8382c98d2c0a3fc6138e9420)) + +## 0.25.2 (2024-08-12) + +Full Changelog: [sdk-v0.25.1...sdk-v0.25.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.25.1...sdk-v0.25.2) + +### Chores + +* **ci:** bump prism mock server version ([#490](https://github.com/anthropics/anthropic-sdk-typescript/issues/490)) ([bfb27f5](https://github.com/anthropics/anthropic-sdk-typescript/commit/bfb27f54c9b4ff4f9ae06327db454f72431b5bf4)) +* **ci:** minor changes ([#488](https://github.com/anthropics/anthropic-sdk-typescript/issues/488)) ([747fd97](https://github.com/anthropics/anthropic-sdk-typescript/commit/747fd973af594cc52f244b33f31bcf8079733e7d)) + +## 0.25.1 (2024-08-09) + +Full Changelog: [sdk-v0.25.0...sdk-v0.25.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.25.0...sdk-v0.25.1) + +### Chores + +* **internal:** update publish npm script ([#483](https://github.com/anthropics/anthropic-sdk-typescript/issues/483)) ([fb862ff](https://github.com/anthropics/anthropic-sdk-typescript/commit/fb862ff18be308ff710a2f97716f0ad1a62b9fbd)) +* **internal:** updates ([#487](https://github.com/anthropics/anthropic-sdk-typescript/issues/487)) ([67a3325](https://github.com/anthropics/anthropic-sdk-typescript/commit/67a3325aa05c5a19f06b0cb1e67517168427c300)) +* sync openapi version ([#481](https://github.com/anthropics/anthropic-sdk-typescript/issues/481)) ([5fd7e21](https://github.com/anthropics/anthropic-sdk-typescript/commit/5fd7e219732a4483c2edd9a812049569b31943c4)) +* sync openapi version ([#485](https://github.com/anthropics/anthropic-sdk-typescript/issues/485)) ([e74c522](https://github.com/anthropics/anthropic-sdk-typescript/commit/e74c522989cfb979ca916e416c7c14a349b32ef5)) +* sync openapi version ([#486](https://github.com/anthropics/anthropic-sdk-typescript/issues/486)) ([ad98e9e](https://github.com/anthropics/anthropic-sdk-typescript/commit/ad98e9eca5db4f5a04bf8c26e4c53050985cec33)) + +## 0.25.0 (2024-07-29) + +Full Changelog: [sdk-v0.24.3...sdk-v0.25.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.24.3...sdk-v0.25.0) + +### Features + +* add back compat alias for InputJsonDelta ([8b08161](https://github.com/anthropics/anthropic-sdk-typescript/commit/8b081613a50821b8dfa8a1251d42337a20607411)) +* **client:** make request-id header more accessible ([#462](https://github.com/anthropics/anthropic-sdk-typescript/issues/462)) ([5ea6f8b](https://github.com/anthropics/anthropic-sdk-typescript/commit/5ea6f8be0696e3753d8624f72328a5cba3a86056)) + + +### Bug Fixes + +* **compat:** remove ReadableStream polyfill redundant since node v16 ([#478](https://github.com/anthropics/anthropic-sdk-typescript/issues/478)) ([75f5710](https://github.com/anthropics/anthropic-sdk-typescript/commit/75f5710d57e6f72b6770d32d9c6dd71bbfb43d85)) +* use relative paths ([#475](https://github.com/anthropics/anthropic-sdk-typescript/issues/475)) ([a8ca93c](https://github.com/anthropics/anthropic-sdk-typescript/commit/a8ca93cc40464dc76118f7dd72e94c52693f3d63)) + + +### Chores + +* **bedrock:** use `chunk` for internal SSE parsing instead of `completion` ([#472](https://github.com/anthropics/anthropic-sdk-typescript/issues/472)) ([0f6190a](https://github.com/anthropics/anthropic-sdk-typescript/commit/0f6190a69d8986ac3779441eba43d345ec3fb342)) +* **ci:** also run workflows for PRs targeting `next` ([#464](https://github.com/anthropics/anthropic-sdk-typescript/issues/464)) ([cc405a8](https://github.com/anthropics/anthropic-sdk-typescript/commit/cc405a8cc4ea26389b9d857d75818722d0bcbfcd)) +* **docs:** fix incorrect client var names ([#479](https://github.com/anthropics/anthropic-sdk-typescript/issues/479)) ([a247935](https://github.com/anthropics/anthropic-sdk-typescript/commit/a247935a86b87b90209f493921661d20c9bc6457)) +* **docs:** mention lack of support for web browser runtimes ([#468](https://github.com/anthropics/anthropic-sdk-typescript/issues/468)) ([968a7fb](https://github.com/anthropics/anthropic-sdk-typescript/commit/968a7fbb6cb779d17d9f6c485c0b61f241e327bc)) +* **docs:** minor update to formatting of API link in README ([#467](https://github.com/anthropics/anthropic-sdk-typescript/issues/467)) ([50b9f2b](https://github.com/anthropics/anthropic-sdk-typescript/commit/50b9f2b0c3feb4707af2b9e5f006a3f726782803)) +* **docs:** rename anthropic const to client ([#471](https://github.com/anthropics/anthropic-sdk-typescript/issues/471)) ([e1a7f9f](https://github.com/anthropics/anthropic-sdk-typescript/commit/e1a7f9f813077fb033c732c004c7bda85738a321)) +* **docs:** use client instead of package name in Node examples ([#469](https://github.com/anthropics/anthropic-sdk-typescript/issues/469)) ([8961ebf](https://github.com/anthropics/anthropic-sdk-typescript/commit/8961ebf54bbab898667119c8d9551e33a4de6846)) +* **internal:** add constant for default timeout ([#480](https://github.com/anthropics/anthropic-sdk-typescript/issues/480)) ([dc89753](https://github.com/anthropics/anthropic-sdk-typescript/commit/dc897537789c6b4bc31ee8238aad8ffaaa65df5e)) +* **internal:** minor changes to tests ([#465](https://github.com/anthropics/anthropic-sdk-typescript/issues/465)) ([c1fd563](https://github.com/anthropics/anthropic-sdk-typescript/commit/c1fd563693bd354a81e0ae55c7355144f06b7f0b)) +* **internal:** remove old reference to check-test-server ([8dc9afc](https://github.com/anthropics/anthropic-sdk-typescript/commit/8dc9afcf00c4a38c2d85171ebceafc5f6a47c117)) +* sync spec ([#470](https://github.com/anthropics/anthropic-sdk-typescript/issues/470)) ([b493aa4](https://github.com/anthropics/anthropic-sdk-typescript/commit/b493aa49d3d6e67be22c3e8255dd4286e6bbcdeb)) +* **tests:** update prism version ([#473](https://github.com/anthropics/anthropic-sdk-typescript/issues/473)) ([6f21ecf](https://github.com/anthropics/anthropic-sdk-typescript/commit/6f21ecfd781d04a7dc83641f069bb38d5584a320)) + + +### Refactors + +* extract model out to a named type and rename partialjson ([#477](https://github.com/anthropics/anthropic-sdk-typescript/issues/477)) ([d2d4e36](https://github.com/anthropics/anthropic-sdk-typescript/commit/d2d4e36b995cc84e8a3a7c64eb614011df399c5e)) + +## 0.24.3 (2024-07-01) + +Full Changelog: [sdk-v0.24.2...sdk-v0.24.3](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.24.2...sdk-v0.24.3) + +### Bug Fixes + +* **types:** avoid errors on certain TS versions ([dd6aca5](https://github.com/anthropics/anthropic-sdk-typescript/commit/dd6aca56e58d52f09e67e227cccbf273b92adb13)) + +## 0.24.2 (2024-06-28) + +Full Changelog: [sdk-v0.24.1...sdk-v0.24.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.24.1...sdk-v0.24.2) + +### Bug Fixes + +* **partial-json:** don't error on unknown tokens ([d212ce1](https://github.com/anthropics/anthropic-sdk-typescript/commit/d212ce152ca0b8846e7891636ad4ba287da50958)) +* **partial-json:** handle `null` token properly ([f53742f](https://github.com/anthropics/anthropic-sdk-typescript/commit/f53742f497a33b8f0639a63cec828d430a19cb27)) + + +### Chores + +* gitignore test server logs ([#451](https://github.com/anthropics/anthropic-sdk-typescript/issues/451)) ([ee1308f](https://github.com/anthropics/anthropic-sdk-typescript/commit/ee1308f74e5544ed0ce53bfd14ca49d0f03bcffb)) +* **tests:** add unit tests for partial-json-parser ([4fb3bea](https://github.com/anthropics/anthropic-sdk-typescript/commit/4fb3bea74538823c8ab359048f823029d4716277)) + +## 0.24.1 (2024-06-25) + +Full Changelog: [sdk-v0.24.0...sdk-v0.24.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.24.0...sdk-v0.24.1) + +### Bug Fixes + +* **api:** add string to tool result block ([#448](https://github.com/anthropics/anthropic-sdk-typescript/issues/448)) ([87af4e9](https://github.com/anthropics/anthropic-sdk-typescript/commit/87af4e9280923ac73295f9b32086f82c2ed0c6f2)) + + +### Chores + +* **internal:** minor reformatting ([#444](https://github.com/anthropics/anthropic-sdk-typescript/issues/444)) ([46790bb](https://github.com/anthropics/anthropic-sdk-typescript/commit/46790bb462db01ae1725e120f2bdca0a89c8f722)) +* **internal:** replace deprecated aws-sdk packages with [@smithy](https://github.com/smithy) ([#447](https://github.com/anthropics/anthropic-sdk-typescript/issues/447)) ([4328cbf](https://github.com/anthropics/anthropic-sdk-typescript/commit/4328cbf9e64f8bfc9b95a9048b18729c9a938ba5)) + +## 0.24.0 (2024-06-20) + +Full Changelog: [sdk-v0.23.0...sdk-v0.24.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.23.0...sdk-v0.24.0) + +### Features + +* **api:** add new claude-3-5-sonnet-20240620 model ([#438](https://github.com/anthropics/anthropic-sdk-typescript/issues/438)) ([8d60d1b](https://github.com/anthropics/anthropic-sdk-typescript/commit/8d60d1b6fb14988a2257727a1aaab9fbc8f75be3)) + +## 0.23.0 (2024-06-14) + +Full Changelog: [sdk-v0.22.0...sdk-v0.23.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.22.0...sdk-v0.23.0) + +### Features + +* support `application/octet-stream` request bodies ([#436](https://github.com/anthropics/anthropic-sdk-typescript/issues/436)) ([3a8e6ed](https://github.com/anthropics/anthropic-sdk-typescript/commit/3a8e6ed7cc057b77fabeaf8f774f6231836022d7)) + + +### Bug Fixes + +* allow git imports for pnpm ([#433](https://github.com/anthropics/anthropic-sdk-typescript/issues/433)) ([a4f5263](https://github.com/anthropics/anthropic-sdk-typescript/commit/a4f5263692aea74fbf91d0591958aca16c820e00)) + +## 0.22.0 (2024-05-30) + +Full Changelog: [sdk-v0.21.1...sdk-v0.22.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.21.1...sdk-v0.22.0) + +### Features + +* **api/types:** add stream event type aliases with a Raw prefix ([#428](https://github.com/anthropics/anthropic-sdk-typescript/issues/428)) ([1e367e4](https://github.com/anthropics/anthropic-sdk-typescript/commit/1e367e4020fa4691c565c89bdfba40c2f6060871)) +* **api:** tool use is GA and available on 3P ([#429](https://github.com/anthropics/anthropic-sdk-typescript/issues/429)) ([2decf85](https://github.com/anthropics/anthropic-sdk-typescript/commit/2decf85e7471932dad98c21d4ed2d476ab1588a6)) +* **bedrock:** support tools ([91fc61a](https://github.com/anthropics/anthropic-sdk-typescript/commit/91fc61ae7246705d26e96a95dae38b46e9ad9290)) +* **streaming:** add tools support ([4c83bb1](https://github.com/anthropics/anthropic-sdk-typescript/commit/4c83bb111735cd513c09d5ed57a5cb0888534afd)) +* **vertex:** support tools ([acf0aa7](https://github.com/anthropics/anthropic-sdk-typescript/commit/acf0aa7571425c8582740616e24883c2ec65218b)) + + +### Documentation + +* **helpers:** mention inputJson event ([0ef0e39](https://github.com/anthropics/anthropic-sdk-typescript/commit/0ef0e39a870541bbe800b03c1bdcf88eb6e1350c)) +* **readme:** add bundle size badge ([#426](https://github.com/anthropics/anthropic-sdk-typescript/issues/426)) ([bf7c1fd](https://github.com/anthropics/anthropic-sdk-typescript/commit/bf7c1fdaf3476d5c43079e8a0789ed0dd0c807a6)) + +## 0.21.1 (2024-05-21) + +Full Changelog: [sdk-v0.21.0...sdk-v0.21.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.21.0...sdk-v0.21.1) + +### Chores + +* **docs:** fix typo ([#423](https://github.com/anthropics/anthropic-sdk-typescript/issues/423)) ([d42f458](https://github.com/anthropics/anthropic-sdk-typescript/commit/d42f45820347171bd456b0038406a53b098a4fa2)) +* **internal:** run build script over sub-packages ([6f04f66](https://github.com/anthropics/anthropic-sdk-typescript/commit/6f04f6689603ef5a59ce15f490d74392241694c3)) + +## 0.21.0 (2024-05-16) + +Full Changelog: [sdk-v0.20.9...sdk-v0.21.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.9...sdk-v0.21.0) + +### Features + +* **api:** add `tool_choice` param, image block params inside `tool_result.content`, and streaming for `tool_use` blocks ([#418](https://github.com/anthropics/anthropic-sdk-typescript/issues/418)) ([421a1e6](https://github.com/anthropics/anthropic-sdk-typescript/commit/421a1e6f53cbb2f440e3668be3e13475976eebbf)) + + +### Chores + +* **docs:** add SECURITY.md ([#411](https://github.com/anthropics/anthropic-sdk-typescript/issues/411)) ([bf2ad84](https://github.com/anthropics/anthropic-sdk-typescript/commit/bf2ad8496d97de46b28575dfa37fa9cf15341eb4)) +* **internal:** add slightly better logging to scripts ([#415](https://github.com/anthropics/anthropic-sdk-typescript/issues/415)) ([7a042d2](https://github.com/anthropics/anthropic-sdk-typescript/commit/7a042d2dd5a5e310f15c02277c7f7a19e9772872)) +* **internal:** fix generated version numbers ([#413](https://github.com/anthropics/anthropic-sdk-typescript/issues/413)) ([ea77063](https://github.com/anthropics/anthropic-sdk-typescript/commit/ea770630897bb85caaecd39bccf478e4dd3f169c)) + +## 0.20.9 (2024-05-07) + +Full Changelog: [sdk-v0.20.8...sdk-v0.20.9](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.8...sdk-v0.20.9) + +### Bug Fixes + +* **package:** revert recent client file change ([#409](https://github.com/anthropics/anthropic-sdk-typescript/issues/409)) ([9054249](https://github.com/anthropics/anthropic-sdk-typescript/commit/90542499ccf9f5d020e71e1c8dc8935e0c86ede4)) + + +### Chores + +* **internal:** add link to openapi spec ([#406](https://github.com/anthropics/anthropic-sdk-typescript/issues/406)) ([39c856d](https://github.com/anthropics/anthropic-sdk-typescript/commit/39c856d02abbb1d54efbacef087cc89b79bce017)) +* **internal:** bump prism version ([#407](https://github.com/anthropics/anthropic-sdk-typescript/issues/407)) ([0c1eb5d](https://github.com/anthropics/anthropic-sdk-typescript/commit/0c1eb5d5c500ea95fbf9a5ccce37c74170c6a84f)) +* **internal:** move client class to separate file ([#408](https://github.com/anthropics/anthropic-sdk-typescript/issues/408)) ([b5e1e4a](https://github.com/anthropics/anthropic-sdk-typescript/commit/b5e1e4a68c9fc00bede9134fa2214480bbbf5f2d)) +* **internal:** refactor scripts ([#404](https://github.com/anthropics/anthropic-sdk-typescript/issues/404)) ([f60e2d8](https://github.com/anthropics/anthropic-sdk-typescript/commit/f60e2d81bb241063507d2d7e728c78e78c1c5e51)) + +## 0.20.8 (2024-04-29) + +Full Changelog: [sdk-v0.20.7...sdk-v0.20.8](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.7...sdk-v0.20.8) + +### Chores + +* **internal:** add scripts/test and scripts/mock ([#403](https://github.com/anthropics/anthropic-sdk-typescript/issues/403)) ([bdc6011](https://github.com/anthropics/anthropic-sdk-typescript/commit/bdc601192d651f9a7f6bf822c631db1d652d796c)) +* **internal:** use actions/checkout@v4 for codeflow ([#400](https://github.com/anthropics/anthropic-sdk-typescript/issues/400)) ([6d565d3](https://github.com/anthropics/anthropic-sdk-typescript/commit/6d565d366f8787e87cbe9ac851e42c13f88c2579)) + +## 0.20.7 (2024-04-24) + +Full Changelog: [sdk-v0.20.6...sdk-v0.20.7](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.6...sdk-v0.20.7) + +### Chores + +* **internal:** use @swc/jest for running tests ([#397](https://github.com/anthropics/anthropic-sdk-typescript/issues/397)) ([0dbca67](https://github.com/anthropics/anthropic-sdk-typescript/commit/0dbca679f26f4a301810290601cc41f18525fe6e)) + +## 0.20.6 (2024-04-17) + +Full Changelog: [sdk-v0.20.5...sdk-v0.20.6](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.5...sdk-v0.20.6) + +### Build System + +* configure UTF-8 locale in devcontainer ([#393](https://github.com/anthropics/anthropic-sdk-typescript/issues/393)) ([db10244](https://github.com/anthropics/anthropic-sdk-typescript/commit/db10244fa87a653c48bbcc2fffbad206dbe39645)) + +## 0.20.5 (2024-04-15) + +Full Changelog: [sdk-v0.20.4...sdk-v0.20.5](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.4...sdk-v0.20.5) + +### Chores + +* **internal:** formatting ([#390](https://github.com/anthropics/anthropic-sdk-typescript/issues/390)) ([b7861b9](https://github.com/anthropics/anthropic-sdk-typescript/commit/b7861b940dc9c1c21eb6edf3bac8d1d62d2d372f)) + +## 0.20.4 (2024-04-11) + +Full Changelog: [sdk-v0.20.3...sdk-v0.20.4](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.3...sdk-v0.20.4) + +### Chores + +* **internal:** update gitignore ([#388](https://github.com/anthropics/anthropic-sdk-typescript/issues/388)) ([03f03a2](https://github.com/anthropics/anthropic-sdk-typescript/commit/03f03a22532680a3b9bbd2e49116ef760b07a498)) + +## 0.20.3 (2024-04-10) + +Full Changelog: [sdk-v0.20.2...sdk-v0.20.3](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.2...sdk-v0.20.3) + +### Bug Fixes + +* **vertex:** correct core client dependency constraint ([#384](https://github.com/anthropics/anthropic-sdk-typescript/issues/384)) ([de29699](https://github.com/anthropics/anthropic-sdk-typescript/commit/de2969902b68b5c46b6e682b8b947426c6ccf195)) + +## 0.20.2 (2024-04-09) + +Full Changelog: [sdk-v0.20.1...sdk-v0.20.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.1...sdk-v0.20.2) + +### Chores + +* **internal:** update lock files ([#377](https://github.com/anthropics/anthropic-sdk-typescript/issues/377)) ([6d239ef](https://github.com/anthropics/anthropic-sdk-typescript/commit/6d239efaca730baba374a1b49f6b1a4037b3e163)) + +## 0.20.1 (2024-04-04) + +Full Changelog: [sdk-v0.20.0...sdk-v0.20.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.20.0...sdk-v0.20.1) + +### Documentation + +* **readme:** mention tool use ([#375](https://github.com/anthropics/anthropic-sdk-typescript/issues/375)) ([72356dd](https://github.com/anthropics/anthropic-sdk-typescript/commit/72356dd9c498344074c292ffdab602d54c4fa13e)) + +## 0.20.0 (2024-04-04) + +Full Changelog: [sdk-v0.19.2...sdk-v0.20.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.19.2...sdk-v0.20.0) + +### Features + +* **api:** tool use beta ([#374](https://github.com/anthropics/anthropic-sdk-typescript/issues/374)) ([e28514a](https://github.com/anthropics/anthropic-sdk-typescript/commit/e28514a305908f71e98bc33123bc99ed6bf7348f)) + + +### Bug Fixes + +* **types:** correctly mark type as a required property in requests ([#371](https://github.com/anthropics/anthropic-sdk-typescript/issues/371)) ([a04edd8](https://github.com/anthropics/anthropic-sdk-typescript/commit/a04edd8d7f4c552281b37a44099edf432d7fcb27)) + + +### Chores + +* **types:** consistent naming for text block types ([#373](https://github.com/anthropics/anthropic-sdk-typescript/issues/373)) ([84a6a58](https://github.com/anthropics/anthropic-sdk-typescript/commit/84a6a58ff978cc274b85656ca4394396e8b360e3)) + +## 0.19.2 (2024-04-04) + +Full Changelog: [sdk-v0.19.1...sdk-v0.19.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.19.1...sdk-v0.19.2) + +### Bug Fixes + +* **streaming:** handle special line characters and fix multi-byte character decoding ([#370](https://github.com/anthropics/anthropic-sdk-typescript/issues/370)) ([7a97b38](https://github.com/anthropics/anthropic-sdk-typescript/commit/7a97b38e389809ef75c307d26fc671c829b5ea29)) + + +### Chores + +* **deps:** bump yarn to v1.22.22 ([#369](https://github.com/anthropics/anthropic-sdk-typescript/issues/369)) ([603d7b1](https://github.com/anthropics/anthropic-sdk-typescript/commit/603d7b17411bc25a562acb80ebde71ae058892d0)) +* **deps:** remove unused dependency digest-fetch ([#368](https://github.com/anthropics/anthropic-sdk-typescript/issues/368)) ([df1df0f](https://github.com/anthropics/anthropic-sdk-typescript/commit/df1df0f509682841c703fa1ea5062a796cfe2091)) + + +### Documentation + +* **readme:** change undocumented params wording ([#363](https://github.com/anthropics/anthropic-sdk-typescript/issues/363)) ([4222e08](https://github.com/anthropics/anthropic-sdk-typescript/commit/4222e088aff5e26a3d2fbe1b622781c6194b0469)) + +## 0.19.1 (2024-03-29) + +Full Changelog: [sdk-v0.19.0...sdk-v0.19.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.19.0...sdk-v0.19.1) + +### Bug Fixes + +* **client:** correctly send deno version header ([#354](https://github.com/anthropics/anthropic-sdk-typescript/issues/354)) ([ad5162b](https://github.com/anthropics/anthropic-sdk-typescript/commit/ad5162be2ccb122eb355577f481732121b130b0b)) +* handle process.env being undefined in debug func ([#351](https://github.com/anthropics/anthropic-sdk-typescript/issues/351)) ([3b0f38a](https://github.com/anthropics/anthropic-sdk-typescript/commit/3b0f38ab427ae7d31c800cd5c8be1653da9ae709)) +* **streaming:** correct accumulation of output tokens ([#361](https://github.com/anthropics/anthropic-sdk-typescript/issues/361)) ([76af283](https://github.com/anthropics/anthropic-sdk-typescript/commit/76af283596530ccd3a77ed86788bc0ea1e93f3c1)) +* **types:** correct typo claude-2.1' to claude-2.1 ([#352](https://github.com/anthropics/anthropic-sdk-typescript/issues/352)) ([0d5efb9](https://github.com/anthropics/anthropic-sdk-typescript/commit/0d5efb9a0b9eb3ebe1df5ed10164fadfd886eac6)) + + +### Chores + +* **internal:** add type ([#359](https://github.com/anthropics/anthropic-sdk-typescript/issues/359)) ([9456414](https://github.com/anthropics/anthropic-sdk-typescript/commit/945641467deffb674f762920955c98d10f287c8e)) + + +### Documentation + +* **bedrock:** fix dead link ([#356](https://github.com/anthropics/anthropic-sdk-typescript/issues/356)) ([a953e00](https://github.com/anthropics/anthropic-sdk-typescript/commit/a953e0070698f3238b728ffe06a056a9f2d6b7ff)) +* **readme:** consistent use of sentence case in headings ([#347](https://github.com/anthropics/anthropic-sdk-typescript/issues/347)) ([30f45d1](https://github.com/anthropics/anthropic-sdk-typescript/commit/30f45d14a534d7392dfcc4fb503bf07ab8cf038d)) +* **readme:** document how to make undocumented requests ([#349](https://github.com/anthropics/anthropic-sdk-typescript/issues/349)) ([f92c50a](https://github.com/anthropics/anthropic-sdk-typescript/commit/f92c50ac6d9d1b8bdb837e52414aafd3224553da)) + +## 0.19.0 (2024-03-19) + +Full Changelog: [sdk-v0.18.0...sdk-v0.19.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.18.0...sdk-v0.19.0) + +### Features + +* **vertex:** add support for overriding google auth ([#338](https://github.com/anthropics/anthropic-sdk-typescript/issues/338)) ([28d98c4](https://github.com/anthropics/anthropic-sdk-typescript/commit/28d98c487257a3c6b3c6d84597768d484fadb86d)) +* **vertex:** api is no longer in private beta ([#344](https://github.com/anthropics/anthropic-sdk-typescript/issues/344)) ([892127c](https://github.com/anthropics/anthropic-sdk-typescript/commit/892127cdac059eee11c1a322a5512f9250868023)) + + +### Bug Fixes + +* **internal:** make toFile use input file's options ([#343](https://github.com/anthropics/anthropic-sdk-typescript/issues/343)) ([2dc2174](https://github.com/anthropics/anthropic-sdk-typescript/commit/2dc217441d6da8f2192b3e81b03c985383b6816e)) + + +### Chores + +* **internal:** update generated pragma comment ([#341](https://github.com/anthropics/anthropic-sdk-typescript/issues/341)) ([fd60f63](https://github.com/anthropics/anthropic-sdk-typescript/commit/fd60f63d5e5cd978b287d66fd95deabe2ff089d2)) + + +### Documentation + +* fix typo in CONTRIBUTING.md ([#340](https://github.com/anthropics/anthropic-sdk-typescript/issues/340)) ([ba9f3fa](https://github.com/anthropics/anthropic-sdk-typescript/commit/ba9f3faa5e3d116fce232d81f554b2f95f573ec8)) + +## 0.18.0 (2024-03-13) + +Full Changelog: [sdk-v0.17.2...sdk-v0.18.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.17.2...sdk-v0.18.0) + +### Features + +* **api:** add haiku model ([#333](https://github.com/anthropics/anthropic-sdk-typescript/issues/333)) ([11becc6](https://github.com/anthropics/anthropic-sdk-typescript/commit/11becc64a8b07b353835678e063a70e3a0bd85e3)) + + +### Documentation + +* update models in vertex examples ([#331](https://github.com/anthropics/anthropic-sdk-typescript/issues/331)) ([3d139b3](https://github.com/anthropics/anthropic-sdk-typescript/commit/3d139b374179ef5540a8e9436df06501c6ada6c5)) + +## 0.17.2 (2024-03-12) + +Full Changelog: [sdk-v0.17.1...sdk-v0.17.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.17.1...sdk-v0.17.2) + +### Chores + +* **internal:** add explicit type annotation to decoder ([#324](https://github.com/anthropics/anthropic-sdk-typescript/issues/324)) ([7e172c7](https://github.com/anthropics/anthropic-sdk-typescript/commit/7e172c74f75414ee246cbd71104454c9e81efc0d)) + +## 0.17.1 (2024-03-06) + +Full Changelog: [sdk-v0.17.0...sdk-v0.17.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.17.0...sdk-v0.17.1) + +### Documentation + +* deprecate old access token getter ([#322](https://github.com/anthropics/anthropic-sdk-typescript/issues/322)) ([1110548](https://github.com/anthropics/anthropic-sdk-typescript/commit/1110548d4543fab83bc0ef3beb99a75711cb028a)) +* remove extraneous --save and yarn install instructions ([#323](https://github.com/anthropics/anthropic-sdk-typescript/issues/323)) ([775ecb9](https://github.com/anthropics/anthropic-sdk-typescript/commit/775ecb9ef3ab17e88dabc149faa0876cd6ab5f0b)) + +## 0.17.0 (2024-03-06) + +Full Changelog: [sdk-v0.16.1...sdk-v0.17.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.16.1...sdk-v0.17.0) + +### Features + +* **api:** add enum to model param for message ([#315](https://github.com/anthropics/anthropic-sdk-typescript/issues/315)) ([0c44de0](https://github.com/anthropics/anthropic-sdk-typescript/commit/0c44de01a5d5fc6dda3667f03779eb029247c18e)) + + +### Bug Fixes + +* **streaming:** correctly handle trailing new lines in byte chunks ([#317](https://github.com/anthropics/anthropic-sdk-typescript/issues/317)) ([0147b46](https://github.com/anthropics/anthropic-sdk-typescript/commit/0147b4693bd4b1dc3c9cba04a7082aad3c3cb42c)) + + +### Chores + +* **types:** fix accidental exposure of Buffer type to cloudflare ([#319](https://github.com/anthropics/anthropic-sdk-typescript/issues/319)) ([a5e4462](https://github.com/anthropics/anthropic-sdk-typescript/commit/a5e4462bcf054e8324cbcaa31d1b85ffc58113fd)) + + +### Documentation + +* **readme:** fix https proxy example ([#310](https://github.com/anthropics/anthropic-sdk-typescript/issues/310)) ([99d3c54](https://github.com/anthropics/anthropic-sdk-typescript/commit/99d3c545f45230ec5862ddbbfcb64f46b54d7d13)) +* **readme:** fix https proxy example ([#311](https://github.com/anthropics/anthropic-sdk-typescript/issues/311)) ([ffb603c](https://github.com/anthropics/anthropic-sdk-typescript/commit/ffb603c15a0f5d396c96ac545a0cdd0c814ec4ef)) + +## 0.16.1 (2024-03-04) + +Full Changelog: [sdk-v0.16.0...sdk-v0.16.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.16.0...sdk-v0.16.1) + +### Chores + +* fix error handler in readme ([#307](https://github.com/anthropics/anthropic-sdk-typescript/issues/307)) ([5007a1e](https://github.com/anthropics/anthropic-sdk-typescript/commit/5007a1e71907648ea44e1663f5b7f71bb20d001d)) + + +### Documentation + +* **readme:** reference bedrock sdk ([#309](https://github.com/anthropics/anthropic-sdk-typescript/issues/309)) ([0fd0416](https://github.com/anthropics/anthropic-sdk-typescript/commit/0fd041617eca18dd506efffe5a4e2505dd1aa004)) + +## 0.16.0 (2024-03-04) + +Full Changelog: [sdk-v0.15.0...sdk-v0.16.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.15.0...sdk-v0.16.0) + +### Features + +* **bedrock:** add messages API ([#305](https://github.com/anthropics/anthropic-sdk-typescript/issues/305)) ([8b7f89e](https://github.com/anthropics/anthropic-sdk-typescript/commit/8b7f89e1e60416f9ad5b575d43238a4259654395)) + + +### Chores + +* update examples ([459956a](https://github.com/anthropics/anthropic-sdk-typescript/commit/459956ac44b5a2fd1dd0d0828e0281875b5900e9)) + +## 0.15.0 (2024-03-04) + +Full Changelog: [sdk-v0.14.1...sdk-v0.15.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.14.1...sdk-v0.15.0) + +### Features + +* **messages:** add support for image inputs ([#303](https://github.com/anthropics/anthropic-sdk-typescript/issues/303)) ([7663bd6](https://github.com/anthropics/anthropic-sdk-typescript/commit/7663bd6e1a4427483cf5f13889bc5c63314e5bae)) + + +### Bug Fixes + +* **MessageStream:** handle errors more gracefully in async iterator ([#301](https://github.com/anthropics/anthropic-sdk-typescript/issues/301)) ([9cc0daa](https://github.com/anthropics/anthropic-sdk-typescript/commit/9cc0daa9af5717953933e12b487bdbdd5b762cc7)) + + +### Chores + +* **docs:** mention install from git repo ([#302](https://github.com/anthropics/anthropic-sdk-typescript/issues/302)) ([dd2627b](https://github.com/anthropics/anthropic-sdk-typescript/commit/dd2627bc6404afbdccb2c2b66ee0dfcc3fc80031)) +* **internal:** update deps ([#296](https://github.com/anthropics/anthropic-sdk-typescript/issues/296)) ([8804a92](https://github.com/anthropics/anthropic-sdk-typescript/commit/8804a92e3c873d712cac75089af0e82104e6381c)) + + +### Documentation + +* **contributing:** improve wording ([#299](https://github.com/anthropics/anthropic-sdk-typescript/issues/299)) ([7697fa1](https://github.com/anthropics/anthropic-sdk-typescript/commit/7697fa1a3b680015c55ed715a1496c727630a3dc)) +* **readme:** fix typo in custom fetch implementation ([#300](https://github.com/anthropics/anthropic-sdk-typescript/issues/300)) ([a4974c3](https://github.com/anthropics/anthropic-sdk-typescript/commit/a4974c3080c6b592c2a25367932481a154e6c280)) + +## 0.14.1 (2024-02-22) + +Full Changelog: [sdk-v0.14.0...sdk-v0.14.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.14.0...sdk-v0.14.1) + +### Chores + +* **ci:** update actions/setup-node action to v4 ([#295](https://github.com/anthropics/anthropic-sdk-typescript/issues/295)) ([359a856](https://github.com/anthropics/anthropic-sdk-typescript/commit/359a856c4c93d962ca3e117f4dd799849eb5fa7d)) +* **docs:** remove references to old bedrock package ([#289](https://github.com/anthropics/anthropic-sdk-typescript/issues/289)) ([33b935e](https://github.com/anthropics/anthropic-sdk-typescript/commit/33b935e3d840346dd464445901846d2b22888e1c)) +* **internal:** refactor release environment script ([#294](https://github.com/anthropics/anthropic-sdk-typescript/issues/294)) ([b7f8714](https://github.com/anthropics/anthropic-sdk-typescript/commit/b7f87143b16ad413adb943297e65473fd9b93b71)) + + +### Documentation + +* **readme:** fix header for streaming helpers ([#293](https://github.com/anthropics/anthropic-sdk-typescript/issues/293)) ([7278e6f](https://github.com/anthropics/anthropic-sdk-typescript/commit/7278e6f7d62d837c2af0b1a440dfa97b6a3f6b4e)) + + +### Refactors + +* **api:** mark completions API as legacy ([#291](https://github.com/anthropics/anthropic-sdk-typescript/issues/291)) ([c78e2e2](https://github.com/anthropics/anthropic-sdk-typescript/commit/c78e2e215067fabcc3eaee0a537213f55735b42e)) + +## 0.14.0 (2024-02-13) + +Full Changelog: [sdk-v0.13.1...sdk-v0.14.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.13.1...sdk-v0.14.0) + +### ⚠ BREAKING CHANGES + +* **api:** messages is generally available ([#287](https://github.com/anthropics/anthropic-sdk-typescript/issues/287)) + +### Features + +* **api:** messages is generally available ([#287](https://github.com/anthropics/anthropic-sdk-typescript/issues/287)) ([be0a828](https://github.com/anthropics/anthropic-sdk-typescript/commit/be0a82883cf9b1b9d2944525b86e40f2b42cea4f)) + +## 0.13.1 (2024-02-07) + +Full Changelog: [sdk-v0.13.0...sdk-v0.13.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.13.0...sdk-v0.13.1) + +### Chores + +* **internal:** reformat pacakge.json ([#284](https://github.com/anthropics/anthropic-sdk-typescript/issues/284)) ([3760c68](https://github.com/anthropics/anthropic-sdk-typescript/commit/3760c68f207b596261da336cbe62b4b84fb1763f)) +* respect `application/vnd.api+json` content-type header ([#286](https://github.com/anthropics/anthropic-sdk-typescript/issues/286)) ([daf0cae](https://github.com/anthropics/anthropic-sdk-typescript/commit/daf0cae6087580d61d4423e113259c8315c2b85a)) + +## 0.13.0 (2024-02-02) + +Full Changelog: [sdk-v0.12.8...sdk-v0.13.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.12.8...sdk-v0.13.0) + +### Features + +* **api:** add new usage response fields ([#281](https://github.com/anthropics/anthropic-sdk-typescript/issues/281)) ([77bd18f](https://github.com/anthropics/anthropic-sdk-typescript/commit/77bd18fb3d149c0706664304102fc5f12830f761)) + + +### Chores + +* **package:** fix formatting ([#283](https://github.com/anthropics/anthropic-sdk-typescript/issues/283)) ([f88579a](https://github.com/anthropics/anthropic-sdk-typescript/commit/f88579a0768e0a7d5064eec9e1dd79e86c66bce7)) + +## 0.12.8 (2024-02-02) + +Full Changelog: [sdk-v0.12.7...sdk-v0.12.8](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.12.7...sdk-v0.12.8) + +### Chores + +* **interal:** make link to api.md relative ([#278](https://github.com/anthropics/anthropic-sdk-typescript/issues/278)) ([46f8c28](https://github.com/anthropics/anthropic-sdk-typescript/commit/46f8c2805af75a5a733fdaa53936765a483471cb)) +* **internal:** enable building when git installed ([#279](https://github.com/anthropics/anthropic-sdk-typescript/issues/279)) ([3065001](https://github.com/anthropics/anthropic-sdk-typescript/commit/3065001610041b0c74cc640b72f646b6ff867db1)) + + +### Documentation + +* add a CONTRIBUTING.md ([#280](https://github.com/anthropics/anthropic-sdk-typescript/issues/280)) ([5b53551](https://github.com/anthropics/anthropic-sdk-typescript/commit/5b535512f2eacdb9f2fef795c85f2d2aaeedaea3)) + +## 0.12.7 (2024-01-31) + +Full Changelog: [sdk-v0.12.6...sdk-v0.12.7](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.12.6...sdk-v0.12.7) + +### Chores + +* **bedrock:** move bedrock SDK to the main repo ([#274](https://github.com/anthropics/anthropic-sdk-typescript/issues/274)) ([b4ef3a8](https://github.com/anthropics/anthropic-sdk-typescript/commit/b4ef3a854e447744a1e270ec1e7e6da81b98ade3)) +* **ci:** fix publish packages script ([#272](https://github.com/anthropics/anthropic-sdk-typescript/issues/272)) ([db3585d](https://github.com/anthropics/anthropic-sdk-typescript/commit/db3585daf759c9794ec307b05a568527a2e7df99)) + +## 0.12.6 (2024-01-30) + +Full Changelog: [sdk-v0.12.5...sdk-v0.12.6](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.12.5...sdk-v0.12.6) + +### Chores + +* **internal:** support pre-release versioning ([#270](https://github.com/anthropics/anthropic-sdk-typescript/issues/270)) ([566069d](https://github.com/anthropics/anthropic-sdk-typescript/commit/566069d4eb1dbcc2123f4b455f855b0748d586ee)) + +## 0.12.5 (2024-01-25) + +Full Changelog: [sdk-v0.12.4...sdk-v0.12.5](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.12.4...sdk-v0.12.5) + +### Chores + +* **internal:** don't re-export streaming type ([#267](https://github.com/anthropics/anthropic-sdk-typescript/issues/267)) ([bcae5a9](https://github.com/anthropics/anthropic-sdk-typescript/commit/bcae5a95078dfe091d01823cd38cf3c63d28026d)) +* **internal:** update release-please config ([#269](https://github.com/anthropics/anthropic-sdk-typescript/issues/269)) ([80952e6](https://github.com/anthropics/anthropic-sdk-typescript/commit/80952e6ff6aea24ade9ea45dcbe8bb61da385304)) + +## 0.12.4 (2024-01-23) + +Full Changelog: [sdk-v0.12.3...sdk-v0.12.4](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.12.3...sdk-v0.12.4) + +### Chores + +* **internal:** add internal helpers & improve build scripts ([#261](https://github.com/anthropics/anthropic-sdk-typescript/issues/261)) ([4c1504a](https://github.com/anthropics/anthropic-sdk-typescript/commit/4c1504abc7eb8685a8409c4a19dc46d83ea26392)) +* **internal:** minor streaming updates ([#264](https://github.com/anthropics/anthropic-sdk-typescript/issues/264)) ([d4414ff](https://github.com/anthropics/anthropic-sdk-typescript/commit/d4414ffeafbc47769b91c4b2681f130b46d1a7c1)) +* **internal:** update resource client type ([#263](https://github.com/anthropics/anthropic-sdk-typescript/issues/263)) ([bc4f115](https://github.com/anthropics/anthropic-sdk-typescript/commit/bc4f115900cbeba1ff09d6f3cec79e639a8fda5e)) + +## 0.12.3 (2024-01-19) + +Full Changelog: [v0.12.2...v0.12.3](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.12.2...v0.12.3) + +### Bug Fixes + +* allow body type in RequestOptions to be null ([#259](https://github.com/anthropics/anthropic-sdk-typescript/issues/259)) ([2f98de1](https://github.com/anthropics/anthropic-sdk-typescript/commit/2f98de1a42568b1242ce313ba046febb1c6625b5)) + +## 0.12.2 (2024-01-18) + +Full Changelog: [v0.12.1...v0.12.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.12.1...v0.12.2) + +### Bug Fixes + +* **ci:** ignore stainless-app edits to release PR title ([#258](https://github.com/anthropics/anthropic-sdk-typescript/issues/258)) ([87e4ba8](https://github.com/anthropics/anthropic-sdk-typescript/commit/87e4ba82c5b498f881db9590edbfd68c8aba0930)) +* **types:** accept undefined for optional client options ([#257](https://github.com/anthropics/anthropic-sdk-typescript/issues/257)) ([a0e2c4a](https://github.com/anthropics/anthropic-sdk-typescript/commit/a0e2c4a4c4a269ad011d9a6c717c1ded2405711b)) +* use default base url if BASE_URL env var is blank ([#250](https://github.com/anthropics/anthropic-sdk-typescript/issues/250)) ([e38f32f](https://github.com/anthropics/anthropic-sdk-typescript/commit/e38f32f52398f3a082eb745e85179242ecee7663)) + + +### Chores + +* **internal:** debug logging for retries; speculative retry-after-ms support ([#256](https://github.com/anthropics/anthropic-sdk-typescript/issues/256)) ([b4b70fd](https://github.com/anthropics/anthropic-sdk-typescript/commit/b4b70fdbee45dd2a68e46135db45b61381538ae8)) +* **internal:** narrow type into stringifyQuery ([#253](https://github.com/anthropics/anthropic-sdk-typescript/issues/253)) ([3f42e07](https://github.com/anthropics/anthropic-sdk-typescript/commit/3f42e0702ab55cd841c0dc186732028d2fb9f5bb)) + + +### Documentation + +* fix missing async in readme code sample ([#255](https://github.com/anthropics/anthropic-sdk-typescript/issues/255)) ([553fb37](https://github.com/anthropics/anthropic-sdk-typescript/commit/553fb37159a9424a40df1e0f6bb36962ba9f5be8)) +* **readme:** improve api reference ([#254](https://github.com/anthropics/anthropic-sdk-typescript/issues/254)) ([3721927](https://github.com/anthropics/anthropic-sdk-typescript/commit/3721927e895d42c167e2464f30f7f2addb690ec6)) + +## 0.12.1 (2024-01-08) + +Full Changelog: [v0.12.0...v0.12.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.12.0...v0.12.1) + +### Bug Fixes + +* **headers:** always send lowercase headers and strip undefined (BREAKING in rare cases) ([#245](https://github.com/anthropics/anthropic-sdk-typescript/issues/245)) ([7703066](https://github.com/anthropics/anthropic-sdk-typescript/commit/77030661f5612ea5312cb2fecf7987024ffd6ede)) + + +### Chores + +* add .keep files for examples and custom code directories ([#249](https://github.com/anthropics/anthropic-sdk-typescript/issues/249)) ([26b9062](https://github.com/anthropics/anthropic-sdk-typescript/commit/26b9062c7489dd3ee7f620edfea9888f92a859d7)) +* **internal:** improve type signatures ([#247](https://github.com/anthropics/anthropic-sdk-typescript/issues/247)) ([40edd29](https://github.com/anthropics/anthropic-sdk-typescript/commit/40edd299a83f1f60e973080d1fa84f6f42752663)) + +## 0.12.0 (2023-12-21) + +Full Changelog: [v0.11.0...v0.12.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.11.0...v0.12.0) + +### ⚠ BREAKING CHANGES + +* remove anthropic-beta and x-api-key headers from param types ([#243](https://github.com/anthropics/anthropic-sdk-typescript/issues/243)) + +### Bug Fixes + +* remove anthropic-beta and x-api-key headers from param types ([#243](https://github.com/anthropics/anthropic-sdk-typescript/issues/243)) ([60f67ae](https://github.com/anthropics/anthropic-sdk-typescript/commit/60f67ae757cfe8e482327f508a802b30ec3805a0)) + + +### Documentation + +* **readme:** add streaming helper documentation ([#238](https://github.com/anthropics/anthropic-sdk-typescript/issues/238)) ([d74ee71](https://github.com/anthropics/anthropic-sdk-typescript/commit/d74ee7159f366a3f78091eacdcea3049c1e81ec7)) +* **readme:** remove old migration guide ([#236](https://github.com/anthropics/anthropic-sdk-typescript/issues/236)) ([65dff0a](https://github.com/anthropics/anthropic-sdk-typescript/commit/65dff0adb2ec836b81da4f71fb94a316c5f1a942)) +* reformat README.md ([#241](https://github.com/anthropics/anthropic-sdk-typescript/issues/241)) ([eb12705](https://github.com/anthropics/anthropic-sdk-typescript/commit/eb12705a7d975f584ca31f24b99c35318cf6419b)) + + +### Refactors + +* write jest config in typescript ([#239](https://github.com/anthropics/anthropic-sdk-typescript/issues/239)) ([7c87f24](https://github.com/anthropics/anthropic-sdk-typescript/commit/7c87f242d921adfbd2bb21ed5f2c37ada2043f95)) + +## 0.11.0 (2023-12-19) + +Full Changelog: [v0.10.2...v0.11.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.10.2...v0.11.0) + +### Features + +* **api:** add messages endpoint with streaming helpers ([#235](https://github.com/anthropics/anthropic-sdk-typescript/issues/235)) ([12b914f](https://github.com/anthropics/anthropic-sdk-typescript/commit/12b914f46f4aa625ff141ec0b6631400d0994f76)) +* **client:** support reading the base url from an env variable ([#223](https://github.com/anthropics/anthropic-sdk-typescript/issues/223)) ([5bc3600](https://github.com/anthropics/anthropic-sdk-typescript/commit/5bc3600a487e7ed49d944aaf36a43e0d895e907b)) + + +### Chores + +* **ci:** run release workflow once per day ([#232](https://github.com/anthropics/anthropic-sdk-typescript/issues/232)) ([115479f](https://github.com/anthropics/anthropic-sdk-typescript/commit/115479f403838a6d2c81587220029b68a4371c02)) +* **deps:** update dependency ts-jest to v29.1.1 ([#233](https://github.com/anthropics/anthropic-sdk-typescript/issues/233)) ([bec6ab1](https://github.com/anthropics/anthropic-sdk-typescript/commit/bec6ab127d9b20071ab673e8e37087a879467b74)) +* **deps:** update jest ([#234](https://github.com/anthropics/anthropic-sdk-typescript/issues/234)) ([5506174](https://github.com/anthropics/anthropic-sdk-typescript/commit/5506174092d5248354f3d288c84da5ba4749375c)) +* update dependencies ([#231](https://github.com/anthropics/anthropic-sdk-typescript/issues/231)) ([4e34536](https://github.com/anthropics/anthropic-sdk-typescript/commit/4e345362c9002528fb0d95ca739fb8211ab3aec8)) +* update prettier ([#230](https://github.com/anthropics/anthropic-sdk-typescript/issues/230)) ([173603e](https://github.com/anthropics/anthropic-sdk-typescript/commit/173603e14fc5fe87c056553ecec3278059fe58d9)) + + +### Documentation + +* update examples to show claude-2.1 ([#227](https://github.com/anthropics/anthropic-sdk-typescript/issues/227)) ([4b00d84](https://github.com/anthropics/anthropic-sdk-typescript/commit/4b00d84aee56090b5d576fdff9c3a07386475c72)) + + +### Build System + +* specify `packageManager: yarn` ([#229](https://github.com/anthropics/anthropic-sdk-typescript/issues/229)) ([d31dae4](https://github.com/anthropics/anthropic-sdk-typescript/commit/d31dae455d750a61ae3b9a751ab73309b0f87417)) + +## 0.10.2 (2023-11-28) + +Full Changelog: [v0.10.1...v0.10.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.10.1...v0.10.2) + +## 0.10.1 (2023-11-24) + +Full Changelog: [v0.10.0...v0.10.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.10.0...v0.10.1) + +### Chores + +* **internal:** remove file import and conditionally run prepare ([#217](https://github.com/anthropics/anthropic-sdk-typescript/issues/217)) ([8ac5c7a](https://github.com/anthropics/anthropic-sdk-typescript/commit/8ac5c7ae63a7aa4262ad95e0f4d6a509428de794)) + +## 0.10.0 (2023-11-21) + +Full Changelog: [v0.9.1...v0.10.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.9.1...v0.10.0) + +### Features + +* allow installing package directly from github ([#215](https://github.com/anthropics/anthropic-sdk-typescript/issues/215)) ([3de3f1b](https://github.com/anthropics/anthropic-sdk-typescript/commit/3de3f1b8124c110ead3ebedf709f4d5d088230cd)) + + +### Chores + +* **ci:** fix publish-npm ([#213](https://github.com/anthropics/anthropic-sdk-typescript/issues/213)) ([4ab77b7](https://github.com/anthropics/anthropic-sdk-typescript/commit/4ab77b7b323f22019193ba4f0a85fc89af193fbf)) +* **internal:** don't call prepare in dist ([#216](https://github.com/anthropics/anthropic-sdk-typescript/issues/216)) ([b031904](https://github.com/anthropics/anthropic-sdk-typescript/commit/b031904901a17878545cd8ce5c43f03cd364a8fe)) + +## 0.9.1 (2023-11-14) + +Full Changelog: [v0.9.0...v0.9.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.9.0...v0.9.1) + +### Chores + +* **ci:** update release-please config ([#206](https://github.com/anthropics/anthropic-sdk-typescript/issues/206)) ([270b0b7](https://github.com/anthropics/anthropic-sdk-typescript/commit/270b0b725ea559ca4616ec8d8bac5a5cde1de0db)) +* **docs:** fix github links ([#208](https://github.com/anthropics/anthropic-sdk-typescript/issues/208)) ([b316603](https://github.com/anthropics/anthropic-sdk-typescript/commit/b3166033cffe31f5d11793ddd32e595161f1a2e6)) +* **internal:** update APIResource structure ([#211](https://github.com/anthropics/anthropic-sdk-typescript/issues/211)) ([0d6bbce](https://github.com/anthropics/anthropic-sdk-typescript/commit/0d6bbce8ff699b511133ee6bfb72c1244d85eb32)) +* **internal:** update jest config ([#210](https://github.com/anthropics/anthropic-sdk-typescript/issues/210)) ([b0c64eb](https://github.com/anthropics/anthropic-sdk-typescript/commit/b0c64eb9531d417f024567a4c74d9dd64743b889)) +* **internal:** update tsconfig ([#209](https://github.com/anthropics/anthropic-sdk-typescript/issues/209)) ([81b3e0b](https://github.com/anthropics/anthropic-sdk-typescript/commit/81b3e0b59801f737c6f1783e59eef8c1af77b1ad)) + +## 0.9.0 (2023-11-05) + +Full Changelog: [v0.8.1...v0.9.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.8.1...v0.9.0) + +### Features + +* **client:** allow binary returns ([#203](https://github.com/anthropics/anthropic-sdk-typescript/issues/203)) ([5983d5e](https://github.com/anthropics/anthropic-sdk-typescript/commit/5983d5e5de327d6835c7baaea022914a101865a2)) +* **github:** include a devcontainer setup ([#202](https://github.com/anthropics/anthropic-sdk-typescript/issues/202)) ([ea97913](https://github.com/anthropics/anthropic-sdk-typescript/commit/ea97913a04a508da7704758b78a9b96d097be5a2)) + + +### Chores + +* **internal:** update gitignore ([#198](https://github.com/anthropics/anthropic-sdk-typescript/issues/198)) ([3048738](https://github.com/anthropics/anthropic-sdk-typescript/commit/3048738235b9dff9de19aae59ff66487dffb9e8e)) +* small cleanups ([#201](https://github.com/anthropics/anthropic-sdk-typescript/issues/201)) ([9f0a73d](https://github.com/anthropics/anthropic-sdk-typescript/commit/9f0a73d794fc110689ce1c67b68d0a68133adb8d)) + + +### Documentation + +* document customizing fetch ([#204](https://github.com/anthropics/anthropic-sdk-typescript/issues/204)) ([d2df724](https://github.com/anthropics/anthropic-sdk-typescript/commit/d2df7246ec244f2de73d359ffbff3f88acec781d)) +* fix github links ([#200](https://github.com/anthropics/anthropic-sdk-typescript/issues/200)) ([4038acd](https://github.com/anthropics/anthropic-sdk-typescript/commit/4038acd91f4de7c3b20efe7f76523d1e6970f5d9)) +* **readme:** mention version header ([#205](https://github.com/anthropics/anthropic-sdk-typescript/issues/205)) ([a8d8f07](https://github.com/anthropics/anthropic-sdk-typescript/commit/a8d8f07f9d4890195847b6ea86eb311e258e655f)) + +## 0.8.1 (2023-10-25) + +Full Changelog: [v0.8.0...v0.8.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.8.0...v0.8.1) + +### Bug Fixes + +* typo in build script ([#197](https://github.com/anthropics/anthropic-sdk-typescript/issues/197)) ([212e990](https://github.com/anthropics/anthropic-sdk-typescript/commit/212e9903e9b72b3169f450d8ab11ebd384951dba)) + +## 0.8.0 (2023-10-24) + +Full Changelog: [v0.7.0...v0.8.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.7.0...v0.8.0) + +### Features + +* **client:** adjust retry behavior to be exponential backoff ([#192](https://github.com/anthropics/anthropic-sdk-typescript/issues/192)) ([747afe2](https://github.com/anthropics/anthropic-sdk-typescript/commit/747afe2bdbbe3a5489e9b9bc6ed4fcf2a276e40b)) + +## 0.7.0 (2023-10-19) + +Full Changelog: [v0.6.8...v0.7.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.6.8...v0.7.0) + +### Features + +* handle 204 No Content gracefully ([#190](https://github.com/anthropics/anthropic-sdk-typescript/issues/190)) ([c8a8bec](https://github.com/anthropics/anthropic-sdk-typescript/commit/c8a8becd127e5275333900c3bb76955605ae0f02)) + +## 0.6.8 (2023-10-17) + +Full Changelog: [v0.6.7...v0.6.8](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.6.7...v0.6.8) + +### Bug Fixes + +* import web-streams-polyfill without overriding globals ([#186](https://github.com/anthropics/anthropic-sdk-typescript/issues/186)) ([e774e17](https://github.com/anthropics/anthropic-sdk-typescript/commit/e774e1774642668e080de5233aeaa33cf5f1b3ae)) + +## 0.6.7 (2023-10-16) + +Full Changelog: [v0.6.6...v0.6.7](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.6.6...v0.6.7) + +### Bug Fixes + +* improve status code in error messages ([#183](https://github.com/anthropics/anthropic-sdk-typescript/issues/183)) ([7d3bbd4](https://github.com/anthropics/anthropic-sdk-typescript/commit/7d3bbd485c9628bb7c3fb5d1660934198981fcc7)) + + +### Chores + +* add case insensitive get header function ([#178](https://github.com/anthropics/anthropic-sdk-typescript/issues/178)) ([13c398d](https://github.com/anthropics/anthropic-sdk-typescript/commit/13c398dee3ff2eaa3b6046630eda9831580348f4)) +* **internal:** add debug logs for stream responses ([#182](https://github.com/anthropics/anthropic-sdk-typescript/issues/182)) ([a1fa1b7](https://github.com/anthropics/anthropic-sdk-typescript/commit/a1fa1b7766248f3178cb55ac5342409a57c1dbb8)) +* update comment ([#179](https://github.com/anthropics/anthropic-sdk-typescript/issues/179)) ([27a425e](https://github.com/anthropics/anthropic-sdk-typescript/commit/27a425ee64dcdc569b92ac27b501bca0dadf2dea)) + + +### Documentation + +* organisation -> organization (UK to US English) ([#185](https://github.com/anthropics/anthropic-sdk-typescript/issues/185)) ([70257d4](https://github.com/anthropics/anthropic-sdk-typescript/commit/70257d43296f5b448b5649a34b67a3a3a26704ab)) + + +### Refactors + +* **streaming:** change Stream constructor signature ([#174](https://github.com/anthropics/anthropic-sdk-typescript/issues/174)) ([1951824](https://github.com/anthropics/anthropic-sdk-typescript/commit/195182432c41a2a8a4fc425788267e60f36f5820)) +* **test:** refactor authentication tests ([#176](https://github.com/anthropics/anthropic-sdk-typescript/issues/176)) ([f59daad](https://github.com/anthropics/anthropic-sdk-typescript/commit/f59daad06cab4c5df3068ea7f71ecbb20d8af141)) + +## 0.6.6 (2023-10-11) + +Full Changelog: [v0.6.5...v0.6.6](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.6.5...v0.6.6) + +### Chores + +* update README ([#173](https://github.com/anthropics/anthropic-sdk-typescript/issues/173)) ([5f50c1b](https://github.com/anthropics/anthropic-sdk-typescript/commit/5f50c1b2f160610c89f158a10d83029c356d925a)) + +## 0.6.5 (2023-10-11) + +Full Changelog: [v0.6.4...v0.6.5](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.6.4...v0.6.5) + +### Features + +* **client:** handle retry-after with a date ([#162](https://github.com/anthropics/anthropic-sdk-typescript/issues/162)) ([31bd609](https://github.com/anthropics/anthropic-sdk-typescript/commit/31bd60905858a6532414665a1368ae9f5fd29370)) +* **client:** retry on 408 Request Timeout ([#151](https://github.com/anthropics/anthropic-sdk-typescript/issues/151)) ([3523ffe](https://github.com/anthropics/anthropic-sdk-typescript/commit/3523ffe5647448d5a5960b1339c9a17374e85dd5)) +* **client:** support importing node or web shims manually ([#157](https://github.com/anthropics/anthropic-sdk-typescript/issues/157)) ([c1237fe](https://github.com/anthropics/anthropic-sdk-typescript/commit/c1237feaea9ca2d244720f2f75e023450a78019f)) +* **errors:** add status code to error message ([#155](https://github.com/anthropics/anthropic-sdk-typescript/issues/155)) ([76cf128](https://github.com/anthropics/anthropic-sdk-typescript/commit/76cf128b68f206038945ac4f54f6f50e8a6a2c1b)) +* **package:** export a root error type ([#160](https://github.com/anthropics/anthropic-sdk-typescript/issues/160)) ([51d8d60](https://github.com/anthropics/anthropic-sdk-typescript/commit/51d8d60b72fbe99dcb4d5a9ec32abbcb21ba1460)) + + +### Bug Fixes + +* **client:** eliminate circular imports, which cause runtime errors in webpack dev bundles ([#170](https://github.com/anthropics/anthropic-sdk-typescript/issues/170)) ([4a86733](https://github.com/anthropics/anthropic-sdk-typescript/commit/4a86733b9d11349fca041683ac9d89685133557d)) +* fix namespace exports regression ([#171](https://github.com/anthropics/anthropic-sdk-typescript/issues/171)) ([0689a91](https://github.com/anthropics/anthropic-sdk-typescript/commit/0689a9196619d968870b7fd2e1a0f037a1aee282)) +* prevent ReferenceError, update compatibility to ES2020 and Node 18+ ([#169](https://github.com/anthropics/anthropic-sdk-typescript/issues/169)) ([9753314](https://github.com/anthropics/anthropic-sdk-typescript/commit/9753314b7e36a270bb4c29f2981c521ec9c17773)) + + +### Chores + +* **internal:** bump lock file ([#159](https://github.com/anthropics/anthropic-sdk-typescript/issues/159)) ([e6030fa](https://github.com/anthropics/anthropic-sdk-typescript/commit/e6030fa915f26569f9c48c478a5e6c01910a6557)) +* **internal:** minor formatting improvement ([#168](https://github.com/anthropics/anthropic-sdk-typescript/issues/168)) ([6447608](https://github.com/anthropics/anthropic-sdk-typescript/commit/644760883802bc2769a916fa477f2c6491f018fd)) +* **internal:** update lock file ([#161](https://github.com/anthropics/anthropic-sdk-typescript/issues/161)) ([370ce3c](https://github.com/anthropics/anthropic-sdk-typescript/commit/370ce3c34b87591071fefc8b53977078603b6ca4)) +* **internal:** update lock file ([#163](https://github.com/anthropics/anthropic-sdk-typescript/issues/163)) ([4a37181](https://github.com/anthropics/anthropic-sdk-typescript/commit/4a37181e0ceada13e3ed61d6df7aa34492dc57a7)) +* **internal:** update lock file ([#164](https://github.com/anthropics/anthropic-sdk-typescript/issues/164)) ([939c155](https://github.com/anthropics/anthropic-sdk-typescript/commit/939c155277e67c19f7b2ff956f7cf0d40d4671cd)) + + +### Documentation + +* **api.md:** add shared models ([#158](https://github.com/anthropics/anthropic-sdk-typescript/issues/158)) ([33e5518](https://github.com/anthropics/anthropic-sdk-typescript/commit/33e5518bdeca83bbbde0e144e444609f569f1477)) +* declare Bun 1.0 officially supported ([#154](https://github.com/anthropics/anthropic-sdk-typescript/issues/154)) ([429d8f4](https://github.com/anthropics/anthropic-sdk-typescript/commit/429d8f44b113a91599f0ebb69128636da82a5050)) +* **readme:** remove incorrect wording in opening ([#156](https://github.com/anthropics/anthropic-sdk-typescript/issues/156)) ([01973fe](https://github.com/anthropics/anthropic-sdk-typescript/commit/01973fe50b13ce2981656f8c13603975e7c43efd)) + +## 0.6.4 (2023-09-08) + +Full Changelog: [v0.6.3...v0.6.4](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.6.3...v0.6.4) + +### Features + +* **package:** add Bun export map ([#139](https://github.com/anthropics/anthropic-sdk-typescript/issues/139)) ([ba3310d](https://github.com/anthropics/anthropic-sdk-typescript/commit/ba3310d903cd5fda91168266335f4e445e60cad4)) + + +### Bug Fixes + +* **client:** fix TS errors that appear when users Go to Source in VSCode ([#142](https://github.com/anthropics/anthropic-sdk-typescript/issues/142)) ([f7bfbea](https://github.com/anthropics/anthropic-sdk-typescript/commit/f7bfbeaa54d364201bbe5cddf3132875ae2a3ccf)) +* **client:** handle case where the client is instantiated with a undefined baseURL ([#143](https://github.com/anthropics/anthropic-sdk-typescript/issues/143)) ([10e5203](https://github.com/anthropics/anthropic-sdk-typescript/commit/10e52034990d90dcdaf26672ea384545b88ddf35)) +* **client:** use explicit file extensions in _shims imports ([#141](https://github.com/anthropics/anthropic-sdk-typescript/issues/141)) ([10fd687](https://github.com/anthropics/anthropic-sdk-typescript/commit/10fd68742a202c5c0a8b520db190c239dce9b676)) +* fix module not found errors in Vercel edge ([#148](https://github.com/anthropics/anthropic-sdk-typescript/issues/148)) ([72e51a1](https://github.com/anthropics/anthropic-sdk-typescript/commit/72e51a170855281a8d099b00c6fb1e9ccb276212)) +* **readme:** update link to api.md to use the correct branch ([#145](https://github.com/anthropics/anthropic-sdk-typescript/issues/145)) ([5db78ed](https://github.com/anthropics/anthropic-sdk-typescript/commit/5db78edec4826f86b2fc21ee3f470b49a4987029)) + + +### Chores + +* **internal:** export helper from core ([#147](https://github.com/anthropics/anthropic-sdk-typescript/issues/147)) ([7e79de1](https://github.com/anthropics/anthropic-sdk-typescript/commit/7e79de14edeab8110d740e996653e9f9cc2299a4)) + + +### Documentation + +* **readme:** add link to api.md ([#144](https://github.com/anthropics/anthropic-sdk-typescript/issues/144)) ([716c9f0](https://github.com/anthropics/anthropic-sdk-typescript/commit/716c9f0714c0e9c26cb6cdcb007457aff1284cf4)) + +## 0.6.3 (2023-08-28) + +Full Changelog: [v0.6.2...v0.6.3](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.6.2...v0.6.3) + +### Bug Fixes + +* **types:** improve getNextPage() return type ([#137](https://github.com/anthropics/anthropic-sdk-typescript/issues/137)) ([713d603](https://github.com/anthropics/anthropic-sdk-typescript/commit/713d6032c2c3b3630314a9625a1672147ef19258)) + + +### Chores + +* **ci:** setup workflows to create releases and release PRs ([#135](https://github.com/anthropics/anthropic-sdk-typescript/issues/135)) ([56229d9](https://github.com/anthropics/anthropic-sdk-typescript/commit/56229d964733a8b00625dac4ff138b3ade7e4202)) + +## [0.6.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.6.1...v0.6.2) (2023-08-26) + + +### Bug Fixes + +* **stream:** declare Stream.controller as public ([#132](https://github.com/anthropics/anthropic-sdk-typescript/issues/132)) ([ff33a89](https://github.com/anthropics/anthropic-sdk-typescript/commit/ff33a893747aa708133bab14e97fba34ec776303)) + + +### Refactors + +* remove unnecessary line in constructor ([#131](https://github.com/anthropics/anthropic-sdk-typescript/issues/131)) ([dcdf5e5](https://github.com/anthropics/anthropic-sdk-typescript/commit/dcdf5e5183e99ae91d170ca09cc6da5e5637783f)) + + +### Chores + +* **internal:** add helper method ([#133](https://github.com/anthropics/anthropic-sdk-typescript/issues/133)) ([4c6950a](https://github.com/anthropics/anthropic-sdk-typescript/commit/4c6950a489b818151127aa1a39c239e4fd58a06e)) +* **internal:** export HeadersInit type shim ([#129](https://github.com/anthropics/anthropic-sdk-typescript/issues/129)) ([bcd51bd](https://github.com/anthropics/anthropic-sdk-typescript/commit/bcd51bd12ad0854baf28b59dcada871889032515)) + +## [0.6.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.6.0...v0.6.1) (2023-08-23) + + +### Features + +* allow a default timeout to be set for clients ([#113](https://github.com/anthropics/anthropic-sdk-typescript/issues/113)) ([1c5b2e2](https://github.com/anthropics/anthropic-sdk-typescript/commit/1c5b2e29926100a6e4a6176f0943e2c98991175d)) +* **client:** improve compatibility with Bun ([#119](https://github.com/anthropics/anthropic-sdk-typescript/issues/119)) ([fe4f5d5](https://github.com/anthropics/anthropic-sdk-typescript/commit/fe4f5d5e35e35cab2a62388eb595519e9c14635c)) +* **docs:** add documentation to the client constructor ([#118](https://github.com/anthropics/anthropic-sdk-typescript/issues/118)) ([79303f9](https://github.com/anthropics/anthropic-sdk-typescript/commit/79303f9c46a8248abd05fedbedbbed6e735c046d)) +* **types:** export RequestOptions type ([#127](https://github.com/anthropics/anthropic-sdk-typescript/issues/127)) ([9769751](https://github.com/anthropics/anthropic-sdk-typescript/commit/9769751b84853822e3e6596110ecb2c367f07438)) +* **types:** remove footgun with streaming params ([#125](https://github.com/anthropics/anthropic-sdk-typescript/issues/125)) ([3ed67b6](https://github.com/anthropics/anthropic-sdk-typescript/commit/3ed67b670bae14bc586df224aa57dd4dfa6e71f5)) + + +### Bug Fixes + +* **client:** fix TypeError when a request gets retried ([#117](https://github.com/anthropics/anthropic-sdk-typescript/issues/117)) ([0ade979](https://github.com/anthropics/anthropic-sdk-typescript/commit/0ade979a322c07f9a8f5322407b38352fe99b3ce)) +* **core:** fix navigator check for strange environments ([#124](https://github.com/anthropics/anthropic-sdk-typescript/issues/124)) ([c783604](https://github.com/anthropics/anthropic-sdk-typescript/commit/c7836040017d5ce35204c07be0b018e87e827fdb)) +* **types:** add catch-all overload to streaming methods ([#123](https://github.com/anthropics/anthropic-sdk-typescript/issues/123)) ([7c229a2](https://github.com/anthropics/anthropic-sdk-typescript/commit/7c229a24e6751bad22acb8c544113713140120fd)) + + +### Documentation + +* **readme:** fix typo ([#121](https://github.com/anthropics/anthropic-sdk-typescript/issues/121)) ([c5dbc3f](https://github.com/anthropics/anthropic-sdk-typescript/commit/c5dbc3fe89c84a728b6a4d7a4f6eadb228ac5688)) + + +### Chores + +* assign default reviewers to release PRs ([#115](https://github.com/anthropics/anthropic-sdk-typescript/issues/115)) ([1df3965](https://github.com/anthropics/anthropic-sdk-typescript/commit/1df3965a10256d30f8ce2af8d9890a26522117a9)) +* **internal:** add missing eslint-plugin-prettier ([#122](https://github.com/anthropics/anthropic-sdk-typescript/issues/122)) ([66bede0](https://github.com/anthropics/anthropic-sdk-typescript/commit/66bede0ae3ed7b5baa002bbb0c87b4156306f982)) +* **internal:** fix error happening in CloudFlare pages ([#116](https://github.com/anthropics/anthropic-sdk-typescript/issues/116)) ([b0dc7b3](https://github.com/anthropics/anthropic-sdk-typescript/commit/b0dc7b3b14520ce1f66c2b9d6a0f5aae4028985b)) +* **internal:** minor reformatting of code ([#120](https://github.com/anthropics/anthropic-sdk-typescript/issues/120)) ([4bcaf9e](https://github.com/anthropics/anthropic-sdk-typescript/commit/4bcaf9e30a312284cb22c2084e8242ad7d181ba8)) + +## [0.6.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.5.10...v0.6.0) (2023-08-12) + + +### Features + +* **client:** add support for accessing the raw response object ([#105](https://github.com/anthropics/anthropic-sdk-typescript/issues/105)) ([c86b059](https://github.com/anthropics/anthropic-sdk-typescript/commit/c86b0593a630f3adafc5c329019ea7028b6a41cd)) +* **client:** detect browser usage ([#101](https://github.com/anthropics/anthropic-sdk-typescript/issues/101)) ([f4cae3f](https://github.com/anthropics/anthropic-sdk-typescript/commit/f4cae3f63c2e65e087a7bf27dac1eeb8200e0a36)) +* **types:** improve streaming params types ([#102](https://github.com/anthropics/anthropic-sdk-typescript/issues/102)) ([cdf808c](https://github.com/anthropics/anthropic-sdk-typescript/commit/cdf808ca2a18cd744a5d1840e5e2adb3015e8d1d)) + + +### Documentation + +* **readme:** minor updates ([#107](https://github.com/anthropics/anthropic-sdk-typescript/issues/107)) ([406fd97](https://github.com/anthropics/anthropic-sdk-typescript/commit/406fd97d4cee0dd363ad548c9a251f78091a70e3)) +* **readme:** remove beta status + document versioning policy ([#100](https://github.com/anthropics/anthropic-sdk-typescript/issues/100)) ([e9ef3d2](https://github.com/anthropics/anthropic-sdk-typescript/commit/e9ef3d21a25e355d8bf94b7a941ad82ec5eafec8)) + + +### Chores + +* **docs:** remove trailing spaces ([#108](https://github.com/anthropics/anthropic-sdk-typescript/issues/108)) ([4ba2c6f](https://github.com/anthropics/anthropic-sdk-typescript/commit/4ba2c6f181521ed9a60ed45c35d2276129cd7a0b)) +* **internal:** conditionally include bin during build output ([#109](https://github.com/anthropics/anthropic-sdk-typescript/issues/109)) ([58ac305](https://github.com/anthropics/anthropic-sdk-typescript/commit/58ac305d752d6b5c378f91b988ddfb97231c003c)) +* **internal:** fix deno build ([#98](https://github.com/anthropics/anthropic-sdk-typescript/issues/98)) ([f011e04](https://github.com/anthropics/anthropic-sdk-typescript/commit/f011e041f2f9cabb12951013825c0f0a2a569053)) +* **internal:** remove deno build ([#103](https://github.com/anthropics/anthropic-sdk-typescript/issues/103)) ([9af1527](https://github.com/anthropics/anthropic-sdk-typescript/commit/9af152707a9bcf3027afc64f027566be25da2eb9)) + + +### Refactors + +* **client:** remove Stream.toReadableStream() ([#110](https://github.com/anthropics/anthropic-sdk-typescript/issues/110)) ([c370412](https://github.com/anthropics/anthropic-sdk-typescript/commit/c37041285ed9cccf6d980a953e14ffd4006a8acc)) + +## [0.5.10](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.5.9...v0.5.10) (2023-08-01) + + +### Refactors + +* create build for deno.land ([#93](https://github.com/anthropics/anthropic-sdk-typescript/issues/93)) ([2ea741a](https://github.com/anthropics/anthropic-sdk-typescript/commit/2ea741a4d4a3123b2eaafb87b73d7884c69ae23b)) + + +### Documentation + +* **readme:** add token counting reference ([#94](https://github.com/anthropics/anthropic-sdk-typescript/issues/94)) ([2c6a699](https://github.com/anthropics/anthropic-sdk-typescript/commit/2c6a699d499a3468fc4312a6b6c9493ffd1806a2)) + + +### Chores + +* **internal:** allow the build script to be run without yarn installed ([#91](https://github.com/anthropics/anthropic-sdk-typescript/issues/91)) ([9bd2b28](https://github.com/anthropics/anthropic-sdk-typescript/commit/9bd2b2871ca8a3b5f2466a904153d5c234094372)) +* **internal:** fix deno build ([#96](https://github.com/anthropics/anthropic-sdk-typescript/issues/96)) ([3fdab4e](https://github.com/anthropics/anthropic-sdk-typescript/commit/3fdab4e33b4c8668d17b8cddabbb09a22adf4124)) + +## [0.5.9](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.5.8...v0.5.9) (2023-07-29) + + +### Bug Fixes + +* **client:** handle undefined process in more places ([#87](https://github.com/anthropics/anthropic-sdk-typescript/issues/87)) ([d950c25](https://github.com/anthropics/anthropic-sdk-typescript/commit/d950c25469a6c6b0dd3cfecd282db078826366ba)) +* **examples:** avoid swallowing errors in example scripts ([#82](https://github.com/anthropics/anthropic-sdk-typescript/issues/82)) ([b27cfe9](https://github.com/anthropics/anthropic-sdk-typescript/commit/b27cfe9323bce983bb49f57dece98f1d9e507034)) +* fix undefined message in errors ([#86](https://github.com/anthropics/anthropic-sdk-typescript/issues/86)) ([5714a14](https://github.com/anthropics/anthropic-sdk-typescript/commit/5714a14d9af282a3d308b8694e6e03309d4b5642)) + + +### Chores + +* **internal:** minor refactoring of client instantiation ([#88](https://github.com/anthropics/anthropic-sdk-typescript/issues/88)) ([2c53e1c](https://github.com/anthropics/anthropic-sdk-typescript/commit/2c53e1ca28a444a48e5f1041d9eb9077608b3fc7)) + + +### Refactors + +* use destructuring arguments in client constructor and respect false values ([#89](https://github.com/anthropics/anthropic-sdk-typescript/issues/89)) ([8d4c686](https://github.com/anthropics/anthropic-sdk-typescript/commit/8d4c6860273bbd16027023700d521a5e48db76f7)) + +## [0.5.8](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.5.7...v0.5.8) (2023-07-22) + + +### Features + +* **streaming:** make requests immediately throw an error if an aborted signal is passed in ([#79](https://github.com/anthropics/anthropic-sdk-typescript/issues/79)) ([5c86597](https://github.com/anthropics/anthropic-sdk-typescript/commit/5c865979a21d18db87df43a9bdb27b701815f4bb)) + +## [0.5.7](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.5.6...v0.5.7) (2023-07-19) + + +### Features + +* add flexible enum to model param ([#73](https://github.com/anthropics/anthropic-sdk-typescript/issues/73)) ([a6bbcad](https://github.com/anthropics/anthropic-sdk-typescript/commit/a6bbcadb447060f3c2e60881d31d7b7fb7a50512)) +* **client:** export ClientOptions interface ([#75](https://github.com/anthropics/anthropic-sdk-typescript/issues/75)) ([0315ce1](https://github.com/anthropics/anthropic-sdk-typescript/commit/0315ce170db463ad900384ab7e4f62885cb471a2)) +* **deps:** remove unneeded qs dep ([#72](https://github.com/anthropics/anthropic-sdk-typescript/issues/72)) ([0aea5a6](https://github.com/anthropics/anthropic-sdk-typescript/commit/0aea5a6f4852f351ecbe9f46d6857a6fafc7e864)) + + +### Bug Fixes + +* **client:** fix errors with file uploads in the browser ([#76](https://github.com/anthropics/anthropic-sdk-typescript/issues/76)) ([ac48fa7](https://github.com/anthropics/anthropic-sdk-typescript/commit/ac48fa72bb764b2abed95f200bc658f65725e2b3)) +* fix error in environments without `TextEncoder` ([#70](https://github.com/anthropics/anthropic-sdk-typescript/issues/70)) ([5b78e05](https://github.com/anthropics/anthropic-sdk-typescript/commit/5b78e0586fd351258ccc05c8ba89a2ba66681b0d)) +* fix export map order ([#74](https://github.com/anthropics/anthropic-sdk-typescript/issues/74)) ([51e70cb](https://github.com/anthropics/anthropic-sdk-typescript/commit/51e70cb9b55128d4de1b0597fad475d0f4bc836c)) + +## [0.5.6](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.5.5...v0.5.6) (2023-07-15) + + +### Bug Fixes + +* fix errors with "named" client export in CJS ([#67](https://github.com/anthropics/anthropic-sdk-typescript/issues/67)) ([08ef69c](https://github.com/anthropics/anthropic-sdk-typescript/commit/08ef69cca87bbdf82440d163611f45e04e894234)) + +## [0.5.5](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.5.4...v0.5.5) (2023-07-13) + + +### Features + +* **client:** add support for passing a `signal` request option ([#55](https://github.com/anthropics/anthropic-sdk-typescript/issues/55)) ([09604e9](https://github.com/anthropics/anthropic-sdk-typescript/commit/09604e9990e13dd703f4bcfd0a241b8ec2ebbc71)) + + +### Bug Fixes + +* **streaming:** do not abort successfully completed streams ([#53](https://github.com/anthropics/anthropic-sdk-typescript/issues/53)) ([950dd49](https://github.com/anthropics/anthropic-sdk-typescript/commit/950dd4930429010d89ae31eef9ebb193be9517ad)) + + +### Documentation + +* **examples:** bump model to claude-2 in example scripts ([#57](https://github.com/anthropics/anthropic-sdk-typescript/issues/57)) ([f85c05d](https://github.com/anthropics/anthropic-sdk-typescript/commit/f85c05d49a7a9db1deb8eed9124934da763b721b)) +* **readme:** improvements to formatting code snippets ([#58](https://github.com/anthropics/anthropic-sdk-typescript/issues/58)) ([67bae64](https://github.com/anthropics/anthropic-sdk-typescript/commit/67bae64d5388e7e71ea3a891b3579c072b743f38)) + + +### Chores + +* **internal:** add helper function for b64 ([#62](https://github.com/anthropics/anthropic-sdk-typescript/issues/62)) ([04e303c](https://github.com/anthropics/anthropic-sdk-typescript/commit/04e303c5cc7b14a862b81379d547b3dc6e908720)) +* **internal:** let `toFile` helper accept promises to objects with name/type properties ([#63](https://github.com/anthropics/anthropic-sdk-typescript/issues/63)) ([93f9af2](https://github.com/anthropics/anthropic-sdk-typescript/commit/93f9af29a91cfced533d309d1816c58bc2efa355)) +* **internal:** remove unneeded type var usage ([#59](https://github.com/anthropics/anthropic-sdk-typescript/issues/59)) ([42fc4a9](https://github.com/anthropics/anthropic-sdk-typescript/commit/42fc4a90cc267f077b26d2bafebe487a74cae067)) + +## [0.5.4](https://github.com/anthropics/anthropic-sdk-typescript/compare/v0.5.3...v0.5.4) (2023-07-11) + + +### Features + +* **api:** reference claude-2 in examples ([#50](https://github.com/anthropics/anthropic-sdk-typescript/issues/50)) ([7c53ded](https://github.com/anthropics/anthropic-sdk-typescript/commit/7c53ded6b7f5f3efec0df295181f18469c37e09d)) +* **client:** support passing a custom `fetch` function ([#46](https://github.com/anthropics/anthropic-sdk-typescript/issues/46)) ([7d54366](https://github.com/anthropics/anthropic-sdk-typescript/commit/7d54366fcefa0267e831a0cca4d10c9a146d9f6c)) + + +### Bug Fixes + +* **client:** properly handle multi-byte characters in Content-Length ([#47](https://github.com/anthropics/anthropic-sdk-typescript/issues/47)) ([8dfff26](https://github.com/anthropics/anthropic-sdk-typescript/commit/8dfff2691a3ebd5721462c055d8da638ac77e571)) + + +### Refactors + +* **streaming:** make response body streaming polyfill more spec-compliant ([#44](https://github.com/anthropics/anthropic-sdk-typescript/issues/44)) ([047d328](https://github.com/anthropics/anthropic-sdk-typescript/commit/047d328cb0968fb1926e41326d35b595ba3fb3bc)) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2a99ebe363281bb736ac01b53ec5d24c335fd18b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts @@ -0,0 +1,3 @@ +declare const partialParse: (input: string) => unknown; +export { partialParse }; +//# sourceMappingURL=parser.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b484f34cd1cf343f659694713d811df48bcd2e19 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.d.mts @@ -0,0 +1,2 @@ +export * from "./core/api-promise.mjs"; +//# sourceMappingURL=api-promise.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b17a940fa7f48aef32176e205290b5b5acae729c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"api-promise.d.mts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..05d2f025ff42f5deed93fa4562fd764e1d55cac7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"api-promise.mjs","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/bin/cli b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/bin/cli new file mode 100644 index 0000000000000000000000000000000000000000..00d7c372f38fcedc51b53e2bb0cc6e5e07592341 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/bin/cli @@ -0,0 +1,53 @@ +#!/usr/bin/env node + +const { spawnSync } = require('child_process'); + +const commands = { + migrate: { + description: + 'Run migrations to update your code using @anthropic-ai/sdk@0.41 to be compatible with @anthropic-ai/sdk@0.50', + fn: () => { + const result = spawnSync( + 'npx', + [ + '-y', + 'https://github.com/stainless-api/migrate-ts/releases/download/0.0.2/stainless-api-migrate-0.0.2-6.tgz', + '--migrationConfig', + require.resolve('./migration-config.json'), + ...process.argv.slice(3), + ], + { stdio: 'inherit' }, + ); + if (result.status !== 0) { + process.exit(result.status); + } + }, + }, +}; + +function exitWithHelp() { + console.log(`Usage: anthropic-ai-sdk `); + console.log(); + console.log('Subcommands:'); + + for (const [name, info] of Object.entries(commands)) { + console.log(` ${name} ${info.description}`); + } + + console.log(); + process.exit(1); +} + +if (process.argv.length < 3) { + exitWithHelp(); +} + +const commandName = process.argv[2]; + +const command = commands[commandName]; +if (!command) { + console.log(`Unknown subcommand ${commandName}.`); + exitWithHelp(); +} + +command.fn(); diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/bin/migration-config.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/bin/migration-config.json new file mode 100644 index 0000000000000000000000000000000000000000..88a4afd5afb804eee63ef912869bcba434127936 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/bin/migration-config.json @@ -0,0 +1,7 @@ +{ + "pkg": "@anthropic-ai/sdk", + "githubRepo": "https://github.com/anthropics/anthropic-sdk-typescript", + "clientClass": "Anthropic", + "baseClientClass": "BaseAnthropic", + "methods": [] +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0d2573b06baa2043f7a170ce5d7b333cebb94ced --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.d.mts @@ -0,0 +1,225 @@ +import type { RequestInit, RequestInfo } from "./internal/builtin-types.mjs"; +import type { PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from "./internal/types.mjs"; +import { type Logger, type LogLevel } from "./internal/utils/log.mjs"; +export type { Logger, LogLevel } from "./internal/utils/log.mjs"; +import * as Opts from "./internal/request-options.mjs"; +import * as Errors from "./core/error.mjs"; +import * as Pagination from "./core/pagination.mjs"; +import { type PageParams, PageResponse } from "./core/pagination.mjs"; +import * as Uploads from "./core/uploads.mjs"; +import * as API from "./resources/index.mjs"; +import { APIPromise } from "./core/api-promise.mjs"; +import { type Fetch } from "./internal/builtin-types.mjs"; +import { HeadersLike, NullableHeaders } from "./internal/headers.mjs"; +import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs"; +import { Completion, CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, Completions } from "./resources/completions.mjs"; +import { ModelInfo, ModelInfosPage, ModelListParams, ModelRetrieveParams, Models } from "./resources/models.mjs"; +import { AnthropicBeta, Beta, BetaAPIError, BetaAuthenticationError, BetaBillingError, BetaError, BetaErrorResponse, BetaGatewayTimeoutError, BetaInvalidRequestError, BetaNotFoundError, BetaOverloadedError, BetaPermissionError, BetaRateLimitError } from "./resources/beta/beta.mjs"; +import { Base64ImageSource, Base64PDFSource, CacheControlEphemeral, CitationCharLocation, CitationCharLocationParam, CitationContentBlockLocation, CitationContentBlockLocationParam, CitationPageLocation, CitationPageLocationParam, CitationWebSearchResultLocationParam, CitationsConfigParam, CitationsDelta, CitationsWebSearchResultLocation, ContentBlock, ContentBlockDeltaEvent, ContentBlockParam, ContentBlockStartEvent, ContentBlockStopEvent, ContentBlockSource, ContentBlockSourceContent, DocumentBlockParam, ImageBlockParam, InputJSONDelta, Message, MessageStreamParams, MessageCountTokensParams, MessageCountTokensTool, MessageCreateParams, MessageCreateParamsNonStreaming, MessageCreateParamsStreaming, MessageDeltaEvent, MessageDeltaUsage, MessageParam, MessageStartEvent, MessageStopEvent, MessageStreamEvent, MessageTokensCount, Messages, Metadata, Model, PlainTextSource, RawContentBlockDelta, RawContentBlockDeltaEvent, RawContentBlockStartEvent, RawContentBlockStopEvent, RawMessageDeltaEvent, RawMessageStartEvent, RawMessageStopEvent, RawMessageStreamEvent, RedactedThinkingBlock, RedactedThinkingBlockParam, ServerToolUsage, ServerToolUseBlock, ServerToolUseBlockParam, SignatureDelta, StopReason, TextBlock, TextBlockParam, TextCitation, TextCitationParam, TextDelta, ThinkingBlock, ThinkingBlockParam, ThinkingConfigDisabled, ThinkingConfigEnabled, ThinkingConfigParam, ThinkingDelta, Tool, ToolBash20250124, ToolChoice, ToolChoiceAny, ToolChoiceAuto, ToolChoiceNone, ToolChoiceTool, ToolResultBlockParam, ToolTextEditor20250124, ToolUnion, ToolUseBlock, ToolUseBlockParam, URLImageSource, URLPDFSource, Usage, WebSearchResultBlock, WebSearchResultBlockParam, WebSearchTool20250305, WebSearchToolRequestError, WebSearchToolResultBlock, WebSearchToolResultBlockContent, WebSearchToolResultBlockParam, WebSearchToolResultBlockParamContent, WebSearchToolResultError } from "./resources/messages/messages.mjs"; +export interface ClientOptions { + /** + * Defaults to process.env['ANTHROPIC_API_KEY']. + */ + apiKey?: string | null | undefined; + /** + * Defaults to process.env['ANTHROPIC_AUTH_TOKEN']. + */ + authToken?: string | null | undefined; + /** + * Override the default base URL for the API, e.g., "https://api.example.com/v2/" + * + * Defaults to process.env['ANTHROPIC_BASE_URL']. + */ + baseURL?: string | null | undefined; + /** + * The maximum amount of time (in milliseconds) that the client should wait for a response + * from the server before timing out a single request. + * + * Note that request timeouts are retried by default, so in a worst-case scenario you may wait + * much longer than this timeout before the promise succeeds or fails. + */ + timeout?: number | undefined; + /** + * Additional `RequestInit` options to be passed to `fetch` calls. + * Properties will be overridden by per-request `fetchOptions`. + */ + fetchOptions?: MergedRequestInit | undefined; + /** + * Specify a custom `fetch` function implementation. + * + * If not provided, we expect that `fetch` is defined globally. + */ + fetch?: Fetch | undefined; + /** + * The maximum number of times that the client will retry a request in case of a + * temporary failure, like a network error or a 5XX error from the server. + * + * @default 2 + */ + maxRetries?: number | undefined; + /** + * Default headers to include with every request to the API. + * + * These can be removed in individual requests by explicitly setting the + * header to `null` in request options. + */ + defaultHeaders?: HeadersLike | undefined; + /** + * Default query parameters to include with every request to the API. + * + * These can be removed in individual requests by explicitly setting the + * param to `undefined` in request options. + */ + defaultQuery?: Record | undefined; + /** + * By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. + * Only set this option to `true` if you understand the risks and have appropriate mitigations in place. + */ + dangerouslyAllowBrowser?: boolean | undefined; + /** + * Set the log level. + * + * Defaults to process.env['ANTHROPIC_LOG'] or 'warn' if it isn't set. + */ + logLevel?: LogLevel | undefined; + /** + * Set the logger. + * + * Defaults to globalThis.console. + */ + logger?: Logger | undefined; +} +export declare class BaseAnthropic { + #private; + apiKey: string | null; + authToken: string | null; + baseURL: string; + maxRetries: number; + timeout: number; + logger: Logger | undefined; + logLevel: LogLevel | undefined; + fetchOptions: MergedRequestInit | undefined; + private fetch; + protected idempotencyHeader?: string; + private _options; + /** + * API Client for interfacing with the Anthropic API. + * + * @param {string | null | undefined} [opts.apiKey=process.env['ANTHROPIC_API_KEY'] ?? null] + * @param {string | null | undefined} [opts.authToken=process.env['ANTHROPIC_AUTH_TOKEN'] ?? null] + * @param {string} [opts.baseURL=process.env['ANTHROPIC_BASE_URL'] ?? https://api.anthropic.com] - Override the default base URL for the API. + * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out. + * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls. + * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation. + * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request. + * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API. + * @param {Record} opts.defaultQuery - Default query parameters to include with every request to the API. + * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. + */ + constructor({ baseURL, apiKey, authToken, ...opts }?: ClientOptions); + /** + * Create a new client instance re-using the same options given to the current client with optional overriding. + */ + withOptions(options: Partial): this; + protected defaultQuery(): Record | undefined; + protected validateHeaders({ values, nulls }: NullableHeaders): void; + protected authHeaders(opts: FinalRequestOptions): NullableHeaders | undefined; + protected apiKeyAuth(opts: FinalRequestOptions): NullableHeaders | undefined; + protected bearerAuth(opts: FinalRequestOptions): NullableHeaders | undefined; + /** + * Basic re-implementation of `qs.stringify` for primitive types. + */ + protected stringifyQuery(query: Record): string; + private getUserAgent; + protected defaultIdempotencyKey(): string; + protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError; + buildURL(path: string, query: Record | null | undefined): string; + _calculateNonstreamingTimeout(maxTokens: number): number; + /** + * Used as a callback for mutating the given `FinalRequestOptions` object. + */ + protected prepareOptions(options: FinalRequestOptions): Promise; + /** + * Used as a callback for mutating the given `RequestInit` object. + * + * This is useful for cases where you want to add certain headers based off of + * the request properties, e.g. `method` or `url`. + */ + protected prepareRequest(request: RequestInit, { url, options }: { + url: string; + options: FinalRequestOptions; + }): Promise; + get(path: string, opts?: PromiseOrValue): APIPromise; + post(path: string, opts?: PromiseOrValue): APIPromise; + patch(path: string, opts?: PromiseOrValue): APIPromise; + put(path: string, opts?: PromiseOrValue): APIPromise; + delete(path: string, opts?: PromiseOrValue): APIPromise; + private methodRequest; + request(options: PromiseOrValue, remainingRetries?: number | null): APIPromise; + private makeRequest; + getAPIList = Pagination.AbstractPage>(path: string, Page: new (...args: any[]) => PageClass, opts?: RequestOptions): Pagination.PagePromise; + requestAPIList = Pagination.AbstractPage>(Page: new (...args: ConstructorParameters) => PageClass, options: FinalRequestOptions): Pagination.PagePromise; + fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise; + private shouldRetry; + private retryRequest; + private calculateDefaultRetryTimeoutMillis; + calculateNonstreamingTimeout(maxTokens: number, maxNonstreamingTokens?: number): number; + buildRequest(inputOptions: FinalRequestOptions, { retryCount }?: { + retryCount?: number; + }): { + req: FinalizedRequestInit; + url: string; + timeout: number; + }; + private buildHeaders; + private buildBody; + static Anthropic: typeof BaseAnthropic; + static HUMAN_PROMPT: string; + static AI_PROMPT: string; + static DEFAULT_TIMEOUT: number; + static AnthropicError: typeof Errors.AnthropicError; + static APIError: typeof Errors.APIError; + static APIConnectionError: typeof Errors.APIConnectionError; + static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError; + static APIUserAbortError: typeof Errors.APIUserAbortError; + static NotFoundError: typeof Errors.NotFoundError; + static ConflictError: typeof Errors.ConflictError; + static RateLimitError: typeof Errors.RateLimitError; + static BadRequestError: typeof Errors.BadRequestError; + static AuthenticationError: typeof Errors.AuthenticationError; + static InternalServerError: typeof Errors.InternalServerError; + static PermissionDeniedError: typeof Errors.PermissionDeniedError; + static UnprocessableEntityError: typeof Errors.UnprocessableEntityError; + static toFile: typeof Uploads.toFile; +} +/** + * API Client for interfacing with the Anthropic API. + */ +export declare class Anthropic extends BaseAnthropic { + completions: API.Completions; + messages: API.Messages; + models: API.Models; + beta: API.Beta; +} +export declare namespace Anthropic { + export type RequestOptions = Opts.RequestOptions; + export import Page = Pagination.Page; + export { type PageParams as PageParams, type PageResponse as PageResponse }; + export { Completions as Completions, type Completion as Completion, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, }; + export { Messages as Messages, type Base64ImageSource as Base64ImageSource, type Base64PDFSource as Base64PDFSource, type CacheControlEphemeral as CacheControlEphemeral, type CitationCharLocation as CitationCharLocation, type CitationCharLocationParam as CitationCharLocationParam, type CitationContentBlockLocation as CitationContentBlockLocation, type CitationContentBlockLocationParam as CitationContentBlockLocationParam, type CitationPageLocation as CitationPageLocation, type CitationPageLocationParam as CitationPageLocationParam, type CitationWebSearchResultLocationParam as CitationWebSearchResultLocationParam, type CitationsConfigParam as CitationsConfigParam, type CitationsDelta as CitationsDelta, type CitationsWebSearchResultLocation as CitationsWebSearchResultLocation, type ContentBlock as ContentBlock, type ContentBlockDeltaEvent as ContentBlockDeltaEvent, type ContentBlockParam as ContentBlockParam, type ContentBlockStartEvent as ContentBlockStartEvent, type ContentBlockStopEvent as ContentBlockStopEvent, type ContentBlockSource as ContentBlockSource, type ContentBlockSourceContent as ContentBlockSourceContent, type DocumentBlockParam as DocumentBlockParam, type ImageBlockParam as ImageBlockParam, type InputJSONDelta as InputJSONDelta, type Message as Message, type MessageCountTokensTool as MessageCountTokensTool, type MessageDeltaEvent as MessageDeltaEvent, type MessageDeltaUsage as MessageDeltaUsage, type MessageParam as MessageParam, type MessageStartEvent as MessageStartEvent, type MessageStopEvent as MessageStopEvent, type MessageStreamEvent as MessageStreamEvent, type MessageTokensCount as MessageTokensCount, type Metadata as Metadata, type Model as Model, type PlainTextSource as PlainTextSource, type RawContentBlockDelta as RawContentBlockDelta, type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, type RawContentBlockStartEvent as RawContentBlockStartEvent, type RawContentBlockStopEvent as RawContentBlockStopEvent, type RawMessageDeltaEvent as RawMessageDeltaEvent, type RawMessageStartEvent as RawMessageStartEvent, type RawMessageStopEvent as RawMessageStopEvent, type RawMessageStreamEvent as RawMessageStreamEvent, type RedactedThinkingBlock as RedactedThinkingBlock, type RedactedThinkingBlockParam as RedactedThinkingBlockParam, type ServerToolUsage as ServerToolUsage, type ServerToolUseBlock as ServerToolUseBlock, type ServerToolUseBlockParam as ServerToolUseBlockParam, type SignatureDelta as SignatureDelta, type StopReason as StopReason, type TextBlock as TextBlock, type TextBlockParam as TextBlockParam, type TextCitation as TextCitation, type TextCitationParam as TextCitationParam, type TextDelta as TextDelta, type ThinkingBlock as ThinkingBlock, type ThinkingBlockParam as ThinkingBlockParam, type ThinkingConfigDisabled as ThinkingConfigDisabled, type ThinkingConfigEnabled as ThinkingConfigEnabled, type ThinkingConfigParam as ThinkingConfigParam, type ThinkingDelta as ThinkingDelta, type Tool as Tool, type ToolBash20250124 as ToolBash20250124, type ToolChoice as ToolChoice, type ToolChoiceAny as ToolChoiceAny, type ToolChoiceAuto as ToolChoiceAuto, type ToolChoiceNone as ToolChoiceNone, type ToolChoiceTool as ToolChoiceTool, type ToolResultBlockParam as ToolResultBlockParam, type ToolTextEditor20250124 as ToolTextEditor20250124, type ToolUnion as ToolUnion, type ToolUseBlock as ToolUseBlock, type ToolUseBlockParam as ToolUseBlockParam, type URLImageSource as URLImageSource, type URLPDFSource as URLPDFSource, type Usage as Usage, type WebSearchResultBlock as WebSearchResultBlock, type WebSearchResultBlockParam as WebSearchResultBlockParam, type WebSearchTool20250305 as WebSearchTool20250305, type WebSearchToolRequestError as WebSearchToolRequestError, type WebSearchToolResultBlock as WebSearchToolResultBlock, type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam as WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent as WebSearchToolResultBlockParamContent, type WebSearchToolResultError as WebSearchToolResultError, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageStreamParams as MessageStreamParams, type MessageCountTokensParams as MessageCountTokensParams, }; + export { Models as Models, type ModelInfo as ModelInfo, type ModelInfosPage as ModelInfosPage, type ModelRetrieveParams as ModelRetrieveParams, type ModelListParams as ModelListParams, }; + export { Beta as Beta, type AnthropicBeta as AnthropicBeta, type BetaAPIError as BetaAPIError, type BetaAuthenticationError as BetaAuthenticationError, type BetaBillingError as BetaBillingError, type BetaError as BetaError, type BetaErrorResponse as BetaErrorResponse, type BetaGatewayTimeoutError as BetaGatewayTimeoutError, type BetaInvalidRequestError as BetaInvalidRequestError, type BetaNotFoundError as BetaNotFoundError, type BetaOverloadedError as BetaOverloadedError, type BetaPermissionError as BetaPermissionError, type BetaRateLimitError as BetaRateLimitError, }; + export type APIErrorObject = API.APIErrorObject; + export type AuthenticationError = API.AuthenticationError; + export type BillingError = API.BillingError; + export type ErrorObject = API.ErrorObject; + export type ErrorResponse = API.ErrorResponse; + export type GatewayTimeoutError = API.GatewayTimeoutError; + export type InvalidRequestError = API.InvalidRequestError; + export type NotFoundError = API.NotFoundError; + export type OverloadedError = API.OverloadedError; + export type PermissionError = API.PermissionError; + export type RateLimitError = API.RateLimitError; +} +export declare const HUMAN_PROMPT: string, AI_PROMPT: string; +//# sourceMappingURL=client.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..3eca2e3c63676a08351f16f437c84b560e04311c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;OAI5E,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAiB;YACxC,EAAE,MAAM,EAAE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I,IAAI,EACZ,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;IAChD,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAC1D,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC5C,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;IAC1C,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;IAC9C,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAC1D,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAC1D,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;IAC9C,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IAClD,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IAClD,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;CACjD;AACD,eAAO,MAAQ,YAAY,UAAE,SAAS,QAAc,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.js new file mode 100644 index 0000000000000000000000000000000000000000..5b958ceb31c64d9d760a7a3721b6b3101328853d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.js @@ -0,0 +1,536 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _a, _BaseAnthropic_encoder; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AI_PROMPT = exports.HUMAN_PROMPT = exports.Anthropic = exports.BaseAnthropic = void 0; +const tslib_1 = require("./internal/tslib.js"); +const uuid_1 = require("./internal/utils/uuid.js"); +const values_1 = require("./internal/utils/values.js"); +const sleep_1 = require("./internal/utils/sleep.js"); +const log_1 = require("./internal/utils/log.js"); +const errors_1 = require("./internal/errors.js"); +const detect_platform_1 = require("./internal/detect-platform.js"); +const Shims = tslib_1.__importStar(require("./internal/shims.js")); +const Opts = tslib_1.__importStar(require("./internal/request-options.js")); +const version_1 = require("./version.js"); +const Errors = tslib_1.__importStar(require("./core/error.js")); +const Pagination = tslib_1.__importStar(require("./core/pagination.js")); +const Uploads = tslib_1.__importStar(require("./core/uploads.js")); +const API = tslib_1.__importStar(require("./resources/index.js")); +const api_promise_1 = require("./core/api-promise.js"); +const detect_platform_2 = require("./internal/detect-platform.js"); +const headers_1 = require("./internal/headers.js"); +const completions_1 = require("./resources/completions.js"); +const models_1 = require("./resources/models.js"); +const env_1 = require("./internal/utils/env.js"); +const log_2 = require("./internal/utils/log.js"); +const values_2 = require("./internal/utils/values.js"); +const beta_1 = require("./resources/beta/beta.js"); +const messages_1 = require("./resources/messages/messages.js"); +class BaseAnthropic { + /** + * API Client for interfacing with the Anthropic API. + * + * @param {string | null | undefined} [opts.apiKey=process.env['ANTHROPIC_API_KEY'] ?? null] + * @param {string | null | undefined} [opts.authToken=process.env['ANTHROPIC_AUTH_TOKEN'] ?? null] + * @param {string} [opts.baseURL=process.env['ANTHROPIC_BASE_URL'] ?? https://api.anthropic.com] - Override the default base URL for the API. + * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out. + * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls. + * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation. + * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request. + * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API. + * @param {Record} opts.defaultQuery - Default query parameters to include with every request to the API. + * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. + */ + constructor({ baseURL = (0, env_1.readEnv)('ANTHROPIC_BASE_URL'), apiKey = (0, env_1.readEnv)('ANTHROPIC_API_KEY') ?? null, authToken = (0, env_1.readEnv)('ANTHROPIC_AUTH_TOKEN') ?? null, ...opts } = {}) { + _BaseAnthropic_encoder.set(this, void 0); + const options = { + apiKey, + authToken, + ...opts, + baseURL: baseURL || `https://api.anthropic.com`, + }; + if (!options.dangerouslyAllowBrowser && (0, detect_platform_2.isRunningInBrowser)()) { + throw new Errors.AnthropicError("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew Anthropic({ apiKey, dangerouslyAllowBrowser: true });\n"); + } + this.baseURL = options.baseURL; + this.timeout = options.timeout ?? Anthropic.DEFAULT_TIMEOUT /* 10 minutes */; + this.logger = options.logger ?? console; + const defaultLogLevel = 'warn'; + // Set default logLevel early so that we can log a warning in parseLogLevel. + this.logLevel = defaultLogLevel; + this.logLevel = + (0, log_1.parseLogLevel)(options.logLevel, 'ClientOptions.logLevel', this) ?? + (0, log_1.parseLogLevel)((0, env_1.readEnv)('ANTHROPIC_LOG'), "process.env['ANTHROPIC_LOG']", this) ?? + defaultLogLevel; + this.fetchOptions = options.fetchOptions; + this.maxRetries = options.maxRetries ?? 2; + this.fetch = options.fetch ?? Shims.getDefaultFetch(); + tslib_1.__classPrivateFieldSet(this, _BaseAnthropic_encoder, Opts.FallbackEncoder, "f"); + this._options = options; + this.apiKey = apiKey; + this.authToken = authToken; + } + /** + * Create a new client instance re-using the same options given to the current client with optional overriding. + */ + withOptions(options) { + return new this.constructor({ + ...this._options, + baseURL: this.baseURL, + maxRetries: this.maxRetries, + timeout: this.timeout, + logger: this.logger, + logLevel: this.logLevel, + fetchOptions: this.fetchOptions, + apiKey: this.apiKey, + authToken: this.authToken, + ...options, + }); + } + defaultQuery() { + return this._options.defaultQuery; + } + validateHeaders({ values, nulls }) { + if (this.apiKey && values.get('x-api-key')) { + return; + } + if (nulls.has('x-api-key')) { + return; + } + if (this.authToken && values.get('authorization')) { + return; + } + if (nulls.has('authorization')) { + return; + } + throw new Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted'); + } + authHeaders(opts) { + return (0, headers_1.buildHeaders)([this.apiKeyAuth(opts), this.bearerAuth(opts)]); + } + apiKeyAuth(opts) { + if (this.apiKey == null) { + return undefined; + } + return (0, headers_1.buildHeaders)([{ 'X-Api-Key': this.apiKey }]); + } + bearerAuth(opts) { + if (this.authToken == null) { + return undefined; + } + return (0, headers_1.buildHeaders)([{ Authorization: `Bearer ${this.authToken}` }]); + } + /** + * Basic re-implementation of `qs.stringify` for primitive types. + */ + stringifyQuery(query) { + return Object.entries(query) + .filter(([_, value]) => typeof value !== 'undefined') + .map(([key, value]) => { + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; + } + if (value === null) { + return `${encodeURIComponent(key)}=`; + } + throw new Errors.AnthropicError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`); + }) + .join('&'); + } + getUserAgent() { + return `${this.constructor.name}/JS ${version_1.VERSION}`; + } + defaultIdempotencyKey() { + return `stainless-node-retry-${(0, uuid_1.uuid4)()}`; + } + makeStatusError(status, error, message, headers) { + return Errors.APIError.generate(status, error, message, headers); + } + buildURL(path, query) { + const url = (0, values_1.isAbsoluteURL)(path) ? + new URL(path) + : new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); + const defaultQuery = this.defaultQuery(); + if (!(0, values_2.isEmptyObj)(defaultQuery)) { + query = { ...defaultQuery, ...query }; + } + if (typeof query === 'object' && query && !Array.isArray(query)) { + url.search = this.stringifyQuery(query); + } + return url.toString(); + } + _calculateNonstreamingTimeout(maxTokens) { + const defaultTimeout = 10 * 60; + const expectedTimeout = (60 * 60 * maxTokens) / 128000; + if (expectedTimeout > defaultTimeout) { + throw new Errors.AnthropicError('Streaming is strongly recommended for operations that may take longer than 10 minutes. ' + + 'See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details'); + } + return defaultTimeout * 1000; + } + /** + * Used as a callback for mutating the given `FinalRequestOptions` object. + */ + async prepareOptions(options) { } + /** + * Used as a callback for mutating the given `RequestInit` object. + * + * This is useful for cases where you want to add certain headers based off of + * the request properties, e.g. `method` or `url`. + */ + async prepareRequest(request, { url, options }) { } + get(path, opts) { + return this.methodRequest('get', path, opts); + } + post(path, opts) { + return this.methodRequest('post', path, opts); + } + patch(path, opts) { + return this.methodRequest('patch', path, opts); + } + put(path, opts) { + return this.methodRequest('put', path, opts); + } + delete(path, opts) { + return this.methodRequest('delete', path, opts); + } + methodRequest(method, path, opts) { + return this.request(Promise.resolve(opts).then((opts) => { + return { method, path, ...opts }; + })); + } + request(options, remainingRetries = null) { + return new api_promise_1.APIPromise(this, this.makeRequest(options, remainingRetries, undefined)); + } + async makeRequest(optionsInput, retriesRemaining, retryOfRequestLogID) { + const options = await optionsInput; + const maxRetries = options.maxRetries ?? this.maxRetries; + if (retriesRemaining == null) { + retriesRemaining = maxRetries; + } + await this.prepareOptions(options); + const { req, url, timeout } = this.buildRequest(options, { retryCount: maxRetries - retriesRemaining }); + await this.prepareRequest(req, { url, options }); + /** Not an API request ID, just for correlating local log entries. */ + const requestLogID = 'log_' + ((Math.random() * (1 << 24)) | 0).toString(16).padStart(6, '0'); + const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`; + const startTime = Date.now(); + (0, log_2.loggerFor)(this).debug(`[${requestLogID}] sending request`, (0, log_2.formatRequestDetails)({ + retryOfRequestLogID, + method: options.method, + url, + options, + headers: req.headers, + })); + if (options.signal?.aborted) { + throw new Errors.APIUserAbortError(); + } + const controller = new AbortController(); + const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(errors_1.castToError); + const headersTime = Date.now(); + if (response instanceof Error) { + const retryMessage = `retrying, ${retriesRemaining} attempts remaining`; + if (options.signal?.aborted) { + throw new Errors.APIUserAbortError(); + } + // detect native connection timeout errors + // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)" + // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)" + // others do not provide enough information to distinguish timeouts from other connection errors + const isTimeout = (0, errors_1.isAbortError)(response) || + /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')); + if (retriesRemaining) { + (0, log_2.loggerFor)(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`); + (0, log_2.loggerFor)(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, (0, log_2.formatRequestDetails)({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + })); + return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID); + } + (0, log_2.loggerFor)(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`); + (0, log_2.loggerFor)(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, (0, log_2.formatRequestDetails)({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + })); + if (isTimeout) { + throw new Errors.APIConnectionTimeoutError(); + } + throw new Errors.APIConnectionError({ cause: response }); + } + const specialHeaders = [...response.headers.entries()] + .filter(([name]) => name === 'request-id') + .map(([name, value]) => ', ' + name + ': ' + JSON.stringify(value)) + .join(''); + const responseInfo = `[${requestLogID}${retryLogStr}${specialHeaders}] ${req.method} ${url} ${response.ok ? 'succeeded' : 'failed'} with status ${response.status} in ${headersTime - startTime}ms`; + if (!response.ok) { + const shouldRetry = this.shouldRetry(response); + if (retriesRemaining && shouldRetry) { + const retryMessage = `retrying, ${retriesRemaining} attempts remaining`; + // We don't need the body of this response. + await Shims.CancelReadableStream(response.body); + (0, log_2.loggerFor)(this).info(`${responseInfo} - ${retryMessage}`); + (0, log_2.loggerFor)(this).debug(`[${requestLogID}] response error (${retryMessage})`, (0, log_2.formatRequestDetails)({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + })); + return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID, response.headers); + } + const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`; + (0, log_2.loggerFor)(this).info(`${responseInfo} - ${retryMessage}`); + const errText = await response.text().catch((err) => (0, errors_1.castToError)(err).message); + const errJSON = (0, values_1.safeJSON)(errText); + const errMessage = errJSON ? undefined : errText; + (0, log_2.loggerFor)(this).debug(`[${requestLogID}] response error (${retryMessage})`, (0, log_2.formatRequestDetails)({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + message: errMessage, + durationMs: Date.now() - startTime, + })); + const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers); + throw err; + } + (0, log_2.loggerFor)(this).info(responseInfo); + (0, log_2.loggerFor)(this).debug(`[${requestLogID}] response start`, (0, log_2.formatRequestDetails)({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + })); + return { response, options, controller, requestLogID, retryOfRequestLogID, startTime }; + } + getAPIList(path, Page, opts) { + return this.requestAPIList(Page, { method: 'get', path, ...opts }); + } + requestAPIList(Page, options) { + const request = this.makeRequest(options, null, undefined); + return new Pagination.PagePromise(this, request, Page); + } + async fetchWithTimeout(url, init, ms, controller) { + const { signal, method, ...options } = init || {}; + if (signal) + signal.addEventListener('abort', () => controller.abort()); + const timeout = setTimeout(() => controller.abort(), ms); + const isReadableBody = (globalThis.ReadableStream && options.body instanceof globalThis.ReadableStream) || + (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body); + const fetchOptions = { + signal: controller.signal, + ...(isReadableBody ? { duplex: 'half' } : {}), + method: 'GET', + ...options, + }; + if (method) { + // Custom methods like 'patch' need to be uppercased + // See https://github.com/nodejs/undici/issues/2294 + fetchOptions.method = method.toUpperCase(); + } + try { + // use undefined this binding; fetch errors if bound to something else in browser/cloudflare + return await this.fetch.call(undefined, url, fetchOptions); + } + finally { + clearTimeout(timeout); + } + } + shouldRetry(response) { + // Note this is not a standard header. + const shouldRetryHeader = response.headers.get('x-should-retry'); + // If the server explicitly says whether or not to retry, obey. + if (shouldRetryHeader === 'true') + return true; + if (shouldRetryHeader === 'false') + return false; + // Retry on request timeouts. + if (response.status === 408) + return true; + // Retry on lock timeouts. + if (response.status === 409) + return true; + // Retry on rate limits. + if (response.status === 429) + return true; + // Retry internal errors. + if (response.status >= 500) + return true; + return false; + } + async retryRequest(options, retriesRemaining, requestLogID, responseHeaders) { + let timeoutMillis; + // Note the `retry-after-ms` header may not be standard, but is a good idea and we'd like proactive support for it. + const retryAfterMillisHeader = responseHeaders?.get('retry-after-ms'); + if (retryAfterMillisHeader) { + const timeoutMs = parseFloat(retryAfterMillisHeader); + if (!Number.isNaN(timeoutMs)) { + timeoutMillis = timeoutMs; + } + } + // About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After + const retryAfterHeader = responseHeaders?.get('retry-after'); + if (retryAfterHeader && !timeoutMillis) { + const timeoutSeconds = parseFloat(retryAfterHeader); + if (!Number.isNaN(timeoutSeconds)) { + timeoutMillis = timeoutSeconds * 1000; + } + else { + timeoutMillis = Date.parse(retryAfterHeader) - Date.now(); + } + } + // If the API asks us to wait a certain amount of time (and it's a reasonable amount), + // just do what it says, but otherwise calculate a default + if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) { + const maxRetries = options.maxRetries ?? this.maxRetries; + timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries); + } + await (0, sleep_1.sleep)(timeoutMillis); + return this.makeRequest(options, retriesRemaining - 1, requestLogID); + } + calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries) { + const initialRetryDelay = 0.5; + const maxRetryDelay = 8.0; + const numRetries = maxRetries - retriesRemaining; + // Apply exponential backoff, but not more than the max. + const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay); + // Apply some jitter, take up to at most 25 percent of the retry time. + const jitter = 1 - Math.random() * 0.25; + return sleepSeconds * jitter * 1000; + } + calculateNonstreamingTimeout(maxTokens, maxNonstreamingTokens) { + const maxTime = 60 * 60 * 1000; // 10 minutes + const defaultTime = 60 * 10 * 1000; // 10 minutes + const expectedTime = (maxTime * maxTokens) / 128000; + if (expectedTime > defaultTime || (maxNonstreamingTokens != null && maxTokens > maxNonstreamingTokens)) { + throw new Errors.AnthropicError('Streaming is strongly recommended for operations that may token longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details'); + } + return defaultTime; + } + buildRequest(inputOptions, { retryCount = 0 } = {}) { + const options = { ...inputOptions }; + const { method, path, query } = options; + const url = this.buildURL(path, query); + if ('timeout' in options) + (0, values_1.validatePositiveInteger)('timeout', options.timeout); + options.timeout = options.timeout ?? this.timeout; + const { bodyHeaders, body } = this.buildBody({ options }); + const reqHeaders = this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount }); + const req = { + method, + headers: reqHeaders, + ...(options.signal && { signal: options.signal }), + ...(globalThis.ReadableStream && + body instanceof globalThis.ReadableStream && { duplex: 'half' }), + ...(body && { body }), + ...(this.fetchOptions ?? {}), + ...(options.fetchOptions ?? {}), + }; + return { req, url, timeout: options.timeout }; + } + buildHeaders({ options, method, bodyHeaders, retryCount, }) { + let idempotencyHeaders = {}; + if (this.idempotencyHeader && method !== 'get') { + if (!options.idempotencyKey) + options.idempotencyKey = this.defaultIdempotencyKey(); + idempotencyHeaders[this.idempotencyHeader] = options.idempotencyKey; + } + const headers = (0, headers_1.buildHeaders)([ + idempotencyHeaders, + { + Accept: 'application/json', + 'User-Agent': this.getUserAgent(), + 'X-Stainless-Retry-Count': String(retryCount), + ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), + ...(0, detect_platform_1.getPlatformHeaders)(), + ...(this._options.dangerouslyAllowBrowser ? + { 'anthropic-dangerous-direct-browser-access': 'true' } + : undefined), + 'anthropic-version': '2023-06-01', + }, + this.authHeaders(options), + this._options.defaultHeaders, + bodyHeaders, + options.headers, + ]); + this.validateHeaders(headers); + return headers.values; + } + buildBody({ options: { body, headers: rawHeaders } }) { + if (!body) { + return { bodyHeaders: undefined, body: undefined }; + } + const headers = (0, headers_1.buildHeaders)([rawHeaders]); + if ( + // Pass raw type verbatim + ArrayBuffer.isView(body) || + body instanceof ArrayBuffer || + body instanceof DataView || + (typeof body === 'string' && + // Preserve legacy string encoding behavior for now + headers.values.has('content-type')) || + // `Blob` is superset of `File` + body instanceof Blob || + // `FormData` -> `multipart/form-data` + body instanceof FormData || + // `URLSearchParams` -> `application/x-www-form-urlencoded` + body instanceof URLSearchParams || + // Send chunked stream (each chunk has own `length`) + (globalThis.ReadableStream && body instanceof globalThis.ReadableStream)) { + return { bodyHeaders: undefined, body: body }; + } + else if (typeof body === 'object' && + (Symbol.asyncIterator in body || + (Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))) { + return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body) }; + } + else { + return tslib_1.__classPrivateFieldGet(this, _BaseAnthropic_encoder, "f").call(this, { body, headers }); + } + } +} +exports.BaseAnthropic = BaseAnthropic; +_a = BaseAnthropic, _BaseAnthropic_encoder = new WeakMap(); +BaseAnthropic.Anthropic = _a; +BaseAnthropic.HUMAN_PROMPT = '\n\nHuman:'; +BaseAnthropic.AI_PROMPT = '\n\nAssistant:'; +BaseAnthropic.DEFAULT_TIMEOUT = 600000; // 10 minutes +BaseAnthropic.AnthropicError = Errors.AnthropicError; +BaseAnthropic.APIError = Errors.APIError; +BaseAnthropic.APIConnectionError = Errors.APIConnectionError; +BaseAnthropic.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError; +BaseAnthropic.APIUserAbortError = Errors.APIUserAbortError; +BaseAnthropic.NotFoundError = Errors.NotFoundError; +BaseAnthropic.ConflictError = Errors.ConflictError; +BaseAnthropic.RateLimitError = Errors.RateLimitError; +BaseAnthropic.BadRequestError = Errors.BadRequestError; +BaseAnthropic.AuthenticationError = Errors.AuthenticationError; +BaseAnthropic.InternalServerError = Errors.InternalServerError; +BaseAnthropic.PermissionDeniedError = Errors.PermissionDeniedError; +BaseAnthropic.UnprocessableEntityError = Errors.UnprocessableEntityError; +BaseAnthropic.toFile = Uploads.toFile; +/** + * API Client for interfacing with the Anthropic API. + */ +class Anthropic extends BaseAnthropic { + constructor() { + super(...arguments); + this.completions = new API.Completions(this); + this.messages = new API.Messages(this); + this.models = new API.Models(this); + this.beta = new API.Beta(this); + } +} +exports.Anthropic = Anthropic; +Anthropic.Completions = completions_1.Completions; +Anthropic.Messages = messages_1.Messages; +Anthropic.Models = models_1.Models; +Anthropic.Beta = beta_1.Beta; +exports.HUMAN_PROMPT = Anthropic.HUMAN_PROMPT, exports.AI_PROMPT = Anthropic.AI_PROMPT; +//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.js.map new file mode 100644 index 0000000000000000000000000000000000000000..96644390db37d4341953ff534bec8e91847d3190 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"client.js","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;AAItF,mDAA8C;AAC9C,uDAA2F;AAC3F,qDAA+C;AAC/C,iDAAiF;AAEjF,iDAA8D;AAE9D,mEAAgE;AAChE,mEAA0C;AAC1C,4EAAmD;AACnD,0CAAoC;AACpC,gEAAuC;AACvC,yEAAgD;AAEhD,mEAA0C;AAC1C,kEAAyC;AACzC,uDAAgD;AAEhD,mEAAgE;AAChE,mDAAgF;AAEhF,4DAMiC;AACjC,kDAA6G;AAC7G,iDAA+C;AAC/C,iDAAuE;AACvE,uDAAqD;AACrD,mDAc+B;AAC/B,+DA4FuC;AAsFvC,MAAa,aAAa;IAgBxB;;;;;;;;;;;;;OAaG;IACH,YAAY,EACV,OAAO,GAAG,IAAA,aAAO,EAAC,oBAAoB,CAAC,EACvC,MAAM,GAAG,IAAA,aAAO,EAAC,mBAAmB,CAAC,IAAI,IAAI,EAC7C,SAAS,GAAG,IAAA,aAAO,EAAC,sBAAsB,CAAC,IAAI,IAAI,EACnD,GAAG,IAAI,KACU,EAAE;QAvBrB,yCAA8B;QAwB5B,MAAM,OAAO,GAAkB;YAC7B,MAAM;YACN,SAAS;YACT,GAAG,IAAI;YACP,OAAO,EAAE,OAAO,IAAI,2BAA2B;SAChD,CAAC;QAEF,IAAI,CAAC,OAAO,CA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h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bb9211cba17e480491905157d806c12596e809c6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.mjs @@ -0,0 +1,531 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _a, _BaseAnthropic_encoder; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "./internal/tslib.mjs"; +import { uuid4 } from "./internal/utils/uuid.mjs"; +import { validatePositiveInteger, isAbsoluteURL, safeJSON } from "./internal/utils/values.mjs"; +import { sleep } from "./internal/utils/sleep.mjs"; +import { parseLogLevel } from "./internal/utils/log.mjs"; +import { castToError, isAbortError } from "./internal/errors.mjs"; +import { getPlatformHeaders } from "./internal/detect-platform.mjs"; +import * as Shims from "./internal/shims.mjs"; +import * as Opts from "./internal/request-options.mjs"; +import { VERSION } from "./version.mjs"; +import * as Errors from "./core/error.mjs"; +import * as Pagination from "./core/pagination.mjs"; +import * as Uploads from "./core/uploads.mjs"; +import * as API from "./resources/index.mjs"; +import { APIPromise } from "./core/api-promise.mjs"; +import { isRunningInBrowser } from "./internal/detect-platform.mjs"; +import { buildHeaders } from "./internal/headers.mjs"; +import { Completions, } from "./resources/completions.mjs"; +import { Models } from "./resources/models.mjs"; +import { readEnv } from "./internal/utils/env.mjs"; +import { formatRequestDetails, loggerFor } from "./internal/utils/log.mjs"; +import { isEmptyObj } from "./internal/utils/values.mjs"; +import { Beta, } from "./resources/beta/beta.mjs"; +import { Messages, } from "./resources/messages/messages.mjs"; +export class BaseAnthropic { + /** + * API Client for interfacing with the Anthropic API. + * + * @param {string | null | undefined} [opts.apiKey=process.env['ANTHROPIC_API_KEY'] ?? null] + * @param {string | null | undefined} [opts.authToken=process.env['ANTHROPIC_AUTH_TOKEN'] ?? null] + * @param {string} [opts.baseURL=process.env['ANTHROPIC_BASE_URL'] ?? https://api.anthropic.com] - Override the default base URL for the API. + * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out. + * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls. + * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation. + * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request. + * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API. + * @param {Record} opts.defaultQuery - Default query parameters to include with every request to the API. + * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. + */ + constructor({ baseURL = readEnv('ANTHROPIC_BASE_URL'), apiKey = readEnv('ANTHROPIC_API_KEY') ?? null, authToken = readEnv('ANTHROPIC_AUTH_TOKEN') ?? null, ...opts } = {}) { + _BaseAnthropic_encoder.set(this, void 0); + const options = { + apiKey, + authToken, + ...opts, + baseURL: baseURL || `https://api.anthropic.com`, + }; + if (!options.dangerouslyAllowBrowser && isRunningInBrowser()) { + throw new Errors.AnthropicError("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew Anthropic({ apiKey, dangerouslyAllowBrowser: true });\n"); + } + this.baseURL = options.baseURL; + this.timeout = options.timeout ?? Anthropic.DEFAULT_TIMEOUT /* 10 minutes */; + this.logger = options.logger ?? console; + const defaultLogLevel = 'warn'; + // Set default logLevel early so that we can log a warning in parseLogLevel. + this.logLevel = defaultLogLevel; + this.logLevel = + parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? + parseLogLevel(readEnv('ANTHROPIC_LOG'), "process.env['ANTHROPIC_LOG']", this) ?? + defaultLogLevel; + this.fetchOptions = options.fetchOptions; + this.maxRetries = options.maxRetries ?? 2; + this.fetch = options.fetch ?? Shims.getDefaultFetch(); + __classPrivateFieldSet(this, _BaseAnthropic_encoder, Opts.FallbackEncoder, "f"); + this._options = options; + this.apiKey = apiKey; + this.authToken = authToken; + } + /** + * Create a new client instance re-using the same options given to the current client with optional overriding. + */ + withOptions(options) { + return new this.constructor({ + ...this._options, + baseURL: this.baseURL, + maxRetries: this.maxRetries, + timeout: this.timeout, + logger: this.logger, + logLevel: this.logLevel, + fetchOptions: this.fetchOptions, + apiKey: this.apiKey, + authToken: this.authToken, + ...options, + }); + } + defaultQuery() { + return this._options.defaultQuery; + } + validateHeaders({ values, nulls }) { + if (this.apiKey && values.get('x-api-key')) { + return; + } + if (nulls.has('x-api-key')) { + return; + } + if (this.authToken && values.get('authorization')) { + return; + } + if (nulls.has('authorization')) { + return; + } + throw new Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted'); + } + authHeaders(opts) { + return buildHeaders([this.apiKeyAuth(opts), this.bearerAuth(opts)]); + } + apiKeyAuth(opts) { + if (this.apiKey == null) { + return undefined; + } + return buildHeaders([{ 'X-Api-Key': this.apiKey }]); + } + bearerAuth(opts) { + if (this.authToken == null) { + return undefined; + } + return buildHeaders([{ Authorization: `Bearer ${this.authToken}` }]); + } + /** + * Basic re-implementation of `qs.stringify` for primitive types. + */ + stringifyQuery(query) { + return Object.entries(query) + .filter(([_, value]) => typeof value !== 'undefined') + .map(([key, value]) => { + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; + } + if (value === null) { + return `${encodeURIComponent(key)}=`; + } + throw new Errors.AnthropicError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`); + }) + .join('&'); + } + getUserAgent() { + return `${this.constructor.name}/JS ${VERSION}`; + } + defaultIdempotencyKey() { + return `stainless-node-retry-${uuid4()}`; + } + makeStatusError(status, error, message, headers) { + return Errors.APIError.generate(status, error, message, headers); + } + buildURL(path, query) { + const url = isAbsoluteURL(path) ? + new URL(path) + : new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); + const defaultQuery = this.defaultQuery(); + if (!isEmptyObj(defaultQuery)) { + query = { ...defaultQuery, ...query }; + } + if (typeof query === 'object' && query && !Array.isArray(query)) { + url.search = this.stringifyQuery(query); + } + return url.toString(); + } + _calculateNonstreamingTimeout(maxTokens) { + const defaultTimeout = 10 * 60; + const expectedTimeout = (60 * 60 * maxTokens) / 128000; + if (expectedTimeout > defaultTimeout) { + throw new Errors.AnthropicError('Streaming is strongly recommended for operations that may take longer than 10 minutes. ' + + 'See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details'); + } + return defaultTimeout * 1000; + } + /** + * Used as a callback for mutating the given `FinalRequestOptions` object. + */ + async prepareOptions(options) { } + /** + * Used as a callback for mutating the given `RequestInit` object. + * + * This is useful for cases where you want to add certain headers based off of + * the request properties, e.g. `method` or `url`. + */ + async prepareRequest(request, { url, options }) { } + get(path, opts) { + return this.methodRequest('get', path, opts); + } + post(path, opts) { + return this.methodRequest('post', path, opts); + } + patch(path, opts) { + return this.methodRequest('patch', path, opts); + } + put(path, opts) { + return this.methodRequest('put', path, opts); + } + delete(path, opts) { + return this.methodRequest('delete', path, opts); + } + methodRequest(method, path, opts) { + return this.request(Promise.resolve(opts).then((opts) => { + return { method, path, ...opts }; + })); + } + request(options, remainingRetries = null) { + return new APIPromise(this, this.makeRequest(options, remainingRetries, undefined)); + } + async makeRequest(optionsInput, retriesRemaining, retryOfRequestLogID) { + const options = await optionsInput; + const maxRetries = options.maxRetries ?? this.maxRetries; + if (retriesRemaining == null) { + retriesRemaining = maxRetries; + } + await this.prepareOptions(options); + const { req, url, timeout } = this.buildRequest(options, { retryCount: maxRetries - retriesRemaining }); + await this.prepareRequest(req, { url, options }); + /** Not an API request ID, just for correlating local log entries. */ + const requestLogID = 'log_' + ((Math.random() * (1 << 24)) | 0).toString(16).padStart(6, '0'); + const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`; + const startTime = Date.now(); + loggerFor(this).debug(`[${requestLogID}] sending request`, formatRequestDetails({ + retryOfRequestLogID, + method: options.method, + url, + options, + headers: req.headers, + })); + if (options.signal?.aborted) { + throw new Errors.APIUserAbortError(); + } + const controller = new AbortController(); + const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError); + const headersTime = Date.now(); + if (response instanceof Error) { + const retryMessage = `retrying, ${retriesRemaining} attempts remaining`; + if (options.signal?.aborted) { + throw new Errors.APIUserAbortError(); + } + // detect native connection timeout errors + // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)" + // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)" + // others do not provide enough information to distinguish timeouts from other connection errors + const isTimeout = isAbortError(response) || + /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')); + if (retriesRemaining) { + loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`); + loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, formatRequestDetails({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + })); + return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID); + } + loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`); + loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, formatRequestDetails({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + })); + if (isTimeout) { + throw new Errors.APIConnectionTimeoutError(); + } + throw new Errors.APIConnectionError({ cause: response }); + } + const specialHeaders = [...response.headers.entries()] + .filter(([name]) => name === 'request-id') + .map(([name, value]) => ', ' + name + ': ' + JSON.stringify(value)) + .join(''); + const responseInfo = `[${requestLogID}${retryLogStr}${specialHeaders}] ${req.method} ${url} ${response.ok ? 'succeeded' : 'failed'} with status ${response.status} in ${headersTime - startTime}ms`; + if (!response.ok) { + const shouldRetry = this.shouldRetry(response); + if (retriesRemaining && shouldRetry) { + const retryMessage = `retrying, ${retriesRemaining} attempts remaining`; + // We don't need the body of this response. + await Shims.CancelReadableStream(response.body); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`); + loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + })); + return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID, response.headers); + } + const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`; + loggerFor(this).info(`${responseInfo} - ${retryMessage}`); + const errText = await response.text().catch((err) => castToError(err).message); + const errJSON = safeJSON(errText); + const errMessage = errJSON ? undefined : errText; + loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + message: errMessage, + durationMs: Date.now() - startTime, + })); + const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers); + throw err; + } + loggerFor(this).info(responseInfo); + loggerFor(this).debug(`[${requestLogID}] response start`, formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + })); + return { response, options, controller, requestLogID, retryOfRequestLogID, startTime }; + } + getAPIList(path, Page, opts) { + return this.requestAPIList(Page, { method: 'get', path, ...opts }); + } + requestAPIList(Page, options) { + const request = this.makeRequest(options, null, undefined); + return new Pagination.PagePromise(this, request, Page); + } + async fetchWithTimeout(url, init, ms, controller) { + const { signal, method, ...options } = init || {}; + if (signal) + signal.addEventListener('abort', () => controller.abort()); + const timeout = setTimeout(() => controller.abort(), ms); + const isReadableBody = (globalThis.ReadableStream && options.body instanceof globalThis.ReadableStream) || + (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body); + const fetchOptions = { + signal: controller.signal, + ...(isReadableBody ? { duplex: 'half' } : {}), + method: 'GET', + ...options, + }; + if (method) { + // Custom methods like 'patch' need to be uppercased + // See https://github.com/nodejs/undici/issues/2294 + fetchOptions.method = method.toUpperCase(); + } + try { + // use undefined this binding; fetch errors if bound to something else in browser/cloudflare + return await this.fetch.call(undefined, url, fetchOptions); + } + finally { + clearTimeout(timeout); + } + } + shouldRetry(response) { + // Note this is not a standard header. + const shouldRetryHeader = response.headers.get('x-should-retry'); + // If the server explicitly says whether or not to retry, obey. + if (shouldRetryHeader === 'true') + return true; + if (shouldRetryHeader === 'false') + return false; + // Retry on request timeouts. + if (response.status === 408) + return true; + // Retry on lock timeouts. + if (response.status === 409) + return true; + // Retry on rate limits. + if (response.status === 429) + return true; + // Retry internal errors. + if (response.status >= 500) + return true; + return false; + } + async retryRequest(options, retriesRemaining, requestLogID, responseHeaders) { + let timeoutMillis; + // Note the `retry-after-ms` header may not be standard, but is a good idea and we'd like proactive support for it. + const retryAfterMillisHeader = responseHeaders?.get('retry-after-ms'); + if (retryAfterMillisHeader) { + const timeoutMs = parseFloat(retryAfterMillisHeader); + if (!Number.isNaN(timeoutMs)) { + timeoutMillis = timeoutMs; + } + } + // About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After + const retryAfterHeader = responseHeaders?.get('retry-after'); + if (retryAfterHeader && !timeoutMillis) { + const timeoutSeconds = parseFloat(retryAfterHeader); + if (!Number.isNaN(timeoutSeconds)) { + timeoutMillis = timeoutSeconds * 1000; + } + else { + timeoutMillis = Date.parse(retryAfterHeader) - Date.now(); + } + } + // If the API asks us to wait a certain amount of time (and it's a reasonable amount), + // just do what it says, but otherwise calculate a default + if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) { + const maxRetries = options.maxRetries ?? this.maxRetries; + timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries); + } + await sleep(timeoutMillis); + return this.makeRequest(options, retriesRemaining - 1, requestLogID); + } + calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries) { + const initialRetryDelay = 0.5; + const maxRetryDelay = 8.0; + const numRetries = maxRetries - retriesRemaining; + // Apply exponential backoff, but not more than the max. + const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay); + // Apply some jitter, take up to at most 25 percent of the retry time. + const jitter = 1 - Math.random() * 0.25; + return sleepSeconds * jitter * 1000; + } + calculateNonstreamingTimeout(maxTokens, maxNonstreamingTokens) { + const maxTime = 60 * 60 * 1000; // 10 minutes + const defaultTime = 60 * 10 * 1000; // 10 minutes + const expectedTime = (maxTime * maxTokens) / 128000; + if (expectedTime > defaultTime || (maxNonstreamingTokens != null && maxTokens > maxNonstreamingTokens)) { + throw new Errors.AnthropicError('Streaming is strongly recommended for operations that may token longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details'); + } + return defaultTime; + } + buildRequest(inputOptions, { retryCount = 0 } = {}) { + const options = { ...inputOptions }; + const { method, path, query } = options; + const url = this.buildURL(path, query); + if ('timeout' in options) + validatePositiveInteger('timeout', options.timeout); + options.timeout = options.timeout ?? this.timeout; + const { bodyHeaders, body } = this.buildBody({ options }); + const reqHeaders = this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount }); + const req = { + method, + headers: reqHeaders, + ...(options.signal && { signal: options.signal }), + ...(globalThis.ReadableStream && + body instanceof globalThis.ReadableStream && { duplex: 'half' }), + ...(body && { body }), + ...(this.fetchOptions ?? {}), + ...(options.fetchOptions ?? {}), + }; + return { req, url, timeout: options.timeout }; + } + buildHeaders({ options, method, bodyHeaders, retryCount, }) { + let idempotencyHeaders = {}; + if (this.idempotencyHeader && method !== 'get') { + if (!options.idempotencyKey) + options.idempotencyKey = this.defaultIdempotencyKey(); + idempotencyHeaders[this.idempotencyHeader] = options.idempotencyKey; + } + const headers = buildHeaders([ + idempotencyHeaders, + { + Accept: 'application/json', + 'User-Agent': this.getUserAgent(), + 'X-Stainless-Retry-Count': String(retryCount), + ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), + ...getPlatformHeaders(), + ...(this._options.dangerouslyAllowBrowser ? + { 'anthropic-dangerous-direct-browser-access': 'true' } + : undefined), + 'anthropic-version': '2023-06-01', + }, + this.authHeaders(options), + this._options.defaultHeaders, + bodyHeaders, + options.headers, + ]); + this.validateHeaders(headers); + return headers.values; + } + buildBody({ options: { body, headers: rawHeaders } }) { + if (!body) { + return { bodyHeaders: undefined, body: undefined }; + } + const headers = buildHeaders([rawHeaders]); + if ( + // Pass raw type verbatim + ArrayBuffer.isView(body) || + body instanceof ArrayBuffer || + body instanceof DataView || + (typeof body === 'string' && + // Preserve legacy string encoding behavior for now + headers.values.has('content-type')) || + // `Blob` is superset of `File` + body instanceof Blob || + // `FormData` -> `multipart/form-data` + body instanceof FormData || + // `URLSearchParams` -> `application/x-www-form-urlencoded` + body instanceof URLSearchParams || + // Send chunked stream (each chunk has own `length`) + (globalThis.ReadableStream && body instanceof globalThis.ReadableStream)) { + return { bodyHeaders: undefined, body: body }; + } + else if (typeof body === 'object' && + (Symbol.asyncIterator in body || + (Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))) { + return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body) }; + } + else { + return __classPrivateFieldGet(this, _BaseAnthropic_encoder, "f").call(this, { body, headers }); + } + } +} +_a = BaseAnthropic, _BaseAnthropic_encoder = new WeakMap(); +BaseAnthropic.Anthropic = _a; +BaseAnthropic.HUMAN_PROMPT = '\n\nHuman:'; +BaseAnthropic.AI_PROMPT = '\n\nAssistant:'; +BaseAnthropic.DEFAULT_TIMEOUT = 600000; // 10 minutes +BaseAnthropic.AnthropicError = Errors.AnthropicError; +BaseAnthropic.APIError = Errors.APIError; +BaseAnthropic.APIConnectionError = Errors.APIConnectionError; +BaseAnthropic.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError; +BaseAnthropic.APIUserAbortError = Errors.APIUserAbortError; +BaseAnthropic.NotFoundError = Errors.NotFoundError; +BaseAnthropic.ConflictError = Errors.ConflictError; +BaseAnthropic.RateLimitError = Errors.RateLimitError; +BaseAnthropic.BadRequestError = Errors.BadRequestError; +BaseAnthropic.AuthenticationError = Errors.AuthenticationError; +BaseAnthropic.InternalServerError = Errors.InternalServerError; +BaseAnthropic.PermissionDeniedError = Errors.PermissionDeniedError; +BaseAnthropic.UnprocessableEntityError = Errors.UnprocessableEntityError; +BaseAnthropic.toFile = Uploads.toFile; +/** + * API Client for interfacing with the Anthropic API. + */ +export class Anthropic extends BaseAnthropic { + constructor() { + super(...arguments); + this.completions = new API.Completions(this); + this.messages = new API.Messages(this); + this.models = new API.Models(this); + this.beta = new API.Beta(this); + } +} +Anthropic.Completions = Completions; +Anthropic.Messages = Messages; +Anthropic.Models = Models; +Anthropic.Beta = Beta; +export const { HUMAN_PROMPT, AI_PROMPT } = Anthropic; +//# sourceMappingURL=client.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..2503468fab341cec36f5a8199771e6023dd0eb66 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/client.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"client.mjs","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"AAAA,sFAAsF;;;OAI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sCAAwB,GAAG,MAAM,CAAC,wBAAwB,AAAlC,CAAmC;AAE3D,oBAAM,GAAG,OAAO,CAAC,MAAM,AAAjB,CAAkB;AAGjC;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,aAAa;IAA5C;;QACE,gBAAW,GAAoB,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzD,aAAQ,GAAiB,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChD,WAAM,GAAe,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC1C,SAAI,GAAa,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;CAAA;AACD,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AACpC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC9B,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;AAC1B,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC;AAiJtB,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..d000fea8d68cb590e32aa4dc4b929faf146b7027 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"api-promise.d.mts","sourceRoot":"","sources":["../src/core/api-promise.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,aAAa,EAAE;OAEtB,EAAE,KAAK,cAAc,EAAE;OACvB,EACL,KAAK,gBAAgB,EACrB,KAA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EAC5B,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GAChF,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;IAI7B,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAGzF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bc02736bce6efd7e8fdec46bbfa01d9cf63929c6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts @@ -0,0 +1,49 @@ +import { type BaseAnthropic } from "../client.js"; +import { type PromiseOrValue } from "../internal/types.js"; +import { type APIResponseProps, type WithRequestID } from "../internal/parse.js"; +/** + * A subclass of `Promise` providing additional helper methods + * for interacting with the SDK. + */ +export declare class APIPromise extends Promise> { + #private; + private responsePromise; + private parseResponse; + private parsedPromise; + constructor(client: BaseAnthropic, responsePromise: Promise, parseResponse?: (client: BaseAnthropic, props: APIResponseProps) => PromiseOrValue>); + _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise; + /** + * Gets the raw `Response` instance instead of parsing the response + * data. + * + * If you want to parse the response body but still get the `Response` + * instance, you can use {@link withResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + asResponse(): Promise; + /** + * Gets the parsed response data, the raw `Response` instance and the ID of the request, + * returned via the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * If you just want to get the raw `Response` instance without parsing it, + * you can use {@link asResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + withResponse(): Promise<{ + data: T; + response: Response; + request_id: string | null | undefined; + }>; + private parse; + then, TResult2 = never>(onfulfilled?: ((value: WithRequestID) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise | TResult>; + finally(onfinally?: (() => void) | undefined | null): Promise>; +} +//# sourceMappingURL=api-promise.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..1a1a212897e26e330c7e2e8115d5014c06fab444 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"api-promise.d.ts","sourceRoot":"","sources":["../src/core/api-promise.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,aAAa,EAAE;OAEtB,EAAE,KAAK,cAAc,EAAE;OACvB,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAGnB;AAED;;;GAGG;AACH,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;;IAMxD,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,aAAa;IANvB,OAAO,CAAC,aAAa,CAAwC;gBAI3D,MAAM,EAA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AAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAGzF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.js new file mode 100644 index 0000000000000000000000000000000000000000..38f76482fe2f5f942adf773519f86634bdf3a19a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.js @@ -0,0 +1,76 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _APIPromise_client; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.APIPromise = void 0; +const tslib_1 = require("../internal/tslib.js"); +const parse_1 = require("../internal/parse.js"); +/** + * A subclass of `Promise` providing additional helper methods + * for interacting with the SDK. + */ +class APIPromise extends Promise { + constructor(client, responsePromise, parseResponse = parse_1.defaultParseResponse) { + super((resolve) => { + // this is maybe a bit weird but this has to be a no-op to not implicitly + // parse the response body; instead .then, .catch, .finally are overridden + // to parse the response + resolve(null); + }); + this.responsePromise = responsePromise; + this.parseResponse = parseResponse; + _APIPromise_client.set(this, void 0); + tslib_1.__classPrivateFieldSet(this, _APIPromise_client, client, "f"); + } + _thenUnwrap(transform) { + return new APIPromise(tslib_1.__classPrivateFieldGet(this, _APIPromise_client, "f"), this.responsePromise, async (client, props) => (0, parse_1.addRequestID)(transform(await this.parseResponse(client, props), props), props.response)); + } + /** + * Gets the raw `Response` instance instead of parsing the response + * data. + * + * If you want to parse the response body but still get the `Response` + * instance, you can use {@link withResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + asResponse() { + return this.responsePromise.then((p) => p.response); + } + /** + * Gets the parsed response data, the raw `Response` instance and the ID of the request, + * returned via the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * If you just want to get the raw `Response` instance without parsing it, + * you can use {@link asResponse()}. + * + * 👋 Getting the wrong TypeScript type for `Response`? + * Try setting `"moduleResolution": "NodeNext"` or add `"lib": ["DOM"]` + * to your `tsconfig.json`. + */ + async withResponse() { + const [data, response] = await Promise.all([this.parse(), this.asResponse()]); + return { data, response, request_id: response.headers.get('request-id') }; + } + parse() { + if (!this.parsedPromise) { + this.parsedPromise = this.responsePromise.then((data) => this.parseResponse(tslib_1.__classPrivateFieldGet(this, _APIPromise_client, "f"), data)); + } + return this.parsedPromise; + } + then(onfulfilled, onrejected) { + return this.parse().then(onfulfilled, onrejected); + } + catch(onrejected) { + return this.parse().catch(onrejected); + } + finally(onfinally) { + return this.parse().finally(onfinally); + } +} +exports.APIPromise = APIPromise; +_APIPromise_client = new WeakMap(); +//# sourceMappingURL=api-promise.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c6f7e3fb7819993835abc8bb972afe61d0c2e2f3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"api-promise.mjs","sourceRoot":"","sources":["../src/core/api-promise.ts"],"names":[],"mappings":"AAAA,sFAAsF;;;OAK/E,EAGL,oBAAoB,EACpB,YAAY,GACb;AAED;;;GAGG;AACH,MAAM,OAAO,UAAc,SAAQ,OAAyB;IAI1D,YACE,MAAqB,EACb,eAA0C,EAC1C,gB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AI,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,uBAAA,IAAI,0BAAQ,EAAE,IAAI,CAAqC,CACrF,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAEQ,IAAI,CACX,WAAgG,EAChG,UAAmF;QAEnF,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACpD,CAAC;IAEQ,KAAK,CACZ,UAAiF;QAEjF,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IAEQ,OAAO,CAAC,SAA2C;QAC1D,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;CACF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b4825e26919182352841f8e52554e88f87fa77bc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts @@ -0,0 +1,47 @@ +export declare class AnthropicError extends Error { +} +export declare class APIError extends AnthropicError { + /** HTTP status for the response that caused the error */ + readonly status: TStatus; + /** HTTP headers for the response that caused the error */ + readonly headers: THeaders; + /** JSON body of the response that caused the error */ + readonly error: TError; + readonly requestID: string | null | undefined; + constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders); + private static makeMessage; + static generate(status: number | undefined, errorResponse: Object | undefined, message: string | undefined, headers: Headers | undefined): APIError; +} +export declare class APIUserAbortError extends APIError { + constructor({ message }?: { + message?: string; + }); +} +export declare class APIConnectionError extends APIError { + constructor({ message, cause }: { + message?: string | undefined; + cause?: Error | undefined; + }); +} +export declare class APIConnectionTimeoutError extends APIConnectionError { + constructor({ message }?: { + message?: string; + }); +} +export declare class BadRequestError extends APIError<400, Headers> { +} +export declare class AuthenticationError extends APIError<401, Headers> { +} +export declare class PermissionDeniedError extends APIError<403, Headers> { +} +export declare class NotFoundError extends APIError<404, Headers> { +} +export declare class ConflictError extends APIError<409, Headers> { +} +export declare class UnprocessableEntityError extends APIError<422, Headers> { +} +export declare class RateLimitError extends APIError<429, Headers> { +} +export declare class InternalServerError extends APIError { +} +//# sourceMappingURL=error.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b61e7b9f1d2dd25f9ebb0a737df8ed37ded39cd3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"error.d.mts","sourceRoot":"","sources":["../src/core/error.ts"],"names":[],"mappings":"AAIA,qBAAa,cAAe,SAAQ,KAAK;CAAG;AAE5C,qBAAa,QAAQ,CACnB,OAAO,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,EACvD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,EAC1D,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CACtD,SAAQ,cAAc;IACtB,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAA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,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAE5D,qBAAa,wBAAyB,SAAQ,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAEvE,qBAAa,cAAe,SAAQ,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAAG;AAE7D,qBAAa,mBAAoB,SAAQ,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAAG"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.js new file mode 100644 index 0000000000000000000000000000000000000000..2ce1412798919820d41c3b4bed261cb8ea69d15b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.js @@ -0,0 +1,114 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InternalServerError = exports.RateLimitError = exports.UnprocessableEntityError = exports.ConflictError = exports.NotFoundError = exports.PermissionDeniedError = exports.AuthenticationError = exports.BadRequestError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIUserAbortError = exports.APIError = exports.AnthropicError = void 0; +const errors_1 = require("../internal/errors.js"); +class AnthropicError extends Error { +} +exports.AnthropicError = AnthropicError; +class APIError extends AnthropicError { + constructor(status, error, message, headers) { + super(`${APIError.makeMessage(status, error, message)}`); + this.status = status; + this.headers = headers; + this.requestID = headers?.get('request-id'); + this.error = error; + } + static makeMessage(status, error, message) { + const msg = error?.message ? + typeof error.message === 'string' ? + error.message + : JSON.stringify(error.message) + : error ? JSON.stringify(error) + : message; + if (status && msg) { + return `${status} ${msg}`; + } + if (status) { + return `${status} status code (no body)`; + } + if (msg) { + return msg; + } + return '(no status code or body)'; + } + static generate(status, errorResponse, message, headers) { + if (!status || !headers) { + return new APIConnectionError({ message, cause: (0, errors_1.castToError)(errorResponse) }); + } + const error = errorResponse; + if (status === 400) { + return new BadRequestError(status, error, message, headers); + } + if (status === 401) { + return new AuthenticationError(status, error, message, headers); + } + if (status === 403) { + return new PermissionDeniedError(status, error, message, headers); + } + if (status === 404) { + return new NotFoundError(status, error, message, headers); + } + if (status === 409) { + return new ConflictError(status, error, message, headers); + } + if (status === 422) { + return new UnprocessableEntityError(status, error, message, headers); + } + if (status === 429) { + return new RateLimitError(status, error, message, headers); + } + if (status >= 500) { + return new InternalServerError(status, error, message, headers); + } + return new APIError(status, error, message, headers); + } +} +exports.APIError = APIError; +class APIUserAbortError extends APIError { + constructor({ message } = {}) { + super(undefined, undefined, message || 'Request was aborted.', undefined); + } +} +exports.APIUserAbortError = APIUserAbortError; +class APIConnectionError extends APIError { + constructor({ message, cause }) { + super(undefined, undefined, message || 'Connection error.', undefined); + // in some environments the 'cause' property is already declared + // @ts-ignore + if (cause) + this.cause = cause; + } +} +exports.APIConnectionError = APIConnectionError; +class APIConnectionTimeoutError extends APIConnectionError { + constructor({ message } = {}) { + super({ message: message ?? 'Request timed out.' }); + } +} +exports.APIConnectionTimeoutError = APIConnectionTimeoutError; +class BadRequestError extends APIError { +} +exports.BadRequestError = BadRequestError; +class AuthenticationError extends APIError { +} +exports.AuthenticationError = AuthenticationError; +class PermissionDeniedError extends APIError { +} +exports.PermissionDeniedError = PermissionDeniedError; +class NotFoundError extends APIError { +} +exports.NotFoundError = NotFoundError; +class ConflictError extends APIError { +} +exports.ConflictError = ConflictError; +class UnprocessableEntityError extends APIError { +} +exports.UnprocessableEntityError = UnprocessableEntityError; +class RateLimitError extends APIError { +} +exports.RateLimitError = RateLimitError; +class InternalServerError extends APIError { +} +exports.InternalServerError = InternalServerError; +//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b2e189f8ca4a11f929acdabe2a2b016b3ffbdf14 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/error.mjs @@ -0,0 +1,98 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { castToError } from "../internal/errors.mjs"; +export class AnthropicError extends Error { +} +export class APIError extends AnthropicError { + constructor(status, error, message, headers) { + super(`${APIError.makeMessage(status, error, message)}`); + this.status = status; + this.headers = headers; + this.requestID = headers?.get('request-id'); + this.error = error; + } + static makeMessage(status, error, message) { + const msg = error?.message ? + typeof error.message === 'string' ? + error.message + : JSON.stringify(error.message) + : error ? JSON.stringify(error) + : message; + if (status && msg) { + return `${status} ${msg}`; + } + if (status) { + return `${status} status code (no body)`; + } + if (msg) { + return msg; + } + return '(no status code or body)'; + } + static generate(status, errorResponse, message, headers) { + if (!status || !headers) { + return new APIConnectionError({ message, cause: castToError(errorResponse) }); + } + const error = errorResponse; + if (status === 400) { + return new BadRequestError(status, error, message, headers); + } + if (status === 401) { + return new AuthenticationError(status, error, message, headers); + } + if (status === 403) { + return new PermissionDeniedError(status, error, message, headers); + } + if (status === 404) { + return new NotFoundError(status, error, message, headers); + } + if (status === 409) { + return new ConflictError(status, error, message, headers); + } + if (status === 422) { + return new UnprocessableEntityError(status, error, message, headers); + } + if (status === 429) { + return new RateLimitError(status, error, message, headers); + } + if (status >= 500) { + return new InternalServerError(status, error, message, headers); + } + return new APIError(status, error, message, headers); + } +} +export class APIUserAbortError extends APIError { + constructor({ message } = {}) { + super(undefined, undefined, message || 'Request was aborted.', undefined); + } +} +export class APIConnectionError extends APIError { + constructor({ message, cause }) { + super(undefined, undefined, message || 'Connection error.', undefined); + // in some environments the 'cause' property is already declared + // @ts-ignore + if (cause) + this.cause = cause; + } +} +export class APIConnectionTimeoutError extends APIConnectionError { + constructor({ message } = {}) { + super({ message: message ?? 'Request timed out.' }); + } +} +export class BadRequestError extends APIError { +} +export class AuthenticationError extends APIError { +} +export class PermissionDeniedError extends APIError { +} +export class NotFoundError extends APIError { +} +export class ConflictError extends APIError { +} +export class UnprocessableEntityError extends APIError { +} +export class RateLimitError extends APIError { +} +export class InternalServerError extends APIError { +} +//# sourceMappingURL=error.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..aa4e39b383aacce2be1dbefb28b495f341eb6280 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.d.mts","sourceRoot":"","sources":["../src/core/pagination.ts"],"names":[],"mappings":"OAGO,EAAE,mBAAmB,EAAE;OAEvB,EAAE,KAAK,aAAa,EAAE;OACtB,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,gBAAgB,EAAE;AAGhC,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;AAE7G,8BAAsB,YAAY,CAAC,IAAI,CAAE,YAAW,aAAa,CAAC,IAAI,CAAC;;IAErE,SAAS,CAAC,OAAO,EAAE,mBAAmB,CAAC;IAEvC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC7B,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC;gBAEZ,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,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AE,YAAW,YAAY,CAAC,IAAI,CAAC;IAC9E,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAElB,QAAQ,EAAE,OAAO,CAAC;IAElB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;gBAGrB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,EACxB,OAAO,EAAE,mBAAmB;IAU9B,iBAAiB,IAAI,IAAI,EAAE;IAIlB,WAAW,IAAI,OAAO;IAQ/B,sBAAsB,IAAI,kBAAkB,GAAG,IAAI;CA8BpD"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f8e25d49bc1e20903536bb1df1d15f7df5e0f779 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/core/pagination.ts"],"names":[],"mappings":"OAGO,EAAE,mBAAmB,EAAE;OAEvB,EAAE,KAAK,aAAa,EAAE;OACtB,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,gBAAgB,EAAE;AAGhC,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;AAE7G,8BAAsB,YAAY,CAAC,IAAI,CAAE,YAAW,aAAa,CAAC,IAAI,CAAC;;IAErE,SAAS,CAAC,OAAO,EAAE,mBAAmB,CAAC;IAEvC,S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,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,IAAI,CAAC,IAAI,CAAE,SAAQ,YAAY,CAAC,IAAI,CAAE,YAAW,YAAY,CAAC,IAAI,CAAC;IAC9E,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAElB,QAAQ,EAAE,OAAO,CAAC;IAElB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;gBAGrB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,EACxB,OAAO,EAAE,mBAAmB;IAU9B,iBAAiB,IAAI,IAAI,EAAE;IAIlB,WAAW,IAAI,OAAO;IAQ/B,sBAAsB,IAAI,kBAAkB,GAAG,IAAI;CA8BpD"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js new file mode 100644 index 0000000000000000000000000000000000000000..c46cfd326cb2254d9ca6c4556c3665d7b699ac06 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js @@ -0,0 +1,123 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +var _AbstractPage_client; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Page = exports.PagePromise = exports.AbstractPage = void 0; +const tslib_1 = require("../internal/tslib.js"); +const error_1 = require("./error.js"); +const parse_1 = require("../internal/parse.js"); +const api_promise_1 = require("./api-promise.js"); +const values_1 = require("../internal/utils/values.js"); +class AbstractPage { + constructor(client, response, body, options) { + _AbstractPage_client.set(this, void 0); + tslib_1.__classPrivateFieldSet(this, _AbstractPage_client, client, "f"); + this.options = options; + this.response = response; + this.body = body; + } + hasNextPage() { + const items = this.getPaginatedItems(); + if (!items.length) + return false; + return this.nextPageRequestOptions() != null; + } + async getNextPage() { + const nextOptions = this.nextPageRequestOptions(); + if (!nextOptions) { + throw new error_1.AnthropicError('No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.'); + } + return await tslib_1.__classPrivateFieldGet(this, _AbstractPage_client, "f").requestAPIList(this.constructor, nextOptions); + } + async *iterPages() { + let page = this; + yield page; + while (page.hasNextPage()) { + page = await page.getNextPage(); + yield page; + } + } + async *[(_AbstractPage_client = new WeakMap(), Symbol.asyncIterator)]() { + for await (const page of this.iterPages()) { + for (const item of page.getPaginatedItems()) { + yield item; + } + } + } +} +exports.AbstractPage = AbstractPage; +/** + * This subclass of Promise will resolve to an instantiated Page once the request completes. + * + * It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ +class PagePromise extends api_promise_1.APIPromise { + constructor(client, request, Page) { + super(client, request, async (client, props) => new Page(client, props.response, await (0, parse_1.defaultParseResponse)(client, props), props.options)); + } + /** + * Allow auto-paginating iteration on an unawaited list call, eg: + * + * for await (const item of client.items.list()) { + * console.log(item) + * } + */ + async *[Symbol.asyncIterator]() { + const page = await this; + for await (const item of page) { + yield item; + } + } +} +exports.PagePromise = PagePromise; +class Page extends AbstractPage { + constructor(client, response, body, options) { + super(client, response, body, options); + this.data = body.data || []; + this.has_more = body.has_more || false; + this.first_id = body.first_id || null; + this.last_id = body.last_id || null; + } + getPaginatedItems() { + return this.data ?? []; + } + hasNextPage() { + if (this.has_more === false) { + return false; + } + return super.hasNextPage(); + } + nextPageRequestOptions() { + if (this.options.query?.['before_id']) { + // in reverse + const first_id = this.first_id; + if (!first_id) { + return null; + } + return { + ...this.options, + query: { + ...(0, values_1.maybeObj)(this.options.query), + before_id: first_id, + }, + }; + } + const cursor = this.last_id; + if (!cursor) { + return null; + } + return { + ...this.options, + query: { + ...(0, values_1.maybeObj)(this.options.query), + after_id: cursor, + }, + }; + } +} +exports.Page = Page; +//# sourceMappingURL=pagination.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d1d93b017b590a1954f5bf58386274e7e508327b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/pagination.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/core/pagination.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;AAEtF,sCAAyC;AAEzC,gDAAwE;AAExE,kDAA2C;AAE3C,wDAAoD;AAIpD,MAAsB,YAAY;IAOhC,YAAY,MAAqB,EAAE,QAAkB,EAAE,IAAa,EAAE,OAA4B;QANlG,uCAAuB;QAOrB,+BAAA,IAAI,wBAAW,MAAM,MAAA,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAMD,WAAW;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvC,IAAI,CAAC,KAAK,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAChC,OAAO,IAAI,CAAC,sBAAsB,EAAE,IAAI,IAAI,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAClD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,sBAAc,C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ED,OAAO;YACL,GAAG,IAAI,CAAC,OAAO;YACf,KAAK,EAAE;gBACL,GAAG,IAAA,iBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC/B,QAAQ,EAAE,MAAM;aACjB;SACF,CAAC;IACJ,CAAC;CACF;AAjED,oBAiEC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..2257ce9ed2044d36e455616a1b3858be271e58f4 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.d.mts","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE;AAExB,qBAAa,WAAW;IACtB,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;gBAErB,MAAM,EAAE,aAAa;CAGlC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a5487a42dabfcfa32057b5ce84c9252deee0365c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts @@ -0,0 +1,6 @@ +import { BaseAnthropic } from "../client.js"; +export declare class APIResource { + protected _client: BaseAnthropic; + constructor(client: BaseAnthropic); +} +//# sourceMappingURL=resource.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..15cd56ac7ad226d1eeac3b393d297e0077cf2715 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/core/resource.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE;AAExB,qBAAa,WAAW;IACtB,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;gBAErB,MAAM,EAAE,aAAa;CAGlC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..603a7ef552595b43dd2e10dad9664285d553da29 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../src/core/streaming.ts"],"names":[],"mappings":"OACO,EAAE,KAAK,cAAc,EAAE;AAY9B,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,EAAE,CAAC;CACf,CAAC;AAEF,qBAAa,MAAM,CAAC,IAAI,CAAE,YAAW,aAAa,CAAC,IAAI,CAAC;IAIpD,OAAO,CAAC,QAAQ;IAHlB,UAAU,EAAE,eAAe,CAAC;gBAGlB,QAAQ,EAAE,MAAM,aAAa,CAAC,IAAI,CAAC,EAC3C,UAAU,EAAE,eAAe;IAK7B,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC;IA4D3F;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC;IA2C1G,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC;IAI7C;;;OAGG;IACH,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAwBnC;;;;OAIG;IACH,gBAAgB,IAAI,cAAc;CAyBnC;AAED,wBAAuB,gBAAgB,CACrC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,eAAe,GAC1B,cAAc,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,CA6BhD"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..30810d09a848b76e1211a4430bc4f34d400d4c81 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.mjs","sourceRoot":"","sources":["../src/core/streaming.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,EAAE;OAElB,EAAE,kBAAkB,EAAE;OACtB,EAAE,sBAAsB,EAAE,WAAW,EAAE;OACvC,EAAE,6BAA6B,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AED,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;YAC1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;aAAM,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,SAAS,SAAS,CAAC,GAAW,EAAE,SAAiB;IAC/C,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACvF,CAAC;IAED,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..cfe0bb2c1fefd5f383d0bc058ba0971dbf9678fd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/core/uploads.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd629a8c12c8e06574b1666abfab0565b82a5691 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.d.ts @@ -0,0 +1,3 @@ +export { type Uploadable } from "../internal/uploads.js"; +export { toFile, type ToFileInput } from "../internal/to-file.js"; +//# sourceMappingURL=uploads.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.mjs new file mode 100644 index 0000000000000000000000000000000000000000..40d3593e5244f4400c0305e48f97c7a3f70b2132 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.mjs @@ -0,0 +1,2 @@ +export { toFile } from "../internal/to-file.mjs"; +//# sourceMappingURL=uploads.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..31969af769d45251d1b2e7a7d2d68b7ff2c86ea2 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../src/core/uploads.ts"],"names":[],"mappings":"OACO,EAAE,MAAM,EAAoB"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..36a13f9d593c3a4f8c08fc91f22d3f9f110cc3e0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.mts @@ -0,0 +1,2 @@ +export * from "./core/error.mjs"; +//# sourceMappingURL=error.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2875f4af18c76115babb87c65facb69ceb9d838a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.ts @@ -0,0 +1,2 @@ +export * from "./core/error.js"; +//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e2cafe341608944d9f257508520a46d6dd8ad568 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["src/error.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..350c6d43000db82d0314844fa630a2659b4ec299 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.mjs @@ -0,0 +1,2 @@ +export * from "./core/error.mjs"; +//# sourceMappingURL=error.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0dffee1882027d91ca0808a7bc70fbc1a9be6335 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.mts @@ -0,0 +1,7 @@ +export { Anthropic as default } from "./client.mjs"; +export { type Uploadable, toFile } from "./core/uploads.mjs"; +export { APIPromise } from "./core/api-promise.mjs"; +export { BaseAnthropic, Anthropic, type ClientOptions, HUMAN_PROMPT, AI_PROMPT } from "./client.mjs"; +export { PagePromise } from "./core/pagination.mjs"; +export { AnthropicError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs"; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..54786842474735a524d7987cf272f785aed85664 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"OAEO,EAAE,SAAS,IAAI,OAAO,EAAE;OAExB,EAAE,KAAK,UAAU,EAAE,MAAM,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE;OACzE,EAAE,WAAW,EAAE;OACf,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b81b2310e0aedb3eb178dd22f999ba7059eb08a8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.ts @@ -0,0 +1,7 @@ +export { Anthropic as default } from "./client.js"; +export { type Uploadable, toFile } from "./core/uploads.js"; +export { APIPromise } from "./core/api-promise.js"; +export { BaseAnthropic, Anthropic, type ClientOptions, HUMAN_PROMPT, AI_PROMPT } from "./client.js"; +export { PagePromise } from "./core/pagination.js"; +export { AnthropicError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e4f1402c227fad3087688f3b5f9106253bf2faa5 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"OAEO,EAAE,SAAS,IAAI,OAAO,EAAE;OAExB,EAAE,KAAK,UAAU,EAAE,MAAM,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE;OACzE,EAAE,WAAW,EAAE;OACf,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8267a84fc314d6dcbef716c8a94fe79385f70c6c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAAgD;AAAvC,iGAAA,SAAS,OAAW;AAE7B,6CAAyD;AAA/B,iGAAA,MAAM,OAAA;AAChC,qDAAgD;AAAvC,yGAAA,UAAU,OAAA;AACnB,sCAAiG;AAAxF,uGAAA,aAAa,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAsB,sGAAA,YAAY,OAAA;AAAE,mGAAA,SAAS,OAAA;AAC9E,mDAAgD;AAAvC,yGAAA,WAAW,OAAA;AACpB,yCAcsB;AAbpB,uGAAA,cAAc,OAAA;AACd,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5d7711c40845d462bf52e746ac5b950675f2e017 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.mjs @@ -0,0 +1,8 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Anthropic as default } from "./client.mjs"; +export { toFile } from "./core/uploads.mjs"; +export { APIPromise } from "./core/api-promise.mjs"; +export { BaseAnthropic, Anthropic, HUMAN_PROMPT, AI_PROMPT } from "./client.mjs"; +export { PagePromise } from "./core/pagination.mjs"; +export { AnthropicError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs"; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..f97fa9e2578fc3ad50afe5c78b1910339f7f9cee --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,SAAS,IAAI,OAAO,EAAE;OAExB,EAAmB,MAAM,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAAE,SAAS,EAAsB,YAAY,EAAE,SAAS,EAAE;OACzE,EAAE,WAAW,EAAE;OACf,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8231c03730e98a1be46600ce36532668ef3d6ff9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts @@ -0,0 +1,73 @@ +export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise; +/** + * An alias to the builtin `RequestInit` type so we can + * easily alias it in import statements if there are name clashes. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit + */ +type _RequestInit = RequestInit; +/** + * An alias to the builtin `Response` type so we can + * easily alias it in import statements if there are name clashes. + * + * https://developer.mozilla.org/docs/Web/API/Response + */ +type _Response = Response; +/** + * The type for the first argument to `fetch`. + * + * https://developer.mozilla.org/docs/Web/API/Window/fetch#resource + */ +type _RequestInfo = Request | URL | string; +/** + * The type for constructing `RequestInit` Headers. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers + */ +type _HeadersInit = RequestInit['headers']; +/** + * The type for constructing `RequestInit` body. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit#body + */ +type _BodyInit = RequestInit['body']; +/** + * An alias to the builtin `Array` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Array = Array; +/** + * An alias to the builtin `Record` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Record = Record; +export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, }; +/** + * A copy of the builtin `EndingType` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941 + */ +type EndingType = 'native' | 'transparent'; +/** + * A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154 + * https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options + */ +export interface BlobPropertyBag { + endings?: EndingType; + type?: string; +} +/** + * A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503 + * https://developer.mozilla.org/en-US/docs/Web/API/File/File#options + */ +export interface FilePropertyBag extends BlobPropertyBag { + lastModified?: number; +} +//# sourceMappingURL=builtin-types.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a6c30e73eec3cc9048298929c8dcfe70bf7fda3b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts @@ -0,0 +1,73 @@ +export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise; +/** + * An alias to the builtin `RequestInit` type so we can + * easily alias it in import statements if there are name clashes. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit + */ +type _RequestInit = RequestInit; +/** + * An alias to the builtin `Response` type so we can + * easily alias it in import statements if there are name clashes. + * + * https://developer.mozilla.org/docs/Web/API/Response + */ +type _Response = Response; +/** + * The type for the first argument to `fetch`. + * + * https://developer.mozilla.org/docs/Web/API/Window/fetch#resource + */ +type _RequestInfo = Request | URL | string; +/** + * The type for constructing `RequestInit` Headers. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers + */ +type _HeadersInit = RequestInit['headers']; +/** + * The type for constructing `RequestInit` body. + * + * https://developer.mozilla.org/docs/Web/API/RequestInit#body + */ +type _BodyInit = RequestInit['body']; +/** + * An alias to the builtin `Array` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Array = Array; +/** + * An alias to the builtin `Record` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Record = Record; +export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, }; +/** + * A copy of the builtin `EndingType` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941 + */ +type EndingType = 'native' | 'transparent'; +/** + * A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154 + * https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options + */ +export interface BlobPropertyBag { + endings?: EndingType; + type?: string; +} +/** + * A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain + * environments and attempting to reference the global version will error. + * + * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503 + * https://developer.mozilla.org/en-US/docs/Web/API/File/File#options + */ +export interface FilePropertyBag extends BlobPropertyBag { + lastModified?: number; +} +//# sourceMappingURL=builtin-types.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6bff005c0f6c7d170629258f4daea66254199bbe --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts @@ -0,0 +1,5 @@ +/** + * Model-specific timeout constraints for non-streaming requests + */ +export declare const MODEL_NONSTREAMING_TOKENS: Record; +//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..66284b9c1a07071edb2eeecf9a296df582ce2e64 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/internal/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM5D,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b1f1b9d754a2d220448e05984d02ae1060151ad9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/internal/constants.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA2B;IAC/D,wBAAwB,EAAE,IAAI;IAC9B,iBAAiB,EAAE,IAAI;IACvB,wBAAwB,EAAE,IAAI;IAC9B,uCAAuC,EAAE,IAAI;IAC7C,wBAAwB,EAAE,IAAI;CAC/B,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a65828dd4df192762ed030e501b537d4b0689588 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts @@ -0,0 +1,10 @@ +import { type Bytes } from "./line.mjs"; +export declare class JSONLDecoder { + private iterator; + controller: AbortController; + constructor(iterator: AsyncIterableIterator, controller: AbortController); + private decoder; + [Symbol.asyncIterator](): AsyncIterator; + static fromResponse(response: Response, controller: AbortController): JSONLDecoder; +} +//# sourceMappingURL=jsonl.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5b884d54a7a9451aebf1568c2e8f9a98f7a984c4 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonl.d.mts","sourceRoot":"","sources":["../../src/internal/decoders/jsonl.ts"],"names":[],"mappings":"OAEO,EAAe,KAAK,KAAK,EAAE;AAElC,qBAAa,YAAY,CAAC,CAAC;IAIvB,OAAO,CAAC,QAAQ;IAHlB,UAAU,EAAE,eAAe,CAAC;gBAGlB,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAC9C,UAAU,EAAE,eAAe;YAKd,OAAO;IAatB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC;IAI1C,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,GAAG,YAAY,CAAC,CAAC,CAAC;CAgBzF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..545b8028389711511289482fa893127c897d5a24 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../src/internal/decoders/jsonl.ts"],"names":[],"mappings":"OAEO,EAAe,KAAK,KAAK,EAAE;AAElC,qBAAa,YAAY,CAAC,CAAC;IAIvB,OAAO,CAAC,QAAQ;IAHlB,UAAU,EAAE,eAAe,CAAC;gBAGlB,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAC9C,UAAU,EAAE,eAAe;YAKd,OAAO;IAatB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC;IAI1C,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,GAAG,YAAY,CAAC,CAAC,CAAC;CAgBzF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7e828ecf98739dfcd1e3527824584a3a16467db3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs @@ -0,0 +1,157 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { VERSION } from "../version.mjs"; +export const isRunningInBrowser = () => { + return ( + // @ts-ignore + typeof window !== 'undefined' && + // @ts-ignore + typeof window.document !== 'undefined' && + // @ts-ignore + typeof navigator !== 'undefined'); +}; +/** + * Note this does not detect 'browser'; for that, use getBrowserInfo(). + */ +function getDetectedPlatform() { + if (typeof Deno !== 'undefined' && Deno.build != null) { + return 'deno'; + } + if (typeof EdgeRuntime !== 'undefined') { + return 'edge'; + } + if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') { + return 'node'; + } + return 'unknown'; +} +const getPlatformProperties = () => { + const detectedPlatform = getDetectedPlatform(); + if (detectedPlatform === 'deno') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': normalizePlatform(Deno.build.os), + 'X-Stainless-Arch': normalizeArch(Deno.build.arch), + 'X-Stainless-Runtime': 'deno', + 'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown', + }; + } + if (typeof EdgeRuntime !== 'undefined') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': 'Unknown', + 'X-Stainless-Arch': `other:${EdgeRuntime}`, + 'X-Stainless-Runtime': 'edge', + 'X-Stainless-Runtime-Version': globalThis.process.version, + }; + } + // Check if Node.js + if (detectedPlatform === 'node') { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': normalizePlatform(globalThis.process.platform ?? 'unknown'), + 'X-Stainless-Arch': normalizeArch(globalThis.process.arch ?? 'unknown'), + 'X-Stainless-Runtime': 'node', + 'X-Stainless-Runtime-Version': globalThis.process.version ?? 'unknown', + }; + } + const browserInfo = getBrowserInfo(); + if (browserInfo) { + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': 'Unknown', + 'X-Stainless-Arch': 'unknown', + 'X-Stainless-Runtime': `browser:${browserInfo.browser}`, + 'X-Stainless-Runtime-Version': browserInfo.version, + }; + } + // TODO add support for Cloudflare workers, etc. + return { + 'X-Stainless-Lang': 'js', + 'X-Stainless-Package-Version': VERSION, + 'X-Stainless-OS': 'Unknown', + 'X-Stainless-Arch': 'unknown', + 'X-Stainless-Runtime': 'unknown', + 'X-Stainless-Runtime-Version': 'unknown', + }; +}; +// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts +function getBrowserInfo() { + if (typeof navigator === 'undefined' || !navigator) { + return null; + } + // NOTE: The order matters here! + const browserPatterns = [ + { key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, + { key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ }, + ]; + // Find the FIRST matching browser + for (const { key, pattern } of browserPatterns) { + const match = pattern.exec(navigator.userAgent); + if (match) { + const major = match[1] || 0; + const minor = match[2] || 0; + const patch = match[3] || 0; + return { browser: key, version: `${major}.${minor}.${patch}` }; + } + } + return null; +} +const normalizeArch = (arch) => { + // Node docs: + // - https://nodejs.org/api/process.html#processarch + // Deno docs: + // - https://doc.deno.land/deno/stable/~/Deno.build + if (arch === 'x32') + return 'x32'; + if (arch === 'x86_64' || arch === 'x64') + return 'x64'; + if (arch === 'arm') + return 'arm'; + if (arch === 'aarch64' || arch === 'arm64') + return 'arm64'; + if (arch) + return `other:${arch}`; + return 'unknown'; +}; +const normalizePlatform = (platform) => { + // Node platforms: + // - https://nodejs.org/api/process.html#processplatform + // Deno platforms: + // - https://doc.deno.land/deno/stable/~/Deno.build + // - https://github.com/denoland/deno/issues/14799 + platform = platform.toLowerCase(); + // NOTE: this iOS check is untested and may not work + // Node does not work natively on IOS, there is a fork at + // https://github.com/nodejs-mobile/nodejs-mobile + // however it is unknown at the time of writing how to detect if it is running + if (platform.includes('ios')) + return 'iOS'; + if (platform === 'android') + return 'Android'; + if (platform === 'darwin') + return 'MacOS'; + if (platform === 'win32') + return 'Windows'; + if (platform === 'freebsd') + return 'FreeBSD'; + if (platform === 'openbsd') + return 'OpenBSD'; + if (platform === 'linux') + return 'Linux'; + if (platform) + return `Other:${platform}`; + return 'Unknown'; +}; +let _platformHeaders; +export const getPlatformHeaders = () => { + return (_platformHeaders ?? (_platformHeaders = getPlatformProperties())); +}; +//# sourceMappingURL=detect-platform.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a1575c144ca101790c53510ca2aca22ff60552ce --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"detect-platform.mjs","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAE;AAElB,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE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C,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/errors.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/errors.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..1ee8ad5323fa30a23e66ecc7e396ddffc952bb97 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/errors.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../src/internal/errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,WASxC;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,KAAG,KAmBtC,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/errors.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/errors.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..37dbd7ba0ec782c6dead35eae47b0f19e6014132 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/errors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/internal/errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,WASxC;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,KAAG,KAmBtC,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7518e7b6a153cf20271c238e65f4b916cdcf4e47 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts @@ -0,0 +1,22 @@ +type HeaderValue = string | undefined | null; +export type HeadersLike = Headers | readonly HeaderValue[][] | Record | undefined | null | NullableHeaders; +declare const brand_privateNullableHeaders: symbol & { + description: "brand.privateNullableHeaders"; +}; +/** + * @internal + * Users can pass explicit nulls to unset default headers. When we parse them + * into a standard headers type we need to preserve that information. + */ +export type NullableHeaders = { + /** Brand check, prevent users from creating a NullableHeaders. */ + [_: typeof brand_privateNullableHeaders]: true; + /** Parsed headers. */ + values: Headers; + /** Set of lowercase header names explicitly set to null. */ + nulls: Set; +}; +export declare const buildHeaders: (newHeaders: HeadersLike[]) => NullableHeaders; +export declare const isEmptyHeaders: (headers: HeadersLike) => boolean; +export {}; +//# sourceMappingURL=headers.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..564c1c2c911a719443abcaae1db48bb9662388e0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.d.mts","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,SAAS,WAAW,EAAE,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,WAAW,EAAE,CAAC,GACpD,SAAS,GACT,IAAI,GACJ,eAAe,CAAC;AAEpB,QAAA,MAAM,4BAA4B,EAAiD,MAAM,GAAG;IAC1F,WAAW,EAAE,8BAA8B,CAAC;CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kEAAkE;IAClE,CAAC,CAAC,EAAE,OAAO,4BAA4B,GAAG,IAAI,CAAC;IAC/C,sBAAsB;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC;AA6CF,eAAO,MAAM,YAAY,GAAI,YAAY,WAAW,EAAE,KAAG,eAqBxD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,YAGlD,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..39aecf5bf340905458f8c5885d81f793626135e6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,SAAS,WAAW,EAAE,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,WAAW,EAAE,CAAC,GACpD,SAAS,GACT,IAAI,GACJ,eAAe,CAAC;AAEpB,QAAA,MAAM,4BAA4B,EAAiD,MAAM,GAAG;IAC1F,WAAW,EAAE,8BAA8B,CAAC;CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kEAAkE;IAClE,CAAC,CAAC,EAAE,OAAO,4BAA4B,GAAG,IAAI,CAAC;IAC/C,sBAAsB;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC;AA6CF,eAAO,MAAM,YAAY,GAAI,YAAY,WAAW,EAAE,KAAG,eAqBxD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,YAGlD,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.js new file mode 100644 index 0000000000000000000000000000000000000000..a4569e8e457793ad4bd9ba1f48cb51ec015e7193 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.js @@ -0,0 +1,79 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEmptyHeaders = exports.buildHeaders = void 0; +const brand_privateNullableHeaders = Symbol.for('brand.privateNullableHeaders'); +const isArray = Array.isArray; +function* iterateHeaders(headers) { + if (!headers) + return; + if (brand_privateNullableHeaders in headers) { + const { values, nulls } = headers; + yield* values.entries(); + for (const name of nulls) { + yield [name, null]; + } + return; + } + let shouldClear = false; + let iter; + if (headers instanceof Headers) { + iter = headers.entries(); + } + else if (isArray(headers)) { + iter = headers; + } + else { + shouldClear = true; + iter = Object.entries(headers ?? {}); + } + for (let row of iter) { + const name = row[0]; + if (typeof name !== 'string') + throw new TypeError('expected header name to be a string'); + const values = isArray(row[1]) ? row[1] : [row[1]]; + let didClear = false; + for (const value of values) { + if (value === undefined) + continue; + // Objects keys always overwrite older headers, they never append. + // Yield a null to clear the header before adding the new values. + if (shouldClear && !didClear) { + didClear = true; + yield [name, null]; + } + yield [name, value]; + } + } +} +const buildHeaders = (newHeaders) => { + const targetHeaders = new Headers(); + const nullHeaders = new Set(); + for (const headers of newHeaders) { + const seenHeaders = new Set(); + for (const [name, value] of iterateHeaders(headers)) { + const lowerName = name.toLowerCase(); + if (!seenHeaders.has(lowerName)) { + targetHeaders.delete(name); + seenHeaders.add(lowerName); + } + if (value === null) { + targetHeaders.delete(name); + nullHeaders.add(lowerName); + } + else { + targetHeaders.append(name, value); + nullHeaders.delete(lowerName); + } + } + } + return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders }; +}; +exports.buildHeaders = buildHeaders; +const isEmptyHeaders = (headers) => { + for (const _ of iterateHeaders(headers)) + return false; + return true; +}; +exports.isEmptyHeaders = isEmptyHeaders; +//# sourceMappingURL=headers.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f95fa468a41254dcd9966d9b888cde0c6d3f8f09 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"headers.js","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAWtF,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAE7E,CAAC;AAgBF,MAAM,OAAO,GAAG,KAAK,CAAC,OAAsD,CAA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AE,WAAW,EAAE,CAAC;AAC7F,CAAC,CAAC;AArBW,QAAA,YAAY,gBAqBvB;AAEK,MAAM,cAAc,GAAG,CAAC,OAAoB,EAAE,EAAE;IACrD,KAAK,MAAM,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAHW,QAAA,cAAc,kBAGzB"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..21468eb8e97197322cf92b577cb48262dc8ae894 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.mts @@ -0,0 +1,17 @@ +import type { FinalRequestOptions } from "./request-options.mjs"; +import { type BaseAnthropic } from "../client.mjs"; +import type { AbstractPage } from "../core/pagination.mjs"; +export type APIResponseProps = { + response: Response; + options: FinalRequestOptions; + controller: AbortController; + requestLogID: string; + retryOfRequestLogID: string | undefined; + startTime: number; +}; +export declare function defaultParseResponse(client: BaseAnthropic, props: APIResponseProps): Promise>; +export type WithRequestID = T extends Array | Response | AbstractPage ? T : T extends Record ? T & { + _request_id?: string | null; +} : T; +export declare function addRequestID(value: T, response: Response): WithRequestID; +//# sourceMappingURL=parse.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b26d29d9ca9d4629653506bb06bd9281c13b12ef --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.d.mts","sourceRoot":"","sources":["../src/internal/parse.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,mBAAmB,EAAE;OAE5B,EAAE,KAAK,aAAa,EAAE;OAEtB,KAAK,EAAE,YAAY,EAAE;AAE5B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,EAAE,eAAe,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CA+C3B;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,IACzB,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,GACrD,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACnE,CAAC,CAAC;AAEN,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,CAS9E"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..70c18d4f24f7eccbee9d33874ac63e35ee492a3b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/internal/parse.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,mBAAmB,EAAE;OAE5B,EAAE,KAAK,aAAa,EAAE;OAEtB,KAAK,EAAE,YAAY,EAAE;AAE5B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,EAAE,eAAe,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CA+C3B;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,IACzB,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,GACrD,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACnE,CAAC,CAAC;AAEN,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,CAS9E"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.js new file mode 100644 index 0000000000000000000000000000000000000000..35900bdf21d0638220e7d30e16f31e88db9bd6c0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.js @@ -0,0 +1,55 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultParseResponse = defaultParseResponse; +exports.addRequestID = addRequestID; +const streaming_1 = require("../core/streaming.js"); +const log_1 = require("./utils/log.js"); +async function defaultParseResponse(client, props) { + const { response, requestLogID, retryOfRequestLogID, startTime } = props; + const body = await (async () => { + if (props.options.stream) { + (0, log_1.loggerFor)(client).debug('response', response.status, response.url, response.headers, response.body); + // Note: there is an invariant here that isn't represented in the type system + // that if you set `stream: true` the response type must also be `Stream` + if (props.options.__streamClass) { + return props.options.__streamClass.fromSSEResponse(response, props.controller); + } + return streaming_1.Stream.fromSSEResponse(response, props.controller); + } + // fetch refuses to read the body when the status code is 204. + if (response.status === 204) { + return null; + } + if (props.options.__binaryResponse) { + return response; + } + const contentType = response.headers.get('content-type'); + const mediaType = contentType?.split(';')[0]?.trim(); + const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json'); + if (isJSON) { + const json = await response.json(); + return addRequestID(json, response); + } + const text = await response.text(); + return text; + })(); + (0, log_1.loggerFor)(client).debug(`[${requestLogID}] response parsed`, (0, log_1.formatRequestDetails)({ + retryOfRequestLogID, + url: response.url, + status: response.status, + body, + durationMs: Date.now() - startTime, + })); + return body; +} +function addRequestID(value, response) { + if (!value || typeof value !== 'object' || Array.isArray(value)) { + return value; + } + return Object.defineProperty(value, '_request_id', { + value: response.headers.get('request-id'), + enumerable: false, + }); +} +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b56963d40d8f5986fdcda451c28dc573e64714ee --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.mjs @@ -0,0 +1,51 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { Stream } from "../core/streaming.mjs"; +import { formatRequestDetails, loggerFor } from "./utils/log.mjs"; +export async function defaultParseResponse(client, props) { + const { response, requestLogID, retryOfRequestLogID, startTime } = props; + const body = await (async () => { + if (props.options.stream) { + loggerFor(client).debug('response', response.status, response.url, response.headers, response.body); + // Note: there is an invariant here that isn't represented in the type system + // that if you set `stream: true` the response type must also be `Stream` + if (props.options.__streamClass) { + return props.options.__streamClass.fromSSEResponse(response, props.controller); + } + return Stream.fromSSEResponse(response, props.controller); + } + // fetch refuses to read the body when the status code is 204. + if (response.status === 204) { + return null; + } + if (props.options.__binaryResponse) { + return response; + } + const contentType = response.headers.get('content-type'); + const mediaType = contentType?.split(';')[0]?.trim(); + const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json'); + if (isJSON) { + const json = await response.json(); + return addRequestID(json, response); + } + const text = await response.text(); + return text; + })(); + loggerFor(client).debug(`[${requestLogID}] response parsed`, formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + body, + durationMs: Date.now() - startTime, + })); + return body; +} +export function addRequestID(value, response) { + if (!value || typeof value !== 'object' || Array.isArray(value)) { + return value; + } + return Object.defineProperty(value, '_request_id', { + value: response.headers.get('request-id'), + enumerable: false, + }); +} +//# sourceMappingURL=parse.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..da0c35e0b7cf33c549ecf33017f0f0a1e99d5561 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.mjs","sourceRoot":"","sources":["../src/internal/parse.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,MAAM,EAAE;OAEV,EAAE,oBAAoB,EAAE,SAAS,EAAE;AAY1C,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAqB,EACrB,KAAuB;IAEvB,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACzE,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE;QAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACzB,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;YAEpG,6EAA6E;YAC7E,4EAA4E;YAE5E,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;gBAChC,OAAO,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAQ,CAAC;YACxF,CAAC;YAED,OAAO,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAQ,CAAC;QACnE,CAAC;QAED,8DAA8D;QAC9D,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;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KAAK,EAAE,aAAa,EAAE;QACjD,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;QACzC,UAAU,EAAE,KAAK;KAClB,CAAqB,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..9629576e9a6f181ead97695e23591aaba88e0d88 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"request-options.d.mts","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE;OAEnB,KAAK,EAAE,QAAQ,EAAE;OACjB,EAAE,MAAM,EAAE;OACV,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE;OACtC,EAAE,KAAK,WAAW,EAAE;AAE3B,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,KAAK,cAAc,CAAC;AAEtG,eAAO,MAAM,eAAe,EAAE,cAO7B,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1951b5802467bbc4d9adb2a037c8958602f2392c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts @@ -0,0 +1,34 @@ +import { NullableHeaders } from "./headers.js"; +import type { BodyInit } from "./builtin-types.js"; +import { Stream } from "../core/streaming.js"; +import type { HTTPMethod, MergedRequestInit } from "./types.js"; +import { type HeadersLike } from "./headers.js"; +export type FinalRequestOptions = RequestOptions & { + method: HTTPMethod; + path: string; +}; +export type RequestOptions = { + method?: HTTPMethod; + path?: string; + query?: object | undefined | null; + body?: unknown; + headers?: HeadersLike; + maxRetries?: number; + stream?: boolean | undefined; + timeout?: number; + fetchOptions?: MergedRequestInit; + signal?: AbortSignal | undefined | null; + idempotencyKey?: string; + __binaryResponse?: boolean | undefined; + __streamClass?: typeof Stream; +}; +export type EncodedContent = { + bodyHeaders: HeadersLike; + body: BodyInit; +}; +export type RequestEncoder = (request: { + headers: NullableHeaders; + body: unknown; +}) => EncodedContent; +export declare const FallbackEncoder: RequestEncoder; +//# sourceMappingURL=request-options.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.js new file mode 100644 index 0000000000000000000000000000000000000000..4cf2829ad01649666b5a98a9cee5268d494542a2 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.js @@ -0,0 +1,14 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FallbackEncoder = void 0; +const FallbackEncoder = ({ headers, body }) => { + return { + bodyHeaders: { + 'content-type': 'application/json', + }, + body: JSON.stringify(body), + }; +}; +exports.FallbackEncoder = FallbackEncoder; +//# sourceMappingURL=request-options.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.mjs new file mode 100644 index 0000000000000000000000000000000000000000..312df3532b08623fcb6f6de5614347d93440dd89 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/request-options.mjs @@ -0,0 +1,10 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export const FallbackEncoder = ({ headers, body }) => { + return { + bodyHeaders: { + 'content-type': 'application/json', + }, + body: JSON.stringify(body), + }; +}; +//# sourceMappingURL=request-options.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..407a6d08814c6966f99c1f8300157fc838e0837a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts @@ -0,0 +1,17 @@ +/** + * Shims for types that we can't always rely on being available globally. + * + * Note: these only exist at the type-level, there is no corresponding runtime + * version for any of these symbols. + */ +type NeverToAny = T extends never ? any : T; +/** @ts-ignore */ +type _DOMReadableStream = globalThis.ReadableStream; +/** @ts-ignore */ +type _NodeReadableStream = import('stream/web').ReadableStream; +type _ConditionalNodeReadableStream = typeof globalThis extends { + ReadableStream: any; +} ? never : _NodeReadableStream; +type _ReadableStream = NeverToAny<([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) | ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream)>; +export type { _ReadableStream as ReadableStream }; +//# sourceMappingURL=shim-types.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f2bc2e7da4a7d6b01b8b119ca690757032a298f6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.d.ts @@ -0,0 +1,17 @@ +/** + * Shims for types that we can't always rely on being available globally. + * + * Note: these only exist at the type-level, there is no corresponding runtime + * version for any of these symbols. + */ +type NeverToAny = T extends never ? any : T; +/** @ts-ignore */ +type _DOMReadableStream = globalThis.ReadableStream; +/** @ts-ignore */ +type _NodeReadableStream = import('stream/web').ReadableStream; +type _ConditionalNodeReadableStream = typeof globalThis extends { + ReadableStream: any; +} ? never : _NodeReadableStream; +type _ReadableStream = NeverToAny<([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) | ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream)>; +export type { _ReadableStream as ReadableStream }; +//# sourceMappingURL=shim-types.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.js new file mode 100644 index 0000000000000000000000000000000000000000..c5e5031ef895d4a6c61288b56b36d093efe0b3cc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.js @@ -0,0 +1,4 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=shim-types.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..24e12130f3caac52ee92308c50696b9eb726b9b2 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"OASO,KAAK,EAAE,KAAK,EAAE;OACd,KAAK,EAAE,cAAc,EAAE;AAE9B,wBAAgB,eAAe,IAAI,KAAK,CAQvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,GAAG,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAW9E;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAkBjG;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAYrE"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ad92c52d73f2874ddff0e985e009fa877b25a103 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shims.js","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAYtF,0CAQC;AAID,gDAWC;AAED,gDAkBC;AAQD,sEAyBC;AAMD,oDAYC;AA9FD,SAAgB,eAAe;IAC7B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;QACjC,OAAO,KAAY,CAAC;IACtB,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AAC,IAAI;YACR,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnC,IAAI,MAAM,EAAE,IAAI;oBAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,0CAA0C;gBAClF,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,2CAA2C;gBACjE,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;QACD,KAAK,CAAC,MAAM;YACV,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,aAAa,CAAC;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,oBAAoB,CAAC,MAAW;IACpD,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO;IAE1D,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACjC,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAChD,OAAO;IACT,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IACtC,MAAM,CAAC,WAAW,EAAE,CAAC;IACrB,MAAM,aAAa,CAAC;AACtB,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..98b9baf18a227bb308dffca9d2ab1da5041bd895 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"shims.mjs","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAYtF,MAAM,UAAU,eAAe;IAC7B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;QACjC,OAAO,KAAY,CAAC;IACtB,CAAC;IAED,MAAM,IAAI,KAAK,CACb,sJAAsJ,CACvJ,CAAC;AACJ,CAAC;AAID,MAAM,UAAU,kBAAkB,CAAC,GAAG,IAAwB;IAC5D,MAAM,cAAc,GAAI,UAAkB,CAAC,cAAc,CAAC;IAC1D,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE,CAAC;QAC1C,6EAA6E;QAC7E,yFAAyF;QACzF,MAAM,IAAI,KAAK,CACb,yHAAyH,CAC1H,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAI,QAAwC;IAC5E,IAAI,IAAI,GACN,MAAM,CAAC,aAAa,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAEpG,OAAO,kBAAkB,CAAC;QACxB,KAAK,KAAI,CAAC;QACV,KAAK,CAAC,IAAI,CAAC,UAAe;YACxB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAC1C,IAAI,IAAI,EAAE,CAAC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AO;IAE1D,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACjC,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAChD,OAAO;IACT,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IACtC,MAAM,CAAC,WAAW,EAAE,CAAC;IACrB,MAAM,aAAa,CAAC;AACtB,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..d637a9943cf59f7603f201f009d5c96dcefe0fe9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"stream-utils.d.mts","sourceRoot":"","sources":["../src/internal/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1fd3c25fe15d5b4fd1a98a8046433bf2ca19702a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts @@ -0,0 +1,8 @@ +/** + * Most browsers don't yet have async iterable support for ReadableStream, + * and Node has a very different way of reading bytes from its "ReadableStream". + * + * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 + */ +export declare function ReadableStreamToAsyncIterable(stream: any): AsyncIterableIterator; +//# sourceMappingURL=stream-utils.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9e8ce6e650a811a6b9c747da492622cd65db0f3b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stream-utils.d.ts","sourceRoot":"","sources":["../src/internal/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..113ca197fb3eef9f8426f00220474d531230f33a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"to-file.d.mts","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,eAAe,EAAE;AAG/B,KAAK,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjF;;;GAGG;AACH,UAAU,QAAQ;IAChB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,6EAA6E;IAC7E,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC/C;AAcD;;GAEG;AACH,UAAU,QAAS,SAAQ,QAAQ;IACjC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAYD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAQD,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAC7B,aAAa,CAAC,YAAY,CAAC,CAAC;AAEhC;;;;;;;;GAQG;AACH,wBAAsB,MAAM,CAC1B,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,EAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,GACpC,OAAO,CAAC,IAAI,CAAC,CAsCf"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7b8b296bf730248128306f9b5558e59f4c86249f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts @@ -0,0 +1,45 @@ +import type { FilePropertyBag } from "./builtin-types.js"; +type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView; +/** + * Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc. + * Don't add arrayBuffer here, node-fetch doesn't have it + */ +interface BlobLike { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */ + readonly size: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */ + readonly type: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */ + text(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ + slice(start?: number, end?: number): BlobLike; +} +/** + * Intended to match DOM File, node:buffer File, undici File, etc. + */ +interface FileLike extends BlobLike { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */ + readonly lastModified: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */ + readonly name?: string | undefined; +} +/** + * Intended to match DOM Response, node-fetch Response, undici Response, etc. + */ +export interface ResponseLike { + url: string; + blob(): Promise; +} +export type ToFileInput = FileLike | ResponseLike | Exclude | AsyncIterable; +/** + * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats + * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s + * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible + * @param {Object=} options additional properties + * @param {string=} options.type the MIME type of the content + * @param {number=} options.lastModified the last modified timestamp + * @returns a {@link File} with the given properties + */ +export declare function toFile(value: ToFileInput | PromiseLike, name?: string | null | undefined, options?: FilePropertyBag | undefined): Promise; +export {}; +//# sourceMappingURL=to-file.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ad43b2f4212fce73fb52329caeb911e8047a336b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"to-file.d.ts","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,eAAe,EAAE;AAG/B,KAAK,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjF;;;GAGG;AACH,UAAU,QAAQ;IAChB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,6EAA6E;IAC7E,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC/C;AAcD;;GAEG;AACH,UAAU,QAAS,SAAQ,QAAQ;IACjC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAYD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAQD,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAC7B,aAAa,CAAC,YAAY,CAAC,CAAC;AAEhC;;;;;;;;GAQG;AACH,wBAAsB,MAAM,CAC1B,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,EAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,GACpC,OAAO,CAAC,IAAI,CAAC,CAsCf"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d63f0c396751f1537ccd71d6673d22b0a4e5a3a2 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.js.map @@ -0,0 +1 @@ +{"version":3,"file":"to-file.js","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":";;AAkFA,wBA0CC;AA5HD,0CAAyE;AAEzE,0CAA6C;AAmB7C;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,KAAU,EAA+D,EAAE,CAC7F,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU;IAChC,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;IACjC,OAAO,KAAK,CAAC,WAAW,KAAK,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AAe,EAAC,KAAK,CAAC,CAAC,0CAA0C;MACjE,CAAC;QACD,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,QAAQ,CAAC,KAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,6BAA6B;QACvF,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,WAAW,GAAG,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC;QAC7C,MAAM,IAAI,KAAK,CACb,yBAAyB,OAAO,KAAK,GACnC,WAAW,CAAC,CAAC,CAAC,kBAAkB,WAAW,EAAE,CAAC,CAAC,CAAC,EAClD,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAC1B,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,aAAa,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bc95d0140c8ccf40a8473c03a086c34efd4e0df0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.mjs @@ -0,0 +1,93 @@ +import { getName, makeFile, isAsyncIterable } from "./uploads.mjs"; +import { checkFileSupport } from "./uploads.mjs"; +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isBlobLike = (value) => value != null && + typeof value === 'object' && + typeof value.size === 'number' && + typeof value.type === 'string' && + typeof value.text === 'function' && + typeof value.slice === 'function' && + typeof value.arrayBuffer === 'function'; +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isFileLike = (value) => value != null && + typeof value === 'object' && + typeof value.name === 'string' && + typeof value.lastModified === 'number' && + isBlobLike(value); +const isResponseLike = (value) => value != null && + typeof value === 'object' && + typeof value.url === 'string' && + typeof value.blob === 'function'; +/** + * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats + * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s + * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible + * @param {Object=} options additional properties + * @param {string=} options.type the MIME type of the content + * @param {number=} options.lastModified the last modified timestamp + * @returns a {@link File} with the given properties + */ +export async function toFile(value, name, options) { + checkFileSupport(); + // If it's a promise, resolve it. + value = await value; + name || (name = getName(value)); + // If we've been given a `File` we don't need to do anything if the name / options + // have not been customised. + if (isFileLike(value)) { + if (value instanceof File && name == null && options == null) { + return value; + } + return makeFile([await value.arrayBuffer()], name ?? value.name, { + type: value.type, + lastModified: value.lastModified, + ...options, + }); + } + if (isResponseLike(value)) { + const blob = await value.blob(); + name || (name = new URL(value.url).pathname.split(/[\\/]/).pop()); + return makeFile(await getBytes(blob), name, options); + } + const parts = await getBytes(value); + if (!options?.type) { + const type = parts.find((part) => typeof part === 'object' && 'type' in part && part.type); + if (typeof type === 'string') { + options = { ...options, type }; + } + } + return makeFile(parts, name, options); +} +async function getBytes(value) { + let parts = []; + if (typeof value === 'string' || + ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc. + value instanceof ArrayBuffer) { + parts.push(value); + } + else if (isBlobLike(value)) { + parts.push(value instanceof Blob ? value : await value.arrayBuffer()); + } + else if (isAsyncIterable(value) // includes Readable, ReadableStream, etc. + ) { + for await (const chunk of value) { + parts.push(...(await getBytes(chunk))); // TODO, consider validating? + } + } + else { + const constructor = value?.constructor?.name; + throw new Error(`Unexpected data type: ${typeof value}${constructor ? `; constructor: ${constructor}` : ''}${propsForError(value)}`); + } + return parts; +} +function propsForError(value) { + if (typeof value !== 'object' || value === null) + return ''; + const props = Object.getOwnPropertyNames(value); + return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; +} +//# sourceMappingURL=to-file.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..06a4f583ea1b2cb39b0c61131667ac2185147dcd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"to-file.mjs","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"OAAO,EAAY,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE;OAEhD,EAAE,gBAAgB,EAAE;AAmB3B;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,KAAU,EAA+D,EAAE,CAC7F,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU;IAChC,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;IACjC,OAAO,KAAK,CAAC,WAAW,KAAK,UAAU,CAAC;AAY1C;;GAEG;AACH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KAAK,EAAE,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,QAAQ,CAAC,KAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,6BAA6B;QACvF,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,WAAW,GAAG,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC;QAC7C,MAAM,IAAI,KAAK,CACb,yBAAyB,OAAO,KAAK,GACnC,WAAW,CAAC,CAAC,CAAC,kBAAkB,WAAW,EAAE,CAAC,CAAC,CAAC,EAClD,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAC1B,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,aAAa,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/tslib.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/tslib.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a80a132139131ef6ee96359327f51384df6f8b75 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/tslib.mjs @@ -0,0 +1,17 @@ +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") + throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) + throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value; +} +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) + throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} +export { __classPrivateFieldSet, __classPrivateFieldGet }; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e36497d9d3800d132c02babe05bf939ccbdad723 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.mts @@ -0,0 +1,67 @@ +export type PromiseOrValue = T | Promise; +export type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete'; +export type KeysEnum = { + [P in keyof Required]: true; +}; +export type FinalizedRequestInit = RequestInit & { + headers: Headers; +}; +type NotAny = [unknown] extends [T] ? never : T; +/** + * Some environments overload the global fetch function, and Parameters only gets the last signature. + */ +type OverloadedParameters = T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; + (...args: infer D): unknown; +}) ? A | B | C | D : T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; +}) ? A | B | C : T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; +}) ? A | B : T extends (...args: infer A) => unknown ? A : never; +/** + * These imports attempt to get types from a parent package's dependencies. + * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which + * would cause typescript to show types not present at runtime. To avoid this, we import + * directly from parent node_modules folders. + * + * We need to check multiple levels because we don't know what directory structure we'll be in. + * For example, pnpm generates directories like this: + * ``` + * node_modules + * ├── .pnpm + * │ └── pkg@1.0.0 + * │ └── node_modules + * │ └── pkg + * │ └── internal + * │ └── types.d.ts + * ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg + * └── undici + * ``` + * + * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition + */ +/** @ts-ignore For users with \@types/node */ +type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with undici */ +type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with \@types/bun */ +type BunRequestInit = globalThis.FetchRequestInit; +/** @ts-ignore For users with node-fetch */ +type NodeFetchRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users who use Deno */ +type FetchRequestInit = NonNullable[1]>; +type RequestInits = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** + * This type contains `RequestInit` options that may be available on the current runtime, + * including per-platform extensions like `dispatcher`, `agent`, `client`, etc. + */ +export type MergedRequestInit = RequestInits & +/** We don't include these in the types as they'll be overridden for every request. */ +Partial>; +export {}; +//# sourceMappingURL=types.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..4a49d62150820ddc2218396d0d7df708e47f2966 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;CAAE,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtE,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AAEnD;;GAEG;AACH,KAAK,oBAAoB,CAAC,CAAC,IACzB,CAAC,SAAS,CACR;IACE,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;CAC7B,CACF,GACC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GACb,CAAC,SAAS,CACV;IACE,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;CAC7B,CACF,GACC,CAAC,GAAG,CAAC,GA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AM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c24e26082a03bc0df688f932434789230e94a955 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.d.ts @@ -0,0 +1,67 @@ +export type PromiseOrValue = T | Promise; +export type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete'; +export type KeysEnum = { + [P in keyof Required]: true; +}; +export type FinalizedRequestInit = RequestInit & { + headers: Headers; +}; +type NotAny = [unknown] extends [T] ? never : T; +/** + * Some environments overload the global fetch function, and Parameters only gets the last signature. + */ +type OverloadedParameters = T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; + (...args: infer D): unknown; +}) ? A | B | C | D : T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; +}) ? A | B | C : T extends ({ + (...args: infer A): unknown; + (...args: infer B): unknown; +}) ? A | B : T extends (...args: infer A) => unknown ? A : never; +/** + * These imports attempt to get types from a parent package's dependencies. + * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which + * would cause typescript to show types not present at runtime. To avoid this, we import + * directly from parent node_modules folders. + * + * We need to check multiple levels because we don't know what directory structure we'll be in. + * For example, pnpm generates directories like this: + * ``` + * node_modules + * ├── .pnpm + * │ └── pkg@1.0.0 + * │ └── node_modules + * │ └── pkg + * │ └── internal + * │ └── types.d.ts + * ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg + * └── undici + * ``` + * + * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition + */ +/** @ts-ignore For users with \@types/node */ +type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with undici */ +type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users with \@types/bun */ +type BunRequestInit = globalThis.FetchRequestInit; +/** @ts-ignore For users with node-fetch */ +type NodeFetchRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** @ts-ignore For users who use Deno */ +type FetchRequestInit = NonNullable[1]>; +type RequestInits = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; +/** + * This type contains `RequestInit` options that may be available on the current runtime, + * including per-platform extensions like `dispatcher`, `agent`, `client`, etc. + */ +export type MergedRequestInit = RequestInits & +/** We don't include these in the types as they'll be overridden for every request. */ +Partial>; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e32ca0c250afa3098048360198ba9a98d024e04d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":";AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..60df146a0a18ce8502231b3e0b8b8ddd972e0720 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,cAAc,EAAE;OACvB,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;OAC/B,KAAK,EAAE,aAAa,EAAE;AAG7B,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,IAAI,GAAG,QAAQ,CAAC;AAChF,KAAK,YAAY,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG;QAAE,QAAQ,IAAI,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAG1F,UAAU,OAAQ,SAAQ,IAAI;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,YAY5B,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC;AAElE;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,CAAC,EAAE,eAAe,GACxB,IAAI,CAGN;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CActD;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,aAAa,CAAC,GAAG,CAC0B,CAAC;AAElG;;;GAGG;AACH,eAAO,MAAM,gCAAgC,GAC3C,MAAM,cAAc,EACpB,OAAO,aAAa,GAAG,KAAK,KAC3B,OAAO,CAAC,cAAc,CAIxB,CAAC;AAEF,KAAK,2BAA2B,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpF,eAAO,MAAM,2BAA2B,GACtC,MAAM,2BAA2B,EACjC,OAAO,aAAa,GAAG,KAAK,KAC3B,OAAO,CAAC,cAAc,CAExB,CAAC;AAkCF,eAAO,MAAM,UAAU,GAAU,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,MAAM,CAAC,GAAG,SAAS,EACnB,OAAO,aAAa,GAAG,KAAK,KAC3B,OAAO,CAAC,QAAQ,CASlB,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.js new file mode 100644 index 0000000000000000000000000000000000000000..171a44557cd0a936abf81e48ef6f59e14742ad85 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.js @@ -0,0 +1,146 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createForm = exports.multipartFormRequestOptions = exports.maybeMultipartFormRequestOptions = exports.isAsyncIterable = exports.checkFileSupport = void 0; +exports.makeFile = makeFile; +exports.getName = getName; +const shims_1 = require("./shims.js"); +const checkFileSupport = () => { + if (typeof File === 'undefined') { + const { process } = globalThis; + const isOldNode = typeof process?.versions?.node === 'string' && parseInt(process.versions.node.split('.')) < 20; + throw new Error('`File` is not defined as a global, which is required for file uploads.' + + (isOldNode ? + " Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`." + : '')); + } +}; +exports.checkFileSupport = checkFileSupport; +/** + * Construct a `File` instance. This is used to ensure a helpful error is thrown + * for environments that don't define a global `File` yet. + */ +function makeFile(fileBits, fileName, options) { + (0, exports.checkFileSupport)(); + return new File(fileBits, fileName ?? 'unknown_file', options); +} +function getName(value) { + return (((typeof value === 'object' && + value !== null && + (('name' in value && value.name && String(value.name)) || + ('url' in value && value.url && String(value.url)) || + ('filename' in value && value.filename && String(value.filename)) || + ('path' in value && value.path && String(value.path)))) || + '') + .split(/[\\/]/) + .pop() || undefined); +} +const isAsyncIterable = (value) => value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function'; +exports.isAsyncIterable = isAsyncIterable; +/** + * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value. + * Otherwise returns the request as is. + */ +const maybeMultipartFormRequestOptions = async (opts, fetch) => { + if (!hasUploadableValue(opts.body)) + return opts; + return { ...opts, body: await (0, exports.createForm)(opts.body, fetch) }; +}; +exports.maybeMultipartFormRequestOptions = maybeMultipartFormRequestOptions; +const multipartFormRequestOptions = async (opts, fetch) => { + return { ...opts, body: await (0, exports.createForm)(opts.body, fetch) }; +}; +exports.multipartFormRequestOptions = multipartFormRequestOptions; +const supportsFormDataMap = new WeakMap(); +/** + * node-fetch doesn't support the global FormData object in recent node versions. Instead of sending + * properly-encoded form data, it just stringifies the object, resulting in a request body of "[object FormData]". + * This function detects if the fetch function provided supports the global FormData object to avoid + * confusing error messages later on. + */ +function supportsFormData(fetchObject) { + const fetch = typeof fetchObject === 'function' ? fetchObject : fetchObject.fetch; + const cached = supportsFormDataMap.get(fetch); + if (cached) + return cached; + const promise = (async () => { + try { + const FetchResponse = ('Response' in fetch ? + fetch.Response + : (await fetch('data:,')).constructor); + const data = new FormData(); + if (data.toString() === (await new FetchResponse(data).text())) { + return false; + } + return true; + } + catch { + // avoid false negatives + return true; + } + })(); + supportsFormDataMap.set(fetch, promise); + return promise; +} +const createForm = async (body, fetch) => { + if (!(await supportsFormData(fetch))) { + throw new TypeError('The provided fetch function does not support file uploads with the current global FormData class.'); + } + const form = new FormData(); + await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value))); + return form; +}; +exports.createForm = createForm; +// We check for Blob not File because Bun.File doesn't inherit from File, +// but they both inherit from Blob and have a `name` property at runtime. +const isNamedBlob = (value) => value instanceof Blob && 'name' in value; +const isUploadable = (value) => typeof value === 'object' && + value !== null && + (value instanceof Response || (0, exports.isAsyncIterable)(value) || isNamedBlob(value)); +const hasUploadableValue = (value) => { + if (isUploadable(value)) + return true; + if (Array.isArray(value)) + return value.some(hasUploadableValue); + if (value && typeof value === 'object') { + for (const k in value) { + if (hasUploadableValue(value[k])) + return true; + } + } + return false; +}; +const addFormValue = async (form, key, value) => { + if (value === undefined) + return; + if (value == null) { + throw new TypeError(`Received null for "${key}"; to pass null in FormData, you must use the string 'null'`); + } + // TODO: make nested formats configurable + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + form.append(key, String(value)); + } + else if (value instanceof Response) { + let options = {}; + const contentType = value.headers.get('Content-Type'); + if (contentType) { + options = { type: contentType }; + } + form.append(key, makeFile([await value.blob()], getName(value), options)); + } + else if ((0, exports.isAsyncIterable)(value)) { + form.append(key, makeFile([await new Response((0, shims_1.ReadableStreamFrom)(value)).blob()], getName(value))); + } + else if (isNamedBlob(value)) { + form.append(key, makeFile([value], getName(value), { type: value.type })); + } + else if (Array.isArray(value)) { + await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry))); + } + else if (typeof value === 'object') { + await Promise.all(Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop))); + } + else { + throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`); + } +}; +//# sourceMappingURL=uploads.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9b86f31fa470173a455220e7f6cb57443294c7e7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.mjs @@ -0,0 +1,136 @@ +import { ReadableStreamFrom } from "./shims.mjs"; +export const checkFileSupport = () => { + if (typeof File === 'undefined') { + const { process } = globalThis; + const isOldNode = typeof process?.versions?.node === 'string' && parseInt(process.versions.node.split('.')) < 20; + throw new Error('`File` is not defined as a global, which is required for file uploads.' + + (isOldNode ? + " Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`." + : '')); + } +}; +/** + * Construct a `File` instance. This is used to ensure a helpful error is thrown + * for environments that don't define a global `File` yet. + */ +export function makeFile(fileBits, fileName, options) { + checkFileSupport(); + return new File(fileBits, fileName ?? 'unknown_file', options); +} +export function getName(value) { + return (((typeof value === 'object' && + value !== null && + (('name' in value && value.name && String(value.name)) || + ('url' in value && value.url && String(value.url)) || + ('filename' in value && value.filename && String(value.filename)) || + ('path' in value && value.path && String(value.path)))) || + '') + .split(/[\\/]/) + .pop() || undefined); +} +export const isAsyncIterable = (value) => value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function'; +/** + * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value. + * Otherwise returns the request as is. + */ +export const maybeMultipartFormRequestOptions = async (opts, fetch) => { + if (!hasUploadableValue(opts.body)) + return opts; + return { ...opts, body: await createForm(opts.body, fetch) }; +}; +export const multipartFormRequestOptions = async (opts, fetch) => { + return { ...opts, body: await createForm(opts.body, fetch) }; +}; +const supportsFormDataMap = new WeakMap(); +/** + * node-fetch doesn't support the global FormData object in recent node versions. Instead of sending + * properly-encoded form data, it just stringifies the object, resulting in a request body of "[object FormData]". + * This function detects if the fetch function provided supports the global FormData object to avoid + * confusing error messages later on. + */ +function supportsFormData(fetchObject) { + const fetch = typeof fetchObject === 'function' ? fetchObject : fetchObject.fetch; + const cached = supportsFormDataMap.get(fetch); + if (cached) + return cached; + const promise = (async () => { + try { + const FetchResponse = ('Response' in fetch ? + fetch.Response + : (await fetch('data:,')).constructor); + const data = new FormData(); + if (data.toString() === (await new FetchResponse(data).text())) { + return false; + } + return true; + } + catch { + // avoid false negatives + return true; + } + })(); + supportsFormDataMap.set(fetch, promise); + return promise; +} +export const createForm = async (body, fetch) => { + if (!(await supportsFormData(fetch))) { + throw new TypeError('The provided fetch function does not support file uploads with the current global FormData class.'); + } + const form = new FormData(); + await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value))); + return form; +}; +// We check for Blob not File because Bun.File doesn't inherit from File, +// but they both inherit from Blob and have a `name` property at runtime. +const isNamedBlob = (value) => value instanceof Blob && 'name' in value; +const isUploadable = (value) => typeof value === 'object' && + value !== null && + (value instanceof Response || isAsyncIterable(value) || isNamedBlob(value)); +const hasUploadableValue = (value) => { + if (isUploadable(value)) + return true; + if (Array.isArray(value)) + return value.some(hasUploadableValue); + if (value && typeof value === 'object') { + for (const k in value) { + if (hasUploadableValue(value[k])) + return true; + } + } + return false; +}; +const addFormValue = async (form, key, value) => { + if (value === undefined) + return; + if (value == null) { + throw new TypeError(`Received null for "${key}"; to pass null in FormData, you must use the string 'null'`); + } + // TODO: make nested formats configurable + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + form.append(key, String(value)); + } + else if (value instanceof Response) { + let options = {}; + const contentType = value.headers.get('Content-Type'); + if (contentType) { + options = { type: contentType }; + } + form.append(key, makeFile([await value.blob()], getName(value), options)); + } + else if (isAsyncIterable(value)) { + form.append(key, makeFile([await new Response(ReadableStreamFrom(value)).blob()], getName(value))); + } + else if (isNamedBlob(value)) { + form.append(key, makeFile([value], getName(value), { type: value.type })); + } + else if (Array.isArray(value)) { + await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry))); + } + else if (typeof value === 'object') { + await Promise.all(Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop))); + } + else { + throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`); + } +}; +//# sourceMappingURL=uploads.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..39794709188e4fd7f3787cdf79cf47a36a7b6014 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e9f48276450f32dd0746af9e44bb69d3bb070384 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a0d54844404083ca01df9db706262614bfe32c39 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B;AAC/B,4DAA+B;AAC/B,yDAA4B;AAC5B,yDAA4B;AAC5B,0DAA6B;AAC7B,2DAA8B"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.mjs new file mode 100644 index 0000000000000000000000000000000000000000..01563e2e2502abeae5d4e3128598a9b406f1a5d8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.mjs @@ -0,0 +1,8 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./utils/values.mjs"; +export * from "./utils/base64.mjs"; +export * from "./utils/env.mjs"; +export * from "./utils/log.mjs"; +export * from "./utils/uuid.mjs"; +export * from "./utils/sleep.mjs"; +//# sourceMappingURL=utils.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..be21c422db336480d77350fea0c73ce3999471e3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..81019dfc7aa49d31d23d21848103b6b07d8a6af0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,KAAG,MAgBvE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAgBxC,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js new file mode 100644 index 0000000000000000000000000000000000000000..c39e283ae2cf54e7395593bf439cbd4b11f5b771 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js @@ -0,0 +1,38 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromBase64 = exports.toBase64 = void 0; +const error_1 = require("../../core/error.js"); +const bytes_1 = require("./bytes.js"); +const toBase64 = (data) => { + if (!data) + return ''; + if (typeof globalThis.Buffer !== 'undefined') { + return globalThis.Buffer.from(data).toString('base64'); + } + if (typeof data === 'string') { + data = (0, bytes_1.encodeUTF8)(data); + } + if (typeof btoa !== 'undefined') { + return btoa(String.fromCharCode.apply(null, data)); + } + throw new error_1.AnthropicError('Cannot generate base64 string; Expected `Buffer` or `btoa` to be defined'); +}; +exports.toBase64 = toBase64; +const fromBase64 = (str) => { + if (typeof globalThis.Buffer !== 'undefined') { + const buf = globalThis.Buffer.from(str, 'base64'); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + if (typeof atob !== 'undefined') { + const bstr = atob(str); + const buf = new Uint8Array(bstr.length); + for (let i = 0; i < bstr.length; i++) { + buf[i] = bstr.charCodeAt(i); + } + return buf; + } + throw new error_1.AnthropicError('Cannot decode base64 string; Expected `Buffer` or `atob` to be defined'); +}; +exports.fromBase64 = fromBase64; +//# sourceMappingURL=base64.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0a80b3629e789cc3a3d4778816ef6b197d0e6e03 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,+CAAkD;AAClD,sCAAqC;AAE9B,MAAM,QAAQ,GAAG,CAAC,IAA4C,EAAU,EAAE;IAC/E,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,IAAI,OAAQ,UAAkB,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QACtD,OAAQ,UAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClE,CAAC;IAED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x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..f554eb726da2af580822569424a03f5b1a3ec9c0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.d.mts","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAa7D;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,+BAMrC;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,UAM3C"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a80632e1d1e4028918a1adeb5f35ddace5676d41 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bytes.js","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":";;AAAA,kCAaC;AAGD,gCAMC;AAGD,gCAMC;AA/BD,SAAgB,WAAW,CAAC,OAAqB;IAC/C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC;IAC1B,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC1B,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,IAAI,WAAwC,CAAC;AAC7C,SAAgB,UAAU,CAAC,GAAW;IACpC,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,GAAG,CAAC,CAAC;AACT,CAAC;AAED,IAAI,WAA0C,CAAC;AAC/C,SAAgB,UAAU,CAAC,KAAiB;IAC1C,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,KAAK,CAAC,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..58fa7dc2923016bed1bb050ba780eaab632decc0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"env.d.mts","sourceRoot":"","sources":["../../src/internal/utils/env.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAQ9C,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..ed884ae90fc201d242412a88aab177a7e2514633 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"env.mjs","sourceRoot":"","sources":["../../src/internal/utils/env.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;IACzD,IAAI,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACvD,OAAQ,UAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IACrE,CAAC;IACD,IAAI,OAAQ,UAAkB,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACpD,OAAQ,UAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..45eb4d40d5f21ed42be9727a9bfbf9e6ccb8693e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"log.d.mts","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":"OAGO,EAAE,KAAK,aAAa,EAAE;OACtB,EAAE,cAAc,EAAE;AAEzB,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAC3D,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAUnE,eAAO,MAAM,aAAa,GACxB,YAAY,MAAM,GAAG,SAAS,EAC9B,YAAY,MAAM,EAClB,QAAQ,aAAa,KACpB,QAAQ,GAAG,SAab,CAAC;AAsBF,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAsBvD;AAED,eAAO,MAAM,oBAAoB,GAAI,SAAS;IAC5C,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACvD,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;cAVW,cAAc,GAAG,SAAS;cAC1B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;0BAChC,MAAM,GAAG,SAAS;cAC9B,MAAM,GAAG,SAAS;UACtB,MAAM,GAAG,SAAS;aACf,MAAM,GAAG,SAAS;aAClB,MAAM,GAAG,SAAS;iBACd,MAAM,GAAG,SAAS;cACrB,OAAO;WACV,OAAO;CA8Bf,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.js new file mode 100644 index 0000000000000000000000000000000000000000..67cb19c1e43c3851abd24245c9dcf560e126f430 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.js @@ -0,0 +1,86 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.formatRequestDetails = exports.parseLogLevel = void 0; +exports.loggerFor = loggerFor; +const values_1 = require("./values.js"); +const levelNumbers = { + off: 0, + error: 200, + warn: 300, + info: 400, + debug: 500, +}; +const parseLogLevel = (maybeLevel, sourceName, client) => { + if (!maybeLevel) { + return undefined; + } + if ((0, values_1.hasOwn)(levelNumbers, maybeLevel)) { + return maybeLevel; + } + loggerFor(client).warn(`${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify(Object.keys(levelNumbers))}`); + return undefined; +}; +exports.parseLogLevel = parseLogLevel; +function noop() { } +function makeLogFn(fnLevel, logger, logLevel) { + if (!logger || levelNumbers[fnLevel] > levelNumbers[logLevel]) { + return noop; + } + else { + // Don't wrap logger functions, we want the stacktrace intact! + return logger[fnLevel].bind(logger); + } +} +const noopLogger = { + error: noop, + warn: noop, + info: noop, + debug: noop, +}; +let cachedLoggers = new WeakMap(); +function loggerFor(client) { + const logger = client.logger; + const logLevel = client.logLevel ?? 'off'; + if (!logger) { + return noopLogger; + } + const cachedLogger = cachedLoggers.get(logger); + if (cachedLogger && cachedLogger[0] === logLevel) { + return cachedLogger[1]; + } + const levelLogger = { + error: makeLogFn('error', logger, logLevel), + warn: makeLogFn('warn', logger, logLevel), + info: makeLogFn('info', logger, logLevel), + debug: makeLogFn('debug', logger, logLevel), + }; + cachedLoggers.set(logger, [logLevel, levelLogger]); + return levelLogger; +} +const formatRequestDetails = (details) => { + if (details.options) { + details.options = { ...details.options }; + delete details.options['headers']; // redundant + leaks internals + } + if (details.headers) { + details.headers = Object.fromEntries((details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map(([name, value]) => [ + name, + (name.toLowerCase() === 'x-api-key' || + name.toLowerCase() === 'authorization' || + name.toLowerCase() === 'cookie' || + name.toLowerCase() === 'set-cookie') ? + '***' + : value, + ])); + } + if ('retryOfRequestLogID' in details) { + if (details.retryOfRequestLogID) { + details.retryOf = details.retryOfRequestLogID; + } + delete details.retryOfRequestLogID; + } + return details; +}; +exports.formatRequestDetails = formatRequestDetails; +//# sourceMappingURL=log.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a6beba115c21aca3c84b7b6511cffbb926ffb3ef --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"log.mjs","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,MAAM,EAAE;AAajB,MAAM,YAAY,GAAG;IACnB,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,UAA8B,EAC9B,UAAkB,EAClB,MAAqB,EACC,EAAE;IACxB,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,EAAE,CAAC;QACrC,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CACpB,GAAG,UAAU,eAAe,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,qBAAqB,IAAI,CAAC,SAAS,CACvF,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAC1B,EAAE,CACJ,CAAC;IACF,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,SAAS,IAAI,KAAI,CAAC;AAElB,SAAS,SAAS,CAAC,OAAqB,EAAE,MAA0B,EAAE,QAAkB;IACtF,IAAI,CAAC,MAAM,IAAI,YAAY,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9D,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,8DAA8D;QAC9D,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC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AAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,8BAA8B;IACnE,CAAC;IACD,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAClC,CAAC,OAAO,CAAC,OAAO,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAC/F,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;YACjB,IAAI;YACJ,CACE,IAAI,CAAC,WAAW,EAAE,KAAK,WAAW;gBAClC,IAAI,CAAC,WAAW,EAAE,KAAK,eAAe;gBACtC,IAAI,CAAC,WAAW,EAAE,KAAK,QAAQ;gBAC/B,IAAI,CAAC,WAAW,EAAE,KAAK,YAAY,CACpC,CAAC,CAAC;gBACD,KAAK;gBACP,CAAC,CAAC,KAAK;SACR,CACF,CACF,CAAC;IACJ,CAAC;IACD,IAAI,qBAAqB,IAAI,OAAO,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;YAChC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;QAChD,CAAC;QACD,OAAO,OAAO,CAAC,mBAAmB,CAAC;IACrC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a2482e912233e5b18b8a0ba25e5d646926425b69 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts @@ -0,0 +1,15 @@ +/** + * Percent-encode everything that isn't safe to have in a path without encoding safe chars. + * + * Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3: + * > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" + * > pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + */ +export declare function encodeURIPath(str: string): string; +export declare const createPathTagFunction: (pathEncoder?: typeof encodeURIPath) => (statics: readonly string[], ...params: readonly unknown[]) => string; +/** + * URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced. + */ +export declare const path: (statics: readonly string[], ...params: readonly unknown[]) => string; +//# sourceMappingURL=path.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js new file mode 100644 index 0000000000000000000000000000000000000000..1f7e9e23deb003632ac9b90987867619196d80d9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.path = exports.createPathTagFunction = void 0; +exports.encodeURIPath = encodeURIPath; +const error_1 = require("../../core/error.js"); +/** + * Percent-encode everything that isn't safe to have in a path without encoding safe chars. + * + * Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3: + * > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" + * > pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + */ +function encodeURIPath(str) { + return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent); +} +const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(statics, ...params) { + // If there are no params, no processing is needed. + if (statics.length === 1) + return statics[0]; + let postPath = false; + const path = statics.reduce((previousValue, currentValue, index) => { + if (/[?#]/.test(currentValue)) { + postPath = true; + } + return (previousValue + + currentValue + + (index === params.length ? '' : (postPath ? encodeURIComponent : pathEncoder)(String(params[index])))); + }, ''); + const pathOnly = path.split(/[?#]/, 1)[0]; + const invalidSegments = []; + const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi; + let match; + // Find all invalid segments + while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) { + invalidSegments.push({ + start: match.index, + length: match[0].length, + }); + } + if (invalidSegments.length > 0) { + let lastEnd = 0; + const underline = invalidSegments.reduce((acc, segment) => { + const spaces = ' '.repeat(segment.start - lastEnd); + const arrows = '^'.repeat(segment.length); + lastEnd = segment.start + segment.length; + return acc + spaces + arrows; + }, ''); + throw new error_1.AnthropicError(`Path parameters result in path with invalid segments:\n${path}\n${underline}`); + } + return path; +}; +exports.createPathTagFunction = createPathTagFunction; +/** + * URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced. + */ +exports.path = (0, exports.createPathTagFunction)(encodeURIPath); +//# sourceMappingURL=path.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3bc25b1155e67e4179a6c2365d304e4ba98ed016 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/internal/utils/path.ts"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E,CAAC;QAC/D,eAAe,CAAC,IAAI,CAAC;YACnB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM;SACxB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,MAAM,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;YACxD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC1C,OAAO,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;YACzC,OAAO,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;QAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,MAAM,IAAI,sBAAc,CACtB,0DAA0D,IAAI,KAAK,SAAS,EAAE,CAC/E,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AA7CS,QAAA,qBAAqB,yBA6C9B;AAEJ;;GAEG;AACU,QAAA,IAAI,GAAG,IAAA,6BAAqB,EAAC,aAAa,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..ea8919dec04c7c4c6cf8ea75eb92e62c70b2b788 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/intern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4B;IAC5B,OAAO,CAAC,KAAK,GAAG,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/D,eAAe,CAAC,IAAI,CAAC;YACnB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM;SACxB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,MAAM,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;YACxD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC1C,OAAO,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;YACzC,OAAO,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;QAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,MAAM,IAAI,cAAc,CACtB,0DAA0D,IAAI,KAAK,SAAS,EAAE,CAC/E,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEJ;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..80b349379906ba00a2cac60607d10f11a4a56e02 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts @@ -0,0 +1,2 @@ +export declare const sleep: (ms: number) => Promise; +//# sourceMappingURL=sleep.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..c2eff131c1d7113774122aacccbf4698aa1dc6c2 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sleep.d.mts","sourceRoot":"","sources":["../../src/internal/utils/sleep.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,kBAA4D,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js new file mode 100644 index 0000000000000000000000000000000000000000..45d1e13c88cc9295254524e40089846a6e9597c1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js @@ -0,0 +1,7 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sleep = void 0; +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); +exports.sleep = sleep; +//# sourceMappingURL=sleep.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a6890374140ba63405ea17684dc21e50ed98b12d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sleep.js","sourceRoot":"","sources":["../../src/internal/utils/sleep.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAE/E,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAAhF,QAAA,KAAK,SAA2E"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4fe2cb2569e73445dde44bbf67db6b7d0783e149 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +/** + * https://stackoverflow.com/a/2117523 + */ +export let uuid4 = function () { + const { crypto } = globalThis; + if (crypto?.randomUUID) { + uuid4 = crypto.randomUUID.bind(crypto); + return crypto.randomUUID(); + } + const u8 = new Uint8Array(1); + const randomByte = crypto ? () => crypto.getRandomValues(u8)[0] : () => (Math.random() * 0xff) & 0xff; + return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16)); +}; +//# sourceMappingURL=uuid.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0528031f21fee82cb7fdf1079ff45e8991bd4591 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts @@ -0,0 +1,114 @@ +import { AnthropicError, APIUserAbortError } from "../error.mjs"; +import { type BetaContentBlock, Messages as BetaMessages, type BetaMessage, type BetaRawMessageStreamEvent as BetaMessageStreamEvent, type BetaMessageParam, type MessageCreateParams as BetaMessageCreateParams, type MessageCreateParamsBase as BetaMessageCreateParamsBase, type BetaTextCitation, type BetaToolUseBlock, type BetaServerToolUseBlock, type BetaMCPToolUseBlock } from "../resources/beta/messages/messages.mjs"; +import { type RequestOptions } from "../internal/request-options.mjs"; +export interface MessageStreamEvents { + connect: () => void; + streamEvent: (event: BetaMessageStreamEvent, snapshot: BetaMessage) => void; + text: (textDelta: string, textSnapshot: string) => void; + citation: (citation: BetaTextCitation, citationsSnapshot: BetaTextCitation[]) => void; + inputJson: (partialJson: string, jsonSnapshot: unknown) => void; + thinking: (thinkingDelta: string, thinkingSnapshot: string) => void; + signature: (signature: string) => void; + message: (message: BetaMessage) => void; + contentBlock: (content: BetaContentBlock) => void; + finalMessage: (message: BetaMessage) => void; + error: (error: AnthropicError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} +export type TracksToolInput = BetaToolUseBlock | BetaServerToolUseBlock | BetaMCPToolUseBlock; +export declare class BetaMessageStream implements AsyncIterable { + #private; + messages: BetaMessageParam[]; + receivedMessages: BetaMessage[]; + controller: AbortController; + constructor(); + get response(): Response | null | undefined; + get request_id(): string | null | undefined; + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + withResponse(): Promise<{ + data: BetaMessageStream; + response: Response; + request_id: string | null | undefined; + }>; + /** + * Intended for use on the frontend, consuming a stream produced with + * `.toReadableStream()` on the backend. + * + * Note that messages sent to the model do not appear in `.on('message')` + * in this context. + */ + static fromReadableStream(stream: ReadableStream): BetaMessageStream; + static createMessage(messages: BetaMessages, params: BetaMessageCreateParamsBase, options?: RequestOptions): BetaMessageStream; + protected _run(executor: () => Promise): void; + protected _addMessageParam(message: BetaMessageParam): void; + protected _addMessage(message: BetaMessage, emit?: boolean): void; + protected _createMessage(messages: BetaMessages, params: BetaMessageCreateParams, options?: RequestOptions): Promise; + protected _connected(response: Response | null): void; + get ended(): boolean; + get errored(): boolean; + get aborted(): boolean; + abort(): void; + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this MessageStream, so that calls can be chained + */ + on(event: Event, listener: MessageStreamEvents[Event]): this; + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this MessageStream, so that calls can be chained + */ + off(event: Event, listener: MessageStreamEvents[Event]): this; + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this MessageStream, so that calls can be chained + */ + once(event: Event, listener: MessageStreamEvents[Event]): this; + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event: Event): Promise extends [infer Param] ? Param : Parameters extends [] ? void : Parameters>; + done(): Promise; + get currentMessage(): BetaMessage | undefined; + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalMessage(): Promise; + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalText(): Promise; + protected _emit(event: Event, ...args: Parameters): void; + protected _emitFinal(): void; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + [Symbol.asyncIterator](): AsyncIterator; + toReadableStream(): ReadableStream; +} +//# sourceMappingURL=BetaMessageStream.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..8053b32091d2691e166ea58f19cbe2be19473a66 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"BetaMessageStream.d.mts","sourceRoot":"","sources":["../src/lib/BetaMessageStream.ts"],"names":[],"mappings":"OACO,EAAE,cAAc,EAAE,iBAAiB,EAAE;OACrC,EACL,KAAK,gBAAgB,EACrB,QAAQ,IAAI,YAAY,EACxB,KAAK,WAAW,EAChB,KAAK,yBAAyB,IAAI,sBAAsB,EACxD,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,IAAI,uBAAuB,EACnD,KAAK,uBAAuB,IAAI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home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dbf3c5f1d48a4c42049914f7fe3f38374f569c14 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts @@ -0,0 +1,114 @@ +import { AnthropicError, APIUserAbortError } from "../error.js"; +import { type BetaContentBlock, Messages as BetaMessages, type BetaMessage, type BetaRawMessageStreamEvent as BetaMessageStreamEvent, type BetaMessageParam, type MessageCreateParams as BetaMessageCreateParams, type MessageCreateParamsBase as BetaMessageCreateParamsBase, type BetaTextCitation, type BetaToolUseBlock, type BetaServerToolUseBlock, type BetaMCPToolUseBlock } from "../resources/beta/messages/messages.js"; +import { type RequestOptions } from "../internal/request-options.js"; +export interface MessageStreamEvents { + connect: () => void; + streamEvent: (event: BetaMessageStreamEvent, snapshot: BetaMessage) => void; + text: (textDelta: string, textSnapshot: string) => void; + citation: (citation: BetaTextCitation, citationsSnapshot: BetaTextCitation[]) => void; + inputJson: (partialJson: string, jsonSnapshot: unknown) => void; + thinking: (thinkingDelta: string, thinkingSnapshot: string) => void; + signature: (signature: string) => void; + message: (message: BetaMessage) => void; + contentBlock: (content: BetaContentBlock) => void; + finalMessage: (message: BetaMessage) => void; + error: (error: AnthropicError) => void; + abort: (error: APIUserAbortError) => void; + end: () => void; +} +export type TracksToolInput = BetaToolUseBlock | BetaServerToolUseBlock | BetaMCPToolUseBlock; +export declare class BetaMessageStream implements AsyncIterable { + #private; + messages: BetaMessageParam[]; + receivedMessages: BetaMessage[]; + controller: AbortController; + constructor(); + get response(): Response | null | undefined; + get request_id(): string | null | undefined; + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + withResponse(): Promise<{ + data: BetaMessageStream; + response: Response; + request_id: string | null | undefined; + }>; + /** + * Intended for use on the frontend, consuming a stream produced with + * `.toReadableStream()` on the backend. + * + * Note that messages sent to the model do not appear in `.on('message')` + * in this context. + */ + static fromReadableStream(stream: ReadableStream): BetaMessageStream; + static createMessage(messages: BetaMessages, params: BetaMessageCreateParamsBase, options?: RequestOptions): BetaMessageStream; + protected _run(executor: () => Promise): void; + protected _addMessageParam(message: BetaMessageParam): void; + protected _addMessage(message: BetaMessage, emit?: boolean): void; + protected _createMessage(messages: BetaMessages, params: BetaMessageCreateParams, options?: RequestOptions): Promise; + protected _connected(response: Response | null): void; + get ended(): boolean; + get errored(): boolean; + get aborted(): boolean; + abort(): void; + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this MessageStream, so that calls can be chained + */ + on(event: Event, listener: MessageStreamEvents[Event]): this; + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this MessageStream, so that calls can be chained + */ + off(event: Event, listener: MessageStreamEvents[Event]): this; + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this MessageStream, so that calls can be chained + */ + once(event: Event, listener: MessageStreamEvents[Event]): this; + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event: Event): Promise extends [infer Param] ? Param : Parameters extends [] ? void : Parameters>; + done(): Promise; + get currentMessage(): BetaMessage | undefined; + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalMessage(): Promise; + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + finalText(): Promise; + protected _emit(event: Event, ...args: Parameters): void; + protected _emitFinal(): void; + protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; + [Symbol.asyncIterator](): AsyncIterator; + toReadableStream(): ReadableStream; +} +//# sourceMappingURL=BetaMessageStream.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f1047d00d8107c2ffda0605abd2826d2ec437d80 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BetaMessageStream.d.ts","sourceRoot":"","sources":["../src/lib/BetaMessageStream.ts"],"names":[],"mappings":"OACO,EAAE,cAAc,EAAE,iBAAiB,EAAE;OACrC,EACL,KAAK,gBAAgB,EACrB,QAAQ,IAAI,YAAY,EACxB,KAAK,WAAW,EAChB,KAAK,yBAAyB,IAAI,sBAAsB,EACxD,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,IAAI,uBAAuB,EACnD,KAAK,uBAAuB,IAAI,2BAA2B,EAE3D,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB;OAGM,EAAE,KAAK,cAAc,EAAE;AAE9B,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G;;;;OAIG;IACH,IAAI,CAAC,KAAK,SAAS,MAAM,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAAG,IAAI;IAOvG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAK,SAAS,MAAM,mBAAmB,EAC7C,KAAK,EAAE,KAAK,GACX,OAAO,CACR,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAClE,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GACxD,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CACzC;IAQK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,IAAI,cAAc,IAAI,WAAW,GAAG,SAAS,CAE5C;IASD;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,WAAW,CAAC;IAmB1C;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IA0BlC,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,MAAM,mBAAmB,EACrD,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IA8CjD,SAAS,CAAC,UAAU;cAqFJ,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAoIhB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,sBAAsB,CAAC;IA6D/D,gBAAgB,IAAI,cAAc;CAInC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js new file mode 100644 index 0000000000000000000000000000000000000000..12de056a8307b6253d8ecf089f66c5608b64c511 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js @@ -0,0 +1,562 @@ +"use strict"; +var _BetaMessageStream_instances, _BetaMessageStream_currentMessageSnapshot, _BetaMessageStream_connectedPromise, _BetaMessageStream_resolveConnectedPromise, _BetaMessageStream_rejectConnectedPromise, _BetaMessageStream_endPromise, _BetaMessageStream_resolveEndPromise, _BetaMessageStream_rejectEndPromise, _BetaMessageStream_listeners, _BetaMessageStream_ended, _BetaMessageStream_errored, _BetaMessageStream_aborted, _BetaMessageStream_catchingPromiseCreated, _BetaMessageStream_response, _BetaMessageStream_request_id, _BetaMessageStream_getFinalMessage, _BetaMessageStream_getFinalText, _BetaMessageStream_handleError, _BetaMessageStream_beginRequest, _BetaMessageStream_addStreamEvent, _BetaMessageStream_endRequest, _BetaMessageStream_accumulateMessage; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BetaMessageStream = void 0; +const tslib_1 = require("../internal/tslib.js"); +const errors_1 = require("../internal/errors.js"); +const error_1 = require("../error.js"); +const streaming_1 = require("../streaming.js"); +const parser_1 = require("../_vendor/partial-json-parser/parser.js"); +const JSON_BUF_PROPERTY = '__json_buf'; +function tracksToolInput(content) { + return content.type === 'tool_use' || content.type === 'server_tool_use' || content.type === 'mcp_tool_use'; +} +class BetaMessageStream { + constructor() { + _BetaMessageStream_instances.add(this); + this.messages = []; + this.receivedMessages = []; + _BetaMessageStream_currentMessageSnapshot.set(this, void 0); + this.controller = new AbortController(); + _BetaMessageStream_connectedPromise.set(this, void 0); + _BetaMessageStream_resolveConnectedPromise.set(this, () => { }); + _BetaMessageStream_rejectConnectedPromise.set(this, () => { }); + _BetaMessageStream_endPromise.set(this, void 0); + _BetaMessageStream_resolveEndPromise.set(this, () => { }); + _BetaMessageStream_rejectEndPromise.set(this, () => { }); + _BetaMessageStream_listeners.set(this, {}); + _BetaMessageStream_ended.set(this, false); + _BetaMessageStream_errored.set(this, false); + _BetaMessageStream_aborted.set(this, false); + _BetaMessageStream_catchingPromiseCreated.set(this, false); + _BetaMessageStream_response.set(this, void 0); + _BetaMessageStream_request_id.set(this, void 0); + _BetaMessageStream_handleError.set(this, (error) => { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_errored, true, "f"); + if ((0, errors_1.isAbortError)(error)) { + error = new error_1.APIUserAbortError(); + } + if (error instanceof error_1.APIUserAbortError) { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_aborted, true, "f"); + return this._emit('abort', error); + } + if (error instanceof error_1.AnthropicError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const anthropicError = new error_1.AnthropicError(error.message); + // @ts-ignore + anthropicError.cause = error; + return this._emit('error', anthropicError); + } + return this._emit('error', new error_1.AnthropicError(String(error))); + }); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_connectedPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_resolveConnectedPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_rejectConnectedPromise, reject, "f"); + }), "f"); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_endPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_resolveEndPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_rejectEndPromise, reject, "f"); + }), "f"); + // Don't let these promises cause unhandled rejection errors. + // we will manually cause an unhandled rejection error later + // if the user hasn't registered any error listener or called + // any promise-returning method. + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_connectedPromise, "f").catch(() => { }); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_endPromise, "f").catch(() => { }); + } + get response() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_response, "f"); + } + get request_id() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_request_id, "f"); + } + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + async withResponse() { + const response = await tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_connectedPromise, "f"); + if (!response) { + throw new Error('Could not resolve a `Response` object'); + } + return { + data: this, + response, + request_id: response.headers.get('request-id'), + }; + } + /** + * Intended for use on the frontend, consuming a stream produced with + * `.toReadableStream()` on the backend. + * + * Note that messages sent to the model do not appear in `.on('message')` + * in this context. + */ + static fromReadableStream(stream) { + const runner = new BetaMessageStream(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static createMessage(messages, params, options) { + const runner = new BetaMessageStream(); + for (const message of params.messages) { + runner._addMessageParam(message); + } + runner._run(() => runner._createMessage(messages, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); + return runner; + } + _run(executor) { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_handleError, "f")); + } + _addMessageParam(message) { + this.messages.push(message); + } + _addMessage(message, emit = true) { + this.receivedMessages.push(message); + if (emit) { + this._emit('message', message); + } + } + async _createMessage(messages, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_beginRequest).call(this); + const { response, data: stream } = await messages + .create({ ...params, stream: true }, { ...options, signal: this.controller.signal }) + .withResponse(); + this._connected(response); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_endRequest).call(this); + } + _connected(response) { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_response, response, "f"); + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_request_id, response?.headers.get('request-id'), "f"); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_resolveConnectedPromise, "f").call(this, response); + this._emit('connect'); + } + get ended() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_ended, "f"); + } + get errored() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_errored, "f"); + } + get aborted() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_aborted, "f"); + } + abort() { + this.controller.abort(); + } + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this MessageStream, so that calls can be chained + */ + on(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] = []); + listeners.push({ listener }); + return this; + } + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this MessageStream, so that calls can be chained + */ + off(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event]; + if (!listeners) + return this; + const index = listeners.findIndex((l) => l.listener === listener); + if (index >= 0) + listeners.splice(index, 1); + return this; + } + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this MessageStream, so that calls can be chained + */ + once(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] = []); + listeners.push({ listener, once: true }); + return this; + } + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event) { + return new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_catchingPromiseCreated, true, "f"); + if (event !== 'error') + this.once('error', reject); + this.once(event, resolve); + }); + } + async done() { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_catchingPromiseCreated, true, "f"); + await tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_endPromise, "f"); + } + get currentMessage() { + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + } + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalMessage() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalMessage).call(this); + } + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalText() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalText).call(this); + } + _emit(event, ...args) { + // make sure we don't emit any MessageStreamEvents after end + if (tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_ended, "f")) + return; + if (event === 'end') { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_ended, true, "f"); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_resolveEndPromise, "f").call(this); + } + const listeners = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event]; + if (listeners) { + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] = listeners.filter((l) => !l.once); + listeners.forEach(({ listener }) => listener(...args)); + } + if (event === 'abort') { + const error = args[0]; + if (!tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + return; + } + if (event === 'error') { + // NOTE: _emit('error', error) should only be called from #handleError(). + const error = args[0]; + if (!tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + // Trigger an unhandled rejection if the user hasn't registered any error handlers. + // If you are seeing stack traces here, make sure to handle errors via either: + // - runner.on('error', () => ...) + // - await runner.done() + // - await runner.final...() + // - etc. + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + } + } + _emitFinal() { + const finalMessage = this.receivedMessages.at(-1); + if (finalMessage) { + this._emit('finalMessage', tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalMessage).call(this)); + } + } + async _fromReadableStream(readableStream, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_beginRequest).call(this); + this._connected(null); + const stream = streaming_1.Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_endRequest).call(this); + } + [(_BetaMessageStream_currentMessageSnapshot = new WeakMap(), _BetaMessageStream_connectedPromise = new WeakMap(), _BetaMessageStream_resolveConnectedPromise = new WeakMap(), _BetaMessageStream_rejectConnectedPromise = new WeakMap(), _BetaMessageStream_endPromise = new WeakMap(), _BetaMessageStream_resolveEndPromise = new WeakMap(), _BetaMessageStream_rejectEndPromise = new WeakMap(), _BetaMessageStream_listeners = new WeakMap(), _BetaMessageStream_ended = new WeakMap(), _BetaMessageStream_errored = new WeakMap(), _BetaMessageStream_aborted = new WeakMap(), _BetaMessageStream_catchingPromiseCreated = new WeakMap(), _BetaMessageStream_response = new WeakMap(), _BetaMessageStream_request_id = new WeakMap(), _BetaMessageStream_handleError = new WeakMap(), _BetaMessageStream_instances = new WeakSet(), _BetaMessageStream_getFinalMessage = function _BetaMessageStream_getFinalMessage() { + if (this.receivedMessages.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a Message with role=assistant'); + } + return this.receivedMessages.at(-1); + }, _BetaMessageStream_getFinalText = function _BetaMessageStream_getFinalText() { + if (this.receivedMessages.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a Message with role=assistant'); + } + const textBlocks = this.receivedMessages + .at(-1) + .content.filter((block) => block.type === 'text') + .map((block) => block.text); + if (textBlocks.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a content block with type=text'); + } + return textBlocks.join(' '); + }, _BetaMessageStream_beginRequest = function _BetaMessageStream_beginRequest() { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, undefined, "f"); + }, _BetaMessageStream_addStreamEvent = function _BetaMessageStream_addStreamEvent(event) { + if (this.ended) + return; + const messageSnapshot = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_accumulateMessage).call(this, event); + this._emit('streamEvent', event, messageSnapshot); + switch (event.type) { + case 'content_block_delta': { + const content = messageSnapshot.content.at(-1); + switch (event.delta.type) { + case 'text_delta': { + if (content.type === 'text') { + this._emit('text', event.delta.text, content.text || ''); + } + break; + } + case 'citations_delta': { + if (content.type === 'text') { + this._emit('citation', event.delta.citation, content.citations ?? []); + } + break; + } + case 'input_json_delta': { + if (tracksToolInput(content) && content.input) { + this._emit('inputJson', event.delta.partial_json, content.input); + } + break; + } + case 'thinking_delta': { + if (content.type === 'thinking') { + this._emit('thinking', event.delta.thinking, content.thinking); + } + break; + } + case 'signature_delta': { + if (content.type === 'thinking') { + this._emit('signature', content.signature); + } + break; + } + default: + checkNever(event.delta); + } + break; + } + case 'message_stop': { + this._addMessageParam(messageSnapshot); + this._addMessage(messageSnapshot, true); + break; + } + case 'content_block_stop': { + this._emit('contentBlock', messageSnapshot.content.at(-1)); + break; + } + case 'message_start': { + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, messageSnapshot, "f"); + break; + } + case 'content_block_start': + case 'message_delta': + break; + } + }, _BetaMessageStream_endRequest = function _BetaMessageStream_endRequest() { + if (this.ended) { + throw new error_1.AnthropicError(`stream has ended, this shouldn't happen`); + } + const snapshot = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + if (!snapshot) { + throw new error_1.AnthropicError(`request ended without sending any chunks`); + } + tslib_1.__classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, undefined, "f"); + return snapshot; + }, _BetaMessageStream_accumulateMessage = function _BetaMessageStream_accumulateMessage(event) { + let snapshot = tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + if (event.type === 'message_start') { + if (snapshot) { + throw new error_1.AnthropicError(`Unexpected event order, got ${event.type} before receiving "message_stop"`); + } + return event.message; + } + if (!snapshot) { + throw new error_1.AnthropicError(`Unexpected event order, got ${event.type} before "message_start"`); + } + switch (event.type) { + case 'message_stop': + return snapshot; + case 'message_delta': + snapshot.container = event.delta.container; + snapshot.stop_reason = event.delta.stop_reason; + snapshot.stop_sequence = event.delta.stop_sequence; + snapshot.usage.output_tokens = event.usage.output_tokens; + if (event.usage.input_tokens != null) { + snapshot.usage.input_tokens = event.usage.input_tokens; + } + if (event.usage.cache_creation_input_tokens != null) { + snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens; + } + if (event.usage.cache_read_input_tokens != null) { + snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens; + } + if (event.usage.server_tool_use != null) { + snapshot.usage.server_tool_use = event.usage.server_tool_use; + } + return snapshot; + case 'content_block_start': + snapshot.content.push(event.content_block); + return snapshot; + case 'content_block_delta': { + const snapshotContent = snapshot.content.at(event.index); + switch (event.delta.type) { + case 'text_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.text += event.delta.text; + } + break; + } + case 'citations_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.citations ?? (snapshotContent.citations = []); + snapshotContent.citations.push(event.delta.citation); + } + break; + } + case 'input_json_delta': { + if (snapshotContent && tracksToolInput(snapshotContent)) { + // we need to keep track of the raw JSON string as well so that we can + // re-parse it for each delta, for now we just store it as an untyped + // non-enumerable property on the snapshot + let jsonBuf = snapshotContent[JSON_BUF_PROPERTY] || ''; + jsonBuf += event.delta.partial_json; + Object.defineProperty(snapshotContent, JSON_BUF_PROPERTY, { + value: jsonBuf, + enumerable: false, + writable: true, + }); + if (jsonBuf) { + try { + snapshotContent.input = (0, parser_1.partialParse)(jsonBuf); + } + catch (err) { + const error = new error_1.AnthropicError(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${err}. JSON: ${jsonBuf}`); + tslib_1.__classPrivateFieldGet(this, _BetaMessageStream_handleError, "f").call(this, error); + } + } + } + break; + } + case 'thinking_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.thinking += event.delta.thinking; + } + break; + } + case 'signature_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.signature = event.delta.signature; + } + break; + } + default: + checkNever(event.delta); + } + return snapshot; + } + case 'content_block_stop': + return snapshot; + } + }, Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + this.on('streamEvent', (event) => { + const reader = readQueue.shift(); + if (reader) { + reader.resolve(event); + } + else { + pushQueue.push(event); + } + }); + this.on('end', () => { + done = true; + for (const reader of readQueue) { + reader.resolve(undefined); + } + readQueue.length = 0; + }); + this.on('abort', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + this.on('error', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + return { + next: async () => { + if (!pushQueue.length) { + if (done) { + return { value: undefined, done: true }; + } + return new Promise((resolve, reject) => readQueue.push({ resolve, reject })).then((chunk) => (chunk ? { value: chunk, done: false } : { value: undefined, done: true })); + } + const chunk = pushQueue.shift(); + return { value: chunk, done: false }; + }, + return: async () => { + this.abort(); + return { value: undefined, done: true }; + }, + }; + } + toReadableStream() { + const stream = new streaming_1.Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} +exports.BetaMessageStream = BetaMessageStream; +// used to ensure exhaustive case matching without throwing a runtime error +function checkNever(x) { } +//# sourceMappingURL=BetaMessageStream.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1314520b2d76b8de29f16f9fc80bc6cd9850bb30 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BetaMessageStream.js","sourceRoot":"","sources":["../src/lib/BetaMessageStream.ts"],"names":[],"mappings":";;;;;AAAA,kDAAkD;AAClD,uCAA6D;AAe7D,+CAAsC;AACtC,qEAAqE;AAwBrE,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAIvC,SAAS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,CAAC,gBAAgB,EAAE,CAAC;IACnC,CAAC;CACF;AAroBD,8CAqoBC;AAED,2EAA2E;AAC3E,SAAS,UAAU,CAAC,CAAQ,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs new file mode 100644 index 0000000000000000000000000000000000000000..255949d06ff56cabe71ad1959267e08ab58b9ebc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs @@ -0,0 +1,558 @@ +var _BetaMessageStream_instances, _BetaMessageStream_currentMessageSnapshot, _BetaMessageStream_connectedPromise, _BetaMessageStream_resolveConnectedPromise, _BetaMessageStream_rejectConnectedPromise, _BetaMessageStream_endPromise, _BetaMessageStream_resolveEndPromise, _BetaMessageStream_rejectEndPromise, _BetaMessageStream_listeners, _BetaMessageStream_ended, _BetaMessageStream_errored, _BetaMessageStream_aborted, _BetaMessageStream_catchingPromiseCreated, _BetaMessageStream_response, _BetaMessageStream_request_id, _BetaMessageStream_getFinalMessage, _BetaMessageStream_getFinalText, _BetaMessageStream_handleError, _BetaMessageStream_beginRequest, _BetaMessageStream_addStreamEvent, _BetaMessageStream_endRequest, _BetaMessageStream_accumulateMessage; +import { __classPrivateFieldGet, __classPrivateFieldSet } from "../internal/tslib.mjs"; +import { isAbortError } from "../internal/errors.mjs"; +import { AnthropicError, APIUserAbortError } from "../error.mjs"; +import { Stream } from "../streaming.mjs"; +import { partialParse } from "../_vendor/partial-json-parser/parser.mjs"; +const JSON_BUF_PROPERTY = '__json_buf'; +function tracksToolInput(content) { + return content.type === 'tool_use' || content.type === 'server_tool_use' || content.type === 'mcp_tool_use'; +} +export class BetaMessageStream { + constructor() { + _BetaMessageStream_instances.add(this); + this.messages = []; + this.receivedMessages = []; + _BetaMessageStream_currentMessageSnapshot.set(this, void 0); + this.controller = new AbortController(); + _BetaMessageStream_connectedPromise.set(this, void 0); + _BetaMessageStream_resolveConnectedPromise.set(this, () => { }); + _BetaMessageStream_rejectConnectedPromise.set(this, () => { }); + _BetaMessageStream_endPromise.set(this, void 0); + _BetaMessageStream_resolveEndPromise.set(this, () => { }); + _BetaMessageStream_rejectEndPromise.set(this, () => { }); + _BetaMessageStream_listeners.set(this, {}); + _BetaMessageStream_ended.set(this, false); + _BetaMessageStream_errored.set(this, false); + _BetaMessageStream_aborted.set(this, false); + _BetaMessageStream_catchingPromiseCreated.set(this, false); + _BetaMessageStream_response.set(this, void 0); + _BetaMessageStream_request_id.set(this, void 0); + _BetaMessageStream_handleError.set(this, (error) => { + __classPrivateFieldSet(this, _BetaMessageStream_errored, true, "f"); + if (isAbortError(error)) { + error = new APIUserAbortError(); + } + if (error instanceof APIUserAbortError) { + __classPrivateFieldSet(this, _BetaMessageStream_aborted, true, "f"); + return this._emit('abort', error); + } + if (error instanceof AnthropicError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const anthropicError = new AnthropicError(error.message); + // @ts-ignore + anthropicError.cause = error; + return this._emit('error', anthropicError); + } + return this._emit('error', new AnthropicError(String(error))); + }); + __classPrivateFieldSet(this, _BetaMessageStream_connectedPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _BetaMessageStream_resolveConnectedPromise, resolve, "f"); + __classPrivateFieldSet(this, _BetaMessageStream_rejectConnectedPromise, reject, "f"); + }), "f"); + __classPrivateFieldSet(this, _BetaMessageStream_endPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _BetaMessageStream_resolveEndPromise, resolve, "f"); + __classPrivateFieldSet(this, _BetaMessageStream_rejectEndPromise, reject, "f"); + }), "f"); + // Don't let these promises cause unhandled rejection errors. + // we will manually cause an unhandled rejection error later + // if the user hasn't registered any error listener or called + // any promise-returning method. + __classPrivateFieldGet(this, _BetaMessageStream_connectedPromise, "f").catch(() => { }); + __classPrivateFieldGet(this, _BetaMessageStream_endPromise, "f").catch(() => { }); + } + get response() { + return __classPrivateFieldGet(this, _BetaMessageStream_response, "f"); + } + get request_id() { + return __classPrivateFieldGet(this, _BetaMessageStream_request_id, "f"); + } + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + async withResponse() { + const response = await __classPrivateFieldGet(this, _BetaMessageStream_connectedPromise, "f"); + if (!response) { + throw new Error('Could not resolve a `Response` object'); + } + return { + data: this, + response, + request_id: response.headers.get('request-id'), + }; + } + /** + * Intended for use on the frontend, consuming a stream produced with + * `.toReadableStream()` on the backend. + * + * Note that messages sent to the model do not appear in `.on('message')` + * in this context. + */ + static fromReadableStream(stream) { + const runner = new BetaMessageStream(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static createMessage(messages, params, options) { + const runner = new BetaMessageStream(); + for (const message of params.messages) { + runner._addMessageParam(message); + } + runner._run(() => runner._createMessage(messages, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); + return runner; + } + _run(executor) { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, __classPrivateFieldGet(this, _BetaMessageStream_handleError, "f")); + } + _addMessageParam(message) { + this.messages.push(message); + } + _addMessage(message, emit = true) { + this.receivedMessages.push(message); + if (emit) { + this._emit('message', message); + } + } + async _createMessage(messages, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_beginRequest).call(this); + const { response, data: stream } = await messages + .create({ ...params, stream: true }, { ...options, signal: this.controller.signal }) + .withResponse(); + this._connected(response); + for await (const event of stream) { + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_endRequest).call(this); + } + _connected(response) { + if (this.ended) + return; + __classPrivateFieldSet(this, _BetaMessageStream_response, response, "f"); + __classPrivateFieldSet(this, _BetaMessageStream_request_id, response?.headers.get('request-id'), "f"); + __classPrivateFieldGet(this, _BetaMessageStream_resolveConnectedPromise, "f").call(this, response); + this._emit('connect'); + } + get ended() { + return __classPrivateFieldGet(this, _BetaMessageStream_ended, "f"); + } + get errored() { + return __classPrivateFieldGet(this, _BetaMessageStream_errored, "f"); + } + get aborted() { + return __classPrivateFieldGet(this, _BetaMessageStream_aborted, "f"); + } + abort() { + this.controller.abort(); + } + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this MessageStream, so that calls can be chained + */ + on(event, listener) { + const listeners = __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] || (__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] = []); + listeners.push({ listener }); + return this; + } + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this MessageStream, so that calls can be chained + */ + off(event, listener) { + const listeners = __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event]; + if (!listeners) + return this; + const index = listeners.findIndex((l) => l.listener === listener); + if (index >= 0) + listeners.splice(index, 1); + return this; + } + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this MessageStream, so that calls can be chained + */ + once(event, listener) { + const listeners = __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] || (__classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] = []); + listeners.push({ listener, once: true }); + return this; + } + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event) { + return new Promise((resolve, reject) => { + __classPrivateFieldSet(this, _BetaMessageStream_catchingPromiseCreated, true, "f"); + if (event !== 'error') + this.once('error', reject); + this.once(event, resolve); + }); + } + async done() { + __classPrivateFieldSet(this, _BetaMessageStream_catchingPromiseCreated, true, "f"); + await __classPrivateFieldGet(this, _BetaMessageStream_endPromise, "f"); + } + get currentMessage() { + return __classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + } + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalMessage() { + await this.done(); + return __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalMessage).call(this); + } + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalText() { + await this.done(); + return __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalText).call(this); + } + _emit(event, ...args) { + // make sure we don't emit any MessageStreamEvents after end + if (__classPrivateFieldGet(this, _BetaMessageStream_ended, "f")) + return; + if (event === 'end') { + __classPrivateFieldSet(this, _BetaMessageStream_ended, true, "f"); + __classPrivateFieldGet(this, _BetaMessageStream_resolveEndPromise, "f").call(this); + } + const listeners = __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event]; + if (listeners) { + __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] = listeners.filter((l) => !l.once); + listeners.forEach(({ listener }) => listener(...args)); + } + if (event === 'abort') { + const error = args[0]; + if (!__classPrivateFieldGet(this, _BetaMessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + Promise.reject(error); + } + __classPrivateFieldGet(this, _BetaMessageStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet(this, _BetaMessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + return; + } + if (event === 'error') { + // NOTE: _emit('error', error) should only be called from #handleError(). + const error = args[0]; + if (!__classPrivateFieldGet(this, _BetaMessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + // Trigger an unhandled rejection if the user hasn't registered any error handlers. + // If you are seeing stack traces here, make sure to handle errors via either: + // - runner.on('error', () => ...) + // - await runner.done() + // - await runner.final...() + // - etc. + Promise.reject(error); + } + __classPrivateFieldGet(this, _BetaMessageStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet(this, _BetaMessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + } + } + _emitFinal() { + const finalMessage = this.receivedMessages.at(-1); + if (finalMessage) { + this._emit('finalMessage', __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_getFinalMessage).call(this)); + } + } + async _fromReadableStream(readableStream, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_beginRequest).call(this); + this._connected(null); + const stream = Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new APIUserAbortError(); + } + __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_endRequest).call(this); + } + [(_BetaMessageStream_currentMessageSnapshot = new WeakMap(), _BetaMessageStream_connectedPromise = new WeakMap(), _BetaMessageStream_resolveConnectedPromise = new WeakMap(), _BetaMessageStream_rejectConnectedPromise = new WeakMap(), _BetaMessageStream_endPromise = new WeakMap(), _BetaMessageStream_resolveEndPromise = new WeakMap(), _BetaMessageStream_rejectEndPromise = new WeakMap(), _BetaMessageStream_listeners = new WeakMap(), _BetaMessageStream_ended = new WeakMap(), _BetaMessageStream_errored = new WeakMap(), _BetaMessageStream_aborted = new WeakMap(), _BetaMessageStream_catchingPromiseCreated = new WeakMap(), _BetaMessageStream_response = new WeakMap(), _BetaMessageStream_request_id = new WeakMap(), _BetaMessageStream_handleError = new WeakMap(), _BetaMessageStream_instances = new WeakSet(), _BetaMessageStream_getFinalMessage = function _BetaMessageStream_getFinalMessage() { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + return this.receivedMessages.at(-1); + }, _BetaMessageStream_getFinalText = function _BetaMessageStream_getFinalText() { + if (this.receivedMessages.length === 0) { + throw new AnthropicError('stream ended without producing a Message with role=assistant'); + } + const textBlocks = this.receivedMessages + .at(-1) + .content.filter((block) => block.type === 'text') + .map((block) => block.text); + if (textBlocks.length === 0) { + throw new AnthropicError('stream ended without producing a content block with type=text'); + } + return textBlocks.join(' '); + }, _BetaMessageStream_beginRequest = function _BetaMessageStream_beginRequest() { + if (this.ended) + return; + __classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, undefined, "f"); + }, _BetaMessageStream_addStreamEvent = function _BetaMessageStream_addStreamEvent(event) { + if (this.ended) + return; + const messageSnapshot = __classPrivateFieldGet(this, _BetaMessageStream_instances, "m", _BetaMessageStream_accumulateMessage).call(this, event); + this._emit('streamEvent', event, messageSnapshot); + switch (event.type) { + case 'content_block_delta': { + const content = messageSnapshot.content.at(-1); + switch (event.delta.type) { + case 'text_delta': { + if (content.type === 'text') { + this._emit('text', event.delta.text, content.text || ''); + } + break; + } + case 'citations_delta': { + if (content.type === 'text') { + this._emit('citation', event.delta.citation, content.citations ?? []); + } + break; + } + case 'input_json_delta': { + if (tracksToolInput(content) && content.input) { + this._emit('inputJson', event.delta.partial_json, content.input); + } + break; + } + case 'thinking_delta': { + if (content.type === 'thinking') { + this._emit('thinking', event.delta.thinking, content.thinking); + } + break; + } + case 'signature_delta': { + if (content.type === 'thinking') { + this._emit('signature', content.signature); + } + break; + } + default: + checkNever(event.delta); + } + break; + } + case 'message_stop': { + this._addMessageParam(messageSnapshot); + this._addMessage(messageSnapshot, true); + break; + } + case 'content_block_stop': { + this._emit('contentBlock', messageSnapshot.content.at(-1)); + break; + } + case 'message_start': { + __classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, messageSnapshot, "f"); + break; + } + case 'content_block_start': + case 'message_delta': + break; + } + }, _BetaMessageStream_endRequest = function _BetaMessageStream_endRequest() { + if (this.ended) { + throw new AnthropicError(`stream has ended, this shouldn't happen`); + } + const snapshot = __classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + if (!snapshot) { + throw new AnthropicError(`request ended without sending any chunks`); + } + __classPrivateFieldSet(this, _BetaMessageStream_currentMessageSnapshot, undefined, "f"); + return snapshot; + }, _BetaMessageStream_accumulateMessage = function _BetaMessageStream_accumulateMessage(event) { + let snapshot = __classPrivateFieldGet(this, _BetaMessageStream_currentMessageSnapshot, "f"); + if (event.type === 'message_start') { + if (snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before receiving "message_stop"`); + } + return event.message; + } + if (!snapshot) { + throw new AnthropicError(`Unexpected event order, got ${event.type} before "message_start"`); + } + switch (event.type) { + case 'message_stop': + return snapshot; + case 'message_delta': + snapshot.container = event.delta.container; + snapshot.stop_reason = event.delta.stop_reason; + snapshot.stop_sequence = event.delta.stop_sequence; + snapshot.usage.output_tokens = event.usage.output_tokens; + if (event.usage.input_tokens != null) { + snapshot.usage.input_tokens = event.usage.input_tokens; + } + if (event.usage.cache_creation_input_tokens != null) { + snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens; + } + if (event.usage.cache_read_input_tokens != null) { + snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens; + } + if (event.usage.server_tool_use != null) { + snapshot.usage.server_tool_use = event.usage.server_tool_use; + } + return snapshot; + case 'content_block_start': + snapshot.content.push(event.content_block); + return snapshot; + case 'content_block_delta': { + const snapshotContent = snapshot.content.at(event.index); + switch (event.delta.type) { + case 'text_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.text += event.delta.text; + } + break; + } + case 'citations_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.citations ?? (snapshotContent.citations = []); + snapshotContent.citations.push(event.delta.citation); + } + break; + } + case 'input_json_delta': { + if (snapshotContent && tracksToolInput(snapshotContent)) { + // we need to keep track of the raw JSON string as well so that we can + // re-parse it for each delta, for now we just store it as an untyped + // non-enumerable property on the snapshot + let jsonBuf = snapshotContent[JSON_BUF_PROPERTY] || ''; + jsonBuf += event.delta.partial_json; + Object.defineProperty(snapshotContent, JSON_BUF_PROPERTY, { + value: jsonBuf, + enumerable: false, + writable: true, + }); + if (jsonBuf) { + try { + snapshotContent.input = partialParse(jsonBuf); + } + catch (err) { + const error = new AnthropicError(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${err}. JSON: ${jsonBuf}`); + __classPrivateFieldGet(this, _BetaMessageStream_handleError, "f").call(this, error); + } + } + } + break; + } + case 'thinking_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.thinking += event.delta.thinking; + } + break; + } + case 'signature_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.signature = event.delta.signature; + } + break; + } + default: + checkNever(event.delta); + } + return snapshot; + } + case 'content_block_stop': + return snapshot; + } + }, Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + this.on('streamEvent', (event) => { + const reader = readQueue.shift(); + if (reader) { + reader.resolve(event); + } + else { + pushQueue.push(event); + } + }); + this.on('end', () => { + done = true; + for (const reader of readQueue) { + reader.resolve(undefined); + } + readQueue.length = 0; + }); + this.on('abort', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + this.on('error', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + return { + next: async () => { + if (!pushQueue.length) { + if (done) { + return { value: undefined, done: true }; + } + return new Promise((resolve, reject) => readQueue.push({ resolve, reject })).then((chunk) => (chunk ? { value: chunk, done: false } : { value: undefined, done: true })); + } + const chunk = pushQueue.shift(); + return { value: chunk, done: false }; + }, + return: async () => { + this.abort(); + return { value: undefined, done: true }; + }, + }; + } + toReadableStream() { + const stream = new Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} +// used to ensure exhaustive case matching without throwing a runtime error +function checkNever(x) { } +//# sourceMappingURL=BetaMessageStream.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..de73379ed6d4051983fac398e15515e626b22a3c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"MessageStream.d.mts","sourceRoot":"","sources":["../src/lib/MessageStream.ts"],"names":[],"mappings":"OACO,EAAE,cAAc,EAAE,iBAAiB,EAAE;OACrC,EACL,KAAK,YAAY,EACjB,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAE5B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB;OAGM,EAAE,cAAc,EAAE;AAEzB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,CAAC,KAAK,EAAE,kBAAkB,EAAE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vG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAK,SAAS,MAAM,mBAAmB,EAC7C,KAAK,EAAE,KAAK,GACX,OAAO,CACR,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAClE,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GACxD,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CACzC;IAQK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,IAAI,cAAc,IAAI,OAAO,GAAG,SAAS,CAExC;IASD;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;IAmBtC;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IA0BlC,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,MAAM,mBAAmB,EACrD,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IA8CjD,SAAS,CAAC,UAAU;cAqFJ,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IA8HhB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,kBAAkB,CAAC;IA6D3D,gBAAgB,IAAI,cAAc;CAInC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..df738d425fb1d02b93596ba7ac8e9a1abcfabac8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MessageStream.d.ts","sourceRoot":"","sources":["../src/lib/MessageStream.ts"],"names":[],"mappings":"OACO,EAAE,cAAc,EAAE,iBAAiB,EAAE;OACrC,EACL,KAAK,YAAY,EACjB,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAE5B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB;OAGM,EAAE,cAAc,EAAE;AAEzB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,CAAC,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACpE,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,QAAQ,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC9E,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;IAChE,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,KAAK,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,CAAC,KAAK,EAAE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cAAc,EAAE,cAAc,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IA8HhB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,kBAAkB,CAAC;IA6D3D,gBAAgB,IAAI,cAAc;CAInC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js new file mode 100644 index 0000000000000000000000000000000000000000..33a950aafdda7810e783e1e01543045d2ed94e8a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js @@ -0,0 +1,556 @@ +"use strict"; +var _MessageStream_instances, _MessageStream_currentMessageSnapshot, _MessageStream_connectedPromise, _MessageStream_resolveConnectedPromise, _MessageStream_rejectConnectedPromise, _MessageStream_endPromise, _MessageStream_resolveEndPromise, _MessageStream_rejectEndPromise, _MessageStream_listeners, _MessageStream_ended, _MessageStream_errored, _MessageStream_aborted, _MessageStream_catchingPromiseCreated, _MessageStream_response, _MessageStream_request_id, _MessageStream_getFinalMessage, _MessageStream_getFinalText, _MessageStream_handleError, _MessageStream_beginRequest, _MessageStream_addStreamEvent, _MessageStream_endRequest, _MessageStream_accumulateMessage; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MessageStream = void 0; +const tslib_1 = require("../internal/tslib.js"); +const errors_1 = require("../internal/errors.js"); +const error_1 = require("../error.js"); +const streaming_1 = require("../streaming.js"); +const parser_1 = require("../_vendor/partial-json-parser/parser.js"); +const JSON_BUF_PROPERTY = '__json_buf'; +function tracksToolInput(content) { + return content.type === 'tool_use' || content.type === 'server_tool_use'; +} +class MessageStream { + constructor() { + _MessageStream_instances.add(this); + this.messages = []; + this.receivedMessages = []; + _MessageStream_currentMessageSnapshot.set(this, void 0); + this.controller = new AbortController(); + _MessageStream_connectedPromise.set(this, void 0); + _MessageStream_resolveConnectedPromise.set(this, () => { }); + _MessageStream_rejectConnectedPromise.set(this, () => { }); + _MessageStream_endPromise.set(this, void 0); + _MessageStream_resolveEndPromise.set(this, () => { }); + _MessageStream_rejectEndPromise.set(this, () => { }); + _MessageStream_listeners.set(this, {}); + _MessageStream_ended.set(this, false); + _MessageStream_errored.set(this, false); + _MessageStream_aborted.set(this, false); + _MessageStream_catchingPromiseCreated.set(this, false); + _MessageStream_response.set(this, void 0); + _MessageStream_request_id.set(this, void 0); + _MessageStream_handleError.set(this, (error) => { + tslib_1.__classPrivateFieldSet(this, _MessageStream_errored, true, "f"); + if ((0, errors_1.isAbortError)(error)) { + error = new error_1.APIUserAbortError(); + } + if (error instanceof error_1.APIUserAbortError) { + tslib_1.__classPrivateFieldSet(this, _MessageStream_aborted, true, "f"); + return this._emit('abort', error); + } + if (error instanceof error_1.AnthropicError) { + return this._emit('error', error); + } + if (error instanceof Error) { + const anthropicError = new error_1.AnthropicError(error.message); + // @ts-ignore + anthropicError.cause = error; + return this._emit('error', anthropicError); + } + return this._emit('error', new error_1.AnthropicError(String(error))); + }); + tslib_1.__classPrivateFieldSet(this, _MessageStream_connectedPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _MessageStream_resolveConnectedPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _MessageStream_rejectConnectedPromise, reject, "f"); + }), "f"); + tslib_1.__classPrivateFieldSet(this, _MessageStream_endPromise, new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _MessageStream_resolveEndPromise, resolve, "f"); + tslib_1.__classPrivateFieldSet(this, _MessageStream_rejectEndPromise, reject, "f"); + }), "f"); + // Don't let these promises cause unhandled rejection errors. + // we will manually cause an unhandled rejection error later + // if the user hasn't registered any error listener or called + // any promise-returning method. + tslib_1.__classPrivateFieldGet(this, _MessageStream_connectedPromise, "f").catch(() => { }); + tslib_1.__classPrivateFieldGet(this, _MessageStream_endPromise, "f").catch(() => { }); + } + get response() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_response, "f"); + } + get request_id() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_request_id, "f"); + } + /** + * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request, + * returned vie the `request-id` header which is useful for debugging requests and resporting + * issues to Anthropic. + * + * This is the same as the `APIPromise.withResponse()` method. + * + * This method will raise an error if you created the stream using `MessageStream.fromReadableStream` + * as no `Response` is available. + */ + async withResponse() { + const response = await tslib_1.__classPrivateFieldGet(this, _MessageStream_connectedPromise, "f"); + if (!response) { + throw new Error('Could not resolve a `Response` object'); + } + return { + data: this, + response, + request_id: response.headers.get('request-id'), + }; + } + /** + * Intended for use on the frontend, consuming a stream produced with + * `.toReadableStream()` on the backend. + * + * Note that messages sent to the model do not appear in `.on('message')` + * in this context. + */ + static fromReadableStream(stream) { + const runner = new MessageStream(); + runner._run(() => runner._fromReadableStream(stream)); + return runner; + } + static createMessage(messages, params, options) { + const runner = new MessageStream(); + for (const message of params.messages) { + runner._addMessageParam(message); + } + runner._run(() => runner._createMessage(messages, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); + return runner; + } + _run(executor) { + executor().then(() => { + this._emitFinal(); + this._emit('end'); + }, tslib_1.__classPrivateFieldGet(this, _MessageStream_handleError, "f")); + } + _addMessageParam(message) { + this.messages.push(message); + } + _addMessage(message, emit = true) { + this.receivedMessages.push(message); + if (emit) { + this._emit('message', message); + } + } + async _createMessage(messages, params, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_beginRequest).call(this); + const { response, data: stream } = await messages + .create({ ...params, stream: true }, { ...options, signal: this.controller.signal }) + .withResponse(); + this._connected(response); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_endRequest).call(this); + } + _connected(response) { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _MessageStream_response, response, "f"); + tslib_1.__classPrivateFieldSet(this, _MessageStream_request_id, response?.headers.get('request-id'), "f"); + tslib_1.__classPrivateFieldGet(this, _MessageStream_resolveConnectedPromise, "f").call(this, response); + this._emit('connect'); + } + get ended() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_ended, "f"); + } + get errored() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_errored, "f"); + } + get aborted() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_aborted, "f"); + } + abort() { + this.controller.abort(); + } + /** + * Adds the listener function to the end of the listeners array for the event. + * No checks are made to see if the listener has already been added. Multiple calls passing + * the same combination of event and listener will result in the listener being added, and + * called, multiple times. + * @returns this MessageStream, so that calls can be chained + */ + on(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] = []); + listeners.push({ listener }); + return this; + } + /** + * Removes the specified listener from the listener array for the event. + * off() will remove, at most, one instance of a listener from the listener array. If any single + * listener has been added multiple times to the listener array for the specified event, then + * off() must be called multiple times to remove each instance. + * @returns this MessageStream, so that calls can be chained + */ + off(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event]; + if (!listeners) + return this; + const index = listeners.findIndex((l) => l.listener === listener); + if (index >= 0) + listeners.splice(index, 1); + return this; + } + /** + * Adds a one-time listener function for the event. The next time the event is triggered, + * this listener is removed and then invoked. + * @returns this MessageStream, so that calls can be chained + */ + once(event, listener) { + const listeners = tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] || (tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] = []); + listeners.push({ listener, once: true }); + return this; + } + /** + * This is similar to `.once()`, but returns a Promise that resolves the next time + * the event is triggered, instead of calling a listener callback. + * @returns a Promise that resolves the next time given event is triggered, + * or rejects if an error is emitted. (If you request the 'error' event, + * returns a promise that resolves with the error). + * + * Example: + * + * const message = await stream.emitted('message') // rejects if the stream errors + */ + emitted(event) { + return new Promise((resolve, reject) => { + tslib_1.__classPrivateFieldSet(this, _MessageStream_catchingPromiseCreated, true, "f"); + if (event !== 'error') + this.once('error', reject); + this.once(event, resolve); + }); + } + async done() { + tslib_1.__classPrivateFieldSet(this, _MessageStream_catchingPromiseCreated, true, "f"); + await tslib_1.__classPrivateFieldGet(this, _MessageStream_endPromise, "f"); + } + get currentMessage() { + return tslib_1.__classPrivateFieldGet(this, _MessageStream_currentMessageSnapshot, "f"); + } + /** + * @returns a promise that resolves with the the final assistant Message response, + * or rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalMessage() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_getFinalMessage).call(this); + } + /** + * @returns a promise that resolves with the the final assistant Message's text response, concatenated + * together if there are more than one text blocks. + * Rejects if an error occurred or the stream ended prematurely without producing a Message. + */ + async finalText() { + await this.done(); + return tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_getFinalText).call(this); + } + _emit(event, ...args) { + // make sure we don't emit any MessageStreamEvents after end + if (tslib_1.__classPrivateFieldGet(this, _MessageStream_ended, "f")) + return; + if (event === 'end') { + tslib_1.__classPrivateFieldSet(this, _MessageStream_ended, true, "f"); + tslib_1.__classPrivateFieldGet(this, _MessageStream_resolveEndPromise, "f").call(this); + } + const listeners = tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event]; + if (listeners) { + tslib_1.__classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] = listeners.filter((l) => !l.once); + listeners.forEach(({ listener }) => listener(...args)); + } + if (event === 'abort') { + const error = args[0]; + if (!tslib_1.__classPrivateFieldGet(this, _MessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _MessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + return; + } + if (event === 'error') { + // NOTE: _emit('error', error) should only be called from #handleError(). + const error = args[0]; + if (!tslib_1.__classPrivateFieldGet(this, _MessageStream_catchingPromiseCreated, "f") && !listeners?.length) { + // Trigger an unhandled rejection if the user hasn't registered any error handlers. + // If you are seeing stack traces here, make sure to handle errors via either: + // - runner.on('error', () => ...) + // - await runner.done() + // - await runner.final...() + // - etc. + Promise.reject(error); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_rejectConnectedPromise, "f").call(this, error); + tslib_1.__classPrivateFieldGet(this, _MessageStream_rejectEndPromise, "f").call(this, error); + this._emit('end'); + } + } + _emitFinal() { + const finalMessage = this.receivedMessages.at(-1); + if (finalMessage) { + this._emit('finalMessage', tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_getFinalMessage).call(this)); + } + } + async _fromReadableStream(readableStream, options) { + const signal = options?.signal; + if (signal) { + if (signal.aborted) + this.controller.abort(); + signal.addEventListener('abort', () => this.controller.abort()); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_beginRequest).call(this); + this._connected(null); + const stream = streaming_1.Stream.fromReadableStream(readableStream, this.controller); + for await (const event of stream) { + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_addStreamEvent).call(this, event); + } + if (stream.controller.signal?.aborted) { + throw new error_1.APIUserAbortError(); + } + tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_endRequest).call(this); + } + [(_MessageStream_currentMessageSnapshot = new WeakMap(), _MessageStream_connectedPromise = new WeakMap(), _MessageStream_resolveConnectedPromise = new WeakMap(), _MessageStream_rejectConnectedPromise = new WeakMap(), _MessageStream_endPromise = new WeakMap(), _MessageStream_resolveEndPromise = new WeakMap(), _MessageStream_rejectEndPromise = new WeakMap(), _MessageStream_listeners = new WeakMap(), _MessageStream_ended = new WeakMap(), _MessageStream_errored = new WeakMap(), _MessageStream_aborted = new WeakMap(), _MessageStream_catchingPromiseCreated = new WeakMap(), _MessageStream_response = new WeakMap(), _MessageStream_request_id = new WeakMap(), _MessageStream_handleError = new WeakMap(), _MessageStream_instances = new WeakSet(), _MessageStream_getFinalMessage = function _MessageStream_getFinalMessage() { + if (this.receivedMessages.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a Message with role=assistant'); + } + return this.receivedMessages.at(-1); + }, _MessageStream_getFinalText = function _MessageStream_getFinalText() { + if (this.receivedMessages.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a Message with role=assistant'); + } + const textBlocks = this.receivedMessages + .at(-1) + .content.filter((block) => block.type === 'text') + .map((block) => block.text); + if (textBlocks.length === 0) { + throw new error_1.AnthropicError('stream ended without producing a content block with type=text'); + } + return textBlocks.join(' '); + }, _MessageStream_beginRequest = function _MessageStream_beginRequest() { + if (this.ended) + return; + tslib_1.__classPrivateFieldSet(this, _MessageStream_currentMessageSnapshot, undefined, "f"); + }, _MessageStream_addStreamEvent = function _MessageStream_addStreamEvent(event) { + if (this.ended) + return; + const messageSnapshot = tslib_1.__classPrivateFieldGet(this, _MessageStream_instances, "m", _MessageStream_accumulateMessage).call(this, event); + this._emit('streamEvent', event, messageSnapshot); + switch (event.type) { + case 'content_block_delta': { + const content = messageSnapshot.content.at(-1); + switch (event.delta.type) { + case 'text_delta': { + if (content.type === 'text') { + this._emit('text', event.delta.text, content.text || ''); + } + break; + } + case 'citations_delta': { + if (content.type === 'text') { + this._emit('citation', event.delta.citation, content.citations ?? []); + } + break; + } + case 'input_json_delta': { + if (tracksToolInput(content) && content.input) { + this._emit('inputJson', event.delta.partial_json, content.input); + } + break; + } + case 'thinking_delta': { + if (content.type === 'thinking') { + this._emit('thinking', event.delta.thinking, content.thinking); + } + break; + } + case 'signature_delta': { + if (content.type === 'thinking') { + this._emit('signature', content.signature); + } + break; + } + default: + checkNever(event.delta); + } + break; + } + case 'message_stop': { + this._addMessageParam(messageSnapshot); + this._addMessage(messageSnapshot, true); + break; + } + case 'content_block_stop': { + this._emit('contentBlock', messageSnapshot.content.at(-1)); + break; + } + case 'message_start': { + tslib_1.__classPrivateFieldSet(this, _MessageStream_currentMessageSnapshot, messageSnapshot, "f"); + break; + } + case 'content_block_start': + case 'message_delta': + break; + } + }, _MessageStream_endRequest = function _MessageStream_endRequest() { + if (this.ended) { + throw new error_1.AnthropicError(`stream has ended, this shouldn't happen`); + } + const snapshot = tslib_1.__classPrivateFieldGet(this, _MessageStream_currentMessageSnapshot, "f"); + if (!snapshot) { + throw new error_1.AnthropicError(`request ended without sending any chunks`); + } + tslib_1.__classPrivateFieldSet(this, _MessageStream_currentMessageSnapshot, undefined, "f"); + return snapshot; + }, _MessageStream_accumulateMessage = function _MessageStream_accumulateMessage(event) { + let snapshot = tslib_1.__classPrivateFieldGet(this, _MessageStream_currentMessageSnapshot, "f"); + if (event.type === 'message_start') { + if (snapshot) { + throw new error_1.AnthropicError(`Unexpected event order, got ${event.type} before receiving "message_stop"`); + } + return event.message; + } + if (!snapshot) { + throw new error_1.AnthropicError(`Unexpected event order, got ${event.type} before "message_start"`); + } + switch (event.type) { + case 'message_stop': + return snapshot; + case 'message_delta': + snapshot.stop_reason = event.delta.stop_reason; + snapshot.stop_sequence = event.delta.stop_sequence; + snapshot.usage.output_tokens = event.usage.output_tokens; + // Update other usage fields if they exist in the event + if (event.usage.input_tokens != null) { + snapshot.usage.input_tokens = event.usage.input_tokens; + } + if (event.usage.cache_creation_input_tokens != null) { + snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens; + } + if (event.usage.cache_read_input_tokens != null) { + snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens; + } + if (event.usage.server_tool_use != null) { + snapshot.usage.server_tool_use = event.usage.server_tool_use; + } + return snapshot; + case 'content_block_start': + snapshot.content.push(event.content_block); + return snapshot; + case 'content_block_delta': { + const snapshotContent = snapshot.content.at(event.index); + switch (event.delta.type) { + case 'text_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.text += event.delta.text; + } + break; + } + case 'citations_delta': { + if (snapshotContent?.type === 'text') { + snapshotContent.citations ?? (snapshotContent.citations = []); + snapshotContent.citations.push(event.delta.citation); + } + break; + } + case 'input_json_delta': { + if (snapshotContent && tracksToolInput(snapshotContent)) { + // we need to keep track of the raw JSON string as well so that we can + // re-parse it for each delta, for now we just store it as an untyped + // non-enumerable property on the snapshot + let jsonBuf = snapshotContent[JSON_BUF_PROPERTY] || ''; + jsonBuf += event.delta.partial_json; + Object.defineProperty(snapshotContent, JSON_BUF_PROPERTY, { + value: jsonBuf, + enumerable: false, + writable: true, + }); + if (jsonBuf) { + snapshotContent.input = (0, parser_1.partialParse)(jsonBuf); + } + } + break; + } + case 'thinking_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.thinking += event.delta.thinking; + } + break; + } + case 'signature_delta': { + if (snapshotContent?.type === 'thinking') { + snapshotContent.signature = event.delta.signature; + } + break; + } + default: + checkNever(event.delta); + } + return snapshot; + } + case 'content_block_stop': + return snapshot; + } + }, Symbol.asyncIterator)]() { + const pushQueue = []; + const readQueue = []; + let done = false; + this.on('streamEvent', (event) => { + const reader = readQueue.shift(); + if (reader) { + reader.resolve(event); + } + else { + pushQueue.push(event); + } + }); + this.on('end', () => { + done = true; + for (const reader of readQueue) { + reader.resolve(undefined); + } + readQueue.length = 0; + }); + this.on('abort', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + this.on('error', (err) => { + done = true; + for (const reader of readQueue) { + reader.reject(err); + } + readQueue.length = 0; + }); + return { + next: async () => { + if (!pushQueue.length) { + if (done) { + return { value: undefined, done: true }; + } + return new Promise((resolve, reject) => readQueue.push({ resolve, reject })).then((chunk) => (chunk ? { value: chunk, done: false } : { value: undefined, done: true })); + } + const chunk = pushQueue.shift(); + return { value: chunk, done: false }; + }, + return: async () => { + this.abort(); + return { value: undefined, done: true }; + }, + }; + } + toReadableStream() { + const stream = new streaming_1.Stream(this[Symbol.asyncIterator].bind(this), this.controller); + return stream.toReadableStream(); + } +} +exports.MessageStream = MessageStream; +// used to ensure exhaustive case matching without throwing a runtime error +function checkNever(x) { } +//# sourceMappingURL=MessageStream.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..394af9066ab1a4c2ccfbe8ec9a77830f332e5bd0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MessageStream.js","sourceRoot":"","sources":["../src/lib/MessageStream.ts"],"names":[],"mappings":";;;;;AAAA,kDAAkD;AAClD,uCAA6D;AAc7D,+CAAsC;AACtC,qEAAqE;AAwBrE,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAIvC,SAAS,eAAe,CAAC,OAAqB;IAC5C,OAAO,OAAO,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,IAAI,KAAK,iBAAiB,CAAC;AAC3E,CAAC;AAED,MAAa,aAAa;IAwBxB;;QAvBA,aAAQ,GAAmB,EAAE,CAAC;QAC9B,qBAAgB,GAAc,EAAE,CAAC;QACjC,wDAA6C;QAE7C,eAAU,GAAoB,IAAI,eAAe,EAAE,CAAC;QAEpD,kDAA4C;QAC5C,iDAAgE,GAAG,EAAE,GAAE,CAAC,EAAC;Q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KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;gBAChG,CAAC;gBACD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,EAAG,CAAC;gBACjC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YACvC,CAAC;YACD,MAAM,EAAE,KAAK,IAAI,EAAE;gBACjB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACb,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAC1C,CAAC;SACF,CAAC;IACJ,CAAC;IAED,gBAAgB;QACd,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACnC,CAAC;CACF;AA/nBD,sCA+nBC;AAED,2EAA2E;AAC3E,SAAS,UAAU,CAAC,CAAQ,IAAG,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6d960de6fb5730e54948abfa3a9d13bc8fc6f2e0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.mts @@ -0,0 +1,2 @@ +export * from "./core/pagination.mjs"; +//# sourceMappingURL=pagination.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..0eabcf23d7455ee70f11c0b08f9ebc566f804335 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.d.mts","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d8a556c1cfe741efa4bb6c27c9f5c2f2ca0c9cc4 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.d.ts @@ -0,0 +1,2 @@ +export * from "./core/pagination.js"; +//# sourceMappingURL=pagination.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.js new file mode 100644 index 0000000000000000000000000000000000000000..409ecf56e28c052bd8bee01518e09332934963ef --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("./internal/tslib.js"); +/** @deprecated Import from ./core/pagination instead */ +tslib_1.__exportStar(require("./core/pagination.js"), exports); +//# sourceMappingURL=pagination.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.js.map new file mode 100644 index 0000000000000000000000000000000000000000..39006edfece4f50278c008918868c55a52721ae6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pagination.js","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,+DAAkC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2d838615587c53771422c305872ff815d02bc52d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/pagination.mjs @@ -0,0 +1,2 @@ +export * from "./core/pagination.mjs"; +//# sourceMappingURL=pagination.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b2cd008f7a22d77d7759574aad1f5c113e306dea --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.mts @@ -0,0 +1,2 @@ +export * from "./core/resource.mjs"; +//# sourceMappingURL=resource.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a9498d5db89001a918eb2b599c37ae69487f2fda --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts @@ -0,0 +1,2 @@ +export * from "./core/resource.js"; +//# sourceMappingURL=resource.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b4d42c632198d243db9e91340a7e8d503c4aa7ce --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..333f5f4a36b96d2596a78a9b1a7a5b15333e55f0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.d.mts @@ -0,0 +1,2 @@ +export * from "./resources/index.mjs"; +//# sourceMappingURL=resources.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5db0d717d04a47597dd9c30e74a0a769aa49bfea --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5b2fea9380004e63bbb0975105c7ac65bf0cda3c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.js new file mode 100644 index 0000000000000000000000000000000000000000..4d4afe2af8ef2cc4af56f61bcf91af1516765005 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("./internal/tslib.js"); +tslib_1.__exportStar(require("./resources/index.js"), exports); +//# sourceMappingURL=resources.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2f61813f62690c5477ac27f51b6512cf7bbeed02 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.mjs @@ -0,0 +1,2 @@ +export * from "./resources/index.mjs"; +//# sourceMappingURL=resources.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e91a02056f091f7ff0680236e99fd5fc301b2bce --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..42b229dab494758715e344894456d4012cca27d6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.mts @@ -0,0 +1,2 @@ +export * from "./beta/index.mjs"; +//# sourceMappingURL=beta.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..55303b68f0b44c8eaee87cb7887de46e643bdd53 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.d.mts","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..03922ad3616559c41244308b6eb22ab9d5ce6b08 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.d.ts @@ -0,0 +1,2 @@ +export * from "./beta/index.js"; +//# sourceMappingURL=beta.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.js new file mode 100644 index 0000000000000000000000000000000000000000..4bcc05c863286cbd4f1c82e001ae381967657dfb --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./beta/index.js"), exports); +//# sourceMappingURL=beta.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.js.map new file mode 100644 index 0000000000000000000000000000000000000000..800b37085f60721ceaed52a1388651142fd2914d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.js.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.js","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.mjs new file mode 100644 index 0000000000000000000000000000000000000000..db74562ebb7be6911cfbb1ccf649f7a16fa2b81f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./beta/index.mjs"; +//# sourceMappingURL=beta.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..385fa153027702b5ca0c985d6d372812b2df6e9e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.mjs","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..55637241db843bb2912478d5c500b9a5a5dd0fa6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts @@ -0,0 +1,61 @@ +import { APIResource } from "../../core/resource.js"; +import * as FilesAPI from "./files.js"; +import { DeletedFile, FileDeleteParams, FileDownloadParams, FileListParams, FileMetadata, FileMetadataPage, FileRetrieveMetadataParams, FileUploadParams, Files } from "./files.js"; +import * as ModelsAPI from "./models.js"; +import { BetaModelInfo, BetaModelInfosPage, ModelListParams, ModelRetrieveParams, Models } from "./models.js"; +import * as MessagesAPI from "./messages/messages.js"; +import { BetaBase64ImageSource, BetaBase64PDFBlock, BetaBase64PDFSource, BetaCacheControlEphemeral, BetaCacheCreation, BetaCitationCharLocation, BetaCitationCharLocationParam, BetaCitationContentBlockLocation, BetaCitationContentBlockLocationParam, BetaCitationPageLocation, BetaCitationPageLocationParam, BetaCitationWebSearchResultLocationParam, BetaCitationsConfigParam, BetaCitationsDelta, BetaCitationsWebSearchResultLocation, BetaCodeExecutionOutputBlock, BetaCodeExecutionOutputBlockParam, BetaCodeExecutionResultBlock, BetaCodeExecutionResultBlockParam, BetaCodeExecutionTool20250522, BetaCodeExecutionToolResultBlock, BetaCodeExecutionToolResultBlockContent, BetaCodeExecutionToolResultBlockParam, BetaCodeExecutionToolResultBlockParamContent, BetaCodeExecutionToolResultError, BetaCodeExecutionToolResultErrorCode, BetaCodeExecutionToolResultErrorParam, BetaContainer, BetaContainerUploadBlock, BetaContainerUploadBlockParam, BetaContentBlock, BetaContentBlockParam, BetaContentBlockSource, BetaContentBlockSourceContent, BetaFileDocumentSource, BetaFileImageSource, BetaImageBlockParam, BetaInputJSONDelta, BetaMCPToolResultBlock, BetaMCPToolUseBlock, BetaMCPToolUseBlockParam, BetaMessage, BetaMessageDeltaUsage, BetaMessageParam, BetaMessageTokensCount, BetaMetadata, BetaPlainTextSource, BetaRawContentBlockDelta, BetaRawContentBlockDeltaEvent, BetaRawContentBlockStartEvent, BetaRawContentBlockStopEvent, BetaRawMessageDeltaEvent, BetaRawMessageStartEvent, BetaRawMessageStopEvent, BetaRawMessageStreamEvent, BetaRedactedThinkingBlock, BetaRedactedThinkingBlockParam, BetaRequestDocumentBlock, BetaRequestMCPServerToolConfiguration, BetaRequestMCPServerURLDefinition, BetaRequestMCPToolResultBlockParam, BetaServerToolUsage, BetaServerToolUseBlock, BetaServerToolUseBlockParam, BetaSignatureDelta, BetaStopReason, BetaTextBlock, BetaTextBlockParam, BetaTextCitation, BetaTextCitationParam, BetaTextDelta, BetaThinkingBlock, BetaThinkingBlockParam, BetaThinkingConfigDisabled, BetaThinkingConfigEnabled, BetaThinkingConfigParam, BetaThinkingDelta, BetaTool, BetaToolBash20241022, BetaToolBash20250124, BetaToolChoice, BetaToolChoiceAny, BetaToolChoiceAuto, BetaToolChoiceNone, BetaToolChoiceTool, BetaToolComputerUse20241022, BetaToolComputerUse20250124, BetaToolResultBlockParam, BetaToolTextEditor20241022, BetaToolTextEditor20250124, BetaToolTextEditor20250429, BetaToolUnion, BetaToolUseBlock, BetaToolUseBlockParam, BetaURLImageSource, BetaURLPDFSource, BetaUsage, BetaWebSearchResultBlock, BetaWebSearchResultBlockParam, BetaWebSearchTool20250305, BetaWebSearchToolRequestError, BetaWebSearchToolResultBlock, BetaWebSearchToolResultBlockContent, BetaWebSearchToolResultBlockParam, BetaWebSearchToolResultBlockParamContent, BetaWebSearchToolResultError, BetaWebSearchToolResultErrorCode, MessageCountTokensParams, MessageCreateParams, MessageCreateParamsNonStreaming, MessageCreateParamsStreaming, Messages } from "./messages/messages.js"; +export declare class Beta extends APIResource { + models: ModelsAPI.Models; + messages: MessagesAPI.Messages; + files: FilesAPI.Files; +} +export type AnthropicBeta = (string & {}) | 'message-batches-2024-09-24' | 'prompt-caching-2024-07-31' | 'computer-use-2024-10-22' | 'computer-use-2025-01-24' | 'pdfs-2024-09-25' | 'token-counting-2024-11-01' | 'token-efficient-tools-2025-02-19' | 'output-128k-2025-02-19' | 'files-api-2025-04-14' | 'mcp-client-2025-04-04' | 'dev-full-thinking-2025-05-14' | 'interleaved-thinking-2025-05-14' | 'code-execution-2025-05-22' | 'extended-cache-ttl-2025-04-11'; +export interface BetaAPIError { + message: string; + type: 'api_error'; +} +export interface BetaAuthenticationError { + message: string; + type: 'authentication_error'; +} +export interface BetaBillingError { + message: string; + type: 'billing_error'; +} +export type BetaError = BetaInvalidRequestError | BetaAuthenticationError | BetaBillingError | BetaPermissionError | BetaNotFoundError | BetaRateLimitError | BetaGatewayTimeoutError | BetaAPIError | BetaOverloadedError; +export interface BetaErrorResponse { + error: BetaError; + type: 'error'; +} +export interface BetaGatewayTimeoutError { + message: string; + type: 'timeout_error'; +} +export interface BetaInvalidRequestError { + message: string; + type: 'invalid_request_error'; +} +export interface BetaNotFoundError { + message: string; + type: 'not_found_error'; +} +export interface BetaOverloadedError { + message: string; + type: 'overloaded_error'; +} +export interface BetaPermissionError { + message: string; + type: 'permission_error'; +} +export interface BetaRateLimitError { + message: string; + type: 'rate_limit_error'; +} +export declare namespace Beta { + export { type AnthropicBeta as AnthropicBeta, type BetaAPIError as BetaAPIError, type BetaAuthenticationError as BetaAuthenticationError, type BetaBillingError as BetaBillingError, type BetaError as BetaError, type BetaErrorResponse as BetaErrorResponse, type BetaGatewayTimeoutError as BetaGatewayTimeoutError, type BetaInvalidRequestError as BetaInvalidRequestError, type BetaNotFoundError as BetaNotFoundError, type BetaOverloadedError as BetaOverloadedError, type BetaPermissionError as BetaPermissionError, type BetaRateLimitError as BetaRateLimitError, }; + export { Models as Models, type BetaModelInfo as BetaModelInfo, type BetaModelInfosPage as BetaModelInfosPage, type ModelRetrieveParams as ModelRetrieveParams, type ModelListParams as ModelListParams, }; + export { Messages as Messages, type BetaBase64ImageSource as BetaBase64ImageSource, type BetaBase64PDFSource as BetaBase64PDFSource, type BetaCacheControlEphemeral as BetaCacheControlEphemeral, type BetaCacheCreation as BetaCacheCreation, type BetaCitationCharLocation as BetaCitationCharLocation, type BetaCitationCharLocationParam as BetaCitationCharLocationParam, type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, type BetaCitationPageLocation as BetaCitationPageLocation, type BetaCitationPageLocationParam as BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam as BetaCitationsConfigParam, type BetaCitationsDelta as BetaCitationsDelta, type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, type BetaContainer as BetaContainer, type BetaContainerUploadBlock as BetaContainerUploadBlock, type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, type BetaContentBlock as BetaContentBlock, type BetaContentBlockParam as BetaContentBlockParam, type BetaContentBlockSource as BetaContentBlockSource, type BetaContentBlockSourceContent as BetaContentBlockSourceContent, type BetaFileDocumentSource as BetaFileDocumentSource, type BetaFileImageSource as BetaFileImageSource, type BetaImageBlockParam as BetaImageBlockParam, type BetaInputJSONDelta as BetaInputJSONDelta, type BetaMCPToolResultBlock as BetaMCPToolResultBlock, type BetaMCPToolUseBlock as BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, type BetaMessage as BetaMessage, type BetaMessageDeltaUsage as BetaMessageDeltaUsage, type BetaMessageParam as BetaMessageParam, type BetaMessageTokensCount as BetaMessageTokensCount, type BetaMetadata as BetaMetadata, type BetaPlainTextSource as BetaPlainTextSource, type BetaRawContentBlockDelta as BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent as BetaRawMessageStartEvent, type BetaRawMessageStopEvent as BetaRawMessageStopEvent, type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock as BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage as BetaServerToolUsage, type BetaServerToolUseBlock as BetaServerToolUseBlock, type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, type BetaSignatureDelta as BetaSignatureDelta, type BetaStopReason as BetaStopReason, type BetaTextBlock as BetaTextBlock, type BetaTextBlockParam as BetaTextBlockParam, type BetaTextCitation as BetaTextCitation, type BetaTextCitationParam as BetaTextCitationParam, type BetaTextDelta as BetaTextDelta, type BetaThinkingBlock as BetaThinkingBlock, type BetaThinkingBlockParam as BetaThinkingBlockParam, type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, type BetaThinkingConfigParam as BetaThinkingConfigParam, type BetaThinkingDelta as BetaThinkingDelta, type BetaTool as BetaTool, type BetaToolBash20241022 as BetaToolBash20241022, type BetaToolBash20250124 as BetaToolBash20250124, type BetaToolChoice as BetaToolChoice, type BetaToolChoiceAny as BetaToolChoiceAny, type BetaToolChoiceAuto as BetaToolChoiceAuto, type BetaToolChoiceNone as BetaToolChoiceNone, type BetaToolChoiceTool as BetaToolChoiceTool, type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, type BetaToolResultBlockParam as BetaToolResultBlockParam, type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, type BetaToolUnion as BetaToolUnion, type BetaToolUseBlock as BetaToolUseBlock, type BetaToolUseBlockParam as BetaToolUseBlockParam, type BetaURLImageSource as BetaURLImageSource, type BetaURLPDFSource as BetaURLPDFSource, type BetaUsage as BetaUsage, type BetaWebSearchResultBlock as BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError as BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock as BetaBase64PDFBlock, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageCountTokensParams as MessageCountTokensParams, }; + export { Files as Files, type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPage as FileMetadataPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileRetrieveMetadataParams as FileRetrieveMetadataParams, type FileUploadParams as FileUploadParams, }; +} +//# sourceMappingURL=beta.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js new file mode 100644 index 0000000000000000000000000000000000000000..f8247b524dc28573ca8f5ddd36de9d5783d9a86a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js @@ -0,0 +1,25 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Beta = void 0; +const tslib_1 = require("../../internal/tslib.js"); +const resource_1 = require("../../core/resource.js"); +const FilesAPI = tslib_1.__importStar(require("./files.js")); +const files_1 = require("./files.js"); +const ModelsAPI = tslib_1.__importStar(require("./models.js")); +const models_1 = require("./models.js"); +const MessagesAPI = tslib_1.__importStar(require("./messages/messages.js")); +const messages_1 = require("./messages/messages.js"); +class Beta extends resource_1.APIResource { + constructor() { + super(...arguments); + this.models = new ModelsAPI.Models(this._client); + this.messages = new MessagesAPI.Messages(this._client); + this.files = new FilesAPI.Files(this._client); + } +} +exports.Beta = Beta; +Beta.Models = models_1.Models; +Beta.Messages = messages_1.Messages; +Beta.Files = files_1.Files; +//# sourceMappingURL=beta.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e915d87fae506ae2ab3f7dac86eb414548859528 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map @@ -0,0 +1 @@ +{"version":3,"file":"beta.js","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,6DAAoC;AACpC,sCAUiB;AACjB,+DAAsC;AACtC,wCAA2G;AAC3G,4EAAmD;AACnD,qDAiH6B;AAE7B,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AAJD,oBAIC;AA0FD,IAAI,CAAC,MAAM,GAAG,eAAM,CAAC;AACrB,IAAI,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AACzB,IAAI,CAAC,KAAK,GAAG,aAAK,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..2e6c3beb6c0716356774de6405f578798ad1de23 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../src/resources/beta/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAgC;OAEtC,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,IAAI,CACF,SAA4C,EAAE,EAC9C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,IAAkB,CAAA,EAAE;YAC9D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC3E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,MAAc,EACd,SAA8C,EAAE,EAChD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MA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AAC,MAAwB,EAAE,OAAwB;QACvD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,WAAW,EACX,2BAA2B,CACzB;YACE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC3E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,CAAC;IACJ,CAAC;CACF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..5365918d105fb1cbc4692f807ebcf3bec3a7656b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB;OACM,EACL,KAAK,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,E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AAK,eAAe,EACpB,KAAK,kBAAkB,GACxB"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..3af531f67b88b4bc0c4f1a374edbc4b750a6c70c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB;OACM,EACL,KAAK,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB;OACM,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,wCAAwC,EAC7C,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,oCAAoC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,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,EACtC,KAAK,wCAAwC,EAC7C,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B;OACM,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cf0bda80e4aec9d7e0578ee1ceb3a0fc7f8f678a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAcgB;AAbd,4FAAA,IAAI,OAAA;AAcN,oCAUiB;AATf,8FAAA,KAAK,OAAA;AAUP,6CAiH0B;AAhHxB,iGAAA,QAAQ,OAAA;AAiHV,sCAMkB;AALhB,gGAAA,MAAM,OAAA"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1c0bed007690f90e2ba0d23faf984a3862a9c083 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs @@ -0,0 +1,6 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Beta, } from "./beta.mjs"; +export { Files, } from "./files.mjs"; +export { Messages, } from "./messages/index.mjs"; +export { Models, } from "./models.mjs"; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..ccd8db01df6ae24bf193eff1dea94a7025096f8c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAaL;OACM,EACL,KAAK,GASN;OACM,EACL,QAAQ,GAgHT;OACM,EACL,MAAM,GAKP"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..cfa5adeee9197dcc1b47d25c34bf8c31a91183ca --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts @@ -0,0 +1,2 @@ +export * from "./messages/index.mjs"; +//# sourceMappingURL=messages.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ec9e0dad0721e9d2e3f4c12e30ce0f58c7c9b743 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/beta/messages.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..795250c879ea8e2f1d1f1acf743f0f5cea0e052b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts @@ -0,0 +1,2 @@ +export * from "./messages/index.js"; +//# sourceMappingURL=messages.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.js new file mode 100644 index 0000000000000000000000000000000000000000..04a25500cba95febcd3d851127f02a820156c9df --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../../internal/tslib.js"); +tslib_1.__exportStar(require("./messages/index.js"), exports); +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..10504623d4b3a05e916a476469f7a82f52a6af2b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/messages/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,KAAK,eAAe;OACpB,EAAE,IAAI,EAAE,KAAK,UAAU,EA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AED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f67df56968ad8ba6cd55e28429ad13aa4d8c809e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts @@ -0,0 +1,343 @@ +import { APIResource } from "../../../core/resource.js"; +import * as BetaAPI from "../beta.js"; +import { APIPromise } from "../../../core/api-promise.js"; +import * as BetaMessagesAPI from "./messages.js"; +import { Page, type PageParams, PagePromise } from "../../../core/pagination.js"; +import { RequestOptions } from "../../../internal/request-options.js"; +import { JSONLDecoder } from "../../../internal/decoders/jsonl.js"; +export declare class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(params: BatchCreateParams, options?: RequestOptions): APIPromise; + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID: string, params?: BatchRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaMessageBatch of client.beta.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(params?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaDeletedMessageBatch = + * await client.beta.messages.batches.delete( + * 'message_batch_id', + * ); + * ``` + */ + delete(messageBatchID: string, params?: BatchDeleteParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID: string, params?: BatchCancelParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatchIndividualResponse = + * await client.beta.messages.batches.results( + * 'message_batch_id', + * ); + * ``` + */ + results(messageBatchID: string, params?: BatchResultsParams | undefined, options?: RequestOptions): Promise>; +} +export type BetaMessageBatchesPage = Page; +export interface BetaDeletedMessageBatch { + /** + * ID of the Message Batch. + */ + id: string; + /** + * Deleted object type. + * + * For Message Batches, this is always `"message_batch_deleted"`. + */ + type: 'message_batch_deleted'; +} +export interface BetaMessageBatch { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * archived and its results became unavailable. + */ + archived_at: string | null; + /** + * RFC 3339 datetime string representing the time at which cancellation was + * initiated for the Message Batch. Specified only if cancellation was initiated. + */ + cancel_initiated_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * created. + */ + created_at: string; + /** + * RFC 3339 datetime string representing the time at which processing for the + * Message Batch ended. Specified only once processing ends. + * + * Processing ends when every request in a Message Batch has either succeeded, + * errored, canceled, or expired. + */ + ended_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch will + * expire and end processing, which is 24 hours after creation. + */ + expires_at: string; + /** + * Processing status of the Message Batch. + */ + processing_status: 'in_progress' | 'canceling' | 'ended'; + /** + * Tallies requests within the Message Batch, categorized by their status. + * + * Requests start as `processing` and move to one of the other statuses only once + * processing of the entire batch ends. The sum of all values always matches the + * total number of requests in the batch. + */ + request_counts: BetaMessageBatchRequestCounts; + /** + * URL to a `.jsonl` file containing the results of the Message Batch requests. + * Specified only once processing ends. + * + * Results in the file are not guaranteed to be in the same order as requests. Use + * the `custom_id` field to match results to requests. + */ + results_url: string | null; + /** + * Object type. + * + * For Message Batches, this is always `"message_batch"`. + */ + type: 'message_batch'; +} +export interface BetaMessageBatchCanceledResult { + type: 'canceled'; +} +export interface BetaMessageBatchErroredResult { + error: BetaAPI.BetaErrorResponse; + type: 'errored'; +} +export interface BetaMessageBatchExpiredResult { + type: 'expired'; +} +/** + * This is a single line in the response `.jsonl` file and does not represent the + * response as a whole. + */ +export interface BetaMessageBatchIndividualResponse { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ + result: BetaMessageBatchResult; +} +export interface BetaMessageBatchRequestCounts { + /** + * Number of requests in the Message Batch that have been canceled. + * + * This is zero until processing of the entire Message Batch has ended. + */ + canceled: number; + /** + * Number of requests in the Message Batch that encountered an error. + * + * This is zero until processing of the entire Message Batch has ended. + */ + errored: number; + /** + * Number of requests in the Message Batch that have expired. + * + * This is zero until processing of the entire Message Batch has ended. + */ + expired: number; + /** + * Number of requests in the Message Batch that are processing. + */ + processing: number; + /** + * Number of requests in the Message Batch that have completed successfully. + * + * This is zero until processing of the entire Message Batch has ended. + */ + succeeded: number; +} +/** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ +export type BetaMessageBatchResult = BetaMessageBatchSucceededResult | BetaMessageBatchErroredResult | BetaMessageBatchCanceledResult | BetaMessageBatchExpiredResult; +export interface BetaMessageBatchSucceededResult { + message: BetaMessagesAPI.BetaMessage; + type: 'succeeded'; +} +export interface BatchCreateParams { + /** + * Body param: List of requests for prompt completion. Each is an individual + * request to create a Message. + */ + requests: Array; + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace BatchCreateParams { + interface Request { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Messages API creation parameters for the individual request. + * + * See the [Messages API reference](/en/api/messages) for full documentation on + * available parameters. + */ + params: Omit; + } +} +export interface BatchRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchDeleteParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchCancelParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface BatchResultsParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Batches { + export { type BetaDeletedMessageBatch as BetaDeletedMessageBatch, type BetaMessageBatch as BetaMessageBatch, type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts, type BetaMessageBatchResult as BetaMessageBatchResult, type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult, type BetaMessageBatchesPage as BetaMessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchRetrieveParams as BatchRetrieveParams, type BatchListParams as BatchListParams, type BatchDeleteParams as BatchDeleteParams, type BatchCancelParams as BatchCancelParams, type BatchResultsParams as BatchResultsParams, }; +} +//# sourceMappingURL=batches.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs new file mode 100644 index 0000000000000000000000000000000000000000..568499643dccbf9a1a02f4d1308e8c54ed99a11c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs @@ -0,0 +1,200 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../../../core/resource.mjs"; +import { Page } from "../../../core/pagination.mjs"; +import { buildHeaders } from "../../../internal/headers.mjs"; +import { JSONLDecoder } from "../../../internal/decoders/jsonl.mjs"; +import { AnthropicError } from "../../../error.mjs"; +import { path } from "../../../internal/utils/path.mjs"; +export class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/messages/batches?beta=true', { + body, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get(path `/v1/messages/batches/${messageBatchID}?beta=true`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaMessageBatch of client.beta.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/messages/batches?beta=true', (Page), { + query, + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaDeletedMessageBatch = + * await client.beta.messages.batches.delete( + * 'message_batch_id', + * ); + * ``` + */ + delete(messageBatchID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.delete(path `/v1/messages/batches/${messageBatchID}?beta=true`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatch = + * await client.beta.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.post(path `/v1/messages/batches/${messageBatchID}/cancel?beta=true`, { + ...options, + headers: buildHeaders([ + { 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() }, + options?.headers, + ]), + }); + } + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const betaMessageBatchIndividualResponse = + * await client.beta.messages.batches.results( + * 'message_batch_id', + * ); + * ``` + */ + async results(messageBatchID, params = {}, options) { + const batch = await this.retrieve(messageBatchID); + if (!batch.results_url) { + throw new AnthropicError(`No batch \`results_url\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`); + } + const { betas } = params ?? {}; + return this._client + .get(batch.results_url, { + ...options, + headers: buildHeaders([ + { + 'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(), + Accept: 'application/binary', + }, + options?.headers, + ]), + stream: true, + __binaryResponse: true, + }) + ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)); + } +} +//# sourceMappingURL=batches.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..960b7e6e907699e0a88c49e9a938d2e4ef742a48 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../../../src/resources/beta/messages/batches.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAgC;OACtC,EAAE,YAAY,EAAE;OAEhB,EAAE,YAAY,EAAE;OAChB,EAAE,cAAc,EAAE;OAClB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,MAAyB,EAAE,OAAwB;QACxD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE;YACzD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,4BAA4B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACjF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CACN,cAAsB,EACtB,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,cAAc,YAAY,EAAE;YAC9E,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,4BAA4B,CAAC,CAAC,QAA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/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5d4c8b4908cdb71874e9dc0fde34ccb7ee591d48 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts @@ -0,0 +1,3 @@ +export { Batches, type BetaDeletedMessageBatch, type BetaMessageBatch, type BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts, type BetaMessageBatchResult, type BetaMessageBatchSucceededResult, type BatchCreateParams, type BatchRetrieveParams, type BatchListParams, type BatchDeleteParams, type BatchCancelParams, type BatchResultsParams, type BetaMessageBatchesPage, } from "./batches.mjs"; +export { Messages, type BetaBase64ImageSource, type BetaBase64PDFSource, type BetaCacheControlEphemeral, type BetaCacheCreation, type BetaCitationCharLocation, type BetaCitationCharLocationParam, type BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam, type BetaCitationPageLocation, type BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam, type BetaCitationsDelta, type BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam, type BetaContainer, type BetaContainerUploadBlock, type BetaContainerUploadBlockParam, type BetaContentBlock, type BetaContentBlockParam, type BetaContentBlockSource, type BetaContentBlockSourceContent, type BetaFileDocumentSource, type BetaFileImageSource, type BetaImageBlockParam, type BetaInputJSONDelta, type BetaMCPToolResultBlock, type BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam, type BetaMessage, type BetaMessageDeltaUsage, type BetaMessageParam, type BetaMessageTokensCount, type BetaMetadata, type BetaPlainTextSource, type BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent, type BetaRawMessageStopEvent, type BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage, type BetaServerToolUseBlock, type BetaServerToolUseBlockParam, type BetaSignatureDelta, type BetaStopReason, type BetaTextBlock, type BetaTextBlockParam, type BetaTextCitation, type BetaTextCitationParam, type BetaTextDelta, type BetaThinkingBlock, type BetaThinkingBlockParam, type BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled, type BetaThinkingConfigParam, type BetaThinkingDelta, type BetaTool, type BetaToolBash20241022, type BetaToolBash20250124, type BetaToolChoice, type BetaToolChoiceAny, type BetaToolChoiceAuto, type BetaToolChoiceNone, type BetaToolChoiceTool, type BetaToolComputerUse20241022, type BetaToolComputerUse20250124, type BetaToolResultBlockParam, type BetaToolTextEditor20241022, type BetaToolTextEditor20250124, type BetaToolTextEditor20250429, type BetaToolUnion, type BetaToolUseBlock, type BetaToolUseBlockParam, type BetaURLImageSource, type BetaURLPDFSource, type BetaUsage, type BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305, type BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, type BetaMessageStreamParams, } from "./messages.mjs"; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..3c628797576bf7d8b6bb1a6afc13ead900dbfec7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/messages/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,kCAAkC,EACvC,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACpC,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,GAC5B;OACM,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,wCAAwC,EAC7C,KAAK,wBAA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K,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,EACtC,KAAK,wCAAwC,EAC7C,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..54f1994fddc41ef40db1f340a36f2d3d0f5eacc6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts @@ -0,0 +1,3 @@ +export { Batches, type BetaDeletedMessageBatch, type BetaMessageBatch, type BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts, type BetaMessageBatchResult, type BetaMessageBatchSucceededResult, type BatchCreateParams, type BatchRetrieveParams, type BatchListParams, type BatchDeleteParams, type BatchCancelParams, type BatchResultsParams, type BetaMessageBatchesPage, } from "./batches.js"; +export { Messages, type BetaBase64ImageSource, type BetaBase64PDFSource, type BetaCacheControlEphemeral, type BetaCacheCreation, type BetaCitationCharLocation, type BetaCitationCharLocationParam, type BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam, type BetaCitationPageLocation, type BetaCitationPageLocationParam, type BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam, type BetaCitationsDelta, type BetaCitationsWebSearchResultLocation, type BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522, type BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam, type BetaContainer, type BetaContainerUploadBlock, type BetaContainerUploadBlockParam, type BetaContentBlock, type BetaContentBlockParam, type BetaContentBlockSource, type BetaContentBlockSourceContent, type BetaFileDocumentSource, type BetaFileImageSource, type BetaImageBlockParam, type BetaInputJSONDelta, type BetaMCPToolResultBlock, type BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam, type BetaMessage, type BetaMessageDeltaUsage, type BetaMessageParam, type BetaMessageTokensCount, type BetaMetadata, type BetaPlainTextSource, type BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent, type BetaRawMessageStopEvent, type BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam, type BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam, type BetaServerToolUsage, type BetaServerToolUseBlock, type BetaServerToolUseBlockParam, type BetaSignatureDelta, type BetaStopReason, type BetaTextBlock, type BetaTextBlockParam, type BetaTextCitation, type BetaTextCitationParam, type BetaTextDelta, type BetaThinkingBlock, type BetaThinkingBlockParam, type BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled, type BetaThinkingConfigParam, type BetaThinkingDelta, type BetaTool, type BetaToolBash20241022, type BetaToolBash20250124, type BetaToolChoice, type BetaToolChoiceAny, type BetaToolChoiceAuto, type BetaToolChoiceNone, type BetaToolChoiceTool, type BetaToolComputerUse20241022, type BetaToolComputerUse20250124, type BetaToolResultBlockParam, type BetaToolTextEditor20241022, type BetaToolTextEditor20250124, type BetaToolTextEditor20250429, type BetaToolUnion, type BetaToolUseBlock, type BetaToolUseBlockParam, type BetaURLImageSource, type BetaURLPDFSource, type BetaUsage, type BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305, type BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, type BetaMessageStreamParams, } from "./messages.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..43fef1dd1f50a905c5b77ff2a2df1d906329a5ec --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Batches, } from "./batches.mjs"; +export { Messages, } from "./messages.mjs"; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..1ce9dd9a81e5292573426431cd41687d66e89d3f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/messages/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAiBR;OACM,EACL,QAAQ,GAiHT"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..c922d294cc2d21b4c252978cc4a7a7826f6f87a1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.mts","s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IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..80b0f719b01a28f31a1700e5cf404b213bd601ec --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/messages/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,KAAK,UAAU;OACf,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,E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ACnE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ebce7057da738689c82533a488cf8a5347657e34 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/resources/beta/models.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OAEtC,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAW5B;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,MAAM,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kBAAkB,EAAE,aAAa,CAAC;CAWlD;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js new file mode 100644 index 0000000000000000000000000000000000000000..d398f333e38ff8de71bb9ffdf8ee51b385b3b72b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js @@ -0,0 +1,60 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Models = void 0; +const resource_1 = require("../../core/resource.js"); +const pagination_1 = require("../../core/pagination.js"); +const headers_1 = require("../../internal/headers.js"); +const path_1 = require("../../internal/utils/path.js"); +class Models extends resource_1.APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + * + * @example + * ```ts + * const betaModelInfo = await client.beta.models.retrieve( + * 'model_id', + * ); + * ``` + */ + retrieve(modelID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get((0, path_1.path) `/v1/models/${modelID}?beta=true`, { + ...options, + headers: (0, headers_1.buildHeaders)([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaModelInfo of client.beta.models.list()) { + * // ... + * } + * ``` + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/models?beta=true', (pagination_1.Page), { + query, + ...options, + headers: (0, headers_1.buildHeaders)([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } +} +exports.Models = Models; +//# sourceMappingURL=models.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cc17c3a5720153f7d5898b56e51a85763471a184 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map @@ -0,0 +1 @@ +{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/resources/beta/models.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ops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e27b0e30fb6e7f329a2417d10048735f148d7c09 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../../src/resources/beta/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAgC;OACtC,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,OAAO,YAAY,EAAE;YAC7D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,IAAmB,CAAA,EAAE;YAC1E,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..664d8738919ddb8d760a07faf5425abc1ebaceb6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"completions.d.mts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,MAAM,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IACpG,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;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Ac,CAAC,kCAAkC,CAAC;IACnG,KAAY,+BAA+B,GAAG,cAAc,CAAC,+BAA+B,CAAC;CAC9F;AAED,MAAM,WAAW,kCAAmC,SAAQ,0BAA0B;IACpF;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IACjF;;;;;OAKG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.js new file mode 100644 index 0000000000000000000000000000000000000000..6c721bb99a123cacfb002b95296ab0391cba2928 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.js @@ -0,0 +1,23 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Completions = void 0; +const resource_1 = require("../core/resource.js"); +const headers_1 = require("../internal/headers.js"); +class Completions extends resource_1.APIResource { + create(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/complete', { + body, + timeout: this._client._options.timeout ?? 600000, + ...options, + headers: (0, headers_1.buildHeaders)([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + stream: params.stream ?? false, + }); + } +} +exports.Completions = Completions; +//# sourceMappingURL=completions.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7e4e65826e64d4bfaa4b94162d63de5605d7b6b9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"completions.js","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAM/C,oDAAmD;AAGnD,MAAa,WAAY,SAAQ,sBAAW;IA0B1C,MAAM,CACJ,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;SAC/B,CAA4D,CAAC;IAChE,CAAC;CACF;AA1CD,kCA0CC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs new file mode 100644 index 0000000000000000000000000000000000000000..648f8e96c8b6bbe0b8b89338f074b1baf779106a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +import { buildHeaders } from "../internal/headers.mjs"; +export class Completions extends APIResource { + create(params, options) { + const { betas, ...body } = params; + return this._client.post('/v1/complete', { + body, + timeout: this._client._options.timeout ?? 600000, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + stream: params.stream ?? false, + }); + } +} +//# sourceMappingURL=completions.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..0454551d9ebdf449384f033a2a46a024e52f127b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAMf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,WAAY,SAAQ,WAAW;IA0B1C,MAAM,CACJ,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;SAC/B,CAA4D,CAAC;IAChE,CAAC;CACF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b2e463c4299f0a515566a726ff89f8ad0046ad56 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts @@ -0,0 +1,6 @@ +export * from "./shared.mjs"; +export { Beta, type AnthropicBeta, type BetaAPIError, type BetaAuthenticationError, type BetaBillingError, type BetaError, type BetaErrorResponse, type BetaGatewayTimeoutError, type BetaInvalidRequestError, type BetaNotFoundError, type BetaOverloadedError, type BetaPermissionError, type BetaRateLimitError, } from "./beta/beta.mjs"; +export { Completions, type Completion, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.mjs"; +export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageStreamParams, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/messages.mjs"; +export { Models, type ModelInfo, type ModelRetrieveParams, type ModelListParams, type ModelInfosPage, } from "./models.mjs"; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..252af9d0b3992f1131741e2f66712d8d4decb3ed --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACvC,KAAK,+BAA+B,GACrC;OACM,EACL,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,gCAAgC,EACrC,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KA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B,KAAK,cAAc,GACpB"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..931d04fdea1845b8007231d3df1269f66efa940d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts @@ -0,0 +1,6 @@ +export * from "./shared.js"; +export { Beta, type AnthropicBeta, type BetaAPIError, type BetaAuthenticationError, type BetaBillingError, type BetaError, type BetaErrorResponse, type BetaGatewayTimeoutError, type BetaInvalidRequestError, type BetaNotFoundError, type BetaOverloadedError, type BetaPermissionError, type BetaRateLimitError, } from "./beta/beta.js"; +export { Completions, type Completion, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.js"; +export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageStreamParams, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageCreateParams, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages/messages.js"; +export { Models, type ModelInfo, type ModelRetrieveParams, type ModelListParams, type ModelInfosPage, } from "./models.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..89a8ec945c015da3271a4b8edd13181bce40281f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iB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EACnB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B;OACM,EACL,MAAM,EACN,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js new file mode 100644 index 0000000000000000000000000000000000000000..3d8058bd187b0a36de14a93694720850b704ffeb --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js @@ -0,0 +1,15 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Models = exports.Messages = exports.Completions = exports.Beta = void 0; +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./shared.js"), exports); +var beta_1 = require("./beta/beta.js"); +Object.defineProperty(exports, "Beta", { enumerable: true, get: function () { return beta_1.Beta; } }); +var completions_1 = require("./completions.js"); +Object.defineProperty(exports, "Completions", { enumerable: true, get: function () { return completions_1.Completions; } }); +var messages_1 = require("./messages/messages.js"); +Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } }); +var models_1 = require("./models.js"); +Object.defineProperty(exports, "Models", { enumerable: true, get: function () { return models_1.Models; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e858d7e369dbc11a7e025920bdd13ea477b3f783 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,uCAcqB;AAbnB,4FAAA,IAAI,OAAA;AAcN,gDAMuB;AALrB,0GAAA,WAAW,OAAA;AAMb,mDAwF6B;AAvF3B,oGAAA,QAAQ,OAAA;AAwFV,sCAMkB;AALhB,gGAAA,MAAM,OAAA"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..01d72943df0d43238e747dc4e3dd6c6f7a17c95b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/index.mjs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./shared.mjs"; +export { Beta, } from "./beta/beta.mjs"; +export { Completions, } from "./completions.mjs"; +export { Messages, } from "./messages/messages.mjs"; +export { Models, } from "./models.mjs"; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..cfa5adeee9197dcc1b47d25c34bf8c31a91183ca --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts @@ -0,0 +1,2 @@ +export * from "./messages/index.mjs"; +//# sourceMappingURL=messages.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..12628e31fa3541d1aebc6eb55f508251c025986a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..795250c879ea8e2f1d1f1acf743f0f5cea0e052b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts @@ -0,0 +1,2 @@ +export * from "./messages/index.js"; +//# sourceMappingURL=messages.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..659ed6dcddebb6da9447852d616b60534f44a810 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js new file mode 100644 index 0000000000000000000000000000000000000000..4c703a21a5feeec2a9fe29fd62f3c872e0394512 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js @@ -0,0 +1,6 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("../internal/tslib.js"); +tslib_1.__exportStar(require("./messages/index.js"), exports); +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bcef52fbf90415cacc7f177cd15b3b271dddc9d3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d675b231aff911954a6f5467c1f702a7f337d03d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export * from "./messages/index.mjs"; +//# sourceMappingURL=messages.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..caa8ebda6ad00aed9ab7260c12f2d55ef60afbc1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..59e5ad927f1d885c781f639171e017bda994d967 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts @@ -0,0 +1,304 @@ +import { APIResource } from "../../core/resource.mjs"; +import * as Shared from "../shared.mjs"; +import * as MessagesAPI from "./messages.mjs"; +import { APIPromise } from "../../core/api-promise.mjs"; +import { Page, type PageParams, PagePromise } from "../../core/pagination.mjs"; +import { RequestOptions } from "../../internal/request-options.mjs"; +import { JSONLDecoder } from "../../internal/decoders/jsonl.mjs"; +export declare class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(body: BatchCreateParams, options?: RequestOptions): APIPromise; + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const messageBatch of client.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const deletedMessageBatch = + * await client.messages.batches.delete('message_batch_id'); + * ``` + */ + delete(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatchIndividualResponse = + * await client.messages.batches.results('message_batch_id'); + * ``` + */ + results(messageBatchID: string, options?: RequestOptions): Promise>; +} +export type MessageBatchesPage = Page; +export interface DeletedMessageBatch { + /** + * ID of the Message Batch. + */ + id: string; + /** + * Deleted object type. + * + * For Message Batches, this is always `"message_batch_deleted"`. + */ + type: 'message_batch_deleted'; +} +export interface MessageBatch { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * archived and its results became unavailable. + */ + archived_at: string | null; + /** + * RFC 3339 datetime string representing the time at which cancellation was + * initiated for the Message Batch. Specified only if cancellation was initiated. + */ + cancel_initiated_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * created. + */ + created_at: string; + /** + * RFC 3339 datetime string representing the time at which processing for the + * Message Batch ended. Specified only once processing ends. + * + * Processing ends when every request in a Message Batch has either succeeded, + * errored, canceled, or expired. + */ + ended_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch will + * expire and end processing, which is 24 hours after creation. + */ + expires_at: string; + /** + * Processing status of the Message Batch. + */ + processing_status: 'in_progress' | 'canceling' | 'ended'; + /** + * Tallies requests within the Message Batch, categorized by their status. + * + * Requests start as `processing` and move to one of the other statuses only once + * processing of the entire batch ends. The sum of all values always matches the + * total number of requests in the batch. + */ + request_counts: MessageBatchRequestCounts; + /** + * URL to a `.jsonl` file containing the results of the Message Batch requests. + * Specified only once processing ends. + * + * Results in the file are not guaranteed to be in the same order as requests. Use + * the `custom_id` field to match results to requests. + */ + results_url: string | null; + /** + * Object type. + * + * For Message Batches, this is always `"message_batch"`. + */ + type: 'message_batch'; +} +export interface MessageBatchCanceledResult { + type: 'canceled'; +} +export interface MessageBatchErroredResult { + error: Shared.ErrorResponse; + type: 'errored'; +} +export interface MessageBatchExpiredResult { + type: 'expired'; +} +/** + * This is a single line in the response `.jsonl` file and does not represent the + * response as a whole. + */ +export interface MessageBatchIndividualResponse { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ + result: MessageBatchResult; +} +export interface MessageBatchRequestCounts { + /** + * Number of requests in the Message Batch that have been canceled. + * + * This is zero until processing of the entire Message Batch has ended. + */ + canceled: number; + /** + * Number of requests in the Message Batch that encountered an error. + * + * This is zero until processing of the entire Message Batch has ended. + */ + errored: number; + /** + * Number of requests in the Message Batch that have expired. + * + * This is zero until processing of the entire Message Batch has ended. + */ + expired: number; + /** + * Number of requests in the Message Batch that are processing. + */ + processing: number; + /** + * Number of requests in the Message Batch that have completed successfully. + * + * This is zero until processing of the entire Message Batch has ended. + */ + succeeded: number; +} +/** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ +export type MessageBatchResult = MessageBatchSucceededResult | MessageBatchErroredResult | MessageBatchCanceledResult | MessageBatchExpiredResult; +export interface MessageBatchSucceededResult { + message: MessagesAPI.Message; + type: 'succeeded'; +} +export interface BatchCreateParams { + /** + * List of requests for prompt completion. Each is an individual request to create + * a Message. + */ + requests: Array; +} +export declare namespace BatchCreateParams { + interface Request { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Messages API creation parameters for the individual request. + * + * See the [Messages API reference](/en/api/messages) for full documentation on + * available parameters. + */ + params: MessagesAPI.MessageCreateParamsNonStreaming; + } +} +export interface BatchListParams extends PageParams { +} +export declare namespace Batches { + export { type DeletedMessageBatch as DeletedMessageBatch, type MessageBatch as MessageBatch, type MessageBatchCanceledResult as MessageBatchCanceledResult, type MessageBatchErroredResult as MessageBatchErroredResult, type MessageBatchExpiredResult as MessageBatchExpiredResult, type MessageBatchIndividualResponse as MessageBatchIndividualResponse, type MessageBatchRequestCounts as MessageBatchRequestCounts, type MessageBatchResult as MessageBatchResult, type MessageBatchSucceededResult as MessageBatchSucceededResult, type MessageBatchesPage as MessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, }; +} +//# sourceMappingURL=batches.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..a824e0e6c81e30e47d2734d54d1246c5b18fe4be --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.d.mts","sourceRoot":"","sources":["../../src/resources/messages/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OAEtC,EAAE,cAAc,EAAE;OAClB,EAAE,YAAY,EAAE;AAIvB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAInF;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAIpF;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kBAAkB,EAAE,YAAY,CAAC;IAIhD;;;;;;;;;;;;;;OAcG;IACH,MAAM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AI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ac8875aa96fccf89865affe0fce23a046b112dfe --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts @@ -0,0 +1,304 @@ +import { APIResource } from "../../core/resource.js"; +import * as Shared from "../shared.js"; +import * as MessagesAPI from "./messages.js"; +import { APIPromise } from "../../core/api-promise.js"; +import { Page, type PageParams, PagePromise } from "../../core/pagination.js"; +import { RequestOptions } from "../../internal/request-options.js"; +import { JSONLDecoder } from "../../internal/decoders/jsonl.js"; +export declare class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(body: BatchCreateParams, options?: RequestOptions): APIPromise; + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const messageBatch of client.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise; + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const deletedMessageBatch = + * await client.messages.batches.delete('message_batch_id'); + * ``` + */ + delete(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID: string, options?: RequestOptions): APIPromise; + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatchIndividualResponse = + * await client.messages.batches.results('message_batch_id'); + * ``` + */ + results(messageBatchID: string, options?: RequestOptions): Promise>; +} +export type MessageBatchesPage = Page; +export interface DeletedMessageBatch { + /** + * ID of the Message Batch. + */ + id: string; + /** + * Deleted object type. + * + * For Message Batches, this is always `"message_batch_deleted"`. + */ + type: 'message_batch_deleted'; +} +export interface MessageBatch { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * archived and its results became unavailable. + */ + archived_at: string | null; + /** + * RFC 3339 datetime string representing the time at which cancellation was + * initiated for the Message Batch. Specified only if cancellation was initiated. + */ + cancel_initiated_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch was + * created. + */ + created_at: string; + /** + * RFC 3339 datetime string representing the time at which processing for the + * Message Batch ended. Specified only once processing ends. + * + * Processing ends when every request in a Message Batch has either succeeded, + * errored, canceled, or expired. + */ + ended_at: string | null; + /** + * RFC 3339 datetime string representing the time at which the Message Batch will + * expire and end processing, which is 24 hours after creation. + */ + expires_at: string; + /** + * Processing status of the Message Batch. + */ + processing_status: 'in_progress' | 'canceling' | 'ended'; + /** + * Tallies requests within the Message Batch, categorized by their status. + * + * Requests start as `processing` and move to one of the other statuses only once + * processing of the entire batch ends. The sum of all values always matches the + * total number of requests in the batch. + */ + request_counts: MessageBatchRequestCounts; + /** + * URL to a `.jsonl` file containing the results of the Message Batch requests. + * Specified only once processing ends. + * + * Results in the file are not guaranteed to be in the same order as requests. Use + * the `custom_id` field to match results to requests. + */ + results_url: string | null; + /** + * Object type. + * + * For Message Batches, this is always `"message_batch"`. + */ + type: 'message_batch'; +} +export interface MessageBatchCanceledResult { + type: 'canceled'; +} +export interface MessageBatchErroredResult { + error: Shared.ErrorResponse; + type: 'errored'; +} +export interface MessageBatchExpiredResult { + type: 'expired'; +} +/** + * This is a single line in the response `.jsonl` file and does not represent the + * response as a whole. + */ +export interface MessageBatchIndividualResponse { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ + result: MessageBatchResult; +} +export interface MessageBatchRequestCounts { + /** + * Number of requests in the Message Batch that have been canceled. + * + * This is zero until processing of the entire Message Batch has ended. + */ + canceled: number; + /** + * Number of requests in the Message Batch that encountered an error. + * + * This is zero until processing of the entire Message Batch has ended. + */ + errored: number; + /** + * Number of requests in the Message Batch that have expired. + * + * This is zero until processing of the entire Message Batch has ended. + */ + expired: number; + /** + * Number of requests in the Message Batch that are processing. + */ + processing: number; + /** + * Number of requests in the Message Batch that have completed successfully. + * + * This is zero until processing of the entire Message Batch has ended. + */ + succeeded: number; +} +/** + * Processing result for this request. + * + * Contains a Message output if processing was successful, an error response if + * processing failed, or the reason why processing was not attempted, such as + * cancellation or expiration. + */ +export type MessageBatchResult = MessageBatchSucceededResult | MessageBatchErroredResult | MessageBatchCanceledResult | MessageBatchExpiredResult; +export interface MessageBatchSucceededResult { + message: MessagesAPI.Message; + type: 'succeeded'; +} +export interface BatchCreateParams { + /** + * List of requests for prompt completion. Each is an individual request to create + * a Message. + */ + requests: Array; +} +export declare namespace BatchCreateParams { + interface Request { + /** + * Developer-provided ID created for each request in a Message Batch. Useful for + * matching results to requests, as results may be given out of request order. + * + * Must be unique for each request within the Message Batch. + */ + custom_id: string; + /** + * Messages API creation parameters for the individual request. + * + * See the [Messages API reference](/en/api/messages) for full documentation on + * available parameters. + */ + params: MessagesAPI.MessageCreateParamsNonStreaming; + } +} +export interface BatchListParams extends PageParams { +} +export declare namespace Batches { + export { type DeletedMessageBatch as DeletedMessageBatch, type MessageBatch as MessageBatch, type MessageBatchCanceledResult as MessageBatchCanceledResult, type MessageBatchErroredResult as MessageBatchErroredResult, type MessageBatchExpiredResult as MessageBatchExpiredResult, type MessageBatchIndividualResponse as MessageBatchIndividualResponse, type MessageBatchRequestCounts as MessageBatchRequestCounts, type MessageBatchResult as MessageBatchResult, type MessageBatchSucceededResult as MessageBatchSucceededResult, type MessageBatchesPage as MessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, }; +} +//# sourceMappingURL=batches.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4464b84362b540fa49fed5b74b387f6a4a59bfc1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.js","sourceRoot":"","sources":["../../src/resources/messages/batches.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAA2E;AAC3E,uDAAsD;AAEtD,4DAA6D;AAC7D,0CAA6C;AAC7C,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;;;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AY,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CAEvF,CAAC;IACJ,CAAC;CACF;AA5JD,0BA4JC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7db6c90d23595c817a25ec2152f653a7b0d0c12b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs @@ -0,0 +1,149 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../../core/resource.mjs"; +import { Page } from "../../core/pagination.mjs"; +import { buildHeaders } from "../../internal/headers.mjs"; +import { JSONLDecoder } from "../../internal/decoders/jsonl.mjs"; +import { AnthropicError } from "../../error.mjs"; +import { path } from "../../internal/utils/path.mjs"; +export class Batches extends APIResource { + /** + * Send a batch of Message creation requests. + * + * The Message Batches API can be used to process multiple Messages API requests at + * once. Once a Message Batch is created, it begins processing immediately. Batches + * can take up to 24 hours to complete. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.create({ + * requests: [ + * { + * custom_id: 'my-custom-id-1', + * params: { + * max_tokens: 1024, + * messages: [ + * { content: 'Hello, world', role: 'user' }, + * ], + * model: 'claude-3-7-sonnet-20250219', + * }, + * }, + * ], + * }); + * ``` + */ + create(body, options) { + return this._client.post('/v1/messages/batches', { body, ...options }); + } + /** + * This endpoint is idempotent and can be used to poll for Message Batch + * completion. To access the results of a Message Batch, make a request to the + * `results_url` field in the response. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.retrieve( + * 'message_batch_id', + * ); + * ``` + */ + retrieve(messageBatchID, options) { + return this._client.get(path `/v1/messages/batches/${messageBatchID}`, options); + } + /** + * List all Message Batches within a Workspace. Most recently created batches are + * returned first. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const messageBatch of client.messages.batches.list()) { + * // ... + * } + * ``` + */ + list(query = {}, options) { + return this._client.getAPIList('/v1/messages/batches', (Page), { query, ...options }); + } + /** + * Delete a Message Batch. + * + * Message Batches can only be deleted once they've finished processing. If you'd + * like to delete an in-progress batch, you must first cancel it. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const deletedMessageBatch = + * await client.messages.batches.delete('message_batch_id'); + * ``` + */ + delete(messageBatchID, options) { + return this._client.delete(path `/v1/messages/batches/${messageBatchID}`, options); + } + /** + * Batches may be canceled any time before processing ends. Once cancellation is + * initiated, the batch enters a `canceling` state, at which time the system may + * complete any in-progress, non-interruptible requests before finalizing + * cancellation. + * + * The number of canceled requests is specified in `request_counts`. To determine + * which requests were canceled, check the individual results within the batch. + * Note that cancellation may not result in any canceled requests if they were + * non-interruptible. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatch = await client.messages.batches.cancel( + * 'message_batch_id', + * ); + * ``` + */ + cancel(messageBatchID, options) { + return this._client.post(path `/v1/messages/batches/${messageBatchID}/cancel`, options); + } + /** + * Streams the results of a Message Batch as a `.jsonl` file. + * + * Each line in the file is a JSON object containing the result of a single request + * in the Message Batch. Results are not guaranteed to be in the same order as + * requests. Use the `custom_id` field to match results to requests. + * + * Learn more about the Message Batches API in our + * [user guide](/en/docs/build-with-claude/batch-processing) + * + * @example + * ```ts + * const messageBatchIndividualResponse = + * await client.messages.batches.results('message_batch_id'); + * ``` + */ + async results(messageBatchID, options) { + const batch = await this.retrieve(messageBatchID); + if (!batch.results_url) { + throw new AnthropicError(`No batch \`results_url\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`); + } + return this._client + .get(batch.results_url, { + ...options, + headers: buildHeaders([{ Accept: 'application/binary' }, options?.headers]), + stream: true, + __binaryResponse: true, + }) + ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)); + } +} +//# sourceMappingURL=batches.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..777743902590ae95de12d133c9fc830493292c9e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../../src/resources/messages/batches.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAgC;OACtC,EAAE,YAAY,EAAE;OAEhB,EAAE,YAAY,EAAE;OAChB,EAAE,cAAc,EAAE;OAClB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,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,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CAEvF,CAAC;IACJ,CAAC;CACF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..881ca208de7e5dffe8846986e68424f7803a8041 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts @@ -0,0 +1,3 @@ +export { Batches, type DeletedMessageBatch, type MessageBatch, type MessageBatchCanceledResult, type MessageBatchErroredResult, type MessageBatchExpiredResult, type MessageBatchIndividualResponse, type MessageBatchRequestCounts, type MessageBatchResult, type MessageBatchSucceededResult, type BatchCreateParams, type BatchListParams, type MessageBatchesPage, } from "./batches.mjs"; +export { Messages, type Base64ImageSource, type Base64PDFSource, type CacheControlEphemeral, type CitationCharLocation, type CitationCharLocationParam, type CitationContentBlockLocation, type CitationContentBlockLocationParam, type CitationPageLocation, type CitationPageLocationParam, type CitationWebSearchResultLocationParam, type CitationsConfigParam, type CitationsDelta, type CitationsWebSearchResultLocation, type ContentBlock, type ContentBlockParam, type ContentBlockStartEvent, type ContentBlockStopEvent, type ContentBlockSource, type ContentBlockSourceContent, type DocumentBlockParam, type ImageBlockParam, type InputJSONDelta, type Message, type MessageCountTokensTool, type MessageDeltaEvent, type MessageDeltaUsage, type MessageParam, type MessageTokensCount, type Metadata, type Model, type PlainTextSource, type RawContentBlockDelta, type RawContentBlockDeltaEvent, type RawContentBlockStartEvent, type RawContentBlockStopEvent, type RawMessageDeltaEvent, type RawMessageStartEvent, type RawMessageStopEvent, type RawMessageStreamEvent, type RedactedThinkingBlock, type RedactedThinkingBlockParam, type ServerToolUsage, type ServerToolUseBlock, type ServerToolUseBlockParam, type SignatureDelta, type StopReason, type TextBlock, type TextBlockParam, type TextCitation, type TextCitationParam, type TextDelta, type ThinkingBlock, type ThinkingBlockParam, type ThinkingConfigDisabled, type ThinkingConfigEnabled, type ThinkingConfigParam, type ThinkingDelta, type Tool, type ToolBash20250124, type ToolChoice, type ToolChoiceAny, type ToolChoiceAuto, type ToolChoiceNone, type ToolChoiceTool, type ToolResultBlockParam, type ToolTextEditor20250124, type ToolUnion, type ToolUseBlock, type ToolUseBlockParam, type URLImageSource, type URLPDFSource, type Usage, type WebSearchResultBlock, type WebSearchResultBlockParam, type WebSearchTool20250305, type WebSearchToolRequestError, type WebSearchToolResultBlock, type WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent, type WebSearchToolResultError, type MessageStreamEvent, type MessageStartEvent, type MessageStopEvent, type ContentBlockDeltaEvent, type MessageCreateParams, type MessageCreateParamsBase, type MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming, type MessageCountTokensParams, } from "./messages.mjs"; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ac9ab33cb1a81d8595d5982730232b796bdcc2e3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,mBAAmB,EACxB,KA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iB,EACtB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.js new file mode 100644 index 0000000000000000000000000000000000000000..56cbce5ff533754afacdaf4d53dcca9b7c899bab --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.js @@ -0,0 +1,9 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Messages = exports.Batches = void 0; +var batches_1 = require("./batches.js"); +Object.defineProperty(exports, "Batches", { enumerable: true, get: function () { return batches_1.Batches; } }); +var messages_1 = require("./messages.js"); +Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..43fef1dd1f50a905c5b77ff2a2df1d906329a5ec --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Batches, } from "./batches.mjs"; +export { Messages, } from "./messages.mjs"; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b3e353f62d118eb0c1b1c7b04a0c1f4ad2f4efbf --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/messages/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAaR;OACM,EACL,QAAQ,GA2FT"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..836c62011223a1831ca65d3d568af60b21cc0a6d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"OAEO,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE;OACf,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;OAClB,EAAE,aAAa,EAAE;OACjB,KAAK,UAAU;OACf,EACL,iBAAiB,EACjB,eAAe,EACf,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,EAC9B,yBAAyB,EACzB,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EACnB;OACM,KAAK,WAAW;AAIvB,qBAAa,QAAS,SAAQ,WAAW;IACvC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,IAAI,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAC5F,MAAM,CACJ,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC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I,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8713ac70b168fa1990143ebf91e381e5610298b8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts @@ -0,0 +1,1295 @@ +import { APIPromise } from "../../core/api-promise.js"; +import { APIResource } from "../../core/resource.js"; +import { Stream } from "../../core/streaming.js"; +import { RequestOptions } from "../../internal/request-options.js"; +import { MessageStream } from "../../lib/MessageStream.js"; +import * as BatchesAPI from "./batches.js"; +import { BatchCreateParams, BatchListParams, Batches, DeletedMessageBatch, MessageBatch, MessageBatchCanceledResult, MessageBatchErroredResult, MessageBatchExpiredResult, MessageBatchIndividualResponse, MessageBatchRequestCounts, MessageBatchResult, MessageBatchSucceededResult, MessageBatchesPage } from "./batches.js"; +import * as MessagesAPI from "./messages.js"; +export declare class Messages extends APIResource { + batches: BatchesAPI.Batches; + /** + * Send a structured list of input messages with text and/or image content, and the + * model will generate the next message in the conversation. + * + * The Messages API can be used for either single queries or stateless multi-turn + * conversations. + * + * Learn more about the Messages API in our [user guide](/en/docs/initial-setup) + * + * @example + * ```ts + * const message = await client.messages.create({ + * max_tokens: 1024, + * messages: [{ content: 'Hello, world', role: 'user' }], + * model: 'claude-3-7-sonnet-20250219', + * }); + * ``` + */ + create(body: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise; + create(body: MessageCreateParamsStreaming, options?: RequestOptions): APIPromise>; + create(body: MessageCreateParamsBase, options?: RequestOptions): APIPromise | Message>; + /** + * Create a Message stream + */ + stream(body: MessageStreamParams, options?: RequestOptions): MessageStream; + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const messageTokensCount = + * await client.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(body: MessageCountTokensParams, options?: RequestOptions): APIPromise; +} +export interface Base64ImageSource { + data: string; + media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp'; + type: 'base64'; +} +export interface Base64PDFSource { + data: string; + media_type: 'application/pdf'; + type: 'base64'; +} +export interface CacheControlEphemeral { + type: 'ephemeral'; +} +export interface CitationCharLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface CitationCharLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_char_index: number; + start_char_index: number; + type: 'char_location'; +} +export interface CitationContentBlockLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface CitationContentBlockLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_block_index: number; + start_block_index: number; + type: 'content_block_location'; +} +export interface CitationPageLocation { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface CitationPageLocationParam { + cited_text: string; + document_index: number; + document_title: string | null; + end_page_number: number; + start_page_number: number; + type: 'page_location'; +} +export interface CitationWebSearchResultLocationParam { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export interface CitationsConfigParam { + enabled?: boolean; +} +export interface CitationsDelta { + citation: CitationCharLocation | CitationPageLocation | CitationContentBlockLocation | CitationsWebSearchResultLocation; + type: 'citations_delta'; +} +export interface CitationsWebSearchResultLocation { + cited_text: string; + encrypted_index: string; + title: string | null; + type: 'web_search_result_location'; + url: string; +} +export type ContentBlock = TextBlock | ToolUseBlock | ServerToolUseBlock | WebSearchToolResultBlock | ThinkingBlock | RedactedThinkingBlock; +/** + * Regular text content. + */ +export type ContentBlockParam = ServerToolUseBlockParam | WebSearchToolResultBlockParam | TextBlockParam | ImageBlockParam | ToolUseBlockParam | ToolResultBlockParam | DocumentBlockParam | ThinkingBlockParam | RedactedThinkingBlockParam; +export interface ContentBlockSource { + content: string | Array; + type: 'content'; +} +export type ContentBlockSourceContent = TextBlockParam | ImageBlockParam; +export interface DocumentBlockParam { + source: Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource; + type: 'document'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + citations?: CitationsConfigParam; + context?: string | null; + title?: string | null; +} +export interface ImageBlockParam { + source: Base64ImageSource | URLImageSource; + type: 'image'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export interface InputJSONDelta { + partial_json: string; + type: 'input_json_delta'; +} +export interface Message { + /** + * Unique object identifier. + * + * The format and length of IDs may change over time. + */ + id: string; + /** + * Content generated by the model. + * + * This is an array of content blocks, each of which has a `type` that determines + * its shape. + * + * Example: + * + * ```json + * [{ "type": "text", "text": "Hi, I'm Claude." }] + * ``` + * + * If the request input `messages` ended with an `assistant` turn, then the + * response `content` will continue directly from that last turn. You can use this + * to constrain the model's output. + * + * For example, if the input `messages` were: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Then the response `content` might be: + * + * ```json + * [{ "type": "text", "text": "B)" }] + * ``` + */ + content: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + /** + * Conversational role of the generated message. + * + * This will always be `"assistant"`. + */ + role: 'assistant'; + /** + * The reason that we stopped. + * + * This may be one the following values: + * + * - `"end_turn"`: the model reached a natural stopping point + * - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * - `"tool_use"`: the model invoked one or more tools + * + * In non-streaming mode this value is always non-null. In streaming mode, it is + * null in the `message_start` event and non-null otherwise. + */ + stop_reason: StopReason | null; + /** + * Which custom stop sequence was generated, if any. + * + * This value will be a non-null string if one of your custom stop sequences was + * generated. + */ + stop_sequence: string | null; + /** + * Object type. + * + * For Messages, this is always `"message"`. + */ + type: 'message'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: Usage; +} +export type MessageCountTokensTool = Tool | ToolBash20250124 | ToolTextEditor20250124 | MessageCountTokensTool.TextEditor20250429 | WebSearchTool20250305; +export declare namespace MessageCountTokensTool { + interface TextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + type: 'text_editor_20250429'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: MessagesAPI.CacheControlEphemeral | null; + } +} +export interface MessageDeltaUsage { + /** + * The cumulative number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The cumulative number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The cumulative number of input tokens which were used. + */ + input_tokens: number | null; + /** + * The cumulative number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: ServerToolUsage | null; +} +export interface MessageParam { + content: string | Array; + role: 'user' | 'assistant'; +} +export interface MessageTokensCount { + /** + * The total number of tokens across the provided list of messages, system prompt, + * and tools. + */ + input_tokens: number; +} +export interface Metadata { + /** + * An external identifier for the user who is associated with the request. + * + * This should be a uuid, hash value, or other opaque identifier. Anthropic may use + * this id to help detect abuse. Do not include any identifying information such as + * name, email address, or phone number. + */ + user_id?: string | null; +} +/** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ +export type Model = 'claude-3-7-sonnet-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-haiku-latest' | 'claude-3-5-haiku-20241022' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-0' | 'claude-4-sonnet-20250514' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-4-opus-20250514' | 'claude-3-opus-latest' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | 'claude-2.1' | 'claude-2.0' | (string & {}); +export interface PlainTextSource { + data: string; + media_type: 'text/plain'; + type: 'text'; +} +export type RawContentBlockDelta = TextDelta | InputJSONDelta | CitationsDelta | ThinkingDelta | SignatureDelta; +export interface RawContentBlockDeltaEvent { + delta: RawContentBlockDelta; + index: number; + type: 'content_block_delta'; +} +export interface RawContentBlockStartEvent { + content_block: TextBlock | ToolUseBlock | ServerToolUseBlock | WebSearchToolResultBlock | ThinkingBlock | RedactedThinkingBlock; + index: number; + type: 'content_block_start'; +} +export interface RawContentBlockStopEvent { + index: number; + type: 'content_block_stop'; +} +export interface RawMessageDeltaEvent { + delta: RawMessageDeltaEvent.Delta; + type: 'message_delta'; + /** + * Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the + * underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the + * model. The model's output then goes through a parsing stage before becoming an + * API response. As a result, the token counts in `usage` will not match one-to-one + * with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response + * from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, + * `cache_creation_input_tokens`, and `cache_read_input_tokens`. + */ + usage: MessageDeltaUsage; +} +export declare namespace RawMessageDeltaEvent { + interface Delta { + stop_reason: MessagesAPI.StopReason | null; + stop_sequence: string | null; + } +} +export interface RawMessageStartEvent { + message: Message; + type: 'message_start'; +} +export interface RawMessageStopEvent { + type: 'message_stop'; +} +export type RawMessageStreamEvent = RawMessageStartEvent | RawMessageDeltaEvent | RawMessageStopEvent | RawContentBlockStartEvent | RawContentBlockDeltaEvent | RawContentBlockStopEvent; +export interface RedactedThinkingBlock { + data: string; + type: 'redacted_thinking'; +} +export interface RedactedThinkingBlockParam { + data: string; + type: 'redacted_thinking'; +} +export interface ServerToolUsage { + /** + * The number of web search tool requests. + */ + web_search_requests: number; +} +export interface ServerToolUseBlock { + id: string; + input: unknown; + name: 'web_search'; + type: 'server_tool_use'; +} +export interface ServerToolUseBlockParam { + id: string; + input: unknown; + name: 'web_search'; + type: 'server_tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export interface SignatureDelta { + signature: string; + type: 'signature_delta'; +} +export type StopReason = 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | 'pause_turn' | 'refusal'; +export interface TextBlock { + /** + * Citations supporting the text block. + * + * The type of citation returned will depend on the type of document being cited. + * Citing a PDF results in `page_location`, plain text results in `char_location`, + * and content document results in `content_block_location`. + */ + citations: Array | null; + text: string; + type: 'text'; +} +export interface TextBlockParam { + text: string; + type: 'text'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + citations?: Array | null; +} +export type TextCitation = CitationCharLocation | CitationPageLocation | CitationContentBlockLocation | CitationsWebSearchResultLocation; +export type TextCitationParam = CitationCharLocationParam | CitationPageLocationParam | CitationContentBlockLocationParam | CitationWebSearchResultLocationParam; +export interface TextDelta { + text: string; + type: 'text_delta'; +} +export interface ThinkingBlock { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface ThinkingBlockParam { + signature: string; + thinking: string; + type: 'thinking'; +} +export interface ThinkingConfigDisabled { + type: 'disabled'; +} +export interface ThinkingConfigEnabled { + /** + * Determines how many tokens Claude can use for its internal reasoning process. + * Larger budgets can enable more thorough analysis for complex problems, improving + * response quality. + * + * Must be ≥1024 and less than `max_tokens`. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + budget_tokens: number; + type: 'enabled'; +} +/** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ +export type ThinkingConfigParam = ThinkingConfigEnabled | ThinkingConfigDisabled; +export interface ThinkingDelta { + thinking: string; + type: 'thinking_delta'; +} +export interface Tool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + input_schema: Tool.InputSchema; + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: string; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + /** + * Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that + * the model has about what the tool is and how to use it, the better it will + * perform. You can use natural language descriptions to reinforce important + * aspects of the tool input JSON schema. + */ + description?: string; + type?: 'custom' | null; +} +export declare namespace Tool { + /** + * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model + * will produce. + */ + interface InputSchema { + type: 'object'; + properties?: unknown | null; + required?: Array | null; + [k: string]: unknown; + } +} +export interface ToolBash20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'bash'; + type: 'bash_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +/** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ +export type ToolChoice = ToolChoiceAuto | ToolChoiceAny | ToolChoiceTool | ToolChoiceNone; +/** + * The model will use any available tools. + */ +export interface ToolChoiceAny { + type: 'any'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will automatically decide whether to use tools. + */ +export interface ToolChoiceAuto { + type: 'auto'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output at most one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +/** + * The model will not be allowed to use tools. + */ +export interface ToolChoiceNone { + type: 'none'; +} +/** + * The model will use the specified tool with `tool_choice.name`. + */ +export interface ToolChoiceTool { + /** + * The name of the tool to use. + */ + name: string; + type: 'tool'; + /** + * Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool + * use. + */ + disable_parallel_tool_use?: boolean; +} +export interface ToolResultBlockParam { + tool_use_id: string; + type: 'tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + content?: string | Array; + is_error?: boolean; +} +export interface ToolTextEditor20250124 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_editor'; + type: 'text_editor_20250124'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export type ToolUnion = Tool | ToolBash20250124 | ToolTextEditor20250124 | ToolUnion.TextEditor20250429 | WebSearchTool20250305; +export declare namespace ToolUnion { + interface TextEditor20250429 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'str_replace_based_edit_tool'; + type: 'text_editor_20250429'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: MessagesAPI.CacheControlEphemeral | null; + } +} +export interface ToolUseBlock { + id: string; + input: unknown; + name: string; + type: 'tool_use'; +} +export interface ToolUseBlockParam { + id: string; + input: unknown; + name: string; + type: 'tool_use'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export interface URLImageSource { + type: 'url'; + url: string; +} +export interface URLPDFSource { + type: 'url'; + url: string; +} +export interface Usage { + /** + * The number of input tokens used to create the cache entry. + */ + cache_creation_input_tokens: number | null; + /** + * The number of input tokens read from the cache. + */ + cache_read_input_tokens: number | null; + /** + * The number of input tokens which were used. + */ + input_tokens: number; + /** + * The number of output tokens which were used. + */ + output_tokens: number; + /** + * The number of server tool requests. + */ + server_tool_use: ServerToolUsage | null; + /** + * If the request used the priority, standard, or batch tier. + */ + service_tier: 'standard' | 'priority' | 'batch' | null; +} +export interface WebSearchResultBlock { + encrypted_content: string; + page_age: string | null; + title: string; + type: 'web_search_result'; + url: string; +} +export interface WebSearchResultBlockParam { + encrypted_content: string; + title: string; + type: 'web_search_result'; + url: string; + page_age?: string | null; +} +export interface WebSearchTool20250305 { + /** + * Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + */ + name: 'web_search'; + type: 'web_search_20250305'; + /** + * If provided, only these domains will be included in results. Cannot be used + * alongside `blocked_domains`. + */ + allowed_domains?: Array | null; + /** + * If provided, these domains will never appear in results. Cannot be used + * alongside `allowed_domains`. + */ + blocked_domains?: Array | null; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; + /** + * Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null; + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + user_location?: WebSearchTool20250305.UserLocation | null; +} +export declare namespace WebSearchTool20250305 { + /** + * Parameters for the user's location. Used to provide more relevant search + * results. + */ + interface UserLocation { + type: 'approximate'; + /** + * The city of the user. + */ + city?: string | null; + /** + * The two letter + * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the + * user. + */ + country?: string | null; + /** + * The region of the user. + */ + region?: string | null; + /** + * The [IANA timezone](https://nodatime.org/TimeZones) of the user. + */ + timezone?: string | null; + } +} +export interface WebSearchToolRequestError { + error_code: 'invalid_tool_input' | 'unavailable' | 'max_uses_exceeded' | 'too_many_requests' | 'query_too_long'; + type: 'web_search_tool_result_error'; +} +export interface WebSearchToolResultBlock { + content: WebSearchToolResultBlockContent; + tool_use_id: string; + type: 'web_search_tool_result'; +} +export type WebSearchToolResultBlockContent = WebSearchToolResultError | Array; +export interface WebSearchToolResultBlockParam { + content: WebSearchToolResultBlockParamContent; + tool_use_id: string; + type: 'web_search_tool_result'; + /** + * Create a cache control breakpoint at this content block. + */ + cache_control?: CacheControlEphemeral | null; +} +export type WebSearchToolResultBlockParamContent = Array | WebSearchToolRequestError; +export interface WebSearchToolResultError { + error_code: 'invalid_tool_input' | 'unavailable' | 'max_uses_exceeded' | 'too_many_requests' | 'query_too_long'; + type: 'web_search_tool_result_error'; +} +export type MessageStreamEvent = RawMessageStreamEvent; +export type MessageStartEvent = RawMessageStartEvent; +export type MessageDeltaEvent = RawMessageDeltaEvent; +export type MessageStopEvent = RawMessageStopEvent; +export type ContentBlockStartEvent = RawContentBlockStartEvent; +export type ContentBlockDeltaEvent = RawContentBlockDeltaEvent; +export type ContentBlockStopEvent = RawContentBlockStopEvent; +export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming; +export interface MessageCreateParamsBase { + /** + * The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter + * only specifies the absolute maximum number of tokens to generate. + * + * Different models have different maximum values for this parameter. See + * [models](https://docs.anthropic.com/en/docs/models-overview) for details. + */ + max_tokens: number; + /** + * Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + /** + * An object describing metadata about the request. + */ + metadata?: Metadata; + /** + * Determines whether to use priority capacity (if available) or standard capacity + * for this request. + * + * Anthropic offers different levels of service for your API requests. See + * [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details. + */ + service_tier?: 'auto' | 'standard_only'; + /** + * Custom text sequences that will cause the model to stop generating. + * + * Our models will normally stop when they have naturally completed their turn, + * which will result in a response `stop_reason` of `"end_turn"`. + * + * If you want the model to stop generating when it encounters custom strings of + * text, you can use the `stop_sequences` parameter. If the model encounters one of + * the custom sequences, the response `stop_reason` value will be `"stop_sequence"` + * and the response `stop_sequence` value will contain the matched stop sequence. + */ + stop_sequences?: Array; + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: boolean; + /** + * System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` + * for analytical / multiple choice, and closer to `1.0` for creative and + * generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully + * deterministic. + */ + temperature?: number; + /** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: ThinkingConfigParam; + /** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice; + /** + * Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; + /** + * Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. + * [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_k?: number; + /** + * Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options + * for each subsequent token in decreasing probability order and cut it off once it + * reaches a particular probability specified by `top_p`. You should either alter + * `temperature` or `top_p`, but not both. + * + * Recommended for advanced use cases only. You usually only need to use + * `temperature`. + */ + top_p?: number; +} +export declare namespace MessageCreateParams { + type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming; + type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming; +} +export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase { + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream?: false; +} +export interface MessageCreateParamsStreaming extends MessageCreateParamsBase { + /** + * Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for + * details. + */ + stream: true; +} +export type MessageStreamParams = MessageCreateParamsBase; +export interface MessageCountTokensParams { + /** + * Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` + * conversational turns. When creating a new `Message`, you specify the prior + * conversational turns with the `messages` parameter, and the model then generates + * the next `Message` in the conversation. Consecutive `user` or `assistant` turns + * in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can + * specify a single `user`-role message, or you can include multiple `user` and + * `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will + * continue immediately from the content in that message. This can be used to + * constrain part of the model's response. + * + * Example with a single `user` message: + * + * ```json + * [{ "role": "user", "content": "Hello, Claude" }] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * { "role": "user", "content": "Hello there." }, + * { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, + * { "role": "user", "content": "Can you explain LLMs in plain English?" } + * ] + * ``` + * + * Example with a partially-filled response from Claude: + * + * ```json + * [ + * { + * "role": "user", + * "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" + * }, + * { "role": "assistant", "content": "The best answer is (" } + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of + * content blocks, where each block has a specific `type`. Using a `string` for + * `content` is shorthand for an array of one content block of type `"text"`. The + * following input messages are equivalent: + * + * ```json + * { "role": "user", "content": "Hello, Claude" } + * ``` + * + * ```json + * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } + * ``` + * + * Starting with Claude 3 models, you can also send image content blocks: + * + * ```json + * { + * "role": "user", + * "content": [ + * { + * "type": "image", + * "source": { + * "type": "base64", + * "media_type": "image/jpeg", + * "data": "/9j/4AAQSkZJRg..." + * } + * }, + * { "type": "text", "text": "What is in this image?" } + * ] + * } + * ``` + * + * We currently support the `base64` source type for images, and the `image/jpeg`, + * `image/png`, `image/gif`, and `image/webp` media types. + * + * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for + * more input examples. + * + * Note that if you want to include a + * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use + * the top-level `system` parameter — there is no `"system"` role for input + * messages in the Messages API. + * + * There is a limit of 100000 messages in a single request. + */ + messages: Array; + /** + * The model that will complete your prompt.\n\nSee + * [models](https://docs.anthropic.com/en/docs/models-overview) for additional + * details and options. + */ + model: Model; + /** + * System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such + * as specifying a particular goal or role. See our + * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). + */ + system?: string | Array; + /** + * Configuration for enabling Claude's extended thinking. + * + * When enabled, responses include `thinking` content blocks showing Claude's + * thinking process before the final answer. Requires a minimum budget of 1,024 + * tokens and counts towards your `max_tokens` limit. + * + * See + * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) + * for details. + */ + thinking?: ThinkingConfigParam; + /** + * How the model should use the provided tools. The model can use a specific tool, + * any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice; + /** + * Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` + * content blocks that represent the model's use of those tools. You can then run + * those tools using the tool input generated by the model and then optionally + * return results back to the model using `tool_result` content blocks. + * + * Each tool definition includes: + * + * - `name`: Name of the tool. + * - `description`: Optional, but strongly-recommended description of the tool. + * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the + * tool `input` shape that the model will produce in `tool_use` output content + * blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce + * `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an + * input, and return the following back to the model in a subsequent `user` + * message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and + * functions, or more generally whenever you want the model to produce a particular + * JSON structure of output. + * + * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details. + */ + tools?: Array; +} +export declare namespace Messages { + export { type Base64ImageSource as Base64ImageSource, type Base64PDFSource as Base64PDFSource, type CacheControlEphemeral as CacheControlEphemeral, type CitationCharLocation as CitationCharLocation, type CitationCharLocationParam as CitationCharLocationParam, type CitationContentBlockLocation as CitationContentBlockLocation, type CitationContentBlockLocationParam as CitationContentBlockLocationParam, type CitationPageLocation as CitationPageLocation, type CitationPageLocationParam as CitationPageLocationParam, type CitationWebSearchResultLocationParam as CitationWebSearchResultLocationParam, type CitationsConfigParam as CitationsConfigParam, type CitationsDelta as CitationsDelta, type CitationsWebSearchResultLocation as CitationsWebSearchResultLocation, type ContentBlock as ContentBlock, type ContentBlockParam as ContentBlockParam, type ContentBlockStartEvent as ContentBlockStartEvent, type ContentBlockStopEvent as ContentBlockStopEvent, type ContentBlockSource as ContentBlockSource, type ContentBlockSourceContent as ContentBlockSourceContent, type DocumentBlockParam as DocumentBlockParam, type ImageBlockParam as ImageBlockParam, type InputJSONDelta as InputJSONDelta, type Message as Message, type MessageCountTokensTool as MessageCountTokensTool, type MessageDeltaEvent as MessageDeltaEvent, type MessageDeltaUsage as MessageDeltaUsage, type MessageParam as MessageParam, type MessageTokensCount as MessageTokensCount, type Metadata as Metadata, type Model as Model, type PlainTextSource as PlainTextSource, type RawContentBlockDelta as RawContentBlockDelta, type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, type RawContentBlockStartEvent as RawContentBlockStartEvent, type RawContentBlockStopEvent as RawContentBlockStopEvent, type RawMessageDeltaEvent as RawMessageDeltaEvent, type RawMessageStartEvent as RawMessageStartEvent, type RawMessageStopEvent as RawMessageStopEvent, type RawMessageStreamEvent as RawMessageStreamEvent, type RedactedThinkingBlock as RedactedThinkingBlock, type RedactedThinkingBlockParam as RedactedThinkingBlockParam, type ServerToolUsage as ServerToolUsage, type ServerToolUseBlock as ServerToolUseBlock, type ServerToolUseBlockParam as ServerToolUseBlockParam, type SignatureDelta as SignatureDelta, type StopReason as StopReason, type TextBlock as TextBlock, type TextBlockParam as TextBlockParam, type TextCitation as TextCitation, type TextCitationParam as TextCitationParam, type TextDelta as TextDelta, type ThinkingBlock as ThinkingBlock, type ThinkingBlockParam as ThinkingBlockParam, type ThinkingConfigDisabled as ThinkingConfigDisabled, type ThinkingConfigEnabled as ThinkingConfigEnabled, type ThinkingConfigParam as ThinkingConfigParam, type ThinkingDelta as ThinkingDelta, type Tool as Tool, type ToolBash20250124 as ToolBash20250124, type ToolChoice as ToolChoice, type ToolChoiceAny as ToolChoiceAny, type ToolChoiceAuto as ToolChoiceAuto, type ToolChoiceNone as ToolChoiceNone, type ToolChoiceTool as ToolChoiceTool, type ToolResultBlockParam as ToolResultBlockParam, type ToolTextEditor20250124 as ToolTextEditor20250124, type ToolUnion as ToolUnion, type ToolUseBlock as ToolUseBlock, type ToolUseBlockParam as ToolUseBlockParam, type URLImageSource as URLImageSource, type URLPDFSource as URLPDFSource, type Usage as Usage, type WebSearchResultBlock as WebSearchResultBlock, type WebSearchResultBlockParam as WebSearchResultBlockParam, type WebSearchTool20250305 as WebSearchTool20250305, type WebSearchToolRequestError as WebSearchToolRequestError, type WebSearchToolResultBlock as WebSearchToolResultBlock, type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam as WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent as WebSearchToolResultBlockParamContent, type WebSearchToolResultError as WebSearchToolResultError, type MessageStreamEvent as MessageStreamEvent, type MessageStartEvent as MessageStartEvent, type MessageStopEvent as MessageStopEvent, type ContentBlockDeltaEvent as ContentBlockDeltaEvent, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageStreamParams as MessageStreamParams, type MessageCountTokensParams as MessageCountTokensParams, }; + export { Batches as Batches, type DeletedMessageBatch as DeletedMessageBatch, type MessageBatch as MessageBatch, type MessageBatchCanceledResult as MessageBatchCanceledResult, type MessageBatchErroredResult as MessageBatchErroredResult, type MessageBatchExpiredResult as MessageBatchExpiredResult, type MessageBatchIndividualResponse as MessageBatchIndividualResponse, type MessageBatchRequestCounts as MessageBatchRequestCounts, type MessageBatchResult as MessageBatchResult, type MessageBatchSucceededResult as MessageBatchSucceededResult, type MessageBatchesPage as MessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, }; +} +//# sourceMappingURL=messages.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js new file mode 100644 index 0000000000000000000000000000000000000000..14b6f8a3eab913111fa18bf2f1d0387a87811e85 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js @@ -0,0 +1,72 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Messages = void 0; +const tslib_1 = require("../../internal/tslib.js"); +const resource_1 = require("../../core/resource.js"); +const MessageStream_1 = require("../../lib/MessageStream.js"); +const BatchesAPI = tslib_1.__importStar(require("./batches.js")); +const batches_1 = require("./batches.js"); +const constants_1 = require("../../internal/constants.js"); +class Messages extends resource_1.APIResource { + constructor() { + super(...arguments); + this.batches = new BatchesAPI.Batches(this._client); + } + create(body, options) { + if (body.model in DEPRECATED_MODELS) { + console.warn(`The model '${body.model}' is deprecated and will reach end-of-life on ${DEPRECATED_MODELS[body.model]}\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`); + } + let timeout = this._client._options.timeout; + if (!body.stream && timeout == null) { + const maxNonstreamingTokens = constants_1.MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined; + timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens); + } + return this._client.post('/v1/messages', { + body, + timeout: timeout ?? 600000, + ...options, + stream: body.stream ?? false, + }); + } + /** + * Create a Message stream + */ + stream(body, options) { + return MessageStream_1.MessageStream.createMessage(this, body, options); + } + /** + * Count the number of tokens in a Message. + * + * The Token Count API can be used to count the number of tokens in a Message, + * including tools, images, and documents, without creating it. + * + * Learn more about token counting in our + * [user guide](/en/docs/build-with-claude/token-counting) + * + * @example + * ```ts + * const messageTokensCount = + * await client.messages.countTokens({ + * messages: [{ content: 'string', role: 'user' }], + * model: 'claude-3-7-sonnet-latest', + * }); + * ``` + */ + countTokens(body, options) { + return this._client.post('/v1/messages/count_tokens', { body, ...options }); + } +} +exports.Messages = Messages; +const DEPRECATED_MODELS = { + 'claude-1.3': 'November 6th, 2024', + 'claude-1.3-100k': 'November 6th, 2024', + 'claude-instant-1.1': 'November 6th, 2024', + 'claude-instant-1.1-100k': 'November 6th, 2024', + 'claude-instant-1.2': 'November 6th, 2024', + 'claude-3-sonnet-20240229': 'July 21st, 2025', + 'claude-2.1': 'July 21st, 2025', + 'claude-2.0': 'July 21st, 2025', +}; +Messages.Batches = batches_1.Batches; +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5c0fe784f578a57c54813943c5b918bcd5e47027 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAGtF,qDAAkD;AAGlD,8DAAwD;AACxD,iEAAwC;AACxC,0CAcmB;AAGnB,2DAAqE;AAErE,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiFrE,CAAC;IApDC,MAAM,CACJ,IAAyB,EACzB,OAAwB;QAExB,IAAI,IAAI,CAAC,KAAK,IAAI,iBAAiB,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CACV,cAAc,IAAI,CAAC,KAAK,iDACtB,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAC9B,gIAAgI,CACjI,CAAC;QACJ,CAAC;QACD,IAAI,OAAO,GAAI,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAwB,CAAC;QACtE,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,qBAAqB,GAAG,qCAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;YACjF,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;QAC9F,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,OAAO,EAAE,OAAO,IAAI,MAAM;YAC1B,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAoE,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,6BAAa,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,IAA8B,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AAlFD,4BAkFC;AAoaD,MAAM,iBAAiB,GAEnB;IACF,YAAY,EAAE,oBAAoB;IAClC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,oBAAoB;IAC1C,yBAAyB,EAAE,oBAAoB;IAC/C,oBAAoB,EAAE,oBAAoB;IAC1C,0BAA0B,EAAE,iBAAiB;IAC7C,YAAY,EAAE,iBAAiB;IAC/B,YAAY,EAAE,iBAAiB;CAChC,CAAC;AA2pCF,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b9c8b62ff2faec86536ce2d421a9d0779bb0a0b6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.d.mts @@ -0,0 +1,59 @@ +import { APIResource } from "../core/resource.mjs"; +import * as BetaAPI from "./beta/beta.mjs"; +import { APIPromise } from "../core/api-promise.mjs"; +import { Page, type PageParams, PagePromise } from "../core/pagination.mjs"; +import { RequestOptions } from "../internal/request-options.mjs"; +export declare class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + */ + retrieve(modelID: string, params?: ModelRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + */ + list(params?: ModelListParams | null | undefined, options?: RequestOptions): PagePromise; +} +export type ModelInfosPage = Page; +export interface ModelInfo { + /** + * Unique model identifier. + */ + id: string; + /** + * RFC 3339 datetime string representing the time at which the model was released. + * May be set to an epoch value if the release date is unknown. + */ + created_at: string; + /** + * A human-readable name for the model. + */ + display_name: string; + /** + * Object type. + * + * For Models, this is always `"model"`. + */ + type: 'model'; +} +export interface ModelRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export interface ModelListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} +export declare namespace Models { + export { type ModelInfo as ModelInfo, type ModelInfosPage as ModelInfosPage, type ModelRetrieveParams as ModelRetrieveParams, type ModelListParams as ModelListParams, }; +} +//# sourceMappingURL=models.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.js.map new file mode 100644 index 0000000000000000000000000000000000000000..51aed3ede1bda351c23406bde9f7ed70eafd7af5 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.js.map @@ -0,0 +1 @@ +{"version":3,"file":"models.js","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAwE;AACxE,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;OAKG;IACH,QAAQ,CACN,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,EAAE,EAAE;YACnD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,iBAAe,CAAA,EAAE;YAC5D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA1CD,wBA0CC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs new file mode 100644 index 0000000000000000000000000000000000000000..15e0aff8ccda457788b08a394a71d04d93be7622 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { APIResource } from "../core/resource.mjs"; +import { Page } from "../core/pagination.mjs"; +import { buildHeaders } from "../internal/headers.mjs"; +import { path } from "../internal/utils/path.mjs"; +export class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + */ + retrieve(modelID, params = {}, options) { + const { betas } = params ?? {}; + return this._client.get(path `/v1/models/${modelID}`, { + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + */ + list(params = {}, options) { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/models', (Page), { + query, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } +} +//# sourceMappingURL=models.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..21e619e7663a982519ad8f3306cced41d69ccc2e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/models.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAgC;OACtC,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;OAKG;IACH,QAAQ,CACN,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,OAAO,EAAE,EAAE;YACnD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,IAAe,CAAA,EAAE;YAC5D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8c1643a95d2885a5697535e8c36eafbc71163000 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.mts @@ -0,0 +1,42 @@ +export interface APIErrorObject { + message: string; + type: 'api_error'; +} +export interface AuthenticationError { + message: string; + type: 'authentication_error'; +} +export interface BillingError { + message: string; + type: 'billing_error'; +} +export type ErrorObject = InvalidRequestError | AuthenticationError | BillingError | PermissionError | NotFoundError | RateLimitError | GatewayTimeoutError | APIErrorObject | OverloadedError; +export interface ErrorResponse { + error: ErrorObject; + type: 'error'; +} +export interface GatewayTimeoutError { + message: string; + type: 'timeout_error'; +} +export interface InvalidRequestError { + message: string; + type: 'invalid_request_error'; +} +export interface NotFoundError { + message: string; + type: 'not_found_error'; +} +export interface OverloadedError { + message: string; + type: 'overloaded_error'; +} +export interface PermissionError { + message: string; + type: 'permission_error'; +} +export interface RateLimitError { + message: string; + type: 'rate_limit_error'; +} +//# sourceMappingURL=shared.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b912fb74b77413ba3f0b6aa3aab8808d1ffc6734 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts @@ -0,0 +1,42 @@ +export interface APIErrorObject { + message: string; + type: 'api_error'; +} +export interface AuthenticationError { + message: string; + type: 'authentication_error'; +} +export interface BillingError { + message: string; + type: 'billing_error'; +} +export type ErrorObject = InvalidRequestError | AuthenticationError | BillingError | PermissionError | NotFoundError | RateLimitError | GatewayTimeoutError | APIErrorObject | OverloadedError; +export interface ErrorResponse { + error: ErrorObject; + type: 'error'; +} +export interface GatewayTimeoutError { + message: string; + type: 'timeout_error'; +} +export interface InvalidRequestError { + message: string; + type: 'invalid_request_error'; +} +export interface NotFoundError { + message: string; + type: 'not_found_error'; +} +export interface OverloadedError { + message: string; + type: 'overloaded_error'; +} +export interface PermissionError { + message: string; + type: 'permission_error'; +} +export interface RateLimitError { + message: string; + type: 'rate_limit_error'; +} +//# sourceMappingURL=shared.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..86814131c6db8947e25fe5a73d75c8450eb139d6 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,sBAAsB,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,YAAY,GACZ,eAAe,GACf,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,CAAC;IAEnB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,kBAAkB,CAAC;CAC1B"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e532ab2cd75f671cbef8791617e56d4cd0b5e6d8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":";AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a88d4e1268fb4c84c66b4121e6e0a320586be89e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/shared.mjs @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export {}; +//# sourceMappingURL=shared.mjs.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..31cd61359931c9f46b1503bf1416abc66901fa62 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=top-level.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..ab805acb45604d18382601990e9db19c9aa57422 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"top-level.d.mts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js new file mode 100644 index 0000000000000000000000000000000000000000..4c281069e3b55a1d03c84130b6b4106e370da18b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js @@ -0,0 +1,4 @@ +"use strict"; +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=top-level.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js.map new file mode 100644 index 0000000000000000000000000000000000000000..73a66a9edfb6597b7f5a0202d075f9493f774328 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.js.map @@ -0,0 +1 @@ +{"version":3,"file":"top-level.js","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":";AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a73827e024499191aa70eb776b9763c6a7c30b6d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"top-level.mjs","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAAA,sFAAsF"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/README.md new file mode 100644 index 0000000000000000000000000000000000000000..485fce8617c9df053f0bed2dd56873df0371b0d0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/core/README.md @@ -0,0 +1,3 @@ +# `core` + +This directory holds public modules implementing non-resource-specific SDK functionality. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3ef5a25bac10eec3925c29eacbfa68a84517c726 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/README.md @@ -0,0 +1,3 @@ +# `internal` + +The modules in this directory are not importable outside this package and will change between releases. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts new file mode 100644 index 0000000000000000000000000000000000000000..289c4eed7054cd102a99e2f42ca730edb62e7770 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts @@ -0,0 +1,159 @@ +import { BlobPart, getName, makeFile, isAsyncIterable } from './uploads'; +import type { FilePropertyBag } from './builtin-types'; +import { checkFileSupport } from './uploads'; + +type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView; + +/** + * Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc. + * Don't add arrayBuffer here, node-fetch doesn't have it + */ +interface BlobLike { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */ + readonly size: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */ + readonly type: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */ + text(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ + slice(start?: number, end?: number): BlobLike; +} + +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isBlobLike = (value: any): value is BlobLike & { arrayBuffer(): Promise } => + value != null && + typeof value === 'object' && + typeof value.size === 'number' && + typeof value.type === 'string' && + typeof value.text === 'function' && + typeof value.slice === 'function' && + typeof value.arrayBuffer === 'function'; + +/** + * Intended to match DOM File, node:buffer File, undici File, etc. + */ +interface FileLike extends BlobLike { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */ + readonly lastModified: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */ + readonly name?: string | undefined; +} + +/** + * This check adds the arrayBuffer() method type because it is available and used at runtime + */ +const isFileLike = (value: any): value is FileLike & { arrayBuffer(): Promise } => + value != null && + typeof value === 'object' && + typeof value.name === 'string' && + typeof value.lastModified === 'number' && + isBlobLike(value); + +/** + * Intended to match DOM Response, node-fetch Response, undici Response, etc. + */ +export interface ResponseLike { + url: string; + blob(): Promise; +} + +const isResponseLike = (value: any): value is ResponseLike => + value != null && + typeof value === 'object' && + typeof value.url === 'string' && + typeof value.blob === 'function'; + +export type ToFileInput = + | FileLike + | ResponseLike + | Exclude + | AsyncIterable; + +/** + * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats + * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s + * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible + * @param {Object=} options additional properties + * @param {string=} options.type the MIME type of the content + * @param {number=} options.lastModified the last modified timestamp + * @returns a {@link File} with the given properties + */ +export async function toFile( + value: ToFileInput | PromiseLike, + name?: string | null | undefined, + options?: FilePropertyBag | undefined, +): Promise { + checkFileSupport(); + + // If it's a promise, resolve it. + value = await value; + + name ||= getName(value); + + // If we've been given a `File` we don't need to do anything if the name / options + // have not been customised. + if (isFileLike(value)) { + if (value instanceof File && name == null && options == null) { + return value; + } + return makeFile([await value.arrayBuffer()], name ?? value.name, { + type: value.type, + lastModified: value.lastModified, + ...options, + }); + } + + if (isResponseLike(value)) { + const blob = await value.blob(); + name ||= new URL(value.url).pathname.split(/[\\/]/).pop(); + + return makeFile(await getBytes(blob), name, options); + } + + const parts = await getBytes(value); + + if (!options?.type) { + const type = parts.find((part) => typeof part === 'object' && 'type' in part && part.type); + if (typeof type === 'string') { + options = { ...options, type }; + } + } + + return makeFile(parts, name, options); +} + +async function getBytes(value: BlobLikePart | AsyncIterable): Promise> { + let parts: Array = []; + if ( + typeof value === 'string' || + ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc. + value instanceof ArrayBuffer + ) { + parts.push(value); + } else if (isBlobLike(value)) { + parts.push(value instanceof Blob ? value : await value.arrayBuffer()); + } else if ( + isAsyncIterable(value) // includes Readable, ReadableStream, etc. + ) { + for await (const chunk of value) { + parts.push(...(await getBytes(chunk as BlobLikePart))); // TODO, consider validating? + } + } else { + const constructor = value?.constructor?.name; + throw new Error( + `Unexpected data type: ${typeof value}${ + constructor ? `; constructor: ${constructor}` : '' + }${propsForError(value)}`, + ); + } + + return parts; +} + +function propsForError(value: unknown): string { + if (typeof value !== 'object' || value === null) return ''; + const props = Object.getOwnPropertyNames(value); + return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts new file mode 100644 index 0000000000000000000000000000000000000000..95f4be26a424c45d1a9377cc426a5c2b893d0f8e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts @@ -0,0 +1,193 @@ +import { type RequestOptions } from './request-options'; +import type { FilePropertyBag, Fetch } from './builtin-types'; +import type { BaseAnthropic } from '../client'; +import { ReadableStreamFrom } from './shims'; + +export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView; +type FsReadStream = AsyncIterable & { path: string | { toString(): string } }; + +// https://github.com/oven-sh/bun/issues/5980 +interface BunFile extends Blob { + readonly name?: string | undefined; +} + +export const checkFileSupport = () => { + if (typeof File === 'undefined') { + const { process } = globalThis as any; + const isOldNode = + typeof process?.versions?.node === 'string' && parseInt(process.versions.node.split('.')) < 20; + throw new Error( + '`File` is not defined as a global, which is required for file uploads.' + + (isOldNode ? + " Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`." + : ''), + ); + } +}; + +/** + * Typically, this is a native "File" class. + * + * We provide the {@link toFile} utility to convert a variety of objects + * into the File class. + * + * For convenience, you can also pass a fetch Response, or in Node, + * the result of fs.createReadStream(). + */ +export type Uploadable = File | Response | FsReadStream | BunFile; + +/** + * Construct a `File` instance. This is used to ensure a helpful error is thrown + * for environments that don't define a global `File` yet. + */ +export function makeFile( + fileBits: BlobPart[], + fileName: string | undefined, + options?: FilePropertyBag, +): File { + checkFileSupport(); + return new File(fileBits as any, fileName ?? 'unknown_file', options); +} + +export function getName(value: any): string | undefined { + return ( + ( + (typeof value === 'object' && + value !== null && + (('name' in value && value.name && String(value.name)) || + ('url' in value && value.url && String(value.url)) || + ('filename' in value && value.filename && String(value.filename)) || + ('path' in value && value.path && String(value.path)))) || + '' + ) + .split(/[\\/]/) + .pop() || undefined + ); +} + +export const isAsyncIterable = (value: any): value is AsyncIterable => + value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function'; + +/** + * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value. + * Otherwise returns the request as is. + */ +export const maybeMultipartFormRequestOptions = async ( + opts: RequestOptions, + fetch: BaseAnthropic | Fetch, +): Promise => { + if (!hasUploadableValue(opts.body)) return opts; + + return { ...opts, body: await createForm(opts.body, fetch) }; +}; + +type MultipartFormRequestOptions = Omit & { body: unknown }; + +export const multipartFormRequestOptions = async ( + opts: MultipartFormRequestOptions, + fetch: BaseAnthropic | Fetch, +): Promise => { + return { ...opts, body: await createForm(opts.body, fetch) }; +}; + +const supportsFormDataMap = new WeakMap>(); + +/** + * node-fetch doesn't support the global FormData object in recent node versions. Instead of sending + * properly-encoded form data, it just stringifies the object, resulting in a request body of "[object FormData]". + * This function detects if the fetch function provided supports the global FormData object to avoid + * confusing error messages later on. + */ +function supportsFormData(fetchObject: BaseAnthropic | Fetch): Promise { + const fetch: Fetch = typeof fetchObject === 'function' ? fetchObject : (fetchObject as any).fetch; + const cached = supportsFormDataMap.get(fetch); + if (cached) return cached; + const promise = (async () => { + try { + const FetchResponse = ( + 'Response' in fetch ? + fetch.Response + : (await fetch('data:,')).constructor) as typeof Response; + const data = new FormData(); + if (data.toString() === (await new FetchResponse(data).text())) { + return false; + } + return true; + } catch { + // avoid false negatives + return true; + } + })(); + supportsFormDataMap.set(fetch, promise); + return promise; +} + +export const createForm = async >( + body: T | undefined, + fetch: BaseAnthropic | Fetch, +): Promise => { + if (!(await supportsFormData(fetch))) { + throw new TypeError( + 'The provided fetch function does not support file uploads with the current global FormData class.', + ); + } + const form = new FormData(); + await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value))); + return form; +}; + +// We check for Blob not File because Bun.File doesn't inherit from File, +// but they both inherit from Blob and have a `name` property at runtime. +const isNamedBlob = (value: unknown): value is Blob => value instanceof Blob && 'name' in value; + +const isUploadable = (value: unknown) => + typeof value === 'object' && + value !== null && + (value instanceof Response || isAsyncIterable(value) || isNamedBlob(value)); + +const hasUploadableValue = (value: unknown): boolean => { + if (isUploadable(value)) return true; + if (Array.isArray(value)) return value.some(hasUploadableValue); + if (value && typeof value === 'object') { + for (const k in value) { + if (hasUploadableValue((value as any)[k])) return true; + } + } + return false; +}; + +const addFormValue = async (form: FormData, key: string, value: unknown): Promise => { + if (value === undefined) return; + if (value == null) { + throw new TypeError( + `Received null for "${key}"; to pass null in FormData, you must use the string 'null'`, + ); + } + + // TODO: make nested formats configurable + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + form.append(key, String(value)); + } else if (value instanceof Response) { + let options = {} as FilePropertyBag; + const contentType = value.headers.get('Content-Type'); + if (contentType) { + options = { type: contentType }; + } + + form.append(key, makeFile([await value.blob()], getName(value), options)); + } else if (isAsyncIterable(value)) { + form.append(key, makeFile([await new Response(ReadableStreamFrom(value)).blob()], getName(value))); + } else if (isNamedBlob(value)) { + form.append(key, makeFile([value], getName(value), { type: value.type })); + } else if (Array.isArray(value)) { + await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry))); + } else if (typeof value === 'object') { + await Promise.all( + Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop)), + ); + } else { + throw new TypeError( + `Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`, + ); + } +}; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts new file mode 100644 index 0000000000000000000000000000000000000000..d151bd0dbc4aa21fa8a014de6450a2a6e6ae7702 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts @@ -0,0 +1,102 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { AnthropicError } from '../../core/error'; + +// https://url.spec.whatwg.org/#url-scheme-string +const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i; + +export const isAbsoluteURL = (url: string): boolean => { + return startsWithSchemeRegexp.test(url); +}; + +/** Returns an object if the given value isn't an object, otherwise returns as-is */ +export function maybeObj(x: unknown): object { + if (typeof x !== 'object') { + return {}; + } + + return x ?? {}; +} + +// https://stackoverflow.com/a/34491287 +export function isEmptyObj(obj: Object | null | undefined): boolean { + if (!obj) return true; + for (const _k in obj) return false; + return true; +} + +// https://eslint.org/docs/latest/rules/no-prototype-builtins +export function hasOwn(obj: T, key: PropertyKey): key is keyof T { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +export function isObj(obj: unknown): obj is Record { + return obj != null && typeof obj === 'object' && !Array.isArray(obj); +} + +export const ensurePresent = (value: T | null | undefined): T => { + if (value == null) { + throw new AnthropicError(`Expected a value to be given but received ${value} instead.`); + } + + return value; +}; + +export const validatePositiveInteger = (name: string, n: unknown): number => { + if (typeof n !== 'number' || !Number.isInteger(n)) { + throw new AnthropicError(`${name} must be an integer`); + } + if (n < 0) { + throw new AnthropicError(`${name} must be a positive integer`); + } + return n; +}; + +export const coerceInteger = (value: unknown): number => { + if (typeof value === 'number') return Math.round(value); + if (typeof value === 'string') return parseInt(value, 10); + + throw new AnthropicError(`Could not coerce ${value} (type: ${typeof value}) into a number`); +}; + +export const coerceFloat = (value: unknown): number => { + if (typeof value === 'number') return value; + if (typeof value === 'string') return parseFloat(value); + + throw new AnthropicError(`Could not coerce ${value} (type: ${typeof value}) into a number`); +}; + +export const coerceBoolean = (value: unknown): boolean => { + if (typeof value === 'boolean') return value; + if (typeof value === 'string') return value === 'true'; + return Boolean(value); +}; + +export const maybeCoerceInteger = (value: unknown): number | undefined => { + if (value === undefined) { + return undefined; + } + return coerceInteger(value); +}; + +export const maybeCoerceFloat = (value: unknown): number | undefined => { + if (value === undefined) { + return undefined; + } + return coerceFloat(value); +}; + +export const maybeCoerceBoolean = (value: unknown): boolean | undefined => { + if (value === undefined) { + return undefined; + } + return coerceBoolean(value); +}; + +export const safeJSON = (text: string) => { + try { + return JSON.parse(text); + } catch (err) { + return undefined; + } +}; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts new file mode 100644 index 0000000000000000000000000000000000000000..107db45f6852814a5213213ac6db957c79352e30 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts @@ -0,0 +1,382 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import * as FilesAPI from './files'; +import { + DeletedFile, + FileDeleteParams, + FileDownloadParams, + FileListParams, + FileMetadata, + FileMetadataPage, + FileRetrieveMetadataParams, + FileUploadParams, + Files, +} from './files'; +import * as ModelsAPI from './models'; +import { BetaModelInfo, BetaModelInfosPage, ModelListParams, ModelRetrieveParams, Models } from './models'; +import * as MessagesAPI from './messages/messages'; +import { + BetaBase64ImageSource, + BetaBase64PDFBlock, + BetaBase64PDFSource, + BetaCacheControlEphemeral, + BetaCacheCreation, + BetaCitationCharLocation, + BetaCitationCharLocationParam, + BetaCitationContentBlockLocation, + BetaCitationContentBlockLocationParam, + BetaCitationPageLocation, + BetaCitationPageLocationParam, + BetaCitationWebSearchResultLocationParam, + BetaCitationsConfigParam, + BetaCitationsDelta, + BetaCitationsWebSearchResultLocation, + BetaCodeExecutionOutputBlock, + BetaCodeExecutionOutputBlockParam, + BetaCodeExecutionResultBlock, + BetaCodeExecutionResultBlockParam, + BetaCodeExecutionTool20250522, + BetaCodeExecutionToolResultBlock, + BetaCodeExecutionToolResultBlockContent, + BetaCodeExecutionToolResultBlockParam, + BetaCodeExecutionToolResultBlockParamContent, + BetaCodeExecutionToolResultError, + BetaCodeExecutionToolResultErrorCode, + BetaCodeExecutionToolResultErrorParam, + BetaContainer, + BetaContainerUploadBlock, + BetaContainerUploadBlockParam, + BetaContentBlock, + BetaContentBlockParam, + BetaContentBlockSource, + BetaContentBlockSourceContent, + BetaFileDocumentSource, + BetaFileImageSource, + BetaImageBlockParam, + BetaInputJSONDelta, + BetaMCPToolResultBlock, + BetaMCPToolUseBlock, + BetaMCPToolUseBlockParam, + BetaMessage, + BetaMessageDeltaUsage, + BetaMessageParam, + BetaMessageTokensCount, + BetaMetadata, + BetaPlainTextSource, + BetaRawContentBlockDelta, + BetaRawContentBlockDeltaEvent, + BetaRawContentBlockStartEvent, + BetaRawContentBlockStopEvent, + BetaRawMessageDeltaEvent, + BetaRawMessageStartEvent, + BetaRawMessageStopEvent, + BetaRawMessageStreamEvent, + BetaRedactedThinkingBlock, + BetaRedactedThinkingBlockParam, + BetaRequestDocumentBlock, + BetaRequestMCPServerToolConfiguration, + BetaRequestMCPServerURLDefinition, + BetaRequestMCPToolResultBlockParam, + BetaServerToolUsage, + BetaServerToolUseBlock, + BetaServerToolUseBlockParam, + BetaSignatureDelta, + BetaStopReason, + BetaTextBlock, + BetaTextBlockParam, + BetaTextCitation, + BetaTextCitationParam, + BetaTextDelta, + BetaThinkingBlock, + BetaThinkingBlockParam, + BetaThinkingConfigDisabled, + BetaThinkingConfigEnabled, + BetaThinkingConfigParam, + BetaThinkingDelta, + BetaTool, + BetaToolBash20241022, + BetaToolBash20250124, + BetaToolChoice, + BetaToolChoiceAny, + BetaToolChoiceAuto, + BetaToolChoiceNone, + BetaToolChoiceTool, + BetaToolComputerUse20241022, + BetaToolComputerUse20250124, + BetaToolResultBlockParam, + BetaToolTextEditor20241022, + BetaToolTextEditor20250124, + BetaToolTextEditor20250429, + BetaToolUnion, + BetaToolUseBlock, + BetaToolUseBlockParam, + BetaURLImageSource, + BetaURLPDFSource, + BetaUsage, + BetaWebSearchResultBlock, + BetaWebSearchResultBlockParam, + BetaWebSearchTool20250305, + BetaWebSearchToolRequestError, + BetaWebSearchToolResultBlock, + BetaWebSearchToolResultBlockContent, + BetaWebSearchToolResultBlockParam, + BetaWebSearchToolResultBlockParamContent, + BetaWebSearchToolResultError, + BetaWebSearchToolResultErrorCode, + MessageCountTokensParams, + MessageCreateParams, + MessageCreateParamsNonStreaming, + MessageCreateParamsStreaming, + Messages, +} from './messages/messages'; + +export class Beta extends APIResource { + models: ModelsAPI.Models = new ModelsAPI.Models(this._client); + messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client); + files: FilesAPI.Files = new FilesAPI.Files(this._client); +} + +export type AnthropicBeta = + | (string & {}) + | 'message-batches-2024-09-24' + | 'prompt-caching-2024-07-31' + | 'computer-use-2024-10-22' + | 'computer-use-2025-01-24' + | 'pdfs-2024-09-25' + | 'token-counting-2024-11-01' + | 'token-efficient-tools-2025-02-19' + | 'output-128k-2025-02-19' + | 'files-api-2025-04-14' + | 'mcp-client-2025-04-04' + | 'dev-full-thinking-2025-05-14' + | 'interleaved-thinking-2025-05-14' + | 'code-execution-2025-05-22' + | 'extended-cache-ttl-2025-04-11'; + +export interface BetaAPIError { + message: string; + + type: 'api_error'; +} + +export interface BetaAuthenticationError { + message: string; + + type: 'authentication_error'; +} + +export interface BetaBillingError { + message: string; + + type: 'billing_error'; +} + +export type BetaError = + | BetaInvalidRequestError + | BetaAuthenticationError + | BetaBillingError + | BetaPermissionError + | BetaNotFoundError + | BetaRateLimitError + | BetaGatewayTimeoutError + | BetaAPIError + | BetaOverloadedError; + +export interface BetaErrorResponse { + error: BetaError; + + type: 'error'; +} + +export interface BetaGatewayTimeoutError { + message: string; + + type: 'timeout_error'; +} + +export interface BetaInvalidRequestError { + message: string; + + type: 'invalid_request_error'; +} + +export interface BetaNotFoundError { + message: string; + + type: 'not_found_error'; +} + +export interface BetaOverloadedError { + message: string; + + type: 'overloaded_error'; +} + +export interface BetaPermissionError { + message: string; + + type: 'permission_error'; +} + +export interface BetaRateLimitError { + message: string; + + type: 'rate_limit_error'; +} + +Beta.Models = Models; +Beta.Messages = Messages; +Beta.Files = Files; + +export declare namespace Beta { + export { + type AnthropicBeta as AnthropicBeta, + type BetaAPIError as BetaAPIError, + type BetaAuthenticationError as BetaAuthenticationError, + type BetaBillingError as BetaBillingError, + type BetaError as BetaError, + type BetaErrorResponse as BetaErrorResponse, + type BetaGatewayTimeoutError as BetaGatewayTimeoutError, + type BetaInvalidRequestError as BetaInvalidRequestError, + type BetaNotFoundError as BetaNotFoundError, + type BetaOverloadedError as BetaOverloadedError, + type BetaPermissionError as BetaPermissionError, + type BetaRateLimitError as BetaRateLimitError, + }; + + export { + Models as Models, + type BetaModelInfo as BetaModelInfo, + type BetaModelInfosPage as BetaModelInfosPage, + type ModelRetrieveParams as ModelRetrieveParams, + type ModelListParams as ModelListParams, + }; + + export { + Messages as Messages, + type BetaBase64ImageSource as BetaBase64ImageSource, + type BetaBase64PDFSource as BetaBase64PDFSource, + type BetaCacheControlEphemeral as BetaCacheControlEphemeral, + type BetaCacheCreation as BetaCacheCreation, + type BetaCitationCharLocation as BetaCitationCharLocation, + type BetaCitationCharLocationParam as BetaCitationCharLocationParam, + type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, + type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, + type BetaCitationPageLocation as BetaCitationPageLocation, + type BetaCitationPageLocationParam as BetaCitationPageLocationParam, + type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, + type BetaCitationsConfigParam as BetaCitationsConfigParam, + type BetaCitationsDelta as BetaCitationsDelta, + type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, + type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, + type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, + type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, + type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, + type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, + type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, + type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, + type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, + type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, + type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, + type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, + type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, + type BetaContainer as BetaContainer, + type BetaContainerUploadBlock as BetaContainerUploadBlock, + type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, + type BetaContentBlock as BetaContentBlock, + type BetaContentBlockParam as BetaContentBlockParam, + type BetaContentBlockSource as BetaContentBlockSource, + type BetaContentBlockSourceContent as BetaContentBlockSourceContent, + type BetaFileDocumentSource as BetaFileDocumentSource, + type BetaFileImageSource as BetaFileImageSource, + type BetaImageBlockParam as BetaImageBlockParam, + type BetaInputJSONDelta as BetaInputJSONDelta, + type BetaMCPToolResultBlock as BetaMCPToolResultBlock, + type BetaMCPToolUseBlock as BetaMCPToolUseBlock, + type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, + type BetaMessage as BetaMessage, + type BetaMessageDeltaUsage as BetaMessageDeltaUsage, + type BetaMessageParam as BetaMessageParam, + type BetaMessageTokensCount as BetaMessageTokensCount, + type BetaMetadata as BetaMetadata, + type BetaPlainTextSource as BetaPlainTextSource, + type BetaRawContentBlockDelta as BetaRawContentBlockDelta, + type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, + type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, + type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, + type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, + type BetaRawMessageStartEvent as BetaRawMessageStartEvent, + type BetaRawMessageStopEvent as BetaRawMessageStopEvent, + type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, + type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, + type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, + type BetaRequestDocumentBlock as BetaRequestDocumentBlock, + type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, + type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, + type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, + type BetaServerToolUsage as BetaServerToolUsage, + type BetaServerToolUseBlock as BetaServerToolUseBlock, + type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, + type BetaSignatureDelta as BetaSignatureDelta, + type BetaStopReason as BetaStopReason, + type BetaTextBlock as BetaTextBlock, + type BetaTextBlockParam as BetaTextBlockParam, + type BetaTextCitation as BetaTextCitation, + type BetaTextCitationParam as BetaTextCitationParam, + type BetaTextDelta as BetaTextDelta, + type BetaThinkingBlock as BetaThinkingBlock, + type BetaThinkingBlockParam as BetaThinkingBlockParam, + type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, + type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, + type BetaThinkingConfigParam as BetaThinkingConfigParam, + type BetaThinkingDelta as BetaThinkingDelta, + type BetaTool as BetaTool, + type BetaToolBash20241022 as BetaToolBash20241022, + type BetaToolBash20250124 as BetaToolBash20250124, + type BetaToolChoice as BetaToolChoice, + type BetaToolChoiceAny as BetaToolChoiceAny, + type BetaToolChoiceAuto as BetaToolChoiceAuto, + type BetaToolChoiceNone as BetaToolChoiceNone, + type BetaToolChoiceTool as BetaToolChoiceTool, + type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, + type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, + type BetaToolResultBlockParam as BetaToolResultBlockParam, + type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, + type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, + type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, + type BetaToolUnion as BetaToolUnion, + type BetaToolUseBlock as BetaToolUseBlock, + type BetaToolUseBlockParam as BetaToolUseBlockParam, + type BetaURLImageSource as BetaURLImageSource, + type BetaURLPDFSource as BetaURLPDFSource, + type BetaUsage as BetaUsage, + type BetaWebSearchResultBlock as BetaWebSearchResultBlock, + type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, + type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, + type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, + type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, + type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, + type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, + type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, + type BetaWebSearchToolResultError as BetaWebSearchToolResultError, + type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, + type BetaBase64PDFBlock as BetaBase64PDFBlock, + type MessageCreateParams as MessageCreateParams, + type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming as MessageCreateParamsStreaming, + type MessageCountTokensParams as MessageCountTokensParams, + }; + + export { + Files as Files, + type DeletedFile as DeletedFile, + type FileMetadata as FileMetadata, + type FileMetadataPage as FileMetadataPage, + type FileListParams as FileListParams, + type FileDeleteParams as FileDeleteParams, + type FileDownloadParams as FileDownloadParams, + type FileRetrieveMetadataParams as FileRetrieveMetadataParams, + type FileUploadParams as FileUploadParams, + }; +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb89d66f2ee590f1cc80873788e89b92208f89fd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts @@ -0,0 +1,136 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + Batches, + type BetaDeletedMessageBatch, + type BetaMessageBatch, + type BetaMessageBatchCanceledResult, + type BetaMessageBatchErroredResult, + type BetaMessageBatchExpiredResult, + type BetaMessageBatchIndividualResponse, + type BetaMessageBatchRequestCounts, + type BetaMessageBatchResult, + type BetaMessageBatchSucceededResult, + type BatchCreateParams, + type BatchRetrieveParams, + type BatchListParams, + type BatchDeleteParams, + type BatchCancelParams, + type BatchResultsParams, + type BetaMessageBatchesPage, +} from './batches'; +export { + Messages, + type BetaBase64ImageSource, + type BetaBase64PDFSource, + type BetaCacheControlEphemeral, + type BetaCacheCreation, + type BetaCitationCharLocation, + type BetaCitationCharLocationParam, + type BetaCitationContentBlockLocation, + type BetaCitationContentBlockLocationParam, + type BetaCitationPageLocation, + type BetaCitationPageLocationParam, + type BetaCitationWebSearchResultLocationParam, + type BetaCitationsConfigParam, + type BetaCitationsDelta, + type BetaCitationsWebSearchResultLocation, + type BetaCodeExecutionOutputBlock, + type BetaCodeExecutionOutputBlockParam, + type BetaCodeExecutionResultBlock, + type BetaCodeExecutionResultBlockParam, + type BetaCodeExecutionTool20250522, + type BetaCodeExecutionToolResultBlock, + type BetaCodeExecutionToolResultBlockContent, + type BetaCodeExecutionToolResultBlockParam, + type BetaCodeExecutionToolResultBlockParamContent, + type BetaCodeExecutionToolResultError, + type BetaCodeExecutionToolResultErrorCode, + type BetaCodeExecutionToolResultErrorParam, + type BetaContainer, + type BetaContainerUploadBlock, + type BetaContainerUploadBlockParam, + type BetaContentBlock, + type BetaContentBlockParam, + type BetaContentBlockSource, + type BetaContentBlockSourceContent, + type BetaFileDocumentSource, + type BetaFileImageSource, + type BetaImageBlockParam, + type BetaInputJSONDelta, + type BetaMCPToolResultBlock, + type BetaMCPToolUseBlock, + type BetaMCPToolUseBlockParam, + type BetaMessage, + type BetaMessageDeltaUsage, + type BetaMessageParam, + type BetaMessageTokensCount, + type BetaMetadata, + type BetaPlainTextSource, + type BetaRawContentBlockDelta, + type BetaRawContentBlockDeltaEvent, + type BetaRawContentBlockStartEvent, + type BetaRawContentBlockStopEvent, + type BetaRawMessageDeltaEvent, + type BetaRawMessageStartEvent, + type BetaRawMessageStopEvent, + type BetaRawMessageStreamEvent, + type BetaRedactedThinkingBlock, + type BetaRedactedThinkingBlockParam, + type BetaRequestDocumentBlock, + type BetaRequestMCPServerToolConfiguration, + type BetaRequestMCPServerURLDefinition, + type BetaRequestMCPToolResultBlockParam, + type BetaServerToolUsage, + type BetaServerToolUseBlock, + type BetaServerToolUseBlockParam, + type BetaSignatureDelta, + type BetaStopReason, + type BetaTextBlock, + type BetaTextBlockParam, + type BetaTextCitation, + type BetaTextCitationParam, + type BetaTextDelta, + type BetaThinkingBlock, + type BetaThinkingBlockParam, + type BetaThinkingConfigDisabled, + type BetaThinkingConfigEnabled, + type BetaThinkingConfigParam, + type BetaThinkingDelta, + type BetaTool, + type BetaToolBash20241022, + type BetaToolBash20250124, + type BetaToolChoice, + type BetaToolChoiceAny, + type BetaToolChoiceAuto, + type BetaToolChoiceNone, + type BetaToolChoiceTool, + type BetaToolComputerUse20241022, + type BetaToolComputerUse20250124, + type BetaToolResultBlockParam, + type BetaToolTextEditor20241022, + type BetaToolTextEditor20250124, + type BetaToolTextEditor20250429, + type BetaToolUnion, + type BetaToolUseBlock, + type BetaToolUseBlockParam, + type BetaURLImageSource, + type BetaURLPDFSource, + type BetaUsage, + type BetaWebSearchResultBlock, + type BetaWebSearchResultBlockParam, + type BetaWebSearchTool20250305, + type BetaWebSearchToolRequestError, + type BetaWebSearchToolResultBlock, + type BetaWebSearchToolResultBlockContent, + type BetaWebSearchToolResultBlockParam, + type BetaWebSearchToolResultBlockParamContent, + type BetaWebSearchToolResultError, + type BetaWebSearchToolResultErrorCode, + type BetaBase64PDFBlock, + type MessageCreateParams, + type MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming, + type MessageCountTokensParams, + type BetaMessageStreamParams, +} from './messages'; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts new file mode 100644 index 0000000000000000000000000000000000000000..94473d3898e2d5c8c3ffbadcd698c7d5ceb552c0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts @@ -0,0 +1,118 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import * as BetaAPI from './beta'; +import { APIPromise } from '../../core/api-promise'; +import { Page, type PageParams, PagePromise } from '../../core/pagination'; +import { buildHeaders } from '../../internal/headers'; +import { RequestOptions } from '../../internal/request-options'; +import { path } from '../../internal/utils/path'; + +export class Models extends APIResource { + /** + * Get a specific model. + * + * The Models API response can be used to determine information about a specific + * model or resolve a model alias to a model ID. + * + * @example + * ```ts + * const betaModelInfo = await client.beta.models.retrieve( + * 'model_id', + * ); + * ``` + */ + retrieve( + modelID: string, + params: ModelRetrieveParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + const { betas } = params ?? {}; + return this._client.get(path`/v1/models/${modelID}?beta=true`, { + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } + + /** + * List available models. + * + * The Models API response can be used to determine which models are available for + * use in the API. More recently released models are listed first. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const betaModelInfo of client.beta.models.list()) { + * // ... + * } + * ``` + */ + list( + params: ModelListParams | null | undefined = {}, + options?: RequestOptions, + ): PagePromise { + const { betas, ...query } = params ?? {}; + return this._client.getAPIList('/v1/models?beta=true', Page, { + query, + ...options, + headers: buildHeaders([ + { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) }, + options?.headers, + ]), + }); + } +} + +export type BetaModelInfosPage = Page; + +export interface BetaModelInfo { + /** + * Unique model identifier. + */ + id: string; + + /** + * RFC 3339 datetime string representing the time at which the model was released. + * May be set to an epoch value if the release date is unknown. + */ + created_at: string; + + /** + * A human-readable name for the model. + */ + display_name: string; + + /** + * Object type. + * + * For Models, this is always `"model"`. + */ + type: 'model'; +} + +export interface ModelRetrieveParams { + /** + * Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export interface ModelListParams extends PageParams { + /** + * Header param: Optional header to specify the beta version(s) you want to use. + */ + betas?: Array; +} + +export declare namespace Models { + export { + type BetaModelInfo as BetaModelInfo, + type BetaModelInfosPage as BetaModelInfosPage, + type ModelRetrieveParams as ModelRetrieveParams, + type ModelListParams as ModelListParams, + }; +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..db7320ea7be03530aab9509eeb6cc4d8bc204e97 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts @@ -0,0 +1,110 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + Batches, + type DeletedMessageBatch, + type MessageBatch, + type MessageBatchCanceledResult, + type MessageBatchErroredResult, + type MessageBatchExpiredResult, + type MessageBatchIndividualResponse, + type MessageBatchRequestCounts, + type MessageBatchResult, + type MessageBatchSucceededResult, + type BatchCreateParams, + type BatchListParams, + type MessageBatchesPage, +} from './batches'; +export { + Messages, + type Base64ImageSource, + type Base64PDFSource, + type CacheControlEphemeral, + type CitationCharLocation, + type CitationCharLocationParam, + type CitationContentBlockLocation, + type CitationContentBlockLocationParam, + type CitationPageLocation, + type CitationPageLocationParam, + type CitationWebSearchResultLocationParam, + type CitationsConfigParam, + type CitationsDelta, + type CitationsWebSearchResultLocation, + type ContentBlock, + type ContentBlockParam, + type ContentBlockStartEvent, + type ContentBlockStopEvent, + type ContentBlockSource, + type ContentBlockSourceContent, + type DocumentBlockParam, + type ImageBlockParam, + type InputJSONDelta, + type Message, + type MessageCountTokensTool, + type MessageDeltaEvent, + type MessageDeltaUsage, + type MessageParam, + type MessageTokensCount, + type Metadata, + type Model, + type PlainTextSource, + type RawContentBlockDelta, + type RawContentBlockDeltaEvent, + type RawContentBlockStartEvent, + type RawContentBlockStopEvent, + type RawMessageDeltaEvent, + type RawMessageStartEvent, + type RawMessageStopEvent, + type RawMessageStreamEvent, + type RedactedThinkingBlock, + type RedactedThinkingBlockParam, + type ServerToolUsage, + type ServerToolUseBlock, + type ServerToolUseBlockParam, + type SignatureDelta, + type StopReason, + type TextBlock, + type TextBlockParam, + type TextCitation, + type TextCitationParam, + type TextDelta, + type ThinkingBlock, + type ThinkingBlockParam, + type ThinkingConfigDisabled, + type ThinkingConfigEnabled, + type ThinkingConfigParam, + type ThinkingDelta, + type Tool, + type ToolBash20250124, + type ToolChoice, + type ToolChoiceAny, + type ToolChoiceAuto, + type ToolChoiceNone, + type ToolChoiceTool, + type ToolResultBlockParam, + type ToolTextEditor20250124, + type ToolUnion, + type ToolUseBlock, + type ToolUseBlockParam, + type URLImageSource, + type URLPDFSource, + type Usage, + type WebSearchResultBlock, + type WebSearchResultBlockParam, + type WebSearchTool20250305, + type WebSearchToolRequestError, + type WebSearchToolResultBlock, + type WebSearchToolResultBlockContent, + type WebSearchToolResultBlockParam, + type WebSearchToolResultBlockParamContent, + type WebSearchToolResultError, + type MessageStreamEvent, + type MessageStartEvent, + type MessageStopEvent, + type ContentBlockDeltaEvent, + type MessageCreateParams, + type MessageCreateParamsBase, + type MessageCreateParamsNonStreaming, + type MessageCreateParamsStreaming, + type MessageCountTokensParams, +} from './messages'; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/tsconfig.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..c550e2996bc6f4af070fef8250f2a4ee8cdb5255 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/tsconfig.json @@ -0,0 +1,11 @@ +{ + // this config is included in the published src directory to prevent TS errors + // from appearing when users go to source, and VSCode opens the source .ts file + // via declaration maps + "include": ["index.ts"], + "compilerOptions": { + "target": "ES2015", + "lib": ["DOM", "DOM.Iterable", "ES2018"], + "moduleResolution": "node" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/uploads.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/uploads.ts new file mode 100644 index 0000000000000000000000000000000000000000..b2ef64710fb618f1115aaee5650edd3aaa82ec45 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/src/uploads.ts @@ -0,0 +1,2 @@ +/** @deprecated Import from ./core/uploads instead */ +export * from './core/uploads'; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f58cd7c64365327309fcc5ff63f56c50b1f1d7e9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts @@ -0,0 +1,2 @@ +export * from "./core/streaming.mjs"; +//# sourceMappingURL=streaming.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b1441091adec83c44c47c1d2abd3afa0d9d2744e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.d.mts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..89ba506bff13498352a95d3f39683d6d472f664d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts @@ -0,0 +1,2 @@ +export * from "./core/streaming.js"; +//# sourceMappingURL=streaming.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5f9f18e89c5102c5fe5cd9b9ee3435c55104aba7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/streaming.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..b3c3f2b1145a3ba150992543d6fcd42e13a14d9e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..7c12ec0e534dcdb8516f9193536ee0578b9b3d72 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.js.map new file mode 100644 index 0000000000000000000000000000000000000000..57711905ee8ca5105304f680d7e03eb28750a908 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,4DAA+B"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..79d3c1a31d41d04fb56dc68ffade827991b7d3ae --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/uploads.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..612a63cb87dbdbc05e8c269cc3574ec0628cf613 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.mts @@ -0,0 +1,2 @@ +export declare const VERSION = "0.54.0"; +//# sourceMappingURL=version.d.mts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.mts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.mts.map new file mode 100644 index 0000000000000000000000000000000000000000..870679b98cf72e9f63bf0b84e1d8fbc227a2c6fa --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c4bddf5e3b075c9fbfb2aaa988c1578e4aa0f1f1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.ts @@ -0,0 +1,2 @@ +export declare const VERSION = "0.54.0"; +//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.ts.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e072bdd7a15c376e22ed360f66cda149fff769ac --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.js new file mode 100644 index 0000000000000000000000000000000000000000..688ca8f2a548f5f4d3856a86365d54349b17f431 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VERSION = void 0; +exports.VERSION = '0.54.0'; // x-release-please-version +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.js.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e9a6b4f01739d8724dad65ade9271280801ba000 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.mjs.map b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..0c09c723b1318a6966eaf1482f5f556f052a5491 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/version.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@esbuild/linux-x64/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@esbuild/linux-x64/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b2f19300430eb75c1a1fc7d5700ad0b6e7e69333 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@esbuild/linux-x64/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is the Linux 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/accept-negotiator/types/index.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/accept-negotiator/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b7ba9982ac976c47b5d38683e7a0adb3144cbd02 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/accept-negotiator/types/index.d.ts @@ -0,0 +1,17 @@ +type CacheStore = { set: (key: string, value: string) => CacheStore, get: (key: string) => string | undefined, has: (key: string) => boolean } + +type NegotiateFn = typeof negotiate + +declare namespace negotiate { + export class Negotiator { + constructor (options: { supportedValues: K[]; cache?: CacheStore }) + + negotiate (header: string): K | null + } + + export const negotiate: NegotiateFn + export { negotiate as default } +} + +declare function negotiate (header: string, supportedValues: K[]): K | null +export = negotiate diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/.github/.stale.yml b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/.github/.stale.yml new file mode 100644 index 0000000000000000000000000000000000000000..2ee12691a4fc015ba9eea94b53f14c037dc8f164 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/.github/.stale.yml @@ -0,0 +1,21 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 15 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - "discussion" + - "feature request" + - "bug" + - "help wanted" + - "plugin suggestion" + - "good first issue" +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/benchmark/small-object.mjs b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/benchmark/small-object.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a206582330dcda14bb680f1f6b79ddc3383f72da --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/benchmark/small-object.mjs @@ -0,0 +1,37 @@ +import cronometro from 'cronometro' + +import fjs from 'fast-json-stringify' +import AjvCompiler from '../index.js' + +const fjsSerialize = buildFJSSerializerFunction({ + type: 'object', + properties: { + hello: { type: 'string' }, + name: { type: 'string' } + } +}) +const ajvSerialize = buildAJVSerializerFunction({ + properties: { + hello: { type: 'string' }, + name: { type: 'string' } + } +}) + +await cronometro({ + 'fast-json-stringify': function () { + fjsSerialize({ hello: 'Ciao', name: 'Manuel' }) + }, + 'ajv serializer': function () { + ajvSerialize({ hello: 'Ciao', name: 'Manuel' }) + } +}) + +function buildFJSSerializerFunction (schema) { + return fjs(schema) +} + +function buildAJVSerializerFunction (schema) { + const factory = AjvCompiler({ jtdSerializer: true }) + const compiler = factory({}, { customOptions: {} }) + return compiler({ schema }) +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/eslint.config.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..89fd678fe2a82d7fe3be869fffd71b3631c61c6a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/eslint.config.js @@ -0,0 +1,6 @@ +'use strict' + +module.exports = require('neostandard')({ + ignores: require('neostandard').resolveIgnoresFromGitignore(), + ts: true +}) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/lib/serializer-compiler.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/lib/serializer-compiler.js new file mode 100644 index 0000000000000000000000000000000000000000..4b54f3e758e75629a6daa38b2facb144203111f7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/lib/serializer-compiler.js @@ -0,0 +1,27 @@ +'use strict' + +const AjvJTD = require('ajv/dist/jtd') + +const defaultAjvOptions = require('./default-ajv-options') + +class SerializerCompiler { + constructor (_externalSchemas, options) { + this.ajv = new AjvJTD(Object.assign({}, defaultAjvOptions, options)) + + /** + * https://ajv.js.org/json-type-definition.html#ref-form + * Unlike JSON Schema, JTD does not allow to reference: + * - any schema fragment other than root level definitions member + * - root of the schema - there is another way to define a self-recursive schema (see Example 2) + * - another schema file (but you can still combine schemas from multiple files using JavaScript). + * + * So we ignore the externalSchemas parameter. + */ + } + + buildSerializerFunction ({ schema/*, method, url, httpStatus */ }) { + return this.ajv.compileSerializer(schema) + } +} + +module.exports = SerializerCompiler diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/package.json new file mode 100644 index 0000000000000000000000000000000000000000..92d48a9c32847ceb5d217d5dd4d925b36ede09f7 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/package.json @@ -0,0 +1,84 @@ +{ + "name": "@fastify/ajv-compiler", + "version": "4.0.2", + "description": "Build and manage the AJV instances for the fastify framework", + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "directories": { + "test": "test" + }, + "scripts": { + "lint": "eslint", + "lint:fix": "eslint --fix", + "unit": "tap", + "test": "npm run unit && npm run test:typescript", + "test:typescript": "tsd", + "ajv:compile": "ajv compile -s test/source.json -o test/validate_schema.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/ajv-compiler.git" + }, + "keywords": [ + "ajv", + "validator", + "schema", + "compiler", + "fastify" + ], + "author": "Manuel Spigolon (https://github.com/Eomm)", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com" + }, + { + "name": "James Sumners", + "url": "https://james.sumners.info" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fastify/ajv-compiler/issues" + }, + "homepage": "https://github.com/fastify/ajv-compiler#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "devDependencies": { + "ajv-cli": "^5.0.0", + "ajv-errors": "^3.0.0", + "ajv-i18n": "^4.2.0", + "ajv-merge-patch": "^5.0.1", + "cronometro": "^4.0.0", + "eslint": "^9.17.0", + "fastify": "^5.0.0", + "neostandard": "^0.12.0", + "require-from-string": "^2.0.2", + "sanitize-filename": "^1.6.3", + "tap": "^19.0.0", + "tsd": "^0.31.0" + }, + "dependencies": { + "ajv": "^8.12.0", + "ajv-formats": "^3.0.1", + "fast-uri": "^3.0.0" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/test/.gitkeep b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/test/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/test/duplicated-id-compile.test.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/test/duplicated-id-compile.test.js new file mode 100644 index 0000000000000000000000000000000000000000..849016c6c01cf92d8f65f0aa9501745dadbc684a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/test/duplicated-id-compile.test.js @@ -0,0 +1,59 @@ +'use strict' + +const t = require('tap') +const AjvCompiler = require('../index') + +const postSchema = Object.freeze({ + $schema: 'http://json-schema.org/draft-07/schema#', + type: 'object', + $id: 'http://mydomain.com/user', + title: 'User schema', + description: 'Contains all user fields', + properties: { + username: { type: 'string', minLength: 4 }, + firstName: { type: 'string', minLength: 1 }, + lastName: { type: 'string', minLength: 1 }, + email: { type: 'string' }, + password: { type: 'string', minLength: 6 }, + bio: { type: 'string' } + }, + required: ['username', 'firstName', 'lastName', 'email', 'bio', 'password'] +}) + +const patchSchema = Object.freeze({ + $schema: 'http://json-schema.org/draft-07/schema#', + type: 'object', + $id: 'http://mydomain.com/user', + title: 'User schema', + description: 'Contains all user fields', + properties: { + firstName: { type: 'string', minLength: 1 }, + lastName: { type: 'string', minLength: 1 }, + bio: { type: 'string' } + } +}) + +const fastifyAjvOptionsDefault = Object.freeze({ + customOptions: {} +}) + +t.test('must not store schema on compile', t => { + t.plan(4) + const factory = AjvCompiler() + const compiler = factory({}, fastifyAjvOptionsDefault) + const postFn = compiler({ schema: postSchema }) + const patchFn = compiler({ schema: patchSchema }) + + const resultForPost = postFn({}) + t.equal(resultForPost, false) + t.has(postFn.errors, [ + { + keyword: 'required', + message: "must have required property 'username'" + } + ]) + + const resultForPatch = patchFn({}) + t.ok(resultForPatch) + t.notOk(patchFn.errors) +}) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/test/standalone.test.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/test/standalone.test.js new file mode 100644 index 0000000000000000000000000000000000000000..f32fcbac727e99e073e9a4e369042b2cfde7db44 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/ajv-compiler/test/standalone.test.js @@ -0,0 +1,203 @@ +'use strict' + +const fs = require('node:fs') +const path = require('node:path') +const t = require('tap') +const fastify = require('fastify') +const sanitize = require('sanitize-filename') + +const { StandaloneValidator: AjvStandaloneValidator } = require('../') + +function generateFileName (routeOpts) { + return `/ajv-generated-${sanitize(routeOpts.schema.$id)}-${routeOpts.method}-${routeOpts.httpPart}-${sanitize(routeOpts.url)}.js` +} + +const generatedFileNames = [] + +t.test('standalone', t => { + t.plan(4) + + t.teardown(async () => { + for (const fileName of generatedFileNames) { + await fs.promises.unlink(path.join(__dirname, fileName)) + } + }) + + t.test('errors', t => { + t.plan(2) + t.throws(() => { + AjvStandaloneValidator() + }, 'missing restoreFunction') + t.throws(() => { + AjvStandaloneValidator({ readMode: false }) + }, 'missing storeFunction') + }) + + t.test('generate standalone code', t => { + t.plan(5) + + const base = { + $id: 'urn:schema:base', + definitions: { + hello: { type: 'string' } + }, + type: 'object', + properties: { + hello: { $ref: '#/definitions/hello' } + } + } + + const refSchema = { + $id: 'urn:schema:ref', + type: 'object', + properties: { + hello: { $ref: 'urn:schema:base#/definitions/hello' } + } + } + + const endpointSchema = { + schema: { + $id: 'urn:schema:endpoint', + $ref: 'urn:schema:ref' + } + } + + const schemaMap = { + [base.$id]: base, + [refSchema.$id]: refSchema + } + + const factory = AjvStandaloneValidator({ + readMode: false, + storeFunction (routeOpts, schemaValidationCode) { + t.same(routeOpts, endpointSchema) + t.type(schemaValidationCode, 'string') + fs.writeFileSync(path.join(__dirname, '/ajv-generated.js'), schemaValidationCode) + generatedFileNames.push('/ajv-generated.js') + t.pass('stored the validation function') + } + }) + + const compiler = factory(schemaMap) + compiler(endpointSchema) + t.pass('compiled the endpoint schema') + + t.test('usage standalone code', t => { + t.plan(3) + const standaloneValidate = require('./ajv-generated') + + const valid = standaloneValidate({ hello: 'world' }) + t.ok(valid) + + const invalid = standaloneValidate({ hello: [] }) + t.notOk(invalid) + + t.ok(standaloneValidate) + }) + }) + + t.test('fastify integration - writeMode', async t => { + t.plan(6) + + const factory = AjvStandaloneValidator({ + readMode: false, + storeFunction (routeOpts, schemaValidationCode) { + const fileName = generateFileName(routeOpts) + t.ok(routeOpts) + fs.writeFileSync(path.join(__dirname, fileName), schemaValidationCode) + t.pass('stored the validation function') + generatedFileNames.push(fileName) + }, + restoreFunction () { + t.fail('write mode ON') + } + }) + + const app = buildApp(factory) + await app.ready() + }) + + t.test('fastify integration - readMode', async t => { + t.plan(6) + + const factory = AjvStandaloneValidator({ + readMode: true, + storeFunction () { + t.fail('read mode ON') + }, + restoreFunction (routeOpts) { + t.pass('restore the validation function') + const fileName = generateFileName(routeOpts) + return require(path.join(__dirname, fileName)) + } + }) + + const app = buildApp(factory) + await app.ready() + + let res = await app.inject({ + url: '/foo', + method: 'POST', + payload: { hello: [] } + }) + t.equal(res.statusCode, 400) + + res = await app.inject({ + url: '/bar?lang=invalid', + method: 'GET' + }) + t.equal(res.statusCode, 400) + + res = await app.inject({ + url: '/bar?lang=it', + method: 'GET' + }) + t.equal(res.statusCode, 200) + }) + + function buildApp (factory) { + const app = fastify({ + jsonShorthand: false, + schemaController: { + compilersFactory: { + buildValidator: factory + } + } + }) + + app.addSchema({ + $id: 'urn:schema:foo', + type: 'object', + properties: { + name: { type: 'string' }, + id: { type: 'integer' } + } + }) + + app.post('/foo', { + schema: { + body: { + $id: 'urn:schema:body', + type: 'object', + properties: { + hello: { $ref: 'urn:schema:foo#/properties/name' } + } + } + } + }, () => { return 'ok' }) + + app.get('/bar', { + schema: { + query: { + $id: 'urn:schema:query', + type: 'object', + properties: { + lang: { type: 'string', enum: ['it', 'en'] } + } + } + } + }, () => { return 'ok' }) + + return app + } +}) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/README.md new file mode 100644 index 0000000000000000000000000000000000000000..271214c54e66e16ec9857d3b96631bba2c668920 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/README.md @@ -0,0 +1,198 @@ +# @fastify/cors + +[![CI](https://github.com/fastify/fastify-cors/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fastify-cors/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/@fastify/cors.svg?style=flat)](https://www.npmjs.com/package/@fastify/cors) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +`@fastify/cors` enables the use of [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) in a Fastify application. + +## Install +``` +npm i @fastify/cors +``` + +### Compatibility + +| Plugin version | Fastify version | +| ---------------|-----------------| +| `^11.x` | `^5.x` | +| `^10.x` | `^5.x` | +| `^8.x` | `^4.x` | +| `^7.x` | `^3.x` | +| `>=3.x <7.x` | `^2.x` | +| `>=1.x <3.x` | `^1.x` | + +Please note that if a Fastify version is out of support, then so are the corresponding versions of this plugin +in the table above. +See [Fastify's LTS policy](https://github.com/fastify/fastify/blob/main/docs/Reference/LTS.md) for more details. + +## Usage +Require `@fastify/cors` and register it as any other plugin. It adds an `onRequest` hook and a [wildcard options route](https://github.com/fastify/fastify/issues/326#issuecomment-411360862). +```js +import Fastify from 'fastify' +import cors from '@fastify/cors' + +const fastify = Fastify() +await fastify.register(cors, { + // put your options here +}) + +fastify.get('/', (req, reply) => { + reply.send({ hello: 'world' }) +}) + +await fastify.listen({ port: 3000 }) +``` +You can use it as is without passing any option or you can configure it as explained below. +### Options +* `origin`: Configures the **Access-Control-Allow-Origin** CORS header. The value of origin can be: + - `Boolean`: Set to `true` to reflect the [request origin](http://tools.ietf.org/html/draft-abarth-origin-09), or `false` to disable CORS. + - `String`: Set to a specific origin (e.g., `"http://example.com"`). The special `*` value (default) allows any origin. + - `RegExp`: Set to a regular expression pattern to test the request origin. If it matches, the request origin is reflected (e.g., `/example\.com$/` returns the origin only if it ends with `example.com`). + - `Array`: Set to an array of valid origins, each being a `String` or `RegExp` (e.g., `["http://example1.com", /\.example2\.com$/]`). + - `Function`: Set to a function with custom logic. The function takes the request origin as the first parameter and a callback as the second (signature `err [Error | null], origin`). *Async-await* and promises are supported. The Fastify instance is bound to the function call and can be accessed via `this`. For example: + ```js + origin: (origin, cb) => { + const hostname = new URL(origin).hostname + if(hostname === "localhost"){ + // Request from localhost will pass + cb(null, true) + return + } + // Generate an error on other origins, disabling access + cb(new Error("Not allowed"), false) + } + ``` +* `methods`: Configures the **Access-Control-Allow-Methods** CORS header. Expects a comma-delimited string (e.g., 'GET,HEAD,POST') or an array (e.g., `['GET', 'HEAD', 'POST']`). Default: [CORS-safelisted methods](https://fetch.spec.whatwg.org/#methods) `GET,HEAD,POST`. +* `hook`: See [Custom Fastify hook name](#custom-fastify-hook-name). Default: `onRequest`. +* `allowedHeaders`: Configures the **Access-Control-Allow-Headers** CORS header. Expects a comma-delimited string (e.g., `'Content-Type,Authorization'`) or an array (e.g., `['Content-Type', 'Authorization']`). Defaults to reflecting the headers specified in the request's **Access-Control-Request-Headers** header if not specified. +* `exposedHeaders`: Configures the **Access-Control-Expose-Headers** CORS header. Expects a comma-delimited string (e.g., `'Content-Range,X-Content-Range'`) or an array (e.g., `['Content-Range', 'X-Content-Range']`). No custom headers are exposed if not specified. +* `credentials`: Configures the **Access-Control-Allow-Credentials** CORS header. Set to `true` to pass the header; otherwise, it is omitted. +* `maxAge`: Configures the **Access-Control-Max-Age** CORS header in seconds. Set to an integer to pass the header; otherwise, it is omitted. +* `cacheControl`: Configures the **Cache-Control** header for CORS preflight responses. Set to an integer to pass the header as `Cache-Control: max-age=${cacheControl}`, or set to a string to pass the header as `Cache-Control: ${cacheControl}`. Otherwise, the header is omitted. +* `preflightContinue`: Passes the CORS preflight response to the route handler. Default: `false`. +* `optionsSuccessStatus`: Provides a status code for successful `OPTIONS` requests, as some legacy browsers (IE11, various SmartTVs) choke on `204`. +* `preflight`: Disables preflight by passing `false`. Default: `true`. +* `strictPreflight`: Enforces strict requirements for the CORS preflight request headers (**Access-Control-Request-Method** and **Origin**) as defined by the [W3C CORS specification](https://www.w3.org/TR/2020/SPSD-cors-20200602/#resource-preflight-requests). Preflight requests without the required headers result in 400 errors when set to `true`. Default: `true`. +* `hideOptionsRoute`: Hides the options route from documentation built using [@fastify/swagger](https://github.com/fastify/fastify-swagger). Default: `true`. +* `logLevel`: Sets the Fastify log level **only** for the internal CORS pre-flight `OPTIONS *` route. + Pass `'silent'` to suppress these requests in your logs, or any valid Fastify + log level (`'trace'`, `'debug'`, `'info'`, `'warn'`, `'error'`, `'fatal'`). + Default: inherits Fastify’s global log level. + +#### :warning: DoS attacks + +Using `RegExp` or a `function` for the `origin` parameter may enable Denial of Service attacks. +Craft with extreme care. + +### Configuring CORS Asynchronously + +```js +const fastify = require('fastify')() + +fastify.register(require('@fastify/cors'), (instance) => { + return (req, callback) => { + const corsOptions = { + // This is NOT recommended for production as it enables reflection exploits + origin: true + }; + + // do not include CORS headers for requests from localhost + if (/^localhost$/m.test(req.headers.origin)) { + corsOptions.origin = false + } + + // callback expects two parameters: error and options + callback(null, corsOptions) + } +}) + +fastify.register(async function (fastify) { + fastify.get('/', (req, reply) => { + reply.send({ hello: 'world' }) + }) +}) + +fastify.listen({ port: 3000 }) +``` + +### Disabling CORS for a specific route + +CORS can be disabled at the route level by setting the `cors` option to `false`. + +```js +const fastify = require('fastify')() + +fastify.register(require('@fastify/cors'), { origin: '*' }) + +fastify.get('/cors-enabled', (_req, reply) => { + reply.send('CORS headers') +}) + +fastify.get('/cors-disabled', { cors: false }, (_req, reply) => { + reply.send('No CORS headers') +}) + +fastify.listen({ port: 3000 }) +``` + +### Custom Fastify hook name + +By default, `@fastify/cors` adds an `onRequest` hook for validation and header injection. This can be customized by passing `hook` in the options. Valid values are `onRequest`, `preParsing`, `preValidation`, `preHandler`, `preSerialization`, and `onSend`. + +```js +import Fastify from 'fastify' +import cors from '@fastify/cors' + +const fastify = Fastify() +await fastify.register(cors, { + hook: 'preHandler', +}) + +fastify.get('/', (req, reply) => { + reply.send({ hello: 'world' }) +}) + +await fastify.listen({ port: 3000 }) +``` + +To configure CORS asynchronously, provide an object with the `delegator` key: + +```js +const fastify = require('fastify')() + +fastify.register(require('@fastify/cors'), { + hook: 'preHandler', + delegator: (req, callback) => { + const corsOptions = { + // This is NOT recommended for production as it enables reflection exploits + origin: true + }; + + // do not include CORS headers for requests from localhost + if (/^localhost$/m.test(req.headers.origin)) { + corsOptions.origin = false + } + + // callback expects two parameters: error and options + callback(null, corsOptions) + }, +}) + +fastify.register(async function (fastify) { + fastify.get('/', (req, reply) => { + reply.send({ hello: 'world' }) + }) +}) + +fastify.listen({ port: 3000 }) +``` + +## Acknowledgments + +The code is a port for Fastify of [`expressjs/cors`](https://github.com/expressjs/cors). + +## License + +Licensed under [MIT](./LICENSE).
+[`expressjs/cors` license](https://github.com/expressjs/cors/blob/master/LICENSE) \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/eslint.config.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..89fd678fe2a82d7fe3be869fffd71b3631c61c6a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/eslint.config.js @@ -0,0 +1,6 @@ +'use strict' + +module.exports = require('neostandard')({ + ignores: require('neostandard').resolveIgnoresFromGitignore(), + ts: true +}) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/package.json new file mode 100644 index 0000000000000000000000000000000000000000..08be4c7c6f67d5a8a05fbe418c103f9afb330071 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/package.json @@ -0,0 +1,86 @@ +{ + "name": "@fastify/cors", + "version": "11.1.0", + "description": "Fastify CORS", + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "scripts": { + "lint": "eslint", + "lint:fix": "eslint --fix", + "test": "npm run test:unit && npm run test:typescript", + "test:typescript": "tsd", + "test:unit": "c8 --100 node --test" + }, + "keywords": [ + "fastify", + "cors", + "headers", + "access", + "control" + ], + "author": "Tomas Della Vedova - @delvedor (http://delved.org)", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Manuel Spigolon", + "email": "behemoth89@gmail.com" + }, + { + "name": "Cemre Mengu", + "email": "cemremengu@gmail.com" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + } + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/fastify-cors.git" + }, + "bugs": { + "url": "https://github.com/fastify/fastify-cors/issues" + }, + "homepage": "https://github.com/fastify/fastify-cors#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^24.0.8", + "c8": "^10.1.2", + "cors": "^2.8.5", + "eslint": "^9.17.0", + "fastify": "^5.0.0", + "neostandard": "^0.12.0", + "tsd": "^0.32.0", + "typescript": "~5.8.2" + }, + "dependencies": { + "fastify-plugin": "^5.0.0", + "toad-cache": "^3.7.0" + }, + "tsd": { + "directory": "test" + }, + "publishConfig": { + "access": "public" + }, + "pre-commit": [ + "lint", + "test" + ] +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/test/hooks.test.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/test/hooks.test.js new file mode 100644 index 0000000000000000000000000000000000000000..74ccf22592b1759ce552ded6861abe1366e8619e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/test/hooks.test.js @@ -0,0 +1,787 @@ +'use strict' + +const { test } = require('node:test') +const Fastify = require('fastify') +const kFastifyContext = require('fastify/lib/symbols').kRouteContext +const cors = require('..') +const { setTimeout: sleep } = require('node:timers/promises') + +test('Should error on invalid hook option', async (t) => { + t.plan(3) + + const fastify = Fastify() + await t.assert.rejects( + async () => fastify.register(cors, { hook: 'invalid' }), + (err) => { + t.assert.strictEqual(err.name, 'TypeError') + t.assert.strictEqual(err.message, '@fastify/cors: Invalid hook option provided.') + return true + } + ) +}) + +test('Should set hook onRequest if hook option is not set', async (t) => { + t.plan(10) + + const fastify = Fastify() + + fastify.register(cors) + + fastify.addHook('onResponse', (request, _reply, done) => { + t.assert.strictEqual(request[kFastifyContext].onError, null) + t.assert.strictEqual(request[kFastifyContext].onRequest.length, 1) + t.assert.strictEqual(request[kFastifyContext].onSend, null) + t.assert.strictEqual(request[kFastifyContext].preHandler, null) + t.assert.strictEqual(request[kFastifyContext].preParsing, null) + t.assert.strictEqual(request[kFastifyContext].preSerialization, null) + t.assert.strictEqual(request[kFastifyContext].preValidation, null) + done() + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + await fastify.ready() + + const res = await fastify.inject({ + method: 'GET', + url: '/' + }) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + const actualHeader = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'] + } + t.assert.deepStrictEqual(actualHeader, { + 'access-control-allow-origin': '*' + }) +}) + +test('Should set hook onRequest if hook option is set to onRequest', async (t) => { + t.plan(10) + + const fastify = Fastify() + + fastify.register(cors, { + hook: 'onRequest' + }) + + fastify.addHook('onResponse', (request, _reply, done) => { + t.assert.strictEqual(request[kFastifyContext].onError, null) + t.assert.strictEqual(request[kFastifyContext].onRequest.length, 1) + t.assert.strictEqual(request[kFastifyContext].onSend, null) + t.assert.strictEqual(request[kFastifyContext].preHandler, null) + t.assert.strictEqual(request[kFastifyContext].preParsing, null) + t.assert.strictEqual(request[kFastifyContext].preSerialization, null) + t.assert.strictEqual(request[kFastifyContext].preValidation, null) + done() + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + await fastify.ready() + + const res = await fastify.inject({ + method: 'GET', + url: '/' + }) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + const actualHeader = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'] + } + t.assert.deepStrictEqual(actualHeader, { + 'access-control-allow-origin': '*' + }) +}) + +test('Should set hook preParsing if hook option is set to preParsing', async (t) => { + t.plan(11) + + const fastify = Fastify() + + fastify.register(cors, { + hook: 'preParsing' + }) + + fastify.addHook('onResponse', (request, _reply, done) => { + t.assert.strictEqual(request[kFastifyContext].onError, null) + t.assert.strictEqual(request[kFastifyContext].onRequest, null) + t.assert.strictEqual(request[kFastifyContext].onSend, null) + t.assert.strictEqual(request[kFastifyContext].preHandler, null) + t.assert.strictEqual(request[kFastifyContext].preParsing.length, 1) + t.assert.strictEqual(request[kFastifyContext].preSerialization, null) + t.assert.strictEqual(request[kFastifyContext].preValidation, null) + done() + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + await fastify.ready() + + const res = await fastify.inject({ + method: 'GET', + url: '/' + }) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + const actualHeader = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'] + } + t.assert.deepStrictEqual(actualHeader, { + 'access-control-allow-origin': '*' + }) + t.assert.notStrictEqual(res.headers.vary, 'Origin') +}) + +test('Should set hook preValidation if hook option is set to preValidation', async (t) => { + t.plan(11) + + const fastify = Fastify() + + fastify.register(cors, { + hook: 'preValidation' + }) + + fastify.addHook('onResponse', (request, _reply, done) => { + t.assert.strictEqual(request[kFastifyContext].onError, null) + t.assert.strictEqual(request[kFastifyContext].onRequest, null) + t.assert.strictEqual(request[kFastifyContext].onSend, null) + t.assert.strictEqual(request[kFastifyContext].preHandler, null) + t.assert.strictEqual(request[kFastifyContext].preParsing, null) + t.assert.strictEqual(request[kFastifyContext].preSerialization, null) + t.assert.strictEqual(request[kFastifyContext].preValidation.length, 1) + done() + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + await fastify.ready() + + const res = await fastify.inject({ + method: 'GET', + url: '/' + }) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + const actualHeader = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'] + } + t.assert.deepStrictEqual(actualHeader, { + 'access-control-allow-origin': '*' + }) + t.assert.notStrictEqual(res.headers.vary, 'Origin') +}) + +test('Should set hook preParsing if hook option is set to preParsing', async (t) => { + t.plan(11) + + const fastify = Fastify() + + fastify.register(cors, { + hook: 'preParsing' + }) + + fastify.addHook('onResponse', (request, _reply, done) => { + t.assert.strictEqual(request[kFastifyContext].onError, null) + t.assert.strictEqual(request[kFastifyContext].onRequest, null) + t.assert.strictEqual(request[kFastifyContext].onSend, null) + t.assert.strictEqual(request[kFastifyContext].preHandler, null) + t.assert.strictEqual(request[kFastifyContext].preParsing.length, 1) + t.assert.strictEqual(request[kFastifyContext].preSerialization, null) + t.assert.strictEqual(request[kFastifyContext].preValidation, null) + done() + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + await fastify.ready() + + const res = await fastify.inject({ + method: 'GET', + url: '/' + }) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + const actualHeader = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'] + } + t.assert.deepStrictEqual(actualHeader, { + 'access-control-allow-origin': '*' + }) + t.assert.notStrictEqual(res.headers.vary, 'Origin') +}) + +test('Should set hook preHandler if hook option is set to preHandler', async (t) => { + t.plan(11) + + const fastify = Fastify() + + fastify.register(cors, { + hook: 'preHandler' + }) + + fastify.addHook('onResponse', (request, _reply, done) => { + t.assert.strictEqual(request[kFastifyContext].onError, null) + t.assert.strictEqual(request[kFastifyContext].onRequest, null) + t.assert.strictEqual(request[kFastifyContext].onSend, null) + t.assert.strictEqual(request[kFastifyContext].preHandler.length, 1) + t.assert.strictEqual(request[kFastifyContext].preParsing, null) + t.assert.strictEqual(request[kFastifyContext].preSerialization, null) + t.assert.strictEqual(request[kFastifyContext].preValidation, null) + done() + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + await fastify.ready() + + const res = await fastify.inject({ + method: 'GET', + url: '/' + }) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + const actualHeader = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'] + } + t.assert.deepStrictEqual(actualHeader, { + 'access-control-allow-origin': '*' + }) + t.assert.notStrictEqual(res.headers.vary, 'Origin') +}) + +test('Should set hook onSend if hook option is set to onSend', async (t) => { + t.plan(11) + + const fastify = Fastify() + + fastify.register(cors, { + hook: 'onSend' + }) + + fastify.addHook('onResponse', (request, _reply, done) => { + t.assert.strictEqual(request[kFastifyContext].onError, null) + t.assert.strictEqual(request[kFastifyContext].onRequest, null) + t.assert.strictEqual(request[kFastifyContext].onSend.length, 1) + t.assert.strictEqual(request[kFastifyContext].preHandler, null) + t.assert.strictEqual(request[kFastifyContext].preParsing, null) + t.assert.strictEqual(request[kFastifyContext].preSerialization, null) + t.assert.strictEqual(request[kFastifyContext].preValidation, null) + done() + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + await fastify.ready() + + const res = await fastify.inject({ + method: 'GET', + url: '/' + }) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + const actualHeader = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'] + } + t.assert.deepStrictEqual(actualHeader, { + 'access-control-allow-origin': '*' + }) + t.assert.notStrictEqual(res.headers.vary, 'Origin') +}) + +test('Should set hook preSerialization if hook option is set to preSerialization', async (t) => { + t.plan(11) + + const fastify = Fastify() + + fastify.register(cors, { + hook: 'preSerialization' + }) + + fastify.addHook('onResponse', (request, _reply, done) => { + t.assert.strictEqual(request[kFastifyContext].onError, null) + t.assert.strictEqual(request[kFastifyContext].onRequest, null) + t.assert.strictEqual(request[kFastifyContext].onSend, null) + t.assert.strictEqual(request[kFastifyContext].preHandler, null) + t.assert.strictEqual(request[kFastifyContext].preParsing, null) + t.assert.strictEqual(request[kFastifyContext].preSerialization.length, 1) + t.assert.strictEqual(request[kFastifyContext].preValidation, null) + done() + }) + + fastify.get('/', (_req, reply) => { + reply.send({ nonString: true }) + }) + + await fastify.ready() + + const res = await fastify.inject({ + method: 'GET', + url: '/' + }) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, '{"nonString":true}') + const actualHeader = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'] + } + t.assert.deepStrictEqual(actualHeader, { + 'access-control-allow-origin': '*' + }) + t.assert.notStrictEqual(res.headers.vary, 'Origin') +}) + +test('Should support custom hook with dynamic config', async t => { + t.plan(16) + + const configs = [{ + origin: 'example.com', + methods: 'GET', + credentials: true, + exposedHeaders: ['foo', 'bar'], + allowedHeaders: ['baz', 'woo'], + maxAge: 123 + }, { + origin: 'sample.com', + methods: 'GET', + credentials: true, + exposedHeaders: ['zoo', 'bar'], + allowedHeaders: ['baz', 'foo'], + maxAge: 321 + }] + + const fastify = Fastify() + let requestId = 0 + const configDelegation = async function (req) { + // request should have id + t.assert.ok(req.id) + // request should not have send + t.assert.ifError(req.send) + const config = configs[requestId] + requestId++ + if (config) { + return Promise.resolve(config) + } else { + return Promise.reject(new Error('ouch')) + } + } + await fastify.register(cors, { + hook: 'preHandler', + delegator: configDelegation + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + let res = await fastify.inject({ + method: 'GET', + url: '/' + }) + t.assert.ok(res) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + let actualHeaders = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'], + 'access-control-allow-credentials': res.headers['access-control-allow-credentials'], + 'access-control-expose-headers': res.headers['access-control-expose-headers'], + 'content-length': res.headers['content-length'], + vary: res.headers.vary + } + t.assert.deepStrictEqual(actualHeaders, { + 'access-control-allow-origin': 'example.com', + 'access-control-allow-credentials': 'true', + 'access-control-expose-headers': 'foo, bar', + 'content-length': '2', + vary: 'Origin' + }) + + res = await fastify.inject({ + method: 'OPTIONS', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }) + t.assert.ok(res) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 204) + t.assert.strictEqual(res.payload, '') + actualHeaders = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'], + 'access-control-allow-credentials': res.headers['access-control-allow-credentials'], + 'access-control-expose-headers': res.headers['access-control-expose-headers'], + 'access-control-allow-methods': res.headers['access-control-allow-methods'], + 'access-control-allow-headers': res.headers['access-control-allow-headers'], + 'access-control-max-age': res.headers['access-control-max-age'], + 'content-length': res.headers['content-length'], + vary: res.headers.vary + } + t.assert.deepStrictEqual(actualHeaders, { + 'access-control-allow-origin': 'sample.com', + 'access-control-allow-credentials': 'true', + 'access-control-expose-headers': 'zoo, bar', + 'access-control-allow-methods': 'GET', + 'access-control-allow-headers': 'baz, foo', + 'access-control-max-age': '321', + 'content-length': '0', + vary: 'Origin' + }) + + res = await fastify.inject({ + method: 'GET', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }) + t.assert.ok(res) + t.assert.strictEqual(res.statusCode, 500) +}) + +test('Should support custom hook with dynamic config (callback)', async t => { + t.plan(16) + + const configs = [{ + origin: 'example.com', + methods: 'GET', + credentials: true, + exposedHeaders: ['foo', 'bar'], + allowedHeaders: ['baz', 'woo'], + maxAge: 123 + }, { + origin: 'sample.com', + methods: 'GET', + credentials: true, + exposedHeaders: ['zoo', 'bar'], + allowedHeaders: ['baz', 'foo'], + maxAge: 321 + }] + + const fastify = Fastify() + let requestId = 0 + const configDelegation = function (req, cb) { + // request should have id + t.assert.ok(req.id) + // request should not have send + t.assert.ifError(req.send) + const config = configs[requestId] + requestId++ + if (config) { + cb(null, config) + } else { + cb(new Error('ouch')) + } + } + fastify.register(cors, { + hook: 'preParsing', + delegator: configDelegation + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + fastify.inject({ + method: 'GET', + url: '/' + }, (err, res) => { + t.assert.ifError(err) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + const actualHeaders = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'], + 'access-control-allow-credentials': res.headers['access-control-allow-credentials'], + 'access-control-expose-headers': res.headers['access-control-expose-headers'], + 'content-length': res.headers['content-length'], + vary: res.headers.vary + } + t.assert.deepStrictEqual(actualHeaders, { + 'access-control-allow-origin': 'example.com', + 'access-control-allow-credentials': 'true', + 'access-control-expose-headers': 'foo, bar', + 'content-length': '2', + vary: 'Origin' + }) + }) + + fastify.inject({ + method: 'OPTIONS', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }, (err, res) => { + t.assert.ifError(err) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 204) + t.assert.strictEqual(res.payload, '') + const actualHeaders = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'], + 'access-control-allow-credentials': res.headers['access-control-allow-credentials'], + 'access-control-expose-headers': res.headers['access-control-expose-headers'], + 'access-control-allow-methods': res.headers['access-control-allow-methods'], + 'access-control-allow-headers': res.headers['access-control-allow-headers'], + 'access-control-max-age': res.headers['access-control-max-age'], + 'content-length': res.headers['content-length'], + vary: res.headers.vary + } + t.assert.deepStrictEqual(actualHeaders, { + 'access-control-allow-origin': 'sample.com', + 'access-control-allow-credentials': 'true', + 'access-control-expose-headers': 'zoo, bar', + 'access-control-allow-methods': 'GET', + 'access-control-allow-headers': 'baz, foo', + 'access-control-max-age': '321', + 'content-length': '0', + vary: 'Origin' + }) + }) + + fastify.inject({ + method: 'GET', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }, (err, res) => { + t.assert.ifError(err) + t.assert.strictEqual(res.statusCode, 500) + }) + await sleep() +}) + +test('Should support custom hook with dynamic config (Promise)', async t => { + t.plan(16) + + const configs = [{ + origin: 'example.com', + methods: 'GET', + credentials: true, + exposedHeaders: ['foo', 'bar'], + allowedHeaders: ['baz', 'woo'], + maxAge: 123 + }, { + origin: 'sample.com', + methods: 'GET', + credentials: true, + exposedHeaders: ['zoo', 'bar'], + allowedHeaders: ['baz', 'foo'], + maxAge: 321 + }] + + const fastify = Fastify() + let requestId = 0 + const configDelegation = async function (req) { + // request should have id + t.assert.ok(req.id) + // request should not have send + t.assert.ifError(req.send) + const config = configs[requestId] + requestId++ + if (config) { + return Promise.resolve(config) + } else { + return Promise.reject(new Error('ouch')) + } + } + + await fastify.register(cors, { + hook: 'preParsing', + delegator: configDelegation + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + let res = await fastify.inject({ + method: 'GET', + url: '/' + }) + t.assert.ok(res) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 200) + t.assert.strictEqual(res.payload, 'ok') + let actualHeaders = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'], + 'access-control-allow-credentials': res.headers['access-control-allow-credentials'], + 'access-control-expose-headers': res.headers['access-control-expose-headers'], + 'content-length': res.headers['content-length'], + vary: res.headers.vary + } + + t.assert.deepStrictEqual(actualHeaders, { + 'access-control-allow-origin': 'example.com', + 'access-control-allow-credentials': 'true', + 'access-control-expose-headers': 'foo, bar', + 'content-length': '2', + vary: 'Origin' + }) + + res = await fastify.inject({ + method: 'OPTIONS', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }) + t.assert.ok(res) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 204) + t.assert.strictEqual(res.payload, '') + actualHeaders = { + 'access-control-allow-origin': res.headers['access-control-allow-origin'], + 'access-control-allow-credentials': res.headers['access-control-allow-credentials'], + 'access-control-expose-headers': res.headers['access-control-expose-headers'], + 'access-control-allow-methods': res.headers['access-control-allow-methods'], + 'access-control-allow-headers': res.headers['access-control-allow-headers'], + 'access-control-max-age': res.headers['access-control-max-age'], + 'content-length': res.headers['content-length'], + vary: res.headers.vary + } + t.assert.deepStrictEqual(actualHeaders, { + 'access-control-allow-origin': 'sample.com', + 'access-control-allow-credentials': 'true', + 'access-control-expose-headers': 'zoo, bar', + 'access-control-allow-methods': 'GET', + 'access-control-allow-headers': 'baz, foo', + 'access-control-max-age': '321', + 'content-length': '0', + vary: 'Origin' + }) + + res = await fastify.inject({ + method: 'GET', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }) + t.assert.ok(res) + t.assert.strictEqual(res.statusCode, 500) +}) + +test('Should support custom hook with dynamic config (Promise), but should error /1', async t => { + t.plan(6) + + const fastify = Fastify() + const configDelegation = function () { + return false + } + + await fastify.register(cors, { + hook: 'preParsing', + delegator: configDelegation + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + let res = await fastify.inject({ + method: 'OPTIONS', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }) + t.assert.ok(res) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 500) + t.assert.strictEqual(res.payload, '{"statusCode":500,"error":"Internal Server Error","message":"Invalid CORS origin option"}') + const actualHeaders = { + 'content-length': res.headers['content-length'] + } + t.assert.deepStrictEqual(actualHeaders, { + 'content-length': '89' + }) + + res = await fastify.inject({ + method: 'GET', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }) + t.assert.ok(res) + t.assert.strictEqual(res.statusCode, 500) +}) + +test('Should support custom hook with dynamic config (Promise), but should error /2', async t => { + t.plan(6) + + const fastify = Fastify() + const configDelegation = function () { + return false + } + + await fastify.register(cors, { + delegator: configDelegation + }) + + fastify.get('/', (_req, reply) => { + reply.send('ok') + }) + + let res = await fastify.inject({ + method: 'OPTIONS', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }) + t.assert.ok(res) + delete res.headers.date + t.assert.strictEqual(res.statusCode, 500) + t.assert.strictEqual(res.payload, '{"statusCode":500,"error":"Internal Server Error","message":"Invalid CORS origin option"}') + const actualHeaders = { + 'content-length': res.headers['content-length'] + } + t.assert.deepStrictEqual(actualHeaders, { + 'content-length': '89' + }) + + res = await fastify.inject({ + method: 'GET', + url: '/', + headers: { + 'access-control-request-method': 'GET', + origin: 'example.com' + } + }) + t.assert.ok(res) + t.assert.strictEqual(res.statusCode, 500) +}) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/vary.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/vary.js new file mode 100644 index 0000000000000000000000000000000000000000..73b3551e7071cd5decd34582f1c4b221216a37f2 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/cors/vary.js @@ -0,0 +1,116 @@ +'use strict' + +const { FifoMap: FifoCache } = require('toad-cache') + +/** + * Field Value Components + * Most HTTP header field values are defined using common syntax + * components (token, quoted-string, and comment) separated by + * whitespace or specific delimiting characters. Delimiters are chosen + * from the set of US-ASCII visual characters not allowed in a token + * (DQUOTE and "(),/:;<=>?@[\]{}"). + * + * field-name = token + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + * / DIGIT / ALPHA + * ; any VCHAR, except delimiters + * + * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6 + */ + +const validFieldnameRE = /^[!#$%&'*+\-.^\w`|~]+$/u +function validateFieldname (fieldname) { + if (validFieldnameRE.test(fieldname) === false) { + throw new TypeError('Fieldname contains invalid characters.') + } +} + +function parse (header) { + header = header.trim().toLowerCase() + const result = [] + + if (header.length === 0) { + // pass through + } else if (header.indexOf(',') === -1) { + result.push(header) + } else { + const il = header.length + let i = 0 + let pos = 0 + let char + + // tokenize the header + for (i; i < il; ++i) { + char = header[i] + // when we have whitespace set the pos to the next position + if (char === ' ') { + pos = i + 1 + // `,` is the separator of vary-values + } else if (char === ',') { + // if pos and current position are not the same we have a valid token + if (pos !== i) { + result.push(header.slice(pos, i)) + } + // reset the positions + pos = i + 1 + } + } + + if (pos !== i) { + result.push(header.slice(pos, i)) + } + } + + return result +} + +function createAddFieldnameToVary (fieldname) { + const headerCache = new FifoCache(1000) + + validateFieldname(fieldname) + + return function (reply) { + let header = reply.getHeader('Vary') + + if (!header) { + reply.header('Vary', fieldname) + return + } + + if (header === '*') { + return + } + + if (fieldname === '*') { + reply.header('Vary', '*') + return + } + + if (Array.isArray(header)) { + header = header.join(', ') + } + + if (headerCache.get(header) === undefined) { + const vals = parse(header) + + if (vals.indexOf('*') !== -1) { + headerCache.set(header, '*') + } else if (vals.indexOf(fieldname.toLowerCase()) === -1) { + headerCache.set(header, header + ', ' + fieldname) + } else { + headerCache.set(header, null) + } + } + const cached = headerCache.get(header) + if (cached !== null) { + reply.header('Vary', cached) + } + } +} + +module.exports.createAddFieldnameToVary = createAddFieldnameToVary +module.exports.addOriginToVaryHeader = createAddFieldnameToVary('Origin') +module.exports.addAccessControlRequestHeadersToVaryHeader = createAddFieldnameToVary('Access-Control-Request-Headers') +module.exports.parse = parse diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..08250b880441a047520f6d39ee6b08c6bcee2220 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Fastify + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/README.md new file mode 100644 index 0000000000000000000000000000000000000000..94814fe686890e199320bea2980fde24b2182d81 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/README.md @@ -0,0 +1,140 @@ +# @fastify/error + +[![CI](https://github.com/fastify/fastify-error/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fastify-error/actions/workflows/ci.yml) +[![NPM version](https://img.shields.io/npm/v/@fastify/error.svg?style=flat)](https://www.npmjs.com/package/@fastify/error) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins. + +### Install +``` +npm i @fastify/error +``` + +### Usage + +The module exports a function that you can use for consistent error objects, it takes 4 parameters: + +```js +createError(code, message [, statusCode [, Base [, captureStackTrace]]]) +``` + +- `code` (`string`, required) - The error code, you can access it later with `error.code`. For consistency, we recommend prefixing plugin error codes with `FST_` +- `message` (`string`, required) - The error message. You can also use interpolated strings for formatting the message. +- `statusCode` (`number`, optional) - The status code that Fastify will use if the error is sent via HTTP. +- `Base` (`ErrorConstructor`, optional) - The base error object that will be used. (eg `TypeError`, `RangeError`) +- `captureStackTrace` (`boolean`, optional) - Whether to capture the stack trace or not. + +```js +const createError = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello') +console.log(new CustomError()) // error.message => 'Hello' +``` + +How to use an interpolated string: +```js +const createError = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello %s') +console.log(new CustomError('world')) // error.message => 'Hello world' +``` + +How to add cause: +```js +const createError = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello %s') +console.log(new CustomError('world', {cause: new Error('cause')})) +// error.message => 'Hello world' +// error.cause => Error('cause') +``` + +### TypeScript + +It is possible to limit your error constructor with a generic type using TypeScript: + +```ts +const CustomError = createError<[string]>('ERROR_CODE', 'Hello %s') +new CustomError('world') +//@ts-expect-error +new CustomError(1) +``` + +### instanceof + +All errors created with `createError` will be instances of the base error constructor you provided, or `Error` if none was provided. + +```js +const createError = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError) +const customError = new CustomError('world') + +console.log(customError instanceof CustomError) // true +console.log(customError instanceof TypeError) // true +console.log(customError instanceof Error) // true +``` + +All instantiated errors are instances of the `FastifyError` class, which can be required directly from the module. + +```js +const { createError, FastifyError } = require('@fastify/error') +const CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError) +const customError = new CustomError('world') + +console.log(customError instanceof FastifyError) // true +``` + +A `FastifyError` created by `createError` can extend another `FastifyError` while maintaining correct `instanceof` behavior. + +```js +const { createError, FastifyError } = require('@fastify/error') + +const CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError) +const ChildCustomError = createError('CHILD_ERROR_CODE', 'Hello %s', 500, CustomError) + +const customError = new ChildCustomError('world') + +console.log(customError instanceof ChildCustomError) // true +console.log(customError instanceof CustomError) // true +console.log(customError instanceof FastifyError) // true +console.log(customError instanceof TypeError) // true +console.log(customError instanceof Error) // true +``` + +If `fastify-error` is installed multiple times directly or as a transitive dependency, `instanceof` checks for errors created by `createError` will still work correctly across these installations, as long as their error codes (e.g., `FST_ERR_CUSTOM_ERROR`) are identical. + +```js +const { createError, FastifyError } = require('@fastify/error') + +// CustomError from `@fastify/some-plugin` is created with `createError` and +// has its own `@fastify/error` installation as dependency. CustomError has +// FST_ERR_CUSTOM_ERROR as code. +const { CustomError: CustomErrorFromPlugin } = require('@fastify/some-plugin') + +const CustomError = createError('FST_ERR_CUSTOM_ERROR', 'Hello %s', 500) + +const customError = new CustomError('world') +const customErrorFromPlugin = new CustomErrorFromPlugin('world') + +console.log(customError instanceof CustomError) // true +console.log(customError instanceof CustomErrorFromPlugin) // true +console.log(customErrorFromPlugin instanceof CustomError) // true +console.log(customErrorFromPlugin instanceof CustomErrorFromPlugin) // true +``` + +Changing the code of an instantiated Error will not change the result of the `instanceof` operator. + +```js +const { createError, FastifyError } = require('@fastify/error') + +const CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError) +const AnotherCustomError = createError('ANOTHER_ERROR_CODE', 'Hello %s', 500, CustomError) + +const customError = new CustomError('world') +customError.code = 'ANOTHER_ERROR_CODE' + +console.log(customError instanceof CustomError) // true +console.log(customError instanceof AnotherCustomError) // false +``` + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/eslint.config.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..89fd678fe2a82d7fe3be869fffd71b3631c61c6a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/eslint.config.js @@ -0,0 +1,6 @@ +'use strict' + +module.exports = require('neostandard')({ + ignores: require('neostandard').resolveIgnoresFromGitignore(), + ts: true +}) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/index.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4d8da8e5e15cdf3f3457965067687c3c54a15b99 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/index.js @@ -0,0 +1,100 @@ +'use strict' + +const { format } = require('node:util') + +function toString () { + return `${this.name} [${this.code}]: ${this.message}` +} + +const FastifyGenericErrorSymbol = Symbol.for('fastify-error-generic') + +function createError (code, message, statusCode = 500, Base = Error, captureStackTrace = createError.captureStackTrace) { + const shouldCreateFastifyGenericError = code === FastifyGenericErrorSymbol + + if (shouldCreateFastifyGenericError) { + code = 'FST_ERR' + } + + if (!code) throw new Error('Fastify error code must not be empty') + if (!message) throw new Error('Fastify error message must not be empty') + + code = code.toUpperCase() + !statusCode && (statusCode = undefined) + + const FastifySpecificErrorSymbol = Symbol.for(`fastify-error ${code}`) + + function FastifyError (...args) { + if (!new.target) { + return new FastifyError(...args) + } + + this.code = code + this.name = 'FastifyError' + this.statusCode = statusCode + + const lastElement = args.length - 1 + if (lastElement !== -1 && args[lastElement] && typeof args[lastElement] === 'object' && 'cause' in args[lastElement]) { + this.cause = args.pop().cause + } + + this.message = format(message, ...args) + + Error.stackTraceLimit && captureStackTrace && Error.captureStackTrace(this, FastifyError) + } + + FastifyError.prototype = Object.create(Base.prototype, { + constructor: { + value: FastifyError, + enumerable: false, + writable: true, + configurable: true + }, + [FastifyGenericErrorSymbol]: { + value: true, + enumerable: false, + writable: false, + configurable: false + }, + [FastifySpecificErrorSymbol]: { + value: true, + enumerable: false, + writable: false, + configurable: false + } + }) + + if (shouldCreateFastifyGenericError) { + Object.defineProperty(FastifyError, Symbol.hasInstance, { + value (instance) { + return instance && instance[FastifyGenericErrorSymbol] + }, + configurable: false, + writable: false, + enumerable: false + }) + } else { + Object.defineProperty(FastifyError, Symbol.hasInstance, { + value (instance) { + return instance && instance[FastifySpecificErrorSymbol] + }, + configurable: false, + writable: false, + enumerable: false + }) + } + + FastifyError.prototype[Symbol.toStringTag] = 'Error' + + FastifyError.prototype.toString = toString + + return FastifyError +} + +createError.captureStackTrace = true + +const FastifyErrorConstructor = createError(FastifyGenericErrorSymbol, 'Fastify Error', 500, Error) + +module.exports = createError +module.exports.FastifyError = FastifyErrorConstructor +module.exports.default = createError +module.exports.createError = createError diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/test/index.test.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/test/index.test.js new file mode 100644 index 0000000000000000000000000000000000000000..3ad97f6d3941237231d553259daee284e7ca4596 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/error/test/index.test.js @@ -0,0 +1,232 @@ +'use strict' + +const test = require('node:test') +const { createError, FastifyError } = require('..') + +test('Create error with zero parameter', (t) => { + t.plan(6) + + const NewError = createError('CODE', 'Not available') + const err = new NewError() + t.assert.ok(err instanceof Error) + t.assert.equal(err.name, 'FastifyError') + t.assert.equal(err.message, 'Not available') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.ok(err.stack) +}) + +test('Create error with 1 parameter', (t) => { + t.plan(6) + + const NewError = createError('CODE', 'hey %s') + const err = new NewError('alice') + t.assert.equal(err.name, 'FastifyError') + t.assert.ok(err instanceof Error) + t.assert.equal(err.message, 'hey alice') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.ok(err.stack) +}) + +test('Create error with 1 parameter set to undefined', (t) => { + t.plan(1) + + const NewError = createError('CODE', 'hey %s') + const err = new NewError(undefined) + t.assert.equal(err.message, 'hey undefined') +}) + +test('Create error with 2 parameters', (t) => { + t.plan(6) + + const NewError = createError('CODE', 'hey %s, I like your %s') + const err = new NewError('alice', 'attitude') + t.assert.ok(err instanceof Error) + t.assert.equal(err.name, 'FastifyError') + t.assert.equal(err.message, 'hey alice, I like your attitude') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.ok(err.stack) +}) + +test('Create error with 2 parameters set to undefined', (t) => { + t.plan(1) + + const NewError = createError('CODE', 'hey %s, I like your %s') + const err = new NewError(undefined, undefined) + t.assert.equal(err.message, 'hey undefined, I like your undefined') +}) + +test('Create error with 3 parameters', (t) => { + t.plan(6) + + const NewError = createError('CODE', 'hey %s, I like your %s %s') + const err = new NewError('alice', 'attitude', 'see you') + t.assert.ok(err instanceof Error) + t.assert.equal(err.name, 'FastifyError') + t.assert.equal(err.message, 'hey alice, I like your attitude see you') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.ok(err.stack) +}) + +test('Create error with 3 parameters set to undefined', (t) => { + t.plan(4) + + const NewError = createError('CODE', 'hey %s, I like your %s %s') + const err = new NewError(undefined, undefined, undefined) + t.assert.equal(err.message, 'hey undefined, I like your undefined undefined') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.ok(err.stack) +}) + +test('Create error with 4 parameters set to undefined', (t) => { + t.plan(4) + + const NewError = createError('CODE', 'hey %s, I like your %s %s and %s') + const err = new NewError(undefined, undefined, undefined, undefined) + t.assert.equal( + err.message, + 'hey undefined, I like your undefined undefined and undefined' + ) + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.ok(err.stack) +}) + +test('Create error with no statusCode property', (t) => { + t.plan(6) + + const NewError = createError('CODE', 'hey %s', 0) + const err = new NewError('dude') + t.assert.ok(err instanceof Error) + t.assert.equal(err.name, 'FastifyError') + t.assert.equal(err.message, 'hey dude') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, undefined) + t.assert.ok(err.stack) +}) + +test('Should throw when error code has no fastify code', (t) => { + t.plan(1) + t.assert.throws( + () => createError(), + new Error('Fastify error code must not be empty') + ) +}) + +test('Should throw when error code has no message', (t) => { + t.assert.throws( + () => createError('code'), + new Error('Fastify error message must not be empty') + ) +}) + +test('Create error with different base', (t) => { + t.plan(7) + + const NewError = createError('CODE', 'hey %s', 500, TypeError) + const err = new NewError('dude') + t.assert.ok(err instanceof Error) + t.assert.ok(err instanceof TypeError) + t.assert.equal(err.name, 'FastifyError') + t.assert.equal(err.message, 'hey dude') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.ok(err.stack) +}) + +test('Create error with different base (no stack) (global)', (t) => { + t.plan(7) + + createError.captureStackTrace = false + const NewError = createError('CODE', 'hey %s', 500, TypeError) + const err = new NewError('dude') + t.assert.ok(err instanceof Error) + t.assert.ok(err instanceof TypeError) + t.assert.equal(err.name, 'FastifyError') + t.assert.equal(err.message, 'hey dude') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.equal(err.stack, undefined) + createError.captureStackTrace = true +}) + +test('Create error with different base (no stack) (parameter)', (t) => { + t.plan(7) + + const NewError = createError('CODE', 'hey %s', 500, TypeError, false) + const err = new NewError('dude') + t.assert.ok(err instanceof Error) + t.assert.ok(err instanceof TypeError) + t.assert.equal(err.name, 'FastifyError') + t.assert.equal(err.message, 'hey dude') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.equal(err.stack, undefined) +}) + +test('FastifyError.toString returns code', (t) => { + t.plan(1) + + const NewError = createError('CODE', 'foo') + const err = new NewError() + t.assert.equal(err.toString(), 'FastifyError [CODE]: foo') +}) + +test('Create the error without the new keyword', (t) => { + t.plan(6) + + const NewError = createError('CODE', 'Not available') + const err = NewError() + t.assert.ok(err instanceof Error) + t.assert.equal(err.name, 'FastifyError') + t.assert.equal(err.message, 'Not available') + t.assert.equal(err.code, 'CODE') + t.assert.equal(err.statusCode, 500) + t.assert.ok(err.stack) +}) + +test('Create an error with cause', (t) => { + t.plan(2) + + const cause = new Error('HEY') + const NewError = createError('CODE', 'Not available') + const err = NewError({ cause }) + + t.assert.ok(err instanceof Error) + t.assert.equal(err.cause, cause) +}) + +test('Create an error with cause and message', (t) => { + t.plan(2) + + const cause = new Error('HEY') + const NewError = createError('CODE', 'Not available: %s') + const err = NewError('foo', { cause }) + + t.assert.ok(err instanceof Error) + t.assert.equal(err.cause, cause) +}) + +test('Create an error with last argument null', (t) => { + t.plan(2) + + const cause = new Error('HEY') + const NewError = createError('CODE', 'Not available') + const err = NewError({ cause }, null) + + t.assert.ok(err instanceof Error) + t.assert.ifError(err.cause) +}) + +test('check if FastifyError is instantiable', (t) => { + t.plan(2) + + const err = new FastifyError() + + t.assert.ok(err instanceof FastifyError) + t.assert.ok(err instanceof Error) +}) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5559f4f5474ede095fe90f128023a7c9dfeb75bc --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Fastify + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/eslint.config.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..89fd678fe2a82d7fe3be869fffd71b3631c61c6a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/fast-json-stringify-compiler/eslint.config.js @@ -0,0 +1,6 @@ +'use strict' + +module.exports = require('neostandard')({ + ignores: require('neostandard').resolveIgnoresFromGitignore(), + ts: true +}) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/forwarded/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/forwarded/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3995c93ffd32b04d12a1d525a4ef17d4836e254a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/forwarded/README.md @@ -0,0 +1,43 @@ +# @fastify/forwarded + +![CI](https://github.com/fastify/forwarded/workflows/CI/badge.svg) +[![NPM version](https://img.shields.io/npm/v/@fastify/forwarded.svg?style=flat)](https://www.npmjs.com/package/@fastify/forwarded) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) + +Parse HTTP X-Forwarded-For header. + +Updated version of the great https://github.com/jshttp/forwarded. +Implements https://github.com/jshttp/forwarded/pull/9. + +## Installation + +```sh +$ npm i @fastify/forwarded +``` + +## API + +```js +var forwarded = require('@fastify/forwarded') +``` + +### forwarded(req) + +```js +var addresses = forwarded(req) +``` + +Parse the `X-Forwarded-For` header from the request. Returns an array +of the addresses, including the socket address for the `req`, in reverse +order (i.e. index `0` is the socket address and the last index is the +furthest address, typically the end-user). + +## Testing + +```sh +$ npm test +``` + +## License + +[MIT](LICENSE) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/forwarded/index.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/forwarded/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9b7285faefaf81c8d1e2bba35d91bff5147a467f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/forwarded/index.js @@ -0,0 +1,59 @@ +/*! + * forwarded + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Get all addresses in the request used in the `X-Forwarded-For` header. + */ +function forwarded (req) { + if (!req) { + throw new TypeError('argument req is required') + } + + const header = req.headers['x-forwarded-for'] + const socketAddr = req.socket.remoteAddress + + if (!header || typeof header !== 'string') { + return [socketAddr] + } else if (header.indexOf(',') === -1) { + const remote = header.trim() + return (remote.length) + ? [socketAddr, remote] + : [socketAddr] + } else { + return parse(header, socketAddr) + } +} + +function parse (header, socketAddr) { + const result = [socketAddr] + + let end = header.length + let start = end + let char + let i + + for (i = end - 1; i >= 0; --i) { + char = header[i] + if (char === ' ') { + (start === end) && (start = end = i) + } else if (char === ',') { + (start !== end) && result.push(header.slice(start, end)) + start = end = i + } else { + start = i + } + } + + (start !== end) && result.push(header.substring(start, end)) + + return result +} + +module.exports = forwarded +module.exports.default = forwarded +module.exports.forwarded = forwarded diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/merge-json-schemas/.gitattributes b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/merge-json-schemas/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..83beb313de2ba032f48fb415afbdb1e9d22536b9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/merge-json-schemas/.gitattributes @@ -0,0 +1,2 @@ +# Set default behavior to automatically convert line endings +* text=auto eol=lf \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/merge-json-schemas/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/merge-json-schemas/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b5120cc41f416187f92770881b5822535be4cc90 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/merge-json-schemas/README.md @@ -0,0 +1,119 @@ +# @fastify/merge-json-schemas + +[![CI](https://github.com/fastify/merge-json-schemas/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/merge-json-schemas/actions/workflows/ci.yml) +[![npm version](https://img.shields.io/npm/v/@fastify/merge-json-schemas)](https://www.npmjs.com/package/@fastify/merge-json-schemas) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) + +__merge-json-schemas__ is a JavaScript library that builds a logical product (AND) for multiple [JSON schemas](https://json-schema.org/draft/2020-12/json-schema-core#name-introduction). + +- [Installation](#installation) +- [Usage](#usage) +- [API](#api) + - [mergeSchemas(schemas, options)](#mergeschemasschemas-options) + - [resolvers](#resolvers) + - [defaultResolver](#defaultresolver) +- [License](#license) + + + +## Installation + +```bash +npm i @fastify/merge-json-schemas +``` + + + +## Usage + +```javascript +const assert = require('node:assert') +const { mergeSchemas } = require('@fastify/merge-json-schemas'); + +const schema1 = { + $id: 'schema1', + type: 'object', + properties: { + foo: { type: 'string', enum: ['foo1', 'foo2'] }, + bar: { type: 'string', minLength: 3 } + } +} + +const schema2 = { + $id: 'schema1', + type: 'object', + properties: { + foo: { type: 'string', enum: ['foo1', 'foo3'] }, + bar: { type: 'string', minLength: 5 } + }, + required: ['foo'] +} + +const mergedSchema = mergeSchemas([schema1, schema2]) +assert.deepStrictEqual(mergedSchema, { + $id: 'schema1', + type: 'object', + properties: { + foo: { type: 'string', enum: ['foo1'] }, + bar: { type: 'string', minLength: 5 } + }, + required: ['foo'] +}) +``` + + + +## API + + + +#### mergeSchemas(schemas, options) + +Builds a logical conjunction (AND) of multiple [JSON schemas](https://json-schema.org/draft/2020-12/json-schema-core#name-introduction). + +- `schemas` __\__ - list of JSON schemas to merge +- `options` __\__ - optional options + - `resolvers` __\__ - custom resolvers for JSON schema keywords. Each key is the name of a JSON schema keyword. Each value is a resolver function. See [keywordResolver](#keywordresolver-keyword-values-mergedschema-parentschemas-options) + - `defaultResolver` __\__ - custom default resolver for JSON schema keywords. See [keywordResolver](#keywordresolver-keyword-values-mergedschema-parentschemas-options) + - `onConflict` __\__ - action to take when a conflict is found. Used by the default `defaultResolver`. Default is `throw`. Possible values are: + - `throw` - throws an error multiple different schemas for the same keyword are found + - `ignore` - do nothing if multiple different schemas for the same keyword are found + - `first` - use the value of the first schema if multiple different schemas for the same keyword are found + +#### resolvers + +A list of default resolvers that __merge-json-schema__ uses to merge JSON schemas. You can override the default resolvers by passing a list of custom resolvers in the `options` argument of `mergeSchemas`. See [keywordResolver](#keywordresolver-keyword-values-mergedschema-parentschemas-options). + +#### defaultResolver + +A default resolver that __merge-json-schema__ uses to merge JSON schemas. Default resolver is used when no custom resolver is defined for a JSON schema keyword. By default, the default resolver works as follows: + +- If only one schema contains the keyword, the value of the keyword is used as the merged value +- If multiple schemas contain the exact same value for the keyword, the value of the keyword is used as the merged value +- If multiple schemas contain different values for the keyword, it throws an error + +#### keywordResolver (keyword, values, mergedSchema, parentSchemas, options) + +__merge-json-schema__ uses a set of resolvers to merge JSON schemas. Each resolver is associated with a JSON schema keyword. The resolver is called when the keyword is found in the schemas to merge. The resolver is called with the following arguments: + +- `keyword` __\__ - the name of the keyword to merge +- `values` __\__ - the values of the keyword to merge. The length of the array is equal to the number of schemas to merge. If a schema does not contain the keyword, the value is `undefined` +- `mergedSchema` __\__ - an instance of the merged schema +- `parentSchemas` __\__ - the list of parent schemas +- `options` __\__ - the options passed to `mergeSchemas` + +The resolver must set the merged value of the `keyword` in the `mergedSchema` object. + +__Example:__ resolver for the `minNumber` keyword. + +```javascript +function minNumberResolver (keyword, values, mergedSchema) { + mergedSchema[keyword] = Math.min(...values) +} +``` + + + +## License + +Licensed under [MIT](./LICENSE). diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/merge-json-schemas/eslint.config.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/merge-json-schemas/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..89fd678fe2a82d7fe3be869fffd71b3631c61c6a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/merge-json-schemas/eslint.config.js @@ -0,0 +1,6 @@ +'use strict' + +module.exports = require('neostandard')({ + ignores: require('neostandard').resolveIgnoresFromGitignore(), + ts: true +}) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/proxy-addr/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/proxy-addr/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4b53c0a880c5b1d91329709079fc422e8f859ad0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/proxy-addr/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2021 Fastify collaborators +Copyright (c) 2014-2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/send/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/send/package.json new file mode 100644 index 0000000000000000000000000000000000000000..32e32405dd9c58ef4c1671534fdfbb17fc5ee83a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/send/package.json @@ -0,0 +1,81 @@ +{ + "name": "@fastify/send", + "description": "Better streaming static file server with Range and conditional-GET support", + "version": "4.1.0", + "author": "TJ Holowaychuk ", + "contributors": [ + "Douglas Christopher Wilson ", + "James Wyatt Cready ", + "Jesús Leganés Combarro ", + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com" + } + ], + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/send.git" + }, + "bugs": { + "url": "https://github.com/fastify/send/issues" + }, + "homepage": "https://github.com/fastify/send#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "keywords": [ + "static", + "file", + "server" + ], + "dependencies": { + "@lukeed/ms": "^2.0.2", + "escape-html": "~1.0.3", + "fast-decode-uri-component": "^1.0.1", + "http-errors": "^2.0.0", + "mime": "^3" + }, + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^22.0.0", + "after": "0.8.2", + "benchmark": "^2.1.4", + "c8": "^10.1.3", + "eslint": "^9.17.0", + "neostandard": "^0.12.0", + "supertest": "6.3.4", + "tsd": "^0.32.0" + }, + "scripts": { + "lint": "eslint", + "lint:fix": "eslint --fix", + "test": "npm run test:unit && npm run test:typescript", + "test:coverage": "c8 --reporter html node --test", + "test:typescript": "tsd", + "test:unit": "c8 --100 node --test" + }, + "pre-commit": [ + "lint", + "test" + ] +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/static/.gitattributes b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/static/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..cad1c32e3deb59f649a90fb55994a7c6a0685f64 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/static/.gitattributes @@ -0,0 +1,5 @@ +# Set the default behavior, in case people don't have core.autocrlf set +* text=auto + +# Require Unix line endings +* text eol=lf diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/static/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/static/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1855675df826d198f5b002c0317c429ba30df997 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@fastify/static/package.json @@ -0,0 +1,88 @@ +{ + "name": "@fastify/static", + "version": "8.2.0", + "description": "Plugin for serving static files as fast as possible.", + "main": "index.js", + "type": "commonjs", + "types": "types/index.d.ts", + "scripts": { + "coverage": "c8 --reporter html borp --coverage --check-coverage --lines 100", + "lint": "eslint", + "lint:fix": "eslint --fix", + "test": "npm run test:unit && npm run test:typescript", + "test:typescript": "tsd", + "test:unit": "borp -C --check-coverage --lines 100", + "example": "node example/server.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/fastify-static.git" + }, + "keywords": [ + "fastify", + "static" + ], + "author": "Tommaso Allevi - @allevo", + "contributors": [ + { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + { + "name": "Manuel Spigolon", + "email": "behemoth89@gmail.com" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com" + }, + { + "name": "Frazer Smith", + "email": "frazer.dev@icloud.com", + "url": "https://github.com/fdawgs" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fastify/fastify-static/issues" + }, + "homepage": "https://github.com/fastify/fastify-static", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "dependencies": { + "@fastify/accept-negotiator": "^2.0.0", + "@fastify/send": "^4.0.0", + "content-disposition": "^0.5.4", + "fastify-plugin": "^5.0.0", + "fastq": "^1.17.1", + "glob": "^11.0.0" + }, + "devDependencies": { + "@fastify/compress": "^8.0.0", + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^22.0.0", + "borp": "^0.20.0", + "c8": "^10.1.3", + "concat-stream": "^2.0.0", + "eslint": "^9.17.0", + "fastify": "^5.1.0", + "neostandard": "^0.12.0", + "pino": "^9.1.0", + "proxyquire": "^2.1.3", + "tsd": "^0.32.0" + }, + "tsd": { + "directory": "test/types" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/agent-base/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/agent-base/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..008728cb51847dcff9c68cf1d9c30d76b9323457 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/agent-base/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/agent-base/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/agent-base/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b8a86b9d380448dd0527e6b5e7187f26fd8d414b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/agent-base/README.md @@ -0,0 +1,69 @@ +agent-base +========== +### Turn a function into an [`http.Agent`][http.Agent] instance + +This module is a thin wrapper around the base `http.Agent` class. + +It provides an abstract class that must define a `connect()` function, +which is responsible for creating the underlying socket that the HTTP +client requests will use. + +The `connect()` function may return an arbitrary `Duplex` stream, or +another `http.Agent` instance to delegate the request to, and may be +asynchronous (by defining an `async` function). + +Instances of this agent can be used with the `http` and `https` +modules. To differentiate, the options parameter in the `connect()` +function includes a `secureEndpoint` property, which can be checked +to determine what type of socket should be returned. + +#### Some subclasses: + +Here are some more interesting uses of `agent-base`. +Send a pull request to list yours! + + * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints + * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints + * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS + * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS + +Example +------- + +Here's a minimal example that creates a new `net.Socket` or `tls.Socket` +based on the `secureEndpoint` property. This agent can be used with both +the `http` and `https` modules. + +```ts +import * as net from 'net'; +import * as tls from 'tls'; +import * as http from 'http'; +import { Agent } from 'agent-base'; + +class MyAgent extends Agent { + connect(req, opts) { + // `secureEndpoint` is true when using the "https" module + if (opts.secureEndpoint) { + return tls.connect(opts); + } else { + return net.connect(opts); + } + } +}); + +// Keep alive enabled means that `connect()` will only be +// invoked when a new connection needs to be created +const agent = new MyAgent({ keepAlive: true }); + +// Pass the `agent` option when creating the HTTP request +http.get('http://nodejs.org/api/', { agent }, (res) => { + console.log('"response" event!', res.headers); + res.pipe(process.stdout); +}); +``` + +[http-proxy-agent]: ../http-proxy-agent +[https-proxy-agent]: ../https-proxy-agent +[pac-proxy-agent]: ../pac-proxy-agent +[socks-proxy-agent]: ../socks-proxy-agent +[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/agent-base/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/agent-base/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1b4964a83f66fddca33294c61829dcd7fb4c7d49 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/agent-base/package.json @@ -0,0 +1,46 @@ +{ + "name": "agent-base", + "version": "7.1.4", + "description": "Turn a function into an `http.Agent` instance", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], + "repository": { + "type": "git", + "url": "https://github.com/TooTallNate/proxy-agents.git", + "directory": "packages/agent-base" + }, + "keywords": [ + "http", + "agent", + "base", + "barebones", + "https" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "devDependencies": { + "@types/debug": "^4.1.7", + "@types/jest": "^29.5.1", + "@types/node": "^14.18.45", + "@types/semver": "^7.3.13", + "@types/ws": "^6.0.4", + "async-listen": "^3.0.0", + "jest": "^29.5.0", + "ts-jest": "^29.1.0", + "typescript": "^5.0.4", + "ws": "^5.2.4", + "tsconfig": "0.0.0" + }, + "engines": { + "node": ">= 14" + }, + "scripts": { + "build": "tsc", + "test": "jest --env node --verbose --bail", + "lint": "eslint . --ext .ts", + "pack": "node ../../scripts/pack.mjs" + } +} \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ajv-formats/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ajv-formats/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b4264cd6f86fdd2f34c28de82ebec5756955c18d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ajv-formats/README.md @@ -0,0 +1,125 @@ +# ajv-formats + +JSON Schema formats for Ajv + +[![Build Status](https://travis-ci.org/ajv-validator/ajv-formats.svg?branch=master)](https://travis-ci.org/ajv-validator/ajv-formats) +[![npm](https://img.shields.io/npm/v/ajv-formats.svg)](https://www.npmjs.com/package/ajv-formats) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) +[![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin) + +## Usage + +```javascript +// ESM/TypeScript import +import Ajv from "ajv" +import addFormats from "ajv-formats" +// Node.js require: +const Ajv = require("ajv") +const addFormats = require("ajv-formats") + +const ajv = new Ajv() +addFormats(ajv) +``` + +## Formats + +The package defines these formats: + +- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). +- _time_: time (time-zone is mandatory). +- _date-time_: date-time (time-zone is mandatory). +- _iso-time_: time with optional time-zone. +- _iso-date-time_: date-time with optional time-zone. +- _duration_: duration from [RFC3339](https://tools.ietf.org/html/rfc3339#appendix-A) +- _uri_: full URI. +- _uri-reference_: URI reference, including full and relative URIs. +- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) +- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url). +- _email_: email address. +- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). +- _ipv4_: IP address v4. +- _ipv6_: IP address v6. +- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. +- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). +- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). +- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). +- _byte_: base64 encoded data according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types) +- _int32_: signed 32 bits integer according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types) +- _int64_: signed 64 bits according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types) +- _float_: float according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types) +- _double_: double according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types) +- _password_: password string according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types) +- _binary_: binary string according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types) + +See regular expressions used for format validation and the sources that were used in [formats.ts](https://github.com/ajv-validator/ajv-formats/blob/master/src/formats.ts). + +**Please note**: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. These formats are available in [ajv-formats-draft2019](https://github.com/luzlab/ajv-formats-draft2019) plugin. + +## Keywords to compare values: `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` + +These keywords allow to define minimum/maximum constraints when the format keyword defines ordering (`compare` function in format definition). + +These keywords are added to ajv instance when ajv-formats is used without options or with option `keywords: true`. + +These keywords apply only to strings. If the data is not a string, the validation succeeds. + +The value of keywords `formatMaximum`/`formatMinimum` and `formatExclusiveMaximum`/`formatExclusiveMinimum` should be a string or [\$data reference](https://github.com/ajv-validator/ajv/blob/master/docs/validation.md#data-reference). This value is the maximum (minimum) allowed value for the data to be valid as determined by `format` keyword. If `format` keyword is not present schema compilation will throw exception. + +When these keyword are added, they also add comparison functions to formats `"date"`, `"time"` and `"date-time"`. User-defined formats also can have comparison functions. See [addFormat](https://github.com/ajv-validator/ajv/blob/master/docs/api.md#api-addformat) method. + +```javascript +require("ajv-formats")(ajv) + +const schema = { + type: "string", + format: "date", + formatMinimum: "2016-02-06", + formatExclusiveMaximum: "2016-12-27", +} + +const validDataList = ["2016-02-06", "2016-12-26"] + +const invalidDataList = ["2016-02-05", "2016-12-27", "abc"] +``` + +## Options + +Options can be passed via the second parameter. Options value can be + +1. The list of format names that will be added to ajv instance: + +```javascript +addFormats(ajv, ["date", "time"]) +``` + +**Please note**: when ajv encounters an undefined format it throws exception (unless ajv instance was configured with `strict: false` option). To allow specific undefined formats they have to be passed to ajv instance via `formats` option with `true` value: + +```javascript +const ajv = new Ajv((formats: {date: true, time: true})) // to ignore "date" and "time" formats in schemas. +``` + +2. Format validation mode (default is `"full"`) with optional list of format names and `keywords` option to add additional format comparison keywords: + +```javascript +addFormats(ajv, {mode: "fast"}) +``` + +or + +```javascript +addFormats(ajv, {mode: "fast", formats: ["date", "time"], keywords: true}) +``` + +In `"fast"` mode the following formats are simplified: `"date"`, `"time"`, `"date-time"`, `"iso-time"`, `"iso-date-time"`, `"uri"`, `"uri-reference"`, `"email"`. For example, `"date"`, `"time"` and `"date-time"` do not validate ranges in `"fast"` mode, only string structure, and other formats have simplified regular expressions. + +## Tests + +```bash +npm install +git submodule update --init +npm test +``` + +## License + +[MIT](https://github.com/ajv-validator/ajv-formats/blob/master/LICENSE) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ajv/.runkit_example.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ajv/.runkit_example.js new file mode 100644 index 0000000000000000000000000000000000000000..0d578d5d51e51a3e03b8a69f0eea05c3a3d8913a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ajv/.runkit_example.js @@ -0,0 +1,23 @@ +const Ajv = require("ajv") +const ajv = new Ajv({allErrors: true}) + +const schema = { + type: "object", + properties: { + foo: {type: "string"}, + bar: {type: "number", maximum: 3}, + }, + required: ["foo", "bar"], + additionalProperties: false, +} + +const validate = ajv.compile(schema) + +test({foo: "abc", bar: 2}) +test({foo: 2, bar: 4}) + +function test(data) { + const valid = validate(data) + if (valid) console.log("Valid!") + else console.log("Invalid: " + ajv.errorsText(validate.errors)) +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ajv/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ajv/package.json new file mode 100644 index 0000000000000000000000000000000000000000..17df7b147360abe613db76d26e15331360d9433b --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ajv/package.json @@ -0,0 +1,126 @@ +{ + "name": "ajv", + "version": "8.17.1", + "description": "Another JSON Schema Validator", + "main": "dist/ajv.js", + "types": "dist/ajv.d.ts", + "files": [ + "lib/", + "dist/", + ".runkit_example.js" + ], + "scripts": { + "eslint": "eslint \"lib/**/*.ts\" \"spec/**/*.*s\" --ignore-pattern spec/JSON-Schema-Test-Suite", + "prettier:write": "prettier --write \"./**/*.{json,yaml,js,ts}\"", + "prettier:check": "prettier --list-different \"./**/*.{json,yaml,js,ts}\"", + "test-spec": "cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register \"spec/**/*.spec.{ts,js}\" -R dot", + "test-codegen": "nyc cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register 'spec/codegen.spec.ts' -R spec", + "test-debug": "npm run test-spec -- --inspect-brk", + "test-cov": "nyc npm run test-spec", + "rollup": "rm -rf bundle && rollup -c", + "bundle": "rm -rf bundle && node ./scripts/bundle.js ajv ajv7 ajv7 && node ./scripts/bundle.js 2019 ajv2019 ajv2019 && node ./scripts/bundle.js 2020 ajv2020 ajv2020 && node ./scripts/bundle.js jtd ajvJTD ajvJTD", + "build": "rm -rf dist && tsc && cp -r lib/refs dist && rm dist/refs/json-schema-2019-09/index.ts && rm dist/refs/json-schema-2020-12/index.ts && rm dist/refs/jtd-schema.ts", + "json-tests": "rm -rf spec/_json/*.js && node scripts/jsontests", + "test-karma": "karma start", + "test-browser": "rm -rf .browser && npm run bundle && scripts/prepare-tests && karma start", + "test-all": "npm run test-cov && if-node-version 12 npm run test-browser", + "test": "npm run json-tests && npm run prettier:check && npm run eslint && npm link && npm link --legacy-peer-deps ajv && npm run test-cov", + "test-ci": "AJV_FULL_TEST=true npm test", + "prepublish": "npm run build", + "benchmark": "npm i && npm run build && npm link && cd ./benchmark && npm link --legacy-peer-deps ajv && npm i && node ./jtd", + "docs:dev": "./scripts/prepare-site && vuepress dev docs", + "docs:build": "./scripts/prepare-site && vuepress build docs" + }, + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "repository": "ajv-validator/ajv", + "keywords": [ + "JSON", + "schema", + "validator", + "validation", + "jsonschema", + "json-schema", + "json-schema-validator", + "json-schema-validation" + ], + "author": "Evgeny Poberezkin", + "license": "MIT", + "bugs": "https://github.com/ajv-validator/ajv/issues", + "homepage": "https://ajv.js.org", + "runkitExampleFilename": ".runkit_example.js", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "devDependencies": { + "@ajv-validator/config": "^0.5.0", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-typescript": "^11.1.6", + "@types/chai": "^4.3.11", + "@types/mocha": "^10.0.6", + "@types/node": "^20.11.30", + "@types/require-from-string": "^1.2.3", + "@typescript-eslint/eslint-plugin": "^7.3.1", + "@typescript-eslint/parser": "^7.3.1", + "ajv-formats": "^3.0.1", + "browserify": "^17.0.0", + "chai": "^4.4.1", + "cross-env": "^7.0.3", + "dayjs": "^1.11.10", + "dayjs-plugin-utc": "^0.1.2", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "glob": "^10.3.10", + "husky": "^9.0.11", + "if-node-version": "^1.1.1", + "jimp": "^0.22.10", + "js-beautify": "^1.15.1", + "json-schema-test": "^2.0.0", + "karma": "^6.4.2", + "karma-chrome-launcher": "^3.2.0", + "karma-mocha": "^2.0.1", + "lint-staged": "^15.2.2", + "mocha": "^10.3.0", + "module-from-string": "^3.3.0", + "node-fetch": "^3.3.2", + "nyc": "^15.1.0", + "prettier": "3.0.3", + "re2": "^1.20.9", + "rollup": "^2.79.1", + "rollup-plugin-terser": "^7.0.2", + "ts-node": "^10.9.2", + "tsify": "^5.0.4", + "typescript": "5.3.3", + "uri-js": "^4.4.1" + }, + "collective": { + "type": "opencollective", + "url": "https://opencollective.com/ajv" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + }, + "prettier": "@ajv-validator/config/prettierrc.json", + "husky": { + "hooks": { + "pre-commit": "lint-staged && npm test" + } + }, + "lint-staged": { + "*.{json,yaml,js,ts}": "prettier --write" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ansi-styles/index.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ansi-styles/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d7bede44b7b6ba5551d929441ca1b832b599ce4f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ansi-styles/index.js @@ -0,0 +1,223 @@ +const ANSI_BACKGROUND_OFFSET = 10; + +const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`; + +const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`; + +const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`; + +const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + overline: [53, 55], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29], + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + gray: [90, 39], // Alias of `blackBright` + grey: [90, 39], // Alias of `blackBright` + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39], + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgGray: [100, 49], // Alias of `bgBlackBright` + bgGrey: [100, 49], // Alias of `bgBlackBright` + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49], + }, +}; + +export const modifierNames = Object.keys(styles.modifier); +export const foregroundColorNames = Object.keys(styles.color); +export const backgroundColorNames = Object.keys(styles.bgColor); +export const colorNames = [...foregroundColorNames, ...backgroundColorNames]; + +function assembleStyles() { + const codes = new Map(); + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m`, + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false, + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false, + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = wrapAnsi16(); + styles.color.ansi256 = wrapAnsi256(); + styles.color.ansi16m = wrapAnsi16m(); + styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); + + // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js + Object.defineProperties(styles, { + rgbToAnsi256: { + value: (red, green, blue) => { + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (red === green && green === blue) { + if (red < 8) { + return 16; + } + + if (red > 248) { + return 231; + } + + return Math.round(((red - 8) / 247) * 24) + 232; + } + + return 16 + + (36 * Math.round(red / 255 * 5)) + + (6 * Math.round(green / 255 * 5)) + + Math.round(blue / 255 * 5); + }, + enumerable: false, + }, + hexToRgb: { + value: hex => { + const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); + if (!matches) { + return [0, 0, 0]; + } + + let [colorString] = matches; + + if (colorString.length === 3) { + colorString = [...colorString].map(character => character + character).join(''); + } + + const integer = Number.parseInt(colorString, 16); + + return [ + /* eslint-disable no-bitwise */ + (integer >> 16) & 0xFF, + (integer >> 8) & 0xFF, + integer & 0xFF, + /* eslint-enable no-bitwise */ + ]; + }, + enumerable: false, + }, + hexToAnsi256: { + value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)), + enumerable: false, + }, + ansi256ToAnsi: { + value: code => { + if (code < 8) { + return 30 + code; + } + + if (code < 16) { + return 90 + (code - 8); + } + + let red; + let green; + let blue; + + if (code >= 232) { + red = (((code - 232) * 10) + 8) / 255; + green = red; + blue = red; + } else { + code -= 16; + + const remainder = code % 36; + + red = Math.floor(code / 36) / 5; + green = Math.floor(remainder / 6) / 5; + blue = (remainder % 6) / 5; + } + + const value = Math.max(red, green, blue) * 2; + + if (value === 0) { + return 30; + } + + // eslint-disable-next-line no-bitwise + let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red)); + + if (value === 2) { + result += 60; + } + + return result; + }, + enumerable: false, + }, + rgbToAnsi: { + value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), + enumerable: false, + }, + hexToAnsi: { + value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), + enumerable: false, + }, + }); + + return styles; +} + +const ansiStyles = assembleStyles(); + +export default ansiStyles; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ansi-styles/license b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ansi-styles/license new file mode 100644 index 0000000000000000000000000000000000000000..fa7ceba3eb4a9657a9db7f3ffca4e4e97a9019de --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/ansi-styles/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/atomic-sleep/.travis.yml b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/atomic-sleep/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..3bb09da680726133aa551731053db653c207bbb8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/atomic-sleep/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +sudo: false +node_js: + - 6 + - 8 + - 10 + - 11 + - 12 + - 13 +script: + - npm run ci \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/atomic-sleep/index.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/atomic-sleep/index.js new file mode 100644 index 0000000000000000000000000000000000000000..fbfc8b238183f228e2eb447ba302951eaf469bcb --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/atomic-sleep/index.js @@ -0,0 +1,38 @@ +'use strict' + +/* global SharedArrayBuffer, Atomics */ + +if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined') { + const nil = new Int32Array(new SharedArrayBuffer(4)) + + function sleep (ms) { + // also filters out NaN, non-number types, including empty strings, but allows bigints + const valid = ms > 0 && ms < Infinity + if (valid === false) { + if (typeof ms !== 'number' && typeof ms !== 'bigint') { + throw TypeError('sleep: ms must be a number') + } + throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') + } + + Atomics.wait(nil, 0, 0, Number(ms)) + } + module.exports = sleep +} else { + + function sleep (ms) { + // also filters out NaN, non-number types, including empty strings, but allows bigints + const valid = ms > 0 && ms < Infinity + if (valid === false) { + if (typeof ms !== 'number' && typeof ms !== 'bigint') { + throw TypeError('sleep: ms must be a number') + } + throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') + } + const target = Date.now() + Number(ms) + while (target > Date.now()){} + } + + module.exports = sleep + +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/.taprc b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/.taprc new file mode 100644 index 0000000000000000000000000000000000000000..97190f379f534c4ef201d9909a5ccf2bdec12dc8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/.taprc @@ -0,0 +1,3 @@ +allow-incomplete-coverage: true +files: + - test/**/*test.js diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..66c3f4afb3cb443f41e03cae69bc2948ec809977 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/LICENSE @@ -0,0 +1,24 @@ +MIT License + +Copyright (c) 2020-2023 The Fastify Team +Copyright (c) 2016-2020 Matteo Collina + +The Fastify team members are listed at https://github.com/fastify/fastify#team. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/boot.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/boot.js new file mode 100644 index 0000000000000000000000000000000000000000..ff8460abe2ddb13b5d7f26a27a2c43c5640e70c9 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/boot.js @@ -0,0 +1,607 @@ +'use strict' + +const fastq = require('fastq') +const EE = require('node:events').EventEmitter +const inherits = require('node:util').inherits +const { + AVV_ERR_EXPOSE_ALREADY_DEFINED, + AVV_ERR_CALLBACK_NOT_FN, + AVV_ERR_ROOT_PLG_BOOTED, + AVV_ERR_READY_TIMEOUT, + AVV_ERR_ATTRIBUTE_ALREADY_DEFINED +} = require('./lib/errors') +const { + kAvvio, + kIsOnCloseHandler +} = require('./lib/symbols') +const { TimeTree } = require('./lib/time-tree') +const { Plugin } = require('./lib/plugin') +const { debug } = require('./lib/debug') +const { validatePlugin } = require('./lib/validate-plugin') +const { isBundledOrTypescriptPlugin } = require('./lib/is-bundled-or-typescript-plugin') +const { isPromiseLike } = require('./lib/is-promise-like') +const { thenify } = require('./lib/thenify') +const { executeWithThenable } = require('./lib/execute-with-thenable') + +function Boot (server, opts, done) { + if (typeof server === 'function' && arguments.length === 1) { + done = server + opts = {} + server = null + } + + if (typeof opts === 'function') { + done = opts + opts = {} + } + + opts = opts || {} + opts.autostart = opts.autostart !== false + opts.timeout = Number(opts.timeout) || 0 + opts.expose = opts.expose || {} + + if (!new.target) { + return new Boot(server, opts, done) + } + + this._server = server || this + this._opts = opts + + if (server) { + this._expose() + } + + /** + * @type {Array} + */ + this._current = [] + + this._error = null + + this._lastUsed = null + + this.setMaxListeners(0) + + if (done) { + this.once('start', done) + } + + this.started = false + this.booted = false + this.pluginTree = new TimeTree() + + this._readyQ = fastq(this, callWithCbOrNextTick, 1) + this._readyQ.pause() + this._readyQ.drain = () => { + this.emit('start') + // nooping this, we want to emit start only once + this._readyQ.drain = noop + } + + this._closeQ = fastq(this, closeWithCbOrNextTick, 1) + this._closeQ.pause() + this._closeQ.drain = () => { + this.emit('close') + // nooping this, we want to emit close only once + this._closeQ.drain = noop + } + + this._doStart = null + + const instance = this + this._root = new Plugin(fastq(this, this._loadPluginNextTick, 1), function root (server, opts, done) { + instance._doStart = done + opts.autostart && instance.start() + }, opts, false, 0) + + this._trackPluginLoading(this._root) + + this._loadPlugin(this._root, (err) => { + debug('root plugin ready') + try { + this.emit('preReady') + this._root = null + } catch (preReadyError) { + err = err || this._error || preReadyError + } + + if (err) { + this._error = err + if (this._readyQ.length() === 0) { + throw err + } + } else { + this.booted = true + } + this._readyQ.resume() + }) +} + +inherits(Boot, EE) + +Boot.prototype.start = function () { + this.started = true + + // we need to wait any call to use() to happen + process.nextTick(this._doStart) + return this +} + +// allows to override the instance of a server, given a plugin +Boot.prototype.override = function (server, func, opts) { + return server +} + +Boot.prototype[kAvvio] = true + +// load a plugin +Boot.prototype.use = function (plugin, opts) { + this._lastUsed = this._addPlugin(plugin, opts, false) + return this +} + +Boot.prototype._loadRegistered = function () { + const plugin = this._current[0] + const weNeedToStart = !this.started && !this.booted + + // if the root plugin is not loaded, let's resume that + // so one can use after() before calling ready + if (weNeedToStart) { + process.nextTick(() => this._root.queue.resume()) + } + + if (!plugin) { + return Promise.resolve() + } + + return plugin.loadedSoFar() +} + +Object.defineProperty(Boot.prototype, 'then', { get: thenify }) + +Boot.prototype._addPlugin = function (pluginFn, opts, isAfter) { + if (isBundledOrTypescriptPlugin(pluginFn)) { + pluginFn = pluginFn.default + } + validatePlugin(pluginFn) + opts = opts || {} + + if (this.booted) { + throw new AVV_ERR_ROOT_PLG_BOOTED() + } + + // we always add plugins to load at the current element + const current = this._current[0] + + let timeout = this._opts.timeout + + if (!current.loaded && current.timeout > 0) { + const delta = Date.now() - current.startTime + // We need to decrease it by 3ms to make sure the internal timeout + // is triggered earlier than the parent + timeout = current.timeout - (delta + 3) + } + + const plugin = new Plugin(fastq(this, this._loadPluginNextTick, 1), pluginFn, opts, isAfter, timeout) + this._trackPluginLoading(plugin) + + if (current.loaded) { + throw new Error(plugin.name, current.name) + } + + // we add the plugin to be loaded at the end of the current queue + current.enqueue(plugin, (err) => { err && (this._error = err) }) + + return plugin +} + +Boot.prototype._expose = function _expose () { + const instance = this + const server = instance._server + const { + use: useKey = 'use', + after: afterKey = 'after', + ready: readyKey = 'ready', + onClose: onCloseKey = 'onClose', + close: closeKey = 'close' + } = this._opts.expose + + if (server[useKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(useKey, 'use') + } + server[useKey] = function (fn, opts) { + instance.use(fn, opts) + return this + } + + if (server[afterKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(afterKey, 'after') + } + server[afterKey] = function (func) { + if (typeof func !== 'function') { + return instance._loadRegistered() + } + instance.after(encapsulateThreeParam(func, this)) + return this + } + + if (server[readyKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(readyKey, 'ready') + } + server[readyKey] = function (func) { + if (func && typeof func !== 'function') { + throw new AVV_ERR_CALLBACK_NOT_FN(readyKey, typeof func) + } + return instance.ready(func ? encapsulateThreeParam(func, this) : undefined) + } + + if (server[onCloseKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(onCloseKey, 'onClose') + } + server[onCloseKey] = function (func) { + if (typeof func !== 'function') { + throw new AVV_ERR_CALLBACK_NOT_FN(onCloseKey, typeof func) + } + instance.onClose(encapsulateTwoParam(func, this)) + return this + } + + if (server[closeKey]) { + throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(closeKey, 'close') + } + server[closeKey] = function (func) { + if (func && typeof func !== 'function') { + throw new AVV_ERR_CALLBACK_NOT_FN(closeKey, typeof func) + } + + if (func) { + instance.close(encapsulateThreeParam(func, this)) + return this + } + + // this is a Promise + return instance.close() + } + + if (server.then) { + throw new AVV_ERR_ATTRIBUTE_ALREADY_DEFINED('then') + } + Object.defineProperty(server, 'then', { get: thenify.bind(instance) }) + + server[kAvvio] = true +} + +Boot.prototype.after = function (func) { + if (!func) { + return this._loadRegistered() + } + + this._addPlugin(_after.bind(this), {}, true) + + function _after (s, opts, done) { + callWithCbOrNextTick.call(this, func, done) + } + + return this +} + +Boot.prototype.onClose = function (func) { + // this is used to distinguish between onClose and close handlers + // because they share the same queue but must be called with different signatures + + if (typeof func !== 'function') { + throw new AVV_ERR_CALLBACK_NOT_FN('onClose', typeof func) + } + + func[kIsOnCloseHandler] = true + this._closeQ.unshift(func, (err) => { err && (this._error = err) }) + + return this +} + +Boot.prototype.close = function (func) { + let promise + + if (func) { + if (typeof func !== 'function') { + throw new AVV_ERR_CALLBACK_NOT_FN('close', typeof func) + } + } else { + promise = new Promise(function (resolve, reject) { + func = function (err) { + if (err) { + return reject(err) + } + resolve() + } + }) + } + + this.ready(() => { + this._error = null + this._closeQ.push(func) + process.nextTick(this._closeQ.resume.bind(this._closeQ)) + }) + + return promise +} + +Boot.prototype.ready = function (func) { + if (func) { + if (typeof func !== 'function') { + throw new AVV_ERR_CALLBACK_NOT_FN('ready', typeof func) + } + this._readyQ.push(func) + queueMicrotask(this.start.bind(this)) + return + } + + return new Promise((resolve, reject) => { + this._readyQ.push(readyPromiseCB) + this.start() + + /** + * The `encapsulateThreeParam` let callback function + * bind to the right server instance. + * In promises we need to track the last server + * instance loaded, the first one in the _current queue. + */ + const relativeContext = this._current[0].server + + function readyPromiseCB (err, context, done) { + // the context is always binded to the root server + if (err) { + reject(err) + } else { + resolve(relativeContext) + } + process.nextTick(done) + } + }) +} + +/** + * @param {Plugin} plugin + * @returns {void} + */ +Boot.prototype._trackPluginLoading = function (plugin) { + const parentName = this._current[0]?.name || null + plugin.once('start', (serverName, funcName, time) => { + const nodeId = this.pluginTree.start(parentName || null, funcName, time) + plugin.once('loaded', (serverName, funcName, time) => { + this.pluginTree.stop(nodeId, time) + }) + }) +} + +Boot.prototype.prettyPrint = function () { + return this.pluginTree.prettyPrint() +} + +Boot.prototype.toJSON = function () { + return this.pluginTree.toJSON() +} + +/** + * @callback LoadPluginCallback + * @param {Error} [err] + */ + +/** + * Load a plugin + * + * @param {Plugin} plugin + * @param {LoadPluginCallback} callback + */ +Boot.prototype._loadPlugin = function (plugin, callback) { + const instance = this + if (isPromiseLike(plugin.func)) { + plugin.func.then((fn) => { + if (typeof fn.default === 'function') { + fn = fn.default + } + plugin.func = fn + this._loadPlugin(plugin, callback) + }, callback) + return + } + + const last = instance._current[0] + + // place the plugin at the top of _current + instance._current.unshift(plugin) + + if (instance._error && !plugin.isAfter) { + debug('skipping loading of plugin as instance errored and it is not an after', plugin.name) + process.nextTick(execCallback) + return + } + + let server = (last && last.server) || instance._server + + if (!plugin.isAfter) { + // Skip override for after + try { + server = instance.override(server, plugin.func, plugin.options) + } catch (overrideErr) { + debug('override errored', plugin.name) + return execCallback(overrideErr) + } + } + + plugin.exec(server, execCallback) + + function execCallback (err) { + plugin.finish(err, (err) => { + instance._current.shift() + callback(err) + }) + } +} + +/** +* Delays plugin loading until the next tick to ensure any bound `_after` callbacks have a chance +* to run prior to executing the next plugin +*/ +Boot.prototype._loadPluginNextTick = function (plugin, callback) { + process.nextTick(this._loadPlugin.bind(this), plugin, callback) +} + +function noop () { } + +function callWithCbOrNextTick (func, cb) { + const context = this._server + const err = this._error + + // with this the error will appear just in the next after/ready callback + this._error = null + if (func.length === 0) { + this._error = err + executeWithThenable(func, [], cb) + } else if (func.length === 1) { + executeWithThenable(func, [err], cb) + } else { + if (this._opts.timeout === 0) { + const wrapCb = (err) => { + this._error = err + cb(this._error) + } + + if (func.length === 2) { + func(err, wrapCb) + } else { + func(err, context, wrapCb) + } + } else { + timeoutCall.call(this, func, err, context, cb) + } + } +} + +function timeoutCall (func, rootErr, context, cb) { + const name = func.unwrappedName ?? func.name + debug('setting up ready timeout', name, this._opts.timeout) + let timer = setTimeout(() => { + debug('timed out', name) + timer = null + const toutErr = new AVV_ERR_READY_TIMEOUT(name) + toutErr.fn = func + this._error = toutErr + cb(toutErr) + }, this._opts.timeout) + + if (func.length === 2) { + func(rootErr, timeoutCb.bind(this)) + } else { + func(rootErr, context, timeoutCb.bind(this)) + } + + function timeoutCb (err) { + if (timer) { + clearTimeout(timer) + this._error = err + cb(this._error) + } else { + // timeout has been triggered + // can not call cb twice + } + } +} + +function closeWithCbOrNextTick (func, cb) { + const context = this._server + const isOnCloseHandler = func[kIsOnCloseHandler] + if (func.length === 0 || func.length === 1) { + let promise + if (isOnCloseHandler) { + promise = func(context) + } else { + promise = func(this._error) + } + if (promise && typeof promise.then === 'function') { + debug('resolving close/onClose promise') + promise.then( + () => process.nextTick(cb), + (e) => process.nextTick(cb, e)) + } else { + process.nextTick(cb) + } + } else if (func.length === 2) { + if (isOnCloseHandler) { + func(context, cb) + } else { + func(this._error, cb) + } + } else { + if (isOnCloseHandler) { + func(context, cb) + } else { + func(this._error, context, cb) + } + } +} + +function encapsulateTwoParam (func, that) { + return _encapsulateTwoParam.bind(that) + function _encapsulateTwoParam (context, cb) { + let res + if (func.length === 0) { + res = func() + if (res && res.then) { + res.then(function () { + process.nextTick(cb) + }, cb) + } else { + process.nextTick(cb) + } + } else if (func.length === 1) { + res = func(this) + + if (res && res.then) { + res.then(function () { + process.nextTick(cb) + }, cb) + } else { + process.nextTick(cb) + } + } else { + func(this, cb) + } + } +} + +function encapsulateThreeParam (func, that) { + const wrapped = _encapsulateThreeParam.bind(that) + wrapped.unwrappedName = func.name + return wrapped + function _encapsulateThreeParam (err, cb) { + let res + if (!func) { + process.nextTick(cb) + } else if (func.length === 0) { + res = func() + if (res && res.then) { + res.then(function () { + process.nextTick(cb, err) + }, cb) + } else { + process.nextTick(cb, err) + } + } else if (func.length === 1) { + res = func(err) + if (res && res.then) { + res.then(function () { + process.nextTick(cb) + }, cb) + } else { + process.nextTick(cb) + } + } else if (func.length === 2) { + func(err, cb) + } else { + func(err, this, cb) + } + } +} + +module.exports = Boot diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ce8c0de469a7f7ee71882adac3e31f9509cb8d25 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/avvio/package.json @@ -0,0 +1,51 @@ +{ + "name": "avvio", + "version": "9.1.0", + "description": "Asynchronous bootstrapping of Node applications", + "main": "boot.js", + "type": "commonjs", + "scripts": { + "lint": "standard", + "lint:fix": "standard --fix", + "test": "npm run test:unit && npm run test:typescript", + "test:unit": "tap", + "test:typescript": "tsc --project ./test/types/tsconfig.json" + }, + "precommit": [ + "lint", + "test" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/avvio.git" + }, + "keywords": [ + "async", + "boot", + "delayed", + "open" + ], + "author": "Matteo Collina ", + "contributors": [ + { + "name": "Tomas Della Vedova", + "url": "http://delved.org" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fastify/avvio/issues" + }, + "homepage": "https://github.com/fastify/avvio#readme", + "devDependencies": { + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^22.0.0", + "standard": "^17.1.0", + "tap": "^18.7.1", + "typescript": "^5.4.2" + }, + "dependencies": { + "@fastify/error": "^4.0.0", + "fastq": "^1.17.1" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/base64-js/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/base64-js/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b42a48f41641495df5fc3bda0f2857d698aa8144 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/base64-js/README.md @@ -0,0 +1,34 @@ +base64-js +========= + +`base64-js` does basic base64 encoding/decoding in pure JS. + +[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) + +Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. + +Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. + +## install + +With [npm](https://npmjs.org) do: + +`npm install base64-js` and `var base64js = require('base64-js')` + +For use in web browsers do: + +`` + +[Get supported base64-js with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-base64-js?utm_source=npm-base64-js&utm_medium=referral&utm_campaign=readme) + +## methods + +`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. + +* `byteLength` - Takes a base64 string and returns length of byte array +* `toByteArray` - Takes a base64 string and returns a byte array +* `fromByteArray` - Takes a byte array and returns a base64 string + +## license + +MIT diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/base64-js/base64js.min.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/base64-js/base64js.min.js new file mode 100644 index 0000000000000000000000000000000000000000..908ac83fd12400f777f5dd4c034e3535e1bbd5ae --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/base64-js/base64js.min.js @@ -0,0 +1 @@ +(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.base64js=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c>16,j[k++]=255&b>>8,j[k++]=255&b;return 2===h&&(b=l[a.charCodeAt(c)]<<2|l[a.charCodeAt(c+1)]>>4,j[k++]=255&b),1===h&&(b=l[a.charCodeAt(c)]<<10|l[a.charCodeAt(c+1)]<<4|l[a.charCodeAt(c+2)]>>2,j[k++]=255&b>>8,j[k++]=255&b),j}function g(a){return k[63&a>>18]+k[63&a>>12]+k[63&a>>6]+k[63&a]}function h(a,b,c){for(var d,e=[],f=b;fj?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/LICENCE.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/LICENCE.md new file mode 100644 index 0000000000000000000000000000000000000000..f09b7106b1c6649fccf6524d85b943a4751491a3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/LICENCE.md @@ -0,0 +1,26 @@ +The MIT License (MIT) +===================== + +Copyright © `<2025>` `Michael Mclaughlin` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e34aaf22f039e81f36989c3db24409fc5a0da55a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/README.md @@ -0,0 +1,289 @@ +![bignumber.js](https://raw.githubusercontent.com/MikeMcl/bignumber.js/gh-pages/bignumberjs.png) + +A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic. + +[![npm version](https://img.shields.io/npm/v/bignumber.js.svg)](https://www.npmjs.com/package/bignumber.js) +[![npm downloads](https://img.shields.io/npm/dw/bignumber.js)](https://www.npmjs.com/package/bignumber.js) +[![CI](https://github.com/MikeMcl/bignumber.js/actions/workflows/ci.yml/badge.svg)](https://github.com/MikeMcl/bignumber.js/actions/workflows/ci.yml) + +
+ +## Features + +- Integers and decimals +- Simple API but full-featured +- Faster, smaller, and perhaps easier to use than JavaScript versions of Java's BigDecimal +- 8 KB minified and gzipped +- Replicates the `toExponential`, `toFixed`, `toPrecision` and `toString` methods of JavaScript's Number type +- Includes a `toFraction` and a correctly-rounded `squareRoot` method +- Supports cryptographically-secure pseudo-random number generation +- No dependencies +- Wide platform compatibility: uses JavaScript 1.5 (ECMAScript 3) features only +- Comprehensive [documentation](http://mikemcl.github.io/bignumber.js/) and test set + +![API](https://raw.githubusercontent.com/MikeMcl/bignumber.js/gh-pages/API.png) + +If a smaller and simpler library is required see [big.js](https://github.com/MikeMcl/big.js/). +It's less than half the size but only works with decimal numbers and only has half the methods. +It also has fewer configuration options than this library, and does not allow `NaN` or `Infinity`. + +See also [decimal.js](https://github.com/MikeMcl/decimal.js/), which among other things adds support for non-integer powers, and performs all operations to a specified number of significant digits. + +## Load + +The library is the single JavaScript file *bignumber.js* or ES module *bignumber.mjs*. + +### Browser + +```html + +``` + +> ES module + +```html + +``` + +### [Node.js](http://nodejs.org) + +```bash +npm install bignumber.js +``` + +```javascript +const BigNumber = require('bignumber.js'); +``` + +> ES module + +```javascript +import BigNumber from "bignumber.js"; +``` + +### [Deno](https://deno.land/) + +```javascript +// @deno-types="https://raw.githubusercontent.com/mikemcl/bignumber.js/v9.3.1/bignumber.d.mts" +import BigNumber from 'https://raw.githubusercontent.com/mikemcl/bignumber.js/v9.3.1/bignumber.mjs'; + +// @deno-types="https://unpkg.com/bignumber.js@latest/bignumber.d.mts" +import { BigNumber } from 'https://unpkg.com/bignumber.js@latest/bignumber.mjs'; +``` + +## Use + +The library exports a single constructor function, [`BigNumber`](http://mikemcl.github.io/bignumber.js/#bignumber), which accepts a value of type Number, String or BigNumber, + +```javascript +let x = new BigNumber(123.4567); +let y = BigNumber('123456.7e-3'); +let z = new BigNumber(x); +x.isEqualTo(y) && y.isEqualTo(z) && x.isEqualTo(z); // true +``` + +To get the string value of a BigNumber use [`toString()`](http://mikemcl.github.io/bignumber.js/#toS) or [`toFixed()`](http://mikemcl.github.io/bignumber.js/#toFix). Using `toFixed()` prevents exponential notation being returned, no matter how large or small the value. + +```javascript +let x = new BigNumber('1111222233334444555566'); +x.toString(); // "1.111222233334444555566e+21" +x.toFixed(); // "1111222233334444555566" +``` + +If the limited precision of Number values is not well understood, it is recommended to create BigNumbers from String values rather than Number values to avoid a potential loss of precision. + +*In all further examples below, `let`, semicolons and `toString` calls are not shown. If a commented-out value is in quotes it means `toString` has been called on the preceding expression.* + +```javascript +// Precision loss from using numeric literals with more than 15 significant digits. +new BigNumber(1.0000000000000001) // '1' +new BigNumber(88259496234518.57) // '88259496234518.56' +new BigNumber(99999999999999999999) // '100000000000000000000' + +// Precision loss from using numeric literals outside the range of Number values. +new BigNumber(2e+308) // 'Infinity' +new BigNumber(1e-324) // '0' + +// Precision loss from the unexpected result of arithmetic with Number values. +new BigNumber(0.7 + 0.1) // '0.7999999999999999' +``` + +When creating a BigNumber from a Number, note that a BigNumber is created from a Number's decimal `toString()` value not from its underlying binary value. If the latter is required, then pass the Number's `toString(2)` value and specify base 2. + +```javascript +new BigNumber(Number.MAX_VALUE.toString(2), 2) +``` + +BigNumbers can be created from values in bases from 2 to 36. See [`ALPHABET`](http://mikemcl.github.io/bignumber.js/#alphabet) to extend this range. + +```javascript +a = new BigNumber(1011, 2) // "11" +b = new BigNumber('zz.9', 36) // "1295.25" +c = a.plus(b) // "1306.25" +``` + +*Performance is better if base 10 is NOT specified for decimal values. Only specify base 10 when you want to limit the number of decimal places of the input value to the current [`DECIMAL_PLACES`](http://mikemcl.github.io/bignumber.js/#decimal-places) setting.* + +A BigNumber is immutable in the sense that it is not changed by its methods. + +```javascript +0.3 - 0.1 // 0.19999999999999998 +x = new BigNumber(0.3) +x.minus(0.1) // "0.2" +x // "0.3" +``` + +The methods that return a BigNumber can be chained. + +```javascript +x.dividedBy(y).plus(z).times(9) +x.times('1.23456780123456789e+9').plus(9876.5432321).dividedBy('4444562598.111772').integerValue() +``` + +Some of the longer method names have a shorter alias. + +```javascript +x.squareRoot().dividedBy(y).exponentiatedBy(3).isEqualTo(x.sqrt().div(y).pow(3)) // true +x.modulo(y).multipliedBy(z).eq(x.mod(y).times(z)) // true +``` + +As with JavaScript's Number type, there are [`toExponential`](http://mikemcl.github.io/bignumber.js/#toE), [`toFixed`](http://mikemcl.github.io/bignumber.js/#toFix) and [`toPrecision`](http://mikemcl.github.io/bignumber.js/#toP) methods. + +```javascript +x = new BigNumber(255.5) +x.toExponential(5) // "2.55500e+2" +x.toFixed(5) // "255.50000" +x.toPrecision(5) // "255.50" +x.toNumber() // 255.5 +``` + + A base can be specified for [`toString`](http://mikemcl.github.io/bignumber.js/#toS). + +*Performance is better if base 10 is NOT specified, i.e. use `toString()` not `toString(10)`. Only specify base 10 when you want to limit the number of decimal places of the string to the current [`DECIMAL_PLACES`](http://mikemcl.github.io/bignumber.js/#decimal-places) setting.* + + ```javascript + x.toString(16) // "ff.8" + ``` + +There is a [`toFormat`](http://mikemcl.github.io/bignumber.js/#toFor) method which may be useful for internationalisation. + +```javascript +y = new BigNumber('1234567.898765') +y.toFormat(2) // "1,234,567.90" +``` + +The maximum number of decimal places of the result of an operation involving division (i.e. a division, square root, base conversion or negative power operation) is set using the `set` or `config` method of the `BigNumber` constructor. + +The other arithmetic operations always give the exact result. + +```javascript +BigNumber.set({ DECIMAL_PLACES: 10, ROUNDING_MODE: 4 }) + +x = new BigNumber(2) +y = new BigNumber(3) +z = x.dividedBy(y) // "0.6666666667" +z.squareRoot() // "0.8164965809" +z.exponentiatedBy(-3) // "3.3749999995" +z.toString(2) // "0.1010101011" +z.multipliedBy(z) // "0.44444444448888888889" +z.multipliedBy(z).decimalPlaces(10) // "0.4444444445" +``` + +There is a [`toFraction`](http://mikemcl.github.io/bignumber.js/#toFr) method with an optional *maximum denominator* argument + +```javascript +y = new BigNumber(355) +pi = y.dividedBy(113) // "3.1415929204" +pi.toFraction() // [ "7853982301", "2500000000" ] +pi.toFraction(1000) // [ "355", "113" ] +``` + +and [`isNaN`](http://mikemcl.github.io/bignumber.js/#isNaN) and [`isFinite`](http://mikemcl.github.io/bignumber.js/#isF) methods, as `NaN` and `Infinity` are valid `BigNumber` values. + +```javascript +x = new BigNumber(NaN) // "NaN" +y = new BigNumber(Infinity) // "Infinity" +x.isNaN() && !y.isNaN() && !x.isFinite() && !y.isFinite() // true +``` + +The value of a BigNumber is stored in a decimal floating point format in terms of a coefficient, exponent and sign. + +```javascript +x = new BigNumber(-123.456); +x.c // [ 123, 45600000000000 ] coefficient (i.e. significand) +x.e // 2 exponent +x.s // -1 sign +``` + +For advanced usage, multiple BigNumber constructors can be created, each with its own independent configuration. + +```javascript +// Set DECIMAL_PLACES for the original BigNumber constructor +BigNumber.set({ DECIMAL_PLACES: 10 }) + +// Create another BigNumber constructor, optionally passing in a configuration object +BN = BigNumber.clone({ DECIMAL_PLACES: 5 }) + +x = new BigNumber(1) +y = new BN(1) + +x.div(3) // '0.3333333333' +y.div(3) // '0.33333' +``` + +To avoid having to call `toString` or `valueOf` on a BigNumber to get its value in the Node.js REPL or when using `console.log` use + +```javascript +BigNumber.prototype[require('util').inspect.custom] = BigNumber.prototype.valueOf; +``` + +For further information see the [API](http://mikemcl.github.io/bignumber.js/) reference in the *doc* directory. + +## Test + +The *test/modules* directory contains the test scripts for each method. + +The tests can be run with Node.js or a browser. For Node.js use + +```bash +npm test +``` + +or + +```bash +node test/test +``` + +To test a single method, use, for example + +```bash +node test/methods/toFraction +``` + +For the browser, open *test/test.html*. + +## Minify + +To minify using, for example, [terser](https://github.com/terser/terser) + +```bash +npm install -g terser +``` + +```bash +terser big.js -c -m -o big.min.js +``` + +## Licence + +The MIT Licence. + +See [LICENCE](https://github.com/MikeMcl/bignumber.js/blob/main/LICENCE.md). diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/bignumber.d.mts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/bignumber.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5d39f2e945550faaccc042b2280b3082ed368c74 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/bignumber.d.mts @@ -0,0 +1,6 @@ +/// + +export default BigNumber; + +declare const BigNumberType: typeof BigNumber; +export { BigNumberType as BigNumber }; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/bignumber.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/bignumber.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3ee5405a6210993b0456d78c6ae1aa8f7b8b11c1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/bignumber.d.ts @@ -0,0 +1,5 @@ +/// + +export = BigNumber; + +export as namespace BigNumber; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3ba465879a6775348662d0afb689a722774b04fa --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/bignumber.js/package.json @@ -0,0 +1,60 @@ +{ + "name": "bignumber.js", + "description": "A library for arbitrary-precision decimal and non-decimal arithmetic", + "version": "9.3.1", + "keywords": [ + "arbitrary", + "precision", + "arithmetic", + "big", + "number", + "decimal", + "float", + "biginteger", + "bigdecimal", + "bignumber", + "bigint", + "bignum" + ], + "repository": { + "type": "git", + "url": "https://github.com/MikeMcl/bignumber.js.git" + }, + "main": "bignumber", + "module": "bignumber.mjs", + "browser": "bignumber.js", + "types": "bignumber.d.ts", + "exports": { + ".": { + "import": { + "types": "./bignumber.d.mts", + "default": "./bignumber.mjs" + }, + "require": { + "types": "./bignumber.d.ts", + "default": "./bignumber.js" + }, + "browser": { + "types": "./bignumber.d.ts", + "default": "./bignumber.js" + }, + "default": { + "types": "./bignumber.d.ts", + "default": "./bignumber.js" + } + }, + "./package.json": "./package.json" + }, + "author": { + "name": "Michael Mclaughlin", + "email": "M8ch88l@gmail.com" + }, + "engines": { + "node": "*" + }, + "license": "MIT", + "scripts": { + "test": "node test/test" + }, + "dependencies": {} +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/braces/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/braces/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9af4a67d206f24ecdbb5fdff2839041ca0bbd346 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/braces/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/braces/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f59dd604566f1239274c4caf6d88b90b4ddeb25d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/braces/README.md @@ -0,0 +1,586 @@ +# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) + +> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save braces +``` + +## v3.0.0 Released!! + +See the [changelog](CHANGELOG.md) for details. + +## Why use braces? + +Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters. + +- **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) +- **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. +- **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up. +- **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written). +- **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)). +- [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +- [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']` +- [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']` +- [Supports escaping](#escaping) - To prevent evaluation of special characters. + +## Usage + +The main export is a function that takes one or more brace `patterns` and `options`. + +```js +const braces = require('braces'); +// braces(patterns[, options]); + +console.log(braces(['{01..05}', '{a..e}'])); +//=> ['(0[1-5])', '([a-e])'] + +console.log(braces(['{01..05}', '{a..e}'], { expand: true })); +//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e'] +``` + +### Brace Expansion vs. Compilation + +By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. + +**Compiled** + +```js +console.log(braces('a/{x,y,z}/b')); +//=> ['a/(x|y|z)/b'] +console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); +//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ] +``` + +**Expanded** + +Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)): + +```js +console.log(braces('a/{x,y,z}/b', { expand: true })); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] + +console.log(braces.expand('{01..10}')); +//=> ['01','02','03','04','05','06','07','08','09','10'] +``` + +### Lists + +Expand lists (like Bash "sets"): + +```js +console.log(braces('a/{foo,bar,baz}/*.js')); +//=> ['a/(foo|bar|baz)/*.js'] + +console.log(braces.expand('a/{foo,bar,baz}/*.js')); +//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] +``` + +### Sequences + +Expand ranges of characters (like Bash "sequences"): + +```js +console.log(braces.expand('{1..3}')); // ['1', '2', '3'] +console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b'] +console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c'] +console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c'] + +// supports zero-padded ranges +console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b'] +console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b'] +``` + +See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options. + +### Steppped ranges + +Steps, or increments, may be used with ranges: + +```js +console.log(braces.expand('{2..10..2}')); +//=> ['2', '4', '6', '8', '10'] + +console.log(braces('{2..10..2}')); +//=> ['(2|4|6|8|10)'] +``` + +When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. + +### Nesting + +Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. + +**"Expanded" braces** + +```js +console.log(braces.expand('a{b,c,/{x,y}}/e')); +//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] + +console.log(braces.expand('a/{x,{1..5},y}/c')); +//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] +``` + +**"Optimized" braces** + +```js +console.log(braces('a{b,c,/{x,y}}/e')); +//=> ['a(b|c|/(x|y))/e'] + +console.log(braces('a/{x,{1..5},y}/c')); +//=> ['a/(x|([1-5])|y)/c'] +``` + +### Escaping + +**Escaping braces** + +A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: + +```js +console.log(braces.expand('a\\{d,c,b}e')); +//=> ['a{d,c,b}e'] + +console.log(braces.expand('a{d,c,b\\}e')); +//=> ['a{d,c,b}e'] +``` + +**Escaping commas** + +Commas inside braces may also be escaped: + +```js +console.log(braces.expand('a{b\\,c}d')); +//=> ['a{b,c}d'] + +console.log(braces.expand('a{d\\,c,b}e')); +//=> ['ad,ce', 'abe'] +``` + +**Single items** + +Following bash conventions, a brace pattern is also not expanded when it contains a single character: + +```js +console.log(braces.expand('a{b}c')); +//=> ['a{b}c'] +``` + +## Options + +### options.maxLength + +**Type**: `Number` + +**Default**: `10,000` + +**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. + +```js +console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error +``` + +### options.expand + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing). + +```js +console.log(braces('a/{b,c}/d', { expand: true })); +//=> [ 'a/b/d', 'a/c/d' ] +``` + +### options.nodupes + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Remove duplicates from the returned array. + +### options.rangeLimit + +**Type**: `Number` + +**Default**: `1000` + +**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`. + +You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether. + +**Examples** + +```js +// pattern exceeds the "rangeLimit", so it's optimized automatically +console.log(braces.expand('{1..1000}')); +//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] + +// pattern does not exceed "rangeLimit", so it's NOT optimized +console.log(braces.expand('{1..100}')); +//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] +``` + +### options.transform + +**Type**: `Function` + +**Default**: `undefined` + +**Description**: Customize range expansion. + +**Example: Transforming non-numeric values** + +```js +const alpha = braces.expand('x/{a..e}/y', { + transform(value, index) { + // When non-numeric values are passed, "value" is a character code. + return 'foo/' + String.fromCharCode(value) + '-' + index; + }, +}); +console.log(alpha); +//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ] +``` + +**Example: Transforming numeric values** + +```js +const numeric = braces.expand('{1..5}', { + transform(value) { + // when numeric values are passed, "value" is a number + return 'foo/' + value * 2; + }, +}); +console.log(numeric); +//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ] +``` + +### options.quantifiers + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + +Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + +The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. + +**Examples** + +```js +const braces = require('braces'); +console.log(braces('a/b{1,3}/{x,y,z}')); +//=> [ 'a/b(1|3)/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true })); +//=> [ 'a/b{1,3}/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true, expand: true })); +//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] +``` + +### options.keepEscaping + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Do not strip backslashes that were used for escaping from the result. + +## What is "brace expansion"? + +Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). + +In addition to "expansion", braces are also used for matching. In other words: + +- [brace expansion](#brace-expansion) is for generating new lists +- [brace matching](#brace-matching) is for filtering existing lists + +
+More about brace expansion (click to expand) + +There are two main types of brace expansion: + +1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` +2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". + +Here are some example brace patterns to illustrate how they work: + +**Sets** + +``` +{a,b,c} => a b c +{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 +``` + +**Sequences** + +``` +{1..9} => 1 2 3 4 5 6 7 8 9 +{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 +{1..20..3} => 1 4 7 10 13 16 19 +{a..j} => a b c d e f g h i j +{j..a} => j i h g f e d c b a +{a..z..3} => a d g j m p s v y +``` + +**Combination** + +Sets and sequences can be mixed together or used along with any other strings. + +``` +{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 +foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar +``` + +The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. + +## Brace matching + +In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. + +For example, the pattern `foo/{1..3}/bar` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +``` + +But not: + +``` +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +## Brace matching pitfalls + +Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. + +### tldr + +**"brace bombs"** + +- brace expansion can eat up a huge amount of processing resources +- as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially +- users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) + +For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. + +### The solution + +Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. + +### Geometric complexity + +At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. + +For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: + +``` +{1,2}{3,4} => (2X2) => 13 14 23 24 +{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 +``` + +But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: + +``` +{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 + 249 257 258 259 267 268 269 347 348 349 357 + 358 359 367 368 369 +``` + +Now, imagine how this complexity grows given that each element is a n-tuple: + +``` +{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) +{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) +``` + +Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. + +**More information** + +Interested in learning more about brace expansion? + +- [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) +- [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) +- [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) + +
+ +## Performance + +Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. + +### Better algorithms + +Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. + +Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. + +**The proof is in the numbers** + +Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. + +| **Pattern** | **braces** | **[minimatch][]** | +| --------------------------- | ------------------- | ---------------------------- | +| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs) | N/A (freezes) | +| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | +| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | +| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | +| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | +| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | +| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | +| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | +| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | +| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | +| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | +| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | +| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | +| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | +| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | +| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | +| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | + +### Faster algorithms + +When you need expansion, braces is still much faster. + +_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ + +| **Pattern** | **braces** | **[minimatch][]** | +| --------------- | --------------------------- | ---------------------------- | +| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | +| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | +| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | +| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | +| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | +| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | +| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | +| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | + +If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +Braces is more accurate, without sacrificing performance. + +```bash +● expand - range (expanded) + braces x 53,167 ops/sec ±0.12% (102 runs sampled) + minimatch x 11,378 ops/sec ±0.10% (102 runs sampled) +● expand - range (optimized for regex) + braces x 373,442 ops/sec ±0.04% (100 runs sampled) + minimatch x 3,262 ops/sec ±0.18% (100 runs sampled) +● expand - nested ranges (expanded) + braces x 33,921 ops/sec ±0.09% (99 runs sampled) + minimatch x 10,855 ops/sec ±0.28% (100 runs sampled) +● expand - nested ranges (optimized for regex) + braces x 287,479 ops/sec ±0.52% (98 runs sampled) + minimatch x 3,219 ops/sec ±0.28% (101 runs sampled) +● expand - set (expanded) + braces x 238,243 ops/sec ±0.19% (97 runs sampled) + minimatch x 538,268 ops/sec ±0.31% (96 runs sampled) +● expand - set (optimized for regex) + braces x 321,844 ops/sec ±0.10% (97 runs sampled) + minimatch x 140,600 ops/sec ±0.15% (100 runs sampled) +● expand - nested sets (expanded) + braces x 165,371 ops/sec ±0.42% (96 runs sampled) + minimatch x 337,720 ops/sec ±0.28% (100 runs sampled) +● expand - nested sets (optimized for regex) + braces x 242,948 ops/sec ±0.12% (99 runs sampled) + minimatch x 87,403 ops/sec ±0.79% (96 runs sampled) +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| ----------- | ------------------------------------------------------------- | +| 197 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | +| 1 | [hemanth](https://github.com/hemanth) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +- [GitHub Profile](https://github.com/jonschlinkert) +- [Twitter Profile](https://twitter.com/jonschlinkert) +- [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +--- + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/braces/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/braces/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c3c056e469726cdb0d0cb6cec73b3f79abf0eb23 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/braces/package.json @@ -0,0 +1,77 @@ +{ + "name": "braces", + "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", + "version": "3.0.3", + "homepage": "https://github.com/micromatch/braces", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "hemanth.hm (http://h3manth.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/braces", + "bugs": { + "url": "https://github.com/micromatch/braces/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha", + "benchmark": "node benchmark" + }, + "dependencies": { + "fill-range": "^7.1.1" + }, + "devDependencies": { + "ansi-colors": "^3.2.4", + "bash-path": "^2.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "braces", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ] + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/.npmignore b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/.npmignore new file mode 100644 index 0000000000000000000000000000000000000000..34e4f5c298de294fa5c1c1769b6489eb047bde9a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/.npmignore @@ -0,0 +1,2 @@ +.*.sw[mnop] +node_modules/ diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/LICENSE.txt b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..9a064f3f46ddd7239274cf0e80dab1bf8a820b34 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) 2013, GoInstant Inc., a salesforce.com company +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4f227f58bddbe9b1a06a4781efca74538b4b532a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/README.md @@ -0,0 +1,50 @@ +# buffer-equal-constant-time + +Constant-time `Buffer` comparison for node.js. Should work with browserify too. + +[![Build Status](https://travis-ci.org/goinstant/buffer-equal-constant-time.png?branch=master)](https://travis-ci.org/goinstant/buffer-equal-constant-time) + +```sh + npm install buffer-equal-constant-time +``` + +# Usage + +```js + var bufferEq = require('buffer-equal-constant-time'); + + var a = new Buffer('asdf'); + var b = new Buffer('asdf'); + if (bufferEq(a,b)) { + // the same! + } else { + // different in at least one byte! + } +``` + +If you'd like to install an `.equal()` method onto the node.js `Buffer` and +`SlowBuffer` prototypes: + +```js + require('buffer-equal-constant-time').install(); + + var a = new Buffer('asdf'); + var b = new Buffer('asdf'); + if (a.equal(b)) { + // the same! + } else { + // different in at least one byte! + } +``` + +To get rid of the installed `.equal()` method, call `.restore()`: + +```js + require('buffer-equal-constant-time').restore(); +``` + +# Legal + +© 2013 GoInstant Inc., a salesforce.com company + +Licensed under the BSD 3-clause license. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/package.json new file mode 100644 index 0000000000000000000000000000000000000000..17c7de22cac84ab43cbe3cb5f55d2c5ebe397e48 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/package.json @@ -0,0 +1,21 @@ +{ + "name": "buffer-equal-constant-time", + "version": "1.0.1", + "description": "Constant-time comparison of Buffers", + "main": "index.js", + "scripts": { + "test": "mocha test.js" + }, + "repository": "git@github.com:goinstant/buffer-equal-constant-time.git", + "keywords": [ + "buffer", + "equal", + "constant-time", + "crypto" + ], + "author": "GoInstant Inc., a salesforce.com company", + "license": "BSD-3-Clause", + "devDependencies": { + "mocha": "~1.15.1" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/test.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/test.js new file mode 100644 index 0000000000000000000000000000000000000000..0bc972d841aedb82e4449b935992ef9c8cf79b4f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/buffer-equal-constant-time/test.js @@ -0,0 +1,42 @@ +/*jshint node:true */ +'use strict'; + +var bufferEq = require('./index'); +var assert = require('assert'); + +describe('buffer-equal-constant-time', function() { + var a = new Buffer('asdfasdf123456'); + var b = new Buffer('asdfasdf123456'); + var c = new Buffer('asdfasdf'); + + describe('bufferEq', function() { + it('says a == b', function() { + assert.strictEqual(bufferEq(a, b), true); + }); + + it('says a != c', function() { + assert.strictEqual(bufferEq(a, c), false); + }); + }); + + describe('install/restore', function() { + before(function() { + bufferEq.install(); + }); + after(function() { + bufferEq.restore(); + }); + + it('installed an .equal method', function() { + var SlowBuffer = require('buffer').SlowBuffer; + assert.ok(Buffer.prototype.equal); + assert.ok(SlowBuffer.prototype.equal); + }); + + it('infected existing Buffers', function() { + assert.strictEqual(a.equal(b), true); + assert.strictEqual(a.equal(c), false); + }); + }); + +}); diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d4b08fc369948daacc146dcde0f63c3a79039852 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/README.md @@ -0,0 +1,68 @@ +# color-convert + +[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) + +Color-convert is a color conversion library for JavaScript and node. +It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): + +```js +var convert = require('color-convert'); + +convert.rgb.hsl(140, 200, 100); // [96, 48, 59] +convert.keyword.rgb('blue'); // [0, 0, 255] + +var rgbChannels = convert.rgb.channels; // 3 +var cmykChannels = convert.cmyk.channels; // 4 +var ansiChannels = convert.ansi16.channels; // 1 +``` + +# Install + +```console +$ npm install color-convert +``` + +# API + +Simply get the property of the _from_ and _to_ conversion that you're looking for. + +All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. + +All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). + +```js +var convert = require('color-convert'); + +// Hex to LAB +convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] +convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] + +// RGB to CMYK +convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] +convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] +``` + +### Arrays +All functions that accept multiple arguments also support passing an array. + +Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) + +```js +var convert = require('color-convert'); + +convert.rgb.hex(123, 45, 67); // '7B2D43' +convert.rgb.hex([123, 45, 67]); // '7B2D43' +``` + +## Routing + +Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). + +Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). + +# Contribute + +If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. + +# License +Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/conversions.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/conversions.js new file mode 100644 index 0000000000000000000000000000000000000000..2657f265c9e1022ed06a232f4da4db578d3d3fb0 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/conversions.js @@ -0,0 +1,839 @@ +/* MIT license */ +/* eslint-disable no-mixed-operators */ +const cssKeywords = require('color-name'); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +const reverseKeywords = {}; +for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; +} + +const convert = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +module.exports = convert; + +// Hide .channels and .labels properties +for (const model of Object.keys(convert)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + const {channels, labels} = convert[model]; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); +} + +convert.rgb.hsl = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const min = Math.min(r, g, b); + const max = Math.max(r, g, b); + const delta = max - min; + let h; + let s; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + const l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + let rdif; + let gdif; + let bdif; + let h; + let s; + + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const v = Math.max(r, g, b); + const diff = v - Math.min(r, g, b); + const diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = 0; + s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + const r = rgb[0]; + const g = rgb[1]; + let b = rgb[2]; + const h = convert.rgb.hsl(rgb)[0]; + const w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + + const k = Math.min(1 - r, 1 - g, 1 - b); + const c = (1 - r - k) / (1 - k) || 0; + const m = (1 - g - k) / (1 - k) || 0; + const y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +function comparativeDistance(x, y) { + /* + See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + */ + return ( + ((x[0] - y[0]) ** 2) + + ((x[1] - y[1]) ** 2) + + ((x[2] - y[2]) ** 2) + ); +} + +convert.rgb.keyword = function (rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + let currentClosestDistance = Infinity; + let currentClosestKeyword; + + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + + // Compute comparative distance + const distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + let r = rgb[0] / 255; + let g = rgb[1] / 255; + let b = rgb[2] / 255; + + // Assume sRGB + r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); + g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); + b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); + + const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + const xyz = convert.rgb.xyz(rgb); + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + const h = hsl[0] / 360; + const s = hsl[1] / 100; + const l = hsl[2] / 100; + let t2; + let t3; + let val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + const t1 = 2 * l - t2; + + const rgb = [0, 0, 0]; + for (let i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + const h = hsl[0]; + let s = hsl[1] / 100; + let l = hsl[2] / 100; + let smin = s; + const lmin = Math.max(l, 0.01); + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v = (l + s) / 2; + const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + const h = hsv[0] / 60; + const s = hsv[1] / 100; + let v = hsv[2] / 100; + const hi = Math.floor(h) % 6; + + const f = h - Math.floor(h); + const p = 255 * v * (1 - s); + const q = 255 * v * (1 - (s * f)); + const t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + const h = hsv[0]; + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const vmin = Math.max(v, 0.01); + let sl; + let l; + + l = (2 - s) * v; + const lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + const h = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f; + + // Wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + const i = Math.floor(6 * h); + const v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + const n = wh + f * (v - wh); // Linear interpolation + + let r; + let g; + let b; + /* eslint-disable max-statements-per-line,no-multi-spaces */ + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + /* eslint-enable max-statements-per-line,no-multi-spaces */ + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + const c = cmyk[0] / 100; + const m = cmyk[1] / 100; + const y = cmyk[2] / 100; + const k = cmyk[3] / 100; + + const r = 1 - Math.min(1, c * (1 - k) + k); + const g = 1 - Math.min(1, m * (1 - k) + k); + const b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + const x = xyz[0] / 100; + const y = xyz[1] / 100; + const z = xyz[2] / 100; + let r; + let g; + let b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // Assume sRGB + r = r > 0.0031308 + ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let x; + let y; + let z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + const y2 = y ** 3; + const x2 = x ** 3; + const z2 = z ** 3; + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let h; + + const hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + const c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + const l = lch[0]; + const c = lch[1]; + const h = lch[2]; + + const hr = h / 360 * 2 * Math.PI; + const a = c * Math.cos(hr); + const b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args, saturation = null) { + const [r, g, b] = args; + let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + let ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // Optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + const r = args[0]; + const g = args[1]; + const b = args[2]; + + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + const ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + let color = args % 10; + + // Handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + const mult = (~~(args > 50) + 1) * 0.5; + const r = ((color & 1) * mult) * 255; + const g = (((color >> 1) & 1) * mult) * 255; + const b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // Handle greyscale + if (args >= 232) { + const c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + let rem; + const r = Math.floor(args / 36) / 5 * 255; + const g = Math.floor((rem = args % 36) / 6) / 5 * 255; + const b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + const integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + let colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(char => { + return char + char; + }).join(''); + } + + const integer = parseInt(colorString, 16); + const r = (integer >> 16) & 0xFF; + const g = (integer >> 8) & 0xFF; + const b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const max = Math.max(Math.max(r, g), b); + const min = Math.min(Math.min(r, g), b); + const chroma = (max - min); + let grayscale; + let hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + const s = hsl[1] / 100; + const l = hsl[2] / 100; + + const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); + + let f = 0; + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + const s = hsv[1] / 100; + const v = hsv[2] / 100; + + const c = s * v; + let f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + const h = hcg[0] / 360; + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + const pure = [0, 0, 0]; + const hi = (h % 1) * 6; + const v = hi % 1; + const w = 1 - v; + let mg = 0; + + /* eslint-disable max-statements-per-line */ + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + /* eslint-enable max-statements-per-line */ + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const v = c + g * (1.0 - c); + let f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const l = g * (1.0 - c) + 0.5 * c; + let s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + const w = hwb[1] / 100; + const b = hwb[2] / 100; + const v = 1 - b; + const c = v - w; + let g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hsv = convert.gray.hsl; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + const val = Math.round(gray[0] / 100 * 255) & 0xFF; + const integer = (val << 16) + (val << 8) + val; + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/index.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b648e5737be6168bff5137cb1a5a897e55ce193d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/index.js @@ -0,0 +1,81 @@ +const conversions = require('./conversions'); +const route = require('./route'); + +const convert = {}; + +const models = Object.keys(conversions); + +function wrapRaw(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + return fn(args); + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + const result = fn(args); + + // We're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (let len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(fromModel => { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + const routes = route(fromModel); + const routeModels = Object.keys(routes); + + routeModels.forEach(toModel => { + const fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6e48000c7c98fd844af784fb2fdf7060f13ed0b1 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-convert/package.json @@ -0,0 +1,48 @@ +{ + "name": "color-convert", + "description": "Plain color conversion functions", + "version": "2.0.1", + "author": "Heather Arthur ", + "license": "MIT", + "repository": "Qix-/color-convert", + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "engines": { + "node": ">=7.0.0" + }, + "keywords": [ + "color", + "colour", + "convert", + "converter", + "conversion", + "rgb", + "hsl", + "hsv", + "hwb", + "cmyk", + "ansi", + "ansi16" + ], + "files": [ + "index.js", + "conversions.js", + "route.js" + ], + "xo": { + "rules": { + "default-case": 0, + "no-inline-comments": 0, + "operator-linebreak": 0 + } + }, + "devDependencies": { + "chalk": "^2.4.2", + "xo": "^0.24.0" + }, + "dependencies": { + "color-name": "~1.1.4" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-name/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-name/README.md new file mode 100644 index 0000000000000000000000000000000000000000..932b979176f33bf738aa6293c70bb3e451f2baf5 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/color-name/README.md @@ -0,0 +1,11 @@ +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/content-disposition/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/content-disposition/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..84441fbb5709262c2bfc9b5ff0166ad4f024a1b8 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/content-disposition/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2017 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/content-disposition/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/content-disposition/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3a0bb055949cdaed008f0f85e111624214213873 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/content-disposition/README.md @@ -0,0 +1,142 @@ +# content-disposition + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Create and parse HTTP `Content-Disposition` header + +## Installation + +```sh +$ npm install content-disposition +``` + +## API + +```js +var contentDisposition = require('content-disposition') +``` + +### contentDisposition(filename, options) + +Create an attachment `Content-Disposition` header value using the given file name, +if supplied. The `filename` is optional and if no file name is desired, but you +want to specify `options`, set `filename` to `undefined`. + +```js +res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf')) +``` + +**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this +header through a means different from `setHeader` in Node.js, you'll want to specify +the `'binary'` encoding in Node.js. + +#### Options + +`contentDisposition` accepts these properties in the options object. + +##### fallback + +If the `filename` option is outside ISO-8859-1, then the file name is actually +stored in a supplemental field for clients that support Unicode file names and +a ISO-8859-1 version of the file name is automatically generated. + +This specifies the ISO-8859-1 file name to override the automatic generation or +disables the generation all together, defaults to `true`. + + - A string will specify the ISO-8859-1 file name to use in place of automatic + generation. + - `false` will disable including a ISO-8859-1 file name and only include the + Unicode version (unless the file name is already ISO-8859-1). + - `true` will enable automatic generation if the file name is outside ISO-8859-1. + +If the `filename` option is ISO-8859-1 and this option is specified and has a +different value, then the `filename` option is encoded in the extended field +and this set as the fallback field, even though they are both ISO-8859-1. + +##### type + +Specifies the disposition type, defaults to `"attachment"`. This can also be +`"inline"`, or any other value (all values except inline are treated like +`attachment`, but can convey additional information if both parties agree to +it). The type is normalized to lower-case. + +### contentDisposition.parse(string) + +```js +var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt') +``` + +Parse a `Content-Disposition` header string. This automatically handles extended +("Unicode") parameters by decoding them and providing them under the standard +parameter name. This will return an object with the following properties (examples +are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`): + + - `type`: The disposition type (always lower case). Example: `'attachment'` + + - `parameters`: An object of the parameters in the disposition (name of parameter + always lower case and extended versions replace non-extended versions). Example: + `{filename: "€ rates.txt"}` + +## Examples + +### Send a file for download + +```js +var contentDisposition = require('content-disposition') +var destroy = require('destroy') +var fs = require('fs') +var http = require('http') +var onFinished = require('on-finished') + +var filePath = '/path/to/public/plans.pdf' + +http.createServer(function onRequest (req, res) { + // set headers + res.setHeader('Content-Type', 'application/pdf') + res.setHeader('Content-Disposition', contentDisposition(filePath)) + + // send file + var stream = fs.createReadStream(filePath) + stream.pipe(res) + onFinished(res, function () { + destroy(stream) + }) +}) +``` + +## Testing + +```sh +$ npm test +``` + +## References + +- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616] +- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987] +- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266] +- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231] + +[rfc-2616]: https://tools.ietf.org/html/rfc2616 +[rfc-5987]: https://tools.ietf.org/html/rfc5987 +[rfc-6266]: https://tools.ietf.org/html/rfc6266 +[tc-2231]: http://greenbytes.de/tech/tc2231/ + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/content-disposition.svg +[npm-url]: https://npmjs.org/package/content-disposition +[node-version-image]: https://img.shields.io/node/v/content-disposition.svg +[node-version-url]: https://nodejs.org/en/download +[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg +[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master +[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg +[downloads-url]: https://npmjs.org/package/content-disposition +[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/content-disposition/ci/master?label=ci +[github-actions-ci-url]: https://github.com/jshttp/content-disposition?query=workflow%3Aci diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/content-disposition/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/content-disposition/package.json new file mode 100644 index 0000000000000000000000000000000000000000..43c70ce24a45a9a8f9eec7c6b6a30e0324d3078d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/content-disposition/package.json @@ -0,0 +1,44 @@ +{ + "name": "content-disposition", + "description": "Create and parse Content-Disposition header", + "version": "0.5.4", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "content-disposition", + "http", + "rfc6266", + "res" + ], + "repository": "jshttp/content-disposition", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "devDependencies": { + "deep-equal": "1.0.1", + "eslint": "7.32.0", + "eslint-config-standard": "13.0.1", + "eslint-plugin-import": "2.25.3", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "istanbul": "0.4.5", + "mocha": "9.1.3" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cookie/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cookie/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..058b6b4efa3f45896ae691f2558a2a1aca05bebd --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cookie/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012-2014 Roman Shtylman +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cookie/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cookie/README.md new file mode 100644 index 0000000000000000000000000000000000000000..54e1cdae937eeaa1b7b9aac08408550acf305188 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cookie/README.md @@ -0,0 +1,248 @@ +# cookie + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coverage-image]][coverage-url] + +Basic HTTP cookie parser and serializer for HTTP servers. + +## Installation + +```sh +$ npm install cookie +``` + +## API + +```js +const cookie = require("cookie"); +// import * as cookie from 'cookie'; +``` + +### cookie.parse(str, options) + +Parse a HTTP `Cookie` header string and returning an object of all cookie name-value pairs. +The `str` argument is the string representing a `Cookie` header value and `options` is an +optional object containing additional parsing options. + +```js +const cookies = cookie.parse("foo=bar; equation=E%3Dmc%5E2"); +// { foo: 'bar', equation: 'E=mc^2' } +``` + +#### Options + +`cookie.parse` accepts these properties in the options object. + +##### decode + +Specifies a function that will be used to decode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1). +Since the value of a cookie has a limited character set (and must be a simple string), this function can be used to decode +a previously-encoded cookie value into a JavaScript string. + +The default function is the global `decodeURIComponent`, wrapped in a `try..catch`. If an error +is thrown it will return the cookie's original value. If you provide your own encode/decode +scheme you must ensure errors are appropriately handled. + +### cookie.serialize(name, value, options) + +Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the +name for the cookie, the `value` argument is the value to set the cookie to, and the `options` +argument is an optional object containing additional serialization options. + +```js +const setCookie = cookie.serialize("foo", "bar"); +// foo=bar +``` + +#### Options + +`cookie.serialize` accepts these properties in the options object. + +##### encode + +Specifies a function that will be used to encode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1). +Since value of a cookie has a limited character set (and must be a simple string), this function can be used to encode +a value into a string suited for a cookie's value, and should mirror `decode` when parsing. + +The default function is the global `encodeURIComponent`. + +##### maxAge + +Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.2). + +The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and +`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, +so if both are set, they should point to the same date and time. + +##### expires + +Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.1). +When no expiration is set clients consider this a "non-persistent cookie" and delete it the current session is over. + +The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and +`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, +so if both are set, they should point to the same date and time. + +##### domain + +Specifies the value for the [`Domain` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.3). +When no domain is set clients consider the cookie to apply to the current domain only. + +##### path + +Specifies the value for the [`Path` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.4). +When no path is set, the path is considered the ["default path"](https://tools.ietf.org/html/rfc6265#section-5.1.4). + +##### httpOnly + +Enables the [`HttpOnly` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.6). +When enabled, clients will not allow client-side JavaScript to see the cookie in `document.cookie`. + +##### secure + +Enables the [`Secure` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.5). +When enabled, clients will only send the cookie back if the browser has a HTTPS connection. + +##### partitioned + +Enables the [`Partitioned` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-cutler-httpbis-partitioned-cookies/). +When enabled, clients will only send the cookie back when the current domain _and_ top-level domain matches. + +This is an attribute that has not yet been fully standardized, and may change in the future. +This also means clients may ignore this attribute until they understand it. More information +about can be found in [the proposal](https://github.com/privacycg/CHIPS). + +##### priority + +Specifies the value for the [`Priority` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1). + +- `'low'` will set the `Priority` attribute to `Low`. +- `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set. +- `'high'` will set the `Priority` attribute to `High`. + +More information about priority levels can be found in [the specification](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1). + +##### sameSite + +Specifies the value for the [`SameSite` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7). + +- `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement. +- `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement. +- `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie. +- `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement. + +More information about enforcement levels can be found in [the specification](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7). + +## Example + +The following example uses this module in conjunction with the Node.js core HTTP server +to prompt a user for their name and display it back on future visits. + +```js +var cookie = require("cookie"); +var escapeHtml = require("escape-html"); +var http = require("http"); +var url = require("url"); + +function onRequest(req, res) { + // Parse the query string + var query = url.parse(req.url, true, true).query; + + if (query && query.name) { + // Set a new cookie with the name + res.setHeader( + "Set-Cookie", + cookie.serialize("name", String(query.name), { + httpOnly: true, + maxAge: 60 * 60 * 24 * 7, // 1 week + }), + ); + + // Redirect back after setting cookie + res.statusCode = 302; + res.setHeader("Location", req.headers.referer || "/"); + res.end(); + return; + } + + // Parse the cookies on the request + var cookies = cookie.parse(req.headers.cookie || ""); + + // Get the visitor name set in the cookie + var name = cookies.name; + + res.setHeader("Content-Type", "text/html; charset=UTF-8"); + + if (name) { + res.write("

Welcome back, " + escapeHtml(name) + "!

"); + } else { + res.write("

Hello, new visitor!

"); + } + + res.write('
'); + res.write( + ' ', + ); + res.end("
"); +} + +http.createServer(onRequest).listen(3000); +``` + +## Testing + +```sh +npm test +``` + +## Benchmark + +```sh +npm run bench +``` + +``` + name hz min max mean p75 p99 p995 p999 rme samples + · simple 8,566,313.09 0.0000 0.3694 0.0001 0.0001 0.0002 0.0002 0.0003 ±0.64% 4283157 fastest + · decode 3,834,348.85 0.0001 0.2465 0.0003 0.0003 0.0003 0.0004 0.0006 ±0.38% 1917175 + · unquote 8,315,355.96 0.0000 0.3824 0.0001 0.0001 0.0002 0.0002 0.0003 ±0.72% 4157880 + · duplicates 1,944,765.97 0.0004 0.2959 0.0005 0.0005 0.0006 0.0006 0.0008 ±0.24% 972384 + · 10 cookies 675,345.67 0.0012 0.4328 0.0015 0.0015 0.0019 0.0020 0.0058 ±0.75% 337673 + · 100 cookies 61,040.71 0.0152 0.4092 0.0164 0.0160 0.0196 0.0228 0.2260 ±0.71% 30521 slowest + ✓ parse top-sites (15) 22945ms + name hz min max mean p75 p99 p995 p999 rme samples + · parse accounts.google.com 7,164,349.17 0.0000 0.0929 0.0001 0.0002 0.0002 0.0002 0.0003 ±0.09% 3582184 + · parse apple.com 7,817,686.84 0.0000 0.6048 0.0001 0.0001 0.0002 0.0002 0.0003 ±1.05% 3908844 + · parse cloudflare.com 7,189,841.70 0.0000 0.0390 0.0001 0.0002 0.0002 0.0002 0.0003 ±0.06% 3594921 + · parse docs.google.com 7,051,765.61 0.0000 0.0296 0.0001 0.0002 0.0002 0.0002 0.0003 ±0.06% 3525883 + · parse drive.google.com 7,349,104.77 0.0000 0.0368 0.0001 0.0001 0.0002 0.0002 0.0003 ±0.05% 3674553 + · parse en.wikipedia.org 1,929,909.49 0.0004 0.3598 0.0005 0.0005 0.0007 0.0007 0.0012 ±0.16% 964955 + · parse linkedin.com 2,225,658.01 0.0003 0.0595 0.0004 0.0005 0.0005 0.0005 0.0006 ±0.06% 1112830 + · parse maps.google.com 4,423,511.68 0.0001 0.0942 0.0002 0.0003 0.0003 0.0003 0.0005 ±0.08% 2211756 + · parse microsoft.com 3,387,601.88 0.0002 0.0725 0.0003 0.0003 0.0004 0.0004 0.0005 ±0.09% 1693801 + · parse play.google.com 7,375,980.86 0.0000 0.1994 0.0001 0.0001 0.0002 0.0002 0.0003 ±0.12% 3687991 + · parse support.google.com 4,912,267.94 0.0001 2.8958 0.0002 0.0002 0.0003 0.0003 0.0005 ±1.28% 2456134 + · parse www.google.com 3,443,035.87 0.0002 0.2783 0.0003 0.0003 0.0004 0.0004 0.0007 ±0.51% 1721518 + · parse youtu.be 1,910,492.87 0.0004 0.3490 0.0005 0.0005 0.0007 0.0007 0.0011 ±0.46% 955247 + · parse youtube.com 1,895,082.62 0.0004 0.7454 0.0005 0.0005 0.0006 0.0007 0.0013 ±0.64% 947542 slowest + · parse example.com 21,582,835.27 0.0000 0.1095 0.0000 0.0000 0.0001 0.0001 0.0001 ±0.13% 10791418 +``` + +## References + +- [RFC 6265: HTTP State Management Mechanism](https://tools.ietf.org/html/rfc6265) +- [Same-site Cookies](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7) + +## License + +[MIT](LICENSE) + +[ci-image]: https://img.shields.io/github/actions/workflow/status/jshttp/cookie/ci.yml +[ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml?query=branch%3Amaster +[coverage-image]: https://img.shields.io/codecov/c/github/jshttp/cookie/master +[coverage-url]: https://app.codecov.io/gh/jshttp/cookie +[npm-downloads-image]: https://img.shields.io/npm/dm/cookie +[npm-url]: https://npmjs.org/package/cookie +[npm-version-image]: https://img.shields.io/npm/v/cookie diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cookie/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cookie/package.json new file mode 100644 index 0000000000000000000000000000000000000000..64fe124adf57e633e73955d9f3a1c7b81d9a9a03 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cookie/package.json @@ -0,0 +1,42 @@ +{ + "name": "cookie", + "version": "1.0.2", + "description": "HTTP server cookie parsing and serialization", + "keywords": [ + "cookie", + "cookies" + ], + "repository": "jshttp/cookie", + "license": "MIT", + "author": "Roman Shtylman ", + "contributors": [ + "Douglas Christopher Wilson " + ], + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "bench": "vitest bench", + "build": "ts-scripts build", + "format": "ts-scripts format", + "prepare": "ts-scripts install", + "prepublishOnly": "npm run build", + "specs": "ts-scripts specs", + "test": "ts-scripts test" + }, + "devDependencies": { + "@borderless/ts-scripts": "^0.15.0", + "@vitest/coverage-v8": "^2.1.2", + "top-sites": "1.1.194", + "typescript": "^5.6.2", + "vitest": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "ts-scripts": { + "project": "tsconfig.build.json" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8407b9a30f51b0da9eaac366bdde18d900e951ba --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1ed9252b51b5e8e29fb898afb5fb969205af2dee --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/README.md @@ -0,0 +1,89 @@ +# cross-spawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Build status][appveyor-image]][appveyor-url] + +[npm-url]:https://npmjs.org/package/cross-spawn +[downloads-image]:https://img.shields.io/npm/dm/cross-spawn.svg +[npm-image]:https://img.shields.io/npm/v/cross-spawn.svg +[ci-url]:https://github.com/moxystudio/node-cross-spawn/actions/workflows/ci.yaml +[ci-image]:https://github.com/moxystudio/node-cross-spawn/actions/workflows/ci.yaml/badge.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg + +A cross platform solution to node's spawn and spawnSync. + +## Installation + +Node.js version 8 and up: +`$ npm install cross-spawn` + +Node.js version 7 and under: +`$ npm install cross-spawn@6` + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix)) +- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367) +- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`) +- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149) +- No `options.shell` support on node `` where `` must not contain any arguments. +If you would like to have the shebang support improved, feel free to contribute via a pull-request. + +Remember to always test your code on Windows! + + +## Tests + +`$ npm test` +`$ npm test -- --watch` during development + + +## License + +Released under the [MIT License](https://www.opensource.org/licenses/mit-license.php). diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/index.js b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5509742ca9fa8f500a66e6e7195037a7c1d5e49e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/index.js @@ -0,0 +1,39 @@ +'use strict'; + +const cp = require('child_process'); +const parse = require('./lib/parse'); +const enoent = require('./lib/enoent'); + +function spawn(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/package.json new file mode 100644 index 0000000000000000000000000000000000000000..24b2eb4c9900cfe2a7d04a7f6b49bf2092f4a81a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/cross-spawn/package.json @@ -0,0 +1,73 @@ +{ + "name": "cross-spawn", + "version": "7.0.6", + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross-platform", + "path-ext", + "shebang", + "cmd", + "execute" + ], + "author": "André Cruz ", + "homepage": "https://github.com/moxystudio/node-cross-spawn", + "repository": { + "type": "git", + "url": "git@github.com:moxystudio/node-cross-spawn.git" + }, + "license": "MIT", + "main": "index.js", + "files": [ + "lib" + ], + "scripts": { + "lint": "eslint .", + "test": "jest --env node --coverage", + "prerelease": "npm t && npm run lint", + "release": "standard-version", + "postrelease": "git push --follow-tags origin HEAD && npm publish" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ] + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "devDependencies": { + "@commitlint/cli": "^8.1.0", + "@commitlint/config-conventional": "^8.1.0", + "babel-core": "^6.26.3", + "babel-jest": "^24.9.0", + "babel-preset-moxy": "^3.1.0", + "eslint": "^5.16.0", + "eslint-config-moxy": "^7.1.0", + "husky": "^3.0.5", + "jest": "^24.9.0", + "lint-staged": "^9.2.5", + "mkdirp": "^0.5.1", + "rimraf": "^3.0.0", + "standard-version": "^9.5.0" + }, + "engines": { + "node": ">= 8" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/data-uri-to-buffer/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/data-uri-to-buffer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d0f2e05973586a9e863337877138fe0a600cd2ee --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/data-uri-to-buffer/README.md @@ -0,0 +1,88 @@ +data-uri-to-buffer +================== +### Generate a Buffer instance from a [Data URI][rfc] string +[![Build Status](https://travis-ci.org/TooTallNate/node-data-uri-to-buffer.svg?branch=master)](https://travis-ci.org/TooTallNate/node-data-uri-to-buffer) + +This module accepts a ["data" URI][rfc] String of data, and returns a +node.js `Buffer` instance with the decoded data. + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install data-uri-to-buffer +``` + + +Example +------- + +``` js +import dataUriToBuffer from 'data-uri-to-buffer'; + +// plain-text data is supported +let uri = 'data:,Hello%2C%20World!'; +let decoded = dataUriToBuffer(uri); +console.log(decoded.toString()); +// 'Hello, World!' + +// base64-encoded data is supported +uri = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D'; +decoded = dataUriToBuffer(uri); +console.log(decoded.toString()); +// 'Hello, World!' +``` + + +API +--- + +### dataUriToBuffer(String uri) → Buffer + +The `type` property on the Buffer instance gets set to the main type portion of +the "mediatype" portion of the "data" URI, or defaults to `"text/plain"` if not +specified. + +The `typeFull` property on the Buffer instance gets set to the entire +"mediatype" portion of the "data" URI (including all parameters), or defaults +to `"text/plain;charset=US-ASCII"` if not specified. + +The `charset` property on the Buffer instance gets set to the Charset portion of +the "mediatype" portion of the "data" URI, or defaults to `"US-ASCII"` if the +entire type is not specified, or defaults to `""` otherwise. + +*Note*: If the only the main type is specified but not the charset, e.g. +`"data:text/plain,abc"`, the charset is set to the empty string. The spec only +defaults to US-ASCII as charset if the entire type is not specified. + + +License +------- + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +[rfc]: http://tools.ietf.org/html/rfc2397 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/data-uri-to-buffer/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/data-uri-to-buffer/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9e427132e04314e1f96914db46c6942421097efb --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/data-uri-to-buffer/package.json @@ -0,0 +1,62 @@ +{ + "name": "data-uri-to-buffer", + "version": "4.0.1", + "description": "Generate a Buffer instance from a Data URI string", + "type": "module", + "exports": "./dist/index.js", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "src" + ], + "scripts": { + "build": "tsc", + "test": "jest", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-data-uri-to-buffer.git" + }, + "engines": { + "node": ">= 12" + }, + "keywords": [ + "data", + "uri", + "datauri", + "data-uri", + "buffer", + "convert", + "rfc2397", + "2397" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/node-data-uri-to-buffer/issues" + }, + "homepage": "https://github.com/TooTallNate/node-data-uri-to-buffer", + "devDependencies": { + "@types/jest": "^27.0.2", + "@types/node": "^12.20.36", + "jest": "^27.3.1", + "ts-jest": "^27.0.7", + "typescript": "^4.4.4" + }, + "jest": { + "preset": "ts-jest", + "globals": { + "ts-jest": { + "diagnostics": false, + "isolatedModules": true + } + }, + "verbose": false, + "testEnvironment": "node", + "testMatch": [ + "/test/**/*.test.ts" + ] + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/debug/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/debug/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1a9820e262b26b60fe71a4dcd9bc9cfd0a01f26e --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/debug/LICENSE @@ -0,0 +1,20 @@ +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/debug/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/debug/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9ebdfbf1491ef8bdffb942ee0b475e38a65379bf --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/debug/README.md @@ -0,0 +1,481 @@ +# debug +[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example [_app.js_](./examples/node/app.js): + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %o', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example [_worker.js_](./examples/node/worker.js): + +```js +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); + +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); +``` + +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: + +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm + +#### Windows command prompt notes + +##### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=*,-not_this +``` + +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` + +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + +Then, run the program to be debugged as usual. + +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + +## Millisecond diff + +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + + +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + + + + +## Conventions + +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + +## Wildcards + +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". + +## Environment Variables + +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. + +## Formatters + +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + + +### Custom formatters + +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + + +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + +In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. + + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example [_stdout.js_](./examples/node/stdout.js): + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + +## Usage in child processes + +Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. +For example: + +```javascript +worker = fork(WORKER_WRAP_PATH, [workerPath], { + stdio: [ + /* stdin: */ 0, + /* stdout: */ 'pipe', + /* stderr: */ 'pipe', + 'ipc', + ], + env: Object.assign({}, process.env, { + DEBUG_COLORS: 1 // without this settings, colors won't be shown + }), +}); + +worker.stderr.pipe(process.stderr, { end: false }); +``` + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + - Josh Junon + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/debug/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/debug/package.json new file mode 100644 index 0000000000000000000000000000000000000000..afc2f8b615b2229c7b3b818c5f4b6f90dcc99f9a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/debug/package.json @@ -0,0 +1,64 @@ +{ + "name": "debug", + "version": "4.4.1", + "repository": { + "type": "git", + "url": "git://github.com/debug-js/debug.git" + }, + "description": "Lightweight debugging utility for Node.js and the browser", + "keywords": [ + "debug", + "log", + "debugger" + ], + "files": [ + "src", + "LICENSE", + "README.md" + ], + "author": "Josh Junon (https://github.com/qix-)", + "contributors": [ + "TJ Holowaychuk ", + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser && npm run lint", + "test:node": "mocha test.js test.node.js", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls" + }, + "dependencies": { + "ms": "^2.1.3" + }, + "devDependencies": { + "brfs": "^2.0.1", + "browserify": "^16.2.3", + "coveralls": "^3.0.2", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "mocha": "^5.2.0", + "mocha-lcov-reporter": "^1.2.0", + "sinon": "^14.0.0", + "xo": "^0.23.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "engines": { + "node": ">=6.0" + }, + "xo": { + "rules": { + "import/extensions": "off" + } + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/depd/Readme.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/depd/Readme.md new file mode 100644 index 0000000000000000000000000000000000000000..043d1ca28403a9460a22fcd403b559b90244458f --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/depd/Readme.md @@ -0,0 +1,280 @@ +# depd + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Linux Build][travis-image]][travis-url] +[![Windows Build][appveyor-image]][appveyor-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +Deprecate all the things + +> With great modules comes great responsibility; mark things deprecated! + +## Install + +This module is installed directly using `npm`: + +```sh +$ npm install depd +``` + +This module can also be bundled with systems like +[Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/), +though by default this module will alter it's API to no longer display or +track deprecations. + +## API + + + +```js +var deprecate = require('depd')('my-module') +``` + +This library allows you to display deprecation messages to your users. +This library goes above and beyond with deprecation warnings by +introspection of the call stack (but only the bits that it is interested +in). + +Instead of just warning on the first invocation of a deprecated +function and never again, this module will warn on the first invocation +of a deprecated function per unique call site, making it ideal to alert +users of all deprecated uses across the code base, rather than just +whatever happens to execute first. + +The deprecation warnings from this module also include the file and line +information for the call into the module that the deprecated function was +in. + +**NOTE** this library has a similar interface to the `debug` module, and +this module uses the calling file to get the boundary for the call stacks, +so you should always create a new `deprecate` object in each file and not +within some central file. + +### depd(namespace) + +Create a new deprecate function that uses the given namespace name in the +messages and will display the call site prior to the stack entering the +file this function was called from. It is highly suggested you use the +name of your module as the namespace. + +### deprecate(message) + +Call this function from deprecated code to display a deprecation message. +This message will appear once per unique caller site. Caller site is the +first call site in the stack in a different file from the caller of this +function. + +If the message is omitted, a message is generated for you based on the site +of the `deprecate()` call and will display the name of the function called, +similar to the name displayed in a stack trace. + +### deprecate.function(fn, message) + +Call this function to wrap a given function in a deprecation message on any +call to the function. An optional message can be supplied to provide a custom +message. + +### deprecate.property(obj, prop, message) + +Call this function to wrap a given property on object in a deprecation message +on any accessing or setting of the property. An optional message can be supplied +to provide a custom message. + +The method must be called on the object where the property belongs (not +inherited from the prototype). + +If the property is a data descriptor, it will be converted to an accessor +descriptor in order to display the deprecation message. + +### process.on('deprecation', fn) + +This module will allow easy capturing of deprecation errors by emitting the +errors as the type "deprecation" on the global `process`. If there are no +listeners for this type, the errors are written to STDERR as normal, but if +there are any listeners, nothing will be written to STDERR and instead only +emitted. From there, you can write the errors in a different format or to a +logging source. + +The error represents the deprecation and is emitted only once with the same +rules as writing to STDERR. The error has the following properties: + + - `message` - This is the message given by the library + - `name` - This is always `'DeprecationError'` + - `namespace` - This is the namespace the deprecation came from + - `stack` - This is the stack of the call to the deprecated thing + +Example `error.stack` output: + +``` +DeprecationError: my-cool-module deprecated oldfunction + at Object. ([eval]-wrapper:6:22) + at Module._compile (module.js:456:26) + at evalScript (node.js:532:25) + at startup (node.js:80:7) + at node.js:902:3 +``` + +### process.env.NO_DEPRECATION + +As a user of modules that are deprecated, the environment variable `NO_DEPRECATION` +is provided as a quick solution to silencing deprecation warnings from being +output. The format of this is similar to that of `DEBUG`: + +```sh +$ NO_DEPRECATION=my-module,othermod node app.js +``` + +This will suppress deprecations from being output for "my-module" and "othermod". +The value is a list of comma-separated namespaces. To suppress every warning +across all namespaces, use the value `*` for a namespace. + +Providing the argument `--no-deprecation` to the `node` executable will suppress +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not suppress the deperecations given to any "deprecation" +event listeners, just the output to STDERR. + +### process.env.TRACE_DEPRECATION + +As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION` +is provided as a solution to getting more detailed location information in deprecation +warnings by including the entire stack trace. The format of this is the same as +`NO_DEPRECATION`: + +```sh +$ TRACE_DEPRECATION=my-module,othermod node app.js +``` + +This will include stack traces for deprecations being output for "my-module" and +"othermod". The value is a list of comma-separated namespaces. To trace every +warning across all namespaces, use the value `*` for a namespace. + +Providing the argument `--trace-deprecation` to the `node` executable will trace +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`. + +## Display + +![message](files/message.png) + +When a user calls a function in your library that you mark deprecated, they +will see the following written to STDERR (in the given colors, similar colors +and layout to the `debug` module): + +``` +bright cyan bright yellow +| | reset cyan +| | | | +▼ ▼ ▼ ▼ +my-cool-module deprecated oldfunction [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ +| | | | +namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +If the user redirects their STDERR to a file or somewhere that does not support +colors, they see (similar layout to the `debug` module): + +``` +Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ ▲ +| | | | | +timestamp of message namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +## Examples + +### Deprecating all calls to a function + +This will display a deprecated message about "oldfunction" being deprecated +from "my-module" on STDERR. + +```js +var deprecate = require('depd')('my-cool-module') + +// message automatically derived from function name +// Object.oldfunction +exports.oldfunction = deprecate.function(function oldfunction () { + // all calls to function are deprecated +}) + +// specific message +exports.oldfunction = deprecate.function(function () { + // all calls to function are deprecated +}, 'oldfunction') +``` + +### Conditionally deprecating a function call + +This will display a deprecated message about "weirdfunction" being deprecated +from "my-module" on STDERR when called with less than 2 arguments. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } +} +``` + +When calling `deprecate` as a function, the warning is counted per call site +within your own module, so you can display different deprecations depending +on different situations and the users will still get all the warnings: + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } else if (typeof arguments[0] !== 'string') { + // calls with non-string first argument are deprecated + deprecate('weirdfunction non-string first arg') + } +} +``` + +### Deprecating property access + +This will display a deprecated message about "oldprop" being deprecated +from "my-module" on STDERR when accessed. A deprecation will be displayed +when setting the value and when getting the value. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.oldprop = 'something' + +// message automatically derives from property name +deprecate.property(exports, 'oldprop') + +// explicit message +deprecate.property(exports, 'oldprop', 'oldprop >= 0.10') +``` + +## License + +[MIT](LICENSE) + +[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/nodejs-depd/master?label=windows +[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd +[coveralls-image]: https://badgen.net/coveralls/c/github/dougwilson/nodejs-depd/master +[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master +[node-image]: https://badgen.net/npm/node/depd +[node-url]: https://nodejs.org/en/download/ +[npm-downloads-image]: https://badgen.net/npm/dm/depd +[npm-url]: https://npmjs.org/package/depd +[npm-version-image]: https://badgen.net/npm/v/depd +[travis-image]: https://badgen.net/travis/dougwilson/nodejs-depd/master?label=linux +[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/depd/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/depd/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3857e199184a0a3f0d921e740525278af0f86ff3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/depd/package.json @@ -0,0 +1,45 @@ +{ + "name": "depd", + "description": "Deprecate all the things", + "version": "2.0.0", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "deprecate", + "deprecated" + ], + "repository": "dougwilson/nodejs-depd", + "browser": "lib/browser/index.js", + "devDependencies": { + "benchmark": "2.1.4", + "beautify-benchmark": "0.2.4", + "eslint": "5.7.0", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.14.0", + "eslint-plugin-markdown": "1.0.0-beta.7", + "eslint-plugin-node": "7.0.1", + "eslint-plugin-promise": "4.0.1", + "eslint-plugin-standard": "4.0.0", + "istanbul": "0.4.5", + "mocha": "5.2.0", + "safe-buffer": "5.1.2", + "uid-safe": "2.1.5" + }, + "files": [ + "lib/", + "History.md", + "LICENSE", + "index.js", + "Readme.md" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail test/", + "test-ci": "istanbul cover --print=none node_modules/mocha/bin/_mocha -- --reporter spec test/ && istanbul report lcovonly text-summary", + "test-cov": "istanbul cover --print=none node_modules/mocha/bin/_mocha -- --reporter dot test/ && istanbul report lcov text-summary" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/index.d.ts b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a9aea5d506ad986388394ac50b80d3575762f01d --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/index.d.ts @@ -0,0 +1 @@ +export function dequal(foo: any, bar: any): boolean; \ No newline at end of file diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/license b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/license new file mode 100644 index 0000000000000000000000000000000000000000..a3f96f828458d4ccf4ca8e9b0949300f1916e114 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Luke Edwards (lukeed.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/package.json b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/package.json new file mode 100644 index 0000000000000000000000000000000000000000..df1cb29cb2e5c7eab5e9ce586a5afd78d8db78ab --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/package.json @@ -0,0 +1,57 @@ +{ + "name": "dequal", + "version": "2.0.3", + "repository": "lukeed/dequal", + "description": "A tiny (304B to 489B) utility for check for deep equality", + "unpkg": "dist/index.min.js", + "module": "dist/index.mjs", + "main": "dist/index.js", + "types": "index.d.ts", + "license": "MIT", + "author": { + "name": "Luke Edwards", + "email": "luke.edwards05@gmail.com", + "url": "https://lukeed.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "build": "bundt", + "pretest": "npm run build", + "postbuild": "echo \"lite\" | xargs -n1 cp -v index.d.ts", + "test": "uvu -r esm test" + }, + "files": [ + "*.d.ts", + "dist", + "lite" + ], + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./lite": { + "types": "./index.d.ts", + "import": "./lite/index.mjs", + "require": "./lite/index.js" + }, + "./package.json": "./package.json" + }, + "modes": { + "lite": "src/lite.js", + "default": "src/index.js" + }, + "keywords": [ + "deep", + "deep-equal", + "equality" + ], + "devDependencies": { + "bundt": "1.0.2", + "esm": "3.2.25", + "uvu": "0.3.2" + } +} diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/readme.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..e3341ef475a0b5d22cc8ffef317a27de879605c3 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dequal/readme.md @@ -0,0 +1,112 @@ +# dequal [![CI](https://github.com/lukeed/dequal/workflows/CI/badge.svg)](https://github.com/lukeed/dequal/actions) + +> A tiny (304B to 489B) utility to check for deep equality + +This module supports comparison of all types, including `Function`, `RegExp`, `Date`, `Set`, `Map`, `TypedArray`s, `DataView`, `null`, `undefined`, and `NaN` values. Complex values (eg, Objects, Arrays, Sets, Maps, etc) are traversed recursively. + +> **Important:** +> * key order **within Objects** does not matter +> * value order **within Arrays** _does_ matter +> * values **within Sets and Maps** use value equality +> * keys **within Maps** use value equality + + +## Install + +``` +$ npm install --save dequal +``` + +## Modes + +There are two "versions" of `dequal` available: + +#### `dequal` +> **Size (gzip):** 489 bytes
+> **Availability:** [CommonJS](https://unpkg.com/dequal/dist/index.js), [ES Module](https://unpkg.com/dequal/dist/index.mjs), [UMD](https://unpkg.com/dequal/dist/index.min.js) + +#### `dequal/lite` +> **Size (gzip):** 304 bytes
+> **Availability:** [CommonJS](https://unpkg.com/dequal/lite/index.js), [ES Module](https://unpkg.com/dequal/lite/index.mjs) + +| | IE9+ | Number | String | Date | RegExp | Object | Array | Class | Set | Map | ArrayBuffer | [TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#TypedArray_objects) | [DataView](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) | +|-|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:| +| `dequal` | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `dequal/lite` | :+1: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | + +> **Note:** Table scrolls horizontally! + +## Usage + +```js +import { dequal } from 'dequal'; + +dequal(1, 1); //=> true +dequal({}, {}); //=> true +dequal('foo', 'foo'); //=> true +dequal([1, 2, 3], [1, 2, 3]); //=> true +dequal(dequal, dequal); //=> true +dequal(/foo/, /foo/); //=> true +dequal(null, null); //=> true +dequal(NaN, NaN); //=> true +dequal([], []); //=> true +dequal( + [{ a:1 }, [{ b:{ c:[1] } }]], + [{ a:1 }, [{ b:{ c:[1] } }]] +); //=> true + +dequal(1, '1'); //=> false +dequal(null, undefined); //=> false +dequal({ a:1, b:[2,3] }, { a:1, b:[2,5] }); //=> false +dequal(/foo/i, /bar/g); //=> false +``` + +## API + +### dequal(foo, bar) +Returns: `Boolean` + +Both `foo` and `bar` can be of any type.
+A `Boolean` is returned indicating if the two were deeply equal. + + +## Benchmarks + +> Running Node v10.13.0 + +The benchmarks can be found in the [`/bench`](/bench) directory. They are separated into two categories: + +* `basic` – compares an object comprised of `String`, `Number`, `Date`, `Array`, and `Object` values. +* `complex` – like `basic`, but adds `RegExp`, `Map`, `Set`, and `Uint8Array` values. + +> **Note:** Only candidates that pass validation step(s) are listed.
For example, `fast-deep-equal/es6` handles `Set` and `Map` values, but uses _referential equality_ while those listed use _value equality_. + +``` +Load times: + assert 0.109ms + util 0.006ms + fast-deep-equal 0.479ms + lodash/isequal 22.826ms + nano-equal 0.417ms + dequal 0.396ms + dequal/lite 0.264ms + +Benchmark :: basic + assert.deepStrictEqual x 325,262 ops/sec ±0.57% (94 runs sampled) + util.isDeepStrictEqual x 318,812 ops/sec ±0.87% (94 runs sampled) + fast-deep-equal x 1,332,393 ops/sec ±0.36% (93 runs sampled) + lodash.isEqual x 269,129 ops/sec ±0.59% (95 runs sampled) + nano-equal x 1,122,053 ops/sec ±0.36% (96 runs sampled) + dequal/lite x 1,700,972 ops/sec ±0.31% (94 runs sampled) + dequal x 1,698,972 ops/sec ±0.63% (97 runs sampled) + +Benchmark :: complex + assert.deepStrictEqual x 124,518 ops/sec ±0.64% (96 runs sampled) + util.isDeepStrictEqual x 125,113 ops/sec ±0.24% (96 runs sampled) + lodash.isEqual x 58,677 ops/sec ±0.49% (96 runs sampled) + dequal x 345,386 ops/sec ±0.27% (96 runs sampled) +``` + +## License + +MIT © [Luke Edwards](https://lukeed.com) diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dotenv/CHANGELOG.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dotenv/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..8b80dd6c53539d36b49a9320d047ad961fe6cc9c --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dotenv/CHANGELOG.md @@ -0,0 +1,520 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [Unreleased](https://github.com/motdotla/dotenv/compare/v16.6.1...master) + +## [16.6.1](https://github.com/motdotla/dotenv/compare/v16.6.0...v16.6.1) (2025-06-27) + +### Changed + +- Default `quiet` to true – hiding the runtime log message ([#874](https://github.com/motdotla/dotenv/pull/874)) +- NOTICE: 17.0.0 will be released with quiet defaulting to false. Use `config({ quiet: true })` to suppress. +- And check out the new [dotenvx](https://github.com/dotenvx/dotenvx). As coding workflows evolve and agents increasingly handle secrets, encrypted .env files offer a much safer way to deploy both agents and code together with secure secrets. Simply switch `require('dotenv').config()` for `require('@dotenvx/dotenvx').config()`. + +## [16.6.0](https://github.com/motdotla/dotenv/compare/v16.5.0...v16.6.0) (2025-06-26) + +### Added + +- Default log helpful message `[dotenv@16.6.0] injecting env (1) from .env` ([#870](https://github.com/motdotla/dotenv/pull/870)) +- Use `{ quiet: true }` to suppress +- Aligns dotenv more closely with [dotenvx](https://github.com/dotenvx/dotenvx). + +## [16.5.0](https://github.com/motdotla/dotenv/compare/v16.4.7...v16.5.0) (2025-04-07) + +### Added + +- 🎉 Added new sponsor [Graphite](https://graphite.dev/?utm_source=github&utm_medium=repo&utm_campaign=dotenv) - *the AI developer productivity platform helping teams on GitHub ship higher quality software, faster*. + +> [!TIP] +> **[Become a sponsor](https://github.com/sponsors/motdotla)** +> +> The dotenvx README is viewed thousands of times DAILY on GitHub and NPM. +> Sponsoring dotenv is a great way to get in front of developers and give back to the developer community at the same time. + +### Changed + +- Remove `_log` method. Use `_debug` [#862](https://github.com/motdotla/dotenv/pull/862) + +## [16.4.7](https://github.com/motdotla/dotenv/compare/v16.4.6...v16.4.7) (2024-12-03) + +### Changed + +- Ignore `.tap` folder when publishing. (oops, sorry about that everyone. - @motdotla) [#848](https://github.com/motdotla/dotenv/pull/848) + +## [16.4.6](https://github.com/motdotla/dotenv/compare/v16.4.5...v16.4.6) (2024-12-02) + +### Changed + +- Clean up stale dev dependencies [#847](https://github.com/motdotla/dotenv/pull/847) +- Various README updates clarifying usage and alternative solutions using [dotenvx](https://github.com/dotenvx/dotenvx) + +## [16.4.5](https://github.com/motdotla/dotenv/compare/v16.4.4...v16.4.5) (2024-02-19) + +### Changed + +- 🐞 Fix recent regression when using `path` option. return to historical behavior: do not attempt to auto find `.env` if `path` set. (regression was introduced in `16.4.3`) [#814](https://github.com/motdotla/dotenv/pull/814) + +## [16.4.4](https://github.com/motdotla/dotenv/compare/v16.4.3...v16.4.4) (2024-02-13) + +### Changed + +- 🐞 Replaced chaining operator `?.` with old school `&&` (fixing node 12 failures) [#812](https://github.com/motdotla/dotenv/pull/812) + +## [16.4.3](https://github.com/motdotla/dotenv/compare/v16.4.2...v16.4.3) (2024-02-12) + +### Changed + +- Fixed processing of multiple files in `options.path` [#805](https://github.com/motdotla/dotenv/pull/805) + +## [16.4.2](https://github.com/motdotla/dotenv/compare/v16.4.1...v16.4.2) (2024-02-10) + +### Changed + +- Changed funding link in package.json to [`dotenvx.com`](https://dotenvx.com) + +## [16.4.1](https://github.com/motdotla/dotenv/compare/v16.4.0...v16.4.1) (2024-01-24) + +- Patch support for array as `path` option [#797](https://github.com/motdotla/dotenv/pull/797) + +## [16.4.0](https://github.com/motdotla/dotenv/compare/v16.3.2...v16.4.0) (2024-01-23) + +- Add `error.code` to error messages around `.env.vault` decryption handling [#795](https://github.com/motdotla/dotenv/pull/795) +- Add ability to find `.env.vault` file when filename(s) passed as an array [#784](https://github.com/motdotla/dotenv/pull/784) + +## [16.3.2](https://github.com/motdotla/dotenv/compare/v16.3.1...v16.3.2) (2024-01-18) + +### Added + +- Add debug message when no encoding set [#735](https://github.com/motdotla/dotenv/pull/735) + +### Changed + +- Fix output typing for `populate` [#792](https://github.com/motdotla/dotenv/pull/792) +- Use subarray instead of slice [#793](https://github.com/motdotla/dotenv/pull/793) + +## [16.3.1](https://github.com/motdotla/dotenv/compare/v16.3.0...v16.3.1) (2023-06-17) + +### Added + +- Add missing type definitions for `processEnv` and `DOTENV_KEY` options. [#756](https://github.com/motdotla/dotenv/pull/756) + +## [16.3.0](https://github.com/motdotla/dotenv/compare/v16.2.0...v16.3.0) (2023-06-16) + +### Added + +- Optionally pass `DOTENV_KEY` to options rather than relying on `process.env.DOTENV_KEY`. Defaults to `process.env.DOTENV_KEY` [#754](https://github.com/motdotla/dotenv/pull/754) + +## [16.2.0](https://github.com/motdotla/dotenv/compare/v16.1.4...v16.2.0) (2023-06-15) + +### Added + +- Optionally write to your own target object rather than `process.env`. Defaults to `process.env`. [#753](https://github.com/motdotla/dotenv/pull/753) +- Add import type URL to types file [#751](https://github.com/motdotla/dotenv/pull/751) + +## [16.1.4](https://github.com/motdotla/dotenv/compare/v16.1.3...v16.1.4) (2023-06-04) + +### Added + +- Added `.github/` to `.npmignore` [#747](https://github.com/motdotla/dotenv/pull/747) + +## [16.1.3](https://github.com/motdotla/dotenv/compare/v16.1.2...v16.1.3) (2023-05-31) + +### Removed + +- Removed `browser` keys for `path`, `os`, and `crypto` in package.json. These were set to false incorrectly as of 16.1. Instead, if using dotenv on the front-end make sure to include polyfills for `path`, `os`, and `crypto`. [node-polyfill-webpack-plugin](https://github.com/Richienb/node-polyfill-webpack-plugin) provides these. + +## [16.1.2](https://github.com/motdotla/dotenv/compare/v16.1.1...v16.1.2) (2023-05-31) + +### Changed + +- Exposed private function `_configDotenv` as `configDotenv`. [#744](https://github.com/motdotla/dotenv/pull/744) + +## [16.1.1](https://github.com/motdotla/dotenv/compare/v16.1.0...v16.1.1) (2023-05-30) + +### Added + +- Added type definition for `decrypt` function + +### Changed + +- Fixed `{crypto: false}` in `packageJson.browser` + +## [16.1.0](https://github.com/motdotla/dotenv/compare/v16.0.3...v16.1.0) (2023-05-30) + +### Added + +- Add `populate` convenience method [#733](https://github.com/motdotla/dotenv/pull/733) +- Accept URL as path option [#720](https://github.com/motdotla/dotenv/pull/720) +- Add dotenv to `npm fund` command +- Spanish language README [#698](https://github.com/motdotla/dotenv/pull/698) +- Add `.env.vault` support. 🎉 ([#730](https://github.com/motdotla/dotenv/pull/730)) + +ℹ️ `.env.vault` extends the `.env` file format standard with a localized encrypted vault file. Package it securely with your production code deploys. It's cloud agnostic so that you can deploy your secrets anywhere – without [risky third-party integrations](https://techcrunch.com/2023/01/05/circleci-breach/). [read more](https://github.com/motdotla/dotenv#-deploying) + +### Changed + +- Fixed "cannot resolve 'fs'" error on tools like Replit [#693](https://github.com/motdotla/dotenv/pull/693) + +## [16.0.3](https://github.com/motdotla/dotenv/compare/v16.0.2...v16.0.3) (2022-09-29) + +### Changed + +- Added library version to debug logs ([#682](https://github.com/motdotla/dotenv/pull/682)) + +## [16.0.2](https://github.com/motdotla/dotenv/compare/v16.0.1...v16.0.2) (2022-08-30) + +### Added + +- Export `env-options.js` and `cli-options.js` in package.json for use with downstream [dotenv-expand](https://github.com/motdotla/dotenv-expand) module + +## [16.0.1](https://github.com/motdotla/dotenv/compare/v16.0.0...v16.0.1) (2022-05-10) + +### Changed + +- Minor README clarifications +- Development ONLY: updated devDependencies as recommended for development only security risks ([#658](https://github.com/motdotla/dotenv/pull/658)) + +## [16.0.0](https://github.com/motdotla/dotenv/compare/v15.0.1...v16.0.0) (2022-02-02) + +### Added + +- _Breaking:_ Backtick support 🎉 ([#615](https://github.com/motdotla/dotenv/pull/615)) + +If you had values containing the backtick character, please quote those values with either single or double quotes. + +## [15.0.1](https://github.com/motdotla/dotenv/compare/v15.0.0...v15.0.1) (2022-02-02) + +### Changed + +- Properly parse empty single or double quoted values 🐞 ([#614](https://github.com/motdotla/dotenv/pull/614)) + +## [15.0.0](https://github.com/motdotla/dotenv/compare/v14.3.2...v15.0.0) (2022-01-31) + +`v15.0.0` is a major new release with some important breaking changes. + +### Added + +- _Breaking:_ Multiline parsing support (just works. no need for the flag.) + +### Changed + +- _Breaking:_ `#` marks the beginning of a comment (UNLESS the value is wrapped in quotes. Please update your `.env` files to wrap in quotes any values containing `#`. For example: `SECRET_HASH="something-with-a-#-hash"`). + +..Understandably, (as some teams have noted) this is tedious to do across the entire team. To make it less tedious, we recommend using [dotenv cli](https://github.com/dotenv-org/cli) going forward. It's an optional plugin that will keep your `.env` files in sync between machines, environments, or team members. + +### Removed + +- _Breaking:_ Remove multiline option (just works out of the box now. no need for the flag.) + +## [14.3.2](https://github.com/motdotla/dotenv/compare/v14.3.1...v14.3.2) (2022-01-25) + +### Changed + +- Preserve backwards compatibility on values containing `#` 🐞 ([#603](https://github.com/motdotla/dotenv/pull/603)) + +## [14.3.1](https://github.com/motdotla/dotenv/compare/v14.3.0...v14.3.1) (2022-01-25) + +### Changed + +- Preserve backwards compatibility on exports by re-introducing the prior in-place exports 🐞 ([#606](https://github.com/motdotla/dotenv/pull/606)) + +## [14.3.0](https://github.com/motdotla/dotenv/compare/v14.2.0...v14.3.0) (2022-01-24) + +### Added + +- Add `multiline` option 🎉 ([#486](https://github.com/motdotla/dotenv/pull/486)) + +## [14.2.0](https://github.com/motdotla/dotenv/compare/v14.1.1...v14.2.0) (2022-01-17) + +### Added + +- Add `dotenv_config_override` cli option +- Add `DOTENV_CONFIG_OVERRIDE` command line env option + +## [14.1.1](https://github.com/motdotla/dotenv/compare/v14.1.0...v14.1.1) (2022-01-17) + +### Added + +- Add React gotcha to FAQ on README + +## [14.1.0](https://github.com/motdotla/dotenv/compare/v14.0.1...v14.1.0) (2022-01-17) + +### Added + +- Add `override` option 🎉 ([#595](https://github.com/motdotla/dotenv/pull/595)) + +## [14.0.1](https://github.com/motdotla/dotenv/compare/v14.0.0...v14.0.1) (2022-01-16) + +### Added + +- Log error on failure to load `.env` file ([#594](https://github.com/motdotla/dotenv/pull/594)) + +## [14.0.0](https://github.com/motdotla/dotenv/compare/v13.0.1...v14.0.0) (2022-01-16) + +### Added + +- _Breaking:_ Support inline comments for the parser 🎉 ([#568](https://github.com/motdotla/dotenv/pull/568)) + +## [13.0.1](https://github.com/motdotla/dotenv/compare/v13.0.0...v13.0.1) (2022-01-16) + +### Changed + +* Hide comments and newlines from debug output ([#404](https://github.com/motdotla/dotenv/pull/404)) + +## [13.0.0](https://github.com/motdotla/dotenv/compare/v12.0.4...v13.0.0) (2022-01-16) + +### Added + +* _Breaking:_ Add type file for `config.js` ([#539](https://github.com/motdotla/dotenv/pull/539)) + +## [12.0.4](https://github.com/motdotla/dotenv/compare/v12.0.3...v12.0.4) (2022-01-16) + +### Changed + +* README updates +* Minor order adjustment to package json format + +## [12.0.3](https://github.com/motdotla/dotenv/compare/v12.0.2...v12.0.3) (2022-01-15) + +### Changed + +* Simplified jsdoc for consistency across editors + +## [12.0.2](https://github.com/motdotla/dotenv/compare/v12.0.1...v12.0.2) (2022-01-15) + +### Changed + +* Improve embedded jsdoc type documentation + +## [12.0.1](https://github.com/motdotla/dotenv/compare/v12.0.0...v12.0.1) (2022-01-15) + +### Changed + +* README updates and clarifications + +## [12.0.0](https://github.com/motdotla/dotenv/compare/v11.0.0...v12.0.0) (2022-01-15) + +### Removed + +- _Breaking:_ drop support for Flow static type checker ([#584](https://github.com/motdotla/dotenv/pull/584)) + +### Changed + +- Move types/index.d.ts to lib/main.d.ts ([#585](https://github.com/motdotla/dotenv/pull/585)) +- Typescript cleanup ([#587](https://github.com/motdotla/dotenv/pull/587)) +- Explicit typescript inclusion in package.json ([#566](https://github.com/motdotla/dotenv/pull/566)) + +## [11.0.0](https://github.com/motdotla/dotenv/compare/v10.0.0...v11.0.0) (2022-01-11) + +### Changed + +- _Breaking:_ drop support for Node v10 ([#558](https://github.com/motdotla/dotenv/pull/558)) +- Patch debug option ([#550](https://github.com/motdotla/dotenv/pull/550)) + +## [10.0.0](https://github.com/motdotla/dotenv/compare/v9.0.2...v10.0.0) (2021-05-20) + +### Added + +- Add generic support to parse function +- Allow for import "dotenv/config.js" +- Add support to resolve home directory in path via ~ + +## [9.0.2](https://github.com/motdotla/dotenv/compare/v9.0.1...v9.0.2) (2021-05-10) + +### Changed + +- Support windows newlines with debug mode + +## [9.0.1](https://github.com/motdotla/dotenv/compare/v9.0.0...v9.0.1) (2021-05-08) + +### Changed + +- Updates to README + +## [9.0.0](https://github.com/motdotla/dotenv/compare/v8.6.0...v9.0.0) (2021-05-05) + +### Changed + +- _Breaking:_ drop support for Node v8 + +## [8.6.0](https://github.com/motdotla/dotenv/compare/v8.5.1...v8.6.0) (2021-05-05) + +### Added + +- define package.json in exports + +## [8.5.1](https://github.com/motdotla/dotenv/compare/v8.5.0...v8.5.1) (2021-05-05) + +### Changed + +- updated dev dependencies via npm audit + +## [8.5.0](https://github.com/motdotla/dotenv/compare/v8.4.0...v8.5.0) (2021-05-05) + +### Added + +- allow for `import "dotenv/config"` + +## [8.4.0](https://github.com/motdotla/dotenv/compare/v8.3.0...v8.4.0) (2021-05-05) + +### Changed + +- point to exact types file to work with VS Code + +## [8.3.0](https://github.com/motdotla/dotenv/compare/v8.2.0...v8.3.0) (2021-05-05) + +### Changed + +- _Breaking:_ drop support for Node v8 (mistake to be released as minor bump. later bumped to 9.0.0. see above.) + +## [8.2.0](https://github.com/motdotla/dotenv/compare/v8.1.0...v8.2.0) (2019-10-16) + +### Added + +- TypeScript types + +## [8.1.0](https://github.com/motdotla/dotenv/compare/v8.0.0...v8.1.0) (2019-08-18) + +### Changed + +- _Breaking:_ drop support for Node v6 ([#392](https://github.com/motdotla/dotenv/issues/392)) + +# [8.0.0](https://github.com/motdotla/dotenv/compare/v7.0.0...v8.0.0) (2019-05-02) + +### Changed + +- _Breaking:_ drop support for Node v6 ([#302](https://github.com/motdotla/dotenv/issues/392)) + +## [7.0.0] - 2019-03-12 + +### Fixed + +- Fix removing unbalanced quotes ([#376](https://github.com/motdotla/dotenv/pull/376)) + +### Removed + +- Removed `load` alias for `config` for consistency throughout code and documentation. + +## [6.2.0] - 2018-12-03 + +### Added + +- Support preload configuration via environment variables ([#351](https://github.com/motdotla/dotenv/issues/351)) + +## [6.1.0] - 2018-10-08 + +### Added + +- `debug` option for `config` and `parse` methods will turn on logging + +## [6.0.0] - 2018-06-02 + +### Changed + +- _Breaking:_ drop support for Node v4 ([#304](https://github.com/motdotla/dotenv/pull/304)) + +## [5.0.0] - 2018-01-29 + +### Added + +- Testing against Node v8 and v9 +- Documentation on trim behavior of values +- Documentation on how to use with `import` + +### Changed + +- _Breaking_: default `path` is now `path.resolve(process.cwd(), '.env')` +- _Breaking_: does not write over keys already in `process.env` if the key has a falsy value +- using `const` and `let` instead of `var` + +### Removed + +- Testing against Node v7 + +## [4.0.0] - 2016-12-23 + +### Changed + +- Return Object with parsed content or error instead of false ([#165](https://github.com/motdotla/dotenv/pull/165)). + +### Removed + +- `verbose` option removed in favor of returning result. + +## [3.0.0] - 2016-12-20 + +### Added + +- `verbose` option will log any error messages. Off by default. +- parses email addresses correctly +- allow importing config method directly in ES6 + +### Changed + +- Suppress error messages by default ([#154](https://github.com/motdotla/dotenv/pull/154)) +- Ignoring more files for NPM to make package download smaller + +### Fixed + +- False positive test due to case-sensitive variable ([#124](https://github.com/motdotla/dotenv/pull/124)) + +### Removed + +- `silent` option removed in favor of `verbose` + +## [2.0.0] - 2016-01-20 + +### Added + +- CHANGELOG to ["make it easier for users and contributors to see precisely what notable changes have been made between each release"](http://keepachangelog.com/). Linked to from README +- LICENSE to be more explicit about what was defined in `package.json`. Linked to from README +- Testing nodejs v4 on travis-ci +- added examples of how to use dotenv in different ways +- return parsed object on success rather than boolean true + +### Changed + +- README has shorter description not referencing ruby gem since we don't have or want feature parity + +### Removed + +- Variable expansion and escaping so environment variables are encouraged to be fully orthogonal + +## [1.2.0] - 2015-06-20 + +### Added + +- Preload hook to require dotenv without including it in your code + +### Changed + +- clarified license to be "BSD-2-Clause" in `package.json` + +### Fixed + +- retain spaces in string vars + +## [1.1.0] - 2015-03-31 + +### Added + +- Silent option to silence `console.log` when `.env` missing + +## [1.0.0] - 2015-03-13 + +### Removed + +- support for multiple `.env` files. should always use one `.env` file for the current environment + +[7.0.0]: https://github.com/motdotla/dotenv/compare/v6.2.0...v7.0.0 +[6.2.0]: https://github.com/motdotla/dotenv/compare/v6.1.0...v6.2.0 +[6.1.0]: https://github.com/motdotla/dotenv/compare/v6.0.0...v6.1.0 +[6.0.0]: https://github.com/motdotla/dotenv/compare/v5.0.0...v6.0.0 +[5.0.0]: https://github.com/motdotla/dotenv/compare/v4.0.0...v5.0.0 +[4.0.0]: https://github.com/motdotla/dotenv/compare/v3.0.0...v4.0.0 +[3.0.0]: https://github.com/motdotla/dotenv/compare/v2.0.0...v3.0.0 +[2.0.0]: https://github.com/motdotla/dotenv/compare/v1.2.0...v2.0.0 +[1.2.0]: https://github.com/motdotla/dotenv/compare/v1.1.0...v1.2.0 +[1.1.0]: https://github.com/motdotla/dotenv/compare/v1.0.0...v1.1.0 +[1.0.0]: https://github.com/motdotla/dotenv/compare/v0.4.0...v1.0.0 diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dotenv/LICENSE b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dotenv/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..c430ad8bd06f2c6495641c83b78c910f2f53c837 --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dotenv/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2015, Scott Motte +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dotenv/README.md b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dotenv/README.md new file mode 100644 index 0000000000000000000000000000000000000000..251aadadfaa7bdbeae0485d2e77a9fddd6988e1a --- /dev/null +++ b/platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/dotenv/README.md @@ -0,0 +1,645 @@ +
+🎉 announcing dotenvx. run anywhere, multi-environment, encrypted envs. +
+ +  + +
+ +**Special thanks to [our sponsors](https://github.com/sponsors/motdotla)** + +
+Graphite +
+ + Graphite is the AI developer productivity platform helping teams on GitHub ship higher quality software, faster. + +
+
+ +# dotenv [![NPM version](https://img.shields.io/npm/v/dotenv.svg?style=flat-square)](https://www.npmjs.com/package/dotenv) + +dotenv + +Dotenv is a zero-dependency module that loads environment variables from a `.env` file into [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env). Storing configuration in the environment separate from code is based on [The Twelve-Factor App](https://12factor.net/config) methodology. + +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) +[![LICENSE](https://img.shields.io/github/license/motdotla/dotenv.svg)](LICENSE) +[![codecov](https://codecov.io/gh/motdotla/dotenv-expand/graph/badge.svg?token=pawWEyaMfg)](https://codecov.io/gh/motdotla/dotenv-expand) + +* [🌱 Install](#-install) +* [🏗️ Usage (.env)](#%EF%B8%8F-usage) +* [🌴 Multiple Environments 🆕](#-manage-multiple-environments) +* [🚀 Deploying (encryption) 🆕](#-deploying) +* [📚 Examples](#-examples) +* [📖 Docs](#-documentation) +* [❓ FAQ](#-faq) +* [⏱️ Changelog](./CHANGELOG.md) + +## 🌱 Install + +```bash +npm install dotenv --save +``` + +You can also use an npm-compatible package manager like yarn, bun or pnpm: + +```bash +yarn add dotenv +``` +```bash +bun add dotenv +``` +```bash +pnpm add dotenv +``` + +## 🏗️ Usage + + +
+how to use dotenv video tutorial +youtube/@dotenvorg +
+
+ +Create a `.env` file in the root of your project (if using a monorepo structure like `apps/backend/app.js`, put it in the root of the folder where your `app.js` process runs): + +```dosini +S3_BUCKET="YOURS3BUCKET" +SECRET_KEY="YOURSECRETKEYGOESHERE" +``` + +As early as possible in your application, import and configure dotenv: + +```javascript +require('dotenv').config() +console.log(process.env) // remove this after you've confirmed it is working +``` + +.. [or using ES6?](#how-do-i-use-dotenv-with-import) + +```javascript +import 'dotenv/config' +``` + +That's it. `process.env` now has the keys and values you defined in your `.env` file: + +```javascript +require('dotenv').config() +// or import 'dotenv/config' if you're using ES6 + +... + +s3.getBucketCors({Bucket: process.env.S3_BUCKET}, function(err, data) {}) +``` + +### Multiline values + +If you need multiline variables, for example private keys, those are now supported (`>= v15.0.0`) with line breaks: + +```dosini +PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- +... +Kh9NV... +... +-----END RSA PRIVATE KEY-----" +``` + +Alternatively, you can double quote strings and use the `\n` character: + +```dosini +PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nKh9NV...\n-----END RSA PRIVATE KEY-----\n" +``` + +### Comments + +Comments may be added to your file on their own line or inline: + +```dosini +# This is a comment +SECRET_KEY=YOURSECRETKEYGOESHERE # comment +SECRET_HASH="something-with-a-#-hash" +``` + +Comments begin where a `#` exists, so if your value contains a `#` please wrap it in quotes. This is a breaking change from `>= v15.0.0` and on. + +### Parsing + +The engine which parses the contents of your file containing environment variables is available to use. It accepts a String or Buffer and will return an Object with the parsed keys and values. + +```javascript +const dotenv = require('dotenv') +const buf = Buffer.from('BASIC=basic') +const config = dotenv.parse(buf) // will return an object +console.log(typeof config, config) // object { BASIC : 'basic' } +``` + +### Preload + +> Note: Consider using [`dotenvx`](https://github.com/dotenvx/dotenvx) instead of preloading. I am now doing (and recommending) so. +> +> It serves the same purpose (you do not need to require and load dotenv), adds better debugging, and works with ANY language, framework, or platform. – [motdotla](https://github.com/motdotla) + +You can use the `--require` (`-r`) [command line option](https://nodejs.org/api/cli.html#-r---require-module) to preload dotenv. By doing this, you do not need to require and load dotenv in your application code. + +```bash +$ node -r dotenv/config your_script.js +``` + +The configuration options below are supported as command line arguments in the format `dotenv_config_