@rebasepro/server-core 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/README.md +2 -2
  2. package/dist/api/ast-schema-editor.d.ts +21 -0
  3. package/dist/api/collections_for_test/callbacks_test_collection.d.ts +2 -0
  4. package/dist/api/errors.d.ts +53 -0
  5. package/dist/api/index.d.ts +7 -0
  6. package/dist/api/logs-routes.d.ts +37 -0
  7. package/dist/api/openapi-generator.d.ts +16 -0
  8. package/dist/api/rest/api-generator.d.ts +68 -0
  9. package/{src/api/rest/index.ts → dist/api/rest/index.d.ts} +0 -1
  10. package/dist/api/rest/query-parser.d.ts +6 -0
  11. package/dist/api/schema-editor-routes.d.ts +3 -0
  12. package/dist/api/types.d.ts +56 -0
  13. package/dist/auth/adapter-middleware.d.ts +43 -0
  14. package/dist/auth/admin-roles-route.d.ts +18 -0
  15. package/dist/auth/admin-user-ops.d.ts +79 -0
  16. package/dist/auth/admin-users-route.d.ts +28 -0
  17. package/dist/auth/api-keys/api-key-middleware.d.ts +39 -0
  18. package/{src/auth/api-keys/api-key-permission-guard.ts → dist/auth/api-keys/api-key-permission-guard.d.ts} +2 -34
  19. package/dist/auth/api-keys/api-key-routes.d.ts +20 -0
  20. package/dist/auth/api-keys/api-key-store.d.ts +35 -0
  21. package/{src/auth/api-keys/api-key-types.ts → dist/auth/api-keys/api-key-types.d.ts} +0 -6
  22. package/{src/auth/api-keys/index.ts → dist/auth/api-keys/index.d.ts} +2 -22
  23. package/dist/auth/apple-oauth.d.ts +30 -0
  24. package/{src/auth/auth-hooks.ts → dist/auth/auth-hooks.d.ts} +15 -73
  25. package/dist/auth/bitbucket-oauth.d.ts +11 -0
  26. package/dist/auth/builtin-auth-adapter.d.ts +55 -0
  27. package/dist/auth/cookie-utils.d.ts +32 -0
  28. package/{src/auth/crypto-utils.ts → dist/auth/crypto-utils.d.ts} +1 -16
  29. package/dist/auth/custom-auth-adapter.d.ts +39 -0
  30. package/dist/auth/discord-oauth.d.ts +14 -0
  31. package/dist/auth/facebook-oauth.d.ts +14 -0
  32. package/dist/auth/github-oauth.d.ts +15 -0
  33. package/dist/auth/gitlab-oauth.d.ts +13 -0
  34. package/dist/auth/google-oauth.d.ts +47 -0
  35. package/{src/auth/index.ts → dist/auth/index.d.ts} +4 -22
  36. package/{src/auth/interfaces.ts → dist/auth/interfaces.d.ts} +20 -89
  37. package/dist/auth/jwt.d.ts +67 -0
  38. package/dist/auth/linkedin-oauth.d.ts +18 -0
  39. package/dist/auth/magic-link-routes.d.ts +32 -0
  40. package/dist/auth/mfa-crypto.d.ts +23 -0
  41. package/dist/auth/mfa-routes.d.ts +7 -0
  42. package/dist/auth/mfa.d.ts +49 -0
  43. package/dist/auth/microsoft-oauth.d.ts +16 -0
  44. package/dist/auth/middleware.d.ts +158 -0
  45. package/dist/auth/password.d.ts +22 -0
  46. package/dist/auth/rate-limiter.d.ts +50 -0
  47. package/dist/auth/reset-password-admin.d.ts +29 -0
  48. package/dist/auth/rls-scope.d.ts +31 -0
  49. package/dist/auth/routes.d.ts +66 -0
  50. package/dist/auth/session-routes.d.ts +29 -0
  51. package/dist/auth/slack-oauth.d.ts +12 -0
  52. package/dist/auth/spotify-oauth.d.ts +12 -0
  53. package/dist/auth/twitter-oauth.d.ts +18 -0
  54. package/dist/collections/BackendCollectionRegistry.d.ts +13 -0
  55. package/dist/collections/loader.d.ts +5 -0
  56. package/dist/cron/cron-loader.d.ts +18 -0
  57. package/dist/cron/cron-routes.d.ts +14 -0
  58. package/dist/cron/cron-scheduler.d.ts +106 -0
  59. package/dist/cron/cron-store.d.ts +32 -0
  60. package/dist/cron/define-cron.d.ts +28 -0
  61. package/{src/cron/index.ts → dist/cron/index.d.ts} +1 -0
  62. package/dist/db/interfaces.d.ts +18 -0
  63. package/dist/dynamic-import-Dvh-K5fl.js +22 -0
  64. package/dist/dynamic-import-Dvh-K5fl.js.map +1 -0
  65. package/dist/email/index.d.ts +6 -0
  66. package/dist/email/smtp-email-service.d.ts +30 -0
  67. package/dist/email/templates.d.ts +50 -0
  68. package/{src/email/types.ts → dist/email/types.d.ts} +40 -36
  69. package/dist/env.d.ts +102 -0
  70. package/dist/functions/define-function.d.ts +55 -0
  71. package/dist/functions/function-loader.d.ts +18 -0
  72. package/dist/functions/function-routes.d.ts +10 -0
  73. package/{src/functions/index.ts → dist/functions/index.d.ts} +2 -0
  74. package/dist/history/history-routes.d.ts +23 -0
  75. package/{src/history/index.ts → dist/history/index.d.ts} +0 -1
  76. package/dist/index.d.ts +35 -0
  77. package/dist/index.es.js +18184 -0
  78. package/dist/index.es.js.map +1 -0
  79. package/dist/index.umd.js +48629 -0
  80. package/dist/index.umd.js.map +1 -0
  81. package/dist/init/docs.d.ts +4 -0
  82. package/dist/init/health.d.ts +2 -0
  83. package/dist/init/middlewares.d.ts +10 -0
  84. package/dist/init/shutdown.d.ts +65 -0
  85. package/dist/init/storage.d.ts +5 -0
  86. package/dist/init.d.ts +344 -0
  87. package/dist/jwt-BwIn8xmk.js +4200 -0
  88. package/dist/jwt-BwIn8xmk.js.map +1 -0
  89. package/dist/logger-BYU66ENZ.js +94 -0
  90. package/dist/logger-BYU66ENZ.js.map +1 -0
  91. package/dist/ms-DnYXB-Wd.js +162 -0
  92. package/dist/ms-DnYXB-Wd.js.map +1 -0
  93. package/dist/openapi-generator-Z9oYWLf_.js +586 -0
  94. package/dist/openapi-generator-Z9oYWLf_.js.map +1 -0
  95. package/dist/schema-editor-routes-D3ef8zu1.js +219 -0
  96. package/dist/schema-editor-routes-D3ef8zu1.js.map +1 -0
  97. package/dist/serve-spa.d.ts +36 -0
  98. package/dist/services/driver-registry.d.ts +78 -0
  99. package/dist/services/routed-realtime-service.d.ts +43 -0
  100. package/dist/services/webhook-service.d.ts +29 -0
  101. package/dist/singleton.d.ts +51 -0
  102. package/dist/src-B4OLmNVa.js +437 -0
  103. package/dist/src-B4OLmNVa.js.map +1 -0
  104. package/dist/src-B5WkP1Rv.js +24778 -0
  105. package/dist/src-B5WkP1Rv.js.map +1 -0
  106. package/dist/storage/GCSStorageController.d.ts +43 -0
  107. package/dist/storage/LocalStorageController.d.ts +46 -0
  108. package/dist/storage/S3StorageController.d.ts +40 -0
  109. package/dist/storage/image-transform.d.ts +50 -0
  110. package/{src/storage/index.ts → dist/storage/index.d.ts} +6 -21
  111. package/dist/storage/routes.d.ts +70 -0
  112. package/dist/storage/storage-registry.d.ts +78 -0
  113. package/dist/storage/tus-handler.d.ts +53 -0
  114. package/{src/storage/types.ts → dist/storage/types.d.ts} +32 -38
  115. package/dist/types/index.d.ts +11 -0
  116. package/dist/utils/dev-port.d.ts +45 -0
  117. package/dist/utils/dynamic-import.d.ts +25 -0
  118. package/dist/utils/logger.d.ts +31 -0
  119. package/dist/utils/logging.d.ts +9 -0
  120. package/dist/utils/request-id.d.ts +4 -0
  121. package/dist/utils/request-logger.d.ts +19 -0
  122. package/{src/utils/sql.ts → dist/utils/sql.d.ts} +5 -16
  123. package/package.json +49 -22
  124. package/coverage/clover.xml +0 -3739
  125. package/coverage/coverage-final.json +0 -31
  126. package/coverage/lcov-report/base.css +0 -224
  127. package/coverage/lcov-report/block-navigation.js +0 -87
  128. package/coverage/lcov-report/favicon.png +0 -0
  129. package/coverage/lcov-report/index.html +0 -266
  130. package/coverage/lcov-report/prettify.css +0 -1
  131. package/coverage/lcov-report/prettify.js +0 -2
  132. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  133. package/coverage/lcov-report/sorter.js +0 -210
  134. package/coverage/lcov-report/src/api/ast-schema-editor.ts.html +0 -952
  135. package/coverage/lcov-report/src/api/errors.ts.html +0 -472
  136. package/coverage/lcov-report/src/api/graphql/graphql-schema-generator.ts.html +0 -1069
  137. package/coverage/lcov-report/src/api/graphql/index.html +0 -116
  138. package/coverage/lcov-report/src/api/index.html +0 -176
  139. package/coverage/lcov-report/src/api/openapi-generator.ts.html +0 -565
  140. package/coverage/lcov-report/src/api/rest/api-generator.ts.html +0 -994
  141. package/coverage/lcov-report/src/api/rest/index.html +0 -131
  142. package/coverage/lcov-report/src/api/rest/query-parser.ts.html +0 -550
  143. package/coverage/lcov-report/src/api/schema-editor-routes.ts.html +0 -202
  144. package/coverage/lcov-report/src/api/server.ts.html +0 -823
  145. package/coverage/lcov-report/src/auth/admin-routes.ts.html +0 -973
  146. package/coverage/lcov-report/src/auth/index.html +0 -176
  147. package/coverage/lcov-report/src/auth/jwt.ts.html +0 -574
  148. package/coverage/lcov-report/src/auth/middleware.ts.html +0 -745
  149. package/coverage/lcov-report/src/auth/password.ts.html +0 -310
  150. package/coverage/lcov-report/src/auth/services.ts.html +0 -2074
  151. package/coverage/lcov-report/src/collections/index.html +0 -116
  152. package/coverage/lcov-report/src/collections/loader.ts.html +0 -232
  153. package/coverage/lcov-report/src/db/auth-schema.ts.html +0 -523
  154. package/coverage/lcov-report/src/db/data-transformer.ts.html +0 -1753
  155. package/coverage/lcov-report/src/db/entityService.ts.html +0 -700
  156. package/coverage/lcov-report/src/db/index.html +0 -146
  157. package/coverage/lcov-report/src/db/services/EntityFetchService.ts.html +0 -4048
  158. package/coverage/lcov-report/src/db/services/EntityPersistService.ts.html +0 -883
  159. package/coverage/lcov-report/src/db/services/RelationService.ts.html +0 -3121
  160. package/coverage/lcov-report/src/db/services/entity-helpers.ts.html +0 -442
  161. package/coverage/lcov-report/src/db/services/index.html +0 -176
  162. package/coverage/lcov-report/src/db/services/index.ts.html +0 -124
  163. package/coverage/lcov-report/src/generate-drizzle-schema-logic.ts.html +0 -1960
  164. package/coverage/lcov-report/src/index.html +0 -116
  165. package/coverage/lcov-report/src/services/driver-registry.ts.html +0 -631
  166. package/coverage/lcov-report/src/services/index.html +0 -131
  167. package/coverage/lcov-report/src/services/postgresDataDriver.ts.html +0 -3025
  168. package/coverage/lcov-report/src/storage/LocalStorageController.ts.html +0 -1189
  169. package/coverage/lcov-report/src/storage/S3StorageController.ts.html +0 -970
  170. package/coverage/lcov-report/src/storage/index.html +0 -161
  171. package/coverage/lcov-report/src/storage/storage-registry.ts.html +0 -646
  172. package/coverage/lcov-report/src/storage/types.ts.html +0 -451
  173. package/coverage/lcov-report/src/utils/drizzle-conditions.ts.html +0 -3082
  174. package/coverage/lcov-report/src/utils/index.html +0 -116
  175. package/coverage/lcov.info +0 -7179
  176. package/jest.config.cjs +0 -19
  177. package/src/api/ast-schema-editor.ts +0 -289
  178. package/src/api/collections_for_test/callbacks_test_collection.ts +0 -61
  179. package/src/api/errors.ts +0 -278
  180. package/src/api/graphql/graphql-schema-generator.ts +0 -383
  181. package/src/api/graphql/index.ts +0 -2
  182. package/src/api/index.ts +0 -11
  183. package/src/api/logs-routes.ts +0 -132
  184. package/src/api/openapi-generator.ts +0 -727
  185. package/src/api/rest/api-generator-count.test.ts +0 -126
  186. package/src/api/rest/api-generator.ts +0 -747
  187. package/src/api/rest/query-parser.ts +0 -300
  188. package/src/api/schema-editor-routes.ts +0 -41
  189. package/src/api/server.ts +0 -271
  190. package/src/api/types.ts +0 -104
  191. package/src/auth/adapter-middleware.ts +0 -114
  192. package/src/auth/admin-roles-route.ts +0 -36
  193. package/src/auth/admin-user-ops.ts +0 -236
  194. package/src/auth/admin-users-route.ts +0 -302
  195. package/src/auth/api-keys/api-key-middleware.ts +0 -133
  196. package/src/auth/api-keys/api-key-routes.ts +0 -193
  197. package/src/auth/api-keys/api-key-store.ts +0 -340
  198. package/src/auth/apple-oauth.ts +0 -122
  199. package/src/auth/bitbucket-oauth.ts +0 -84
  200. package/src/auth/builtin-auth-adapter.ts +0 -380
  201. package/src/auth/custom-auth-adapter.ts +0 -86
  202. package/src/auth/discord-oauth.ts +0 -85
  203. package/src/auth/facebook-oauth.ts +0 -74
  204. package/src/auth/github-oauth.ts +0 -112
  205. package/src/auth/gitlab-oauth.ts +0 -72
  206. package/src/auth/google-oauth.ts +0 -223
  207. package/src/auth/jwt.ts +0 -208
  208. package/src/auth/linkedin-oauth.ts +0 -83
  209. package/src/auth/magic-link-routes.ts +0 -167
  210. package/src/auth/mfa-crypto.ts +0 -91
  211. package/src/auth/mfa-routes.ts +0 -323
  212. package/src/auth/mfa.ts +0 -161
  213. package/src/auth/microsoft-oauth.ts +0 -90
  214. package/src/auth/middleware.ts +0 -369
  215. package/src/auth/password.ts +0 -77
  216. package/src/auth/rate-limiter.ts +0 -225
  217. package/src/auth/reset-password-admin.ts +0 -160
  218. package/src/auth/rls-scope.ts +0 -58
  219. package/src/auth/routes.ts +0 -802
  220. package/src/auth/session-routes.ts +0 -353
  221. package/src/auth/slack-oauth.ts +0 -73
  222. package/src/auth/spotify-oauth.ts +0 -69
  223. package/src/auth/twitter-oauth.ts +0 -128
  224. package/src/collections/BackendCollectionRegistry.ts +0 -20
  225. package/src/collections/loader.ts +0 -50
  226. package/src/cron/cron-loader.ts +0 -84
  227. package/src/cron/cron-routes.test.ts +0 -265
  228. package/src/cron/cron-routes.ts +0 -85
  229. package/src/cron/cron-scheduler.test.ts +0 -559
  230. package/src/cron/cron-scheduler.ts +0 -581
  231. package/src/cron/cron-store.ts +0 -166
  232. package/src/db/interfaces.ts +0 -60
  233. package/src/email/index.ts +0 -19
  234. package/src/email/smtp-email-service.ts +0 -123
  235. package/src/email/templates.ts +0 -470
  236. package/src/env.ts +0 -227
  237. package/src/functions/function-loader.ts +0 -116
  238. package/src/functions/function-routes.ts +0 -31
  239. package/src/history/history-routes.ts +0 -129
  240. package/src/index.ts +0 -70
  241. package/src/init/docs.ts +0 -47
  242. package/src/init/health.ts +0 -37
  243. package/src/init/middlewares.ts +0 -61
  244. package/src/init/shutdown.ts +0 -56
  245. package/src/init/storage.ts +0 -57
  246. package/src/init.ts +0 -1041
  247. package/src/serve-spa.ts +0 -89
  248. package/src/services/driver-registry.ts +0 -183
  249. package/src/services/routed-realtime-service.ts +0 -113
  250. package/src/services/webhook-service.ts +0 -155
  251. package/src/singleton.ts +0 -70
  252. package/src/storage/LocalStorageController.ts +0 -389
  253. package/src/storage/S3StorageController.ts +0 -300
  254. package/src/storage/image-transform.ts +0 -218
  255. package/src/storage/routes.ts +0 -368
  256. package/src/storage/storage-registry.ts +0 -188
  257. package/src/storage/tus-handler.ts +0 -315
  258. package/src/types/index.ts +0 -27
  259. package/src/utils/dev-port.ts +0 -196
  260. package/src/utils/logger.ts +0 -143
  261. package/src/utils/logging.ts +0 -40
  262. package/src/utils/request-id.ts +0 -40
  263. package/src/utils/request-logger.ts +0 -72
  264. package/test/api-generator.test.ts +0 -588
  265. package/test/api-key-permission-guard.test.ts +0 -144
  266. package/test/ast-schema-editor.test.ts +0 -89
  267. package/test/auth-middleware-hono.test.ts +0 -556
  268. package/test/auth-routes.test.ts +0 -1098
  269. package/test/backend-hooks-data.test.ts +0 -477
  270. package/test/custom-auth-adapter.test.ts +0 -189
  271. package/test/driver-registry.test.ts +0 -282
  272. package/test/email-templates.test.ts +0 -174
  273. package/test/env.test.ts +0 -128
  274. package/test/error-propagation.test.ts +0 -226
  275. package/test/errors-hono.test.ts +0 -133
  276. package/test/errors.test.ts +0 -155
  277. package/test/function-loader.test.ts +0 -127
  278. package/test/graphql-schema-generator.test.ts +0 -554
  279. package/test/jwt-security.test.ts +0 -182
  280. package/test/jwt.test.ts +0 -326
  281. package/test/mfa.test.ts +0 -197
  282. package/test/middleware.test.ts +0 -305
  283. package/test/multi-datasource-routing.test.ts +0 -113
  284. package/test/password.test.ts +0 -165
  285. package/test/query-parser.test.ts +0 -233
  286. package/test/rate-limiter.test.ts +0 -102
  287. package/test/reset-password-admin.test.ts +0 -113
  288. package/test/routed-realtime-service.test.ts +0 -86
  289. package/test/safe-compare.test.ts +0 -66
  290. package/test/singleton.test.ts +0 -59
  291. package/test/smtp-email-service.test.ts +0 -169
  292. package/test/storage-local.test.ts +0 -271
  293. package/test/storage-registry.test.ts +0 -282
  294. package/test/storage-routes.test.ts +0 -222
  295. package/test/storage-s3.test.ts +0 -304
  296. package/test/transform-auth-response.test.ts +0 -305
  297. package/test/webhook-service.test.ts +0 -260
  298. package/tsconfig.json +0 -54
  299. package/tsconfig.prod.json +0 -23
  300. package/vite.config.ts +0 -86
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src-B5WkP1Rv.js","names":["stream_1","__assign","PassThrough","validate","REGEX","validate","validate","_state","URL","URL","URL","version","validate","net_1","tls_1","url_1","url_1","assert_1","https_1","url_1","stream_1","Buffer","Buffer","Buffer","packageJson","AUTO_RETRY_DEFAULT","MAX_RETRY_DEFAULT","htmlEntities.decode","teenyRequest","MissingProjectIdError","crypto","crypto","stream_1","url_1","http","exports","net","https_1","url_1","exports","__classPrivateFieldSet","__classPrivateFieldGet","__classPrivateFieldSet","__classPrivateFieldGet","__classPrivateFieldGet","packageJson","PROTOCOL_REGEX","crypto","gaxios","AbortController","SEVEN_DAYS","crypto","__classPrivateFieldGet","mime","fs","crypto","apiError","resumableUpload.upload","paginator","URL","mime","fileInstance","path","paginator","defaultOptions","validateEntityName","DEFAULT_XML_ENTITIES","defaultOptions","METADATA_SYMBOL","getIgnoreAttributesFn","replaceEntitiesValue","getIgnoreAttributesFn","xmlNode","propName","resolveTagName","buildFromOrderedJs","XMLBuilder","XMLBuilder","promises","fsp","path"],"sources":["../../../node_modules/.pnpm/@google-cloud+projectify@4.0.0/node_modules/@google-cloud/projectify/build/src/index.js","../../../node_modules/.pnpm/html-entities@2.6.0/node_modules/html-entities/dist/esm/named-references.js","../../../node_modules/.pnpm/html-entities@2.6.0/node_modules/html-entities/dist/esm/numeric-unicode-map.js","../../../node_modules/.pnpm/html-entities@2.6.0/node_modules/html-entities/dist/esm/surrogate-pairs.js","../../../node_modules/.pnpm/html-entities@2.6.0/node_modules/html-entities/dist/esm/index.js","../../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js","../../../node_modules/.pnpm/retry-request@7.0.2/node_modules/retry-request/index.js","../../../node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/browser.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/max.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/nil.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/regex.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/validate.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/parse.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/stringify.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/rng.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v1.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v1ToV6.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/md5.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v35.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v3.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v4.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/sha1.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v5.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v6.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v6ToV1.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v7.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/version.js","../../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/index.js","../../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js","../../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js","../../../node_modules/.pnpm/@tootallnate+once@2.0.1/node_modules/@tootallnate/once/dist/index.js","../../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js","../../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js","../../../node_modules/.pnpm/http-proxy-agent@5.0.0/node_modules/http-proxy-agent/dist/agent.js","../../../node_modules/.pnpm/http-proxy-agent@5.0.0/node_modules/http-proxy-agent/dist/index.js","../../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js","../../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js","../../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js","../../../node_modules/.pnpm/teeny-request@9.0.0/node_modules/teeny-request/build/src/agents.js","../../../node_modules/.pnpm/teeny-request@9.0.0/node_modules/teeny-request/build/src/TeenyStatistics.js","../../../node_modules/.pnpm/stubs@3.0.0/node_modules/stubs/index.js","../../../node_modules/.pnpm/stream-events@1.0.5/node_modules/stream-events/index.js","../../../node_modules/.pnpm/teeny-request@9.0.0/node_modules/teeny-request/build/src/index.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/package.json","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/package-json-helper.cjs","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/util.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js","../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js","../../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from-browser.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js","../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js","../../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js","../../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js","../../../node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js","../../../node_modules/.pnpm/stream-shift@1.0.3/node_modules/stream-shift/index.js","../../../node_modules/.pnpm/duplexify@4.1.3/node_modules/duplexify/index.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/nodejs-common/util.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/nodejs-common/service.js","../../../node_modules/.pnpm/@google-cloud+promisify@4.0.0/node_modules/@google-cloud/promisify/build/src/index.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/nodejs-common/service-object.js","../../../node_modules/.pnpm/arrify@2.0.1/node_modules/arrify/index.js","../../../node_modules/.pnpm/@google-cloud+paginator@5.0.2/node_modules/@google-cloud/paginator/build/src/resource-stream.js","../../../node_modules/.pnpm/@google-cloud+paginator@5.0.2/node_modules/@google-cloud/paginator/build/src/index.js","../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/Mime.js","../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/standard.js","../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/other.js","../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/index.js","../../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js","../../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js","../../../node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry/lib/index.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/acl.js","../../../node_modules/.pnpm/abort-controller@3.0.0/node_modules/abort-controller/browser.js","../../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js","../../../node_modules/.pnpm/gaxios@6.7.1/node_modules/gaxios/package.json","../../../node_modules/.pnpm/gaxios@6.7.1/node_modules/gaxios/build/src/util.js","../../../node_modules/.pnpm/gaxios@6.7.1/node_modules/gaxios/build/src/common.js","../../../node_modules/.pnpm/gaxios@6.7.1/node_modules/gaxios/build/src/retry.js","../../../node_modules/.pnpm/gaxios@6.7.1/node_modules/gaxios/build/src/interceptor.js","../../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js","../../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js","../../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js","../../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js","../../../node_modules/.pnpm/gaxios@6.7.1/node_modules/gaxios/build/src/gaxios.js","../../../node_modules/.pnpm/gaxios@6.7.1/node_modules/gaxios/build/src/index.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/crc32c.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/hash-stream-validator.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/resumable-upload.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/signer.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/file.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/iam.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/notification.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/bucket.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/channel.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/hmacKey.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/storage.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/util.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/validator.js","../../../node_modules/.pnpm/@nodable+entities@2.2.0/node_modules/@nodable/entities/src/entities.js","../../../node_modules/.pnpm/@nodable+entities@2.2.0/node_modules/@nodable/entities/src/EntityDecoder.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js","../../../node_modules/.pnpm/anynum@1.0.0/node_modules/anynum/digitTable.js","../../../node_modules/.pnpm/anynum@1.0.0/node_modules/anynum/anynum.js","../../../node_modules/.pnpm/strnum@2.4.0/node_modules/strnum/strnum.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/ignoreAttributes.js","../../../node_modules/.pnpm/path-expression-matcher@1.5.0/node_modules/path-expression-matcher/src/Expression.js","../../../node_modules/.pnpm/path-expression-matcher@1.5.0/node_modules/path-expression-matcher/src/ExpressionSet.js","../../../node_modules/.pnpm/path-expression-matcher@1.5.0/node_modules/path-expression-matcher/src/Matcher.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/xmlparser/node2json.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js","../../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/util.js","../../../node_modules/.pnpm/xml-naming@0.1.0/node_modules/xml-naming/src/index.js","../../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/orderedJs2Xml.js","../../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/ignoreAttributes.js","../../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/fxb.js","../../../node_modules/.pnpm/fast-xml-parser@5.7.3/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js","../../../node_modules/.pnpm/@google-cloud+storage@7.21.0/node_modules/@google-cloud/storage/build/esm/src/transfer-manager.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MissingProjectIdError = exports.replaceProjectIdToken = void 0;\nconst stream_1 = require(\"stream\");\n// Copyright 2014 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n/**\n * Populate the `{{projectId}}` placeholder.\n *\n * @throws {Error} If a projectId is required, but one is not provided.\n *\n * @param {*} - Any input value that may contain a placeholder. Arrays and objects will be looped.\n * @param {string} projectId - A projectId. If not provided\n * @return {*} - The original argument with all placeholders populated.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction replaceProjectIdToken(value, projectId) {\n if (Array.isArray(value)) {\n value = value.map(v => replaceProjectIdToken(v, projectId));\n }\n if (value !== null &&\n typeof value === 'object' &&\n !(value instanceof Buffer) &&\n !(value instanceof stream_1.Stream) &&\n typeof value.hasOwnProperty === 'function') {\n for (const opt in value) {\n // eslint-disable-next-line no-prototype-builtins\n if (value.hasOwnProperty(opt)) {\n value[opt] = replaceProjectIdToken(value[opt], projectId);\n }\n }\n }\n if (typeof value === 'string' &&\n value.indexOf('{{projectId}}') > -1) {\n if (!projectId || projectId === '{{projectId}}') {\n throw new MissingProjectIdError();\n }\n value = value.replace(/{{projectId}}/g, projectId);\n }\n return value;\n}\nexports.replaceProjectIdToken = replaceProjectIdToken;\n/**\n * Custom error type for missing project ID errors.\n */\nclass MissingProjectIdError extends Error {\n constructor() {\n super(...arguments);\n this.message = `Sorry, we cannot connect to Cloud Services without a project\n ID. You may specify one with an environment variable named\n \"GOOGLE_CLOUD_PROJECT\".`.replace(/ +/g, ' ');\n }\n}\nexports.MissingProjectIdError = MissingProjectIdError;\n//# sourceMappingURL=index.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n// This file is autogenerated by tools/process-named-references.ts\nvar pairDivider = \"~\";\nvar blockDivider = \"~~\";\nfunction generateNamedReferences(input, prev) {\n var entities = {};\n var characters = {};\n var blocks = input.split(blockDivider);\n var isOptionalBlock = false;\n for (var i = 0; blocks.length > i; i++) {\n var entries = blocks[i].split(pairDivider);\n for (var j = 0; j < entries.length; j += 2) {\n var entity = entries[j];\n var character = entries[j + 1];\n var fullEntity = '&' + entity + ';';\n entities[fullEntity] = character;\n if (isOptionalBlock) {\n entities['&' + entity] = character;\n }\n characters[character] = fullEntity;\n }\n isOptionalBlock = true;\n }\n return prev ?\n { entities: __assign(__assign({}, entities), prev.entities), characters: __assign(__assign({}, characters), prev.characters) } :\n { entities: entities, characters: characters };\n}\nexport var bodyRegExps = {\n xml: /&(?:#\\d+|#[xX][\\da-fA-F]+|[0-9a-zA-Z]+);?/g,\n html4: /&notin;|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\\d+|#[xX][\\da-fA-F]+|[0-9a-zA-Z]+);?/g,\n html5: /&centerdot;|&copysr;|&divideontimes;|&gtcc;|&gtcir;|&gtdot;|&gtlPar;|&gtquest;|&gtrapprox;|&gtrarr;|&gtrdot;|&gtreqless;|&gtreqqless;|&gtrless;|&gtrsim;|&ltcc;|&ltcir;|&ltdot;|&lthree;|&ltimes;|&ltlarr;|&ltquest;|&ltrPar;|&ltri;|&ltrie;|&ltrif;|&notin;|&notinE;|&notindot;|&notinva;|&notinvb;|&notinvc;|&notni;|&notniva;|&notnivb;|&notnivc;|&parallel;|&timesb;|&timesbar;|&timesd;|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\\d+|#[xX][\\da-fA-F]+|[0-9a-zA-Z]+);?/g\n};\nexport var namedReferences = {};\nnamedReferences['xml'] = generateNamedReferences(\"lt~<~gt~>~quot~\\\"~apos~'~amp~&\");\nnamedReferences['html4'] = generateNamedReferences(\"apos~'~OElig~Œ~oelig~œ~Scaron~Š~scaron~š~Yuml~Ÿ~circ~ˆ~tilde~˜~ensp~ ~emsp~ ~thinsp~ ~zwnj~‌~zwj~‍~lrm~‎~rlm~‏~ndash~–~mdash~—~lsquo~‘~rsquo~’~sbquo~‚~ldquo~“~rdquo~”~bdquo~„~dagger~†~Dagger~‡~permil~‰~lsaquo~‹~rsaquo~›~euro~€~fnof~ƒ~Alpha~Α~Beta~Β~Gamma~Γ~Delta~Δ~Epsilon~Ε~Zeta~Ζ~Eta~Η~Theta~Θ~Iota~Ι~Kappa~Κ~Lambda~Λ~Mu~Μ~Nu~Ν~Xi~Ξ~Omicron~Ο~Pi~Π~Rho~Ρ~Sigma~Σ~Tau~Τ~Upsilon~Υ~Phi~Φ~Chi~Χ~Psi~Ψ~Omega~Ω~alpha~α~beta~β~gamma~γ~delta~δ~epsilon~ε~zeta~ζ~eta~η~theta~θ~iota~ι~kappa~κ~lambda~λ~mu~μ~nu~ν~xi~ξ~omicron~ο~pi~π~rho~ρ~sigmaf~ς~sigma~σ~tau~τ~upsilon~υ~phi~φ~chi~χ~psi~ψ~omega~ω~thetasym~ϑ~upsih~ϒ~piv~ϖ~bull~•~hellip~…~prime~′~Prime~″~oline~‾~frasl~⁄~weierp~℘~image~ℑ~real~ℜ~trade~™~alefsym~ℵ~larr~←~uarr~↑~rarr~→~darr~↓~harr~↔~crarr~↵~lArr~⇐~uArr~⇑~rArr~⇒~dArr~⇓~hArr~⇔~forall~∀~part~∂~exist~∃~empty~∅~nabla~∇~isin~∈~notin~∉~ni~∋~prod~∏~sum~∑~minus~−~lowast~∗~radic~√~prop~∝~infin~∞~ang~∠~and~∧~or~∨~cap~∩~cup~∪~int~∫~there4~∴~sim~∼~cong~≅~asymp~≈~ne~≠~equiv~≡~le~≤~ge~≥~sub~⊂~sup~⊃~nsub~⊄~sube~⊆~supe~⊇~oplus~⊕~otimes~⊗~perp~⊥~sdot~⋅~lceil~⌈~rceil~⌉~lfloor~⌊~rfloor~⌋~lang~〈~rang~〉~loz~◊~spades~♠~clubs~♣~hearts~♥~diams~♦~~nbsp~ ~iexcl~¡~cent~¢~pound~£~curren~¤~yen~¥~brvbar~¦~sect~§~uml~¨~copy~©~ordf~ª~laquo~«~not~¬~shy~­~reg~®~macr~¯~deg~°~plusmn~±~sup2~²~sup3~³~acute~´~micro~µ~para~¶~middot~·~cedil~¸~sup1~¹~ordm~º~raquo~»~frac14~¼~frac12~½~frac34~¾~iquest~¿~Agrave~À~Aacute~Á~Acirc~Â~Atilde~Ã~Auml~Ä~Aring~Å~AElig~Æ~Ccedil~Ç~Egrave~È~Eacute~É~Ecirc~Ê~Euml~Ë~Igrave~Ì~Iacute~Í~Icirc~Î~Iuml~Ï~ETH~Ð~Ntilde~Ñ~Ograve~Ò~Oacute~Ó~Ocirc~Ô~Otilde~Õ~Ouml~Ö~times~×~Oslash~Ø~Ugrave~Ù~Uacute~Ú~Ucirc~Û~Uuml~Ü~Yacute~Ý~THORN~Þ~szlig~ß~agrave~à~aacute~á~acirc~â~atilde~ã~auml~ä~aring~å~aelig~æ~ccedil~ç~egrave~è~eacute~é~ecirc~ê~euml~ë~igrave~ì~iacute~í~icirc~î~iuml~ï~eth~ð~ntilde~ñ~ograve~ò~oacute~ó~ocirc~ô~otilde~õ~ouml~ö~divide~÷~oslash~ø~ugrave~ù~uacute~ú~ucirc~û~uuml~ü~yacute~ý~thorn~þ~yuml~ÿ~quot~\\\"~amp~&~lt~<~gt~>\");\nnamedReferences['html5'] = generateNamedReferences(\"Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~⁡~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~⫧~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~⩴~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ģ~Gcirc~Ĝ~Gcy~Г~Gdot~Ġ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~⁣~InvisibleTimes~⁢~Iogon~Į~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ĵ~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Х~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ļ~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~⧏~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ŀ~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~​~NegativeThickSpace~​~NegativeThinSpace~​~NegativeVeryThinSpace~​~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\\n~Nfr~𝔑~NoBreak~⁠~NonBreakingSpace~ ~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~\\t~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~  ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcirc~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~​~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~⁡~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~⁣~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~⁢~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~\\\"~REG~®\", namedReferences['html4']);\n//# sourceMappingURL=named-references.js.map","export var numericUnicodeMap = {\n 0: 65533,\n 128: 8364,\n 130: 8218,\n 131: 402,\n 132: 8222,\n 133: 8230,\n 134: 8224,\n 135: 8225,\n 136: 710,\n 137: 8240,\n 138: 352,\n 139: 8249,\n 140: 338,\n 142: 381,\n 145: 8216,\n 146: 8217,\n 147: 8220,\n 148: 8221,\n 149: 8226,\n 150: 8211,\n 151: 8212,\n 152: 732,\n 153: 8482,\n 154: 353,\n 155: 8250,\n 156: 339,\n 158: 382,\n 159: 376\n};\n//# sourceMappingURL=numeric-unicode-map.js.map","export var fromCodePoint = String.fromCodePoint ||\n function (astralCodePoint) {\n return String.fromCharCode(Math.floor((astralCodePoint - 0x10000) / 0x400) + 0xd800, ((astralCodePoint - 0x10000) % 0x400) + 0xdc00);\n };\n// @ts-expect-error - String.prototype.codePointAt might not exist in older node versions\nexport var getCodePoint = String.prototype.codePointAt\n ? function (input, position) {\n return input.codePointAt(position);\n }\n : function (input, position) {\n return (input.charCodeAt(position) - 0xd800) * 0x400 + input.charCodeAt(position + 1) - 0xdc00 + 0x10000;\n };\nexport var highSurrogateFrom = 0xd800;\nexport var highSurrogateTo = 0xdbff;\n//# sourceMappingURL=surrogate-pairs.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { bodyRegExps, namedReferences } from './named-references.js';\nimport { numericUnicodeMap } from './numeric-unicode-map.js';\nimport { fromCodePoint, getCodePoint } from './surrogate-pairs.js';\nvar allNamedReferences = __assign(__assign({}, namedReferences), { all: namedReferences.html5 });\nvar encodeRegExps = {\n specialChars: /[<>'\"&]/g,\n nonAscii: /[<>'\"&\\u0080-\\uD7FF\\uE000-\\uFFFF\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g,\n nonAsciiPrintable: /[<>'\"&\\x01-\\x08\\x11-\\x15\\x17-\\x1F\\x7f-\\uD7FF\\uE000-\\uFFFF\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g,\n nonAsciiPrintableOnly: /[\\x01-\\x08\\x11-\\x15\\x17-\\x1F\\x7f-\\uD7FF\\uE000-\\uFFFF\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g,\n extensive: /[\\x01-\\x0c\\x0e-\\x1f\\x21-\\x2c\\x2e-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7d\\x7f-\\uD7FF\\uE000-\\uFFFF\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g\n};\nvar defaultEncodeOptions = {\n mode: 'specialChars',\n level: 'all',\n numeric: 'decimal'\n};\n/** Encodes all the necessary (specified by `level`) characters in the text */\nexport function encode(text, _a) {\n var _b = _a === void 0 ? defaultEncodeOptions : _a, _c = _b.mode, mode = _c === void 0 ? 'specialChars' : _c, _d = _b.numeric, numeric = _d === void 0 ? 'decimal' : _d, _e = _b.level, level = _e === void 0 ? 'all' : _e;\n if (!text) {\n return '';\n }\n var encodeRegExp = encodeRegExps[mode];\n var references = allNamedReferences[level].characters;\n var isHex = numeric === 'hexadecimal';\n return String.prototype.replace.call(text, encodeRegExp, function (input) {\n var result = references[input];\n if (!result) {\n var code = input.length > 1 ? getCodePoint(input, 0) : input.charCodeAt(0);\n result = (isHex ? '&#x' + code.toString(16) : '&#' + code) + ';';\n }\n return result;\n });\n}\nvar defaultDecodeOptions = {\n scope: 'body',\n level: 'all'\n};\nvar strict = /&(?:#\\d+|#[xX][\\da-fA-F]+|[0-9a-zA-Z]+);/g;\nvar attribute = /&(?:#\\d+|#[xX][\\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g;\nvar baseDecodeRegExps = {\n xml: {\n strict: strict,\n attribute: attribute,\n body: bodyRegExps.xml\n },\n html4: {\n strict: strict,\n attribute: attribute,\n body: bodyRegExps.html4\n },\n html5: {\n strict: strict,\n attribute: attribute,\n body: bodyRegExps.html5\n }\n};\nvar decodeRegExps = __assign(__assign({}, baseDecodeRegExps), { all: baseDecodeRegExps.html5 });\nvar fromCharCode = String.fromCharCode;\nvar outOfBoundsChar = fromCharCode(65533);\nvar defaultDecodeEntityOptions = {\n level: 'all'\n};\nfunction getDecodedEntity(entity, references, isAttribute, isStrict) {\n var decodeResult = entity;\n var decodeEntityLastChar = entity[entity.length - 1];\n if (isAttribute && decodeEntityLastChar === '=') {\n decodeResult = entity;\n }\n else if (isStrict && decodeEntityLastChar !== ';') {\n decodeResult = entity;\n }\n else {\n var decodeResultByReference = references[entity];\n if (decodeResultByReference) {\n decodeResult = decodeResultByReference;\n }\n else if (entity[0] === '&' && entity[1] === '#') {\n var decodeSecondChar = entity[2];\n var decodeCode = decodeSecondChar == 'x' || decodeSecondChar == 'X'\n ? parseInt(entity.substr(3), 16)\n : parseInt(entity.substr(2));\n decodeResult =\n decodeCode >= 0x10ffff\n ? outOfBoundsChar\n : decodeCode > 65535\n ? fromCodePoint(decodeCode)\n : fromCharCode(numericUnicodeMap[decodeCode] || decodeCode);\n }\n }\n return decodeResult;\n}\n/** Decodes a single entity */\nexport function decodeEntity(entity, _a) {\n var _b = _a === void 0 ? defaultDecodeEntityOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c;\n if (!entity) {\n return '';\n }\n return getDecodedEntity(entity, allNamedReferences[level].entities, false, false);\n}\n/** Decodes all entities in the text */\nexport function decode(text, _a) {\n var _b = _a === void 0 ? defaultDecodeOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c, _d = _b.scope, scope = _d === void 0 ? level === 'xml' ? 'strict' : 'body' : _d;\n if (!text) {\n return '';\n }\n var decodeRegExp = decodeRegExps[level][scope];\n var references = allNamedReferences[level].entities;\n var isAttribute = scope === 'attribute';\n var isStrict = scope === 'strict';\n return text.replace(decodeRegExp, function (entity) { return getDecodedEntity(entity, references, isAttribute, isStrict); });\n}\n//# sourceMappingURL=index.js.map","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n","'use strict';\n\nconst {PassThrough} = require('stream');\nconst extend = require('extend');\n\nlet debug = () => {};\nif (\n typeof process !== 'undefined' &&\n 'env' in process &&\n typeof process.env === 'object' &&\n process.env.DEBUG === 'retry-request'\n) {\n debug = message => {\n console.log('retry-request:', message);\n };\n}\n\nconst DEFAULTS = {\n objectMode: false,\n retries: 2,\n\n /*\n The maximum time to delay in seconds. If retryDelayMultiplier results in a\n delay greater than maxRetryDelay, retries should delay by maxRetryDelay\n seconds instead.\n */\n maxRetryDelay: 64,\n\n /*\n The multiplier by which to increase the delay time between the completion of\n failed requests, and the initiation of the subsequent retrying request.\n */\n retryDelayMultiplier: 2,\n\n /*\n The length of time to keep retrying in seconds. The last sleep period will\n be shortened as necessary, so that the last retry runs at deadline (and not\n considerably beyond it). The total time starting from when the initial\n request is sent, after which an error will be returned, regardless of the\n retrying attempts made meanwhile.\n */\n totalTimeout: 600,\n\n noResponseRetries: 2,\n currentRetryAttempt: 0,\n shouldRetryFn: function (response) {\n const retryRanges = [\n // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes\n // 1xx - Retry (Informational, request still processing)\n // 2xx - Do not retry (Success)\n // 3xx - Do not retry (Redirect)\n // 4xx - Do not retry (Client errors)\n // 429 - Retry (\"Too Many Requests\")\n // 5xx - Retry (Server errors)\n [100, 199],\n [429, 429],\n [500, 599],\n ];\n\n const statusCode = response.statusCode;\n debug(`Response status: ${statusCode}`);\n\n let range;\n while ((range = retryRanges.shift())) {\n if (statusCode >= range[0] && statusCode <= range[1]) {\n // Not a successful status or redirect.\n return true;\n }\n }\n },\n};\n\nfunction retryRequest(requestOpts, opts, callback) {\n if (typeof requestOpts === 'string') {\n requestOpts = {url: requestOpts};\n }\n\n const streamMode = typeof arguments[arguments.length - 1] !== 'function';\n\n if (typeof opts === 'function') {\n callback = opts;\n }\n\n const manualCurrentRetryAttemptWasSet =\n opts && typeof opts.currentRetryAttempt === 'number';\n opts = extend({}, DEFAULTS, opts);\n\n if (typeof opts.request === 'undefined') {\n throw new Error('A request library must be provided to retry-request.');\n }\n\n let currentRetryAttempt = opts.currentRetryAttempt;\n\n let numNoResponseAttempts = 0;\n let streamResponseHandled = false;\n\n let retryStream;\n let requestStream;\n let delayStream;\n\n let activeRequest;\n const retryRequest = {\n abort: function () {\n if (activeRequest && activeRequest.abort) {\n activeRequest.abort();\n }\n },\n };\n\n if (streamMode) {\n retryStream = new PassThrough({objectMode: opts.objectMode});\n retryStream.abort = resetStreams;\n }\n\n const timeOfFirstRequest = Date.now();\n if (currentRetryAttempt > 0) {\n retryAfterDelay(currentRetryAttempt);\n } else {\n makeRequest();\n }\n\n if (streamMode) {\n return retryStream;\n } else {\n return retryRequest;\n }\n\n function resetStreams() {\n delayStream = null;\n\n if (requestStream) {\n requestStream.abort && requestStream.abort();\n requestStream.cancel && requestStream.cancel();\n\n if (requestStream.destroy) {\n requestStream.destroy();\n } else if (requestStream.end) {\n requestStream.end();\n }\n }\n }\n\n function makeRequest() {\n let finishHandled = false;\n currentRetryAttempt++;\n debug(`Current retry attempt: ${currentRetryAttempt}`);\n\n function handleFinish(args = []) {\n if (!finishHandled) {\n finishHandled = true;\n retryStream.emit('complete', ...args);\n }\n }\n\n if (streamMode) {\n streamResponseHandled = false;\n\n delayStream = new PassThrough({objectMode: opts.objectMode});\n requestStream = opts.request(requestOpts);\n\n setImmediate(() => {\n retryStream.emit('request');\n });\n\n requestStream\n // gRPC via google-cloud-node can emit an `error` as well as a `response`\n // Whichever it emits, we run with-- we can't run with both. That's what\n // is up with the `streamResponseHandled` tracking.\n .on('error', err => {\n if (streamResponseHandled) {\n return;\n }\n\n streamResponseHandled = true;\n onResponse(err);\n })\n .on('response', (resp, body) => {\n if (streamResponseHandled) {\n return;\n }\n\n streamResponseHandled = true;\n onResponse(null, resp, body);\n })\n .on('complete', (...params) => handleFinish(params))\n .on('finish', (...params) => handleFinish(params));\n\n requestStream.pipe(delayStream);\n } else {\n activeRequest = opts.request(requestOpts, onResponse);\n }\n }\n\n function retryAfterDelay(currentRetryAttempt) {\n if (streamMode) {\n resetStreams();\n }\n\n const nextRetryDelay = getNextRetryDelay({\n maxRetryDelay: opts.maxRetryDelay,\n retryDelayMultiplier: opts.retryDelayMultiplier,\n retryNumber: currentRetryAttempt,\n timeOfFirstRequest,\n totalTimeout: opts.totalTimeout,\n });\n debug(`Next retry delay: ${nextRetryDelay}`);\n\n if (nextRetryDelay <= 0) {\n numNoResponseAttempts = opts.noResponseRetries + 1;\n return;\n }\n\n setTimeout(makeRequest, nextRetryDelay);\n }\n\n function onResponse(err, response, body) {\n // An error such as DNS resolution.\n if (err) {\n numNoResponseAttempts++;\n\n if (numNoResponseAttempts <= opts.noResponseRetries) {\n retryAfterDelay(numNoResponseAttempts);\n } else {\n if (streamMode) {\n retryStream.emit('error', err);\n retryStream.end();\n } else {\n callback(err, response, body);\n }\n }\n\n return;\n }\n\n // Send the response to see if we should try again.\n // NOTE: \"currentRetryAttempt\" isn't accurate by default, as it counts\n // the very first request sent as the first \"retry\". It is only accurate\n // when a user provides their own \"currentRetryAttempt\" option at\n // instantiation.\n const adjustedCurrentRetryAttempt = manualCurrentRetryAttemptWasSet\n ? currentRetryAttempt\n : currentRetryAttempt - 1;\n if (\n adjustedCurrentRetryAttempt < opts.retries &&\n opts.shouldRetryFn(response)\n ) {\n retryAfterDelay(currentRetryAttempt);\n return;\n }\n\n // No more attempts need to be made, just continue on.\n if (streamMode) {\n retryStream.emit('response', response);\n delayStream.pipe(retryStream);\n requestStream.on('error', err => {\n retryStream.destroy(err);\n });\n } else {\n callback(err, response, body);\n }\n }\n}\n\nmodule.exports = retryRequest;\n\nfunction getNextRetryDelay(config) {\n const {\n maxRetryDelay,\n retryDelayMultiplier,\n retryNumber,\n timeOfFirstRequest,\n totalTimeout,\n } = config;\n\n const maxRetryDelayMs = maxRetryDelay * 1000;\n const totalTimeoutMs = totalTimeout * 1000;\n\n const jitter = Math.floor(Math.random() * 1000);\n const calculatedNextRetryDelay =\n Math.pow(retryDelayMultiplier, retryNumber) * 1000 + jitter;\n\n const maxAllowableDelayMs =\n totalTimeoutMs - (Date.now() - timeOfFirstRequest);\n\n return Math.min(\n calculatedNextRetryDelay,\n maxAllowableDelayMs,\n maxRetryDelayMs\n );\n}\n\nmodule.exports.defaults = DEFAULTS;\nmodule.exports.getNextRetryDelay = getNextRetryDelay;\n","\"use strict\";\n\n// ref: https://github.com/tc39/proposal-global\nvar getGlobal = function () {\n\t// the only reliable means to get the global object is\n\t// `Function('return this')()`\n\t// However, this causes CSP violations in Chrome apps.\n\tif (typeof self !== 'undefined') { return self; }\n\tif (typeof window !== 'undefined') { return window; }\n\tif (typeof global !== 'undefined') { return global; }\n\tthrow new Error('unable to locate global object');\n}\n\nvar globalObject = getGlobal();\n\nmodule.exports = exports = globalObject.fetch;\n\n// Needed for TypeScript and Webpack.\nif (globalObject.fetch) {\n\texports.default = globalObject.fetch.bind(globalObject);\n}\n\nexports.Headers = globalObject.Headers;\nexports.Request = globalObject.Request;\nexports.Response = globalObject.Response;\n","export default 'ffffffff-ffff-ffff-ffff-ffffffffffff';\n","export default '00000000-0000-0000-0000-000000000000';\n","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;\n","import REGEX from './regex.js';\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\nexport default validate;\n","import validate from './validate.js';\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n let v;\n return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff);\n}\nexport default parse;\n","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","const rnds8 = new Uint8Array(16);\nexport default function rng() {\n return crypto.getRandomValues(rnds8);\n}\n","import rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nconst _state = {};\nfunction v1(options, buf, offset) {\n let bytes;\n const isV6 = options?._v6 ?? false;\n if (options) {\n const optionsKeys = Object.keys(options);\n if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') {\n options = undefined;\n }\n }\n if (options) {\n bytes = v1Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset);\n }\n else {\n const now = Date.now();\n const rnds = rng();\n updateV1State(_state, now, rnds);\n bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset);\n }\n return buf ?? unsafeStringify(bytes);\n}\nexport function updateV1State(state, now, rnds) {\n state.msecs ??= -Infinity;\n state.nsecs ??= 0;\n if (now === state.msecs) {\n state.nsecs++;\n if (state.nsecs >= 10000) {\n state.node = undefined;\n state.nsecs = 0;\n }\n }\n else if (now > state.msecs) {\n state.nsecs = 0;\n }\n else if (now < state.msecs) {\n state.node = undefined;\n }\n if (!state.node) {\n state.node = rnds.slice(10, 16);\n state.node[0] |= 0x01;\n state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff;\n }\n state.msecs = now;\n return state;\n}\nfunction v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n if (!buf) {\n buf = new Uint8Array(16);\n offset = 0;\n }\n else {\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n }\n msecs ??= Date.now();\n nsecs ??= 0;\n clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff;\n node ??= rnds.slice(10, 16);\n msecs += 12219292800000;\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n buf[offset++] = (tl >>> 24) & 0xff;\n buf[offset++] = (tl >>> 16) & 0xff;\n buf[offset++] = (tl >>> 8) & 0xff;\n buf[offset++] = tl & 0xff;\n const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff;\n buf[offset++] = (tmh >>> 8) & 0xff;\n buf[offset++] = tmh & 0xff;\n buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10;\n buf[offset++] = (tmh >>> 16) & 0xff;\n buf[offset++] = (clockseq >>> 8) | 0x80;\n buf[offset++] = clockseq & 0xff;\n for (let n = 0; n < 6; ++n) {\n buf[offset++] = node[n];\n }\n return buf;\n}\nexport default v1;\n","import parse from './parse.js';\nimport { unsafeStringify } from './stringify.js';\nexport default function v1ToV6(uuid) {\n const v1Bytes = typeof uuid === 'string' ? parse(uuid) : uuid;\n const v6Bytes = _v1ToV6(v1Bytes);\n return typeof uuid === 'string' ? unsafeStringify(v6Bytes) : v6Bytes;\n}\nfunction _v1ToV6(v1Bytes) {\n return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);\n}\n","function md5(bytes) {\n const words = uint8ToUint32(bytes);\n const md5Bytes = wordsToMd5(words, bytes.length * 8);\n return uint32ToUint8(md5Bytes);\n}\nfunction uint32ToUint8(input) {\n const bytes = new Uint8Array(input.length * 4);\n for (let i = 0; i < input.length * 4; i++) {\n bytes[i] = (input[i >> 2] >>> ((i % 4) * 8)) & 0xff;\n }\n return bytes;\n}\nfunction getOutputLength(inputLength8) {\n return (((inputLength8 + 64) >>> 9) << 4) + 14 + 1;\n}\nfunction wordsToMd5(x, len) {\n const xpad = new Uint32Array(getOutputLength(len)).fill(0);\n xpad.set(x);\n xpad[len >> 5] |= 0x80 << (len % 32);\n xpad[xpad.length - 1] = len;\n x = xpad;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n return Uint32Array.of(a, b, c, d);\n}\nfunction uint8ToUint32(input) {\n if (input.length === 0) {\n return new Uint32Array();\n }\n const output = new Uint32Array(getOutputLength(input.length * 8)).fill(0);\n for (let i = 0; i < input.length; i++) {\n output[i >> 2] |= (input[i] & 0xff) << ((i % 4) * 8);\n }\n return output;\n}\nfunction safeAdd(x, y) {\n const lsw = (x & 0xffff) + (y & 0xffff);\n const msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xffff);\n}\nfunction bitRotateLeft(num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt));\n}\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn((b & c) | (~b & d), a, b, x, s, t);\n}\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\nexport default md5;\n","import parse from './parse.js';\nimport { unsafeStringify } from './stringify.js';\nexport function stringToBytes(str) {\n str = unescape(encodeURIComponent(str));\n const bytes = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i) {\n bytes[i] = str.charCodeAt(i);\n }\n return bytes;\n}\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function v35(version, hash, value, namespace, buf, offset) {\n const valueBytes = typeof value === 'string' ? stringToBytes(value) : value;\n const namespaceBytes = typeof namespace === 'string' ? parse(namespace) : namespace;\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n if (namespace?.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n }\n let bytes = new Uint8Array(16 + valueBytes.length);\n bytes.set(namespaceBytes);\n bytes.set(valueBytes, namespaceBytes.length);\n bytes = hash(bytes);\n bytes[6] = (bytes[6] & 0x0f) | version;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n if (buf) {\n offset ??= 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n return buf;\n }\n return unsafeStringify(bytes);\n}\n","import md5 from './md5.js';\nimport v35, { DNS, URL } from './v35.js';\nexport { DNS, URL } from './v35.js';\nfunction v3(value, namespace, buf, offset) {\n return v35(0x30, md5, value, namespace, buf, offset);\n}\nv3.DNS = DNS;\nv3.URL = URL;\nexport default v3;\n","import rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (!buf && !options && crypto.randomUUID) {\n return crypto.randomUUID();\n }\n return _v4(options, buf, offset);\n}\nfunction _v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n","function f(s, x, y, z) {\n switch (s) {\n case 0:\n return (x & y) ^ (~x & z);\n case 1:\n return x ^ y ^ z;\n case 2:\n return (x & y) ^ (x & z) ^ (y & z);\n case 3:\n return x ^ y ^ z;\n }\n}\nfunction ROTL(x, n) {\n return (x << n) | (x >>> (32 - n));\n}\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n const newBytes = new Uint8Array(bytes.length + 1);\n newBytes.set(bytes);\n newBytes[bytes.length] = 0x80;\n bytes = newBytes;\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n for (let j = 0; j < 16; ++j) {\n arr[j] =\n (bytes[i * 64 + j * 4] << 24) |\n (bytes[i * 64 + j * 4 + 1] << 16) |\n (bytes[i * 64 + j * 4 + 2] << 8) |\n bytes[i * 64 + j * 4 + 3];\n }\n M[i] = arr;\n }\n M[N - 1][14] = ((bytes.length - 1) * 8) / 2 ** 32;\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = ((bytes.length - 1) * 8) & 0xffffffff;\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = (ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t]) >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n H[0] = (H[0] + a) >>> 0;\n H[1] = (H[1] + b) >>> 0;\n H[2] = (H[2] + c) >>> 0;\n H[3] = (H[3] + d) >>> 0;\n H[4] = (H[4] + e) >>> 0;\n }\n return Uint8Array.of(H[0] >> 24, H[0] >> 16, H[0] >> 8, H[0], H[1] >> 24, H[1] >> 16, H[1] >> 8, H[1], H[2] >> 24, H[2] >> 16, H[2] >> 8, H[2], H[3] >> 24, H[3] >> 16, H[3] >> 8, H[3], H[4] >> 24, H[4] >> 16, H[4] >> 8, H[4]);\n}\nexport default sha1;\n","import sha1 from './sha1.js';\nimport v35, { DNS, URL } from './v35.js';\nexport { DNS, URL } from './v35.js';\nfunction v5(value, namespace, buf, offset) {\n return v35(0x50, sha1, value, namespace, buf, offset);\n}\nv5.DNS = DNS;\nv5.URL = URL;\nexport default v5;\n","import { unsafeStringify } from './stringify.js';\nimport v1 from './v1.js';\nimport v1ToV6 from './v1ToV6.js';\nfunction v6(options, buf, offset) {\n options ??= {};\n offset ??= 0;\n let bytes = v1({ ...options, _v6: true }, new Uint8Array(16));\n bytes = v1ToV6(bytes);\n if (buf) {\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; i++) {\n buf[offset + i] = bytes[i];\n }\n return buf;\n }\n return unsafeStringify(bytes);\n}\nexport default v6;\n","import parse from './parse.js';\nimport { unsafeStringify } from './stringify.js';\nexport default function v6ToV1(uuid) {\n const v6Bytes = typeof uuid === 'string' ? parse(uuid) : uuid;\n const v1Bytes = _v6ToV1(v6Bytes);\n return typeof uuid === 'string' ? unsafeStringify(v1Bytes) : v1Bytes;\n}\nfunction _v6ToV1(v6Bytes) {\n return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);\n}\n","import rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nconst _state = {};\nfunction v7(options, buf, offset) {\n let bytes;\n if (options) {\n bytes = v7Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.seq, buf, offset);\n }\n else {\n const now = Date.now();\n const rnds = rng();\n updateV7State(_state, now, rnds);\n bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset);\n }\n return buf ?? unsafeStringify(bytes);\n}\nexport function updateV7State(state, now, rnds) {\n state.msecs ??= -Infinity;\n state.seq ??= 0;\n if (now > state.msecs) {\n state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];\n state.msecs = now;\n }\n else {\n state.seq = (state.seq + 1) | 0;\n if (state.seq === 0) {\n state.msecs++;\n }\n }\n return state;\n}\nfunction v7Bytes(rnds, msecs, seq, buf, offset = 0) {\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n if (!buf) {\n buf = new Uint8Array(16);\n offset = 0;\n }\n else {\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n }\n msecs ??= Date.now();\n seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];\n buf[offset++] = (msecs / 0x10000000000) & 0xff;\n buf[offset++] = (msecs / 0x100000000) & 0xff;\n buf[offset++] = (msecs / 0x1000000) & 0xff;\n buf[offset++] = (msecs / 0x10000) & 0xff;\n buf[offset++] = (msecs / 0x100) & 0xff;\n buf[offset++] = msecs & 0xff;\n buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f);\n buf[offset++] = (seq >>> 20) & 0xff;\n buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f);\n buf[offset++] = (seq >>> 6) & 0xff;\n buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03);\n buf[offset++] = rnds[11];\n buf[offset++] = rnds[12];\n buf[offset++] = rnds[13];\n buf[offset++] = rnds[14];\n buf[offset++] = rnds[15];\n return buf;\n}\nexport default v7;\n","import validate from './validate.js';\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n return parseInt(uuid.slice(14, 15), 16);\n}\nexport default version;\n","export { default as MAX } from './max.js';\nexport { default as NIL } from './nil.js';\nexport { default as parse } from './parse.js';\nexport { default as stringify } from './stringify.js';\nexport { default as v1 } from './v1.js';\nexport { default as v1ToV6 } from './v1ToV6.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as v6 } from './v6.js';\nexport { default as v6ToV1 } from './v6ToV1.js';\nexport { default as v7 } from './v7.js';\nexport { default as validate } from './validate.js';\nexport { default as version } from './version.js';\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction once(emitter, name, { signal } = {}) {\n return new Promise((resolve, reject) => {\n function cleanup() {\n signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', onAbort);\n emitter.removeListener(name, onEvent);\n emitter.removeListener('error', onError);\n }\n function onEvent(...args) {\n cleanup();\n resolve(args);\n }\n function onError(err) {\n cleanup();\n reject(err);\n }\n function onAbort() {\n cleanup();\n const err = new Error('The operation was aborted');\n err.name = 'AbortError';\n reject(err);\n }\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n onAbort();\n return;\n }\n signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', onAbort);\n emitter.on(name, onEvent);\n emitter.on('error', onError);\n });\n}\nexports.default = once;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction promisify(fn) {\n return function (req, opts) {\n return new Promise((resolve, reject) => {\n fn.call(this, req, opts, (err, rtn) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(rtn);\n }\n });\n });\n };\n}\nexports.default = promisify;\n//# sourceMappingURL=promisify.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nconst events_1 = require(\"events\");\nconst debug_1 = __importDefault(require(\"debug\"));\nconst promisify_1 = __importDefault(require(\"./promisify\"));\nconst debug = debug_1.default('agent-base');\nfunction isAgent(v) {\n return Boolean(v) && typeof v.addRequest === 'function';\n}\nfunction isSecureEndpoint() {\n const { stack } = new Error();\n if (typeof stack !== 'string')\n return false;\n return stack.split('\\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);\n}\nfunction createAgent(callback, opts) {\n return new createAgent.Agent(callback, opts);\n}\n(function (createAgent) {\n /**\n * Base `http.Agent` implementation.\n * No pooling/keep-alive is implemented by default.\n *\n * @param {Function} callback\n * @api public\n */\n class Agent extends events_1.EventEmitter {\n constructor(callback, _opts) {\n super();\n let opts = _opts;\n if (typeof callback === 'function') {\n this.callback = callback;\n }\n else if (callback) {\n opts = callback;\n }\n // Timeout for the socket to be returned from the callback\n this.timeout = null;\n if (opts && typeof opts.timeout === 'number') {\n this.timeout = opts.timeout;\n }\n // These aren't actually used by `agent-base`, but are required\n // for the TypeScript definition files in `@types/node` :/\n this.maxFreeSockets = 1;\n this.maxSockets = 1;\n this.maxTotalSockets = Infinity;\n this.sockets = {};\n this.freeSockets = {};\n this.requests = {};\n this.options = {};\n }\n get defaultPort() {\n if (typeof this.explicitDefaultPort === 'number') {\n return this.explicitDefaultPort;\n }\n return isSecureEndpoint() ? 443 : 80;\n }\n set defaultPort(v) {\n this.explicitDefaultPort = v;\n }\n get protocol() {\n if (typeof this.explicitProtocol === 'string') {\n return this.explicitProtocol;\n }\n return isSecureEndpoint() ? 'https:' : 'http:';\n }\n set protocol(v) {\n this.explicitProtocol = v;\n }\n callback(req, opts, fn) {\n throw new Error('\"agent-base\" has no default implementation, you must subclass and override `callback()`');\n }\n /**\n * Called by node-core's \"_http_client.js\" module when creating\n * a new HTTP request with this Agent instance.\n *\n * @api public\n */\n addRequest(req, _opts) {\n const opts = Object.assign({}, _opts);\n if (typeof opts.secureEndpoint !== 'boolean') {\n opts.secureEndpoint = isSecureEndpoint();\n }\n if (opts.host == null) {\n opts.host = 'localhost';\n }\n if (opts.port == null) {\n opts.port = opts.secureEndpoint ? 443 : 80;\n }\n if (opts.protocol == null) {\n opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';\n }\n if (opts.host && opts.path) {\n // If both a `host` and `path` are specified then it's most\n // likely the result of a `url.parse()` call... we need to\n // remove the `path` portion so that `net.connect()` doesn't\n // attempt to open that as a unix socket file.\n delete opts.path;\n }\n delete opts.agent;\n delete opts.hostname;\n delete opts._defaultAgent;\n delete opts.defaultPort;\n delete opts.createConnection;\n // Hint to use \"Connection: close\"\n // XXX: non-documented `http` module API :(\n req._last = true;\n req.shouldKeepAlive = false;\n let timedOut = false;\n let timeoutId = null;\n const timeoutMs = opts.timeout || this.timeout;\n const onerror = (err) => {\n if (req._hadError)\n return;\n req.emit('error', err);\n // For Safety. Some additional errors might fire later on\n // and we need to make sure we don't double-fire the error event.\n req._hadError = true;\n };\n const ontimeout = () => {\n timeoutId = null;\n timedOut = true;\n const err = new Error(`A \"socket\" was not created for HTTP request before ${timeoutMs}ms`);\n err.code = 'ETIMEOUT';\n onerror(err);\n };\n const callbackError = (err) => {\n if (timedOut)\n return;\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n onerror(err);\n };\n const onsocket = (socket) => {\n if (timedOut)\n return;\n if (timeoutId != null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n if (isAgent(socket)) {\n // `socket` is actually an `http.Agent` instance, so\n // relinquish responsibility for this `req` to the Agent\n // from here on\n debug('Callback returned another Agent instance %o', socket.constructor.name);\n socket.addRequest(req, opts);\n return;\n }\n if (socket) {\n socket.once('free', () => {\n this.freeSocket(socket, opts);\n });\n req.onSocket(socket);\n return;\n }\n const err = new Error(`no Duplex stream was returned to agent-base for \\`${req.method} ${req.path}\\``);\n onerror(err);\n };\n if (typeof this.callback !== 'function') {\n onerror(new Error('`callback` is not defined'));\n return;\n }\n if (!this.promisifiedCallback) {\n if (this.callback.length >= 3) {\n debug('Converting legacy callback function to promise');\n this.promisifiedCallback = promisify_1.default(this.callback);\n }\n else {\n this.promisifiedCallback = this.callback;\n }\n }\n if (typeof timeoutMs === 'number' && timeoutMs > 0) {\n timeoutId = setTimeout(ontimeout, timeoutMs);\n }\n if ('port' in opts && typeof opts.port !== 'number') {\n opts.port = Number(opts.port);\n }\n try {\n debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`);\n Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError);\n }\n catch (err) {\n Promise.reject(err).catch(callbackError);\n }\n }\n freeSocket(socket, opts) {\n debug('Freeing socket %o %o', socket.constructor.name, opts);\n socket.destroy();\n }\n destroy() {\n debug('Destroying agent %o', this.constructor.name);\n }\n }\n createAgent.Agent = Agent;\n // So that `instanceof` works correctly\n createAgent.prototype = createAgent.Agent.prototype;\n})(createAgent || (createAgent = {}));\nmodule.exports = createAgent;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst net_1 = __importDefault(require(\"net\"));\nconst tls_1 = __importDefault(require(\"tls\"));\nconst url_1 = __importDefault(require(\"url\"));\nconst debug_1 = __importDefault(require(\"debug\"));\nconst once_1 = __importDefault(require(\"@tootallnate/once\"));\nconst agent_base_1 = require(\"agent-base\");\nconst debug = (0, debug_1.default)('http-proxy-agent');\nfunction isHTTPS(protocol) {\n return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;\n}\n/**\n * The `HttpProxyAgent` implements an HTTP Agent subclass that connects\n * to the specified \"HTTP proxy server\" in order to proxy HTTP requests.\n *\n * @api public\n */\nclass HttpProxyAgent extends agent_base_1.Agent {\n constructor(_opts) {\n let opts;\n if (typeof _opts === 'string') {\n opts = url_1.default.parse(_opts);\n }\n else {\n opts = _opts;\n }\n if (!opts) {\n throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');\n }\n debug('Creating new HttpProxyAgent instance: %o', opts);\n super(opts);\n const proxy = Object.assign({}, opts);\n // If `true`, then connect to the proxy server over TLS.\n // Defaults to `false`.\n this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);\n // Prefer `hostname` over `host`, and set the `port` if needed.\n proxy.host = proxy.hostname || proxy.host;\n if (typeof proxy.port === 'string') {\n proxy.port = parseInt(proxy.port, 10);\n }\n if (!proxy.port && proxy.host) {\n proxy.port = this.secureProxy ? 443 : 80;\n }\n if (proxy.host && proxy.path) {\n // If both a `host` and `path` are specified then it's most likely\n // the result of a `url.parse()` call... we need to remove the\n // `path` portion so that `net.connect()` doesn't attempt to open\n // that as a Unix socket file.\n delete proxy.path;\n delete proxy.pathname;\n }\n this.proxy = proxy;\n }\n /**\n * Called when the node-core HTTP client library is creating a\n * new HTTP request.\n *\n * @api protected\n */\n callback(req, opts) {\n return __awaiter(this, void 0, void 0, function* () {\n const { proxy, secureProxy } = this;\n const parsed = url_1.default.parse(req.path);\n if (!parsed.protocol) {\n parsed.protocol = 'http:';\n }\n if (!parsed.hostname) {\n parsed.hostname = opts.hostname || opts.host || null;\n }\n if (parsed.port == null && typeof opts.port) {\n parsed.port = String(opts.port);\n }\n if (parsed.port === '80') {\n // if port is 80, then we can remove the port so that the\n // \":80\" portion is not on the produced URL\n parsed.port = '';\n }\n // Change the `http.ClientRequest` instance's \"path\" field\n // to the absolute path of the URL that will be requested.\n req.path = url_1.default.format(parsed);\n // Inject the `Proxy-Authorization` header if necessary.\n if (proxy.auth) {\n req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`);\n }\n // Create a socket connection to the proxy server.\n let socket;\n if (secureProxy) {\n debug('Creating `tls.Socket`: %o', proxy);\n socket = tls_1.default.connect(proxy);\n }\n else {\n debug('Creating `net.Socket`: %o', proxy);\n socket = net_1.default.connect(proxy);\n }\n // At this point, the http ClientRequest's internal `_header` field\n // might have already been set. If this is the case then we'll need\n // to re-generate the string since we just changed the `req.path`.\n if (req._header) {\n let first;\n let endOfHeaders;\n debug('Regenerating stored HTTP header string for request');\n req._header = null;\n req._implicitHeader();\n if (req.output && req.output.length > 0) {\n // Node < 12\n debug('Patching connection write() output buffer with updated header');\n first = req.output[0];\n endOfHeaders = first.indexOf('\\r\\n\\r\\n') + 4;\n req.output[0] = req._header + first.substring(endOfHeaders);\n debug('Output buffer: %o', req.output);\n }\n else if (req.outputData && req.outputData.length > 0) {\n // Node >= 12\n debug('Patching connection write() output buffer with updated header');\n first = req.outputData[0].data;\n endOfHeaders = first.indexOf('\\r\\n\\r\\n') + 4;\n req.outputData[0].data =\n req._header + first.substring(endOfHeaders);\n debug('Output buffer: %o', req.outputData[0].data);\n }\n }\n // Wait for the socket's `connect` event, so that this `callback()`\n // function throws instead of the `http` request machinery. This is\n // important for i.e. `PacProxyAgent` which determines a failed proxy\n // connection via the `callback()` function throwing.\n yield (0, once_1.default)(socket, 'connect');\n return socket;\n });\n }\n}\nexports.default = HttpProxyAgent;\n//# sourceMappingURL=agent.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nconst agent_1 = __importDefault(require(\"./agent\"));\nfunction createHttpProxyAgent(opts) {\n return new agent_1.default(opts);\n}\n(function (createHttpProxyAgent) {\n createHttpProxyAgent.HttpProxyAgent = agent_1.default;\n createHttpProxyAgent.prototype = agent_1.default.prototype;\n})(createHttpProxyAgent || (createHttpProxyAgent = {}));\nmodule.exports = createHttpProxyAgent;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst debug_1 = __importDefault(require(\"debug\"));\nconst debug = debug_1.default('https-proxy-agent:parse-proxy-response');\nfunction parseProxyResponse(socket) {\n return new Promise((resolve, reject) => {\n // we need to buffer any HTTP traffic that happens with the proxy before we get\n // the CONNECT response, so that if the response is anything other than an \"200\"\n // response code, then we can re-play the \"data\" events on the socket once the\n // HTTP parser is hooked up...\n let buffersLength = 0;\n const buffers = [];\n function read() {\n const b = socket.read();\n if (b)\n ondata(b);\n else\n socket.once('readable', read);\n }\n function cleanup() {\n socket.removeListener('end', onend);\n socket.removeListener('error', onerror);\n socket.removeListener('close', onclose);\n socket.removeListener('readable', read);\n }\n function onclose(err) {\n debug('onclose had error %o', err);\n }\n function onend() {\n debug('onend');\n }\n function onerror(err) {\n cleanup();\n debug('onerror %o', err);\n reject(err);\n }\n function ondata(b) {\n buffers.push(b);\n buffersLength += b.length;\n const buffered = Buffer.concat(buffers, buffersLength);\n const endOfHeaders = buffered.indexOf('\\r\\n\\r\\n');\n if (endOfHeaders === -1) {\n // keep buffering\n debug('have not received end of HTTP headers yet...');\n read();\n return;\n }\n const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\\r\\n'));\n const statusCode = +firstLine.split(' ')[1];\n debug('got proxy server response: %o', firstLine);\n resolve({\n statusCode,\n buffered\n });\n }\n socket.on('error', onerror);\n socket.on('close', onclose);\n socket.on('end', onend);\n read();\n });\n}\nexports.default = parseProxyResponse;\n//# sourceMappingURL=parse-proxy-response.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst net_1 = __importDefault(require(\"net\"));\nconst tls_1 = __importDefault(require(\"tls\"));\nconst url_1 = __importDefault(require(\"url\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst debug_1 = __importDefault(require(\"debug\"));\nconst agent_base_1 = require(\"agent-base\");\nconst parse_proxy_response_1 = __importDefault(require(\"./parse-proxy-response\"));\nconst debug = debug_1.default('https-proxy-agent:agent');\n/**\n * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to\n * the specified \"HTTP(s) proxy server\" in order to proxy HTTPS requests.\n *\n * Outgoing HTTP requests are first tunneled through the proxy server using the\n * `CONNECT` HTTP request method to establish a connection to the proxy server,\n * and then the proxy server connects to the destination target and issues the\n * HTTP request from the proxy server.\n *\n * `https:` requests have their socket connection upgraded to TLS once\n * the connection to the proxy server has been established.\n *\n * @api public\n */\nclass HttpsProxyAgent extends agent_base_1.Agent {\n constructor(_opts) {\n let opts;\n if (typeof _opts === 'string') {\n opts = url_1.default.parse(_opts);\n }\n else {\n opts = _opts;\n }\n if (!opts) {\n throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');\n }\n debug('creating new HttpsProxyAgent instance: %o', opts);\n super(opts);\n const proxy = Object.assign({}, opts);\n // If `true`, then connect to the proxy server over TLS.\n // Defaults to `false`.\n this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);\n // Prefer `hostname` over `host`, and set the `port` if needed.\n proxy.host = proxy.hostname || proxy.host;\n if (typeof proxy.port === 'string') {\n proxy.port = parseInt(proxy.port, 10);\n }\n if (!proxy.port && proxy.host) {\n proxy.port = this.secureProxy ? 443 : 80;\n }\n // ALPN is supported by Node.js >= v5.\n // attempt to negotiate http/1.1 for proxy servers that support http/2\n if (this.secureProxy && !('ALPNProtocols' in proxy)) {\n proxy.ALPNProtocols = ['http 1.1'];\n }\n if (proxy.host && proxy.path) {\n // If both a `host` and `path` are specified then it's most likely\n // the result of a `url.parse()` call... we need to remove the\n // `path` portion so that `net.connect()` doesn't attempt to open\n // that as a Unix socket file.\n delete proxy.path;\n delete proxy.pathname;\n }\n this.proxy = proxy;\n }\n /**\n * Called when the node-core HTTP client library is creating a\n * new HTTP request.\n *\n * @api protected\n */\n callback(req, opts) {\n return __awaiter(this, void 0, void 0, function* () {\n const { proxy, secureProxy } = this;\n // Create a socket connection to the proxy server.\n let socket;\n if (secureProxy) {\n debug('Creating `tls.Socket`: %o', proxy);\n socket = tls_1.default.connect(proxy);\n }\n else {\n debug('Creating `net.Socket`: %o', proxy);\n socket = net_1.default.connect(proxy);\n }\n const headers = Object.assign({}, proxy.headers);\n const hostname = `${opts.host}:${opts.port}`;\n let payload = `CONNECT ${hostname} HTTP/1.1\\r\\n`;\n // Inject the `Proxy-Authorization` header if necessary.\n if (proxy.auth) {\n headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`;\n }\n // The `Host` header should only include the port\n // number when it is not the default port.\n let { host, port, secureEndpoint } = opts;\n if (!isDefaultPort(port, secureEndpoint)) {\n host += `:${port}`;\n }\n headers.Host = host;\n headers.Connection = 'close';\n for (const name of Object.keys(headers)) {\n payload += `${name}: ${headers[name]}\\r\\n`;\n }\n const proxyResponsePromise = parse_proxy_response_1.default(socket);\n socket.write(`${payload}\\r\\n`);\n const { statusCode, buffered } = yield proxyResponsePromise;\n if (statusCode === 200) {\n req.once('socket', resume);\n if (opts.secureEndpoint) {\n // The proxy is connecting to a TLS server, so upgrade\n // this socket connection to a TLS connection.\n debug('Upgrading socket connection to TLS');\n const servername = opts.servername || opts.host;\n return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,\n servername }));\n }\n return socket;\n }\n // Some other status code that's not 200... need to re-play the HTTP\n // header \"data\" events onto the socket once the HTTP machinery is\n // attached so that the node core `http` can parse and handle the\n // error status code.\n // Close the original socket, and a new \"fake\" socket is returned\n // instead, so that the proxy doesn't get the HTTP request\n // written to it (which may contain `Authorization` headers or other\n // sensitive data).\n //\n // See: https://hackerone.com/reports/541502\n socket.destroy();\n const fakeSocket = new net_1.default.Socket({ writable: false });\n fakeSocket.readable = true;\n // Need to wait for the \"socket\" event to re-play the \"data\" events.\n req.once('socket', (s) => {\n debug('replaying proxy buffer for failed request');\n assert_1.default(s.listenerCount('data') > 0);\n // Replay the \"buffered\" Buffer onto the fake `socket`, since at\n // this point the HTTP module machinery has been hooked up for\n // the user.\n s.push(buffered);\n s.push(null);\n });\n return fakeSocket;\n });\n }\n}\nexports.default = HttpsProxyAgent;\nfunction resume(socket) {\n socket.resume();\n}\nfunction isDefaultPort(port, secure) {\n return Boolean((!secure && port === 80) || (secure && port === 443));\n}\nfunction isHTTPS(protocol) {\n return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;\n}\nfunction omit(obj, ...keys) {\n const ret = {};\n let key;\n for (key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\n//# sourceMappingURL=agent.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nconst agent_1 = __importDefault(require(\"./agent\"));\nfunction createHttpsProxyAgent(opts) {\n return new agent_1.default(opts);\n}\n(function (createHttpsProxyAgent) {\n createHttpsProxyAgent.HttpsProxyAgent = agent_1.default;\n createHttpsProxyAgent.prototype = agent_1.default.prototype;\n})(createHttpsProxyAgent || (createHttpsProxyAgent = {}));\nmodule.exports = createHttpsProxyAgent;\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAgent = exports.pool = void 0;\nconst http_1 = require(\"http\");\nconst https_1 = require(\"https\");\n// eslint-disable-next-line node/no-deprecated-api\nconst url_1 = require(\"url\");\nexports.pool = new Map();\n/**\n * Determines if a proxy should be considered based on the environment.\n *\n * @param uri The request uri\n * @returns {boolean}\n */\nfunction shouldUseProxyForURI(uri) {\n const noProxyEnv = process.env.NO_PROXY || process.env.no_proxy;\n if (!noProxyEnv) {\n return true;\n }\n const givenURI = new URL(uri);\n for (const noProxyRaw of noProxyEnv.split(',')) {\n const noProxy = noProxyRaw.trim();\n if (noProxy === givenURI.origin || noProxy === givenURI.hostname) {\n return false;\n }\n else if (noProxy.startsWith('*.') || noProxy.startsWith('.')) {\n const noProxyWildcard = noProxy.replace(/^\\*\\./, '.');\n if (givenURI.hostname.endsWith(noProxyWildcard)) {\n return false;\n }\n }\n }\n return true;\n}\n/**\n * Returns a custom request Agent if one is found, otherwise returns undefined\n * which will result in the global http(s) Agent being used.\n * @private\n * @param {string} uri The request uri\n * @param {Options} reqOpts The request options\n * @returns {HttpAnyAgent|undefined}\n */\nfunction getAgent(uri, reqOpts) {\n const isHttp = uri.startsWith('http://');\n const proxy = reqOpts.proxy ||\n process.env.HTTP_PROXY ||\n process.env.http_proxy ||\n process.env.HTTPS_PROXY ||\n process.env.https_proxy;\n const poolOptions = Object.assign({}, reqOpts.pool);\n const manuallyProvidedProxy = !!reqOpts.proxy;\n const shouldUseProxy = manuallyProvidedProxy || shouldUseProxyForURI(uri);\n if (proxy && shouldUseProxy) {\n // tslint:disable-next-line variable-name\n const Agent = isHttp\n ? require('http-proxy-agent')\n : require('https-proxy-agent');\n const proxyOpts = { ...(0, url_1.parse)(proxy), ...poolOptions };\n return new Agent(proxyOpts);\n }\n let key = isHttp ? 'http' : 'https';\n if (reqOpts.forever) {\n key += ':forever';\n if (!exports.pool.has(key)) {\n // tslint:disable-next-line variable-name\n const Agent = isHttp ? http_1.Agent : https_1.Agent;\n exports.pool.set(key, new Agent({ ...poolOptions, keepAlive: true }));\n }\n }\n return exports.pool.get(key);\n}\nexports.getAgent = getAgent;\n//# sourceMappingURL=agents.js.map","\"use strict\";\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TeenyStatistics = exports.TeenyStatisticsWarning = void 0;\n/**\n * @class TeenyStatisticsWarning\n * @extends Error\n * @description While an error, is used for emitting warnings when\n * meeting certain configured thresholds.\n * @see process.emitWarning\n */\nclass TeenyStatisticsWarning extends Error {\n /**\n * @param {string} message\n */\n constructor(message) {\n super(message);\n this.threshold = 0;\n this.type = '';\n this.value = 0;\n this.name = this.constructor.name;\n Error.captureStackTrace(this, this.constructor);\n }\n}\nexports.TeenyStatisticsWarning = TeenyStatisticsWarning;\nTeenyStatisticsWarning.CONCURRENT_REQUESTS = 'ConcurrentRequestsExceededWarning';\n/**\n * @class TeenyStatistics\n * @description Maintain various statistics internal to teeny-request. Tracking\n * is not automatic and must be instrumented within teeny-request.\n */\nclass TeenyStatistics {\n /**\n * @param {TeenyStatisticsOptions} [opts]\n */\n constructor(opts) {\n /**\n * @type {number}\n * @private\n * @default 0\n */\n this._concurrentRequests = 0;\n /**\n * @type {boolean}\n * @private\n * @default false\n */\n this._didConcurrentRequestWarn = false;\n this._options = TeenyStatistics._prepareOptions(opts);\n }\n /**\n * Returns a copy of the current options.\n * @return {TeenyStatisticsOptions}\n */\n getOptions() {\n return Object.assign({}, this._options);\n }\n /**\n * Change configured statistics options. This will not preserve unspecified\n * options that were previously specified, i.e. this is a reset of options.\n * @param {TeenyStatisticsOptions} [opts]\n * @returns {TeenyStatisticsConfig} The previous options.\n * @see _prepareOptions\n */\n setOptions(opts) {\n const oldOpts = this._options;\n this._options = TeenyStatistics._prepareOptions(opts);\n return oldOpts;\n }\n /**\n * @readonly\n * @return {TeenyStatisticsCounters}\n */\n get counters() {\n return {\n concurrentRequests: this._concurrentRequests,\n };\n }\n /**\n * @description Should call this right before making a request.\n */\n requestStarting() {\n this._concurrentRequests++;\n if (this._options.concurrentRequests > 0 &&\n this._concurrentRequests >= this._options.concurrentRequests &&\n !this._didConcurrentRequestWarn) {\n this._didConcurrentRequestWarn = true;\n const warning = new TeenyStatisticsWarning('Possible excessive concurrent requests detected. ' +\n this._concurrentRequests +\n ' requests in-flight, which exceeds the configured threshold of ' +\n this._options.concurrentRequests +\n '. Use the TEENY_REQUEST_WARN_CONCURRENT_REQUESTS environment ' +\n 'variable or the concurrentRequests option of teeny-request to ' +\n 'increase or disable (0) this warning.');\n warning.type = TeenyStatisticsWarning.CONCURRENT_REQUESTS;\n warning.value = this._concurrentRequests;\n warning.threshold = this._options.concurrentRequests;\n process.emitWarning(warning);\n }\n }\n /**\n * @description When using `requestStarting`, call this after the request\n * has finished.\n */\n requestFinished() {\n // TODO negative?\n this._concurrentRequests--;\n }\n /**\n * Configuration Precedence:\n * 1. Dependency inversion via defined option.\n * 2. Global numeric environment variable.\n * 3. Built-in default.\n * This will not preserve unspecified options previously specified.\n * @param {TeenyStatisticsOptions} [opts]\n * @returns {TeenyStatisticsOptions}\n * @private\n */\n static _prepareOptions({ concurrentRequests: diConcurrentRequests, } = {}) {\n let concurrentRequests = this.DEFAULT_WARN_CONCURRENT_REQUESTS;\n const envConcurrentRequests = Number(process.env.TEENY_REQUEST_WARN_CONCURRENT_REQUESTS);\n if (diConcurrentRequests !== undefined) {\n concurrentRequests = diConcurrentRequests;\n }\n else if (!Number.isNaN(envConcurrentRequests)) {\n concurrentRequests = envConcurrentRequests;\n }\n return { concurrentRequests };\n }\n}\nexports.TeenyStatistics = TeenyStatistics;\n/**\n * @description A default threshold representing when to warn about excessive\n * in-flight/concurrent requests.\n * @type {number}\n * @static\n * @readonly\n * @default 5000\n */\nTeenyStatistics.DEFAULT_WARN_CONCURRENT_REQUESTS = 5000;\n//# sourceMappingURL=TeenyStatistics.js.map","'use strict'\n\nmodule.exports = function stubs(obj, method, cfg, stub) {\n if (!obj || !method || !obj[method])\n throw new Error('You must provide an object and a key for an existing method')\n\n if (!stub) {\n stub = cfg\n cfg = {}\n }\n\n stub = stub || function() {}\n\n cfg.callthrough = cfg.callthrough || false\n cfg.calls = cfg.calls || 0\n\n var norevert = cfg.calls === 0\n\n var cached = obj[method].bind(obj)\n\n obj[method] = function() {\n var args = [].slice.call(arguments)\n var returnVal\n\n if (cfg.callthrough)\n returnVal = cached.apply(obj, args)\n\n returnVal = stub.apply(obj, args) || returnVal\n\n if (!norevert && --cfg.calls === 0)\n obj[method] = cached\n\n return returnVal\n }\n}\n","'use strict';\n\nvar stubs = require('stubs')\n\n/*\n * StreamEvents can be used 2 ways:\n *\n * 1:\n * function MyStream() {\n * require('stream-events').call(this)\n * }\n *\n * 2:\n * require('stream-events')(myStream)\n */\nfunction StreamEvents(stream) {\n stream = stream || this\n\n var cfg = {\n callthrough: true,\n calls: 1\n }\n\n stubs(stream, '_read', cfg, stream.emit.bind(stream, 'reading'))\n stubs(stream, '_write', cfg, stream.emit.bind(stream, 'writing'))\n\n return stream\n}\n\nmodule.exports = StreamEvents\n","\"use strict\";\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.teenyRequest = exports.RequestError = void 0;\nconst node_fetch_1 = require(\"node-fetch\");\nconst stream_1 = require(\"stream\");\nconst uuid = require(\"uuid\");\nconst agents_1 = require(\"./agents\");\nconst TeenyStatistics_1 = require(\"./TeenyStatistics\");\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst streamEvents = require('stream-events');\nclass RequestError extends Error {\n}\nexports.RequestError = RequestError;\n/**\n * Convert options from Request to Fetch format\n * @private\n * @param reqOpts Request options\n */\nfunction requestToFetchOptions(reqOpts) {\n const options = {\n method: reqOpts.method || 'GET',\n ...(reqOpts.timeout && { timeout: reqOpts.timeout }),\n ...(typeof reqOpts.gzip === 'boolean' && { compress: reqOpts.gzip }),\n };\n if (typeof reqOpts.json === 'object') {\n // Add Content-type: application/json header\n reqOpts.headers = reqOpts.headers || {};\n reqOpts.headers['Content-Type'] = 'application/json';\n // Set body to JSON representation of value\n options.body = JSON.stringify(reqOpts.json);\n }\n else {\n if (Buffer.isBuffer(reqOpts.body)) {\n options.body = reqOpts.body;\n }\n else if (typeof reqOpts.body !== 'string') {\n options.body = JSON.stringify(reqOpts.body);\n }\n else {\n options.body = reqOpts.body;\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n options.headers = reqOpts.headers;\n let uri = (reqOpts.uri ||\n reqOpts.url);\n if (!uri) {\n throw new Error('Missing uri or url in reqOpts.');\n }\n if (reqOpts.useQuerystring === true || typeof reqOpts.qs === 'object') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const qs = require('querystring');\n const params = qs.stringify(reqOpts.qs);\n uri = uri + '?' + params;\n }\n options.agent = (0, agents_1.getAgent)(uri, reqOpts);\n return { uri, options };\n}\n/**\n * Convert a response from `fetch` to `request` format.\n * @private\n * @param opts The `request` options used to create the request.\n * @param res The Fetch response\n * @returns A `request` response object\n */\nfunction fetchToRequestResponse(opts, res) {\n const request = {};\n request.agent = opts.agent || false;\n request.headers = (opts.headers || {});\n request.href = res.url;\n // headers need to be converted from a map to an obj\n const resHeaders = {};\n res.headers.forEach((value, key) => (resHeaders[key] = value));\n const response = Object.assign(res.body, {\n statusCode: res.status,\n statusMessage: res.statusText,\n request,\n body: res.body,\n headers: resHeaders,\n toJSON: () => ({ headers: resHeaders }),\n });\n return response;\n}\n/**\n * Create POST body from two parts as multipart/related content-type\n * @private\n * @param boundary\n * @param multipart\n */\nfunction createMultipartStream(boundary, multipart) {\n const finale = `--${boundary}--`;\n const stream = new stream_1.PassThrough();\n for (const part of multipart) {\n const preamble = `--${boundary}\\r\\nContent-Type: ${part['Content-Type']}\\r\\n\\r\\n`;\n stream.write(preamble);\n if (typeof part.body === 'string') {\n stream.write(part.body);\n stream.write('\\r\\n');\n }\n else {\n part.body.pipe(stream, { end: false });\n part.body.on('end', () => {\n stream.write('\\r\\n');\n stream.write(finale);\n stream.end();\n });\n }\n }\n return stream;\n}\nfunction teenyRequest(reqOpts, callback) {\n const { uri, options } = requestToFetchOptions(reqOpts);\n const multipart = reqOpts.multipart;\n if (reqOpts.multipart && multipart.length === 2) {\n if (!callback) {\n // TODO: add support for multipart uploads through streaming\n throw new Error('Multipart without callback is not implemented.');\n }\n const boundary = uuid.v4();\n options.headers['Content-Type'] = `multipart/related; boundary=${boundary}`;\n options.body = createMultipartStream(boundary, multipart);\n // Multipart upload\n teenyRequest.stats.requestStarting();\n (0, node_fetch_1.default)(uri, options).then(res => {\n teenyRequest.stats.requestFinished();\n const header = res.headers.get('content-type');\n const response = fetchToRequestResponse(options, res);\n const body = response.body;\n if (header === 'application/json' ||\n header === 'application/json; charset=utf-8') {\n res.json().then(json => {\n response.body = json;\n callback(null, response, json);\n }, (err) => {\n callback(err, response, body);\n });\n return;\n }\n res.text().then(text => {\n response.body = text;\n callback(null, response, text);\n }, err => {\n callback(err, response, body);\n });\n }, err => {\n teenyRequest.stats.requestFinished();\n callback(err, null, null);\n });\n return;\n }\n if (callback === undefined) {\n // Stream mode\n const requestStream = streamEvents(new stream_1.PassThrough());\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let responseStream;\n requestStream.once('reading', () => {\n if (responseStream) {\n (0, stream_1.pipeline)(responseStream, requestStream, () => { });\n }\n else {\n requestStream.once('response', () => {\n (0, stream_1.pipeline)(responseStream, requestStream, () => { });\n });\n }\n });\n options.compress = false;\n teenyRequest.stats.requestStarting();\n (0, node_fetch_1.default)(uri, options).then(res => {\n teenyRequest.stats.requestFinished();\n responseStream = res.body;\n responseStream.on('error', (err) => {\n requestStream.emit('error', err);\n });\n const response = fetchToRequestResponse(options, res);\n requestStream.emit('response', response);\n }, err => {\n teenyRequest.stats.requestFinished();\n requestStream.emit('error', err);\n });\n // fetch doesn't supply the raw HTTP stream, instead it\n // returns a PassThrough piped from the HTTP response\n // stream.\n return requestStream;\n }\n // GET or POST with callback\n teenyRequest.stats.requestStarting();\n (0, node_fetch_1.default)(uri, options).then(res => {\n teenyRequest.stats.requestFinished();\n const header = res.headers.get('content-type');\n const response = fetchToRequestResponse(options, res);\n const body = response.body;\n if (header === 'application/json' ||\n header === 'application/json; charset=utf-8') {\n if (response.statusCode === 204) {\n // Probably a DELETE\n callback(null, response, body);\n return;\n }\n res.json().then(json => {\n response.body = json;\n callback(null, response, json);\n }, err => {\n callback(err, response, body);\n });\n return;\n }\n res.text().then(text => {\n const response = fetchToRequestResponse(options, res);\n response.body = text;\n callback(null, response, text);\n }, err => {\n callback(err, response, body);\n });\n }, err => {\n teenyRequest.stats.requestFinished();\n callback(err, null, null);\n });\n return;\n}\nexports.teenyRequest = teenyRequest;\nteenyRequest.defaults = (defaults) => {\n return (reqOpts, callback) => {\n const opts = { ...defaults, ...reqOpts };\n if (callback === undefined) {\n return teenyRequest(opts);\n }\n teenyRequest(opts, callback);\n };\n};\n/**\n * Single instance of an interface for keeping track of things.\n */\nteenyRequest.stats = new TeenyStatistics_1.TeenyStatistics();\nteenyRequest.resetStats = () => {\n teenyRequest.stats = new TeenyStatistics_1.TeenyStatistics(teenyRequest.stats.getOptions());\n};\n//# sourceMappingURL=index.js.map","{\n \"name\": \"@google-cloud/storage\",\n \"description\": \"Cloud Storage Client Library for Node.js\",\n \"version\": \"7.21.0\",\n \"license\": \"Apache-2.0\",\n \"author\": \"Google Inc.\",\n \"engines\": {\n \"node\": \">=14\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"directory\": \"handwritten/storage\",\n \"url\": \"https://github.com/googleapis/google-cloud-node.git\"\n },\n \"main\": \"./build/cjs/src/index.js\",\n \"types\": \"./build/cjs/src/index.d.ts\",\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./build/esm/src/index.d.ts\",\n \"default\": \"./build/esm/src/index.js\"\n },\n \"require\": {\n \"types\": \"./build/cjs/src/index.d.ts\",\n \"default\": \"./build/cjs/src/index.js\"\n }\n }\n },\n \"files\": [\n \"build/cjs/src\",\n \"build/cjs/package.json\",\n \"!build/cjs/src/**/*.map\",\n \"build/esm/src\",\n \"!build/esm/src/**/*.map\"\n ],\n \"keywords\": [\n \"google apis client\",\n \"google api client\",\n \"google apis\",\n \"google api\",\n \"google\",\n \"google cloud platform\",\n \"google cloud\",\n \"cloud\",\n \"google storage\",\n \"storage\"\n ],\n \"scripts\": {\n \"all-test\": \"npm test && npm run system-test && npm run samples-test\",\n \"benchwrapper\": \"node bin/benchwrapper.js\",\n \"check\": \"gts check\",\n \"clean\": \"rm -rf build/\",\n \"compile:cjs\": \"tsc -p ./tsconfig.cjs.json\",\n \"compile:esm\": \"tsc -p .\",\n \"compile\": \"npm run compile:cjs && npm run compile:esm\",\n \"conformance-test\": \"mocha --parallel build/cjs/conformance-test/ --require build/cjs/conformance-test/globalHooks.js\",\n \"docs\": \"jsdoc -c .jsdoc.json\",\n \"fix\": \"gts fix\",\n \"lint\": \"gts check\",\n \"postcompile\": \"cp ./src/package-json-helper.cjs ./build/cjs/src && cp ./src/package-json-helper.cjs ./build/esm/src\",\n \"postcompile:cjs\": \"babel --plugins gapic-tools/build/src/replaceImportMetaUrl,gapic-tools/build/src/toggleESMFlagVariable build/cjs/src/util.js -o build/cjs/src/util.js && cp internal-tooling/helpers/package.cjs.json build/cjs/package.json\",\n \"precompile\": \"rm -rf build/\",\n \"preconformance-test\": \"npm run compile:cjs -- --sourceMap\",\n \"predocs\": \"npm run compile:cjs -- --sourceMap\",\n \"prelint\": \"cd samples; npm link ../; npm install\",\n \"prepare\": \"npm run compile\",\n \"presystem-test:esm\": \"npm run compile:esm\",\n \"presystem-test\": \"npm run compile -- --sourceMap\",\n \"pretest\": \"npm run compile -- --sourceMap\",\n \"samples-test\": \"npm link && cd samples/ && npm link ../ && npm test && cd ../\",\n \"system-test:esm\": \"mocha build/esm/system-test --timeout 600000 --exit\",\n \"system-test\": \"mocha build/cjs/system-test --timeout 600000 --exit\",\n \"test\": \"cross-env NODE_OPTIONS='--no-deprecation' c8 mocha build/cjs/test\"\n },\n \"dependencies\": {\n \"@google-cloud/paginator\": \"^5.0.0\",\n \"@google-cloud/projectify\": \"^4.0.0\",\n \"@google-cloud/promisify\": \"<4.1.0\",\n \"abort-controller\": \"^3.0.0\",\n \"async-retry\": \"^1.3.3\",\n \"duplexify\": \"^4.1.3\",\n \"fast-xml-parser\": \"^5.3.4\",\n \"gaxios\": \"^6.0.2\",\n \"google-auth-library\": \"^9.6.3\",\n \"html-entities\": \"^2.5.2\",\n \"mime\": \"^3.0.0\",\n \"p-limit\": \"^3.0.1\",\n \"retry-request\": \"^7.0.0\",\n \"teeny-request\": \"^9.0.0\"\n },\n \"devDependencies\": {\n \"@babel/cli\": \"^7.22.10\",\n \"@babel/core\": \"^7.22.11\",\n \"@google-cloud/pubsub\": \"^4.0.0\",\n \"@grpc/grpc-js\": \"^1.0.3\",\n \"@grpc/proto-loader\": \"^0.8.0\",\n \"@types/async-retry\": \"^1.4.3\",\n \"@types/duplexify\": \"^3.6.4\",\n \"@types/mime\": \"^3.0.0\",\n \"@types/mocha\": \"^9.1.1\",\n \"@types/mockery\": \"^1.4.29\",\n \"@types/node\": \"^24.0.0\",\n \"@types/node-fetch\": \"^2.1.3\",\n \"@types/proxyquire\": \"^1.3.28\",\n \"@types/request\": \"^2.48.4\",\n \"@types/sinon\": \"^17.0.0\",\n \"@types/tmp\": \"0.2.6\",\n \"@types/yargs\": \"^17.0.10\",\n \"c8\": \"^9.0.0\",\n \"form-data\": \"^4.0.4\",\n \"gapic-tools\": \"^0.4.0\",\n \"gts\": \"^5.0.0\",\n \"jsdoc\": \"^4.0.4\",\n \"jsdoc-fresh\": \"^5.0.0\",\n \"jsdoc-region-tag\": \"^4.0.0\",\n \"mocha\": \"^9.2.2\",\n \"mockery\": \"^2.1.0\",\n \"nock\": \"~13.5.0\",\n \"node-fetch\": \"^2.6.7\",\n \"pack-n-play\": \"^2.0.0\",\n \"proxyquire\": \"^2.1.3\",\n \"sinon\": \"^18.0.0\",\n \"nise\": \"6.0.0\",\n \"path-to-regexp\": \"6.3.0\",\n \"tmp\": \"^0.2.0\",\n \"typescript\": \"^5.1.6\",\n \"yargs\": \"^17.3.1\",\n \"cross-env\": \"^7.0.3\"\n },\n \"homepage\": \"https://github.com/googleapis/google-cloud-node/tree/main/handwritten/storage\"\n}\n","// Copyright 2023 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/* eslint-disable node/no-missing-require */\n\nfunction getPackageJSON() {\n return require('../../../package.json');\n}\n\nexports.getPackageJSON = getPackageJSON;\n","// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport * as path from 'path';\nimport * as querystring from 'querystring';\nimport { PassThrough } from 'stream';\nimport * as url from 'url';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { getPackageJSON } from './package-json-helper.cjs';\n// Done to avoid a problem with mangling of identifiers when using esModuleInterop\nconst fileURLToPath = url.fileURLToPath;\nconst isEsm = true;\nexport function normalize(optionsOrCallback, cb) {\n const options = (typeof optionsOrCallback === 'object' ? optionsOrCallback : {});\n const callback = (typeof optionsOrCallback === 'function' ? optionsOrCallback : cb);\n return { options, callback };\n}\n/**\n * Flatten an object into an Array of arrays, [[key, value], ..].\n * Implements Object.entries() for Node.js <8\n * @internal\n */\nexport function objectEntries(obj) {\n return Object.keys(obj).map(key => [key, obj[key]]);\n}\n/**\n * Encode `str` with encodeURIComponent, plus these\n * reserved characters: `! * ' ( )`.\n *\n * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent| MDN: fixedEncodeURIComponent}\n *\n * @param {string} str The URI component to encode.\n * @return {string} The encoded string.\n */\nexport function fixedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase());\n}\n/**\n * URI encode `uri` for generating signed URLs, using fixedEncodeURIComponent.\n *\n * Encode every byte except `A-Z a-Z 0-9 ~ - . _`.\n *\n * @param {string} uri The URI to encode.\n * @param [boolean=false] encodeSlash If `true`, the \"/\" character is not encoded.\n * @return {string} The encoded string.\n */\nexport function encodeURI(uri, encodeSlash) {\n // Split the string by `/`, and conditionally rejoin them with either\n // %2F if encodeSlash is `true`, or '/' if `false`.\n return uri\n .split('/')\n .map(fixedEncodeURIComponent)\n .join(encodeSlash ? '%2F' : '/');\n}\n/**\n * Serialize an object to a URL query string using util.encodeURI(uri, true).\n * @param {string} url The object to serialize.\n * @return {string} Serialized string.\n */\nexport function qsStringify(qs) {\n return querystring.stringify(qs, '&', '=', {\n encodeURIComponent: (component) => encodeURI(component, true),\n });\n}\nexport function objectKeyToLowercase(object) {\n const newObj = {};\n for (let key of Object.keys(object)) {\n const value = object[key];\n key = key.toLowerCase();\n newObj[key] = value;\n }\n return newObj;\n}\n/**\n * JSON encode str, with unicode \\u+ representation.\n * @param {object} obj The object to encode.\n * @return {string} Serialized string.\n */\nexport function unicodeJSONStringify(obj) {\n return JSON.stringify(obj).replace(/[\\u0080-\\uFFFF]/g, (char) => '\\\\u' + ('0000' + char.charCodeAt(0).toString(16)).slice(-4));\n}\n/**\n * Converts the given objects keys to snake_case\n * @param {object} obj object to convert keys to snake case.\n * @returns {object} object with keys converted to snake case.\n */\nexport function convertObjKeysToSnakeCase(obj) {\n if (obj instanceof Date || obj instanceof RegExp) {\n return obj;\n }\n if (Array.isArray(obj)) {\n return obj.map(convertObjKeysToSnakeCase);\n }\n if (obj instanceof Object) {\n return Object.keys(obj).reduce((acc, cur) => {\n const s = cur[0].toLocaleLowerCase() +\n cur.slice(1).replace(/([A-Z]+)/g, (match, p1) => {\n return `_${p1.toLowerCase()}`;\n });\n acc[s] = convertObjKeysToSnakeCase(obj[cur]);\n return acc;\n }, Object());\n }\n return obj;\n}\n/**\n * Formats the provided date object as a UTC ISO string.\n * @param {Date} dateTimeToFormat date object to be formatted.\n * @param {boolean} includeTime flag to include hours, minutes, seconds in output.\n * @param {string} dateDelimiter delimiter between date components.\n * @param {string} timeDelimiter delimiter between time components.\n * @returns {string} UTC ISO format of provided date object.\n */\nexport function formatAsUTCISO(dateTimeToFormat, includeTime = false, dateDelimiter = '', timeDelimiter = '') {\n const year = dateTimeToFormat.getUTCFullYear();\n const month = dateTimeToFormat.getUTCMonth() + 1;\n const day = dateTimeToFormat.getUTCDate();\n const hour = dateTimeToFormat.getUTCHours();\n const minute = dateTimeToFormat.getUTCMinutes();\n const second = dateTimeToFormat.getUTCSeconds();\n let resultString = `${year.toString().padStart(4, '0')}${dateDelimiter}${month\n .toString()\n .padStart(2, '0')}${dateDelimiter}${day.toString().padStart(2, '0')}`;\n if (includeTime) {\n resultString = `${resultString}T${hour\n .toString()\n .padStart(2, '0')}${timeDelimiter}${minute\n .toString()\n .padStart(2, '0')}${timeDelimiter}${second.toString().padStart(2, '0')}Z`;\n }\n return resultString;\n}\n/**\n * Examines the runtime environment and returns the appropriate tracking string.\n * @returns {string} metrics tracking string based on the current runtime environment.\n */\nexport function getRuntimeTrackingString() {\n if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n globalThis.Deno &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n globalThis.Deno.version &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n globalThis.Deno.version.deno) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return `gl-deno/${globalThis.Deno.version.deno}`;\n }\n else {\n return `gl-node/${process.versions.node}`;\n }\n}\n/**\n * Looks at package.json and creates the user-agent string to be applied to request headers.\n * @returns {string} user agent string.\n */\nexport function getUserAgentString() {\n const pkg = getPackageJSON();\n const hyphenatedPackageName = pkg.name\n .replace('@google-cloud', 'gcloud-node') // For legacy purposes.\n .replace('/', '-'); // For UA spec-compliance purposes.\n return hyphenatedPackageName + '/' + pkg.version;\n}\nexport function getDirName() {\n let dirToUse = '';\n try {\n dirToUse = __dirname;\n }\n catch (e) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n dirToUse = path.dirname(fileURLToPath(import.meta.url));\n }\n return dirToUse;\n}\nexport function getModuleFormat() {\n return isEsm ? 'ESM' : 'CJS';\n}\nexport class PassThroughShim extends PassThrough {\n constructor() {\n super(...arguments);\n this.shouldEmitReading = true;\n this.shouldEmitWriting = true;\n }\n _read(size) {\n if (this.shouldEmitReading) {\n this.emit('reading');\n this.shouldEmitReading = false;\n }\n super._read(size);\n }\n _write(chunk, encoding, callback) {\n if (this.shouldEmitWriting) {\n this.emit('writing');\n this.shouldEmitWriting = false;\n }\n // Per the nodejs documentation, callback must be invoked on the next tick\n process.nextTick(() => {\n super._write(chunk, encoding, callback);\n });\n }\n _final(callback) {\n // If the stream is empty (i.e. empty file) final will be invoked before _read / _write\n // and we should still emit the proper events.\n if (this.shouldEmitReading) {\n this.emit('reading');\n this.shouldEmitReading = false;\n }\n if (this.shouldEmitWriting) {\n this.emit('writing');\n this.shouldEmitWriting = false;\n }\n callback(null);\n }\n}\n/**\n * Validates Object Contexts for forbidden characters.\n * Double quotes (\") are forbidden in context keys and values as they\n * interfere with GCS filter string syntax.\n *\n * @param {FileMetadata['contexts']} contexts The contexts object to validate.\n * @returns {void} Throws an error if validation fails.\n */\nexport function validateContexts(contexts) {\n const custom = contexts === null || contexts === void 0 ? void 0 : contexts.custom;\n if (!custom)\n return;\n for (const [key, context] of Object.entries(custom)) {\n if (key.includes('\"')) {\n throw new Error(`Invalid context key \"${key}\": Forbidden character (\") detected.`);\n }\n if ((context === null || context === void 0 ? void 0 : context.value) && context.value.includes('\"')) {\n throw new Error(`Invalid context value for key \"${key}\": Forbidden character (\") detected.`);\n }\n }\n}\n/**\n * Helper to validate contexts and route errors to either a callback or a Promise.\n * @param contexts The contexts to validate.\n * @param callback The optional user-provided callback.\n */\nexport function handleContextValidation(contexts, callback) {\n try {\n validateContexts(contexts);\n }\n catch (err) {\n if (callback) {\n return callback(err);\n }\n return Promise.reject(err);\n }\n}\n","module.exports = require('events').EventEmitter;\n","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\nvar _require2 = require('util'),\n inspect = _require2.inspect;\nvar custom = inspect && inspect.custom || 'inspect';\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\nmodule.exports = /*#__PURE__*/function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) ret += s + p.data;\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n }\n\n // Consumes a specified amount of bytes or characters from the buffered data.\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n\n // Consumes a specified amount of characters from the buffered data.\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Consumes a specified amount of bytes from the buffered data.\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Make sure the linked list only shows the minimal necessary information.\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread(_objectSpread({}, options), {}, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n return BufferList;\n}();","'use strict';\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n return this;\n}\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n return Math.floor(hwm);\n }\n\n // Default value\n return state.objectMode ? 16 : 16 * 1024;\n}\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nrequire('inherits')(Writable, Stream);\nfunction nop() {}\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'finish' (and potentially 'end')\n this.autoDestroy = !!options.autoDestroy;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex);\n\n // legacy.\n this.writable = true;\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END();\n // TODO: defer error events consistently everywhere, not just the cb\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n return true;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n errorOrDestroy(stream, err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n return need;\n}\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n // reuse the free corkReq.\n state.corkedRequestsFree.next = corkReq;\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/*<replacement>*/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;","'use strict';\n\nvar _Object$setPrototypeO;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar finished = require('./end-of-stream');\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n if (resolve !== null) {\n var data = iter[kStream].read();\n // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n next: function next() {\n var _this = this;\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n if (error !== null) {\n return Promise.reject(error);\n }\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n }\n\n // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n var lastPromise = this[kLastPromise];\n var promise;\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n promise = new Promise(this[kHandlePromise]);\n }\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject];\n // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n iterator[kError] = err;\n return;\n }\n var resolve = iterator[kLastResolve];\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\nmodule.exports = createReadableStreamAsyncIterator;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*<replacement>*/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/*</replacement>*/\n\nvar BufferList = require('./internal/streams/buffer_list');\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n\n// Lazy loaded to improve the startup performance.\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\nrequire('inherits')(Readable, Stream);\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'end' (and potentially 'finish')\n this.autoDestroy = !!options.autoDestroy;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex);\n\n // legacy\n this.readable = true;\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n Stream.call(this);\n}\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n }\n\n // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n return er;\n}\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder;\n // If setEncoding(null), decoder.encoding equals utf8\n this._readableState.encoding = this._readableState.decoder.encoding;\n\n // Iterate over current buffer to convert already stored Buffers:\n var p = this._readableState.buffer.head;\n var content = '';\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n this._readableState.buffer.clear();\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n};\n\n// Don't raise the hwm > 1GB\nvar MAX_HWM = 0x40000000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n }\n\n // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n return dest;\n};\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0;\n\n // Try start flowing on next tick if stream isn't explicitly paused\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true;\n\n // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n state.paused = false;\n return this;\n};\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n if (!state.reading) {\n stream.read(0);\n }\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n this._readableState.paused = true;\n return this;\n};\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null);\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n return this;\n};\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n return createReadableStreamAsyncIterator(this);\n };\n}\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n});\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length);\n\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n return from(Readable, iterable, opts);\n };\n}\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\nvar Duplex = require('./_stream_duplex');\nrequire('inherits')(Transform, Duplex);\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null)\n // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\nfunction prefinish() {\n var _this = this;\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null)\n // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\nvar Transform = require('./_stream_transform');\nrequire('inherits')(PassThrough, Transform);\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar eos;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true;\n\n // request.destroy just do .end - .abort is what we want\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\nfunction call(fn) {\n fn();\n}\nfunction pipe(from, to) {\n return from.pipe(to);\n}\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\nmodule.exports = pipeline;","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","// Returns a wrapper function that returns a wrapped callback\n// The wrapper function should do some stuff, and return a\n// presumably different callback function.\n// This makes sure that own properties are retained, so that\n// decorations and such are not lost along the way.\nmodule.exports = wrappy\nfunction wrappy (fn, cb) {\n if (fn && cb) return wrappy(fn)(cb)\n\n if (typeof fn !== 'function')\n throw new TypeError('need wrapper function')\n\n Object.keys(fn).forEach(function (k) {\n wrapper[k] = fn[k]\n })\n\n return wrapper\n\n function wrapper() {\n var args = new Array(arguments.length)\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i]\n }\n var ret = fn.apply(this, args)\n var cb = args[args.length-1]\n if (typeof ret === 'function' && ret !== cb) {\n Object.keys(cb).forEach(function (k) {\n ret[k] = cb[k]\n })\n }\n return ret\n }\n}\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n","var once = require('once');\n\nvar noop = function() {};\n\nvar qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);\n\nvar isRequest = function(stream) {\n\treturn stream.setHeader && typeof stream.abort === 'function';\n};\n\nvar isChildProcess = function(stream) {\n\treturn stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3\n};\n\nvar eos = function(stream, opts, callback) {\n\tif (typeof opts === 'function') return eos(stream, null, opts);\n\tif (!opts) opts = {};\n\n\tcallback = once(callback || noop);\n\n\tvar ws = stream._writableState;\n\tvar rs = stream._readableState;\n\tvar readable = opts.readable || (opts.readable !== false && stream.readable);\n\tvar writable = opts.writable || (opts.writable !== false && stream.writable);\n\tvar cancelled = false;\n\n\tvar onlegacyfinish = function() {\n\t\tif (!stream.writable) onfinish();\n\t};\n\n\tvar onfinish = function() {\n\t\twritable = false;\n\t\tif (!readable) callback.call(stream);\n\t};\n\n\tvar onend = function() {\n\t\treadable = false;\n\t\tif (!writable) callback.call(stream);\n\t};\n\n\tvar onexit = function(exitCode) {\n\t\tcallback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);\n\t};\n\n\tvar onerror = function(err) {\n\t\tcallback.call(stream, err);\n\t};\n\n\tvar onclose = function() {\n\t\tqnt(onclosenexttick);\n\t};\n\n\tvar onclosenexttick = function() {\n\t\tif (cancelled) return;\n\t\tif (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));\n\t\tif (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));\n\t};\n\n\tvar onrequest = function() {\n\t\tstream.req.on('finish', onfinish);\n\t};\n\n\tif (isRequest(stream)) {\n\t\tstream.on('complete', onfinish);\n\t\tstream.on('abort', onclose);\n\t\tif (stream.req) onrequest();\n\t\telse stream.on('request', onrequest);\n\t} else if (writable && !ws) { // legacy streams\n\t\tstream.on('end', onlegacyfinish);\n\t\tstream.on('close', onlegacyfinish);\n\t}\n\n\tif (isChildProcess(stream)) stream.on('exit', onexit);\n\n\tstream.on('end', onend);\n\tstream.on('finish', onfinish);\n\tif (opts.error !== false) stream.on('error', onerror);\n\tstream.on('close', onclose);\n\n\treturn function() {\n\t\tcancelled = true;\n\t\tstream.removeListener('complete', onfinish);\n\t\tstream.removeListener('abort', onclose);\n\t\tstream.removeListener('request', onrequest);\n\t\tif (stream.req) stream.req.removeListener('finish', onfinish);\n\t\tstream.removeListener('end', onlegacyfinish);\n\t\tstream.removeListener('close', onlegacyfinish);\n\t\tstream.removeListener('finish', onfinish);\n\t\tstream.removeListener('exit', onexit);\n\t\tstream.removeListener('end', onend);\n\t\tstream.removeListener('error', onerror);\n\t\tstream.removeListener('close', onclose);\n\t};\n};\n\nmodule.exports = eos;\n","module.exports = shift\n\nfunction shift (stream) {\n var rs = stream._readableState\n if (!rs) return null\n return (rs.objectMode || typeof stream._duplexState === 'number') ? stream.read() : stream.read(getStateLength(rs))\n}\n\nfunction getStateLength (state) {\n if (state.buffer.length) {\n var idx = state.bufferIndex || 0\n // Since node 6.3.0 state.buffer is a BufferList not an array\n if (state.buffer.head) {\n return state.buffer.head.data.length\n } else if (state.buffer.length - idx > 0 && state.buffer[idx]) {\n return state.buffer[idx].length\n }\n }\n\n return state.length\n}\n","var stream = require('readable-stream')\nvar eos = require('end-of-stream')\nvar inherits = require('inherits')\nvar shift = require('stream-shift')\n\nvar SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from)\n ? Buffer.from([0])\n : new Buffer([0])\n\nvar onuncork = function(self, fn) {\n if (self._corked) self.once('uncork', fn)\n else fn()\n}\n\nvar autoDestroy = function (self, err) {\n if (self._autoDestroy) self.destroy(err)\n}\n\nvar destroyer = function(self, end) {\n return function(err) {\n if (err) autoDestroy(self, err.message === 'premature close' ? null : err)\n else if (end && !self._ended) self.end()\n }\n}\n\nvar end = function(ws, fn) {\n if (!ws) return fn()\n if (ws._writableState && ws._writableState.finished) return fn()\n if (ws._writableState) return ws.end(fn)\n ws.end()\n fn()\n}\n\nvar noop = function() {}\n\nvar toStreams2 = function(rs) {\n return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs)\n}\n\nvar Duplexify = function(writable, readable, opts) {\n if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts)\n stream.Duplex.call(this, opts)\n\n this._writable = null\n this._readable = null\n this._readable2 = null\n\n this._autoDestroy = !opts || opts.autoDestroy !== false\n this._forwardDestroy = !opts || opts.destroy !== false\n this._forwardEnd = !opts || opts.end !== false\n this._corked = 1 // start corked\n this._ondrain = null\n this._drained = false\n this._forwarding = false\n this._unwrite = null\n this._unread = null\n this._ended = false\n\n this.destroyed = false\n\n if (writable) this.setWritable(writable)\n if (readable) this.setReadable(readable)\n}\n\ninherits(Duplexify, stream.Duplex)\n\nDuplexify.obj = function(writable, readable, opts) {\n if (!opts) opts = {}\n opts.objectMode = true\n opts.highWaterMark = 16\n return new Duplexify(writable, readable, opts)\n}\n\nDuplexify.prototype.cork = function() {\n if (++this._corked === 1) this.emit('cork')\n}\n\nDuplexify.prototype.uncork = function() {\n if (this._corked && --this._corked === 0) this.emit('uncork')\n}\n\nDuplexify.prototype.setWritable = function(writable) {\n if (this._unwrite) this._unwrite()\n\n if (this.destroyed) {\n if (writable && writable.destroy) writable.destroy()\n return\n }\n\n if (writable === null || writable === false) {\n this.end()\n return\n }\n\n var self = this\n var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd))\n\n var ondrain = function() {\n var ondrain = self._ondrain\n self._ondrain = null\n if (ondrain) ondrain()\n }\n\n var clear = function() {\n self._writable.removeListener('drain', ondrain)\n unend()\n }\n\n if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks\n\n this._writable = writable\n this._writable.on('drain', ondrain)\n this._unwrite = clear\n\n this.uncork() // always uncork setWritable\n}\n\nDuplexify.prototype.setReadable = function(readable) {\n if (this._unread) this._unread()\n\n if (this.destroyed) {\n if (readable && readable.destroy) readable.destroy()\n return\n }\n\n if (readable === null || readable === false) {\n this.push(null)\n this.resume()\n return\n }\n\n var self = this\n var unend = eos(readable, {writable:false, readable:true}, destroyer(this))\n\n var onreadable = function() {\n self._forward()\n }\n\n var onend = function() {\n self.push(null)\n }\n\n var clear = function() {\n self._readable2.removeListener('readable', onreadable)\n self._readable2.removeListener('end', onend)\n unend()\n }\n\n this._drained = true\n this._readable = readable\n this._readable2 = readable._readableState ? readable : toStreams2(readable)\n this._readable2.on('readable', onreadable)\n this._readable2.on('end', onend)\n this._unread = clear\n\n this._forward()\n}\n\nDuplexify.prototype._read = function() {\n this._drained = true\n this._forward()\n}\n\nDuplexify.prototype._forward = function() {\n if (this._forwarding || !this._readable2 || !this._drained) return\n this._forwarding = true\n\n var data\n\n while (this._drained && (data = shift(this._readable2)) !== null) {\n if (this.destroyed) continue\n this._drained = this.push(data)\n }\n\n this._forwarding = false\n}\n\nDuplexify.prototype.destroy = function(err, cb) {\n if (!cb) cb = noop\n if (this.destroyed) return cb(null)\n this.destroyed = true\n\n var self = this\n process.nextTick(function() {\n self._destroy(err)\n cb(null)\n })\n}\n\nDuplexify.prototype._destroy = function(err) {\n if (err) {\n var ondrain = this._ondrain\n this._ondrain = null\n if (ondrain) ondrain(err)\n else this.emit('error', err)\n }\n\n if (this._forwardDestroy) {\n if (this._readable && this._readable.destroy) this._readable.destroy()\n if (this._writable && this._writable.destroy) this._writable.destroy()\n }\n\n this.emit('close')\n}\n\nDuplexify.prototype._write = function(data, enc, cb) {\n if (this.destroyed) return\n if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb))\n if (data === SIGNAL_FLUSH) return this._finish(cb)\n if (!this._writable) return cb()\n\n if (this._writable.write(data) === false) this._ondrain = cb\n else if (!this.destroyed) cb()\n}\n\nDuplexify.prototype._finish = function(cb) {\n var self = this\n this.emit('preend')\n onuncork(this, function() {\n end(self._forwardEnd && self._writable, function() {\n // haxx to not emit prefinish twice\n if (self._writableState.prefinished === false) self._writableState.prefinished = true\n self.emit('prefinish')\n onuncork(self, cb)\n })\n })\n}\n\nDuplexify.prototype.end = function(data, enc, cb) {\n if (typeof data === 'function') return this.end(null, null, data)\n if (typeof enc === 'function') return this.end(data, null, enc)\n this._ended = true\n if (data) this.write(data)\n if (!this._writableState.ending && !this._writableState.destroyed) this.write(SIGNAL_FLUSH)\n return stream.Writable.prototype.end.call(this, cb)\n}\n\nmodule.exports = Duplexify\n","/*!\n * Copyright 2022 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*!\n * @module common/util\n */\nimport { replaceProjectIdToken, MissingProjectIdError, } from '@google-cloud/projectify';\nimport * as htmlEntities from 'html-entities';\nimport { GoogleAuth } from 'google-auth-library';\nimport retryRequest from 'retry-request';\nimport { Transform } from 'stream';\nimport { teenyRequest } from 'teeny-request';\nimport * as crypto from 'crypto';\nimport { DEFAULT_PROJECT_ID_TOKEN } from './service.js';\nimport { getModuleFormat, getRuntimeTrackingString, getUserAgentString, } from '../util.js';\nimport duplexify from 'duplexify';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { getPackageJSON } from '../package-json-helper.cjs';\nconst packageJson = getPackageJSON();\n/**\n * A unique symbol for providing a `gccl-gcs-cmd` value\n * for the `X-Goog-API-Client` header.\n *\n * E.g. the `V` in `X-Goog-API-Client: gccl-gcs-cmd/V`\n **/\nexport const GCCL_GCS_CMD_KEY = Symbol.for('GCCL_GCS_CMD');\nconst requestDefaults = {\n timeout: 60000,\n gzip: true,\n forever: true,\n pool: {\n maxSockets: Infinity,\n },\n};\n/**\n * Default behavior: Automatically retry retriable server errors.\n *\n * @const {boolean}\n * @private\n */\nconst AUTO_RETRY_DEFAULT = true;\n/**\n * Default behavior: Only attempt to retry retriable errors 3 times.\n *\n * @const {number}\n * @private\n */\nconst MAX_RETRY_DEFAULT = 3;\n/**\n * Custom error type for API errors.\n *\n * @param {object} errorBody - Error object.\n */\nexport class ApiError extends Error {\n constructor(errorBodyOrMessage) {\n super();\n if (typeof errorBodyOrMessage !== 'object') {\n this.message = errorBodyOrMessage || '';\n return;\n }\n const errorBody = errorBodyOrMessage;\n this.code = errorBody.code;\n this.errors = errorBody.errors;\n this.response = errorBody.response;\n try {\n this.errors = JSON.parse(this.response.body).error.errors;\n }\n catch (e) {\n this.errors = errorBody.errors;\n }\n this.message = ApiError.createMultiErrorMessage(errorBody, this.errors);\n Error.captureStackTrace(this);\n }\n /**\n * Pieces together an error message by combining all unique error messages\n * returned from a single GoogleError\n *\n * @private\n *\n * @param {GoogleErrorBody} err The original error.\n * @param {GoogleInnerError[]} [errors] Inner errors, if any.\n * @returns {string}\n */\n static createMultiErrorMessage(err, errors) {\n const messages = new Set();\n if (err.message) {\n messages.add(err.message);\n }\n if (errors && errors.length) {\n errors.forEach(({ message }) => messages.add(message));\n }\n else if (err.response && err.response.body) {\n messages.add(htmlEntities.decode(err.response.body.toString()));\n }\n else if (!err.message) {\n messages.add('A failure occurred during this request.');\n }\n let messageArr = Array.from(messages);\n if (messageArr.length > 1) {\n messageArr = messageArr.map((message, i) => ` ${i + 1}. ${message}`);\n messageArr.unshift('Multiple errors occurred during the request. Please see the `errors` array for complete details.\\n');\n messageArr.push('\\n');\n }\n return messageArr.join('\\n');\n }\n}\n/**\n * Custom error type for partial errors returned from the API.\n *\n * @param {object} b - Error object.\n */\nexport class PartialFailureError extends Error {\n constructor(b) {\n super();\n const errorObject = b;\n this.errors = errorObject.errors;\n this.name = 'PartialFailureError';\n this.response = errorObject.response;\n this.message = ApiError.createMultiErrorMessage(errorObject, this.errors);\n }\n}\nexport class Util {\n constructor() {\n this.ApiError = ApiError;\n this.PartialFailureError = PartialFailureError;\n }\n /**\n * No op.\n *\n * @example\n * function doSomething(callback) {\n * callback = callback || noop;\n * }\n */\n noop() { }\n /**\n * Uniformly process an API response.\n *\n * @param {*} err - Error value.\n * @param {*} resp - Response value.\n * @param {*} body - Body value.\n * @param {function} callback - The callback function.\n */\n handleResp(err, resp, body, callback) {\n callback = callback || util.noop;\n const parsedResp = {\n err: err || null,\n ...(resp && util.parseHttpRespMessage(resp)),\n ...(body && util.parseHttpRespBody(body)),\n };\n // Assign the parsed body to resp.body, even if { json: false } was passed\n // as a request option.\n // We assume that nobody uses the previously unparsed value of resp.body.\n if (!parsedResp.err && resp && typeof parsedResp.body === 'object') {\n parsedResp.resp.body = parsedResp.body;\n }\n if (parsedResp.err && resp) {\n parsedResp.err.response = resp;\n }\n callback(parsedResp.err, parsedResp.body, parsedResp.resp);\n }\n /**\n * Sniff an incoming HTTP response message for errors.\n *\n * @param {object} httpRespMessage - An incoming HTTP response message from `request`.\n * @return {object} parsedHttpRespMessage - The parsed response.\n * @param {?error} parsedHttpRespMessage.err - An error detected.\n * @param {object} parsedHttpRespMessage.resp - The original response object.\n */\n parseHttpRespMessage(httpRespMessage) {\n const parsedHttpRespMessage = {\n resp: httpRespMessage,\n };\n if (httpRespMessage.statusCode < 200 || httpRespMessage.statusCode > 299) {\n // Unknown error. Format according to ApiError standard.\n parsedHttpRespMessage.err = new ApiError({\n errors: new Array(),\n code: httpRespMessage.statusCode,\n message: httpRespMessage.statusMessage,\n response: httpRespMessage,\n });\n }\n return parsedHttpRespMessage;\n }\n /**\n * Parse the response body from an HTTP request.\n *\n * @param {object} body - The response body.\n * @return {object} parsedHttpRespMessage - The parsed response.\n * @param {?error} parsedHttpRespMessage.err - An error detected.\n * @param {object} parsedHttpRespMessage.body - The original body value provided\n * will try to be JSON.parse'd. If it's successful, the parsed value will\n * be returned here, otherwise the original value and an error will be returned.\n */\n parseHttpRespBody(body) {\n const parsedHttpRespBody = {\n body,\n };\n if (typeof body === 'string') {\n try {\n parsedHttpRespBody.body = JSON.parse(body);\n }\n catch (err) {\n parsedHttpRespBody.body = body;\n }\n }\n if (parsedHttpRespBody.body && parsedHttpRespBody.body.error) {\n // Error from JSON API.\n parsedHttpRespBody.err = new ApiError(parsedHttpRespBody.body.error);\n }\n return parsedHttpRespBody;\n }\n /**\n * Take a Duplexify stream, fetch an authenticated connection header, and\n * create an outgoing writable stream.\n *\n * @param {Duplexify} dup - Duplexify stream.\n * @param {object} options - Configuration object.\n * @param {module:common/connection} options.connection - A connection instance used to get a token with and send the request through.\n * @param {object} options.metadata - Metadata to send at the head of the request.\n * @param {object} options.request - Request object, in the format of a standard Node.js http.request() object.\n * @param {string=} options.request.method - Default: \"POST\".\n * @param {string=} options.request.qs.uploadType - Default: \"multipart\".\n * @param {string=} options.streamContentType - Default: \"application/octet-stream\".\n * @param {function} onComplete - Callback, executed after the writable Request stream has completed.\n */\n makeWritableStream(dup, options, onComplete) {\n var _a;\n onComplete = onComplete || util.noop;\n const writeStream = new ProgressStream();\n writeStream.on('progress', evt => dup.emit('progress', evt));\n dup.setWritable(writeStream);\n const defaultReqOpts = {\n method: 'POST',\n qs: {\n uploadType: 'multipart',\n },\n timeout: 0,\n maxRetries: 0,\n };\n const metadata = options.metadata || {};\n const reqOpts = {\n ...defaultReqOpts,\n ...options.request,\n qs: {\n ...defaultReqOpts.qs,\n ...(_a = options.request) === null || _a === void 0 ? void 0 : _a.qs,\n },\n multipart: [\n {\n 'Content-Type': 'application/json',\n body: JSON.stringify(metadata),\n },\n {\n 'Content-Type': metadata.contentType || 'application/octet-stream',\n body: writeStream,\n },\n ],\n };\n options.makeAuthenticatedRequest(reqOpts, {\n onAuthenticated(err, authenticatedReqOpts) {\n if (err) {\n dup.destroy(err);\n return;\n }\n requestDefaults.headers = util._getDefaultHeaders(reqOpts[GCCL_GCS_CMD_KEY]);\n const request = teenyRequest.defaults(requestDefaults);\n request(authenticatedReqOpts, (err, resp, body) => {\n util.handleResp(err, resp, body, (err, data) => {\n if (err) {\n dup.destroy(err);\n return;\n }\n dup.emit('response', resp);\n onComplete(data);\n });\n });\n },\n });\n }\n /**\n * Returns true if the API request should be retried, given the error that was\n * given the first time the request was attempted. This is used for rate limit\n * related errors as well as intermittent server errors.\n *\n * @param {error} err - The API error to check if it is appropriate to retry.\n * @return {boolean} True if the API request should be retried, false otherwise.\n */\n shouldRetryRequest(err) {\n if (err) {\n if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) {\n return true;\n }\n if (err.errors) {\n for (const e of err.errors) {\n const reason = e.reason;\n if (reason === 'rateLimitExceeded') {\n return true;\n }\n if (reason === 'userRateLimitExceeded') {\n return true;\n }\n if (reason && reason.includes('EAI_AGAIN')) {\n return true;\n }\n }\n }\n }\n return false;\n }\n /**\n * Get a function for making authenticated requests.\n *\n * @param {object} config - Configuration object.\n * @param {boolean=} config.autoRetry - Automatically retry requests if the\n * response is related to rate limits or certain intermittent server\n * errors. We will exponentially backoff subsequent requests by default.\n * (default: true)\n * @param {object=} config.credentials - Credentials object.\n * @param {boolean=} config.customEndpoint - If true, just return the provided request options. Default: false.\n * @param {boolean=} config.useAuthWithCustomEndpoint - If true, will authenticate when using a custom endpoint. Default: false.\n * @param {string=} config.email - Account email address, required for PEM/P12 usage.\n * @param {number=} config.maxRetries - Maximum number of automatic retries attempted before returning the error. (default: 3)\n * @param {string=} config.keyFile - Path to a .json, .pem, or .p12 keyfile.\n * @param {array} config.scopes - Array of scopes required for the API.\n */\n makeAuthenticatedRequestFactory(config) {\n const googleAutoAuthConfig = { ...config };\n if (googleAutoAuthConfig.projectId === DEFAULT_PROJECT_ID_TOKEN) {\n delete googleAutoAuthConfig.projectId;\n }\n let authClient;\n if (googleAutoAuthConfig.authClient instanceof GoogleAuth) {\n // Use an existing `GoogleAuth`\n authClient = googleAutoAuthConfig.authClient;\n }\n else {\n // Pass an `AuthClient` & `clientOptions` to `GoogleAuth`, if available\n authClient = new GoogleAuth({\n ...googleAutoAuthConfig,\n authClient: googleAutoAuthConfig.authClient,\n clientOptions: googleAutoAuthConfig.clientOptions,\n });\n }\n function makeAuthenticatedRequest(reqOpts, optionsOrCallback) {\n let stream;\n let projectId;\n const reqConfig = { ...config };\n let activeRequest_;\n if (!optionsOrCallback) {\n stream = duplexify();\n reqConfig.stream = stream;\n }\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : undefined;\n const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : undefined;\n async function setProjectId() {\n projectId = await authClient.getProjectId();\n }\n const onAuthenticated = async (err, authenticatedReqOpts) => {\n const authLibraryError = err;\n const autoAuthFailed = err &&\n typeof err.message === 'string' &&\n err.message.indexOf('Could not load the default credentials') > -1;\n if (autoAuthFailed) {\n // Even though authentication failed, the API might not actually\n // care.\n authenticatedReqOpts = reqOpts;\n }\n if (!err || autoAuthFailed) {\n try {\n // Try with existing `projectId` value\n authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId);\n err = null;\n }\n catch (e) {\n if (e instanceof MissingProjectIdError) {\n // A `projectId` was required, but we don't have one.\n try {\n // Attempt to get the `projectId`\n await setProjectId();\n authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId);\n err = null;\n }\n catch (e) {\n // Re-use the \"Could not load the default credentials error\" if\n // auto auth failed.\n err = err || e;\n }\n }\n else {\n // Some other error unrelated to missing `projectId`\n err = err || e;\n }\n }\n }\n if (err) {\n if (stream) {\n stream.destroy(err);\n }\n else {\n const fn = options && options.onAuthenticated\n ? options.onAuthenticated\n : callback;\n fn(err);\n }\n return;\n }\n if (options && options.onAuthenticated) {\n options.onAuthenticated(null, authenticatedReqOpts);\n }\n else {\n activeRequest_ = util.makeRequest(authenticatedReqOpts, reqConfig, (apiResponseError, ...params) => {\n if (apiResponseError &&\n apiResponseError.code === 401 &&\n authLibraryError) {\n // Re-use the \"Could not load the default credentials error\" if\n // the API request failed due to missing credentials.\n apiResponseError = authLibraryError;\n }\n callback(apiResponseError, ...params);\n });\n }\n };\n const prepareRequest = async () => {\n try {\n const getProjectId = async () => {\n if (config.projectId &&\n config.projectId !== DEFAULT_PROJECT_ID_TOKEN) {\n // The user provided a project ID. We don't need to check with the\n // auth client, it could be incorrect.\n return config.projectId;\n }\n if (config.projectIdRequired === false) {\n // A projectId is not required. Return the default.\n return DEFAULT_PROJECT_ID_TOKEN;\n }\n return setProjectId();\n };\n const authorizeRequest = async () => {\n if (reqConfig.customEndpoint &&\n !reqConfig.useAuthWithCustomEndpoint) {\n // Using a custom API override. Do not use `google-auth-library` for\n // authentication. (ex: connecting to a local Datastore server)\n return reqOpts;\n }\n else {\n return authClient.authorizeRequest(reqOpts);\n }\n };\n const [_projectId, authorizedReqOpts] = await Promise.all([\n getProjectId(),\n authorizeRequest(),\n ]);\n if (_projectId) {\n projectId = _projectId;\n }\n return onAuthenticated(null, authorizedReqOpts);\n }\n catch (e) {\n return onAuthenticated(e);\n }\n };\n prepareRequest();\n if (stream) {\n return stream;\n }\n return {\n abort() {\n setImmediate(() => {\n if (activeRequest_) {\n activeRequest_.abort();\n activeRequest_ = null;\n }\n });\n },\n };\n }\n const mar = makeAuthenticatedRequest;\n mar.getCredentials = authClient.getCredentials.bind(authClient);\n mar.authClient = authClient;\n return mar;\n }\n /**\n * Make a request through the `retryRequest` module with built-in error\n * handling and exponential back off.\n *\n * @param {object} reqOpts - Request options in the format `request` expects.\n * @param {object=} config - Configuration object.\n * @param {boolean=} config.autoRetry - Automatically retry requests if the\n * response is related to rate limits or certain intermittent server\n * errors. We will exponentially backoff subsequent requests by default.\n * (default: true)\n * @param {number=} config.maxRetries - Maximum number of automatic retries\n * attempted before returning the error. (default: 3)\n * @param {object=} config.request - HTTP module for request calls.\n * @param {function} callback - The callback function.\n */\n makeRequest(reqOpts, config, callback) {\n var _a, _b, _c, _d, _e;\n let autoRetryValue = AUTO_RETRY_DEFAULT;\n if (config.autoRetry !== undefined) {\n autoRetryValue = config.autoRetry;\n }\n else if (((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined) {\n autoRetryValue = config.retryOptions.autoRetry;\n }\n let maxRetryValue = MAX_RETRY_DEFAULT;\n if (config.maxRetries !== undefined) {\n maxRetryValue = config.maxRetries;\n }\n else if (((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.maxRetries) !== undefined) {\n maxRetryValue = config.retryOptions.maxRetries;\n }\n requestDefaults.headers = this._getDefaultHeaders(reqOpts[GCCL_GCS_CMD_KEY]);\n const options = {\n request: teenyRequest.defaults(requestDefaults),\n retries: autoRetryValue !== false ? maxRetryValue : 0,\n noResponseRetries: autoRetryValue !== false ? maxRetryValue : 0,\n shouldRetryFn(httpRespMessage) {\n var _a, _b;\n const err = util.parseHttpRespMessage(httpRespMessage).err;\n if ((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.retryableErrorFn) {\n return err && ((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.retryableErrorFn(err));\n }\n return err && util.shouldRetryRequest(err);\n },\n maxRetryDelay: (_c = config.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetryDelay,\n retryDelayMultiplier: (_d = config.retryOptions) === null || _d === void 0 ? void 0 : _d.retryDelayMultiplier,\n totalTimeout: (_e = config.retryOptions) === null || _e === void 0 ? void 0 : _e.totalTimeout,\n };\n if (typeof reqOpts.maxRetries === 'number') {\n options.retries = reqOpts.maxRetries;\n options.noResponseRetries = reqOpts.maxRetries;\n }\n if (!config.stream) {\n return retryRequest(reqOpts, options, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (err, response, body) => {\n util.handleResp(err, response, body, callback);\n });\n }\n const dup = config.stream;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let requestStream;\n const isGetRequest = (reqOpts.method || 'GET').toUpperCase() === 'GET';\n if (isGetRequest) {\n requestStream = retryRequest(reqOpts, options);\n dup.setReadable(requestStream);\n }\n else {\n // Streaming writable HTTP requests cannot be retried.\n requestStream = options.request(reqOpts);\n dup.setWritable(requestStream);\n }\n // Replay the Request events back to the stream.\n requestStream\n .on('error', dup.destroy.bind(dup))\n .on('response', dup.emit.bind(dup, 'response'))\n .on('complete', dup.emit.bind(dup, 'complete'));\n dup.abort = requestStream.abort;\n return dup;\n }\n /**\n * Decorate the options about to be made in a request.\n *\n * @param {object} reqOpts - The options to be passed to `request`.\n * @param {string} projectId - The project ID.\n * @return {object} reqOpts - The decorated reqOpts.\n */\n decorateRequest(reqOpts, projectId) {\n delete reqOpts.autoPaginate;\n delete reqOpts.autoPaginateVal;\n delete reqOpts.objectMode;\n if (reqOpts.qs !== null && typeof reqOpts.qs === 'object') {\n delete reqOpts.qs.autoPaginate;\n delete reqOpts.qs.autoPaginateVal;\n reqOpts.qs = replaceProjectIdToken(reqOpts.qs, projectId);\n }\n if (Array.isArray(reqOpts.multipart)) {\n reqOpts.multipart = reqOpts.multipart.map(part => {\n return replaceProjectIdToken(part, projectId);\n });\n }\n if (reqOpts.json !== null && typeof reqOpts.json === 'object') {\n delete reqOpts.json.autoPaginate;\n delete reqOpts.json.autoPaginateVal;\n reqOpts.json = replaceProjectIdToken(reqOpts.json, projectId);\n }\n reqOpts.uri = replaceProjectIdToken(reqOpts.uri, projectId);\n return reqOpts;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n isCustomType(unknown, module) {\n function getConstructorName(obj) {\n return obj.constructor && obj.constructor.name.toLowerCase();\n }\n const moduleNameParts = module.split('/');\n const parentModuleName = moduleNameParts[0] && moduleNameParts[0].toLowerCase();\n const subModuleName = moduleNameParts[1] && moduleNameParts[1].toLowerCase();\n if (subModuleName && getConstructorName(unknown) !== subModuleName) {\n return false;\n }\n let walkingModule = unknown;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (getConstructorName(walkingModule) === parentModuleName) {\n return true;\n }\n walkingModule = walkingModule.parent;\n if (!walkingModule) {\n return false;\n }\n }\n }\n /**\n * Given two parameters, figure out if this is either:\n * - Just a callback function\n * - An options object, and then a callback function\n * @param optionsOrCallback An options object or callback.\n * @param cb A potentially undefined callback.\n */\n maybeOptionsOrCallback(optionsOrCallback, cb) {\n return typeof optionsOrCallback === 'function'\n ? [{}, optionsOrCallback]\n : [optionsOrCallback, cb];\n }\n _getDefaultHeaders(gcclGcsCmd) {\n const headers = {\n 'User-Agent': getUserAgentString(),\n 'x-goog-api-client': `${getRuntimeTrackingString()} gccl/${packageJson.version}-${getModuleFormat()} gccl-invocation-id/${crypto.randomUUID()}`,\n };\n if (gcclGcsCmd) {\n headers['x-goog-api-client'] += ` gccl-gcs-cmd/${gcclGcsCmd}`;\n }\n return headers;\n }\n}\n/**\n * Basic Passthrough Stream that records the number of bytes read\n * every time the cursor is moved.\n */\nclass ProgressStream extends Transform {\n constructor() {\n super(...arguments);\n this.bytesRead = 0;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _transform(chunk, encoding, callback) {\n this.bytesRead += chunk.length;\n this.emit('progress', { bytesWritten: this.bytesRead, contentLength: '*' });\n this.push(chunk);\n callback();\n }\n}\nconst util = new Util();\nexport { util };\n","/*!\n * Copyright 2022 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DEFAULT_UNIVERSE, } from 'google-auth-library';\nimport * as crypto from 'crypto';\nimport { GCCL_GCS_CMD_KEY, util, } from './util.js';\nimport { getRuntimeTrackingString, getUserAgentString, getModuleFormat, } from '../util.js';\nexport const DEFAULT_PROJECT_ID_TOKEN = '{{projectId}}';\nexport class Service {\n /**\n * Service is a base class, meant to be inherited from by a \"service,\" like\n * BigQuery or Storage.\n *\n * This handles making authenticated requests by exposing a `makeReq_`\n * function.\n *\n * @constructor\n * @alias module:common/service\n *\n * @param {object} config - Configuration object.\n * @param {string} config.baseUrl - The base URL to make API requests to.\n * @param {string[]} config.scopes - The scopes required for the request.\n * @param {object=} options - [Configuration object](#/docs).\n */\n constructor(config, options = {}) {\n this.baseUrl = config.baseUrl;\n this.apiEndpoint = config.apiEndpoint;\n this.timeout = options.timeout;\n this.globalInterceptors = Array.isArray(options.interceptors_)\n ? options.interceptors_\n : [];\n this.interceptors = [];\n this.packageJson = config.packageJson;\n this.projectId = options.projectId || DEFAULT_PROJECT_ID_TOKEN;\n this.projectIdRequired = config.projectIdRequired !== false;\n this.providedUserAgent = options.userAgent;\n this.universeDomain = options.universeDomain || DEFAULT_UNIVERSE;\n this.customEndpoint = config.customEndpoint || false;\n this.useAuthWithCustomEndpoint = config.useAuthWithCustomEndpoint;\n this.makeAuthenticatedRequest = util.makeAuthenticatedRequestFactory({\n ...config,\n projectIdRequired: this.projectIdRequired,\n projectId: this.projectId,\n authClient: options.authClient || config.authClient,\n credentials: options.credentials,\n keyFile: options.keyFilename,\n email: options.email,\n clientOptions: {\n universeDomain: options.universeDomain,\n ...options.clientOptions,\n },\n });\n this.authClient = this.makeAuthenticatedRequest.authClient;\n const isCloudFunctionEnv = !!process.env.FUNCTION_NAME;\n if (isCloudFunctionEnv) {\n this.interceptors.push({\n request(reqOpts) {\n reqOpts.forever = false;\n return reqOpts;\n },\n });\n }\n }\n /**\n * Return the user's custom request interceptors.\n */\n getRequestInterceptors() {\n // Interceptors should be returned in the order they were assigned.\n return [].slice\n .call(this.globalInterceptors)\n .concat(this.interceptors)\n .filter(interceptor => typeof interceptor.request === 'function')\n .map(interceptor => interceptor.request);\n }\n getProjectId(callback) {\n if (!callback) {\n return this.getProjectIdAsync();\n }\n this.getProjectIdAsync().then(p => callback(null, p), callback);\n }\n async getProjectIdAsync() {\n const projectId = await this.authClient.getProjectId();\n if (this.projectId === DEFAULT_PROJECT_ID_TOKEN && projectId) {\n this.projectId = projectId;\n }\n return this.projectId;\n }\n request_(reqOpts, callback) {\n reqOpts = { ...reqOpts, timeout: this.timeout };\n const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0;\n const uriComponents = [this.baseUrl];\n if (this.projectIdRequired) {\n if (reqOpts.projectId) {\n uriComponents.push('projects');\n uriComponents.push(reqOpts.projectId);\n }\n else {\n uriComponents.push('projects');\n uriComponents.push(this.projectId);\n }\n }\n uriComponents.push(reqOpts.uri);\n if (isAbsoluteUrl) {\n uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri));\n }\n reqOpts.uri = uriComponents\n .map(uriComponent => {\n const trimSlashesRegex = /^\\/*|\\/*$/g;\n return uriComponent.replace(trimSlashesRegex, '');\n })\n .join('/')\n // Some URIs have colon separators.\n // Bad: https://.../projects/:list\n // Good: https://.../projects:list\n .replace(/\\/:/g, ':');\n const requestInterceptors = this.getRequestInterceptors();\n const interceptorArray = Array.isArray(reqOpts.interceptors_)\n ? reqOpts.interceptors_\n : [];\n interceptorArray.forEach(interceptor => {\n if (typeof interceptor.request === 'function') {\n requestInterceptors.push(interceptor.request);\n }\n });\n requestInterceptors.forEach(requestInterceptor => {\n reqOpts = requestInterceptor(reqOpts);\n });\n delete reqOpts.interceptors_;\n const pkg = this.packageJson;\n let userAgent = getUserAgentString();\n if (this.providedUserAgent) {\n userAgent = `${this.providedUserAgent} ${userAgent}`;\n }\n reqOpts.headers = {\n ...reqOpts.headers,\n 'User-Agent': userAgent,\n 'x-goog-api-client': `${getRuntimeTrackingString()} gccl/${pkg.version}-${getModuleFormat()} gccl-invocation-id/${crypto.randomUUID()}`,\n };\n if (reqOpts[GCCL_GCS_CMD_KEY]) {\n reqOpts.headers['x-goog-api-client'] +=\n ` gccl-gcs-cmd/${reqOpts[GCCL_GCS_CMD_KEY]}`;\n }\n if (reqOpts.shouldReturnStream) {\n return this.makeAuthenticatedRequest(reqOpts);\n }\n else {\n this.makeAuthenticatedRequest(reqOpts, callback);\n }\n }\n /**\n * Make an authenticated API request.\n *\n * @param {object} reqOpts - Request options that are passed to `request`.\n * @param {string} reqOpts.uri - A URI relative to the baseUrl.\n * @param {function} callback - The callback function passed to `request`.\n */\n request(reqOpts, callback) {\n Service.prototype.request_.call(this, reqOpts, callback);\n }\n /**\n * Make an authenticated API request.\n *\n * @param {object} reqOpts - Request options that are passed to `request`.\n * @param {string} reqOpts.uri - A URI relative to the baseUrl.\n */\n requestStream(reqOpts) {\n const opts = { ...reqOpts, shouldReturnStream: true };\n return Service.prototype.request_.call(this, opts);\n }\n}\n","\"use strict\";\n/* eslint-disable prefer-rest-params */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callbackifyAll = exports.callbackify = exports.promisifyAll = exports.promisify = void 0;\n/**\n * Wraps a callback style function to conditionally return a promise.\n *\n * @param {function} originalMethod - The method to promisify.\n * @param {object=} options - Promise options.\n * @param {boolean} options.singular - Resolve the promise with single arg instead of an array.\n * @return {function} wrapped\n */\nfunction promisify(originalMethod, options) {\n if (originalMethod.promisified_) {\n return originalMethod;\n }\n options = options || {};\n const slice = Array.prototype.slice;\n // tslint:disable-next-line:no-any\n const wrapper = function () {\n let last;\n for (last = arguments.length - 1; last >= 0; last--) {\n const arg = arguments[last];\n if (typeof arg === 'undefined') {\n continue; // skip trailing undefined.\n }\n if (typeof arg !== 'function') {\n break; // non-callback last argument found.\n }\n return originalMethod.apply(this, arguments);\n }\n // peel trailing undefined.\n const args = slice.call(arguments, 0, last + 1);\n // tslint:disable-next-line:variable-name\n let PromiseCtor = Promise;\n // Because dedupe will likely create a single install of\n // @google-cloud/common to be shared amongst all modules, we need to\n // localize it at the Service level.\n if (this && this.Promise) {\n PromiseCtor = this.Promise;\n }\n return new PromiseCtor((resolve, reject) => {\n // tslint:disable-next-line:no-any\n args.push((...args) => {\n const callbackArgs = slice.call(args);\n const err = callbackArgs.shift();\n if (err) {\n return reject(err);\n }\n if (options.singular && callbackArgs.length === 1) {\n resolve(callbackArgs[0]);\n }\n else {\n resolve(callbackArgs);\n }\n });\n originalMethod.apply(this, args);\n });\n };\n wrapper.promisified_ = true;\n return wrapper;\n}\nexports.promisify = promisify;\n/**\n * Promisifies certain Class methods. This will not promisify private or\n * streaming methods.\n *\n * @param {module:common/service} Class - Service class.\n * @param {object=} options - Configuration object.\n */\n// tslint:disable-next-line:variable-name\nfunction promisifyAll(Class, options) {\n const exclude = (options && options.exclude) || [];\n const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype);\n const methods = ownPropertyNames.filter(methodName => {\n // clang-format off\n return (!exclude.includes(methodName) &&\n typeof Class.prototype[methodName] === 'function' && // is it a function?\n !/(^_|(Stream|_)|promise$)|^constructor$/.test(methodName) // is it promisable?\n );\n // clang-format on\n });\n methods.forEach(methodName => {\n const originalMethod = Class.prototype[methodName];\n if (!originalMethod.promisified_) {\n Class.prototype[methodName] = exports.promisify(originalMethod, options);\n }\n });\n}\nexports.promisifyAll = promisifyAll;\n/**\n * Wraps a promisy type function to conditionally call a callback function.\n *\n * @param {function} originalMethod - The method to callbackify.\n * @param {object=} options - Callback options.\n * @param {boolean} options.singular - Pass to the callback a single arg instead of an array.\n * @return {function} wrapped\n */\nfunction callbackify(originalMethod) {\n if (originalMethod.callbackified_) {\n return originalMethod;\n }\n // tslint:disable-next-line:no-any\n const wrapper = function () {\n if (typeof arguments[arguments.length - 1] !== 'function') {\n return originalMethod.apply(this, arguments);\n }\n const cb = Array.prototype.pop.call(arguments);\n originalMethod.apply(this, arguments).then(\n // tslint:disable-next-line:no-any\n (res) => {\n res = Array.isArray(res) ? res : [res];\n cb(null, ...res);\n }, (err) => cb(err));\n };\n wrapper.callbackified_ = true;\n return wrapper;\n}\nexports.callbackify = callbackify;\n/**\n * Callbackifies certain Class methods. This will not callbackify private or\n * streaming methods.\n *\n * @param {module:common/service} Class - Service class.\n * @param {object=} options - Configuration object.\n */\nfunction callbackifyAll(\n// tslint:disable-next-line:variable-name\nClass, options) {\n const exclude = (options && options.exclude) || [];\n const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype);\n const methods = ownPropertyNames.filter(methodName => {\n // clang-format off\n return (!exclude.includes(methodName) &&\n typeof Class.prototype[methodName] === 'function' && // is it a function?\n !/^_|(Stream|_)|^constructor$/.test(methodName) // is it callbackifyable?\n );\n // clang-format on\n });\n methods.forEach(methodName => {\n const originalMethod = Class.prototype[methodName];\n if (!originalMethod.callbackified_) {\n Class.prototype[methodName] = exports.callbackify(originalMethod);\n }\n });\n}\nexports.callbackifyAll = callbackifyAll;\n//# sourceMappingURL=index.js.map","/*!\n * Copyright 2022 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { promisifyAll } from '@google-cloud/promisify';\nimport { EventEmitter } from 'events';\nimport { util, } from './util.js';\n/**\n * ServiceObject is a base class, meant to be inherited from by a \"service\n * object,\" like a BigQuery dataset or Storage bucket.\n *\n * Most of the time, these objects share common functionality; they can be\n * created or deleted, and you can get or set their metadata.\n *\n * By inheriting from this class, a service object will be extended with these\n * shared behaviors. Note that any method can be overridden when the service\n * object requires specific behavior.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nclass ServiceObject extends EventEmitter {\n /*\n * @constructor\n * @alias module:common/service-object\n *\n * @private\n *\n * @param {object} config - Configuration object.\n * @param {string} config.baseUrl - The base URL to make API requests to.\n * @param {string} config.createMethod - The method which creates this object.\n * @param {string=} config.id - The identifier of the object. For example, the\n * name of a Storage bucket or Pub/Sub topic.\n * @param {object=} config.methods - A map of each method name that should be inherited.\n * @param {object} config.methods[].reqOpts - Default request options for this\n * particular method. A common use case is when `setMetadata` requires a\n * `PUT` method to override the default `PATCH`.\n * @param {object} config.parent - The parent service instance. For example, an\n * instance of Storage if the object is Bucket.\n */\n constructor(config) {\n super();\n this.metadata = {};\n this.baseUrl = config.baseUrl;\n this.parent = config.parent; // Parent class.\n this.id = config.id; // Name or ID (e.g. dataset ID, bucket name, etc).\n this.createMethod = config.createMethod;\n this.methods = config.methods || {};\n this.interceptors = [];\n this.projectId = config.projectId;\n if (config.methods) {\n // This filters the ServiceObject instance (e.g. a \"File\") to only have\n // the configured methods. We make a couple of exceptions for core-\n // functionality (\"request()\" and \"getRequestInterceptors()\")\n Object.getOwnPropertyNames(ServiceObject.prototype)\n .filter(methodName => {\n return (\n // All ServiceObjects need `request` and `getRequestInterceptors`.\n // clang-format off\n !/^request/.test(methodName) &&\n !/^getRequestInterceptors/.test(methodName) &&\n // clang-format on\n // The ServiceObject didn't redefine the method.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this[methodName] ===\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ServiceObject.prototype[methodName] &&\n // This method isn't wanted.\n !config.methods[methodName]);\n })\n .forEach(methodName => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this[methodName] = undefined;\n });\n }\n }\n create(optionsOrCallback, callback) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n const args = [this.id];\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n if (typeof optionsOrCallback === 'object') {\n args.push(optionsOrCallback);\n }\n // Wrap the callback to return *this* instance of the object, not the\n // newly-created one.\n // tslint: disable-next-line no-any\n function onCreate(...args) {\n const [err, instance] = args;\n if (!err) {\n self.metadata = instance.metadata;\n if (self.id && instance.metadata) {\n self.id = instance.metadata.id;\n }\n args[1] = self; // replace the created `instance` with this one.\n }\n callback(...args);\n }\n args.push(onCreate);\n // eslint-disable-next-line prefer-spread\n this.createMethod.apply(null, args);\n }\n delete(optionsOrCallback, cb) {\n var _a;\n const [options, callback] = util.maybeOptionsOrCallback(optionsOrCallback, cb);\n const ignoreNotFound = options.ignoreNotFound;\n delete options.ignoreNotFound;\n const methodConfig = (typeof this.methods.delete === 'object' && this.methods.delete) || {};\n const reqOpts = {\n method: 'DELETE',\n uri: '',\n ...methodConfig.reqOpts,\n qs: {\n ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs,\n ...options,\n },\n };\n // The `request` method may have been overridden to hold any special\n // behavior. Ensure we call the original `request` method.\n ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => {\n if (err) {\n if (err.code === 404 && ignoreNotFound) {\n err = null;\n }\n }\n callback(err, res);\n });\n }\n exists(optionsOrCallback, cb) {\n const [options, callback] = util.maybeOptionsOrCallback(optionsOrCallback, cb);\n this.get(options, err => {\n if (err) {\n if (err.code === 404) {\n callback(null, false);\n }\n else {\n callback(err);\n }\n return;\n }\n callback(null, true);\n });\n }\n get(optionsOrCallback, cb) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n const [opts, callback] = util.maybeOptionsOrCallback(optionsOrCallback, cb);\n const options = Object.assign({}, opts);\n const autoCreate = options.autoCreate && typeof this.create === 'function';\n delete options.autoCreate;\n function onCreate(err, instance, apiResponse) {\n if (err) {\n if (err.code === 409) {\n self.get(options, callback);\n return;\n }\n callback(err, null, apiResponse);\n return;\n }\n callback(null, instance, apiResponse);\n }\n this.getMetadata(options, (err, metadata) => {\n if (err) {\n if (err.code === 404 && autoCreate) {\n const args = [];\n if (Object.keys(options).length > 0) {\n args.push(options);\n }\n args.push(onCreate);\n self.create(...args);\n return;\n }\n callback(err, null, metadata);\n return;\n }\n callback(null, self, metadata);\n });\n }\n getMetadata(optionsOrCallback, cb) {\n var _a;\n const [options, callback] = util.maybeOptionsOrCallback(optionsOrCallback, cb);\n const methodConfig = (typeof this.methods.getMetadata === 'object' &&\n this.methods.getMetadata) ||\n {};\n const reqOpts = {\n uri: '',\n ...methodConfig.reqOpts,\n qs: {\n ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs,\n ...options,\n },\n };\n // The `request` method may have been overridden to hold any special\n // behavior. Ensure we call the original `request` method.\n ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => {\n this.metadata = body;\n callback(err, this.metadata, res);\n });\n }\n /**\n * Return the user's custom request interceptors.\n */\n getRequestInterceptors() {\n // Interceptors should be returned in the order they were assigned.\n const localInterceptors = this.interceptors\n .filter(interceptor => typeof interceptor.request === 'function')\n .map(interceptor => interceptor.request);\n return this.parent.getRequestInterceptors().concat(localInterceptors);\n }\n setMetadata(metadata, optionsOrCallback, cb) {\n var _a, _b;\n const [options, callback] = util.maybeOptionsOrCallback(optionsOrCallback, cb);\n const methodConfig = (typeof this.methods.setMetadata === 'object' &&\n this.methods.setMetadata) ||\n {};\n const reqOpts = {\n method: 'PATCH',\n uri: '',\n ...methodConfig.reqOpts,\n json: {\n ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.json,\n ...metadata,\n },\n qs: {\n ...(_b = methodConfig.reqOpts) === null || _b === void 0 ? void 0 : _b.qs,\n ...options,\n },\n };\n // The `request` method may have been overridden to hold any special\n // behavior. Ensure we call the original `request` method.\n ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => {\n this.metadata = body;\n callback(err, this.metadata, res);\n });\n }\n request_(reqOpts, callback) {\n reqOpts = { ...reqOpts };\n if (this.projectId) {\n reqOpts.projectId = this.projectId;\n }\n const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0;\n const uriComponents = [this.baseUrl, this.id || '', reqOpts.uri];\n if (isAbsoluteUrl) {\n uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri));\n }\n reqOpts.uri = uriComponents\n .filter(x => x.trim()) // Limit to non-empty strings.\n .map(uriComponent => {\n const trimSlashesRegex = /^\\/*|\\/*$/g;\n return uriComponent.replace(trimSlashesRegex, '');\n })\n .join('/');\n const childInterceptors = Array.isArray(reqOpts.interceptors_)\n ? reqOpts.interceptors_\n : [];\n const localInterceptors = [].slice.call(this.interceptors);\n reqOpts.interceptors_ = childInterceptors.concat(localInterceptors);\n if (reqOpts.shouldReturnStream) {\n return this.parent.requestStream(reqOpts);\n }\n this.parent.request(reqOpts, callback);\n }\n request(reqOpts, callback) {\n this.request_(reqOpts, callback);\n }\n /**\n * Make an authenticated API request.\n *\n * @param {object} reqOpts - Request options that are passed to `request`.\n * @param {string} reqOpts.uri - A URI relative to the baseUrl.\n */\n requestStream(reqOpts) {\n const opts = { ...reqOpts, shouldReturnStream: true };\n return this.request_(opts);\n }\n}\npromisifyAll(ServiceObject, { exclude: ['getRequestInterceptors'] });\nexport { ServiceObject };\n","'use strict';\n\nconst arrify = value => {\n\tif (value === null || value === undefined) {\n\t\treturn [];\n\t}\n\n\tif (Array.isArray(value)) {\n\t\treturn value;\n\t}\n\n\tif (typeof value === 'string') {\n\t\treturn [value];\n\t}\n\n\tif (typeof value[Symbol.iterator] === 'function') {\n\t\treturn [...value];\n\t}\n\n\treturn [value];\n};\n\nmodule.exports = arrify;\n","\"use strict\";\n/*!\n * Copyright 2019 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResourceStream = void 0;\nconst stream_1 = require(\"stream\");\nclass ResourceStream extends stream_1.Transform {\n constructor(args, requestFn) {\n const options = Object.assign({ objectMode: true }, args.streamOptions);\n super(options);\n this._ended = false;\n this._maxApiCalls = args.maxApiCalls === -1 ? Infinity : args.maxApiCalls;\n this._nextQuery = args.query;\n this._reading = false;\n this._requestFn = requestFn;\n this._requestsMade = 0;\n this._resultsToSend = args.maxResults === -1 ? Infinity : args.maxResults;\n this._otherArgs = [];\n }\n /* eslint-disable @typescript-eslint/no-explicit-any */\n end(...args) {\n this._ended = true;\n return super.end(...args);\n }\n _read() {\n if (this._reading) {\n return;\n }\n this._reading = true;\n // Wrap in a try/catch to catch input linting errors, e.g.\n // an invalid BigQuery query. These errors are thrown in an\n // async fashion, which makes them un-catchable by the user.\n try {\n this._requestFn(this._nextQuery, (err, results, nextQuery, ...otherArgs) => {\n if (err) {\n this.destroy(err);\n return;\n }\n this._otherArgs = otherArgs;\n this._nextQuery = nextQuery;\n if (this._resultsToSend !== Infinity) {\n results = results.splice(0, this._resultsToSend);\n this._resultsToSend -= results.length;\n }\n let more = true;\n for (const result of results) {\n if (this._ended) {\n break;\n }\n more = this.push(result);\n }\n const isFinished = !this._nextQuery || this._resultsToSend < 1;\n const madeMaxCalls = ++this._requestsMade >= this._maxApiCalls;\n if (isFinished || madeMaxCalls) {\n this.end();\n }\n if (more && !this._ended) {\n setImmediate(() => this._read());\n }\n this._reading = false;\n });\n }\n catch (e) {\n this.destroy(e);\n }\n }\n}\nexports.ResourceStream = ResourceStream;\n//# sourceMappingURL=resource-stream.js.map","\"use strict\";\n/*!\n * Copyright 2015 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResourceStream = exports.paginator = exports.Paginator = void 0;\n/*!\n * @module common/paginator\n */\nconst arrify = require(\"arrify\");\nconst extend = require(\"extend\");\nconst resource_stream_1 = require(\"./resource-stream\");\nObject.defineProperty(exports, \"ResourceStream\", { enumerable: true, get: function () { return resource_stream_1.ResourceStream; } });\n/*! Developer Documentation\n *\n * paginator is used to auto-paginate `nextQuery` methods as well as\n * streamifying them.\n *\n * Before:\n *\n * search.query('done=true', function(err, results, nextQuery) {\n * search.query(nextQuery, function(err, results, nextQuery) {});\n * });\n *\n * After:\n *\n * search.query('done=true', function(err, results) {});\n *\n * Methods to extend should be written to accept callbacks and return a\n * `nextQuery`.\n */\nclass Paginator {\n /**\n * Cache the original method, then overwrite it on the Class's prototype.\n *\n * @param {function} Class - The parent class of the methods to extend.\n * @param {string|string[]} methodNames - Name(s) of the methods to extend.\n */\n // tslint:disable-next-line:variable-name\n extend(Class, methodNames) {\n methodNames = arrify(methodNames);\n methodNames.forEach(methodName => {\n const originalMethod = Class.prototype[methodName];\n // map the original method to a private member\n Class.prototype[methodName + '_'] = originalMethod;\n // overwrite the original to auto-paginate\n /* eslint-disable @typescript-eslint/no-explicit-any */\n Class.prototype[methodName] = function (...args) {\n const parsedArguments = paginator.parseArguments_(args);\n return paginator.run_(parsedArguments, originalMethod.bind(this));\n };\n });\n }\n /**\n * Wraps paginated API calls in a readable object stream.\n *\n * This method simply calls the nextQuery recursively, emitting results to a\n * stream. The stream ends when `nextQuery` is null.\n *\n * `maxResults` will act as a cap for how many results are fetched and emitted\n * to the stream.\n *\n * @param {string} methodName - Name of the method to streamify.\n * @return {function} - Wrapped function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n streamify(methodName) {\n return function (\n /* eslint-disable @typescript-eslint/no-explicit-any */\n ...args) {\n const parsedArguments = paginator.parseArguments_(args);\n const originalMethod = this[methodName + '_'] || this[methodName];\n return paginator.runAsStream_(parsedArguments, originalMethod.bind(this));\n };\n }\n /**\n * Parse a pseudo-array `arguments` for a query and callback.\n *\n * @param {array} args - The original `arguments` pseduo-array that the original\n * method received.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n parseArguments_(args) {\n let query;\n let autoPaginate = true;\n let maxApiCalls = -1;\n let maxResults = -1;\n let callback;\n const firstArgument = args[0];\n const lastArgument = args[args.length - 1];\n if (typeof firstArgument === 'function') {\n callback = firstArgument;\n }\n else {\n query = firstArgument;\n }\n if (typeof lastArgument === 'function') {\n callback = lastArgument;\n }\n if (typeof query === 'object') {\n query = extend(true, {}, query);\n // Check if the user only asked for a certain amount of results.\n if (query.maxResults && typeof query.maxResults === 'number') {\n // `maxResults` is used API-wide.\n maxResults = query.maxResults;\n }\n else if (typeof query.pageSize === 'number') {\n // `pageSize` is Pub/Sub's `maxResults`.\n maxResults = query.pageSize;\n }\n if (query.maxApiCalls && typeof query.maxApiCalls === 'number') {\n maxApiCalls = query.maxApiCalls;\n delete query.maxApiCalls;\n }\n // maxResults is the user specified limit.\n if (maxResults !== -1 || query.autoPaginate === false) {\n autoPaginate = false;\n }\n }\n const parsedArguments = {\n query: query || {},\n autoPaginate,\n maxApiCalls,\n maxResults,\n callback,\n };\n parsedArguments.streamOptions = extend(true, {}, parsedArguments.query);\n delete parsedArguments.streamOptions.autoPaginate;\n delete parsedArguments.streamOptions.maxResults;\n delete parsedArguments.streamOptions.pageSize;\n return parsedArguments;\n }\n /**\n * This simply checks to see if `autoPaginate` is set or not, if it's true\n * then we buffer all results, otherwise simply call the original method.\n *\n * @param {array} parsedArguments - Parsed arguments from the original method\n * call.\n * @param {object=|string=} parsedArguments.query - Query object. This is most\n * commonly an object, but to make the API more simple, it can also be a\n * string in some places.\n * @param {function=} parsedArguments.callback - Callback function.\n * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled.\n * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make.\n * @param {number} parsedArguments.maxResults - Maximum results to return.\n * @param {function} originalMethod - The cached method that accepts a callback\n * and returns `nextQuery` to receive more results.\n */\n run_(parsedArguments, originalMethod) {\n const query = parsedArguments.query;\n const callback = parsedArguments.callback;\n if (!parsedArguments.autoPaginate) {\n return originalMethod(query, callback);\n }\n const results = new Array();\n let otherArgs = [];\n const promise = new Promise((resolve, reject) => {\n const stream = paginator.runAsStream_(parsedArguments, originalMethod);\n stream\n .on('error', reject)\n .on('data', (data) => results.push(data))\n .on('end', () => {\n otherArgs = stream._otherArgs || [];\n resolve(results);\n });\n });\n if (!callback) {\n return promise.then(results => [results, query, ...otherArgs]);\n }\n promise.then(results => callback(null, results, query, ...otherArgs), (err) => callback(err));\n }\n /**\n * This method simply calls the nextQuery recursively, emitting results to a\n * stream. The stream ends when `nextQuery` is null.\n *\n * `maxResults` will act as a cap for how many results are fetched and emitted\n * to the stream.\n *\n * @param {object=|string=} parsedArguments.query - Query object. This is most\n * commonly an object, but to make the API more simple, it can also be a\n * string in some places.\n * @param {function=} parsedArguments.callback - Callback function.\n * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled.\n * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make.\n * @param {number} parsedArguments.maxResults - Maximum results to return.\n * @param {function} originalMethod - The cached method that accepts a callback\n * and returns `nextQuery` to receive more results.\n * @return {stream} - Readable object stream.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n runAsStream_(parsedArguments, originalMethod) {\n return new resource_stream_1.ResourceStream(parsedArguments, originalMethod);\n }\n}\nexports.Paginator = Paginator;\nconst paginator = new Paginator();\nexports.paginator = paginator;\n//# sourceMappingURL=index.js.map","'use strict';\n\n/**\n * @param typeMap [Object] Map of MIME type -> Array[extensions]\n * @param ...\n */\nfunction Mime() {\n this._types = Object.create(null);\n this._extensions = Object.create(null);\n\n for (let i = 0; i < arguments.length; i++) {\n this.define(arguments[i]);\n }\n\n this.define = this.define.bind(this);\n this.getType = this.getType.bind(this);\n this.getExtension = this.getExtension.bind(this);\n}\n\n/**\n * Define mimetype -> extension mappings. Each key is a mime-type that maps\n * to an array of extensions associated with the type. The first extension is\n * used as the default extension for the type.\n *\n * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});\n *\n * If a type declares an extension that has already been defined, an error will\n * be thrown. To suppress this error and force the extension to be associated\n * with the new type, pass `force`=true. Alternatively, you may prefix the\n * extension with \"*\" to map the type to extension, without mapping the\n * extension to the type.\n *\n * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']});\n *\n *\n * @param map (Object) type definitions\n * @param force (Boolean) if true, force overriding of existing definitions\n */\nMime.prototype.define = function(typeMap, force) {\n for (let type in typeMap) {\n let extensions = typeMap[type].map(function(t) {\n return t.toLowerCase();\n });\n type = type.toLowerCase();\n\n for (let i = 0; i < extensions.length; i++) {\n const ext = extensions[i];\n\n // '*' prefix = not the preferred type for this extension. So fixup the\n // extension, and skip it.\n if (ext[0] === '*') {\n continue;\n }\n\n if (!force && (ext in this._types)) {\n throw new Error(\n 'Attempt to change mapping for \"' + ext +\n '\" extension from \"' + this._types[ext] + '\" to \"' + type +\n '\". Pass `force=true` to allow this, otherwise remove \"' + ext +\n '\" from the list of extensions for \"' + type + '\".'\n );\n }\n\n this._types[ext] = type;\n }\n\n // Use first extension as default\n if (force || !this._extensions[type]) {\n const ext = extensions[0];\n this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1);\n }\n }\n};\n\n/**\n * Lookup a mime type based on extension\n */\nMime.prototype.getType = function(path) {\n path = String(path);\n let last = path.replace(/^.*[/\\\\]/, '').toLowerCase();\n let ext = last.replace(/^.*\\./, '').toLowerCase();\n\n let hasPath = last.length < path.length;\n let hasDot = ext.length < last.length - 1;\n\n return (hasDot || !hasPath) && this._types[ext] || null;\n};\n\n/**\n * Return file extension associated with a mime type\n */\nMime.prototype.getExtension = function(type) {\n type = /^\\s*([^;\\s]*)/.test(type) && RegExp.$1;\n return type && this._extensions[type.toLowerCase()] || null;\n};\n\nmodule.exports = Mime;\n","module.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\"]};","module.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\"]};","'use strict';\n\nlet Mime = require('./Mime');\nmodule.exports = new Mime(require('./types/standard'), require('./types/other'));\n","class Node {\n\t/// value;\n\t/// next;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\n\t\t// TODO: Remove this when targeting Node.js 12.\n\t\tthis.next = undefined;\n\t}\n}\n\nclass Queue {\n\t// TODO: Use private class fields when targeting Node.js 12.\n\t// #_head;\n\t// #_tail;\n\t// #_size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this._head) {\n\t\t\tthis._tail.next = node;\n\t\t\tthis._tail = node;\n\t\t} else {\n\t\t\tthis._head = node;\n\t\t\tthis._tail = node;\n\t\t}\n\n\t\tthis._size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this._head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._head = this._head.next;\n\t\tthis._size--;\n\t\treturn current.value;\n\t}\n\n\tclear() {\n\t\tthis._head = undefined;\n\t\tthis._tail = undefined;\n\t\tthis._size = 0;\n\t}\n\n\tget size() {\n\t\treturn this._size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this._head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n}\n\nmodule.exports = Queue;\n","'use strict';\nconst Queue = require('yocto-queue');\n\nconst pLimit = concurrency => {\n\tif (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst next = () => {\n\t\tactiveCount--;\n\n\t\tif (queue.size > 0) {\n\t\t\tqueue.dequeue()();\n\t\t}\n\t};\n\n\tconst run = async (fn, resolve, ...args) => {\n\t\tactiveCount++;\n\n\t\tconst result = (async () => fn(...args))();\n\n\t\tresolve(result);\n\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\tnext();\n\t};\n\n\tconst enqueue = (fn, resolve, ...args) => {\n\t\tqueue.enqueue(run.bind(null, fn, resolve, ...args));\n\n\t\t(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// when the run function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve();\n\n\t\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\t\tqueue.dequeue()();\n\t\t\t}\n\t\t})();\n\t};\n\n\tconst generator = (fn, ...args) => new Promise(resolve => {\n\t\tenqueue(fn, resolve, ...args);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue: () => {\n\t\t\t\tqueue.clear();\n\t\t\t}\n\t\t}\n\t});\n\n\treturn generator;\n};\n\nmodule.exports = pLimit;\n","function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n","var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n","module.exports = require('./lib/retry');","// Packages\nvar retrier = require('retry');\n\nfunction retry(fn, opts) {\n function run(resolve, reject) {\n var options = opts || {};\n var op;\n\n // Default `randomize` to true\n if (!('randomize' in options)) {\n options.randomize = true;\n }\n\n op = retrier.operation(options);\n\n // We allow the user to abort retrying\n // this makes sense in the cases where\n // knowledge is obtained that retrying\n // would be futile (e.g.: auth errors)\n\n function bail(err) {\n reject(err || new Error('Aborted'));\n }\n\n function onError(err, num) {\n if (err.bail) {\n bail(err);\n return;\n }\n\n if (!op.retry(err)) {\n reject(op.mainError());\n } else if (options.onRetry) {\n options.onRetry(err, num);\n }\n }\n\n function runAttempt(num) {\n var val;\n\n try {\n val = fn(bail, num);\n } catch (err) {\n onError(err, num);\n return;\n }\n\n Promise.resolve(val)\n .then(resolve)\n .catch(function catchIt(err) {\n onError(err, num);\n });\n }\n\n op.attempt(runAttempt);\n }\n\n return new Promise(run);\n}\n\nmodule.exports = retry;\n","// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { promisifyAll } from '@google-cloud/promisify';\n/**\n * Attach functionality to a {@link Storage.acl} instance. This will add an\n * object for each role group (owners, readers, and writers), with each object\n * containing methods to add or delete a type of entity.\n *\n * As an example, here are a few methods that are created.\n *\n * myBucket.acl.readers.deleteGroup('groupId', function(err) {});\n *\n * myBucket.acl.owners.addUser('email@example.com', function(err, acl) {});\n *\n * myBucket.acl.writers.addDomain('example.com', function(err, acl) {});\n *\n * @private\n */\nclass AclRoleAccessorMethods {\n constructor() {\n this.owners = {};\n this.readers = {};\n this.writers = {};\n /**\n * An object of convenience methods to add or delete owner ACL permissions\n * for a given entity.\n *\n * The supported methods include:\n *\n * - `myFile.acl.owners.addAllAuthenticatedUsers`\n * - `myFile.acl.owners.deleteAllAuthenticatedUsers`\n * - `myFile.acl.owners.addAllUsers`\n * - `myFile.acl.owners.deleteAllUsers`\n * - `myFile.acl.owners.addDomain`\n * - `myFile.acl.owners.deleteDomain`\n * - `myFile.acl.owners.addGroup`\n * - `myFile.acl.owners.deleteGroup`\n * - `myFile.acl.owners.addProject`\n * - `myFile.acl.owners.deleteProject`\n * - `myFile.acl.owners.addUser`\n * - `myFile.acl.owners.deleteUser`\n *\n * @name Acl#owners\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const myBucket = storage.bucket('my-bucket');\n * const myFile = myBucket.file('my-file');\n *\n * //-\n * // Add a user as an owner of a file.\n * //-\n * const myBucket = gcs.bucket('my-bucket');\n * const myFile = myBucket.file('my-file');\n * myFile.acl.owners.addUser('email@example.com', function(err, aclObject)\n * {});\n *\n * //-\n * // For reference, the above command is the same as running the following.\n * //-\n * myFile.acl.add({\n * entity: 'user-email@example.com',\n * role: gcs.acl.OWNER_ROLE\n * }, function(err, aclObject) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * myFile.acl.owners.addUser('email@example.com').then(function(data) {\n * const aclObject = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n this.owners = {};\n /**\n * An object of convenience methods to add or delete reader ACL permissions\n * for a given entity.\n *\n * The supported methods include:\n *\n * - `myFile.acl.readers.addAllAuthenticatedUsers`\n * - `myFile.acl.readers.deleteAllAuthenticatedUsers`\n * - `myFile.acl.readers.addAllUsers`\n * - `myFile.acl.readers.deleteAllUsers`\n * - `myFile.acl.readers.addDomain`\n * - `myFile.acl.readers.deleteDomain`\n * - `myFile.acl.readers.addGroup`\n * - `myFile.acl.readers.deleteGroup`\n * - `myFile.acl.readers.addProject`\n * - `myFile.acl.readers.deleteProject`\n * - `myFile.acl.readers.addUser`\n * - `myFile.acl.readers.deleteUser`\n *\n * @name Acl#readers\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const myBucket = storage.bucket('my-bucket');\n * const myFile = myBucket.file('my-file');\n *\n * //-\n * // Add a user as a reader of a file.\n * //-\n * myFile.acl.readers.addUser('email@example.com', function(err, aclObject)\n * {});\n *\n * //-\n * // For reference, the above command is the same as running the following.\n * //-\n * myFile.acl.add({\n * entity: 'user-email@example.com',\n * role: gcs.acl.READER_ROLE\n * }, function(err, aclObject) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * myFile.acl.readers.addUser('email@example.com').then(function(data) {\n * const aclObject = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n this.readers = {};\n /**\n * An object of convenience methods to add or delete writer ACL permissions\n * for a given entity.\n *\n * The supported methods include:\n *\n * - `myFile.acl.writers.addAllAuthenticatedUsers`\n * - `myFile.acl.writers.deleteAllAuthenticatedUsers`\n * - `myFile.acl.writers.addAllUsers`\n * - `myFile.acl.writers.deleteAllUsers`\n * - `myFile.acl.writers.addDomain`\n * - `myFile.acl.writers.deleteDomain`\n * - `myFile.acl.writers.addGroup`\n * - `myFile.acl.writers.deleteGroup`\n * - `myFile.acl.writers.addProject`\n * - `myFile.acl.writers.deleteProject`\n * - `myFile.acl.writers.addUser`\n * - `myFile.acl.writers.deleteUser`\n *\n * @name Acl#writers\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const myBucket = storage.bucket('my-bucket');\n * const myFile = myBucket.file('my-file');\n *\n * //-\n * // Add a user as a writer of a file.\n * //-\n * myFile.acl.writers.addUser('email@example.com', function(err, aclObject)\n * {});\n *\n * //-\n * // For reference, the above command is the same as running the following.\n * //-\n * myFile.acl.add({\n * entity: 'user-email@example.com',\n * role: gcs.acl.WRITER_ROLE\n * }, function(err, aclObject) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * myFile.acl.writers.addUser('email@example.com').then(function(data) {\n * const aclObject = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n this.writers = {};\n AclRoleAccessorMethods.roles.forEach(this._assignAccessMethods.bind(this));\n }\n _assignAccessMethods(role) {\n const accessMethods = AclRoleAccessorMethods.accessMethods;\n const entities = AclRoleAccessorMethods.entities;\n const roleGroup = role.toLowerCase() + 's';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this[roleGroup] = entities.reduce((acc, entity) => {\n const isPrefix = entity.charAt(entity.length - 1) === '-';\n accessMethods.forEach(accessMethod => {\n let method = accessMethod + entity[0].toUpperCase() + entity.substring(1);\n if (isPrefix) {\n method = method.replace('-', '');\n }\n // Wrap the parent accessor method (e.g. `add` or `delete`) to avoid the\n // more complex API of specifying an `entity` and `role`.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n acc[method] = (entityId, options, callback) => {\n let apiEntity;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (isPrefix) {\n apiEntity = entity + entityId;\n }\n else {\n // If the entity is not a prefix, it is a special entity group\n // that does not require further details. The accessor methods\n // only accept a callback.\n apiEntity = entity;\n callback = entityId;\n }\n options = Object.assign({\n entity: apiEntity,\n role,\n }, options);\n const args = [options];\n if (typeof callback === 'function') {\n args.push(callback);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return this[accessMethod].apply(this, args);\n };\n });\n return acc;\n }, {});\n }\n}\nAclRoleAccessorMethods.accessMethods = ['add', 'delete'];\nAclRoleAccessorMethods.entities = [\n // Special entity groups that do not require further specification.\n 'allAuthenticatedUsers',\n 'allUsers',\n // Entity groups that require specification, e.g. `user-email@example.com`.\n 'domain-',\n 'group-',\n 'project-',\n 'user-',\n];\nAclRoleAccessorMethods.roles = ['OWNER', 'READER', 'WRITER'];\n/**\n * Cloud Storage uses access control lists (ACLs) to manage object and\n * bucket access. ACLs are the mechanism you use to share objects with other\n * users and allow other users to access your buckets and objects.\n *\n * An ACL consists of one or more entries, where each entry grants permissions\n * to an entity. Permissions define the actions that can be performed against an\n * object or bucket (for example, `READ` or `WRITE`); the entity defines who the\n * permission applies to (for example, a specific user or group of users).\n *\n * Where an `entity` value is accepted, we follow the format the Cloud Storage\n * API expects.\n *\n * Refer to\n * https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls\n * for the most up-to-date values.\n *\n * - `user-userId`\n * - `user-email`\n * - `group-groupId`\n * - `group-email`\n * - `domain-domain`\n * - `project-team-projectId`\n * - `allUsers`\n * - `allAuthenticatedUsers`\n *\n * Examples:\n *\n * - The user \"liz@example.com\" would be `user-liz@example.com`.\n * - The group \"example@googlegroups.com\" would be\n * `group-example@googlegroups.com`.\n * - To refer to all members of the Google Apps for Business domain\n * \"example.com\", the entity would be `domain-example.com`.\n *\n * For more detailed information, see\n * {@link http://goo.gl/6qBBPO| About Access Control Lists}.\n *\n * @constructor Acl\n * @mixin\n * @param {object} options Configuration options.\n */\nclass Acl extends AclRoleAccessorMethods {\n constructor(options) {\n super();\n this.pathPrefix = options.pathPrefix;\n this.request_ = options.request;\n }\n /**\n * @typedef {array} AddAclResponse\n * @property {object} 0 The Acl Objects.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback AddAclCallback\n * @param {?Error} err Request error, if any.\n * @param {object} acl The Acl Objects.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Add access controls on a {@link Bucket} or {@link File}.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert| BucketAccessControls: insert API Documentation}\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation}\n *\n * @param {object} options Configuration options.\n * @param {string} options.entity Whose permissions will be added.\n * @param {string} options.role Permissions allowed for the defined entity.\n * See {@link https://cloud.google.com/storage/docs/access-control Access\n * Control}.\n * @param {number} [options.generation] **File Objects Only** Select a specific\n * revision of this file (as opposed to the latest version, the default).\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {AddAclCallback} [callback] Callback function.\n * @returns {Promise<AddAclResponse>}\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const myBucket = storage.bucket('my-bucket');\n * const myFile = myBucket.file('my-file');\n *\n * const options = {\n * entity: 'user-useremail@example.com',\n * role: gcs.acl.OWNER_ROLE\n * };\n *\n * myBucket.acl.add(options, function(err, aclObject, apiResponse) {});\n *\n * //-\n * // For file ACL operations, you can also specify a `generation` property.\n * // Here is how you would grant ownership permissions to a user on a\n * specific\n * // revision of a file.\n * //-\n * myFile.acl.add({\n * entity: 'user-useremail@example.com',\n * role: gcs.acl.OWNER_ROLE,\n * generation: 1\n * }, function(err, aclObject, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * myBucket.acl.add(options).then(function(data) {\n * const aclObject = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_add_file_owner\n * Example of adding an owner to a file:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_add_bucket_owner\n * Example of adding an owner to a bucket:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_add_bucket_default_owner\n * Example of adding a default owner to a bucket:\n */\n add(options, callback) {\n const query = {};\n if (options.generation) {\n query.generation = options.generation;\n }\n if (options.userProject) {\n query.userProject = options.userProject;\n }\n this.request({\n method: 'POST',\n uri: '',\n qs: query,\n maxRetries: 0, //explicitly set this value since this is a non-idempotent function\n json: {\n entity: options.entity,\n role: options.role.toUpperCase(),\n },\n }, (err, resp) => {\n if (err) {\n callback(err, null, resp);\n return;\n }\n callback(null, this.makeAclObject_(resp), resp);\n });\n }\n /**\n * @typedef {array} RemoveAclResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @callback RemoveAclCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Delete access controls on a {@link Bucket} or {@link File}.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/delete| BucketAccessControls: delete API Documentation}\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete| ObjectAccessControls: delete API Documentation}\n *\n * @param {object} options Configuration object.\n * @param {string} options.entity Whose permissions will be revoked.\n * @param {int} [options.generation] **File Objects Only** Select a specific\n * revision of this file (as opposed to the latest version, the default).\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {RemoveAclCallback} callback The callback function.\n * @returns {Promise<RemoveAclResponse>}\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const myBucket = storage.bucket('my-bucket');\n * const myFile = myBucket.file('my-file');\n *\n * myBucket.acl.delete({\n * entity: 'user-useremail@example.com'\n * }, function(err, apiResponse) {});\n *\n * //-\n * // For file ACL operations, you can also specify a `generation` property.\n * //-\n * myFile.acl.delete({\n * entity: 'user-useremail@example.com',\n * generation: 1\n * }, function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * myFile.acl.delete().then(function(data) {\n * const apiResponse = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_remove_bucket_owner\n * Example of removing an owner from a bucket:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_remove_bucket_default_owner\n * Example of removing a default owner from a bucket:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_remove_file_owner\n * Example of removing an owner from a bucket:\n */\n delete(options, callback) {\n const query = {};\n if (options.generation) {\n query.generation = options.generation;\n }\n if (options.userProject) {\n query.userProject = options.userProject;\n }\n this.request({\n method: 'DELETE',\n uri: '/' + encodeURIComponent(options.entity),\n qs: query,\n }, (err, resp) => {\n callback(err, resp);\n });\n }\n /**\n * @typedef {array} GetAclResponse\n * @property {object|object[]} 0 Single or array of Acl Objects.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback GetAclCallback\n * @param {?Error} err Request error, if any.\n * @param {object|object[]} acl Single or array of Acl Objects.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Get access controls on a {@link Bucket} or {@link File}. If\n * an entity is omitted, you will receive an array of all applicable access\n * controls.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/get| BucketAccessControls: get API Documentation}\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/get| ObjectAccessControls: get API Documentation}\n *\n * @param {object|function} [options] Configuration options. If you want to\n * receive a list of all access controls, pass the callback function as\n * the only argument.\n * @param {string} options.entity Whose permissions will be fetched.\n * @param {number} [options.generation] **File Objects Only** Select a specific\n * revision of this file (as opposed to the latest version, the default).\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {GetAclCallback} [callback] Callback function.\n * @returns {Promise<GetAclResponse>}\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const myBucket = storage.bucket('my-bucket');\n * const myFile = myBucket.file('my-file');\n *\n * myBucket.acl.get({\n * entity: 'user-useremail@example.com'\n * }, function(err, aclObject, apiResponse) {});\n *\n * //-\n * // Get all access controls.\n * //-\n * myBucket.acl.get(function(err, aclObjects, apiResponse) {\n * // aclObjects = [\n * // {\n * // entity: 'user-useremail@example.com',\n * // role: 'owner'\n * // }\n * // ]\n * });\n *\n * //-\n * // For file ACL operations, you can also specify a `generation` property.\n * //-\n * myFile.acl.get({\n * entity: 'user-useremail@example.com',\n * generation: 1\n * }, function(err, aclObject, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * myBucket.acl.get().then(function(data) {\n * const aclObject = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_print_file_acl\n * Example of printing a file's ACL:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_print_file_acl_for_user\n * Example of printing a file's ACL for a specific user:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_print_bucket_acl\n * Example of printing a bucket's ACL:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_print_bucket_acl_for_user\n * Example of printing a bucket's ACL for a specific user:\n */\n get(optionsOrCallback, cb) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : null;\n const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb;\n let path = '';\n const query = {};\n if (options) {\n path = '/' + encodeURIComponent(options.entity);\n if (options.generation) {\n query.generation = options.generation;\n }\n if (options.userProject) {\n query.userProject = options.userProject;\n }\n }\n this.request({\n uri: path,\n qs: query,\n }, (err, resp) => {\n if (err) {\n callback(err, null, resp);\n return;\n }\n let results;\n if (resp.items) {\n results = resp.items.map(this.makeAclObject_);\n }\n else {\n results = this.makeAclObject_(resp);\n }\n callback(null, results, resp);\n });\n }\n /**\n * @typedef {array} UpdateAclResponse\n * @property {object} 0 The updated Acl Objects.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback UpdateAclCallback\n * @param {?Error} err Request error, if any.\n * @param {object} acl The updated Acl Objects.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Update access controls on a {@link Bucket} or {@link File}.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/update| BucketAccessControls: update API Documentation}\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/update| ObjectAccessControls: update API Documentation}\n *\n * @param {object} options Configuration options.\n * @param {string} options.entity Whose permissions will be updated.\n * @param {string} options.role Permissions allowed for the defined entity.\n * See {@link Storage.acl}.\n * @param {number} [options.generation] **File Objects Only** Select a specific\n * revision of this file (as opposed to the latest version, the default).\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {UpdateAclCallback} [callback] Callback function.\n * @returns {Promise<UpdateAclResponse>}\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const myBucket = storage.bucket('my-bucket');\n * const myFile = myBucket.file('my-file');\n *\n * const options = {\n * entity: 'user-useremail@example.com',\n * role: gcs.acl.WRITER_ROLE\n * };\n *\n * myBucket.acl.update(options, function(err, aclObject, apiResponse) {});\n *\n * //-\n * // For file ACL operations, you can also specify a `generation` property.\n * //-\n * myFile.acl.update({\n * entity: 'user-useremail@example.com',\n * role: gcs.acl.WRITER_ROLE,\n * generation: 1\n * }, function(err, aclObject, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * myFile.acl.update(options).then(function(data) {\n * const aclObject = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n update(options, callback) {\n const query = {};\n if (options.generation) {\n query.generation = options.generation;\n }\n if (options.userProject) {\n query.userProject = options.userProject;\n }\n this.request({\n method: 'PUT',\n uri: '/' + encodeURIComponent(options.entity),\n qs: query,\n json: {\n role: options.role.toUpperCase(),\n },\n }, (err, resp) => {\n if (err) {\n callback(err, null, resp);\n return;\n }\n callback(null, this.makeAclObject_(resp), resp);\n });\n }\n /**\n * Transform API responses to a consistent object format.\n *\n * @private\n */\n makeAclObject_(accessControlObject) {\n const obj = {\n entity: accessControlObject.entity,\n role: accessControlObject.role,\n };\n if (accessControlObject.projectTeam) {\n obj.projectTeam = accessControlObject.projectTeam;\n }\n return obj;\n }\n /**\n * Patch requests up to the bucket's request object.\n *\n * @private\n *\n * @param {string} method Action.\n * @param {string} path Request path.\n * @param {*} query Request query object.\n * @param {*} body Request body contents.\n * @param {function} callback Callback function.\n */\n request(reqOpts, callback) {\n reqOpts.uri = this.pathPrefix + reqOpts.uri;\n this.request_(reqOpts, callback);\n }\n}\n/*! Developer Documentation\n *\n * All async methods (except for streams) will return a Promise in the event\n * that a callback is omitted.\n */\npromisifyAll(Acl, {\n exclude: ['request'],\n});\nexport { Acl, AclRoleAccessorMethods };\n","/*globals self, window */\n\"use strict\"\n\n/*eslint-disable @mysticatea/prettier */\nconst { AbortController, AbortSignal } =\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window :\n /* otherwise */ undefined\n/*eslint-enable @mysticatea/prettier */\n\nmodule.exports = AbortController\nmodule.exports.AbortSignal = AbortSignal\nmodule.exports.default = AbortController\n","'use strict';\n\nconst isStream = stream =>\n\tstream !== null &&\n\ttypeof stream === 'object' &&\n\ttypeof stream.pipe === 'function';\n\nisStream.writable = stream =>\n\tisStream(stream) &&\n\tstream.writable !== false &&\n\ttypeof stream._write === 'function' &&\n\ttypeof stream._writableState === 'object';\n\nisStream.readable = stream =>\n\tisStream(stream) &&\n\tstream.readable !== false &&\n\ttypeof stream._read === 'function' &&\n\ttypeof stream._readableState === 'object';\n\nisStream.duplex = stream =>\n\tisStream.writable(stream) &&\n\tisStream.readable(stream);\n\nisStream.transform = stream =>\n\tisStream.duplex(stream) &&\n\ttypeof stream._transform === 'function';\n\nmodule.exports = isStream;\n","{\n \"name\": \"gaxios\",\n \"version\": \"6.7.1\",\n \"description\": \"A simple common HTTP client specifically for Google APIs and services.\",\n \"main\": \"build/src/index.js\",\n \"types\": \"build/src/index.d.ts\",\n \"files\": [\n \"build/src\"\n ],\n \"scripts\": {\n \"lint\": \"gts check\",\n \"test\": \"c8 mocha build/test\",\n \"presystem-test\": \"npm run compile\",\n \"system-test\": \"mocha build/system-test --timeout 80000\",\n \"compile\": \"tsc -p .\",\n \"fix\": \"gts fix\",\n \"prepare\": \"npm run compile\",\n \"pretest\": \"npm run compile\",\n \"webpack\": \"webpack\",\n \"prebrowser-test\": \"npm run compile\",\n \"browser-test\": \"node build/browser-test/browser-test-runner.js\",\n \"docs\": \"compodoc src/\",\n \"docs-test\": \"linkinator docs\",\n \"predocs-test\": \"npm run docs\",\n \"samples-test\": \"cd samples/ && npm link ../ && npm test && cd ../\",\n \"prelint\": \"cd samples; npm link ../; npm install\",\n \"clean\": \"gts clean\",\n \"precompile\": \"gts clean\"\n },\n \"repository\": \"googleapis/gaxios\",\n \"keywords\": [\n \"google\"\n ],\n \"engines\": {\n \"node\": \">=14\"\n },\n \"author\": \"Google, LLC\",\n \"license\": \"Apache-2.0\",\n \"devDependencies\": {\n \"@babel/plugin-proposal-private-methods\": \"^7.18.6\",\n \"@compodoc/compodoc\": \"1.1.19\",\n \"@types/cors\": \"^2.8.6\",\n \"@types/express\": \"^4.16.1\",\n \"@types/extend\": \"^3.0.1\",\n \"@types/mocha\": \"^9.0.0\",\n \"@types/multiparty\": \"0.0.36\",\n \"@types/mv\": \"^2.1.0\",\n \"@types/ncp\": \"^2.0.1\",\n \"@types/node\": \"^20.0.0\",\n \"@types/node-fetch\": \"^2.5.7\",\n \"@types/sinon\": \"^17.0.0\",\n \"@types/tmp\": \"0.2.6\",\n \"@types/uuid\": \"^10.0.0\",\n \"abort-controller\": \"^3.0.0\",\n \"assert\": \"^2.0.0\",\n \"browserify\": \"^17.0.0\",\n \"c8\": \"^8.0.0\",\n \"cheerio\": \"1.0.0-rc.10\",\n \"cors\": \"^2.8.5\",\n \"execa\": \"^5.0.0\",\n \"express\": \"^4.16.4\",\n \"form-data\": \"^4.0.0\",\n \"gts\": \"^5.0.0\",\n \"is-docker\": \"^2.0.0\",\n \"karma\": \"^6.0.0\",\n \"karma-chrome-launcher\": \"^3.0.0\",\n \"karma-coverage\": \"^2.0.0\",\n \"karma-firefox-launcher\": \"^2.0.0\",\n \"karma-mocha\": \"^2.0.0\",\n \"karma-remap-coverage\": \"^0.1.5\",\n \"karma-sourcemap-loader\": \"^0.4.0\",\n \"karma-webpack\": \"5.0.0\",\n \"linkinator\": \"^3.0.0\",\n \"mocha\": \"^8.0.0\",\n \"multiparty\": \"^4.2.1\",\n \"mv\": \"^2.1.1\",\n \"ncp\": \"^2.0.0\",\n \"nock\": \"^13.0.0\",\n \"null-loader\": \"^4.0.0\",\n \"puppeteer\": \"^19.0.0\",\n \"sinon\": \"^18.0.0\",\n \"stream-browserify\": \"^3.0.0\",\n \"tmp\": \"0.2.3\",\n \"ts-loader\": \"^8.0.0\",\n \"typescript\": \"^5.1.6\",\n \"webpack\": \"^5.35.0\",\n \"webpack-cli\": \"^4.0.0\"\n },\n \"dependencies\": {\n \"extend\": \"^3.0.2\",\n \"https-proxy-agent\": \"^7.0.1\",\n \"is-stream\": \"^2.0.0\",\n \"node-fetch\": \"^2.6.9\",\n \"uuid\": \"^9.0.1\"\n }\n}\n","\"use strict\";\n// Copyright 2023 Google LLC\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pkg = void 0;\nexports.pkg = require('../../package.json');\n//# sourceMappingURL=util.js.map","\"use strict\";\n// Copyright 2018 Google LLC\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GaxiosError = exports.GAXIOS_ERROR_SYMBOL = void 0;\nexports.defaultErrorRedactor = defaultErrorRedactor;\nconst url_1 = require(\"url\");\nconst util_1 = require(\"./util\");\nconst extend_1 = __importDefault(require(\"extend\"));\n/**\n * Support `instanceof` operator for `GaxiosError`s in different versions of this library.\n *\n * @see {@link GaxiosError[Symbol.hasInstance]}\n */\nexports.GAXIOS_ERROR_SYMBOL = Symbol.for(`${util_1.pkg.name}-gaxios-error`);\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nclass GaxiosError extends Error {\n /**\n * Support `instanceof` operator for `GaxiosError` across builds/duplicated files.\n *\n * @see {@link GAXIOS_ERROR_SYMBOL}\n * @see {@link GaxiosError[GAXIOS_ERROR_SYMBOL]}\n */\n static [(_a = exports.GAXIOS_ERROR_SYMBOL, Symbol.hasInstance)](instance) {\n if (instance &&\n typeof instance === 'object' &&\n exports.GAXIOS_ERROR_SYMBOL in instance &&\n instance[exports.GAXIOS_ERROR_SYMBOL] === util_1.pkg.version) {\n return true;\n }\n // fallback to native\n return Function.prototype[Symbol.hasInstance].call(GaxiosError, instance);\n }\n constructor(message, config, response, error) {\n var _b;\n super(message);\n this.config = config;\n this.response = response;\n this.error = error;\n /**\n * Support `instanceof` operator for `GaxiosError` across builds/duplicated files.\n *\n * @see {@link GAXIOS_ERROR_SYMBOL}\n * @see {@link GaxiosError[Symbol.hasInstance]}\n * @see {@link https://github.com/microsoft/TypeScript/issues/13965#issuecomment-278570200}\n * @see {@link https://stackoverflow.com/questions/46618852/require-and-instanceof}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/@@hasInstance#reverting_to_default_instanceof_behavior}\n */\n this[_a] = util_1.pkg.version;\n // deep-copy config as we do not want to mutate\n // the existing config for future retries/use\n this.config = (0, extend_1.default)(true, {}, config);\n if (this.response) {\n this.response.config = (0, extend_1.default)(true, {}, this.response.config);\n }\n if (this.response) {\n try {\n this.response.data = translateData(this.config.responseType, (_b = this.response) === null || _b === void 0 ? void 0 : _b.data);\n }\n catch (_c) {\n // best effort - don't throw an error within an error\n // we could set `this.response.config.responseType = 'unknown'`, but\n // that would mutate future calls with this config object.\n }\n this.status = this.response.status;\n }\n if (error && 'code' in error && error.code) {\n this.code = error.code;\n }\n if (config.errorRedactor) {\n config.errorRedactor({\n config: this.config,\n response: this.response,\n });\n }\n }\n}\nexports.GaxiosError = GaxiosError;\nfunction translateData(responseType, data) {\n switch (responseType) {\n case 'stream':\n return data;\n case 'json':\n return JSON.parse(JSON.stringify(data));\n case 'arraybuffer':\n return JSON.parse(Buffer.from(data).toString('utf8'));\n case 'blob':\n return JSON.parse(data.text());\n default:\n return data;\n }\n}\n/**\n * An experimental error redactor.\n *\n * @param config Config to potentially redact properties of\n * @param response Config to potentially redact properties of\n *\n * @experimental\n */\nfunction defaultErrorRedactor(data) {\n const REDACT = '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.';\n function redactHeaders(headers) {\n if (!headers)\n return;\n for (const key of Object.keys(headers)) {\n // any casing of `Authentication`\n if (/^authentication$/i.test(key)) {\n headers[key] = REDACT;\n }\n // any casing of `Authorization`\n if (/^authorization$/i.test(key)) {\n headers[key] = REDACT;\n }\n // anything containing secret, such as 'client secret'\n if (/secret/i.test(key)) {\n headers[key] = REDACT;\n }\n }\n }\n function redactString(obj, key) {\n if (typeof obj === 'object' &&\n obj !== null &&\n typeof obj[key] === 'string') {\n const text = obj[key];\n if (/grant_type=/i.test(text) ||\n /assertion=/i.test(text) ||\n /secret/i.test(text)) {\n obj[key] = REDACT;\n }\n }\n }\n function redactObject(obj) {\n if (typeof obj === 'object' && obj !== null) {\n if ('grant_type' in obj) {\n obj['grant_type'] = REDACT;\n }\n if ('assertion' in obj) {\n obj['assertion'] = REDACT;\n }\n if ('client_secret' in obj) {\n obj['client_secret'] = REDACT;\n }\n }\n }\n if (data.config) {\n redactHeaders(data.config.headers);\n redactString(data.config, 'data');\n redactObject(data.config.data);\n redactString(data.config, 'body');\n redactObject(data.config.body);\n try {\n const url = new url_1.URL('', data.config.url);\n if (url.searchParams.has('token')) {\n url.searchParams.set('token', REDACT);\n }\n if (url.searchParams.has('client_secret')) {\n url.searchParams.set('client_secret', REDACT);\n }\n data.config.url = url.toString();\n }\n catch (_b) {\n // ignore error - no need to parse an invalid URL\n }\n }\n if (data.response) {\n defaultErrorRedactor({ config: data.response.config });\n redactHeaders(data.response.headers);\n redactString(data.response, 'data');\n redactObject(data.response.data);\n }\n return data;\n}\n//# sourceMappingURL=common.js.map","\"use strict\";\n// Copyright 2018 Google LLC\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRetryConfig = getRetryConfig;\nasync function getRetryConfig(err) {\n let config = getConfig(err);\n if (!err || !err.config || (!config && !err.config.retry)) {\n return { shouldRetry: false };\n }\n config = config || {};\n config.currentRetryAttempt = config.currentRetryAttempt || 0;\n config.retry =\n config.retry === undefined || config.retry === null ? 3 : config.retry;\n config.httpMethodsToRetry = config.httpMethodsToRetry || [\n 'GET',\n 'HEAD',\n 'PUT',\n 'OPTIONS',\n 'DELETE',\n ];\n config.noResponseRetries =\n config.noResponseRetries === undefined || config.noResponseRetries === null\n ? 2\n : config.noResponseRetries;\n config.retryDelayMultiplier = config.retryDelayMultiplier\n ? config.retryDelayMultiplier\n : 2;\n config.timeOfFirstRequest = config.timeOfFirstRequest\n ? config.timeOfFirstRequest\n : Date.now();\n config.totalTimeout = config.totalTimeout\n ? config.totalTimeout\n : Number.MAX_SAFE_INTEGER;\n config.maxRetryDelay = config.maxRetryDelay\n ? config.maxRetryDelay\n : Number.MAX_SAFE_INTEGER;\n // If this wasn't in the list of status codes where we want\n // to automatically retry, return.\n const retryRanges = [\n // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes\n // 1xx - Retry (Informational, request still processing)\n // 2xx - Do not retry (Success)\n // 3xx - Do not retry (Redirect)\n // 4xx - Do not retry (Client errors)\n // 408 - Retry (\"Request Timeout\")\n // 429 - Retry (\"Too Many Requests\")\n // 5xx - Retry (Server errors)\n [100, 199],\n [408, 408],\n [429, 429],\n [500, 599],\n ];\n config.statusCodesToRetry = config.statusCodesToRetry || retryRanges;\n // Put the config back into the err\n err.config.retryConfig = config;\n // Determine if we should retry the request\n const shouldRetryFn = config.shouldRetry || shouldRetryRequest;\n if (!(await shouldRetryFn(err))) {\n return { shouldRetry: false, config: err.config };\n }\n const delay = getNextRetryDelay(config);\n // We're going to retry! Incremenent the counter.\n err.config.retryConfig.currentRetryAttempt += 1;\n // Create a promise that invokes the retry after the backOffDelay\n const backoff = config.retryBackoff\n ? config.retryBackoff(err, delay)\n : new Promise(resolve => {\n setTimeout(resolve, delay);\n });\n // Notify the user if they added an `onRetryAttempt` handler\n if (config.onRetryAttempt) {\n config.onRetryAttempt(err);\n }\n // Return the promise in which recalls Gaxios to retry the request\n await backoff;\n return { shouldRetry: true, config: err.config };\n}\n/**\n * Determine based on config if we should retry the request.\n * @param err The GaxiosError passed to the interceptor.\n */\nfunction shouldRetryRequest(err) {\n var _a;\n const config = getConfig(err);\n // node-fetch raises an AbortError if signaled:\n // https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal\n if (err.name === 'AbortError' || ((_a = err.error) === null || _a === void 0 ? void 0 : _a.name) === 'AbortError') {\n return false;\n }\n // If there's no config, or retries are disabled, return.\n if (!config || config.retry === 0) {\n return false;\n }\n // Check if this error has no response (ETIMEDOUT, ENOTFOUND, etc)\n if (!err.response &&\n (config.currentRetryAttempt || 0) >= config.noResponseRetries) {\n return false;\n }\n // Only retry with configured HttpMethods.\n if (!err.config.method ||\n config.httpMethodsToRetry.indexOf(err.config.method.toUpperCase()) < 0) {\n return false;\n }\n // If this wasn't in the list of status codes where we want\n // to automatically retry, return.\n if (err.response && err.response.status) {\n let isInRange = false;\n for (const [min, max] of config.statusCodesToRetry) {\n const status = err.response.status;\n if (status >= min && status <= max) {\n isInRange = true;\n break;\n }\n }\n if (!isInRange) {\n return false;\n }\n }\n // If we are out of retry attempts, return\n config.currentRetryAttempt = config.currentRetryAttempt || 0;\n if (config.currentRetryAttempt >= config.retry) {\n return false;\n }\n return true;\n}\n/**\n * Acquire the raxConfig object from an GaxiosError if available.\n * @param err The Gaxios error with a config object.\n */\nfunction getConfig(err) {\n if (err && err.config && err.config.retryConfig) {\n return err.config.retryConfig;\n }\n return;\n}\n/**\n * Gets the delay to wait before the next retry.\n *\n * @param {RetryConfig} config The current set of retry options\n * @returns {number} the amount of ms to wait before the next retry attempt.\n */\nfunction getNextRetryDelay(config) {\n var _a;\n // Calculate time to wait with exponential backoff.\n // If this is the first retry, look for a configured retryDelay.\n const retryDelay = config.currentRetryAttempt ? 0 : (_a = config.retryDelay) !== null && _a !== void 0 ? _a : 100;\n // Formula: retryDelay + ((retryDelayMultiplier^currentRetryAttempt - 1 / 2) * 1000)\n const calculatedDelay = retryDelay +\n ((Math.pow(config.retryDelayMultiplier, config.currentRetryAttempt) - 1) /\n 2) *\n 1000;\n const maxAllowableDelay = config.totalTimeout - (Date.now() - config.timeOfFirstRequest);\n return Math.min(calculatedDelay, maxAllowableDelay, config.maxRetryDelay);\n}\n//# sourceMappingURL=retry.js.map","\"use strict\";\n// Copyright 2024 Google LLC\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GaxiosInterceptorManager = void 0;\n/**\n * Class to manage collections of GaxiosInterceptors for both requests and responses.\n */\nclass GaxiosInterceptorManager extends Set {\n}\nexports.GaxiosInterceptorManager = GaxiosInterceptorManager;\n//# sourceMappingURL=interceptor.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.req = exports.json = exports.toBuffer = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nasync function toBuffer(stream) {\n let length = 0;\n const chunks = [];\n for await (const chunk of stream) {\n length += chunk.length;\n chunks.push(chunk);\n }\n return Buffer.concat(chunks, length);\n}\nexports.toBuffer = toBuffer;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nasync function json(stream) {\n const buf = await toBuffer(stream);\n const str = buf.toString('utf8');\n try {\n return JSON.parse(str);\n }\n catch (_err) {\n const err = _err;\n err.message += ` (input: ${str})`;\n throw err;\n }\n}\nexports.json = json;\nfunction req(url, opts = {}) {\n const href = typeof url === 'string' ? url : url.href;\n const req = (href.startsWith('https:') ? https : http).request(url, opts);\n const promise = new Promise((resolve, reject) => {\n req\n .once('response', resolve)\n .once('error', reject)\n .end();\n });\n req.then = promise.then.bind(promise);\n return req;\n}\nexports.req = req;\n//# sourceMappingURL=helpers.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Agent = void 0;\nconst net = __importStar(require(\"net\"));\nconst http = __importStar(require(\"http\"));\nconst https_1 = require(\"https\");\n__exportStar(require(\"./helpers\"), exports);\nconst INTERNAL = Symbol('AgentBaseInternalState');\nclass Agent extends http.Agent {\n constructor(opts) {\n super(opts);\n this[INTERNAL] = {};\n }\n /**\n * Determine whether this is an `http` or `https` request.\n */\n isSecureEndpoint(options) {\n if (options) {\n // First check the `secureEndpoint` property explicitly, since this\n // means that a parent `Agent` is \"passing through\" to this instance.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (typeof options.secureEndpoint === 'boolean') {\n return options.secureEndpoint;\n }\n // If no explicit `secure` endpoint, check if `protocol` property is\n // set. This will usually be the case since using a full string URL\n // or `URL` instance should be the most common usage.\n if (typeof options.protocol === 'string') {\n return options.protocol === 'https:';\n }\n }\n // Finally, if no `protocol` property was set, then fall back to\n // checking the stack trace of the current call stack, and try to\n // detect the \"https\" module.\n const { stack } = new Error();\n if (typeof stack !== 'string')\n return false;\n return stack\n .split('\\n')\n .some((l) => l.indexOf('(https.js:') !== -1 ||\n l.indexOf('node:https:') !== -1);\n }\n // In order to support async signatures in `connect()` and Node's native\n // connection pooling in `http.Agent`, the array of sockets for each origin\n // has to be updated synchronously. This is so the length of the array is\n // accurate when `addRequest()` is next called. We achieve this by creating a\n // fake socket and adding it to `sockets[origin]` and incrementing\n // `totalSocketCount`.\n incrementSockets(name) {\n // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no\n // need to create a fake socket because Node.js native connection pooling\n // will never be invoked.\n if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {\n return null;\n }\n // All instances of `sockets` are expected TypeScript errors. The\n // alternative is to add it as a private property of this class but that\n // will break TypeScript subclassing.\n if (!this.sockets[name]) {\n // @ts-expect-error `sockets` is readonly in `@types/node`\n this.sockets[name] = [];\n }\n const fakeSocket = new net.Socket({ writable: false });\n this.sockets[name].push(fakeSocket);\n // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`\n this.totalSocketCount++;\n return fakeSocket;\n }\n decrementSockets(name, socket) {\n if (!this.sockets[name] || socket === null) {\n return;\n }\n const sockets = this.sockets[name];\n const index = sockets.indexOf(socket);\n if (index !== -1) {\n sockets.splice(index, 1);\n // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`\n this.totalSocketCount--;\n if (sockets.length === 0) {\n // @ts-expect-error `sockets` is readonly in `@types/node`\n delete this.sockets[name];\n }\n }\n }\n // In order to properly update the socket pool, we need to call `getName()` on\n // the core `https.Agent` if it is a secureEndpoint.\n getName(options) {\n const secureEndpoint = this.isSecureEndpoint(options);\n if (secureEndpoint) {\n // @ts-expect-error `getName()` isn't defined in `@types/node`\n return https_1.Agent.prototype.getName.call(this, options);\n }\n // @ts-expect-error `getName()` isn't defined in `@types/node`\n return super.getName(options);\n }\n createSocket(req, options, cb) {\n const connectOpts = {\n ...options,\n secureEndpoint: this.isSecureEndpoint(options),\n };\n const name = this.getName(connectOpts);\n const fakeSocket = this.incrementSockets(name);\n Promise.resolve()\n .then(() => this.connect(req, connectOpts))\n .then((socket) => {\n this.decrementSockets(name, fakeSocket);\n if (socket instanceof http.Agent) {\n try {\n // @ts-expect-error `addRequest()` isn't defined in `@types/node`\n return socket.addRequest(req, connectOpts);\n }\n catch (err) {\n return cb(err);\n }\n }\n this[INTERNAL].currentSocket = socket;\n // @ts-expect-error `createSocket()` isn't defined in `@types/node`\n super.createSocket(req, options, cb);\n }, (err) => {\n this.decrementSockets(name, fakeSocket);\n cb(err);\n });\n }\n createConnection() {\n const socket = this[INTERNAL].currentSocket;\n this[INTERNAL].currentSocket = undefined;\n if (!socket) {\n throw new Error('No socket was returned in the `connect()` function');\n }\n return socket;\n }\n get defaultPort() {\n return (this[INTERNAL].defaultPort ??\n (this.protocol === 'https:' ? 443 : 80));\n }\n set defaultPort(v) {\n if (this[INTERNAL]) {\n this[INTERNAL].defaultPort = v;\n }\n }\n get protocol() {\n return (this[INTERNAL].protocol ??\n (this.isSecureEndpoint() ? 'https:' : 'http:'));\n }\n set protocol(v) {\n if (this[INTERNAL]) {\n this[INTERNAL].protocol = v;\n }\n }\n}\nexports.Agent = Agent;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseProxyResponse = void 0;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response');\nfunction parseProxyResponse(socket) {\n return new Promise((resolve, reject) => {\n // we need to buffer any HTTP traffic that happens with the proxy before we get\n // the CONNECT response, so that if the response is anything other than an \"200\"\n // response code, then we can re-play the \"data\" events on the socket once the\n // HTTP parser is hooked up...\n let buffersLength = 0;\n const buffers = [];\n function read() {\n const b = socket.read();\n if (b)\n ondata(b);\n else\n socket.once('readable', read);\n }\n function cleanup() {\n socket.removeListener('end', onend);\n socket.removeListener('error', onerror);\n socket.removeListener('readable', read);\n }\n function onend() {\n cleanup();\n debug('onend');\n reject(new Error('Proxy connection ended before receiving CONNECT response'));\n }\n function onerror(err) {\n cleanup();\n debug('onerror %o', err);\n reject(err);\n }\n function ondata(b) {\n buffers.push(b);\n buffersLength += b.length;\n const buffered = Buffer.concat(buffers, buffersLength);\n const endOfHeaders = buffered.indexOf('\\r\\n\\r\\n');\n if (endOfHeaders === -1) {\n // keep buffering\n debug('have not received end of HTTP headers yet...');\n read();\n return;\n }\n const headerParts = buffered\n .slice(0, endOfHeaders)\n .toString('ascii')\n .split('\\r\\n');\n const firstLine = headerParts.shift();\n if (!firstLine) {\n socket.destroy();\n return reject(new Error('No header received from proxy CONNECT response'));\n }\n const firstLineParts = firstLine.split(' ');\n const statusCode = +firstLineParts[1];\n const statusText = firstLineParts.slice(2).join(' ');\n const headers = {};\n for (const header of headerParts) {\n if (!header)\n continue;\n const firstColon = header.indexOf(':');\n if (firstColon === -1) {\n socket.destroy();\n return reject(new Error(`Invalid header from proxy CONNECT response: \"${header}\"`));\n }\n const key = header.slice(0, firstColon).toLowerCase();\n const value = header.slice(firstColon + 1).trimStart();\n const current = headers[key];\n if (typeof current === 'string') {\n headers[key] = [current, value];\n }\n else if (Array.isArray(current)) {\n current.push(value);\n }\n else {\n headers[key] = value;\n }\n }\n debug('got proxy server response: %o %o', firstLine, headers);\n cleanup();\n resolve({\n connect: {\n statusCode,\n statusText,\n headers,\n },\n buffered,\n });\n }\n socket.on('error', onerror);\n socket.on('end', onend);\n read();\n });\n}\nexports.parseProxyResponse = parseProxyResponse;\n//# sourceMappingURL=parse-proxy-response.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpsProxyAgent = void 0;\nconst net = __importStar(require(\"net\"));\nconst tls = __importStar(require(\"tls\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst debug_1 = __importDefault(require(\"debug\"));\nconst agent_base_1 = require(\"agent-base\");\nconst url_1 = require(\"url\");\nconst parse_proxy_response_1 = require(\"./parse-proxy-response\");\nconst debug = (0, debug_1.default)('https-proxy-agent');\nconst setServernameFromNonIpHost = (options) => {\n if (options.servername === undefined &&\n options.host &&\n !net.isIP(options.host)) {\n return {\n ...options,\n servername: options.host,\n };\n }\n return options;\n};\n/**\n * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to\n * the specified \"HTTP(s) proxy server\" in order to proxy HTTPS requests.\n *\n * Outgoing HTTP requests are first tunneled through the proxy server using the\n * `CONNECT` HTTP request method to establish a connection to the proxy server,\n * and then the proxy server connects to the destination target and issues the\n * HTTP request from the proxy server.\n *\n * `https:` requests have their socket connection upgraded to TLS once\n * the connection to the proxy server has been established.\n */\nclass HttpsProxyAgent extends agent_base_1.Agent {\n constructor(proxy, opts) {\n super(opts);\n this.options = { path: undefined };\n this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy;\n this.proxyHeaders = opts?.headers ?? {};\n debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href);\n // Trim off the brackets from IPv6 addresses\n const host = (this.proxy.hostname || this.proxy.host).replace(/^\\[|\\]$/g, '');\n const port = this.proxy.port\n ? parseInt(this.proxy.port, 10)\n : this.proxy.protocol === 'https:'\n ? 443\n : 80;\n this.connectOpts = {\n // Attempt to negotiate http/1.1 for proxy servers that support http/2\n ALPNProtocols: ['http/1.1'],\n ...(opts ? omit(opts, 'headers') : null),\n host,\n port,\n };\n }\n /**\n * Called when the node-core HTTP client library is creating a\n * new HTTP request.\n */\n async connect(req, opts) {\n const { proxy } = this;\n if (!opts.host) {\n throw new TypeError('No \"host\" provided');\n }\n // Create a socket connection to the proxy server.\n let socket;\n if (proxy.protocol === 'https:') {\n debug('Creating `tls.Socket`: %o', this.connectOpts);\n socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));\n }\n else {\n debug('Creating `net.Socket`: %o', this.connectOpts);\n socket = net.connect(this.connectOpts);\n }\n const headers = typeof this.proxyHeaders === 'function'\n ? this.proxyHeaders()\n : { ...this.proxyHeaders };\n const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;\n let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\\r\\n`;\n // Inject the `Proxy-Authorization` header if necessary.\n if (proxy.username || proxy.password) {\n const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;\n headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`;\n }\n headers.Host = `${host}:${opts.port}`;\n if (!headers['Proxy-Connection']) {\n headers['Proxy-Connection'] = this.keepAlive\n ? 'Keep-Alive'\n : 'close';\n }\n for (const name of Object.keys(headers)) {\n payload += `${name}: ${headers[name]}\\r\\n`;\n }\n const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);\n socket.write(`${payload}\\r\\n`);\n const { connect, buffered } = await proxyResponsePromise;\n req.emit('proxyConnect', connect);\n this.emit('proxyConnect', connect, req);\n if (connect.statusCode === 200) {\n req.once('socket', resume);\n if (opts.secureEndpoint) {\n // The proxy is connecting to a TLS server, so upgrade\n // this socket connection to a TLS connection.\n debug('Upgrading socket connection to TLS');\n return tls.connect({\n ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'),\n socket,\n });\n }\n return socket;\n }\n // Some other status code that's not 200... need to re-play the HTTP\n // header \"data\" events onto the socket once the HTTP machinery is\n // attached so that the node core `http` can parse and handle the\n // error status code.\n // Close the original socket, and a new \"fake\" socket is returned\n // instead, so that the proxy doesn't get the HTTP request\n // written to it (which may contain `Authorization` headers or other\n // sensitive data).\n //\n // See: https://hackerone.com/reports/541502\n socket.destroy();\n const fakeSocket = new net.Socket({ writable: false });\n fakeSocket.readable = true;\n // Need to wait for the \"socket\" event to re-play the \"data\" events.\n req.once('socket', (s) => {\n debug('Replaying proxy buffer for failed request');\n (0, assert_1.default)(s.listenerCount('data') > 0);\n // Replay the \"buffered\" Buffer onto the fake `socket`, since at\n // this point the HTTP module machinery has been hooked up for\n // the user.\n s.push(buffered);\n s.push(null);\n });\n return fakeSocket;\n }\n}\nHttpsProxyAgent.protocols = ['http', 'https'];\nexports.HttpsProxyAgent = HttpsProxyAgent;\nfunction resume(socket) {\n socket.resume();\n}\nfunction omit(obj, ...keys) {\n const ret = {};\n let key;\n for (key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright 2018 Google LLC\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n 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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n 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\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _Gaxios_instances, _a, _Gaxios_urlMayUseProxy, _Gaxios_applyRequestInterceptors, _Gaxios_applyResponseInterceptors, _Gaxios_prepareRequest, _Gaxios_proxyAgent, _Gaxios_getProxyAgent;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Gaxios = void 0;\nconst extend_1 = __importDefault(require(\"extend\"));\nconst https_1 = require(\"https\");\nconst node_fetch_1 = __importDefault(require(\"node-fetch\"));\nconst querystring_1 = __importDefault(require(\"querystring\"));\nconst is_stream_1 = __importDefault(require(\"is-stream\"));\nconst url_1 = require(\"url\");\nconst common_1 = require(\"./common\");\nconst retry_1 = require(\"./retry\");\nconst stream_1 = require(\"stream\");\nconst uuid_1 = require(\"uuid\");\nconst interceptor_1 = require(\"./interceptor\");\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fetch = hasFetch() ? window.fetch : node_fetch_1.default;\nfunction hasWindow() {\n return typeof window !== 'undefined' && !!window;\n}\nfunction hasFetch() {\n return hasWindow() && !!window.fetch;\n}\nfunction hasBuffer() {\n return typeof Buffer !== 'undefined';\n}\nfunction hasHeader(options, header) {\n return !!getHeader(options, header);\n}\nfunction getHeader(options, header) {\n header = header.toLowerCase();\n for (const key of Object.keys((options === null || options === void 0 ? void 0 : options.headers) || {})) {\n if (header === key.toLowerCase()) {\n return options.headers[key];\n }\n }\n return undefined;\n}\nclass Gaxios {\n /**\n * The Gaxios class is responsible for making HTTP requests.\n * @param defaults The default set of options to be used for this instance.\n */\n constructor(defaults) {\n _Gaxios_instances.add(this);\n this.agentCache = new Map();\n this.defaults = defaults || {};\n this.interceptors = {\n request: new interceptor_1.GaxiosInterceptorManager(),\n response: new interceptor_1.GaxiosInterceptorManager(),\n };\n }\n /**\n * Perform an HTTP request with the given options.\n * @param opts Set of HTTP options that will be used for this HTTP request.\n */\n async request(opts = {}) {\n opts = await __classPrivateFieldGet(this, _Gaxios_instances, \"m\", _Gaxios_prepareRequest).call(this, opts);\n opts = await __classPrivateFieldGet(this, _Gaxios_instances, \"m\", _Gaxios_applyRequestInterceptors).call(this, opts);\n return __classPrivateFieldGet(this, _Gaxios_instances, \"m\", _Gaxios_applyResponseInterceptors).call(this, this._request(opts));\n }\n async _defaultAdapter(opts) {\n const fetchImpl = opts.fetchImplementation || fetch;\n const res = (await fetchImpl(opts.url, opts));\n const data = await this.getResponseData(opts, res);\n return this.translateResponse(opts, res, data);\n }\n /**\n * Internal, retryable version of the `request` method.\n * @param opts Set of HTTP options that will be used for this HTTP request.\n */\n async _request(opts = {}) {\n var _b;\n try {\n let translatedResponse;\n if (opts.adapter) {\n translatedResponse = await opts.adapter(opts, this._defaultAdapter.bind(this));\n }\n else {\n translatedResponse = await this._defaultAdapter(opts);\n }\n if (!opts.validateStatus(translatedResponse.status)) {\n if (opts.responseType === 'stream') {\n let response = '';\n await new Promise(resolve => {\n (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('data', chunk => {\n response += chunk;\n });\n (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('end', resolve);\n });\n translatedResponse.data = response;\n }\n throw new common_1.GaxiosError(`Request failed with status code ${translatedResponse.status}`, opts, translatedResponse);\n }\n return translatedResponse;\n }\n catch (e) {\n const err = e instanceof common_1.GaxiosError\n ? e\n : new common_1.GaxiosError(e.message, opts, undefined, e);\n const { shouldRetry, config } = await (0, retry_1.getRetryConfig)(err);\n if (shouldRetry && config) {\n err.config.retryConfig.currentRetryAttempt =\n config.retryConfig.currentRetryAttempt;\n // The error's config could be redacted - therefore we only want to\n // copy the retry state over to the existing config\n opts.retryConfig = (_b = err.config) === null || _b === void 0 ? void 0 : _b.retryConfig;\n return this._request(opts);\n }\n throw err;\n }\n }\n async getResponseData(opts, res) {\n switch (opts.responseType) {\n case 'stream':\n return res.body;\n case 'json': {\n let data = await res.text();\n try {\n data = JSON.parse(data);\n }\n catch (_b) {\n // continue\n }\n return data;\n }\n case 'arraybuffer':\n return res.arrayBuffer();\n case 'blob':\n return res.blob();\n case 'text':\n return res.text();\n default:\n return this.getResponseDataFromContentType(res);\n }\n }\n /**\n * By default, throw for any non-2xx status code\n * @param status status code from the HTTP response\n */\n validateStatus(status) {\n return status >= 200 && status < 300;\n }\n /**\n * Encode a set of key/value pars into a querystring format (?foo=bar&baz=boo)\n * @param params key value pars to encode\n */\n paramsSerializer(params) {\n return querystring_1.default.stringify(params);\n }\n translateResponse(opts, res, data) {\n // headers need to be converted from a map to an obj\n const headers = {};\n res.headers.forEach((value, key) => {\n headers[key] = value;\n });\n return {\n config: opts,\n data: data,\n headers,\n status: res.status,\n statusText: res.statusText,\n // XMLHttpRequestLike\n request: {\n responseURL: res.url,\n },\n };\n }\n /**\n * Attempts to parse a response by looking at the Content-Type header.\n * @param {FetchResponse} response the HTTP response.\n * @returns {Promise<any>} a promise that resolves to the response data.\n */\n async getResponseDataFromContentType(response) {\n let contentType = response.headers.get('Content-Type');\n if (contentType === null) {\n // Maintain existing functionality by calling text()\n return response.text();\n }\n contentType = contentType.toLowerCase();\n if (contentType.includes('application/json')) {\n let data = await response.text();\n try {\n data = JSON.parse(data);\n }\n catch (_b) {\n // continue\n }\n return data;\n }\n else if (contentType.match(/^text\\//)) {\n return response.text();\n }\n else {\n // If the content type is something not easily handled, just return the raw data (blob)\n return response.blob();\n }\n }\n /**\n * Creates an async generator that yields the pieces of a multipart/related request body.\n * This implementation follows the spec: https://www.ietf.org/rfc/rfc2387.txt. However, recursive\n * multipart/related requests are not currently supported.\n *\n * @param {GaxioMultipartOptions[]} multipartOptions the pieces to turn into a multipart/related body.\n * @param {string} boundary the boundary string to be placed between each part.\n */\n async *getMultipartRequest(multipartOptions, boundary) {\n const finale = `--${boundary}--`;\n for (const currentPart of multipartOptions) {\n const partContentType = currentPart.headers['Content-Type'] || 'application/octet-stream';\n const preamble = `--${boundary}\\r\\nContent-Type: ${partContentType}\\r\\n\\r\\n`;\n yield preamble;\n if (typeof currentPart.content === 'string') {\n yield currentPart.content;\n }\n else {\n yield* currentPart.content;\n }\n yield '\\r\\n';\n }\n yield finale;\n }\n}\nexports.Gaxios = Gaxios;\n_a = Gaxios, _Gaxios_instances = new WeakSet(), _Gaxios_urlMayUseProxy = function _Gaxios_urlMayUseProxy(url, noProxy = []) {\n var _b, _c;\n const candidate = new url_1.URL(url);\n const noProxyList = [...noProxy];\n const noProxyEnvList = ((_c = ((_b = process.env.NO_PROXY) !== null && _b !== void 0 ? _b : process.env.no_proxy)) === null || _c === void 0 ? void 0 : _c.split(',')) || [];\n for (const rule of noProxyEnvList) {\n noProxyList.push(rule.trim());\n }\n for (const rule of noProxyList) {\n // Match regex\n if (rule instanceof RegExp) {\n if (rule.test(candidate.toString())) {\n return false;\n }\n }\n // Match URL\n else if (rule instanceof url_1.URL) {\n if (rule.origin === candidate.origin) {\n return false;\n }\n }\n // Match string regex\n else if (rule.startsWith('*.') || rule.startsWith('.')) {\n const cleanedRule = rule.replace(/^\\*\\./, '.');\n if (candidate.hostname.endsWith(cleanedRule)) {\n return false;\n }\n }\n // Basic string match\n else if (rule === candidate.origin ||\n rule === candidate.hostname ||\n rule === candidate.href) {\n return false;\n }\n }\n return true;\n}, _Gaxios_applyRequestInterceptors = \n/**\n * Applies the request interceptors. The request interceptors are applied after the\n * call to prepareRequest is completed.\n *\n * @param {GaxiosOptions} options The current set of options.\n *\n * @returns {Promise<GaxiosOptions>} Promise that resolves to the set of options or response after interceptors are applied.\n */\nasync function _Gaxios_applyRequestInterceptors(options) {\n let promiseChain = Promise.resolve(options);\n for (const interceptor of this.interceptors.request.values()) {\n if (interceptor) {\n promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected);\n }\n }\n return promiseChain;\n}, _Gaxios_applyResponseInterceptors = \n/**\n * Applies the response interceptors. The response interceptors are applied after the\n * call to request is made.\n *\n * @param {GaxiosOptions} options The current set of options.\n *\n * @returns {Promise<GaxiosOptions>} Promise that resolves to the set of options or response after interceptors are applied.\n */\nasync function _Gaxios_applyResponseInterceptors(response) {\n let promiseChain = Promise.resolve(response);\n for (const interceptor of this.interceptors.response.values()) {\n if (interceptor) {\n promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected);\n }\n }\n return promiseChain;\n}, _Gaxios_prepareRequest = \n/**\n * Validates the options, merges them with defaults, and prepare request.\n *\n * @param options The original options passed from the client.\n * @returns Prepared options, ready to make a request\n */\nasync function _Gaxios_prepareRequest(options) {\n var _b, _c, _d, _e;\n const opts = (0, extend_1.default)(true, {}, this.defaults, options);\n if (!opts.url) {\n throw new Error('URL is required.');\n }\n // baseUrl has been deprecated, remove in 2.0\n const baseUrl = opts.baseUrl || opts.baseURL;\n if (baseUrl) {\n opts.url = baseUrl.toString() + opts.url;\n }\n opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer;\n if (opts.params && Object.keys(opts.params).length > 0) {\n let additionalQueryParams = opts.paramsSerializer(opts.params);\n if (additionalQueryParams.startsWith('?')) {\n additionalQueryParams = additionalQueryParams.slice(1);\n }\n const prefix = opts.url.toString().includes('?') ? '&' : '?';\n opts.url = opts.url + prefix + additionalQueryParams;\n }\n if (typeof options.maxContentLength === 'number') {\n opts.size = options.maxContentLength;\n }\n if (typeof options.maxRedirects === 'number') {\n opts.follow = options.maxRedirects;\n }\n opts.headers = opts.headers || {};\n if (opts.multipart === undefined && opts.data) {\n const isFormData = typeof FormData === 'undefined'\n ? false\n : (opts === null || opts === void 0 ? void 0 : opts.data) instanceof FormData;\n if (is_stream_1.default.readable(opts.data)) {\n opts.body = opts.data;\n }\n else if (hasBuffer() && Buffer.isBuffer(opts.data)) {\n // Do not attempt to JSON.stringify() a Buffer:\n opts.body = opts.data;\n if (!hasHeader(opts, 'Content-Type')) {\n opts.headers['Content-Type'] = 'application/json';\n }\n }\n else if (typeof opts.data === 'object') {\n // If www-form-urlencoded content type has been set, but data is\n // provided as an object, serialize the content using querystring:\n if (!isFormData) {\n if (getHeader(opts, 'content-type') ===\n 'application/x-www-form-urlencoded') {\n opts.body = opts.paramsSerializer(opts.data);\n }\n else {\n // } else if (!(opts.data instanceof FormData)) {\n if (!hasHeader(opts, 'Content-Type')) {\n opts.headers['Content-Type'] = 'application/json';\n }\n opts.body = JSON.stringify(opts.data);\n }\n }\n }\n else {\n opts.body = opts.data;\n }\n }\n else if (opts.multipart && opts.multipart.length > 0) {\n // note: once the minimum version reaches Node 16,\n // this can be replaced with randomUUID() function from crypto\n // and the dependency on UUID removed\n const boundary = (0, uuid_1.v4)();\n opts.headers['Content-Type'] = `multipart/related; boundary=${boundary}`;\n const bodyStream = new stream_1.PassThrough();\n opts.body = bodyStream;\n (0, stream_1.pipeline)(this.getMultipartRequest(opts.multipart, boundary), bodyStream, () => { });\n }\n opts.validateStatus = opts.validateStatus || this.validateStatus;\n opts.responseType = opts.responseType || 'unknown';\n if (!opts.headers['Accept'] && opts.responseType === 'json') {\n opts.headers['Accept'] = 'application/json';\n }\n opts.method = opts.method || 'GET';\n const proxy = opts.proxy ||\n ((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b.HTTPS_PROXY) ||\n ((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c.https_proxy) ||\n ((_d = process === null || process === void 0 ? void 0 : process.env) === null || _d === void 0 ? void 0 : _d.HTTP_PROXY) ||\n ((_e = process === null || process === void 0 ? void 0 : process.env) === null || _e === void 0 ? void 0 : _e.http_proxy);\n const urlMayUseProxy = __classPrivateFieldGet(this, _Gaxios_instances, \"m\", _Gaxios_urlMayUseProxy).call(this, opts.url, opts.noProxy);\n if (opts.agent) {\n // don't do any of the following options - use the user-provided agent.\n }\n else if (proxy && urlMayUseProxy) {\n const HttpsProxyAgent = await __classPrivateFieldGet(_a, _a, \"m\", _Gaxios_getProxyAgent).call(_a);\n if (this.agentCache.has(proxy)) {\n opts.agent = this.agentCache.get(proxy);\n }\n else {\n opts.agent = new HttpsProxyAgent(proxy, {\n cert: opts.cert,\n key: opts.key,\n });\n this.agentCache.set(proxy, opts.agent);\n }\n }\n else if (opts.cert && opts.key) {\n // Configure client for mTLS\n if (this.agentCache.has(opts.key)) {\n opts.agent = this.agentCache.get(opts.key);\n }\n else {\n opts.agent = new https_1.Agent({\n cert: opts.cert,\n key: opts.key,\n });\n this.agentCache.set(opts.key, opts.agent);\n }\n }\n if (typeof opts.errorRedactor !== 'function' &&\n opts.errorRedactor !== false) {\n opts.errorRedactor = common_1.defaultErrorRedactor;\n }\n return opts;\n}, _Gaxios_getProxyAgent = async function _Gaxios_getProxyAgent() {\n __classPrivateFieldSet(this, _a, __classPrivateFieldGet(this, _a, \"f\", _Gaxios_proxyAgent) || (await Promise.resolve().then(() => __importStar(require('https-proxy-agent')))).HttpsProxyAgent, \"f\", _Gaxios_proxyAgent);\n return __classPrivateFieldGet(this, _a, \"f\", _Gaxios_proxyAgent);\n};\n/**\n * A cache for the lazily-loaded proxy agent.\n *\n * Should use {@link Gaxios[#getProxyAgent]} to retrieve.\n */\n// using `import` to dynamically import the types here\n_Gaxios_proxyAgent = { value: void 0 };\n//# sourceMappingURL=gaxios.js.map","\"use strict\";\n// Copyright 2018 Google LLC\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.instance = exports.Gaxios = exports.GaxiosError = void 0;\nexports.request = request;\nconst gaxios_1 = require(\"./gaxios\");\nObject.defineProperty(exports, \"Gaxios\", { enumerable: true, get: function () { return gaxios_1.Gaxios; } });\nvar common_1 = require(\"./common\");\nObject.defineProperty(exports, \"GaxiosError\", { enumerable: true, get: function () { return common_1.GaxiosError; } });\n__exportStar(require(\"./interceptor\"), exports);\n/**\n * The default instance used when the `request` method is directly\n * invoked.\n */\nexports.instance = new gaxios_1.Gaxios();\n/**\n * Make an HTTP request using the given options.\n * @param opts Options for the request\n */\nasync function request(opts) {\n return exports.instance.request(opts);\n}\n//# sourceMappingURL=index.js.map","// Copyright 2022 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n 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\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n 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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _CRC32C_crc32c;\nimport { createReadStream } from 'fs';\n/**\n * Ported from {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc#L16-L59 github.com/google/crc32c}\n */\nconst CRC32C_EXTENSIONS = [\n 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c,\n 0x26a1e7e8, 0xd4ca64eb, 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b,\n 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, 0x105ec76f, 0xe235446c,\n 0xf165b798, 0x030e349b, 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384,\n 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54, 0x5d1d08bf, 0xaf768bbc,\n 0xbc267848, 0x4e4dfb4b, 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a,\n 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35, 0xaa64d611, 0x580f5512,\n 0x4b5fa6e6, 0xb93425e5, 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa,\n 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45, 0xf779deae, 0x05125dad,\n 0x1642ae59, 0xe4292d5a, 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a,\n 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595, 0x417b1dbc, 0xb3109ebf,\n 0xa0406d4b, 0x522bee48, 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957,\n 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687, 0x0c38d26c, 0xfe53516f,\n 0xed03a29b, 0x1f682198, 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927,\n 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38, 0xdbfc821c, 0x2997011f,\n 0x3ac7f2eb, 0xc8ac71e8, 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7,\n 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096, 0xa65c047d, 0x5437877e,\n 0x4767748a, 0xb50cf789, 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859,\n 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46, 0x7198540d, 0x83f3d70e,\n 0x90a324fa, 0x62c8a7f9, 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6,\n 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36, 0x3cdb9bdd, 0xceb018de,\n 0xdde0eb2a, 0x2f8b6829, 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c,\n 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93, 0x082f63b7, 0xfa44e0b4,\n 0xe9141340, 0x1b7f9043, 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c,\n 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3, 0x55326b08, 0xa759e80b,\n 0xb4091bff, 0x466298fc, 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c,\n 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033, 0xa24bb5a6, 0x502036a5,\n 0x4370c551, 0xb11b4652, 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d,\n 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d, 0xef087a76, 0x1d63f975,\n 0x0e330a81, 0xfc588982, 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d,\n 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622, 0x38cc2a06, 0xcaa7a905,\n 0xd9f75af1, 0x2b9cd9f2, 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed,\n 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530, 0x0417b1db, 0xf67c32d8,\n 0xe52cc12c, 0x1747422f, 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff,\n 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0, 0xd3d3e1ab, 0x21b862a8,\n 0x32e8915c, 0xc083125f, 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540,\n 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90, 0x9e902e7b, 0x6cfbad78,\n 0x7fab5e8c, 0x8dc0dd8f, 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee,\n 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1, 0x69e9f0d5, 0x9b8273d6,\n 0x88d28022, 0x7ab90321, 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e,\n 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81, 0x34f4f86a, 0xc69f7b69,\n 0xd5cf889d, 0x27a40b9e, 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e,\n 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351,\n];\nconst CRC32C_EXTENSION_TABLE = new Int32Array(CRC32C_EXTENSIONS);\nconst CRC32C_DEFAULT_VALIDATOR_GENERATOR = () => new CRC32C();\nconst CRC32C_EXCEPTION_MESSAGES = {\n INVALID_INIT_BASE64_RANGE: (l) => `base64-encoded data expected to equal 4 bytes, not ${l}`,\n INVALID_INIT_BUFFER_LENGTH: (l) => `Buffer expected to equal 4 bytes, not ${l}`,\n INVALID_INIT_INTEGER: (l) => `Number expected to be a safe, unsigned 32-bit integer, not ${l}`,\n};\nclass CRC32C {\n /**\n * Constructs a new `CRC32C` object.\n *\n * Reconstruction is recommended via the `CRC32C.from` static method.\n *\n * @param initialValue An initial CRC32C value - a signed 32-bit integer.\n */\n constructor(initialValue = 0) {\n /** Current CRC32C value */\n _CRC32C_crc32c.set(this, 0);\n __classPrivateFieldSet(this, _CRC32C_crc32c, initialValue, \"f\");\n }\n /**\n * Calculates a CRC32C from a provided buffer.\n *\n * Implementation inspired from:\n * - {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc github.com/google/crc32c}\n * - {@link https://github.com/googleapis/python-crc32c/blob/a595e758c08df445a99c3bf132ee8e80a3ec4308/src/google_crc32c/python.py github.com/googleapis/python-crc32c}\n * - {@link https://github.com/googleapis/java-storage/pull/1376/files github.com/googleapis/java-storage}\n *\n * @param data The `Buffer` to generate the CRC32C from\n */\n update(data) {\n let current = __classPrivateFieldGet(this, _CRC32C_crc32c, \"f\") ^ 0xffffffff;\n for (const d of data) {\n const tablePoly = CRC32C.CRC32C_EXTENSION_TABLE[(d ^ current) & 0xff];\n current = tablePoly ^ (current >>> 8);\n }\n __classPrivateFieldSet(this, _CRC32C_crc32c, current ^ 0xffffffff, \"f\");\n }\n /**\n * Validates a provided input to the current CRC32C value.\n *\n * @param input A Buffer, `CRC32C`-compatible object, base64-encoded data (string), or signed 32-bit integer\n */\n validate(input) {\n if (typeof input === 'number') {\n return input === __classPrivateFieldGet(this, _CRC32C_crc32c, \"f\");\n }\n else if (typeof input === 'string') {\n return input === this.toString();\n }\n else if (Buffer.isBuffer(input)) {\n return Buffer.compare(input, this.toBuffer()) === 0;\n }\n else {\n // `CRC32C`-like object\n return input.toString() === this.toString();\n }\n }\n /**\n * Returns a `Buffer` representation of the CRC32C value\n */\n toBuffer() {\n const buffer = Buffer.alloc(4);\n buffer.writeInt32BE(__classPrivateFieldGet(this, _CRC32C_crc32c, \"f\"));\n return buffer;\n }\n /**\n * Returns a JSON-compatible, base64-encoded representation of the CRC32C value.\n *\n * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify `JSON#stringify`}\n */\n toJSON() {\n return this.toString();\n }\n /**\n * Returns a base64-encoded representation of the CRC32C value.\n *\n * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString `Object#toString`}\n */\n toString() {\n return this.toBuffer().toString('base64');\n }\n /**\n * Returns the `number` representation of the CRC32C value as a signed 32-bit integer\n *\n * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf `Object#valueOf`}\n */\n valueOf() {\n return __classPrivateFieldGet(this, _CRC32C_crc32c, \"f\");\n }\n /**\n * Generates a `CRC32C` from a compatible buffer format.\n *\n * @param value 4-byte `ArrayBufferView`/`Buffer`/`TypedArray`\n */\n static fromBuffer(value) {\n let buffer;\n if (Buffer.isBuffer(value)) {\n buffer = value;\n }\n else if ('buffer' in value) {\n // `ArrayBufferView`\n buffer = Buffer.from(value.buffer);\n }\n else {\n // `ArrayBuffer`\n buffer = Buffer.from(value);\n }\n if (buffer.byteLength !== 4) {\n throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BUFFER_LENGTH(buffer.byteLength));\n }\n return new CRC32C(buffer.readInt32BE());\n }\n static async fromFile(file) {\n const crc32c = new CRC32C();\n await new Promise((resolve, reject) => {\n createReadStream(file)\n .on('data', (d) => {\n if (typeof d === 'string') {\n crc32c.update(Buffer.from(d));\n }\n else {\n crc32c.update(d);\n }\n })\n .on('end', () => resolve())\n .on('error', reject);\n });\n return crc32c;\n }\n /**\n * Generates a `CRC32C` from 4-byte base64-encoded data (string).\n *\n * @param value 4-byte base64-encoded data (string)\n */\n static fromString(value) {\n const buffer = Buffer.from(value, 'base64');\n if (buffer.byteLength !== 4) {\n throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BASE64_RANGE(buffer.byteLength));\n }\n return this.fromBuffer(buffer);\n }\n /**\n * Generates a `CRC32C` from a safe, unsigned 32-bit integer.\n *\n * @param value an unsigned 32-bit integer\n */\n static fromNumber(value) {\n if (!Number.isSafeInteger(value) || value > 2 ** 32 || value < -(2 ** 32)) {\n throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_INTEGER(value));\n }\n return new CRC32C(value);\n }\n /**\n * Generates a `CRC32C` from a variety of compatable types.\n * Note: strings are treated as input, not as file paths to read from.\n *\n * @param value A number, 4-byte `ArrayBufferView`/`Buffer`/`TypedArray`, or 4-byte base64-encoded data (string)\n */\n static from(value) {\n if (typeof value === 'number') {\n return this.fromNumber(value);\n }\n else if (typeof value === 'string') {\n return this.fromString(value);\n }\n else if ('byteLength' in value) {\n // `ArrayBuffer` | `Buffer` | `ArrayBufferView`\n return this.fromBuffer(value);\n }\n else {\n // `CRC32CValidator`/`CRC32C`-like\n return this.fromString(value.toString());\n }\n }\n}\n_CRC32C_crc32c = new WeakMap();\nCRC32C.CRC32C_EXTENSIONS = CRC32C_EXTENSIONS;\nCRC32C.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE;\nexport { CRC32C, CRC32C_DEFAULT_VALIDATOR_GENERATOR, CRC32C_EXCEPTION_MESSAGES, CRC32C_EXTENSIONS, CRC32C_EXTENSION_TABLE, };\n","// Copyright 2022 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n 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\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n 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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _HashStreamValidator_crc32cHash, _HashStreamValidator_md5Hash, _HashStreamValidator_md5Digest;\nimport { createHash } from 'crypto';\nimport { Transform } from 'stream';\nimport { CRC32C_DEFAULT_VALIDATOR_GENERATOR, } from './crc32c.js';\nimport { FileExceptionMessages, RequestError } from './file.js';\nclass HashStreamValidator extends Transform {\n constructor(options = {}) {\n super();\n this.updateHashesOnly = false;\n _HashStreamValidator_crc32cHash.set(this, undefined);\n _HashStreamValidator_md5Hash.set(this, undefined);\n _HashStreamValidator_md5Digest.set(this, '');\n this.crc32cEnabled = !!options.crc32c;\n this.md5Enabled = !!options.md5;\n this.updateHashesOnly = !!options.updateHashesOnly;\n this.crc32cExpected = options.crc32cExpected;\n this.md5Expected = options.md5Expected;\n if (this.crc32cEnabled) {\n if (options.crc32cInstance) {\n __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, options.crc32cInstance, \"f\");\n }\n else {\n const crc32cGenerator = options.crc32cGenerator || CRC32C_DEFAULT_VALIDATOR_GENERATOR;\n __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, crc32cGenerator(), \"f\");\n }\n }\n if (this.md5Enabled) {\n __classPrivateFieldSet(this, _HashStreamValidator_md5Hash, createHash('md5'), \"f\");\n }\n }\n /**\n * Return the current CRC32C value, if available.\n */\n get crc32c() {\n var _a;\n return (_a = __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, \"f\")) === null || _a === void 0 ? void 0 : _a.toString();\n }\n /**\n * Return the calculated MD5 value, if available.\n */\n get md5Digest() {\n if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, \"f\") && !__classPrivateFieldGet(this, _HashStreamValidator_md5Digest, \"f\")) {\n __classPrivateFieldSet(this, _HashStreamValidator_md5Digest, __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, \"f\").digest('base64'), \"f\");\n }\n return __classPrivateFieldGet(this, _HashStreamValidator_md5Digest, \"f\");\n }\n _flush(callback) {\n // Triggers the getter logic to finalize and cache the MD5 digest\n this.md5Digest;\n if (this.updateHashesOnly) {\n callback();\n return;\n }\n // If we're doing validation, assume the worst-- a data integrity\n // mismatch. If not, these tests won't be performed, and we can assume\n // the best.\n // We must check if the server decompressed the data on serve because hash\n // validation is not possible in this case.\n let failed = this.crc32cEnabled || this.md5Enabled;\n if (this.crc32cEnabled && this.crc32cExpected) {\n failed = !this.test('crc32c', this.crc32cExpected);\n }\n if (this.md5Enabled && this.md5Expected) {\n failed = !this.test('md5', this.md5Expected);\n }\n if (failed) {\n const mismatchError = new RequestError(FileExceptionMessages.DOWNLOAD_MISMATCH);\n mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH';\n callback(mismatchError);\n }\n else {\n callback();\n }\n }\n _transform(chunk, encoding, callback) {\n this.push(chunk, encoding);\n try {\n if (__classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, \"f\"))\n __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, \"f\").update(chunk);\n if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, \"f\"))\n __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, \"f\").update(chunk);\n callback();\n }\n catch (e) {\n callback(e);\n }\n }\n test(hash, sum) {\n const check = Buffer.isBuffer(sum) ? sum.toString('base64') : sum;\n if (hash === 'crc32c' && __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, \"f\")) {\n return __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, \"f\").validate(check);\n }\n if (hash === 'md5' && __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, \"f\")) {\n return __classPrivateFieldGet(this, _HashStreamValidator_md5Digest, \"f\") === check;\n }\n return false;\n }\n}\n_HashStreamValidator_crc32cHash = new WeakMap(), _HashStreamValidator_md5Hash = new WeakMap(), _HashStreamValidator_md5Digest = new WeakMap();\nexport { HashStreamValidator };\n","// Copyright 2022 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n 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\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n 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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _Upload_instances, _Upload_hashValidator, _Upload_clientCrc32c, _Upload_clientMd5Hash, _Upload_gcclGcsCmd, _Upload_resetLocalBuffersCache, _Upload_addLocalBufferCache, _Upload_validateChecksum, _Upload_applyChecksumHeaders;\nimport AbortController from 'abort-controller';\nimport { createHash } from 'crypto';\nimport * as gaxios from 'gaxios';\nimport { DEFAULT_UNIVERSE, GoogleAuth, } from 'google-auth-library';\nimport { Readable, Writable } from 'stream';\nimport AsyncRetry from 'async-retry';\nimport * as crypto from 'crypto';\nimport { getRuntimeTrackingString, getModuleFormat, getUserAgentString, } from './util.js';\nimport { GCCL_GCS_CMD_KEY } from './nodejs-common/util.js';\nimport { FileExceptionMessages, RequestError } from './file.js';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { getPackageJSON } from './package-json-helper.cjs';\nimport { HashStreamValidator } from './hash-stream-validator.js';\nconst NOT_FOUND_STATUS_CODE = 404;\nconst RESUMABLE_INCOMPLETE_STATUS_CODE = 308;\nconst packageJson = getPackageJSON();\nexport const PROTOCOL_REGEX = /^(\\w*):\\/\\//;\nexport class Upload extends Writable {\n constructor(cfg) {\n var _a;\n super(cfg);\n _Upload_instances.add(this);\n this.numBytesWritten = 0;\n this.numRetries = 0;\n this.currentInvocationId = {\n checkUploadStatus: crypto.randomUUID(),\n chunk: crypto.randomUUID(),\n uri: crypto.randomUUID(),\n };\n /**\n * A cache of buffers written to this instance, ready for consuming\n */\n this.writeBuffers = [];\n this.numChunksReadInRequest = 0;\n _Upload_hashValidator.set(this, void 0);\n _Upload_clientCrc32c.set(this, void 0);\n _Upload_clientMd5Hash.set(this, void 0);\n /**\n * An array of buffers used for caching the most recent upload chunk.\n * We should not assume that the server received all bytes sent in the request.\n * - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload\n */\n this.localWriteCache = [];\n this.localWriteCacheByteLength = 0;\n this.upstreamEnded = false;\n _Upload_gcclGcsCmd.set(this, void 0);\n cfg = cfg || {};\n if (!cfg.bucket || !cfg.file) {\n throw new Error('A bucket and file name are required');\n }\n if (cfg.offset && !cfg.uri) {\n throw new RangeError('Cannot provide an `offset` without providing a `uri`');\n }\n if (cfg.isPartialUpload && !cfg.chunkSize) {\n throw new RangeError('Cannot set `isPartialUpload` without providing a `chunkSize`');\n }\n cfg.authConfig = cfg.authConfig || {};\n cfg.authConfig.scopes = [\n 'https://www.googleapis.com/auth/devstorage.full_control',\n ];\n this.authClient = cfg.authClient || new GoogleAuth(cfg.authConfig);\n const universe = cfg.universeDomain || DEFAULT_UNIVERSE;\n this.apiEndpoint = `https://storage.${universe}`;\n if (cfg.apiEndpoint && cfg.apiEndpoint !== this.apiEndpoint) {\n this.apiEndpoint = this.sanitizeEndpoint(cfg.apiEndpoint);\n const hostname = new URL(this.apiEndpoint).hostname;\n // check if it is a domain of a known universe\n const isDomain = hostname === universe;\n const isDefaultUniverseDomain = hostname === DEFAULT_UNIVERSE;\n // check if it is a subdomain of a known universe\n // by checking a last (universe's length + 1) of a hostname\n const isSubDomainOfUniverse = hostname.slice(-(universe.length + 1)) === `.${universe}`;\n const isSubDomainOfDefaultUniverse = hostname.slice(-(DEFAULT_UNIVERSE.length + 1)) ===\n `.${DEFAULT_UNIVERSE}`;\n if (!isDomain &&\n !isDefaultUniverseDomain &&\n !isSubDomainOfUniverse &&\n !isSubDomainOfDefaultUniverse) {\n // Check if we should use auth with custom endpoint\n if (cfg.useAuthWithCustomEndpoint !== true) {\n // Only bypass auth if explicitly not requested\n this.authClient = gaxios;\n }\n // Otherwise keep the authenticated client\n }\n }\n this.baseURI = `${this.apiEndpoint}/upload/storage/v1/b`;\n this.bucket = cfg.bucket;\n const cacheKeyElements = [cfg.bucket, cfg.file];\n if (typeof cfg.generation === 'number') {\n cacheKeyElements.push(`${cfg.generation}`);\n }\n this.cacheKey = cacheKeyElements.join('/');\n this.customRequestOptions = cfg.customRequestOptions || {};\n this.file = cfg.file;\n this.generation = cfg.generation;\n this.kmsKeyName = cfg.kmsKeyName;\n this.metadata = cfg.metadata || {};\n this.offset = cfg.offset;\n this.origin = cfg.origin;\n this.params = cfg.params || {};\n this.userProject = cfg.userProject;\n this.chunkSize = cfg.chunkSize;\n this.retryOptions = cfg.retryOptions;\n this.isPartialUpload = (_a = cfg.isPartialUpload) !== null && _a !== void 0 ? _a : false;\n __classPrivateFieldSet(this, _Upload_clientCrc32c, cfg.clientCrc32c, \"f\");\n __classPrivateFieldSet(this, _Upload_clientMd5Hash, cfg.clientMd5Hash, \"f\");\n const calculateCrc32c = !cfg.clientCrc32c && cfg.crc32c;\n const calculateMd5 = !cfg.clientMd5Hash && cfg.md5;\n if (calculateCrc32c || calculateMd5) {\n __classPrivateFieldSet(this, _Upload_hashValidator, new HashStreamValidator({\n crc32c: calculateCrc32c,\n md5: calculateMd5,\n updateHashesOnly: true,\n }), \"f\");\n }\n if (cfg.key) {\n if (typeof cfg.key === 'string') {\n const base64Key = Buffer.from(cfg.key).toString('base64');\n this.encryption = {\n key: base64Key,\n hash: createHash('sha256').update(cfg.key).digest('base64'),\n };\n }\n else {\n const base64Key = cfg.key.toString('base64');\n this.encryption = {\n key: base64Key,\n hash: createHash('sha256').update(cfg.key).digest('base64'),\n };\n }\n }\n this.predefinedAcl = cfg.predefinedAcl;\n if (cfg.private)\n this.predefinedAcl = 'private';\n if (cfg.public)\n this.predefinedAcl = 'publicRead';\n const autoRetry = cfg.retryOptions.autoRetry;\n this.uriProvidedManually = !!cfg.uri;\n this.uri = cfg.uri;\n if (this.offset) {\n // we're resuming an incomplete upload\n this.numBytesWritten = this.offset;\n }\n this.numRetries = 0; // counter for number of retries currently executed\n if (!autoRetry) {\n cfg.retryOptions.maxRetries = 0;\n }\n this.timeOfFirstRequest = Date.now();\n const contentLength = cfg.metadata\n ? Number(cfg.metadata.contentLength)\n : NaN;\n this.contentLength = isNaN(contentLength) ? '*' : contentLength;\n __classPrivateFieldSet(this, _Upload_gcclGcsCmd, cfg[GCCL_GCS_CMD_KEY], \"f\");\n this.once('writing', () => {\n if (this.uri) {\n this.continueUploading();\n }\n else {\n this.createURI(err => {\n if (err) {\n return this.destroy(err);\n }\n this.startUploading();\n return;\n });\n }\n });\n }\n /**\n * Prevent 'finish' event until the upload has succeeded.\n *\n * @param fireFinishEvent The finish callback\n */\n _final(fireFinishEvent = () => { }) {\n this.upstreamEnded = true;\n this.once('uploadFinished', fireFinishEvent);\n process.nextTick(() => {\n this.emit('upstreamFinished');\n // it's possible `_write` may not be called - namely for empty object uploads\n this.emit('writing');\n });\n }\n /**\n * Handles incoming data from upstream\n *\n * @param chunk The chunk to append to the buffer\n * @param encoding The encoding of the chunk\n * @param readCallback A callback for when the buffer has been read downstream\n */\n _write(chunk, encoding, readCallback = () => { }) {\n // Backwards-compatible event\n this.emit('writing');\n const bufferChunk = typeof chunk === 'string' ? Buffer.from(chunk, encoding) : chunk;\n if (__classPrivateFieldGet(this, _Upload_hashValidator, \"f\")) {\n try {\n __classPrivateFieldGet(this, _Upload_hashValidator, \"f\").write(bufferChunk);\n }\n catch (e) {\n this.destroy(e);\n return;\n }\n }\n this.writeBuffers.push(bufferChunk);\n this.once('readFromChunkBuffer', readCallback);\n process.nextTick(() => this.emit('wroteToChunkBuffer'));\n }\n /**\n * Prepends the local buffer to write buffer and resets it.\n *\n * @param keepLastBytes number of bytes to keep from the end of the local buffer.\n */\n prependLocalBufferToUpstream(keepLastBytes) {\n // Typically, the upstream write buffers should be smaller than the local\n // cache, so we can save time by setting the local cache as the new\n // upstream write buffer array and appending the old array to it\n let initialBuffers = [];\n if (keepLastBytes) {\n // we only want the last X bytes\n let bytesKept = 0;\n while (keepLastBytes > bytesKept) {\n // load backwards because we want the last X bytes\n // note: `localWriteCacheByteLength` is reset below\n let buf = this.localWriteCache.pop();\n if (!buf)\n break;\n bytesKept += buf.byteLength;\n if (bytesKept > keepLastBytes) {\n // we have gone over the amount desired, let's keep the last X bytes\n // of this buffer\n const diff = bytesKept - keepLastBytes;\n buf = buf.subarray(diff);\n bytesKept -= diff;\n }\n initialBuffers.unshift(buf);\n }\n }\n else {\n // we're keeping all of the local cache, simply use it as the initial buffer\n initialBuffers = this.localWriteCache;\n }\n // Append the old upstream to the new\n const append = this.writeBuffers;\n this.writeBuffers = initialBuffers;\n for (const buf of append) {\n this.writeBuffers.push(buf);\n }\n // reset last buffers sent\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_resetLocalBuffersCache).call(this);\n }\n /**\n * Retrieves data from upstream's buffer.\n *\n * @param limit The maximum amount to return from the buffer.\n */\n *pullFromChunkBuffer(limit) {\n while (limit) {\n const buf = this.writeBuffers.shift();\n if (!buf)\n break;\n let bufToYield = buf;\n if (buf.byteLength > limit) {\n bufToYield = buf.subarray(0, limit);\n this.writeBuffers.unshift(buf.subarray(limit));\n limit = 0;\n }\n else {\n limit -= buf.byteLength;\n }\n yield bufToYield;\n // Notify upstream we've read from the buffer and we're able to consume\n // more. It can also potentially send more data down as we're currently\n // iterating.\n this.emit('readFromChunkBuffer');\n }\n }\n /**\n * A handler for determining if data is ready to be read from upstream.\n *\n * @returns If there will be more chunks to read in the future\n */\n async waitForNextChunk() {\n const willBeMoreChunks = await new Promise(resolve => {\n // There's data available - it should be digested\n if (this.writeBuffers.length) {\n return resolve(true);\n }\n // The upstream writable ended, we shouldn't expect any more data.\n if (this.upstreamEnded) {\n return resolve(false);\n }\n // Nothing immediate seems to be determined. We need to prepare some\n // listeners to determine next steps...\n const wroteToChunkBufferCallback = () => {\n removeListeners();\n return resolve(true);\n };\n const upstreamFinishedCallback = () => {\n removeListeners();\n // this should be the last chunk, if there's anything there\n if (this.writeBuffers.length)\n return resolve(true);\n return resolve(false);\n };\n // Remove listeners when we're ready to callback.\n const removeListeners = () => {\n this.removeListener('wroteToChunkBuffer', wroteToChunkBufferCallback);\n this.removeListener('upstreamFinished', upstreamFinishedCallback);\n };\n // If there's data recently written it should be digested\n this.once('wroteToChunkBuffer', wroteToChunkBufferCallback);\n // If the upstream finishes let's see if there's anything to grab\n this.once('upstreamFinished', upstreamFinishedCallback);\n });\n return willBeMoreChunks;\n }\n /**\n * Reads data from upstream up to the provided `limit`.\n * Ends when the limit has reached or no data is expected to be pushed from upstream.\n *\n * @param limit The most amount of data this iterator should return. `Infinity` by default.\n */\n async *upstreamIterator(limit = Infinity) {\n // read from upstream chunk buffer\n while (limit && (await this.waitForNextChunk())) {\n // read until end or limit has been reached\n for (const chunk of this.pullFromChunkBuffer(limit)) {\n limit -= chunk.byteLength;\n yield chunk;\n }\n }\n }\n createURI(callback) {\n if (!callback) {\n return this.createURIAsync();\n }\n this.createURIAsync().then(r => callback(null, r), callback);\n }\n async createURIAsync() {\n const metadata = { ...this.metadata };\n const headers = {};\n // Delete content length and content type from metadata if they exist.\n // These are headers and should not be sent as part of the metadata.\n if (metadata.contentLength) {\n headers['X-Upload-Content-Length'] = metadata.contentLength.toString();\n delete metadata.contentLength;\n }\n if (metadata.contentType) {\n headers['X-Upload-Content-Type'] = metadata.contentType;\n delete metadata.contentType;\n }\n let googAPIClient = `${getRuntimeTrackingString()} gccl/${packageJson.version}-${getModuleFormat()} gccl-invocation-id/${this.currentInvocationId.uri}`;\n if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, \"f\")) {\n googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, \"f\")}`;\n }\n // Check if headers already exist before creating new ones\n const reqOpts = {\n method: 'POST',\n url: [this.baseURI, this.bucket, 'o'].join('/'),\n params: Object.assign({\n name: this.file,\n uploadType: 'resumable',\n }, this.params),\n data: metadata,\n headers: {\n 'User-Agent': getUserAgentString(),\n 'x-goog-api-client': googAPIClient,\n ...headers,\n },\n };\n if (metadata.contentLength) {\n reqOpts.headers['X-Upload-Content-Length'] =\n metadata.contentLength.toString();\n }\n if (metadata.contentType) {\n reqOpts.headers['X-Upload-Content-Type'] = metadata.contentType;\n }\n if (typeof this.generation !== 'undefined') {\n reqOpts.params.ifGenerationMatch = this.generation;\n }\n if (this.kmsKeyName) {\n reqOpts.params.kmsKeyName = this.kmsKeyName;\n }\n if (this.predefinedAcl) {\n reqOpts.params.predefinedAcl = this.predefinedAcl;\n }\n if (this.origin) {\n reqOpts.headers.Origin = this.origin;\n }\n const uri = await AsyncRetry(async (bail) => {\n var _a, _b, _c;\n try {\n const res = await this.makeRequest(reqOpts);\n // We have successfully got a URI we can now create a new invocation id\n this.currentInvocationId.uri = crypto.randomUUID();\n return res.headers.location;\n }\n catch (err) {\n const e = err;\n const apiError = {\n code: (_a = e.response) === null || _a === void 0 ? void 0 : _a.status,\n name: (_b = e.response) === null || _b === void 0 ? void 0 : _b.statusText,\n message: (_c = e.response) === null || _c === void 0 ? void 0 : _c.statusText,\n errors: [\n {\n reason: e.code,\n },\n ],\n };\n if (this.retryOptions.maxRetries > 0 &&\n this.retryOptions.retryableErrorFn(apiError)) {\n throw e;\n }\n else {\n return bail(e);\n }\n }\n }, {\n retries: this.retryOptions.maxRetries,\n factor: this.retryOptions.retryDelayMultiplier,\n maxTimeout: this.retryOptions.maxRetryDelay * 1000, //convert to milliseconds\n maxRetryTime: this.retryOptions.totalTimeout * 1000, //convert to milliseconds\n });\n this.uri = uri;\n this.offset = 0;\n // emit the newly generated URI for future reuse, if necessary.\n this.emit('uri', uri);\n return uri;\n }\n async continueUploading() {\n var _a;\n (_a = this.offset) !== null && _a !== void 0 ? _a : (await this.getAndSetOffset());\n return this.startUploading();\n }\n async startUploading() {\n const multiChunkMode = !!this.chunkSize;\n let responseReceived = false;\n this.numChunksReadInRequest = 0;\n if (!this.offset) {\n this.offset = 0;\n }\n // Check if the offset (server) is too far behind the current stream\n if (this.offset < this.numBytesWritten) {\n const delta = this.numBytesWritten - this.offset;\n const message = `The offset is lower than the number of bytes written. The server has ${this.offset} bytes and while ${this.numBytesWritten} bytes has been uploaded - thus ${delta} bytes are missing. Stopping as this could result in data loss. Initiate a new upload to continue.`;\n this.emit('error', new RangeError(message));\n return;\n }\n // Check if we should 'fast-forward' to the relevant data to upload\n if (this.numBytesWritten < this.offset) {\n // 'fast-forward' to the byte where we need to upload.\n // only push data from the byte after the one we left off on\n const fastForwardBytes = this.offset - this.numBytesWritten;\n for await (const _chunk of this.upstreamIterator(fastForwardBytes)) {\n _chunk; // discard the data up until the point we want\n }\n this.numBytesWritten = this.offset;\n }\n let expectedUploadSize = undefined;\n // Set `expectedUploadSize` to `contentLength - this.numBytesWritten`, if available\n if (typeof this.contentLength === 'number') {\n expectedUploadSize = this.contentLength - this.numBytesWritten;\n }\n // `expectedUploadSize` should be no more than the `chunkSize`.\n // It's possible this is the last chunk request for a multiple\n // chunk upload, thus smaller than the chunk size.\n if (this.chunkSize) {\n expectedUploadSize = expectedUploadSize\n ? Math.min(this.chunkSize, expectedUploadSize)\n : this.chunkSize;\n }\n // A queue for the upstream data\n const upstreamQueue = this.upstreamIterator(expectedUploadSize);\n // The primary read stream for this request. This stream retrieves no more\n // than the exact requested amount from upstream.\n const requestStream = new Readable({\n read: async () => {\n // Don't attempt to retrieve data upstream if we already have a response\n if (responseReceived)\n requestStream.push(null);\n const result = await upstreamQueue.next();\n if (result.value) {\n this.numChunksReadInRequest++;\n if (multiChunkMode) {\n // save ever buffer used in the request in multi-chunk mode\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_addLocalBufferCache).call(this, result.value);\n }\n else {\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_resetLocalBuffersCache).call(this);\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_addLocalBufferCache).call(this, result.value);\n }\n this.numBytesWritten += result.value.byteLength;\n this.emit('progress', {\n bytesWritten: this.numBytesWritten,\n contentLength: this.contentLength,\n });\n requestStream.push(result.value);\n }\n if (result.done) {\n requestStream.push(null);\n }\n },\n });\n let googAPIClient = `${getRuntimeTrackingString()} gccl/${packageJson.version}-${getModuleFormat()} gccl-invocation-id/${this.currentInvocationId.chunk}`;\n if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, \"f\")) {\n googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, \"f\")}`;\n }\n const headers = {\n 'User-Agent': getUserAgentString(),\n 'x-goog-api-client': googAPIClient,\n };\n // If using multiple chunk upload, set appropriate header\n if (multiChunkMode) {\n // We need to know how much data is available upstream to set the `Content-Range` header.\n // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload\n for await (const chunk of this.upstreamIterator(expectedUploadSize)) {\n // This will conveniently track and keep the size of the buffers.\n // We will reach either the expected upload size or the remainder of the stream.\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_addLocalBufferCache).call(this, chunk);\n }\n // This is the sum from the `#addLocalBufferCache` calls\n const bytesToUpload = this.localWriteCacheByteLength;\n // Important: we want to know if the upstream has ended and the queue is empty before\n // unshifting data back into the queue. This way we will know if this is the last request or not.\n const isLastChunkOfUpload = !(await this.waitForNextChunk());\n if (isLastChunkOfUpload && __classPrivateFieldGet(this, _Upload_hashValidator, \"f\")) {\n __classPrivateFieldGet(this, _Upload_hashValidator, \"f\").end();\n }\n // Important: put the data back in the queue for the actual upload\n this.prependLocalBufferToUpstream();\n let totalObjectSize = this.contentLength;\n if (typeof this.contentLength !== 'number' &&\n isLastChunkOfUpload &&\n !this.isPartialUpload) {\n // Let's let the server know this is the last chunk of the object since we didn't set it before.\n totalObjectSize = bytesToUpload + this.numBytesWritten;\n }\n // `- 1` as the ending byte is inclusive in the request.\n const endingByte = bytesToUpload + this.numBytesWritten - 1;\n // `Content-Length` for multiple chunk uploads is the size of the chunk,\n // not the overall object\n headers['Content-Length'] = bytesToUpload;\n headers['Content-Range'] =\n `bytes ${this.offset}-${endingByte}/${totalObjectSize}`;\n // Apply X-Goog-Hash header ONLY on the final chunk (WriteObject call)\n if (isLastChunkOfUpload) {\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_applyChecksumHeaders).call(this, headers);\n }\n }\n else {\n headers['Content-Range'] = `bytes ${this.offset}-*/${this.contentLength}`;\n if (__classPrivateFieldGet(this, _Upload_hashValidator, \"f\")) {\n __classPrivateFieldGet(this, _Upload_hashValidator, \"f\").end();\n }\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_applyChecksumHeaders).call(this, headers);\n }\n const reqOpts = {\n method: 'PUT',\n url: this.uri,\n headers,\n body: requestStream,\n };\n try {\n const resp = await this.makeRequestStream(reqOpts);\n if (resp) {\n responseReceived = true;\n await this.responseHandler(resp);\n }\n }\n catch (e) {\n const err = e;\n if (this.retryOptions.retryableErrorFn(err)) {\n this.attemptDelayedRetry({\n status: NaN,\n data: err,\n });\n return;\n }\n this.destroy(err);\n }\n }\n // Process the API response to look for errors that came in\n // the response body.\n async responseHandler(resp) {\n var _a, _b;\n if (resp.data.error) {\n this.destroy(resp.data.error);\n return;\n }\n // At this point we can safely create a new id for the chunk\n this.currentInvocationId.chunk = crypto.randomUUID();\n const moreDataToUpload = await this.waitForNextChunk();\n const shouldContinueWithNextMultiChunkRequest = this.chunkSize &&\n resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE &&\n resp.headers.range &&\n moreDataToUpload;\n /**\n * This is true when we're expecting to upload more data in a future request,\n * yet the upstream for the upload session has been exhausted.\n */\n const shouldContinueUploadInAnotherRequest = this.isPartialUpload &&\n resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE &&\n !moreDataToUpload;\n if (shouldContinueWithNextMultiChunkRequest) {\n // Use the upper value in this header to determine where to start the next chunk.\n // We should not assume that the server received all bytes sent in the request.\n // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload\n const range = resp.headers.range;\n this.offset = Number(range.split('-')[1]) + 1;\n // We should not assume that the server received all bytes sent in the request.\n // - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload\n const missingBytes = this.numBytesWritten - this.offset;\n if (missingBytes) {\n // As multi-chunk uploads send one chunk per request and pulls one\n // chunk into the pipeline, prepending the missing bytes back should\n // be fine for the next request.\n this.prependLocalBufferToUpstream(missingBytes);\n this.numBytesWritten -= missingBytes;\n }\n else {\n // No bytes missing - no need to keep the local cache\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_resetLocalBuffersCache).call(this);\n }\n // continue uploading next chunk\n this.continueUploading();\n }\n else if (!this.isSuccessfulResponse(resp.status) &&\n !shouldContinueUploadInAnotherRequest) {\n const err = new Error('Upload failed');\n err.code = resp.status;\n err.name = 'Upload failed';\n if (resp === null || resp === void 0 ? void 0 : resp.data) {\n err.errors = [resp === null || resp === void 0 ? void 0 : resp.data];\n }\n this.destroy(err);\n }\n else if (this.isSuccessfulResponse(resp.status)) {\n const serverCrc32c = resp.data.crc32c;\n const serverMd5 = resp.data.md5Hash;\n if (__classPrivateFieldGet(this, _Upload_hashValidator, \"f\")) {\n __classPrivateFieldGet(this, _Upload_hashValidator, \"f\").end();\n }\n const clientCrc32cToValidate = ((_a = __classPrivateFieldGet(this, _Upload_hashValidator, \"f\")) === null || _a === void 0 ? void 0 : _a.crc32c) || __classPrivateFieldGet(this, _Upload_clientCrc32c, \"f\");\n const clientMd5HashToValidate = ((_b = __classPrivateFieldGet(this, _Upload_hashValidator, \"f\")) === null || _b === void 0 ? void 0 : _b.md5Digest) || __classPrivateFieldGet(this, _Upload_clientMd5Hash, \"f\");\n if (__classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_validateChecksum).call(this, clientCrc32cToValidate, serverCrc32c, 'CRC32C') ||\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_validateChecksum).call(this, clientMd5HashToValidate, serverMd5, 'MD5')) {\n return;\n }\n // no need to keep the cache\n __classPrivateFieldGet(this, _Upload_instances, \"m\", _Upload_resetLocalBuffersCache).call(this);\n if (resp && resp.data) {\n resp.data.size = Number(resp.data.size);\n }\n this.emit('metadata', resp.data);\n // Allow the object (Upload) to continue naturally so the user's\n // \"finish\" event fires.\n this.emit('uploadFinished');\n }\n else {\n // Handles the case where shouldContinueUploadInAnotherRequest is true\n // and the response is not successful (e.g., 308 for a partial upload).\n // This is the expected behavior for partial uploads that have finished their chunk.\n this.emit('uploadFinished');\n }\n }\n /**\n * Check the status of an existing resumable upload.\n *\n * @param cfg A configuration to use. `uri` is required.\n * @returns the current upload status\n */\n async checkUploadStatus(config = {}) {\n let googAPIClient = `${getRuntimeTrackingString()} gccl/${packageJson.version}-${getModuleFormat()} gccl-invocation-id/${this.currentInvocationId.checkUploadStatus}`;\n if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, \"f\")) {\n googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, \"f\")}`;\n }\n const opts = {\n method: 'PUT',\n url: this.uri,\n headers: {\n 'Content-Length': 0,\n 'Content-Range': 'bytes */*',\n 'User-Agent': getUserAgentString(),\n 'x-goog-api-client': googAPIClient,\n },\n };\n try {\n const resp = await this.makeRequest(opts);\n // Successfully got the offset we can now create a new offset invocation id\n this.currentInvocationId.checkUploadStatus = crypto.randomUUID();\n return resp;\n }\n catch (e) {\n if (config.retry === false ||\n !(e instanceof Error) ||\n !this.retryOptions.retryableErrorFn(e)) {\n throw e;\n }\n const retryDelay = this.getRetryDelay();\n if (retryDelay <= 0) {\n throw e;\n }\n await new Promise(res => setTimeout(res, retryDelay));\n return this.checkUploadStatus(config);\n }\n }\n async getAndSetOffset() {\n try {\n // we want to handle retries in this method.\n const resp = await this.checkUploadStatus({ retry: false });\n if (resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE) {\n if (typeof resp.headers.range === 'string') {\n this.offset = Number(resp.headers.range.split('-')[1]) + 1;\n return;\n }\n }\n this.offset = 0;\n }\n catch (e) {\n const err = e;\n if (this.retryOptions.retryableErrorFn(err)) {\n this.attemptDelayedRetry({\n status: NaN,\n data: err,\n });\n return;\n }\n this.destroy(err);\n }\n }\n async makeRequest(reqOpts) {\n if (this.encryption) {\n reqOpts.headers = reqOpts.headers || {};\n reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256';\n reqOpts.headers['x-goog-encryption-key'] = this.encryption.key.toString();\n reqOpts.headers['x-goog-encryption-key-sha256'] =\n this.encryption.hash.toString();\n }\n if (this.userProject) {\n reqOpts.params = reqOpts.params || {};\n reqOpts.params.userProject = this.userProject;\n }\n // Let gaxios know we will handle a 308 error code ourselves.\n reqOpts.validateStatus = (status) => {\n return (this.isSuccessfulResponse(status) ||\n status === RESUMABLE_INCOMPLETE_STATUS_CODE);\n };\n const combinedReqOpts = {\n ...this.customRequestOptions,\n ...reqOpts,\n headers: {\n ...this.customRequestOptions.headers,\n ...reqOpts.headers,\n },\n };\n const res = await this.authClient.request(combinedReqOpts);\n if (res.data && res.data.error) {\n throw res.data.error;\n }\n return res;\n }\n async makeRequestStream(reqOpts) {\n const controller = new AbortController();\n const errorCallback = () => controller.abort();\n this.once('error', errorCallback);\n if (this.userProject) {\n reqOpts.params = reqOpts.params || {};\n reqOpts.params.userProject = this.userProject;\n }\n reqOpts.signal = controller.signal;\n reqOpts.validateStatus = () => true;\n const combinedReqOpts = {\n ...this.customRequestOptions,\n ...reqOpts,\n headers: {\n ...this.customRequestOptions.headers,\n ...reqOpts.headers,\n },\n };\n const res = await this.authClient.request(combinedReqOpts);\n const successfulRequest = this.onResponse(res);\n this.removeListener('error', errorCallback);\n return successfulRequest ? res : null;\n }\n /**\n * @return {bool} is the request good?\n */\n onResponse(resp) {\n if (resp.status !== 200 &&\n this.retryOptions.retryableErrorFn({\n code: resp.status,\n message: resp.statusText,\n name: resp.statusText,\n })) {\n this.attemptDelayedRetry(resp);\n return false;\n }\n this.emit('response', resp);\n return true;\n }\n /**\n * @param resp GaxiosResponse object from previous attempt\n */\n attemptDelayedRetry(resp) {\n if (this.numRetries < this.retryOptions.maxRetries) {\n if (resp.status === NOT_FOUND_STATUS_CODE &&\n this.numChunksReadInRequest === 0) {\n this.startUploading();\n }\n else {\n const retryDelay = this.getRetryDelay();\n if (retryDelay <= 0) {\n this.destroy(new Error(`Retry total time limit exceeded - ${JSON.stringify(resp.data)}`));\n return;\n }\n // Unshift the local cache back in case it's needed for the next request.\n this.numBytesWritten -= this.localWriteCacheByteLength;\n this.prependLocalBufferToUpstream();\n // We don't know how much data has been received by the server.\n // `continueUploading` will recheck the offset via `getAndSetOffset`.\n // If `offset` < `numberBytesReceived` then we will raise a RangeError\n // as we've streamed too much data that has been missed - this should\n // not be the case for multi-chunk uploads as `lastChunkSent` is the\n // body of the entire request.\n this.offset = undefined;\n setTimeout(this.continueUploading.bind(this), retryDelay);\n }\n this.numRetries++;\n }\n else {\n this.destroy(new Error(`Retry limit exceeded - ${JSON.stringify(resp.data)}`));\n }\n }\n /**\n * The amount of time to wait before retrying the request, in milliseconds.\n * If negative, do not retry.\n *\n * @returns the amount of time to wait, in milliseconds.\n */\n getRetryDelay() {\n const randomMs = Math.round(Math.random() * 1000);\n const waitTime = Math.pow(this.retryOptions.retryDelayMultiplier, this.numRetries) *\n 1000 +\n randomMs;\n const maxAllowableDelayMs = this.retryOptions.totalTimeout * 1000 -\n (Date.now() - this.timeOfFirstRequest);\n const maxRetryDelayMs = this.retryOptions.maxRetryDelay * 1000;\n return Math.min(waitTime, maxRetryDelayMs, maxAllowableDelayMs);\n }\n /*\n * Prepare user-defined API endpoint for compatibility with our API.\n */\n sanitizeEndpoint(url) {\n if (!PROTOCOL_REGEX.test(url)) {\n url = `https://${url}`;\n }\n return url.replace(/\\/+$/, ''); // Remove trailing slashes\n }\n /**\n * Check if a given status code is 2xx\n *\n * @param status The status code to check\n * @returns if the status is 2xx\n */\n isSuccessfulResponse(status) {\n return status >= 200 && status < 300;\n }\n}\n_Upload_hashValidator = new WeakMap(), _Upload_clientCrc32c = new WeakMap(), _Upload_clientMd5Hash = new WeakMap(), _Upload_gcclGcsCmd = new WeakMap(), _Upload_instances = new WeakSet(), _Upload_resetLocalBuffersCache = function _Upload_resetLocalBuffersCache() {\n this.localWriteCache = [];\n this.localWriteCacheByteLength = 0;\n}, _Upload_addLocalBufferCache = function _Upload_addLocalBufferCache(buf) {\n this.localWriteCache.push(buf);\n this.localWriteCacheByteLength += buf.byteLength;\n}, _Upload_validateChecksum = function _Upload_validateChecksum(clientHash, serverHash, hashType) {\n // Only validate if both client and server hashes are present.\n if (clientHash && serverHash) {\n if (clientHash !== serverHash) {\n const detailMessage = `${hashType} checksum mismatch. Client calculated: ${clientHash}, Server returned: ${serverHash}`;\n const detailError = new Error(detailMessage);\n const error = new RequestError(FileExceptionMessages.UPLOAD_MISMATCH);\n error.code = 'FILE_NO_UPLOAD';\n error.errors = [detailError];\n this.destroy(error);\n return true;\n }\n }\n return false;\n}, _Upload_applyChecksumHeaders = function _Upload_applyChecksumHeaders(headers) {\n var _a, _b;\n const checksums = [];\n if ((_a = __classPrivateFieldGet(this, _Upload_hashValidator, \"f\")) === null || _a === void 0 ? void 0 : _a.crc32cEnabled) {\n checksums.push(`crc32c=${__classPrivateFieldGet(this, _Upload_hashValidator, \"f\").crc32c}`);\n }\n else if (__classPrivateFieldGet(this, _Upload_clientCrc32c, \"f\")) {\n checksums.push(`crc32c=${__classPrivateFieldGet(this, _Upload_clientCrc32c, \"f\")}`);\n }\n if ((_b = __classPrivateFieldGet(this, _Upload_hashValidator, \"f\")) === null || _b === void 0 ? void 0 : _b.md5Enabled) {\n checksums.push(`md5=${__classPrivateFieldGet(this, _Upload_hashValidator, \"f\").md5Digest}`);\n }\n else if (__classPrivateFieldGet(this, _Upload_clientMd5Hash, \"f\")) {\n checksums.push(`md5=${__classPrivateFieldGet(this, _Upload_clientMd5Hash, \"f\")}`);\n }\n if (checksums.length > 0) {\n headers['X-Goog-Hash'] = checksums.join(',');\n }\n};\nexport function upload(cfg) {\n return new Upload(cfg);\n}\nexport function createURI(cfg, callback) {\n const up = new Upload(cfg);\n if (!callback) {\n return up.createURI();\n }\n up.createURI().then(r => callback(null, r), callback);\n}\n/**\n * Check the status of an existing resumable upload.\n *\n * @param cfg A configuration to use. `uri` is required.\n * @returns the current upload status\n */\nexport function checkUploadStatus(cfg) {\n const up = new Upload(cfg);\n return up.checkUploadStatus();\n}\n","// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport * as crypto from 'crypto';\nimport * as url from 'url';\nimport { ExceptionMessages, Storage } from './storage.js';\nimport { encodeURI, qsStringify, objectEntries, formatAsUTCISO } from './util.js';\nexport var SignerExceptionMessages;\n(function (SignerExceptionMessages) {\n SignerExceptionMessages[\"ACCESSIBLE_DATE_INVALID\"] = \"The accessible at date provided was invalid.\";\n SignerExceptionMessages[\"EXPIRATION_BEFORE_ACCESSIBLE_DATE\"] = \"An expiration date cannot be before accessible date.\";\n SignerExceptionMessages[\"X_GOOG_CONTENT_SHA256\"] = \"The header X-Goog-Content-SHA256 must be a hexadecimal string.\";\n})(SignerExceptionMessages || (SignerExceptionMessages = {}));\n/*\n * Default signing version for getSignedUrl is 'v2'.\n */\nconst DEFAULT_SIGNING_VERSION = 'v2';\nconst SEVEN_DAYS = 7 * 24 * 60 * 60;\n/**\n * @const {string}\n * @deprecated - unused\n */\nexport const PATH_STYLED_HOST = 'https://storage.googleapis.com';\nexport class URLSigner {\n constructor(auth, bucket, file, \n /**\n * A {@link Storage} object.\n *\n * @privateRemarks\n *\n * Technically this is a required field, however it would be a breaking change to\n * move it before optional properties. In the next major we should refactor the\n * constructor of this class to only accept a config object.\n */\n storage = new Storage()) {\n this.auth = auth;\n this.bucket = bucket;\n this.file = file;\n this.storage = storage;\n }\n getSignedUrl(cfg) {\n const expiresInSeconds = this.parseExpires(cfg.expires);\n const method = cfg.method;\n const accessibleAtInSeconds = this.parseAccessibleAt(cfg.accessibleAt);\n if (expiresInSeconds < accessibleAtInSeconds) {\n throw new Error(SignerExceptionMessages.EXPIRATION_BEFORE_ACCESSIBLE_DATE);\n }\n let customHost;\n // Default style is `path`.\n const isVirtualHostedStyle = cfg.virtualHostedStyle || false;\n if (cfg.cname) {\n customHost = cfg.cname;\n }\n else if (isVirtualHostedStyle) {\n customHost = `https://${this.bucket.name}.storage.${this.storage.universeDomain}`;\n }\n const secondsToMilliseconds = 1000;\n const config = Object.assign({}, cfg, {\n method,\n expiration: expiresInSeconds,\n accessibleAt: new Date(secondsToMilliseconds * accessibleAtInSeconds),\n bucket: this.bucket.name,\n file: this.file ? encodeURI(this.file.name, false) : undefined,\n });\n if (customHost) {\n config.cname = customHost;\n }\n const version = cfg.version || DEFAULT_SIGNING_VERSION;\n let promise;\n if (version === 'v2') {\n promise = this.getSignedUrlV2(config);\n }\n else if (version === 'v4') {\n promise = this.getSignedUrlV4(config);\n }\n else {\n throw new Error(`Invalid signed URL version: ${version}. Supported versions are 'v2' and 'v4'.`);\n }\n return promise.then(query => {\n var _a;\n query = Object.assign(query, cfg.queryParams);\n const signedUrl = new url.URL(((_a = cfg.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint);\n signedUrl.pathname = this.getResourcePath(!!config.cname, this.bucket.name, config.file);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n signedUrl.search = qsStringify(query);\n return signedUrl.href;\n });\n }\n getSignedUrlV2(config) {\n const canonicalHeadersString = this.getCanonicalHeaders(config.extensionHeaders || {});\n const resourcePath = this.getResourcePath(false, config.bucket, config.file);\n const blobToSign = [\n config.method,\n config.contentMd5 || '',\n config.contentType || '',\n config.expiration,\n canonicalHeadersString + resourcePath,\n ].join('\\n');\n const sign = async () => {\n var _a;\n const auth = this.auth;\n try {\n const signature = await auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString());\n const credentials = await auth.getCredentials();\n return {\n GoogleAccessId: credentials.client_email,\n Expires: config.expiration,\n Signature: signature,\n };\n }\n catch (err) {\n const error = err;\n const signingErr = new SigningError(error.message);\n signingErr.stack = error.stack;\n throw signingErr;\n }\n };\n return sign();\n }\n getSignedUrlV4(config) {\n var _a;\n config.accessibleAt = config.accessibleAt\n ? config.accessibleAt\n : new Date();\n const millisecondsToSeconds = 1.0 / 1000.0;\n const expiresPeriodInSeconds = config.expiration - config.accessibleAt.valueOf() * millisecondsToSeconds;\n // v4 limit expiration to be 7 days maximum\n if (expiresPeriodInSeconds > SEVEN_DAYS) {\n throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`);\n }\n const extensionHeaders = Object.assign({}, config.extensionHeaders);\n const fqdn = new url.URL(((_a = config.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint);\n extensionHeaders.host = fqdn.hostname;\n if (config.contentMd5) {\n extensionHeaders['content-md5'] = config.contentMd5;\n }\n if (config.contentType) {\n extensionHeaders['content-type'] = config.contentType;\n }\n let contentSha256;\n const sha256Header = extensionHeaders['x-goog-content-sha256'];\n if (sha256Header) {\n if (typeof sha256Header !== 'string' ||\n !/[A-Fa-f0-9]{40}/.test(sha256Header)) {\n throw new Error(SignerExceptionMessages.X_GOOG_CONTENT_SHA256);\n }\n contentSha256 = sha256Header;\n }\n const signedHeaders = Object.keys(extensionHeaders)\n .map(header => header.toLowerCase())\n .sort()\n .join(';');\n const extensionHeadersString = this.getCanonicalHeaders(extensionHeaders);\n const datestamp = formatAsUTCISO(config.accessibleAt);\n const credentialScope = `${datestamp}/auto/storage/goog4_request`;\n const sign = async () => {\n var _a;\n const credentials = await this.auth.getCredentials();\n const credential = `${credentials.client_email}/${credentialScope}`;\n const dateISO = formatAsUTCISO(config.accessibleAt ? config.accessibleAt : new Date(), true);\n const queryParams = {\n 'X-Goog-Algorithm': 'GOOG4-RSA-SHA256',\n 'X-Goog-Credential': credential,\n 'X-Goog-Date': dateISO,\n 'X-Goog-Expires': expiresPeriodInSeconds.toString(10),\n 'X-Goog-SignedHeaders': signedHeaders,\n ...(config.queryParams || {}),\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const canonicalQueryParams = this.getCanonicalQueryParams(queryParams);\n const canonicalRequest = this.getCanonicalRequest(config.method, this.getResourcePath(!!config.cname, config.bucket, config.file), canonicalQueryParams, extensionHeadersString, signedHeaders, contentSha256);\n const hash = crypto\n .createHash('sha256')\n .update(canonicalRequest)\n .digest('hex');\n const blobToSign = [\n 'GOOG4-RSA-SHA256',\n dateISO,\n credentialScope,\n hash,\n ].join('\\n');\n try {\n const signature = await this.auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString());\n const signatureHex = Buffer.from(signature, 'base64').toString('hex');\n const signedQuery = Object.assign({}, queryParams, {\n 'X-Goog-Signature': signatureHex,\n });\n return signedQuery;\n }\n catch (err) {\n const error = err;\n const signingErr = new SigningError(error.message);\n signingErr.stack = error.stack;\n throw signingErr;\n }\n };\n return sign();\n }\n /**\n * Create canonical headers for signing v4 url.\n *\n * The canonical headers for v4-signing a request demands header names are\n * first lowercased, followed by sorting the header names.\n * Then, construct the canonical headers part of the request:\n * <lowercasedHeaderName> + \":\" + Trim(<value>) + \"\\n\"\n * ..\n * <lowercasedHeaderName> + \":\" + Trim(<value>) + \"\\n\"\n *\n * @param headers\n * @private\n */\n getCanonicalHeaders(headers) {\n // Sort headers by their lowercased names\n const sortedHeaders = objectEntries(headers)\n // Convert header names to lowercase\n .map(([headerName, value]) => [\n headerName.toLowerCase(),\n value,\n ])\n .sort((a, b) => a[0].localeCompare(b[0]));\n return sortedHeaders\n .filter(([, value]) => value !== undefined)\n .map(([headerName, value]) => {\n // - Convert Array (multi-valued header) into string, delimited by\n // ',' (no space).\n // - Trim leading and trailing spaces.\n // - Convert sequential (2+) spaces into a single space\n const canonicalValue = `${value}`.trim().replace(/\\s{2,}/g, ' ');\n return `${headerName}:${canonicalValue}\\n`;\n })\n .join('');\n }\n getCanonicalRequest(method, path, query, headers, signedHeaders, contentSha256) {\n return [\n method,\n path,\n query,\n headers,\n signedHeaders,\n contentSha256 || 'UNSIGNED-PAYLOAD',\n ].join('\\n');\n }\n getCanonicalQueryParams(query) {\n return objectEntries(query)\n .map(([key, value]) => [encodeURI(key, true), encodeURI(value, true)])\n .sort((a, b) => (a[0] < b[0] ? -1 : 1))\n .map(([key, value]) => `${key}=${value}`)\n .join('&');\n }\n getResourcePath(cname, bucket, file) {\n if (cname) {\n return '/' + (file || '');\n }\n else if (file) {\n return `/${bucket}/${file}`;\n }\n else {\n return `/${bucket}`;\n }\n }\n parseExpires(expires, current = new Date()) {\n const expiresInMSeconds = new Date(expires).valueOf();\n if (isNaN(expiresInMSeconds)) {\n throw new Error(ExceptionMessages.EXPIRATION_DATE_INVALID);\n }\n if (expiresInMSeconds < current.valueOf()) {\n throw new Error(ExceptionMessages.EXPIRATION_DATE_PAST);\n }\n return Math.floor(expiresInMSeconds / 1000); // The API expects seconds.\n }\n parseAccessibleAt(accessibleAt) {\n const accessibleAtInMSeconds = new Date(accessibleAt || new Date()).valueOf();\n if (isNaN(accessibleAtInMSeconds)) {\n throw new Error(SignerExceptionMessages.ACCESSIBLE_DATE_INVALID);\n }\n return Math.floor(accessibleAtInMSeconds / 1000); // The API expects seconds.\n }\n}\n/**\n * Custom error type for errors related to getting signed errors and policies.\n *\n * @private\n */\nexport class SigningError extends Error {\n constructor() {\n super(...arguments);\n this.name = 'SigningError';\n }\n}\n","// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n 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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _File_instances, _File_validateIntegrity;\nimport { ServiceObject, util, } from './nodejs-common/index.js';\nimport { promisifyAll } from '@google-cloud/promisify';\nimport * as crypto from 'crypto';\nimport * as fs from 'fs';\nimport mime from 'mime';\nimport * as resumableUpload from './resumable-upload.js';\nimport { Writable, pipeline } from 'stream';\nimport * as zlib from 'zlib';\nimport { ExceptionMessages, IdempotencyStrategy, } from './storage.js';\nimport { AvailableServiceObjectMethods, Bucket } from './bucket.js';\nimport { Acl } from './acl.js';\nimport { SigningError, URLSigner, } from './signer.js';\nimport { GCCL_GCS_CMD_KEY, } from './nodejs-common/util.js';\nimport duplexify from 'duplexify';\nimport { normalize, objectKeyToLowercase, unicodeJSONStringify, formatAsUTCISO, PassThroughShim, handleContextValidation, } from './util.js';\nimport { CRC32C } from './crc32c.js';\nimport { HashStreamValidator } from './hash-stream-validator.js';\nimport AsyncRetry from 'async-retry';\nexport var ActionToHTTPMethod;\n(function (ActionToHTTPMethod) {\n ActionToHTTPMethod[\"read\"] = \"GET\";\n ActionToHTTPMethod[\"write\"] = \"PUT\";\n ActionToHTTPMethod[\"delete\"] = \"DELETE\";\n ActionToHTTPMethod[\"resumable\"] = \"POST\";\n})(ActionToHTTPMethod || (ActionToHTTPMethod = {}));\n/**\n * @deprecated - no longer used\n */\nexport const STORAGE_POST_POLICY_BASE_URL = 'https://storage.googleapis.com';\n/**\n * @private\n */\nconst GS_URL_REGEXP = /^gs:\\/\\/([a-z0-9_.-]+)\\/(.+)$/;\n/**\n * @private\n * This regex will match compressible content types. These are primarily text/*, +json, +text, +xml content types.\n * This was based off of mime-db and may periodically need to be updated if new compressible content types become\n * standards.\n */\nconst COMPRESSIBLE_MIME_REGEX = new RegExp([\n /^text\\/|application\\/ecmascript|application\\/javascript|application\\/json/,\n /|application\\/postscript|application\\/rtf|application\\/toml|application\\/vnd.dart/,\n /|application\\/vnd.ms-fontobject|application\\/wasm|application\\/x-httpd-php|application\\/x-ns-proxy-autoconfig/,\n /|application\\/x-sh(?!ockwave-flash)|application\\/x-tar|application\\/x-virtualbox-hdd|application\\/x-virtualbox-ova|application\\/x-virtualbox-ovf/,\n /|^application\\/x-virtualbox-vbox$|application\\/x-virtualbox-vdi|application\\/x-virtualbox-vhd|application\\/x-virtualbox-vmdk/,\n /|application\\/xml|application\\/xml-dtd|font\\/otf|font\\/ttf|image\\/bmp|image\\/vnd.adobe.photoshop|image\\/vnd.microsoft.icon/,\n /|image\\/vnd.ms-dds|image\\/x-icon|image\\/x-ms-bmp|message\\/rfc822|model\\/gltf-binary|\\+json|\\+text|\\+xml|\\+yaml/,\n]\n .map(r => r.source)\n .join(''), 'i');\nexport var SkipReason;\n(function (SkipReason) {\n SkipReason[\"PATH_TRAVERSAL\"] = \"PATH_TRAVERSAL\";\n SkipReason[\"ILLEGAL_CHARACTER\"] = \"ILLEGAL_CHARACTER\";\n SkipReason[\"ALREADY_EXISTS\"] = \"ALREADY_EXISTS\";\n SkipReason[\"DOWNLOAD_ERROR\"] = \"DOWNLOAD_ERROR\";\n})(SkipReason || (SkipReason = {}));\nexport class RequestError extends Error {\n}\nconst SEVEN_DAYS = 7 * 24 * 60 * 60;\nconst GS_UTIL_URL_REGEX = /(gs):\\/\\/([a-z0-9_.-]+)\\/(.+)/g;\nconst HTTPS_PUBLIC_URL_REGEX = /(https):\\/\\/(storage\\.googleapis\\.com)\\/([a-z0-9_.-]+)\\/(.+)/g;\nexport var FileExceptionMessages;\n(function (FileExceptionMessages) {\n FileExceptionMessages[\"EXPIRATION_TIME_NA\"] = \"An expiration time is not available.\";\n FileExceptionMessages[\"DESTINATION_NO_NAME\"] = \"Destination file should have a name.\";\n FileExceptionMessages[\"INVALID_VALIDATION_FILE_RANGE\"] = \"Cannot use validation with file ranges (start/end).\";\n FileExceptionMessages[\"MD5_NOT_AVAILABLE\"] = \"MD5 verification was specified, but is not available for the requested object. MD5 is not available for composite objects.\";\n FileExceptionMessages[\"EQUALS_CONDITION_TWO_ELEMENTS\"] = \"Equals condition must be an array of 2 elements.\";\n FileExceptionMessages[\"STARTS_WITH_TWO_ELEMENTS\"] = \"StartsWith condition must be an array of 2 elements.\";\n FileExceptionMessages[\"CONTENT_LENGTH_RANGE_MIN_MAX\"] = \"ContentLengthRange must have numeric min & max fields.\";\n FileExceptionMessages[\"DOWNLOAD_MISMATCH\"] = \"The downloaded data did not match the data from the server. To be sure the content is the same, you should download the file again.\";\n FileExceptionMessages[\"UPLOAD_MISMATCH_DELETE_FAIL\"] = \"The uploaded data did not match the data from the server.\\n As a precaution, we attempted to delete the file, but it was not successful.\\n To be sure the content is the same, you should try removing the file manually,\\n then uploading the file again.\\n \\n\\nThe delete attempt failed with this message:\\n\\n \";\n FileExceptionMessages[\"UPLOAD_MISMATCH\"] = \"The uploaded data did not match the data from the server.\\n As a precaution, the file has been deleted.\\n To be sure the content is the same, you should try uploading the file again.\";\n FileExceptionMessages[\"MD5_RESUMED_UPLOAD\"] = \"MD5 cannot be used with a continued resumable upload as MD5 cannot be extended from an existing value\";\n FileExceptionMessages[\"MISSING_RESUME_CRC32C_FINAL_UPLOAD\"] = \"The CRC32C is missing for the final portion of a resumed upload, which is required for validation. Please provide `resumeCRC32C` if validation is required, or disable `validation`.\";\n})(FileExceptionMessages || (FileExceptionMessages = {}));\n/**\n * A File object is created from your {@link Bucket} object using\n * {@link Bucket#file}.\n *\n * @class\n */\nclass File extends ServiceObject {\n /**\n * Cloud Storage uses access control lists (ACLs) to manage object and\n * bucket access. ACLs are the mechanism you use to share objects with other\n * users and allow other users to access your buckets and objects.\n *\n * An ACL consists of one or more entries, where each entry grants permissions\n * to an entity. Permissions define the actions that can be performed against\n * an object or bucket (for example, `READ` or `WRITE`); the entity defines\n * who the permission applies to (for example, a specific user or group of\n * users).\n *\n * The `acl` object on a File instance provides methods to get you a list of\n * the ACLs defined on your bucket, as well as set, update, and delete them.\n *\n * See {@link http://goo.gl/6qBBPO| About Access Control lists}\n *\n * @name File#acl\n * @mixes Acl\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n * //-\n * // Make a file publicly readable.\n * //-\n * const options = {\n * entity: 'allUsers',\n * role: storage.acl.READER_ROLE\n * };\n *\n * file.acl.add(options, function(err, aclObject) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.acl.add(options).then(function(data) {\n * const aclObject = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n /**\n * The API-formatted resource description of the file.\n *\n * Note: This is not guaranteed to be up-to-date when accessed. To get the\n * latest record, call the `getMetadata()` method.\n *\n * @name File#metadata\n * @type {object}\n */\n /**\n * The file's name.\n * @name File#name\n * @type {string}\n */\n /**\n * @callback Crc32cGeneratorToStringCallback\n * A method returning the CRC32C as a base64-encoded string.\n *\n * @returns {string}\n *\n * @example\n * Hashing the string 'data' should return 'rth90Q=='\n *\n * ```js\n * const buffer = Buffer.from('data');\n * crc32c.update(buffer);\n * crc32c.toString(); // 'rth90Q=='\n * ```\n **/\n /**\n * @callback Crc32cGeneratorValidateCallback\n * A method validating a base64-encoded CRC32C string.\n *\n * @param {string} [value] base64-encoded CRC32C string to validate\n * @returns {boolean}\n *\n * @example\n * Should return `true` if the value matches, `false` otherwise\n *\n * ```js\n * const buffer = Buffer.from('data');\n * crc32c.update(buffer);\n * crc32c.validate('DkjKuA=='); // false\n * crc32c.validate('rth90Q=='); // true\n * ```\n **/\n /**\n * @callback Crc32cGeneratorUpdateCallback\n * A method for passing `Buffer`s for CRC32C generation.\n *\n * @param {Buffer} [data] data to update CRC32C value with\n * @returns {undefined}\n *\n * @example\n * Hashing buffers from 'some ' and 'text\\n'\n *\n * ```js\n * const buffer1 = Buffer.from('some ');\n * crc32c.update(buffer1);\n *\n * const buffer2 = Buffer.from('text\\n');\n * crc32c.update(buffer2);\n *\n * crc32c.toString(); // 'DkjKuA=='\n * ```\n **/\n /**\n * @typedef {object} CRC32CValidator\n * @property {Crc32cGeneratorToStringCallback}\n * @property {Crc32cGeneratorValidateCallback}\n * @property {Crc32cGeneratorUpdateCallback}\n */\n /**\n * @callback Crc32cGeneratorCallback\n * @returns {CRC32CValidator}\n */\n /**\n * @typedef {object} FileOptions Options passed to the File constructor.\n * @property {string} [encryptionKey] A custom encryption key.\n * @property {number} [generation] Generation to scope the file to.\n * @property {string} [kmsKeyName] Cloud KMS Key used to encrypt this\n * object, if the object is encrypted by such a key. Limited availability;\n * usable only by enabled projects.\n * @property {string} [userProject] The ID of the project which will be\n * billed for all requests made from File object.\n * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C}\n */\n /**\n * Constructs a file object.\n *\n * @param {Bucket} bucket The Bucket instance this file is\n * attached to.\n * @param {string} name The name of the remote file.\n * @param {FileOptions} [options] Configuration options.\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n * ```\n */\n constructor(bucket, name, options = {}) {\n var _a, _b;\n const requestQueryObject = {};\n let generation;\n if (options.generation !== null) {\n if (typeof options.generation === 'string') {\n generation = Number(options.generation);\n }\n else {\n generation = options.generation;\n }\n if (!isNaN(generation)) {\n requestQueryObject.generation = generation;\n }\n }\n Object.assign(requestQueryObject, options.preconditionOpts);\n const userProject = options.userProject || bucket.userProject;\n if (typeof userProject === 'string') {\n requestQueryObject.userProject = userProject;\n }\n const methods = {\n /**\n * @typedef {array} DeleteFileResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @callback DeleteFileCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Delete the file.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation}\n *\n * @method File#delete\n * @param {object} [options] Configuration options.\n * @param {boolean} [options.ignoreNotFound = false] Ignore an error if\n * the file does not exist.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {DeleteFileCallback} [callback] Callback function.\n * @returns {Promise<DeleteFileResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n * file.delete(function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.delete().then(function(data) {\n * const apiResponse = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_delete_file\n * Another example:\n */\n delete: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * @typedef {array} FileExistsResponse\n * @property {boolean} 0 Whether the {@link File} exists.\n */\n /**\n * @callback FileExistsCallback\n * @param {?Error} err Request error, if any.\n * @param {boolean} exists Whether the {@link File} exists.\n */\n /**\n * Check if the file exists.\n *\n * @method File#exists\n * @param {options} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {FileExistsCallback} [callback] Callback function.\n * @returns {Promise<FileExistsResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * file.exists(function(err, exists) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.exists().then(function(data) {\n * const exists = data[0];\n * });\n * ```\n */\n exists: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * @typedef {array} GetFileResponse\n * @property {File} 0 The {@link File}.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback GetFileCallback\n * @param {?Error} err Request error, if any.\n * @param {File} file The {@link File}.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Get a file object and its metadata if it exists.\n *\n * @method File#get\n * @param {options} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {number} [options.generation] The generation number to get\n * @param {string} [options.restoreToken] If this is a soft-deleted object in an HNS-enabled bucket, returns the restore token which will\n * be necessary to restore it if there's a name conflict with another object.\n * @param {boolean} [options.softDeleted] If true, returns the soft-deleted object.\n Object `generation` is required if `softDeleted` is set to True.\n * @param {GetFileCallback} [callback] Callback function.\n * @returns {Promise<GetFileResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * file.get(function(err, file, apiResponse) {\n * // file.metadata` has been populated.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.get().then(function(data) {\n * const file = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n get: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * @typedef {array} GetFileMetadataResponse\n * @property {object} 0 The {@link File} metadata.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback GetFileMetadataCallback\n * @param {?Error} err Request error, if any.\n * @param {object} metadata The {@link File} metadata.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Get the file's metadata.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/get| Objects: get API Documentation}\n *\n * @method File#getMetadata\n * @param {object} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {GetFileMetadataCallback} [callback] Callback function.\n * @returns {Promise<GetFileMetadataResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * file.getMetadata(function(err, metadata, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.getMetadata().then(function(data) {\n * const metadata = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_get_metadata\n * Another example:\n */\n getMetadata: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * @typedef {object} SetFileMetadataOptions Configuration options for File#setMetadata().\n * @param {string} [userProject] The ID of the project which will be billed for the request.\n */\n /**\n * @callback SetFileMetadataCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {array} SetFileMetadataResponse\n * @property {object} 0 The full API response.\n */\n /**\n * Merge the given metadata with the current remote file's metadata. This\n * will set metadata if it was previously unset or update previously set\n * metadata. To unset previously set metadata, set its value to null.\n *\n * You can set custom key/value pairs in the metadata key of the given\n * object, however the other properties outside of this object must adhere\n * to the {@link https://goo.gl/BOnnCK| official API documentation}.\n *\n *\n * See the examples below for more information.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation}\n *\n * @method File#setMetadata\n * @param {object} [metadata] The metadata you wish to update.\n * @param {SetFileMetadataOptions} [options] Configuration options.\n * @param {SetFileMetadataCallback} [callback] Callback function.\n * @returns {Promise<SetFileMetadataResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * const metadata = {\n * contentType: 'application/x-font-ttf',\n * metadata: {\n * my: 'custom',\n * properties: 'go here'\n * }\n * };\n *\n * file.setMetadata(metadata, function(err, apiResponse) {});\n *\n * // Assuming current metadata = { hello: 'world', unsetMe: 'will do' }\n * file.setMetadata({\n * metadata: {\n * abc: '123', // will be set.\n * unsetMe: null, // will be unset (deleted).\n * hello: 'goodbye' // will be updated from 'world' to 'goodbye'.\n * }\n * }, function(err, apiResponse) {\n * // metadata should now be { abc: '123', hello: 'goodbye' }\n * });\n *\n * //-\n * // Set a temporary hold on this file from its bucket's retention period\n * // configuration.\n * //\n * file.setMetadata({\n * temporaryHold: true\n * }, function(err, apiResponse) {});\n *\n * //-\n * // Alternatively, you may set a temporary hold. This will follow the\n * // same behavior as an event-based hold, with the exception that the\n * // bucket's retention policy will not renew for this file from the time\n * // the hold is released.\n * //-\n * file.setMetadata({\n * eventBasedHold: true\n * }, function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.setMetadata(metadata).then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n setMetadata: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n };\n super({\n parent: bucket,\n baseUrl: '/o',\n id: encodeURIComponent(name),\n methods,\n });\n _File_instances.add(this);\n this.bucket = bucket;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.storage = bucket.parent;\n // @TODO Can this duplicate code from above be avoided?\n if (options.generation !== null) {\n let generation;\n if (typeof options.generation === 'string') {\n generation = Number(options.generation);\n }\n else {\n generation = options.generation;\n }\n if (!isNaN(generation)) {\n this.generation = generation;\n }\n }\n this.kmsKeyName = options.kmsKeyName;\n this.userProject = userProject;\n this.name = name;\n if (options.encryptionKey) {\n this.setEncryptionKey(options.encryptionKey);\n }\n this.acl = new Acl({\n request: this.request.bind(this),\n pathPrefix: '/acl',\n });\n this.crc32cGenerator =\n options.crc32cGenerator || this.bucket.crc32cGenerator;\n this.instanceRetryValue = (_b = (_a = this.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry;\n this.instancePreconditionOpts = options === null || options === void 0 ? void 0 : options.preconditionOpts;\n }\n /**\n * The object's Cloud Storage URI (`gs://`)\n *\n * @example\n * ```ts\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n * const file = bucket.file('image.png');\n *\n * // `gs://my-bucket/image.png`\n * const href = file.cloudStorageURI.href;\n * ```\n */\n get cloudStorageURI() {\n const uri = this.bucket.cloudStorageURI;\n uri.pathname = this.name;\n return uri;\n }\n /**\n * A helper method for determining if a request should be retried based on preconditions.\n * This should only be used for methods where the idempotency is determined by\n * `ifGenerationMatch`\n * @private\n *\n * A request should not be retried under the following conditions:\n * - if precondition option `ifGenerationMatch` is not set OR\n * - if `idempotencyStrategy` is set to `RetryNever`\n */\n shouldRetryBasedOnPreconditionAndIdempotencyStrat(options) {\n var _a;\n return !(((options === null || options === void 0 ? void 0 : options.ifGenerationMatch) === undefined &&\n ((_a = this.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined &&\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryConditional) ||\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryNever);\n }\n /**\n * @typedef {array} CopyResponse\n * @property {File} 0 The copied {@link File}.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback CopyCallback\n * @param {?Error} err Request error, if any.\n * @param {File} copiedFile The copied {@link File}.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {object} CopyOptions Configuration options for File#copy(). See an\n * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}.\n * @property {string} [cacheControl] The cacheControl setting for the new file.\n * @property {string} [contentEncoding] The contentEncoding setting for the new file.\n * @property {string} [contentType] The contentType setting for the new file.\n * @property {string} [destinationKmsKeyName] Resource name of the Cloud\n * KMS key, of the form\n * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`,\n * that will be used to encrypt the object. Overwrites the object\n * metadata's `kms_key_name` value, if any.\n * @property {Metadata} [metadata] Metadata to specify on the copied file.\n * @property {string} [predefinedAcl] Set the ACL for the new file.\n * @property {string} [token] A previously-returned `rewriteToken` from an\n * unfinished rewrite request.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * Copy this file to another file. By default, this will copy the file to the\n * same bucket, but you can choose to copy it to another Bucket by providing\n * a Bucket or File object or a URL starting with \"gs://\".\n * The generation of the file will not be preserved.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite| Objects: rewrite API Documentation}\n *\n * @throws {Error} If the destination file is not provided.\n *\n * @param {string|Bucket|File} destination Destination file.\n * @param {CopyOptions} [options] Configuration options. See an\n * @param {CopyCallback} [callback] Callback function.\n * @returns {Promise<CopyResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n *\n * //-\n * // You can pass in a variety of types for the destination.\n * //\n * // For all of the below examples, assume we are working with the following\n * // Bucket and File objects.\n * //-\n * const bucket = storage.bucket('my-bucket');\n * const file = bucket.file('my-image.png');\n *\n * //-\n * // If you pass in a string for the destination, the file is copied to its\n * // current bucket, under the new name provided.\n * //-\n * file.copy('my-image-copy.png', function(err, copiedFile, apiResponse) {\n * // `my-bucket` now contains:\n * // - \"my-image.png\"\n * // - \"my-image-copy.png\"\n *\n * // `copiedFile` is an instance of a File object that refers to your new\n * // file.\n * });\n *\n * //-\n * // If you pass in a string starting with \"gs://\" for the destination, the\n * // file is copied to the other bucket and under the new name provided.\n * //-\n * const newLocation = 'gs://another-bucket/my-image-copy.png';\n * file.copy(newLocation, function(err, copiedFile, apiResponse) {\n * // `my-bucket` still contains:\n * // - \"my-image.png\"\n * //\n * // `another-bucket` now contains:\n * // - \"my-image-copy.png\"\n *\n * // `copiedFile` is an instance of a File object that refers to your new\n * // file.\n * });\n *\n * //-\n * // If you pass in a Bucket object, the file will be copied to that bucket\n * // using the same name.\n * //-\n * const anotherBucket = storage.bucket('another-bucket');\n * file.copy(anotherBucket, function(err, copiedFile, apiResponse) {\n * // `my-bucket` still contains:\n * // - \"my-image.png\"\n * //\n * // `another-bucket` now contains:\n * // - \"my-image.png\"\n *\n * // `copiedFile` is an instance of a File object that refers to your new\n * // file.\n * });\n *\n * //-\n * // If you pass in a File object, you have complete control over the new\n * // bucket and filename.\n * //-\n * const anotherFile = anotherBucket.file('my-awesome-image.png');\n * file.copy(anotherFile, function(err, copiedFile, apiResponse) {\n * // `my-bucket` still contains:\n * // - \"my-image.png\"\n * //\n * // `another-bucket` now contains:\n * // - \"my-awesome-image.png\"\n *\n * // Note:\n * // The `copiedFile` parameter is equal to `anotherFile`.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.copy(newLocation).then(function(data) {\n * const newFile = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_copy_file\n * Another example:\n */\n copy(destination, optionsOrCallback, callback) {\n var _a, _b;\n const noDestinationError = new Error(FileExceptionMessages.DESTINATION_NO_NAME);\n if (!destination) {\n throw noDestinationError;\n }\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = { ...optionsOrCallback };\n }\n if (options.contexts) {\n const validationError = handleContextValidation(options.contexts, callback);\n if (validationError)\n return validationError;\n }\n callback = callback || util.noop;\n let destBucket;\n let destName;\n let newFile;\n if (typeof destination === 'string') {\n const parsedDestination = GS_URL_REGEXP.exec(destination);\n if (parsedDestination !== null && parsedDestination.length === 3) {\n destBucket = this.storage.bucket(parsedDestination[1]);\n destName = parsedDestination[2];\n }\n else {\n destBucket = this.bucket;\n destName = destination;\n }\n }\n else if (destination instanceof Bucket) {\n destBucket = destination;\n destName = this.name;\n }\n else if (destination instanceof File) {\n destBucket = destination.bucket;\n destName = destination.name;\n newFile = destination;\n }\n else {\n throw noDestinationError;\n }\n const query = {};\n if (this.generation !== undefined) {\n query.sourceGeneration = this.generation;\n }\n if (options.token !== undefined) {\n query.rewriteToken = options.token;\n }\n if (options.userProject !== undefined) {\n query.userProject = options.userProject;\n delete options.userProject;\n }\n if (options.predefinedAcl !== undefined) {\n query.destinationPredefinedAcl = options.predefinedAcl;\n delete options.predefinedAcl;\n }\n newFile = newFile || destBucket.file(destName);\n const headers = {};\n if (this.encryptionKey !== undefined) {\n headers['x-goog-copy-source-encryption-algorithm'] = 'AES256';\n headers['x-goog-copy-source-encryption-key'] = this.encryptionKeyBase64;\n headers['x-goog-copy-source-encryption-key-sha256'] =\n this.encryptionKeyHash;\n }\n if (newFile.encryptionKey !== undefined) {\n this.setEncryptionKey(newFile.encryptionKey);\n }\n else if (options.destinationKmsKeyName !== undefined) {\n query.destinationKmsKeyName = options.destinationKmsKeyName;\n delete options.destinationKmsKeyName;\n }\n else if (newFile.kmsKeyName !== undefined) {\n query.destinationKmsKeyName = newFile.kmsKeyName;\n }\n if (query.destinationKmsKeyName) {\n this.kmsKeyName = query.destinationKmsKeyName;\n const keyIndex = this.interceptors.indexOf(this.encryptionKeyInterceptor);\n if (keyIndex > -1) {\n this.interceptors.splice(keyIndex, 1);\n }\n }\n if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) {\n this.storage.retryOptions.autoRetry = false;\n }\n if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined) {\n query.ifGenerationMatch = (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch;\n delete options.preconditionOpts;\n }\n this.request({\n method: 'POST',\n uri: `/rewriteTo/b/${destBucket.name}/o/${encodeURIComponent(newFile.name)}`,\n qs: query,\n json: options,\n headers,\n }, (err, resp) => {\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n if (err) {\n callback(err, null, resp);\n return;\n }\n if (resp.rewriteToken) {\n const options = {\n token: resp.rewriteToken,\n };\n if (query.userProject) {\n options.userProject = query.userProject;\n }\n if (query.destinationKmsKeyName) {\n options.destinationKmsKeyName = query.destinationKmsKeyName;\n }\n this.copy(newFile, options, callback);\n return;\n }\n callback(null, newFile, resp);\n });\n }\n /**\n * @typedef {object} CreateReadStreamOptions Configuration options for File#createReadStream.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n * @property {string|boolean} [validation] Possible values: `\"md5\"`,\n * `\"crc32c\"`, or `false`. By default, data integrity is validated with a\n * CRC32c checksum. You may use MD5 if preferred, but that hash is not\n * supported for composite objects. An error will be raised if MD5 is\n * specified but is not available. You may also choose to skip validation\n * completely, however this is **not recommended**.\n * @property {number} [start] A byte offset to begin the file's download\n * from. Default is 0. NOTE: Byte ranges are inclusive; that is,\n * `options.start = 0` and `options.end = 999` represent the first 1000\n * bytes in a file or object. NOTE: when specifying a byte range, data\n * integrity is not available.\n * @property {number} [end] A byte offset to stop reading the file at.\n * NOTE: Byte ranges are inclusive; that is, `options.start = 0` and\n * `options.end = 999` represent the first 1000 bytes in a file or object.\n * NOTE: when specifying a byte range, data integrity is not available.\n * @property {boolean} [decompress=true] Disable auto decompression of the\n * received data. By default this option is set to `true`.\n * Applicable in cases where the data was uploaded with\n * `gzip: true` option. See {@link File#createWriteStream}.\n */\n /**\n * Create a readable stream to read the contents of the remote file. It can be\n * piped to a writable stream or listened to for 'data' events to read a\n * file's contents.\n *\n * In the unlikely event there is a mismatch between what you downloaded and\n * the version in your Bucket, your error handler will receive an error with\n * code \"CONTENT_DOWNLOAD_MISMATCH\". If you receive this error, the best\n * recourse is to try downloading the file again.\n *\n * NOTE: Readable streams will emit the `end` event when the file is fully\n * downloaded.\n *\n * @param {CreateReadStreamOptions} [options] Configuration options.\n * @returns {ReadableStream}\n *\n * @example\n * ```\n * //-\n * // <h4>Downloading a File</h4>\n * //\n * // The example below demonstrates how we can reference a remote file, then\n * // pipe its contents to a local file. This is effectively creating a local\n * // backup of your remote data.\n * //-\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n *\n * const fs = require('fs');\n * const remoteFile = bucket.file('image.png');\n * const localFilename = '/Users/stephen/Photos/image.png';\n *\n * remoteFile.createReadStream()\n * .on('error', function(err) {})\n * .on('response', function(response) {\n * // Server connected and responded with the specified status and headers.\n * })\n * .on('end', function() {\n * // The file is fully downloaded.\n * })\n * .pipe(fs.createWriteStream(localFilename));\n *\n * //-\n * // To limit the downloaded data to only a byte range, pass an options\n * // object.\n * //-\n * const logFile = myBucket.file('access_log');\n * logFile.createReadStream({\n * start: 10000,\n * end: 20000\n * })\n * .on('error', function(err) {})\n * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt'));\n *\n * //-\n * // To read a tail byte range, specify only `options.end` as a negative\n * // number.\n * //-\n * const logFile = myBucket.file('access_log');\n * logFile.createReadStream({\n * end: -100\n * })\n * .on('error', function(err) {})\n * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt'));\n * ```\n */\n createReadStream(options = {}) {\n options = Object.assign({ decompress: true }, options);\n const rangeRequest = typeof options.start === 'number' || typeof options.end === 'number';\n const tailRequest = options.end < 0;\n let validateStream = undefined;\n let request = undefined;\n const throughStream = new PassThroughShim();\n let crc32c = true;\n let md5 = false;\n if (typeof options.validation === 'string') {\n const value = options.validation.toLowerCase().trim();\n crc32c = value === 'crc32c';\n md5 = value === 'md5';\n }\n else if (options.validation === false) {\n crc32c = false;\n }\n const shouldRunValidation = !rangeRequest && (crc32c || md5);\n if (rangeRequest) {\n if (typeof options.validation === 'string' ||\n options.validation === true) {\n throw new Error(FileExceptionMessages.INVALID_VALIDATION_FILE_RANGE);\n }\n // Range requests can't receive data integrity checks.\n crc32c = false;\n md5 = false;\n }\n const onComplete = (err) => {\n if (err) {\n // There is an issue with node-fetch 2.x that if the stream errors the underlying socket connection is not closed.\n // This causes a memory leak, so cleanup the sockets manually here by destroying the agent.\n if (request === null || request === void 0 ? void 0 : request.agent) {\n request.agent.destroy();\n }\n throughStream.destroy(err);\n }\n };\n // We listen to the response event from the request stream so that we\n // can...\n //\n // 1) Intercept any data from going to the user if an error occurred.\n // 2) Calculate the hashes from the http.IncomingMessage response\n // stream,\n // which will return the bytes from the source without decompressing\n // gzip'd content. We then send it through decompressed, if\n // applicable, to the user.\n const onResponse = (err, _body, rawResponseStream) => {\n if (err) {\n // Get error message from the body.\n this.getBufferFromReadable(rawResponseStream).then(body => {\n err.message = body.toString('utf8');\n throughStream.destroy(err);\n });\n return;\n }\n request = rawResponseStream.request;\n const headers = rawResponseStream.toJSON().headers;\n const isCompressed = headers['content-encoding'] === 'gzip';\n const hashes = {};\n // The object is safe to validate if:\n // 1. It was stored gzip and returned to us gzip OR\n // 2. It was never stored as gzip\n const safeToValidate = (headers['x-goog-stored-content-encoding'] === 'gzip' &&\n isCompressed) ||\n headers['x-goog-stored-content-encoding'] === 'identity';\n const transformStreams = [];\n if (shouldRunValidation) {\n // The x-goog-hash header should be set with a crc32c and md5 hash.\n // ex: headers['x-goog-hash'] = 'crc32c=xxxx,md5=xxxx'\n if (typeof headers['x-goog-hash'] === 'string') {\n headers['x-goog-hash']\n .split(',')\n .forEach((hashKeyValPair) => {\n const delimiterIndex = hashKeyValPair.indexOf('=');\n const hashType = hashKeyValPair.substring(0, delimiterIndex);\n const hashValue = hashKeyValPair.substring(delimiterIndex + 1);\n hashes[hashType] = hashValue;\n });\n }\n validateStream = new HashStreamValidator({\n crc32c,\n md5,\n crc32cGenerator: this.crc32cGenerator,\n crc32cExpected: hashes.crc32c,\n md5Expected: hashes.md5,\n });\n }\n if (md5 && !hashes.md5) {\n const hashError = new RequestError(FileExceptionMessages.MD5_NOT_AVAILABLE);\n hashError.code = 'MD5_NOT_AVAILABLE';\n throughStream.destroy(hashError);\n return;\n }\n if (safeToValidate && shouldRunValidation && validateStream) {\n transformStreams.push(validateStream);\n }\n if (isCompressed && options.decompress) {\n transformStreams.push(zlib.createGunzip());\n }\n pipeline(rawResponseStream, ...transformStreams, throughStream, onComplete);\n };\n // Authenticate the request, then pipe the remote API request to the stream\n // returned to the user.\n const makeRequest = () => {\n const query = { alt: 'media' };\n if (this.generation) {\n query.generation = this.generation;\n }\n if (options.userProject) {\n query.userProject = options.userProject;\n }\n const headers = {\n 'Accept-Encoding': 'gzip',\n 'Cache-Control': 'no-store',\n };\n if (rangeRequest) {\n const start = typeof options.start === 'number' ? options.start : '0';\n const end = typeof options.end === 'number' ? options.end : '';\n headers.Range = `bytes=${tailRequest ? end : `${start}-${end}`}`;\n }\n const reqOpts = {\n uri: '',\n headers,\n qs: query,\n };\n if (options[GCCL_GCS_CMD_KEY]) {\n reqOpts[GCCL_GCS_CMD_KEY] = options[GCCL_GCS_CMD_KEY];\n }\n this.requestStream(reqOpts)\n .on('error', err => {\n throughStream.destroy(err);\n })\n .on('response', res => {\n throughStream.emit('response', res);\n util.handleResp(null, res, null, onResponse);\n })\n .resume();\n };\n throughStream.on('reading', makeRequest);\n return throughStream;\n }\n /**\n * @callback CreateResumableUploadCallback\n * @param {?Error} err Request error, if any.\n * @param {string} uri The resumable upload's unique session URI.\n */\n /**\n * @typedef {array} CreateResumableUploadResponse\n * @property {string} 0 The resumable upload's unique session URI.\n */\n /**\n * @typedef {object} CreateResumableUploadOptions\n * @property {object} [metadata] Metadata to set on the file.\n * @property {number} [offset] The starting byte of the upload stream for resuming an interrupted upload.\n * @property {string} [origin] Origin header to set for the upload.\n * @property {string} [predefinedAcl] Apply a predefined set of access\n * controls to this object.\n *\n * Acceptable values are:\n * - **`authenticatedRead`** - Object owner gets `OWNER` access, and\n * `allAuthenticatedUsers` get `READER` access.\n *\n * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and\n * project team owners get `OWNER` access.\n *\n * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project\n * team owners get `READER` access.\n *\n * - **`private`** - Object owner gets `OWNER` access.\n *\n * - **`projectPrivate`** - Object owner gets `OWNER` access, and project\n * team members get access according to their roles.\n *\n * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers`\n * get `READER` access.\n * @property {boolean} [private] Make the uploaded file private. (Alias for\n * `options.predefinedAcl = 'private'`)\n * @property {boolean} [public] Make the uploaded file public. (Alias for\n * `options.predefinedAcl = 'publicRead'`)\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n * @property {string} [chunkSize] Create a separate request per chunk. This\n * value is in bytes and should be a multiple of 256 KiB (2^18).\n * {@link https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload| We recommend using at least 8 MiB for the chunk size.}\n */\n /**\n * Create a unique resumable upload session URI. This is the first step when\n * performing a resumable upload.\n *\n * See the {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide}\n * for more on how the entire process works.\n *\n * <h4>Note</h4>\n *\n * If you are just looking to perform a resumable upload without worrying\n * about any of the details, see {@link File#createWriteStream}. Resumable\n * uploads are performed by default.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide}\n *\n * @param {CreateResumableUploadOptions} [options] Configuration options.\n * @param {CreateResumableUploadCallback} [callback] Callback function.\n * @returns {Promise<CreateResumableUploadResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n * file.createResumableUpload(function(err, uri) {\n * if (!err) {\n * // `uri` can be used to PUT data to.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.createResumableUpload().then(function(data) {\n * const uri = data[0];\n * });\n * ```\n */\n createResumableUpload(optionsOrCallback, callback) {\n var _a, _b;\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n const retryOptions = this.storage.retryOptions;\n if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined &&\n ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined &&\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryConditional) ||\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryNever) {\n retryOptions.autoRetry = false;\n }\n resumableUpload.createURI({\n authClient: this.storage.authClient,\n apiEndpoint: this.storage.apiEndpoint,\n bucket: this.bucket.name,\n customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}),\n file: this.name,\n generation: this.generation,\n key: this.encryptionKey,\n kmsKeyName: this.kmsKeyName,\n metadata: options.metadata,\n offset: options.offset,\n origin: options.origin,\n predefinedAcl: options.predefinedAcl,\n private: options.private,\n public: options.public,\n userProject: options.userProject || this.userProject,\n retryOptions: retryOptions,\n params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts,\n universeDomain: this.bucket.storage.universeDomain,\n useAuthWithCustomEndpoint: this.storage.useAuthWithCustomEndpoint,\n [GCCL_GCS_CMD_KEY]: options[GCCL_GCS_CMD_KEY],\n }, callback);\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n }\n /**\n * @typedef {object} CreateWriteStreamOptions Configuration options for File#createWriteStream().\n * @property {string} [contentType] Alias for\n * `options.metadata.contentType`. If set to `auto`, the file name is used\n * to determine the contentType.\n * @property {string|boolean} [gzip] If true, automatically gzip the file.\n * If set to `auto`, the contentType is used to determine if the file\n * should be gzipped. This will set `options.metadata.contentEncoding` to\n * `gzip` if necessary.\n * @property {object} [metadata] See the examples below or\n * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}\n * for more details.\n * @property {number} [offset] The starting byte of the upload stream, for\n * resuming an interrupted upload. Defaults to 0.\n * @property {string} [predefinedAcl] Apply a predefined set of access\n * controls to this object.\n *\n * Acceptable values are:\n * - **`authenticatedRead`** - Object owner gets `OWNER` access, and\n * `allAuthenticatedUsers` get `READER` access.\n *\n * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and\n * project team owners get `OWNER` access.\n *\n * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project\n * team owners get `READER` access.\n *\n * - **`private`** - Object owner gets `OWNER` access.\n *\n * - **`projectPrivate`** - Object owner gets `OWNER` access, and project\n * team members get access according to their roles.\n *\n * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers`\n * get `READER` access.\n * @property {boolean} [private] Make the uploaded file private. (Alias for\n * `options.predefinedAcl = 'private'`)\n * @property {boolean} [public] Make the uploaded file public. (Alias for\n * `options.predefinedAcl = 'publicRead'`)\n * @property {boolean} [resumable] Force a resumable upload. NOTE: When\n * working with streams, the file format and size is unknown until it's\n * completely consumed. Because of this, it's best for you to be explicit\n * for what makes sense given your input.\n * @property {number} [timeout=60000] Set the HTTP request timeout in\n * milliseconds. This option is not available for resumable uploads.\n * Default: `60000`\n * @property {string} [uri] The URI for an already-created resumable\n * upload. See {@link File#createResumableUpload}.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n * @property {string|boolean} [validation] Possible values: `\"md5\"`,\n * `\"crc32c\"`, or `false`. By default, data integrity is validated with a\n * CRC32c checksum. You may use MD5 if preferred, but that hash is not\n * supported for composite objects. An error will be raised if MD5 is\n * specified but is not available. You may also choose to skip validation\n * completely, however this is **not recommended**. In addition to specifying\n * validation type, providing `metadata.crc32c` or `metadata.md5Hash` will\n * cause the server to perform validation in addition to client validation.\n * NOTE: Validation is automatically skipped for objects that were\n * uploaded using the `gzip` option and have already compressed content.\n */\n /**\n * Create a writable stream to overwrite the contents of the file in your\n * bucket.\n *\n * A File object can also be used to create files for the first time.\n *\n * Resumable uploads are automatically enabled and must be shut off explicitly\n * by setting `options.resumable` to `false`.\n *\n *\n * <p class=\"notice\">\n * There is some overhead when using a resumable upload that can cause\n * noticeable performance degradation while uploading a series of small\n * files. When uploading files less than 10MB, it is recommended that the\n * resumable feature is disabled.\n * </p>\n *\n * NOTE: Writable streams will emit the `finish` event when the file is fully\n * uploaded.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload Upload Options (Simple or Resumable)}\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert Objects: insert API Documentation}\n *\n * @param {CreateWriteStreamOptions} [options] Configuration options.\n * @returns {WritableStream}\n *\n * @example\n * ```\n * const fs = require('fs');\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * //-\n * // <h4>Uploading a File</h4>\n * //\n * // Now, consider a case where we want to upload a file to your bucket. You\n * // have the option of using {@link Bucket#upload}, but that is just\n * // a convenience method which will do the following.\n * //-\n * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg')\n * .pipe(file.createWriteStream())\n * .on('error', function(err) {})\n * .on('finish', function() {\n * // The file upload is complete.\n * });\n *\n * //-\n * // <h4>Uploading a File with gzip compression</h4>\n * //-\n * fs.createReadStream('/Users/stephen/site/index.html')\n * .pipe(file.createWriteStream({ gzip: true }))\n * .on('error', function(err) {})\n * .on('finish', function() {\n * // The file upload is complete.\n * });\n *\n * //-\n * // Downloading the file with `createReadStream` will automatically decode\n * // the file.\n * //-\n *\n * //-\n * // <h4>Uploading a File with Metadata</h4>\n * //\n * // One last case you may run into is when you want to upload a file to your\n * // bucket and set its metadata at the same time. Like above, you can use\n * // {@link Bucket#upload} to do this, which is just a wrapper around\n * // the following.\n * //-\n * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg')\n * .pipe(file.createWriteStream({\n * metadata: {\n * contentType: 'image/jpeg',\n * metadata: {\n * custom: 'metadata'\n * }\n * }\n * }))\n * .on('error', function(err) {})\n * .on('finish', function() {\n * // The file upload is complete.\n * });\n * ```\n *\n * //-\n * // <h4>Continuing a Resumable Upload</h4>\n * //\n * // One can capture a `uri` from a resumable upload to reuse later.\n * // Additionally, for validation, one can also capture and pass `crc32c`.\n * //-\n * let uri: string | undefined = undefined;\n * let resumeCRC32C: string | undefined = undefined;\n *\n * fs.createWriteStream()\n * .on('uri', link => {uri = link})\n * .on('crc32', crc32c => {resumeCRC32C = crc32c});\n *\n * // later...\n * fs.createWriteStream({uri, resumeCRC32C});\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n createWriteStream(options = {}) {\n var _a;\n (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {});\n if (options.contentType) {\n options.metadata.contentType = options.contentType;\n }\n if (!options.metadata.contentType ||\n options.metadata.contentType === 'auto') {\n const detectedContentType = mime.getType(this.name);\n if (detectedContentType) {\n options.metadata.contentType = detectedContentType;\n }\n }\n let gzip = options.gzip;\n if (gzip === 'auto') {\n gzip = COMPRESSIBLE_MIME_REGEX.test(options.metadata.contentType || '');\n }\n if (gzip) {\n options.metadata.contentEncoding = 'gzip';\n }\n let crc32c = true;\n let md5 = false;\n if (typeof options.validation === 'string') {\n options.validation = options.validation.toLowerCase();\n crc32c = options.validation === 'crc32c';\n md5 = options.validation === 'md5';\n }\n else if (options.validation === false) {\n crc32c = false;\n md5 = false;\n }\n if (options.offset) {\n if (md5) {\n throw new RangeError(FileExceptionMessages.MD5_RESUMED_UPLOAD);\n }\n if (crc32c && !options.isPartialUpload && !options.resumeCRC32C) {\n throw new RangeError(FileExceptionMessages.MISSING_RESUME_CRC32C_FINAL_UPLOAD);\n }\n }\n /**\n * A callback for determining when the underlying pipeline is complete.\n * It's possible the pipeline callback could error before the write stream\n * calls `final` so by default this will destroy the write stream unless the\n * write stream sets this callback via its `final` handler.\n * @param error An optional error\n */\n let pipelineCallback = error => {\n writeStream.destroy(error || undefined);\n };\n // A stream for consumer to write to\n const writeStream = new Writable({\n final(cb) {\n // Set the pipeline callback to this callback so the pipeline's results\n // can be populated to the consumer\n pipelineCallback = cb;\n emitStream.end();\n },\n write(chunk, encoding, cb) {\n emitStream.write(chunk, encoding, cb);\n },\n });\n // If the write stream, which is returned to the caller, catches an error we need to make sure that\n // at least one of the streams in the pipeline below gets notified so that they\n // all get cleaned up / destroyed.\n writeStream.once('error', e => {\n emitStream.destroy(e);\n });\n // If the write stream is closed, cleanup the pipeline below by calling destroy on one of the streams.\n writeStream.once('close', () => {\n emitStream.destroy();\n });\n const transformStreams = [];\n if (gzip) {\n transformStreams.push(zlib.createGzip());\n }\n const emitStream = new PassThroughShim();\n // If `writeStream` is destroyed before the `writing` event, `emitStream` will not have any listeners. This prevents an unhandled error.\n const noop = () => { };\n emitStream.on('error', noop);\n let hashCalculatingStream = null;\n if (crc32c || md5) {\n const crc32cInstance = options.resumeCRC32C\n ? CRC32C.from(options.resumeCRC32C)\n : undefined;\n hashCalculatingStream = new HashStreamValidator({\n crc32c,\n crc32cInstance,\n md5,\n crc32cGenerator: this.crc32cGenerator,\n updateHashesOnly: true,\n });\n transformStreams.push(hashCalculatingStream);\n }\n const fileWriteStream = duplexify();\n let fileWriteStreamMetadataReceived = false;\n // Handing off emitted events to users\n emitStream.on('reading', () => writeStream.emit('reading'));\n emitStream.on('writing', () => writeStream.emit('writing'));\n fileWriteStream.on('uri', evt => writeStream.emit('uri', evt));\n fileWriteStream.on('progress', evt => writeStream.emit('progress', evt));\n fileWriteStream.on('response', resp => writeStream.emit('response', resp));\n fileWriteStream.once('metadata', () => {\n fileWriteStreamMetadataReceived = true;\n });\n writeStream.once('writing', () => {\n if (options.resumable === false) {\n this.startSimpleUpload_(fileWriteStream, options);\n }\n else {\n this.startResumableUpload_(fileWriteStream, options);\n }\n // remove temporary noop listener as we now create a pipeline that handles the errors\n emitStream.removeListener('error', noop);\n pipeline(emitStream, ...transformStreams, fileWriteStream, async (e) => {\n if (e) {\n return pipelineCallback(e);\n }\n // If this is a partial upload, we don't expect final metadata yet.\n if (options.isPartialUpload) {\n // Emit CRC32c for this completed chunk if hash validation is active.\n if (hashCalculatingStream === null || hashCalculatingStream === void 0 ? void 0 : hashCalculatingStream.crc32c) {\n writeStream.emit('crc32c', hashCalculatingStream.crc32c);\n }\n // Resolve the pipeline for this *partial chunk*.\n return pipelineCallback();\n }\n // We want to make sure we've received the metadata from the server in order\n // to properly validate the object's integrity. Depending on the type of upload,\n // the stream could close before the response is returned.\n if (!fileWriteStreamMetadataReceived) {\n try {\n await new Promise((resolve, reject) => {\n fileWriteStream.once('metadata', resolve);\n fileWriteStream.once('error', reject);\n });\n }\n catch (e) {\n return pipelineCallback(e);\n }\n }\n // Emit the local CRC32C value for future validation, if validation is enabled.\n if (hashCalculatingStream === null || hashCalculatingStream === void 0 ? void 0 : hashCalculatingStream.crc32c) {\n writeStream.emit('crc32c', hashCalculatingStream.crc32c);\n }\n try {\n // Metadata may not be ready if the upload is a partial upload,\n // nothing to validate yet.\n const metadataNotReady = options.isPartialUpload && !this.metadata;\n if (hashCalculatingStream && !metadataNotReady) {\n await __classPrivateFieldGet(this, _File_instances, \"m\", _File_validateIntegrity).call(this, hashCalculatingStream, {\n crc32c,\n md5,\n });\n }\n pipelineCallback();\n }\n catch (e) {\n pipelineCallback(e);\n }\n });\n });\n return writeStream;\n }\n delete(optionsOrCallback, cb) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n cb = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb;\n this.disableAutoRetryConditionallyIdempotent_(this.methods.delete, AvailableServiceObjectMethods.delete, options);\n super\n .delete(options)\n .then(resp => cb(null, ...resp))\n .catch(cb)\n .finally(() => {\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n });\n }\n /**\n * @typedef {array} DownloadResponse\n * @property [0] The contents of a File.\n */\n /**\n * @callback DownloadCallback\n * @param err Request error, if any.\n * @param contents The contents of a File.\n */\n /**\n * Convenience method to download a file into memory or to a local\n * destination.\n *\n * @param {object} [options] Configuration options. The arguments match those\n * passed to {@link File#createReadStream}.\n * @param {string} [options.destination] Local file path to write the file's\n * contents to.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {DownloadCallback} [callback] Callback function.\n * @returns {Promise<DownloadResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * //-\n * // Download a file into memory. The contents will be available as the\n * second\n * // argument in the demonstration below, `contents`.\n * //-\n * file.download(function(err, contents) {});\n *\n * //-\n * // Download a file to a local destination.\n * //-\n * file.download({\n * destination: '/Users/me/Desktop/file-backup.txt'\n * }, function(err) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.download().then(function(data) {\n * const contents = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_download_file\n * Another example:\n *\n * @example <caption>include:samples/encryption.js</caption>\n * region_tag:storage_download_encrypted_file\n * Example of downloading an encrypted file:\n *\n * @example <caption>include:samples/requesterPays.js</caption>\n * region_tag:storage_download_file_requester_pays\n * Example of downloading a file where the requester pays:\n */\n download(optionsOrCallback, cb) {\n let options;\n if (typeof optionsOrCallback === 'function') {\n cb = optionsOrCallback;\n options = {};\n }\n else {\n options = Object.assign({}, optionsOrCallback);\n }\n let called = false;\n const callback = ((...args) => {\n if (!called)\n cb(...args);\n called = true;\n });\n const destination = options.destination;\n delete options.destination;\n if (options.encryptionKey) {\n this.setEncryptionKey(options.encryptionKey);\n delete options.encryptionKey;\n }\n const fileStream = this.createReadStream(options);\n let receivedData = false;\n if (destination) {\n fileStream\n .on('error', callback)\n .once('data', data => {\n receivedData = true;\n // We know that the file exists the server - now we can truncate/write to a file\n const writable = fs.createWriteStream(destination);\n writable.write(data);\n fileStream\n .pipe(writable)\n .on('error', (err) => {\n callback(err, Buffer.from(''));\n })\n .on('finish', () => {\n callback(null, data);\n });\n })\n .on('end', () => {\n // In the case of an empty file no data will be received before the end event fires\n if (!receivedData) {\n const data = Buffer.alloc(0);\n try {\n fs.writeFileSync(destination, data);\n callback(null, data);\n }\n catch (e) {\n callback(e, data);\n }\n }\n });\n }\n else {\n this.getBufferFromReadable(fileStream)\n .then(contents => callback === null || callback === void 0 ? void 0 : callback(null, contents))\n .catch(callback);\n }\n }\n /**\n * The Storage API allows you to use a custom key for server-side encryption.\n *\n * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}\n *\n * @param {string|buffer} encryptionKey An AES-256 encryption key.\n * @returns {File}\n *\n * @example\n * ```\n * const crypto = require('crypto');\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const encryptionKey = crypto.randomBytes(32);\n *\n * const fileWithCustomEncryption = myBucket.file('my-file');\n * fileWithCustomEncryption.setEncryptionKey(encryptionKey);\n *\n * const fileWithoutCustomEncryption = myBucket.file('my-file');\n *\n * fileWithCustomEncryption.save('data', function(err) {\n * // Try to download with the File object that hasn't had\n * // `setEncryptionKey()` called:\n * fileWithoutCustomEncryption.download(function(err) {\n * // We will receive an error:\n * // err.message === 'Bad Request'\n *\n * // Try again with the File object we called `setEncryptionKey()` on:\n * fileWithCustomEncryption.download(function(err, contents) {\n * // contents.toString() === 'data'\n * });\n * });\n * });\n *\n * ```\n * @example <caption>include:samples/encryption.js</caption>\n * region_tag:storage_upload_encrypted_file\n * Example of uploading an encrypted file:\n *\n * @example <caption>include:samples/encryption.js</caption>\n * region_tag:storage_download_encrypted_file\n * Example of downloading an encrypted file:\n */\n setEncryptionKey(encryptionKey) {\n this.encryptionKey = encryptionKey;\n this.encryptionKeyBase64 = Buffer.from(encryptionKey).toString('base64');\n this.encryptionKeyHash = crypto\n .createHash('sha256')\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .update(this.encryptionKeyBase64, 'base64')\n .digest('base64');\n this.encryptionKeyInterceptor = {\n request: reqOpts => {\n reqOpts.headers = reqOpts.headers || {};\n reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256';\n reqOpts.headers['x-goog-encryption-key'] = this.encryptionKeyBase64;\n reqOpts.headers['x-goog-encryption-key-sha256'] =\n this.encryptionKeyHash;\n return reqOpts;\n },\n };\n this.interceptors.push(this.encryptionKeyInterceptor);\n return this;\n }\n /**\n * Gets a reference to a Cloud Storage {@link File} file from the provided URL in string format.\n * @param {string} publicUrlOrGsUrl the URL as a string. Must be of the format gs://bucket/file\n * or https://storage.googleapis.com/bucket/file.\n * @param {Storage} storageInstance an instance of a Storage object.\n * @param {FileOptions} [options] Configuration options\n * @returns {File}\n */\n static from(publicUrlOrGsUrl, storageInstance, options) {\n const gsMatches = [...publicUrlOrGsUrl.matchAll(GS_UTIL_URL_REGEX)];\n const httpsMatches = [...publicUrlOrGsUrl.matchAll(HTTPS_PUBLIC_URL_REGEX)];\n if (gsMatches.length > 0) {\n const bucket = new Bucket(storageInstance, gsMatches[0][2]);\n return new File(bucket, gsMatches[0][3], options);\n }\n else if (httpsMatches.length > 0) {\n const bucket = new Bucket(storageInstance, httpsMatches[0][3]);\n return new File(bucket, httpsMatches[0][4], options);\n }\n else {\n throw new Error('URL string must be of format gs://bucket/file or https://storage.googleapis.com/bucket/file');\n }\n }\n get(optionsOrCallback, cb) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n cb =\n typeof optionsOrCallback === 'function'\n ? optionsOrCallback\n : cb;\n super\n .get(options)\n .then(resp => cb(null, ...resp))\n .catch(cb);\n }\n /**\n * @typedef {array} GetExpirationDateResponse\n * @property {date} 0 A Date object representing the earliest time this file's\n * retention policy will expire.\n */\n /**\n * @callback GetExpirationDateCallback\n * @param {?Error} err Request error, if any.\n * @param {date} expirationDate A Date object representing the earliest time\n * this file's retention policy will expire.\n */\n /**\n * If this bucket has a retention policy defined, use this method to get a\n * Date object representing the earliest time this file will expire.\n *\n * @param {GetExpirationDateCallback} [callback] Callback function.\n * @returns {Promise<GetExpirationDateResponse>}\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * file.getExpirationDate(function(err, expirationDate) {\n * // expirationDate is a Date object.\n * });\n * ```\n */\n getExpirationDate(callback) {\n this.getMetadata((err, metadata, apiResponse) => {\n if (err) {\n callback(err, null, apiResponse);\n return;\n }\n if (!metadata.retentionExpirationTime) {\n const error = new Error(FileExceptionMessages.EXPIRATION_TIME_NA);\n callback(error, null, apiResponse);\n return;\n }\n callback(null, new Date(metadata.retentionExpirationTime), apiResponse);\n });\n }\n /**\n * @typedef {array} GenerateSignedPostPolicyV2Response\n * @property {object} 0 The document policy.\n */\n /**\n * @callback GenerateSignedPostPolicyV2Callback\n * @param {?Error} err Request error, if any.\n * @param {object} policy The document policy.\n */\n /**\n * Get a signed policy document to allow a user to upload data with a POST\n * request.\n *\n * In Google Cloud Platform environments, such as Cloud Functions and App\n * Engine, you usually don't provide a `keyFilename` or `credentials` during\n * instantiation. In those environments, we call the\n * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API}\n * to create a signed policy. That API requires either the\n * `https://www.googleapis.com/auth/iam` or\n * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are\n * enabled.\n *\n * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-v2| POST Object with the V2 signing process}\n *\n * @throws {Error} If an expiration timestamp from the past is given.\n * @throws {Error} If options.equals has an array with less or more than two\n * members.\n * @throws {Error} If options.startsWith has an array with less or more than two\n * members.\n *\n * @param {object} options Configuration options.\n * @param {array|array[]} [options.equals] Array of request parameters and\n * their expected value (e.g. [['$<field>', '<value>']]). Values are\n * translated into equality constraints in the conditions field of the\n * policy document (e.g. ['eq', '$<field>', '<value>']). If only one\n * equality condition is to be specified, options.equals can be a one-\n * dimensional array (e.g. ['$<field>', '<value>']).\n * @param {*} options.expires - A timestamp when this policy will expire. Any\n * value given is passed to `new Date()`.\n * @param {array|array[]} [options.startsWith] Array of request parameters and\n * their expected prefixes (e.g. [['$<field>', '<value>']). Values are\n * translated into starts-with constraints in the conditions field of the\n * policy document (e.g. ['starts-with', '$<field>', '<value>']). If only\n * one prefix condition is to be specified, options.startsWith can be a\n * one- dimensional array (e.g. ['$<field>', '<value>']).\n * @param {string} [options.acl] ACL for the object from possibly predefined\n * ACLs.\n * @param {string} [options.successRedirect] The URL to which the user client\n * is redirected if the upload is successful.\n * @param {string} [options.successStatus] - The status of the Google Storage\n * response if the upload is successful (must be string).\n * @param {object} [options.contentLengthRange]\n * @param {number} [options.contentLengthRange.min] Minimum value for the\n * request's content length.\n * @param {number} [options.contentLengthRange.max] Maximum value for the\n * request's content length.\n * @param {GenerateSignedPostPolicyV2Callback} [callback] Callback function.\n * @returns {Promise<GenerateSignedPostPolicyV2Response>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n * const options = {\n * equals: ['$Content-Type', 'image/jpeg'],\n * expires: '10-25-2022',\n * contentLengthRange: {\n * min: 0,\n * max: 1024\n * }\n * };\n *\n * file.generateSignedPostPolicyV2(options, function(err, policy) {\n * // policy.string: the policy document in plain text.\n * // policy.base64: the policy document in base64.\n * // policy.signature: the policy signature in base64.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.generateSignedPostPolicyV2(options).then(function(data) {\n * const policy = data[0];\n * });\n * ```\n */\n generateSignedPostPolicyV2(optionsOrCallback, cb) {\n const args = normalize(optionsOrCallback, cb);\n let options = args.options;\n const callback = args.callback;\n const expires = new Date(options.expires);\n if (isNaN(expires.getTime())) {\n throw new Error(ExceptionMessages.EXPIRATION_DATE_INVALID);\n }\n if (expires.valueOf() < Date.now()) {\n throw new Error(ExceptionMessages.EXPIRATION_DATE_PAST);\n }\n options = Object.assign({}, options);\n const conditions = [\n ['eq', '$key', this.name],\n {\n bucket: this.bucket.name,\n },\n ];\n if (Array.isArray(options.equals)) {\n if (!Array.isArray(options.equals[0])) {\n options.equals = [options.equals];\n }\n options.equals.forEach(condition => {\n if (!Array.isArray(condition) || condition.length !== 2) {\n throw new Error(FileExceptionMessages.EQUALS_CONDITION_TWO_ELEMENTS);\n }\n conditions.push(['eq', condition[0], condition[1]]);\n });\n }\n if (Array.isArray(options.startsWith)) {\n if (!Array.isArray(options.startsWith[0])) {\n options.startsWith = [options.startsWith];\n }\n options.startsWith.forEach(condition => {\n if (!Array.isArray(condition) || condition.length !== 2) {\n throw new Error(FileExceptionMessages.STARTS_WITH_TWO_ELEMENTS);\n }\n conditions.push(['starts-with', condition[0], condition[1]]);\n });\n }\n if (options.acl) {\n conditions.push({\n acl: options.acl,\n });\n }\n if (options.successRedirect) {\n conditions.push({\n success_action_redirect: options.successRedirect,\n });\n }\n if (options.successStatus) {\n conditions.push({\n success_action_status: options.successStatus,\n });\n }\n if (options.contentLengthRange) {\n const min = options.contentLengthRange.min;\n const max = options.contentLengthRange.max;\n if (typeof min !== 'number' || typeof max !== 'number') {\n throw new Error(FileExceptionMessages.CONTENT_LENGTH_RANGE_MIN_MAX);\n }\n conditions.push(['content-length-range', min, max]);\n }\n const policy = {\n expiration: expires.toISOString(),\n conditions,\n };\n const policyString = JSON.stringify(policy);\n const policyBase64 = Buffer.from(policyString).toString('base64');\n this.storage.authClient.sign(policyBase64, options.signingEndpoint).then(signature => {\n callback(null, {\n string: policyString,\n base64: policyBase64,\n signature,\n });\n }, err => {\n callback(new SigningError(err.message));\n });\n }\n /**\n * @typedef {object} SignedPostPolicyV4Output\n * @property {string} url The request URL.\n * @property {object} fields The form fields to include in the POST request.\n */\n /**\n * @typedef {array} GenerateSignedPostPolicyV4Response\n * @property {SignedPostPolicyV4Output} 0 An object containing the request URL and form fields.\n */\n /**\n * @callback GenerateSignedPostPolicyV4Callback\n * @param {?Error} err Request error, if any.\n * @param {SignedPostPolicyV4Output} output An object containing the request URL and form fields.\n */\n /**\n * Get a v4 signed policy document to allow a user to upload data with a POST\n * request.\n *\n * In Google Cloud Platform environments, such as Cloud Functions and App\n * Engine, you usually don't provide a `keyFilename` or `credentials` during\n * instantiation. In those environments, we call the\n * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API}\n * to create a signed policy. That API requires either the\n * `https://www.googleapis.com/auth/iam` or\n * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are\n * enabled.\n *\n * See {@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument| Policy Document Reference}\n *\n * @param {object} options Configuration options.\n * @param {Date|number|string} options.expires - A timestamp when this policy will expire. Any\n * value given is passed to `new Date()`.\n * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style\n * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style\n * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs\n * should generally be preferred instead of path-style URL.\n * Currently defaults to `false` for path-style, although this may change in a\n * future major-version release.\n * @param {string} [config.bucketBoundHostname] The bucket-bound hostname to return in\n * the result, e.g. \"https://cdn.example.com\".\n * @param {object} [config.fields] [Form fields]{@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument}\n * to include in the signed policy. Any fields with key beginning with 'x-ignore-'\n * will not be included in the policy to be signed.\n * @param {object[]} [config.conditions] [Conditions]{@link https://cloud.google.com/storage/docs/authentication/signatures#policy-document}\n * to include in the signed policy. All fields given in `config.fields` are\n * automatically included in the conditions array, adding the same entry\n * in both `fields` and `conditions` will result in duplicate entries.\n *\n * @param {GenerateSignedPostPolicyV4Callback} [callback] Callback function.\n * @returns {Promise<GenerateSignedPostPolicyV4Response>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n * const options = {\n * expires: '10-25-2022',\n * conditions: [\n * ['eq', '$Content-Type', 'image/jpeg'],\n * ['content-length-range', 0, 1024],\n * ],\n * fields: {\n * acl: 'public-read',\n * 'x-goog-meta-foo': 'bar',\n * 'x-ignore-mykey': 'data'\n * }\n * };\n *\n * file.generateSignedPostPolicyV4(options, function(err, response) {\n * // response.url The request URL\n * // response.fields The form fields (including the signature) to include\n * // to be used to upload objects by HTML forms.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.generateSignedPostPolicyV4(options).then(function(data) {\n * const response = data[0];\n * // response.url The request URL\n * // response.fields The form fields (including the signature) to include\n * // to be used to upload objects by HTML forms.\n * });\n * ```\n */\n generateSignedPostPolicyV4(optionsOrCallback, cb) {\n const args = normalize(optionsOrCallback, cb);\n let options = args.options;\n const callback = args.callback;\n const expires = new Date(options.expires);\n if (isNaN(expires.getTime())) {\n throw new Error(ExceptionMessages.EXPIRATION_DATE_INVALID);\n }\n if (expires.valueOf() < Date.now()) {\n throw new Error(ExceptionMessages.EXPIRATION_DATE_PAST);\n }\n if (expires.valueOf() - Date.now() > SEVEN_DAYS * 1000) {\n throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`);\n }\n options = Object.assign({}, options);\n let fields = Object.assign({}, options.fields);\n const now = new Date();\n const nowISO = formatAsUTCISO(now, true);\n const todayISO = formatAsUTCISO(now);\n const sign = async () => {\n const { client_email } = await this.storage.authClient.getCredentials();\n const credential = `${client_email}/${todayISO}/auto/storage/goog4_request`;\n fields = {\n ...fields,\n bucket: this.bucket.name,\n key: this.name,\n 'x-goog-date': nowISO,\n 'x-goog-credential': credential,\n 'x-goog-algorithm': 'GOOG4-RSA-SHA256',\n };\n const conditions = options.conditions || [];\n Object.entries(fields).forEach(([key, value]) => {\n if (!key.startsWith('x-ignore-')) {\n conditions.push({ [key]: value });\n }\n });\n delete fields.bucket;\n const expiration = formatAsUTCISO(expires, true, '-', ':');\n const policy = {\n conditions,\n expiration,\n };\n const policyString = unicodeJSONStringify(policy);\n const policyBase64 = Buffer.from(policyString).toString('base64');\n try {\n const signature = await this.storage.authClient.sign(policyBase64, options.signingEndpoint);\n const signatureHex = Buffer.from(signature, 'base64').toString('hex');\n const universe = this.parent.storage.universeDomain;\n fields['policy'] = policyBase64;\n fields['x-goog-signature'] = signatureHex;\n let url;\n const EMULATOR_HOST = process.env.STORAGE_EMULATOR_HOST;\n if (this.storage.customEndpoint && typeof EMULATOR_HOST === 'string') {\n url = `${this.storage.apiEndpoint}/${this.bucket.name}`;\n }\n else if (this.storage.customEndpoint) {\n url = this.storage.apiEndpoint;\n }\n else if (options.virtualHostedStyle) {\n url = `https://${this.bucket.name}.storage.${universe}/`;\n }\n else if (options.bucketBoundHostname) {\n url = `${options.bucketBoundHostname}/`;\n }\n else {\n url = `https://storage.${universe}/${this.bucket.name}/`;\n }\n return {\n url,\n fields,\n };\n }\n catch (err) {\n throw new SigningError(err.message);\n }\n };\n sign().then(res => callback(null, res), callback);\n }\n /**\n * @typedef {array} GetSignedUrlResponse\n * @property {object} 0 The signed URL.\n */\n /**\n * @callback GetSignedUrlCallback\n * @param {?Error} err Request error, if any.\n * @param {object} url The signed URL.\n */\n /**\n * Get a signed URL to allow limited time access to the file.\n *\n * In Google Cloud Platform environments, such as Cloud Functions and App\n * Engine, you usually don't provide a `keyFilename` or `credentials` during\n * instantiation. In those environments, we call the\n * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API}\n * to create a signed URL. That API requires either the\n * `https://www.googleapis.com/auth/iam` or\n * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are\n * enabled.\n *\n * See {@link https://cloud.google.com/storage/docs/access-control/signed-urls| Signed URLs Reference}\n *\n * @throws {Error} if an expiration timestamp from the past is given.\n *\n * @param {object} config Configuration object.\n * @param {string} config.action \"read\" (HTTP: GET), \"write\" (HTTP: PUT), or\n * \"delete\" (HTTP: DELETE), \"resumable\" (HTTP: POST).\n * When using \"resumable\", the header `X-Goog-Resumable: start` has\n * to be sent when making a request with the signed URL.\n * @param {*} config.expires A timestamp when this link will expire. Any value\n * given is passed to `new Date()`.\n * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now.\n * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example}\n * @param {string} [config.version='v2'] The signing version to use, either\n * 'v2' or 'v4'.\n * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style\n * URLs (e.g. 'https://mybucket.storage.googleapis.com/...') instead of path-style\n * (e.g. 'https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs\n * should generally be preferred instead of path-style URL.\n * Currently defaults to `false` for path-style, although this may change in a\n * future major-version release.\n * @param {string} [config.cname] The cname for this bucket, i.e.,\n * \"https://cdn.example.com\".\n * @param {string} [config.contentMd5] The MD5 digest value in base64. Just like\n * if you provide this, the client must provide this HTTP header with this same\n * value in its request, so to if this parameter is not provided here,\n * the client must not provide any value for this HTTP header in its request.\n * @param {string} [config.contentType] Just like if you provide this, the client\n * must provide this HTTP header with this same value in its request, so to if\n * this parameter is not provided here, the client must not provide any value\n * for this HTTP header in its request.\n * @param {object} [config.extensionHeaders] If these headers are used, the\n * server will check to make sure that the client provides matching\n * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers}\n * for the requirements of this feature, most notably:\n * - The header name must be prefixed with `x-goog-`\n * - The header name must be all lowercase\n *\n * Note: Multi-valued header passed as an array in the extensionHeaders\n * object is converted into a string, delimited by `,` with\n * no space. Requests made using the signed URL will need to\n * delimit multi-valued headers using a single `,` as well, or\n * else the server will report a mismatched signature.\n * @param {object} [config.queryParams] Additional query parameters to include\n * in the signed URL.\n * @param {string} [config.promptSaveAs] The filename to prompt the user to\n * save the file as when the signed url is accessed. This is ignored if\n * `config.responseDisposition` is set.\n * @param {string} [config.responseDisposition] The\n * {@link http://goo.gl/yMWxQV| response-content-disposition parameter} of the\n * signed url.\n * @param {*} [config.accessibleAt=Date.now()] A timestamp when this link became usable. Any value\n * given is passed to `new Date()`.\n * Note: Use for 'v4' only.\n * @param {string} [config.responseType] The response-content-type parameter\n * of the signed url.\n * @param {GetSignedUrlCallback} [callback] Callback function.\n * @returns {Promise<GetSignedUrlResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * //-\n * // Generate a URL that allows temporary access to download your file.\n * //-\n * const request = require('request');\n *\n * const config = {\n * action: 'read',\n * expires: '03-17-2025',\n * };\n *\n * file.getSignedUrl(config, function(err, url) {\n * if (err) {\n * console.error(err);\n * return;\n * }\n *\n * // The file is now available to read from this URL.\n * request(url, function(err, resp) {\n * // resp.statusCode = 200\n * });\n * });\n *\n * //-\n * // Generate a URL that allows temporary access to download your file.\n * // Access will begin at accessibleAt and end at expires.\n * //-\n * const request = require('request');\n *\n * const config = {\n * action: 'read',\n * expires: '03-17-2025',\n * accessibleAt: '03-13-2025'\n * };\n *\n * file.getSignedUrl(config, function(err, url) {\n * if (err) {\n * console.error(err);\n * return;\n * }\n *\n * // The file will be available to read from this URL from 03-13-2025 to 03-17-2025.\n * request(url, function(err, resp) {\n * // resp.statusCode = 200\n * });\n * });\n *\n * //-\n * // Generate a URL to allow write permissions. This means anyone with this\n * URL\n * // can send a POST request with new data that will overwrite the file.\n * //-\n * file.getSignedUrl({\n * action: 'write',\n * expires: '03-17-2025'\n * }, function(err, url) {\n * if (err) {\n * console.error(err);\n * return;\n * }\n *\n * // The file is now available to be written to.\n * const writeStream = request.put(url);\n * writeStream.end('New data');\n *\n * writeStream.on('complete', function(resp) {\n * // Confirm the new content was saved.\n * file.download(function(err, fileContents) {\n * console.log('Contents:', fileContents.toString());\n * // Contents: New data\n * });\n * });\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.getSignedUrl(config).then(function(data) {\n * const url = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_generate_signed_url\n * Another example:\n */\n getSignedUrl(cfg, callback) {\n const method = ActionToHTTPMethod[cfg.action];\n const extensionHeaders = objectKeyToLowercase(cfg.extensionHeaders || {});\n if (cfg.action === 'resumable') {\n extensionHeaders['x-goog-resumable'] = 'start';\n }\n const queryParams = Object.assign({}, cfg.queryParams);\n if (typeof cfg.responseType === 'string') {\n queryParams['response-content-type'] = cfg.responseType;\n }\n if (typeof cfg.promptSaveAs === 'string') {\n queryParams['response-content-disposition'] =\n 'attachment; filename=\"' + cfg.promptSaveAs + '\"';\n }\n if (typeof cfg.responseDisposition === 'string') {\n queryParams['response-content-disposition'] = cfg.responseDisposition;\n }\n if (this.generation) {\n queryParams['generation'] = this.generation.toString();\n }\n const signConfig = {\n method,\n expires: cfg.expires,\n accessibleAt: cfg.accessibleAt,\n extensionHeaders,\n queryParams,\n contentMd5: cfg.contentMd5,\n contentType: cfg.contentType,\n host: cfg.host,\n };\n if (cfg.cname) {\n signConfig.cname = cfg.cname;\n }\n if (cfg.version) {\n signConfig.version = cfg.version;\n }\n if (cfg.virtualHostedStyle) {\n signConfig.virtualHostedStyle = cfg.virtualHostedStyle;\n }\n if (!this.signer) {\n this.signer = new URLSigner(this.storage.authClient, this.bucket, this, this.storage);\n }\n this.signer\n .getSignedUrl(signConfig)\n .then(signedUrl => callback(null, signedUrl), callback);\n }\n /**\n * @callback IsPublicCallback\n * @param {?Error} err Request error, if any.\n * @param {boolean} resp Whether file is public or not.\n */\n /**\n * @typedef {array} IsPublicResponse\n * @property {boolean} 0 Whether file is public or not.\n */\n /**\n * Check whether this file is public or not by sending\n * a HEAD request without credentials.\n * No errors from the server indicates that the current\n * file is public.\n * A 403-Forbidden error {@link https://cloud.google.com/storage/docs/json_api/v1/status-codes#403_Forbidden}\n * indicates that file is private.\n * Any other non 403 error is propagated to user.\n *\n * @param {IsPublicCallback} [callback] Callback function.\n * @returns {Promise<IsPublicResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * //-\n * // Check whether the file is publicly accessible.\n * //-\n * file.isPublic(function(err, resp) {\n * if (err) {\n * console.error(err);\n * return;\n * }\n * console.log(`the file ${file.id} is public: ${resp}`) ;\n * })\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.isPublic().then(function(data) {\n * const resp = data[0];\n * });\n * ```\n */\n isPublic(callback) {\n var _a;\n // Build any custom headers based on the defined interceptors on the parent\n // storage object and this object\n const storageInterceptors = ((_a = this.storage) === null || _a === void 0 ? void 0 : _a.interceptors) || [];\n const fileInterceptors = this.interceptors || [];\n const allInterceptors = storageInterceptors.concat(fileInterceptors);\n const headers = allInterceptors.reduce((acc, curInterceptor) => {\n const currentHeaders = curInterceptor.request({\n uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`,\n });\n Object.assign(acc, currentHeaders.headers);\n return acc;\n }, {});\n util.makeRequest({\n method: 'GET',\n uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`,\n headers,\n }, {\n retryOptions: this.storage.retryOptions,\n }, (err) => {\n if (err) {\n const apiError = err;\n if (apiError.code === 403) {\n callback(null, false);\n }\n else {\n callback(err);\n }\n }\n else {\n callback(null, true);\n }\n });\n }\n /**\n * @typedef {object} MakeFilePrivateOptions Configuration options for File#makePrivate().\n * @property {Metadata} [metadata] Define custom metadata properties to define\n * along with the operation.\n * @property {boolean} [strict] If true, set the file to be private to\n * only the owner user. Otherwise, it will be private to the project.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @callback MakeFilePrivateCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {array} MakeFilePrivateResponse\n * @property {object} 0 The full API response.\n */\n /**\n * Make a file private to the project and remove all other permissions.\n * Set `options.strict` to true to make the file private to only the owner.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation}\n *\n * @param {MakeFilePrivateOptions} [options] Configuration options.\n * @param {MakeFilePrivateCallback} [callback] Callback function.\n * @returns {Promise<MakeFilePrivateResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * //-\n * // Set the file private so only project maintainers can see and modify it.\n * //-\n * file.makePrivate(function(err) {});\n *\n * //-\n * // Set the file private so only the owner can see and modify it.\n * //-\n * file.makePrivate({ strict: true }, function(err) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.makePrivate().then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n makePrivate(optionsOrCallback, callback) {\n var _a, _b;\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n const query = {\n predefinedAcl: options.strict ? 'private' : 'projectPrivate',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n };\n if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifMetagenerationMatch) !== undefined) {\n query.ifMetagenerationMatch =\n (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch;\n delete options.preconditionOpts;\n }\n if (options.userProject) {\n query.userProject = options.userProject;\n }\n // You aren't allowed to set both predefinedAcl & acl properties on a file,\n // so acl must explicitly be nullified, destroying all previous acls on the\n // file.\n const metadata = { ...options.metadata, acl: null };\n this.setMetadata(metadata, query, callback);\n }\n /**\n * @typedef {array} MakeFilePublicResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @callback MakeFilePublicCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Set a file to be publicly readable and maintain all previous permissions.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation}\n *\n * @param {MakeFilePublicCallback} [callback] Callback function.\n * @returns {Promise<MakeFilePublicResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n *\n * file.makePublic(function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.makePublic().then(function(data) {\n * const apiResponse = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_make_public\n * Another example:\n */\n makePublic(callback) {\n callback = callback || util.noop;\n this.acl.add({\n entity: 'allUsers',\n role: 'READER',\n }, (err, acl, resp) => {\n callback(err, resp);\n });\n }\n /**\n * The public URL of this File\n * Use {@link File#makePublic} to enable anonymous access via the returned URL.\n *\n * @returns {string}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n * const file = bucket.file('my-file');\n *\n * // publicUrl will be \"https://storage.googleapis.com/albums/my-file\"\n * const publicUrl = file.publicUrl();\n * ```\n */\n publicUrl() {\n return `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`;\n }\n /**\n * @typedef {array} MoveFileAtomicResponse\n * @property {File} 0 The moved {@link File}.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback MoveFileAtomicCallback\n * @param {?Error} err Request error, if any.\n * @param {File} movedFile The moved {@link File}.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {object} MoveFileAtomicOptions Configuration options for File#moveFileAtomic(). See an\n * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n * @property {object} [preconditionOpts] Precondition options.\n * @property {number} [preconditionOpts.ifGenerationMatch] Makes the operation conditional on whether the object's current generation matches the given value.\n */\n /**\n * Move this file within the same bucket.\n * The source object must exist and be a live object.\n * The source and destination object IDs must be different.\n * Overwriting the destination object is allowed by default, but can be prevented\n * using preconditions.\n * If the destination path includes non-existent parent folders, they will be created.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/move| Objects: move API Documentation}\n *\n * @throws {Error} If the destination file is not provided.\n *\n * @param {string|File} destination Destination file name or File object within the same bucket..\n * @param {MoveFileAtomicOptions} [options] Configuration options. See an\n * @param {MoveFileAtomicCallback} [callback] Callback function.\n * @returns {Promise<MoveFileAtomicResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n *\n * //-\n * // Assume 'my-bucket' is a bucket.\n * //-\n * const bucket = storage.bucket('my-bucket');\n * const file = bucket.file('my-image.png');\n *\n * //-\n * // If you pass in a string for the destination, the file is copied to its\n * // current bucket, under the new name provided.\n * //-\n * file.moveFileAtomic('moved-image.png', function(err, movedFile, apiResponse) {\n * // `my-bucket` now contains:\n * // - \"moved-image.png\"\n *\n * // `movedFile` is an instance of a File object that refers to your new\n * // file.\n * });\n *\n * //-\n * // Move the file to a subdirectory, creating parent folders if necessary.\n * //-\n * file.moveFileAtomic('new-folder/subfolder/moved-image.png', function(err, movedFile, apiResponse) {\n * // `my-bucket` now contains:\n * // - \"new-folder/subfolder/moved-image.png\"\n * });\n *\n * //-\n * // Prevent overwriting an existing destination object using preconditions.\n * //-\n * file.moveFileAtomic('existing-destination.png', {\n * preconditionOpts: {\n * ifGenerationMatch: 0 // Fails if the destination object exists.\n * }\n * }, function(err, movedFile, apiResponse) {\n * if (err) {\n * // Handle the error (e.g., the destination object already exists).\n * } else {\n * // Move successful.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.moveFileAtomic('moved-image.png).then(function(data) {\n * const newFile = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_move_file\n * Another example:\n */\n moveFileAtomic(destination, optionsOrCallback, callback) {\n var _a, _b;\n const noDestinationError = new Error(FileExceptionMessages.DESTINATION_NO_NAME);\n if (!destination) {\n throw noDestinationError;\n }\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = { ...optionsOrCallback };\n }\n callback = callback || util.noop;\n let destName;\n let newFile;\n if (typeof destination === 'string') {\n const parsedDestination = GS_URL_REGEXP.exec(destination);\n if (parsedDestination !== null && parsedDestination.length === 3) {\n destName = parsedDestination[2];\n }\n else {\n destName = destination;\n }\n }\n else if (destination instanceof File) {\n destName = destination.name;\n newFile = destination;\n }\n else {\n throw noDestinationError;\n }\n newFile = newFile || this.bucket.file(destName);\n if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) {\n this.storage.retryOptions.autoRetry = false;\n }\n const query = {};\n if (options.userProject !== undefined) {\n query.userProject = options.userProject;\n delete options.userProject;\n }\n if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined) {\n query.ifGenerationMatch = (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch;\n delete options.preconditionOpts;\n }\n this.request({\n method: 'POST',\n uri: `/moveTo/o/${encodeURIComponent(newFile.name)}`,\n qs: query,\n json: options,\n }, (err, resp) => {\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n if (err) {\n callback(err, null, resp);\n return;\n }\n callback(null, newFile, resp);\n });\n }\n /**\n * @typedef {array} MoveResponse\n * @property {File} 0 The destination File.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback MoveCallback\n * @param {?Error} err Request error, if any.\n * @param {?File} destinationFile The destination File.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {object} MoveOptions Configuration options for File#move(). See an\n * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}.\n * @param {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * Move this file to another location. By default, this will rename the file\n * and keep it in the same bucket, but you can choose to move it to another\n * Bucket by providing a Bucket or File object or a URL beginning with\n * \"gs://\".\n *\n * **Warning**:\n * There is currently no atomic `move` method in the Cloud Storage API,\n * so this method is a composition of {@link File#copy} (to the new\n * location) and {@link File#delete} (from the old location). While\n * unlikely, it is possible that an error returned to your callback could be\n * triggered from either one of these API calls failing, which could leave a\n * duplicate file lingering. The error message will indicate what operation\n * has failed.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/copy| Objects: copy API Documentation}\n *\n * @throws {Error} If the destination file is not provided.\n *\n * @param {string|Bucket|File} destination Destination file.\n * @param {MoveCallback} [callback] Callback function.\n * @returns {Promise<MoveResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * //-\n * // You can pass in a variety of types for the destination.\n * //\n * // For all of the below examples, assume we are working with the following\n * // Bucket and File objects.\n * //-\n * const bucket = storage.bucket('my-bucket');\n * const file = bucket.file('my-image.png');\n *\n * //-\n * // If you pass in a string for the destination, the file is moved to its\n * // current bucket, under the new name provided.\n * //-\n * file.move('my-image-new.png', function(err, destinationFile, apiResponse) {\n * // `my-bucket` no longer contains:\n * // - \"my-image.png\"\n * // but contains instead:\n * // - \"my-image-new.png\"\n *\n * // `destinationFile` is an instance of a File object that refers to your\n * // new file.\n * });\n *\n * //-\n * // If you pass in a string starting with \"gs://\" for the destination, the\n * // file is copied to the other bucket and under the new name provided.\n * //-\n * const newLocation = 'gs://another-bucket/my-image-new.png';\n * file.move(newLocation, function(err, destinationFile, apiResponse) {\n * // `my-bucket` no longer contains:\n * // - \"my-image.png\"\n * //\n * // `another-bucket` now contains:\n * // - \"my-image-new.png\"\n *\n * // `destinationFile` is an instance of a File object that refers to your\n * // new file.\n * });\n *\n * //-\n * // If you pass in a Bucket object, the file will be moved to that bucket\n * // using the same name.\n * //-\n * const anotherBucket = gcs.bucket('another-bucket');\n *\n * file.move(anotherBucket, function(err, destinationFile, apiResponse) {\n * // `my-bucket` no longer contains:\n * // - \"my-image.png\"\n * //\n * // `another-bucket` now contains:\n * // - \"my-image.png\"\n *\n * // `destinationFile` is an instance of a File object that refers to your\n * // new file.\n * });\n *\n * //-\n * // If you pass in a File object, you have complete control over the new\n * // bucket and filename.\n * //-\n * const anotherFile = anotherBucket.file('my-awesome-image.png');\n *\n * file.move(anotherFile, function(err, destinationFile, apiResponse) {\n * // `my-bucket` no longer contains:\n * // - \"my-image.png\"\n * //\n * // `another-bucket` now contains:\n * // - \"my-awesome-image.png\"\n *\n * // Note:\n * // The `destinationFile` parameter is equal to `anotherFile`.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.move('my-image-new.png').then(function(data) {\n * const destinationFile = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_move_file\n * Another example:\n */\n move(destination, optionsOrCallback, callback) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n callback = callback || util.noop;\n this.copy(destination, options, (err, destinationFile, copyApiResponse) => {\n if (err) {\n err.message = 'file#copy failed with an error - ' + err.message;\n callback(err, null, copyApiResponse);\n return;\n }\n if (this.name !== destinationFile.name ||\n this.bucket.name !== destinationFile.bucket.name) {\n this.delete(options, (err, apiResponse) => {\n if (err) {\n err.message = 'file#delete failed with an error - ' + err.message;\n callback(err, destinationFile, apiResponse);\n return;\n }\n callback(null, destinationFile, copyApiResponse);\n });\n }\n else {\n callback(null, destinationFile, copyApiResponse);\n }\n });\n }\n /**\n * @typedef {array} RenameResponse\n * @property {File} 0 The destination File.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback RenameCallback\n * @param {?Error} err Request error, if any.\n * @param {?File} destinationFile The destination File.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {object} RenameOptions Configuration options for File#move(). See an\n * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}.\n * @param {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * Rename this file.\n *\n * **Warning**:\n * There is currently no atomic `rename` method in the Cloud Storage API,\n * so this method is an alias of {@link File#move}, which in turn is a\n * composition of {@link File#copy} (to the new location) and\n * {@link File#delete} (from the old location). While\n * unlikely, it is possible that an error returned to your callback could be\n * triggered from either one of these API calls failing, which could leave a\n * duplicate file lingering. The error message will indicate what operation\n * has failed.\n *\n * @param {string|File} destinationFile Destination file.\n * @param {RenameCallback} [callback] Callback function.\n * @returns {Promise<RenameResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n *\n * //-\n * // You can pass in a string or a File object.\n * //\n * // For all of the below examples, assume we are working with the following\n * // Bucket and File objects.\n * //-\n *\n * const bucket = storage.bucket('my-bucket');\n * const file = bucket.file('my-image.png');\n *\n * //-\n * // You can pass in a string for the destinationFile.\n * //-\n * file.rename('renamed-image.png', function(err, renamedFile, apiResponse) {\n * // `my-bucket` no longer contains:\n * // - \"my-image.png\"\n * // but contains instead:\n * // - \"renamed-image.png\"\n *\n * // `renamedFile` is an instance of a File object that refers to your\n * // renamed file.\n * });\n *\n * //-\n * // You can pass in a File object.\n * //-\n * const anotherFile = anotherBucket.file('my-awesome-image.png');\n *\n * file.rename(anotherFile, function(err, renamedFile, apiResponse) {\n * // `my-bucket` no longer contains:\n * // - \"my-image.png\"\n *\n * // Note:\n * // The `renamedFile` parameter is equal to `anotherFile`.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.rename('my-renamed-image.png').then(function(data) {\n * const renamedFile = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n rename(destinationFile, optionsOrCallback, callback) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n callback = callback || util.noop;\n this.move(destinationFile, options, callback);\n }\n /**\n * @typedef {object} RestoreOptions Options for File#restore(). See an\n * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}.\n * @param {string} [userProject] The ID of the project which will be\n * billed for the request.\n * @param {number} [generation] If present, selects a specific revision of this object.\n * @param {string} [restoreToken] Returns an option that must be specified when getting a soft-deleted object from an HNS-enabled\n * bucket that has a naming and generation conflict with another object in the same bucket.\n * @param {string} [projection] Specifies the set of properties to return. If used, must be 'full' or 'noAcl'.\n * @param {string | number} [ifGenerationMatch] Request proceeds if the generation of the target resource\n * matches the value used in the precondition.\n * If the values don't match, the request fails with a 412 Precondition Failed response.\n * @param {string | number} [ifGenerationNotMatch] Request proceeds if the generation of the target resource does\n * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response.\n * @param {string | number} [ifMetagenerationMatch] Request proceeds if the meta-generation of the target resource\n * matches the value used in the precondition.\n * If the values don't match, the request fails with a 412 Precondition Failed response.\n * @param {string | number} [ifMetagenerationNotMatch] Request proceeds if the meta-generation of the target resource does\n * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response.\n */\n /**\n * Restores a soft-deleted file\n * @param {RestoreOptions} options Restore options.\n * @returns {Promise<File>}\n */\n async restore(options) {\n const [file] = await this.request({\n method: 'POST',\n uri: '/restore',\n qs: options,\n });\n return file;\n }\n /**\n * Makes request and applies userProject query parameter if necessary.\n *\n * @private\n *\n * @param {object} reqOpts - The request options.\n * @param {function} callback - The callback function.\n */\n request(reqOpts, callback) {\n return this.parent.request.call(this, reqOpts, callback);\n }\n /**\n * @callback RotateEncryptionKeyCallback\n * @extends CopyCallback\n */\n /**\n * @typedef RotateEncryptionKeyResponse\n * @extends CopyResponse\n */\n /**\n * @param {string|buffer|object} RotateEncryptionKeyOptions Configuration options\n * for File#rotateEncryptionKey().\n * If a string or Buffer is provided, it is interpreted as an AES-256,\n * customer-supplied encryption key. If you'd like to use a Cloud KMS key\n * name, you must specify an options object with the property name:\n * `kmsKeyName`.\n * @param {string|buffer} [options.encryptionKey] An AES-256 encryption key.\n * @param {string} [options.kmsKeyName] A Cloud KMS key name.\n */\n /**\n * This method allows you to update the encryption key associated with this\n * file.\n *\n * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}\n *\n * @param {RotateEncryptionKeyOptions} [options] - Configuration options.\n * @param {RotateEncryptionKeyCallback} [callback]\n * @returns {Promise<File>}\n *\n * @example <caption>include:samples/encryption.js</caption>\n * region_tag:storage_rotate_encryption_key\n * Example of rotating the encryption key for this file:\n */\n rotateEncryptionKey(optionsOrCallback, callback) {\n var _a;\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n let options = {};\n if (typeof optionsOrCallback === 'string' ||\n optionsOrCallback instanceof Buffer) {\n options = {\n encryptionKey: optionsOrCallback,\n };\n }\n else if (typeof optionsOrCallback === 'object') {\n options = optionsOrCallback;\n }\n const newFile = this.bucket.file(this.id, options);\n const copyOptions = ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined\n ? { preconditionOpts: options.preconditionOpts }\n : {};\n this.copy(newFile, copyOptions, callback);\n }\n /**\n * @typedef {object} SaveOptions\n * @extends CreateWriteStreamOptions\n */\n /**\n * @callback SaveCallback\n * @param {?Error} err Request error, if any.\n */\n /**\n * Write strings or buffers to a file.\n *\n * *This is a convenience method which wraps {@link File#createWriteStream}.*\n * To upload arbitrary data to a file, please use {@link File#createWriteStream} directly.\n *\n * Resumable uploads are automatically enabled and must be shut off explicitly\n * by setting `options.resumable` to `false`.\n *\n * Multipart uploads with retryable error codes will be retried 3 times with exponential backoff.\n *\n * <p class=\"notice\">\n * There is some overhead when using a resumable upload that can cause\n * noticeable performance degradation while uploading a series of small\n * files. When uploading files less than 10MB, it is recommended that the\n * resumable feature is disabled.\n * </p>\n *\n * @param {SaveData} data The data to write to a file.\n * @param {SaveOptions} [options] See {@link File#createWriteStream}'s `options`\n * parameter.\n * @param {SaveCallback} [callback] Callback function.\n * @returns {Promise}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const file = myBucket.file('my-file');\n * const contents = 'This is the contents of the file.';\n *\n * file.save(contents, function(err) {\n * if (!err) {\n * // File written successfully.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.save(contents).then(function() {});\n * ```\n */\n save(data, optionsOrCallback, callback) {\n var _a;\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n const validationError = handleContextValidation((_a = options.metadata) === null || _a === void 0 ? void 0 : _a.contexts, callback);\n if (validationError)\n return validationError;\n let maxRetries = this.storage.retryOptions.maxRetries;\n if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) {\n maxRetries = 0;\n }\n const returnValue = AsyncRetry(async (bail) => {\n return new Promise((resolve, reject) => {\n if (maxRetries === 0) {\n this.storage.retryOptions.autoRetry = false;\n }\n const writable = this.createWriteStream(options);\n if (options.onUploadProgress) {\n writable.on('progress', options.onUploadProgress);\n }\n const handleError = (err) => {\n if (this.storage.retryOptions.autoRetry &&\n this.storage.retryOptions.retryableErrorFn(err)) {\n return reject(err);\n }\n return bail(err);\n };\n if (typeof data === 'string' ||\n Buffer.isBuffer(data) ||\n data instanceof Uint8Array) {\n writable\n .on('error', handleError)\n .on('finish', () => resolve())\n .end(data);\n }\n else {\n pipeline(data, writable, err => {\n if (err) {\n if (typeof data !== 'function') {\n // Only PipelineSourceFunction can be retried. Async-iterables\n // and Readable streams can only be consumed once.\n return bail(err);\n }\n handleError(err);\n }\n else {\n resolve();\n }\n });\n }\n });\n }, {\n retries: maxRetries,\n factor: this.storage.retryOptions.retryDelayMultiplier,\n maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds\n maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds\n });\n if (!callback) {\n return returnValue;\n }\n else {\n return returnValue\n .then(() => {\n if (callback) {\n return callback();\n }\n })\n .catch(callback);\n }\n }\n setMetadata(metadata, optionsOrCallback, cb) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n cb =\n typeof optionsOrCallback === 'function'\n ? optionsOrCallback\n : cb;\n const validationError = handleContextValidation(metadata.contexts, cb);\n if (validationError)\n return validationError;\n this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, AvailableServiceObjectMethods.setMetadata, options);\n super\n .setMetadata(metadata, options)\n .then(resp => cb(null, ...resp))\n .catch(cb)\n .finally(() => {\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n });\n }\n /**\n * @typedef {array} SetStorageClassResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @typedef {object} SetStorageClassOptions Configuration options for File#setStorageClass().\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @callback SetStorageClassCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Set the storage class for this file.\n *\n * See {@link https://cloud.google.com/storage/docs/per-object-storage-class| Per-Object Storage Class}\n * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes}\n *\n * @param {string} storageClass The new storage class. (`standard`,\n * `nearline`, `coldline`, or `archive`)\n * **Note:** The storage classes `multi_regional` and `regional`\n * are now legacy and will be deprecated in the future.\n * @param {SetStorageClassOptions} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {SetStorageClassCallback} [callback] Callback function.\n * @returns {Promise<SetStorageClassResponse>}\n *\n * @example\n * ```\n * file.setStorageClass('nearline', function(err, apiResponse) {\n * if (err) {\n * // Error handling omitted.\n * }\n *\n * // The storage class was updated successfully.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * file.setStorageClass('nearline').then(function() {});\n * ```\n */\n setStorageClass(storageClass, optionsOrCallback, callback) {\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n const req = {\n ...options,\n // In case we get input like `storageClass`, convert to `storage_class`.\n storageClass: storageClass\n .replace(/-/g, '_')\n .replace(/([a-z])([A-Z])/g, (_, low, up) => {\n return low + '_' + up;\n })\n .toUpperCase(),\n };\n this.copy(this, req, (err, file, apiResponse) => {\n if (err) {\n callback(err, apiResponse);\n return;\n }\n this.metadata = file.metadata;\n callback(null, apiResponse);\n });\n }\n /**\n * Set a user project to be billed for all requests made from this File\n * object.\n *\n * @param {string} userProject The user project.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n * const file = bucket.file('my-file');\n *\n * file.setUserProject('grape-spaceship-123');\n * ```\n */\n setUserProject(userProject) {\n this.bucket.setUserProject.call(this, userProject);\n }\n /**\n * This creates a resumable-upload upload stream.\n *\n * @param {Duplexify} stream - Duplexify stream of data to pipe to the file.\n * @param {object=} options - Configuration object.\n *\n * @private\n */\n startResumableUpload_(dup, options = {}) {\n var _a;\n (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {});\n const retryOptions = this.storage.retryOptions;\n if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options.preconditionOpts)) {\n retryOptions.autoRetry = false;\n }\n const cfg = {\n authClient: this.storage.authClient,\n apiEndpoint: this.storage.apiEndpoint,\n bucket: this.bucket.name,\n customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}),\n file: this.name,\n generation: this.generation,\n isPartialUpload: options.isPartialUpload,\n key: this.encryptionKey,\n kmsKeyName: this.kmsKeyName,\n metadata: options.metadata,\n offset: options.offset,\n predefinedAcl: options.predefinedAcl,\n private: options.private,\n public: options.public,\n uri: options.uri,\n userProject: options.userProject || this.userProject,\n retryOptions: { ...retryOptions },\n params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts,\n chunkSize: options === null || options === void 0 ? void 0 : options.chunkSize,\n highWaterMark: options === null || options === void 0 ? void 0 : options.highWaterMark,\n universeDomain: this.bucket.storage.universeDomain,\n [GCCL_GCS_CMD_KEY]: options[GCCL_GCS_CMD_KEY],\n };\n let uploadStream;\n try {\n uploadStream = resumableUpload.upload(cfg);\n }\n catch (error) {\n dup.destroy(error);\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n return;\n }\n uploadStream\n .on('response', resp => {\n dup.emit('response', resp);\n })\n .on('uri', uri => {\n dup.emit('uri', uri);\n })\n .on('metadata', metadata => {\n this.metadata = metadata;\n dup.emit('metadata');\n })\n .on('finish', () => {\n dup.emit('complete');\n })\n .on('progress', evt => dup.emit('progress', evt));\n dup.setWritable(uploadStream);\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n }\n /**\n * Takes a readable stream and pipes it to a remote file. Unlike\n * `startResumableUpload_`, which uses the resumable upload technique, this\n * method uses a simple upload (all or nothing).\n *\n * @param {Duplexify} dup - Duplexify stream of data to pipe to the file.\n * @param {object=} options - Configuration object.\n *\n * @private\n */\n startSimpleUpload_(dup, options = {}) {\n var _a;\n (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {});\n const apiEndpoint = this.storage.apiEndpoint;\n const bucketName = this.bucket.name;\n const uri = `${apiEndpoint}/upload/storage/v1/b/${bucketName}/o`;\n const reqOpts = {\n qs: {\n name: this.name,\n },\n uri: uri,\n [GCCL_GCS_CMD_KEY]: options[GCCL_GCS_CMD_KEY],\n };\n if (this.generation !== undefined) {\n reqOpts.qs.ifGenerationMatch = this.generation;\n }\n if (this.kmsKeyName !== undefined) {\n reqOpts.qs.kmsKeyName = this.kmsKeyName;\n }\n if (typeof options.timeout === 'number') {\n reqOpts.timeout = options.timeout;\n }\n if (options.userProject || this.userProject) {\n reqOpts.qs.userProject = options.userProject || this.userProject;\n }\n if (options.predefinedAcl) {\n reqOpts.qs.predefinedAcl = options.predefinedAcl;\n }\n else if (options.private) {\n reqOpts.qs.predefinedAcl = 'private';\n }\n else if (options.public) {\n reqOpts.qs.predefinedAcl = 'publicRead';\n }\n Object.assign(reqOpts.qs, this.instancePreconditionOpts, options.preconditionOpts);\n util.makeWritableStream(dup, {\n makeAuthenticatedRequest: (reqOpts) => {\n this.request(reqOpts, (err, body, resp) => {\n if (err) {\n dup.destroy(err);\n return;\n }\n this.metadata = body;\n dup.emit('metadata', body);\n dup.emit('response', resp);\n dup.emit('complete');\n });\n },\n metadata: options.metadata,\n request: reqOpts,\n });\n }\n disableAutoRetryConditionallyIdempotent_(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n coreOpts, methodType, localPreconditionOptions) {\n var _a, _b, _c, _d;\n if ((typeof coreOpts === 'object' &&\n ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined &&\n (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifGenerationMatch) === undefined &&\n methodType === AvailableServiceObjectMethods.delete &&\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryConditional) ||\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryNever) {\n this.storage.retryOptions.autoRetry = false;\n }\n if ((typeof coreOpts === 'object' &&\n ((_d = (_c = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _c === void 0 ? void 0 : _c.qs) === null || _d === void 0 ? void 0 : _d.ifMetagenerationMatch) === undefined &&\n (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined &&\n methodType === AvailableServiceObjectMethods.setMetadata &&\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryConditional) ||\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryNever) {\n this.storage.retryOptions.autoRetry = false;\n }\n }\n async getBufferFromReadable(readable) {\n const buf = [];\n for await (const chunk of readable) {\n buf.push(chunk);\n }\n return Buffer.concat(buf);\n }\n}\n_File_instances = new WeakSet(), _File_validateIntegrity = \n/**\n *\n * @param hashCalculatingStream\n * @param verify\n * @returns {boolean} Returns `true` if valid, throws with error otherwise\n */\nasync function _File_validateIntegrity(hashCalculatingStream, verify = {}) {\n const metadata = this.metadata;\n // If we're doing validation, assume the worst\n let dataMismatch = !!(verify.crc32c || verify.md5);\n if (verify.crc32c && metadata.crc32c) {\n dataMismatch = !hashCalculatingStream.test('crc32c', metadata.crc32c);\n }\n if (verify.md5 && metadata.md5Hash) {\n dataMismatch = !hashCalculatingStream.test('md5', metadata.md5Hash);\n }\n if (dataMismatch) {\n const errors = [];\n let code = '';\n let message = '';\n try {\n await this.delete();\n if (verify.md5 && !metadata.md5Hash) {\n code = 'MD5_NOT_AVAILABLE';\n message = FileExceptionMessages.MD5_NOT_AVAILABLE;\n }\n else {\n code = 'FILE_NO_UPLOAD';\n message = FileExceptionMessages.UPLOAD_MISMATCH;\n }\n }\n catch (e) {\n const error = e;\n code = 'FILE_NO_UPLOAD_DELETE';\n message = `${FileExceptionMessages.UPLOAD_MISMATCH_DELETE_FAIL}${error.message}`;\n errors.push(error);\n }\n const error = new RequestError(message);\n error.code = code;\n error.errors = errors;\n throw error;\n }\n return true;\n};\n/*! Developer Documentation\n *\n * All async methods (except for streams) will return a Promise in the event\n * that a callback is omitted.\n */\npromisifyAll(File, {\n exclude: [\n 'cloudStorageURI',\n 'publicUrl',\n 'request',\n 'save',\n 'setEncryptionKey',\n 'shouldRetryBasedOnPreconditionAndIdempotencyStrat',\n 'getBufferFromReadable',\n 'restore',\n ],\n});\n/**\n * Reference to the {@link File} class.\n * @name module:@google-cloud/storage.File\n * @see File\n */\nexport { File };\n","// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { promisifyAll } from '@google-cloud/promisify';\nimport { normalize } from './util.js';\nexport var IAMExceptionMessages;\n(function (IAMExceptionMessages) {\n IAMExceptionMessages[\"POLICY_OBJECT_REQUIRED\"] = \"A policy object is required.\";\n IAMExceptionMessages[\"PERMISSIONS_REQUIRED\"] = \"Permissions are required.\";\n})(IAMExceptionMessages || (IAMExceptionMessages = {}));\n/**\n * Get and set IAM policies for your Cloud Storage bucket.\n *\n * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management}\n * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access}\n * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles}\n *\n * @constructor Iam\n *\n * @param {Bucket} bucket The parent instance.\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n * // bucket.iam\n * ```\n */\nclass Iam {\n constructor(bucket) {\n this.request_ = bucket.request.bind(bucket);\n this.resourceId_ = 'buckets/' + bucket.getId();\n }\n /**\n * @typedef {object} GetPolicyOptions Requested options for IAM#getPolicy().\n * @property {number} [requestedPolicyVersion] The version of IAM policies to\n * request. If a policy with a condition is requested without setting\n * this, the server will return an error. This must be set to a value\n * of 3 to retrieve IAM policies containing conditions. This is to\n * prevent client code that isn't aware of IAM conditions from\n * interpreting and modifying policies incorrectly. The service might\n * return a policy with version lower than the one that was requested,\n * based on the feature syntax in the policy fetched.\n * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions}\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @typedef {array} GetPolicyResponse\n * @property {Policy} 0 The policy.\n * @property {object} 1 The full API response.\n */\n /**\n * @typedef {object} Policy\n * @property {PolicyBinding[]} policy.bindings Bindings associate members with roles.\n * @property {string} [policy.etag] Etags are used to perform a read-modify-write.\n * @property {number} [policy.version] The syntax schema version of the Policy.\n * To set an IAM policy with conditional binding, this field must be set to\n * 3 or greater.\n * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions}\n */\n /**\n * @typedef {object} PolicyBinding\n * @property {string} role Role that is assigned to members.\n * @property {string[]} members Specifies the identities requesting access for the bucket.\n * @property {Expr} [condition] The condition that is associated with this binding.\n */\n /**\n * @typedef {object} Expr\n * @property {string} [title] An optional title for the expression, i.e. a\n * short string describing its purpose. This can be used e.g. in UIs\n * which allow to enter the expression.\n * @property {string} [description] An optional description of the\n * expression. This is a longer text which describes the expression,\n * e.g. when hovered over it in a UI.\n * @property {string} expression Textual representation of an expression in\n * Common Expression Language syntax. The application context of the\n * containing message determines which well-known feature set of CEL\n * is supported.The condition that is associated with this binding.\n *\n * @see [Condition] https://cloud.google.com/storage/docs/access-control/iam#conditions\n */\n /**\n * Get the IAM policy.\n *\n * @param {GetPolicyOptions} [options] Request options.\n * @param {GetPolicyCallback} [callback] Callback function.\n * @returns {Promise<GetPolicyResponse>}\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/getIamPolicy| Buckets: setIamPolicy API Documentation}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n *\n * bucket.iam.getPolicy(\n * {requestedPolicyVersion: 3},\n * function(err, policy, apiResponse) {\n *\n * },\n * );\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.iam.getPolicy({requestedPolicyVersion: 3})\n * .then(function(data) {\n * const policy = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/iam.js</caption>\n * region_tag:storage_view_bucket_iam_members\n * Example of retrieving a bucket's IAM policy:\n */\n getPolicy(optionsOrCallback, callback) {\n const { options, callback: cb } = normalize(optionsOrCallback, callback);\n const qs = {};\n if (options.userProject) {\n qs.userProject = options.userProject;\n }\n if (options.requestedPolicyVersion !== null &&\n options.requestedPolicyVersion !== undefined) {\n qs.optionsRequestedPolicyVersion = options.requestedPolicyVersion;\n }\n this.request_({\n uri: '/iam',\n qs,\n }, cb);\n }\n /**\n * Set the IAM policy.\n *\n * @throws {Error} If no policy is provided.\n *\n * @param {Policy} policy The policy.\n * @param {SetPolicyOptions} [options] Configuration options.\n * @param {SetPolicyCallback} callback Callback function.\n * @returns {Promise<SetPolicyResponse>}\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/setIamPolicy| Buckets: setIamPolicy API Documentation}\n * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n *\n * const myPolicy = {\n * bindings: [\n * {\n * role: 'roles/storage.admin',\n * members:\n * ['serviceAccount:myotherproject@appspot.gserviceaccount.com']\n * }\n * ]\n * };\n *\n * bucket.iam.setPolicy(myPolicy, function(err, policy, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.iam.setPolicy(myPolicy).then(function(data) {\n * const policy = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/iam.js</caption>\n * region_tag:storage_add_bucket_iam_member\n * Example of adding to a bucket's IAM policy:\n *\n * @example <caption>include:samples/iam.js</caption>\n * region_tag:storage_remove_bucket_iam_member\n * Example of removing from a bucket's IAM policy:\n */\n setPolicy(policy, optionsOrCallback, callback) {\n if (policy === null || typeof policy !== 'object') {\n throw new Error(IAMExceptionMessages.POLICY_OBJECT_REQUIRED);\n }\n const { options, callback: cb } = normalize(optionsOrCallback, callback);\n let maxRetries;\n if (policy.etag === undefined) {\n maxRetries = 0;\n }\n this.request_({\n method: 'PUT',\n uri: '/iam',\n maxRetries,\n json: Object.assign({\n resourceId: this.resourceId_,\n }, policy),\n qs: options,\n }, cb);\n }\n /**\n * Test a set of permissions for a resource.\n *\n * @throws {Error} If permissions are not provided.\n *\n * @param {string|string[]} permissions The permission(s) to test for.\n * @param {TestIamPermissionsOptions} [options] Configuration object.\n * @param {TestIamPermissionsCallback} [callback] Callback function.\n * @returns {Promise<TestIamPermissionsResponse>}\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/testIamPermissions| Buckets: testIamPermissions API Documentation}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n *\n * //-\n * // Test a single permission.\n * //-\n * const test = 'storage.buckets.delete';\n *\n * bucket.iam.testPermissions(test, function(err, permissions, apiResponse) {\n * console.log(permissions);\n * // {\n * // \"storage.buckets.delete\": true\n * // }\n * });\n *\n * //-\n * // Test several permissions at once.\n * //-\n * const tests = [\n * 'storage.buckets.delete',\n * 'storage.buckets.get'\n * ];\n *\n * bucket.iam.testPermissions(tests, function(err, permissions) {\n * console.log(permissions);\n * // {\n * // \"storage.buckets.delete\": false,\n * // \"storage.buckets.get\": true\n * // }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.iam.testPermissions(test).then(function(data) {\n * const permissions = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n testPermissions(permissions, optionsOrCallback, callback) {\n if (!Array.isArray(permissions) && typeof permissions !== 'string') {\n throw new Error(IAMExceptionMessages.PERMISSIONS_REQUIRED);\n }\n const { options, callback: cb } = normalize(optionsOrCallback, callback);\n const permissionsArray = Array.isArray(permissions)\n ? permissions\n : [permissions];\n const req = Object.assign({\n permissions: permissionsArray,\n }, options);\n this.request_({\n uri: '/iam/testPermissions',\n qs: req,\n useQuerystring: true,\n }, (err, resp) => {\n if (err) {\n cb(err, null, resp);\n return;\n }\n const availablePermissions = Array.isArray(resp.permissions)\n ? resp.permissions\n : [];\n const permissionsHash = permissionsArray.reduce((acc, permission) => {\n acc[permission] = availablePermissions.indexOf(permission) > -1;\n return acc;\n }, {});\n cb(null, permissionsHash, resp);\n });\n }\n}\n/*! Developer Documentation\n *\n * All async methods (except for streams) will return a Promise in the event\n * that a callback is omitted.\n */\npromisifyAll(Iam);\nexport { Iam };\n","// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { ServiceObject } from './nodejs-common/index.js';\nimport { promisifyAll } from '@google-cloud/promisify';\n/**\n * The API-formatted resource description of the notification.\n *\n * Note: This is not guaranteed to be up-to-date when accessed. To get the\n * latest record, call the `getMetadata()` method.\n *\n * @name Notification#metadata\n * @type {object}\n */\n/**\n * A Notification object is created from your {@link Bucket} object using\n * {@link Bucket#notification}. Use it to interact with Cloud Pub/Sub\n * notifications.\n *\n * See {@link https://cloud.google.com/storage/docs/pubsub-notifications| Cloud Pub/Sub Notifications for Google Cloud Storage}\n *\n * @class\n * @hideconstructor\n *\n * @param {Bucket} bucket The bucket instance this notification is attached to.\n * @param {string} id The ID of the notification.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const notification = myBucket.notification('1');\n * ```\n */\nclass Notification extends ServiceObject {\n constructor(bucket, id) {\n const requestQueryObject = {};\n const methods = {\n /**\n * Creates a notification subscription for the bucket.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert}\n * @method Notification#create\n *\n * @param {Topic|string} topic The Cloud PubSub topic to which this\n * subscription publishes. If the project ID is omitted, the current\n * project ID will be used.\n *\n * Acceptable formats are:\n * - `projects/grape-spaceship-123/topics/my-topic`\n *\n * - `my-topic`\n * @param {CreateNotificationRequest} [options] Metadata to set for\n * the notification.\n * @param {CreateNotificationCallback} [callback] Callback function.\n * @returns {Promise<CreateNotificationResponse>}\n * @throws {Error} If a valid topic is not provided.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n * const notification = myBucket.notification('1');\n *\n * notification.create(function(err, notification, apiResponse) {\n * if (!err) {\n * // The notification was created successfully.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * notification.create().then(function(data) {\n * const notification = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n create: true,\n /**\n * @typedef {array} DeleteNotificationResponse\n * @property {object} 0 The full API response.\n */\n /**\n * Permanently deletes a notification subscription.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/delete| Notifications: delete API Documentation}\n *\n * @param {object} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {DeleteNotificationCallback} [callback] Callback function.\n * @returns {Promise<DeleteNotificationResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n * const notification = myBucket.notification('1');\n *\n * notification.delete(function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * notification.delete().then(function(data) {\n * const apiResponse = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/deleteNotification.js</caption>\n * region_tag:storage_delete_bucket_notification\n * Another example:\n */\n delete: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * Get a notification and its metadata if it exists.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation}\n *\n * @param {object} [options] Configuration options.\n * See {@link Bucket#createNotification} for create options.\n * @param {boolean} [options.autoCreate] Automatically create the object if\n * it does not exist. Default: `false`.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {GetNotificationCallback} [callback] Callback function.\n * @return {Promise<GetNotificationCallback>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n * const notification = myBucket.notification('1');\n *\n * notification.get(function(err, notification, apiResponse) {\n * // `notification.metadata` has been populated.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * notification.get().then(function(data) {\n * const notification = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n get: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * Get the notification's metadata.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation}\n *\n * @param {object} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {GetNotificationMetadataCallback} [callback] Callback function.\n * @returns {Promise<GetNotificationMetadataResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n * const notification = myBucket.notification('1');\n *\n * notification.getMetadata(function(err, metadata, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * notification.getMetadata().then(function(data) {\n * const metadata = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/getMetadataNotifications.js</caption>\n * region_tag:storage_print_pubsub_bucket_notification\n * Another example:\n */\n getMetadata: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * @typedef {array} NotificationExistsResponse\n * @property {boolean} 0 Whether the notification exists or not.\n */\n /**\n * @callback NotificationExistsCallback\n * @param {?Error} err Request error, if any.\n * @param {boolean} exists Whether the notification exists or not.\n */\n /**\n * Check if the notification exists.\n *\n * @method Notification#exists\n * @param {NotificationExistsCallback} [callback] Callback function.\n * @returns {Promise<NotificationExistsResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n * const notification = myBucket.notification('1');\n *\n * notification.exists(function(err, exists) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * notification.exists().then(function(data) {\n * const exists = data[0];\n * });\n * ```\n */\n exists: true,\n };\n super({\n parent: bucket,\n baseUrl: '/notificationConfigs',\n id: id.toString(),\n createMethod: bucket.createNotification.bind(bucket),\n methods,\n });\n }\n}\n/*! Developer Documentation\n *\n * All async methods (except for streams) will return a Promise in the event\n * that a callback is omitted.\n */\npromisifyAll(Notification);\n/**\n * Reference to the {@link Notification} class.\n * @name module:@google-cloud/storage.Notification\n * @see Notification\n */\nexport { Notification };\n","// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { ServiceObject, util, } from './nodejs-common/index.js';\nimport { paginator } from '@google-cloud/paginator';\nimport { promisifyAll } from '@google-cloud/promisify';\nimport * as fs from 'fs';\nimport mime from 'mime';\nimport * as path from 'path';\nimport pLimit from 'p-limit';\nimport { promisify } from 'util';\nimport AsyncRetry from 'async-retry';\nimport { convertObjKeysToSnakeCase, handleContextValidation } from './util.js';\nimport { Acl } from './acl.js';\nimport { File, } from './file.js';\nimport { Iam } from './iam.js';\nimport { Notification } from './notification.js';\nimport { IdempotencyStrategy, } from './storage.js';\nimport { URLSigner, } from './signer.js';\nimport { Readable } from 'stream';\nimport { URL } from 'url';\nexport var BucketActionToHTTPMethod;\n(function (BucketActionToHTTPMethod) {\n BucketActionToHTTPMethod[\"list\"] = \"GET\";\n})(BucketActionToHTTPMethod || (BucketActionToHTTPMethod = {}));\nexport var AvailableServiceObjectMethods;\n(function (AvailableServiceObjectMethods) {\n AvailableServiceObjectMethods[AvailableServiceObjectMethods[\"setMetadata\"] = 0] = \"setMetadata\";\n AvailableServiceObjectMethods[AvailableServiceObjectMethods[\"delete\"] = 1] = \"delete\";\n})(AvailableServiceObjectMethods || (AvailableServiceObjectMethods = {}));\nexport var BucketExceptionMessages;\n(function (BucketExceptionMessages) {\n BucketExceptionMessages[\"PROVIDE_SOURCE_FILE\"] = \"You must provide at least one source file.\";\n BucketExceptionMessages[\"DESTINATION_FILE_NOT_SPECIFIED\"] = \"A destination file must be specified.\";\n BucketExceptionMessages[\"CHANNEL_ID_REQUIRED\"] = \"An ID is required to create a channel.\";\n BucketExceptionMessages[\"TOPIC_NAME_REQUIRED\"] = \"A valid topic name is required.\";\n BucketExceptionMessages[\"CONFIGURATION_OBJECT_PREFIX_REQUIRED\"] = \"A configuration object with a prefix is required.\";\n BucketExceptionMessages[\"SPECIFY_FILE_NAME\"] = \"A file name must be specified.\";\n BucketExceptionMessages[\"METAGENERATION_NOT_PROVIDED\"] = \"A metageneration must be provided.\";\n BucketExceptionMessages[\"SUPPLY_NOTIFICATION_ID\"] = \"You must supply a notification ID.\";\n})(BucketExceptionMessages || (BucketExceptionMessages = {}));\n/**\n * @callback Crc32cGeneratorToStringCallback\n * A method returning the CRC32C as a base64-encoded string.\n *\n * @returns {string}\n *\n * @example\n * Hashing the string 'data' should return 'rth90Q=='\n *\n * ```js\n * const buffer = Buffer.from('data');\n * crc32c.update(buffer);\n * crc32c.toString(); // 'rth90Q=='\n * ```\n **/\n/**\n * @callback Crc32cGeneratorValidateCallback\n * A method validating a base64-encoded CRC32C string.\n *\n * @param {string} [value] base64-encoded CRC32C string to validate\n * @returns {boolean}\n *\n * @example\n * Should return `true` if the value matches, `false` otherwise\n *\n * ```js\n * const buffer = Buffer.from('data');\n * crc32c.update(buffer);\n * crc32c.validate('DkjKuA=='); // false\n * crc32c.validate('rth90Q=='); // true\n * ```\n **/\n/**\n * @callback Crc32cGeneratorUpdateCallback\n * A method for passing `Buffer`s for CRC32C generation.\n *\n * @param {Buffer} [data] data to update CRC32C value with\n * @returns {undefined}\n *\n * @example\n * Hashing buffers from 'some ' and 'text\\n'\n *\n * ```js\n * const buffer1 = Buffer.from('some ');\n * crc32c.update(buffer1);\n *\n * const buffer2 = Buffer.from('text\\n');\n * crc32c.update(buffer2);\n *\n * crc32c.toString(); // 'DkjKuA=='\n * ```\n **/\n/**\n * @typedef {object} CRC32CValidator\n * @property {Crc32cGeneratorToStringCallback}\n * @property {Crc32cGeneratorValidateCallback}\n * @property {Crc32cGeneratorUpdateCallback}\n */\n/**\n * A function that generates a CRC32C Validator. Defaults to {@link CRC32C}\n *\n * @name Bucket#crc32cGenerator\n * @type {CRC32CValidator}\n */\n/**\n * Get and set IAM policies for your bucket.\n *\n * @name Bucket#iam\n * @mixes Iam\n *\n * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management}\n * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access}\n * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * //-\n * // Get the IAM policy for your bucket.\n * //-\n * bucket.iam.getPolicy(function(err, policy) {\n * console.log(policy);\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.iam.getPolicy().then(function(data) {\n * const policy = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/iam.js</caption>\n * region_tag:storage_view_bucket_iam_members\n * Example of retrieving a bucket's IAM policy:\n *\n * @example <caption>include:samples/iam.js</caption>\n * region_tag:storage_add_bucket_iam_member\n * Example of adding to a bucket's IAM policy:\n *\n * @example <caption>include:samples/iam.js</caption>\n * region_tag:storage_remove_bucket_iam_member\n * Example of removing from a bucket's IAM policy:\n */\n/**\n * Cloud Storage uses access control lists (ACLs) to manage object and\n * bucket access. ACLs are the mechanism you use to share objects with other\n * users and allow other users to access your buckets and objects.\n *\n * An ACL consists of one or more entries, where each entry grants permissions\n * to an entity. Permissions define the actions that can be performed against\n * an object or bucket (for example, `READ` or `WRITE`); the entity defines\n * who the permission applies to (for example, a specific user or group of\n * users).\n *\n * The `acl` object on a Bucket instance provides methods to get you a list of\n * the ACLs defined on your bucket, as well as set, update, and delete them.\n *\n * Buckets also have\n * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs}\n * for all created files. Default ACLs specify permissions that all new\n * objects added to the bucket will inherit by default. You can add, delete,\n * get, and update entities and permissions for these as well with\n * {@link Bucket#acl.default}.\n *\n * See {@link http://goo.gl/6qBBPO| About Access Control Lists}\n * See {@link https://cloud.google.com/storage/docs/access-control/lists#default| Default ACLs}\n *\n * @name Bucket#acl\n * @mixes Acl\n * @property {Acl} default Cloud Storage Buckets have\n * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs}\n * for all created files. You can add, delete, get, and update entities and\n * permissions for these as well. The method signatures and examples are all\n * the same, after only prefixing the method call with `default`.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n *\n * //-\n * // Make a bucket's contents publicly readable.\n * //-\n * const myBucket = storage.bucket('my-bucket');\n *\n * const options = {\n * entity: 'allUsers',\n * role: storage.acl.READER_ROLE\n * };\n *\n * myBucket.acl.add(options, function(err, aclObject) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * myBucket.acl.add(options).then(function(data) {\n * const aclObject = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_print_bucket_acl\n * Example of printing a bucket's ACL:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_print_bucket_acl_for_user\n * Example of printing a bucket's ACL for a specific user:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_add_bucket_owner\n * Example of adding an owner to a bucket:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_remove_bucket_owner\n * Example of removing an owner from a bucket:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_add_bucket_default_owner\n * Example of adding a default owner to a bucket:\n *\n * @example <caption>include:samples/acl.js</caption>\n * region_tag:storage_remove_bucket_default_owner\n * Example of removing a default owner from a bucket:\n */\n/**\n * The API-formatted resource description of the bucket.\n *\n * Note: This is not guaranteed to be up-to-date when accessed. To get the\n * latest record, call the `getMetadata()` method.\n *\n * @name Bucket#metadata\n * @type {object}\n */\n/**\n * The bucket's name.\n * @name Bucket#name\n * @type {string}\n */\n/**\n * Get {@link File} objects for the files currently in the bucket as a\n * readable object stream.\n *\n * @method Bucket#getFilesStream\n * @param {GetFilesOptions} [query] Query object for listing files.\n * @returns {ReadableStream} A readable stream that emits {@link File} instances.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.getFilesStream()\n * .on('error', console.error)\n * .on('data', function(file) {\n * // file is a File object.\n * })\n * .on('end', function() {\n * // All files retrieved.\n * });\n *\n * //-\n * // If you anticipate many results, you can end a stream early to prevent\n * // unnecessary processing and API requests.\n * //-\n * bucket.getFilesStream()\n * .on('data', function(file) {\n * this.end();\n * });\n *\n * //-\n * // If you're filtering files with a delimiter, you should use\n * // {@link Bucket#getFiles} and set `autoPaginate: false` in order to\n * // preserve the `apiResponse` argument.\n * //-\n * const prefixes = [];\n *\n * function callback(err, files, nextQuery, apiResponse) {\n * prefixes = prefixes.concat(apiResponse.prefixes);\n *\n * if (nextQuery) {\n * bucket.getFiles(nextQuery, callback);\n * } else {\n * // prefixes = The finished array of prefixes.\n * }\n * }\n *\n * bucket.getFiles({\n * autoPaginate: false,\n * delimiter: '/'\n * }, callback);\n * ```\n */\n/**\n * Create a Bucket object to interact with a Cloud Storage bucket.\n *\n * @class\n * @hideconstructor\n *\n * @param {Storage} storage A {@link Storage} instance.\n * @param {string} name The name of the bucket.\n * @param {object} [options] Configuration object.\n * @param {string} [options.userProject] User project.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n * ```\n */\nclass Bucket extends ServiceObject {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getFilesStream(query) {\n // placeholder body, overwritten in constructor\n return new Readable();\n }\n constructor(storage, name, options) {\n var _a, _b, _c, _d;\n options = options || {};\n // Allow for \"gs://\"-style input, and strip any trailing slashes.\n name = name.replace(/^gs:\\/\\//, '').replace(/\\/+$/, '');\n const requestQueryObject = {};\n if ((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) {\n requestQueryObject.ifGenerationMatch =\n options.preconditionOpts.ifGenerationMatch;\n }\n if ((_b = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) {\n requestQueryObject.ifGenerationNotMatch =\n options.preconditionOpts.ifGenerationNotMatch;\n }\n if ((_c = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) {\n requestQueryObject.ifMetagenerationMatch =\n options.preconditionOpts.ifMetagenerationMatch;\n }\n if ((_d = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) {\n requestQueryObject.ifMetagenerationNotMatch =\n options.preconditionOpts.ifMetagenerationNotMatch;\n }\n const userProject = options.userProject;\n if (typeof userProject === 'string') {\n requestQueryObject.userProject = userProject;\n }\n const methods = {\n /**\n * Create a bucket.\n *\n * @method Bucket#create\n * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket.\n * @param {CreateBucketCallback} [callback] Callback function.\n * @returns {Promise<CreateBucketResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n * bucket.create(function(err, bucket, apiResponse) {\n * if (!err) {\n * // The bucket was created successfully.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.create().then(function(data) {\n * const bucket = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n create: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * IamDeleteBucketOptions Configuration options.\n * @property {boolean} [ignoreNotFound = false] Ignore an error if\n * the bucket does not exist.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @typedef {array} DeleteBucketResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @callback DeleteBucketCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Delete the bucket.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/delete| Buckets: delete API Documentation}\n *\n * @method Bucket#delete\n * @param {DeleteBucketOptions} [options] Configuration options.\n * @param {boolean} [options.ignoreNotFound = false] Ignore an error if\n * the bucket does not exist.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {DeleteBucketCallback} [callback] Callback function.\n * @returns {Promise<DeleteBucketResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n * bucket.delete(function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.delete().then(function(data) {\n * const apiResponse = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/buckets.js</caption>\n * region_tag:storage_delete_bucket\n * Another example:\n */\n delete: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * @typedef {object} BucketExistsOptions Configuration options for Bucket#exists().\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @typedef {array} BucketExistsResponse\n * @property {boolean} 0 Whether the {@link Bucket} exists.\n */\n /**\n * @callback BucketExistsCallback\n * @param {?Error} err Request error, if any.\n * @param {boolean} exists Whether the {@link Bucket} exists.\n */\n /**\n * Check if the bucket exists.\n *\n * @method Bucket#exists\n * @param {BucketExistsOptions} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {BucketExistsCallback} [callback] Callback function.\n * @returns {Promise<BucketExistsResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.exists(function(err, exists) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.exists().then(function(data) {\n * const exists = data[0];\n * });\n * ```\n */\n exists: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * @typedef {object} [GetBucketOptions] Configuration options for Bucket#get()\n * @property {boolean} [autoCreate] Automatically create the object if\n * it does not exist. Default: `false`\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @typedef {array} GetBucketResponse\n * @property {Bucket} 0 The {@link Bucket}.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback GetBucketCallback\n * @param {?Error} err Request error, if any.\n * @param {Bucket} bucket The {@link Bucket}.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Get a bucket if it exists.\n *\n * You may optionally use this to \"get or create\" an object by providing\n * an object with `autoCreate` set to `true`. Any extra configuration that\n * is normally required for the `create` method must be contained within\n * this object as well.\n *\n * @method Bucket#get\n * @param {GetBucketOptions} [options] Configuration options.\n * @param {boolean} [options.autoCreate] Automatically create the object if\n * it does not exist. Default: `false`\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {GetBucketCallback} [callback] Callback function.\n * @returns {Promise<GetBucketResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.get(function(err, bucket, apiResponse) {\n * // `bucket.metadata` has been populated.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.get().then(function(data) {\n * const bucket = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n get: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * @typedef {array} GetBucketMetadataResponse\n * @property {object} 0 The bucket metadata.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback GetBucketMetadataCallback\n * @param {?Error} err Request error, if any.\n * @param {object} metadata The bucket metadata.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {object} GetBucketMetadataOptions Configuration options for Bucket#getMetadata().\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * Get the bucket's metadata.\n *\n * To set metadata, see {@link Bucket#setMetadata}.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/get| Buckets: get API Documentation}\n *\n * @method Bucket#getMetadata\n * @param {GetBucketMetadataOptions} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {GetBucketMetadataCallback} [callback] Callback function.\n * @returns {Promise<GetBucketMetadataResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.getMetadata(function(err, metadata, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.getMetadata().then(function(data) {\n * const metadata = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/requesterPays.js</caption>\n * region_tag:storage_get_requester_pays_status\n * Example of retrieving the requester pays status of a bucket:\n */\n getMetadata: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n /**\n * @typedef {object} SetBucketMetadataOptions Configuration options for Bucket#setMetadata().\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @typedef {array} SetBucketMetadataResponse\n * @property {object} apiResponse The full API response.\n */\n /**\n * @callback SetBucketMetadataCallback\n * @param {?Error} err Request error, if any.\n * @param {object} metadata The bucket metadata.\n */\n /**\n * Set the bucket's metadata.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation}\n *\n * @method Bucket#setMetadata\n * @param {object<string, *>} metadata The metadata you wish to set.\n * @param {SetBucketMetadataOptions} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {SetBucketMetadataCallback} [callback] Callback function.\n * @returns {Promise<SetBucketMetadataResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * //-\n * // Set website metadata field on the bucket.\n * //-\n * const metadata = {\n * website: {\n * mainPageSuffix: 'http://example.com',\n * notFoundPage: 'http://example.com/404.html'\n * }\n * };\n *\n * bucket.setMetadata(metadata, function(err, apiResponse) {});\n *\n * //-\n * // Enable versioning for your bucket.\n * //-\n * bucket.setMetadata({\n * versioning: {\n * enabled: true\n * }\n * }, function(err, apiResponse) {});\n *\n * //-\n * // Enable KMS encryption for objects within this bucket.\n * //-\n * bucket.setMetadata({\n * encryption: {\n * defaultKmsKeyName: 'projects/grape-spaceship-123/...'\n * }\n * }, function(err, apiResponse) {});\n *\n * //-\n * // Enforce CMEK-only encryption for new objects.\n * // This blocks Google-Managed and Customer-Supplied keys.\n * //-\n * bucket.setMetadata({\n * encryption: {\n * defaultKmsKeyName: 'projects/grape-spaceship-123/...',\n * googleManagedEncryptionEnforcementConfig: {\n * restrictionMode: 'FullyRestricted'\n * },\n * customerSuppliedEncryptionEnforcementConfig: {\n * restrictionMode: 'FullyRestricted'\n * },\n * customerManagedEncryptionEnforcementConfig: {\n * restrictionMode: 'NotRestricted'\n * }\n * }\n * }, function(err, apiResponse) {});\n *\n * //-\n * // Set the default event-based hold value for new objects in this\n * // bucket.\n * //-\n * bucket.setMetadata({\n * defaultEventBasedHold: true\n * }, function(err, apiResponse) {});\n *\n * //-\n * // Remove object lifecycle rules.\n * //-\n * bucket.setMetadata({\n * lifecycle: null\n * }, function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.setMetadata(metadata).then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n setMetadata: {\n reqOpts: {\n qs: requestQueryObject,\n },\n },\n };\n super({\n parent: storage,\n baseUrl: '/b',\n id: name,\n createMethod: storage.createBucket.bind(storage),\n methods,\n });\n /**\n * Indicates whether this Bucket object is a placeholder for an item\n * that the API failed to retrieve (unreachable) due to partial failure.\n * Consumers must check this flag before accessing other properties.\n */\n this.unreachable = false;\n this.name = name;\n this.storage = storage;\n this.userProject = options.userProject;\n this.acl = new Acl({\n request: this.request.bind(this),\n pathPrefix: '/acl',\n });\n this.acl.default = new Acl({\n request: this.request.bind(this),\n pathPrefix: '/defaultObjectAcl',\n });\n this.crc32cGenerator =\n options.crc32cGenerator || this.storage.crc32cGenerator;\n this.iam = new Iam(this);\n this.getFilesStream = paginator.streamify('getFiles');\n this.instanceRetryValue = storage.retryOptions.autoRetry;\n this.instancePreconditionOpts = options === null || options === void 0 ? void 0 : options.preconditionOpts;\n }\n /**\n * The bucket's Cloud Storage URI (`gs://`)\n *\n * @example\n * ```ts\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n *\n * // `gs://my-bucket`\n * const href = bucket.cloudStorageURI.href;\n * ```\n */\n get cloudStorageURI() {\n const uri = new URL('gs://');\n uri.host = this.name;\n return uri;\n }\n /**\n * @typedef {object} AddLifecycleRuleOptions Configuration options for Bucket#addLifecycleRule().\n * @property {boolean} [append=true] The new rules will be appended to any\n * pre-existing rules.\n */\n /**\n *\n * @typedef {object} LifecycleRule The new lifecycle rule to be added to objects\n * in this bucket.\n * @property {string|object} action The action to be taken upon matching of\n * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'.\n * **Note**: For configuring a raw-formatted rule object to be passed as `action`\n * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}.\n * @property {object} condition Condition a bucket must meet before the\n * action occurs on the bucket. Refer to following supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}.\n * @property {string} [storageClass] When using the `setStorageClass`\n * action, provide this option to dictate which storage class the object\n * should update to. Please see\n * [SetStorageClass option documentation]{@link https://cloud.google.com/storage/docs/lifecycle#setstorageclass} for supported transitions.\n */\n /**\n * Add an object lifecycle management rule to the bucket.\n *\n * By default, an Object Lifecycle Management rule provided to this method\n * will be included to the existing policy. To replace all existing rules,\n * supply the `options` argument, setting `append` to `false`.\n *\n * To add multiple rules, pass a list to the `rule` parameter. Calling this\n * function multiple times asynchronously does not guarantee that all rules\n * are added correctly.\n *\n * See {@link https://cloud.google.com/storage/docs/lifecycle| Object Lifecycle Management}\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation}\n *\n * @param {LifecycleRule|LifecycleRule[]} rule The new lifecycle rule or rules to be added to objects\n * in this bucket.\n * @param {string|object} rule.action The action to be taken upon matching of\n * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'.\n * **Note**: For configuring a raw-formatted rule object to be passed as `action`\n * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}.\n * @param {object} rule.condition Condition a bucket must meet before the\n * action occurs on the bucket. Refer to following supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}.\n * @param {string} [rule.storageClass] When using the `setStorageClass`\n * action, provide this option to dictate which storage class the object\n * should update to.\n * @param {AddLifecycleRuleOptions} [options] Configuration object.\n * @param {boolean} [options.append=true] Append the new rule to the existing\n * policy.\n * @param {SetBucketMetadataCallback} [callback] Callback function.\n * @returns {Promise<SetBucketMetadataResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * //-\n * // Automatically have an object deleted from this bucket once it is 3 years\n * // of age.\n * //-\n * bucket.addLifecycleRule({\n * action: 'delete',\n * condition: {\n * age: 365 * 3 // Specified in days.\n * }\n * }, function(err, apiResponse) {\n * if (err) {\n * // Error handling omitted.\n * }\n *\n * const lifecycleRules = bucket.metadata.lifecycle.rule;\n *\n * // Iterate over the Object Lifecycle Management rules on this bucket.\n * lifecycleRules.forEach(lifecycleRule => {});\n * });\n *\n * //-\n * // By default, the rule you provide will be added to the existing policy.\n * // Optionally, you can disable this behavior to replace all of the\n * // pre-existing rules.\n * //-\n * const options = {\n * append: false\n * };\n *\n * bucket.addLifecycleRule({\n * action: 'delete',\n * condition: {\n * age: 365 * 3 // Specified in days.\n * }\n * }, options, function(err, apiResponse) {\n * if (err) {\n * // Error handling omitted.\n * }\n *\n * // All rules have been replaced with the new \"delete\" rule.\n *\n * // Iterate over the Object Lifecycle Management rules on this bucket.\n * lifecycleRules.forEach(lifecycleRule => {});\n * });\n *\n * //-\n * // For objects created before 2018, \"downgrade\" the storage class.\n * //-\n * bucket.addLifecycleRule({\n * action: 'setStorageClass',\n * storageClass: 'COLDLINE',\n * condition: {\n * createdBefore: new Date('2018')\n * }\n * }, function(err, apiResponse) {});\n *\n * //-\n * // Delete objects created before 2016 which have the Coldline storage\n * // class.\n * //-\n * bucket.addLifecycleRule({\n * action: 'delete',\n * condition: {\n * matchesStorageClass: [\n * 'COLDLINE'\n * ],\n * createdBefore: new Date('2016')\n * }\n * }, function(err, apiResponse) {});\n *\n * //-\n * // Delete object that has a noncurrent timestamp that is at least 100 days.\n * //-\n * bucket.addLifecycleRule({\n * action: 'delete',\n * condition: {\n * daysSinceNoncurrentTime: 100\n * }\n * }, function(err, apiResponse) {});\n *\n * //-\n * // Delete object that has a noncurrent timestamp before 2020-01-01.\n * //-\n * bucket.addLifecycleRule({\n * action: 'delete',\n * condition: {\n * noncurrentTimeBefore: new Date('2020-01-01')\n * }\n * }, function(err, apiResponse) {});\n *\n * //-\n * // Delete object that has a customTime that is at least 100 days.\n * //-\n * bucket.addLifecycleRule({\n * action: 'delete',\n * condition: {\n * daysSinceCustomTime: 100\n * }\n * }, function(err, apiResponse) ());\n *\n * //-\n * // Delete object that has a customTime before 2020-01-01.\n * //-\n * bucket.addLifecycleRule({\n * action: 'delete',\n * condition: {\n * customTimeBefore: new Date('2020-01-01')\n * }\n * }, function(err, apiResponse) {});\n * ```\n */\n addLifecycleRule(rule, optionsOrCallback, callback) {\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = optionsOrCallback;\n }\n options = options || {};\n const rules = Array.isArray(rule) ? rule : [rule];\n for (const curRule of rules) {\n if (curRule.condition.createdBefore instanceof Date) {\n curRule.condition.createdBefore = curRule.condition.createdBefore\n .toISOString()\n .replace(/T.+$/, '');\n }\n if (curRule.condition.customTimeBefore instanceof Date) {\n curRule.condition.customTimeBefore = curRule.condition.customTimeBefore\n .toISOString()\n .replace(/T.+$/, '');\n }\n if (curRule.condition.noncurrentTimeBefore instanceof Date) {\n curRule.condition.noncurrentTimeBefore =\n curRule.condition.noncurrentTimeBefore\n .toISOString()\n .replace(/T.+$/, '');\n }\n }\n if (options.append === false) {\n this.setMetadata({ lifecycle: { rule: rules } }, options, callback);\n return;\n }\n // The default behavior appends the previously-defined lifecycle rules with\n // the new ones just passed in by the user.\n this.getMetadata((err, metadata) => {\n var _a, _b;\n if (err) {\n callback(err);\n return;\n }\n const currentLifecycleRules = Array.isArray((_a = metadata.lifecycle) === null || _a === void 0 ? void 0 : _a.rule)\n ? (_b = metadata.lifecycle) === null || _b === void 0 ? void 0 : _b.rule\n : [];\n this.setMetadata({\n lifecycle: { rule: currentLifecycleRules.concat(rules) },\n }, options, callback);\n });\n }\n /**\n * @typedef {object} CombineOptions\n * @property {string} [kmsKeyName] Resource name of the Cloud KMS key, of\n * the form\n * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`,\n * that will be used to encrypt the object. Overwrites the object\n * metadata's `kms_key_name` value, if any.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @callback CombineCallback\n * @param {?Error} err Request error, if any.\n * @param {File} newFile The new {@link File}.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {array} CombineResponse\n * @property {File} 0 The new {@link File}.\n * @property {object} 1 The full API response.\n */\n /**\n * Combine multiple files into one new file.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/compose| Objects: compose API Documentation}\n *\n * @throws {Error} if a non-array is provided as sources argument.\n * @throws {Error} if no sources are provided.\n * @throws {Error} if no destination is provided.\n *\n * @param {string[]|File[]} sources The source files that will be\n * combined.\n * @param {string|File} destination The file you would like the\n * source files combined into.\n * @param {CombineOptions} [options] Configuration options.\n * @param {string} [options.kmsKeyName] Resource name of the Cloud KMS key, of\n * the form\n * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`,\n * that will be used to encrypt the object. Overwrites the object\n * metadata's `kms_key_name` value, if any.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n \n * @param {CombineCallback} [callback] Callback function.\n * @returns {Promise<CombineResponse>}\n *\n * @example\n * ```\n * const logBucket = storage.bucket('log-bucket');\n *\n * const sources = [\n * logBucket.file('2013-logs.txt'),\n * logBucket.file('2014-logs.txt')\n * ];\n *\n * const allLogs = logBucket.file('all-logs.txt');\n *\n * logBucket.combine(sources, allLogs, function(err, newFile, apiResponse) {\n * // newFile === allLogs\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * logBucket.combine(sources, allLogs).then(function(data) {\n * const newFile = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n combine(sources, destination, optionsOrCallback, callback) {\n var _a;\n if (!Array.isArray(sources) || sources.length === 0) {\n throw new Error(BucketExceptionMessages.PROVIDE_SOURCE_FILE);\n }\n if (!destination) {\n throw new Error(BucketExceptionMessages.DESTINATION_FILE_NOT_SPECIFIED);\n }\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = optionsOrCallback;\n }\n if (options.contexts) {\n const validationError = handleContextValidation(options.contexts, callback);\n if (validationError)\n return validationError;\n }\n this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, // Not relevant but param is required\n AvailableServiceObjectMethods.setMetadata, // Same as above\n options);\n const convertToFile = (file) => {\n if (file instanceof File) {\n return file;\n }\n return this.file(file);\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sources = sources.map(convertToFile);\n const destinationFile = convertToFile(destination);\n callback = callback || util.noop;\n if (!destinationFile.metadata.contentType) {\n const destinationContentType = mime.getType(destinationFile.name) || undefined;\n if (destinationContentType) {\n destinationFile.metadata.contentType = destinationContentType;\n }\n }\n let maxRetries = this.storage.retryOptions.maxRetries;\n if ((((_a = destinationFile === null || destinationFile === void 0 ? void 0 : destinationFile.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) ===\n undefined &&\n options.ifGenerationMatch === undefined &&\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryConditional) ||\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryNever) {\n maxRetries = 0;\n }\n if (options.ifGenerationMatch === undefined) {\n Object.assign(options, destinationFile.instancePreconditionOpts, options);\n }\n // Make the request from the destination File object.\n destinationFile.request({\n method: 'POST',\n uri: '/compose',\n maxRetries,\n json: {\n destination: {\n contentType: destinationFile.metadata.contentType,\n contentEncoding: destinationFile.metadata.contentEncoding,\n contexts: options.contexts || destinationFile.metadata.contexts,\n },\n sourceObjects: sources.map(source => {\n const sourceObject = {\n name: source.name,\n };\n if (source.metadata && source.metadata.generation) {\n sourceObject.generation = parseInt(source.metadata.generation.toString());\n }\n return sourceObject;\n }),\n },\n qs: options,\n }, (err, resp) => {\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n if (err) {\n callback(err, null, resp);\n return;\n }\n callback(null, destinationFile, resp);\n });\n }\n /**\n * See a {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll request body}.\n *\n * @typedef {object} CreateChannelConfig\n * @property {string} address The address where notifications are\n * delivered for this channel.\n * @property {string} [delimiter] Returns results in a directory-like mode.\n * @property {number} [maxResults] Maximum number of `items` plus `prefixes`\n * to return in a single page of responses.\n * @property {string} [pageToken] A previously-returned page token\n * representing part of the larger set of results to view.\n * @property {string} [prefix] Filter results to objects whose names begin\n * with this prefix.\n * @property {string} [projection=noAcl] Set of properties to return.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n * @property {boolean} [versions=false] If `true`, lists all versions of an object\n * as distinct results.\n */\n /**\n * @typedef {object} CreateChannelOptions\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @typedef {array} CreateChannelResponse\n * @property {Channel} 0 The new {@link Channel}.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback CreateChannelCallback\n * @param {?Error} err Request error, if any.\n * @param {Channel} channel The new {@link Channel}.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Create a channel that will be notified when objects in this bucket changes.\n *\n * @throws {Error} If an ID is not provided.\n * @throws {Error} If an address is not provided.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll API Documentation}\n *\n * @param {string} id The ID of the channel to create.\n * @param {CreateChannelConfig} config Configuration for creating channel.\n * @param {string} config.address The address where notifications are\n * delivered for this channel.\n * @param {string} [config.delimiter] Returns results in a directory-like mode.\n * @param {number} [config.maxResults] Maximum number of `items` plus `prefixes`\n * to return in a single page of responses.\n * @param {string} [config.pageToken] A previously-returned page token\n * representing part of the larger set of results to view.\n * @param {string} [config.prefix] Filter results to objects whose names begin\n * with this prefix.\n * @param {string} [config.projection=noAcl] Set of properties to return.\n * @param {string} [config.userProject] The ID of the project which will be\n * billed for the request.\n * @param {boolean} [config.versions=false] If `true`, lists all versions of an object\n * as distinct results.\n * @param {CreateChannelOptions} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {CreateChannelCallback} [callback] Callback function.\n * @returns {Promise<CreateChannelResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n * const id = 'new-channel-id';\n *\n * const config = {\n * address: 'https://...'\n * };\n *\n * bucket.createChannel(id, config, function(err, channel, apiResponse) {\n * if (!err) {\n * // Channel created successfully.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.createChannel(id, config).then(function(data) {\n * const channel = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n createChannel(id, config, optionsOrCallback, callback) {\n if (typeof id !== 'string') {\n throw new Error(BucketExceptionMessages.CHANNEL_ID_REQUIRED);\n }\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = optionsOrCallback;\n }\n this.request({\n method: 'POST',\n uri: '/o/watch',\n json: Object.assign({\n id,\n type: 'web_hook',\n }, config),\n qs: options,\n }, (err, apiResponse) => {\n if (err) {\n callback(err, null, apiResponse);\n return;\n }\n const resourceId = apiResponse.resourceId;\n const channel = this.storage.channel(id, resourceId);\n channel.metadata = apiResponse;\n callback(null, channel, apiResponse);\n });\n }\n /**\n * Metadata to set for the Notification.\n *\n * @typedef {object} CreateNotificationOptions\n * @property {object} [customAttributes] An optional list of additional\n * attributes to attach to each Cloud PubSub message published for this\n * notification subscription.\n * @property {string[]} [eventTypes] If present, only send notifications about\n * listed event types. If empty, sent notifications for all event types.\n * @property {string} [objectNamePrefix] If present, only apply this\n * notification configuration to object names that begin with this prefix.\n * @property {string} [payloadFormat] The desired content of the Payload.\n * Defaults to `JSON_API_V1`.\n *\n * Acceptable values are:\n * - `JSON_API_V1`\n *\n * - `NONE`\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @callback CreateNotificationCallback\n * @param {?Error} err Request error, if any.\n * @param {Notification} notification The new {@link Notification}.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {array} CreateNotificationResponse\n * @property {Notification} 0 The new {@link Notification}.\n * @property {object} 1 The full API response.\n */\n /**\n * Creates a notification subscription for the bucket.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert}\n *\n * @param {Topic|string} topic The Cloud PubSub topic to which this\n * subscription publishes. If the project ID is omitted, the current\n * project ID will be used.\n *\n * Acceptable formats are:\n * - `projects/grape-spaceship-123/topics/my-topic`\n *\n * - `my-topic`\n * @param {CreateNotificationOptions} [options] Metadata to set for the\n * notification.\n * @param {object} [options.customAttributes] An optional list of additional\n * attributes to attach to each Cloud PubSub message published for this\n * notification subscription.\n * @param {string[]} [options.eventTypes] If present, only send notifications about\n * listed event types. If empty, sent notifications for all event types.\n * @param {string} [options.objectNamePrefix] If present, only apply this\n * notification configuration to object names that begin with this prefix.\n * @param {string} [options.payloadFormat] The desired content of the Payload.\n * Defaults to `JSON_API_V1`.\n *\n * Acceptable values are:\n * - `JSON_API_V1`\n *\n * - `NONE`\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {CreateNotificationCallback} [callback] Callback function.\n * @returns {Promise<CreateNotificationResponse>}\n * @throws {Error} If a valid topic is not provided.\n * @see Notification#create\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * const callback = function(err, notification, apiResponse) {\n * if (!err) {\n * // The notification was created successfully.\n * }\n * };\n *\n * myBucket.createNotification('my-topic', callback);\n *\n * //-\n * // Configure the notification by providing Notification metadata.\n * //-\n * const metadata = {\n * objectNamePrefix: 'prefix-'\n * };\n *\n * myBucket.createNotification('my-topic', metadata, callback);\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * myBucket.createNotification('my-topic').then(function(data) {\n * const notification = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/createNotification.js</caption>\n * region_tag:storage_create_bucket_notifications\n * Another example:\n */\n createNotification(topic, optionsOrCallback, callback) {\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = optionsOrCallback;\n }\n const topicIsObject = topic !== null && typeof topic === 'object';\n if (topicIsObject && util.isCustomType(topic, 'pubsub/topic')) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n topic = topic.name;\n }\n if (typeof topic !== 'string') {\n throw new Error(BucketExceptionMessages.TOPIC_NAME_REQUIRED);\n }\n const body = Object.assign({ topic }, options);\n if (body.topic.indexOf('projects') !== 0) {\n body.topic = 'projects/{{projectId}}/topics/' + body.topic;\n }\n body.topic = `//pubsub.${this.storage.universeDomain}/` + body.topic;\n if (!body.payloadFormat) {\n body.payloadFormat = 'JSON_API_V1';\n }\n const query = {};\n if (body.userProject) {\n query.userProject = body.userProject;\n delete body.userProject;\n }\n this.request({\n method: 'POST',\n uri: '/notificationConfigs',\n json: convertObjKeysToSnakeCase(body),\n qs: query,\n maxRetries: 0, //explicitly set this value since this is a non-idempotent function\n }, (err, apiResponse) => {\n if (err) {\n callback(err, null, apiResponse);\n return;\n }\n const notification = this.notification(apiResponse.id);\n notification.metadata = apiResponse;\n callback(null, notification, apiResponse);\n });\n }\n /**\n * @typedef {object} DeleteFilesOptions Query object. See {@link Bucket#getFiles}\n * for all of the supported properties.\n * @property {boolean} [force] Suppress errors until all files have been\n * processed.\n */\n /**\n * @callback DeleteFilesCallback\n * @param {?Error|?Error[]} err Request error, if any, or array of errors from\n * files that were not able to be deleted.\n * @param {object} [apiResponse] The full API response.\n */\n /**\n * Iterate over the bucket's files, calling `file.delete()` on each.\n *\n * <strong>This is not an atomic request.</strong> A delete attempt will be\n * made for each file individually. Any one can fail, in which case only a\n * portion of the files you intended to be deleted would have.\n *\n * Operations are performed in parallel, up to 10 at once. The first error\n * breaks the loop and will execute the provided callback with it. Specify\n * `{ force: true }` to suppress the errors until all files have had a chance\n * to be processed.\n *\n * File preconditions cannot be passed to this function. It will not retry unless\n * the idempotency strategy is set to retry always.\n *\n * The `query` object passed as the first argument will also be passed to\n * {@link Bucket#getFiles}.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation}\n *\n * @param {DeleteFilesOptions} [query] Query object. See {@link Bucket#getFiles}\n * @param {boolean} [query.force] Suppress errors until all files have been\n * processed.\n * @param {DeleteFilesCallback} [callback] Callback function.\n * @returns {Promise}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * //-\n * // Delete all of the files in the bucket.\n * //-\n * bucket.deleteFiles(function(err) {});\n *\n * //-\n * // By default, if a file cannot be deleted, this method will stop deleting\n * // files from your bucket. You can override this setting with `force:\n * // true`.\n * //-\n * bucket.deleteFiles({\n * force: true\n * }, function(errors) {\n * // `errors`:\n * // Array of errors if any occurred, otherwise null.\n * });\n *\n * //-\n * // The first argument to this method acts as a query to\n * // {@link Bucket#getFiles}. As an example, you can delete files\n * // which match a prefix.\n * //-\n * bucket.deleteFiles({\n * prefix: 'images/'\n * }, function(err) {\n * if (!err) {\n * // All files in the `images` directory have been deleted.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.deleteFiles().then(function() {});\n * ```\n */\n deleteFiles(queryOrCallback, callback) {\n let query = {};\n if (typeof queryOrCallback === 'function') {\n callback = queryOrCallback;\n }\n else if (queryOrCallback) {\n query = queryOrCallback;\n }\n const MAX_PARALLEL_LIMIT = 10;\n const MAX_QUEUE_SIZE = 1000;\n const errors = [];\n const deleteFile = (file) => {\n return file.delete(query).catch(err => {\n if (!query.force) {\n throw err;\n }\n errors.push(err);\n });\n };\n (async () => {\n try {\n let promises = [];\n const limit = pLimit(MAX_PARALLEL_LIMIT);\n const filesStream = this.getFilesStream(query);\n for await (const curFile of filesStream) {\n if (promises.length >= MAX_QUEUE_SIZE) {\n await Promise.all(promises);\n promises = [];\n }\n promises.push(limit(() => deleteFile(curFile)).catch(e => {\n filesStream.destroy();\n throw e;\n }));\n }\n await Promise.all(promises);\n callback(errors.length > 0 ? errors : null);\n }\n catch (e) {\n callback(e);\n return;\n }\n })();\n }\n /**\n * @deprecated\n * @typedef {array} DeleteLabelsResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @deprecated\n * @callback DeleteLabelsCallback\n * @param {?Error} err Request error, if any.\n * @param {object} metadata Bucket's metadata.\n */\n /**\n * @deprecated Use setMetadata directly\n * Delete one or more labels from this bucket.\n *\n * @param {string|string[]} [labels] The labels to delete. If no labels are\n * provided, all of the labels are removed.\n * @param {DeleteLabelsCallback} [callback] Callback function.\n * @param {DeleteLabelsOptions} [options] Options, including precondition options\n * @returns {Promise<DeleteLabelsResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * //-\n * // Delete all of the labels from this bucket.\n * //-\n * bucket.deleteLabels(function(err, apiResponse) {});\n *\n * //-\n * // Delete a single label.\n * //-\n * bucket.deleteLabels('labelone', function(err, apiResponse) {});\n *\n * //-\n * // Delete a specific set of labels.\n * //-\n * bucket.deleteLabels([\n * 'labelone',\n * 'labeltwo'\n * ], function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.deleteLabels().then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n deleteLabels(labelsOrCallbackOrOptions, optionsOrCallback, callback) {\n let labels = new Array();\n let options = {};\n if (typeof labelsOrCallbackOrOptions === 'function') {\n callback = labelsOrCallbackOrOptions;\n }\n else if (typeof labelsOrCallbackOrOptions === 'string') {\n labels = [labelsOrCallbackOrOptions];\n }\n else if (Array.isArray(labelsOrCallbackOrOptions)) {\n labels = labelsOrCallbackOrOptions;\n }\n else if (labelsOrCallbackOrOptions) {\n options = labelsOrCallbackOrOptions;\n }\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = optionsOrCallback;\n }\n const deleteLabels = (labels) => {\n const nullLabelMap = labels.reduce((nullLabelMap, labelKey) => {\n nullLabelMap[labelKey] = null;\n return nullLabelMap;\n }, {});\n if ((options === null || options === void 0 ? void 0 : options.ifMetagenerationMatch) !== undefined) {\n this.setLabels(nullLabelMap, options, callback);\n }\n else {\n this.setLabels(nullLabelMap, callback);\n }\n };\n if (labels.length === 0) {\n this.getLabels((err, labels) => {\n if (err) {\n callback(err);\n return;\n }\n deleteLabels(Object.keys(labels));\n });\n }\n else {\n deleteLabels(labels);\n }\n }\n /**\n * @typedef {array} DisableRequesterPaysResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @callback DisableRequesterPaysCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * <div class=\"notice\">\n * <strong>Early Access Testers Only</strong>\n * <p>\n * This feature is not yet widely-available.\n * </p>\n * </div>\n *\n * Disable `requesterPays` functionality from this bucket.\n *\n * @param {DisableRequesterPaysCallback} [callback] Callback function.\n * @param {DisableRequesterPaysOptions} [options] Options, including precondition options\n * @returns {Promise<DisableRequesterPaysCallback>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.disableRequesterPays(function(err, apiResponse) {\n * if (!err) {\n * // requesterPays functionality disabled successfully.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.disableRequesterPays().then(function(data) {\n * const apiResponse = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/requesterPays.js</caption>\n * region_tag:storage_disable_requester_pays\n * Example of disabling requester pays:\n */\n disableRequesterPays(optionsOrCallback, callback) {\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = optionsOrCallback;\n }\n this.setMetadata({\n billing: {\n requesterPays: false,\n },\n }, options, callback);\n }\n /**\n * Configuration object for enabling logging.\n *\n * @typedef {object} EnableLoggingOptions\n * @property {string|Bucket} [bucket] The bucket for the log entries. By\n * default, the current bucket is used.\n * @property {string} prefix A unique prefix for log object names.\n */\n /**\n * Enable logging functionality for this bucket. This will make two API\n * requests, first to grant Cloud Storage WRITE permission to the bucket, then\n * to set the appropriate configuration on the Bucket's metadata.\n *\n * @param {EnableLoggingOptions} config Configuration options.\n * @param {string|Bucket} [config.bucket] The bucket for the log entries. By\n * default, the current bucket is used.\n * @param {string} config.prefix A unique prefix for log object names.\n * @param {SetBucketMetadataCallback} [callback] Callback function.\n * @returns {Promise<SetBucketMetadataResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * const config = {\n * prefix: 'log'\n * };\n *\n * bucket.enableLogging(config, function(err, apiResponse) {\n * if (!err) {\n * // Logging functionality enabled successfully.\n * }\n * });\n *\n * ```\n * @example\n * Optionally, provide a destination bucket.\n * ```\n * const config = {\n * prefix: 'log',\n * bucket: 'destination-bucket'\n * };\n *\n * bucket.enableLogging(config, function(err, apiResponse) {});\n * ```\n *\n * @example\n * If the callback is omitted, we'll return a Promise.\n * ```\n * bucket.enableLogging(config).then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n enableLogging(config, callback) {\n if (!config ||\n typeof config === 'function' ||\n typeof config.prefix === 'undefined') {\n throw new Error(BucketExceptionMessages.CONFIGURATION_OBJECT_PREFIX_REQUIRED);\n }\n let logBucket = this.id;\n if (config.bucket && config.bucket instanceof Bucket) {\n logBucket = config.bucket.id;\n }\n else if (config.bucket && typeof config.bucket === 'string') {\n logBucket = config.bucket;\n }\n const options = {};\n if (config === null || config === void 0 ? void 0 : config.ifMetagenerationMatch) {\n options.ifMetagenerationMatch = config.ifMetagenerationMatch;\n }\n if (config === null || config === void 0 ? void 0 : config.ifMetagenerationNotMatch) {\n options.ifMetagenerationNotMatch = config.ifMetagenerationNotMatch;\n }\n (async () => {\n try {\n const [policy] = await this.iam.getPolicy();\n policy.bindings.push({\n members: ['group:cloud-storage-analytics@google.com'],\n role: 'roles/storage.objectCreator',\n });\n await this.iam.setPolicy(policy);\n this.setMetadata({\n logging: {\n logBucket,\n logObjectPrefix: config.prefix,\n },\n }, options, callback);\n }\n catch (e) {\n callback(e);\n return;\n }\n })();\n }\n /**\n * @typedef {array} EnableRequesterPaysResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @callback EnableRequesterPaysCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * <div class=\"notice\">\n * <strong>Early Access Testers Only</strong>\n * <p>\n * This feature is not yet widely-available.\n * </p>\n * </div>\n *\n * Enable `requesterPays` functionality for this bucket. This enables you, the\n * bucket owner, to have the requesting user assume the charges for the access\n * to your bucket and its contents.\n *\n * @param {EnableRequesterPaysCallback | EnableRequesterPaysOptions} [optionsOrCallback]\n * Callback function or precondition options.\n * @returns {Promise<EnableRequesterPaysResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.enableRequesterPays(function(err, apiResponse) {\n * if (!err) {\n * // requesterPays functionality enabled successfully.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.enableRequesterPays().then(function(data) {\n * const apiResponse = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/requesterPays.js</caption>\n * region_tag:storage_enable_requester_pays\n * Example of enabling requester pays:\n */\n enableRequesterPays(optionsOrCallback, cb) {\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n cb = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = optionsOrCallback;\n }\n this.setMetadata({\n billing: {\n requesterPays: true,\n },\n }, options, cb);\n }\n /**\n * Create a {@link File} object. See {@link File} to see how to handle\n * the different use cases you may have.\n *\n * @param {string} name The name of the file in this bucket.\n * @param {FileOptions} [options] Configuration options.\n * @param {string|number} [options.generation] Only use a specific revision of\n * this file.\n * @param {string} [options.encryptionKey] A custom encryption key. See\n * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}.\n * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will\n * be used to encrypt the object. Must be in the format:\n * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`.\n * KMS key ring must use the same location as the bucket.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for all requests made from File object.\n * @returns {File}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n * const file = bucket.file('my-existing-file.png');\n * ```\n */\n file(name, options) {\n if (!name) {\n throw Error(BucketExceptionMessages.SPECIFY_FILE_NAME);\n }\n return new File(this, name, options);\n }\n /**\n * @typedef {array} GetFilesResponse\n * @property {File[]} 0 Array of {@link File} instances.\n * @param {object} nextQuery 1 A query object to receive more results.\n * @param {object} apiResponse 2 The full API response.\n */\n /**\n * @callback GetFilesCallback\n * @param {?Error} err Request error, if any.\n * @param {File[]} files Array of {@link File} instances.\n * @param {object} nextQuery A query object to receive more results.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Query object for listing files.\n *\n * @typedef {object} GetFilesOptions\n * @property {boolean} [autoPaginate=true] Have pagination handled\n * automatically.\n * @property {string} [delimiter] Results will contain only objects whose\n * names, aside from the prefix, do not contain delimiter. Objects whose\n * names, aside from the prefix, contain delimiter will have their name\n * truncated after the delimiter, returned in `apiResponse.prefixes`.\n * Duplicate prefixes are omitted.\n * @property {string} [endOffset] Filter results to objects whose names are\n * lexicographically before endOffset. If startOffset is also set, the objects\n * listed have names between startOffset (inclusive) and endOffset (exclusive).\n * @property {boolean} [includeFoldersAsPrefixes] If true, includes folders and\n * managed folders in the set of prefixes returned by the query. Only applicable if\n * delimiter is set to / and autoPaginate is set to false.\n * See: https://cloud.google.com/storage/docs/managed-folders\n * @property {boolean} [includeTrailingDelimiter] If true, objects that end in\n * exactly one instance of delimiter have their metadata included in items[]\n * in addition to the relevant part of the object name appearing in prefixes[].\n * @property {string} [prefix] Filter results to objects whose names begin\n * with this prefix.\n * @property {string} [filter] Filter results using a server-side filter\n * expression. This is primarily used for filtering by Object Contexts.\n * Syntax: `contexts.\"<key>\"=\"<value>\"` or `contexts.\"<key>\":*`.\n * Prepend `-` for negation (e.g., `-contexts.\"key\":*`).\n * @property {string} [matchGlob] A glob pattern used to filter results,\n * for example foo*bar\n * @property {number} [maxApiCalls] Maximum number of API calls to make.\n * @property {number} [maxResults] Maximum number of items plus prefixes to\n * return per call.\n * Note: By default will handle pagination automatically\n * if more than 1 page worth of results are requested per call.\n * When `autoPaginate` is set to `false` the smaller of `maxResults`\n * or 1 page of results will be returned per call.\n * @property {string} [pageToken] A previously-returned page token\n * representing part of the larger set of results to view.\n * @property {boolean} [softDeleted] If true, only soft-deleted object versions will be\n * listed as distinct results in order of generation number. Note `soft_deleted` and\n * `versions` cannot be set to true simultaneously.\n * @property {string} [startOffset] Filter results to objects whose names are\n * lexicographically equal to or after startOffset. If endOffset is also set,\n * the objects listed have names between startOffset (inclusive) and endOffset (exclusive).\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n * @property {boolean} [versions] If true, returns File objects scoped to\n * their versions.\n */\n /**\n * Get {@link File} objects for the files currently in the bucket.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/list| Objects: list API Documentation}\n *\n * @param {GetFilesOptions} [query] Query object for listing files.\n * @param {boolean} [query.autoPaginate=true] Have pagination handled\n * automatically.\n * @param {string} [query.delimiter] Results will contain only objects whose\n * names, aside from the prefix, do not contain delimiter. Objects whose\n * names, aside from the prefix, contain delimiter will have their name\n * truncated after the delimiter, returned in `apiResponse.prefixes`.\n * Duplicate prefixes are omitted.\n * @param {string} [query.endOffset] Filter results to objects whose names are\n * lexicographically before endOffset. If startOffset is also set, the objects\n * listed have names between startOffset (inclusive) and endOffset (exclusive).\n * @param {boolean} [query.includeFoldersAsPrefixes] If true, includes folders and\n * managed folders in the set of prefixes returned by the query. Only applicable if\n * delimiter is set to / and autoPaginate is set to false.\n * See: https://cloud.google.com/storage/docs/managed-folders\n * @param {boolean} [query.includeTrailingDelimiter] If true, objects that end in\n * exactly one instance of delimiter have their metadata included in items[]\n * in addition to the relevant part of the object name appearing in prefixes[].\n * @param {string} [query.prefix] Filter results to objects whose names begin\n * with this prefix.\n * @param {string} [query.filter] Filter results using a server-side filter\n * expression. Supports Object Contexts with operators like `=`, `:`,\n * and `-` for negation.\n * @param {number} [query.maxApiCalls] Maximum number of API calls to make.\n * @param {number} [query.maxResults] Maximum number of items plus prefixes to\n * return per call.\n * Note: By default will handle pagination automatically\n * if more than 1 page worth of results are requested per call.\n * When `autoPaginate` is set to `false` the smaller of `maxResults`\n * or 1 page of results will be returned per call.\n * @param {string} [query.pageToken] A previously-returned page token\n * representing part of the larger set of results to view.\n * @param {boolean} [query.softDeleted] If true, only soft-deleted object versions will be\n * listed as distinct results in order of generation number. Note `soft_deleted` and\n * `versions` cannot be set to true simultaneously.\n * @param {string} [query.startOffset] Filter results to objects whose names are\n * lexicographically equal to or after startOffset. If endOffset is also set,\n * the objects listed have names between startOffset (inclusive) and endOffset (exclusive).\n * @param {string} [query.userProject] The ID of the project which will be\n * billed for the request.\n * @param {boolean} [query.versions] If true, returns File objects scoped to\n * their versions.\n *\n * @param {GetFilesCallback} [callback] Callback function.\n * @returns {Promise<GetFilesResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.getFiles(function(err, files) {\n * if (!err) {\n * // files is an array of File objects.\n * }\n * });\n *\n * //-\n * // If your bucket has versioning enabled, you can get all of your files\n * // scoped to their generation.\n * //-\n * bucket.getFiles({\n * versions: true\n * }, function(err, files) {\n * // Each file is scoped to its generation.\n * });\n *\n * //-\n * // To control how many API requests are made and page through the results\n * // manually, set `autoPaginate` to `false`.\n * //-\n * const callback = function(err, files, nextQuery, apiResponse) {\n * if (nextQuery) {\n * // More results exist.\n * bucket.getFiles(nextQuery, callback);\n * }\n *\n * // The `metadata` property is populated for you with the metadata at the\n * // time of fetching.\n * files[0].metadata;\n *\n * // However, in cases where you are concerned the metadata could have\n * // changed, use the `getMetadata` method.\n * files[0].getMetadata(function(err, metadata) {});\n * };\n *\n * bucket.getFiles({\n * autoPaginate: false\n * }, callback);\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.getFiles().then(function(data) {\n * const files = data[0];\n * });\n *\n * ```\n * @example\n * <h6>Simulating a File System</h6><p>With `autoPaginate: false`, it's possible to iterate over files which incorporate a common structure using a delimiter.</p><p>Consider the following remote objects:</p><ol><li>\"a\"</li><li>\"a/b/c/d\"</li><li>\"b/d/e\"</li></ol><p>Using a delimiter of `/` will return a single file, \"a\".</p><p>`apiResponse.prefixes` will return the \"sub-directories\" that were found:</p><ol><li>\"a/\"</li><li>\"b/\"</li></ol>\n * ```\n * bucket.getFiles({\n * autoPaginate: false,\n * delimiter: '/'\n * }, function(err, files, nextQuery, apiResponse) {\n * // files = [\n * // {File} // File object for file \"a\"\n * // ]\n *\n * // apiResponse.prefixes = [\n * // 'a/',\n * // 'b/'\n * // ]\n * });\n * ```\n *\n * @example\n * Using prefixes, it's now possible to simulate a file system with follow-up requests.\n * ```\n * bucket.getFiles({\n * autoPaginate: false,\n * delimiter: '/',\n * prefix: 'a/'\n * }, function(err, files, nextQuery, apiResponse) {\n * // No files found within \"directory\" a.\n * // files = []\n *\n * // However, a \"sub-directory\" was found.\n * // This prefix can be used to continue traversing the \"file system\".\n * // apiResponse.prefixes = [\n * // 'a/b/'\n * // ]\n * });\n * ```\n *\n * @example\n * //-\n * // Filter files using Object Contexts.\n * //-\n * ```\n * const query = {\n * filter: 'contexts.\"status\"=\"active\"'\n * };\n * bucket.getFiles(query, function(err, files) {\n * if (!err) {\n * // files only contains objects with the 'status' context set to 'active'.\n * }\n * });\n *\n * //-\n * // You can also filter by the absence of a context key.\n * //-\n *\n * bucket.getFiles({\n * filter: '-contexts.\"priority\":*'\n * }, function(err, files) {\n * // files contains objects that DO NOT have the 'priority' context key.\n * });\n * ```\n *\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_list_files\n * Another example:\n *\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_list_files_with_prefix\n * Example of listing files, filtered by a prefix:\n */\n getFiles(queryOrCallback, callback) {\n let query = typeof queryOrCallback === 'object' ? queryOrCallback : {};\n if (!callback) {\n callback = queryOrCallback;\n }\n query = Object.assign({}, query);\n if (query.fields &&\n query.autoPaginate &&\n !query.fields.includes('nextPageToken')) {\n query.fields = `${query.fields},nextPageToken`;\n }\n this.request({\n uri: '/o',\n qs: query,\n }, (err, resp) => {\n if (err) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback(err, null, null, resp);\n return;\n }\n const itemsArray = resp.items ? resp.items : [];\n const files = itemsArray.map((file) => {\n const options = {};\n if (query.fields) {\n const fileInstance = file;\n return fileInstance;\n }\n if (query.versions) {\n options.generation = file.generation;\n }\n if (file.kmsKeyName) {\n options.kmsKeyName = file.kmsKeyName;\n }\n const fileInstance = this.file(file.name, options);\n fileInstance.metadata = file;\n return fileInstance;\n });\n let nextQuery = null;\n if (resp.nextPageToken) {\n nextQuery = Object.assign({}, query, {\n pageToken: resp.nextPageToken,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback(null, files, nextQuery, resp);\n });\n }\n /**\n * @deprecated\n * @typedef {object} GetLabelsOptions Configuration options for Bucket#getLabels().\n * @param {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @deprecated\n * @typedef {array} GetLabelsResponse\n * @property {object} 0 Object of labels currently set on this bucket.\n */\n /**\n * @deprecated\n * @callback GetLabelsCallback\n * @param {?Error} err Request error, if any.\n * @param {object} labels Object of labels currently set on this bucket.\n */\n /**\n * @deprecated Use getMetadata directly.\n * Get the labels currently set on this bucket.\n *\n * @param {object} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {GetLabelsCallback} [callback] Callback function.\n * @returns {Promise<GetLabelsCallback>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.getLabels(function(err, labels) {\n * if (err) {\n * // Error handling omitted.\n * }\n *\n * // labels = {\n * // label: 'labelValue',\n * // ...\n * // }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.getLabels().then(function(data) {\n * const labels = data[0];\n * });\n * ```\n */\n getLabels(optionsOrCallback, callback) {\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = optionsOrCallback;\n }\n this.getMetadata(options, (err, metadata) => {\n if (err) {\n callback(err, null);\n return;\n }\n callback(null, (metadata === null || metadata === void 0 ? void 0 : metadata.labels) || {});\n });\n }\n /**\n * @typedef {object} GetNotificationsOptions Configuration options for Bucket#getNotification().\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @callback GetNotificationsCallback\n * @param {?Error} err Request error, if any.\n * @param {Notification[]} notifications Array of {@link Notification}\n * instances.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {array} GetNotificationsResponse\n * @property {Notification[]} 0 Array of {@link Notification} instances.\n * @property {object} 1 The full API response.\n */\n /**\n * Retrieves a list of notification subscriptions for a given bucket.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/list| Notifications: list}\n *\n * @param {GetNotificationsOptions} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {GetNotificationsCallback} [callback] Callback function.\n * @returns {Promise<GetNotificationsResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n *\n * bucket.getNotifications(function(err, notifications, apiResponse) {\n * if (!err) {\n * // notifications is an array of Notification objects.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.getNotifications().then(function(data) {\n * const notifications = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/listNotifications.js</caption>\n * region_tag:storage_list_bucket_notifications\n * Another example:\n */\n getNotifications(optionsOrCallback, callback) {\n let options = {};\n if (typeof optionsOrCallback === 'function') {\n callback = optionsOrCallback;\n }\n else if (optionsOrCallback) {\n options = optionsOrCallback;\n }\n this.request({\n uri: '/notificationConfigs',\n qs: options,\n }, (err, resp) => {\n if (err) {\n callback(err, null, resp);\n return;\n }\n const itemsArray = resp.items ? resp.items : [];\n const notifications = itemsArray.map((notification) => {\n const notificationInstance = this.notification(notification.id);\n notificationInstance.metadata = notification;\n return notificationInstance;\n });\n callback(null, notifications, resp);\n });\n }\n /**\n * @typedef {array} GetSignedUrlResponse\n * @property {object} 0 The signed URL.\n */\n /**\n * @callback GetSignedUrlCallback\n * @param {?Error} err Request error, if any.\n * @param {object} url The signed URL.\n */\n /**\n * @typedef {object} GetBucketSignedUrlConfig\n * @property {string} action Only listing objects within a bucket (HTTP: GET) is supported for bucket-level signed URLs.\n * @property {*} expires A timestamp when this link will expire. Any value\n * given is passed to `new Date()`.\n * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now.\n * @property {string} [version='v2'] The signing version to use, either\n * 'v2' or 'v4'.\n * @property {boolean} [virtualHostedStyle=false] Use virtual hosted-style\n * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style\n * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs\n * should generally be preferred instead of path-style URL.\n * Currently defaults to `false` for path-style, although this may change in a\n * future major-version release.\n * @property {string} [cname] The cname for this bucket, i.e.,\n * \"https://cdn.example.com\".\n * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example}\n * @property {object} [extensionHeaders] If these headers are used, the\n * server will check to make sure that the client provides matching\n * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers}\n * for the requirements of this feature, most notably:\n * - The header name must be prefixed with `x-goog-`\n * - The header name must be all lowercase\n *\n * Note: Multi-valued header passed as an array in the extensionHeaders\n * object is converted into a string, delimited by `,` with\n * no space. Requests made using the signed URL will need to\n * delimit multi-valued headers using a single `,` as well, or\n * else the server will report a mismatched signature.\n * @property {object} [queryParams] Additional query parameters to include\n * in the signed URL.\n */\n /**\n * Get a signed URL to allow limited time access to a bucket.\n *\n * In Google Cloud Platform environments, such as Cloud Functions and App\n * Engine, you usually don't provide a `keyFilename` or `credentials` during\n * instantiation. In those environments, we call the\n * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API}\n * to create a signed URL. That API requires either the\n * `https://www.googleapis.com/auth/iam` or\n * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are\n * enabled.\n *\n * See {@link https://cloud.google.com/storage/docs/access-control/signed-urls| Signed URLs Reference}\n *\n * @throws {Error} if an expiration timestamp from the past is given.\n *\n * @param {GetBucketSignedUrlConfig} config Configuration object.\n * @param {string} config.action Currently only supports \"list\" (HTTP: GET).\n * @param {*} config.expires A timestamp when this link will expire. Any value\n * given is passed to `new Date()`.\n * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now.\n * @param {string} [config.version='v2'] The signing version to use, either\n * 'v2' or 'v4'.\n * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style\n * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style\n * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs\n * should generally be preferred instead of path-style URL.\n * Currently defaults to `false` for path-style, although this may change in a\n * future major-version release.\n * @param {string} [config.cname] The cname for this bucket, i.e.,\n * \"https://cdn.example.com\".\n * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example}\n * @param {object} [config.extensionHeaders] If these headers are used, the\n * server will check to make sure that the client provides matching\n * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers}\n * for the requirements of this feature, most notably:\n * - The header name must be prefixed with `x-goog-`\n * - The header name must be all lowercase\n *\n * Note: Multi-valued header passed as an array in the extensionHeaders\n * object is converted into a string, delimited by `,` with\n * no space. Requests made using the signed URL will need to\n * delimit multi-valued headers using a single `,` as well, or\n * else the server will report a mismatched signature.\n * @property {object} [config.queryParams] Additional query parameters to include\n * in the signed URL.\n * @param {GetSignedUrlCallback} [callback] Callback function.\n * @returns {Promise<GetSignedUrlResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const myBucket = storage.bucket('my-bucket');\n *\n * //-\n * // Generate a URL that allows temporary access to list files in a bucket.\n * //-\n * const request = require('request');\n *\n * const config = {\n * action: 'list',\n * expires: '03-17-2025'\n * };\n *\n * bucket.getSignedUrl(config, function(err, url) {\n * if (err) {\n * console.error(err);\n * return;\n * }\n *\n * // The bucket is now available to be listed from this URL.\n * request(url, function(err, resp) {\n * // resp.statusCode = 200\n * });\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.getSignedUrl(config).then(function(data) {\n * const url = data[0];\n * });\n * ```\n */\n getSignedUrl(cfg, callback) {\n const method = BucketActionToHTTPMethod[cfg.action];\n const signConfig = {\n method,\n expires: cfg.expires,\n version: cfg.version,\n cname: cfg.cname,\n extensionHeaders: cfg.extensionHeaders || {},\n queryParams: cfg.queryParams || {},\n host: cfg.host,\n signingEndpoint: cfg.signingEndpoint,\n };\n if (!this.signer) {\n this.signer = new URLSigner(this.storage.authClient, this, undefined, this.storage);\n }\n this.signer\n .getSignedUrl(signConfig)\n .then(signedUrl => callback(null, signedUrl), callback);\n }\n /**\n * @callback BucketLockCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Lock a previously-defined retention policy. This will prevent changes to\n * the policy.\n *\n * @throws {Error} if a metageneration is not provided.\n *\n * @param {number|string} metageneration The bucket's metageneration. This is\n * accessible from calling {@link File#getMetadata}.\n * @param {BucketLockCallback} [callback] Callback function.\n * @returns {Promise<BucketLockResponse>}\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const bucket = storage.bucket('albums');\n *\n * const metageneration = 2;\n *\n * bucket.lock(metageneration, function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.lock(metageneration).then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n lock(metageneration, callback) {\n const metatype = typeof metageneration;\n if (metatype !== 'number' && metatype !== 'string') {\n throw new Error(BucketExceptionMessages.METAGENERATION_NOT_PROVIDED);\n }\n this.request({\n method: 'POST',\n uri: '/lockRetentionPolicy',\n qs: {\n ifMetagenerationMatch: metageneration,\n },\n }, callback);\n }\n /**\n * @typedef {object} RestoreOptions Options for Bucket#restore(). See an\n * {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/restore#resource| Object resource}.\n * @param {number} [generation] If present, selects a specific revision of this object.\n * @param {string} [projection] Specifies the set of properties to return. If used, must be 'full' or 'noAcl'.\n */\n /**\n * Restores a soft-deleted bucket\n * @param {RestoreOptions} options Restore options.\n * @returns {Promise<Bucket>}\n */\n async restore(options) {\n const [bucket] = await this.request({\n method: 'POST',\n uri: '/restore',\n qs: options,\n });\n return bucket;\n }\n /**\n * @typedef {array} MakeBucketPrivateResponse\n * @property {File[]} 0 List of files made private.\n */\n /**\n * @callback MakeBucketPrivateCallback\n * @param {?Error} err Request error, if any.\n * @param {File[]} files List of files made private.\n */\n /**\n * @typedef {object} MakeBucketPrivateOptions\n * @property {boolean} [includeFiles=false] Make each file in the bucket\n * private.\n * @property {Metadata} [metadata] Define custom metadata properties to define\n * along with the operation.\n * @property {boolean} [force] Queue errors occurred while making files\n * private until all files have been processed.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * Make the bucket listing private.\n *\n * You may also choose to make the contents of the bucket private by\n * specifying `includeFiles: true`. This will automatically run\n * {@link File#makePrivate} for every file in the bucket.\n *\n * When specifying `includeFiles: true`, use `force: true` to delay execution\n * of your callback until all files have been processed. By default, the\n * callback is executed after the first error. Use `force` to queue such\n * errors until all files have been processed, after which they will be\n * returned as an array as the first argument to your callback.\n *\n * NOTE: This may cause the process to be long-running and use a high number\n * of requests. Use with caution.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation}\n *\n * @param {MakeBucketPrivateOptions} [options] Configuration options.\n * @param {boolean} [options.includeFiles=false] Make each file in the bucket\n * private.\n * @param {Metadata} [options.metadata] Define custom metadata properties to define\n * along with the operation.\n * @param {boolean} [options.force] Queue errors occurred while making files\n * private until all files have been processed.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {MakeBucketPrivateCallback} [callback] Callback function.\n * @returns {Promise<MakeBucketPrivateResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * //-\n * // Make the bucket private.\n * //-\n * bucket.makePrivate(function(err) {});\n *\n * //-\n * // Make the bucket and its contents private.\n * //-\n * const opts = {\n * includeFiles: true\n * };\n *\n * bucket.makePrivate(opts, function(err, files) {\n * // `err`:\n * // The first error to occur, otherwise null.\n * //\n * // `files`:\n * // Array of files successfully made private in the bucket.\n * });\n *\n * //-\n * // Make the bucket and its contents private, using force to suppress errors\n * // until all files have been processed.\n * //-\n * const opts = {\n * includeFiles: true,\n * force: true\n * };\n *\n * bucket.makePrivate(opts, function(errors, files) {\n * // `errors`:\n * // Array of errors if any occurred, otherwise null.\n * //\n * // `files`:\n * // Array of files successfully made private in the bucket.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.makePrivate(opts).then(function(data) {\n * const files = data[0];\n * });\n * ```\n */\n makePrivate(optionsOrCallback, callback) {\n var _a, _b, _c, _d;\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n options.private = true;\n const query = {\n predefinedAcl: 'projectPrivate',\n };\n if (options.userProject) {\n query.userProject = options.userProject;\n }\n if ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) {\n query.ifGenerationMatch = options.preconditionOpts.ifGenerationMatch;\n }\n if ((_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) {\n query.ifGenerationNotMatch =\n options.preconditionOpts.ifGenerationNotMatch;\n }\n if ((_c = options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) {\n query.ifMetagenerationMatch =\n options.preconditionOpts.ifMetagenerationMatch;\n }\n if ((_d = options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) {\n query.ifMetagenerationNotMatch =\n options.preconditionOpts.ifMetagenerationNotMatch;\n }\n // You aren't allowed to set both predefinedAcl & acl properties on a bucket\n // so acl must explicitly be nullified.\n const metadata = { ...options.metadata, acl: null };\n this.setMetadata(metadata, query, (err) => {\n if (err) {\n callback(err);\n }\n const internalCall = () => {\n if (options.includeFiles) {\n return promisify(this.makeAllFilesPublicPrivate_).call(this, options);\n }\n return Promise.resolve([]);\n };\n internalCall()\n .then(files => callback(null, files))\n .catch(callback);\n });\n }\n /**\n * @typedef {object} MakeBucketPublicOptions\n * @property {boolean} [includeFiles=false] Make each file in the bucket\n * private.\n * @property {boolean} [force] Queue errors occurred while making files\n * private until all files have been processed.\n */\n /**\n * @callback MakeBucketPublicCallback\n * @param {?Error} err Request error, if any.\n * @param {File[]} files List of files made public.\n */\n /**\n * @typedef {array} MakeBucketPublicResponse\n * @property {File[]} 0 List of files made public.\n */\n /**\n * Make the bucket publicly readable.\n *\n * You may also choose to make the contents of the bucket publicly readable by\n * specifying `includeFiles: true`. This will automatically run\n * {@link File#makePublic} for every file in the bucket.\n *\n * When specifying `includeFiles: true`, use `force: true` to delay execution\n * of your callback until all files have been processed. By default, the\n * callback is executed after the first error. Use `force` to queue such\n * errors until all files have been processed, after which they will be\n * returned as an array as the first argument to your callback.\n *\n * NOTE: This may cause the process to be long-running and use a high number\n * of requests. Use with caution.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation}\n *\n * @param {MakeBucketPublicOptions} [options] Configuration options.\n * @param {boolean} [options.includeFiles=false] Make each file in the bucket\n * private.\n * @param {boolean} [options.force] Queue errors occurred while making files\n * private until all files have been processed.\n * @param {MakeBucketPublicCallback} [callback] Callback function.\n * @returns {Promise<MakeBucketPublicResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * //-\n * // Make the bucket publicly readable.\n * //-\n * bucket.makePublic(function(err) {});\n *\n * //-\n * // Make the bucket and its contents publicly readable.\n * //-\n * const opts = {\n * includeFiles: true\n * };\n *\n * bucket.makePublic(opts, function(err, files) {\n * // `err`:\n * // The first error to occur, otherwise null.\n * //\n * // `files`:\n * // Array of files successfully made public in the bucket.\n * });\n *\n * //-\n * // Make the bucket and its contents publicly readable, using force to\n * // suppress errors until all files have been processed.\n * //-\n * const opts = {\n * includeFiles: true,\n * force: true\n * };\n *\n * bucket.makePublic(opts, function(errors, files) {\n * // `errors`:\n * // Array of errors if any occurred, otherwise null.\n * //\n * // `files`:\n * // Array of files successfully made public in the bucket.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.makePublic(opts).then(function(data) {\n * const files = data[0];\n * });\n * ```\n */\n makePublic(optionsOrCallback, callback) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n const req = { public: true, ...options };\n this.acl\n .add({\n entity: 'allUsers',\n role: 'READER',\n })\n .then(() => {\n return this.acl.default.add({\n entity: 'allUsers',\n role: 'READER',\n });\n })\n .then(() => {\n if (req.includeFiles) {\n return promisify(this.makeAllFilesPublicPrivate_).call(this, req);\n }\n return [];\n })\n .then(files => callback(null, files), callback);\n }\n /**\n * Get a reference to a Cloud Pub/Sub Notification.\n *\n * @param {string} id ID of notification.\n * @returns {Notification}\n * @see Notification\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n * const notification = bucket.notification('1');\n * ```\n */\n notification(id) {\n if (!id) {\n throw new Error(BucketExceptionMessages.SUPPLY_NOTIFICATION_ID);\n }\n return new Notification(this, id);\n }\n /**\n * Remove an already-existing retention policy from this bucket, if it is not\n * locked.\n *\n * @param {SetBucketMetadataCallback} [callback] Callback function.\n * @param {SetBucketMetadataOptions} [options] Options, including precondition options\n * @returns {Promise<SetBucketMetadataResponse>}\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const bucket = storage.bucket('albums');\n *\n * bucket.removeRetentionPeriod(function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.removeRetentionPeriod().then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n removeRetentionPeriod(optionsOrCallback, callback) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n this.setMetadata({\n retentionPolicy: null,\n }, options, callback);\n }\n /**\n * Makes request and applies userProject query parameter if necessary.\n *\n * @private\n *\n * @param {object} reqOpts - The request options.\n * @param {function} callback - The callback function.\n */\n request(reqOpts, callback) {\n if (this.userProject && (!reqOpts.qs || !reqOpts.qs.userProject)) {\n reqOpts.qs = { ...reqOpts.qs, userProject: this.userProject };\n }\n return super.request(reqOpts, callback);\n }\n /**\n * @deprecated\n * @typedef {array} SetLabelsResponse\n * @property {object} 0 The bucket metadata.\n */\n /**\n * @deprecated\n * @callback SetLabelsCallback\n * @param {?Error} err Request error, if any.\n * @param {object} metadata The bucket metadata.\n */\n /**\n * @deprecated\n * @typedef {object} SetLabelsOptions Configuration options for Bucket#setLabels().\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @deprecated Use setMetadata directly.\n * Set labels on the bucket.\n *\n * This makes an underlying call to {@link Bucket#setMetadata}, which\n * is a PATCH request. This means an individual label can be overwritten, but\n * unmentioned labels will not be touched.\n *\n * @param {object<string, string>} labels Labels to set on the bucket.\n * @param {SetLabelsOptions} [options] Configuration options.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {SetLabelsCallback} [callback] Callback function.\n * @returns {Promise<SetLabelsResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * const labels = {\n * labelone: 'labelonevalue',\n * labeltwo: 'labeltwovalue'\n * };\n *\n * bucket.setLabels(labels, function(err, metadata) {\n * if (!err) {\n * // Labels set successfully.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.setLabels(labels).then(function(data) {\n * const metadata = data[0];\n * });\n * ```\n */\n setLabels(labels, optionsOrCallback, callback) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n callback = callback || util.noop;\n this.setMetadata({ labels }, options, callback);\n }\n setMetadata(metadata, optionsOrCallback, cb) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n cb =\n typeof optionsOrCallback === 'function'\n ? optionsOrCallback\n : cb;\n this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, AvailableServiceObjectMethods.setMetadata, options);\n super\n .setMetadata(metadata, options)\n .then(resp => cb(null, ...resp))\n .catch(cb)\n .finally(() => {\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n });\n }\n /**\n * Lock all objects contained in the bucket, based on their creation time. Any\n * attempt to overwrite or delete objects younger than the retention period\n * will result in a `PERMISSION_DENIED` error.\n *\n * An unlocked retention policy can be modified or removed from the bucket via\n * {@link File#removeRetentionPeriod} and {@link File#setRetentionPeriod}. A\n * locked retention policy cannot be removed or shortened in duration for the\n * lifetime of the bucket. Attempting to remove or decrease period of a locked\n * retention policy will result in a `PERMISSION_DENIED` error. You can still\n * increase the policy.\n *\n * @param {*} duration In seconds, the minimum retention time for all objects\n * contained in this bucket.\n * @param {SetBucketMetadataCallback} [callback] Callback function.\n * @param {SetBucketMetadataCallback} [options] Options, including precondition options.\n * @returns {Promise<SetBucketMetadataResponse>}\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const bucket = storage.bucket('albums');\n *\n * const DURATION_SECONDS = 15780000; // 6 months.\n *\n * //-\n * // Lock the objects in this bucket for 6 months.\n * //-\n * bucket.setRetentionPeriod(DURATION_SECONDS, function(err, apiResponse) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.setRetentionPeriod(DURATION_SECONDS).then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n setRetentionPeriod(duration, optionsOrCallback, callback) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n this.setMetadata({\n retentionPolicy: {\n retentionPeriod: duration.toString(),\n },\n }, options, callback);\n }\n /**\n *\n * @typedef {object} Cors\n * @property {number} [maxAgeSeconds] The number of seconds the browser is\n * allowed to make requests before it must repeat the preflight request.\n * @property {string[]} [method] HTTP method allowed for cross origin resource\n * sharing with this bucket.\n * @property {string[]} [origin] an origin allowed for cross origin resource\n * sharing with this bucket.\n * @property {string[]} [responseHeader] A header allowed for cross origin\n * resource sharing with this bucket.\n */\n /**\n * This can be used to set the CORS configuration on the bucket.\n *\n * The configuration will be overwritten with the value passed into this.\n *\n * @param {Cors[]} corsConfiguration The new CORS configuration to set\n * @param {number} [corsConfiguration.maxAgeSeconds] The number of seconds the browser is\n * allowed to make requests before it must repeat the preflight request.\n * @param {string[]} [corsConfiguration.method] HTTP method allowed for cross origin resource\n * sharing with this bucket.\n * @param {string[]} [corsConfiguration.origin] an origin allowed for cross origin resource\n * sharing with this bucket.\n * @param {string[]} [corsConfiguration.responseHeader] A header allowed for cross origin\n * resource sharing with this bucket.\n * @param {SetBucketMetadataCallback} [callback] Callback function.\n * @param {SetBucketMetadataOptions} [options] Options, including precondition options.\n * @returns {Promise<SetBucketMetadataResponse>}\n *\n * @example\n * ```\n * const storage = require('@google-cloud/storage')();\n * const bucket = storage.bucket('albums');\n *\n * const corsConfiguration = [{maxAgeSeconds: 3600}]; // 1 hour\n * bucket.setCorsConfiguration(corsConfiguration);\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.setCorsConfiguration(corsConfiguration).then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n setCorsConfiguration(corsConfiguration, optionsOrCallback, callback) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n this.setMetadata({\n cors: corsConfiguration,\n }, options, callback);\n }\n /**\n * @typedef {object} SetBucketStorageClassOptions\n * @property {string} [userProject] - The ID of the project which will be\n * billed for the request.\n */\n /**\n * @callback SetBucketStorageClassCallback\n * @param {?Error} err Request error, if any.\n */\n /**\n * Set the default storage class for new files in this bucket.\n *\n * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes}\n *\n * @param {string} storageClass The new storage class. (`standard`,\n * `nearline`, `coldline`, or `archive`).\n * **Note:** The storage classes `multi_regional`, `regional`, and\n * `durable_reduced_availability` are now legacy and will be deprecated in\n * the future.\n * @param {object} [options] Configuration options.\n * @param {string} [options.userProject] - The ID of the project which will be\n * billed for the request.\n * @param {SetStorageClassCallback} [callback] Callback function.\n * @returns {Promise}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.setStorageClass('nearline', function(err, apiResponse) {\n * if (err) {\n * // Error handling omitted.\n * }\n *\n * // The storage class was updated successfully.\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.setStorageClass('nearline').then(function() {});\n * ```\n */\n setStorageClass(storageClass, optionsOrCallback, callback) {\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n // In case we get input like `storageClass`, convert to `storage_class`.\n storageClass = storageClass\n .replace(/-/g, '_')\n .replace(/([a-z])([A-Z])/g, (_, low, up) => {\n return low + '_' + up;\n })\n .toUpperCase();\n this.setMetadata({ storageClass }, options, callback);\n }\n /**\n * Set a user project to be billed for all requests made from this Bucket\n * object and any files referenced from this Bucket object.\n *\n * @param {string} userProject The user project.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * bucket.setUserProject('grape-spaceship-123');\n * ```\n */\n setUserProject(userProject) {\n this.userProject = userProject;\n const methods = [\n 'create',\n 'delete',\n 'exists',\n 'get',\n 'getMetadata',\n 'setMetadata',\n ];\n methods.forEach(method => {\n const methodConfig = this.methods[method];\n if (typeof methodConfig === 'object') {\n if (typeof methodConfig.reqOpts === 'object') {\n Object.assign(methodConfig.reqOpts.qs, { userProject });\n }\n else {\n methodConfig.reqOpts = {\n qs: { userProject },\n };\n }\n }\n });\n }\n /**\n * @typedef {object} UploadOptions Configuration options for Bucket#upload().\n * @property {string|File} [destination] The place to save\n * your file. If given a string, the file will be uploaded to the bucket\n * using the string as a filename. When given a File object, your local\n * file will be uploaded to the File object's bucket and under the File\n * object's name. Lastly, when this argument is omitted, the file is uploaded\n * to your bucket using the name of the local file.\n * @property {string} [encryptionKey] A custom encryption key. See\n * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}.\n * @property {boolean} [gzip] Automatically gzip the file. This will set\n * `options.metadata.contentEncoding` to `gzip`.\n * @property {string} [kmsKeyName] The name of the Cloud KMS key that will\n * be used to encrypt the object. Must be in the format:\n * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`.\n * @property {object} [metadata] See an\n * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}.\n * @property {string} [offset] The starting byte of the upload stream, for\n * resuming an interrupted upload. Defaults to 0.\n * @property {string} [predefinedAcl] Apply a predefined set of access\n * controls to this object.\n *\n * Acceptable values are:\n * - **`authenticatedRead`** - Object owner gets `OWNER` access, and\n * `allAuthenticatedUsers` get `READER` access.\n *\n * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and\n * project team owners get `OWNER` access.\n *\n * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project\n * team owners get `READER` access.\n *\n * - **`private`** - Object owner gets `OWNER` access.\n *\n * - **`projectPrivate`** - Object owner gets `OWNER` access, and project\n * team members get access according to their roles.\n *\n * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers`\n * get `READER` access.\n * @property {boolean} [private] Make the uploaded file private. (Alias for\n * `options.predefinedAcl = 'private'`)\n * @property {boolean} [public] Make the uploaded file public. (Alias for\n * `options.predefinedAcl = 'publicRead'`)\n * @property {boolean} [resumable=true] Resumable uploads are automatically\n * enabled and must be shut off explicitly by setting to false.\n * @property {number} [timeout=60000] Set the HTTP request timeout in\n * milliseconds. This option is not available for resumable uploads.\n * Default: `60000`\n * @property {string} [uri] The URI for an already-created resumable\n * upload. See {@link File#createResumableUpload}.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n * @property {string|boolean} [validation] Possible values: `\"md5\"`,\n * `\"crc32c\"`, or `false`. By default, data integrity is validated with an\n * MD5 checksum for maximum reliability. CRC32c will provide better\n * performance with less reliability. You may also choose to skip\n * validation completely, however this is **not recommended**.\n */\n /**\n * @typedef {array} UploadResponse\n * @property {object} 0 The uploaded {@link File}.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback UploadCallback\n * @param {?Error} err Request error, if any.\n * @param {object} file The uploaded {@link File}.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Upload a file to the bucket. This is a convenience method that wraps\n * {@link File#createWriteStream}.\n *\n * Resumable uploads are enabled by default\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload#uploads| Upload Options (Simple or Resumable)}\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert| Objects: insert API Documentation}\n *\n * @param {string} pathString The fully qualified path to the file you\n * wish to upload to your bucket.\n * @param {UploadOptions} [options] Configuration options.\n * @param {string|File} [options.destination] The place to save\n * your file. If given a string, the file will be uploaded to the bucket\n * using the string as a filename. When given a File object, your local\n * file will be uploaded to the File object's bucket and under the File\n * object's name. Lastly, when this argument is omitted, the file is uploaded\n * to your bucket using the name of the local file.\n * @param {string} [options.encryptionKey] A custom encryption key. See\n * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}.\n * @param {boolean} [options.gzip] Automatically gzip the file. This will set\n * `options.metadata.contentEncoding` to `gzip`.\n * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will\n * be used to encrypt the object. Must be in the format:\n * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`.\n * @param {object} [options.metadata] See an\n * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}.\n * @param {string} [options.offset] The starting byte of the upload stream, for\n * resuming an interrupted upload. Defaults to 0.\n * @param {string} [options.predefinedAcl] Apply a predefined set of access\n * controls to this object.\n * Acceptable values are:\n * - **`authenticatedRead`** - Object owner gets `OWNER` access, and\n * `allAuthenticatedUsers` get `READER` access.\n *\n * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and\n * project team owners get `OWNER` access.\n *\n * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project\n * team owners get `READER` access.\n *\n * - **`private`** - Object owner gets `OWNER` access.\n *\n * - **`projectPrivate`** - Object owner gets `OWNER` access, and project\n * team members get access according to their roles.\n *\n * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers`\n * get `READER` access.\n * @param {boolean} [options.private] Make the uploaded file private. (Alias for\n * `options.predefinedAcl = 'private'`)\n * @param {boolean} [options.public] Make the uploaded file public. (Alias for\n * `options.predefinedAcl = 'publicRead'`)\n * @param {boolean} [options.resumable=true] Resumable uploads are automatically\n * enabled and must be shut off explicitly by setting to false.\n * @param {number} [options.timeout=60000] Set the HTTP request timeout in\n * milliseconds. This option is not available for resumable uploads.\n * Default: `60000`\n * @param {string} [options.uri] The URI for an already-created resumable\n * upload. See {@link File#createResumableUpload}.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n * @param {string|boolean} [options.validation] Possible values: `\"md5\"`,\n * `\"crc32c\"`, or `false`. By default, data integrity is validated with an\n * MD5 checksum for maximum reliability. CRC32c will provide better\n * performance with less reliability. You may also choose to skip\n * validation completely, however this is **not recommended**.\n * @param {UploadCallback} [callback] Callback function.\n * @returns {Promise<UploadResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('albums');\n *\n * //-\n * // Upload a file from a local path.\n * //-\n * bucket.upload('/local/path/image.png', function(err, file, apiResponse) {\n * // Your bucket now contains:\n * // - \"image.png\" (with the contents of `/local/path/image.png')\n *\n * // `file` is an instance of a File object that refers to your new file.\n * });\n *\n *\n * //-\n * // It's not always that easy. You will likely want to specify the filename\n * // used when your new file lands in your bucket.\n * //\n * // You may also want to set metadata or customize other options.\n * //-\n * const options = {\n * destination: 'new-image.png',\n * validation: 'crc32c',\n * metadata: {\n * metadata: {\n * event: 'Fall trip to the zoo'\n * }\n * }\n * };\n *\n * bucket.upload('local-image.png', options, function(err, file) {\n * // Your bucket now contains:\n * // - \"new-image.png\" (with the contents of `local-image.png')\n *\n * // `file` is an instance of a File object that refers to your new file.\n * });\n *\n * //-\n * // You can also have a file gzip'd on the fly.\n * //-\n * bucket.upload('index.html', { gzip: true }, function(err, file) {\n * // Your bucket now contains:\n * // - \"index.html\" (automatically compressed with gzip)\n *\n * // Downloading the file with `file.download` will automatically decode\n * the\n * // file.\n * });\n *\n * //-\n * // You may also re-use a File object, {File}, that references\n * // the file you wish to create or overwrite.\n * //-\n * const options = {\n * destination: bucket.file('existing-file.png'),\n * resumable: false\n * };\n *\n * bucket.upload('local-img.png', options, function(err, newFile) {\n * // Your bucket now contains:\n * // - \"existing-file.png\" (with the contents of `local-img.png')\n *\n * // Note:\n * // The `newFile` parameter is equal to `file`.\n * });\n *\n * //-\n * // To use\n * // <a\n * href=\"https://cloud.google.com/storage/docs/encryption#customer-supplied\">\n * // Customer-supplied Encryption Keys</a>, provide the `encryptionKey`\n * option.\n * //-\n * const crypto = require('crypto');\n * const encryptionKey = crypto.randomBytes(32);\n *\n * bucket.upload('img.png', {\n * encryptionKey: encryptionKey\n * }, function(err, newFile) {\n * // `img.png` was uploaded with your custom encryption key.\n *\n * // `newFile` is already configured to use the encryption key when making\n * // operations on the remote object.\n *\n * // However, to use your encryption key later, you must create a `File`\n * // instance with the `key` supplied:\n * const file = bucket.file('img.png', {\n * encryptionKey: encryptionKey\n * });\n *\n * // Or with `file#setEncryptionKey`:\n * const file = bucket.file('img.png');\n * file.setEncryptionKey(encryptionKey);\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * bucket.upload('local-image.png').then(function(data) {\n * const file = data[0];\n * });\n *\n * To upload a file from a URL, use {@link File#createWriteStream}.\n *\n * ```\n * @example <caption>include:samples/files.js</caption>\n * region_tag:storage_upload_file\n * Another example:\n *\n * @example <caption>include:samples/encryption.js</caption>\n * region_tag:storage_upload_encrypted_file\n * Example of uploading an encrypted file:\n */\n upload(pathString, optionsOrCallback, callback) {\n var _a, _b;\n const upload = (numberOfRetries) => {\n const returnValue = AsyncRetry(async (bail) => {\n await new Promise((resolve, reject) => {\n var _a, _b;\n if (numberOfRetries === 0 &&\n ((_b = (_a = newFile === null || newFile === void 0 ? void 0 : newFile.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry)) {\n newFile.storage.retryOptions.autoRetry = false;\n }\n const writable = newFile.createWriteStream(options);\n if (options.onUploadProgress) {\n writable.on('progress', options.onUploadProgress);\n }\n fs.createReadStream(pathString)\n .on('error', bail)\n .pipe(writable)\n .on('error', err => {\n if (this.storage.retryOptions.autoRetry &&\n this.storage.retryOptions.retryableErrorFn(err)) {\n return reject(err);\n }\n else {\n return bail(err);\n }\n })\n .on('finish', () => {\n return resolve();\n });\n });\n }, {\n retries: numberOfRetries,\n factor: this.storage.retryOptions.retryDelayMultiplier,\n maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds\n maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds\n });\n if (!callback) {\n return returnValue;\n }\n else {\n return returnValue\n .then(() => {\n if (callback) {\n return callback(null, newFile, newFile.metadata);\n }\n })\n .catch(callback);\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (global['GCLOUD_SANDBOX_ENV']) {\n return;\n }\n let options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n options = Object.assign({\n metadata: {},\n }, options);\n // Do not retry if precondition option ifGenerationMatch is not set\n // because this is a file operation\n let maxRetries = this.storage.retryOptions.maxRetries;\n if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined &&\n ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined &&\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryConditional) ||\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryNever) {\n maxRetries = 0;\n }\n let newFile;\n if (options.destination instanceof File) {\n newFile = options.destination;\n }\n else if (options.destination !== null &&\n typeof options.destination === 'string') {\n // Use the string as the name of the file.\n newFile = this.file(options.destination, {\n encryptionKey: options.encryptionKey,\n kmsKeyName: options.kmsKeyName,\n preconditionOpts: this.instancePreconditionOpts,\n });\n }\n else {\n // Resort to using the name of the incoming file.\n const destination = path.basename(pathString);\n newFile = this.file(destination, {\n encryptionKey: options.encryptionKey,\n kmsKeyName: options.kmsKeyName,\n preconditionOpts: this.instancePreconditionOpts,\n });\n }\n upload(maxRetries);\n }\n /**\n * @private\n *\n * @typedef {object} MakeAllFilesPublicPrivateOptions\n * @property {boolean} [force] Suppress errors until all files have been\n * processed.\n * @property {boolean} [private] Make files private.\n * @property {boolean} [public] Make files public.\n * @property {string} [userProject] The ID of the project which will be\n * billed for the request.\n */\n /**\n * @private\n *\n * @callback SetBucketMetadataCallback\n * @param {?Error} err Request error, if any.\n * @param {File[]} files Files that were updated.\n */\n /**\n * @typedef {array} MakeAllFilesPublicPrivateResponse\n * @property {File[]} 0 List of files affected.\n */\n /**\n * Iterate over all of a bucket's files, calling `file.makePublic()` (public)\n * or `file.makePrivate()` (private) on each.\n *\n * Operations are performed in parallel, up to 10 at once. The first error\n * breaks the loop, and will execute the provided callback with it. Specify\n * `{ force: true }` to suppress the errors.\n *\n * @private\n *\n * @param {MakeAllFilesPublicPrivateOptions} [options] Configuration options.\n * @param {boolean} [options.force] Suppress errors until all files have been\n * processed.\n * @param {boolean} [options.private] Make files private.\n * @param {boolean} [options.public] Make files public.\n * @param {string} [options.userProject] The ID of the project which will be\n * billed for the request.\n \n * @param {MakeAllFilesPublicPrivateCallback} callback Callback function.\n *\n * @return {Promise<MakeAllFilesPublicPrivateResponse>}\n */\n makeAllFilesPublicPrivate_(optionsOrCallback, callback) {\n const MAX_PARALLEL_LIMIT = 10;\n const errors = [];\n const updatedFiles = [];\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n callback =\n typeof optionsOrCallback === 'function' ? optionsOrCallback : callback;\n const processFile = async (file) => {\n try {\n await (options.public ? file.makePublic() : file.makePrivate(options));\n updatedFiles.push(file);\n }\n catch (e) {\n if (!options.force) {\n throw e;\n }\n errors.push(e);\n }\n };\n this.getFiles(options)\n .then(([files]) => {\n const limit = pLimit(MAX_PARALLEL_LIMIT);\n const promises = files.map(file => {\n return limit(() => processFile(file));\n });\n return Promise.all(promises);\n })\n .then(() => callback(errors.length > 0 ? errors : null, updatedFiles), err => callback(err, updatedFiles));\n }\n getId() {\n return this.id;\n }\n disableAutoRetryConditionallyIdempotent_(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n coreOpts, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n methodType, localPreconditionOptions) {\n var _a, _b;\n if (typeof coreOpts === 'object' &&\n ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch) === undefined &&\n (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined &&\n (methodType === AvailableServiceObjectMethods.setMetadata ||\n methodType === AvailableServiceObjectMethods.delete) &&\n this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryConditional) {\n this.storage.retryOptions.autoRetry = false;\n }\n else if (this.storage.retryOptions.idempotencyStrategy ===\n IdempotencyStrategy.RetryNever) {\n this.storage.retryOptions.autoRetry = false;\n }\n }\n}\n/*! Developer Documentation\n *\n * These methods can be auto-paginated.\n */\npaginator.extend(Bucket, 'getFiles');\n/*! Developer Documentation\n *\n * All async methods (except for streams) will return a Promise in the event\n * that a callback is omitted.\n */\npromisifyAll(Bucket, {\n exclude: ['cloudStorageURI', 'request', 'file', 'notification', 'restore'],\n});\n/**\n * Reference to the {@link Bucket} class.\n * @name module:@google-cloud/storage.Bucket\n * @see Bucket\n */\nexport { Bucket };\n","// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { ServiceObject, util } from './nodejs-common/index.js';\nimport { promisifyAll } from '@google-cloud/promisify';\n/**\n * Create a channel object to interact with a Cloud Storage channel.\n *\n * See {@link https://cloud.google.com/storage/docs/object-change-notification| Object Change Notification}\n *\n * @class\n *\n * @param {string} id The ID of the channel.\n * @param {string} resourceId The resource ID of the channel.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const channel = storage.channel('id', 'resource-id');\n * ```\n */\nclass Channel extends ServiceObject {\n constructor(storage, id, resourceId) {\n const config = {\n parent: storage,\n baseUrl: '/channels',\n // An ID shouldn't be included in the API requests.\n // RE:\n // https://github.com/GoogleCloudPlatform/google-cloud-node/issues/1145\n id: '',\n methods: {\n // Only need `request`.\n },\n };\n super(config);\n this.metadata.id = id;\n this.metadata.resourceId = resourceId;\n }\n /**\n * @typedef {array} StopResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @callback StopCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Stop this channel.\n *\n * @param {StopCallback} [callback] Callback function.\n * @returns {Promise<StopResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const channel = storage.channel('id', 'resource-id');\n * channel.stop(function(err, apiResponse) {\n * if (!err) {\n * // Channel stopped successfully.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * channel.stop().then(function(data) {\n * const apiResponse = data[0];\n * });\n * ```\n */\n stop(callback) {\n callback = callback || util.noop;\n this.request({\n method: 'POST',\n uri: '/stop',\n json: this.metadata,\n }, (err, apiResponse) => {\n callback(err, apiResponse);\n });\n }\n}\n/*! Developer Documentation\n *\n * All async methods (except for streams) will return a Promise in the event\n * that a callback is omitted.\n */\npromisifyAll(Channel);\n/**\n * Reference to the {@link Channel} class.\n * @name module:@google-cloud/storage.Channel\n * @see Channel\n */\nexport { Channel };\n","// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { ServiceObject, } from './nodejs-common/index.js';\nimport { IdempotencyStrategy } from './storage.js';\nimport { promisifyAll } from '@google-cloud/promisify';\n/**\n * The API-formatted resource description of the HMAC key.\n *\n * Note: This is not guaranteed to be up-to-date when accessed. To get the\n * latest record, call the `getMetadata()` method.\n *\n * @name HmacKey#metadata\n * @type {object}\n */\n/**\n * An HmacKey object contains metadata of an HMAC key created from a\n * service account through the {@link Storage} client using\n * {@link Storage#createHmacKey}.\n *\n * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation}\n *\n * @class\n */\nexport class HmacKey extends ServiceObject {\n /**\n * @typedef {object} HmacKeyOptions\n * @property {string} [projectId] The project ID of the project that owns\n * the service account of the requested HMAC key. If not provided,\n * the project ID used to instantiate the Storage client will be used.\n */\n /**\n * Constructs an HmacKey object.\n *\n * Note: this only create a local reference to an HMAC key, to create\n * an HMAC key, use {@link Storage#createHmacKey}.\n *\n * @param {Storage} storage The Storage instance this HMAC key is\n * attached to.\n * @param {string} accessId The unique accessId for this HMAC key.\n * @param {HmacKeyOptions} options Constructor configurations.\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const hmacKey = storage.hmacKey('access-id');\n * ```\n */\n constructor(storage, accessId, options) {\n const methods = {\n /**\n * @typedef {object} DeleteHmacKeyOptions\n * @property {string} [userProject] This parameter is currently ignored.\n */\n /**\n * @typedef {array} DeleteHmacKeyResponse\n * @property {object} 0 The full API response.\n */\n /**\n * @callback DeleteHmacKeyCallback\n * @param {?Error} err Request error, if any.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Deletes an HMAC key.\n * Key state must be set to `INACTIVE` prior to deletion.\n * Caution: HMAC keys cannot be recovered once you delete them.\n *\n * The authenticated user must have `storage.hmacKeys.delete` permission for the project in which the key exists.\n *\n * @method HmacKey#delete\n * @param {DeleteHmacKeyOptions} [options] Configuration options.\n * @param {DeleteHmacKeyCallback} [callback] Callback function.\n * @returns {Promise<DeleteHmacKeyResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n *\n * //-\n * // Delete HMAC key after making the key inactive.\n * //-\n * const hmacKey = storage.hmacKey('ACCESS_ID');\n * hmacKey.setMetadata({state: 'INACTIVE'}, (err, hmacKeyMetadata) => {\n * if (err) {\n * // The request was an error.\n * console.error(err);\n * return;\n * }\n * hmacKey.delete((err) => {\n * if (err) {\n * console.error(err);\n * return;\n * }\n * // The HMAC key is deleted.\n * });\n * });\n *\n * //-\n * // If the callback is omitted, a promise is returned.\n * //-\n * const hmacKey = storage.hmacKey('ACCESS_ID');\n * hmacKey\n * .setMetadata({state: 'INACTIVE'})\n * .then(() => {\n * return hmacKey.delete();\n * });\n * ```\n */\n delete: true,\n /**\n * @callback GetHmacKeyCallback\n * @param {?Error} err Request error, if any.\n * @param {HmacKey} hmacKey this {@link HmacKey} instance.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {array} GetHmacKeyResponse\n * @property {HmacKey} 0 This {@link HmacKey} instance.\n * @property {object} 1 The full API response.\n */\n /**\n * @typedef {object} GetHmacKeyOptions\n * @property {string} [userProject] This parameter is currently ignored.\n */\n /**\n * Retrieves and populate an HMAC key's metadata, and return\n * this {@link HmacKey} instance.\n *\n * HmacKey.get() does not give the HMAC key secret, as\n * it is only returned on creation.\n *\n * The authenticated user must have `storage.hmacKeys.get` permission\n * for the project in which the key exists.\n *\n * @method HmacKey#get\n * @param {GetHmacKeyOptions} [options] Configuration options.\n * @param {GetHmacKeyCallback} [callback] Callback function.\n * @returns {Promise<GetHmacKeyResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n *\n * //-\n * // Get the HmacKey's Metadata.\n * //-\n * storage.hmacKey('ACCESS_ID')\n * .get((err, hmacKey) => {\n * if (err) {\n * // The request was an error.\n * console.error(err);\n * return;\n * }\n * // do something with the returned HmacKey object.\n * });\n *\n * //-\n * // If the callback is omitted, a promise is returned.\n * //-\n * storage.hmacKey('ACCESS_ID')\n * .get()\n * .then((data) => {\n * const hmacKey = data[0];\n * });\n * ```\n */\n get: true,\n /**\n * @typedef {object} GetHmacKeyMetadataOptions\n * @property {string} [userProject] This parameter is currently ignored.\n */\n /**\n * Retrieves and populate an HMAC key's metadata, and return\n * the HMAC key's metadata as an object.\n *\n * HmacKey.getMetadata() does not give the HMAC key secret, as\n * it is only returned on creation.\n *\n * The authenticated user must have `storage.hmacKeys.get` permission\n * for the project in which the key exists.\n *\n * @method HmacKey#getMetadata\n * @param {GetHmacKeyMetadataOptions} [options] Configuration options.\n * @param {HmacKeyMetadataCallback} [callback] Callback function.\n * @returns {Promise<HmacKeyMetadataResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n *\n * //-\n * // Get the HmacKey's metadata and populate to the metadata property.\n * //-\n * storage.hmacKey('ACCESS_ID')\n * .getMetadata((err, hmacKeyMetadata) => {\n * if (err) {\n * // The request was an error.\n * console.error(err);\n * return;\n * }\n * console.log(hmacKeyMetadata);\n * });\n *\n * //-\n * // If the callback is omitted, a promise is returned.\n * //-\n * storage.hmacKey('ACCESS_ID')\n * .getMetadata()\n * .then((data) => {\n * const hmacKeyMetadata = data[0];\n * console.log(hmacKeyMetadata);\n * });\n * ```\n */\n getMetadata: true,\n /**\n * @typedef {object} SetHmacKeyMetadata Subset of {@link HmacKeyMetadata} to update.\n * @property {string} state New state of the HmacKey. Either 'ACTIVE' or 'INACTIVE'.\n * @property {string} [etag] Include an etag from a previous get HMAC key request\n * to perform safe read-modify-write.\n */\n /**\n * @typedef {object} SetHmacKeyMetadataOptions\n * @property {string} [userProject] This parameter is currently ignored.\n */\n /**\n * @callback HmacKeyMetadataCallback\n * @param {?Error} err Request error, if any.\n * @param {HmacKeyMetadata} metadata The updated {@link HmacKeyMetadata} object.\n * @param {object} apiResponse The full API response.\n */\n /**\n * @typedef {array} HmacKeyMetadataResponse\n * @property {HmacKeyMetadata} 0 The updated {@link HmacKeyMetadata} object.\n * @property {object} 1 The full API response.\n */\n /**\n * Updates the state of an HMAC key. See {@link SetHmacKeyMetadata} for\n * valid states.\n *\n * @method HmacKey#setMetadata\n * @param {SetHmacKeyMetadata} metadata The new metadata.\n * @param {SetHmacKeyMetadataOptions} [options] Configuration options.\n * @param {HmacKeyMetadataCallback} [callback] Callback function.\n * @returns {Promise<HmacKeyMetadataResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n *\n * const metadata = {\n * state: 'INACTIVE',\n * };\n *\n * storage.hmacKey('ACCESS_ID')\n * .setMetadata(metadata, (err, hmacKeyMetadata) => {\n * if (err) {\n * // The request was an error.\n * console.error(err);\n * return;\n * }\n * console.log(hmacKeyMetadata);\n * });\n *\n * //-\n * // If the callback is omitted, a promise is returned.\n * //-\n * storage.hmacKey('ACCESS_ID')\n * .setMetadata(metadata)\n * .then((data) => {\n * const hmacKeyMetadata = data[0];\n * console.log(hmacKeyMetadata);\n * });\n * ```\n */\n setMetadata: {\n reqOpts: {\n method: 'PUT',\n },\n },\n };\n const projectId = (options && options.projectId) || storage.projectId;\n super({\n parent: storage,\n id: accessId,\n baseUrl: `/projects/${projectId}/hmacKeys`,\n methods,\n });\n this.storage = storage;\n this.instanceRetryValue = storage.retryOptions.autoRetry;\n }\n setMetadata(metadata, optionsOrCallback, cb) {\n // ETag preconditions are not currently supported. Retries should be disabled if the idempotency strategy is not set to RetryAlways\n if (this.storage.retryOptions.idempotencyStrategy !==\n IdempotencyStrategy.RetryAlways) {\n this.storage.retryOptions.autoRetry = false;\n }\n const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};\n cb =\n typeof optionsOrCallback === 'function'\n ? optionsOrCallback\n : cb;\n super\n .setMetadata(metadata, options)\n .then(resp => cb(null, ...resp))\n .catch(cb)\n .finally(() => {\n this.storage.retryOptions.autoRetry = this.instanceRetryValue;\n });\n }\n}\n/*! Developer Documentation\n *\n * All async methods (except for streams) will return a Promise in the event\n * that a callback is omitted.\n */\npromisifyAll(HmacKey);\n","// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { Service } from './nodejs-common/index.js';\nimport { paginator } from '@google-cloud/paginator';\nimport { promisifyAll } from '@google-cloud/promisify';\nimport { Readable } from 'stream';\nimport { Bucket } from './bucket.js';\nimport { Channel } from './channel.js';\nimport { File } from './file.js';\nimport { normalize } from './util.js';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { getPackageJSON } from './package-json-helper.cjs';\nimport { HmacKey } from './hmacKey.js';\nimport { CRC32C_DEFAULT_VALIDATOR_GENERATOR, } from './crc32c.js';\nimport { DEFAULT_UNIVERSE } from 'google-auth-library';\nexport var IdempotencyStrategy;\n(function (IdempotencyStrategy) {\n IdempotencyStrategy[IdempotencyStrategy[\"RetryAlways\"] = 0] = \"RetryAlways\";\n IdempotencyStrategy[IdempotencyStrategy[\"RetryConditional\"] = 1] = \"RetryConditional\";\n IdempotencyStrategy[IdempotencyStrategy[\"RetryNever\"] = 2] = \"RetryNever\";\n})(IdempotencyStrategy || (IdempotencyStrategy = {}));\nexport var ExceptionMessages;\n(function (ExceptionMessages) {\n ExceptionMessages[\"EXPIRATION_DATE_INVALID\"] = \"The expiration date provided was invalid.\";\n ExceptionMessages[\"EXPIRATION_DATE_PAST\"] = \"An expiration date cannot be in the past.\";\n})(ExceptionMessages || (ExceptionMessages = {}));\nexport var StorageExceptionMessages;\n(function (StorageExceptionMessages) {\n StorageExceptionMessages[\"BUCKET_NAME_REQUIRED\"] = \"A bucket name is needed to use Cloud Storage.\";\n StorageExceptionMessages[\"BUCKET_NAME_REQUIRED_CREATE\"] = \"A name is required to create a bucket.\";\n StorageExceptionMessages[\"HMAC_SERVICE_ACCOUNT\"] = \"The first argument must be a service account email to create an HMAC key.\";\n StorageExceptionMessages[\"HMAC_ACCESS_ID\"] = \"An access ID is needed to create an HmacKey object.\";\n})(StorageExceptionMessages || (StorageExceptionMessages = {}));\nexport const PROTOCOL_REGEX = /^(\\w*):\\/\\//;\n/**\n * Default behavior: Automatically retry retriable server errors.\n *\n * @const {boolean}\n */\nexport const AUTO_RETRY_DEFAULT = true;\n/**\n * Default behavior: Only attempt to retry retriable errors 3 times.\n *\n * @const {number}\n */\nexport const MAX_RETRY_DEFAULT = 3;\n/**\n * Default behavior: Wait twice as long as previous retry before retrying.\n *\n * @const {number}\n */\nexport const RETRY_DELAY_MULTIPLIER_DEFAULT = 2;\n/**\n * Default behavior: If the operation doesn't succeed after 600 seconds,\n * stop retrying.\n *\n * @const {number}\n */\nexport const TOTAL_TIMEOUT_DEFAULT = 600;\n/**\n * Default behavior: Wait no more than 64 seconds between retries.\n *\n * @const {number}\n */\nexport const MAX_RETRY_DELAY_DEFAULT = 64;\n/**\n * Default behavior: Retry conditionally idempotent operations if correct preconditions are set.\n *\n * @const {enum}\n * @private\n */\nconst IDEMPOTENCY_STRATEGY_DEFAULT = IdempotencyStrategy.RetryConditional;\n/**\n * Returns true if the API request should be retried, given the error that was\n * given the first time the request was attempted.\n * @const\n * @param {error} err - The API error to check if it is appropriate to retry.\n * @return {boolean} True if the API request should be retried, false otherwise.\n */\nexport const RETRYABLE_ERR_FN_DEFAULT = function (err) {\n var _a;\n const isConnectionProblem = (reason) => {\n return (reason.includes('eai_again') || // DNS lookup error\n reason === 'econnreset' ||\n reason === 'unexpected connection closure' ||\n reason === 'epipe' ||\n reason === 'socket connection timeout');\n };\n if (err) {\n if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) {\n return true;\n }\n if (typeof err.code === 'string') {\n if (['408', '429', '500', '502', '503', '504'].indexOf(err.code) !== -1) {\n return true;\n }\n const reason = err.code.toLowerCase();\n if (isConnectionProblem(reason)) {\n return true;\n }\n }\n if (err.errors) {\n for (const e of err.errors) {\n const reason = (_a = e === null || e === void 0 ? void 0 : e.reason) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();\n if (reason && isConnectionProblem(reason)) {\n return true;\n }\n }\n }\n }\n return false;\n};\n/*! Developer Documentation\n *\n * Invoke this method to create a new Storage object bound with pre-determined\n * configuration options. For each object that can be created (e.g., a bucket),\n * there is an equivalent static and instance method. While they are classes,\n * they can be instantiated without use of the `new` keyword.\n */\n/**\n * Cloud Storage uses access control lists (ACLs) to manage object and\n * bucket access. ACLs are the mechanism you use to share objects with other\n * users and allow other users to access your buckets and objects.\n *\n * This object provides constants to refer to the three permission levels that\n * can be granted to an entity:\n *\n * - `gcs.acl.OWNER_ROLE` - (\"OWNER\")\n * - `gcs.acl.READER_ROLE` - (\"READER\")\n * - `gcs.acl.WRITER_ROLE` - (\"WRITER\")\n *\n * See {@link https://cloud.google.com/storage/docs/access-control/lists| About Access Control Lists}\n *\n * @name Storage#acl\n * @type {object}\n * @property {string} OWNER_ROLE\n * @property {string} READER_ROLE\n * @property {string} WRITER_ROLE\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const albums = storage.bucket('albums');\n *\n * //-\n * // Make all of the files currently in a bucket publicly readable.\n * //-\n * const options = {\n * entity: 'allUsers',\n * role: storage.acl.READER_ROLE\n * };\n *\n * albums.acl.add(options, function(err, aclObject) {});\n *\n * //-\n * // Make any new objects added to a bucket publicly readable.\n * //-\n * albums.acl.default.add(options, function(err, aclObject) {});\n *\n * //-\n * // Grant a user ownership permissions to a bucket.\n * //-\n * albums.acl.add({\n * entity: 'user-useremail@example.com',\n * role: storage.acl.OWNER_ROLE\n * }, function(err, aclObject) {});\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * albums.acl.add(options).then(function(data) {\n * const aclObject = data[0];\n * const apiResponse = data[1];\n * });\n * ```\n */\n/**\n * Get {@link Bucket} objects for all of the buckets in your project as\n * a readable object stream.\n *\n * @method Storage#getBucketsStream\n * @param {GetBucketsRequest} [query] Query object for listing buckets.\n * @returns {ReadableStream} A readable stream that emits {@link Bucket}\n * instances.\n *\n * @example\n * ```\n * storage.getBucketsStream()\n * .on('error', console.error)\n * .on('data', function(bucket) {\n * // bucket is a Bucket object.\n * })\n * .on('end', function() {\n * // All buckets retrieved.\n * });\n *\n * //-\n * // If you anticipate many results, you can end a stream early to prevent\n * // unnecessary processing and API requests.\n * //-\n * storage.getBucketsStream()\n * .on('data', function(bucket) {\n * this.end();\n * });\n * ```\n */\n/**\n * Get {@link HmacKey} objects for all of the HMAC keys in the project in a\n * readable object stream.\n *\n * @method Storage#getHmacKeysStream\n * @param {GetHmacKeysOptions} [options] Configuration options.\n * @returns {ReadableStream} A readable stream that emits {@link HmacKey}\n * instances.\n *\n * @example\n * ```\n * storage.getHmacKeysStream()\n * .on('error', console.error)\n * .on('data', function(hmacKey) {\n * // hmacKey is an HmacKey object.\n * })\n * .on('end', function() {\n * // All HmacKey retrieved.\n * });\n *\n * //-\n * // If you anticipate many results, you can end a stream early to prevent\n * // unnecessary processing and API requests.\n * //-\n * storage.getHmacKeysStream()\n * .on('data', function(bucket) {\n * this.end();\n * });\n * ```\n */\n/**\n * <h4>ACLs</h4>\n * Cloud Storage uses access control lists (ACLs) to manage object and\n * bucket access. ACLs are the mechanism you use to share files with other users\n * and allow other users to access your buckets and files.\n *\n * To learn more about ACLs, read this overview on\n * {@link https://cloud.google.com/storage/docs/access-control| Access Control}.\n *\n * See {@link https://cloud.google.com/storage/docs/overview| Cloud Storage overview}\n * See {@link https://cloud.google.com/storage/docs/access-control| Access Control}\n *\n * @class\n */\nexport class Storage extends Service {\n getBucketsStream() {\n // placeholder body, overwritten in constructor\n return new Readable();\n }\n getHmacKeysStream() {\n // placeholder body, overwritten in constructor\n return new Readable();\n }\n /**\n * @callback Crc32cGeneratorToStringCallback\n * A method returning the CRC32C as a base64-encoded string.\n *\n * @returns {string}\n *\n * @example\n * Hashing the string 'data' should return 'rth90Q=='\n *\n * ```js\n * const buffer = Buffer.from('data');\n * crc32c.update(buffer);\n * crc32c.toString(); // 'rth90Q=='\n * ```\n **/\n /**\n * @callback Crc32cGeneratorValidateCallback\n * A method validating a base64-encoded CRC32C string.\n *\n * @param {string} [value] base64-encoded CRC32C string to validate\n * @returns {boolean}\n *\n * @example\n * Should return `true` if the value matches, `false` otherwise\n *\n * ```js\n * const buffer = Buffer.from('data');\n * crc32c.update(buffer);\n * crc32c.validate('DkjKuA=='); // false\n * crc32c.validate('rth90Q=='); // true\n * ```\n **/\n /**\n * @callback Crc32cGeneratorUpdateCallback\n * A method for passing `Buffer`s for CRC32C generation.\n *\n * @param {Buffer} [data] data to update CRC32C value with\n * @returns {undefined}\n *\n * @example\n * Hashing buffers from 'some ' and 'text\\n'\n *\n * ```js\n * const buffer1 = Buffer.from('some ');\n * crc32c.update(buffer1);\n *\n * const buffer2 = Buffer.from('text\\n');\n * crc32c.update(buffer2);\n *\n * crc32c.toString(); // 'DkjKuA=='\n * ```\n **/\n /**\n * @typedef {object} CRC32CValidator\n * @property {Crc32cGeneratorToStringCallback}\n * @property {Crc32cGeneratorValidateCallback}\n * @property {Crc32cGeneratorUpdateCallback}\n */\n /**\n * @callback Crc32cGeneratorCallback\n * @returns {CRC32CValidator}\n */\n /**\n * @typedef {object} StorageOptions\n * @property {string} [projectId] The project ID from the Google Developer's\n * Console, e.g. 'grape-spaceship-123'. We will also check the environment\n * variable `GCLOUD_PROJECT` for your project ID. If your app is running\n * in an environment which supports {@link\n * https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application\n * Application Default Credentials}, your project ID will be detected\n * automatically.\n * @property {string} [keyFilename] Full path to the a .json, .pem, or .p12 key\n * downloaded from the Google Developers Console. If you provide a path to\n * a JSON file, the `projectId` option above is not necessary. NOTE: .pem and\n * .p12 require you to specify the `email` option as well.\n * @property {string} [email] Account email address. Required when using a .pem\n * or .p12 keyFilename.\n * @property {object} [credentials] Credentials object.\n * @property {string} [credentials.client_email]\n * @property {string} [credentials.private_key]\n * @property {object} [retryOptions] Options for customizing retries. Retriable server errors\n * will be retried with exponential delay between them dictated by the formula\n * max(maxRetryDelay, retryDelayMultiplier*retryNumber) until maxRetries or totalTimeout\n * has been reached. Retries will only happen if autoRetry is set to true.\n * @property {boolean} [retryOptions.autoRetry=true] Automatically retry requests if the\n * response is related to rate limits or certain intermittent server\n * errors. We will exponentially backoff subsequent requests by default.\n * @property {number} [retryOptions.retryDelayMultiplier = 2] the multiplier by which to\n * increase the delay time between the completion of failed requests, and the\n * initiation of the subsequent retrying request.\n * @property {number} [retryOptions.totalTimeout = 600] The total time, starting from\n * when the initial request is sent, after which an error will\n * be returned, regardless of the retrying attempts made meanwhile.\n * @property {number} [retryOptions.maxRetryDelay = 64] The maximum delay time between requests.\n * When this value is reached, ``retryDelayMultiplier`` will no longer be used to\n * increase delay time.\n * @property {number} [retryOptions.maxRetries=3] Maximum number of automatic retries\n * attempted before returning the error.\n * @property {function} [retryOptions.retryableErrorFn] Function that returns true if a given\n * error should be retried and false otherwise.\n * @property {enum} [retryOptions.idempotencyStrategy=IdempotencyStrategy.RetryConditional] Enumeration\n * controls how conditionally idempotent operations are retried. Possible values are: RetryAlways -\n * will respect other retry settings and attempt to retry conditionally idempotent operations. RetryConditional -\n * will retry conditionally idempotent operations if the correct preconditions are set. RetryNever - never\n * retry a conditionally idempotent operation.\n * @property {string} [userAgent] The value to be prepended to the User-Agent\n * header in API requests.\n * @property {object} [authClient] `AuthClient` or `GoogleAuth` client to reuse instead of creating a new one.\n * @property {number} [timeout] The amount of time in milliseconds to wait per http request before timing out.\n * @property {object[]} [interceptors_] Array of custom request interceptors to be returned in the order they were assigned.\n * @property {string} [apiEndpoint = storage.google.com] The API endpoint of the service used to make requests.\n * @property {boolean} [useAuthWithCustomEndpoint = false] Controls whether or not to use authentication when using a custom endpoint.\n * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C}\n */\n /**\n * Constructs the Storage client.\n *\n * @example\n * Create a client that uses Application Default Credentials\n * (ADC)\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * ```\n *\n * @example\n * Create a client with explicit credentials\n * ```\n * const storage = new Storage({\n * projectId: 'your-project-id',\n * keyFilename: '/path/to/keyfile.json'\n * });\n * ```\n *\n * @example\n * Create a client with credentials passed\n * by value as a JavaScript object\n * ```\n * const storage = new Storage({\n * projectId: 'your-project-id',\n * credentials: {\n * type: 'service_account',\n * project_id: 'xxxxxxx',\n * private_key_id: 'xxxx',\n * private_key:'-----BEGIN PRIVATE KEY-----xxxxxxx\\n-----END PRIVATE KEY-----\\n',\n * client_email: 'xxxx',\n * client_id: 'xxx',\n * auth_uri: 'https://accounts.google.com/o/oauth2/auth',\n * token_uri: 'https://oauth2.googleapis.com/token',\n * auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs',\n * client_x509_cert_url: 'xxx',\n * }\n * });\n * ```\n *\n * @example\n * Create a client with credentials passed\n * by loading a JSON file directly from disk\n * ```\n * const storage = new Storage({\n * projectId: 'your-project-id',\n * credentials: require('/path/to-keyfile.json')\n * });\n * ```\n *\n * @example\n * Create a client with an `AuthClient` (e.g. `DownscopedClient`)\n * ```\n * const {DownscopedClient} = require('google-auth-library');\n * const authClient = new DownscopedClient({...});\n *\n * const storage = new Storage({authClient});\n * ```\n *\n * Additional samples:\n * - https://github.com/googleapis/google-auth-library-nodejs#sample-usage-1\n * - https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/downscopedclient.js\n *\n * @param {StorageOptions} [options] Configuration options.\n */\n constructor(options = {}) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\n const universe = options.universeDomain || DEFAULT_UNIVERSE;\n let apiEndpoint = `https://storage.${universe}`;\n let customEndpoint = false;\n // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead.\n const EMULATOR_HOST = process.env.STORAGE_EMULATOR_HOST;\n if (typeof EMULATOR_HOST === 'string') {\n apiEndpoint = Storage.sanitizeEndpoint(EMULATOR_HOST);\n customEndpoint = true;\n }\n if (options.apiEndpoint && options.apiEndpoint !== apiEndpoint) {\n apiEndpoint = Storage.sanitizeEndpoint(options.apiEndpoint);\n customEndpoint = true;\n }\n options = Object.assign({}, options, { apiEndpoint });\n // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead.\n const baseUrl = EMULATOR_HOST || `${options.apiEndpoint}/storage/v1`;\n const config = {\n apiEndpoint: options.apiEndpoint,\n retryOptions: {\n autoRetry: ((_a = options.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined\n ? (_b = options.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry\n : AUTO_RETRY_DEFAULT,\n maxRetries: ((_c = options.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetries)\n ? (_d = options.retryOptions) === null || _d === void 0 ? void 0 : _d.maxRetries\n : MAX_RETRY_DEFAULT,\n retryDelayMultiplier: ((_e = options.retryOptions) === null || _e === void 0 ? void 0 : _e.retryDelayMultiplier)\n ? (_f = options.retryOptions) === null || _f === void 0 ? void 0 : _f.retryDelayMultiplier\n : RETRY_DELAY_MULTIPLIER_DEFAULT,\n totalTimeout: ((_g = options.retryOptions) === null || _g === void 0 ? void 0 : _g.totalTimeout)\n ? (_h = options.retryOptions) === null || _h === void 0 ? void 0 : _h.totalTimeout\n : TOTAL_TIMEOUT_DEFAULT,\n maxRetryDelay: ((_j = options.retryOptions) === null || _j === void 0 ? void 0 : _j.maxRetryDelay)\n ? (_k = options.retryOptions) === null || _k === void 0 ? void 0 : _k.maxRetryDelay\n : MAX_RETRY_DELAY_DEFAULT,\n retryableErrorFn: ((_l = options.retryOptions) === null || _l === void 0 ? void 0 : _l.retryableErrorFn)\n ? (_m = options.retryOptions) === null || _m === void 0 ? void 0 : _m.retryableErrorFn\n : RETRYABLE_ERR_FN_DEFAULT,\n idempotencyStrategy: ((_o = options.retryOptions) === null || _o === void 0 ? void 0 : _o.idempotencyStrategy) !== undefined\n ? (_p = options.retryOptions) === null || _p === void 0 ? void 0 : _p.idempotencyStrategy\n : IDEMPOTENCY_STRATEGY_DEFAULT,\n },\n baseUrl,\n customEndpoint,\n useAuthWithCustomEndpoint: options === null || options === void 0 ? void 0 : options.useAuthWithCustomEndpoint,\n projectIdRequired: false,\n scopes: [\n 'https://www.googleapis.com/auth/iam',\n 'https://www.googleapis.com/auth/cloud-platform',\n 'https://www.googleapis.com/auth/devstorage.full_control',\n ],\n packageJson: getPackageJSON(),\n };\n super(config, options);\n /**\n * Reference to {@link Storage.acl}.\n *\n * @name Storage#acl\n * @see Storage.acl\n */\n this.acl = Storage.acl;\n this.crc32cGenerator =\n options.crc32cGenerator || CRC32C_DEFAULT_VALIDATOR_GENERATOR;\n this.retryOptions = config.retryOptions;\n this.getBucketsStream = paginator.streamify('getBuckets');\n this.getHmacKeysStream = paginator.streamify('getHmacKeys');\n }\n static sanitizeEndpoint(url) {\n if (!PROTOCOL_REGEX.test(url)) {\n url = `https://${url}`;\n }\n return url.replace(/\\/+$/, ''); // Remove trailing slashes\n }\n /**\n * Get a reference to a Cloud Storage bucket.\n *\n * @param {string} name Name of the bucket.\n * @param {object} [options] Configuration object.\n * @param {string} [options.kmsKeyName] A Cloud KMS key that will be used to\n * encrypt objects inserted into this bucket, if no encryption method is\n * specified.\n * @param {string} [options.userProject] User project to be billed for all\n * requests made from this Bucket object.\n * @returns {Bucket}\n * @see Bucket\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const albums = storage.bucket('albums');\n * const photos = storage.bucket('photos');\n * ```\n */\n bucket(name, options) {\n if (!name) {\n throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED);\n }\n return new Bucket(this, name, options);\n }\n /**\n * Reference a channel to receive notifications about changes to your bucket.\n *\n * @param {string} id The ID of the channel.\n * @param {string} resourceId The resource ID of the channel.\n * @returns {Channel}\n * @see Channel\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const channel = storage.channel('id', 'resource-id');\n * ```\n */\n channel(id, resourceId) {\n return new Channel(this, id, resourceId);\n }\n /**\n * @typedef {array} CreateBucketResponse\n * @property {Bucket} 0 The new {@link Bucket}.\n * @property {object} 1 The full API response.\n */\n /**\n * @callback CreateBucketCallback\n * @param {?Error} err Request error, if any.\n * @param {Bucket} bucket The new {@link Bucket}.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Metadata to set for the bucket.\n *\n * @typedef {object} CreateBucketRequest\n * @property {boolean} [archive=false] Specify the storage class as Archive.\n * @property {object} [autoclass.enabled=false] Specify whether Autoclass is\n * enabled for the bucket.\n * @property {object} [autoclass.terminalStorageClass='NEARLINE'] The storage class that objects in an Autoclass bucket eventually transition to if\n * they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE.\n * @property {boolean} [coldline=false] Specify the storage class as Coldline.\n * @property {Cors[]} [cors=[]] Specify the CORS configuration to use.\n * @property {CustomPlacementConfig} [customPlacementConfig={}] Specify the bucket's regions for dual-region buckets.\n * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}.\n * @property {boolean} [dra=false] Specify the storage class as Durable Reduced\n * Availability.\n * @property {boolean} [enableObjectRetention=false] Specify whether or not object retention should be enabled on this bucket.\n * @property {object} [hierarchicalNamespace.enabled=false] Specify whether or not to enable hierarchical namespace on this bucket.\n * @property {string} [location] Specify the bucket's location. If specifying\n * a dual-region, the `customPlacementConfig` property should be set in conjunction.\n * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}.\n * @property {boolean} [multiRegional=false] Specify the storage class as\n * Multi-Regional.\n * @property {boolean} [nearline=false] Specify the storage class as Nearline.\n * @property {boolean} [regional=false] Specify the storage class as Regional.\n * @property {boolean} [requesterPays=false] Force the use of the User Project metadata field to assign operational\n * costs when an operation is made on a Bucket and its objects.\n * @property {string} [rpo] For dual-region buckets, controls whether turbo\n * replication is enabled (`ASYNC_TURBO`) or disabled (`DEFAULT`).\n * @property {boolean} [standard=true] Specify the storage class as Standard.\n * @property {string} [storageClass] The new storage class. (`standard`,\n * `nearline`, `coldline`, or `archive`).\n * **Note:** The storage classes `multi_regional`, `regional`, and\n * `durable_reduced_availability` are now legacy and will be deprecated in\n * the future.\n * @property {Versioning} [versioning=undefined] Specify the versioning status.\n * @property {string} [userProject] The ID of the project which will be billed\n * for the request.\n */\n /**\n * Create a bucket.\n *\n * Cloud Storage uses a flat namespace, so you can't create a bucket with\n * a name that is already in use. For more information, see\n * {@link https://cloud.google.com/storage/docs/bucketnaming.html#requirements| Bucket Naming Guidelines}.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/insert| Buckets: insert API Documentation}\n * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes}\n *\n * @param {string} name Name of the bucket to create.\n * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket.\n * @param {CreateBucketCallback} [callback] Callback function.\n * @returns {Promise<CreateBucketResponse>}\n * @throws {Error} If a name is not provided.\n * @see Bucket#create\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const callback = function(err, bucket, apiResponse) {\n * // `bucket` is a Bucket object.\n * };\n *\n * storage.createBucket('new-bucket', callback);\n *\n * //-\n * // Create a bucket in a specific location and region. <em>See the <a\n * // href=\"https://cloud.google.com/storage/docs/json_api/v1/buckets/insert\">\n * // Official JSON API docs</a> for complete details on the `location`\n * option.\n * // </em>\n * //-\n * const metadata = {\n * location: 'US-CENTRAL1',\n * regional: true\n * };\n *\n * storage.createBucket('new-bucket', metadata, callback);\n *\n * //-\n * // Create a bucket with a retention policy of 6 months.\n * //-\n * const metadata = {\n * retentionPolicy: {\n * retentionPeriod: 15780000 // 6 months in seconds.\n * }\n * };\n *\n * storage.createBucket('new-bucket', metadata, callback);\n *\n * //-\n * // Enable versioning on a new bucket.\n * //-\n * const metadata = {\n * versioning: {\n * enabled: true\n * }\n * };\n *\n * storage.createBucket('new-bucket', metadata, callback);\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * storage.createBucket('new-bucket').then(function(data) {\n * const bucket = data[0];\n * const apiResponse = data[1];\n * });\n *\n * ```\n * @example <caption>include:samples/buckets.js</caption>\n * region_tag:storage_create_bucket\n * Another example:\n */\n createBucket(name, metadataOrCallback, callback) {\n if (!name) {\n throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED_CREATE);\n }\n let metadata;\n if (!callback) {\n callback = metadataOrCallback;\n metadata = {};\n }\n else {\n metadata = metadataOrCallback;\n }\n const body = {\n ...metadata,\n name,\n };\n const storageClasses = {\n archive: 'ARCHIVE',\n coldline: 'COLDLINE',\n dra: 'DURABLE_REDUCED_AVAILABILITY',\n multiRegional: 'MULTI_REGIONAL',\n nearline: 'NEARLINE',\n regional: 'REGIONAL',\n standard: 'STANDARD',\n };\n const storageClassKeys = Object.keys(storageClasses);\n for (const storageClass of storageClassKeys) {\n if (body[storageClass]) {\n if (metadata.storageClass && metadata.storageClass !== storageClass) {\n throw new Error(`Both \\`${storageClass}\\` and \\`storageClass\\` were provided.`);\n }\n body.storageClass = storageClasses[storageClass];\n delete body[storageClass];\n }\n }\n if (body.requesterPays) {\n body.billing = {\n requesterPays: body.requesterPays,\n };\n delete body.requesterPays;\n }\n const query = {\n project: this.projectId,\n };\n if (body.userProject) {\n query.userProject = body.userProject;\n delete body.userProject;\n }\n if (body.enableObjectRetention) {\n query.enableObjectRetention = body.enableObjectRetention;\n delete body.enableObjectRetention;\n }\n if (body.predefinedAcl) {\n query.predefinedAcl = body.predefinedAcl;\n delete body.predefinedAcl;\n }\n if (body.predefinedDefaultObjectAcl) {\n query.predefinedDefaultObjectAcl = body.predefinedDefaultObjectAcl;\n delete body.predefinedDefaultObjectAcl;\n }\n if (body.projection) {\n query.projection = body.projection;\n delete body.projection;\n }\n this.request({\n method: 'POST',\n uri: '/b',\n qs: query,\n json: body,\n }, (err, resp) => {\n if (err) {\n callback(err, null, resp);\n return;\n }\n const bucket = this.bucket(name);\n bucket.metadata = resp;\n callback(null, bucket, resp);\n });\n }\n /**\n * @typedef {object} CreateHmacKeyOptions\n * @property {string} [projectId] The project ID of the project that owns\n * the service account of the requested HMAC key. If not provided,\n * the project ID used to instantiate the Storage client will be used.\n * @property {string} [userProject] This parameter is currently ignored.\n */\n /**\n * @typedef {object} HmacKeyMetadata\n * @property {string} accessId The access id identifies which HMAC key was\n * used to sign a request when authenticating with HMAC.\n * @property {string} etag Used to perform a read-modify-write of the key.\n * @property {string} id The resource name of the HMAC key.\n * @property {string} projectId The project ID.\n * @property {string} serviceAccountEmail The service account's email this\n * HMAC key is created for.\n * @property {string} state The state of this HMAC key. One of \"ACTIVE\",\n * \"INACTIVE\" or \"DELETED\".\n * @property {string} timeCreated The creation time of the HMAC key in\n * RFC 3339 format.\n * @property {string} [updated] The time this HMAC key was last updated in\n * RFC 3339 format.\n */\n /**\n * @typedef {array} CreateHmacKeyResponse\n * @property {HmacKey} 0 The HmacKey instance created from API response.\n * @property {string} 1 The HMAC key's secret used to access the XML API.\n * @property {object} 3 The raw API response.\n */\n /**\n * @callback CreateHmacKeyCallback Callback function.\n * @param {?Error} err Request error, if any.\n * @param {HmacKey} hmacKey The HmacKey instance created from API response.\n * @param {string} secret The HMAC key's secret used to access the XML API.\n * @param {object} apiResponse The raw API response.\n */\n /**\n * Create an HMAC key associated with an service account to authenticate\n * requests to the Cloud Storage XML API.\n *\n * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation}\n *\n * @param {string} serviceAccountEmail The service account's email address\n * with which the HMAC key is created for.\n * @param {CreateHmacKeyCallback} [callback] Callback function.\n * @return {Promise<CreateHmacKeyResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('google-cloud/storage');\n * const storage = new Storage();\n *\n * // Replace with your service account's email address\n * const serviceAccountEmail =\n * 'my-service-account@appspot.gserviceaccount.com';\n *\n * storage.createHmacKey(serviceAccountEmail, function(err, hmacKey, secret) {\n * if (!err) {\n * // Securely store the secret for use with the XML API.\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * storage.createHmacKey(serviceAccountEmail)\n * .then((response) => {\n * const hmacKey = response[0];\n * const secret = response[1];\n * // Securely store the secret for use with the XML API.\n * });\n * ```\n */\n createHmacKey(serviceAccountEmail, optionsOrCb, cb) {\n if (typeof serviceAccountEmail !== 'string') {\n throw new Error(StorageExceptionMessages.HMAC_SERVICE_ACCOUNT);\n }\n const { options, callback } = normalize(optionsOrCb, cb);\n const query = Object.assign({}, options, { serviceAccountEmail });\n const projectId = query.projectId || this.projectId;\n delete query.projectId;\n this.request({\n method: 'POST',\n uri: `/projects/${projectId}/hmacKeys`,\n qs: query,\n maxRetries: 0, //explicitly set this value since this is a non-idempotent function\n }, (err, resp) => {\n if (err) {\n callback(err, null, null, resp);\n return;\n }\n const metadata = resp.metadata;\n const hmacKey = this.hmacKey(metadata.accessId, {\n projectId: metadata.projectId,\n });\n hmacKey.metadata = resp.metadata;\n callback(null, hmacKey, resp.secret, resp);\n });\n }\n /**\n * Query object for listing buckets.\n *\n * @typedef {object} GetBucketsRequest\n * @property {boolean} [autoPaginate=true] Have pagination handled\n * automatically.\n * @property {number} [maxApiCalls] Maximum number of API calls to make.\n * @property {number} [maxResults] Maximum number of items plus prefixes to\n * return per call.\n * Note: By default will handle pagination automatically\n * if more than 1 page worth of results are requested per call.\n * When `autoPaginate` is set to `false` the smaller of `maxResults`\n * or 1 page of results will be returned per call.\n * @property {string} [pageToken] A previously-returned page token\n * representing part of the larger set of results to view.\n * @property {string} [userProject] The ID of the project which will be billed\n * for the request.\n * @param {boolean} [softDeleted] If true, returns the soft-deleted object.\n * Object `generation` is required if `softDeleted` is set to True.\n */\n /**\n * @typedef {array} GetBucketsResponse\n * @property {Bucket[]} 0 Array of {@link Bucket} instances.\n * @property {object} 1 nextQuery A query object to receive more results.\n * @property {object} 2 The full API response.\n */\n /**\n * @callback GetBucketsCallback\n * @param {?Error} err Request error, if any.\n * @param {Bucket[]} buckets Array of {@link Bucket} instances.\n * @param {object} nextQuery A query object to receive more results.\n * @param {object} apiResponse The full API response.\n */\n /**\n * Get Bucket objects for all of the buckets in your project.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/list| Buckets: list API Documentation}\n *\n * @param {GetBucketsRequest} [query] Query object for listing buckets.\n * @param {GetBucketsCallback} [callback] Callback function.\n * @returns {Promise<GetBucketsResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * storage.getBuckets(function(err, buckets) {\n * if (!err) {\n * // buckets is an array of Bucket objects.\n * }\n * });\n *\n * //-\n * // To control how many API requests are made and page through the results\n * // manually, set `autoPaginate` to `false`.\n * //-\n * const callback = function(err, buckets, nextQuery, apiResponse) {\n * if (nextQuery) {\n * // More results exist.\n * storage.getBuckets(nextQuery, callback);\n * }\n *\n * // The `metadata` property is populated for you with the metadata at the\n * // time of fetching.\n * buckets[0].metadata;\n *\n * // However, in cases where you are concerned the metadata could have\n * // changed, use the `getMetadata` method.\n * buckets[0].getMetadata(function(err, metadata, apiResponse) {});\n * };\n *\n * storage.getBuckets({\n * autoPaginate: false\n * }, callback);\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * storage.getBuckets().then(function(data) {\n * const buckets = data[0];\n * });\n *\n * ```\n * @example <caption>include:samples/buckets.js</caption>\n * region_tag:storage_list_buckets\n * Another example:\n */\n getBuckets(optionsOrCallback, cb) {\n const { options, callback } = normalize(optionsOrCallback, cb);\n options.project = options.project || this.projectId;\n this.request({\n uri: '/b',\n qs: options,\n }, (err, resp) => {\n if (err) {\n callback(err, null, null, resp);\n return;\n }\n const itemsArray = resp.items ? resp.items : [];\n const unreachableArray = resp.unreachable ? resp.unreachable : [];\n const buckets = itemsArray.map((bucket) => {\n const bucketInstance = this.bucket(bucket.id);\n bucketInstance.metadata = bucket;\n return bucketInstance;\n });\n if (unreachableArray.length > 0) {\n unreachableArray.forEach((fullPath) => {\n const name = fullPath.split('/').pop();\n if (name) {\n const placeholder = this.bucket(name);\n placeholder.unreachable = true;\n placeholder.metadata = {};\n buckets.push(placeholder);\n }\n });\n }\n const nextQuery = resp.nextPageToken\n ? Object.assign({}, options, { pageToken: resp.nextPageToken })\n : null;\n callback(null, buckets, nextQuery, resp);\n });\n }\n getHmacKeys(optionsOrCb, cb) {\n const { options, callback } = normalize(optionsOrCb, cb);\n const query = Object.assign({}, options);\n const projectId = query.projectId || this.projectId;\n delete query.projectId;\n this.request({\n uri: `/projects/${projectId}/hmacKeys`,\n qs: query,\n }, (err, resp) => {\n if (err) {\n callback(err, null, null, resp);\n return;\n }\n const itemsArray = resp.items ? resp.items : [];\n const hmacKeys = itemsArray.map((hmacKey) => {\n const hmacKeyInstance = this.hmacKey(hmacKey.accessId, {\n projectId: hmacKey.projectId,\n });\n hmacKeyInstance.metadata = hmacKey;\n return hmacKeyInstance;\n });\n const nextQuery = resp.nextPageToken\n ? Object.assign({}, options, { pageToken: resp.nextPageToken })\n : null;\n callback(null, hmacKeys, nextQuery, resp);\n });\n }\n /**\n * @typedef {array} GetServiceAccountResponse\n * @property {object} 0 The service account resource.\n * @property {object} 1 The full\n * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}.\n */\n /**\n * @callback GetServiceAccountCallback\n * @param {?Error} err Request error, if any.\n * @param {object} serviceAccount The serviceAccount resource.\n * @param {string} serviceAccount.emailAddress The service account email\n * address.\n * @param {object} apiResponse The full\n * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}.\n */\n /**\n * Get the email address of this project's Google Cloud Storage service\n * account.\n *\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount/get| Projects.serviceAccount: get API Documentation}\n * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| Projects.serviceAccount Resource}\n *\n * @param {object} [options] Configuration object.\n * @param {string} [options.userProject] User project to be billed for this\n * request.\n * @param {GetServiceAccountCallback} [callback] Callback function.\n * @returns {Promise<GetServiceAccountResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n *\n * storage.getServiceAccount(function(err, serviceAccount, apiResponse) {\n * if (!err) {\n * const serviceAccountEmail = serviceAccount.emailAddress;\n * }\n * });\n *\n * //-\n * // If the callback is omitted, we'll return a Promise.\n * //-\n * storage.getServiceAccount().then(function(data) {\n * const serviceAccountEmail = data[0].emailAddress;\n * const apiResponse = data[1];\n * });\n * ```\n */\n getServiceAccount(optionsOrCallback, cb) {\n const { options, callback } = normalize(optionsOrCallback, cb);\n this.request({\n uri: `/projects/${this.projectId}/serviceAccount`,\n qs: options,\n }, (err, resp) => {\n if (err) {\n callback(err, null, resp);\n return;\n }\n const camelCaseResponse = {};\n for (const prop in resp) {\n // eslint-disable-next-line no-prototype-builtins\n if (resp.hasOwnProperty(prop)) {\n const camelCaseProp = prop.replace(/_(\\w)/g, (_, match) => match.toUpperCase());\n camelCaseResponse[camelCaseProp] = resp[prop];\n }\n }\n callback(null, camelCaseResponse, resp);\n });\n }\n /**\n * Get a reference to an HmacKey object.\n * Note: this does not fetch the HMAC key's metadata. Use HmacKey#get() to\n * retrieve and populate the metadata.\n *\n * To get a reference to an HMAC key that's not created for a service\n * account in the same project used to instantiate the Storage client,\n * supply the project's ID as `projectId` in the `options` argument.\n *\n * @param {string} accessId The HMAC key's access ID.\n * @param {HmacKeyOptions} options HmacKey constructor options.\n * @returns {HmacKey}\n * @see HmacKey\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const hmacKey = storage.hmacKey('ACCESS_ID');\n * ```\n */\n hmacKey(accessId, options) {\n if (!accessId) {\n throw new Error(StorageExceptionMessages.HMAC_ACCESS_ID);\n }\n return new HmacKey(this, accessId, options);\n }\n}\n/**\n * {@link Bucket} class.\n *\n * @name Storage.Bucket\n * @see Bucket\n * @type {Constructor}\n */\nStorage.Bucket = Bucket;\n/**\n * {@link Channel} class.\n *\n * @name Storage.Channel\n * @see Channel\n * @type {Constructor}\n */\nStorage.Channel = Channel;\n/**\n * {@link File} class.\n *\n * @name Storage.File\n * @see File\n * @type {Constructor}\n */\nStorage.File = File;\n/**\n * {@link HmacKey} class.\n *\n * @name Storage.HmacKey\n * @see HmacKey\n * @type {Constructor}\n */\nStorage.HmacKey = HmacKey;\nStorage.acl = {\n OWNER_ROLE: 'OWNER',\n READER_ROLE: 'READER',\n WRITER_ROLE: 'WRITER',\n};\n/*! Developer Documentation\n *\n * These methods can be auto-paginated.\n */\npaginator.extend(Storage, ['getBuckets', 'getHmacKeys']);\n/*! Developer Documentation\n *\n * All async methods (except for streams) will return a Promise in the event\n * that a callback is omitted.\n */\npromisifyAll(Storage, {\n exclude: ['bucket', 'channel', 'hmacKey'],\n});\n","'use strict';\n\nconst nameStartChar = ':A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nconst nameChar = nameStartChar + '\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nexport const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*';\nconst regexName = new RegExp('^' + nameRegexp + '$');\n\nexport function getAllMatches(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n}\n\nexport const isName = function (string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === 'undefined');\n}\n\nexport function isExist(v) {\n return typeof v !== 'undefined';\n}\n\nexport function isEmptyObject(obj) {\n return Object.keys(obj).length === 0;\n}\n\nexport function getValue(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return '';\n }\n}\n\n/**\n * Dangerous property names that could lead to prototype pollution or security issues\n */\nexport const DANGEROUS_PROPERTY_NAMES = [\n // '__proto__',\n // 'constructor',\n // 'prototype',\n 'hasOwnProperty',\n 'toString',\n 'valueOf',\n '__defineGetter__',\n '__defineSetter__',\n '__lookupGetter__',\n '__lookupSetter__'\n];\n\nexport const criticalProperties = [\"__proto__\", \"constructor\", \"prototype\"];","'use strict';\n\nimport { getAllMatches, isName } from './util.js';\n\nconst defaultOptions = {\n allowBooleanAttributes: false, //A tag can have attributes without any value\n unpairedTags: []\n};\n\n//const tagsPattern = new RegExp(\"<\\\\/?([\\\\w:\\\\-_\\.]+)\\\\s*\\/?>\",\"g\");\nexport function validate(xmlData, options) {\n options = Object.assign({}, defaultOptions, options);\n\n //xmlData = xmlData.replace(/(\\r\\n|\\n|\\r)/gm,\"\");//make it single line\n //xmlData = xmlData.replace(/(^\\s*<\\?xml.*?\\?>)/g,\"\");//Remove XML starting tag\n //xmlData = xmlData.replace(/(<!DOCTYPE[\\s\\w\\\"\\.\\/\\-\\:]+(\\[.*\\])*\\s*>)/g,\"\");//Remove DOCTYPE\n const tags = [];\n let tagFound = false;\n\n //indicates that the root tag has been closed (aka. depth 0 has been reached)\n let reachedRoot = false;\n\n if (xmlData[0] === '\\ufeff') {\n // check for byte order mark (BOM)\n xmlData = xmlData.substr(1);\n }\n\n for (let i = 0; i < xmlData.length; i++) {\n\n if (xmlData[i] === '<' && xmlData[i + 1] === '?') {\n i += 2;\n i = readPI(xmlData, i);\n if (i.err) return i;\n } else if (xmlData[i] === '<') {\n //starting of tag\n //read until you reach to '>' avoiding any '>' in attribute value\n let tagStartPos = i;\n i++;\n\n if (xmlData[i] === '!') {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === '/') {\n //closing tag\n closingTag = true;\n i++;\n }\n //read tagname\n let tagName = '';\n for (; i < xmlData.length &&\n xmlData[i] !== '>' &&\n xmlData[i] !== ' ' &&\n xmlData[i] !== '\\t' &&\n xmlData[i] !== '\\n' &&\n xmlData[i] !== '\\r'; i++\n ) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n //console.log(tagName);\n\n if (tagName[tagName.length - 1] === '/') {\n //self closing tag without attributes\n tagName = tagName.substring(0, tagName.length - 1);\n //continue;\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\" + tagName + \"' is an invalid name.\";\n }\n return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));\n }\n\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject('InvalidAttr', \"Attributes for '\" + tagName + \"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n\n if (attrStr[attrStr.length - 1] === '/') {\n //self closing tag\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n //continue; //text may presents after self closing tag\n } else {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject('InvalidTag', \"Closing tag '\" + tagName + \"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\" + tagName + \"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\" + tagName + \"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject('InvalidTag',\n \"Expected closing tag '\" + otg.tagName + \"' (opened in line \" + openPos.line + \", col \" + openPos.col + \") instead of closing tag '\" + tagName + \"'.\",\n getLineNumberForPosition(xmlData, tagStartPos));\n }\n\n //when there are no more tags, we reached the root level.\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n\n //if the root level has been reached before ...\n if (reachedRoot === true) {\n return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));\n } else if (options.unpairedTags.indexOf(tagName) !== -1) {\n //don't push into stack\n } else {\n tags.push({ tagName, tagStartPos });\n }\n tagFound = true;\n }\n\n //skip tag text value\n //It may include comments and CDATA value\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n if (xmlData[i + 1] === '!') {\n //comment or CADATA\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i + 1] === '?') {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else {\n break;\n }\n } else if (xmlData[i] === '&') {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject('InvalidChar', \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n } else {\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject('InvalidXml', \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n } //end of reading tag text value\n if (xmlData[i] === '<') {\n i--;\n }\n }\n } else {\n if (isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject('InvalidChar', \"char '\" + xmlData[i] + \"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n\n if (!tagFound) {\n return getErrorObject('InvalidXml', 'Start tag expected.', 1);\n } else if (tags.length == 1) {\n return getErrorObject('InvalidTag', \"Unclosed tag '\" + tags[0].tagName + \"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n } else if (tags.length > 0) {\n return getErrorObject('InvalidXml', \"Invalid '\" +\n JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\\r?\\n/g, '') +\n \"' found.\", { line: 1, col: 1 });\n }\n\n return true;\n};\n\nfunction isWhiteSpace(char) {\n return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r';\n}\n/**\n * Read Processing insstructions and skip\n * @param {*} xmlData\n * @param {*} i\n */\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == '?' || xmlData[i] == ' ') {\n //tagname\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === 'xml') {\n return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {\n //check if valid attribut string\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\n\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {\n //comment\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n } else if (\n xmlData.length > i + 8 &&\n xmlData[i + 1] === 'D' &&\n xmlData[i + 2] === 'O' &&\n xmlData[i + 3] === 'C' &&\n xmlData[i + 4] === 'T' &&\n xmlData[i + 5] === 'Y' &&\n xmlData[i + 6] === 'P' &&\n xmlData[i + 7] === 'E'\n ) {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n angleBracketsCount++;\n } else if (xmlData[i] === '>') {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (\n xmlData.length > i + 9 &&\n xmlData[i + 1] === '[' &&\n xmlData[i + 2] === 'C' &&\n xmlData[i + 3] === 'D' &&\n xmlData[i + 4] === 'A' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'A' &&\n xmlData[i + 7] === '['\n ) {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n }\n\n return i;\n}\n\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\n\n/**\n * Keep reading xmlData until '<' is found outside the attribute value.\n * @param {string} xmlData\n * @param {number} i\n */\nfunction readAttributeStr(xmlData, i) {\n let attrStr = '';\n let startChar = '';\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === '') {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) {\n //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa\n } else {\n startChar = '';\n }\n } else if (xmlData[i] === '>') {\n if (startChar === '') {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== '') {\n return false;\n }\n\n return {\n value: attrStr,\n index: i,\n tagClosed: tagClosed\n };\n}\n\n/**\n * Select all the attributes whether valid or invalid.\n */\nconst validAttrStrRegxp = new RegExp('(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*([\\'\"])(([\\\\s\\\\S])*?)\\\\5)?', 'g');\n\n//attr, =\"sd\", a=\"amit's\", a=\"sd\"b=\"saf\", ab cd=\"\"\n\nfunction validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\" + matches[i][2] + \"' has no space in starting.\", getPositionFromMatch(matches[i]))\n } else if (matches[i][3] !== undefined && matches[i][4] === undefined) {\n return getErrorObject('InvalidAttr', \"Attribute '\" + matches[i][2] + \"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\" + matches[i][2] + \"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\" + attrName + \"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!Object.prototype.hasOwnProperty.call(attrNames, attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\" + attrName + \"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n\n return true;\n}\n\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === 'x') {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === ';')\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\n\nfunction validateAmpersand(xmlData, i) {\n // https://www.w3.org/TR/xml/#dt-charref\n i++;\n if (xmlData[i] === ';')\n return -1;\n if (xmlData[i] === '#') {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === ';')\n break;\n return -1;\n }\n return i;\n}\n\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code: code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col,\n },\n };\n}\n\nfunction validateAttrName(attrName) {\n return isName(attrName);\n}\n\n// const startsWithXML = /^xml/i;\n\nfunction validateTagName(tagname) {\n return isName(tagname) /* && !tagname.match(startsWithXML) */;\n}\n\n//this function returns the line number for the character at the given index\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\n\n//this function returns the position of the first character of match within attrStr\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\n","// ---------------------------------------------------------------------------\n// Complete HTML5 named entity reference\n// Organized by logical categories for easy maintenance and selective importing\n// ---------------------------------------------------------------------------\n\n/**\n * Basic Latin & Special Characters\n * @type {Record<string, string>}\n */\nexport const BASIC_LATIN = {\n amp: '&',\n AMP: '&',\n lt: '<',\n LT: '<',\n gt: '>',\n GT: '>',\n quot: '\"',\n QUOT: '\"',\n apos: \"'\",\n lsquo: '‘',\n rsquo: '’',\n ldquo: '“',\n rdquo: '”',\n lsquor: '‚',\n rsquor: '’',\n ldquor: '„',\n bdquo: '„',\n comma: ',',\n period: '.',\n colon: ':',\n semi: ';',\n excl: '!',\n quest: '?',\n num: '#',\n dollar: '$',\n percent: '%',\n ast: '*',\n commat: '@',\n lowbar: '_',\n verbar: '|',\n vert: '|',\n sol: '/',\n bsol: '\\\\',\n lbrace: '{',\n rbrace: '}',\n lbrack: '[',\n rbrack: ']',\n lpar: '(',\n rpar: ')',\n nbsp: '\\u00a0',\n iexcl: '¡',\n cent: '¢',\n pound: '£',\n curren: '¤',\n yen: '¥',\n brvbar: '¦',\n sect: '§',\n uml: '¨',\n copy: '©',\n COPY: '©',\n ordf: 'ª',\n laquo: '«',\n not: '¬',\n shy: '\\u00ad',\n reg: '®',\n REG: '®',\n macr: '¯',\n deg: '°',\n plusmn: '±',\n sup2: '²',\n sup3: '³',\n acute: '´',\n micro: 'µ',\n para: '¶',\n middot: '·',\n cedil: '¸',\n sup1: '¹',\n ordm: 'º',\n raquo: '»',\n frac14: '¼',\n frac12: '½',\n half: '½',\n frac34: '¾',\n iquest: '¿',\n times: '×',\n div: '÷',\n divide: '÷',\n};\n\n/**\n * Latin Extended & Accented Letters (A-Z)\n * @type {Record<string, string>}\n */\nexport const LATIN_ACCENTS = {\n Agrave: 'À',\n agrave: 'à',\n Aacute: 'Á',\n aacute: 'á',\n Acirc: 'Â',\n acirc: 'â',\n Atilde: 'Ã',\n atilde: 'ã',\n Auml: 'Ä',\n auml: 'ä',\n Aring: 'Å',\n aring: 'å',\n AElig: 'Æ',\n aelig: 'æ',\n Ccedil: 'Ç',\n ccedil: 'ç',\n Egrave: 'È',\n egrave: 'è',\n Eacute: 'É',\n eacute: 'é',\n Ecirc: 'Ê',\n ecirc: 'ê',\n Euml: 'Ë',\n euml: 'ë',\n Igrave: 'Ì',\n igrave: 'ì',\n Iacute: 'Í',\n iacute: 'í',\n Icirc: 'Î',\n icirc: 'î',\n Iuml: 'Ï',\n iuml: 'ï',\n ETH: 'Ð',\n eth: 'ð',\n Ntilde: 'Ñ',\n ntilde: 'ñ',\n Ograve: 'Ò',\n ograve: 'ò',\n Oacute: 'Ó',\n oacute: 'ó',\n Ocirc: 'Ô',\n ocirc: 'ô',\n Otilde: 'Õ',\n otilde: 'õ',\n Ouml: 'Ö',\n ouml: 'ö',\n Oslash: 'Ø',\n oslash: 'ø',\n Ugrave: 'Ù',\n ugrave: 'ù',\n Uacute: 'Ú',\n uacute: 'ú',\n Ucirc: 'Û',\n ucirc: 'û',\n Uuml: 'Ü',\n uuml: 'ü',\n Yacute: 'Ý',\n yacute: 'ý',\n THORN: 'Þ',\n thorn: 'þ',\n szlig: 'ß',\n yuml: 'ÿ',\n Yuml: 'Ÿ',\n};\n\n/**\n * Latin Extended (Letters with diacritics)\n * @type {Record<string, string>}\n */\nexport const LATIN_EXTENDED = {\n Amacr: 'Ā',\n amacr: 'ā',\n Abreve: 'Ă',\n abreve: 'ă',\n Aogon: 'Ą',\n aogon: 'ą',\n Cacute: 'Ć',\n cacute: 'ć',\n Ccirc: 'Ĉ',\n ccirc: 'ĉ',\n Cdot: 'Ċ',\n cdot: 'ċ',\n Ccaron: 'Č',\n ccaron: 'č',\n Dcaron: 'Ď',\n dcaron: 'ď',\n Dstrok: 'Đ',\n dstrok: 'đ',\n Emacr: 'Ē',\n emacr: 'ē',\n Ecaron: 'Ě',\n ecaron: 'ě',\n Edot: 'Ė',\n edot: 'ė',\n Eogon: 'Ę',\n eogon: 'ę',\n Gcirc: 'Ĝ',\n gcirc: 'ĝ',\n Gbreve: 'Ğ',\n gbreve: 'ğ',\n Gdot: 'Ġ',\n gdot: 'ġ',\n Gcedil: 'Ģ',\n Hcirc: 'Ĥ',\n hcirc: 'ĥ',\n Hstrok: 'Ħ',\n hstrok: 'ħ',\n Itilde: 'Ĩ',\n itilde: 'ĩ',\n Imacr: 'Ī',\n imacr: 'ī',\n Iogon: 'Į',\n iogon: 'į',\n Idot: 'İ',\n IJlig: 'IJ',\n ijlig: 'ij',\n Jcirc: 'Ĵ',\n jcirc: 'ĵ',\n Kcedil: 'Ķ',\n kcedil: 'ķ',\n kgreen: 'ĸ',\n Lacute: 'Ĺ',\n lacute: 'ĺ',\n Lcedil: 'Ļ',\n lcedil: 'ļ',\n Lcaron: 'Ľ',\n lcaron: 'ľ',\n Lmidot: 'Ŀ',\n lmidot: 'ŀ',\n Lstrok: 'Ł',\n lstrok: 'ł',\n Nacute: 'Ń',\n nacute: 'ń',\n Ncaron: 'Ň',\n ncaron: 'ň',\n Ncedil: 'Ņ',\n ncedil: 'ņ',\n ENG: 'Ŋ',\n eng: 'ŋ',\n Omacr: 'Ō',\n omacr: 'ō',\n Odblac: 'Ő',\n odblac: 'ő',\n OElig: 'Œ',\n oelig: 'œ',\n Racute: 'Ŕ',\n racute: 'ŕ',\n Rcaron: 'Ř',\n rcaron: 'ř',\n Rcedil: 'Ŗ',\n rcedil: 'ŗ',\n Sacute: 'Ś',\n sacute: 'ś',\n Scirc: 'Ŝ',\n scirc: 'ŝ',\n Scedil: 'Ş',\n scedil: 'ş',\n Scaron: 'Š',\n scaron: 'š',\n Tcedil: 'Ţ',\n tcedil: 'ţ',\n Tcaron: 'Ť',\n tcaron: 'ť',\n Tstrok: 'Ŧ',\n tstrok: 'ŧ',\n Utilde: 'Ũ',\n utilde: 'ũ',\n Umacr: 'Ū',\n umacr: 'ū',\n Ubreve: 'Ŭ',\n ubreve: 'ŭ',\n Uring: 'Ů',\n uring: 'ů',\n Udblac: 'Ű',\n udblac: 'ű',\n Uogon: 'Ų',\n uogon: 'ų',\n Wcirc: 'Ŵ',\n wcirc: 'ŵ',\n Ycirc: 'Ŷ',\n ycirc: 'ŷ',\n Zacute: 'Ź',\n zacute: 'ź',\n Zdot: 'Ż',\n zdot: 'ż',\n Zcaron: 'Ž',\n zcaron: 'ž',\n};\n\n/**\n * Greek Letters\n * @type {Record<string, string>}\n */\nexport const GREEK = {\n Alpha: 'Α',\n alpha: 'α',\n Beta: 'Β',\n beta: 'β',\n Gamma: 'Γ',\n gamma: 'γ',\n Delta: 'Δ',\n delta: 'δ',\n Epsilon: 'Ε',\n epsilon: 'ε',\n epsiv: 'ϵ',\n varepsilon: 'ϵ',\n Zeta: 'Ζ',\n zeta: 'ζ',\n Eta: 'Η',\n eta: 'η',\n Theta: 'Θ',\n theta: 'θ',\n thetasym: 'ϑ',\n vartheta: 'ϑ',\n Iota: 'Ι',\n iota: 'ι',\n Kappa: 'Κ',\n kappa: 'κ',\n kappav: 'ϰ',\n varkappa: 'ϰ',\n Lambda: 'Λ',\n lambda: 'λ',\n Mu: 'Μ',\n mu: 'μ',\n Nu: 'Ν',\n nu: 'ν',\n Xi: 'Ξ',\n xi: 'ξ',\n Omicron: 'Ο',\n omicron: 'ο',\n Pi: 'Π',\n pi: 'π',\n piv: 'ϖ',\n varpi: 'ϖ',\n Rho: 'Ρ',\n rho: 'ρ',\n rhov: 'ϱ',\n varrho: 'ϱ',\n Sigma: 'Σ',\n sigma: 'σ',\n sigmaf: 'ς',\n sigmav: 'ς',\n varsigma: 'ς',\n Tau: 'Τ',\n tau: 'τ',\n Upsilon: 'Υ',\n upsilon: 'υ',\n upsi: 'υ',\n Upsi: 'ϒ',\n upsih: 'ϒ',\n Phi: 'Φ',\n phi: 'φ',\n phiv: 'ϕ',\n varphi: 'ϕ',\n Chi: 'Χ',\n chi: 'χ',\n Psi: 'Ψ',\n psi: 'ψ',\n Omega: 'Ω',\n omega: 'ω',\n ohm: 'Ω',\n Gammad: 'Ϝ',\n gammad: 'ϝ',\n digamma: 'ϝ',\n};\n\n/**\n * Cyrillic Letters\n * @type {Record<string, string>}\n */\nexport const CYRILLIC = {\n Afr: '𝔄',\n afr: '𝔞',\n Acy: 'А',\n acy: 'а',\n Bcy: 'Б',\n bcy: 'б',\n Vcy: 'В',\n vcy: 'в',\n Gcy: 'Г',\n gcy: 'г',\n Dcy: 'Д',\n dcy: 'д',\n IEcy: 'Е',\n iecy: 'е',\n IOcy: 'Ё',\n iocy: 'ё',\n ZHcy: 'Ж',\n zhcy: 'ж',\n Zcy: 'З',\n zcy: 'з',\n Icy: 'И',\n icy: 'и',\n Jcy: 'Й',\n jcy: 'й',\n Kcy: 'К',\n kcy: 'к',\n Lcy: 'Л',\n lcy: 'л',\n Mcy: 'М',\n mcy: 'м',\n Ncy: 'Н',\n ncy: 'н',\n Ocy: 'О',\n ocy: 'о',\n Pcy: 'П',\n pcy: 'п',\n Rcy: 'Р',\n rcy: 'р',\n Scy: 'С',\n scy: 'с',\n Tcy: 'Т',\n tcy: 'т',\n Ucy: 'У',\n ucy: 'у',\n Fcy: 'Ф',\n fcy: 'ф',\n KHcy: 'Х',\n khcy: 'х',\n TScy: 'Ц',\n tscy: 'ц',\n CHcy: 'Ч',\n chcy: 'ч',\n SHcy: 'Ш',\n shcy: 'ш',\n SHCHcy: 'Щ',\n shchcy: 'щ',\n HARDcy: 'Ъ',\n hardcy: 'ъ',\n Ycy: 'Ы',\n ycy: 'ы',\n SOFTcy: 'Ь',\n softcy: 'ь',\n Ecy: 'Э',\n ecy: 'э',\n YUcy: 'Ю',\n yucy: 'ю',\n YAcy: 'Я',\n yacy: 'я',\n DJcy: 'Ђ',\n djcy: 'ђ',\n GJcy: 'Ѓ',\n gjcy: 'ѓ',\n Jukcy: 'Є',\n jukcy: 'є',\n DScy: 'Ѕ',\n dscy: 'ѕ',\n Iukcy: 'І',\n iukcy: 'і',\n YIcy: 'Ї',\n yicy: 'ї',\n Jsercy: 'Ј',\n jsercy: 'ј',\n LJcy: 'Љ',\n ljcy: 'љ',\n NJcy: 'Њ',\n njcy: 'њ',\n TSHcy: 'Ћ',\n tshcy: 'ћ',\n KJcy: 'Ќ',\n kjcy: 'ќ',\n Ubrcy: 'Ў',\n ubrcy: 'ў',\n DZcy: 'Џ',\n dzcy: 'џ',\n};\n\n/**\n * Mathematical Operators & Relations\n * @type {Record<string, string>}\n */\nexport const MATH = {\n plus: '+',\n pm: '±',\n times: '×',\n div: '÷',\n divide: '÷',\n sdot: '⋅',\n star: '☆',\n starf: '★',\n bigstar: '★',\n lowast: '∗',\n ast: '*',\n midast: '*',\n compfn: '∘',\n smallcircle: '∘',\n bullet: '•',\n bull: '•',\n nbsp: '\\u00a0',\n hellip: '…',\n mldr: '…',\n prime: '′',\n Prime: '″',\n tprime: '‴',\n bprime: '‵',\n backprime: '‵',\n minus: '−',\n minusd: '∸',\n dotminus: '∸',\n plusdo: '∔',\n dotplus: '∔',\n plusmn: '±',\n minusplus: '∓',\n mnplus: '∓',\n mp: '∓',\n setminus: '∖',\n smallsetminus: '∖',\n Backslash: '∖',\n setmn: '∖',\n ssetmn: '∖',\n lowbar: '_',\n verbar: '|',\n vert: '|',\n VerticalLine: '|',\n colon: ':',\n Colon: '∷',\n Proportion: '∷',\n ratio: '∶',\n equals: '=',\n ne: '≠',\n nequiv: '≢',\n equiv: '≡',\n Congruent: '≡',\n sim: '∼',\n thicksim: '∼',\n thksim: '∼',\n sime: '≃',\n simeq: '≃',\n TildeEqual: '≃',\n asymp: '≈',\n approx: '≈',\n thickapprox: '≈',\n thkap: '≈',\n TildeTilde: '≈',\n ncong: '≇',\n cong: '≅',\n TildeFullEqual: '≅',\n asympeq: '≍',\n CupCap: '≍',\n bump: '≎',\n Bumpeq: '≎',\n HumpDownHump: '≎',\n bumpe: '≏',\n bumpeq: '≏',\n HumpEqual: '≏',\n le: '≤',\n LessEqual: '≤',\n ge: '≥',\n GreaterEqual: '≥',\n lesseqgtr: '⋚',\n lesseqqgtr: '⪋',\n greater: '>',\n less: '<',\n};\n\n/**\n * Mathematical Operators (Advanced)\n * @type {Record<string, string>}\n */\nexport const MATH_ADVANCED = {\n alefsym: 'ℵ',\n aleph: 'ℵ',\n beth: 'ℶ',\n gimel: 'ℷ',\n daleth: 'ℸ',\n forall: '∀',\n ForAll: '∀',\n part: '∂',\n PartialD: '∂',\n exist: '∃',\n Exists: '∃',\n nexist: '∄',\n nexists: '∄',\n empty: '∅',\n emptyset: '∅',\n emptyv: '∅',\n varnothing: '∅',\n nabla: '∇',\n Del: '∇',\n isin: '∈',\n isinv: '∈',\n in: '∈',\n Element: '∈',\n notin: '∉',\n notinva: '∉',\n ni: '∋',\n niv: '∋',\n SuchThat: '∋',\n ReverseElement: '∋',\n notni: '∌',\n notniva: '∌',\n prod: '∏',\n Product: '∏',\n coprod: '∐',\n Coproduct: '∐',\n sum: '∑',\n Sum: '∑',\n minus: '−',\n mp: '∓',\n plusdo: '∔',\n dotplus: '∔',\n setminus: '∖',\n lowast: '∗',\n radic: '√',\n Sqrt: '√',\n prop: '∝',\n propto: '∝',\n Proportional: '∝',\n varpropto: '∝',\n infin: '∞',\n infintie: '⧝',\n ang: '∠',\n angle: '∠',\n angmsd: '∡',\n measuredangle: '∡',\n angsph: '∢',\n mid: '∣',\n VerticalBar: '∣',\n nmid: '∤',\n nsmid: '∤',\n npar: '∦',\n parallel: '∥',\n spar: '∥',\n nparallel: '∦',\n nspar: '∦',\n and: '∧',\n wedge: '∧',\n or: '∨',\n vee: '∨',\n cap: '∩',\n cup: '∪',\n int: '∫',\n Integral: '∫',\n conint: '∮',\n ContourIntegral: '∮',\n Conint: '∯',\n DoubleContourIntegral: '∯',\n Cconint: '∰',\n there4: '∴',\n therefore: '∴',\n Therefore: '∴',\n becaus: '∵',\n because: '∵',\n Because: '∵',\n ratio: '∶',\n Proportion: '∷',\n minusd: '∸',\n dotminus: '∸',\n mDDot: '∺',\n homtht: '∻',\n sim: '∼',\n bsimg: '∽',\n backsim: '∽',\n ac: '∾',\n mstpos: '∾',\n acd: '∿',\n VerticalTilde: '≀',\n wr: '≀',\n wreath: '≀',\n nsime: '≄',\n nsimeq: '≄',\n ncong: '≇',\n simne: '≆',\n ncongdot: '⩭̸',\n ngsim: '≵',\n nsim: '≁',\n napprox: '≉',\n nap: '≉',\n ngeq: '≱',\n nge: '≱',\n nleq: '≰',\n nle: '≰',\n ngtr: '≯',\n ngt: '≯',\n nless: '≮',\n nlt: '≮',\n nprec: '⊀',\n npr: '⊀',\n nsucc: '⊁',\n nsc: '⊁',\n};\n\n/**\n * Arrows\n * @type {Record<string, string>}\n */\nexport const ARROWS = {\n larr: '←',\n leftarrow: '←',\n LeftArrow: '←',\n uarr: '↑',\n uparrow: '↑',\n UpArrow: '↑',\n rarr: '→',\n rightarrow: '→',\n RightArrow: '→',\n darr: '↓',\n downarrow: '↓',\n DownArrow: '↓',\n harr: '↔',\n leftrightarrow: '↔',\n LeftRightArrow: '↔',\n varr: '↕',\n updownarrow: '↕',\n UpDownArrow: '↕',\n nwarr: '↖',\n nwarrow: '↖',\n UpperLeftArrow: '↖',\n nearr: '↗',\n nearrow: '↗',\n UpperRightArrow: '↗',\n searr: '↘',\n searrow: '↘',\n LowerRightArrow: '↘',\n swarr: '↙',\n swarrow: '↙',\n LowerLeftArrow: '↙',\n lArr: '⇐',\n Leftarrow: '⇐',\n uArr: '⇑',\n Uparrow: '⇑',\n rArr: '⇒',\n Rightarrow: '⇒',\n dArr: '⇓',\n Downarrow: '⇓',\n hArr: '⇔',\n Leftrightarrow: '⇔',\n iff: '⇔',\n vArr: '⇕',\n Updownarrow: '⇕',\n lAarr: '⇚',\n Lleftarrow: '⇚',\n rAarr: '⇛',\n Rrightarrow: '⇛',\n lrarr: '⇆',\n leftrightarrows: '⇆',\n rlarr: '⇄',\n rightleftarrows: '⇄',\n lrhar: '⇋',\n leftrightharpoons: '⇋',\n ReverseEquilibrium: '⇋',\n rlhar: '⇌',\n rightleftharpoons: '⇌',\n Equilibrium: '⇌',\n udarr: '⇅',\n UpArrowDownArrow: '⇅',\n duarr: '⇵',\n DownArrowUpArrow: '⇵',\n llarr: '⇇',\n leftleftarrows: '⇇',\n rrarr: '⇉',\n rightrightarrows: '⇉',\n ddarr: '⇊',\n downdownarrows: '⇊',\n har: '↽',\n lhard: '↽',\n leftharpoondown: '↽',\n lharu: '↼',\n leftharpoonup: '↼',\n rhard: '⇁',\n rightharpoondown: '⇁',\n rharu: '⇀',\n rightharpoonup: '⇀',\n lsh: '↰',\n Lsh: '↰',\n rsh: '↱',\n Rsh: '↱',\n ldsh: '↲',\n rdsh: '↳',\n hookleftarrow: '↩',\n hookrightarrow: '↪',\n mapstoleft: '↤',\n mapstoup: '↥',\n map: '↦',\n mapsto: '↦',\n mapstodown: '↧',\n crarr: '↵',\n nleftarrow: '↚',\n nleftrightarrow: '↮',\n nrightarrow: '↛',\n nrarr: '↛',\n larrtl: '↢',\n rarrtl: '↣',\n leftarrowtail: '↢',\n rightarrowtail: '↣',\n twoheadleftarrow: '↞',\n twoheadrightarrow: '↠',\n Larr: '↞',\n Rarr: '↠',\n larrhk: '↩',\n rarrhk: '↪',\n larrlp: '↫',\n looparrowleft: '↫',\n rarrlp: '↬',\n looparrowright: '↬',\n harrw: '↭',\n leftrightsquigarrow: '↭',\n nrarrw: '↝̸',\n rarrw: '↝',\n rightsquigarrow: '↝',\n larrbfs: '⤟',\n rarrbfs: '⤠',\n nvHarr: '⤄',\n nvlArr: '⤂',\n nvrArr: '⤃',\n larrfs: '⤝',\n rarrfs: '⤞',\n Map: '⤅',\n larrsim: '⥳',\n rarrsim: '⥴',\n harrcir: '⥈',\n Uarrocir: '⥉',\n lurdshar: '⥊',\n ldrdhar: '⥧',\n ldrushar: '⥋',\n rdldhar: '⥩',\n lrhard: '⥭',\n uharr: '↾',\n uharl: '↿',\n dharr: '⇂',\n dharl: '⇃',\n Uarr: '↟',\n Darr: '↡',\n zigrarr: '⇝',\n nwArr: '⇖',\n neArr: '⇗',\n seArr: '⇘',\n swArr: '⇙',\n nharr: '↮',\n nhArr: '⇎',\n nlarr: '↚',\n nlArr: '⇍',\n nrArr: '⇏',\n larrb: '⇤',\n LeftArrowBar: '⇤',\n rarrb: '⇥',\n RightArrowBar: '⇥',\n};\n\n/**\n * Geometric Shapes\n * @type {Record<string, string>}\n */\nexport const SHAPES = {\n square: '□',\n Square: '□',\n squ: '□',\n squf: '▪',\n squarf: '▪',\n blacksquar: '▪',\n blacksquare: '▪',\n FilledVerySmallSquare: '▪',\n blk34: '▓',\n blk12: '▒',\n blk14: '░',\n block: '█',\n srect: '▭',\n rect: '▭',\n sdot: '⋅',\n sdotb: '⊡',\n dotsquare: '⊡',\n triangle: '▵',\n tri: '▵',\n trine: '▵',\n utri: '▵',\n triangledown: '▿',\n dtri: '▿',\n tridown: '▿',\n triangleleft: '◃',\n ltri: '◃',\n triangleright: '▹',\n rtri: '▹',\n blacktriangle: '▴',\n utrif: '▴',\n blacktriangledown: '▾',\n dtrif: '▾',\n blacktriangleleft: '◂',\n ltrif: '◂',\n blacktriangleright: '▸',\n rtrif: '▸',\n loz: '◊',\n lozenge: '◊',\n blacklozenge: '⧫',\n lozf: '⧫',\n bigcirc: '◯',\n xcirc: '◯',\n circ: 'ˆ',\n Circle: '○',\n cir: '○',\n o: '○',\n bullet: '•',\n bull: '•',\n hellip: '…',\n mldr: '…',\n nldr: '‥',\n boxh: '─',\n HorizontalLine: '─',\n boxv: '│',\n boxdr: '┌',\n boxdl: '┐',\n boxur: '└',\n boxul: '┘',\n boxvr: '├',\n boxvl: '┤',\n boxhd: '┬',\n boxhu: '┴',\n boxvh: '┼',\n boxH: '═',\n boxV: '║',\n boxdR: '╒',\n boxDr: '╓',\n boxDR: '╔',\n boxDl: '╕',\n boxdL: '╖',\n boxDL: '╗',\n boxuR: '╘',\n boxUr: '╙',\n boxUR: '╚',\n boxUl: '╜',\n boxuL: '╛',\n boxUL: '╝',\n boxvR: '╞',\n boxVr: '╟',\n boxVR: '╠',\n boxVl: '╢',\n boxvL: '╡',\n boxVL: '╣',\n boxHd: '╤',\n boxhD: '╥',\n boxHD: '╦',\n boxHu: '╧',\n boxhU: '╨',\n boxHU: '╩',\n boxvH: '╪',\n boxVh: '╫',\n boxVH: '╬',\n};\n\n/**\n * Punctuation & Diacritics\n * @type {Record<string, string>}\n */\nexport const PUNCTUATION = {\n excl: '!',\n iexcl: '¡',\n brvbar: '¦',\n sect: '§',\n uml: '¨',\n copy: '©',\n ordf: 'ª',\n laquo: '«',\n not: '¬',\n shy: '\\u00ad',\n reg: '®',\n macr: '¯',\n deg: '°',\n plusmn: '±',\n sup2: '²',\n sup3: '³',\n acute: '´',\n micro: 'µ',\n para: '¶',\n middot: '·',\n cedil: '¸',\n sup1: '¹',\n ordm: 'º',\n raquo: '»',\n frac14: '¼',\n frac12: '½',\n frac34: '¾',\n iquest: '¿',\n nbsp: '\\u00a0',\n comma: ',',\n period: '.',\n colon: ':',\n semi: ';',\n vert: '|',\n Verbar: '‖',\n verbar: '|',\n dblac: '˝',\n circ: 'ˆ',\n caron: 'ˇ',\n breve: '˘',\n dot: '˙',\n ring: '˚',\n ogon: '˛',\n tilde: '˜',\n DiacriticalGrave: '`',\n DiacriticalAcute: '´',\n DiacriticalTilde: '˜',\n DiacriticalDot: '˙',\n DiacriticalDoubleAcute: '˝',\n grave: '`',\n};\n\n/**\n * Currency Symbols\n * @type {Record<string, string>}\n */\nexport const CURRENCY = {\n cent: '¢',\n pound: '£',\n curren: '¤',\n yen: '¥',\n euro: '€',\n dollar: '$',\n fnof: 'ƒ',\n inr: '₹',\n af: '؋',\n birr: 'ብር',\n peso: '₱',\n rub: '₽',\n won: '₩',\n yuan: '¥',\n cedil: '¸',\n};\n\n/**\n * Fractions\n * @type {Record<string, string>}\n */\nexport const FRACTIONS = {\n frac12: '½',\n half: '½',\n frac13: '⅓',\n frac14: '¼',\n frac15: '⅕',\n frac16: '⅙',\n frac18: '⅛',\n frac23: '⅔',\n frac25: '⅖',\n frac34: '¾',\n frac35: '⅗',\n frac38: '⅜',\n frac45: '⅘',\n frac56: '⅚',\n frac58: '⅝',\n frac78: '⅞',\n frasl: '⁄',\n};\n\n/**\n * Miscellaneous Symbols\n * @type {Record<string, string>}\n */\nexport const MISC_SYMBOLS = {\n trade: '™',\n TRADE: '™',\n telrec: '⌕',\n target: '⌖',\n ulcorn: '⌜',\n ulcorner: '⌜',\n urcorn: '⌝',\n urcorner: '⌝',\n dlcorn: '⌞',\n llcorner: '⌞',\n drcorn: '⌟',\n lrcorner: '⌟',\n intercal: '⊺',\n intcal: '⊺',\n oplus: '⊕',\n CirclePlus: '⊕',\n ominus: '⊖',\n CircleMinus: '⊖',\n otimes: '⊗',\n CircleTimes: '⊗',\n osol: '⊘',\n odot: '⊙',\n CircleDot: '⊙',\n oast: '⊛',\n circledast: '⊛',\n odash: '⊝',\n circleddash: '⊝',\n ocirc: '⊚',\n circledcirc: '⊚',\n boxplus: '⊞',\n plusb: '⊞',\n boxminus: '⊟',\n minusb: '⊟',\n boxtimes: '⊠',\n timesb: '⊠',\n boxdot: '⊡',\n sdotb: '⊡',\n veebar: '⊻',\n vee: '∨',\n barvee: '⊽',\n and: '∧',\n wedge: '∧',\n Cap: '⋒',\n Cup: '⋓',\n Fork: '⋔',\n pitchfork: '⋔',\n epar: '⋕',\n ltlarr: '⥶',\n nvap: '≍⃒',\n nvsim: '∼⃒',\n nvge: '≥⃒',\n nvle: '≤⃒',\n nvlt: '<⃒',\n nvgt: '>⃒',\n nvltrie: '⊴⃒',\n nvrtrie: '⊵⃒',\n Vdash: '⊩',\n dashv: '⊣',\n vDash: '⊨',\n Vvdash: '⊪',\n nvdash: '⊬',\n nvDash: '⊭',\n nVdash: '⊮',\n nVDash: '⊯',\n};\n\n/**\n * All entities combined (if you need everything)\n * @type {Record<string, string>}\n */\nexport const ALL_ENTITIES = {\n ...BASIC_LATIN,\n ...LATIN_ACCENTS,\n ...LATIN_EXTENDED,\n ...GREEK,\n ...CYRILLIC,\n ...MATH,\n ...MATH_ADVANCED,\n ...ARROWS,\n ...SHAPES,\n ...PUNCTUATION,\n ...CURRENCY,\n ...FRACTIONS,\n ...MISC_SYMBOLS,\n};\n\nexport const XML = {\n amp: \"&\",\n apos: \"'\",\n gt: \">\",\n lt: \"<\",\n quot: \"\\\"\"\n}\nexport const COMMON_HTML = {\n nbsp: '\\u00a0',\n copy: '\\u00a9',\n reg: '\\u00ae',\n trade: '\\u2122',\n mdash: '\\u2014',\n ndash: '\\u2013',\n hellip: '\\u2026',\n laquo: '\\u00ab',\n raquo: '\\u00bb',\n lsquo: '\\u2018',\n rsquo: '\\u2019',\n ldquo: '\\u201c',\n rdquo: '\\u201d',\n bull: '\\u2022',\n para: '\\u00b6',\n sect: '\\u00a7',\n deg: '\\u00b0',\n frac12: '\\u00bd',\n frac14: '\\u00bc',\n frac34: '\\u00be',\n}\n// ---------------------------------------------------------------------------\n// Note: NUMERIC_ENTITIES (&#NNN; / &#xHH;) are handled by the scanner directly\n// via String.fromCodePoint() without any map lookup.\n// ---------------------------------------------------------------------------","// ---------------------------------------------------------------------------\n// Built-in named entity map (name → replacement string)\n// No regex, no {regex,val} objects — just flat key/value pairs.\n// ---------------------------------------------------------------------------\n\nimport { XML as DEFAULT_XML_ENTITIES } from \"./entities.js\"\n\n// ---------------------------------------------------------------------------\n// Entity hook action constants\n// ---------------------------------------------------------------------------\n\n/**\n * Action constants for `onExternalEntity` and `onInputEntity` hooks.\n *\n * Use these instead of raw strings to avoid typos:\n *\n * @example\n * import EntityDecoder, { ENTITY_ACTION } from './EntityDecoder.js';\n * const dec = new EntityDecoder({\n * onInputEntity: (name, value) => ENTITY_ACTION.BLOCK,\n * });\n */\nexport const ENTITY_ACTION = Object.freeze({\n /** Resolve and expand the entity normally. */\n ALLOW: 'allow',\n /** Silently skip this entity — it will not be registered. */\n BLOCK: 'block',\n /** Throw an error, aborting entity registration entirely. */\n THROW: 'throw',\n});\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nconst SPECIAL_CHARS = new Set('!?\\\\\\\\/[]$%{}^&*()<>|+');\n\n/**\n * Validate that an entity name contains no dangerous characters.\n * @param {string} name\n * @returns {string} the name, unchanged\n * @throws {Error} on invalid characters\n */\nfunction validateEntityName(name) {\n if (name[0] === '#') {\n throw new Error(`[EntityReplacer] Invalid character '#' in entity name: \"${name}\"`);\n }\n for (const ch of name) {\n if (SPECIAL_CHARS.has(ch)) {\n throw new Error(`[EntityReplacer] Invalid character '${ch}' in entity name: \"${name}\"`);\n }\n }\n return name;\n}\n\n/**\n * Merge one or more entity maps into a flat name→string map.\n * Accepts either:\n * - plain string values: { amp: '&' }\n * - legacy {regex,val} / {regx,val}: { lt: { regex: /.../, val: '<' } }\n *\n * Values containing '&' are skipped (recursive expansion risk).\n *\n * @param {...object} maps\n * @returns {Record<string, string>}\n */\nfunction mergeEntityMaps(...maps) {\n const out = Object.create(null);\n for (const map of maps) {\n if (!map) continue;\n for (const key of Object.keys(map)) {\n const raw = map[key];\n if (typeof raw === 'string') {\n out[key] = raw;\n } else if (raw && typeof raw === 'object' && raw.val !== undefined) {\n // Legacy {regex,val} or {regx,val} — extract the string val only\n const val = raw.val;\n if (typeof val === 'string') {\n out[key] = val;\n }\n // function vals are not supported in the scanner — skip\n }\n }\n }\n return out;\n}\n\n// ---------------------------------------------------------------------------\n// applyLimitsTo helpers\n// ---------------------------------------------------------------------------\n\nconst LIMIT_TIER_EXTERNAL = 'external'; // input/runtime + persistent external maps\nconst LIMIT_TIER_BASE = 'base'; // DEFAULT_XML_ENTITIES + namedEntities (system) maps\nconst LIMIT_TIER_ALL = 'all'; // every entity regardless of tier\n\n/**\n * Resolve `applyLimitsTo` option into a normalised Set of tier strings.\n * Accepted values: 'external' | 'base' | 'all' | string[]\n * Default: 'external' (only untrusted injected entities are counted).\n * @param {string|string[]|undefined} raw\n * @returns {Set<string>}\n */\nfunction parseLimitTiers(raw) {\n if (!raw || raw === LIMIT_TIER_EXTERNAL) return new Set([LIMIT_TIER_EXTERNAL]);\n if (raw === LIMIT_TIER_ALL) return new Set([LIMIT_TIER_ALL]);\n if (raw === LIMIT_TIER_BASE) return new Set([LIMIT_TIER_BASE]);\n if (Array.isArray(raw)) return new Set(raw);\n return new Set([LIMIT_TIER_EXTERNAL]); // safe default for unrecognised values\n}\n\n// ---------------------------------------------------------------------------\n// NCR (Numeric Character Reference) classification\n// ---------------------------------------------------------------------------\n\n// Severity order — higher number = stricter action.\n// Used to enforce minimum action levels for specific codepoint ranges.\nconst NCR_LEVEL = Object.freeze({ allow: 0, leave: 1, remove: 2, throw: 3 });\n\n// XML 1.0 §2.2: allowed chars are #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n// Restricted C0: U+0001–U+001F excluding U+0009, U+000A, U+000D\nconst XML10_ALLOWED_C0 = new Set([0x09, 0x0A, 0x0D]);\n\n/**\n * Parse the `ncr` constructor option into flat, hot-path-friendly fields.\n * @param {object|undefined} ncr\n * @returns {{ xmlVersion: number, onLevel: number, nullLevel: number }}\n */\nfunction parseNCRConfig(ncr) {\n if (!ncr) {\n return { xmlVersion: 1.0, onLevel: NCR_LEVEL.allow, nullLevel: NCR_LEVEL.remove };\n }\n const xmlVersion = ncr.xmlVersion === 1.1 ? 1.1 : 1.0;\n const onLevel = NCR_LEVEL[ncr.onNCR] ?? NCR_LEVEL.allow;\n const nullLevel = NCR_LEVEL[ncr.nullNCR] ?? NCR_LEVEL.remove;\n // 'allow' is not meaningful for null — clamp to at least 'remove'\n const clampedNull = Math.max(nullLevel, NCR_LEVEL.remove);\n return { xmlVersion, onLevel, nullLevel: clampedNull };\n}\n\n// ---------------------------------------------------------------------------\n// EntityReplacer\n// ---------------------------------------------------------------------------\n\n/**\n * Single-pass, zero-regex entity replacer for XML/HTML content.\n *\n * Algorithm: scan the string once for '&', read to ';', resolve via map\n * or direct codepoint conversion, build output chunks, join once at the end.\n *\n * Entity lookup priority (highest → lowest):\n * 1. input / runtime (DOCTYPE entities for current document)\n * 2. persistent external (survive across documents)\n * 3. base named map (DEFAULT_XML_ENTITIES + user-supplied namedEntities)\n *\n * Both input and external resolve as the 'external' tier for limit purposes.\n * Base map entities resolve as the 'base' tier.\n *\n * Numeric / hex references (&#NNN; / &#xHH;) are resolved directly via\n * String.fromCodePoint() — no map needed. They count as 'base' tier.\n *\n * @example\n * const replacer = new EntityReplacer({ namedEntities: COMMON_HTML });\n * replacer.setExternalEntities({ brand: 'Acme' });\n *\n * const instance = replacer.reset();\n * instance.addInputEntities({ version: '1.0' });\n * instance.encode('&brand; v&version; &lt;'); // 'Acme v1.0 <'\n */\nexport default class EntityDecoder {\n /**\n * @param {object} [options]\n * @param {object|null} [options.namedEntities] — extra named entities merged into base map\n * @param {object} [options.limit] — security limits\n * @param {number} [options.limit.maxTotalExpansions=0] — 0 = unlimited\n * @param {number} [options.limit.maxExpandedLength=0] — 0 = unlimited\n * @param {'external'|'base'|'all'|string[]} [options.limit.applyLimitsTo='external']\n * Which entity tiers count against the security limits:\n * - 'external' (default) — only input/runtime + persistent external entities\n * - 'base' — only DEFAULT_XML_ENTITIES + namedEntities\n * - 'all' — every entity regardless of tier\n * - string[] — explicit combination, e.g. ['external', 'base']\n * @param {((resolved: string, original: string) => string)|null} [options.postCheck=null]\n * @param {string[]} [options.remove=[]] — entity names (e.g. ['nbsp', '#13']) to delete (replace with empty string)\n * @param {string[]} [options.leave=[]] — entity names to keep as literal (unchanged in output)\n * @param {object} [options.ncr] — Numeric Character Reference controls\n * @param {1.0|1.1} [options.ncr.xmlVersion=1.0]\n * XML version governing which codepoint ranges are restricted:\n * - 1.0 — C0 controls U+0001–U+001F (except U+0009/000A/000D) are prohibited\n * - 1.1 — C0 controls are allowed when written as NCRs; C1 (U+007F–U+009F) decoded as-is\n * @param {'allow'|'leave'|'remove'|'throw'} [options.ncr.onNCR='allow']\n * Base action for numeric references. Severity order: allow < leave < remove < throw.\n * For codepoint ranges that carry a minimum level (surrogates → remove, XML 1.0 C0 → remove),\n * the effective action is max(onNCR, rangeMinimum).\n * @param {'remove'|'throw'} [options.ncr.nullNCR='remove']\n * Action for U+0000 (null). 'allow' and 'leave' are clamped to 'remove' since null is never safe.\n * @param {((name: string, value: string) => 'allow'|'block'|'throw')|null} [options.onExternalEntity=null]\n * Hook called when an external entity is registered via `setExternalEntities()` or\n * `addExternalEntity()`. Return `ENTITY_ACTION.ALLOW` to accept the entity,\n * `ENTITY_ACTION.BLOCK` to silently skip it, or `ENTITY_ACTION.THROW` to abort with an error.\n * @param {((name: string, value: string) => 'allow'|'block'|'throw')|null} [options.onInputEntity=null]\n * Hook called when an input entity is registered via `addInputEntities()`. Return\n * `ENTITY_ACTION.ALLOW` to accept, `ENTITY_ACTION.BLOCK` to silently skip, or\n * `ENTITY_ACTION.THROW` to abort with an error.\n */\n constructor(options = {}) {\n this._limit = options.limit || {};\n this._maxTotalExpansions = this._limit.maxTotalExpansions || 0;\n this._maxExpandedLength = this._limit.maxExpandedLength || 0;\n this._postCheck = typeof options.postCheck === 'function' ? options.postCheck : r => r;\n this._limitTiers = parseLimitTiers(this._limit.applyLimitsTo ?? LIMIT_TIER_EXTERNAL);\n this._numericAllowed = options.numericAllowed ?? true;\n // Base map: DEFAULT_XML_ENTITIES + user-supplied extras. Immutable after construction.\n this._baseMap = mergeEntityMaps(DEFAULT_XML_ENTITIES, options.namedEntities || null);\n\n // Persistent external entities — survive across documents.\n // Stored as a separate map so reset() never touches them.\n /** @type {Record<string, string>} */\n this._externalMap = Object.create(null);\n\n // Input / runtime entities — current document only, wiped on reset().\n /** @type {Record<string, string>} */\n this._inputMap = Object.create(null);\n\n // Per-document counters\n this._totalExpansions = 0;\n this._expandedLength = 0;\n\n // --- New: remove / leave sets ---\n /** @type {Set<string>} */\n this._removeSet = new Set(options.remove && Array.isArray(options.remove) ? options.remove : []);\n /** @type {Set<string>} */\n this._leaveSet = new Set(options.leave && Array.isArray(options.leave) ? options.leave : []);\n\n // --- NCR config (parsed into flat fields for hot-path speed) ---\n const ncrCfg = parseNCRConfig(options.ncr);\n this._ncrXmlVersion = ncrCfg.xmlVersion;\n this._ncrOnLevel = ncrCfg.onLevel;\n this._ncrNullLevel = ncrCfg.nullLevel;\n\n // --- Registration hooks ---\n /** @type {((name: string, value: string) => 'allow'|'block'|'throw')|null} */\n this._onExternalEntity = typeof options.onExternalEntity === 'function'\n ? options.onExternalEntity\n : null;\n /** @type {((name: string, value: string) => 'allow'|'block'|'throw')|null} */\n this._onInputEntity = typeof options.onInputEntity === 'function'\n ? options.onInputEntity\n : null;\n }\n\n // -------------------------------------------------------------------------\n // Private: registration hook dispatch\n // -------------------------------------------------------------------------\n\n /**\n * Invoke a registration hook for a single entity name/value pair.\n * Returns true when the entity should be accepted, false when it should be\n * silently skipped (BLOCK), and throws when the hook returns THROW.\n *\n * @param {((name: string, value: string) => 'allow'|'block'|'throw')|null} hook\n * @param {string} name\n * @param {string} value\n * @param {string} context — used in error messages ('external' | 'input')\n * @returns {boolean} true = accept, false = skip\n */\n _applyRegistrationHook(hook, name, value, context) {\n if (!hook) return true; // no hook → always accept\n const action = hook(name, value);\n if (action === ENTITY_ACTION.BLOCK) return false;\n if (action === ENTITY_ACTION.THROW) {\n throw new Error(\n `[EntityDecoder] Registration of ${context} entity \"&${name};\" was rejected by hook`\n );\n }\n return true; // ALLOW or any unknown return value → accept\n }\n\n // -------------------------------------------------------------------------\n // Persistent external entity registration\n // -------------------------------------------------------------------------\n\n /**\n * Replace the full set of persistent external entities.\n * All keys are validated — throws on invalid characters.\n * If `onExternalEntity` is set, it is called once per entry; entries that\n * return `ENTITY_ACTION.BLOCK` are silently omitted, `ENTITY_ACTION.THROW`\n * aborts the whole call.\n * @param {Record<string, string | { regex?: RegExp, val: string }>} map\n */\n setExternalEntities(map) {\n if (map) {\n for (const key of Object.keys(map)) {\n validateEntityName(key);\n }\n }\n if (!this._onExternalEntity) {\n this._externalMap = mergeEntityMaps(map);\n return;\n }\n // Hook present — resolve values first, then filter\n const flat = mergeEntityMaps(map);\n const filtered = Object.create(null);\n for (const [name, value] of Object.entries(flat)) {\n if (this._applyRegistrationHook(this._onExternalEntity, name, value, 'external')) {\n filtered[name] = value;\n }\n }\n this._externalMap = filtered;\n }\n\n /**\n * Add a single persistent external entity.\n * If `onExternalEntity` is set it is called before the entity is stored;\n * `ENTITY_ACTION.BLOCK` silently skips storage, `ENTITY_ACTION.THROW` raises.\n * @param {string} key\n * @param {string} value\n */\n addExternalEntity(key, value) {\n validateEntityName(key);\n if (typeof value === 'string' && value.indexOf('&') === -1) {\n if (this._applyRegistrationHook(this._onExternalEntity, key, value, 'external')) {\n this._externalMap[key] = value;\n }\n }\n }\n\n // -------------------------------------------------------------------------\n // Input / runtime entity registration (per document)\n // -------------------------------------------------------------------------\n\n /**\n * Inject DOCTYPE entities for the current document.\n * Also resets per-document expansion counters.\n * If `onInputEntity` is set it is called once per entry; entries returning\n * `ENTITY_ACTION.BLOCK` are silently omitted, `ENTITY_ACTION.THROW` aborts.\n * @param {Record<string, string | { regx?: RegExp, regex?: RegExp, val: string }>} map\n */\n addInputEntities(map) {\n this._totalExpansions = 0;\n this._expandedLength = 0;\n if (!this._onInputEntity) {\n this._inputMap = mergeEntityMaps(map);\n return;\n }\n const flat = mergeEntityMaps(map);\n const filtered = Object.create(null);\n for (const [name, value] of Object.entries(flat)) {\n if (this._applyRegistrationHook(this._onInputEntity, name, value, 'input')) {\n filtered[name] = value;\n }\n }\n this._inputMap = filtered;\n }\n\n // -------------------------------------------------------------------------\n // Per-document reset\n // -------------------------------------------------------------------------\n\n /**\n * Wipe input/runtime entities and reset counters.\n * Call this before processing each new document.\n * @returns {this}\n */\n reset() {\n this._inputMap = Object.create(null);\n this._totalExpansions = 0;\n this._expandedLength = 0;\n return this;\n }\n\n // -------------------------------------------------------------------------\n // XML version (can be set after construction, e.g. once parser reads <?xml?>)\n // -------------------------------------------------------------------------\n\n /**\n * Update the XML version used for NCR classification.\n * Call this as soon as the document's `<?xml version=\"...\">` declaration is parsed.\n * @param {1.0|1.1|number} version\n */\n setXmlVersion(version) {\n this._ncrXmlVersion = version === 1.1 ? 1.1 : 1.0;\n }\n\n // -------------------------------------------------------------------------\n // Primary API\n // -------------------------------------------------------------------------\n\n /**\n * Replace all entity references in `str` in a single pass.\n *\n * @param {string} str\n * @returns {string}\n */\n decode(str) {\n if (typeof str !== 'string' || str.length === 0) return str;\n //TODO: check if needed\n if (str.indexOf('&') === -1) return str; // fast path — no entities at all\n\n const original = str;\n const chunks = [];\n const len = str.length;\n let last = 0; // start of next unprocessed literal chunk\n let i = 0;\n\n const limitExpansions = this._maxTotalExpansions > 0;\n const limitLength = this._maxExpandedLength > 0;\n const checkLimits = limitExpansions || limitLength;\n\n while (i < len) {\n // Scan forward to next '&'\n if (str.charCodeAt(i) !== 38 /* '&' */) { i++; continue; }\n\n // --- Found '&' at position i ---\n\n // Scan forward to ';'\n let j = i + 1;\n while (j < len && str.charCodeAt(j) !== 59 /* ';' */ && (j - i) <= 32) j++;\n\n if (j >= len || str.charCodeAt(j) !== 59) {\n // No closing ';' within window — treat '&' as literal\n i++;\n continue;\n }\n\n // Raw token between '&' and ';' (exclusive)\n const token = str.slice(i + 1, j);\n if (token.length === 0) { i++; continue; }\n\n let replacement;\n let tier; // which limit tier this entity belongs to\n\n if (this._removeSet.has(token)) {\n // Remove entity: replace with empty string\n replacement = '';\n // If entity was unknown (replacement undefined), we still need a tier for limits.\n // Treat as external tier because it's user-directed removal of an unknown reference.\n if (tier === undefined) {\n tier = LIMIT_TIER_EXTERNAL;\n }\n } else if (this._leaveSet.has(token)) {\n // Do not replace — keep original &token; as literal\n i++;\n continue;\n } else if (token.charCodeAt(0) === 35 /* '#' */) {\n // ---- Numeric / NCR reference ----\n // NCR classification always runs first — prohibited codepoints must be\n // caught regardless of numericAllowed.\n const ncrResult = this._resolveNCR(token);\n if (ncrResult === undefined) {\n // 'leave' action — keep original &token; as-is\n i++;\n continue;\n }\n replacement = ncrResult; // '' for remove, char string for allow\n tier = LIMIT_TIER_BASE;\n } else {\n // ---- Named reference ----\n const resolved = this._resolveName(token);\n replacement = resolved?.value;\n tier = resolved?.tier;\n }\n\n if (replacement === undefined) {\n // Unknown entity — leave as-is, advance past '&' only\n i++;\n continue;\n }\n\n // Flush literal chunk before this entity\n if (i > last) chunks.push(str.slice(last, i));\n chunks.push(replacement);\n last = j + 1; // skip past ';'\n i = last;\n\n // Apply expansion limits only if this tier is being tracked\n if (checkLimits && this._tierCounts(tier)) {\n if (limitExpansions) {\n this._totalExpansions++;\n if (this._totalExpansions > this._maxTotalExpansions) {\n throw new Error(\n `[EntityReplacer] Entity expansion count limit exceeded: ` +\n `${this._totalExpansions} > ${this._maxTotalExpansions}`\n );\n }\n }\n if (limitLength) {\n // delta: replacement.length minus the raw &token; length (token.length + 2 for '&' and ';')\n const delta = replacement.length - (token.length + 2);\n if (delta > 0) {\n this._expandedLength += delta;\n if (this._expandedLength > this._maxExpandedLength) {\n throw new Error(\n `[EntityReplacer] Expanded content length limit exceeded: ` +\n `${this._expandedLength} > ${this._maxExpandedLength}`\n );\n }\n }\n }\n }\n }\n\n // Flush trailing literal\n if (last < len) chunks.push(str.slice(last));\n\n // If nothing was replaced, chunks is empty — return original\n const result = chunks.length === 0 ? str : chunks.join('');\n\n return this._postCheck(result, original);\n }\n\n // -------------------------------------------------------------------------\n // Private: limit tier check\n // -------------------------------------------------------------------------\n\n /**\n * Returns true if a resolved entity of the given tier should count\n * against the expansion/length limits.\n * @param {string} tier — LIMIT_TIER_EXTERNAL | LIMIT_TIER_BASE\n * @returns {boolean}\n */\n _tierCounts(tier) {\n if (this._limitTiers.has(LIMIT_TIER_ALL)) return true;\n return this._limitTiers.has(tier);\n }\n\n // -------------------------------------------------------------------------\n // Private: entity resolution\n // -------------------------------------------------------------------------\n\n /**\n * Resolve a named entity token (without & and ;).\n * Priority: inputMap > externalMap > baseMap\n * Returns the resolved value tagged with its limit tier.\n *\n * @param {string} name\n * @returns {{ value: string, tier: string }|undefined}\n */\n _resolveName(name) {\n // input and external both count as 'external' tier for limit purposes —\n // they are injected at runtime and are the untrusted surface.\n if (name in this._inputMap) return { value: this._inputMap[name], tier: LIMIT_TIER_EXTERNAL };\n if (name in this._externalMap) return { value: this._externalMap[name], tier: LIMIT_TIER_EXTERNAL };\n if (name in this._baseMap) return { value: this._baseMap[name], tier: LIMIT_TIER_BASE };\n return undefined;\n }\n\n /**\n * Classify a codepoint and return the minimum action level that must be applied.\n * Returns -1 when no minimum is imposed (normal allow path).\n *\n * Ranges checked (in priority order):\n * 1. U+0000 — null, governed by nullNCR (always ≥ remove)\n * 2. U+D800–U+DFFF — surrogates, always prohibited (min: remove)\n * 3. U+0001–U+001F \\ {0x09,0x0A,0x0D} — XML 1.0 restricted C0 (min: remove)\n * (skipped in XML 1.1 — C0 controls are allowed when written as NCRs)\n *\n * @param {number} cp — codepoint\n * @returns {number} — minimum NCR_LEVEL value, or -1 for no restriction\n */\n _classifyNCR(cp) {\n // 1. Null\n if (cp === 0) return this._ncrNullLevel;\n\n // 2. Surrogates — always prohibited, minimum 'remove'\n if (cp >= 0xD800 && cp <= 0xDFFF) return NCR_LEVEL.remove;\n\n // 3. XML 1.0 restricted C0 controls\n if (this._ncrXmlVersion === 1.0) {\n if (cp >= 0x01 && cp <= 0x1F && !XML10_ALLOWED_C0.has(cp)) return NCR_LEVEL.remove;\n }\n\n return -1; // no restriction\n }\n\n /**\n * Execute a resolved NCR action.\n *\n * @param {number} action — NCR_LEVEL value\n * @param {string} token — raw token (e.g. '#38') for error messages\n * @param {number} cp — codepoint, used only for error messages\n * @returns {string|undefined}\n * - decoded character string → 'allow'\n * - '' → 'remove'\n * - undefined → 'leave' (caller must skip past '&' only)\n * - throws Error → 'throw'\n */\n _applyNCRAction(action, token, cp) {\n switch (action) {\n case NCR_LEVEL.allow: return String.fromCodePoint(cp);\n case NCR_LEVEL.remove: return '';\n case NCR_LEVEL.leave: return undefined; // signal: keep literal\n case NCR_LEVEL.throw:\n throw new Error(\n `[EntityDecoder] Prohibited numeric character reference ` +\n `&${token}; (U+${cp.toString(16).toUpperCase().padStart(4, '0')})`\n );\n default: return String.fromCodePoint(cp);\n }\n }\n\n /**\n * Full NCR resolution pipeline for a numeric token.\n *\n * Steps:\n * 1. Parse the codepoint (decimal or hex).\n * 2. Validate the raw codepoint range (NaN, <0, >0x10FFFF).\n * 3. If numericAllowed is false and no minimum restriction applies → leave as-is.\n * 4. Classify the codepoint to find the minimum required action level.\n * 5. Resolve effective action = max(onNCR, minimum).\n * 6. Apply and return.\n *\n * @param {string} token — e.g. '#38', '#x26', '#X26'\n * @returns {string|undefined}\n * - string (incl. '') — replacement ('' = remove)\n * - undefined — leave original &token; as-is\n */\n _resolveNCR(token) {\n // Step 1: parse codepoint\n const second = token.charCodeAt(1);\n let cp;\n if (second === 120 /* x */ || second === 88 /* X */) {\n cp = parseInt(token.slice(2), 16);\n } else {\n cp = parseInt(token.slice(1), 10);\n }\n\n // Step 2: out-of-range → leave as-is unconditionally\n if (Number.isNaN(cp) || cp < 0 || cp > 0x10FFFF) return undefined;\n\n // Step 3: classify to get minimum action level\n const minimum = this._classifyNCR(cp);\n\n // Step 4: if numericAllowed is false and no hard minimum → leave\n if (!this._numericAllowed && minimum < NCR_LEVEL.remove) return undefined;\n\n // Step 5: effective action = max(configured onNCR, range minimum)\n const effective = minimum === -1\n ? this._ncrOnLevel\n : Math.max(this._ncrOnLevel, minimum);\n\n // Step 6: apply\n return this._applyNCRAction(effective, token, cp);\n }\n}","import { DANGEROUS_PROPERTY_NAMES, criticalProperties } from \"../util.js\";\nimport { COMMON_HTML, CURRENCY } from '@nodable/entities';\n\nconst defaultOnDangerousProperty = (name) => {\n if (DANGEROUS_PROPERTY_NAMES.includes(name)) {\n return \"__\" + name;\n }\n return name;\n};\n\n\nexport const defaultOptions = {\n preserveOrder: false,\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n removeNSPrefix: false, // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false, //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true, //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function (tagName, val) {\n return val;\n },\n attributeValueProcessor: function (attrName, val) {\n return val;\n },\n stopNodes: [], //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n entityDecoder: null,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function (tagName, jPath, attrs) {\n return tagName\n },\n // skipEmptyListItem: false\n captureMetaData: false,\n maxNestedTags: 100,\n strictReservedNames: true,\n jPath: true, // if true, pass jPath string to callbacks; if false, pass matcher instance\n onDangerousProperty: defaultOnDangerousProperty\n};\n\n\n/**\n * Validates that a property name is safe to use\n * @param {string} propertyName - The property name to validate\n * @param {string} optionName - The option field name (for error message)\n * @throws {Error} If property name is dangerous\n */\nfunction validatePropertyName(propertyName, optionName) {\n if (typeof propertyName !== 'string') {\n return; // Only validate string property names\n }\n\n const normalized = propertyName.toLowerCase();\n if (DANGEROUS_PROPERTY_NAMES.some(dangerous => normalized === dangerous.toLowerCase())) {\n throw new Error(\n `[SECURITY] Invalid ${optionName}: \"${propertyName}\" is a reserved JavaScript keyword that could cause prototype pollution`\n );\n }\n\n if (criticalProperties.some(dangerous => normalized === dangerous.toLowerCase())) {\n throw new Error(\n `[SECURITY] Invalid ${optionName}: \"${propertyName}\" is a reserved JavaScript keyword that could cause prototype pollution`\n );\n }\n}\n\n/**\n * Normalizes processEntities option for backward compatibility\n * @param {boolean|object} value \n * @returns {object} Always returns normalized object\n */\nfunction normalizeProcessEntities(value, htmlEntities) {\n // Boolean backward compatibility\n if (typeof value === 'boolean') {\n return {\n enabled: value, // true or false\n maxEntitySize: 10000,\n maxExpansionDepth: 10000,\n maxTotalExpansions: Infinity,\n maxExpandedLength: 100000,\n maxEntityCount: 1000,\n allowedTags: null,\n tagFilter: null,\n appliesTo: \"all\",\n };\n }\n\n // Object config - merge with defaults\n if (typeof value === 'object' && value !== null) {\n return {\n enabled: value.enabled !== false,\n maxEntitySize: Math.max(1, value.maxEntitySize ?? 10000),\n maxExpansionDepth: Math.max(1, value.maxExpansionDepth ?? 10000),\n maxTotalExpansions: Math.max(1, value.maxTotalExpansions ?? Infinity),\n maxExpandedLength: Math.max(1, value.maxExpandedLength ?? 100000),\n maxEntityCount: Math.max(1, value.maxEntityCount ?? 1000),\n allowedTags: value.allowedTags ?? null,\n tagFilter: value.tagFilter ?? null,\n appliesTo: value.appliesTo ?? \"all\",\n };\n }\n\n // Default to enabled with limits\n return normalizeProcessEntities(true);\n}\n\nexport const buildOptions = function (options) {\n const built = Object.assign({}, defaultOptions, options);\n\n // Validate property names to prevent prototype pollution\n const propertyNameOptions = [\n { value: built.attributeNamePrefix, name: 'attributeNamePrefix' },\n { value: built.attributesGroupName, name: 'attributesGroupName' },\n { value: built.textNodeName, name: 'textNodeName' },\n { value: built.cdataPropName, name: 'cdataPropName' },\n { value: built.commentPropName, name: 'commentPropName' }\n ];\n\n for (const { value, name } of propertyNameOptions) {\n if (value) {\n validatePropertyName(value, name);\n }\n }\n\n if (built.onDangerousProperty === null) {\n built.onDangerousProperty = defaultOnDangerousProperty;\n }\n\n // Always normalize processEntities for backward compatibility and validation\n built.processEntities = normalizeProcessEntities(built.processEntities, built.htmlEntities);\n built.unpairedTagsSet = new Set(built.unpairedTags);\n // Convert old-style stopNodes for backward compatibility\n if (built.stopNodes && Array.isArray(built.stopNodes)) {\n built.stopNodes = built.stopNodes.map(node => {\n if (typeof node === 'string' && node.startsWith('*.')) {\n // Old syntax: *.tagname meant \"tagname anywhere\"\n // Convert to new syntax: ..tagname\n return '..' + node.substring(2);\n }\n return node;\n });\n }\n //console.debug(built.processEntities)\n return built;\n};","'use strict';\n\nlet METADATA_SYMBOL;\n\nif (typeof Symbol !== \"function\") {\n METADATA_SYMBOL = \"@@xmlMetadata\";\n} else {\n METADATA_SYMBOL = Symbol(\"XML Node Metadata\");\n}\n\nexport default class XmlNode {\n constructor(tagname) {\n this.tagname = tagname;\n this.child = []; //nested tags, text, cdata, comments in order\n this[\":@\"] = Object.create(null); //attributes map\n }\n add(key, val) {\n // this.child.push( {name : key, val: val, isCdata: isCdata });\n if (key === \"__proto__\") key = \"#__proto__\";\n this.child.push({ [key]: val });\n }\n addChild(node, startIndex) {\n if (node.tagname === \"__proto__\") node.tagname = \"#__proto__\";\n if (node[\":@\"] && Object.keys(node[\":@\"]).length > 0) {\n this.child.push({ [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n } else {\n this.child.push({ [node.tagname]: node.child });\n }\n // if requested, add the startIndex\n if (startIndex !== undefined) {\n // Note: for now we just overwrite the metadata. If we had more complex metadata,\n // we might need to do an object append here: metadata = { ...metadata, startIndex }\n this.child[this.child.length - 1][METADATA_SYMBOL] = { startIndex };\n }\n }\n /** symbol used for metadata */\n static getMetaDataSymbol() {\n return METADATA_SYMBOL;\n }\n}\n","import { isName } from '../util.js';\n\nexport default class DocTypeReader {\n constructor(options) {\n this.suppressValidationErr = !options;\n this.options = options;\n }\n\n readDocType(xmlData, i) {\n const entities = Object.create(null);\n let entityCount = 0;\n\n if (xmlData[i + 3] === 'O' &&\n xmlData[i + 4] === 'C' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'Y' &&\n xmlData[i + 7] === 'P' &&\n xmlData[i + 8] === 'E') {\n i = i + 9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === '<' && !comment) { //Determine the tag type\n if (hasBody && hasSeq(xmlData, \"!ENTITY\", i)) {\n i += 7;\n let entityName, val;\n [entityName, val, i] = this.readEntityExp(xmlData, i + 1, this.suppressValidationErr);\n if (val.indexOf(\"&\") === -1) { //Parameter entities are not supported\n if (this.options.enabled !== false &&\n this.options.maxEntityCount != null &&\n entityCount >= this.options.maxEntityCount) {\n throw new Error(\n `Entity count (${entityCount + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`\n );\n }\n //const escaped = entityName.replace(/[.\\-+*:]/g, '\\\\.');\n //const escaped = entityName.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n entities[entityName] = val;\n entityCount++;\n }\n }\n else if (hasBody && hasSeq(xmlData, \"!ELEMENT\", i)) {\n i += 8;//Not supported\n const { index } = this.readElementExp(xmlData, i + 1);\n i = index;\n } else if (hasBody && hasSeq(xmlData, \"!ATTLIST\", i)) {\n i += 8;//Not supported\n // const {index} = this.readAttlistExp(xmlData,i+1);\n // i = index;\n } else if (hasBody && hasSeq(xmlData, \"!NOTATION\", i)) {\n i += 9;//Not supported\n const { index } = this.readNotationExp(xmlData, i + 1, this.suppressValidationErr);\n i = index;\n } else if (hasSeq(xmlData, \"!--\", i)) comment = true;\n else throw new Error(`Invalid DOCTYPE`);\n\n angleBracketsCount++;\n exp = \"\";\n } else if (xmlData[i] === '>') { //Read tag content\n if (comment) {\n if (xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\") {\n comment = false;\n angleBracketsCount--;\n }\n } else {\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n } else if (xmlData[i] === '[') {\n hasBody = true;\n } else {\n exp += xmlData[i];\n }\n }\n if (angleBracketsCount !== 0) {\n throw new Error(`Unclosed DOCTYPE`);\n }\n } else {\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return { entities, i };\n }\n readEntityExp(xmlData, i) {\n //External entities are not supported\n // <!ENTITY ext SYSTEM \"http://normal-website.com\" >\n\n //Parameter entities are not supported\n // <!ENTITY entityname \"&anotherElement;\">\n\n //Internal entities are supported\n // <!ENTITY entityname \"replacement text\">\n\n // Skip leading whitespace after <!ENTITY\n i = skipWhitespace(xmlData, i);\n\n // Read entity name\n const startIndex = i;\n while (i < xmlData.length && !/\\s/.test(xmlData[i]) && xmlData[i] !== '\"' && xmlData[i] !== \"'\") {\n i++;\n }\n let entityName = xmlData.substring(startIndex, i);\n\n validateEntityName(entityName);\n\n // Skip whitespace after entity name\n i = skipWhitespace(xmlData, i);\n\n // Check for unsupported constructs (external entities or parameter entities)\n if (!this.suppressValidationErr) {\n if (xmlData.substring(i, i + 6).toUpperCase() === \"SYSTEM\") {\n throw new Error(\"External entities are not supported\");\n } else if (xmlData[i] === \"%\") {\n throw new Error(\"Parameter entities are not supported\");\n }\n }\n\n // Read entity value (internal entity)\n let entityValue = \"\";\n [i, entityValue] = this.readIdentifierVal(xmlData, i, \"entity\");\n\n // Validate entity size\n if (this.options.enabled !== false &&\n this.options.maxEntitySize != null &&\n entityValue.length > this.options.maxEntitySize) {\n throw new Error(\n `Entity \"${entityName}\" size (${entityValue.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`\n );\n }\n\n i--;\n return [entityName, entityValue, i];\n }\n\n readNotationExp(xmlData, i) {\n // Skip leading whitespace after <!NOTATION\n i = skipWhitespace(xmlData, i);\n\n // Read notation name\n\n const startIndex = i;\n while (i < xmlData.length && !/\\s/.test(xmlData[i])) {\n i++;\n }\n let notationName = xmlData.substring(startIndex, i);\n\n !this.suppressValidationErr && validateEntityName(notationName);\n\n // Skip whitespace after notation name\n i = skipWhitespace(xmlData, i);\n\n // Check identifier type (SYSTEM or PUBLIC)\n const identifierType = xmlData.substring(i, i + 6).toUpperCase();\n if (!this.suppressValidationErr && identifierType !== \"SYSTEM\" && identifierType !== \"PUBLIC\") {\n throw new Error(`Expected SYSTEM or PUBLIC, found \"${identifierType}\"`);\n }\n i += identifierType.length;\n\n // Skip whitespace after identifier type\n i = skipWhitespace(xmlData, i);\n\n // Read public identifier (if PUBLIC)\n let publicIdentifier = null;\n let systemIdentifier = null;\n\n if (identifierType === \"PUBLIC\") {\n [i, publicIdentifier] = this.readIdentifierVal(xmlData, i, \"publicIdentifier\");\n\n // Skip whitespace after public identifier\n i = skipWhitespace(xmlData, i);\n\n // Optionally read system identifier\n if (xmlData[i] === '\"' || xmlData[i] === \"'\") {\n [i, systemIdentifier] = this.readIdentifierVal(xmlData, i, \"systemIdentifier\");\n }\n } else if (identifierType === \"SYSTEM\") {\n // Read system identifier (mandatory for SYSTEM)\n [i, systemIdentifier] = this.readIdentifierVal(xmlData, i, \"systemIdentifier\");\n\n if (!this.suppressValidationErr && !systemIdentifier) {\n throw new Error(\"Missing mandatory system identifier for SYSTEM notation\");\n }\n }\n\n return { notationName, publicIdentifier, systemIdentifier, index: --i };\n }\n\n readIdentifierVal(xmlData, i, type) {\n let identifierVal = \"\";\n const startChar = xmlData[i];\n if (startChar !== '\"' && startChar !== \"'\") {\n throw new Error(`Expected quoted string, found \"${startChar}\"`);\n }\n i++;\n\n const startIndex = i;\n while (i < xmlData.length && xmlData[i] !== startChar) {\n i++;\n }\n identifierVal = xmlData.substring(startIndex, i);\n\n if (xmlData[i] !== startChar) {\n throw new Error(`Unterminated ${type} value`);\n }\n i++;\n return [i, identifierVal];\n }\n\n readElementExp(xmlData, i) {\n // <!ELEMENT br EMPTY>\n // <!ELEMENT div ANY>\n // <!ELEMENT title (#PCDATA)>\n // <!ELEMENT book (title, author+)>\n // <!ELEMENT name (content-model)>\n\n // Skip leading whitespace after <!ELEMENT\n i = skipWhitespace(xmlData, i);\n\n // Read element name\n const startIndex = i;\n while (i < xmlData.length && !/\\s/.test(xmlData[i])) {\n i++;\n }\n let elementName = xmlData.substring(startIndex, i);\n\n // Validate element name\n if (!this.suppressValidationErr && !isName(elementName)) {\n throw new Error(`Invalid element name: \"${elementName}\"`);\n }\n\n // Skip whitespace after element name\n i = skipWhitespace(xmlData, i);\n let contentModel = \"\";\n // Expect '(' to start content model\n if (xmlData[i] === \"E\" && hasSeq(xmlData, \"MPTY\", i)) i += 4;\n else if (xmlData[i] === \"A\" && hasSeq(xmlData, \"NY\", i)) i += 2;\n else if (xmlData[i] === \"(\") {\n i++; // Move past '('\n\n // Read content model\n const startIndex = i;\n while (i < xmlData.length && xmlData[i] !== \")\") {\n i++;\n }\n contentModel = xmlData.substring(startIndex, i);\n\n if (xmlData[i] !== \")\") {\n throw new Error(\"Unterminated content model\");\n }\n\n } else if (!this.suppressValidationErr) {\n throw new Error(`Invalid Element Expression, found \"${xmlData[i]}\"`);\n }\n\n return {\n elementName,\n contentModel: contentModel.trim(),\n index: i\n };\n }\n\n readAttlistExp(xmlData, i) {\n // Skip leading whitespace after <!ATTLIST\n i = skipWhitespace(xmlData, i);\n\n // Read element name\n let startIndex = i;\n while (i < xmlData.length && !/\\s/.test(xmlData[i])) {\n i++;\n }\n let elementName = xmlData.substring(startIndex, i);\n\n // Validate element name\n validateEntityName(elementName)\n\n // Skip whitespace after element name\n i = skipWhitespace(xmlData, i);\n\n // Read attribute name\n startIndex = i;\n while (i < xmlData.length && !/\\s/.test(xmlData[i])) {\n i++;\n }\n let attributeName = xmlData.substring(startIndex, i);\n\n // Validate attribute name\n if (!validateEntityName(attributeName)) {\n throw new Error(`Invalid attribute name: \"${attributeName}\"`);\n }\n\n // Skip whitespace after attribute name\n i = skipWhitespace(xmlData, i);\n\n // Read attribute type\n let attributeType = \"\";\n if (xmlData.substring(i, i + 8).toUpperCase() === \"NOTATION\") {\n attributeType = \"NOTATION\";\n i += 8; // Move past \"NOTATION\"\n\n // Skip whitespace after \"NOTATION\"\n i = skipWhitespace(xmlData, i);\n\n // Expect '(' to start the list of notations\n if (xmlData[i] !== \"(\") {\n throw new Error(`Expected '(', found \"${xmlData[i]}\"`);\n }\n i++; // Move past '('\n\n // Read the list of allowed notations\n let allowedNotations = [];\n while (i < xmlData.length && xmlData[i] !== \")\") {\n\n\n const startIndex = i;\n while (i < xmlData.length && xmlData[i] !== \"|\" && xmlData[i] !== \")\") {\n i++;\n }\n let notation = xmlData.substring(startIndex, i);\n\n // Validate notation name\n notation = notation.trim();\n if (!validateEntityName(notation)) {\n throw new Error(`Invalid notation name: \"${notation}\"`);\n }\n\n allowedNotations.push(notation);\n\n // Skip '|' separator or exit loop\n if (xmlData[i] === \"|\") {\n i++; // Move past '|'\n i = skipWhitespace(xmlData, i); // Skip optional whitespace after '|'\n }\n }\n\n if (xmlData[i] !== \")\") {\n throw new Error(\"Unterminated list of notations\");\n }\n i++; // Move past ')'\n\n // Store the allowed notations as part of the attribute type\n attributeType += \" (\" + allowedNotations.join(\"|\") + \")\";\n } else {\n // Handle simple types (e.g., CDATA, ID, IDREF, etc.)\n const startIndex = i;\n while (i < xmlData.length && !/\\s/.test(xmlData[i])) {\n i++;\n }\n attributeType += xmlData.substring(startIndex, i);\n\n // Validate simple attribute type\n const validTypes = [\"CDATA\", \"ID\", \"IDREF\", \"IDREFS\", \"ENTITY\", \"ENTITIES\", \"NMTOKEN\", \"NMTOKENS\"];\n if (!this.suppressValidationErr && !validTypes.includes(attributeType.toUpperCase())) {\n throw new Error(`Invalid attribute type: \"${attributeType}\"`);\n }\n }\n\n // Skip whitespace after attribute type\n i = skipWhitespace(xmlData, i);\n\n // Read default value\n let defaultValue = \"\";\n if (xmlData.substring(i, i + 8).toUpperCase() === \"#REQUIRED\") {\n defaultValue = \"#REQUIRED\";\n i += 8;\n } else if (xmlData.substring(i, i + 7).toUpperCase() === \"#IMPLIED\") {\n defaultValue = \"#IMPLIED\";\n i += 7;\n } else {\n [i, defaultValue] = this.readIdentifierVal(xmlData, i, \"ATTLIST\");\n }\n\n return {\n elementName,\n attributeName,\n attributeType,\n defaultValue,\n index: i\n }\n }\n}\n\n\n\nconst skipWhitespace = (data, index) => {\n while (index < data.length && /\\s/.test(data[index])) {\n index++;\n }\n return index;\n};\n\n\n\nfunction hasSeq(data, seq, i) {\n for (let j = 0; j < seq.length; j++) {\n if (seq[j] !== data[i + j + 1]) return false;\n }\n return true;\n}\n\nfunction validateEntityName(name) {\n if (isName(name))\n return name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}","/**\n * Flat lookup table: maps Unicode code point → ASCII digit (0-9).\n * Only decimal digit characters (Unicode category Nd) are included.\n *\n * Strategy: Int32Array of size (maxCodePoint - minCodePoint + 1).\n * Value 0xFF means \"not a digit\". Value 0-9 is the ASCII digit value.\n * This gives O(1) lookup with no branching, no bisect, no loop.\n *\n * Memory: range is 0x0660 to 0x1FBF0 → ~129,936 entries × 1 byte = ~127 KB.\n * Acceptable for a one-time init; lookup is a single array index.\n */\n\n// All known Unicode Nd (decimal digit) script zero code points.\n// Each script has exactly 10 consecutive digits: zero+0 .. zero+9.\nconst SCRIPT_ZEROS = [\n // Basic Latin (ASCII) — included for completeness / pass-through\n 0x0030, // 0-9\n\n // Arabic scripts\n 0x0660, // Arabic-Indic ٠١٢٣٤٥٦٧٨٩\n 0x06F0, // Extended Arabic-Indic (Urdu/Persian/Sindhi) ۰۱۲۳\n\n // Indic scripts\n 0x0966, // Devanagari ०१२३४५६७८९\n 0x09E6, // Bengali ০১২৩৪৫৬৭৮৯\n 0x0A66, // Gurmukhi ੦੧੨੩੪੫੬੭੮੯\n 0x0AE6, // Gujarati ૦૧૨૩૪૫૬૭૮૯\n 0x0B66, // Odia ୦୧୨୩୪୫୬୭୮୯\n 0x0BE6, // Tamil ௦௧௨௩௪௫௬௭௮௯\n 0x0C66, // Telugu ౦౧౨౩౪౫౬౭౮౯\n 0x0CE6, // Kannada ೦೧೨೩೪೫೬೭೮೯\n 0x0D66, // Malayalam ൦൧൨൩൪൫൬൭൮൯\n 0x0DE6, // Sinhala Archaic ෦෧෨෩෪෫෬෭෮෯\n\n // Southeast Asian scripts\n 0x0E50, // Thai ๐๑๒๓๔๕๖๗๘๙\n 0x0ED0, // Lao ໐໑໒໓໔໕໖໗໘໙\n 0x0F20, // Tibetan ༠༡༢༣༤༥༦༧༨༩\n 0x1040, // Myanmar ၀၁၂၃၄၅၆၇၈၉\n 0x1090, // Myanmar Shan ႐႑႒႓႔႕႖႗႘႙\n 0x17E0, // Khmer ០១២៣៤៥៦៧៨៩\n 0x1810, // Mongolian ᠐᠑᠒᠓᠔᠕᠖᠗᠘᠙\n 0x1946, // Limbu ᥆᥇᥈᥉᥊᥋᥌᥍᥎᥏\n 0x19D0, // New Tai Lue ᧐᧑᧒᧓᧔᧕᧖᧗᧘᧙\n 0x1A80, // Tai Tham Hora ᪀᪁᪂᪃᪄᪅᪆᪇᪈᪉\n 0x1A90, // Tai Tham Tham ᪐᪑᪒᪓᪔᪕᪖᪗᪘᪙\n 0x1B50, // Balinese ᭐᭑᭒᭓᭔᭕᭖᭗᭘᭙\n 0x1BB0, // Sundanese ᮰᮱᮲᮳᮴᮵᮶᮷᮸᮹\n 0x1C40, // Lepcha ᱀᱁᱂᱃᱄᱅᱆᱇᱈᱉\n 0x1C50, // Ol Chiki ᱐᱑᱒᱓᱔᱕᱖᱗᱘᱙\n\n // Fullwidth (CJK context)\n 0xFF10, // Fullwidth 0123456789\n\n // Mathematical digit variants (Unicode math block)\n 0x1D7CE, // Mathematical Bold\n 0x1D7D8, // Mathematical Double-Struck\n 0x1D7E2, // Mathematical Sans-Serif\n 0x1D7EC, // Mathematical Sans-Serif Bold\n 0x1D7F6, // Mathematical Monospace\n\n // Other scripts\n 0x104A0, // Osmanya 𐒠𐒡𐒢𐒣𐒤𐒥𐒦𐒧𐒨𐒩\n 0x10D30, // Hanifi Rohingya 𐴰𐴱𐴲𐴳𐴴𐴵𐴶𐴷𐴸𐴹\n 0x11066, // Brahmi 𑁦𑁧𑁨𑁩𑁪𑁫𑁬𑁭𑁮𑁯\n 0x110F0, // Sora Sompeng 𑃰𑃱𑃲𑃳𑃴𑃵𑃶𑃷𑃸𑃹\n 0x11136, // Chakma 𑄶𑄷𑄸𑄹𑄺𑄻𑄼𑄽𑄾𑄿\n 0x111D0, // Sharada 𑇐𑇑𑇒𑇓𑇔𑇕𑇖𑇗𑇘𑇙\n 0x112F0, // Khudawadi 𑋰𑋱𑋲𑋳𑋴𑋵𑋶𑋷𑋸𑋹\n 0x11450, // Newa 𑑐𑑑𑑒𑑓𑑔𑑕𑑖𑑗𑑘𑑙\n 0x114D0, // Tirhuta 𑓐𑓑𑓒𑓓𑓔𑓕𑓖𑓗𑓘𑓙\n 0x11650, // Modi 𑙐𑙑𑙒𑙓𑙔𑙕𑙖𑙗𑙘𑙙\n 0x116C0, // Takri 𑛀𑛁𑛂𑛃𑛄𑛅𑛆𑛇𑛈𑛉\n 0x11730, // Ahom 𑜰𑜱𑜲𑜳𑜴𑜵𑜶𑜷𑜸𑜹\n 0x118E0, // Warang Citi 𑣠𑣡𑣢𑣣𑣤𑣥𑣦𑣧𑣨𑣩\n 0x11950, // Dives Akuru 𑥐𑥑𑥒𑥓𑥔𑥕𑥖𑥗𑥘𑥙\n 0x11BF0, // Khitan Small Script 𑯰𑯱𑯲𑯳𑯴𑯵𑯶𑯷𑯸𑯹\n 0x11C50, // Bhaiksuki 𑱐𑱑𑱒𑱓𑱔𑱕𑱖𑱗𑱘𑱙\n 0x11D50, // Masaram Gondi 𑵐𑵑𑵒𑵓𑵔𑵕𑵖𑵗𑵘𑵙\n 0x11DA0, // Gunjala Gondi 𑶠𑶡𑶢𑶣𑶤𑶥𑶦𑶧𑶨𑶩\n 0x11F50, // Kawi 𑽐𑽑𑽒𑽓𑽔𑽕𑽖𑽗𑽘𑽙\n 0x16A60, // Mro 𖩠𖩡𖩢𖩣𖩤𖩥𖩦𖩧𖩨𖩩\n 0x16AC0, // Tangsa 𖫀𖫁𖫂𖫃𖫄𖫅𖫆𖫇𖫈𖫉\n 0x16B50, // Pahawh Hmong 𖭐𖭑𖭒𖭓𖭔𖭕𖭖𖭗𖭘𖭙\n 0x1E140, // Nyiakeng Puachue Hmong 𞅀𞅁𞅂𞅃𞅄𞅅𞅆𞅇𞅈𞅉\n 0x1E2F0, // Wancho 𞋰𞋱𞋲𞋳𞋴𞋵𞋶𞋷𞋸𞋹\n 0x1E4F0, // Nag Mundari 𞓰𞓱𞓲𞓳𞓴𞓵𞓶𞓷𞓸𞓹\n 0x1E950, // Adlam 𞥐𞥑𞥒𞥓𞥔𞥕𞥖𞥗𞥘𞥙\n 0x1FBF0, // Segmented digit symbols 🯰🯱🯲🯳🯴🯵🯶🯷🯸🯹\n];\n\n// Build a sparse Map for scripts above 0xFFFF (surrogate-pair range).\n// These can't go into a flat Uint8Array indexed by code point efficiently.\nconst NOT_DIGIT = 0xFF;\nconst HIGH_MAP = new Map(); // codePoint → digit value (0-9)\n\nconst LOW_MAX = 0xFFFF;\nconst LOW_MIN = 0x0660; // first non-ASCII digit script\n\n// Flat Uint8Array covering 0x0660 .. 0xFFFF\nconst TABLE_OFFSET = LOW_MIN;\nconst TABLE_SIZE = LOW_MAX - LOW_MIN + 1;\nconst TABLE = new Uint8Array(TABLE_SIZE).fill(NOT_DIGIT);\n\nfor (const zero of SCRIPT_ZEROS) {\n for (let d = 0; d < 10; d++) {\n const cp = zero + d;\n if (cp <= LOW_MAX) {\n TABLE[cp - TABLE_OFFSET] = d;\n } else {\n HIGH_MAP.set(cp, d);\n }\n }\n}\n\nexport { TABLE, TABLE_OFFSET, HIGH_MAP, NOT_DIGIT };\n","'use strict';\n\nimport { TABLE, TABLE_OFFSET, HIGH_MAP, NOT_DIGIT } from './digitTable.js';\n\nconst CHAR_0 = 48; // '0'.charCodeAt(0)\nconst CHAR_9 = 57; // '9'.charCodeAt(0)\nconst CHAR_MINUS = 45; // '-'.charCodeAt(0)\n\n// Unicode minus/hyphen variants worth normalizing to ASCII '-' in numeric context:\n// U+2212 MINUS SIGN − (mathematically correct minus)\n// U+FF0D FULLWIDTH HYPHEN-MINUS - (Japanese fullwidth context)\n// U+FE63 SMALL HYPHEN-MINUS ﹣ (small form variant)\n//\n// NOT normalized (deliberate):\n// U+2013 EN DASH – (punctuation, not a numeric sign)\n// U+2014 EM DASH — (punctuation)\n// U+2010 HYPHEN ‐ (typographic hyphen)\n//\n// Rationale: only characters a human or locale formatter would plausibly use\n// as a numeric minus sign are normalized. Dashes used for punctuation are left\n// alone to avoid mangling non-numeric strings.\nconst MINUS_SET = new Set([0x2212, 0xFF0D, 0xFE63]);\n\n/**\n * Normalize all Unicode decimal digit characters in a string to ASCII (0-9),\n * and normalize Unicode minus variants to ASCII '-' (U+002D).\n *\n * Non-digit, non-minus characters are passed through unchanged.\n *\n * Performance design:\n * - Fast path: if the string has no convertible characters, return it unchanged\n * (zero allocation).\n * - BMP digits (0x0660..0xFFFF excl. surrogates): flat Uint8Array lookup (O(1)).\n * - Supplementary plane digits (> 0xFFFF, encoded as surrogate pairs): Map lookup.\n * - Minus variants: checked inline with a small fixed Set.\n *\n * @param {string} str\n * @returns {string}\n */\nfunction anynum(str) {\n if (typeof str !== 'string') return str;\n\n const len = str.length;\n if (len === 0) return str;\n\n // Scan for first character needing conversion.\n // If none found, return original string (zero allocation).\n let firstHit = -1;\n\n for (let i = 0; i < len; i++) {\n const cc = str.charCodeAt(i);\n\n // ASCII digit or ASCII minus — already normalized, skip fast\n if ((cc >= CHAR_0 && cc <= CHAR_9) || cc === CHAR_MINUS) continue;\n\n // Below first unicode digit script — check minus variants only\n if (cc < TABLE_OFFSET) {\n if (MINUS_SET.has(cc)) { firstHit = i; break; }\n continue;\n }\n\n // Surrogate pairs live in BMP range 0xD800-0xDFFF — check before TABLE\n if (cc >= 0xD800 && cc <= 0xDBFF) {\n if (i + 1 < len) {\n const low = str.charCodeAt(i + 1);\n if (low >= 0xDC00 && low <= 0xDFFF) {\n const cp = 0x10000 + ((cc - 0xD800) << 10) + (low - 0xDC00);\n if (HIGH_MAP.has(cp)) { firstHit = i; break; }\n }\n }\n continue;\n }\n\n // BMP non-surrogate: flat table lookup; also check minus variants in this range\n if (TABLE[cc - TABLE_OFFSET] !== NOT_DIGIT || MINUS_SET.has(cc)) {\n firstHit = i;\n break;\n }\n }\n\n // Nothing to replace — return original, zero allocation\n if (firstHit === -1) return str;\n\n // Build result: copy unchanged prefix, then convert from firstHit onward\n const chars = [];\n\n if (firstHit > 0) chars.push(str.slice(0, firstHit));\n\n for (let i = firstHit; i < len; i++) {\n const cc = str.charCodeAt(i);\n\n // ASCII digit or ASCII minus — pass through\n if ((cc >= CHAR_0 && cc <= CHAR_9) || cc === CHAR_MINUS) {\n chars.push(str[i]);\n continue;\n }\n\n // Below TABLE_OFFSET — check minus variants, else pass through\n if (cc < TABLE_OFFSET) {\n chars.push(MINUS_SET.has(cc) ? '-' : str[i]);\n continue;\n }\n\n // Surrogate pairs\n if (cc >= 0xD800 && cc <= 0xDBFF) {\n if (i + 1 < len) {\n const low = str.charCodeAt(i + 1);\n if (low >= 0xDC00 && low <= 0xDFFF) {\n const cp = 0x10000 + ((cc - 0xD800) << 10) + (low - 0xDC00);\n const d = HIGH_MAP.get(cp);\n if (d !== undefined) {\n chars.push(String.fromCharCode(d + 48));\n i++; // consume low surrogate\n continue;\n }\n }\n }\n chars.push(str[i]);\n continue;\n }\n\n // BMP non-surrogate: flat table lookup + minus variants\n if (MINUS_SET.has(cc)) {\n chars.push('-');\n continue;\n }\n const d = TABLE[cc - TABLE_OFFSET];\n chars.push(d !== NOT_DIGIT ? String.fromCharCode(d + 48) : str[i]);\n }\n\n return chars.join('');\n}\n\nexport { anynum };\nexport default anynum;","const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst binRegex = /^0b[01]+$/;\nconst octRegex = /^0o[0-7]+$/;\nconst numRegex = /^([\\-\\+])?(0*)([0-9]*(\\.[0-9]*)?)$/;\n\nimport anynum from \"anynum\";\n\nconst consider = {\n hex: true,\n binary: false,\n octal: false,\n leadingZeros: true,\n decimalPoint: \"\\.\",\n eNotation: true,\n //skipLike: /regex/,\n infinity: \"original\", // \"null\", \"infinity\" (Infinity type), \"string\" (\"Infinity\" (the string literal))\n unicode: false,\n};\n\nexport default function toNumber(str, options = {}) {\n options = Object.assign({}, consider, options);\n if (!str || typeof str !== \"string\") return str;\n\n let trimmedStr = str.trim();\n\n if (trimmedStr.length === 0) return str;\n else if (options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str;\n else if (trimmedStr === \"0\") return 0;\n\n if (options.unicode) {\n trimmedStr = anynum(trimmedStr);\n if (trimmedStr === \"0\") return 0; // re-check after normalization\n }\n if (options.hex && hexRegex.test(trimmedStr)) {\n return parse_int(trimmedStr, 16);\n } else if (options.binary && binRegex.test(trimmedStr)) {\n return parse_int(trimmedStr, 2);\n } else if (options.octal && octRegex.test(trimmedStr)) {\n return parse_int(trimmedStr, 8);\n } else if (!isFinite(trimmedStr)) { //Infinity\n return handleInfinity(str, Number(trimmedStr), options);\n } else if (trimmedStr.includes('e') || trimmedStr.includes('E')) { //eNotation\n return resolveEnotation(str, trimmedStr, options);\n } else {\n //separate negative sign, leading zeros, and rest number\n const match = numRegex.exec(trimmedStr);\n // +00.123 => [ , '+', '00', '.123', ..\n if (match) {\n const sign = match[1] || \"\";\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]); //complete num without leading zeros\n const decimalAdjacentToLeadingZeros = sign ? // 0., -00., 000.\n str[leadingZeros.length + 1] === \".\"\n : str[leadingZeros.length] === \".\";\n\n //trim ending zeros for floating number\n if (!options.leadingZeros //leading zeros are not allowed\n && (leadingZeros.length > 1\n || (leadingZeros.length === 1 && !decimalAdjacentToLeadingZeros))) {\n // 00, 00.3, +03.24, 03, 03.24\n return str;\n }\n else {//no leading zeros or leading zeros are allowed\n const num = Number(trimmedStr);\n const parsedStr = String(num);\n\n if (num === 0) return num;\n if (parsedStr.search(/[eE]/) !== -1) { //given number is long and parsed to eNotation\n if (options.eNotation) return num;\n else return str;\n } else if (trimmedStr.indexOf(\".\") !== -1) { //floating number\n if (parsedStr === \"0\") return num; //0.0\n else if (parsedStr === numTrimmedByZeros) return num; //0.456. 0.79000\n else if (parsedStr === `${sign}${numTrimmedByZeros}`) return num;\n else return str;\n }\n\n let n = leadingZeros ? numTrimmedByZeros : trimmedStr;\n if (leadingZeros) {\n // -009 => -9\n return (n === parsedStr) || (sign + n === parsedStr) ? num : str\n } else {\n // +9\n return (n === parsedStr) || (n === sign + parsedStr) ? num : str\n }\n }\n } else { //non-numeric string\n return str;\n }\n }\n}\n\nconst eNotationRegx = /^([-+])?(0*)(\\d*(\\.\\d*)?[eE][-\\+]?\\d+)$/;\nfunction resolveEnotation(str, trimmedStr, options) {\n if (!options.eNotation) return str;\n const notation = trimmedStr.match(eNotationRegx);\n if (notation) {\n let sign = notation[1] || \"\";\n const eChar = notation[3].indexOf(\"e\") === -1 ? \"E\" : \"e\";\n const leadingZeros = notation[2];\n const eAdjacentToLeadingZeros = sign ? // 0E.\n str[leadingZeros.length + 1] === eChar\n : str[leadingZeros.length] === eChar;\n\n if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str;\n else if (leadingZeros.length === 1\n && (notation[3].startsWith(`.${eChar}`) || notation[3][0] === eChar)) {\n return Number(trimmedStr);\n } else if (leadingZeros.length > 0) {\n // Has leading zeros — only accept if leadingZeros option allows it\n if (options.leadingZeros && !eAdjacentToLeadingZeros) {\n trimmedStr = (notation[1] || \"\") + notation[3];\n return Number(trimmedStr);\n } else return str;\n } else {\n // No leading zeros — always valid e-notation, parse it\n return Number(trimmedStr);\n }\n } else {\n return str;\n }\n}\n\n/**\n * \n * @param {string} numStr without leading zeros\n * @returns \n */\nfunction trimZeros(numStr) {\n if (numStr && numStr.indexOf(\".\") !== -1) {//float\n numStr = numStr.replace(/0+$/, \"\"); //remove ending zeros\n if (numStr === \".\") numStr = \"0\";\n else if (numStr[0] === \".\") numStr = \"0\" + numStr;\n else if (numStr[numStr.length - 1] === \".\") numStr = numStr.substring(0, numStr.length - 1);\n return numStr;\n }\n return numStr;\n}\n\nfunction parse_int(numStr, base) {\n const str = numStr.trim();\n if (base === 2 || base === 8) numStr = str.substring(2);\n\n if (parseInt) return parseInt(numStr, base);\n else if (Number.parseInt) return Number.parseInt(numStr, base);\n else if (window && window.parseInt) return window.parseInt(numStr, base);\n else throw new Error(\"parseInt, Number.parseInt, window.parseInt are not supported\");\n}\n\n/**\n * Handle infinite values based on user option\n * @param {string} str - original input string\n * @param {number} num - parsed number (Infinity or -Infinity)\n * @param {object} options - user options\n * @returns {string|number|null} based on infinity option\n */\nfunction handleInfinity(str, num, options) {\n const isPositive = num === Infinity;\n\n switch (options.infinity.toLowerCase()) {\n case \"null\":\n return null;\n case \"infinity\":\n return num; // Return Infinity or -Infinity\n case \"string\":\n return isPositive ? \"Infinity\" : \"-Infinity\";\n case \"original\":\n default:\n return str; // Return original string like \"1e1000\"\n }\n}","export default function getIgnoreAttributesFn(ignoreAttributes) {\n if (typeof ignoreAttributes === 'function') {\n return ignoreAttributes\n }\n if (Array.isArray(ignoreAttributes)) {\n return (attrName) => {\n for (const pattern of ignoreAttributes) {\n if (typeof pattern === 'string' && attrName === pattern) {\n return true\n }\n if (pattern instanceof RegExp && pattern.test(attrName)) {\n return true\n }\n }\n }\n }\n return () => false\n}","/**\n * Expression - Parses and stores a tag pattern expression\n * \n * Patterns are parsed once and stored in an optimized structure for fast matching.\n * \n * @example\n * const expr = new Expression(\"root.users.user\");\n * const expr2 = new Expression(\"..user[id]:first\");\n * const expr3 = new Expression(\"root/users/user\", { separator: '/' });\n */\nexport default class Expression {\n /**\n * Create a new Expression\n * @param {string} pattern - Pattern string (e.g., \"root.users.user\", \"..user[id]\")\n * @param {Object} options - Configuration options\n * @param {string} options.separator - Path separator (default: '.')\n */\n constructor(pattern, options = {}, data) {\n this.pattern = pattern;\n this.separator = options.separator || '.';\n this.segments = this._parse(pattern);\n this.data = data;\n // Cache expensive checks for performance (O(1) instead of O(n))\n this._hasDeepWildcard = this.segments.some(seg => seg.type === 'deep-wildcard');\n this._hasAttributeCondition = this.segments.some(seg => seg.attrName !== undefined);\n this._hasPositionSelector = this.segments.some(seg => seg.position !== undefined);\n }\n\n /**\n * Parse pattern string into segments\n * @private\n * @param {string} pattern - Pattern to parse\n * @returns {Array} Array of segment objects\n */\n _parse(pattern) {\n const segments = [];\n\n // Split by separator but handle \"..\" specially\n let i = 0;\n let currentPart = '';\n\n while (i < pattern.length) {\n if (pattern[i] === this.separator) {\n // Check if next char is also separator (deep wildcard)\n if (i + 1 < pattern.length && pattern[i + 1] === this.separator) {\n // Flush current part if any\n if (currentPart.trim()) {\n segments.push(this._parseSegment(currentPart.trim()));\n currentPart = '';\n }\n // Add deep wildcard\n segments.push({ type: 'deep-wildcard' });\n i += 2; // Skip both separators\n } else {\n // Regular separator\n if (currentPart.trim()) {\n segments.push(this._parseSegment(currentPart.trim()));\n }\n currentPart = '';\n i++;\n }\n } else {\n currentPart += pattern[i];\n i++;\n }\n }\n\n // Flush remaining part\n if (currentPart.trim()) {\n segments.push(this._parseSegment(currentPart.trim()));\n }\n\n return segments;\n }\n\n /**\n * Parse a single segment\n * @private\n * @param {string} part - Segment string (e.g., \"user\", \"ns::user\", \"user[id]\", \"ns::user:first\")\n * @returns {Object} Segment object\n */\n _parseSegment(part) {\n const segment = { type: 'tag' };\n\n // NEW NAMESPACE SYNTAX (v2.0):\n // ============================\n // Namespace uses DOUBLE colon (::)\n // Position uses SINGLE colon (:)\n // \n // Examples:\n // \"user\" → tag\n // \"user:first\" → tag + position\n // \"user[id]\" → tag + attribute\n // \"user[id]:first\" → tag + attribute + position\n // \"ns::user\" → namespace + tag\n // \"ns::user:first\" → namespace + tag + position\n // \"ns::user[id]\" → namespace + tag + attribute\n // \"ns::user[id]:first\" → namespace + tag + attribute + position\n // \"ns::first\" → namespace + tag named \"first\" (NO ambiguity!)\n //\n // This eliminates all ambiguity:\n // :: = namespace separator\n // : = position selector\n // [] = attributes\n\n // Step 1: Extract brackets [attr] or [attr=value]\n let bracketContent = null;\n let withoutBrackets = part;\n\n const bracketMatch = part.match(/^([^\\[]+)(\\[[^\\]]*\\])(.*)$/);\n if (bracketMatch) {\n withoutBrackets = bracketMatch[1] + bracketMatch[3];\n if (bracketMatch[2]) {\n const content = bracketMatch[2].slice(1, -1);\n if (content) {\n bracketContent = content;\n }\n }\n }\n\n // Step 2: Check for namespace (double colon ::)\n let namespace = undefined;\n let tagAndPosition = withoutBrackets;\n\n if (withoutBrackets.includes('::')) {\n const nsIndex = withoutBrackets.indexOf('::');\n namespace = withoutBrackets.substring(0, nsIndex).trim();\n tagAndPosition = withoutBrackets.substring(nsIndex + 2).trim(); // Skip ::\n\n if (!namespace) {\n throw new Error(`Invalid namespace in pattern: ${part}`);\n }\n }\n\n // Step 3: Parse tag and position (single colon :)\n let tag = undefined;\n let positionMatch = null;\n\n if (tagAndPosition.includes(':')) {\n const colonIndex = tagAndPosition.lastIndexOf(':'); // Use last colon for position\n const tagPart = tagAndPosition.substring(0, colonIndex).trim();\n const posPart = tagAndPosition.substring(colonIndex + 1).trim();\n\n // Verify position is a valid keyword\n const isPositionKeyword = ['first', 'last', 'odd', 'even'].includes(posPart) ||\n /^nth\\(\\d+\\)$/.test(posPart);\n\n if (isPositionKeyword) {\n tag = tagPart;\n positionMatch = posPart;\n } else {\n // Not a valid position keyword, treat whole thing as tag\n tag = tagAndPosition;\n }\n } else {\n tag = tagAndPosition;\n }\n\n if (!tag) {\n throw new Error(`Invalid segment pattern: ${part}`);\n }\n\n segment.tag = tag;\n if (namespace) {\n segment.namespace = namespace;\n }\n\n // Step 4: Parse attributes\n if (bracketContent) {\n if (bracketContent.includes('=')) {\n const eqIndex = bracketContent.indexOf('=');\n segment.attrName = bracketContent.substring(0, eqIndex).trim();\n segment.attrValue = bracketContent.substring(eqIndex + 1).trim();\n } else {\n segment.attrName = bracketContent.trim();\n }\n }\n\n // Step 5: Parse position selector\n if (positionMatch) {\n const nthMatch = positionMatch.match(/^nth\\((\\d+)\\)$/);\n if (nthMatch) {\n segment.position = 'nth';\n segment.positionValue = parseInt(nthMatch[1], 10);\n } else {\n segment.position = positionMatch;\n }\n }\n\n return segment;\n }\n\n /**\n * Get the number of segments\n * @returns {number}\n */\n get length() {\n return this.segments.length;\n }\n\n /**\n * Check if expression contains deep wildcard\n * @returns {boolean}\n */\n hasDeepWildcard() {\n return this._hasDeepWildcard;\n }\n\n /**\n * Check if expression has attribute conditions\n * @returns {boolean}\n */\n hasAttributeCondition() {\n return this._hasAttributeCondition;\n }\n\n /**\n * Check if expression has position selectors\n * @returns {boolean}\n */\n hasPositionSelector() {\n return this._hasPositionSelector;\n }\n\n /**\n * Get string representation\n * @returns {string}\n */\n toString() {\n return this.pattern;\n }\n}","/**\n * ExpressionSet - An indexed collection of Expressions for efficient bulk matching\n *\n * Instead of iterating all expressions on every tag, ExpressionSet pre-indexes\n * them at insertion time by depth and terminal tag name. At match time, only\n * the relevant bucket is evaluated — typically reducing checks from O(E) to O(1)\n * lookup plus O(small bucket) matches.\n *\n * Three buckets are maintained:\n * - `_byDepthAndTag` — exact depth + exact tag name (tightest, used first)\n * - `_wildcardByDepth` — exact depth + wildcard tag `*` (depth-matched only)\n * - `_deepWildcards` — expressions containing `..` (cannot be depth-indexed)\n *\n * @example\n * import { Expression, ExpressionSet } from 'fast-xml-tagger';\n *\n * // Build once at config time\n * const stopNodes = new ExpressionSet();\n * stopNodes.add(new Expression('root.users.user'));\n * stopNodes.add(new Expression('root.config.setting'));\n * stopNodes.add(new Expression('..script'));\n *\n * // Query on every tag — hot path\n * if (stopNodes.matchesAny(matcher)) { ... }\n */\nexport default class ExpressionSet {\n constructor() {\n /** @type {Map<string, import('./Expression.js').default[]>} depth:tag → expressions */\n this._byDepthAndTag = new Map();\n\n /** @type {Map<number, import('./Expression.js').default[]>} depth → wildcard-tag expressions */\n this._wildcardByDepth = new Map();\n\n /** @type {import('./Expression.js').default[]} expressions containing deep wildcard (..) */\n this._deepWildcards = [];\n\n /** @type {Set<string>} pattern strings already added — used for deduplication */\n this._patterns = new Set();\n\n /** @type {boolean} whether the set is sealed against further additions */\n this._sealed = false;\n }\n\n /**\n * Add an Expression to the set.\n * Duplicate patterns (same pattern string) are silently ignored.\n *\n * @param {import('./Expression.js').default} expression - A pre-constructed Expression instance\n * @returns {this} for chaining\n * @throws {TypeError} if called after seal()\n *\n * @example\n * set.add(new Expression('root.users.user'));\n * set.add(new Expression('..script'));\n */\n add(expression) {\n if (this._sealed) {\n throw new TypeError(\n 'ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.'\n );\n }\n\n // Deduplicate by pattern string\n if (this._patterns.has(expression.pattern)) return this;\n this._patterns.add(expression.pattern);\n\n if (expression.hasDeepWildcard()) {\n this._deepWildcards.push(expression);\n return this;\n }\n\n const depth = expression.length;\n const lastSeg = expression.segments[expression.segments.length - 1];\n const tag = lastSeg?.tag;\n\n if (!tag || tag === '*') {\n // Can index by depth but not by tag\n if (!this._wildcardByDepth.has(depth)) this._wildcardByDepth.set(depth, []);\n this._wildcardByDepth.get(depth).push(expression);\n } else {\n // Tightest bucket: depth + tag\n const key = `${depth}:${tag}`;\n if (!this._byDepthAndTag.has(key)) this._byDepthAndTag.set(key, []);\n this._byDepthAndTag.get(key).push(expression);\n }\n\n return this;\n }\n\n /**\n * Add multiple expressions at once.\n *\n * @param {import('./Expression.js').default[]} expressions - Array of Expression instances\n * @returns {this} for chaining\n *\n * @example\n * set.addAll([\n * new Expression('root.users.user'),\n * new Expression('root.config.setting'),\n * ]);\n */\n addAll(expressions) {\n for (const expr of expressions) this.add(expr);\n return this;\n }\n\n /**\n * Check whether a pattern string is already present in the set.\n *\n * @param {import('./Expression.js').default} expression\n * @returns {boolean}\n */\n has(expression) {\n return this._patterns.has(expression.pattern);\n }\n\n /**\n * Number of expressions in the set.\n * @type {number}\n */\n get size() {\n return this._patterns.size;\n }\n\n /**\n * Seal the set against further modifications.\n * Useful to prevent accidental mutations after config is built.\n * Calling add() or addAll() on a sealed set throws a TypeError.\n *\n * @returns {this}\n */\n seal() {\n this._sealed = true;\n return this;\n }\n\n /**\n * Whether the set has been sealed.\n * @type {boolean}\n */\n get isSealed() {\n return this._sealed;\n }\n\n /**\n * Test whether the matcher's current path matches any expression in the set.\n *\n * Evaluation order (cheapest → most expensive):\n * 1. Exact depth + tag bucket — O(1) lookup, typically 0–2 expressions\n * 2. Depth-only wildcard bucket — O(1) lookup, rare\n * 3. Deep-wildcard list — always checked, but usually small\n *\n * @param {import('./Matcher.js').default} matcher - Matcher instance (or readOnly view)\n * @returns {boolean} true if any expression matches the current path\n *\n * @example\n * if (stopNodes.matchesAny(matcher)) {\n * // handle stop node\n * }\n */\n matchesAny(matcher) {\n return this.findMatch(matcher) !== null;\n }\n /**\n * Find and return the first Expression that matches the matcher's current path.\n *\n * Uses the same evaluation order as matchesAny (cheapest → most expensive):\n * 1. Exact depth + tag bucket\n * 2. Depth-only wildcard bucket\n * 3. Deep-wildcard list\n *\n * @param {import('./Matcher.js').default} matcher - Matcher instance (or readOnly view)\n * @returns {import('./Expression.js').default | null} the first matching Expression, or null\n *\n * @example\n * const expr = stopNodes.findMatch(matcher);\n * if (expr) {\n * // access expr.config, expr.pattern, etc.\n * }\n */\n findMatch(matcher) {\n const depth = matcher.getDepth();\n const tag = matcher.getCurrentTag();\n\n // 1. Tightest bucket — most expressions live here\n const exactKey = `${depth}:${tag}`;\n const exactBucket = this._byDepthAndTag.get(exactKey);\n if (exactBucket) {\n for (let i = 0; i < exactBucket.length; i++) {\n if (matcher.matches(exactBucket[i])) return exactBucket[i];\n }\n }\n\n // 2. Depth-matched wildcard-tag expressions\n const wildcardBucket = this._wildcardByDepth.get(depth);\n if (wildcardBucket) {\n for (let i = 0; i < wildcardBucket.length; i++) {\n if (matcher.matches(wildcardBucket[i])) return wildcardBucket[i];\n }\n }\n\n // 3. Deep wildcards — cannot be pre-filtered by depth or tag\n for (let i = 0; i < this._deepWildcards.length; i++) {\n if (matcher.matches(this._deepWildcards[i])) return this._deepWildcards[i];\n }\n\n return null;\n }\n}\n","import ExpressionSet from \"./ExpressionSet.js\";\n\n/**\n * MatcherView - A lightweight read-only view over a Matcher's internal state.\n *\n * Created once by Matcher and reused across all callbacks. Holds a direct\n * reference to the parent Matcher so it always reflects current parser state\n * with zero copying or freezing overhead.\n *\n * Users receive this via {@link Matcher#readOnly} or directly from parser\n * callbacks. It exposes all query and matching methods but has no mutation\n * methods — misuse is caught at the TypeScript level rather than at runtime.\n *\n * @example\n * const matcher = new Matcher();\n * const view = matcher.readOnly();\n *\n * matcher.push(\"root\", {});\n * view.getCurrentTag(); // \"root\"\n * view.getDepth(); // 1\n */\nexport class MatcherView {\n /**\n * @param {Matcher} matcher - The parent Matcher instance to read from.\n */\n constructor(matcher) {\n this._matcher = matcher;\n }\n\n /**\n * Get the path separator used by the parent matcher.\n * @returns {string}\n */\n get separator() {\n return this._matcher.separator;\n }\n\n /**\n * Get current tag name.\n * @returns {string|undefined}\n */\n getCurrentTag() {\n const path = this._matcher.path;\n return path.length > 0 ? path[path.length - 1].tag : undefined;\n }\n\n /**\n * Get current namespace.\n * @returns {string|undefined}\n */\n getCurrentNamespace() {\n const path = this._matcher.path;\n return path.length > 0 ? path[path.length - 1].namespace : undefined;\n }\n\n /**\n * Get current node's attribute value.\n * @param {string} attrName\n * @returns {*}\n */\n getAttrValue(attrName) {\n const path = this._matcher.path;\n if (path.length === 0) return undefined;\n return path[path.length - 1].values?.[attrName];\n }\n\n /**\n * Check if current node has an attribute.\n * @param {string} attrName\n * @returns {boolean}\n */\n hasAttr(attrName) {\n const path = this._matcher.path;\n if (path.length === 0) return false;\n const current = path[path.length - 1];\n return current.values !== undefined && attrName in current.values;\n }\n\n /**\n * Get current node's sibling position (child index in parent).\n * @returns {number}\n */\n getPosition() {\n const path = this._matcher.path;\n if (path.length === 0) return -1;\n return path[path.length - 1].position ?? 0;\n }\n\n /**\n * Get current node's repeat counter (occurrence count of this tag name).\n * @returns {number}\n */\n getCounter() {\n const path = this._matcher.path;\n if (path.length === 0) return -1;\n return path[path.length - 1].counter ?? 0;\n }\n\n /**\n * Get current node's sibling index (alias for getPosition).\n * @returns {number}\n * @deprecated Use getPosition() or getCounter() instead\n */\n getIndex() {\n return this.getPosition();\n }\n\n /**\n * Get current path depth.\n * @returns {number}\n */\n getDepth() {\n return this._matcher.path.length;\n }\n\n /**\n * Get path as string.\n * @param {string} [separator] - Optional separator (uses default if not provided)\n * @param {boolean} [includeNamespace=true]\n * @returns {string}\n */\n toString(separator, includeNamespace = true) {\n return this._matcher.toString(separator, includeNamespace);\n }\n\n /**\n * Get path as array of tag names.\n * @returns {string[]}\n */\n toArray() {\n return this._matcher.path.map(n => n.tag);\n }\n\n /**\n * Match current path against an Expression.\n * @param {Expression} expression\n * @returns {boolean}\n */\n matches(expression) {\n return this._matcher.matches(expression);\n }\n\n /**\n * Match any expression in the given set against the current path.\n * @param {ExpressionSet} exprSet\n * @returns {boolean}\n */\n matchesAny(exprSet) {\n return exprSet.matchesAny(this._matcher);\n }\n}\n\n/**\n * Matcher - Tracks current path in XML/JSON tree and matches against Expressions.\n *\n * The matcher maintains a stack of nodes representing the current path from root to\n * current tag. It only stores attribute values for the current (top) node to minimize\n * memory usage. Sibling tracking is used to auto-calculate position and counter.\n *\n * Use {@link Matcher#readOnly} to obtain a {@link MatcherView} safe to pass to\n * user callbacks — it always reflects current state with no Proxy overhead.\n *\n * @example\n * const matcher = new Matcher();\n * matcher.push(\"root\", {});\n * matcher.push(\"users\", {});\n * matcher.push(\"user\", { id: \"123\", type: \"admin\" });\n *\n * const expr = new Expression(\"root.users.user\");\n * matcher.matches(expr); // true\n */\nexport default class Matcher {\n /**\n * Create a new Matcher.\n * @param {Object} [options={}]\n * @param {string} [options.separator='.'] - Default path separator\n */\n constructor(options = {}) {\n this.separator = options.separator || '.';\n this.path = [];\n this.siblingStacks = [];\n // Each path node: { tag, values, position, counter, namespace? }\n // values only present for current (last) node\n // Each siblingStacks entry: Map<tagName, count> tracking occurrences at each level\n this._pathStringCache = null;\n this._view = new MatcherView(this);\n }\n\n /**\n * Push a new tag onto the path.\n * @param {string} tagName\n * @param {Object|null} [attrValues=null]\n * @param {string|null} [namespace=null]\n */\n push(tagName, attrValues = null, namespace = null) {\n this._pathStringCache = null;\n\n // Remove values from previous current node (now becoming ancestor)\n if (this.path.length > 0) {\n this.path[this.path.length - 1].values = undefined;\n }\n\n // Get or create sibling tracking for current level\n const currentLevel = this.path.length;\n if (!this.siblingStacks[currentLevel]) {\n this.siblingStacks[currentLevel] = new Map();\n }\n\n const siblings = this.siblingStacks[currentLevel];\n\n // Create a unique key for sibling tracking that includes namespace\n const siblingKey = namespace ? `${namespace}:${tagName}` : tagName;\n\n // Calculate counter (how many times this tag appeared at this level)\n const counter = siblings.get(siblingKey) || 0;\n\n // Calculate position (total children at this level so far)\n let position = 0;\n for (const count of siblings.values()) {\n position += count;\n }\n\n // Update sibling count for this tag\n siblings.set(siblingKey, counter + 1);\n\n // Create new node\n const node = {\n tag: tagName,\n position: position,\n counter: counter\n };\n\n if (namespace !== null && namespace !== undefined) {\n node.namespace = namespace;\n }\n\n if (attrValues !== null && attrValues !== undefined) {\n node.values = attrValues;\n }\n\n this.path.push(node);\n }\n\n /**\n * Pop the last tag from the path.\n * @returns {Object|undefined} The popped node\n */\n pop() {\n if (this.path.length === 0) return undefined;\n this._pathStringCache = null;\n\n const node = this.path.pop();\n\n if (this.siblingStacks.length > this.path.length + 1) {\n this.siblingStacks.length = this.path.length + 1;\n }\n\n return node;\n }\n\n /**\n * Update current node's attribute values.\n * Useful when attributes are parsed after push.\n * @param {Object} attrValues\n */\n updateCurrent(attrValues) {\n if (this.path.length > 0) {\n const current = this.path[this.path.length - 1];\n if (attrValues !== null && attrValues !== undefined) {\n current.values = attrValues;\n }\n }\n }\n\n /**\n * Get current tag name.\n * @returns {string|undefined}\n */\n getCurrentTag() {\n return this.path.length > 0 ? this.path[this.path.length - 1].tag : undefined;\n }\n\n /**\n * Get current namespace.\n * @returns {string|undefined}\n */\n getCurrentNamespace() {\n return this.path.length > 0 ? this.path[this.path.length - 1].namespace : undefined;\n }\n\n /**\n * Get current node's attribute value.\n * @param {string} attrName\n * @returns {*}\n */\n getAttrValue(attrName) {\n if (this.path.length === 0) return undefined;\n return this.path[this.path.length - 1].values?.[attrName];\n }\n\n /**\n * Check if current node has an attribute.\n * @param {string} attrName\n * @returns {boolean}\n */\n hasAttr(attrName) {\n if (this.path.length === 0) return false;\n const current = this.path[this.path.length - 1];\n return current.values !== undefined && attrName in current.values;\n }\n\n /**\n * Get current node's sibling position (child index in parent).\n * @returns {number}\n */\n getPosition() {\n if (this.path.length === 0) return -1;\n return this.path[this.path.length - 1].position ?? 0;\n }\n\n /**\n * Get current node's repeat counter (occurrence count of this tag name).\n * @returns {number}\n */\n getCounter() {\n if (this.path.length === 0) return -1;\n return this.path[this.path.length - 1].counter ?? 0;\n }\n\n /**\n * Get current node's sibling index (alias for getPosition).\n * @returns {number}\n * @deprecated Use getPosition() or getCounter() instead\n */\n getIndex() {\n return this.getPosition();\n }\n\n /**\n * Get current path depth.\n * @returns {number}\n */\n getDepth() {\n return this.path.length;\n }\n\n /**\n * Get path as string.\n * @param {string} [separator] - Optional separator (uses default if not provided)\n * @param {boolean} [includeNamespace=true]\n * @returns {string}\n */\n toString(separator, includeNamespace = true) {\n const sep = separator || this.separator;\n const isDefault = (sep === this.separator && includeNamespace === true);\n\n if (isDefault) {\n if (this._pathStringCache !== null) {\n return this._pathStringCache;\n }\n const result = this.path.map(n =>\n (n.namespace) ? `${n.namespace}:${n.tag}` : n.tag\n ).join(sep);\n this._pathStringCache = result;\n return result;\n }\n\n return this.path.map(n =>\n (includeNamespace && n.namespace) ? `${n.namespace}:${n.tag}` : n.tag\n ).join(sep);\n }\n\n /**\n * Get path as array of tag names.\n * @returns {string[]}\n */\n toArray() {\n return this.path.map(n => n.tag);\n }\n\n /**\n * Reset the path to empty.\n */\n reset() {\n this._pathStringCache = null;\n this.path = [];\n this.siblingStacks = [];\n }\n\n /**\n * Match current path against an Expression.\n * @param {Expression} expression\n * @returns {boolean}\n */\n matches(expression) {\n const segments = expression.segments;\n\n if (segments.length === 0) {\n return false;\n }\n\n if (expression.hasDeepWildcard()) {\n return this._matchWithDeepWildcard(segments);\n }\n\n return this._matchSimple(segments);\n }\n\n /**\n * @private\n */\n _matchSimple(segments) {\n if (this.path.length !== segments.length) {\n return false;\n }\n\n for (let i = 0; i < segments.length; i++) {\n if (!this._matchSegment(segments[i], this.path[i], i === this.path.length - 1)) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * @private\n */\n _matchWithDeepWildcard(segments) {\n let pathIdx = this.path.length - 1;\n let segIdx = segments.length - 1;\n\n while (segIdx >= 0 && pathIdx >= 0) {\n const segment = segments[segIdx];\n\n if (segment.type === 'deep-wildcard') {\n segIdx--;\n\n if (segIdx < 0) {\n return true;\n }\n\n const nextSeg = segments[segIdx];\n let found = false;\n\n for (let i = pathIdx; i >= 0; i--) {\n if (this._matchSegment(nextSeg, this.path[i], i === this.path.length - 1)) {\n pathIdx = i - 1;\n segIdx--;\n found = true;\n break;\n }\n }\n\n if (!found) {\n return false;\n }\n } else {\n if (!this._matchSegment(segment, this.path[pathIdx], pathIdx === this.path.length - 1)) {\n return false;\n }\n pathIdx--;\n segIdx--;\n }\n }\n\n return segIdx < 0;\n }\n\n /**\n * @private\n */\n _matchSegment(segment, node, isCurrentNode) {\n if (segment.tag !== '*' && segment.tag !== node.tag) {\n return false;\n }\n\n if (segment.namespace !== undefined) {\n if (segment.namespace !== '*' && segment.namespace !== node.namespace) {\n return false;\n }\n }\n\n if (segment.attrName !== undefined) {\n if (!isCurrentNode) {\n return false;\n }\n\n if (!node.values || !(segment.attrName in node.values)) {\n return false;\n }\n\n if (segment.attrValue !== undefined) {\n if (String(node.values[segment.attrName]) !== String(segment.attrValue)) {\n return false;\n }\n }\n }\n\n if (segment.position !== undefined) {\n if (!isCurrentNode) {\n return false;\n }\n\n const counter = node.counter ?? 0;\n\n if (segment.position === 'first' && counter !== 0) {\n return false;\n } else if (segment.position === 'odd' && counter % 2 !== 1) {\n return false;\n } else if (segment.position === 'even' && counter % 2 !== 0) {\n return false;\n } else if (segment.position === 'nth' && counter !== segment.positionValue) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Match any expression in the given set against the current path.\n * @param {ExpressionSet} exprSet\n * @returns {boolean}\n */\n matchesAny(exprSet) {\n return exprSet.matchesAny(this);\n }\n\n /**\n * Create a snapshot of current state.\n * @returns {Object}\n */\n snapshot() {\n return {\n path: this.path.map(node => ({ ...node })),\n siblingStacks: this.siblingStacks.map(map => new Map(map))\n };\n }\n\n /**\n * Restore state from snapshot.\n * @param {Object} snapshot\n */\n restore(snapshot) {\n this._pathStringCache = null;\n this.path = snapshot.path.map(node => ({ ...node }));\n this.siblingStacks = snapshot.siblingStacks.map(map => new Map(map));\n }\n\n /**\n * Return the read-only {@link MatcherView} for this matcher.\n *\n * The same instance is returned on every call — no allocation occurs.\n * It always reflects the current parser state and is safe to pass to\n * user callbacks without risk of accidental mutation.\n *\n * @returns {MatcherView}\n *\n * @example\n * const view = matcher.readOnly();\n * // pass view to callbacks — it stays in sync automatically\n * view.matches(expr); // ✓\n * view.getCurrentTag(); // ✓\n * // view.push(...) // ✗ method does not exist — caught by TypeScript\n */\n readOnly() {\n return this._view;\n }\n}","'use strict';\n///@ts-check\n\nimport { getAllMatches, isExist, DANGEROUS_PROPERTY_NAMES, criticalProperties } from '../util.js';\nimport xmlNode from './xmlNode.js';\nimport DocTypeReader from './DocTypeReader.js';\nimport toNumber from \"strnum\";\nimport getIgnoreAttributesFn from \"../ignoreAttributes.js\";\nimport { Expression, Matcher } from 'path-expression-matcher';\nimport { ExpressionSet } from 'path-expression-matcher';\nimport { EntityDecoder, XML, CURRENCY, COMMON_HTML } from '@nodable/entities';\n\n// const regx =\n// '<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)'\n// .replace(/NAME/g, util.nameRegexp);\n\n//const tagsRegx = new RegExp(\"<(\\\\/?[\\\\w:\\\\-\\._]+)([^>]*)>(\\\\s*\"+cdataRegx+\")*([^<]+)?\",\"g\");\n//const tagsRegx = new RegExp(\"<(\\\\/?)((\\\\w*:)?([\\\\w:\\\\-\\._]+))([^>]*)>([^<]*)(\"+cdataRegx+\"([^<]*))*([^<]+)?\",\"g\");\n\n// Helper functions for attribute and namespace handling\n\n/**\n * Extract raw attributes (without prefix) from prefixed attribute map\n * @param {object} prefixedAttrs - Attributes with prefix from buildAttributesMap\n * @param {object} options - Parser options containing attributeNamePrefix\n * @returns {object} Raw attributes for matcher\n */\nfunction extractRawAttributes(prefixedAttrs, options) {\n if (!prefixedAttrs) return {};\n\n // Handle attributesGroupName option\n const attrs = options.attributesGroupName\n ? prefixedAttrs[options.attributesGroupName]\n : prefixedAttrs;\n\n if (!attrs) return {};\n\n const rawAttrs = {};\n for (const key in attrs) {\n // Remove the attribute prefix to get raw name\n if (key.startsWith(options.attributeNamePrefix)) {\n const rawName = key.substring(options.attributeNamePrefix.length);\n rawAttrs[rawName] = attrs[key];\n } else {\n // Attribute without prefix (shouldn't normally happen, but be safe)\n rawAttrs[key] = attrs[key];\n }\n }\n return rawAttrs;\n}\n\n/**\n * Extract namespace from raw tag name\n * @param {string} rawTagName - Tag name possibly with namespace (e.g., \"soap:Envelope\")\n * @returns {string|undefined} Namespace or undefined\n */\nfunction extractNamespace(rawTagName) {\n if (!rawTagName || typeof rawTagName !== 'string') return undefined;\n\n const colonIndex = rawTagName.indexOf(':');\n if (colonIndex !== -1 && colonIndex > 0) {\n const ns = rawTagName.substring(0, colonIndex);\n // Don't treat xmlns as a namespace\n if (ns !== 'xmlns') {\n return ns;\n }\n }\n return undefined;\n}\n\nexport default class OrderedObjParser {\n constructor(options, externalEntities) {\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)\n this.entityExpansionCount = 0;\n this.currentExpandedLength = 0;\n let namedEntities = { ...XML };\n if (this.options.entityDecoder) {\n this.entityDecoder = this.options.entityDecoder\n } else {\n if (typeof this.options.htmlEntities === \"object\") namedEntities = this.options.htmlEntities;\n else if (this.options.htmlEntities === true) namedEntities = { ...COMMON_HTML, ...CURRENCY };\n this.entityDecoder = new EntityDecoder({\n namedEntities: { ...namedEntities, ...externalEntities },\n numericAllowed: this.options.htmlEntities,\n limit: {\n maxTotalExpansions: this.options.processEntities.maxTotalExpansions,\n maxExpandedLength: this.options.processEntities.maxExpandedLength,\n applyLimitsTo: this.options.processEntities.appliesTo,\n }\n //postCheck: resolved => resolved\n });\n }\n\n // Initialize path matcher for path-expression-matcher\n this.matcher = new Matcher();\n\n // Live read-only proxy of matcher — PEM creates and caches this internally.\n // All user callbacks receive this instead of the mutable matcher.\n this.readonlyMatcher = this.matcher.readOnly();\n\n // Flag to track if current node is a stop node (optimization)\n this.isCurrentNodeStopNode = false;\n\n // Pre-compile stopNodes expressions\n this.stopNodeExpressionsSet = new ExpressionSet();\n const stopNodesOpts = this.options.stopNodes;\n if (stopNodesOpts && stopNodesOpts.length > 0) {\n for (let i = 0; i < stopNodesOpts.length; i++) {\n const stopNodeExp = stopNodesOpts[i];\n if (typeof stopNodeExp === 'string') {\n // Convert string to Expression object\n this.stopNodeExpressionsSet.add(new Expression(stopNodeExp));\n } else if (stopNodeExp instanceof Expression) {\n // Already an Expression object\n this.stopNodeExpressionsSet.add(stopNodeExp);\n }\n }\n this.stopNodeExpressionsSet.seal();\n }\n }\n\n}\n\n\n/**\n * @param {string} val\n * @param {string} tagName\n * @param {string|Matcher} jPath - jPath string or Matcher instance based on options.jPath\n * @param {boolean} dontTrim\n * @param {boolean} hasAttributes\n * @param {boolean} isLeafNode\n * @param {boolean} escapeEntities\n */\nfunction parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n const options = this.options;\n if (val !== undefined) {\n if (options.trimValues && !dontTrim) {\n val = val.trim();\n }\n if (val.length > 0) {\n if (!escapeEntities) val = this.replaceEntitiesValue(val, tagName, jPath);\n\n // Pass jPath string or matcher based on options.jPath setting\n const jPathOrMatcher = options.jPath ? jPath.toString() : jPath;\n const newval = options.tagValueProcessor(tagName, val, jPathOrMatcher, hasAttributes, isLeafNode);\n if (newval === null || newval === undefined) {\n //don't parse\n return val;\n } else if (typeof newval !== typeof val || newval !== val) {\n //overwrite\n return newval;\n } else if (options.trimValues) {\n return parseValue(val, options.parseTagValue, options.numberParseOptions);\n } else {\n const trimmedVal = val.trim();\n if (trimmedVal === val) {\n return parseValue(val, options.parseTagValue, options.numberParseOptions);\n } else {\n return val;\n }\n }\n }\n }\n}\n\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(':');\n const prefix = tagname.charAt(0) === '/' ? '/' : '';\n if (tags[0] === 'xmlns') {\n return '';\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\n\n//TODO: change regex to capture NS\n//const attrsRegx = new RegExp(\"([\\\\w\\\\-\\\\.\\\\:]+)\\\\s*=\\\\s*(['\\\"])((.|\\n)*?)\\\\2\",\"gm\");\nconst attrsRegx = new RegExp('([^\\\\s=]+)\\\\s*(=\\\\s*([\\'\"])([\\\\s\\\\S]*?)\\\\3)?', 'gm');\n\nfunction buildAttributesMap(attrStr, jPath, tagName, force = false) {\n const options = this.options;\n if (force === true || (options.ignoreAttributes !== true && typeof attrStr === 'string')) {\n // attrStr = attrStr.replace(/\\r?\\n/g, ' ');\n //attrStr = attrStr || attrStr.trim();\n\n const matches = getAllMatches(attrStr, attrsRegx);\n const len = matches.length; //don't make it inline\n const attrs = {};\n\n // Pre-process values once: trim + entity replacement\n // Reused in both matcher update and second pass\n const processedVals = new Array(len);\n let hasRawAttrs = false;\n const rawAttrsForMatcher = {};\n\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n const oldVal = matches[i][4];\n\n if (attrName.length && oldVal !== undefined) {\n let val = oldVal;\n if (options.trimValues) val = val.trim();\n val = this.replaceEntitiesValue(val, tagName, this.readonlyMatcher);\n processedVals[i] = val;\n\n rawAttrsForMatcher[attrName] = val;\n hasRawAttrs = true;\n }\n }\n\n // Update matcher ONCE before second pass, if applicable\n if (hasRawAttrs && typeof jPath === 'object' && jPath.updateCurrent) {\n jPath.updateCurrent(rawAttrsForMatcher);\n }\n\n // Hoist toString() once — path doesn't change during attribute processing\n const jPathStr = options.jPath ? jPath.toString() : this.readonlyMatcher;\n\n // Second pass: apply processors, build final attrs\n let hasAttrs = false;\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n\n if (this.ignoreAttributesFn(attrName, jPathStr)) continue;\n\n let aName = options.attributeNamePrefix + attrName;\n\n if (attrName.length) {\n if (options.transformAttributeName) {\n aName = options.transformAttributeName(aName);\n }\n aName = sanitizeName(aName, options);\n\n if (matches[i][4] !== undefined) {\n // Reuse already-processed value — no double entity replacement\n const oldVal = processedVals[i];\n\n const newVal = options.attributeValueProcessor(attrName, oldVal, jPathStr);\n if (newVal === null || newVal === undefined) {\n attrs[aName] = oldVal;\n } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) {\n attrs[aName] = newVal;\n } else {\n attrs[aName] = parseValue(oldVal, options.parseAttributeValue, options.numberParseOptions);\n }\n hasAttrs = true;\n } else if (options.allowBooleanAttributes) {\n attrs[aName] = true;\n hasAttrs = true;\n }\n }\n }\n\n if (!hasAttrs) return;\n\n if (options.attributesGroupName && !options.preserveOrder) {\n const attrCollection = {};\n attrCollection[options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\nconst parseXml = function (xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\"); //TODO: remove this line\n const xmlObj = new xmlNode('!xml');\n let currentNode = xmlObj;\n let textData = \"\";\n\n // Reset matcher for new document\n this.matcher.reset();\n this.entityDecoder.reset();\n\n // Reset entity expansion counters for this document\n this.entityExpansionCount = 0;\n this.currentExpandedLength = 0;\n const options = this.options;\n const docTypeReader = new DocTypeReader(options.processEntities);\n const xmlLen = xmlData.length;\n for (let i = 0; i < xmlLen; i++) {//for each char in XML data\n const ch = xmlData[i];\n if (ch === '<') {\n // const nextIndex = i+1;\n // const _2ndChar = xmlData[nextIndex];\n const c1 = xmlData.charCodeAt(i + 1);\n if (c1 === 47) {//Closing Tag '/'\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\")\n let tagName = xmlData.substring(i + 2, closeIndex).trim();\n\n if (options.removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n }\n }\n\n tagName = transformTagName(options.transformTagName, tagName, \"\", options).tagName;\n\n if (currentNode) {\n textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);\n }\n\n //check if last tag of nested tag was unpaired tag\n const lastTagName = this.matcher.getCurrentTag();\n if (tagName && options.unpairedTagsSet.has(tagName)) {\n throw new Error(`Unpaired tag can not be used as closing tag: </${tagName}>`);\n }\n if (lastTagName && options.unpairedTagsSet.has(lastTagName)) {\n // Pop the unpaired tag\n this.matcher.pop();\n this.tagsNodeStack.pop();\n }\n // Pop the closing tag\n this.matcher.pop();\n this.isCurrentNodeStopNode = false; // Reset flag when closing tag\n\n currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope\n textData = \"\";\n i = closeIndex;\n } else if (c1 === 63) { //'?'\n\n let tagData = readTagExp(xmlData, i, false, \"?>\");\n if (!tagData) throw new Error(\"Pi Tag is not closed.\");\n\n textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);\n const attsMap = this.buildAttributesMap(tagData.tagExp, this.matcher, tagData.tagName, true);\n if (attsMap) {\n const ver = attsMap[this.options.attributeNamePrefix + \"version\"];\n this.entityDecoder.setXmlVersion(Number(ver) || 1.0);\n }\n if ((options.ignoreDeclaration && tagData.tagName === \"?xml\") || options.ignorePiTags) {\n //do nothing\n } else {\n\n const childNode = new xmlNode(tagData.tagName);\n childNode.add(options.textNodeName, \"\");\n\n if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent && options.ignoreAttributes !== true) {\n childNode[\":@\"] = attsMap\n }\n this.addChild(currentNode, childNode, this.readonlyMatcher, i);\n }\n\n\n i = tagData.closeIndex + 1;\n } else if (c1 === 33\n && xmlData.charCodeAt(i + 2) === 45\n && xmlData.charCodeAt(i + 3) === 45) { //'!--'\n const endIndex = findClosingIndex(xmlData, \"-->\", i + 4, \"Comment is not closed.\")\n if (options.commentPropName) {\n const comment = xmlData.substring(i + 4, endIndex - 2);\n\n textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);\n\n currentNode.add(options.commentPropName, [{ [options.textNodeName]: comment }]);\n }\n i = endIndex;\n } else if (c1 === 33\n && xmlData.charCodeAt(i + 2) === 68) { //'!D'\n const result = docTypeReader.readDocType(xmlData, i);\n this.entityDecoder.addInputEntities(result.entities);\n i = result.i;\n } else if (c1 === 33\n && xmlData.charCodeAt(i + 2) === 91) { // '!['\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9, closeIndex);\n\n textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);\n\n let val = this.parseTextData(tagExp, currentNode.tagname, this.readonlyMatcher, true, false, true, true);\n if (val == undefined) val = \"\";\n\n //cdata should be set even if it is 0 length string\n if (options.cdataPropName) {\n currentNode.add(options.cdataPropName, [{ [options.textNodeName]: tagExp }]);\n } else {\n currentNode.add(options.textNodeName, val);\n }\n\n i = closeIndex + 2;\n } else {//Opening tag\n let result = readTagExp(xmlData, i, options.removeNSPrefix);\n\n // Safety check: readTagExp can return undefined\n if (!result) {\n // Log context for debugging\n const context = xmlData.substring(Math.max(0, i - 50), Math.min(xmlLen, i + 50));\n throw new Error(`readTagExp returned undefined at position ${i}. Context: \"${context}\"`);\n }\n\n let tagName = result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n\n ({ tagName, tagExp } = transformTagName(options.transformTagName, tagName, tagExp, options));\n\n if (options.strictReservedNames &&\n (tagName === options.commentPropName\n || tagName === options.cdataPropName\n || tagName === options.textNodeName\n || tagName === options.attributesGroupName\n )) {\n throw new Error(`Invalid tag name: ${tagName}`);\n }\n\n //save text as child node\n if (currentNode && textData) {\n if (currentNode.tagname !== '!xml') {\n //when nested tag is found\n textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher, false);\n }\n }\n\n //check if last tag was unpaired tag\n const lastTag = currentNode;\n if (lastTag && options.unpairedTagsSet.has(lastTag.tagname)) {\n currentNode = this.tagsNodeStack.pop();\n this.matcher.pop();\n }\n\n // Clean up self-closing syntax BEFORE processing attributes\n // This is where tagExp gets the trailing / removed\n let isSelfClosing = false;\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n isSelfClosing = true;\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n\n // Re-check attrExpPresent after cleaning\n attrExpPresent = (tagName !== tagExp);\n }\n\n // Now process attributes with CLEAN tagExp (no trailing /)\n let prefixedAttrs = null;\n let rawAttrs = {};\n let namespace = undefined;\n\n // Extract namespace from rawTagName\n namespace = extractNamespace(rawTagName);\n\n // Push tag to matcher FIRST (with empty attrs for now) so callbacks see correct path\n if (tagName !== xmlObj.tagname) {\n this.matcher.push(tagName, {}, namespace);\n }\n\n // Now build attributes - callbacks will see correct matcher state\n if (tagName !== tagExp && attrExpPresent) {\n // Build attributes (returns prefixed attributes for the tree)\n // Note: buildAttributesMap now internally updates the matcher with raw attributes\n prefixedAttrs = this.buildAttributesMap(tagExp, this.matcher, tagName);\n\n if (prefixedAttrs) {\n // Extract raw attributes (without prefix) for our use\n //TODO: seems a performance overhead\n rawAttrs = extractRawAttributes(prefixedAttrs, options);\n }\n }\n\n // Now check if this is a stop node (after attributes are set)\n if (tagName !== xmlObj.tagname) {\n this.isCurrentNodeStopNode = this.isItStopNode();\n }\n\n const startIndex = i;\n if (this.isCurrentNodeStopNode) {\n let tagContent = \"\";\n\n // For self-closing tags, content is empty\n if (isSelfClosing) {\n i = result.closeIndex;\n }\n //unpaired tag\n else if (options.unpairedTagsSet.has(tagName)) {\n i = result.closeIndex;\n }\n //normal tag\n else {\n //read until closing tag is found\n const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if (!result) throw new Error(`Unexpected end of ${rawTagName}`);\n i = result.i;\n tagContent = result.tagContent;\n }\n\n const childNode = new xmlNode(tagName);\n\n if (prefixedAttrs) {\n childNode[\":@\"] = prefixedAttrs;\n }\n\n // For stop nodes, store raw content as-is without any processing\n childNode.add(options.textNodeName, tagContent);\n\n this.matcher.pop(); // Pop the stop node tag\n this.isCurrentNodeStopNode = false; // Reset flag\n\n this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);\n } else {\n //selfClosing tag\n if (isSelfClosing) {\n ({ tagName, tagExp } = transformTagName(options.transformTagName, tagName, tagExp, options));\n\n const childNode = new xmlNode(tagName);\n if (prefixedAttrs) {\n childNode[\":@\"] = prefixedAttrs;\n }\n this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);\n this.matcher.pop(); // Pop self-closing tag\n this.isCurrentNodeStopNode = false; // Reset flag\n }\n else if (options.unpairedTagsSet.has(tagName)) {//unpaired tag\n const childNode = new xmlNode(tagName);\n if (prefixedAttrs) {\n childNode[\":@\"] = prefixedAttrs;\n }\n this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);\n this.matcher.pop(); // Pop unpaired tag\n this.isCurrentNodeStopNode = false; // Reset flag\n i = result.closeIndex;\n // Continue to next iteration without changing currentNode\n continue;\n }\n //opening tag\n else {\n const childNode = new xmlNode(tagName);\n if (this.tagsNodeStack.length > options.maxNestedTags) {\n throw new Error(\"Maximum nested tags exceeded\");\n }\n this.tagsNodeStack.push(currentNode);\n\n if (prefixedAttrs) {\n childNode[\":@\"] = prefixedAttrs;\n }\n this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n } else {\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n}\n\nfunction addChild(currentNode, childNode, matcher, startIndex) {\n // unset startIndex if not requested\n if (!this.options.captureMetaData) startIndex = undefined;\n\n // Pass jPath string or matcher based on options.jPath setting\n const jPathOrMatcher = this.options.jPath ? matcher.toString() : matcher;\n const result = this.options.updateTag(childNode.tagname, jPathOrMatcher, childNode[\":@\"])\n if (result === false) {\n //do nothing\n } else if (typeof result === \"string\") {\n childNode.tagname = result\n currentNode.addChild(childNode, startIndex);\n } else {\n currentNode.addChild(childNode, startIndex);\n }\n}\n\n/**\n * @param {object} val - Entity object with regex and val properties\n * @param {string} tagName - Tag name\n * @param {string|Matcher} jPath - jPath string or Matcher instance based on options.jPath\n */\nfunction replaceEntitiesValue(val, tagName, jPath) {\n const entityConfig = this.options.processEntities;\n\n if (!entityConfig || !entityConfig.enabled) {\n return val;\n }\n\n // Check if tag is allowed to contain entities\n if (entityConfig.allowedTags) {\n const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;\n const allowed = Array.isArray(entityConfig.allowedTags)\n ? entityConfig.allowedTags.includes(tagName)\n : entityConfig.allowedTags(tagName, jPathOrMatcher);\n\n if (!allowed) {\n return val;\n }\n }\n\n // Apply custom tag filter if provided\n if (entityConfig.tagFilter) {\n const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;\n if (!entityConfig.tagFilter(tagName, jPathOrMatcher)) {\n return val; // Skip based on custom filter\n }\n }\n\n return this.entityDecoder.decode(val);\n}\n\n\nfunction saveTextToParentTag(textData, parentNode, matcher, isLeafNode) {\n if (textData) { //store previously collected data as textNode\n if (isLeafNode === undefined) isLeafNode = parentNode.child.length === 0\n\n textData = this.parseTextData(textData,\n parentNode.tagname,\n matcher,\n false,\n parentNode[\":@\"] ? Object.keys(parentNode[\":@\"]).length !== 0 : false,\n isLeafNode);\n\n if (textData !== undefined && textData !== \"\")\n parentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\n\n/**\n * @param {Array<Expression>} stopNodeExpressions - Array of compiled Expression objects\n * @param {Matcher} matcher - Current path matcher\n */\nfunction isItStopNode() {\n if (this.stopNodeExpressionsSet.size === 0) return false;\n\n return this.matcher.matchesAny(this.stopNodeExpressionsSet);\n}\n\n/**\n * Returns the tag Expression and where it is ending handling single-double quotes situation\n * @param {string} xmlData \n * @param {number} i starting index\n * @returns \n */\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\") {\n //TODO: ignore boolean attributes in tag expression\n //TODO: if ignore attributes, dont read full attribute expression but the end. But read for xml declaration\n let attrBoundary = 0;\n const len = xmlData.length;\n const closeCode0 = closingChar.charCodeAt(0);\n const closeCode1 = closingChar.length > 1 ? closingChar.charCodeAt(1) : -1;\n\n let result = '';\n let segmentStart = i;\n\n for (let index = i; index < len; index++) {\n const code = xmlData.charCodeAt(index);\n\n if (attrBoundary) {\n if (code === attrBoundary) attrBoundary = 0;\n } else if (code === 34 || code === 39) { // \" or '\n attrBoundary = code;\n } else if (code === closeCode0) {\n if (closeCode1 !== -1) {\n if (xmlData.charCodeAt(index + 1) === closeCode1) {\n result += xmlData.substring(segmentStart, index);\n return { data: result, index };\n }\n } else {\n result += xmlData.substring(segmentStart, index);\n return { data: result, index };\n }\n } else if (code === 9 && !attrBoundary) { // \\t - only replace with space outside attribute values\n // Flush accumulated segment, add space, start new segment\n result += xmlData.substring(segmentStart, index) + ' ';\n segmentStart = index + 1;\n }\n }\n}\n\nfunction findClosingIndex(xmlData, str, i, errMsg) {\n const closingIndex = xmlData.indexOf(str, i);\n if (closingIndex === -1) {\n throw new Error(errMsg)\n } else {\n return closingIndex + str.length - 1;\n }\n}\n\nfunction findClosingChar(xmlData, char, i, errMsg) {\n const closingIndex = xmlData.indexOf(char, i);\n if (closingIndex === -1) throw new Error(errMsg);\n return closingIndex; // no offset needed\n}\n\nfunction readTagExp(xmlData, i, removeNSPrefix, closingChar = \">\") {\n const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);\n if (!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if (separatorIndex !== -1) {//separate tag name and attributes expression\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n\n const rawTagName = tagName;\n if (removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n\n return {\n tagName: tagName,\n tagExp: tagExp,\n closeIndex: closeIndex,\n attrExpPresent: attrExpPresent,\n rawTagName: rawTagName,\n }\n}\n/**\n * find paired tag for a stop node\n * @param {string} xmlData \n * @param {string} tagName \n * @param {number} i \n */\nfunction readStopNodeData(xmlData, tagName, i) {\n const startIndex = i;\n // Starting at 1 since we already have an open tag\n let openTagCount = 1;\n\n const xmllen = xmlData.length;\n for (; i < xmllen; i++) {\n if (xmlData[i] === \"<\") {\n const c1 = xmlData.charCodeAt(i + 1);\n if (c1 === 47) {//close tag '/'\n const closeIndex = findClosingChar(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i + 2, closeIndex).trim();\n if (closeTagName === tagName) {\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i: closeIndex\n }\n }\n }\n i = closeIndex;\n } else if (c1 === 63) { //?\n const closeIndex = findClosingIndex(xmlData, \"?>\", i + 1, \"StopNode is not closed.\")\n i = closeIndex;\n } else if (c1 === 33\n && xmlData.charCodeAt(i + 2) === 45\n && xmlData.charCodeAt(i + 3) === 45) { // '!--'\n const closeIndex = findClosingIndex(xmlData, \"-->\", i + 3, \"StopNode is not closed.\")\n i = closeIndex;\n } else if (c1 === 33\n && xmlData.charCodeAt(i + 2) === 91) { // '!['\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i = closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, false)\n\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== \"/\") {\n openTagCount++;\n }\n i = tagData.closeIndex;\n }\n }\n }\n }//end for loop\n}\n\nfunction parseValue(val, shouldParse, options) {\n if (shouldParse && typeof val === 'string') {\n //console.log(options)\n const newval = val.trim();\n if (newval === 'true') return true;\n else if (newval === 'false') return false;\n else return toNumber(val, options);\n } else {\n if (isExist(val)) {\n return val;\n } else {\n return '';\n }\n }\n}\n\nfunction fromCodePoint(str, base, prefix) {\n const codePoint = Number.parseInt(str, base);\n\n if (codePoint >= 0 && codePoint <= 0x10FFFF) {\n return String.fromCodePoint(codePoint);\n } else {\n return prefix + str + \";\";\n }\n}\n\nfunction transformTagName(fn, tagName, tagExp, options) {\n if (fn) {\n const newTagName = fn(tagName);\n if (tagExp === tagName) {\n tagExp = newTagName\n }\n tagName = newTagName;\n }\n tagName = sanitizeName(tagName, options);\n return { tagName, tagExp };\n}\n\n\n\nfunction sanitizeName(name, options) {\n if (criticalProperties.includes(name)) {\n throw new Error(`[SECURITY] Invalid name: \"${name}\" is a reserved JavaScript keyword that could cause prototype pollution`);\n } else if (DANGEROUS_PROPERTY_NAMES.includes(name)) {\n return options.onDangerousProperty(name);\n }\n return name;\n}","'use strict';\n\nimport XmlNode from './xmlNode.js';\nimport { Matcher } from 'path-expression-matcher';\n\nconst METADATA_SYMBOL = XmlNode.getMetaDataSymbol();\n\n/**\n * Helper function to strip attribute prefix from attribute map\n * @param {object} attrs - Attributes with prefix (e.g., {\"@_class\": \"code\"})\n * @param {string} prefix - Attribute prefix to remove (e.g., \"@_\")\n * @returns {object} Attributes without prefix (e.g., {\"class\": \"code\"})\n */\nfunction stripAttributePrefix(attrs, prefix) {\n if (!attrs || typeof attrs !== 'object') return {};\n if (!prefix) return attrs;\n\n const rawAttrs = {};\n for (const key in attrs) {\n if (key.startsWith(prefix)) {\n const rawName = key.substring(prefix.length);\n rawAttrs[rawName] = attrs[key];\n } else {\n // Attribute without prefix (shouldn't normally happen, but be safe)\n rawAttrs[key] = attrs[key];\n }\n }\n return rawAttrs;\n}\n\n/**\n * \n * @param {array} node \n * @param {any} options \n * @param {Matcher} matcher - Path matcher instance\n * @returns \n */\nexport default function prettify(node, options, matcher, readonlyMatcher) {\n return compress(node, options, matcher, readonlyMatcher);\n}\n\n/**\n * @param {array} arr \n * @param {object} options \n * @param {Matcher} matcher - Path matcher instance\n * @returns object\n */\nfunction compress(arr, options, matcher, readonlyMatcher) {\n let text;\n const compressedObj = {}; //This is intended to be a plain object\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName(tagObj);\n\n // Push current property to matcher WITH RAW ATTRIBUTES (no prefix)\n if (property !== undefined && property !== options.textNodeName) {\n const rawAttrs = stripAttributePrefix(\n tagObj[\":@\"] || {},\n options.attributeNamePrefix\n );\n matcher.push(property, rawAttrs);\n }\n\n if (property === options.textNodeName) {\n if (text === undefined) text = tagObj[property];\n else text += \"\" + tagObj[property];\n } else if (property === undefined) {\n continue;\n } else if (tagObj[property]) {\n\n let val = compress(tagObj[property], options, matcher, readonlyMatcher);\n const isLeaf = isLeafTag(val, options);\n\n if (Object.keys(val).length === 0 && options.alwaysCreateTextNode) {\n val[options.textNodeName] = \"\";\n }\n\n if (tagObj[\":@\"]) {\n assignAttributes(val, tagObj[\":@\"], readonlyMatcher, options);\n } else if (Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode) {\n val = val[options.textNodeName];\n } else if (Object.keys(val).length === 0) {\n if (options.alwaysCreateTextNode) val[options.textNodeName] = \"\";\n else val = \"\";\n }\n\n if (tagObj[METADATA_SYMBOL] !== undefined && typeof val === \"object\" && val !== null) {\n val[METADATA_SYMBOL] = tagObj[METADATA_SYMBOL]; // copy over metadata\n }\n\n\n if (compressedObj[property] !== undefined && Object.prototype.hasOwnProperty.call(compressedObj, property)) {\n if (!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [compressedObj[property]];\n }\n compressedObj[property].push(val);\n } else {\n //TODO: if a node is not an array, then check if it should be an array\n //also determine if it is a leaf node\n\n // Pass jPath string or readonlyMatcher based on options.jPath setting\n const jPathOrMatcher = options.jPath ? readonlyMatcher.toString() : readonlyMatcher;\n if (options.isArray(property, jPathOrMatcher, isLeaf)) {\n compressedObj[property] = [val];\n } else {\n compressedObj[property] = val;\n }\n }\n\n // Pop property from matcher after processing\n if (property !== undefined && property !== options.textNodeName) {\n matcher.pop();\n }\n }\n\n }\n // if(text && text.length > 0) compressedObj[options.textNodeName] = text;\n if (typeof text === \"string\") {\n if (text.length > 0) compressedObj[options.textNodeName] = text;\n } else if (text !== undefined) compressedObj[options.textNodeName] = text;\n\n\n return compressedObj;\n}\n\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \":@\") return key;\n }\n}\n\nfunction assignAttributes(obj, attrMap, readonlyMatcher, options) {\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i]; // This is the PREFIXED name (e.g., \"@_class\")\n\n // Strip prefix for matcher path (for isArray callback)\n const rawAttrName = atrrName.startsWith(options.attributeNamePrefix)\n ? atrrName.substring(options.attributeNamePrefix.length)\n : atrrName;\n\n // For attributes, we need to create a temporary path\n // Pass jPath string or matcher based on options.jPath setting\n const jPathOrMatcher = options.jPath\n ? readonlyMatcher.toString() + \".\" + rawAttrName\n : readonlyMatcher;\n\n if (options.isArray(atrrName, jPathOrMatcher, true, true)) {\n obj[atrrName] = [attrMap[atrrName]];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\n\nfunction isLeafTag(obj, options) {\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n\n if (propCount === 0) {\n return true;\n }\n\n if (\n propCount === 1 &&\n (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)\n ) {\n return true;\n }\n\n return false;\n}","import { buildOptions } from './OptionsBuilder.js';\nimport OrderedObjParser from './OrderedObjParser.js';\nimport prettify from './node2json.js';\nimport { validate } from \"../validator.js\";\nimport XmlNode from './xmlNode.js';\n\nexport default class XMLParser {\n\n constructor(options) {\n this.externalEntities = {};\n this.options = buildOptions(options);\n\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Uint8Array} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData, validationOption) {\n if (typeof xmlData !== \"string\" && xmlData.toString) {\n xmlData = xmlData.toString();\n } else if (typeof xmlData !== \"string\") {\n throw new Error(\"XML data is accepted in String or Bytes[] form.\")\n }\n\n if (validationOption) {\n if (validationOption === true) validationOption = {}; //validate with default options\n\n const result = validate(xmlData, validationOption);\n if (result !== true) {\n throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`)\n }\n }\n const orderedObjParser = new OrderedObjParser(this.options, this.externalEntities);\n // orderedObjParser.entityDecoder.setExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if (this.options.preserveOrder || orderedResult === undefined) return orderedResult;\n else return prettify(orderedResult, this.options, orderedObjParser.matcher, orderedObjParser.readonlyMatcher);\n }\n\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value) {\n if (value.indexOf(\"&\") !== -1) {\n throw new Error(\"Entity value can't have '&'\")\n } else if (key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1) {\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'\")\n } else if (value === \"&\") {\n throw new Error(\"An entity with value '&' is not permitted\");\n } else {\n this.externalEntities[key] = value;\n }\n }\n\n /**\n * Returns a Symbol that can be used to access the metadata\n * property on a node.\n * \n * If Symbol is not available in the environment, an ordinary property is used\n * and the name of the property is here returned.\n * \n * The XMLMetaData property is only present when `captureMetaData`\n * is true in the options.\n */\n static getMetaDataSymbol() {\n return XmlNode.getMetaDataSymbol();\n }\n}","\n\nexport function safeComment(val) {\n return String(val)\n .replace(/--/g, '- -') // -- is illegal anywhere in comment content\n .replace(/--/g, '- -') // handle the scenario when 2 consiucative dashes appears \n .replace(/-$/, '- '); // trailing - would form -- with the closing -->\n}\n\nexport function safeCdata(val) {\n return String(val).replace(/\\]\\]>/g, ']]]]><![CDATA[>')\n}\n\nexport function escapeAttribute(val) {\n return String(val).replace(/\"/g, '&quot;').replace(/'/g, '&apos;')\n}","/**\n * xml-naming\n * Validates XML Name productions as defined in the XML 1.0 and 1.1 specifications.\n * Covers: Name, NCName, QName, NMToken, NMTokens\n *\n * XML 1.0 spec: https://www.w3.org/TR/xml/#NT-Name\n * XML 1.1 spec: https://www.w3.org/TR/xml11/#NT-NameStartChar\n * XML NS spec: https://www.w3.org/TR/xml-names/#NT-NCName\n */\n\n// ---------------------------------------------------------------------------\n// Character class strings — XML 1.0\n//\n// NameStartChar ::= \":\" | [A-Z] | \"_\" | [a-z]\n// | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF]\n// | [#x370-#x37D] | [#x37F-#x1FFF] <- split to exclude #x0487\n// | [#x200C-#x200D]\n// | [#x2070-#x218F] | [#x2C00-#x2FEF]\n// | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD]\n//\n// NameChar ::= NameStartChar | \"-\" | \".\" | [0-9]\n// | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n//\n// Note: \\u0487 (Combining Cyrillic Millions Sign) was added in Unicode 4.0,\n// after XML 1.0 was defined against Unicode 2.0. It falls inside the range\n// \\u037F-\\u1FFF but must be excluded. We split that range into\n// \\u037F-\\u0486 and \\u0488-\\u1FFF to exclude it explicitly.\n// ---------------------------------------------------------------------------\n\nconst nameStartChar10 =\n ':A-Za-z_' +\n '\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF' +\n '\\u0370-\\u037D' +\n '\\u037F-\\u0486\\u0488-\\u1FFF' + // split to exclude \\u0487\n '\\u200C-\\u200D' +\n '\\u2070-\\u218F' +\n '\\u2C00-\\u2FEF' +\n '\\u3001-\\uD7FF' +\n '\\uF900-\\uFDCF' +\n '\\uFDF0-\\uFFFD';\n\nconst nameChar10 =\n nameStartChar10 +\n '\\\\-\\\\.\\\\d' +\n '\\u00B7' +\n '\\u0300-\\u036F' +\n '\\u203F-\\u2040';\n\n// ---------------------------------------------------------------------------\n// Character class strings — XML 1.1\n//\n// Differences from XML 1.0:\n//\n// NameStartChar:\n// 1.0 has split ranges: \\u00C0-\\u00D6, \\u00D8-\\u00F6, \\u00F8-\\u02FF\n// 1.1 merges them into: \\u00C0-\\u02FF\n// (\\u00D7 x and \\u00F7 / are division symbols, excluded in both versions)\n//\n// 1.0 tops out at \\uFFFD (BMP only)\n// 1.1 adds \\u{10000}-\\u{EFFFF} (supplementary planes)\n// These require the /u flag on the RegExp — see buildRegexes below.\n//\n// NameChar:\n// 1.1 adds \\u0487 (Combining Cyrillic Millions Sign, added in Unicode 4.0)\n// ---------------------------------------------------------------------------\n\nconst nameStartChar11 =\n ':A-Za-z_' +\n '\\u00C0-\\u02FF' + // merged — 1.0 had three split ranges here\n '\\u0370-\\u037D' +\n '\\u037F-\\u0486\\u0488-\\u1FFF' + // split to exclude \\u0487 (combining mark, never a NameStartChar)\n '\\u200C-\\u200D' +\n '\\u2070-\\u218F' +\n '\\u2C00-\\u2FEF' +\n '\\u3001-\\uD7FF' +\n '\\uF900-\\uFDCF' +\n '\\uFDF0-\\uFFFD' +\n '\\u{10000}-\\u{EFFFF}'; // supplementary planes — REQUIRES /u flag on RegExp\n\nconst nameChar11 =\n nameStartChar11 +\n '\\\\-\\\\.\\\\d' +\n '\\u00B7' +\n '\\u0300-\\u036F' +\n '\\u0487' + // Combining Cyrillic Millions Sign — valid in 1.1, not 1.0\n '\\u203F-\\u2040';\n\n// ---------------------------------------------------------------------------\n// Regex builders\n//\n// XML 1.0 regexes: no flags — BMP only, standard JS regex behaviour.\n// XML 1.1 regexes: /u flag — required for \\u{10000}-\\u{EFFFF} to match actual\n// supplementary code points rather than lone surrogates (which are illegal XML).\n// ---------------------------------------------------------------------------\n\nconst buildRegexes = (startChar, char, flags = '') => {\n const ncStart = startChar.replace(':', '');\n const ncChar = char.replace(':', '');\n const ncNamePat = `[${ncStart}][${ncChar}]*`;\n\n return {\n name: new RegExp(`^[${startChar}][${char}]*$`, flags),\n ncName: new RegExp(`^${ncNamePat}$`, flags),\n qName: new RegExp(`^${ncNamePat}(?::${ncNamePat})?$`, flags),\n nmToken: new RegExp(`^[${char}]+$`, flags),\n nmTokens: new RegExp(`^[${char}]+(?:\\\\s+[${char}]+)*$`, flags),\n };\n};\n\nconst regexes10 = buildRegexes(nameStartChar10, nameChar10); // no /u — BMP only\nconst regexes11 = buildRegexes(nameStartChar11, nameChar11, 'u'); // /u — enables \\u{10000}-\\u{EFFFF}\n\nconst getRegexes = (xmlVersion = '1.0') =>\n xmlVersion === '1.1' ? regexes11 : regexes10;\n\n// ---------------------------------------------------------------------------\n// Boolean validators\n// ---------------------------------------------------------------------------\n\n/**\n * Returns true if the string is a valid XML Name.\n * Colons are allowed anywhere (Name production).\n * Used for: DOCTYPE entity names, notation names, DTD element declarations.\n */\nexport const name = (str, { xmlVersion = '1.0' } = {}) =>\n getRegexes(xmlVersion).name.test(str);\n\n/**\n * Returns true if the string is a valid NCName (Non-Colonized Name).\n * Colons are not permitted.\n * Used for: namespace prefixes, local names, SVG id attributes.\n */\nexport const ncName = (str, { xmlVersion = '1.0' } = {}) =>\n getRegexes(xmlVersion).ncName.test(str);\n\n/**\n * Returns true if the string is a valid QName (Qualified Name).\n * Allows exactly one colon as a prefix separator: prefix:localName.\n * Used for: element and attribute names in namespace-aware XML/SVG.\n */\nexport const qName = (str, { xmlVersion = '1.0' } = {}) =>\n getRegexes(xmlVersion).qName.test(str);\n\n/**\n * Returns true if the string is a valid NMToken.\n * Like Name but no restriction on the first character.\n * Used for: DTD NMTOKEN attribute values.\n */\nexport const nmToken = (str, { xmlVersion = '1.0' } = {}) =>\n getRegexes(xmlVersion).nmToken.test(str);\n\n/**\n * Returns true if the string is a valid NMTokens value.\n * A whitespace-separated list of NMToken values.\n * Used for: DTD NMTOKENS attribute values.\n */\nexport const nmTokens = (str, { xmlVersion = '1.0' } = {}) =>\n getRegexes(xmlVersion).nmTokens.test(str);\n\n// ---------------------------------------------------------------------------\n// Diagnostic validator\n// ---------------------------------------------------------------------------\n\nconst PRODUCTIONS = ['name', 'ncName', 'qName', 'nmToken', 'nmTokens'];\n\n/**\n * Validates a string against a named production and returns a detailed result.\n *\n * @param {string} str\n * @param {'name'|'ncName'|'qName'|'nmToken'|'nmTokens'} production\n * @param {{ xmlVersion?: '1.0'|'1.1' }} [opts]\n * @returns {{ valid: boolean, production: string, input: string, reason?: string, position?: number }}\n */\nexport const validate = (str, production, { xmlVersion = '1.0' } = {}) => {\n if (!PRODUCTIONS.includes(production)) {\n throw new TypeError(\n `Unknown production \"${production}\". Must be one of: ${PRODUCTIONS.join(', ')}`\n );\n }\n\n const validators = { name, ncName, qName, nmToken, nmTokens };\n const isValid = validators[production](str, { xmlVersion });\n\n if (isValid) return { valid: true, production, input: str };\n\n let reason = 'Does not match the production rules';\n let position;\n\n if (str.length === 0) {\n reason = 'Input is empty';\n } else if (production === 'ncName' && str.includes(':')) {\n position = str.indexOf(':');\n reason = 'Colon is not allowed in NCName';\n } else if (production === 'qName' && str.startsWith(':')) {\n reason = 'QName cannot start with a colon';\n position = 0;\n } else if (production === 'qName' && str.endsWith(':')) {\n reason = 'QName cannot end with a colon';\n position = str.length - 1;\n } else if (production === 'qName' && (str.match(/:/g) || []).length > 1) {\n reason = 'QName can have at most one colon';\n position = str.lastIndexOf(':');\n } else if (\n ['name', 'ncName', 'qName'].includes(production) &&\n !/^[:A-Za-z_\\u00C0-\\uFFFD]/.test(str[0])\n ) {\n reason = `First character \"${str[0]}\" is not a valid NameStartChar`;\n position = 0;\n } else {\n for (let i = 0; i < str.length; i++) {\n if (!/[\\w\\-\\\\.:\\u00B7\\u00C0-\\uFFFD]/.test(str[i])) {\n reason = `Character \"${str[i]}\" at position ${i} is not a valid NameChar`;\n position = i;\n break;\n }\n }\n }\n\n return { valid: false, production, input: str, reason, position };\n};\n\n// ---------------------------------------------------------------------------\n// Batch validator\n// ---------------------------------------------------------------------------\n\n/**\n * Validates an array of strings against a named production.\n *\n * @param {string[]} strings\n * @param {'name'|'ncName'|'qName'|'nmToken'|'nmTokens'} production\n * @param {{ xmlVersion?: '1.0'|'1.1' }} [opts]\n * @returns {Array<{ valid: boolean, production: string, input: string, reason?: string, position?: number }>}\n */\nexport const validateAll = (strings, production, opts = {}) =>\n strings.map(str => validate(str, production, opts));\n\n// ---------------------------------------------------------------------------\n// Sanitizer\n// ---------------------------------------------------------------------------\n\n/**\n * Transforms an invalid string into the nearest valid XML name for the given production.\n *\n * @param {string} str\n * @param {'name'|'ncName'|'qName'|'nmToken'|'nmTokens'} production\n * @param {{ replacement?: string }} [opts]\n * @returns {string}\n */\nexport const sanitize = (str, production = 'name', { replacement = '_' } = {}) => {\n if (!str) return replacement;\n\n let result = str;\n\n // Strip colons for NCName\n if (production === 'ncName') {\n result = result.replace(/:/g, '');\n }\n\n // Replace illegal characters\n result = result.replace(/[^\\w\\-\\.:\\u00B7\\u00C0-\\uFFFD]/g, replacement);\n\n // Fix invalid start character for Name / NCName / QName\n if (production !== 'nmToken' && production !== 'nmTokens') {\n if (/^[\\-\\.\\d]/.test(result)) {\n result = replacement + result;\n }\n }\n\n return result || replacement;\n};","import { Expression, Matcher } from 'path-expression-matcher';\nimport { safeComment, safeCdata, escapeAttribute } from \"./util.js\";\nimport { qName } from 'xml-naming';\n\nconst EOL = \"\\n\";\n\n/**\n * Detect XML version from the first element of the ordered array input.\n * The first element must be a ?xml processing instruction with a version attribute.\n * Returns '1.0' if not found.\n *\n * @param {array} jArray\n * @param {object} options\n */\nfunction detectXmlVersionFromArray(jArray, options) {\n if (!Array.isArray(jArray) || jArray.length === 0) return '1.0';\n const first = jArray[0];\n const firstKey = propName(first);\n if (firstKey === '?xml') {\n const attrs = first[':@'];\n if (attrs) {\n const versionKey = options.attributeNamePrefix + 'version';\n if (attrs[versionKey]) return attrs[versionKey];\n }\n }\n return '1.0';\n}\n\n/**\n * Resolve a tag or attribute name through sanitizeName if configured.\n * Validation via xml-naming's qName is performed first; the sanitizeName\n * callback is invoked only when the name is invalid. If sanitizeName is\n * false (default), no validation occurs and the name is used as-is.\n *\n * @param {string} name - raw name from the JS object\n * @param {boolean} isAttribute - true when resolving an attribute name\n * @param {object} options\n * @param {Matcher} matcher - current matcher state (readonly from callback perspective)\n * @param {string} xmlVersion - '1.0' or '1.1', forwarded to xml-naming\n */\nfunction resolveTagName(name, isAttribute, options, matcher, xmlVersion) {\n if (!options.sanitizeName) return name;\n if (qName(name, { xmlVersion })) return name;\n return options.sanitizeName(name, { isAttribute, matcher: matcher.readOnly() });\n}\n\n/**\n * @param {array} jArray\n * @param {any} options\n * @returns\n */\nexport default function toXml(jArray, options) {\n let indentation = \"\";\n if (options.format) {\n indentation = EOL;\n }\n\n // Pre-compile stopNode expressions for pattern matching\n const stopNodeExpressions = [];\n if (options.stopNodes && Array.isArray(options.stopNodes)) {\n for (let i = 0; i < options.stopNodes.length; i++) {\n const node = options.stopNodes[i];\n if (typeof node === 'string') {\n stopNodeExpressions.push(new Expression(node));\n } else if (node instanceof Expression) {\n stopNodeExpressions.push(node);\n }\n }\n }\n\n // Detect XML version for use in name validation\n const xmlVersion = detectXmlVersionFromArray(jArray, options);\n\n // Initialize matcher for path tracking\n const matcher = new Matcher();\n\n return arrToStr(jArray, options, indentation, matcher, stopNodeExpressions, xmlVersion);\n}\n\nfunction arrToStr(arr, options, indentation, matcher, stopNodeExpressions, xmlVersion) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n\n if (options.maxNestedTags && matcher.getDepth() > options.maxNestedTags) {\n throw new Error(\"Maximum nested tags exceeded\");\n }\n\n if (!Array.isArray(arr)) {\n // Non-array values (e.g. string tag values) should be treated as text content\n if (arr !== undefined && arr !== null) {\n let text = arr.toString();\n text = replaceEntitiesValue(text, options);\n return text;\n }\n return \"\";\n }\n\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const rawTagName = propName(tagObj);\n if (rawTagName === undefined) continue;\n\n // Special names are exempt from sanitizeName: internal conventions and PI tags\n // are not user-supplied XML element names.\n const isSpecialName = rawTagName === options.textNodeName\n || rawTagName === options.cdataPropName\n || rawTagName === options.commentPropName\n || rawTagName[0] === '?';\n\n // Resolve tag name (may transform it; may throw for invalid names)\n const tagName = isSpecialName\n ? rawTagName\n : resolveTagName(rawTagName, false, options, matcher, xmlVersion);\n\n // Extract attributes from \":@\" property\n const attrValues = extractAttributeValues(tagObj[\":@\"], options);\n\n // Push resolved tag to matcher WITH attributes\n matcher.push(tagName, attrValues);\n\n // Check if this is a stop node using Expression matching\n const isStopNode = checkStopNode(matcher, stopNodeExpressions);\n\n if (tagName === options.textNodeName) {\n let tagText = tagObj[rawTagName];\n if (!isStopNode) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n matcher.pop();\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n const val = tagObj[rawTagName][0][options.textNodeName];\n const safeVal = safeCdata(val);\n xmlStr += `<![CDATA[${safeVal}]]>`;\n isPreviousElementTag = false;\n matcher.pop();\n continue;\n } else if (tagName === options.commentPropName) {\n const val = tagObj[rawTagName][0][options.textNodeName];\n const safeVal = safeComment(val);\n xmlStr += indentation + `<!--${safeVal}-->`;\n isPreviousElementTag = true;\n matcher.pop();\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr = attr_to_str(tagObj[\":@\"], options, isStopNode, matcher, xmlVersion);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n // Text node content on PI/XML declaration tags is intentionally ignored.\n // Only attributes are valid on these tags per the XML spec.\n xmlStr += tempInd + `<${tagName}${attStr}?>`;\n isPreviousElementTag = true;\n matcher.pop();\n continue;\n }\n\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n\n // Pass isStopNode to attr_to_str so attributes are also not processed for stopNodes\n const attStr = attr_to_str(tagObj[\":@\"], options, isStopNode, matcher, xmlVersion);\n const tagStart = indentation + `<${tagName}${attStr}`;\n\n // If this is a stopNode, get raw content without processing\n let tagValue;\n if (isStopNode) {\n tagValue = getRawContent(tagObj[rawTagName], options);\n } else {\n tagValue = arrToStr(tagObj[rawTagName], options, newIdentation, matcher, stopNodeExpressions, xmlVersion);\n }\n\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}</${tagName}>`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"</\"))) {\n xmlStr += indentation + options.indentBy + tagValue + indentation;\n } else {\n xmlStr += tagValue;\n }\n xmlStr += `</${tagName}>`;\n }\n isPreviousElementTag = true;\n\n // Pop tag from matcher\n matcher.pop();\n }\n\n return xmlStr;\n}\n\n/**\n * Extract attribute values from the \":@\" object and return as plain object\n * for passing to matcher.push()\n */\nfunction extractAttributeValues(attrMap, options) {\n if (!attrMap || options.ignoreAttributes) return null;\n\n const attrValues = {};\n let hasAttrs = false;\n\n for (let attr in attrMap) {\n if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;\n // Remove the attribute prefix to get clean attribute name\n const cleanAttrName = attr.startsWith(options.attributeNamePrefix)\n ? attr.substr(options.attributeNamePrefix.length)\n : attr;\n attrValues[cleanAttrName] = escapeAttribute(attrMap[attr]);\n hasAttrs = true;\n }\n\n return hasAttrs ? attrValues : null;\n}\n\n/**\n * Extract raw content from a stopNode without any processing\n * This preserves the content exactly as-is, including special characters\n */\nfunction getRawContent(arr, options) {\n if (!Array.isArray(arr)) {\n // Non-array values return as-is\n if (arr !== undefined && arr !== null) {\n return arr.toString();\n }\n return \"\";\n }\n\n let content = \"\";\n for (let i = 0; i < arr.length; i++) {\n const item = arr[i];\n const tagName = propName(item);\n\n if (tagName === options.textNodeName) {\n // Raw text content - NO processing, NO entity replacement\n content += item[tagName];\n } else if (tagName === options.cdataPropName) {\n // CDATA content\n content += item[tagName][0][options.textNodeName];\n } else if (tagName === options.commentPropName) {\n // Comment content\n content += item[tagName][0][options.textNodeName];\n } else if (tagName && tagName[0] === \"?\") {\n // Processing instruction - skip for stopNodes\n continue;\n } else if (tagName) {\n // Nested tags within stopNode — no sanitizeName, content is raw\n const attStr = attr_to_str_raw(item[\":@\"], options);\n const nestedContent = getRawContent(item[tagName], options);\n\n if (!nestedContent || nestedContent.length === 0) {\n content += `<${tagName}${attStr}/>`;\n } else {\n content += `<${tagName}${attStr}>${nestedContent}</${tagName}>`;\n }\n }\n }\n return content;\n}\n\n/**\n * Build attribute string for stopNodes - NO entity replacement\n */\nfunction attr_to_str_raw(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;\n // For stopNodes, use raw value without processing\n let attrVal = attrMap[attr];\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${escapeAttribute(attrVal)}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n if (key !== \":@\") return key;\n }\n}\n\n/**\n * Build attribute string, resolving attribute names through sanitizeName when configured.\n * Accepts matcher so the callback has path context.\n */\nfunction attr_to_str(attrMap, options, isStopNode, matcher, xmlVersion) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;\n\n // Strip prefix to get the clean XML attribute name, then optionally sanitize it\n const cleanAttrName = attr.substr(options.attributeNamePrefix.length);\n const resolvedAttrName = isStopNode\n ? cleanAttrName // stopNodes are raw — skip sanitizeName for attr names too\n : resolveTagName(cleanAttrName, true, options, matcher, xmlVersion);\n\n let attrVal;\n if (isStopNode) {\n // For stopNodes, use raw value without any processing\n attrVal = attrMap[attr];\n } else {\n // Normal processing: apply attributeValueProcessor and entity replacement\n attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n }\n\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${resolvedAttrName}`;\n } else {\n attrStr += ` ${resolvedAttrName}=\"${escapeAttribute(attrVal)}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction checkStopNode(matcher, stopNodeExpressions) {\n if (!stopNodeExpressions || stopNodeExpressions.length === 0) return false;\n\n for (let i = 0; i < stopNodeExpressions.length; i++) {\n if (matcher.matches(stopNodeExpressions[i])) {\n return true;\n }\n }\n return false;\n}\n\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}","export default function getIgnoreAttributesFn(ignoreAttributes) {\n if (typeof ignoreAttributes === 'function') {\n return ignoreAttributes\n }\n if (Array.isArray(ignoreAttributes)) {\n return (attrName) => {\n for (const pattern of ignoreAttributes) {\n if (typeof pattern === 'string' && attrName === pattern) {\n return true\n }\n if (pattern instanceof RegExp && pattern.test(attrName)) {\n return true\n }\n }\n }\n }\n return () => false\n}","'use strict';\n//parse Empty Node as self closing node\nimport buildFromOrderedJs from './orderedJs2Xml.js';\nimport getIgnoreAttributesFn from \"./ignoreAttributes.js\";\nimport { Expression, Matcher } from 'path-expression-matcher';\nimport { safeComment, safeCdata, escapeAttribute } from './util.js';\nimport { qName } from 'xml-naming';\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function (key, a) {\n return a;\n },\n attributeValueProcessor: function (attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&amp;\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \"&gt;\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"&lt;\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"&apos;\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \"&quot;\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false,\n maxNestedTags: 100,\n jPath: true, // When true, callbacks receive string jPath; when false, receive Matcher instance\n sanitizeName: false // false = allow all names as-is (default, backward-compatible).\n // Set to a function (name, { isAttribute, matcher }) => string to\n // validate/sanitize tag and attribute names. Throw inside the function\n // to reject an invalid name.\n};\n\nexport default function Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n\n // Convert old-style stopNodes for backward compatibility\n // Old syntax: \"*.tag\" meant \"tag anywhere in tree\"\n // New syntax: \"..tag\" means \"tag anywhere in tree\"\n if (this.options.stopNodes && Array.isArray(this.options.stopNodes)) {\n this.options.stopNodes = this.options.stopNodes.map(node => {\n if (typeof node === 'string' && node.startsWith('*.')) {\n // Convert old wildcard syntax to deep wildcard\n return '..' + node.substring(2);\n }\n return node;\n });\n }\n\n // Pre-compile stopNode expressions for pattern matching\n this.stopNodeExpressions = [];\n if (this.options.stopNodes && Array.isArray(this.options.stopNodes)) {\n for (let i = 0; i < this.options.stopNodes.length; i++) {\n const node = this.options.stopNodes[i];\n if (typeof node === 'string') {\n this.stopNodeExpressions.push(new Expression(node));\n } else if (node instanceof Expression) {\n this.stopNodeExpressions.push(node);\n }\n }\n }\n\n if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {\n this.isAttribute = function (/*a*/) {\n return false;\n };\n } else {\n this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function () {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n}\n\n/**\n * Detect XML version from the ?xml declaration at the root of a plain-object input.\n * Checks both attributesGroupName and flat attribute forms.\n * Returns '1.0' if no declaration is found.\n */\nfunction detectXmlVersionFromObj(jObj, options) {\n const decl = jObj['?xml'];\n if (decl && typeof decl === 'object') {\n // attributesGroupName path e.g. { '$$': { '@_version': '1.1' } }\n if (options.attributesGroupName && decl[options.attributesGroupName]) {\n const v = decl[options.attributesGroupName][options.attributeNamePrefix + 'version'];\n if (v) return v;\n }\n // flat attribute path e.g. { '@_version': '1.1' }\n const v = decl[options.attributeNamePrefix + 'version'];\n if (v) return v;\n }\n return '1.0';\n}\n\n/**\n * Resolve a tag or attribute name through sanitizeName if configured.\n * Validation via xml-naming's qName is performed first; the sanitizeName\n * callback is invoked only when the name is invalid. If sanitizeName is\n * false (default), no validation occurs and the name is used as-is.\n *\n * @param {string} name - raw name from the JS object\n * @param {boolean} isAttribute - true when resolving an attribute name\n * @param {object} options\n * @param {Matcher} matcher - current matcher state (readonly from callback perspective)\n * @param {string} xmlVersion - '1.0' or '1.1', forwarded to xml-naming\n */\nfunction resolveTagName(name, isAttribute, options, matcher, xmlVersion) {\n if (!options.sanitizeName) return name;\n if (qName(name, { xmlVersion })) return name;\n return options.sanitizeName(name, { isAttribute, matcher: matcher.readOnly() });\n}\n\nBuilder.prototype.build = function (jObj) {\n if (this.options.preserveOrder) {\n return buildFromOrderedJs(jObj, this.options);\n } else {\n if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n jObj = {\n [this.options.arrayNodeName]: jObj\n }\n }\n // Initialize matcher for path tracking\n const matcher = new Matcher();\n const xmlVersion = detectXmlVersionFromObj(jObj, this.options);\n return this.j2x(jObj, 0, matcher, xmlVersion).val;\n }\n};\n\nBuilder.prototype.j2x = function (jObj, level, matcher, xmlVersion) {\n let attrStr = '';\n let val = '';\n if (this.options.maxNestedTags && matcher.getDepth() >= this.options.maxNestedTags) {\n throw new Error(\"Maximum nested tags exceeded\");\n }\n // Get jPath based on option: string for backward compatibility, or Matcher for new features\n const jPath = this.options.jPath ? matcher.toString() : matcher;\n\n // Check if current node is a stopNode (will be used for attribute encoding)\n const isCurrentStopNode = this.checkStopNode(matcher);\n\n for (let key in jObj) {\n if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n\n // Resolve the key through sanitizeName before any use.\n // Special keys (textNodeName, cdataPropName, commentPropName, attributeNamePrefix,\n // attributesGroupName, \"?\" PI tags) are exempt — they are builder-internal conventions,\n // not user-supplied XML names.\n const isSpecialKey = key === this.options.textNodeName\n || key === this.options.cdataPropName\n || key === this.options.commentPropName\n || (this.options.attributesGroupName && key === this.options.attributesGroupName)\n || this.isAttribute(key)\n || key[0] === '?';\n\n const resolvedKey = isSpecialKey\n ? key\n : resolveTagName(key, false, this.options, matcher, xmlVersion);\n\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node only if it is not an attribute\n if (this.isAttribute(key)) {\n val += '';\n }\n } else if (jObj[key] === null) {\n // null attribute should be ignored by the attribute list, but should not cause the tag closing\n if (this.isAttribute(key)) {\n val += '';\n } else if (resolvedKey === this.options.cdataPropName || resolvedKey === this.options.commentPropName) {\n val += '';\n } else if (resolvedKey[0] === '?') {\n val += this.indentate(level) + '<' + resolvedKey + '?' + this.tagEndChar;\n } else {\n val += this.indentate(level) + '<' + resolvedKey + '/' + this.tagEndChar;\n }\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextValNode(jObj[key], resolvedKey, '', level, matcher);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr && !this.ignoreAttributesFn(attr, jPath)) {\n // Resolve the attribute name through sanitizeName\n const resolvedAttr = resolveTagName(attr, true, this.options, matcher, xmlVersion);\n attrStr += this.buildAttrPairStr(resolvedAttr, '' + jObj[key], isCurrentStopNode);\n } else if (!attr) {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n // Check if this is a stopNode before building\n matcher.push(resolvedKey);\n const isStopNode = this.checkStopNode(matcher);\n matcher.pop();\n\n if (isStopNode) {\n // Build as raw content without encoding\n const textValue = '' + jObj[key];\n if (textValue === '') {\n val += this.indentate(level) + '<' + resolvedKey + this.closeTag(resolvedKey) + this.tagEndChar;\n } else {\n val += this.indentate(level) + '<' + resolvedKey + '>' + textValue + '</' + resolvedKey + this.tagEndChar;\n }\n } else {\n val += this.buildTextValNode(jObj[key], resolvedKey, '', level, matcher);\n }\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if (resolvedKey[0] === \"?\") val += this.indentate(level) + '<' + resolvedKey + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + resolvedKey + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n if (this.options.oneListGroup) {\n // Push tag to matcher before recursive call\n matcher.push(resolvedKey);\n const result = this.j2x(item, level + 1, matcher, xmlVersion);\n // Pop tag from matcher after recursive call\n matcher.pop();\n\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr\n }\n } else {\n listTagVal += this.processTextOrObjNode(item, resolvedKey, level, matcher, xmlVersion)\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(resolvedKey, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n // Check if this is a stopNode before building\n matcher.push(resolvedKey);\n const isStopNode = this.checkStopNode(matcher);\n matcher.pop();\n\n if (isStopNode) {\n // Build as raw content without encoding\n const textValue = '' + item;\n if (textValue === '') {\n listTagVal += this.indentate(level) + '<' + resolvedKey + this.closeTag(resolvedKey) + this.tagEndChar;\n } else {\n listTagVal += this.indentate(level) + '<' + resolvedKey + '>' + textValue + '</' + resolvedKey + this.tagEndChar;\n }\n } else {\n listTagVal += this.buildTextValNode(item, resolvedKey, '', level, matcher);\n }\n }\n }\n }\n if (this.options.oneListGroup) {\n listTagVal = this.buildObjectNode(listTagVal, resolvedKey, listTagAttr, level);\n }\n val += listTagVal;\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n // Resolve attribute names inside attributesGroupName\n const resolvedAttr = resolveTagName(Ks[j], true, this.options, matcher, xmlVersion);\n attrStr += this.buildAttrPairStr(resolvedAttr, '' + jObj[key][Ks[j]], isCurrentStopNode);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], resolvedKey, level, matcher, xmlVersion)\n }\n }\n }\n return { attrStr: attrStr, val: val };\n};\n\nBuilder.prototype.buildAttrPairStr = function (attrName, val, isStopNode) {\n if (!isStopNode) {\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n }\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + escapeAttribute(val) + '\"';\n}\n\nfunction processTextOrObjNode(object, key, level, matcher, xmlVersion) {\n // Extract attributes to pass to matcher\n const attrValues = this.extractAttributes(object);\n\n // Push tag to matcher before recursion WITH attributes\n matcher.push(key, attrValues);\n\n // Check if this entire node is a stopNode\n const isStopNode = this.checkStopNode(matcher);\n\n if (isStopNode) {\n // For stopNodes, build raw content without entity encoding\n const rawContent = this.buildRawContent(object);\n const attrStr = this.buildAttributesForStopNode(object);\n matcher.pop();\n return this.buildObjectNode(rawContent, key, attrStr, level);\n }\n\n const result = this.j2x(object, level + 1, matcher, xmlVersion);\n // Pop tag from matcher after recursion\n matcher.pop();\n\n // PI/XML-declaration tags must never emit text content — route through\n // buildTextValNode which correctly ignores the text node for \"?\" tags.\n if (key[0] === '?') {\n return this.buildTextValNode('', key, result.attrStr, level, matcher);\n } else if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level, matcher);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\n\n// Helper method to extract attributes from an object\nBuilder.prototype.extractAttributes = function (obj) {\n if (!obj || typeof obj !== 'object') return null;\n\n const attrValues = {};\n let hasAttrs = false;\n\n // Check for attributesGroupName (when attributes are grouped)\n if (this.options.attributesGroupName && obj[this.options.attributesGroupName]) {\n const attrGroup = obj[this.options.attributesGroupName];\n for (let attrKey in attrGroup) {\n if (!Object.prototype.hasOwnProperty.call(attrGroup, attrKey)) continue;\n // Remove attribute prefix if present\n const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix)\n ? attrKey.substring(this.options.attributeNamePrefix.length)\n : attrKey;\n attrValues[cleanKey] = escapeAttribute(attrGroup[attrKey]);\n hasAttrs = true;\n }\n } else {\n // Look for individual attributes (prefixed with attributeNamePrefix)\n for (let key in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n const attr = this.isAttribute(key);\n if (attr) {\n attrValues[attr] = escapeAttribute(obj[key]);\n hasAttrs = true;\n }\n }\n }\n\n return hasAttrs ? attrValues : null;\n};\n\n// Build raw content for stopNode without entity encoding\nBuilder.prototype.buildRawContent = function (obj) {\n if (typeof obj === 'string') {\n return obj; // Already a string, return as-is\n }\n\n if (typeof obj !== 'object' || obj === null) {\n return String(obj);\n }\n\n // Check if this is a stopNode data from parser: { \"#text\": \"raw xml\", \"@_attr\": \"val\" }\n if (obj[this.options.textNodeName] !== undefined) {\n return obj[this.options.textNodeName]; // Return raw text without encoding\n }\n\n // Build raw XML from nested structure\n let content = '';\n\n for (let key in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n\n // Skip attributes\n if (this.isAttribute(key)) continue;\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) continue;\n\n const value = obj[key];\n\n if (key === this.options.textNodeName) {\n content += value; // Raw text\n } else if (Array.isArray(value)) {\n // Array of same tag\n for (let item of value) {\n if (typeof item === 'string' || typeof item === 'number') {\n content += `<${key}>${item}</${key}>`;\n } else if (typeof item === 'object' && item !== null) {\n const nestedContent = this.buildRawContent(item);\n const nestedAttrs = this.buildAttributesForStopNode(item);\n if (nestedContent === '') {\n content += `<${key}${nestedAttrs}/>`;\n } else {\n content += `<${key}${nestedAttrs}>${nestedContent}</${key}>`;\n }\n }\n }\n } else if (typeof value === 'object' && value !== null) {\n // Nested object\n const nestedContent = this.buildRawContent(value);\n const nestedAttrs = this.buildAttributesForStopNode(value);\n if (nestedContent === '') {\n content += `<${key}${nestedAttrs}/>`;\n } else {\n content += `<${key}${nestedAttrs}>${nestedContent}</${key}>`;\n }\n } else {\n // Primitive value\n content += `<${key}>${value}</${key}>`;\n }\n }\n\n return content;\n};\n\n// Build attribute string for stopNode (no entity encoding)\nBuilder.prototype.buildAttributesForStopNode = function (obj) {\n if (!obj || typeof obj !== 'object') return '';\n\n let attrStr = '';\n\n // Check for attributesGroupName (when attributes are grouped)\n if (this.options.attributesGroupName && obj[this.options.attributesGroupName]) {\n const attrGroup = obj[this.options.attributesGroupName];\n for (let attrKey in attrGroup) {\n if (!Object.prototype.hasOwnProperty.call(attrGroup, attrKey)) continue;\n const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix)\n ? attrKey.substring(this.options.attributeNamePrefix.length)\n : attrKey;\n const val = attrGroup[attrKey];\n if (val === true && this.options.suppressBooleanAttributes) {\n attrStr += ' ' + cleanKey;\n } else {\n attrStr += ' ' + cleanKey + '=\"' + val + '\"'; // No encoding for stopNode\n }\n }\n } else {\n // Look for individual attributes\n for (let key in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n const attr = this.isAttribute(key);\n if (attr) {\n const val = obj[key];\n if (val === true && this.options.suppressBooleanAttributes) {\n attrStr += ' ' + attr;\n } else {\n attrStr += ' ' + attr + '=\"' + val + '\"'; // No encoding for stopNode\n }\n }\n }\n }\n\n return attrStr;\n};\n\nBuilder.prototype.buildObjectNode = function (val, key, attrStr, level) {\n if (val === \"\") {\n if (key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n } else if (key[0] === \"?\") {\n // PI/XML-declaration tags never have body content — treat them like empty.\n return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n } else {\n let tagEndExp = '</' + key + this.tagEndChar;\n let piClosingChar = \"\";\n\n if (key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n\n // attrStr is an empty string in case the attribute came as undefined or null\n if ((attrStr || attrStr === '') && val.indexOf('<') === -1) {\n return (this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' + val + tagEndExp);\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `<!--${val}-->` + this.newLine;\n } else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp);\n }\n }\n}\n\nBuilder.prototype.closeTag = function (key) {\n let closeTag = \"\";\n if (this.options.unpairedTags.indexOf(key) !== -1) { //unpaired\n if (!this.options.suppressUnpairedNode) closeTag = \"/\"\n } else if (this.options.suppressEmptyNode) { //empty\n closeTag = \"/\";\n } else {\n closeTag = `></${key}`\n }\n return closeTag;\n}\n\nBuilder.prototype.checkStopNode = function (matcher) {\n if (!this.stopNodeExpressions || this.stopNodeExpressions.length === 0) return false;\n\n for (let i = 0; i < this.stopNodeExpressions.length; i++) {\n if (matcher.matches(this.stopNodeExpressions[i])) {\n return true;\n }\n }\n return false;\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildObjectNode(val, key, attrStr, level);\n } else {\n if (key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n }\n }\n}\n\nBuilder.prototype.buildTextValNode = function (val, key, attrStr, level, matcher) {\n if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {\n const safeVal = safeCdata(val);\n return this.indentate(level) + `<![CDATA[${safeVal}]]>` + this.newLine;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n const safeVal = safeComment(val);\n return this.indentate(level) + `<!--${safeVal}-->` + this.newLine;\n } else if (key[0] === \"?\") {//PI tag\n return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n } else {\n // Normal processing: apply tagValueProcessor and entity replacement\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n\n if (textValue === '') {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n } else {\n return this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n '</' + key + this.tagEndChar;\n }\n }\n}\n\nBuilder.prototype.replaceEntitiesValue = function (textValue) {\n if (textValue && textValue.length > 0 && this.options.processEntities) {\n for (let i = 0; i < this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\n\nfunction isAttribute(name /*, options*/) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}","// Re-export from fast-xml-builder for backward compatibility\nimport XMLBuilder from 'fast-xml-builder';\nexport default XMLBuilder;\n\n// If there are any named exports you also want to re-export:\nexport * from 'fast-xml-builder';","/*!\n * Copyright 2022 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n 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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _XMLMultiPartUploadHelper_instances, _XMLMultiPartUploadHelper_setGoogApiClientHeaders, _XMLMultiPartUploadHelper_handleErrorResponse;\nimport { FileExceptionMessages, RequestError, SkipReason, } from './file.js';\nimport pLimit from 'p-limit';\nimport * as path from 'path';\nimport { createReadStream, existsSync, promises as fsp } from 'fs';\nimport { CRC32C } from './crc32c.js';\nimport { GoogleAuth } from 'google-auth-library';\nimport { XMLParser, XMLBuilder } from 'fast-xml-parser';\nimport AsyncRetry from 'async-retry';\nimport { createHash } from 'crypto';\nimport { GCCL_GCS_CMD_KEY } from './nodejs-common/util.js';\nimport { getRuntimeTrackingString, getUserAgentString } from './util.js';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { getPackageJSON } from './package-json-helper.cjs';\nconst packageJson = getPackageJSON();\n/**\n * Default number of concurrently executing promises to use when calling uploadManyFiles.\n *\n */\nconst DEFAULT_PARALLEL_UPLOAD_LIMIT = 5;\n/**\n * Default number of concurrently executing promises to use when calling downloadManyFiles.\n *\n */\nconst DEFAULT_PARALLEL_DOWNLOAD_LIMIT = 5;\n/**\n * Default number of concurrently executing promises to use when calling downloadFileInChunks.\n *\n */\nconst DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT = 5;\n/**\n * The minimum size threshold in bytes at which to apply a chunked download strategy when calling downloadFileInChunks.\n *\n */\nconst DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD = 32 * 1024 * 1024;\n/**\n * The chunk size in bytes to use when calling downloadFileInChunks.\n *\n */\nconst DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024;\n/**\n * The chunk size in bytes to use when calling uploadFileInChunks.\n *\n */\nconst UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024;\n/**\n * Default number of concurrently executing promises to use when calling uploadFileInChunks.\n *\n */\nconst DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT = 5;\nconst EMPTY_REGEX = '(?:)';\n/**\n * The `gccl-gcs-cmd` value for the `X-Goog-API-Client` header.\n * Example: `gccl-gcs-cmd/tm.upload_many`\n *\n * @see {@link GCCL_GCS_CMD}.\n * @see {@link GCCL_GCS_CMD_KEY}.\n */\nconst GCCL_GCS_CMD_FEATURE = {\n UPLOAD_MANY: 'tm.upload_many',\n DOWNLOAD_MANY: 'tm.download_many',\n UPLOAD_SHARDED: 'tm.upload_sharded',\n DOWNLOAD_SHARDED: 'tm.download_sharded',\n};\nconst defaultMultiPartGenerator = (bucket, fileName, uploadId, partsMap) => {\n return new XMLMultiPartUploadHelper(bucket, fileName, uploadId, partsMap);\n};\nexport class MultiPartUploadError extends Error {\n constructor(message, uploadId, partsMap) {\n super(message);\n this.uploadId = uploadId;\n this.partsMap = partsMap;\n }\n}\n/**\n * Class representing an implementation of MPU in the XML API. This class is not meant for public usage.\n *\n * @private\n *\n */\nclass XMLMultiPartUploadHelper {\n constructor(bucket, fileName, uploadId, partsMap) {\n _XMLMultiPartUploadHelper_instances.add(this);\n this.authClient = bucket.storage.authClient || new GoogleAuth();\n this.uploadId = uploadId || '';\n this.bucket = bucket;\n this.fileName = fileName;\n this.baseUrl = `https://${bucket.name}.${new URL(this.bucket.storage.apiEndpoint).hostname}/${fileName}`;\n this.xmlBuilder = new XMLBuilder({ arrayNodeName: 'Part' });\n this.xmlParser = new XMLParser();\n this.partsMap = partsMap || new Map();\n this.retryOptions = {\n retries: this.bucket.storage.retryOptions.maxRetries,\n factor: this.bucket.storage.retryOptions.retryDelayMultiplier,\n maxTimeout: this.bucket.storage.retryOptions.maxRetryDelay * 1000,\n maxRetryTime: this.bucket.storage.retryOptions.totalTimeout * 1000,\n };\n }\n /**\n * Initiates a multipart upload (MPU) to the XML API and stores the resultant upload id.\n *\n * @returns {Promise<void>}\n */\n async initiateUpload(headers = {}) {\n const url = `${this.baseUrl}?uploads`;\n return AsyncRetry(async (bail) => {\n try {\n const res = await this.authClient.request({\n headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, \"m\", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this, headers),\n method: 'POST',\n url,\n });\n if (res.data && res.data.error) {\n throw res.data.error;\n }\n const parsedXML = this.xmlParser.parse(res.data);\n this.uploadId = parsedXML.InitiateMultipartUploadResult.UploadId;\n }\n catch (e) {\n __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, \"m\", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail);\n }\n }, this.retryOptions);\n }\n /**\n * Uploads the provided chunk of data to the XML API using the previously created upload id.\n *\n * @param {number} partNumber the sequence number of this chunk.\n * @param {Buffer} chunk the chunk of data to be uploaded.\n * @param {string | false} validation whether or not to include the md5 hash in the headers to cause the server\n * to validate the chunk was not corrupted.\n * @returns {Promise<void>}\n */\n async uploadPart(partNumber, chunk, validation) {\n const url = `${this.baseUrl}?partNumber=${partNumber}&uploadId=${this.uploadId}`;\n let headers = __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, \"m\", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this);\n if (validation === 'md5') {\n const hash = createHash('md5').update(chunk).digest('base64');\n headers = {\n 'Content-MD5': hash,\n };\n }\n else if (validation === 'crc32c') {\n const crc = new CRC32C();\n crc.update(chunk);\n headers['x-goog-hash'] = `crc32c=${crc.toString()}`;\n }\n return AsyncRetry(async (bail) => {\n try {\n const res = await this.authClient.request({\n url,\n method: 'PUT',\n body: chunk,\n headers,\n });\n if (res.data && res.data.error) {\n throw res.data.error;\n }\n this.partsMap.set(partNumber, res.headers['etag']);\n }\n catch (e) {\n __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, \"m\", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail);\n }\n }, this.retryOptions);\n }\n /**\n * Sends the final request of the MPU to tell GCS the upload is now complete.\n *\n * @returns {Promise<void>}\n */\n async completeUpload() {\n const url = `${this.baseUrl}?uploadId=${this.uploadId}`;\n const sortedMap = new Map([...this.partsMap.entries()].sort((a, b) => a[0] - b[0]));\n const parts = [];\n for (const entry of sortedMap.entries()) {\n parts.push({ PartNumber: entry[0], ETag: entry[1] });\n }\n const body = `<CompleteMultipartUpload>${this.xmlBuilder.build(parts)}</CompleteMultipartUpload>`;\n return AsyncRetry(async (bail) => {\n try {\n const res = await this.authClient.request({\n headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, \"m\", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this),\n url,\n method: 'POST',\n body,\n });\n if (res.data && res.data.error) {\n throw res.data.error;\n }\n return res;\n }\n catch (e) {\n __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, \"m\", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail);\n return;\n }\n }, this.retryOptions);\n }\n /**\n * Aborts an multipart upload that is in progress. Once aborted, any parts in the process of being uploaded fail,\n * and future requests using the upload ID fail.\n *\n * @returns {Promise<void>}\n */\n async abortUpload() {\n const url = `${this.baseUrl}?uploadId=${this.uploadId}`;\n return AsyncRetry(async (bail) => {\n try {\n const res = await this.authClient.request({\n url,\n method: 'DELETE',\n });\n if (res.data && res.data.error) {\n throw res.data.error;\n }\n }\n catch (e) {\n __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, \"m\", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail);\n return;\n }\n }, this.retryOptions);\n }\n}\n_XMLMultiPartUploadHelper_instances = new WeakSet(), _XMLMultiPartUploadHelper_setGoogApiClientHeaders = function _XMLMultiPartUploadHelper_setGoogApiClientHeaders(headers = {}) {\n let headerFound = false;\n let userAgentFound = false;\n for (const [key, value] of Object.entries(headers)) {\n if (key.toLocaleLowerCase().trim() === 'x-goog-api-client') {\n headerFound = true;\n // Prepend command feature to value, if not already there\n if (!value.includes(GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED)) {\n headers[key] =\n `${value} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`;\n }\n }\n else if (key.toLocaleLowerCase().trim() === 'user-agent') {\n userAgentFound = true;\n }\n }\n // If the header isn't present, add it\n if (!headerFound) {\n headers['x-goog-api-client'] = `${getRuntimeTrackingString()} gccl/${packageJson.version} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`;\n }\n // If the User-Agent isn't present, add it\n if (!userAgentFound) {\n headers['User-Agent'] = getUserAgentString();\n }\n return headers;\n}, _XMLMultiPartUploadHelper_handleErrorResponse = function _XMLMultiPartUploadHelper_handleErrorResponse(err, bail) {\n if (this.bucket.storage.retryOptions.autoRetry &&\n this.bucket.storage.retryOptions.retryableErrorFn(err)) {\n throw err;\n }\n else {\n bail(err);\n }\n};\n/**\n * Create a TransferManager object to perform parallel transfer operations on a Cloud Storage bucket.\n *\n * @class\n * @hideconstructor\n *\n * @param {Bucket} bucket A {@link Bucket} instance\n *\n */\nexport class TransferManager {\n constructor(bucket) {\n this.bucket = bucket;\n }\n /**\n * @typedef {object} UploadManyFilesOptions\n * @property {number} [concurrencyLimit] The number of concurrently executing promises\n * to use when uploading the files.\n * @property {Function} [customDestinationBuilder] A function that will take the current path of a local file\n * and return a string representing a custom path to be used to upload the file to GCS.\n * @property {boolean} [skipIfExists] Do not upload the file if it already exists in\n * the bucket. This will set the precondition ifGenerationMatch = 0.\n * @property {string} [prefix] A prefix to append to all of the uploaded files.\n * @property {object} [passthroughOptions] {@link UploadOptions} Options to be passed through\n * to each individual upload operation.\n *\n */\n /**\n * Upload multiple files in parallel to the bucket. This is a convenience method\n * that utilizes {@link Bucket#upload} to perform the upload.\n *\n * @param {array | string} [filePathsOrDirectory] An array of fully qualified paths to the files or a directory name.\n * If a directory name is provided, the directory will be recursively walked and all files will be added to the upload list.\n * to be uploaded to the bucket\n * @param {UploadManyFilesOptions} [options] Configuration options.\n * @returns {Promise<UploadResponse[]>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n * const transferManager = new TransferManager(bucket);\n *\n * //-\n * // Upload multiple files in parallel.\n * //-\n * const response = await transferManager.uploadManyFiles(['/local/path/file1.txt, 'local/path/file2.txt']);\n * // Your bucket now contains:\n * // - \"local/path/file1.txt\" (with the contents of '/local/path/file1.txt')\n * // - \"local/path/file2.txt\" (with the contents of '/local/path/file2.txt')\n * const response = await transferManager.uploadManyFiles('/local/directory');\n * // Your bucket will now contain all files contained in '/local/directory' maintaining the subdirectory structure.\n * ```\n *\n */\n async uploadManyFiles(filePathsOrDirectory, options = {}) {\n var _a;\n if (options.skipIfExists && ((_a = options.passthroughOptions) === null || _a === void 0 ? void 0 : _a.preconditionOpts)) {\n options.passthroughOptions.preconditionOpts.ifGenerationMatch = 0;\n }\n else if (options.skipIfExists &&\n options.passthroughOptions === undefined) {\n options.passthroughOptions = {\n preconditionOpts: {\n ifGenerationMatch: 0,\n },\n };\n }\n const limit = pLimit(options.concurrencyLimit || DEFAULT_PARALLEL_UPLOAD_LIMIT);\n const promises = [];\n let allPaths = [];\n if (!Array.isArray(filePathsOrDirectory)) {\n for await (const curPath of this.getPathsFromDirectory(filePathsOrDirectory)) {\n allPaths.push(curPath);\n }\n }\n else {\n allPaths = filePathsOrDirectory;\n }\n for (const filePath of allPaths) {\n const stat = await fsp.lstat(filePath);\n if (stat.isDirectory()) {\n continue;\n }\n const passThroughOptionsCopy = {\n ...options.passthroughOptions,\n [GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.UPLOAD_MANY,\n };\n passThroughOptionsCopy.destination = options.customDestinationBuilder\n ? options.customDestinationBuilder(filePath, options)\n : filePath.split(path.sep).join(path.posix.sep);\n if (options.prefix) {\n passThroughOptionsCopy.destination = path.posix.join(...options.prefix.split(path.sep), passThroughOptionsCopy.destination);\n }\n promises.push(limit(() => this.bucket.upload(filePath, passThroughOptionsCopy)));\n }\n return Promise.all(promises);\n }\n /**\n * @typedef {object} DownloadManyFilesOptions\n * @property {number} [concurrencyLimit] The number of concurrently executing promises\n * to use when downloading the files.\n * @property {string} [prefix] A prefix to append to all of the downloaded files.\n * @property {string} [stripPrefix] A prefix to remove from all of the downloaded files.\n * @property {object} [passthroughOptions] {@link DownloadOptions} Options to be passed through\n * to each individual download operation.\n * @property {boolean} [skipIfExists] Do not download the file if it already exists in\n * the destination.\n *\n */\n /**\n * Download multiple files in parallel to the local filesystem. This is a convenience method\n * that utilizes {@link File#download} to perform the download.\n *\n * @param {array | string} [filesOrFolder] An array of file name strings or file objects to be downloaded. If\n * a string is provided this will be treated as a GCS prefix and all files with that prefix will be downloaded.\n * @param {DownloadManyFilesOptions} [options] Configuration options. Setting options.prefix or options.stripPrefix\n * or options.passthroughOptions.destination will cause the downloaded files to be written to the file system\n * instead of being returned as a buffer.\n * @returns {Promise<DownloadResponse[]>}\n *\n * @behavior\n * **Return shape change (breaking/observable behavior):**\n * - Previously, the returned array only contained entries for files that were successfully downloaded.\n * - This meant the response length could be smaller than the number of requested input files.\n * - Now, the returned array always has the same length and ordering as the input file list.\n * - Each index in the response corresponds directly to the same index in the input.\n * - Files that are skipped or fail will still have an entry in the result with:\n * - `skipped = true`\n * - `reason` populated with a {@link SkipReason}\n *\n * **New guarantees:**\n * - Response length === number of requested files\n * - Stable positional mapping between input and output\n * - All outcomes (success, skipped, error) are explicitly represented\n *\n * @security\n * **Path traversal protection (new):**\n * - File paths are resolved relative to the configured destination directory.\n * - Any file whose resolved path escapes the base destination directory is rejected.\n * - This prevents directory traversal attacks (e.g. `../../etc/passwd`).\n * - Such files are not downloaded and instead return:\n * - `skipped = true`\n * - `reason = SkipReason.PATH_TRAVERSAL`\n *\n * **Additional validation:**\n * - File names containing illegal drive prefixes (e.g. `C:\\`) are skipped\n * to prevent unintended writes on host systems.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n * const transferManager = new TransferManager(bucket);\n *\n * //-\n * // Download multiple files in parallel.\n * //-\n * const response = await transferManager.downloadManyFiles(['file1.txt', 'file2.txt']);\n * // The following files have been downloaded:\n * // - \"file1.txt\" (with the contents from my-bucket.file1.txt)\n * // - \"file2.txt\" (with the contents from my-bucket.file2.txt)\n * // response.length === 2 (always matches input length)\n * // Each entry corresponds to the respective input file\n * const response = await transferManager.downloadManyFiles([bucket.File('file1.txt'), bucket.File('file2.txt')]);\n * // The following files have been downloaded:\n * // - \"file1.txt\" (with the contents from my-bucket.file1.txt)\n * // - \"file2.txt\" (with the contents from my-bucket.file2.txt)\n * const response = await transferManager.downloadManyFiles('test-folder');\n * // All files with GCS prefix of 'test-folder' have been processed.\n * // Skipped or failed files are still included in the response.\n * ```\n *\n */\n async downloadManyFiles(filesOrFolder, options = {}) {\n var _a;\n const limit = pLimit(options.concurrencyLimit || DEFAULT_PARALLEL_DOWNLOAD_LIMIT);\n const promises = [];\n let files = [];\n const baseDestination = path.resolve(((_a = options.passthroughOptions) === null || _a === void 0 ? void 0 : _a.destination) || '.');\n if (!Array.isArray(filesOrFolder)) {\n const directoryFiles = await this.bucket.getFiles({\n prefix: filesOrFolder,\n });\n files = directoryFiles[0];\n }\n else {\n files = filesOrFolder.map(curFile => {\n if (typeof curFile === 'string') {\n return this.bucket.file(curFile);\n }\n return curFile;\n });\n }\n const stripRegexString = options.stripPrefix\n ? `^${options.stripPrefix}`\n : EMPTY_REGEX;\n const regex = new RegExp(stripRegexString, 'g');\n const finalResults = new Array(files.length);\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const hasIllegalDrive = /^[a-zA-Z]:/.test(file.name);\n if (hasIllegalDrive) {\n const skippedResult = [Buffer.alloc(0)];\n skippedResult.skipped = true;\n skippedResult.reason = SkipReason.ILLEGAL_CHARACTER;\n skippedResult.fileName = file.name;\n finalResults[i] = skippedResult;\n continue;\n }\n const fileName = options.stripPrefix\n ? file.name.replace(regex, '')\n : file.name;\n const dest = fileName.replace(/^[\\\\/]+/, '');\n const resolvedPath = path.resolve(baseDestination, dest);\n const relativeFromBase = path.relative(baseDestination, resolvedPath);\n const isOutside = path.isAbsolute(relativeFromBase) ||\n relativeFromBase.split(/[\\\\/]/).includes('..');\n if (isOutside) {\n const skippedResult = [Buffer.alloc(0)];\n skippedResult.skipped = true;\n skippedResult.reason = SkipReason.PATH_TRAVERSAL;\n skippedResult.fileName = file.name;\n skippedResult.localPath = resolvedPath;\n finalResults[i] = skippedResult;\n continue;\n }\n if (options.skipIfExists && existsSync(resolvedPath)) {\n const skippedResult = [Buffer.alloc(0)];\n skippedResult.skipped = true;\n skippedResult.reason = SkipReason.ALREADY_EXISTS;\n skippedResult.fileName = file.name;\n skippedResult.localPath = resolvedPath;\n finalResults[i] = skippedResult;\n continue;\n }\n promises.push(limit(async () => {\n const passThroughOptionsCopy = {\n ...options.passthroughOptions,\n destination: resolvedPath,\n [GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_MANY,\n };\n try {\n const destination = passThroughOptionsCopy.destination;\n if (destination.endsWith(path.sep) || destination.endsWith('/')) {\n await fsp.mkdir(destination, { recursive: true });\n const dirResp = [Buffer.alloc(0)];\n dirResp.skipped = false;\n dirResp.fileName = file.name;\n dirResp.localPath = destination;\n finalResults[i] = dirResp;\n return;\n }\n await fsp.mkdir(path.dirname(destination), { recursive: true });\n const resp = (await file.download(passThroughOptionsCopy));\n finalResults[i] = {\n ...resp,\n skipped: false,\n fileName: file.name,\n localPath: destination,\n };\n }\n catch (err) {\n const errorResp = [Buffer.alloc(0)];\n errorResp.skipped = true;\n errorResp.reason = SkipReason.DOWNLOAD_ERROR;\n errorResp.fileName = file.name;\n errorResp.localPath = resolvedPath;\n errorResp.error = err;\n finalResults[i] = errorResp;\n }\n }));\n }\n await Promise.all(promises);\n return finalResults;\n }\n /**\n * @typedef {object} DownloadFileInChunksOptions\n * @property {number} [concurrencyLimit] The number of concurrently executing promises\n * to use when downloading the file.\n * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be downloaded.\n * @property {'crc32c' | boolean} [validation] Whether or not to perform a CRC32C validation check when download is complete. Defaults to 'crc32c'.\n * @property {boolean} [noReturnData] Whether or not to return the downloaded data. A `true` value here would be useful for files with a size that will not fit into memory.\n *\n */\n /**\n * Download a large file in chunks utilizing parallel download operations. This is a convenience method\n * that utilizes {@link File#download} to perform the download.\n *\n * @param {File | string} fileOrName {@link File} to download.\n * @param {DownloadFileInChunksOptions} [options] Configuration options.\n * @returns {Promise<void | DownloadResponse>}\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n * const transferManager = new TransferManager(bucket);\n *\n * //-\n * // Download a large file in chunks utilizing parallel operations.\n * // CRC32C validation is performed by default.\n * //-\n * const response = await transferManager.downloadFileInChunks(bucket.file('large-file.txt');\n * // Your local directory now contains:\n * // - \"large-file.txt\" (with the contents from my-bucket.large-file.txt)\n *\n * //-\n * // To disable validation:\n * //-\n * const responseWithoutValidation = await transferManager.downloadFileInChunks(\n * bucket.file('large-file.txt'),\n * { validation: false }\n * );\n * ```\n *\n */\n async downloadFileInChunks(fileOrName, options = {}) {\n let chunkSize = options.chunkSizeBytes || DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE;\n let limit = pLimit(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT);\n const noReturnData = Boolean(options.noReturnData);\n const promises = [];\n const file = typeof fileOrName === 'string'\n ? this.bucket.file(fileOrName)\n : fileOrName;\n // Default validation to 'crc32c' if undefined or true, otherwise respect user's value\n const validation = options.validation === undefined || options.validation === true\n ? 'crc32c'\n : options.validation;\n const fileInfo = await file.get();\n const size = parseInt(fileInfo[0].metadata.size.toString());\n // If the file size does not meet the threshold download it as a single chunk.\n if (size < DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD) {\n limit = pLimit(1);\n chunkSize = size;\n }\n let start = 0;\n const filePath = options.destination || path.basename(file.name);\n const fileToWrite = await fsp.open(filePath, 'w');\n while (start < size) {\n const chunkStart = start;\n let chunkEnd = start + chunkSize - 1;\n chunkEnd = chunkEnd > size ? size : chunkEnd;\n promises.push(limit(async () => {\n const resp = await file.download({\n start: chunkStart,\n end: chunkEnd,\n [GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_SHARDED,\n validation: false, // Disable validation on individual chunks\n });\n const result = await fileToWrite.write(resp[0], 0, resp[0].length, chunkStart);\n if (noReturnData)\n return;\n return result.buffer;\n }));\n start += chunkSize;\n }\n let chunks;\n try {\n chunks = await Promise.all(promises);\n }\n finally {\n await fileToWrite.close();\n }\n // Check against the defaulted validation option\n if (validation === 'crc32c' && fileInfo[0].metadata.crc32c) {\n const downloadedCrc32C = await CRC32C.fromFile(filePath);\n if (!downloadedCrc32C.validate(fileInfo[0].metadata.crc32c)) {\n const mismatchError = new RequestError(FileExceptionMessages.DOWNLOAD_MISMATCH);\n mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH';\n throw mismatchError;\n }\n }\n if (noReturnData)\n return;\n return [Buffer.concat(chunks, size)];\n }\n /**\n * @typedef {object} UploadFileInChunksOptions\n * @property {number} [concurrencyLimit] The number of concurrently executing promises\n * to use when uploading the file.\n * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be uploaded.\n * @property {string} [uploadName] Name of the file when saving to GCS. If omitted the name is taken from the file path.\n * @property {number} [maxQueueSize] The number of chunks to be uploaded to hold in memory concurrently. If not specified\n * defaults to the specified concurrency limit.\n * @property {string} [uploadId] If specified attempts to resume a previous upload.\n * @property {Map} [partsMap] If specified alongside uploadId, attempts to resume a previous upload from the last chunk\n * specified in partsMap\n * @property {object} [headers] headers to be sent when initiating the multipart upload.\n * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-multipart#request_headers| Request Headers: Initiate a Multipart Upload}\n * @property {boolean} [autoAbortFailure] boolean to indicate if an in progress upload session will be automatically aborted upon failure. If not set,\n * failures will be automatically aborted.\n *\n */\n /**\n * Upload a large file in chunks utilizing parallel upload operations. If the upload fails, an uploadId and\n * map containing all the successfully uploaded parts will be returned to the caller. These arguments can be used to\n * resume the upload.\n *\n * @param {string} [filePath] The path of the file to be uploaded\n * @param {UploadFileInChunksOptions} [options] Configuration options.\n * @param {MultiPartHelperGenerator} [generator] A function that will return a type that implements the MPU interface. Most users will not need to use this.\n * @returns {Promise<void>} If successful a promise resolving to void, otherwise a error containing the message, uploadId, and parts map.\n *\n * @example\n * ```\n * const {Storage} = require('@google-cloud/storage');\n * const storage = new Storage();\n * const bucket = storage.bucket('my-bucket');\n * const transferManager = new TransferManager(bucket);\n *\n * //-\n * // Upload a large file in chunks utilizing parallel operations.\n * //-\n * const response = await transferManager.uploadFileInChunks('large-file.txt');\n * // Your bucket now contains:\n * // - \"large-file.txt\"\n * ```\n *\n *\n */\n async uploadFileInChunks(filePath, options = {}, generator = defaultMultiPartGenerator) {\n var _a;\n const chunkSize = options.chunkSizeBytes || UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE;\n const limit = pLimit(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT);\n const maxQueueSize = options.maxQueueSize ||\n options.concurrencyLimit ||\n DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT;\n const fileName = options.uploadName || path.basename(filePath);\n const mpuHelper = generator(this.bucket, fileName, options.uploadId, options.partsMap);\n let partNumber = 1;\n let promises = [];\n const validation = (_a = options.validation) !== null && _a !== void 0 ? _a : 'crc32c';\n try {\n if (options.uploadId === undefined) {\n await mpuHelper.initiateUpload(options.headers);\n }\n const startOrResumptionByte = mpuHelper.partsMap.size * chunkSize;\n const readStream = createReadStream(filePath, {\n highWaterMark: chunkSize,\n start: startOrResumptionByte,\n });\n // p-limit only limits the number of running promises. We do not want to hold an entire\n // large file in memory at once so promises acts a queue that will hold only maxQueueSize in memory.\n for await (const curChunk of readStream) {\n if (promises.length >= maxQueueSize) {\n await Promise.all(promises);\n promises = [];\n }\n promises.push(limit(() => mpuHelper.uploadPart(partNumber++, curChunk, validation)));\n }\n await Promise.all(promises);\n return await mpuHelper.completeUpload();\n }\n catch (e) {\n if ((options.autoAbortFailure === undefined || options.autoAbortFailure) &&\n mpuHelper.uploadId) {\n try {\n await mpuHelper.abortUpload();\n return;\n }\n catch (e) {\n throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap);\n }\n }\n throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap);\n }\n }\n async *getPathsFromDirectory(directory) {\n const filesAndSubdirectories = await fsp.readdir(directory, {\n withFileTypes: true,\n });\n for (const curFileOrDirectory of filesAndSubdirectories) {\n const fullPath = path.join(directory, curFileOrDirectory.name);\n curFileOrDirectory.isDirectory()\n ? yield* this.getPathsFromDirectory(fullPath)\n : yield fullPath;\n }\n }\n}\n"],"x_google_ignoreList":[0,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,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133],"mappings":";;;;;;;;;;;;;;;;;;;;CACA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,wBAAwB,QAAQ,wBAAwB,KAAK;CACrE,IAAMA,aAAAA,U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