experimental-ash 0.24.0 → 0.24.2
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.
- package/CHANGELOG.md +19 -0
- package/dist/src/chunks/authored-module-loader-DcCfCiBm.js +4 -0
- package/dist/src/chunks/client-DLHAGI2g.js +4 -0
- package/dist/src/chunks/dev-authored-source-watcher-CBID_Dwh.js +1 -0
- package/dist/src/chunks/{errors-DsO9xmQL.js → errors-HYWjHxV6.js} +1 -1
- package/dist/src/chunks/{gray-matter-BxS7ZG-J.js → gray-matter-D-9jHwOT.js} +4 -4
- package/dist/src/chunks/host-zBy9FyyX.js +70 -0
- package/dist/src/chunks/{jsdist-M7JFZoA4.js → jsdist-BkeWZ7EZ.js} +61 -61
- package/dist/src/chunks/package-HUaeub_D.js +1 -0
- package/dist/src/chunks/paths-CebY5GCi.js +89 -0
- package/dist/src/chunks/{picocolors-Bq-tZK9u.js → picocolors-aAkqW4On.js} +1 -1
- package/dist/src/chunks/token-D98SQdvs.js +1 -0
- package/dist/src/chunks/{url-BVRhVE2O.js → url-JdCGA634.js} +1 -1
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/dev/environment.d.ts +16 -2
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/input-requests.js +1 -1
- package/dist/src/cli/dev/repl.js +3 -3
- package/dist/src/cli/dev/url.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/cli/ui/output.js +1 -1
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/client/index.js +1 -0
- package/dist/src/compiled/.vendor-stamp.json +7 -6
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/google/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/_slack-web-api.d.ts +7 -0
- package/dist/src/compiled/@chat-adapter/slack/index.d.ts +418 -109
- package/dist/src/compiled/@chat-adapter/slack/index.js +31 -27
- package/dist/src/compiled/@chat-adapter/slack/package.json +1 -1
- package/dist/src/compiled/@chat-adapter/state-memory/index.d.ts +8 -2
- package/dist/src/compiled/@chat-adapter/state-memory/index.js +1 -1
- package/dist/src/compiled/@chat-adapter/state-memory/package.json +1 -1
- package/dist/src/compiled/@opentelemetry/api/index.js +1 -1
- package/dist/src/compiled/@vercel/sandbox/index.js +19 -17
- package/dist/src/compiled/@vercel/sandbox/package.json +1 -1
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/runtime.js +22 -22
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/_chunks/node/auth-ZhCJAHxl.js +2 -0
- package/dist/src/compiled/_chunks/node/{dist-BdWHjlRQ.js → dist-BQYUcBqu.js} +31 -31
- package/dist/src/compiled/_chunks/node/{chunk-Dd2tEFlW.js → dist-BdTs18CF.js} +1 -1
- package/dist/src/compiled/_chunks/node/retry-DkR2H1Y0.js +1 -0
- package/dist/src/compiled/_chunks/node/token-CoIbMZkq.js +1 -0
- package/dist/src/compiled/_chunks/node/{version-BMyZn3Y2.js → version-D4IYmfaS.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/coerce-BhzIW-Hm.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{compat-CIROS3w4.js → compat-DcEvieoj.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{core-DOVmxHH8.js → core-XWIi7wKc.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/{dist-C7wPwOI9.js → dist-DO14ZaQj.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{dist-CpUQh3NH.js → dist-DZZY3Zyp.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-DOMbNs-S.js +51 -0
- package/dist/src/compiled/_chunks/workflow/{schemas-DFZoEyCn.js → schemas-DmgDnhW3.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/sleep-CRjce49s.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{src-ClRYdO4-.js → src-B54rYDvB.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/symbols-D8paKc8P.js +9 -0
- package/dist/src/compiled/_chunks/workflow/{token-CsNmv7KW.js → token-D9z1dMB6.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{token-j5Cl4rrs.js → token-DV7rQw_t.js} +1 -1
- package/dist/src/compiled/chat/index.d.ts +6 -3143
- package/dist/src/compiled/chat/index.js +1 -1
- package/dist/src/compiled/chat/{jsx-runtime-DxGwoLu2.d.ts → jsx-runtime-CFq1K_Ve.d.ts} +1 -1
- package/dist/src/compiled/chat/package.json +1 -1
- package/dist/src/compiled/jose/index.js +2 -2
- package/dist/src/compiled/jsonc-parser/LICENSE.md +21 -0
- package/dist/src/compiled/jsonc-parser/index.d.ts +13 -0
- package/dist/src/compiled/jsonc-parser/index.js +15 -0
- package/dist/src/compiled/jsonc-parser/package.json +7 -0
- package/dist/src/compiled/just-bash/index.js +773 -773
- package/dist/src/compiled/just-bash/package.json +1 -1
- package/dist/src/compiled/turndown/index.js +1 -1
- package/dist/src/compiled/zod/index.js +1 -1
- package/dist/src/compiled/zod-validation-error/index.js +1 -1
- package/dist/src/compiler/manifest.d.ts +36 -3
- package/dist/src/compiler/manifest.js +5 -1
- package/dist/src/compiler/module-map.js +8 -0
- package/dist/src/compiler/normalize-manifest.js +1 -0
- package/dist/src/compiler/normalize-subagent.d.ts +3 -2
- package/dist/src/compiler/normalize-subagent.js +112 -3
- package/dist/src/compiler/remote-agent-node.d.ts +20 -0
- package/dist/src/compiler/remote-agent-node.js +19 -0
- package/dist/src/discover/discover-subagent.js +35 -2
- package/dist/src/discover/grammar.d.ts +1 -0
- package/dist/src/discover/grammar.js +5 -0
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/evals/loaders/yaml.js +1 -1
- package/dist/src/evals/runner/discover.js +1 -1
- package/dist/src/evals/runner/execute-suite.js +1 -1
- package/dist/src/evals/runner/reporters/console.js +1 -1
- package/dist/src/evals/scorers/autoevals-client.js +1 -1
- package/dist/src/evals/scorers/autoevals.js +1 -1
- package/dist/src/evals/scorers/json.js +1 -1
- package/dist/src/evals/scorers/run.js +1 -1
- package/dist/src/evals/scorers/sql.js +1 -1
- package/dist/src/evals/scorers/text.js +1 -1
- package/dist/src/execution/connection-auth-steps.js +2 -0
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-asset-import-plugin.d.ts +5 -0
- package/dist/src/internal/authored-asset-import-plugin.js +141 -0
- package/dist/src/internal/authored-module-bundle.d.ts +4 -0
- package/dist/src/internal/authored-module-bundle.js +19 -0
- package/dist/src/internal/authored-module-loader.d.ts +6 -0
- package/dist/src/internal/authored-module-loader.js +114 -125
- package/dist/src/internal/authored-package-tsconfig-paths.d.ts +9 -0
- package/dist/src/internal/authored-package-tsconfig-paths.js +209 -0
- package/dist/src/internal/nitro/host/channel-routes.d.ts +9 -2
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +12 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +19 -3
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +7 -3
- package/dist/src/internal/nitro/host/start-development-server.js +2 -0
- package/dist/src/internal/workflow-bundle/builder-support.js +1 -33
- package/dist/src/public/agents/auth.d.ts +30 -0
- package/dist/src/public/agents/auth.js +37 -0
- package/dist/src/public/definitions/remote-agent.d.ts +25 -0
- package/dist/src/public/definitions/remote-agent.js +11 -0
- package/dist/src/public/index.d.ts +1 -0
- package/dist/src/public/index.js +1 -0
- package/dist/src/public/next/index.d.ts +4 -4
- package/dist/src/public/next/index.js +16 -25
- package/dist/src/runtime/connections/mcp-client.js +3 -2
- package/dist/src/runtime/connections/types.d.ts +24 -0
- package/dist/src/runtime/resolve-agent-graph.js +57 -0
- package/dist/src/runtime/sessions/turn.d.ts +17 -5
- package/dist/src/runtime/subagents/registry.d.ts +6 -6
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +20 -0
- package/package.json +22 -17
- package/dist/src/chunks/authored-module-loader-XcFLnl49.js +0 -2
- package/dist/src/chunks/client-nshDsWNF.js +0 -4
- package/dist/src/chunks/dev-authored-source-watcher-B4PaZGUr.js +0 -7
- package/dist/src/chunks/host-DsW72Q-w.js +0 -65
- package/dist/src/chunks/package-DmsQgn4v.js +0 -1
- package/dist/src/chunks/paths-OknjaYR8.js +0 -89
- package/dist/src/chunks/prewarm-B4YblQ5m.js +0 -6
- package/dist/src/chunks/token-DtoyQZy2.js +0 -1
- package/dist/src/chunks/token-util-CHjOk3A7.js +0 -1
- package/dist/src/compiled/_chunks/node/auth-vbe4XEEK.js +0 -2
- package/dist/src/compiled/_chunks/node/dist-DMSq2ehP.js +0 -1
- package/dist/src/compiled/_chunks/node/retry-BOcy5BbJ.js +0 -1
- package/dist/src/compiled/_chunks/node/token-D-BTJHoU.js +0 -1
- package/dist/src/compiled/_chunks/workflow/coerce-Dh0wa7P9.js +0 -1
- package/dist/src/compiled/_chunks/workflow/context-errors-Bbvvp-li.js +0 -6
- package/dist/src/compiled/_chunks/workflow/dist-C_oiE-l7.js +0 -40
- package/dist/src/compiled/_chunks/workflow/resume-hook-C3VWUPii.js +0 -12
- package/dist/src/compiled/_chunks/workflow/sleep-QTkC1VFe.js +0 -1
- package/dist/src/compiled/_chunks/workflow/symbols-QezhMuLg.js +0 -4
- package/dist/src/compiled/chat/_workflow-serde.d.ts +0 -5
- /package/dist/src/chunks/{chunk-8L7ocgPr.js → chunk-DSjMdhoD.js} +0 -0
- /package/dist/src/chunks/{guards-CjJ3lmju.js → guards-26p6sOw3.js} +0 -0
- /package/dist/src/chunks/{input-requests-BsBi7_5K.js → input-requests-DJiy6dG9.js} +0 -0
- /package/dist/src/chunks/{runtime-model-BWu6M_hq.js → runtime-model-Dh0Nz64z.js} +0 -0
- /package/dist/src/chunks/{types-MZUhN0Zy.js → types-DDA2QUED.js} +0 -0
- /package/dist/src/compiled/_chunks/workflow/{chunk-DHhdAPOb.js → chunk-DSjMdhoD.js} +0 -0
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import{a as e,
|
|
1
|
+
import{a as e,c as t,i as n,o as r,r as i,s as a}from"../../_chunks/node/dist-BdTs18CF.js";import{At as o,Dt as s,I as c,K as l,L as u,Mt as d,Q as f,bt as p,ct as m,dt as h,et as g,ft as _,gt as v,ht as y,it as b,k as x,kt as S,l as C,lt as w,mt as T,q as E,st as D,ut as O,vt as k,wt as A,y as j,z as M}from"../../_chunks/node/dist-BQYUcBqu.js";import{n as N,t as P}from"../../_chunks/node/retry-DkR2H1Y0.js";import{AsyncLocalStorage as F}from"async_hooks";import I,{createHmac as L,timingSafeEqual as R}from"crypto";function z(e){return l(e)?e:typeof e==`object`&&e&&`card`in e?e.card:null}function B(e){return typeof e==`object`&&e&&`files`in e?e.files??[]:[]}var V=class extends Error{adapter;code;constructor(e,t,n){super(e),this.name=`AdapterError`,this.adapter=t,this.code=n}},ee=class extends V{retryAfter;constructor(e,t){super(`Rate limited by ${e}${t?`, retry after ${t}s`:``}`,e,`RATE_LIMITED`),this.name=`AdapterRateLimitError`,this.retryAfter=t}},H=class extends V{constructor(e,t){super(t||`Authentication failed for ${e}`,e,`AUTH_FAILED`),this.name=`AuthenticationError`}},U=class extends V{constructor(e,t){super(t,e,`VALIDATION_ERROR`),this.name=`ValidationError`}},W=class extends V{originalError;constructor(e,t,n){super(t||`Network error communicating with ${e}`,e,`NETWORK_ERROR`),this.name=`NetworkError`,this.originalError=n}};async function te(e,t){let{platform:n,throwOnUnsupported:r=!0}=t;if(Buffer.isBuffer(e))return e;if(e instanceof ArrayBuffer)return Buffer.from(e);if(e instanceof Blob){let t=await e.arrayBuffer();return Buffer.from(t)}if(r)throw new U(n,`Unsupported file data type`);return null}var ne={slack:{primary:`primary`,danger:`danger`},gchat:{primary:`primary`,danger:`danger`},teams:{primary:`positive`,danger:`destructive`},discord:{primary:`primary`,danger:`danger`}};function re(e){return t=>u(t,e)}function ie(e,t){if(e)return ne[t][e]}function ae(e,t={}){let{boldFormat:n=`*`,lineBreak:r=`
|
|
2
2
|
`,platform:i}=t,a=i?re(i):e=>e,o=[];e.title&&o.push(`${n}${a(e.title)}${n}`),e.subtitle&&o.push(a(e.subtitle));for(let t of e.children){let e=oe(t,a);e&&o.push(e)}return o.join(r)}function oe(e,t){switch(e.type){case`text`:return t(e.content);case`link`:return`${t(e.label)} (${e.url})`;case`fields`:return e.children.map(e=>`${t(e.label)}: ${t(e.value)}`).join(`
|
|
3
3
|
`);case`actions`:return null;case`section`:return e.children.map(e=>oe(e,t)).filter(Boolean).join(`
|
|
4
|
-
`);case`table`:return S(e.headers,e.rows);case`divider`:return`---`;default:return l(e)}}var se=`aes-256-gcm`,ce=12,G=16,le=/^[0-9a-fA-F]{64}$/;function ue(e,t){let n=I.randomBytes(ce),r=I.createCipheriv(se,t,n,{authTagLength:G}),i=Buffer.concat([r.update(e,`utf8`),r.final()]),a=r.getAuthTag();return{iv:n.toString(`base64`),data:i.toString(`base64`),tag:a.toString(`base64`)}}function de(e,t){let n=Buffer.from(e.iv,`base64`),r=Buffer.from(e.data,`base64`),i=Buffer.from(e.tag,`base64`),a=I.createDecipheriv(se,t,n,{authTagLength:G});return a.setAuthTag(i),Buffer.concat([a.update(r),a.final()]).toString(`utf8`)}function fe(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.iv==`string`&&typeof t.data==`string`&&typeof t.tag==`string`}function pe(e){let t=e.trim(),n=le.test(t),r=Buffer.from(t,n?`hex`:`base64`);if(r.length!==32)throw Error(`Encryption key must decode to exactly 32 bytes (received ${r.length}). Use a 64-char hex string or 44-char base64 string.`);return r}var me=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ErrorCode=void 0,e.websocketErrorWithOriginal=r,e.platformErrorFromEvent=i,e.noReplyReceivedError=a,e.sendWhileDisconnectedError=o,e.sendWhileNotReadyError=s;var t;(function(e){e.SendWhileDisconnectedError=`slack_socket_mode_send_while_disconnected_error`,e.SendWhileNotReadyError=`slack_socket_mode_send_while_not_ready_error`,e.SendMessagePlatformError=`slack_socket_mode_send_message_platform_error`,e.WebsocketError=`slack_socket_mode_websocket_error`,e.NoReplyReceivedError=`slack_socket_mode_no_reply_received_error`,e.InitializationError=`slack_socket_mode_initialization_error`})(t||(e.ErrorCode=t={}));function n(e,t){let n=e;return n.code=t,n}function r(e){let r=n(Error(e.message),t.WebsocketError);return r.original=e,r}function i(e){let r=n(Error(`An API error occurred: ${e.error.msg}`),t.SendMessagePlatformError);return r.data=e,r}function a(){return n(Error(`Message sent but no server acknowledgement was received. This may be caused by the client changing connection state rather than any issue with the specific message. Check before resending.`),t.NoReplyReceivedError)}function o(){return n(Error(`Failed to send a WebSocket message as the client is not connected`),t.NoReplyReceivedError)}function s(){return n(Error(`Failed to send a WebSocket message as the client is not ready`),t.NoReplyReceivedError)}})),he=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ConsoleLogger=e.LogLevel=void 0;var t;(function(e){e.ERROR=`error`,e.WARN=`warn`,e.INFO=`info`,e.DEBUG=`debug`})(t||(e.LogLevel=t={}));var n=class e{constructor(){this.level=t.INFO,this.name=``}getLevel(){return this.level}setLevel(e){this.level=e}setName(e){this.name=e}debug(...n){e.isMoreOrEqualSevere(t.DEBUG,this.level)&&console.debug(e.labels.get(t.DEBUG),this.name,...n)}info(...n){e.isMoreOrEqualSevere(t.INFO,this.level)&&console.info(e.labels.get(t.INFO),this.name,...n)}warn(...n){e.isMoreOrEqualSevere(t.WARN,this.level)&&console.warn(e.labels.get(t.WARN),this.name,...n)}error(...n){e.isMoreOrEqualSevere(t.ERROR,this.level)&&console.error(e.labels.get(t.ERROR),this.name,...n)}static isMoreOrEqualSevere(t,n){return e.severity[t]>=e.severity[n]}};e.ConsoleLogger=n,n.labels=(()=>{let e=Object.entries(t).map(([e,t])=>[t,`[${e}] `]);return new Map(e)})(),n.severity={[t.ERROR]:400,[t.WARN]:300,[t.INFO]:200,[t.DEBUG]:100}})),ge=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LogLevel=void 0;let t=he();Object.defineProperty(e,`LogLevel`,{enumerable:!0,get:function(){return t.LogLevel}});let n=0;e.default={getLogger:function(e,r,i){let a=n;n+=1;let o=i===void 0?new t.ConsoleLogger:i;return o.setName(`socket-mode:${e}:${a}`),r!==void 0&&o.setLevel(r),o}}})),_e=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ErrorCode=void 0,e.errorWithCode=n,e.requestErrorWithOriginal=r,e.httpErrorFromResponse=i,e.platformErrorFromResult=a,e.rateLimitedErrorWithDelay=o;var t;(function(e){e.RequestError=`slack_webapi_request_error`,e.HTTPError=`slack_webapi_http_error`,e.PlatformError=`slack_webapi_platform_error`,e.RateLimitedError=`slack_webapi_rate_limited_error`,e.FileUploadInvalidArgumentsError=`slack_webapi_file_upload_invalid_args_error`,e.FileUploadReadFileDataError=`slack_webapi_file_upload_read_file_data_error`})(t||(e.ErrorCode=t={}));function n(e,t){let n=e;return n.code=t,n}function r(e,r){let i=n(Error(`A request error occurred: ${e.message}`),t.RequestError);return r&&(i.original=e),i}function i(e){let r=n(Error(`An HTTP protocol error occurred: statusCode = ${e.status}`),t.HTTPError);r.statusCode=e.status,r.statusMessage=e.statusText;let i={};for(let t of Object.keys(e.headers))t&&e.headers[t]&&(i[t]=e.headers[t]);return r.headers=i,r.body=e.data,r}function a(e){let r=n(Error(`An API error occurred: ${e.error}`),t.PlatformError);return r.data=e,r}function o(e){let r=n(Error(`A rate-limit has been reached, you may retry this request in ${e} seconds`),t.RateLimitedError);return r.retryAfter=e,r}})),ve=a(((e,t)=>{t.exports={name:`@slack/web-api`,version:`7.15.2`,description:`Official library for using the Slack Platform's Web API`,author:`Slack Technologies, LLC`,license:`MIT`,keywords:[`slack`,`web-api`,`bot`,`client`,`http`,`api`,`proxy`,`rate-limiting`,`pagination`],main:`dist/index.js`,types:`./dist/index.d.ts`,files:[`dist/**/*`],engines:{node:`>= 18`,npm:`>= 8.6.0`},repository:{type:`git`,url:`git+https://github.com/slackapi/node-slack-sdk.git`},homepage:`https://docs.slack.dev/tools/node-slack-sdk/web-api/`,publishConfig:{access:`public`},bugs:{url:`https://github.com/slackapi/node-slack-sdk/issues`},scripts:{build:`npm run build:clean && tsc`,"build:clean":`shx rm -rf ./dist`,docs:`npx typedoc --plugin typedoc-plugin-markdown`,prepack:`npm run build`,test:`npm run build && bash -c 'node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts'`,"test:coverage":`npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts`,"test:integration":`npm run build && node test/integration/commonjs-project/index.js && node test/integration/esm-project/index.mjs && npm run test:integration:ts`,"test:integration:ts":`cd test/integration/ts-4.7-project && npm i && npm run build`,"test:types":`tsd`,watch:`npx nodemon --watch 'src' --ext 'ts' --exec npm run build`},dependencies:{"@slack/logger":`^4.0.1`,"@slack/types":`^2.21.0`,"@types/node":`>=18`,"@types/retry":`0.12.0`,axios:`^1.15.0`,eventemitter3:`^5.0.1`,"form-data":`^4.0.4`,"is-electron":`2.2.2`,"is-stream":`^2`,"p-queue":`^6`,"p-retry":`^4`,retry:`^0.13.1`},devDependencies:{"@types/busboy":`^1.5.4`,"@types/sinon":`^21`,busboy:`^1`,nock:`^14`,sinon:`^21`,tsd:`^0.33.0`},tsd:{directory:`test/types`}}})),ye=a((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;o<a.length;o++)a[o]!==`default`&&n(i,t,a[o]);return r(i,t),i}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.addAppMetadata=f,e.getUserAgent=p;let a=i(t(`node:os`)),o=t(`node:path`),s=ve();function c(e){return e.replace(`/`,`:`)}function l(e){let t=``;for(let n of e)t+=n.charCodeAt(0)<=255?n:encodeURIComponent(n);return t}let u=`${c(s.name)}/${s.version} ${l((0,o.basename)(process.title))}/${process.version.replace(`v`,``)} ${a.platform()}/${a.release()}`,d={};function f({name:e,version:t}){d[c(e)]=t}function p(){let e=Object.entries(d).map(([e,t])=>`${e}/${t}`).join(` `);return(e.length>0?`${e} `:``)+u}})),be=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LogLevel=void 0,e.getLogger=i;let t=he();var n=he();Object.defineProperty(e,`LogLevel`,{enumerable:!0,get:function(){return n.LogLevel}});let r=0;function i(e,n,i){let a=r;r+=1;let o=i===void 0?new t.ConsoleLogger:i;return o.setName(`web-api:${e}:${a}`),n!==void 0&&o.setLevel(n),o}})),xe=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.rapidRetryPolicy=e.fiveRetriesInFiveMinutes=e.tenRetriesInAboutThirtyMinutes=void 0,e.tenRetriesInAboutThirtyMinutes={retries:10,factor:1.96821,randomize:!0},e.fiveRetriesInFiveMinutes={retries:5,factor:3.86},e.rapidRetryPolicy={minTimeout:0,maxTimeout:1},e.default={tenRetriesInAboutThirtyMinutes:e.tenRetriesInAboutThirtyMinutes,fiveRetriesInFiveMinutes:e.fiveRetriesInFiveMinutes,rapidRetryPolicy:e.rapidRetryPolicy}})),Se=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Ce=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),we=a((e=>{var t=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(e,`__esModule`,{value:!0}),e.ChatStreamer=void 0,e.ChatStreamer=class{constructor(e,t,n,r){this.buffer=``,this.client=e,this.logger=t,this.options={buffer_size:r.buffer_size??256},this.state=`starting`,this.streamArgs=n}async append(e){if(this.state===`completed`)throw Error(`failed to append stream: stream state is ${this.state}`);let{markdown_text:n,chunks:r}=e,i=t(e,[`markdown_text`,`chunks`]);if(i.token&&(this.token=i.token),n&&(this.buffer+=n),this.buffer.length>=this.options.buffer_size||r)return await this.flushBuffer(Object.assign({chunks:r},i));let a={bufferLength:this.buffer.length,bufferSize:this.options.buffer_size,channel:this.streamArgs.channel,recipientTeamId:this.streamArgs.recipient_team_id,recipientUserId:this.streamArgs.recipient_user_id,threadTs:this.streamArgs.thread_ts};return this.logger.debug(`ChatStreamer appended to buffer: ${JSON.stringify(a)}`),null}async stop(e){if(this.state===`completed`)throw Error(`failed to stop stream: stream state is ${this.state}`);let n=e??{},{markdown_text:r,chunks:i}=n,a=t(n,[`markdown_text`,`chunks`]);if(a.token&&(this.token=a.token),r&&(this.buffer+=r),!this.streamTs){let e=await this.client.chat.startStream(Object.assign(Object.assign({},this.streamArgs),{token:this.token}));if(!e.ts)throw Error(`failed to stop stream: stream not started`);this.streamTs=e.ts,this.state=`in_progress`}let o=[];this.buffer.length>0&&o.push({type:`markdown_text`,text:this.buffer}),i&&o.push(...i);let s=await this.client.chat.stopStream(Object.assign({token:this.token,channel:this.streamArgs.channel,ts:this.streamTs,chunks:o},a));return this.state=`completed`,s}async flushBuffer(e){let n=e??{},{chunks:r}=n,i=t(n,[`chunks`]),a=[];if(this.buffer.length>0&&a.push({type:`markdown_text`,text:this.buffer}),r&&a.push(...r),!this.streamTs){let e=await this.client.chat.startStream(Object.assign(Object.assign(Object.assign({},this.streamArgs),{token:this.token,chunks:a}),i));return this.buffer=``,this.streamTs=e.ts,this.state=`in_progress`,e}let o=await this.client.chat.appendStream(Object.assign({token:this.token,channel:this.streamArgs.channel,ts:this.streamTs,chunks:a},i));return this.buffer=``,o}}})),Te=a(((e,n)=>{var r=t(`stream`).Stream,i=t(`util`);n.exports=a;function a(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i.inherits(a,r),a.create=function(e,t){var n=new this;for(var r in t||={},t)n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on(`error`,function(){}),n.pauseStream&&e.pause(),n},Object.defineProperty(a.prototype,`readable`,{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),a.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},a.prototype.resume=function(){this._released||this.release(),this.source.resume()},a.prototype.pause=function(){this.source.pause()},a.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},a.prototype.pipe=function(){var e=r.prototype.pipe.apply(this,arguments);return this.resume(),e},a.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]===`data`&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)},a.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e=`DelayedStream#maxDataSize of `+this.maxDataSize+` bytes exceeded.`;this.emit(`error`,Error(e))}}})),Ee=a(((e,n)=>{var r=t(`util`),i=t(`stream`).Stream,a=Te();n.exports=o;function o(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}r.inherits(o,i),o.create=function(e){var t=new this;for(var n in e||={},e)t[n]=e[n];return t},o.isStreamLike=function(e){return typeof e!=`function`&&typeof e!=`string`&&typeof e!=`boolean`&&typeof e!=`number`&&!Buffer.isBuffer(e)},o.prototype.append=function(e){if(o.isStreamLike(e)){if(!(e instanceof a)){var t=a.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on(`data`,this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},o.prototype.pipe=function(e,t){return i.prototype.pipe.call(this,e,t),this.resume(),e},o.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}},o.prototype._realGetNext=function(){var e=this._streams.shift();if(e===void 0){this.end();return}if(typeof e!=`function`){this._pipeNext(e);return}e(function(e){o.isStreamLike(e)&&(e.on(`data`,this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this))},o.prototype._pipeNext=function(e){if(this._currentStream=e,o.isStreamLike(e)){e.on(`end`,this._getNext.bind(this)),e.pipe(this,{end:!1});return}var t=e;this.write(t),this._getNext()},o.prototype._handleErrors=function(e){var t=this;e.on(`error`,function(e){t._emitError(e)})},o.prototype.write=function(e){this.emit(`data`,e)},o.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause==`function`&&this._currentStream.pause(),this.emit(`pause`))},o.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume==`function`&&this._currentStream.resume(),this.emit(`resume`)},o.prototype.end=function(){this._reset(),this.emit(`end`)},o.prototype.destroy=function(){this._reset(),this.emit(`close`)},o.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},o.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e=`DelayedStream#maxDataSize of `+this.maxDataSize+` bytes exceeded.`;this._emitError(Error(e))}},o.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},o.prototype._emitError=function(e){this._reset(),this.emit(`error`,e)}})),De=a(((e,t)=>{t.exports={"application/1d-interleaved-parityfec":{source:`iana`},"application/3gpdash-qoe-report+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/3gpp-ims+xml":{source:`iana`,compressible:!0},"application/3gpphal+json":{source:`iana`,compressible:!0},"application/3gpphalforms+json":{source:`iana`,compressible:!0},"application/a2l":{source:`iana`},"application/ace+cbor":{source:`iana`},"application/activemessage":{source:`iana`},"application/activity+json":{source:`iana`,compressible:!0},"application/alto-costmap+json":{source:`iana`,compressible:!0},"application/alto-costmapfilter+json":{source:`iana`,compressible:!0},"application/alto-directory+json":{source:`iana`,compressible:!0},"application/alto-endpointcost+json":{source:`iana`,compressible:!0},"application/alto-endpointcostparams+json":{source:`iana`,compressible:!0},"application/alto-endpointprop+json":{source:`iana`,compressible:!0},"application/alto-endpointpropparams+json":{source:`iana`,compressible:!0},"application/alto-error+json":{source:`iana`,compressible:!0},"application/alto-networkmap+json":{source:`iana`,compressible:!0},"application/alto-networkmapfilter+json":{source:`iana`,compressible:!0},"application/alto-updatestreamcontrol+json":{source:`iana`,compressible:!0},"application/alto-updatestreamparams+json":{source:`iana`,compressible:!0},"application/aml":{source:`iana`},"application/andrew-inset":{source:`iana`,extensions:[`ez`]},"application/applefile":{source:`iana`},"application/applixware":{source:`apache`,extensions:[`aw`]},"application/at+jwt":{source:`iana`},"application/atf":{source:`iana`},"application/atfx":{source:`iana`},"application/atom+xml":{source:`iana`,compressible:!0,extensions:[`atom`]},"application/atomcat+xml":{source:`iana`,compressible:!0,extensions:[`atomcat`]},"application/atomdeleted+xml":{source:`iana`,compressible:!0,extensions:[`atomdeleted`]},"application/atomicmail":{source:`iana`},"application/atomsvc+xml":{source:`iana`,compressible:!0,extensions:[`atomsvc`]},"application/atsc-dwd+xml":{source:`iana`,compressible:!0,extensions:[`dwd`]},"application/atsc-dynamic-event-message":{source:`iana`},"application/atsc-held+xml":{source:`iana`,compressible:!0,extensions:[`held`]},"application/atsc-rdt+json":{source:`iana`,compressible:!0},"application/atsc-rsat+xml":{source:`iana`,compressible:!0,extensions:[`rsat`]},"application/atxml":{source:`iana`},"application/auth-policy+xml":{source:`iana`,compressible:!0},"application/bacnet-xdd+zip":{source:`iana`,compressible:!1},"application/batch-smtp":{source:`iana`},"application/bdoc":{compressible:!1,extensions:[`bdoc`]},"application/beep+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/calendar+json":{source:`iana`,compressible:!0},"application/calendar+xml":{source:`iana`,compressible:!0,extensions:[`xcs`]},"application/call-completion":{source:`iana`},"application/cals-1840":{source:`iana`},"application/captive+json":{source:`iana`,compressible:!0},"application/cbor":{source:`iana`},"application/cbor-seq":{source:`iana`},"application/cccex":{source:`iana`},"application/ccmp+xml":{source:`iana`,compressible:!0},"application/ccxml+xml":{source:`iana`,compressible:!0,extensions:[`ccxml`]},"application/cdfx+xml":{source:`iana`,compressible:!0,extensions:[`cdfx`]},"application/cdmi-capability":{source:`iana`,extensions:[`cdmia`]},"application/cdmi-container":{source:`iana`,extensions:[`cdmic`]},"application/cdmi-domain":{source:`iana`,extensions:[`cdmid`]},"application/cdmi-object":{source:`iana`,extensions:[`cdmio`]},"application/cdmi-queue":{source:`iana`,extensions:[`cdmiq`]},"application/cdni":{source:`iana`},"application/cea":{source:`iana`},"application/cea-2018+xml":{source:`iana`,compressible:!0},"application/cellml+xml":{source:`iana`,compressible:!0},"application/cfw":{source:`iana`},"application/city+json":{source:`iana`,compressible:!0},"application/clr":{source:`iana`},"application/clue+xml":{source:`iana`,compressible:!0},"application/clue_info+xml":{source:`iana`,compressible:!0},"application/cms":{source:`iana`},"application/cnrp+xml":{source:`iana`,compressible:!0},"application/coap-group+json":{source:`iana`,compressible:!0},"application/coap-payload":{source:`iana`},"application/commonground":{source:`iana`},"application/conference-info+xml":{source:`iana`,compressible:!0},"application/cose":{source:`iana`},"application/cose-key":{source:`iana`},"application/cose-key-set":{source:`iana`},"application/cpl+xml":{source:`iana`,compressible:!0,extensions:[`cpl`]},"application/csrattrs":{source:`iana`},"application/csta+xml":{source:`iana`,compressible:!0},"application/cstadata+xml":{source:`iana`,compressible:!0},"application/csvm+json":{source:`iana`,compressible:!0},"application/cu-seeme":{source:`apache`,extensions:[`cu`]},"application/cwt":{source:`iana`},"application/cybercash":{source:`iana`},"application/dart":{compressible:!0},"application/dash+xml":{source:`iana`,compressible:!0,extensions:[`mpd`]},"application/dash-patch+xml":{source:`iana`,compressible:!0,extensions:[`mpp`]},"application/dashdelta":{source:`iana`},"application/davmount+xml":{source:`iana`,compressible:!0,extensions:[`davmount`]},"application/dca-rft":{source:`iana`},"application/dcd":{source:`iana`},"application/dec-dx":{source:`iana`},"application/dialog-info+xml":{source:`iana`,compressible:!0},"application/dicom":{source:`iana`},"application/dicom+json":{source:`iana`,compressible:!0},"application/dicom+xml":{source:`iana`,compressible:!0},"application/dii":{source:`iana`},"application/dit":{source:`iana`},"application/dns":{source:`iana`},"application/dns+json":{source:`iana`,compressible:!0},"application/dns-message":{source:`iana`},"application/docbook+xml":{source:`apache`,compressible:!0,extensions:[`dbk`]},"application/dots+cbor":{source:`iana`},"application/dskpp+xml":{source:`iana`,compressible:!0},"application/dssc+der":{source:`iana`,extensions:[`dssc`]},"application/dssc+xml":{source:`iana`,compressible:!0,extensions:[`xdssc`]},"application/dvcs":{source:`iana`},"application/ecmascript":{source:`iana`,compressible:!0,extensions:[`es`,`ecma`]},"application/edi-consent":{source:`iana`},"application/edi-x12":{source:`iana`,compressible:!1},"application/edifact":{source:`iana`,compressible:!1},"application/efi":{source:`iana`},"application/elm+json":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/elm+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.cap+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/emergencycalldata.comment+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.control+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.ecall.msd":{source:`iana`},"application/emergencycalldata.providerinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.veds+xml":{source:`iana`,compressible:!0},"application/emma+xml":{source:`iana`,compressible:!0,extensions:[`emma`]},"application/emotionml+xml":{source:`iana`,compressible:!0,extensions:[`emotionml`]},"application/encaprtp":{source:`iana`},"application/epp+xml":{source:`iana`,compressible:!0},"application/epub+zip":{source:`iana`,compressible:!1,extensions:[`epub`]},"application/eshop":{source:`iana`},"application/exi":{source:`iana`,extensions:[`exi`]},"application/expect-ct-report+json":{source:`iana`,compressible:!0},"application/express":{source:`iana`,extensions:[`exp`]},"application/fastinfoset":{source:`iana`},"application/fastsoap":{source:`iana`},"application/fdt+xml":{source:`iana`,compressible:!0,extensions:[`fdt`]},"application/fhir+json":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/fhir+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:`iana`},"application/flexfec":{source:`iana`},"application/font-sfnt":{source:`iana`},"application/font-tdpfr":{source:`iana`,extensions:[`pfr`]},"application/font-woff":{source:`iana`,compressible:!1},"application/framework-attributes+xml":{source:`iana`,compressible:!0},"application/geo+json":{source:`iana`,compressible:!0,extensions:[`geojson`]},"application/geo+json-seq":{source:`iana`},"application/geopackage+sqlite3":{source:`iana`},"application/geoxacml+xml":{source:`iana`,compressible:!0},"application/gltf-buffer":{source:`iana`},"application/gml+xml":{source:`iana`,compressible:!0,extensions:[`gml`]},"application/gpx+xml":{source:`apache`,compressible:!0,extensions:[`gpx`]},"application/gxf":{source:`apache`,extensions:[`gxf`]},"application/gzip":{source:`iana`,compressible:!1,extensions:[`gz`]},"application/h224":{source:`iana`},"application/held+xml":{source:`iana`,compressible:!0},"application/hjson":{extensions:[`hjson`]},"application/http":{source:`iana`},"application/hyperstudio":{source:`iana`,extensions:[`stk`]},"application/ibe-key-request+xml":{source:`iana`,compressible:!0},"application/ibe-pkg-reply+xml":{source:`iana`,compressible:!0},"application/ibe-pp-data":{source:`iana`},"application/iges":{source:`iana`},"application/im-iscomposing+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/index":{source:`iana`},"application/index.cmd":{source:`iana`},"application/index.obj":{source:`iana`},"application/index.response":{source:`iana`},"application/index.vnd":{source:`iana`},"application/inkml+xml":{source:`iana`,compressible:!0,extensions:[`ink`,`inkml`]},"application/iotp":{source:`iana`},"application/ipfix":{source:`iana`,extensions:[`ipfix`]},"application/ipp":{source:`iana`},"application/isup":{source:`iana`},"application/its+xml":{source:`iana`,compressible:!0,extensions:[`its`]},"application/java-archive":{source:`apache`,compressible:!1,extensions:[`jar`,`war`,`ear`]},"application/java-serialized-object":{source:`apache`,compressible:!1,extensions:[`ser`]},"application/java-vm":{source:`apache`,compressible:!1,extensions:[`class`]},"application/javascript":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`js`,`mjs`]},"application/jf2feed+json":{source:`iana`,compressible:!0},"application/jose":{source:`iana`},"application/jose+json":{source:`iana`,compressible:!0},"application/jrd+json":{source:`iana`,compressible:!0},"application/jscalendar+json":{source:`iana`,compressible:!0},"application/json":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`json`,`map`]},"application/json-patch+json":{source:`iana`,compressible:!0},"application/json-seq":{source:`iana`},"application/json5":{extensions:[`json5`]},"application/jsonml+json":{source:`apache`,compressible:!0,extensions:[`jsonml`]},"application/jwk+json":{source:`iana`,compressible:!0},"application/jwk-set+json":{source:`iana`,compressible:!0},"application/jwt":{source:`iana`},"application/kpml-request+xml":{source:`iana`,compressible:!0},"application/kpml-response+xml":{source:`iana`,compressible:!0},"application/ld+json":{source:`iana`,compressible:!0,extensions:[`jsonld`]},"application/lgr+xml":{source:`iana`,compressible:!0,extensions:[`lgr`]},"application/link-format":{source:`iana`},"application/load-control+xml":{source:`iana`,compressible:!0},"application/lost+xml":{source:`iana`,compressible:!0,extensions:[`lostxml`]},"application/lostsync+xml":{source:`iana`,compressible:!0},"application/lpf+zip":{source:`iana`,compressible:!1},"application/lxf":{source:`iana`},"application/mac-binhex40":{source:`iana`,extensions:[`hqx`]},"application/mac-compactpro":{source:`apache`,extensions:[`cpt`]},"application/macwriteii":{source:`iana`},"application/mads+xml":{source:`iana`,compressible:!0,extensions:[`mads`]},"application/manifest+json":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`webmanifest`]},"application/marc":{source:`iana`,extensions:[`mrc`]},"application/marcxml+xml":{source:`iana`,compressible:!0,extensions:[`mrcx`]},"application/mathematica":{source:`iana`,extensions:[`ma`,`nb`,`mb`]},"application/mathml+xml":{source:`iana`,compressible:!0,extensions:[`mathml`]},"application/mathml-content+xml":{source:`iana`,compressible:!0},"application/mathml-presentation+xml":{source:`iana`,compressible:!0},"application/mbms-associated-procedure-description+xml":{source:`iana`,compressible:!0},"application/mbms-deregister+xml":{source:`iana`,compressible:!0},"application/mbms-envelope+xml":{source:`iana`,compressible:!0},"application/mbms-msk+xml":{source:`iana`,compressible:!0},"application/mbms-msk-response+xml":{source:`iana`,compressible:!0},"application/mbms-protection-description+xml":{source:`iana`,compressible:!0},"application/mbms-reception-report+xml":{source:`iana`,compressible:!0},"application/mbms-register+xml":{source:`iana`,compressible:!0},"application/mbms-register-response+xml":{source:`iana`,compressible:!0},"application/mbms-schedule+xml":{source:`iana`,compressible:!0},"application/mbms-user-service-description+xml":{source:`iana`,compressible:!0},"application/mbox":{source:`iana`,extensions:[`mbox`]},"application/media-policy-dataset+xml":{source:`iana`,compressible:!0,extensions:[`mpf`]},"application/media_control+xml":{source:`iana`,compressible:!0},"application/mediaservercontrol+xml":{source:`iana`,compressible:!0,extensions:[`mscml`]},"application/merge-patch+json":{source:`iana`,compressible:!0},"application/metalink+xml":{source:`apache`,compressible:!0,extensions:[`metalink`]},"application/metalink4+xml":{source:`iana`,compressible:!0,extensions:[`meta4`]},"application/mets+xml":{source:`iana`,compressible:!0,extensions:[`mets`]},"application/mf4":{source:`iana`},"application/mikey":{source:`iana`},"application/mipc":{source:`iana`},"application/missing-blocks+cbor-seq":{source:`iana`},"application/mmt-aei+xml":{source:`iana`,compressible:!0,extensions:[`maei`]},"application/mmt-usd+xml":{source:`iana`,compressible:!0,extensions:[`musd`]},"application/mods+xml":{source:`iana`,compressible:!0,extensions:[`mods`]},"application/moss-keys":{source:`iana`},"application/moss-signature":{source:`iana`},"application/mosskey-data":{source:`iana`},"application/mosskey-request":{source:`iana`},"application/mp21":{source:`iana`,extensions:[`m21`,`mp21`]},"application/mp4":{source:`iana`,extensions:[`mp4s`,`m4p`]},"application/mpeg4-generic":{source:`iana`},"application/mpeg4-iod":{source:`iana`},"application/mpeg4-iod-xmt":{source:`iana`},"application/mrb-consumer+xml":{source:`iana`,compressible:!0},"application/mrb-publish+xml":{source:`iana`,compressible:!0},"application/msc-ivr+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/msc-mixer+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/msword":{source:`iana`,compressible:!1,extensions:[`doc`,`dot`]},"application/mud+json":{source:`iana`,compressible:!0},"application/multipart-core":{source:`iana`},"application/mxf":{source:`iana`,extensions:[`mxf`]},"application/n-quads":{source:`iana`,extensions:[`nq`]},"application/n-triples":{source:`iana`,extensions:[`nt`]},"application/nasdata":{source:`iana`},"application/news-checkgroups":{source:`iana`,charset:`US-ASCII`},"application/news-groupinfo":{source:`iana`,charset:`US-ASCII`},"application/news-transmission":{source:`iana`},"application/nlsml+xml":{source:`iana`,compressible:!0},"application/node":{source:`iana`,extensions:[`cjs`]},"application/nss":{source:`iana`},"application/oauth-authz-req+jwt":{source:`iana`},"application/oblivious-dns-message":{source:`iana`},"application/ocsp-request":{source:`iana`},"application/ocsp-response":{source:`iana`},"application/octet-stream":{source:`iana`,compressible:!1,extensions:[`bin`,`dms`,`lrf`,`mar`,`so`,`dist`,`distz`,`pkg`,`bpk`,`dump`,`elc`,`deploy`,`exe`,`dll`,`deb`,`dmg`,`iso`,`img`,`msi`,`msp`,`msm`,`buffer`]},"application/oda":{source:`iana`,extensions:[`oda`]},"application/odm+xml":{source:`iana`,compressible:!0},"application/odx":{source:`iana`},"application/oebps-package+xml":{source:`iana`,compressible:!0,extensions:[`opf`]},"application/ogg":{source:`iana`,compressible:!1,extensions:[`ogx`]},"application/omdoc+xml":{source:`apache`,compressible:!0,extensions:[`omdoc`]},"application/onenote":{source:`apache`,extensions:[`onetoc`,`onetoc2`,`onetmp`,`onepkg`]},"application/opc-nodeset+xml":{source:`iana`,compressible:!0},"application/oscore":{source:`iana`},"application/oxps":{source:`iana`,extensions:[`oxps`]},"application/p21":{source:`iana`},"application/p21+zip":{source:`iana`,compressible:!1},"application/p2p-overlay+xml":{source:`iana`,compressible:!0,extensions:[`relo`]},"application/parityfec":{source:`iana`},"application/passport":{source:`iana`},"application/patch-ops-error+xml":{source:`iana`,compressible:!0,extensions:[`xer`]},"application/pdf":{source:`iana`,compressible:!1,extensions:[`pdf`]},"application/pdx":{source:`iana`},"application/pem-certificate-chain":{source:`iana`},"application/pgp-encrypted":{source:`iana`,compressible:!1,extensions:[`pgp`]},"application/pgp-keys":{source:`iana`,extensions:[`asc`]},"application/pgp-signature":{source:`iana`,extensions:[`asc`,`sig`]},"application/pics-rules":{source:`apache`,extensions:[`prf`]},"application/pidf+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/pidf-diff+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/pkcs10":{source:`iana`,extensions:[`p10`]},"application/pkcs12":{source:`iana`},"application/pkcs7-mime":{source:`iana`,extensions:[`p7m`,`p7c`]},"application/pkcs7-signature":{source:`iana`,extensions:[`p7s`]},"application/pkcs8":{source:`iana`,extensions:[`p8`]},"application/pkcs8-encrypted":{source:`iana`},"application/pkix-attr-cert":{source:`iana`,extensions:[`ac`]},"application/pkix-cert":{source:`iana`,extensions:[`cer`]},"application/pkix-crl":{source:`iana`,extensions:[`crl`]},"application/pkix-pkipath":{source:`iana`,extensions:[`pkipath`]},"application/pkixcmp":{source:`iana`,extensions:[`pki`]},"application/pls+xml":{source:`iana`,compressible:!0,extensions:[`pls`]},"application/poc-settings+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/postscript":{source:`iana`,compressible:!0,extensions:[`ai`,`eps`,`ps`]},"application/ppsp-tracker+json":{source:`iana`,compressible:!0},"application/problem+json":{source:`iana`,compressible:!0},"application/problem+xml":{source:`iana`,compressible:!0},"application/provenance+xml":{source:`iana`,compressible:!0,extensions:[`provx`]},"application/prs.alvestrand.titrax-sheet":{source:`iana`},"application/prs.cww":{source:`iana`,extensions:[`cww`]},"application/prs.cyn":{source:`iana`,charset:`7-BIT`},"application/prs.hpub+zip":{source:`iana`,compressible:!1},"application/prs.nprend":{source:`iana`},"application/prs.plucker":{source:`iana`},"application/prs.rdf-xml-crypt":{source:`iana`},"application/prs.xsf+xml":{source:`iana`,compressible:!0},"application/pskc+xml":{source:`iana`,compressible:!0,extensions:[`pskcxml`]},"application/pvd+json":{source:`iana`,compressible:!0},"application/qsig":{source:`iana`},"application/raml+yaml":{compressible:!0,extensions:[`raml`]},"application/raptorfec":{source:`iana`},"application/rdap+json":{source:`iana`,compressible:!0},"application/rdf+xml":{source:`iana`,compressible:!0,extensions:[`rdf`,`owl`]},"application/reginfo+xml":{source:`iana`,compressible:!0,extensions:[`rif`]},"application/relax-ng-compact-syntax":{source:`iana`,extensions:[`rnc`]},"application/remote-printing":{source:`iana`},"application/reputon+json":{source:`iana`,compressible:!0},"application/resource-lists+xml":{source:`iana`,compressible:!0,extensions:[`rl`]},"application/resource-lists-diff+xml":{source:`iana`,compressible:!0,extensions:[`rld`]},"application/rfc+xml":{source:`iana`,compressible:!0},"application/riscos":{source:`iana`},"application/rlmi+xml":{source:`iana`,compressible:!0},"application/rls-services+xml":{source:`iana`,compressible:!0,extensions:[`rs`]},"application/route-apd+xml":{source:`iana`,compressible:!0,extensions:[`rapd`]},"application/route-s-tsid+xml":{source:`iana`,compressible:!0,extensions:[`sls`]},"application/route-usd+xml":{source:`iana`,compressible:!0,extensions:[`rusd`]},"application/rpki-ghostbusters":{source:`iana`,extensions:[`gbr`]},"application/rpki-manifest":{source:`iana`,extensions:[`mft`]},"application/rpki-publication":{source:`iana`},"application/rpki-roa":{source:`iana`,extensions:[`roa`]},"application/rpki-updown":{source:`iana`},"application/rsd+xml":{source:`apache`,compressible:!0,extensions:[`rsd`]},"application/rss+xml":{source:`apache`,compressible:!0,extensions:[`rss`]},"application/rtf":{source:`iana`,compressible:!0,extensions:[`rtf`]},"application/rtploopback":{source:`iana`},"application/rtx":{source:`iana`},"application/samlassertion+xml":{source:`iana`,compressible:!0},"application/samlmetadata+xml":{source:`iana`,compressible:!0},"application/sarif+json":{source:`iana`,compressible:!0},"application/sarif-external-properties+json":{source:`iana`,compressible:!0},"application/sbe":{source:`iana`},"application/sbml+xml":{source:`iana`,compressible:!0,extensions:[`sbml`]},"application/scaip+xml":{source:`iana`,compressible:!0},"application/scim+json":{source:`iana`,compressible:!0},"application/scvp-cv-request":{source:`iana`,extensions:[`scq`]},"application/scvp-cv-response":{source:`iana`,extensions:[`scs`]},"application/scvp-vp-request":{source:`iana`,extensions:[`spq`]},"application/scvp-vp-response":{source:`iana`,extensions:[`spp`]},"application/sdp":{source:`iana`,extensions:[`sdp`]},"application/secevent+jwt":{source:`iana`},"application/senml+cbor":{source:`iana`},"application/senml+json":{source:`iana`,compressible:!0},"application/senml+xml":{source:`iana`,compressible:!0,extensions:[`senmlx`]},"application/senml-etch+cbor":{source:`iana`},"application/senml-etch+json":{source:`iana`,compressible:!0},"application/senml-exi":{source:`iana`},"application/sensml+cbor":{source:`iana`},"application/sensml+json":{source:`iana`,compressible:!0},"application/sensml+xml":{source:`iana`,compressible:!0,extensions:[`sensmlx`]},"application/sensml-exi":{source:`iana`},"application/sep+xml":{source:`iana`,compressible:!0},"application/sep-exi":{source:`iana`},"application/session-info":{source:`iana`},"application/set-payment":{source:`iana`},"application/set-payment-initiation":{source:`iana`,extensions:[`setpay`]},"application/set-registration":{source:`iana`},"application/set-registration-initiation":{source:`iana`,extensions:[`setreg`]},"application/sgml":{source:`iana`},"application/sgml-open-catalog":{source:`iana`},"application/shf+xml":{source:`iana`,compressible:!0,extensions:[`shf`]},"application/sieve":{source:`iana`,extensions:[`siv`,`sieve`]},"application/simple-filter+xml":{source:`iana`,compressible:!0},"application/simple-message-summary":{source:`iana`},"application/simplesymbolcontainer":{source:`iana`},"application/sipc":{source:`iana`},"application/slate":{source:`iana`},"application/smil":{source:`iana`},"application/smil+xml":{source:`iana`,compressible:!0,extensions:[`smi`,`smil`]},"application/smpte336m":{source:`iana`},"application/soap+fastinfoset":{source:`iana`},"application/soap+xml":{source:`iana`,compressible:!0},"application/sparql-query":{source:`iana`,extensions:[`rq`]},"application/sparql-results+xml":{source:`iana`,compressible:!0,extensions:[`srx`]},"application/spdx+json":{source:`iana`,compressible:!0},"application/spirits-event+xml":{source:`iana`,compressible:!0},"application/sql":{source:`iana`},"application/srgs":{source:`iana`,extensions:[`gram`]},"application/srgs+xml":{source:`iana`,compressible:!0,extensions:[`grxml`]},"application/sru+xml":{source:`iana`,compressible:!0,extensions:[`sru`]},"application/ssdl+xml":{source:`apache`,compressible:!0,extensions:[`ssdl`]},"application/ssml+xml":{source:`iana`,compressible:!0,extensions:[`ssml`]},"application/stix+json":{source:`iana`,compressible:!0},"application/swid+xml":{source:`iana`,compressible:!0,extensions:[`swidtag`]},"application/tamp-apex-update":{source:`iana`},"application/tamp-apex-update-confirm":{source:`iana`},"application/tamp-community-update":{source:`iana`},"application/tamp-community-update-confirm":{source:`iana`},"application/tamp-error":{source:`iana`},"application/tamp-sequence-adjust":{source:`iana`},"application/tamp-sequence-adjust-confirm":{source:`iana`},"application/tamp-status-query":{source:`iana`},"application/tamp-status-response":{source:`iana`},"application/tamp-update":{source:`iana`},"application/tamp-update-confirm":{source:`iana`},"application/tar":{compressible:!0},"application/taxii+json":{source:`iana`,compressible:!0},"application/td+json":{source:`iana`,compressible:!0},"application/tei+xml":{source:`iana`,compressible:!0,extensions:[`tei`,`teicorpus`]},"application/tetra_isi":{source:`iana`},"application/thraud+xml":{source:`iana`,compressible:!0,extensions:[`tfi`]},"application/timestamp-query":{source:`iana`},"application/timestamp-reply":{source:`iana`},"application/timestamped-data":{source:`iana`,extensions:[`tsd`]},"application/tlsrpt+gzip":{source:`iana`},"application/tlsrpt+json":{source:`iana`,compressible:!0},"application/tnauthlist":{source:`iana`},"application/token-introspection+jwt":{source:`iana`},"application/toml":{compressible:!0,extensions:[`toml`]},"application/trickle-ice-sdpfrag":{source:`iana`},"application/trig":{source:`iana`,extensions:[`trig`]},"application/ttml+xml":{source:`iana`,compressible:!0,extensions:[`ttml`]},"application/tve-trigger":{source:`iana`},"application/tzif":{source:`iana`},"application/tzif-leap":{source:`iana`},"application/ubjson":{compressible:!1,extensions:[`ubj`]},"application/ulpfec":{source:`iana`},"application/urc-grpsheet+xml":{source:`iana`,compressible:!0},"application/urc-ressheet+xml":{source:`iana`,compressible:!0,extensions:[`rsheet`]},"application/urc-targetdesc+xml":{source:`iana`,compressible:!0,extensions:[`td`]},"application/urc-uisocketdesc+xml":{source:`iana`,compressible:!0},"application/vcard+json":{source:`iana`,compressible:!0},"application/vcard+xml":{source:`iana`,compressible:!0},"application/vemmi":{source:`iana`},"application/vividence.scriptfile":{source:`apache`},"application/vnd.1000minds.decision-model+xml":{source:`iana`,compressible:!0,extensions:[`1km`]},"application/vnd.3gpp-prose+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:`iana`},"application/vnd.3gpp.5gnas":{source:`iana`},"application/vnd.3gpp.access-transfer-events+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.bsf+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.gmop+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.gtpc":{source:`iana`},"application/vnd.3gpp.interworking-data":{source:`iana`},"application/vnd.3gpp.lpp":{source:`iana`},"application/vnd.3gpp.mc-signalling-ear":{source:`iana`},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:`iana`},"application/vnd.3gpp.mcdata-service-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:`iana`},"application/vnd.3gpp.mcdata-ue-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.ngap":{source:`iana`},"application/vnd.3gpp.pfcp":{source:`iana`},"application/vnd.3gpp.pic-bw-large":{source:`iana`,extensions:[`plb`]},"application/vnd.3gpp.pic-bw-small":{source:`iana`,extensions:[`psb`]},"application/vnd.3gpp.pic-bw-var":{source:`iana`,extensions:[`pvb`]},"application/vnd.3gpp.s1ap":{source:`iana`},"application/vnd.3gpp.sms":{source:`iana`},"application/vnd.3gpp.sms+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.ussd+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp2.sms":{source:`iana`},"application/vnd.3gpp2.tcap":{source:`iana`,extensions:[`tcap`]},"application/vnd.3lightssoftware.imagescal":{source:`iana`},"application/vnd.3m.post-it-notes":{source:`iana`,extensions:[`pwn`]},"application/vnd.accpac.simply.aso":{source:`iana`,extensions:[`aso`]},"application/vnd.accpac.simply.imp":{source:`iana`,extensions:[`imp`]},"application/vnd.acucobol":{source:`iana`,extensions:[`acu`]},"application/vnd.acucorp":{source:`iana`,extensions:[`atc`,`acutc`]},"application/vnd.adobe.air-application-installer-package+zip":{source:`apache`,compressible:!1,extensions:[`air`]},"application/vnd.adobe.flash.movie":{source:`iana`},"application/vnd.adobe.formscentral.fcdt":{source:`iana`,extensions:[`fcdt`]},"application/vnd.adobe.fxp":{source:`iana`,extensions:[`fxp`,`fxpl`]},"application/vnd.adobe.partial-upload":{source:`iana`},"application/vnd.adobe.xdp+xml":{source:`iana`,compressible:!0,extensions:[`xdp`]},"application/vnd.adobe.xfdf":{source:`iana`,extensions:[`xfdf`]},"application/vnd.aether.imp":{source:`iana`},"application/vnd.afpc.afplinedata":{source:`iana`},"application/vnd.afpc.afplinedata-pagedef":{source:`iana`},"application/vnd.afpc.cmoca-cmresource":{source:`iana`},"application/vnd.afpc.foca-charset":{source:`iana`},"application/vnd.afpc.foca-codedfont":{source:`iana`},"application/vnd.afpc.foca-codepage":{source:`iana`},"application/vnd.afpc.modca":{source:`iana`},"application/vnd.afpc.modca-cmtable":{source:`iana`},"application/vnd.afpc.modca-formdef":{source:`iana`},"application/vnd.afpc.modca-mediummap":{source:`iana`},"application/vnd.afpc.modca-objectcontainer":{source:`iana`},"application/vnd.afpc.modca-overlay":{source:`iana`},"application/vnd.afpc.modca-pagesegment":{source:`iana`},"application/vnd.age":{source:`iana`,extensions:[`age`]},"application/vnd.ah-barcode":{source:`iana`},"application/vnd.ahead.space":{source:`iana`,extensions:[`ahead`]},"application/vnd.airzip.filesecure.azf":{source:`iana`,extensions:[`azf`]},"application/vnd.airzip.filesecure.azs":{source:`iana`,extensions:[`azs`]},"application/vnd.amadeus+json":{source:`iana`,compressible:!0},"application/vnd.amazon.ebook":{source:`apache`,extensions:[`azw`]},"application/vnd.amazon.mobi8-ebook":{source:`iana`},"application/vnd.americandynamics.acc":{source:`iana`,extensions:[`acc`]},"application/vnd.amiga.ami":{source:`iana`,extensions:[`ami`]},"application/vnd.amundsen.maze+xml":{source:`iana`,compressible:!0},"application/vnd.android.ota":{source:`iana`},"application/vnd.android.package-archive":{source:`apache`,compressible:!1,extensions:[`apk`]},"application/vnd.anki":{source:`iana`},"application/vnd.anser-web-certificate-issue-initiation":{source:`iana`,extensions:[`cii`]},"application/vnd.anser-web-funds-transfer-initiation":{source:`apache`,extensions:[`fti`]},"application/vnd.antix.game-component":{source:`iana`,extensions:[`atx`]},"application/vnd.apache.arrow.file":{source:`iana`},"application/vnd.apache.arrow.stream":{source:`iana`},"application/vnd.apache.thrift.binary":{source:`iana`},"application/vnd.apache.thrift.compact":{source:`iana`},"application/vnd.apache.thrift.json":{source:`iana`},"application/vnd.api+json":{source:`iana`,compressible:!0},"application/vnd.aplextor.warrp+json":{source:`iana`,compressible:!0},"application/vnd.apothekende.reservation+json":{source:`iana`,compressible:!0},"application/vnd.apple.installer+xml":{source:`iana`,compressible:!0,extensions:[`mpkg`]},"application/vnd.apple.keynote":{source:`iana`,extensions:[`key`]},"application/vnd.apple.mpegurl":{source:`iana`,extensions:[`m3u8`]},"application/vnd.apple.numbers":{source:`iana`,extensions:[`numbers`]},"application/vnd.apple.pages":{source:`iana`,extensions:[`pages`]},"application/vnd.apple.pkpass":{compressible:!1,extensions:[`pkpass`]},"application/vnd.arastra.swi":{source:`iana`},"application/vnd.aristanetworks.swi":{source:`iana`,extensions:[`swi`]},"application/vnd.artisan+json":{source:`iana`,compressible:!0},"application/vnd.artsquare":{source:`iana`},"application/vnd.astraea-software.iota":{source:`iana`,extensions:[`iota`]},"application/vnd.audiograph":{source:`iana`,extensions:[`aep`]},"application/vnd.autopackage":{source:`iana`},"application/vnd.avalon+json":{source:`iana`,compressible:!0},"application/vnd.avistar+xml":{source:`iana`,compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:`iana`,compressible:!0,extensions:[`bmml`]},"application/vnd.balsamiq.bmpr":{source:`iana`},"application/vnd.banana-accounting":{source:`iana`},"application/vnd.bbf.usp.error":{source:`iana`},"application/vnd.bbf.usp.msg":{source:`iana`},"application/vnd.bbf.usp.msg+json":{source:`iana`,compressible:!0},"application/vnd.bekitzur-stech+json":{source:`iana`,compressible:!0},"application/vnd.bint.med-content":{source:`iana`},"application/vnd.biopax.rdf+xml":{source:`iana`,compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:`iana`},"application/vnd.blueice.multipass":{source:`iana`,extensions:[`mpm`]},"application/vnd.bluetooth.ep.oob":{source:`iana`},"application/vnd.bluetooth.le.oob":{source:`iana`},"application/vnd.bmi":{source:`iana`,extensions:[`bmi`]},"application/vnd.bpf":{source:`iana`},"application/vnd.bpf3":{source:`iana`},"application/vnd.businessobjects":{source:`iana`,extensions:[`rep`]},"application/vnd.byu.uapi+json":{source:`iana`,compressible:!0},"application/vnd.cab-jscript":{source:`iana`},"application/vnd.canon-cpdl":{source:`iana`},"application/vnd.canon-lips":{source:`iana`},"application/vnd.capasystems-pg+json":{source:`iana`,compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:`iana`},"application/vnd.century-systems.tcp_stream":{source:`iana`},"application/vnd.chemdraw+xml":{source:`iana`,compressible:!0,extensions:[`cdxml`]},"application/vnd.chess-pgn":{source:`iana`},"application/vnd.chipnuts.karaoke-mmd":{source:`iana`,extensions:[`mmd`]},"application/vnd.ciedi":{source:`iana`},"application/vnd.cinderella":{source:`iana`,extensions:[`cdy`]},"application/vnd.cirpack.isdn-ext":{source:`iana`},"application/vnd.citationstyles.style+xml":{source:`iana`,compressible:!0,extensions:[`csl`]},"application/vnd.claymore":{source:`iana`,extensions:[`cla`]},"application/vnd.cloanto.rp9":{source:`iana`,extensions:[`rp9`]},"application/vnd.clonk.c4group":{source:`iana`,extensions:[`c4g`,`c4d`,`c4f`,`c4p`,`c4u`]},"application/vnd.cluetrust.cartomobile-config":{source:`iana`,extensions:[`c11amc`]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:`iana`,extensions:[`c11amz`]},"application/vnd.coffeescript":{source:`iana`},"application/vnd.collabio.xodocuments.document":{source:`iana`},"application/vnd.collabio.xodocuments.document-template":{source:`iana`},"application/vnd.collabio.xodocuments.presentation":{source:`iana`},"application/vnd.collabio.xodocuments.presentation-template":{source:`iana`},"application/vnd.collabio.xodocuments.spreadsheet":{source:`iana`},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:`iana`},"application/vnd.collection+json":{source:`iana`,compressible:!0},"application/vnd.collection.doc+json":{source:`iana`,compressible:!0},"application/vnd.collection.next+json":{source:`iana`,compressible:!0},"application/vnd.comicbook+zip":{source:`iana`,compressible:!1},"application/vnd.comicbook-rar":{source:`iana`},"application/vnd.commerce-battelle":{source:`iana`},"application/vnd.commonspace":{source:`iana`,extensions:[`csp`]},"application/vnd.contact.cmsg":{source:`iana`,extensions:[`cdbcmsg`]},"application/vnd.coreos.ignition+json":{source:`iana`,compressible:!0},"application/vnd.cosmocaller":{source:`iana`,extensions:[`cmc`]},"application/vnd.crick.clicker":{source:`iana`,extensions:[`clkx`]},"application/vnd.crick.clicker.keyboard":{source:`iana`,extensions:[`clkk`]},"application/vnd.crick.clicker.palette":{source:`iana`,extensions:[`clkp`]},"application/vnd.crick.clicker.template":{source:`iana`,extensions:[`clkt`]},"application/vnd.crick.clicker.wordbank":{source:`iana`,extensions:[`clkw`]},"application/vnd.criticaltools.wbs+xml":{source:`iana`,compressible:!0,extensions:[`wbs`]},"application/vnd.cryptii.pipe+json":{source:`iana`,compressible:!0},"application/vnd.crypto-shade-file":{source:`iana`},"application/vnd.cryptomator.encrypted":{source:`iana`},"application/vnd.cryptomator.vault":{source:`iana`},"application/vnd.ctc-posml":{source:`iana`,extensions:[`pml`]},"application/vnd.ctct.ws+xml":{source:`iana`,compressible:!0},"application/vnd.cups-pdf":{source:`iana`},"application/vnd.cups-postscript":{source:`iana`},"application/vnd.cups-ppd":{source:`iana`,extensions:[`ppd`]},"application/vnd.cups-raster":{source:`iana`},"application/vnd.cups-raw":{source:`iana`},"application/vnd.curl":{source:`iana`},"application/vnd.curl.car":{source:`apache`,extensions:[`car`]},"application/vnd.curl.pcurl":{source:`apache`,extensions:[`pcurl`]},"application/vnd.cyan.dean.root+xml":{source:`iana`,compressible:!0},"application/vnd.cybank":{source:`iana`},"application/vnd.cyclonedx+json":{source:`iana`,compressible:!0},"application/vnd.cyclonedx+xml":{source:`iana`,compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:`iana`,compressible:!1},"application/vnd.d3m-dataset":{source:`iana`},"application/vnd.d3m-problem":{source:`iana`},"application/vnd.dart":{source:`iana`,compressible:!0,extensions:[`dart`]},"application/vnd.data-vision.rdz":{source:`iana`,extensions:[`rdz`]},"application/vnd.datapackage+json":{source:`iana`,compressible:!0},"application/vnd.dataresource+json":{source:`iana`,compressible:!0},"application/vnd.dbf":{source:`iana`,extensions:[`dbf`]},"application/vnd.debian.binary-package":{source:`iana`},"application/vnd.dece.data":{source:`iana`,extensions:[`uvf`,`uvvf`,`uvd`,`uvvd`]},"application/vnd.dece.ttml+xml":{source:`iana`,compressible:!0,extensions:[`uvt`,`uvvt`]},"application/vnd.dece.unspecified":{source:`iana`,extensions:[`uvx`,`uvvx`]},"application/vnd.dece.zip":{source:`iana`,extensions:[`uvz`,`uvvz`]},"application/vnd.denovo.fcselayout-link":{source:`iana`,extensions:[`fe_launch`]},"application/vnd.desmume.movie":{source:`iana`},"application/vnd.dir-bi.plate-dl-nosuffix":{source:`iana`},"application/vnd.dm.delegation+xml":{source:`iana`,compressible:!0},"application/vnd.dna":{source:`iana`,extensions:[`dna`]},"application/vnd.document+json":{source:`iana`,compressible:!0},"application/vnd.dolby.mlp":{source:`apache`,extensions:[`mlp`]},"application/vnd.dolby.mobile.1":{source:`iana`},"application/vnd.dolby.mobile.2":{source:`iana`},"application/vnd.doremir.scorecloud-binary-document":{source:`iana`},"application/vnd.dpgraph":{source:`iana`,extensions:[`dpg`]},"application/vnd.dreamfactory":{source:`iana`,extensions:[`dfac`]},"application/vnd.drive+json":{source:`iana`,compressible:!0},"application/vnd.ds-keypoint":{source:`apache`,extensions:[`kpxx`]},"application/vnd.dtg.local":{source:`iana`},"application/vnd.dtg.local.flash":{source:`iana`},"application/vnd.dtg.local.html":{source:`iana`},"application/vnd.dvb.ait":{source:`iana`,extensions:[`ait`]},"application/vnd.dvb.dvbisl+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.dvbj":{source:`iana`},"application/vnd.dvb.esgcontainer":{source:`iana`},"application/vnd.dvb.ipdcdftnotifaccess":{source:`iana`},"application/vnd.dvb.ipdcesgaccess":{source:`iana`},"application/vnd.dvb.ipdcesgaccess2":{source:`iana`},"application/vnd.dvb.ipdcesgpdd":{source:`iana`},"application/vnd.dvb.ipdcroaming":{source:`iana`},"application/vnd.dvb.iptv.alfec-base":{source:`iana`},"application/vnd.dvb.iptv.alfec-enhancement":{source:`iana`},"application/vnd.dvb.notif-aggregate-root+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-container+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-init+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.pfr":{source:`iana`},"application/vnd.dvb.service":{source:`iana`,extensions:[`svc`]},"application/vnd.dxr":{source:`iana`},"application/vnd.dynageo":{source:`iana`,extensions:[`geo`]},"application/vnd.dzr":{source:`iana`},"application/vnd.easykaraoke.cdgdownload":{source:`iana`},"application/vnd.ecdis-update":{source:`iana`},"application/vnd.ecip.rlp":{source:`iana`},"application/vnd.eclipse.ditto+json":{source:`iana`,compressible:!0},"application/vnd.ecowin.chart":{source:`iana`,extensions:[`mag`]},"application/vnd.ecowin.filerequest":{source:`iana`},"application/vnd.ecowin.fileupdate":{source:`iana`},"application/vnd.ecowin.series":{source:`iana`},"application/vnd.ecowin.seriesrequest":{source:`iana`},"application/vnd.ecowin.seriesupdate":{source:`iana`},"application/vnd.efi.img":{source:`iana`},"application/vnd.efi.iso":{source:`iana`},"application/vnd.emclient.accessrequest+xml":{source:`iana`,compressible:!0},"application/vnd.enliven":{source:`iana`,extensions:[`nml`]},"application/vnd.enphase.envoy":{source:`iana`},"application/vnd.eprints.data+xml":{source:`iana`,compressible:!0},"application/vnd.epson.esf":{source:`iana`,extensions:[`esf`]},"application/vnd.epson.msf":{source:`iana`,extensions:[`msf`]},"application/vnd.epson.quickanime":{source:`iana`,extensions:[`qam`]},"application/vnd.epson.salt":{source:`iana`,extensions:[`slt`]},"application/vnd.epson.ssf":{source:`iana`,extensions:[`ssf`]},"application/vnd.ericsson.quickcall":{source:`iana`},"application/vnd.espass-espass+zip":{source:`iana`,compressible:!1},"application/vnd.eszigno3+xml":{source:`iana`,compressible:!0,extensions:[`es3`,`et3`]},"application/vnd.etsi.aoc+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.asic-e+zip":{source:`iana`,compressible:!1},"application/vnd.etsi.asic-s+zip":{source:`iana`,compressible:!1},"application/vnd.etsi.cug+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.mcid+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.mheg5":{source:`iana`},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.pstn+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.sci+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.simservs+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.timestamp-token":{source:`iana`},"application/vnd.etsi.tsl+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.tsl.der":{source:`iana`},"application/vnd.eu.kasparian.car+json":{source:`iana`,compressible:!0},"application/vnd.eudora.data":{source:`iana`},"application/vnd.evolv.ecig.profile":{source:`iana`},"application/vnd.evolv.ecig.settings":{source:`iana`},"application/vnd.evolv.ecig.theme":{source:`iana`},"application/vnd.exstream-empower+zip":{source:`iana`,compressible:!1},"application/vnd.exstream-package":{source:`iana`},"application/vnd.ezpix-album":{source:`iana`,extensions:[`ez2`]},"application/vnd.ezpix-package":{source:`iana`,extensions:[`ez3`]},"application/vnd.f-secure.mobile":{source:`iana`},"application/vnd.familysearch.gedcom+zip":{source:`iana`,compressible:!1},"application/vnd.fastcopy-disk-image":{source:`iana`},"application/vnd.fdf":{source:`iana`,extensions:[`fdf`]},"application/vnd.fdsn.mseed":{source:`iana`,extensions:[`mseed`]},"application/vnd.fdsn.seed":{source:`iana`,extensions:[`seed`,`dataless`]},"application/vnd.ffsns":{source:`iana`},"application/vnd.ficlab.flb+zip":{source:`iana`,compressible:!1},"application/vnd.filmit.zfc":{source:`iana`},"application/vnd.fints":{source:`iana`},"application/vnd.firemonkeys.cloudcell":{source:`iana`},"application/vnd.flographit":{source:`iana`,extensions:[`gph`]},"application/vnd.fluxtime.clip":{source:`iana`,extensions:[`ftc`]},"application/vnd.font-fontforge-sfd":{source:`iana`},"application/vnd.framemaker":{source:`iana`,extensions:[`fm`,`frame`,`maker`,`book`]},"application/vnd.frogans.fnc":{source:`iana`,extensions:[`fnc`]},"application/vnd.frogans.ltf":{source:`iana`,extensions:[`ltf`]},"application/vnd.fsc.weblaunch":{source:`iana`,extensions:[`fsc`]},"application/vnd.fujifilm.fb.docuworks":{source:`iana`},"application/vnd.fujifilm.fb.docuworks.binder":{source:`iana`},"application/vnd.fujifilm.fb.docuworks.container":{source:`iana`},"application/vnd.fujifilm.fb.jfi+xml":{source:`iana`,compressible:!0},"application/vnd.fujitsu.oasys":{source:`iana`,extensions:[`oas`]},"application/vnd.fujitsu.oasys2":{source:`iana`,extensions:[`oa2`]},"application/vnd.fujitsu.oasys3":{source:`iana`,extensions:[`oa3`]},"application/vnd.fujitsu.oasysgp":{source:`iana`,extensions:[`fg5`]},"application/vnd.fujitsu.oasysprs":{source:`iana`,extensions:[`bh2`]},"application/vnd.fujixerox.art-ex":{source:`iana`},"application/vnd.fujixerox.art4":{source:`iana`},"application/vnd.fujixerox.ddd":{source:`iana`,extensions:[`ddd`]},"application/vnd.fujixerox.docuworks":{source:`iana`,extensions:[`xdw`]},"application/vnd.fujixerox.docuworks.binder":{source:`iana`,extensions:[`xbd`]},"application/vnd.fujixerox.docuworks.container":{source:`iana`},"application/vnd.fujixerox.hbpl":{source:`iana`},"application/vnd.fut-misnet":{source:`iana`},"application/vnd.futoin+cbor":{source:`iana`},"application/vnd.futoin+json":{source:`iana`,compressible:!0},"application/vnd.fuzzysheet":{source:`iana`,extensions:[`fzs`]},"application/vnd.genomatix.tuxedo":{source:`iana`,extensions:[`txd`]},"application/vnd.gentics.grd+json":{source:`iana`,compressible:!0},"application/vnd.geo+json":{source:`iana`,compressible:!0},"application/vnd.geocube+xml":{source:`iana`,compressible:!0},"application/vnd.geogebra.file":{source:`iana`,extensions:[`ggb`]},"application/vnd.geogebra.slides":{source:`iana`},"application/vnd.geogebra.tool":{source:`iana`,extensions:[`ggt`]},"application/vnd.geometry-explorer":{source:`iana`,extensions:[`gex`,`gre`]},"application/vnd.geonext":{source:`iana`,extensions:[`gxt`]},"application/vnd.geoplan":{source:`iana`,extensions:[`g2w`]},"application/vnd.geospace":{source:`iana`,extensions:[`g3w`]},"application/vnd.gerber":{source:`iana`},"application/vnd.globalplatform.card-content-mgt":{source:`iana`},"application/vnd.globalplatform.card-content-mgt-response":{source:`iana`},"application/vnd.gmx":{source:`iana`,extensions:[`gmx`]},"application/vnd.google-apps.document":{compressible:!1,extensions:[`gdoc`]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:[`gslides`]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:[`gsheet`]},"application/vnd.google-earth.kml+xml":{source:`iana`,compressible:!0,extensions:[`kml`]},"application/vnd.google-earth.kmz":{source:`iana`,compressible:!1,extensions:[`kmz`]},"application/vnd.gov.sk.e-form+xml":{source:`iana`,compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:`iana`,compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:`iana`,compressible:!0},"application/vnd.grafeq":{source:`iana`,extensions:[`gqf`,`gqs`]},"application/vnd.gridmp":{source:`iana`},"application/vnd.groove-account":{source:`iana`,extensions:[`gac`]},"application/vnd.groove-help":{source:`iana`,extensions:[`ghf`]},"application/vnd.groove-identity-message":{source:`iana`,extensions:[`gim`]},"application/vnd.groove-injector":{source:`iana`,extensions:[`grv`]},"application/vnd.groove-tool-message":{source:`iana`,extensions:[`gtm`]},"application/vnd.groove-tool-template":{source:`iana`,extensions:[`tpl`]},"application/vnd.groove-vcard":{source:`iana`,extensions:[`vcg`]},"application/vnd.hal+json":{source:`iana`,compressible:!0},"application/vnd.hal+xml":{source:`iana`,compressible:!0,extensions:[`hal`]},"application/vnd.handheld-entertainment+xml":{source:`iana`,compressible:!0,extensions:[`zmm`]},"application/vnd.hbci":{source:`iana`,extensions:[`hbci`]},"application/vnd.hc+json":{source:`iana`,compressible:!0},"application/vnd.hcl-bireports":{source:`iana`},"application/vnd.hdt":{source:`iana`},"application/vnd.heroku+json":{source:`iana`,compressible:!0},"application/vnd.hhe.lesson-player":{source:`iana`,extensions:[`les`]},"application/vnd.hl7cda+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.hl7v2+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.hp-hpgl":{source:`iana`,extensions:[`hpgl`]},"application/vnd.hp-hpid":{source:`iana`,extensions:[`hpid`]},"application/vnd.hp-hps":{source:`iana`,extensions:[`hps`]},"application/vnd.hp-jlyt":{source:`iana`,extensions:[`jlt`]},"application/vnd.hp-pcl":{source:`iana`,extensions:[`pcl`]},"application/vnd.hp-pclxl":{source:`iana`,extensions:[`pclxl`]},"application/vnd.httphone":{source:`iana`},"application/vnd.hydrostatix.sof-data":{source:`iana`,extensions:[`sfd-hdstx`]},"application/vnd.hyper+json":{source:`iana`,compressible:!0},"application/vnd.hyper-item+json":{source:`iana`,compressible:!0},"application/vnd.hyperdrive+json":{source:`iana`,compressible:!0},"application/vnd.hzn-3d-crossword":{source:`iana`},"application/vnd.ibm.afplinedata":{source:`iana`},"application/vnd.ibm.electronic-media":{source:`iana`},"application/vnd.ibm.minipay":{source:`iana`,extensions:[`mpy`]},"application/vnd.ibm.modcap":{source:`iana`,extensions:[`afp`,`listafp`,`list3820`]},"application/vnd.ibm.rights-management":{source:`iana`,extensions:[`irm`]},"application/vnd.ibm.secure-container":{source:`iana`,extensions:[`sc`]},"application/vnd.iccprofile":{source:`iana`,extensions:[`icc`,`icm`]},"application/vnd.ieee.1905":{source:`iana`},"application/vnd.igloader":{source:`iana`,extensions:[`igl`]},"application/vnd.imagemeter.folder+zip":{source:`iana`,compressible:!1},"application/vnd.imagemeter.image+zip":{source:`iana`,compressible:!1},"application/vnd.immervision-ivp":{source:`iana`,extensions:[`ivp`]},"application/vnd.immervision-ivu":{source:`iana`,extensions:[`ivu`]},"application/vnd.ims.imsccv1p1":{source:`iana`},"application/vnd.ims.imsccv1p2":{source:`iana`},"application/vnd.ims.imsccv1p3":{source:`iana`},"application/vnd.ims.lis.v2.result+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:`iana`,compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:`iana`,compressible:!0},"application/vnd.informix-visionary":{source:`iana`},"application/vnd.infotech.project":{source:`iana`},"application/vnd.infotech.project+xml":{source:`iana`,compressible:!0},"application/vnd.innopath.wamp.notification":{source:`iana`},"application/vnd.insors.igm":{source:`iana`,extensions:[`igm`]},"application/vnd.intercon.formnet":{source:`iana`,extensions:[`xpw`,`xpx`]},"application/vnd.intergeo":{source:`iana`,extensions:[`i2g`]},"application/vnd.intertrust.digibox":{source:`iana`},"application/vnd.intertrust.nncp":{source:`iana`},"application/vnd.intu.qbo":{source:`iana`,extensions:[`qbo`]},"application/vnd.intu.qfx":{source:`iana`,extensions:[`qfx`]},"application/vnd.iptc.g2.catalogitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:`iana`,compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:`iana`,extensions:[`rcprofile`]},"application/vnd.irepository.package+xml":{source:`iana`,compressible:!0,extensions:[`irp`]},"application/vnd.is-xpr":{source:`iana`,extensions:[`xpr`]},"application/vnd.isac.fcs":{source:`iana`,extensions:[`fcs`]},"application/vnd.iso11783-10+zip":{source:`iana`,compressible:!1},"application/vnd.jam":{source:`iana`,extensions:[`jam`]},"application/vnd.japannet-directory-service":{source:`iana`},"application/vnd.japannet-jpnstore-wakeup":{source:`iana`},"application/vnd.japannet-payment-wakeup":{source:`iana`},"application/vnd.japannet-registration":{source:`iana`},"application/vnd.japannet-registration-wakeup":{source:`iana`},"application/vnd.japannet-setstore-wakeup":{source:`iana`},"application/vnd.japannet-verification":{source:`iana`},"application/vnd.japannet-verification-wakeup":{source:`iana`},"application/vnd.jcp.javame.midlet-rms":{source:`iana`,extensions:[`rms`]},"application/vnd.jisp":{source:`iana`,extensions:[`jisp`]},"application/vnd.joost.joda-archive":{source:`iana`,extensions:[`joda`]},"application/vnd.jsk.isdn-ngn":{source:`iana`},"application/vnd.kahootz":{source:`iana`,extensions:[`ktz`,`ktr`]},"application/vnd.kde.karbon":{source:`iana`,extensions:[`karbon`]},"application/vnd.kde.kchart":{source:`iana`,extensions:[`chrt`]},"application/vnd.kde.kformula":{source:`iana`,extensions:[`kfo`]},"application/vnd.kde.kivio":{source:`iana`,extensions:[`flw`]},"application/vnd.kde.kontour":{source:`iana`,extensions:[`kon`]},"application/vnd.kde.kpresenter":{source:`iana`,extensions:[`kpr`,`kpt`]},"application/vnd.kde.kspread":{source:`iana`,extensions:[`ksp`]},"application/vnd.kde.kword":{source:`iana`,extensions:[`kwd`,`kwt`]},"application/vnd.kenameaapp":{source:`iana`,extensions:[`htke`]},"application/vnd.kidspiration":{source:`iana`,extensions:[`kia`]},"application/vnd.kinar":{source:`iana`,extensions:[`kne`,`knp`]},"application/vnd.koan":{source:`iana`,extensions:[`skp`,`skd`,`skt`,`skm`]},"application/vnd.kodak-descriptor":{source:`iana`,extensions:[`sse`]},"application/vnd.las":{source:`iana`},"application/vnd.las.las+json":{source:`iana`,compressible:!0},"application/vnd.las.las+xml":{source:`iana`,compressible:!0,extensions:[`lasxml`]},"application/vnd.laszip":{source:`iana`},"application/vnd.leap+json":{source:`iana`,compressible:!0},"application/vnd.liberty-request+xml":{source:`iana`,compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:`iana`,extensions:[`lbd`]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:`iana`,compressible:!0,extensions:[`lbe`]},"application/vnd.logipipe.circuit+zip":{source:`iana`,compressible:!1},"application/vnd.loom":{source:`iana`},"application/vnd.lotus-1-2-3":{source:`iana`,extensions:[`123`]},"application/vnd.lotus-approach":{source:`iana`,extensions:[`apr`]},"application/vnd.lotus-freelance":{source:`iana`,extensions:[`pre`]},"application/vnd.lotus-notes":{source:`iana`,extensions:[`nsf`]},"application/vnd.lotus-organizer":{source:`iana`,extensions:[`org`]},"application/vnd.lotus-screencam":{source:`iana`,extensions:[`scm`]},"application/vnd.lotus-wordpro":{source:`iana`,extensions:[`lwp`]},"application/vnd.macports.portpkg":{source:`iana`,extensions:[`portpkg`]},"application/vnd.mapbox-vector-tile":{source:`iana`,extensions:[`mvt`]},"application/vnd.marlin.drm.actiontoken+xml":{source:`iana`,compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:`iana`,compressible:!0},"application/vnd.marlin.drm.license+xml":{source:`iana`,compressible:!0},"application/vnd.marlin.drm.mdcf":{source:`iana`},"application/vnd.mason+json":{source:`iana`,compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:`iana`,compressible:!1},"application/vnd.maxmind.maxmind-db":{source:`iana`},"application/vnd.mcd":{source:`iana`,extensions:[`mcd`]},"application/vnd.medcalcdata":{source:`iana`,extensions:[`mc1`]},"application/vnd.mediastation.cdkey":{source:`iana`,extensions:[`cdkey`]},"application/vnd.meridian-slingshot":{source:`iana`},"application/vnd.mfer":{source:`iana`,extensions:[`mwf`]},"application/vnd.mfmp":{source:`iana`,extensions:[`mfm`]},"application/vnd.micro+json":{source:`iana`,compressible:!0},"application/vnd.micrografx.flo":{source:`iana`,extensions:[`flo`]},"application/vnd.micrografx.igx":{source:`iana`,extensions:[`igx`]},"application/vnd.microsoft.portable-executable":{source:`iana`},"application/vnd.microsoft.windows.thumbnail-cache":{source:`iana`},"application/vnd.miele+json":{source:`iana`,compressible:!0},"application/vnd.mif":{source:`iana`,extensions:[`mif`]},"application/vnd.minisoft-hp3000-save":{source:`iana`},"application/vnd.mitsubishi.misty-guard.trustweb":{source:`iana`},"application/vnd.mobius.daf":{source:`iana`,extensions:[`daf`]},"application/vnd.mobius.dis":{source:`iana`,extensions:[`dis`]},"application/vnd.mobius.mbk":{source:`iana`,extensions:[`mbk`]},"application/vnd.mobius.mqy":{source:`iana`,extensions:[`mqy`]},"application/vnd.mobius.msl":{source:`iana`,extensions:[`msl`]},"application/vnd.mobius.plc":{source:`iana`,extensions:[`plc`]},"application/vnd.mobius.txf":{source:`iana`,extensions:[`txf`]},"application/vnd.mophun.application":{source:`iana`,extensions:[`mpn`]},"application/vnd.mophun.certificate":{source:`iana`,extensions:[`mpc`]},"application/vnd.motorola.flexsuite":{source:`iana`},"application/vnd.motorola.flexsuite.adsi":{source:`iana`},"application/vnd.motorola.flexsuite.fis":{source:`iana`},"application/vnd.motorola.flexsuite.gotap":{source:`iana`},"application/vnd.motorola.flexsuite.kmr":{source:`iana`},"application/vnd.motorola.flexsuite.ttc":{source:`iana`},"application/vnd.motorola.flexsuite.wem":{source:`iana`},"application/vnd.motorola.iprm":{source:`iana`},"application/vnd.mozilla.xul+xml":{source:`iana`,compressible:!0,extensions:[`xul`]},"application/vnd.ms-3mfdocument":{source:`iana`},"application/vnd.ms-artgalry":{source:`iana`,extensions:[`cil`]},"application/vnd.ms-asf":{source:`iana`},"application/vnd.ms-cab-compressed":{source:`iana`,extensions:[`cab`]},"application/vnd.ms-color.iccprofile":{source:`apache`},"application/vnd.ms-excel":{source:`iana`,compressible:!1,extensions:[`xls`,`xlm`,`xla`,`xlc`,`xlt`,`xlw`]},"application/vnd.ms-excel.addin.macroenabled.12":{source:`iana`,extensions:[`xlam`]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:`iana`,extensions:[`xlsb`]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:`iana`,extensions:[`xlsm`]},"application/vnd.ms-excel.template.macroenabled.12":{source:`iana`,extensions:[`xltm`]},"application/vnd.ms-fontobject":{source:`iana`,compressible:!0,extensions:[`eot`]},"application/vnd.ms-htmlhelp":{source:`iana`,extensions:[`chm`]},"application/vnd.ms-ims":{source:`iana`,extensions:[`ims`]},"application/vnd.ms-lrm":{source:`iana`,extensions:[`lrm`]},"application/vnd.ms-office.activex+xml":{source:`iana`,compressible:!0},"application/vnd.ms-officetheme":{source:`iana`,extensions:[`thmx`]},"application/vnd.ms-opentype":{source:`apache`,compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:[`msg`]},"application/vnd.ms-package.obfuscated-opentype":{source:`apache`},"application/vnd.ms-pki.seccat":{source:`apache`,extensions:[`cat`]},"application/vnd.ms-pki.stl":{source:`apache`,extensions:[`stl`]},"application/vnd.ms-playready.initiator+xml":{source:`iana`,compressible:!0},"application/vnd.ms-powerpoint":{source:`iana`,compressible:!1,extensions:[`ppt`,`pps`,`pot`]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:`iana`,extensions:[`ppam`]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:`iana`,extensions:[`pptm`]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:`iana`,extensions:[`sldm`]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:`iana`,extensions:[`ppsm`]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:`iana`,extensions:[`potm`]},"application/vnd.ms-printdevicecapabilities+xml":{source:`iana`,compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:`apache`,compressible:!0},"application/vnd.ms-printschematicket+xml":{source:`iana`,compressible:!0},"application/vnd.ms-project":{source:`iana`,extensions:[`mpp`,`mpt`]},"application/vnd.ms-tnef":{source:`iana`},"application/vnd.ms-windows.devicepairing":{source:`iana`},"application/vnd.ms-windows.nwprinting.oob":{source:`iana`},"application/vnd.ms-windows.printerpairing":{source:`iana`},"application/vnd.ms-windows.wsd.oob":{source:`iana`},"application/vnd.ms-wmdrm.lic-chlg-req":{source:`iana`},"application/vnd.ms-wmdrm.lic-resp":{source:`iana`},"application/vnd.ms-wmdrm.meter-chlg-req":{source:`iana`},"application/vnd.ms-wmdrm.meter-resp":{source:`iana`},"application/vnd.ms-word.document.macroenabled.12":{source:`iana`,extensions:[`docm`]},"application/vnd.ms-word.template.macroenabled.12":{source:`iana`,extensions:[`dotm`]},"application/vnd.ms-works":{source:`iana`,extensions:[`wps`,`wks`,`wcm`,`wdb`]},"application/vnd.ms-wpl":{source:`iana`,extensions:[`wpl`]},"application/vnd.ms-xpsdocument":{source:`iana`,compressible:!1,extensions:[`xps`]},"application/vnd.msa-disk-image":{source:`iana`},"application/vnd.mseq":{source:`iana`,extensions:[`mseq`]},"application/vnd.msign":{source:`iana`},"application/vnd.multiad.creator":{source:`iana`},"application/vnd.multiad.creator.cif":{source:`iana`},"application/vnd.music-niff":{source:`iana`},"application/vnd.musician":{source:`iana`,extensions:[`mus`]},"application/vnd.muvee.style":{source:`iana`,extensions:[`msty`]},"application/vnd.mynfc":{source:`iana`,extensions:[`taglet`]},"application/vnd.nacamar.ybrid+json":{source:`iana`,compressible:!0},"application/vnd.ncd.control":{source:`iana`},"application/vnd.ncd.reference":{source:`iana`},"application/vnd.nearst.inv+json":{source:`iana`,compressible:!0},"application/vnd.nebumind.line":{source:`iana`},"application/vnd.nervana":{source:`iana`},"application/vnd.netfpx":{source:`iana`},"application/vnd.neurolanguage.nlu":{source:`iana`,extensions:[`nlu`]},"application/vnd.nimn":{source:`iana`},"application/vnd.nintendo.nitro.rom":{source:`iana`},"application/vnd.nintendo.snes.rom":{source:`iana`},"application/vnd.nitf":{source:`iana`,extensions:[`ntf`,`nitf`]},"application/vnd.noblenet-directory":{source:`iana`,extensions:[`nnd`]},"application/vnd.noblenet-sealer":{source:`iana`,extensions:[`nns`]},"application/vnd.noblenet-web":{source:`iana`,extensions:[`nnw`]},"application/vnd.nokia.catalogs":{source:`iana`},"application/vnd.nokia.conml+wbxml":{source:`iana`},"application/vnd.nokia.conml+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:`iana`},"application/vnd.nokia.landmark+wbxml":{source:`iana`},"application/vnd.nokia.landmark+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:`iana`,compressible:!0,extensions:[`ac`]},"application/vnd.nokia.n-gage.data":{source:`iana`,extensions:[`ngdat`]},"application/vnd.nokia.n-gage.symbian.install":{source:`iana`,extensions:[`n-gage`]},"application/vnd.nokia.ncd":{source:`iana`},"application/vnd.nokia.pcd+wbxml":{source:`iana`},"application/vnd.nokia.pcd+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.radio-preset":{source:`iana`,extensions:[`rpst`]},"application/vnd.nokia.radio-presets":{source:`iana`,extensions:[`rpss`]},"application/vnd.novadigm.edm":{source:`iana`,extensions:[`edm`]},"application/vnd.novadigm.edx":{source:`iana`,extensions:[`edx`]},"application/vnd.novadigm.ext":{source:`iana`,extensions:[`ext`]},"application/vnd.ntt-local.content-share":{source:`iana`},"application/vnd.ntt-local.file-transfer":{source:`iana`},"application/vnd.ntt-local.ogw_remote-access":{source:`iana`},"application/vnd.ntt-local.sip-ta_remote":{source:`iana`},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:`iana`},"application/vnd.oasis.opendocument.chart":{source:`iana`,extensions:[`odc`]},"application/vnd.oasis.opendocument.chart-template":{source:`iana`,extensions:[`otc`]},"application/vnd.oasis.opendocument.database":{source:`iana`,extensions:[`odb`]},"application/vnd.oasis.opendocument.formula":{source:`iana`,extensions:[`odf`]},"application/vnd.oasis.opendocument.formula-template":{source:`iana`,extensions:[`odft`]},"application/vnd.oasis.opendocument.graphics":{source:`iana`,compressible:!1,extensions:[`odg`]},"application/vnd.oasis.opendocument.graphics-template":{source:`iana`,extensions:[`otg`]},"application/vnd.oasis.opendocument.image":{source:`iana`,extensions:[`odi`]},"application/vnd.oasis.opendocument.image-template":{source:`iana`,extensions:[`oti`]},"application/vnd.oasis.opendocument.presentation":{source:`iana`,compressible:!1,extensions:[`odp`]},"application/vnd.oasis.opendocument.presentation-template":{source:`iana`,extensions:[`otp`]},"application/vnd.oasis.opendocument.spreadsheet":{source:`iana`,compressible:!1,extensions:[`ods`]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:`iana`,extensions:[`ots`]},"application/vnd.oasis.opendocument.text":{source:`iana`,compressible:!1,extensions:[`odt`]},"application/vnd.oasis.opendocument.text-master":{source:`iana`,extensions:[`odm`]},"application/vnd.oasis.opendocument.text-template":{source:`iana`,extensions:[`ott`]},"application/vnd.oasis.opendocument.text-web":{source:`iana`,extensions:[`oth`]},"application/vnd.obn":{source:`iana`},"application/vnd.ocf+cbor":{source:`iana`},"application/vnd.oci.image.manifest.v1+json":{source:`iana`,compressible:!0},"application/vnd.oftn.l10n+json":{source:`iana`,compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:`iana`},"application/vnd.oipf.dae.svg+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.pae.gem":{source:`iana`},"application/vnd.oipf.spdiscovery+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.spdlist+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.userprofile+xml":{source:`iana`,compressible:!0},"application/vnd.olpc-sugar":{source:`iana`,extensions:[`xo`]},"application/vnd.oma-scws-config":{source:`iana`},"application/vnd.oma-scws-http-request":{source:`iana`},"application/vnd.oma-scws-http-response":{source:`iana`},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.ltkm":{source:`iana`},"application/vnd.oma.bcast.notification+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:`iana`},"application/vnd.oma.bcast.sgboot":{source:`iana`},"application/vnd.oma.bcast.sgdd+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.sgdu":{source:`iana`},"application/vnd.oma.bcast.simple-symbol-container":{source:`iana`},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.stkm":{source:`iana`},"application/vnd.oma.cab-address-book+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:`iana`,compressible:!0},"application/vnd.oma.dcd":{source:`iana`},"application/vnd.oma.dcdc":{source:`iana`},"application/vnd.oma.dd2+xml":{source:`iana`,compressible:!0,extensions:[`dd2`]},"application/vnd.oma.drm.risd+xml":{source:`iana`,compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:`iana`,compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:`iana`},"application/vnd.oma.lwm2m+json":{source:`iana`,compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:`iana`},"application/vnd.oma.pal+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.groups+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:`iana`,compressible:!0},"application/vnd.oma.push":{source:`iana`},"application/vnd.oma.scidm.messages+xml":{source:`iana`,compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:`iana`,compressible:!0},"application/vnd.omads-email+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.omads-file+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.omads-folder+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.omaloc-supl-init":{source:`iana`},"application/vnd.onepager":{source:`iana`},"application/vnd.onepagertamp":{source:`iana`},"application/vnd.onepagertamx":{source:`iana`},"application/vnd.onepagertat":{source:`iana`},"application/vnd.onepagertatp":{source:`iana`},"application/vnd.onepagertatx":{source:`iana`},"application/vnd.openblox.game+xml":{source:`iana`,compressible:!0,extensions:[`obgx`]},"application/vnd.openblox.game-binary":{source:`iana`},"application/vnd.openeye.oeb":{source:`iana`},"application/vnd.openofficeorg.extension":{source:`apache`,extensions:[`oxt`]},"application/vnd.openstreetmap.data+xml":{source:`iana`,compressible:!0,extensions:[`osm`]},"application/vnd.opentimestamps.ots":{source:`iana`},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:`iana`,compressible:!1,extensions:[`pptx`]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:`iana`,extensions:[`sldx`]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:`iana`,extensions:[`ppsx`]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:`iana`,extensions:[`potx`]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:`iana`,compressible:!1,extensions:[`xlsx`]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:`iana`,extensions:[`xltx`]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:`iana`},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:`iana`,compressible:!1,extensions:[`docx`]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:`iana`,extensions:[`dotx`]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:`iana`,compressible:!0},"application/vnd.oracle.resource+json":{source:`iana`,compressible:!0},"application/vnd.orange.indata":{source:`iana`},"application/vnd.osa.netdeploy":{source:`iana`},"application/vnd.osgeo.mapguide.package":{source:`iana`,extensions:[`mgp`]},"application/vnd.osgi.bundle":{source:`iana`},"application/vnd.osgi.dp":{source:`iana`,extensions:[`dp`]},"application/vnd.osgi.subsystem":{source:`iana`,extensions:[`esa`]},"application/vnd.otps.ct-kip+xml":{source:`iana`,compressible:!0},"application/vnd.oxli.countgraph":{source:`iana`},"application/vnd.pagerduty+json":{source:`iana`,compressible:!0},"application/vnd.palm":{source:`iana`,extensions:[`pdb`,`pqa`,`oprc`]},"application/vnd.panoply":{source:`iana`},"application/vnd.paos.xml":{source:`iana`},"application/vnd.patentdive":{source:`iana`},"application/vnd.patientecommsdoc":{source:`iana`},"application/vnd.pawaafile":{source:`iana`,extensions:[`paw`]},"application/vnd.pcos":{source:`iana`},"application/vnd.pg.format":{source:`iana`,extensions:[`str`]},"application/vnd.pg.osasli":{source:`iana`,extensions:[`ei6`]},"application/vnd.piaccess.application-licence":{source:`iana`},"application/vnd.picsel":{source:`iana`,extensions:[`efif`]},"application/vnd.pmi.widget":{source:`iana`,extensions:[`wg`]},"application/vnd.poc.group-advertisement+xml":{source:`iana`,compressible:!0},"application/vnd.pocketlearn":{source:`iana`,extensions:[`plf`]},"application/vnd.powerbuilder6":{source:`iana`,extensions:[`pbd`]},"application/vnd.powerbuilder6-s":{source:`iana`},"application/vnd.powerbuilder7":{source:`iana`},"application/vnd.powerbuilder7-s":{source:`iana`},"application/vnd.powerbuilder75":{source:`iana`},"application/vnd.powerbuilder75-s":{source:`iana`},"application/vnd.preminet":{source:`iana`},"application/vnd.previewsystems.box":{source:`iana`,extensions:[`box`]},"application/vnd.proteus.magazine":{source:`iana`,extensions:[`mgz`]},"application/vnd.psfs":{source:`iana`},"application/vnd.publishare-delta-tree":{source:`iana`,extensions:[`qps`]},"application/vnd.pvi.ptid1":{source:`iana`,extensions:[`ptid`]},"application/vnd.pwg-multiplexed":{source:`iana`},"application/vnd.pwg-xhtml-print+xml":{source:`iana`,compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:`iana`},"application/vnd.quarantainenet":{source:`iana`},"application/vnd.quark.quarkxpress":{source:`iana`,extensions:[`qxd`,`qxt`,`qwd`,`qwt`,`qxl`,`qxb`]},"application/vnd.quobject-quoxdocument":{source:`iana`},"application/vnd.radisys.moml+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:`iana`,compressible:!0},"application/vnd.rainstor.data":{source:`iana`},"application/vnd.rapid":{source:`iana`},"application/vnd.rar":{source:`iana`,extensions:[`rar`]},"application/vnd.realvnc.bed":{source:`iana`,extensions:[`bed`]},"application/vnd.recordare.musicxml":{source:`iana`,extensions:[`mxl`]},"application/vnd.recordare.musicxml+xml":{source:`iana`,compressible:!0,extensions:[`musicxml`]},"application/vnd.renlearn.rlprint":{source:`iana`},"application/vnd.resilient.logic":{source:`iana`},"application/vnd.restful+json":{source:`iana`,compressible:!0},"application/vnd.rig.cryptonote":{source:`iana`,extensions:[`cryptonote`]},"application/vnd.rim.cod":{source:`apache`,extensions:[`cod`]},"application/vnd.rn-realmedia":{source:`apache`,extensions:[`rm`]},"application/vnd.rn-realmedia-vbr":{source:`apache`,extensions:[`rmvb`]},"application/vnd.route66.link66+xml":{source:`iana`,compressible:!0,extensions:[`link66`]},"application/vnd.rs-274x":{source:`iana`},"application/vnd.ruckus.download":{source:`iana`},"application/vnd.s3sms":{source:`iana`},"application/vnd.sailingtracker.track":{source:`iana`,extensions:[`st`]},"application/vnd.sar":{source:`iana`},"application/vnd.sbm.cid":{source:`iana`},"application/vnd.sbm.mid2":{source:`iana`},"application/vnd.scribus":{source:`iana`},"application/vnd.sealed.3df":{source:`iana`},"application/vnd.sealed.csf":{source:`iana`},"application/vnd.sealed.doc":{source:`iana`},"application/vnd.sealed.eml":{source:`iana`},"application/vnd.sealed.mht":{source:`iana`},"application/vnd.sealed.net":{source:`iana`},"application/vnd.sealed.ppt":{source:`iana`},"application/vnd.sealed.tiff":{source:`iana`},"application/vnd.sealed.xls":{source:`iana`},"application/vnd.sealedmedia.softseal.html":{source:`iana`},"application/vnd.sealedmedia.softseal.pdf":{source:`iana`},"application/vnd.seemail":{source:`iana`,extensions:[`see`]},"application/vnd.seis+json":{source:`iana`,compressible:!0},"application/vnd.sema":{source:`iana`,extensions:[`sema`]},"application/vnd.semd":{source:`iana`,extensions:[`semd`]},"application/vnd.semf":{source:`iana`,extensions:[`semf`]},"application/vnd.shade-save-file":{source:`iana`},"application/vnd.shana.informed.formdata":{source:`iana`,extensions:[`ifm`]},"application/vnd.shana.informed.formtemplate":{source:`iana`,extensions:[`itp`]},"application/vnd.shana.informed.interchange":{source:`iana`,extensions:[`iif`]},"application/vnd.shana.informed.package":{source:`iana`,extensions:[`ipk`]},"application/vnd.shootproof+json":{source:`iana`,compressible:!0},"application/vnd.shopkick+json":{source:`iana`,compressible:!0},"application/vnd.shp":{source:`iana`},"application/vnd.shx":{source:`iana`},"application/vnd.sigrok.session":{source:`iana`},"application/vnd.simtech-mindmapper":{source:`iana`,extensions:[`twd`,`twds`]},"application/vnd.siren+json":{source:`iana`,compressible:!0},"application/vnd.smaf":{source:`iana`,extensions:[`mmf`]},"application/vnd.smart.notebook":{source:`iana`},"application/vnd.smart.teacher":{source:`iana`,extensions:[`teacher`]},"application/vnd.snesdev-page-table":{source:`iana`},"application/vnd.software602.filler.form+xml":{source:`iana`,compressible:!0,extensions:[`fo`]},"application/vnd.software602.filler.form-xml-zip":{source:`iana`},"application/vnd.solent.sdkm+xml":{source:`iana`,compressible:!0,extensions:[`sdkm`,`sdkd`]},"application/vnd.spotfire.dxp":{source:`iana`,extensions:[`dxp`]},"application/vnd.spotfire.sfs":{source:`iana`,extensions:[`sfs`]},"application/vnd.sqlite3":{source:`iana`},"application/vnd.sss-cod":{source:`iana`},"application/vnd.sss-dtf":{source:`iana`},"application/vnd.sss-ntf":{source:`iana`},"application/vnd.stardivision.calc":{source:`apache`,extensions:[`sdc`]},"application/vnd.stardivision.draw":{source:`apache`,extensions:[`sda`]},"application/vnd.stardivision.impress":{source:`apache`,extensions:[`sdd`]},"application/vnd.stardivision.math":{source:`apache`,extensions:[`smf`]},"application/vnd.stardivision.writer":{source:`apache`,extensions:[`sdw`,`vor`]},"application/vnd.stardivision.writer-global":{source:`apache`,extensions:[`sgl`]},"application/vnd.stepmania.package":{source:`iana`,extensions:[`smzip`]},"application/vnd.stepmania.stepchart":{source:`iana`,extensions:[`sm`]},"application/vnd.street-stream":{source:`iana`},"application/vnd.sun.wadl+xml":{source:`iana`,compressible:!0,extensions:[`wadl`]},"application/vnd.sun.xml.calc":{source:`apache`,extensions:[`sxc`]},"application/vnd.sun.xml.calc.template":{source:`apache`,extensions:[`stc`]},"application/vnd.sun.xml.draw":{source:`apache`,extensions:[`sxd`]},"application/vnd.sun.xml.draw.template":{source:`apache`,extensions:[`std`]},"application/vnd.sun.xml.impress":{source:`apache`,extensions:[`sxi`]},"application/vnd.sun.xml.impress.template":{source:`apache`,extensions:[`sti`]},"application/vnd.sun.xml.math":{source:`apache`,extensions:[`sxm`]},"application/vnd.sun.xml.writer":{source:`apache`,extensions:[`sxw`]},"application/vnd.sun.xml.writer.global":{source:`apache`,extensions:[`sxg`]},"application/vnd.sun.xml.writer.template":{source:`apache`,extensions:[`stw`]},"application/vnd.sus-calendar":{source:`iana`,extensions:[`sus`,`susp`]},"application/vnd.svd":{source:`iana`,extensions:[`svd`]},"application/vnd.swiftview-ics":{source:`iana`},"application/vnd.sycle+xml":{source:`iana`,compressible:!0},"application/vnd.syft+json":{source:`iana`,compressible:!0},"application/vnd.symbian.install":{source:`apache`,extensions:[`sis`,`sisx`]},"application/vnd.syncml+xml":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`xsm`]},"application/vnd.syncml.dm+wbxml":{source:`iana`,charset:`UTF-8`,extensions:[`bdm`]},"application/vnd.syncml.dm+xml":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`xdm`]},"application/vnd.syncml.dm.notification":{source:`iana`},"application/vnd.syncml.dmddf+wbxml":{source:`iana`},"application/vnd.syncml.dmddf+xml":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`ddf`]},"application/vnd.syncml.dmtnds+wbxml":{source:`iana`},"application/vnd.syncml.dmtnds+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.syncml.ds.notification":{source:`iana`},"application/vnd.tableschema+json":{source:`iana`,compressible:!0},"application/vnd.tao.intent-module-archive":{source:`iana`,extensions:[`tao`]},"application/vnd.tcpdump.pcap":{source:`iana`,extensions:[`pcap`,`cap`,`dmp`]},"application/vnd.think-cell.ppttc+json":{source:`iana`,compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:`iana`,compressible:!0},"application/vnd.tml":{source:`iana`},"application/vnd.tmobile-livetv":{source:`iana`,extensions:[`tmo`]},"application/vnd.tri.onesource":{source:`iana`},"application/vnd.trid.tpt":{source:`iana`,extensions:[`tpt`]},"application/vnd.triscape.mxs":{source:`iana`,extensions:[`mxs`]},"application/vnd.trueapp":{source:`iana`,extensions:[`tra`]},"application/vnd.truedoc":{source:`iana`},"application/vnd.ubisoft.webplayer":{source:`iana`},"application/vnd.ufdl":{source:`iana`,extensions:[`ufd`,`ufdl`]},"application/vnd.uiq.theme":{source:`iana`,extensions:[`utz`]},"application/vnd.umajin":{source:`iana`,extensions:[`umj`]},"application/vnd.unity":{source:`iana`,extensions:[`unityweb`]},"application/vnd.uoml+xml":{source:`iana`,compressible:!0,extensions:[`uoml`]},"application/vnd.uplanet.alert":{source:`iana`},"application/vnd.uplanet.alert-wbxml":{source:`iana`},"application/vnd.uplanet.bearer-choice":{source:`iana`},"application/vnd.uplanet.bearer-choice-wbxml":{source:`iana`},"application/vnd.uplanet.cacheop":{source:`iana`},"application/vnd.uplanet.cacheop-wbxml":{source:`iana`},"application/vnd.uplanet.channel":{source:`iana`},"application/vnd.uplanet.channel-wbxml":{source:`iana`},"application/vnd.uplanet.list":{source:`iana`},"application/vnd.uplanet.list-wbxml":{source:`iana`},"application/vnd.uplanet.listcmd":{source:`iana`},"application/vnd.uplanet.listcmd-wbxml":{source:`iana`},"application/vnd.uplanet.signal":{source:`iana`},"application/vnd.uri-map":{source:`iana`},"application/vnd.valve.source.material":{source:`iana`},"application/vnd.vcx":{source:`iana`,extensions:[`vcx`]},"application/vnd.vd-study":{source:`iana`},"application/vnd.vectorworks":{source:`iana`},"application/vnd.vel+json":{source:`iana`,compressible:!0},"application/vnd.verimatrix.vcas":{source:`iana`},"application/vnd.veritone.aion+json":{source:`iana`,compressible:!0},"application/vnd.veryant.thin":{source:`iana`},"application/vnd.ves.encrypted":{source:`iana`},"application/vnd.vidsoft.vidconference":{source:`iana`},"application/vnd.visio":{source:`iana`,extensions:[`vsd`,`vst`,`vss`,`vsw`]},"application/vnd.visionary":{source:`iana`,extensions:[`vis`]},"application/vnd.vividence.scriptfile":{source:`iana`},"application/vnd.vsf":{source:`iana`,extensions:[`vsf`]},"application/vnd.wap.sic":{source:`iana`},"application/vnd.wap.slc":{source:`iana`},"application/vnd.wap.wbxml":{source:`iana`,charset:`UTF-8`,extensions:[`wbxml`]},"application/vnd.wap.wmlc":{source:`iana`,extensions:[`wmlc`]},"application/vnd.wap.wmlscriptc":{source:`iana`,extensions:[`wmlsc`]},"application/vnd.webturbo":{source:`iana`,extensions:[`wtb`]},"application/vnd.wfa.dpp":{source:`iana`},"application/vnd.wfa.p2p":{source:`iana`},"application/vnd.wfa.wsc":{source:`iana`},"application/vnd.windows.devicepairing":{source:`iana`},"application/vnd.wmc":{source:`iana`},"application/vnd.wmf.bootstrap":{source:`iana`},"application/vnd.wolfram.mathematica":{source:`iana`},"application/vnd.wolfram.mathematica.package":{source:`iana`},"application/vnd.wolfram.player":{source:`iana`,extensions:[`nbp`]},"application/vnd.wordperfect":{source:`iana`,extensions:[`wpd`]},"application/vnd.wqd":{source:`iana`,extensions:[`wqd`]},"application/vnd.wrq-hp3000-labelled":{source:`iana`},"application/vnd.wt.stf":{source:`iana`,extensions:[`stf`]},"application/vnd.wv.csp+wbxml":{source:`iana`},"application/vnd.wv.csp+xml":{source:`iana`,compressible:!0},"application/vnd.wv.ssp+xml":{source:`iana`,compressible:!0},"application/vnd.xacml+json":{source:`iana`,compressible:!0},"application/vnd.xara":{source:`iana`,extensions:[`xar`]},"application/vnd.xfdl":{source:`iana`,extensions:[`xfdl`]},"application/vnd.xfdl.webform":{source:`iana`},"application/vnd.xmi+xml":{source:`iana`,compressible:!0},"application/vnd.xmpie.cpkg":{source:`iana`},"application/vnd.xmpie.dpkg":{source:`iana`},"application/vnd.xmpie.plan":{source:`iana`},"application/vnd.xmpie.ppkg":{source:`iana`},"application/vnd.xmpie.xlim":{source:`iana`},"application/vnd.yamaha.hv-dic":{source:`iana`,extensions:[`hvd`]},"application/vnd.yamaha.hv-script":{source:`iana`,extensions:[`hvs`]},"application/vnd.yamaha.hv-voice":{source:`iana`,extensions:[`hvp`]},"application/vnd.yamaha.openscoreformat":{source:`iana`,extensions:[`osf`]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:`iana`,compressible:!0,extensions:[`osfpvg`]},"application/vnd.yamaha.remote-setup":{source:`iana`},"application/vnd.yamaha.smaf-audio":{source:`iana`,extensions:[`saf`]},"application/vnd.yamaha.smaf-phrase":{source:`iana`,extensions:[`spf`]},"application/vnd.yamaha.through-ngn":{source:`iana`},"application/vnd.yamaha.tunnel-udpencap":{source:`iana`},"application/vnd.yaoweme":{source:`iana`},"application/vnd.yellowriver-custom-menu":{source:`iana`,extensions:[`cmp`]},"application/vnd.youtube.yt":{source:`iana`},"application/vnd.zul":{source:`iana`,extensions:[`zir`,`zirz`]},"application/vnd.zzazz.deck+xml":{source:`iana`,compressible:!0,extensions:[`zaz`]},"application/voicexml+xml":{source:`iana`,compressible:!0,extensions:[`vxml`]},"application/voucher-cms+json":{source:`iana`,compressible:!0},"application/vq-rtcpxr":{source:`iana`},"application/wasm":{source:`iana`,compressible:!0,extensions:[`wasm`]},"application/watcherinfo+xml":{source:`iana`,compressible:!0,extensions:[`wif`]},"application/webpush-options+json":{source:`iana`,compressible:!0},"application/whoispp-query":{source:`iana`},"application/whoispp-response":{source:`iana`},"application/widget":{source:`iana`,extensions:[`wgt`]},"application/winhlp":{source:`apache`,extensions:[`hlp`]},"application/wita":{source:`iana`},"application/wordperfect5.1":{source:`iana`},"application/wsdl+xml":{source:`iana`,compressible:!0,extensions:[`wsdl`]},"application/wspolicy+xml":{source:`iana`,compressible:!0,extensions:[`wspolicy`]},"application/x-7z-compressed":{source:`apache`,compressible:!1,extensions:[`7z`]},"application/x-abiword":{source:`apache`,extensions:[`abw`]},"application/x-ace-compressed":{source:`apache`,extensions:[`ace`]},"application/x-amf":{source:`apache`},"application/x-apple-diskimage":{source:`apache`,extensions:[`dmg`]},"application/x-arj":{compressible:!1,extensions:[`arj`]},"application/x-authorware-bin":{source:`apache`,extensions:[`aab`,`x32`,`u32`,`vox`]},"application/x-authorware-map":{source:`apache`,extensions:[`aam`]},"application/x-authorware-seg":{source:`apache`,extensions:[`aas`]},"application/x-bcpio":{source:`apache`,extensions:[`bcpio`]},"application/x-bdoc":{compressible:!1,extensions:[`bdoc`]},"application/x-bittorrent":{source:`apache`,extensions:[`torrent`]},"application/x-blorb":{source:`apache`,extensions:[`blb`,`blorb`]},"application/x-bzip":{source:`apache`,compressible:!1,extensions:[`bz`]},"application/x-bzip2":{source:`apache`,compressible:!1,extensions:[`bz2`,`boz`]},"application/x-cbr":{source:`apache`,extensions:[`cbr`,`cba`,`cbt`,`cbz`,`cb7`]},"application/x-cdlink":{source:`apache`,extensions:[`vcd`]},"application/x-cfs-compressed":{source:`apache`,extensions:[`cfs`]},"application/x-chat":{source:`apache`,extensions:[`chat`]},"application/x-chess-pgn":{source:`apache`,extensions:[`pgn`]},"application/x-chrome-extension":{extensions:[`crx`]},"application/x-cocoa":{source:`nginx`,extensions:[`cco`]},"application/x-compress":{source:`apache`},"application/x-conference":{source:`apache`,extensions:[`nsc`]},"application/x-cpio":{source:`apache`,extensions:[`cpio`]},"application/x-csh":{source:`apache`,extensions:[`csh`]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:`apache`,extensions:[`deb`,`udeb`]},"application/x-dgc-compressed":{source:`apache`,extensions:[`dgc`]},"application/x-director":{source:`apache`,extensions:[`dir`,`dcr`,`dxr`,`cst`,`cct`,`cxt`,`w3d`,`fgd`,`swa`]},"application/x-doom":{source:`apache`,extensions:[`wad`]},"application/x-dtbncx+xml":{source:`apache`,compressible:!0,extensions:[`ncx`]},"application/x-dtbook+xml":{source:`apache`,compressible:!0,extensions:[`dtb`]},"application/x-dtbresource+xml":{source:`apache`,compressible:!0,extensions:[`res`]},"application/x-dvi":{source:`apache`,compressible:!1,extensions:[`dvi`]},"application/x-envoy":{source:`apache`,extensions:[`evy`]},"application/x-eva":{source:`apache`,extensions:[`eva`]},"application/x-font-bdf":{source:`apache`,extensions:[`bdf`]},"application/x-font-dos":{source:`apache`},"application/x-font-framemaker":{source:`apache`},"application/x-font-ghostscript":{source:`apache`,extensions:[`gsf`]},"application/x-font-libgrx":{source:`apache`},"application/x-font-linux-psf":{source:`apache`,extensions:[`psf`]},"application/x-font-pcf":{source:`apache`,extensions:[`pcf`]},"application/x-font-snf":{source:`apache`,extensions:[`snf`]},"application/x-font-speedo":{source:`apache`},"application/x-font-sunos-news":{source:`apache`},"application/x-font-type1":{source:`apache`,extensions:[`pfa`,`pfb`,`pfm`,`afm`]},"application/x-font-vfont":{source:`apache`},"application/x-freearc":{source:`apache`,extensions:[`arc`]},"application/x-futuresplash":{source:`apache`,extensions:[`spl`]},"application/x-gca-compressed":{source:`apache`,extensions:[`gca`]},"application/x-glulx":{source:`apache`,extensions:[`ulx`]},"application/x-gnumeric":{source:`apache`,extensions:[`gnumeric`]},"application/x-gramps-xml":{source:`apache`,extensions:[`gramps`]},"application/x-gtar":{source:`apache`,extensions:[`gtar`]},"application/x-gzip":{source:`apache`},"application/x-hdf":{source:`apache`,extensions:[`hdf`]},"application/x-httpd-php":{compressible:!0,extensions:[`php`]},"application/x-install-instructions":{source:`apache`,extensions:[`install`]},"application/x-iso9660-image":{source:`apache`,extensions:[`iso`]},"application/x-iwork-keynote-sffkey":{extensions:[`key`]},"application/x-iwork-numbers-sffnumbers":{extensions:[`numbers`]},"application/x-iwork-pages-sffpages":{extensions:[`pages`]},"application/x-java-archive-diff":{source:`nginx`,extensions:[`jardiff`]},"application/x-java-jnlp-file":{source:`apache`,compressible:!1,extensions:[`jnlp`]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:[`kdbx`]},"application/x-latex":{source:`apache`,compressible:!1,extensions:[`latex`]},"application/x-lua-bytecode":{extensions:[`luac`]},"application/x-lzh-compressed":{source:`apache`,extensions:[`lzh`,`lha`]},"application/x-makeself":{source:`nginx`,extensions:[`run`]},"application/x-mie":{source:`apache`,extensions:[`mie`]},"application/x-mobipocket-ebook":{source:`apache`,extensions:[`prc`,`mobi`]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:`apache`,extensions:[`application`]},"application/x-ms-shortcut":{source:`apache`,extensions:[`lnk`]},"application/x-ms-wmd":{source:`apache`,extensions:[`wmd`]},"application/x-ms-wmz":{source:`apache`,extensions:[`wmz`]},"application/x-ms-xbap":{source:`apache`,extensions:[`xbap`]},"application/x-msaccess":{source:`apache`,extensions:[`mdb`]},"application/x-msbinder":{source:`apache`,extensions:[`obd`]},"application/x-mscardfile":{source:`apache`,extensions:[`crd`]},"application/x-msclip":{source:`apache`,extensions:[`clp`]},"application/x-msdos-program":{extensions:[`exe`]},"application/x-msdownload":{source:`apache`,extensions:[`exe`,`dll`,`com`,`bat`,`msi`]},"application/x-msmediaview":{source:`apache`,extensions:[`mvb`,`m13`,`m14`]},"application/x-msmetafile":{source:`apache`,extensions:[`wmf`,`wmz`,`emf`,`emz`]},"application/x-msmoney":{source:`apache`,extensions:[`mny`]},"application/x-mspublisher":{source:`apache`,extensions:[`pub`]},"application/x-msschedule":{source:`apache`,extensions:[`scd`]},"application/x-msterminal":{source:`apache`,extensions:[`trm`]},"application/x-mswrite":{source:`apache`,extensions:[`wri`]},"application/x-netcdf":{source:`apache`,extensions:[`nc`,`cdf`]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:[`pac`]},"application/x-nzb":{source:`apache`,extensions:[`nzb`]},"application/x-perl":{source:`nginx`,extensions:[`pl`,`pm`]},"application/x-pilot":{source:`nginx`,extensions:[`prc`,`pdb`]},"application/x-pkcs12":{source:`apache`,compressible:!1,extensions:[`p12`,`pfx`]},"application/x-pkcs7-certificates":{source:`apache`,extensions:[`p7b`,`spc`]},"application/x-pkcs7-certreqresp":{source:`apache`,extensions:[`p7r`]},"application/x-pki-message":{source:`iana`},"application/x-rar-compressed":{source:`apache`,compressible:!1,extensions:[`rar`]},"application/x-redhat-package-manager":{source:`nginx`,extensions:[`rpm`]},"application/x-research-info-systems":{source:`apache`,extensions:[`ris`]},"application/x-sea":{source:`nginx`,extensions:[`sea`]},"application/x-sh":{source:`apache`,compressible:!0,extensions:[`sh`]},"application/x-shar":{source:`apache`,extensions:[`shar`]},"application/x-shockwave-flash":{source:`apache`,compressible:!1,extensions:[`swf`]},"application/x-silverlight-app":{source:`apache`,extensions:[`xap`]},"application/x-sql":{source:`apache`,extensions:[`sql`]},"application/x-stuffit":{source:`apache`,compressible:!1,extensions:[`sit`]},"application/x-stuffitx":{source:`apache`,extensions:[`sitx`]},"application/x-subrip":{source:`apache`,extensions:[`srt`]},"application/x-sv4cpio":{source:`apache`,extensions:[`sv4cpio`]},"application/x-sv4crc":{source:`apache`,extensions:[`sv4crc`]},"application/x-t3vm-image":{source:`apache`,extensions:[`t3`]},"application/x-tads":{source:`apache`,extensions:[`gam`]},"application/x-tar":{source:`apache`,compressible:!0,extensions:[`tar`]},"application/x-tcl":{source:`apache`,extensions:[`tcl`,`tk`]},"application/x-tex":{source:`apache`,extensions:[`tex`]},"application/x-tex-tfm":{source:`apache`,extensions:[`tfm`]},"application/x-texinfo":{source:`apache`,extensions:[`texinfo`,`texi`]},"application/x-tgif":{source:`apache`,extensions:[`obj`]},"application/x-ustar":{source:`apache`,extensions:[`ustar`]},"application/x-virtualbox-hdd":{compressible:!0,extensions:[`hdd`]},"application/x-virtualbox-ova":{compressible:!0,extensions:[`ova`]},"application/x-virtualbox-ovf":{compressible:!0,extensions:[`ovf`]},"application/x-virtualbox-vbox":{compressible:!0,extensions:[`vbox`]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:[`vbox-extpack`]},"application/x-virtualbox-vdi":{compressible:!0,extensions:[`vdi`]},"application/x-virtualbox-vhd":{compressible:!0,extensions:[`vhd`]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:[`vmdk`]},"application/x-wais-source":{source:`apache`,extensions:[`src`]},"application/x-web-app-manifest+json":{compressible:!0,extensions:[`webapp`]},"application/x-www-form-urlencoded":{source:`iana`,compressible:!0},"application/x-x509-ca-cert":{source:`iana`,extensions:[`der`,`crt`,`pem`]},"application/x-x509-ca-ra-cert":{source:`iana`},"application/x-x509-next-ca-cert":{source:`iana`},"application/x-xfig":{source:`apache`,extensions:[`fig`]},"application/x-xliff+xml":{source:`apache`,compressible:!0,extensions:[`xlf`]},"application/x-xpinstall":{source:`apache`,compressible:!1,extensions:[`xpi`]},"application/x-xz":{source:`apache`,extensions:[`xz`]},"application/x-zmachine":{source:`apache`,extensions:[`z1`,`z2`,`z3`,`z4`,`z5`,`z6`,`z7`,`z8`]},"application/x400-bp":{source:`iana`},"application/xacml+xml":{source:`iana`,compressible:!0},"application/xaml+xml":{source:`apache`,compressible:!0,extensions:[`xaml`]},"application/xcap-att+xml":{source:`iana`,compressible:!0,extensions:[`xav`]},"application/xcap-caps+xml":{source:`iana`,compressible:!0,extensions:[`xca`]},"application/xcap-diff+xml":{source:`iana`,compressible:!0,extensions:[`xdf`]},"application/xcap-el+xml":{source:`iana`,compressible:!0,extensions:[`xel`]},"application/xcap-error+xml":{source:`iana`,compressible:!0},"application/xcap-ns+xml":{source:`iana`,compressible:!0,extensions:[`xns`]},"application/xcon-conference-info+xml":{source:`iana`,compressible:!0},"application/xcon-conference-info-diff+xml":{source:`iana`,compressible:!0},"application/xenc+xml":{source:`iana`,compressible:!0,extensions:[`xenc`]},"application/xhtml+xml":{source:`iana`,compressible:!0,extensions:[`xhtml`,`xht`]},"application/xhtml-voice+xml":{source:`apache`,compressible:!0},"application/xliff+xml":{source:`iana`,compressible:!0,extensions:[`xlf`]},"application/xml":{source:`iana`,compressible:!0,extensions:[`xml`,`xsl`,`xsd`,`rng`]},"application/xml-dtd":{source:`iana`,compressible:!0,extensions:[`dtd`]},"application/xml-external-parsed-entity":{source:`iana`},"application/xml-patch+xml":{source:`iana`,compressible:!0},"application/xmpp+xml":{source:`iana`,compressible:!0},"application/xop+xml":{source:`iana`,compressible:!0,extensions:[`xop`]},"application/xproc+xml":{source:`apache`,compressible:!0,extensions:[`xpl`]},"application/xslt+xml":{source:`iana`,compressible:!0,extensions:[`xsl`,`xslt`]},"application/xspf+xml":{source:`apache`,compressible:!0,extensions:[`xspf`]},"application/xv+xml":{source:`iana`,compressible:!0,extensions:[`mxml`,`xhvml`,`xvml`,`xvm`]},"application/yang":{source:`iana`,extensions:[`yang`]},"application/yang-data+json":{source:`iana`,compressible:!0},"application/yang-data+xml":{source:`iana`,compressible:!0},"application/yang-patch+json":{source:`iana`,compressible:!0},"application/yang-patch+xml":{source:`iana`,compressible:!0},"application/yin+xml":{source:`iana`,compressible:!0,extensions:[`yin`]},"application/zip":{source:`iana`,compressible:!1,extensions:[`zip`]},"application/zlib":{source:`iana`},"application/zstd":{source:`iana`},"audio/1d-interleaved-parityfec":{source:`iana`},"audio/32kadpcm":{source:`iana`},"audio/3gpp":{source:`iana`,compressible:!1,extensions:[`3gpp`]},"audio/3gpp2":{source:`iana`},"audio/aac":{source:`iana`},"audio/ac3":{source:`iana`},"audio/adpcm":{source:`apache`,extensions:[`adp`]},"audio/amr":{source:`iana`,extensions:[`amr`]},"audio/amr-wb":{source:`iana`},"audio/amr-wb+":{source:`iana`},"audio/aptx":{source:`iana`},"audio/asc":{source:`iana`},"audio/atrac-advanced-lossless":{source:`iana`},"audio/atrac-x":{source:`iana`},"audio/atrac3":{source:`iana`},"audio/basic":{source:`iana`,compressible:!1,extensions:[`au`,`snd`]},"audio/bv16":{source:`iana`},"audio/bv32":{source:`iana`},"audio/clearmode":{source:`iana`},"audio/cn":{source:`iana`},"audio/dat12":{source:`iana`},"audio/dls":{source:`iana`},"audio/dsr-es201108":{source:`iana`},"audio/dsr-es202050":{source:`iana`},"audio/dsr-es202211":{source:`iana`},"audio/dsr-es202212":{source:`iana`},"audio/dv":{source:`iana`},"audio/dvi4":{source:`iana`},"audio/eac3":{source:`iana`},"audio/encaprtp":{source:`iana`},"audio/evrc":{source:`iana`},"audio/evrc-qcp":{source:`iana`},"audio/evrc0":{source:`iana`},"audio/evrc1":{source:`iana`},"audio/evrcb":{source:`iana`},"audio/evrcb0":{source:`iana`},"audio/evrcb1":{source:`iana`},"audio/evrcnw":{source:`iana`},"audio/evrcnw0":{source:`iana`},"audio/evrcnw1":{source:`iana`},"audio/evrcwb":{source:`iana`},"audio/evrcwb0":{source:`iana`},"audio/evrcwb1":{source:`iana`},"audio/evs":{source:`iana`},"audio/flexfec":{source:`iana`},"audio/fwdred":{source:`iana`},"audio/g711-0":{source:`iana`},"audio/g719":{source:`iana`},"audio/g722":{source:`iana`},"audio/g7221":{source:`iana`},"audio/g723":{source:`iana`},"audio/g726-16":{source:`iana`},"audio/g726-24":{source:`iana`},"audio/g726-32":{source:`iana`},"audio/g726-40":{source:`iana`},"audio/g728":{source:`iana`},"audio/g729":{source:`iana`},"audio/g7291":{source:`iana`},"audio/g729d":{source:`iana`},"audio/g729e":{source:`iana`},"audio/gsm":{source:`iana`},"audio/gsm-efr":{source:`iana`},"audio/gsm-hr-08":{source:`iana`},"audio/ilbc":{source:`iana`},"audio/ip-mr_v2.5":{source:`iana`},"audio/isac":{source:`apache`},"audio/l16":{source:`iana`},"audio/l20":{source:`iana`},"audio/l24":{source:`iana`,compressible:!1},"audio/l8":{source:`iana`},"audio/lpc":{source:`iana`},"audio/melp":{source:`iana`},"audio/melp1200":{source:`iana`},"audio/melp2400":{source:`iana`},"audio/melp600":{source:`iana`},"audio/mhas":{source:`iana`},"audio/midi":{source:`apache`,extensions:[`mid`,`midi`,`kar`,`rmi`]},"audio/mobile-xmf":{source:`iana`,extensions:[`mxmf`]},"audio/mp3":{compressible:!1,extensions:[`mp3`]},"audio/mp4":{source:`iana`,compressible:!1,extensions:[`m4a`,`mp4a`]},"audio/mp4a-latm":{source:`iana`},"audio/mpa":{source:`iana`},"audio/mpa-robust":{source:`iana`},"audio/mpeg":{source:`iana`,compressible:!1,extensions:[`mpga`,`mp2`,`mp2a`,`mp3`,`m2a`,`m3a`]},"audio/mpeg4-generic":{source:`iana`},"audio/musepack":{source:`apache`},"audio/ogg":{source:`iana`,compressible:!1,extensions:[`oga`,`ogg`,`spx`,`opus`]},"audio/opus":{source:`iana`},"audio/parityfec":{source:`iana`},"audio/pcma":{source:`iana`},"audio/pcma-wb":{source:`iana`},"audio/pcmu":{source:`iana`},"audio/pcmu-wb":{source:`iana`},"audio/prs.sid":{source:`iana`},"audio/qcelp":{source:`iana`},"audio/raptorfec":{source:`iana`},"audio/red":{source:`iana`},"audio/rtp-enc-aescm128":{source:`iana`},"audio/rtp-midi":{source:`iana`},"audio/rtploopback":{source:`iana`},"audio/rtx":{source:`iana`},"audio/s3m":{source:`apache`,extensions:[`s3m`]},"audio/scip":{source:`iana`},"audio/silk":{source:`apache`,extensions:[`sil`]},"audio/smv":{source:`iana`},"audio/smv-qcp":{source:`iana`},"audio/smv0":{source:`iana`},"audio/sofa":{source:`iana`},"audio/sp-midi":{source:`iana`},"audio/speex":{source:`iana`},"audio/t140c":{source:`iana`},"audio/t38":{source:`iana`},"audio/telephone-event":{source:`iana`},"audio/tetra_acelp":{source:`iana`},"audio/tetra_acelp_bb":{source:`iana`},"audio/tone":{source:`iana`},"audio/tsvcis":{source:`iana`},"audio/uemclip":{source:`iana`},"audio/ulpfec":{source:`iana`},"audio/usac":{source:`iana`},"audio/vdvi":{source:`iana`},"audio/vmr-wb":{source:`iana`},"audio/vnd.3gpp.iufp":{source:`iana`},"audio/vnd.4sb":{source:`iana`},"audio/vnd.audiokoz":{source:`iana`},"audio/vnd.celp":{source:`iana`},"audio/vnd.cisco.nse":{source:`iana`},"audio/vnd.cmles.radio-events":{source:`iana`},"audio/vnd.cns.anp1":{source:`iana`},"audio/vnd.cns.inf1":{source:`iana`},"audio/vnd.dece.audio":{source:`iana`,extensions:[`uva`,`uvva`]},"audio/vnd.digital-winds":{source:`iana`,extensions:[`eol`]},"audio/vnd.dlna.adts":{source:`iana`},"audio/vnd.dolby.heaac.1":{source:`iana`},"audio/vnd.dolby.heaac.2":{source:`iana`},"audio/vnd.dolby.mlp":{source:`iana`},"audio/vnd.dolby.mps":{source:`iana`},"audio/vnd.dolby.pl2":{source:`iana`},"audio/vnd.dolby.pl2x":{source:`iana`},"audio/vnd.dolby.pl2z":{source:`iana`},"audio/vnd.dolby.pulse.1":{source:`iana`},"audio/vnd.dra":{source:`iana`,extensions:[`dra`]},"audio/vnd.dts":{source:`iana`,extensions:[`dts`]},"audio/vnd.dts.hd":{source:`iana`,extensions:[`dtshd`]},"audio/vnd.dts.uhd":{source:`iana`},"audio/vnd.dvb.file":{source:`iana`},"audio/vnd.everad.plj":{source:`iana`},"audio/vnd.hns.audio":{source:`iana`},"audio/vnd.lucent.voice":{source:`iana`,extensions:[`lvp`]},"audio/vnd.ms-playready.media.pya":{source:`iana`,extensions:[`pya`]},"audio/vnd.nokia.mobile-xmf":{source:`iana`},"audio/vnd.nortel.vbk":{source:`iana`},"audio/vnd.nuera.ecelp4800":{source:`iana`,extensions:[`ecelp4800`]},"audio/vnd.nuera.ecelp7470":{source:`iana`,extensions:[`ecelp7470`]},"audio/vnd.nuera.ecelp9600":{source:`iana`,extensions:[`ecelp9600`]},"audio/vnd.octel.sbc":{source:`iana`},"audio/vnd.presonus.multitrack":{source:`iana`},"audio/vnd.qcelp":{source:`iana`},"audio/vnd.rhetorex.32kadpcm":{source:`iana`},"audio/vnd.rip":{source:`iana`,extensions:[`rip`]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:`iana`},"audio/vnd.vmx.cvsd":{source:`iana`},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:`iana`,compressible:!1},"audio/vorbis-config":{source:`iana`},"audio/wav":{compressible:!1,extensions:[`wav`]},"audio/wave":{compressible:!1,extensions:[`wav`]},"audio/webm":{source:`apache`,compressible:!1,extensions:[`weba`]},"audio/x-aac":{source:`apache`,compressible:!1,extensions:[`aac`]},"audio/x-aiff":{source:`apache`,extensions:[`aif`,`aiff`,`aifc`]},"audio/x-caf":{source:`apache`,compressible:!1,extensions:[`caf`]},"audio/x-flac":{source:`apache`,extensions:[`flac`]},"audio/x-m4a":{source:`nginx`,extensions:[`m4a`]},"audio/x-matroska":{source:`apache`,extensions:[`mka`]},"audio/x-mpegurl":{source:`apache`,extensions:[`m3u`]},"audio/x-ms-wax":{source:`apache`,extensions:[`wax`]},"audio/x-ms-wma":{source:`apache`,extensions:[`wma`]},"audio/x-pn-realaudio":{source:`apache`,extensions:[`ram`,`ra`]},"audio/x-pn-realaudio-plugin":{source:`apache`,extensions:[`rmp`]},"audio/x-realaudio":{source:`nginx`,extensions:[`ra`]},"audio/x-tta":{source:`apache`},"audio/x-wav":{source:`apache`,extensions:[`wav`]},"audio/xm":{source:`apache`,extensions:[`xm`]},"chemical/x-cdx":{source:`apache`,extensions:[`cdx`]},"chemical/x-cif":{source:`apache`,extensions:[`cif`]},"chemical/x-cmdf":{source:`apache`,extensions:[`cmdf`]},"chemical/x-cml":{source:`apache`,extensions:[`cml`]},"chemical/x-csml":{source:`apache`,extensions:[`csml`]},"chemical/x-pdb":{source:`apache`},"chemical/x-xyz":{source:`apache`,extensions:[`xyz`]},"font/collection":{source:`iana`,extensions:[`ttc`]},"font/otf":{source:`iana`,compressible:!0,extensions:[`otf`]},"font/sfnt":{source:`iana`},"font/ttf":{source:`iana`,compressible:!0,extensions:[`ttf`]},"font/woff":{source:`iana`,extensions:[`woff`]},"font/woff2":{source:`iana`,extensions:[`woff2`]},"image/aces":{source:`iana`,extensions:[`exr`]},"image/apng":{compressible:!1,extensions:[`apng`]},"image/avci":{source:`iana`,extensions:[`avci`]},"image/avcs":{source:`iana`,extensions:[`avcs`]},"image/avif":{source:`iana`,compressible:!1,extensions:[`avif`]},"image/bmp":{source:`iana`,compressible:!0,extensions:[`bmp`]},"image/cgm":{source:`iana`,extensions:[`cgm`]},"image/dicom-rle":{source:`iana`,extensions:[`drle`]},"image/emf":{source:`iana`,extensions:[`emf`]},"image/fits":{source:`iana`,extensions:[`fits`]},"image/g3fax":{source:`iana`,extensions:[`g3`]},"image/gif":{source:`iana`,compressible:!1,extensions:[`gif`]},"image/heic":{source:`iana`,extensions:[`heic`]},"image/heic-sequence":{source:`iana`,extensions:[`heics`]},"image/heif":{source:`iana`,extensions:[`heif`]},"image/heif-sequence":{source:`iana`,extensions:[`heifs`]},"image/hej2k":{source:`iana`,extensions:[`hej2`]},"image/hsj2":{source:`iana`,extensions:[`hsj2`]},"image/ief":{source:`iana`,extensions:[`ief`]},"image/jls":{source:`iana`,extensions:[`jls`]},"image/jp2":{source:`iana`,compressible:!1,extensions:[`jp2`,`jpg2`]},"image/jpeg":{source:`iana`,compressible:!1,extensions:[`jpeg`,`jpg`,`jpe`]},"image/jph":{source:`iana`,extensions:[`jph`]},"image/jphc":{source:`iana`,extensions:[`jhc`]},"image/jpm":{source:`iana`,compressible:!1,extensions:[`jpm`]},"image/jpx":{source:`iana`,compressible:!1,extensions:[`jpx`,`jpf`]},"image/jxr":{source:`iana`,extensions:[`jxr`]},"image/jxra":{source:`iana`,extensions:[`jxra`]},"image/jxrs":{source:`iana`,extensions:[`jxrs`]},"image/jxs":{source:`iana`,extensions:[`jxs`]},"image/jxsc":{source:`iana`,extensions:[`jxsc`]},"image/jxsi":{source:`iana`,extensions:[`jxsi`]},"image/jxss":{source:`iana`,extensions:[`jxss`]},"image/ktx":{source:`iana`,extensions:[`ktx`]},"image/ktx2":{source:`iana`,extensions:[`ktx2`]},"image/naplps":{source:`iana`},"image/pjpeg":{compressible:!1},"image/png":{source:`iana`,compressible:!1,extensions:[`png`]},"image/prs.btif":{source:`iana`,extensions:[`btif`]},"image/prs.pti":{source:`iana`,extensions:[`pti`]},"image/pwg-raster":{source:`iana`},"image/sgi":{source:`apache`,extensions:[`sgi`]},"image/svg+xml":{source:`iana`,compressible:!0,extensions:[`svg`,`svgz`]},"image/t38":{source:`iana`,extensions:[`t38`]},"image/tiff":{source:`iana`,compressible:!1,extensions:[`tif`,`tiff`]},"image/tiff-fx":{source:`iana`,extensions:[`tfx`]},"image/vnd.adobe.photoshop":{source:`iana`,compressible:!0,extensions:[`psd`]},"image/vnd.airzip.accelerator.azv":{source:`iana`,extensions:[`azv`]},"image/vnd.cns.inf2":{source:`iana`},"image/vnd.dece.graphic":{source:`iana`,extensions:[`uvi`,`uvvi`,`uvg`,`uvvg`]},"image/vnd.djvu":{source:`iana`,extensions:[`djvu`,`djv`]},"image/vnd.dvb.subtitle":{source:`iana`,extensions:[`sub`]},"image/vnd.dwg":{source:`iana`,extensions:[`dwg`]},"image/vnd.dxf":{source:`iana`,extensions:[`dxf`]},"image/vnd.fastbidsheet":{source:`iana`,extensions:[`fbs`]},"image/vnd.fpx":{source:`iana`,extensions:[`fpx`]},"image/vnd.fst":{source:`iana`,extensions:[`fst`]},"image/vnd.fujixerox.edmics-mmr":{source:`iana`,extensions:[`mmr`]},"image/vnd.fujixerox.edmics-rlc":{source:`iana`,extensions:[`rlc`]},"image/vnd.globalgraphics.pgb":{source:`iana`},"image/vnd.microsoft.icon":{source:`iana`,compressible:!0,extensions:[`ico`]},"image/vnd.mix":{source:`iana`},"image/vnd.mozilla.apng":{source:`iana`},"image/vnd.ms-dds":{compressible:!0,extensions:[`dds`]},"image/vnd.ms-modi":{source:`iana`,extensions:[`mdi`]},"image/vnd.ms-photo":{source:`apache`,extensions:[`wdp`]},"image/vnd.net-fpx":{source:`iana`,extensions:[`npx`]},"image/vnd.pco.b16":{source:`iana`,extensions:[`b16`]},"image/vnd.radiance":{source:`iana`},"image/vnd.sealed.png":{source:`iana`},"image/vnd.sealedmedia.softseal.gif":{source:`iana`},"image/vnd.sealedmedia.softseal.jpg":{source:`iana`},"image/vnd.svf":{source:`iana`},"image/vnd.tencent.tap":{source:`iana`,extensions:[`tap`]},"image/vnd.valve.source.texture":{source:`iana`,extensions:[`vtf`]},"image/vnd.wap.wbmp":{source:`iana`,extensions:[`wbmp`]},"image/vnd.xiff":{source:`iana`,extensions:[`xif`]},"image/vnd.zbrush.pcx":{source:`iana`,extensions:[`pcx`]},"image/webp":{source:`apache`,extensions:[`webp`]},"image/wmf":{source:`iana`,extensions:[`wmf`]},"image/x-3ds":{source:`apache`,extensions:[`3ds`]},"image/x-cmu-raster":{source:`apache`,extensions:[`ras`]},"image/x-cmx":{source:`apache`,extensions:[`cmx`]},"image/x-freehand":{source:`apache`,extensions:[`fh`,`fhc`,`fh4`,`fh5`,`fh7`]},"image/x-icon":{source:`apache`,compressible:!0,extensions:[`ico`]},"image/x-jng":{source:`nginx`,extensions:[`jng`]},"image/x-mrsid-image":{source:`apache`,extensions:[`sid`]},"image/x-ms-bmp":{source:`nginx`,compressible:!0,extensions:[`bmp`]},"image/x-pcx":{source:`apache`,extensions:[`pcx`]},"image/x-pict":{source:`apache`,extensions:[`pic`,`pct`]},"image/x-portable-anymap":{source:`apache`,extensions:[`pnm`]},"image/x-portable-bitmap":{source:`apache`,extensions:[`pbm`]},"image/x-portable-graymap":{source:`apache`,extensions:[`pgm`]},"image/x-portable-pixmap":{source:`apache`,extensions:[`ppm`]},"image/x-rgb":{source:`apache`,extensions:[`rgb`]},"image/x-tga":{source:`apache`,extensions:[`tga`]},"image/x-xbitmap":{source:`apache`,extensions:[`xbm`]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:`apache`,extensions:[`xpm`]},"image/x-xwindowdump":{source:`apache`,extensions:[`xwd`]},"message/cpim":{source:`iana`},"message/delivery-status":{source:`iana`},"message/disposition-notification":{source:`iana`,extensions:[`disposition-notification`]},"message/external-body":{source:`iana`},"message/feedback-report":{source:`iana`},"message/global":{source:`iana`,extensions:[`u8msg`]},"message/global-delivery-status":{source:`iana`,extensions:[`u8dsn`]},"message/global-disposition-notification":{source:`iana`,extensions:[`u8mdn`]},"message/global-headers":{source:`iana`,extensions:[`u8hdr`]},"message/http":{source:`iana`,compressible:!1},"message/imdn+xml":{source:`iana`,compressible:!0},"message/news":{source:`iana`},"message/partial":{source:`iana`,compressible:!1},"message/rfc822":{source:`iana`,compressible:!0,extensions:[`eml`,`mime`]},"message/s-http":{source:`iana`},"message/sip":{source:`iana`},"message/sipfrag":{source:`iana`},"message/tracking-status":{source:`iana`},"message/vnd.si.simp":{source:`iana`},"message/vnd.wfa.wsc":{source:`iana`,extensions:[`wsc`]},"model/3mf":{source:`iana`,extensions:[`3mf`]},"model/e57":{source:`iana`},"model/gltf+json":{source:`iana`,compressible:!0,extensions:[`gltf`]},"model/gltf-binary":{source:`iana`,compressible:!0,extensions:[`glb`]},"model/iges":{source:`iana`,compressible:!1,extensions:[`igs`,`iges`]},"model/mesh":{source:`iana`,compressible:!1,extensions:[`msh`,`mesh`,`silo`]},"model/mtl":{source:`iana`,extensions:[`mtl`]},"model/obj":{source:`iana`,extensions:[`obj`]},"model/step":{source:`iana`},"model/step+xml":{source:`iana`,compressible:!0,extensions:[`stpx`]},"model/step+zip":{source:`iana`,compressible:!1,extensions:[`stpz`]},"model/step-xml+zip":{source:`iana`,compressible:!1,extensions:[`stpxz`]},"model/stl":{source:`iana`,extensions:[`stl`]},"model/vnd.collada+xml":{source:`iana`,compressible:!0,extensions:[`dae`]},"model/vnd.dwf":{source:`iana`,extensions:[`dwf`]},"model/vnd.flatland.3dml":{source:`iana`},"model/vnd.gdl":{source:`iana`,extensions:[`gdl`]},"model/vnd.gs-gdl":{source:`apache`},"model/vnd.gs.gdl":{source:`iana`},"model/vnd.gtw":{source:`iana`,extensions:[`gtw`]},"model/vnd.moml+xml":{source:`iana`,compressible:!0},"model/vnd.mts":{source:`iana`,extensions:[`mts`]},"model/vnd.opengex":{source:`iana`,extensions:[`ogex`]},"model/vnd.parasolid.transmit.binary":{source:`iana`,extensions:[`x_b`]},"model/vnd.parasolid.transmit.text":{source:`iana`,extensions:[`x_t`]},"model/vnd.pytha.pyox":{source:`iana`},"model/vnd.rosette.annotated-data-model":{source:`iana`},"model/vnd.sap.vds":{source:`iana`,extensions:[`vds`]},"model/vnd.usdz+zip":{source:`iana`,compressible:!1,extensions:[`usdz`]},"model/vnd.valve.source.compiled-map":{source:`iana`,extensions:[`bsp`]},"model/vnd.vtu":{source:`iana`,extensions:[`vtu`]},"model/vrml":{source:`iana`,compressible:!1,extensions:[`wrl`,`vrml`]},"model/x3d+binary":{source:`apache`,compressible:!1,extensions:[`x3db`,`x3dbz`]},"model/x3d+fastinfoset":{source:`iana`,extensions:[`x3db`]},"model/x3d+vrml":{source:`apache`,compressible:!1,extensions:[`x3dv`,`x3dvz`]},"model/x3d+xml":{source:`iana`,compressible:!0,extensions:[`x3d`,`x3dz`]},"model/x3d-vrml":{source:`iana`,extensions:[`x3dv`]},"multipart/alternative":{source:`iana`,compressible:!1},"multipart/appledouble":{source:`iana`},"multipart/byteranges":{source:`iana`},"multipart/digest":{source:`iana`},"multipart/encrypted":{source:`iana`,compressible:!1},"multipart/form-data":{source:`iana`,compressible:!1},"multipart/header-set":{source:`iana`},"multipart/mixed":{source:`iana`},"multipart/multilingual":{source:`iana`},"multipart/parallel":{source:`iana`},"multipart/related":{source:`iana`,compressible:!1},"multipart/report":{source:`iana`},"multipart/signed":{source:`iana`,compressible:!1},"multipart/vnd.bint.med-plus":{source:`iana`},"multipart/voice-message":{source:`iana`},"multipart/x-mixed-replace":{source:`iana`},"text/1d-interleaved-parityfec":{source:`iana`},"text/cache-manifest":{source:`iana`,compressible:!0,extensions:[`appcache`,`manifest`]},"text/calendar":{source:`iana`,extensions:[`ics`,`ifb`]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:[`coffee`,`litcoffee`]},"text/cql":{source:`iana`},"text/cql-expression":{source:`iana`},"text/cql-identifier":{source:`iana`},"text/css":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`css`]},"text/csv":{source:`iana`,compressible:!0,extensions:[`csv`]},"text/csv-schema":{source:`iana`},"text/directory":{source:`iana`},"text/dns":{source:`iana`},"text/ecmascript":{source:`iana`},"text/encaprtp":{source:`iana`},"text/enriched":{source:`iana`},"text/fhirpath":{source:`iana`},"text/flexfec":{source:`iana`},"text/fwdred":{source:`iana`},"text/gff3":{source:`iana`},"text/grammar-ref-list":{source:`iana`},"text/html":{source:`iana`,compressible:!0,extensions:[`html`,`htm`,`shtml`]},"text/jade":{extensions:[`jade`]},"text/javascript":{source:`iana`,compressible:!0},"text/jcr-cnd":{source:`iana`},"text/jsx":{compressible:!0,extensions:[`jsx`]},"text/less":{compressible:!0,extensions:[`less`]},"text/markdown":{source:`iana`,compressible:!0,extensions:[`markdown`,`md`]},"text/mathml":{source:`nginx`,extensions:[`mml`]},"text/mdx":{compressible:!0,extensions:[`mdx`]},"text/mizar":{source:`iana`},"text/n3":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`n3`]},"text/parameters":{source:`iana`,charset:`UTF-8`},"text/parityfec":{source:`iana`},"text/plain":{source:`iana`,compressible:!0,extensions:[`txt`,`text`,`conf`,`def`,`list`,`log`,`in`,`ini`]},"text/provenance-notation":{source:`iana`,charset:`UTF-8`},"text/prs.fallenstein.rst":{source:`iana`},"text/prs.lines.tag":{source:`iana`,extensions:[`dsc`]},"text/prs.prop.logic":{source:`iana`},"text/raptorfec":{source:`iana`},"text/red":{source:`iana`},"text/rfc822-headers":{source:`iana`},"text/richtext":{source:`iana`,compressible:!0,extensions:[`rtx`]},"text/rtf":{source:`iana`,compressible:!0,extensions:[`rtf`]},"text/rtp-enc-aescm128":{source:`iana`},"text/rtploopback":{source:`iana`},"text/rtx":{source:`iana`},"text/sgml":{source:`iana`,extensions:[`sgml`,`sgm`]},"text/shaclc":{source:`iana`},"text/shex":{source:`iana`,extensions:[`shex`]},"text/slim":{extensions:[`slim`,`slm`]},"text/spdx":{source:`iana`,extensions:[`spdx`]},"text/strings":{source:`iana`},"text/stylus":{extensions:[`stylus`,`styl`]},"text/t140":{source:`iana`},"text/tab-separated-values":{source:`iana`,compressible:!0,extensions:[`tsv`]},"text/troff":{source:`iana`,extensions:[`t`,`tr`,`roff`,`man`,`me`,`ms`]},"text/turtle":{source:`iana`,charset:`UTF-8`,extensions:[`ttl`]},"text/ulpfec":{source:`iana`},"text/uri-list":{source:`iana`,compressible:!0,extensions:[`uri`,`uris`,`urls`]},"text/vcard":{source:`iana`,compressible:!0,extensions:[`vcard`]},"text/vnd.a":{source:`iana`},"text/vnd.abc":{source:`iana`},"text/vnd.ascii-art":{source:`iana`},"text/vnd.curl":{source:`iana`,extensions:[`curl`]},"text/vnd.curl.dcurl":{source:`apache`,extensions:[`dcurl`]},"text/vnd.curl.mcurl":{source:`apache`,extensions:[`mcurl`]},"text/vnd.curl.scurl":{source:`apache`,extensions:[`scurl`]},"text/vnd.debian.copyright":{source:`iana`,charset:`UTF-8`},"text/vnd.dmclientscript":{source:`iana`},"text/vnd.dvb.subtitle":{source:`iana`,extensions:[`sub`]},"text/vnd.esmertec.theme-descriptor":{source:`iana`,charset:`UTF-8`},"text/vnd.familysearch.gedcom":{source:`iana`,extensions:[`ged`]},"text/vnd.ficlab.flt":{source:`iana`},"text/vnd.fly":{source:`iana`,extensions:[`fly`]},"text/vnd.fmi.flexstor":{source:`iana`,extensions:[`flx`]},"text/vnd.gml":{source:`iana`},"text/vnd.graphviz":{source:`iana`,extensions:[`gv`]},"text/vnd.hans":{source:`iana`},"text/vnd.hgl":{source:`iana`},"text/vnd.in3d.3dml":{source:`iana`,extensions:[`3dml`]},"text/vnd.in3d.spot":{source:`iana`,extensions:[`spot`]},"text/vnd.iptc.newsml":{source:`iana`},"text/vnd.iptc.nitf":{source:`iana`},"text/vnd.latex-z":{source:`iana`},"text/vnd.motorola.reflex":{source:`iana`},"text/vnd.ms-mediapackage":{source:`iana`},"text/vnd.net2phone.commcenter.command":{source:`iana`},"text/vnd.radisys.msml-basic-layout":{source:`iana`},"text/vnd.senx.warpscript":{source:`iana`},"text/vnd.si.uricatalogue":{source:`iana`},"text/vnd.sosi":{source:`iana`},"text/vnd.sun.j2me.app-descriptor":{source:`iana`,charset:`UTF-8`,extensions:[`jad`]},"text/vnd.trolltech.linguist":{source:`iana`,charset:`UTF-8`},"text/vnd.wap.si":{source:`iana`},"text/vnd.wap.sl":{source:`iana`},"text/vnd.wap.wml":{source:`iana`,extensions:[`wml`]},"text/vnd.wap.wmlscript":{source:`iana`,extensions:[`wmls`]},"text/vtt":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`vtt`]},"text/x-asm":{source:`apache`,extensions:[`s`,`asm`]},"text/x-c":{source:`apache`,extensions:[`c`,`cc`,`cxx`,`cpp`,`h`,`hh`,`dic`]},"text/x-component":{source:`nginx`,extensions:[`htc`]},"text/x-fortran":{source:`apache`,extensions:[`f`,`for`,`f77`,`f90`]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:[`hbs`]},"text/x-java-source":{source:`apache`,extensions:[`java`]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:[`lua`]},"text/x-markdown":{compressible:!0,extensions:[`mkd`]},"text/x-nfo":{source:`apache`,extensions:[`nfo`]},"text/x-opml":{source:`apache`,extensions:[`opml`]},"text/x-org":{compressible:!0,extensions:[`org`]},"text/x-pascal":{source:`apache`,extensions:[`p`,`pas`]},"text/x-processing":{compressible:!0,extensions:[`pde`]},"text/x-sass":{extensions:[`sass`]},"text/x-scss":{extensions:[`scss`]},"text/x-setext":{source:`apache`,extensions:[`etx`]},"text/x-sfv":{source:`apache`,extensions:[`sfv`]},"text/x-suse-ymp":{compressible:!0,extensions:[`ymp`]},"text/x-uuencode":{source:`apache`,extensions:[`uu`]},"text/x-vcalendar":{source:`apache`,extensions:[`vcs`]},"text/x-vcard":{source:`apache`,extensions:[`vcf`]},"text/xml":{source:`iana`,compressible:!0,extensions:[`xml`]},"text/xml-external-parsed-entity":{source:`iana`},"text/yaml":{compressible:!0,extensions:[`yaml`,`yml`]},"video/1d-interleaved-parityfec":{source:`iana`},"video/3gpp":{source:`iana`,extensions:[`3gp`,`3gpp`]},"video/3gpp-tt":{source:`iana`},"video/3gpp2":{source:`iana`,extensions:[`3g2`]},"video/av1":{source:`iana`},"video/bmpeg":{source:`iana`},"video/bt656":{source:`iana`},"video/celb":{source:`iana`},"video/dv":{source:`iana`},"video/encaprtp":{source:`iana`},"video/ffv1":{source:`iana`},"video/flexfec":{source:`iana`},"video/h261":{source:`iana`,extensions:[`h261`]},"video/h263":{source:`iana`,extensions:[`h263`]},"video/h263-1998":{source:`iana`},"video/h263-2000":{source:`iana`},"video/h264":{source:`iana`,extensions:[`h264`]},"video/h264-rcdo":{source:`iana`},"video/h264-svc":{source:`iana`},"video/h265":{source:`iana`},"video/iso.segment":{source:`iana`,extensions:[`m4s`]},"video/jpeg":{source:`iana`,extensions:[`jpgv`]},"video/jpeg2000":{source:`iana`},"video/jpm":{source:`apache`,extensions:[`jpm`,`jpgm`]},"video/jxsv":{source:`iana`},"video/mj2":{source:`iana`,extensions:[`mj2`,`mjp2`]},"video/mp1s":{source:`iana`},"video/mp2p":{source:`iana`},"video/mp2t":{source:`iana`,extensions:[`ts`]},"video/mp4":{source:`iana`,compressible:!1,extensions:[`mp4`,`mp4v`,`mpg4`]},"video/mp4v-es":{source:`iana`},"video/mpeg":{source:`iana`,compressible:!1,extensions:[`mpeg`,`mpg`,`mpe`,`m1v`,`m2v`]},"video/mpeg4-generic":{source:`iana`},"video/mpv":{source:`iana`},"video/nv":{source:`iana`},"video/ogg":{source:`iana`,compressible:!1,extensions:[`ogv`]},"video/parityfec":{source:`iana`},"video/pointer":{source:`iana`},"video/quicktime":{source:`iana`,compressible:!1,extensions:[`qt`,`mov`]},"video/raptorfec":{source:`iana`},"video/raw":{source:`iana`},"video/rtp-enc-aescm128":{source:`iana`},"video/rtploopback":{source:`iana`},"video/rtx":{source:`iana`},"video/scip":{source:`iana`},"video/smpte291":{source:`iana`},"video/smpte292m":{source:`iana`},"video/ulpfec":{source:`iana`},"video/vc1":{source:`iana`},"video/vc2":{source:`iana`},"video/vnd.cctv":{source:`iana`},"video/vnd.dece.hd":{source:`iana`,extensions:[`uvh`,`uvvh`]},"video/vnd.dece.mobile":{source:`iana`,extensions:[`uvm`,`uvvm`]},"video/vnd.dece.mp4":{source:`iana`},"video/vnd.dece.pd":{source:`iana`,extensions:[`uvp`,`uvvp`]},"video/vnd.dece.sd":{source:`iana`,extensions:[`uvs`,`uvvs`]},"video/vnd.dece.video":{source:`iana`,extensions:[`uvv`,`uvvv`]},"video/vnd.directv.mpeg":{source:`iana`},"video/vnd.directv.mpeg-tts":{source:`iana`},"video/vnd.dlna.mpeg-tts":{source:`iana`},"video/vnd.dvb.file":{source:`iana`,extensions:[`dvb`]},"video/vnd.fvt":{source:`iana`,extensions:[`fvt`]},"video/vnd.hns.video":{source:`iana`},"video/vnd.iptvforum.1dparityfec-1010":{source:`iana`},"video/vnd.iptvforum.1dparityfec-2005":{source:`iana`},"video/vnd.iptvforum.2dparityfec-1010":{source:`iana`},"video/vnd.iptvforum.2dparityfec-2005":{source:`iana`},"video/vnd.iptvforum.ttsavc":{source:`iana`},"video/vnd.iptvforum.ttsmpeg2":{source:`iana`},"video/vnd.motorola.video":{source:`iana`},"video/vnd.motorola.videop":{source:`iana`},"video/vnd.mpegurl":{source:`iana`,extensions:[`mxu`,`m4u`]},"video/vnd.ms-playready.media.pyv":{source:`iana`,extensions:[`pyv`]},"video/vnd.nokia.interleaved-multimedia":{source:`iana`},"video/vnd.nokia.mp4vr":{source:`iana`},"video/vnd.nokia.videovoip":{source:`iana`},"video/vnd.objectvideo":{source:`iana`},"video/vnd.radgamettools.bink":{source:`iana`},"video/vnd.radgamettools.smacker":{source:`iana`},"video/vnd.sealed.mpeg1":{source:`iana`},"video/vnd.sealed.mpeg4":{source:`iana`},"video/vnd.sealed.swf":{source:`iana`},"video/vnd.sealedmedia.softseal.mov":{source:`iana`},"video/vnd.uvvu.mp4":{source:`iana`,extensions:[`uvu`,`uvvu`]},"video/vnd.vivo":{source:`iana`,extensions:[`viv`]},"video/vnd.youtube.yt":{source:`iana`},"video/vp8":{source:`iana`},"video/vp9":{source:`iana`},"video/webm":{source:`apache`,compressible:!1,extensions:[`webm`]},"video/x-f4v":{source:`apache`,extensions:[`f4v`]},"video/x-fli":{source:`apache`,extensions:[`fli`]},"video/x-flv":{source:`apache`,compressible:!1,extensions:[`flv`]},"video/x-m4v":{source:`apache`,extensions:[`m4v`]},"video/x-matroska":{source:`apache`,compressible:!1,extensions:[`mkv`,`mk3d`,`mks`]},"video/x-mng":{source:`apache`,extensions:[`mng`]},"video/x-ms-asf":{source:`apache`,extensions:[`asf`,`asx`]},"video/x-ms-vob":{source:`apache`,extensions:[`vob`]},"video/x-ms-wm":{source:`apache`,extensions:[`wm`]},"video/x-ms-wmv":{source:`apache`,compressible:!1,extensions:[`wmv`]},"video/x-ms-wmx":{source:`apache`,extensions:[`wmx`]},"video/x-ms-wvx":{source:`apache`,extensions:[`wvx`]},"video/x-msvideo":{source:`apache`,extensions:[`avi`]},"video/x-sgi-movie":{source:`apache`,extensions:[`movie`]},"video/x-smv":{source:`apache`,extensions:[`smv`]},"x-conference/x-cooltalk":{source:`apache`,extensions:[`ice`]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}})),Oe=a(((e,t)=>{t.exports=De()})),ke=a((e=>{var n=Oe(),r=t(`path`).extname,i=/^\s*([^;\s]*)(?:;|\s|$)/,a=/^text\//i;e.charset=o,e.charsets={lookup:o},e.contentType=s,e.extension=c,e.extensions=Object.create(null),e.lookup=l,e.types=Object.create(null),u(e.extensions,e.types);function o(e){if(!e||typeof e!=`string`)return!1;var t=i.exec(e),r=t&&n[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&a.test(t[1])?`UTF-8`:!1}function s(t){if(!t||typeof t!=`string`)return!1;var n=t.indexOf(`/`)===-1?e.lookup(t):t;if(!n)return!1;if(n.indexOf(`charset`)===-1){var r=e.charset(n);r&&(n+=`; charset=`+r.toLowerCase())}return n}function c(t){if(!t||typeof t!=`string`)return!1;var n=i.exec(t),r=n&&e.extensions[n[1].toLowerCase()];return!r||!r.length?!1:r[0]}function l(t){if(!t||typeof t!=`string`)return!1;var n=r(`x.`+t).toLowerCase().substr(1);return n&&e.types[n]||!1}function u(e,t){var r=[`nginx`,`apache`,void 0,`iana`];Object.keys(n).forEach(function(i){var a=n[i],o=a.extensions;if(!(!o||!o.length)){e[i]=o;for(var s=0;s<o.length;s++){var c=o[s];if(t[c]){var l=r.indexOf(n[t[c]].source),u=r.indexOf(a.source);if(t[c]!==`application/octet-stream`&&(l>u||l===u&&t[c].substr(0,12)===`application/`))continue}t[c]=i}}})}})),Ae=a(((e,t)=>{t.exports=n;function n(e){var t=typeof setImmediate==`function`?setImmediate:typeof process==`object`&&typeof process.nextTick==`function`?process.nextTick:null;t?t(e):setTimeout(e,0)}})),je=a(((e,t)=>{var n=Ae();t.exports=r;function r(e){var t=!1;return n(function(){t=!0}),function(r,i){t?e(r,i):n(function(){e(r,i)})}}})),Me=a(((e,t)=>{t.exports=n;function n(e){Object.keys(e.jobs).forEach(r.bind(e)),e.jobs={}}function r(e){typeof this.jobs[e]==`function`&&this.jobs[e]()}})),Ne=a(((e,t)=>{var n=je(),r=Me();t.exports=i;function i(e,t,n,i){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=a(t,o,e[o],function(e,t){o in n.jobs&&(delete n.jobs[o],e?r(n):n.results[o]=t,i(e,n.results))})}function a(e,t,r,i){return e.length==2?e(r,n(i)):e(r,t,n(i))}})),K=a(((e,t)=>{t.exports=n;function n(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])}),r}})),Pe=a(((e,t)=>{var n=Me(),r=je();t.exports=i;function i(e){Object.keys(this.jobs).length&&(this.index=this.size,n(this),r(e)(null,this.results))}})),Fe=a(((e,t)=>{var n=Ne(),r=K(),i=Pe();t.exports=a;function a(e,t,a){for(var o=r(e);o.index<(o.keyedList||e).length;)n(e,t,o,function(e,t){if(e){a(e,t);return}if(Object.keys(o.jobs).length===0){a(null,o.results);return}}),o.index++;return i.bind(o,a)}})),Ie=a(((e,t)=>{var n=Ne(),r=K(),i=Pe();t.exports=a,t.exports.ascending=o,t.exports.descending=s;function a(e,t,a,o){var s=r(e,a);return n(e,t,s,function r(i,a){if(i){o(i,a);return}if(s.index++,s.index<(s.keyedList||e).length){n(e,t,s,r);return}o(null,s.results)}),i.bind(s,o)}function o(e,t){return e<t?-1:+(e>t)}function s(e,t){return-1*o(e,t)}})),Le=a(((e,t)=>{var n=Ie();t.exports=r;function r(e,t,r){return n(e,t,null,r)}})),Re=a(((e,t)=>{t.exports={parallel:Fe(),serial:Le(),serialOrdered:Ie()}})),ze=a(((e,t)=>{t.exports=Object})),Be=a(((e,t)=>{t.exports=Error})),Ve=a(((e,t)=>{t.exports=EvalError})),He=a(((e,t)=>{t.exports=RangeError})),Ue=a(((e,t)=>{t.exports=ReferenceError})),We=a(((e,t)=>{t.exports=SyntaxError})),Ge=a(((e,t)=>{t.exports=TypeError})),Ke=a(((e,t)=>{t.exports=URIError})),q=a(((e,t)=>{t.exports=Math.abs})),qe=a(((e,t)=>{t.exports=Math.floor})),Je=a(((e,t)=>{t.exports=Math.max})),J=a(((e,t)=>{t.exports=Math.min})),Ye=a(((e,t)=>{t.exports=Math.pow})),Xe=a(((e,t)=>{t.exports=Math.round})),Ze=a(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),Qe=a(((e,t)=>{var n=Ze();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),$e=a(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),et=a(((e,t)=>{var n=$e();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),tt=a(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),nt=a(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),rt=a(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=nt();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),it=a(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),at=a(((e,t)=>{t.exports=ze().getPrototypeOf||null})),ot=a(((e,t)=>{var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}})),st=a(((e,t)=>{var n=ot();t.exports=Function.prototype.bind||n})),ct=a(((e,t)=>{t.exports=Function.prototype.call})),lt=a(((e,t)=>{t.exports=Function.prototype.apply})),ut=a(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),dt=a(((e,t)=>{var n=st(),r=lt(),i=ct();t.exports=ut()||n.call(i,r)})),ft=a(((e,t)=>{var n=st(),r=Ge(),i=ct(),a=dt();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),pt=a(((e,t)=>{var n=ft(),r=et(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1})),mt=a(((e,t)=>{var n=it(),r=at(),i=pt();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),ht=a(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=st().call(n,r)})),gt=a(((e,t)=>{var n,r=ze(),i=Be(),a=Ve(),o=He(),s=Ue(),c=We(),l=Ge(),u=Ke(),d=q(),f=qe(),p=Je(),m=J(),h=Ye(),g=Xe(),_=Qe(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=et(),x=tt(),S=function(){throw new l},C=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,w=rt()(),T=mt(),E=at(),D=it(),O=lt(),k=ct(),A={},j=typeof Uint8Array>`u`||!T?n:T(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":j,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){M[`%Error.prototype%`]=T(T(e))}var N=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return M[t]=n,n},P={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},F=st(),I=ht(),L=F.call(k,Array.prototype.concat),R=F.call(O,Array.prototype.splice),z=F.call(k,String.prototype.replace),B=F.call(k,String.prototype.slice),V=F.call(k,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,U=function(e){var t=B(e,0,1),n=B(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return z(e,ee,function(e,t,n,i){r[r.length]=n?z(i,H,`$1`):t||e}),r},W=function(e,t){var n=e,r;if(I(P,n)&&(r=P[n],n=`%`+r[0]+`%`),I(M,n)){var i=M[n];if(i===A&&(i=N(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(V(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=U(e),r=n.length>0?n[0]:``,i=W(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],R(n,L([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=B(p,0,1),h=B(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,I(M,a))o=M[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=I(o,p),o=o[p];f&&!s&&(M[a]=o)}}return o}})),Y=a(((e,t)=>{var n=nt();t.exports=function(){return n()&&!!Symbol.toStringTag}})),_t=a(((e,t)=>{var n=gt()(`%Object.defineProperty%`,!0),r=Y()(),i=ht(),a=Ge(),o=r?Symbol.toStringTag:null;t.exports=function(e,t){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,s=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(r!==void 0&&typeof r!=`boolean`||s!==void 0&&typeof s!=`boolean`)throw new a("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");o&&(r||!i(e,o))&&(n?n(e,o,{configurable:!s,enumerable:!1,value:t,writable:!1}):e[o]=t)}})),vt=a(((e,t)=>{t.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}})),yt=a(((e,n)=>{var r=Ee(),i=t(`util`),a=t(`path`),o=t(`http`),s=t(`https`),c=t(`url`).parse,l=t(`fs`),u=t(`stream`).Stream,d=t(`crypto`),f=ke(),p=Re(),m=_t(),h=ht(),g=vt();function _(e){if(!(this instanceof _))return new _(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],r.call(this),e||={},e)this[t]=e[t]}i.inherits(_,r),_.LINE_BREAK=`\r
|
|
5
|
-
`,_.DEFAULT_CONTENT_TYPE=`application/octet-stream`,_.prototype.append=function(e,t,n){n||={},typeof n==`string`&&(n={filename:n});var i=r.prototype.append.bind(this);if((typeof t==`number`||t==null)&&(t=String(t)),Array.isArray(t)){this._error(Error(`Arrays are not supported.`));return}var a=this._multiPartHeader(e,t,n),o=this._multiPartFooter();i(a),i(t),i(o),this._trackLength(a,t,n)},_.prototype._trackLength=function(e,t,n){var r=0;n.knownLength==null?Buffer.isBuffer(t)?r=t.length:typeof t==`string`&&(r=Buffer.byteLength(t)):r+=Number(n.knownLength),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+_.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&h(t,`httpVersion`))&&!(t instanceof u))&&(n.knownLength||this._valuesToMeasure.push(t))},_.prototype._lengthRetriever=function(e,t){h(e,`fd`)?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):l.stat(e.path,function(n,r){if(n){t(n);return}t(null,r.size-(e.start?e.start:0))}):h(e,`httpVersion`)?t(null,Number(e.headers[`content-length`])):h(e,`httpModule`)?(e.on(`response`,function(n){e.pause(),t(null,Number(n.headers[`content-length`]))}),e.resume()):t(`Unknown stream`)},_.prototype._multiPartHeader=function(e,t,n){if(typeof n.header==`string`)return n.header;var r=this._getContentDisposition(t,n),i=this._getContentType(t,n),a=``,o={"Content-Disposition":[`form-data`,`name="`+e+`"`].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header==`object`&&g(o,n.header);var s;for(var c in o)if(h(o,c)){if(s=o[c],s==null)continue;Array.isArray(s)||(s=[s]),s.length&&(a+=c+`: `+s.join(`; `)+_.LINE_BREAK)}return`--`+this.getBoundary()+_.LINE_BREAK+a+_.LINE_BREAK},_.prototype._getContentDisposition=function(e,t){var n;if(typeof t.filepath==`string`?n=a.normalize(t.filepath).replace(/\\/g,`/`):t.filename||e&&(e.name||e.path)?n=a.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&h(e,`httpVersion`)&&(n=a.basename(e.client._httpMessage.path||``)),n)return`filename="`+n+`"`},_.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=f.lookup(e.name)),!n&&e&&e.path&&(n=f.lookup(e.path)),!n&&e&&e.readable&&h(e,`httpVersion`)&&(n=e.headers[`content-type`]),!n&&(t.filepath||t.filename)&&(n=f.lookup(t.filepath||t.filename)),!n&&e&&typeof e==`object`&&(n=_.DEFAULT_CONTENT_TYPE),n},_.prototype._multiPartFooter=function(){return function(e){var t=_.LINE_BREAK;this._streams.length===0&&(t+=this._lastBoundary()),e(t)}.bind(this)},_.prototype._lastBoundary=function(){return`--`+this.getBoundary()+`--`+_.LINE_BREAK},_.prototype.getHeaders=function(e){var t,n={"content-type":`multipart/form-data; boundary=`+this.getBoundary()};for(t in e)h(e,t)&&(n[t.toLowerCase()]=e[t]);return n},_.prototype.setBoundary=function(e){if(typeof e!=`string`)throw TypeError(`FormData boundary must be a string`);this._boundary=e},_.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},_.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!=`function`&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),(typeof this._streams[n]!=`string`||this._streams[n].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(_.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},_.prototype._generateBoundary=function(){this._boundary=`--------------------------`+d.randomBytes(12).toString(`hex`)},_.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(Error(`Cannot calculate proper length in synchronous way.`)),e},_.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},_.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}p.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){e(n);return}r.forEach(function(e){t+=e}),e(null,t)})},_.prototype.submit=function(e,t){var n,r,i={method:`post`};return typeof e==`string`?(e=c(e),r=g({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(r=g(e,i),r.port||=r.protocol===`https:`?443:80),r.headers=this.getHeaders(e.headers),n=r.protocol===`https:`?s.request(r):o.request(r),this.getLength(function(e,r){if(e&&e!==`Unknown stream`){this._error(e);return}if(r&&n.setHeader(`Content-Length`,r),this.pipe(n),t){var i,a=function(e,r){return n.removeListener(`error`,a),n.removeListener(`response`,i),t.call(this,e,r)};i=a.bind(this,null),n.on(`error`,a),n.on(`response`,i)}}.bind(this)),n},_.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit(`error`,e))},_.prototype.toString=function(){return`[object FormData]`},m(_.prototype,`FormData`),n.exports=_})),bt=a(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=N(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),xt=a(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=bt()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),St=a(((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}})),Ct=a(((e,n)=>{let r=t(`os`),i=t(`tty`),a=St(),{env:o}=process,s;a(`no-color`)||a(`no-colors`)||a(`color=false`)||a(`color=never`)?s=0:(a(`color`)||a(`colors`)||a(`color=true`)||a(`color=always`))&&(s=1),`FORCE_COLOR`in o&&(s=o.FORCE_COLOR===`true`?1:o.FORCE_COLOR===`false`?0:o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3));function c(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(s===0)return 0;if(a(`color=16m`)||a(`color=full`)||a(`color=truecolor`))return 3;if(a(`color=256`))return 2;if(e&&!t&&s===void 0)return 0;let n=s||0;if(o.TERM===`dumb`)return n;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in o)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in o)||o.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in o)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION);if(o.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in o){let e=parseInt((o.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(o.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||`COLORTERM`in o?1:n}function u(e){return c(l(e,e&&e.isTTY))}n.exports={supportsColor:u,stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}})),wt=a(((e,n)=>{let r=t(`tty`),i=t(`util`);e.init=d,e.log=c,e.formatArgs=o,e.save=l,e.load=u,e.useColors=a,e.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=Ct();t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:t,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${t} \u001B[0m`;e[0]=a+e[0].split(`
|
|
4
|
+
`);case`table`:return S(e.headers,e.rows);case`divider`:return`---`;default:return c(e)}}var se=`aes-256-gcm`,G=12,ce=16,K=/^[0-9a-fA-F]{64}$/;function le(e,t){let n=I.randomBytes(G),r=I.createCipheriv(se,t,n,{authTagLength:ce}),i=Buffer.concat([r.update(e,`utf8`),r.final()]),a=r.getAuthTag();return{iv:n.toString(`base64`),data:i.toString(`base64`),tag:a.toString(`base64`)}}function ue(e,t){let n=Buffer.from(e.iv,`base64`),r=Buffer.from(e.data,`base64`),i=Buffer.from(e.tag,`base64`),a=I.createDecipheriv(se,t,n,{authTagLength:ce});return a.setAuthTag(i),Buffer.concat([a.update(r),a.final()]).toString(`utf8`)}function de(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.iv==`string`&&typeof t.data==`string`&&typeof t.tag==`string`}function fe(e){let t=e.trim(),n=K.test(t),r=Buffer.from(t,n?`hex`:`base64`);if(r.length!==32)throw Error(`Encryption key must decode to exactly 32 bytes (received ${r.length}). Use a 64-char hex string or 44-char base64 string.`);return r}var pe=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorCode=void 0,e.websocketErrorWithOriginal=r,e.platformErrorFromEvent=i,e.noReplyReceivedError=a,e.sendWhileDisconnectedError=o,e.sendWhileNotReadyError=s;var t;(function(e){e.SendWhileDisconnectedError=`slack_socket_mode_send_while_disconnected_error`,e.SendWhileNotReadyError=`slack_socket_mode_send_while_not_ready_error`,e.SendMessagePlatformError=`slack_socket_mode_send_message_platform_error`,e.WebsocketError=`slack_socket_mode_websocket_error`,e.NoReplyReceivedError=`slack_socket_mode_no_reply_received_error`,e.InitializationError=`slack_socket_mode_initialization_error`})(t||(e.ErrorCode=t={}));function n(e,t){let n=e;return n.code=t,n}function r(e){let r=n(Error(e.message),t.WebsocketError);return r.original=e,r}function i(e){let r=n(Error(`An API error occurred: ${e.error.msg}`),t.SendMessagePlatformError);return r.data=e,r}function a(){return n(Error(`Message sent but no server acknowledgement was received. This may be caused by the client changing connection state rather than any issue with the specific message. Check before resending.`),t.NoReplyReceivedError)}function o(){return n(Error(`Failed to send a WebSocket message as the client is not connected`),t.NoReplyReceivedError)}function s(){return n(Error(`Failed to send a WebSocket message as the client is not ready`),t.NoReplyReceivedError)}})),me=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleLogger=e.LogLevel=void 0;var t;(function(e){e.ERROR=`error`,e.WARN=`warn`,e.INFO=`info`,e.DEBUG=`debug`})(t||(e.LogLevel=t={}));var n=class e{constructor(){this.level=t.INFO,this.name=``}getLevel(){return this.level}setLevel(e){this.level=e}setName(e){this.name=e}debug(...n){e.isMoreOrEqualSevere(t.DEBUG,this.level)&&console.debug(e.labels.get(t.DEBUG),this.name,...n)}info(...n){e.isMoreOrEqualSevere(t.INFO,this.level)&&console.info(e.labels.get(t.INFO),this.name,...n)}warn(...n){e.isMoreOrEqualSevere(t.WARN,this.level)&&console.warn(e.labels.get(t.WARN),this.name,...n)}error(...n){e.isMoreOrEqualSevere(t.ERROR,this.level)&&console.error(e.labels.get(t.ERROR),this.name,...n)}static isMoreOrEqualSevere(t,n){return e.severity[t]>=e.severity[n]}};e.ConsoleLogger=n,n.labels=(()=>{let e=Object.entries(t).map(([e,t])=>[t,`[${e}] `]);return new Map(e)})(),n.severity={[t.ERROR]:400,[t.WARN]:300,[t.INFO]:200,[t.DEBUG]:100}})),he=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevel=void 0;let t=me();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return t.LogLevel}});let n=0;e.default={getLogger:function(e,r,i){let a=n;n+=1;let o=i===void 0?new t.ConsoleLogger:i;return o.setName(`socket-mode:${e}:${a}`),r!==void 0&&o.setLevel(r),o}}})),ge=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorCode=void 0,e.errorWithCode=n,e.requestErrorWithOriginal=r,e.httpErrorFromResponse=i,e.platformErrorFromResult=a,e.rateLimitedErrorWithDelay=o;var t;(function(e){e.RequestError=`slack_webapi_request_error`,e.HTTPError=`slack_webapi_http_error`,e.PlatformError=`slack_webapi_platform_error`,e.RateLimitedError=`slack_webapi_rate_limited_error`,e.FileUploadInvalidArgumentsError=`slack_webapi_file_upload_invalid_args_error`,e.FileUploadReadFileDataError=`slack_webapi_file_upload_read_file_data_error`})(t||(e.ErrorCode=t={}));function n(e,t){let n=e;return n.code=t,n}function r(e,r){let i=n(Error(`A request error occurred: ${e.message}`),t.RequestError);return r&&(i.original=e),i}function i(e){let r=n(Error(`An HTTP protocol error occurred: statusCode = ${e.status}`),t.HTTPError);r.statusCode=e.status,r.statusMessage=e.statusText;let i={};for(let t of Object.keys(e.headers))t&&e.headers[t]&&(i[t]=e.headers[t]);return r.headers=i,r.body=e.data,r}function a(e){let r=n(Error(`An API error occurred: ${e.error}`),t.PlatformError);return r.data=e,r}function o(e){let r=n(Error(`A rate-limit has been reached, you may retry this request in ${e} seconds`),t.RateLimitedError);return r.retryAfter=e,r}})),_e=i(((e,t)=>{t.exports={name:`@slack/web-api`,version:`7.16.0`,description:`Official library for using the Slack Platform's Web API`,author:`Slack Technologies, LLC`,license:`MIT`,keywords:[`slack`,`web-api`,`bot`,`client`,`http`,`api`,`proxy`,`rate-limiting`,`pagination`],main:`dist/index.js`,types:`./dist/index.d.ts`,files:[`dist/**/*`],engines:{node:`>= 18`,npm:`>= 8.6.0`},repository:{type:`git`,url:`git+https://github.com/slackapi/node-slack-sdk.git`},homepage:`https://docs.slack.dev/tools/node-slack-sdk/web-api/`,publishConfig:{access:`public`},bugs:{url:`https://github.com/slackapi/node-slack-sdk/issues`},scripts:{build:`npm run build:clean && tsc`,"build:clean":`shx rm -rf ./dist`,docs:`npx typedoc --plugin typedoc-plugin-markdown`,prepack:`npm run build`,test:`npm run build && bash -c 'node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts'`,"test:coverage":`npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts`,"test:integration":`npm run build && node test/integration/commonjs-project/index.js && node test/integration/esm-project/index.mjs && npm run test:integration:ts`,"test:integration:ts":`cd test/integration/ts-4.7-project && npm i && npm run build`,"test:types":`tsd`,watch:`npx nodemon --watch 'src' --ext 'ts' --exec npm run build`},dependencies:{"@slack/logger":`^4.0.1`,"@slack/types":`^2.21.0`,"@types/node":`>=18`,"@types/retry":`0.12.0`,axios:`^1.16.0`,eventemitter3:`^5.0.1`,"form-data":`^4.0.4`,"is-electron":`2.2.2`,"is-stream":`^2`,"p-queue":`^6`,"p-retry":`^4`,retry:`^0.13.1`},devDependencies:{"@types/busboy":`^1.5.4`,"@types/sinon":`^21`,busboy:`^1`,nock:`^14`,sinon:`^21`,tsd:`^0.33.0`},tsd:{directory:`test/types`}}})),ve=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!==`default`&&t(i,r,a[o]);return n(i,r),i}})();Object.defineProperty(e,"__esModule",{value:!0}),e.addAppMetadata=f,e.getUserAgent=p;let a=i(r(`node:os`)),o=r(`node:path`),s=_e();function c(e){return e.replace(`/`,`:`)}function l(e){let t=``;for(let n of e)t+=n.charCodeAt(0)<=255?n:encodeURIComponent(n);return t}let u=`${c(s.name)}/${s.version} ${l((0,o.basename)(process.title))}/${process.version.replace(`v`,``)} ${a.platform()}/${a.release()}`,d={};function f({name:e,version:t}){d[c(e)]=t}function p(){let e=Object.entries(d).map(([e,t])=>`${e}/${t}`).join(` `);return(e.length>0?`${e} `:``)+u}})),ye=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevel=void 0,e.getLogger=i;let t=me();var n=me();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return n.LogLevel}});let r=0;function i(e,n,i){let a=r;r+=1;let o=i===void 0?new t.ConsoleLogger:i;return o.setName(`web-api:${e}:${a}`),n!==void 0&&o.setLevel(n),o}})),be=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.rapidRetryPolicy=e.fiveRetriesInFiveMinutes=e.tenRetriesInAboutThirtyMinutes=void 0,e.tenRetriesInAboutThirtyMinutes={retries:10,factor:1.96821,randomize:!0},e.fiveRetriesInFiveMinutes={retries:5,factor:3.86},e.rapidRetryPolicy={minTimeout:0,maxTimeout:1},e.default={tenRetriesInAboutThirtyMinutes:e.tenRetriesInAboutThirtyMinutes,fiveRetriesInFiveMinutes:e.fiveRetriesInFiveMinutes,rapidRetryPolicy:e.rapidRetryPolicy}})),xe=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Se=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Ce=i((e=>{var t=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(e,"__esModule",{value:!0}),e.ChatStreamer=void 0,e.ChatStreamer=class{constructor(e,t,n,r){this.buffer=``,this.client=e,this.logger=t,this.options={buffer_size:r.buffer_size??256},this.state=`starting`,this.streamArgs=n}async append(e){if(this.state===`completed`)throw Error(`failed to append stream: stream state is ${this.state}`);let{markdown_text:n,chunks:r}=e,i=t(e,[`markdown_text`,`chunks`]);if(i.token&&(this.token=i.token),n&&(this.buffer+=n),this.buffer.length>=this.options.buffer_size||r)return await this.flushBuffer(Object.assign({chunks:r},i));let a={bufferLength:this.buffer.length,bufferSize:this.options.buffer_size,channel:this.streamArgs.channel,recipientTeamId:this.streamArgs.recipient_team_id,recipientUserId:this.streamArgs.recipient_user_id,threadTs:this.streamArgs.thread_ts};return this.logger.debug(`ChatStreamer appended to buffer: ${JSON.stringify(a)}`),null}async stop(e){if(this.state===`completed`)throw Error(`failed to stop stream: stream state is ${this.state}`);let n=e??{},{markdown_text:r,chunks:i}=n,a=t(n,[`markdown_text`,`chunks`]);if(a.token&&(this.token=a.token),r&&(this.buffer+=r),!this.streamTs){let e=await this.client.chat.startStream(Object.assign(Object.assign({},this.streamArgs),{token:this.token}));if(!e.ts)throw Error(`failed to stop stream: stream not started`);this.streamTs=e.ts,this.state=`in_progress`}let o=[];this.buffer.length>0&&o.push({type:`markdown_text`,text:this.buffer}),i&&o.push(...i);let s=await this.client.chat.stopStream(Object.assign({token:this.token,channel:this.streamArgs.channel,ts:this.streamTs,chunks:o},a));return this.state=`completed`,s}async flushBuffer(e){let n=e??{},{chunks:r}=n,i=t(n,[`chunks`]),a=[];if(this.buffer.length>0&&a.push({type:`markdown_text`,text:this.buffer}),r&&a.push(...r),!this.streamTs){let e=await this.client.chat.startStream(Object.assign(Object.assign(Object.assign({},this.streamArgs),{token:this.token,chunks:a}),i));return this.buffer=``,this.streamTs=e.ts,this.state=`in_progress`,e}let o=await this.client.chat.appendStream(Object.assign({token:this.token,channel:this.streamArgs.channel,ts:this.streamTs,chunks:a},i));return this.buffer=``,o}}})),we=i(((e,t)=>{var n=r(`stream`).Stream,i=r(`util`);t.exports=a;function a(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i.inherits(a,n),a.create=function(e,t){var n=new this;for(var r in t||={},t)n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on(`error`,function(){}),n.pauseStream&&e.pause(),n},Object.defineProperty(a.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),a.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},a.prototype.resume=function(){this._released||this.release(),this.source.resume()},a.prototype.pause=function(){this.source.pause()},a.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},a.prototype.pipe=function(){var e=n.prototype.pipe.apply(this,arguments);return this.resume(),e},a.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]===`data`&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)},a.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e=`DelayedStream#maxDataSize of `+this.maxDataSize+` bytes exceeded.`;this.emit(`error`,Error(e))}}})),Te=i(((e,t)=>{var n=r(`util`),i=r(`stream`).Stream,a=we();t.exports=o;function o(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}n.inherits(o,i),o.create=function(e){var t=new this;for(var n in e||={},e)t[n]=e[n];return t},o.isStreamLike=function(e){return typeof e!=`function`&&typeof e!=`string`&&typeof e!=`boolean`&&typeof e!=`number`&&!Buffer.isBuffer(e)},o.prototype.append=function(e){if(o.isStreamLike(e)){if(!(e instanceof a)){var t=a.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on(`data`,this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},o.prototype.pipe=function(e,t){return i.prototype.pipe.call(this,e,t),this.resume(),e},o.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}},o.prototype._realGetNext=function(){var e=this._streams.shift();if(e===void 0){this.end();return}if(typeof e!=`function`){this._pipeNext(e);return}e(function(e){o.isStreamLike(e)&&(e.on(`data`,this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this))},o.prototype._pipeNext=function(e){if(this._currentStream=e,o.isStreamLike(e)){e.on(`end`,this._getNext.bind(this)),e.pipe(this,{end:!1});return}var t=e;this.write(t),this._getNext()},o.prototype._handleErrors=function(e){var t=this;e.on(`error`,function(e){t._emitError(e)})},o.prototype.write=function(e){this.emit(`data`,e)},o.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause==`function`&&this._currentStream.pause(),this.emit(`pause`))},o.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume==`function`&&this._currentStream.resume(),this.emit(`resume`)},o.prototype.end=function(){this._reset(),this.emit(`end`)},o.prototype.destroy=function(){this._reset(),this.emit(`close`)},o.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},o.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e=`DelayedStream#maxDataSize of `+this.maxDataSize+` bytes exceeded.`;this._emitError(Error(e))}},o.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},o.prototype._emitError=function(e){this._reset(),this.emit(`error`,e)}})),Ee=i(((e,t)=>{t.exports={"application/1d-interleaved-parityfec":{source:`iana`},"application/3gpdash-qoe-report+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/3gpp-ims+xml":{source:`iana`,compressible:!0},"application/3gpphal+json":{source:`iana`,compressible:!0},"application/3gpphalforms+json":{source:`iana`,compressible:!0},"application/a2l":{source:`iana`},"application/ace+cbor":{source:`iana`},"application/activemessage":{source:`iana`},"application/activity+json":{source:`iana`,compressible:!0},"application/alto-costmap+json":{source:`iana`,compressible:!0},"application/alto-costmapfilter+json":{source:`iana`,compressible:!0},"application/alto-directory+json":{source:`iana`,compressible:!0},"application/alto-endpointcost+json":{source:`iana`,compressible:!0},"application/alto-endpointcostparams+json":{source:`iana`,compressible:!0},"application/alto-endpointprop+json":{source:`iana`,compressible:!0},"application/alto-endpointpropparams+json":{source:`iana`,compressible:!0},"application/alto-error+json":{source:`iana`,compressible:!0},"application/alto-networkmap+json":{source:`iana`,compressible:!0},"application/alto-networkmapfilter+json":{source:`iana`,compressible:!0},"application/alto-updatestreamcontrol+json":{source:`iana`,compressible:!0},"application/alto-updatestreamparams+json":{source:`iana`,compressible:!0},"application/aml":{source:`iana`},"application/andrew-inset":{source:`iana`,extensions:[`ez`]},"application/applefile":{source:`iana`},"application/applixware":{source:`apache`,extensions:[`aw`]},"application/at+jwt":{source:`iana`},"application/atf":{source:`iana`},"application/atfx":{source:`iana`},"application/atom+xml":{source:`iana`,compressible:!0,extensions:[`atom`]},"application/atomcat+xml":{source:`iana`,compressible:!0,extensions:[`atomcat`]},"application/atomdeleted+xml":{source:`iana`,compressible:!0,extensions:[`atomdeleted`]},"application/atomicmail":{source:`iana`},"application/atomsvc+xml":{source:`iana`,compressible:!0,extensions:[`atomsvc`]},"application/atsc-dwd+xml":{source:`iana`,compressible:!0,extensions:[`dwd`]},"application/atsc-dynamic-event-message":{source:`iana`},"application/atsc-held+xml":{source:`iana`,compressible:!0,extensions:[`held`]},"application/atsc-rdt+json":{source:`iana`,compressible:!0},"application/atsc-rsat+xml":{source:`iana`,compressible:!0,extensions:[`rsat`]},"application/atxml":{source:`iana`},"application/auth-policy+xml":{source:`iana`,compressible:!0},"application/bacnet-xdd+zip":{source:`iana`,compressible:!1},"application/batch-smtp":{source:`iana`},"application/bdoc":{compressible:!1,extensions:[`bdoc`]},"application/beep+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/calendar+json":{source:`iana`,compressible:!0},"application/calendar+xml":{source:`iana`,compressible:!0,extensions:[`xcs`]},"application/call-completion":{source:`iana`},"application/cals-1840":{source:`iana`},"application/captive+json":{source:`iana`,compressible:!0},"application/cbor":{source:`iana`},"application/cbor-seq":{source:`iana`},"application/cccex":{source:`iana`},"application/ccmp+xml":{source:`iana`,compressible:!0},"application/ccxml+xml":{source:`iana`,compressible:!0,extensions:[`ccxml`]},"application/cdfx+xml":{source:`iana`,compressible:!0,extensions:[`cdfx`]},"application/cdmi-capability":{source:`iana`,extensions:[`cdmia`]},"application/cdmi-container":{source:`iana`,extensions:[`cdmic`]},"application/cdmi-domain":{source:`iana`,extensions:[`cdmid`]},"application/cdmi-object":{source:`iana`,extensions:[`cdmio`]},"application/cdmi-queue":{source:`iana`,extensions:[`cdmiq`]},"application/cdni":{source:`iana`},"application/cea":{source:`iana`},"application/cea-2018+xml":{source:`iana`,compressible:!0},"application/cellml+xml":{source:`iana`,compressible:!0},"application/cfw":{source:`iana`},"application/city+json":{source:`iana`,compressible:!0},"application/clr":{source:`iana`},"application/clue+xml":{source:`iana`,compressible:!0},"application/clue_info+xml":{source:`iana`,compressible:!0},"application/cms":{source:`iana`},"application/cnrp+xml":{source:`iana`,compressible:!0},"application/coap-group+json":{source:`iana`,compressible:!0},"application/coap-payload":{source:`iana`},"application/commonground":{source:`iana`},"application/conference-info+xml":{source:`iana`,compressible:!0},"application/cose":{source:`iana`},"application/cose-key":{source:`iana`},"application/cose-key-set":{source:`iana`},"application/cpl+xml":{source:`iana`,compressible:!0,extensions:[`cpl`]},"application/csrattrs":{source:`iana`},"application/csta+xml":{source:`iana`,compressible:!0},"application/cstadata+xml":{source:`iana`,compressible:!0},"application/csvm+json":{source:`iana`,compressible:!0},"application/cu-seeme":{source:`apache`,extensions:[`cu`]},"application/cwt":{source:`iana`},"application/cybercash":{source:`iana`},"application/dart":{compressible:!0},"application/dash+xml":{source:`iana`,compressible:!0,extensions:[`mpd`]},"application/dash-patch+xml":{source:`iana`,compressible:!0,extensions:[`mpp`]},"application/dashdelta":{source:`iana`},"application/davmount+xml":{source:`iana`,compressible:!0,extensions:[`davmount`]},"application/dca-rft":{source:`iana`},"application/dcd":{source:`iana`},"application/dec-dx":{source:`iana`},"application/dialog-info+xml":{source:`iana`,compressible:!0},"application/dicom":{source:`iana`},"application/dicom+json":{source:`iana`,compressible:!0},"application/dicom+xml":{source:`iana`,compressible:!0},"application/dii":{source:`iana`},"application/dit":{source:`iana`},"application/dns":{source:`iana`},"application/dns+json":{source:`iana`,compressible:!0},"application/dns-message":{source:`iana`},"application/docbook+xml":{source:`apache`,compressible:!0,extensions:[`dbk`]},"application/dots+cbor":{source:`iana`},"application/dskpp+xml":{source:`iana`,compressible:!0},"application/dssc+der":{source:`iana`,extensions:[`dssc`]},"application/dssc+xml":{source:`iana`,compressible:!0,extensions:[`xdssc`]},"application/dvcs":{source:`iana`},"application/ecmascript":{source:`iana`,compressible:!0,extensions:[`es`,`ecma`]},"application/edi-consent":{source:`iana`},"application/edi-x12":{source:`iana`,compressible:!1},"application/edifact":{source:`iana`,compressible:!1},"application/efi":{source:`iana`},"application/elm+json":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/elm+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.cap+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/emergencycalldata.comment+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.control+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.ecall.msd":{source:`iana`},"application/emergencycalldata.providerinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.veds+xml":{source:`iana`,compressible:!0},"application/emma+xml":{source:`iana`,compressible:!0,extensions:[`emma`]},"application/emotionml+xml":{source:`iana`,compressible:!0,extensions:[`emotionml`]},"application/encaprtp":{source:`iana`},"application/epp+xml":{source:`iana`,compressible:!0},"application/epub+zip":{source:`iana`,compressible:!1,extensions:[`epub`]},"application/eshop":{source:`iana`},"application/exi":{source:`iana`,extensions:[`exi`]},"application/expect-ct-report+json":{source:`iana`,compressible:!0},"application/express":{source:`iana`,extensions:[`exp`]},"application/fastinfoset":{source:`iana`},"application/fastsoap":{source:`iana`},"application/fdt+xml":{source:`iana`,compressible:!0,extensions:[`fdt`]},"application/fhir+json":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/fhir+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:`iana`},"application/flexfec":{source:`iana`},"application/font-sfnt":{source:`iana`},"application/font-tdpfr":{source:`iana`,extensions:[`pfr`]},"application/font-woff":{source:`iana`,compressible:!1},"application/framework-attributes+xml":{source:`iana`,compressible:!0},"application/geo+json":{source:`iana`,compressible:!0,extensions:[`geojson`]},"application/geo+json-seq":{source:`iana`},"application/geopackage+sqlite3":{source:`iana`},"application/geoxacml+xml":{source:`iana`,compressible:!0},"application/gltf-buffer":{source:`iana`},"application/gml+xml":{source:`iana`,compressible:!0,extensions:[`gml`]},"application/gpx+xml":{source:`apache`,compressible:!0,extensions:[`gpx`]},"application/gxf":{source:`apache`,extensions:[`gxf`]},"application/gzip":{source:`iana`,compressible:!1,extensions:[`gz`]},"application/h224":{source:`iana`},"application/held+xml":{source:`iana`,compressible:!0},"application/hjson":{extensions:[`hjson`]},"application/http":{source:`iana`},"application/hyperstudio":{source:`iana`,extensions:[`stk`]},"application/ibe-key-request+xml":{source:`iana`,compressible:!0},"application/ibe-pkg-reply+xml":{source:`iana`,compressible:!0},"application/ibe-pp-data":{source:`iana`},"application/iges":{source:`iana`},"application/im-iscomposing+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/index":{source:`iana`},"application/index.cmd":{source:`iana`},"application/index.obj":{source:`iana`},"application/index.response":{source:`iana`},"application/index.vnd":{source:`iana`},"application/inkml+xml":{source:`iana`,compressible:!0,extensions:[`ink`,`inkml`]},"application/iotp":{source:`iana`},"application/ipfix":{source:`iana`,extensions:[`ipfix`]},"application/ipp":{source:`iana`},"application/isup":{source:`iana`},"application/its+xml":{source:`iana`,compressible:!0,extensions:[`its`]},"application/java-archive":{source:`apache`,compressible:!1,extensions:[`jar`,`war`,`ear`]},"application/java-serialized-object":{source:`apache`,compressible:!1,extensions:[`ser`]},"application/java-vm":{source:`apache`,compressible:!1,extensions:[`class`]},"application/javascript":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`js`,`mjs`]},"application/jf2feed+json":{source:`iana`,compressible:!0},"application/jose":{source:`iana`},"application/jose+json":{source:`iana`,compressible:!0},"application/jrd+json":{source:`iana`,compressible:!0},"application/jscalendar+json":{source:`iana`,compressible:!0},"application/json":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`json`,`map`]},"application/json-patch+json":{source:`iana`,compressible:!0},"application/json-seq":{source:`iana`},"application/json5":{extensions:[`json5`]},"application/jsonml+json":{source:`apache`,compressible:!0,extensions:[`jsonml`]},"application/jwk+json":{source:`iana`,compressible:!0},"application/jwk-set+json":{source:`iana`,compressible:!0},"application/jwt":{source:`iana`},"application/kpml-request+xml":{source:`iana`,compressible:!0},"application/kpml-response+xml":{source:`iana`,compressible:!0},"application/ld+json":{source:`iana`,compressible:!0,extensions:[`jsonld`]},"application/lgr+xml":{source:`iana`,compressible:!0,extensions:[`lgr`]},"application/link-format":{source:`iana`},"application/load-control+xml":{source:`iana`,compressible:!0},"application/lost+xml":{source:`iana`,compressible:!0,extensions:[`lostxml`]},"application/lostsync+xml":{source:`iana`,compressible:!0},"application/lpf+zip":{source:`iana`,compressible:!1},"application/lxf":{source:`iana`},"application/mac-binhex40":{source:`iana`,extensions:[`hqx`]},"application/mac-compactpro":{source:`apache`,extensions:[`cpt`]},"application/macwriteii":{source:`iana`},"application/mads+xml":{source:`iana`,compressible:!0,extensions:[`mads`]},"application/manifest+json":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`webmanifest`]},"application/marc":{source:`iana`,extensions:[`mrc`]},"application/marcxml+xml":{source:`iana`,compressible:!0,extensions:[`mrcx`]},"application/mathematica":{source:`iana`,extensions:[`ma`,`nb`,`mb`]},"application/mathml+xml":{source:`iana`,compressible:!0,extensions:[`mathml`]},"application/mathml-content+xml":{source:`iana`,compressible:!0},"application/mathml-presentation+xml":{source:`iana`,compressible:!0},"application/mbms-associated-procedure-description+xml":{source:`iana`,compressible:!0},"application/mbms-deregister+xml":{source:`iana`,compressible:!0},"application/mbms-envelope+xml":{source:`iana`,compressible:!0},"application/mbms-msk+xml":{source:`iana`,compressible:!0},"application/mbms-msk-response+xml":{source:`iana`,compressible:!0},"application/mbms-protection-description+xml":{source:`iana`,compressible:!0},"application/mbms-reception-report+xml":{source:`iana`,compressible:!0},"application/mbms-register+xml":{source:`iana`,compressible:!0},"application/mbms-register-response+xml":{source:`iana`,compressible:!0},"application/mbms-schedule+xml":{source:`iana`,compressible:!0},"application/mbms-user-service-description+xml":{source:`iana`,compressible:!0},"application/mbox":{source:`iana`,extensions:[`mbox`]},"application/media-policy-dataset+xml":{source:`iana`,compressible:!0,extensions:[`mpf`]},"application/media_control+xml":{source:`iana`,compressible:!0},"application/mediaservercontrol+xml":{source:`iana`,compressible:!0,extensions:[`mscml`]},"application/merge-patch+json":{source:`iana`,compressible:!0},"application/metalink+xml":{source:`apache`,compressible:!0,extensions:[`metalink`]},"application/metalink4+xml":{source:`iana`,compressible:!0,extensions:[`meta4`]},"application/mets+xml":{source:`iana`,compressible:!0,extensions:[`mets`]},"application/mf4":{source:`iana`},"application/mikey":{source:`iana`},"application/mipc":{source:`iana`},"application/missing-blocks+cbor-seq":{source:`iana`},"application/mmt-aei+xml":{source:`iana`,compressible:!0,extensions:[`maei`]},"application/mmt-usd+xml":{source:`iana`,compressible:!0,extensions:[`musd`]},"application/mods+xml":{source:`iana`,compressible:!0,extensions:[`mods`]},"application/moss-keys":{source:`iana`},"application/moss-signature":{source:`iana`},"application/mosskey-data":{source:`iana`},"application/mosskey-request":{source:`iana`},"application/mp21":{source:`iana`,extensions:[`m21`,`mp21`]},"application/mp4":{source:`iana`,extensions:[`mp4s`,`m4p`]},"application/mpeg4-generic":{source:`iana`},"application/mpeg4-iod":{source:`iana`},"application/mpeg4-iod-xmt":{source:`iana`},"application/mrb-consumer+xml":{source:`iana`,compressible:!0},"application/mrb-publish+xml":{source:`iana`,compressible:!0},"application/msc-ivr+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/msc-mixer+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/msword":{source:`iana`,compressible:!1,extensions:[`doc`,`dot`]},"application/mud+json":{source:`iana`,compressible:!0},"application/multipart-core":{source:`iana`},"application/mxf":{source:`iana`,extensions:[`mxf`]},"application/n-quads":{source:`iana`,extensions:[`nq`]},"application/n-triples":{source:`iana`,extensions:[`nt`]},"application/nasdata":{source:`iana`},"application/news-checkgroups":{source:`iana`,charset:`US-ASCII`},"application/news-groupinfo":{source:`iana`,charset:`US-ASCII`},"application/news-transmission":{source:`iana`},"application/nlsml+xml":{source:`iana`,compressible:!0},"application/node":{source:`iana`,extensions:[`cjs`]},"application/nss":{source:`iana`},"application/oauth-authz-req+jwt":{source:`iana`},"application/oblivious-dns-message":{source:`iana`},"application/ocsp-request":{source:`iana`},"application/ocsp-response":{source:`iana`},"application/octet-stream":{source:`iana`,compressible:!1,extensions:[`bin`,`dms`,`lrf`,`mar`,`so`,`dist`,`distz`,`pkg`,`bpk`,`dump`,`elc`,`deploy`,`exe`,`dll`,`deb`,`dmg`,`iso`,`img`,`msi`,`msp`,`msm`,`buffer`]},"application/oda":{source:`iana`,extensions:[`oda`]},"application/odm+xml":{source:`iana`,compressible:!0},"application/odx":{source:`iana`},"application/oebps-package+xml":{source:`iana`,compressible:!0,extensions:[`opf`]},"application/ogg":{source:`iana`,compressible:!1,extensions:[`ogx`]},"application/omdoc+xml":{source:`apache`,compressible:!0,extensions:[`omdoc`]},"application/onenote":{source:`apache`,extensions:[`onetoc`,`onetoc2`,`onetmp`,`onepkg`]},"application/opc-nodeset+xml":{source:`iana`,compressible:!0},"application/oscore":{source:`iana`},"application/oxps":{source:`iana`,extensions:[`oxps`]},"application/p21":{source:`iana`},"application/p21+zip":{source:`iana`,compressible:!1},"application/p2p-overlay+xml":{source:`iana`,compressible:!0,extensions:[`relo`]},"application/parityfec":{source:`iana`},"application/passport":{source:`iana`},"application/patch-ops-error+xml":{source:`iana`,compressible:!0,extensions:[`xer`]},"application/pdf":{source:`iana`,compressible:!1,extensions:[`pdf`]},"application/pdx":{source:`iana`},"application/pem-certificate-chain":{source:`iana`},"application/pgp-encrypted":{source:`iana`,compressible:!1,extensions:[`pgp`]},"application/pgp-keys":{source:`iana`,extensions:[`asc`]},"application/pgp-signature":{source:`iana`,extensions:[`asc`,`sig`]},"application/pics-rules":{source:`apache`,extensions:[`prf`]},"application/pidf+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/pidf-diff+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/pkcs10":{source:`iana`,extensions:[`p10`]},"application/pkcs12":{source:`iana`},"application/pkcs7-mime":{source:`iana`,extensions:[`p7m`,`p7c`]},"application/pkcs7-signature":{source:`iana`,extensions:[`p7s`]},"application/pkcs8":{source:`iana`,extensions:[`p8`]},"application/pkcs8-encrypted":{source:`iana`},"application/pkix-attr-cert":{source:`iana`,extensions:[`ac`]},"application/pkix-cert":{source:`iana`,extensions:[`cer`]},"application/pkix-crl":{source:`iana`,extensions:[`crl`]},"application/pkix-pkipath":{source:`iana`,extensions:[`pkipath`]},"application/pkixcmp":{source:`iana`,extensions:[`pki`]},"application/pls+xml":{source:`iana`,compressible:!0,extensions:[`pls`]},"application/poc-settings+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/postscript":{source:`iana`,compressible:!0,extensions:[`ai`,`eps`,`ps`]},"application/ppsp-tracker+json":{source:`iana`,compressible:!0},"application/problem+json":{source:`iana`,compressible:!0},"application/problem+xml":{source:`iana`,compressible:!0},"application/provenance+xml":{source:`iana`,compressible:!0,extensions:[`provx`]},"application/prs.alvestrand.titrax-sheet":{source:`iana`},"application/prs.cww":{source:`iana`,extensions:[`cww`]},"application/prs.cyn":{source:`iana`,charset:`7-BIT`},"application/prs.hpub+zip":{source:`iana`,compressible:!1},"application/prs.nprend":{source:`iana`},"application/prs.plucker":{source:`iana`},"application/prs.rdf-xml-crypt":{source:`iana`},"application/prs.xsf+xml":{source:`iana`,compressible:!0},"application/pskc+xml":{source:`iana`,compressible:!0,extensions:[`pskcxml`]},"application/pvd+json":{source:`iana`,compressible:!0},"application/qsig":{source:`iana`},"application/raml+yaml":{compressible:!0,extensions:[`raml`]},"application/raptorfec":{source:`iana`},"application/rdap+json":{source:`iana`,compressible:!0},"application/rdf+xml":{source:`iana`,compressible:!0,extensions:[`rdf`,`owl`]},"application/reginfo+xml":{source:`iana`,compressible:!0,extensions:[`rif`]},"application/relax-ng-compact-syntax":{source:`iana`,extensions:[`rnc`]},"application/remote-printing":{source:`iana`},"application/reputon+json":{source:`iana`,compressible:!0},"application/resource-lists+xml":{source:`iana`,compressible:!0,extensions:[`rl`]},"application/resource-lists-diff+xml":{source:`iana`,compressible:!0,extensions:[`rld`]},"application/rfc+xml":{source:`iana`,compressible:!0},"application/riscos":{source:`iana`},"application/rlmi+xml":{source:`iana`,compressible:!0},"application/rls-services+xml":{source:`iana`,compressible:!0,extensions:[`rs`]},"application/route-apd+xml":{source:`iana`,compressible:!0,extensions:[`rapd`]},"application/route-s-tsid+xml":{source:`iana`,compressible:!0,extensions:[`sls`]},"application/route-usd+xml":{source:`iana`,compressible:!0,extensions:[`rusd`]},"application/rpki-ghostbusters":{source:`iana`,extensions:[`gbr`]},"application/rpki-manifest":{source:`iana`,extensions:[`mft`]},"application/rpki-publication":{source:`iana`},"application/rpki-roa":{source:`iana`,extensions:[`roa`]},"application/rpki-updown":{source:`iana`},"application/rsd+xml":{source:`apache`,compressible:!0,extensions:[`rsd`]},"application/rss+xml":{source:`apache`,compressible:!0,extensions:[`rss`]},"application/rtf":{source:`iana`,compressible:!0,extensions:[`rtf`]},"application/rtploopback":{source:`iana`},"application/rtx":{source:`iana`},"application/samlassertion+xml":{source:`iana`,compressible:!0},"application/samlmetadata+xml":{source:`iana`,compressible:!0},"application/sarif+json":{source:`iana`,compressible:!0},"application/sarif-external-properties+json":{source:`iana`,compressible:!0},"application/sbe":{source:`iana`},"application/sbml+xml":{source:`iana`,compressible:!0,extensions:[`sbml`]},"application/scaip+xml":{source:`iana`,compressible:!0},"application/scim+json":{source:`iana`,compressible:!0},"application/scvp-cv-request":{source:`iana`,extensions:[`scq`]},"application/scvp-cv-response":{source:`iana`,extensions:[`scs`]},"application/scvp-vp-request":{source:`iana`,extensions:[`spq`]},"application/scvp-vp-response":{source:`iana`,extensions:[`spp`]},"application/sdp":{source:`iana`,extensions:[`sdp`]},"application/secevent+jwt":{source:`iana`},"application/senml+cbor":{source:`iana`},"application/senml+json":{source:`iana`,compressible:!0},"application/senml+xml":{source:`iana`,compressible:!0,extensions:[`senmlx`]},"application/senml-etch+cbor":{source:`iana`},"application/senml-etch+json":{source:`iana`,compressible:!0},"application/senml-exi":{source:`iana`},"application/sensml+cbor":{source:`iana`},"application/sensml+json":{source:`iana`,compressible:!0},"application/sensml+xml":{source:`iana`,compressible:!0,extensions:[`sensmlx`]},"application/sensml-exi":{source:`iana`},"application/sep+xml":{source:`iana`,compressible:!0},"application/sep-exi":{source:`iana`},"application/session-info":{source:`iana`},"application/set-payment":{source:`iana`},"application/set-payment-initiation":{source:`iana`,extensions:[`setpay`]},"application/set-registration":{source:`iana`},"application/set-registration-initiation":{source:`iana`,extensions:[`setreg`]},"application/sgml":{source:`iana`},"application/sgml-open-catalog":{source:`iana`},"application/shf+xml":{source:`iana`,compressible:!0,extensions:[`shf`]},"application/sieve":{source:`iana`,extensions:[`siv`,`sieve`]},"application/simple-filter+xml":{source:`iana`,compressible:!0},"application/simple-message-summary":{source:`iana`},"application/simplesymbolcontainer":{source:`iana`},"application/sipc":{source:`iana`},"application/slate":{source:`iana`},"application/smil":{source:`iana`},"application/smil+xml":{source:`iana`,compressible:!0,extensions:[`smi`,`smil`]},"application/smpte336m":{source:`iana`},"application/soap+fastinfoset":{source:`iana`},"application/soap+xml":{source:`iana`,compressible:!0},"application/sparql-query":{source:`iana`,extensions:[`rq`]},"application/sparql-results+xml":{source:`iana`,compressible:!0,extensions:[`srx`]},"application/spdx+json":{source:`iana`,compressible:!0},"application/spirits-event+xml":{source:`iana`,compressible:!0},"application/sql":{source:`iana`},"application/srgs":{source:`iana`,extensions:[`gram`]},"application/srgs+xml":{source:`iana`,compressible:!0,extensions:[`grxml`]},"application/sru+xml":{source:`iana`,compressible:!0,extensions:[`sru`]},"application/ssdl+xml":{source:`apache`,compressible:!0,extensions:[`ssdl`]},"application/ssml+xml":{source:`iana`,compressible:!0,extensions:[`ssml`]},"application/stix+json":{source:`iana`,compressible:!0},"application/swid+xml":{source:`iana`,compressible:!0,extensions:[`swidtag`]},"application/tamp-apex-update":{source:`iana`},"application/tamp-apex-update-confirm":{source:`iana`},"application/tamp-community-update":{source:`iana`},"application/tamp-community-update-confirm":{source:`iana`},"application/tamp-error":{source:`iana`},"application/tamp-sequence-adjust":{source:`iana`},"application/tamp-sequence-adjust-confirm":{source:`iana`},"application/tamp-status-query":{source:`iana`},"application/tamp-status-response":{source:`iana`},"application/tamp-update":{source:`iana`},"application/tamp-update-confirm":{source:`iana`},"application/tar":{compressible:!0},"application/taxii+json":{source:`iana`,compressible:!0},"application/td+json":{source:`iana`,compressible:!0},"application/tei+xml":{source:`iana`,compressible:!0,extensions:[`tei`,`teicorpus`]},"application/tetra_isi":{source:`iana`},"application/thraud+xml":{source:`iana`,compressible:!0,extensions:[`tfi`]},"application/timestamp-query":{source:`iana`},"application/timestamp-reply":{source:`iana`},"application/timestamped-data":{source:`iana`,extensions:[`tsd`]},"application/tlsrpt+gzip":{source:`iana`},"application/tlsrpt+json":{source:`iana`,compressible:!0},"application/tnauthlist":{source:`iana`},"application/token-introspection+jwt":{source:`iana`},"application/toml":{compressible:!0,extensions:[`toml`]},"application/trickle-ice-sdpfrag":{source:`iana`},"application/trig":{source:`iana`,extensions:[`trig`]},"application/ttml+xml":{source:`iana`,compressible:!0,extensions:[`ttml`]},"application/tve-trigger":{source:`iana`},"application/tzif":{source:`iana`},"application/tzif-leap":{source:`iana`},"application/ubjson":{compressible:!1,extensions:[`ubj`]},"application/ulpfec":{source:`iana`},"application/urc-grpsheet+xml":{source:`iana`,compressible:!0},"application/urc-ressheet+xml":{source:`iana`,compressible:!0,extensions:[`rsheet`]},"application/urc-targetdesc+xml":{source:`iana`,compressible:!0,extensions:[`td`]},"application/urc-uisocketdesc+xml":{source:`iana`,compressible:!0},"application/vcard+json":{source:`iana`,compressible:!0},"application/vcard+xml":{source:`iana`,compressible:!0},"application/vemmi":{source:`iana`},"application/vividence.scriptfile":{source:`apache`},"application/vnd.1000minds.decision-model+xml":{source:`iana`,compressible:!0,extensions:[`1km`]},"application/vnd.3gpp-prose+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:`iana`},"application/vnd.3gpp.5gnas":{source:`iana`},"application/vnd.3gpp.access-transfer-events+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.bsf+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.gmop+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.gtpc":{source:`iana`},"application/vnd.3gpp.interworking-data":{source:`iana`},"application/vnd.3gpp.lpp":{source:`iana`},"application/vnd.3gpp.mc-signalling-ear":{source:`iana`},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:`iana`},"application/vnd.3gpp.mcdata-service-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:`iana`},"application/vnd.3gpp.mcdata-ue-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.ngap":{source:`iana`},"application/vnd.3gpp.pfcp":{source:`iana`},"application/vnd.3gpp.pic-bw-large":{source:`iana`,extensions:[`plb`]},"application/vnd.3gpp.pic-bw-small":{source:`iana`,extensions:[`psb`]},"application/vnd.3gpp.pic-bw-var":{source:`iana`,extensions:[`pvb`]},"application/vnd.3gpp.s1ap":{source:`iana`},"application/vnd.3gpp.sms":{source:`iana`},"application/vnd.3gpp.sms+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.ussd+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp2.sms":{source:`iana`},"application/vnd.3gpp2.tcap":{source:`iana`,extensions:[`tcap`]},"application/vnd.3lightssoftware.imagescal":{source:`iana`},"application/vnd.3m.post-it-notes":{source:`iana`,extensions:[`pwn`]},"application/vnd.accpac.simply.aso":{source:`iana`,extensions:[`aso`]},"application/vnd.accpac.simply.imp":{source:`iana`,extensions:[`imp`]},"application/vnd.acucobol":{source:`iana`,extensions:[`acu`]},"application/vnd.acucorp":{source:`iana`,extensions:[`atc`,`acutc`]},"application/vnd.adobe.air-application-installer-package+zip":{source:`apache`,compressible:!1,extensions:[`air`]},"application/vnd.adobe.flash.movie":{source:`iana`},"application/vnd.adobe.formscentral.fcdt":{source:`iana`,extensions:[`fcdt`]},"application/vnd.adobe.fxp":{source:`iana`,extensions:[`fxp`,`fxpl`]},"application/vnd.adobe.partial-upload":{source:`iana`},"application/vnd.adobe.xdp+xml":{source:`iana`,compressible:!0,extensions:[`xdp`]},"application/vnd.adobe.xfdf":{source:`iana`,extensions:[`xfdf`]},"application/vnd.aether.imp":{source:`iana`},"application/vnd.afpc.afplinedata":{source:`iana`},"application/vnd.afpc.afplinedata-pagedef":{source:`iana`},"application/vnd.afpc.cmoca-cmresource":{source:`iana`},"application/vnd.afpc.foca-charset":{source:`iana`},"application/vnd.afpc.foca-codedfont":{source:`iana`},"application/vnd.afpc.foca-codepage":{source:`iana`},"application/vnd.afpc.modca":{source:`iana`},"application/vnd.afpc.modca-cmtable":{source:`iana`},"application/vnd.afpc.modca-formdef":{source:`iana`},"application/vnd.afpc.modca-mediummap":{source:`iana`},"application/vnd.afpc.modca-objectcontainer":{source:`iana`},"application/vnd.afpc.modca-overlay":{source:`iana`},"application/vnd.afpc.modca-pagesegment":{source:`iana`},"application/vnd.age":{source:`iana`,extensions:[`age`]},"application/vnd.ah-barcode":{source:`iana`},"application/vnd.ahead.space":{source:`iana`,extensions:[`ahead`]},"application/vnd.airzip.filesecure.azf":{source:`iana`,extensions:[`azf`]},"application/vnd.airzip.filesecure.azs":{source:`iana`,extensions:[`azs`]},"application/vnd.amadeus+json":{source:`iana`,compressible:!0},"application/vnd.amazon.ebook":{source:`apache`,extensions:[`azw`]},"application/vnd.amazon.mobi8-ebook":{source:`iana`},"application/vnd.americandynamics.acc":{source:`iana`,extensions:[`acc`]},"application/vnd.amiga.ami":{source:`iana`,extensions:[`ami`]},"application/vnd.amundsen.maze+xml":{source:`iana`,compressible:!0},"application/vnd.android.ota":{source:`iana`},"application/vnd.android.package-archive":{source:`apache`,compressible:!1,extensions:[`apk`]},"application/vnd.anki":{source:`iana`},"application/vnd.anser-web-certificate-issue-initiation":{source:`iana`,extensions:[`cii`]},"application/vnd.anser-web-funds-transfer-initiation":{source:`apache`,extensions:[`fti`]},"application/vnd.antix.game-component":{source:`iana`,extensions:[`atx`]},"application/vnd.apache.arrow.file":{source:`iana`},"application/vnd.apache.arrow.stream":{source:`iana`},"application/vnd.apache.thrift.binary":{source:`iana`},"application/vnd.apache.thrift.compact":{source:`iana`},"application/vnd.apache.thrift.json":{source:`iana`},"application/vnd.api+json":{source:`iana`,compressible:!0},"application/vnd.aplextor.warrp+json":{source:`iana`,compressible:!0},"application/vnd.apothekende.reservation+json":{source:`iana`,compressible:!0},"application/vnd.apple.installer+xml":{source:`iana`,compressible:!0,extensions:[`mpkg`]},"application/vnd.apple.keynote":{source:`iana`,extensions:[`key`]},"application/vnd.apple.mpegurl":{source:`iana`,extensions:[`m3u8`]},"application/vnd.apple.numbers":{source:`iana`,extensions:[`numbers`]},"application/vnd.apple.pages":{source:`iana`,extensions:[`pages`]},"application/vnd.apple.pkpass":{compressible:!1,extensions:[`pkpass`]},"application/vnd.arastra.swi":{source:`iana`},"application/vnd.aristanetworks.swi":{source:`iana`,extensions:[`swi`]},"application/vnd.artisan+json":{source:`iana`,compressible:!0},"application/vnd.artsquare":{source:`iana`},"application/vnd.astraea-software.iota":{source:`iana`,extensions:[`iota`]},"application/vnd.audiograph":{source:`iana`,extensions:[`aep`]},"application/vnd.autopackage":{source:`iana`},"application/vnd.avalon+json":{source:`iana`,compressible:!0},"application/vnd.avistar+xml":{source:`iana`,compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:`iana`,compressible:!0,extensions:[`bmml`]},"application/vnd.balsamiq.bmpr":{source:`iana`},"application/vnd.banana-accounting":{source:`iana`},"application/vnd.bbf.usp.error":{source:`iana`},"application/vnd.bbf.usp.msg":{source:`iana`},"application/vnd.bbf.usp.msg+json":{source:`iana`,compressible:!0},"application/vnd.bekitzur-stech+json":{source:`iana`,compressible:!0},"application/vnd.bint.med-content":{source:`iana`},"application/vnd.biopax.rdf+xml":{source:`iana`,compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:`iana`},"application/vnd.blueice.multipass":{source:`iana`,extensions:[`mpm`]},"application/vnd.bluetooth.ep.oob":{source:`iana`},"application/vnd.bluetooth.le.oob":{source:`iana`},"application/vnd.bmi":{source:`iana`,extensions:[`bmi`]},"application/vnd.bpf":{source:`iana`},"application/vnd.bpf3":{source:`iana`},"application/vnd.businessobjects":{source:`iana`,extensions:[`rep`]},"application/vnd.byu.uapi+json":{source:`iana`,compressible:!0},"application/vnd.cab-jscript":{source:`iana`},"application/vnd.canon-cpdl":{source:`iana`},"application/vnd.canon-lips":{source:`iana`},"application/vnd.capasystems-pg+json":{source:`iana`,compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:`iana`},"application/vnd.century-systems.tcp_stream":{source:`iana`},"application/vnd.chemdraw+xml":{source:`iana`,compressible:!0,extensions:[`cdxml`]},"application/vnd.chess-pgn":{source:`iana`},"application/vnd.chipnuts.karaoke-mmd":{source:`iana`,extensions:[`mmd`]},"application/vnd.ciedi":{source:`iana`},"application/vnd.cinderella":{source:`iana`,extensions:[`cdy`]},"application/vnd.cirpack.isdn-ext":{source:`iana`},"application/vnd.citationstyles.style+xml":{source:`iana`,compressible:!0,extensions:[`csl`]},"application/vnd.claymore":{source:`iana`,extensions:[`cla`]},"application/vnd.cloanto.rp9":{source:`iana`,extensions:[`rp9`]},"application/vnd.clonk.c4group":{source:`iana`,extensions:[`c4g`,`c4d`,`c4f`,`c4p`,`c4u`]},"application/vnd.cluetrust.cartomobile-config":{source:`iana`,extensions:[`c11amc`]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:`iana`,extensions:[`c11amz`]},"application/vnd.coffeescript":{source:`iana`},"application/vnd.collabio.xodocuments.document":{source:`iana`},"application/vnd.collabio.xodocuments.document-template":{source:`iana`},"application/vnd.collabio.xodocuments.presentation":{source:`iana`},"application/vnd.collabio.xodocuments.presentation-template":{source:`iana`},"application/vnd.collabio.xodocuments.spreadsheet":{source:`iana`},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:`iana`},"application/vnd.collection+json":{source:`iana`,compressible:!0},"application/vnd.collection.doc+json":{source:`iana`,compressible:!0},"application/vnd.collection.next+json":{source:`iana`,compressible:!0},"application/vnd.comicbook+zip":{source:`iana`,compressible:!1},"application/vnd.comicbook-rar":{source:`iana`},"application/vnd.commerce-battelle":{source:`iana`},"application/vnd.commonspace":{source:`iana`,extensions:[`csp`]},"application/vnd.contact.cmsg":{source:`iana`,extensions:[`cdbcmsg`]},"application/vnd.coreos.ignition+json":{source:`iana`,compressible:!0},"application/vnd.cosmocaller":{source:`iana`,extensions:[`cmc`]},"application/vnd.crick.clicker":{source:`iana`,extensions:[`clkx`]},"application/vnd.crick.clicker.keyboard":{source:`iana`,extensions:[`clkk`]},"application/vnd.crick.clicker.palette":{source:`iana`,extensions:[`clkp`]},"application/vnd.crick.clicker.template":{source:`iana`,extensions:[`clkt`]},"application/vnd.crick.clicker.wordbank":{source:`iana`,extensions:[`clkw`]},"application/vnd.criticaltools.wbs+xml":{source:`iana`,compressible:!0,extensions:[`wbs`]},"application/vnd.cryptii.pipe+json":{source:`iana`,compressible:!0},"application/vnd.crypto-shade-file":{source:`iana`},"application/vnd.cryptomator.encrypted":{source:`iana`},"application/vnd.cryptomator.vault":{source:`iana`},"application/vnd.ctc-posml":{source:`iana`,extensions:[`pml`]},"application/vnd.ctct.ws+xml":{source:`iana`,compressible:!0},"application/vnd.cups-pdf":{source:`iana`},"application/vnd.cups-postscript":{source:`iana`},"application/vnd.cups-ppd":{source:`iana`,extensions:[`ppd`]},"application/vnd.cups-raster":{source:`iana`},"application/vnd.cups-raw":{source:`iana`},"application/vnd.curl":{source:`iana`},"application/vnd.curl.car":{source:`apache`,extensions:[`car`]},"application/vnd.curl.pcurl":{source:`apache`,extensions:[`pcurl`]},"application/vnd.cyan.dean.root+xml":{source:`iana`,compressible:!0},"application/vnd.cybank":{source:`iana`},"application/vnd.cyclonedx+json":{source:`iana`,compressible:!0},"application/vnd.cyclonedx+xml":{source:`iana`,compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:`iana`,compressible:!1},"application/vnd.d3m-dataset":{source:`iana`},"application/vnd.d3m-problem":{source:`iana`},"application/vnd.dart":{source:`iana`,compressible:!0,extensions:[`dart`]},"application/vnd.data-vision.rdz":{source:`iana`,extensions:[`rdz`]},"application/vnd.datapackage+json":{source:`iana`,compressible:!0},"application/vnd.dataresource+json":{source:`iana`,compressible:!0},"application/vnd.dbf":{source:`iana`,extensions:[`dbf`]},"application/vnd.debian.binary-package":{source:`iana`},"application/vnd.dece.data":{source:`iana`,extensions:[`uvf`,`uvvf`,`uvd`,`uvvd`]},"application/vnd.dece.ttml+xml":{source:`iana`,compressible:!0,extensions:[`uvt`,`uvvt`]},"application/vnd.dece.unspecified":{source:`iana`,extensions:[`uvx`,`uvvx`]},"application/vnd.dece.zip":{source:`iana`,extensions:[`uvz`,`uvvz`]},"application/vnd.denovo.fcselayout-link":{source:`iana`,extensions:[`fe_launch`]},"application/vnd.desmume.movie":{source:`iana`},"application/vnd.dir-bi.plate-dl-nosuffix":{source:`iana`},"application/vnd.dm.delegation+xml":{source:`iana`,compressible:!0},"application/vnd.dna":{source:`iana`,extensions:[`dna`]},"application/vnd.document+json":{source:`iana`,compressible:!0},"application/vnd.dolby.mlp":{source:`apache`,extensions:[`mlp`]},"application/vnd.dolby.mobile.1":{source:`iana`},"application/vnd.dolby.mobile.2":{source:`iana`},"application/vnd.doremir.scorecloud-binary-document":{source:`iana`},"application/vnd.dpgraph":{source:`iana`,extensions:[`dpg`]},"application/vnd.dreamfactory":{source:`iana`,extensions:[`dfac`]},"application/vnd.drive+json":{source:`iana`,compressible:!0},"application/vnd.ds-keypoint":{source:`apache`,extensions:[`kpxx`]},"application/vnd.dtg.local":{source:`iana`},"application/vnd.dtg.local.flash":{source:`iana`},"application/vnd.dtg.local.html":{source:`iana`},"application/vnd.dvb.ait":{source:`iana`,extensions:[`ait`]},"application/vnd.dvb.dvbisl+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.dvbj":{source:`iana`},"application/vnd.dvb.esgcontainer":{source:`iana`},"application/vnd.dvb.ipdcdftnotifaccess":{source:`iana`},"application/vnd.dvb.ipdcesgaccess":{source:`iana`},"application/vnd.dvb.ipdcesgaccess2":{source:`iana`},"application/vnd.dvb.ipdcesgpdd":{source:`iana`},"application/vnd.dvb.ipdcroaming":{source:`iana`},"application/vnd.dvb.iptv.alfec-base":{source:`iana`},"application/vnd.dvb.iptv.alfec-enhancement":{source:`iana`},"application/vnd.dvb.notif-aggregate-root+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-container+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-init+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.pfr":{source:`iana`},"application/vnd.dvb.service":{source:`iana`,extensions:[`svc`]},"application/vnd.dxr":{source:`iana`},"application/vnd.dynageo":{source:`iana`,extensions:[`geo`]},"application/vnd.dzr":{source:`iana`},"application/vnd.easykaraoke.cdgdownload":{source:`iana`},"application/vnd.ecdis-update":{source:`iana`},"application/vnd.ecip.rlp":{source:`iana`},"application/vnd.eclipse.ditto+json":{source:`iana`,compressible:!0},"application/vnd.ecowin.chart":{source:`iana`,extensions:[`mag`]},"application/vnd.ecowin.filerequest":{source:`iana`},"application/vnd.ecowin.fileupdate":{source:`iana`},"application/vnd.ecowin.series":{source:`iana`},"application/vnd.ecowin.seriesrequest":{source:`iana`},"application/vnd.ecowin.seriesupdate":{source:`iana`},"application/vnd.efi.img":{source:`iana`},"application/vnd.efi.iso":{source:`iana`},"application/vnd.emclient.accessrequest+xml":{source:`iana`,compressible:!0},"application/vnd.enliven":{source:`iana`,extensions:[`nml`]},"application/vnd.enphase.envoy":{source:`iana`},"application/vnd.eprints.data+xml":{source:`iana`,compressible:!0},"application/vnd.epson.esf":{source:`iana`,extensions:[`esf`]},"application/vnd.epson.msf":{source:`iana`,extensions:[`msf`]},"application/vnd.epson.quickanime":{source:`iana`,extensions:[`qam`]},"application/vnd.epson.salt":{source:`iana`,extensions:[`slt`]},"application/vnd.epson.ssf":{source:`iana`,extensions:[`ssf`]},"application/vnd.ericsson.quickcall":{source:`iana`},"application/vnd.espass-espass+zip":{source:`iana`,compressible:!1},"application/vnd.eszigno3+xml":{source:`iana`,compressible:!0,extensions:[`es3`,`et3`]},"application/vnd.etsi.aoc+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.asic-e+zip":{source:`iana`,compressible:!1},"application/vnd.etsi.asic-s+zip":{source:`iana`,compressible:!1},"application/vnd.etsi.cug+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.mcid+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.mheg5":{source:`iana`},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.pstn+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.sci+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.simservs+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.timestamp-token":{source:`iana`},"application/vnd.etsi.tsl+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.tsl.der":{source:`iana`},"application/vnd.eu.kasparian.car+json":{source:`iana`,compressible:!0},"application/vnd.eudora.data":{source:`iana`},"application/vnd.evolv.ecig.profile":{source:`iana`},"application/vnd.evolv.ecig.settings":{source:`iana`},"application/vnd.evolv.ecig.theme":{source:`iana`},"application/vnd.exstream-empower+zip":{source:`iana`,compressible:!1},"application/vnd.exstream-package":{source:`iana`},"application/vnd.ezpix-album":{source:`iana`,extensions:[`ez2`]},"application/vnd.ezpix-package":{source:`iana`,extensions:[`ez3`]},"application/vnd.f-secure.mobile":{source:`iana`},"application/vnd.familysearch.gedcom+zip":{source:`iana`,compressible:!1},"application/vnd.fastcopy-disk-image":{source:`iana`},"application/vnd.fdf":{source:`iana`,extensions:[`fdf`]},"application/vnd.fdsn.mseed":{source:`iana`,extensions:[`mseed`]},"application/vnd.fdsn.seed":{source:`iana`,extensions:[`seed`,`dataless`]},"application/vnd.ffsns":{source:`iana`},"application/vnd.ficlab.flb+zip":{source:`iana`,compressible:!1},"application/vnd.filmit.zfc":{source:`iana`},"application/vnd.fints":{source:`iana`},"application/vnd.firemonkeys.cloudcell":{source:`iana`},"application/vnd.flographit":{source:`iana`,extensions:[`gph`]},"application/vnd.fluxtime.clip":{source:`iana`,extensions:[`ftc`]},"application/vnd.font-fontforge-sfd":{source:`iana`},"application/vnd.framemaker":{source:`iana`,extensions:[`fm`,`frame`,`maker`,`book`]},"application/vnd.frogans.fnc":{source:`iana`,extensions:[`fnc`]},"application/vnd.frogans.ltf":{source:`iana`,extensions:[`ltf`]},"application/vnd.fsc.weblaunch":{source:`iana`,extensions:[`fsc`]},"application/vnd.fujifilm.fb.docuworks":{source:`iana`},"application/vnd.fujifilm.fb.docuworks.binder":{source:`iana`},"application/vnd.fujifilm.fb.docuworks.container":{source:`iana`},"application/vnd.fujifilm.fb.jfi+xml":{source:`iana`,compressible:!0},"application/vnd.fujitsu.oasys":{source:`iana`,extensions:[`oas`]},"application/vnd.fujitsu.oasys2":{source:`iana`,extensions:[`oa2`]},"application/vnd.fujitsu.oasys3":{source:`iana`,extensions:[`oa3`]},"application/vnd.fujitsu.oasysgp":{source:`iana`,extensions:[`fg5`]},"application/vnd.fujitsu.oasysprs":{source:`iana`,extensions:[`bh2`]},"application/vnd.fujixerox.art-ex":{source:`iana`},"application/vnd.fujixerox.art4":{source:`iana`},"application/vnd.fujixerox.ddd":{source:`iana`,extensions:[`ddd`]},"application/vnd.fujixerox.docuworks":{source:`iana`,extensions:[`xdw`]},"application/vnd.fujixerox.docuworks.binder":{source:`iana`,extensions:[`xbd`]},"application/vnd.fujixerox.docuworks.container":{source:`iana`},"application/vnd.fujixerox.hbpl":{source:`iana`},"application/vnd.fut-misnet":{source:`iana`},"application/vnd.futoin+cbor":{source:`iana`},"application/vnd.futoin+json":{source:`iana`,compressible:!0},"application/vnd.fuzzysheet":{source:`iana`,extensions:[`fzs`]},"application/vnd.genomatix.tuxedo":{source:`iana`,extensions:[`txd`]},"application/vnd.gentics.grd+json":{source:`iana`,compressible:!0},"application/vnd.geo+json":{source:`iana`,compressible:!0},"application/vnd.geocube+xml":{source:`iana`,compressible:!0},"application/vnd.geogebra.file":{source:`iana`,extensions:[`ggb`]},"application/vnd.geogebra.slides":{source:`iana`},"application/vnd.geogebra.tool":{source:`iana`,extensions:[`ggt`]},"application/vnd.geometry-explorer":{source:`iana`,extensions:[`gex`,`gre`]},"application/vnd.geonext":{source:`iana`,extensions:[`gxt`]},"application/vnd.geoplan":{source:`iana`,extensions:[`g2w`]},"application/vnd.geospace":{source:`iana`,extensions:[`g3w`]},"application/vnd.gerber":{source:`iana`},"application/vnd.globalplatform.card-content-mgt":{source:`iana`},"application/vnd.globalplatform.card-content-mgt-response":{source:`iana`},"application/vnd.gmx":{source:`iana`,extensions:[`gmx`]},"application/vnd.google-apps.document":{compressible:!1,extensions:[`gdoc`]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:[`gslides`]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:[`gsheet`]},"application/vnd.google-earth.kml+xml":{source:`iana`,compressible:!0,extensions:[`kml`]},"application/vnd.google-earth.kmz":{source:`iana`,compressible:!1,extensions:[`kmz`]},"application/vnd.gov.sk.e-form+xml":{source:`iana`,compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:`iana`,compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:`iana`,compressible:!0},"application/vnd.grafeq":{source:`iana`,extensions:[`gqf`,`gqs`]},"application/vnd.gridmp":{source:`iana`},"application/vnd.groove-account":{source:`iana`,extensions:[`gac`]},"application/vnd.groove-help":{source:`iana`,extensions:[`ghf`]},"application/vnd.groove-identity-message":{source:`iana`,extensions:[`gim`]},"application/vnd.groove-injector":{source:`iana`,extensions:[`grv`]},"application/vnd.groove-tool-message":{source:`iana`,extensions:[`gtm`]},"application/vnd.groove-tool-template":{source:`iana`,extensions:[`tpl`]},"application/vnd.groove-vcard":{source:`iana`,extensions:[`vcg`]},"application/vnd.hal+json":{source:`iana`,compressible:!0},"application/vnd.hal+xml":{source:`iana`,compressible:!0,extensions:[`hal`]},"application/vnd.handheld-entertainment+xml":{source:`iana`,compressible:!0,extensions:[`zmm`]},"application/vnd.hbci":{source:`iana`,extensions:[`hbci`]},"application/vnd.hc+json":{source:`iana`,compressible:!0},"application/vnd.hcl-bireports":{source:`iana`},"application/vnd.hdt":{source:`iana`},"application/vnd.heroku+json":{source:`iana`,compressible:!0},"application/vnd.hhe.lesson-player":{source:`iana`,extensions:[`les`]},"application/vnd.hl7cda+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.hl7v2+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.hp-hpgl":{source:`iana`,extensions:[`hpgl`]},"application/vnd.hp-hpid":{source:`iana`,extensions:[`hpid`]},"application/vnd.hp-hps":{source:`iana`,extensions:[`hps`]},"application/vnd.hp-jlyt":{source:`iana`,extensions:[`jlt`]},"application/vnd.hp-pcl":{source:`iana`,extensions:[`pcl`]},"application/vnd.hp-pclxl":{source:`iana`,extensions:[`pclxl`]},"application/vnd.httphone":{source:`iana`},"application/vnd.hydrostatix.sof-data":{source:`iana`,extensions:[`sfd-hdstx`]},"application/vnd.hyper+json":{source:`iana`,compressible:!0},"application/vnd.hyper-item+json":{source:`iana`,compressible:!0},"application/vnd.hyperdrive+json":{source:`iana`,compressible:!0},"application/vnd.hzn-3d-crossword":{source:`iana`},"application/vnd.ibm.afplinedata":{source:`iana`},"application/vnd.ibm.electronic-media":{source:`iana`},"application/vnd.ibm.minipay":{source:`iana`,extensions:[`mpy`]},"application/vnd.ibm.modcap":{source:`iana`,extensions:[`afp`,`listafp`,`list3820`]},"application/vnd.ibm.rights-management":{source:`iana`,extensions:[`irm`]},"application/vnd.ibm.secure-container":{source:`iana`,extensions:[`sc`]},"application/vnd.iccprofile":{source:`iana`,extensions:[`icc`,`icm`]},"application/vnd.ieee.1905":{source:`iana`},"application/vnd.igloader":{source:`iana`,extensions:[`igl`]},"application/vnd.imagemeter.folder+zip":{source:`iana`,compressible:!1},"application/vnd.imagemeter.image+zip":{source:`iana`,compressible:!1},"application/vnd.immervision-ivp":{source:`iana`,extensions:[`ivp`]},"application/vnd.immervision-ivu":{source:`iana`,extensions:[`ivu`]},"application/vnd.ims.imsccv1p1":{source:`iana`},"application/vnd.ims.imsccv1p2":{source:`iana`},"application/vnd.ims.imsccv1p3":{source:`iana`},"application/vnd.ims.lis.v2.result+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:`iana`,compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:`iana`,compressible:!0},"application/vnd.informix-visionary":{source:`iana`},"application/vnd.infotech.project":{source:`iana`},"application/vnd.infotech.project+xml":{source:`iana`,compressible:!0},"application/vnd.innopath.wamp.notification":{source:`iana`},"application/vnd.insors.igm":{source:`iana`,extensions:[`igm`]},"application/vnd.intercon.formnet":{source:`iana`,extensions:[`xpw`,`xpx`]},"application/vnd.intergeo":{source:`iana`,extensions:[`i2g`]},"application/vnd.intertrust.digibox":{source:`iana`},"application/vnd.intertrust.nncp":{source:`iana`},"application/vnd.intu.qbo":{source:`iana`,extensions:[`qbo`]},"application/vnd.intu.qfx":{source:`iana`,extensions:[`qfx`]},"application/vnd.iptc.g2.catalogitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:`iana`,compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:`iana`,extensions:[`rcprofile`]},"application/vnd.irepository.package+xml":{source:`iana`,compressible:!0,extensions:[`irp`]},"application/vnd.is-xpr":{source:`iana`,extensions:[`xpr`]},"application/vnd.isac.fcs":{source:`iana`,extensions:[`fcs`]},"application/vnd.iso11783-10+zip":{source:`iana`,compressible:!1},"application/vnd.jam":{source:`iana`,extensions:[`jam`]},"application/vnd.japannet-directory-service":{source:`iana`},"application/vnd.japannet-jpnstore-wakeup":{source:`iana`},"application/vnd.japannet-payment-wakeup":{source:`iana`},"application/vnd.japannet-registration":{source:`iana`},"application/vnd.japannet-registration-wakeup":{source:`iana`},"application/vnd.japannet-setstore-wakeup":{source:`iana`},"application/vnd.japannet-verification":{source:`iana`},"application/vnd.japannet-verification-wakeup":{source:`iana`},"application/vnd.jcp.javame.midlet-rms":{source:`iana`,extensions:[`rms`]},"application/vnd.jisp":{source:`iana`,extensions:[`jisp`]},"application/vnd.joost.joda-archive":{source:`iana`,extensions:[`joda`]},"application/vnd.jsk.isdn-ngn":{source:`iana`},"application/vnd.kahootz":{source:`iana`,extensions:[`ktz`,`ktr`]},"application/vnd.kde.karbon":{source:`iana`,extensions:[`karbon`]},"application/vnd.kde.kchart":{source:`iana`,extensions:[`chrt`]},"application/vnd.kde.kformula":{source:`iana`,extensions:[`kfo`]},"application/vnd.kde.kivio":{source:`iana`,extensions:[`flw`]},"application/vnd.kde.kontour":{source:`iana`,extensions:[`kon`]},"application/vnd.kde.kpresenter":{source:`iana`,extensions:[`kpr`,`kpt`]},"application/vnd.kde.kspread":{source:`iana`,extensions:[`ksp`]},"application/vnd.kde.kword":{source:`iana`,extensions:[`kwd`,`kwt`]},"application/vnd.kenameaapp":{source:`iana`,extensions:[`htke`]},"application/vnd.kidspiration":{source:`iana`,extensions:[`kia`]},"application/vnd.kinar":{source:`iana`,extensions:[`kne`,`knp`]},"application/vnd.koan":{source:`iana`,extensions:[`skp`,`skd`,`skt`,`skm`]},"application/vnd.kodak-descriptor":{source:`iana`,extensions:[`sse`]},"application/vnd.las":{source:`iana`},"application/vnd.las.las+json":{source:`iana`,compressible:!0},"application/vnd.las.las+xml":{source:`iana`,compressible:!0,extensions:[`lasxml`]},"application/vnd.laszip":{source:`iana`},"application/vnd.leap+json":{source:`iana`,compressible:!0},"application/vnd.liberty-request+xml":{source:`iana`,compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:`iana`,extensions:[`lbd`]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:`iana`,compressible:!0,extensions:[`lbe`]},"application/vnd.logipipe.circuit+zip":{source:`iana`,compressible:!1},"application/vnd.loom":{source:`iana`},"application/vnd.lotus-1-2-3":{source:`iana`,extensions:[`123`]},"application/vnd.lotus-approach":{source:`iana`,extensions:[`apr`]},"application/vnd.lotus-freelance":{source:`iana`,extensions:[`pre`]},"application/vnd.lotus-notes":{source:`iana`,extensions:[`nsf`]},"application/vnd.lotus-organizer":{source:`iana`,extensions:[`org`]},"application/vnd.lotus-screencam":{source:`iana`,extensions:[`scm`]},"application/vnd.lotus-wordpro":{source:`iana`,extensions:[`lwp`]},"application/vnd.macports.portpkg":{source:`iana`,extensions:[`portpkg`]},"application/vnd.mapbox-vector-tile":{source:`iana`,extensions:[`mvt`]},"application/vnd.marlin.drm.actiontoken+xml":{source:`iana`,compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:`iana`,compressible:!0},"application/vnd.marlin.drm.license+xml":{source:`iana`,compressible:!0},"application/vnd.marlin.drm.mdcf":{source:`iana`},"application/vnd.mason+json":{source:`iana`,compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:`iana`,compressible:!1},"application/vnd.maxmind.maxmind-db":{source:`iana`},"application/vnd.mcd":{source:`iana`,extensions:[`mcd`]},"application/vnd.medcalcdata":{source:`iana`,extensions:[`mc1`]},"application/vnd.mediastation.cdkey":{source:`iana`,extensions:[`cdkey`]},"application/vnd.meridian-slingshot":{source:`iana`},"application/vnd.mfer":{source:`iana`,extensions:[`mwf`]},"application/vnd.mfmp":{source:`iana`,extensions:[`mfm`]},"application/vnd.micro+json":{source:`iana`,compressible:!0},"application/vnd.micrografx.flo":{source:`iana`,extensions:[`flo`]},"application/vnd.micrografx.igx":{source:`iana`,extensions:[`igx`]},"application/vnd.microsoft.portable-executable":{source:`iana`},"application/vnd.microsoft.windows.thumbnail-cache":{source:`iana`},"application/vnd.miele+json":{source:`iana`,compressible:!0},"application/vnd.mif":{source:`iana`,extensions:[`mif`]},"application/vnd.minisoft-hp3000-save":{source:`iana`},"application/vnd.mitsubishi.misty-guard.trustweb":{source:`iana`},"application/vnd.mobius.daf":{source:`iana`,extensions:[`daf`]},"application/vnd.mobius.dis":{source:`iana`,extensions:[`dis`]},"application/vnd.mobius.mbk":{source:`iana`,extensions:[`mbk`]},"application/vnd.mobius.mqy":{source:`iana`,extensions:[`mqy`]},"application/vnd.mobius.msl":{source:`iana`,extensions:[`msl`]},"application/vnd.mobius.plc":{source:`iana`,extensions:[`plc`]},"application/vnd.mobius.txf":{source:`iana`,extensions:[`txf`]},"application/vnd.mophun.application":{source:`iana`,extensions:[`mpn`]},"application/vnd.mophun.certificate":{source:`iana`,extensions:[`mpc`]},"application/vnd.motorola.flexsuite":{source:`iana`},"application/vnd.motorola.flexsuite.adsi":{source:`iana`},"application/vnd.motorola.flexsuite.fis":{source:`iana`},"application/vnd.motorola.flexsuite.gotap":{source:`iana`},"application/vnd.motorola.flexsuite.kmr":{source:`iana`},"application/vnd.motorola.flexsuite.ttc":{source:`iana`},"application/vnd.motorola.flexsuite.wem":{source:`iana`},"application/vnd.motorola.iprm":{source:`iana`},"application/vnd.mozilla.xul+xml":{source:`iana`,compressible:!0,extensions:[`xul`]},"application/vnd.ms-3mfdocument":{source:`iana`},"application/vnd.ms-artgalry":{source:`iana`,extensions:[`cil`]},"application/vnd.ms-asf":{source:`iana`},"application/vnd.ms-cab-compressed":{source:`iana`,extensions:[`cab`]},"application/vnd.ms-color.iccprofile":{source:`apache`},"application/vnd.ms-excel":{source:`iana`,compressible:!1,extensions:[`xls`,`xlm`,`xla`,`xlc`,`xlt`,`xlw`]},"application/vnd.ms-excel.addin.macroenabled.12":{source:`iana`,extensions:[`xlam`]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:`iana`,extensions:[`xlsb`]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:`iana`,extensions:[`xlsm`]},"application/vnd.ms-excel.template.macroenabled.12":{source:`iana`,extensions:[`xltm`]},"application/vnd.ms-fontobject":{source:`iana`,compressible:!0,extensions:[`eot`]},"application/vnd.ms-htmlhelp":{source:`iana`,extensions:[`chm`]},"application/vnd.ms-ims":{source:`iana`,extensions:[`ims`]},"application/vnd.ms-lrm":{source:`iana`,extensions:[`lrm`]},"application/vnd.ms-office.activex+xml":{source:`iana`,compressible:!0},"application/vnd.ms-officetheme":{source:`iana`,extensions:[`thmx`]},"application/vnd.ms-opentype":{source:`apache`,compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:[`msg`]},"application/vnd.ms-package.obfuscated-opentype":{source:`apache`},"application/vnd.ms-pki.seccat":{source:`apache`,extensions:[`cat`]},"application/vnd.ms-pki.stl":{source:`apache`,extensions:[`stl`]},"application/vnd.ms-playready.initiator+xml":{source:`iana`,compressible:!0},"application/vnd.ms-powerpoint":{source:`iana`,compressible:!1,extensions:[`ppt`,`pps`,`pot`]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:`iana`,extensions:[`ppam`]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:`iana`,extensions:[`pptm`]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:`iana`,extensions:[`sldm`]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:`iana`,extensions:[`ppsm`]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:`iana`,extensions:[`potm`]},"application/vnd.ms-printdevicecapabilities+xml":{source:`iana`,compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:`apache`,compressible:!0},"application/vnd.ms-printschematicket+xml":{source:`iana`,compressible:!0},"application/vnd.ms-project":{source:`iana`,extensions:[`mpp`,`mpt`]},"application/vnd.ms-tnef":{source:`iana`},"application/vnd.ms-windows.devicepairing":{source:`iana`},"application/vnd.ms-windows.nwprinting.oob":{source:`iana`},"application/vnd.ms-windows.printerpairing":{source:`iana`},"application/vnd.ms-windows.wsd.oob":{source:`iana`},"application/vnd.ms-wmdrm.lic-chlg-req":{source:`iana`},"application/vnd.ms-wmdrm.lic-resp":{source:`iana`},"application/vnd.ms-wmdrm.meter-chlg-req":{source:`iana`},"application/vnd.ms-wmdrm.meter-resp":{source:`iana`},"application/vnd.ms-word.document.macroenabled.12":{source:`iana`,extensions:[`docm`]},"application/vnd.ms-word.template.macroenabled.12":{source:`iana`,extensions:[`dotm`]},"application/vnd.ms-works":{source:`iana`,extensions:[`wps`,`wks`,`wcm`,`wdb`]},"application/vnd.ms-wpl":{source:`iana`,extensions:[`wpl`]},"application/vnd.ms-xpsdocument":{source:`iana`,compressible:!1,extensions:[`xps`]},"application/vnd.msa-disk-image":{source:`iana`},"application/vnd.mseq":{source:`iana`,extensions:[`mseq`]},"application/vnd.msign":{source:`iana`},"application/vnd.multiad.creator":{source:`iana`},"application/vnd.multiad.creator.cif":{source:`iana`},"application/vnd.music-niff":{source:`iana`},"application/vnd.musician":{source:`iana`,extensions:[`mus`]},"application/vnd.muvee.style":{source:`iana`,extensions:[`msty`]},"application/vnd.mynfc":{source:`iana`,extensions:[`taglet`]},"application/vnd.nacamar.ybrid+json":{source:`iana`,compressible:!0},"application/vnd.ncd.control":{source:`iana`},"application/vnd.ncd.reference":{source:`iana`},"application/vnd.nearst.inv+json":{source:`iana`,compressible:!0},"application/vnd.nebumind.line":{source:`iana`},"application/vnd.nervana":{source:`iana`},"application/vnd.netfpx":{source:`iana`},"application/vnd.neurolanguage.nlu":{source:`iana`,extensions:[`nlu`]},"application/vnd.nimn":{source:`iana`},"application/vnd.nintendo.nitro.rom":{source:`iana`},"application/vnd.nintendo.snes.rom":{source:`iana`},"application/vnd.nitf":{source:`iana`,extensions:[`ntf`,`nitf`]},"application/vnd.noblenet-directory":{source:`iana`,extensions:[`nnd`]},"application/vnd.noblenet-sealer":{source:`iana`,extensions:[`nns`]},"application/vnd.noblenet-web":{source:`iana`,extensions:[`nnw`]},"application/vnd.nokia.catalogs":{source:`iana`},"application/vnd.nokia.conml+wbxml":{source:`iana`},"application/vnd.nokia.conml+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:`iana`},"application/vnd.nokia.landmark+wbxml":{source:`iana`},"application/vnd.nokia.landmark+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:`iana`,compressible:!0,extensions:[`ac`]},"application/vnd.nokia.n-gage.data":{source:`iana`,extensions:[`ngdat`]},"application/vnd.nokia.n-gage.symbian.install":{source:`iana`,extensions:[`n-gage`]},"application/vnd.nokia.ncd":{source:`iana`},"application/vnd.nokia.pcd+wbxml":{source:`iana`},"application/vnd.nokia.pcd+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.radio-preset":{source:`iana`,extensions:[`rpst`]},"application/vnd.nokia.radio-presets":{source:`iana`,extensions:[`rpss`]},"application/vnd.novadigm.edm":{source:`iana`,extensions:[`edm`]},"application/vnd.novadigm.edx":{source:`iana`,extensions:[`edx`]},"application/vnd.novadigm.ext":{source:`iana`,extensions:[`ext`]},"application/vnd.ntt-local.content-share":{source:`iana`},"application/vnd.ntt-local.file-transfer":{source:`iana`},"application/vnd.ntt-local.ogw_remote-access":{source:`iana`},"application/vnd.ntt-local.sip-ta_remote":{source:`iana`},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:`iana`},"application/vnd.oasis.opendocument.chart":{source:`iana`,extensions:[`odc`]},"application/vnd.oasis.opendocument.chart-template":{source:`iana`,extensions:[`otc`]},"application/vnd.oasis.opendocument.database":{source:`iana`,extensions:[`odb`]},"application/vnd.oasis.opendocument.formula":{source:`iana`,extensions:[`odf`]},"application/vnd.oasis.opendocument.formula-template":{source:`iana`,extensions:[`odft`]},"application/vnd.oasis.opendocument.graphics":{source:`iana`,compressible:!1,extensions:[`odg`]},"application/vnd.oasis.opendocument.graphics-template":{source:`iana`,extensions:[`otg`]},"application/vnd.oasis.opendocument.image":{source:`iana`,extensions:[`odi`]},"application/vnd.oasis.opendocument.image-template":{source:`iana`,extensions:[`oti`]},"application/vnd.oasis.opendocument.presentation":{source:`iana`,compressible:!1,extensions:[`odp`]},"application/vnd.oasis.opendocument.presentation-template":{source:`iana`,extensions:[`otp`]},"application/vnd.oasis.opendocument.spreadsheet":{source:`iana`,compressible:!1,extensions:[`ods`]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:`iana`,extensions:[`ots`]},"application/vnd.oasis.opendocument.text":{source:`iana`,compressible:!1,extensions:[`odt`]},"application/vnd.oasis.opendocument.text-master":{source:`iana`,extensions:[`odm`]},"application/vnd.oasis.opendocument.text-template":{source:`iana`,extensions:[`ott`]},"application/vnd.oasis.opendocument.text-web":{source:`iana`,extensions:[`oth`]},"application/vnd.obn":{source:`iana`},"application/vnd.ocf+cbor":{source:`iana`},"application/vnd.oci.image.manifest.v1+json":{source:`iana`,compressible:!0},"application/vnd.oftn.l10n+json":{source:`iana`,compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:`iana`},"application/vnd.oipf.dae.svg+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.pae.gem":{source:`iana`},"application/vnd.oipf.spdiscovery+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.spdlist+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.userprofile+xml":{source:`iana`,compressible:!0},"application/vnd.olpc-sugar":{source:`iana`,extensions:[`xo`]},"application/vnd.oma-scws-config":{source:`iana`},"application/vnd.oma-scws-http-request":{source:`iana`},"application/vnd.oma-scws-http-response":{source:`iana`},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.ltkm":{source:`iana`},"application/vnd.oma.bcast.notification+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:`iana`},"application/vnd.oma.bcast.sgboot":{source:`iana`},"application/vnd.oma.bcast.sgdd+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.sgdu":{source:`iana`},"application/vnd.oma.bcast.simple-symbol-container":{source:`iana`},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.stkm":{source:`iana`},"application/vnd.oma.cab-address-book+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:`iana`,compressible:!0},"application/vnd.oma.dcd":{source:`iana`},"application/vnd.oma.dcdc":{source:`iana`},"application/vnd.oma.dd2+xml":{source:`iana`,compressible:!0,extensions:[`dd2`]},"application/vnd.oma.drm.risd+xml":{source:`iana`,compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:`iana`,compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:`iana`},"application/vnd.oma.lwm2m+json":{source:`iana`,compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:`iana`},"application/vnd.oma.pal+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.groups+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:`iana`,compressible:!0},"application/vnd.oma.push":{source:`iana`},"application/vnd.oma.scidm.messages+xml":{source:`iana`,compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:`iana`,compressible:!0},"application/vnd.omads-email+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.omads-file+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.omads-folder+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.omaloc-supl-init":{source:`iana`},"application/vnd.onepager":{source:`iana`},"application/vnd.onepagertamp":{source:`iana`},"application/vnd.onepagertamx":{source:`iana`},"application/vnd.onepagertat":{source:`iana`},"application/vnd.onepagertatp":{source:`iana`},"application/vnd.onepagertatx":{source:`iana`},"application/vnd.openblox.game+xml":{source:`iana`,compressible:!0,extensions:[`obgx`]},"application/vnd.openblox.game-binary":{source:`iana`},"application/vnd.openeye.oeb":{source:`iana`},"application/vnd.openofficeorg.extension":{source:`apache`,extensions:[`oxt`]},"application/vnd.openstreetmap.data+xml":{source:`iana`,compressible:!0,extensions:[`osm`]},"application/vnd.opentimestamps.ots":{source:`iana`},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:`iana`,compressible:!1,extensions:[`pptx`]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:`iana`,extensions:[`sldx`]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:`iana`,extensions:[`ppsx`]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:`iana`,extensions:[`potx`]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:`iana`,compressible:!1,extensions:[`xlsx`]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:`iana`,extensions:[`xltx`]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:`iana`},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:`iana`,compressible:!1,extensions:[`docx`]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:`iana`,extensions:[`dotx`]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:`iana`,compressible:!0},"application/vnd.oracle.resource+json":{source:`iana`,compressible:!0},"application/vnd.orange.indata":{source:`iana`},"application/vnd.osa.netdeploy":{source:`iana`},"application/vnd.osgeo.mapguide.package":{source:`iana`,extensions:[`mgp`]},"application/vnd.osgi.bundle":{source:`iana`},"application/vnd.osgi.dp":{source:`iana`,extensions:[`dp`]},"application/vnd.osgi.subsystem":{source:`iana`,extensions:[`esa`]},"application/vnd.otps.ct-kip+xml":{source:`iana`,compressible:!0},"application/vnd.oxli.countgraph":{source:`iana`},"application/vnd.pagerduty+json":{source:`iana`,compressible:!0},"application/vnd.palm":{source:`iana`,extensions:[`pdb`,`pqa`,`oprc`]},"application/vnd.panoply":{source:`iana`},"application/vnd.paos.xml":{source:`iana`},"application/vnd.patentdive":{source:`iana`},"application/vnd.patientecommsdoc":{source:`iana`},"application/vnd.pawaafile":{source:`iana`,extensions:[`paw`]},"application/vnd.pcos":{source:`iana`},"application/vnd.pg.format":{source:`iana`,extensions:[`str`]},"application/vnd.pg.osasli":{source:`iana`,extensions:[`ei6`]},"application/vnd.piaccess.application-licence":{source:`iana`},"application/vnd.picsel":{source:`iana`,extensions:[`efif`]},"application/vnd.pmi.widget":{source:`iana`,extensions:[`wg`]},"application/vnd.poc.group-advertisement+xml":{source:`iana`,compressible:!0},"application/vnd.pocketlearn":{source:`iana`,extensions:[`plf`]},"application/vnd.powerbuilder6":{source:`iana`,extensions:[`pbd`]},"application/vnd.powerbuilder6-s":{source:`iana`},"application/vnd.powerbuilder7":{source:`iana`},"application/vnd.powerbuilder7-s":{source:`iana`},"application/vnd.powerbuilder75":{source:`iana`},"application/vnd.powerbuilder75-s":{source:`iana`},"application/vnd.preminet":{source:`iana`},"application/vnd.previewsystems.box":{source:`iana`,extensions:[`box`]},"application/vnd.proteus.magazine":{source:`iana`,extensions:[`mgz`]},"application/vnd.psfs":{source:`iana`},"application/vnd.publishare-delta-tree":{source:`iana`,extensions:[`qps`]},"application/vnd.pvi.ptid1":{source:`iana`,extensions:[`ptid`]},"application/vnd.pwg-multiplexed":{source:`iana`},"application/vnd.pwg-xhtml-print+xml":{source:`iana`,compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:`iana`},"application/vnd.quarantainenet":{source:`iana`},"application/vnd.quark.quarkxpress":{source:`iana`,extensions:[`qxd`,`qxt`,`qwd`,`qwt`,`qxl`,`qxb`]},"application/vnd.quobject-quoxdocument":{source:`iana`},"application/vnd.radisys.moml+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:`iana`,compressible:!0},"application/vnd.rainstor.data":{source:`iana`},"application/vnd.rapid":{source:`iana`},"application/vnd.rar":{source:`iana`,extensions:[`rar`]},"application/vnd.realvnc.bed":{source:`iana`,extensions:[`bed`]},"application/vnd.recordare.musicxml":{source:`iana`,extensions:[`mxl`]},"application/vnd.recordare.musicxml+xml":{source:`iana`,compressible:!0,extensions:[`musicxml`]},"application/vnd.renlearn.rlprint":{source:`iana`},"application/vnd.resilient.logic":{source:`iana`},"application/vnd.restful+json":{source:`iana`,compressible:!0},"application/vnd.rig.cryptonote":{source:`iana`,extensions:[`cryptonote`]},"application/vnd.rim.cod":{source:`apache`,extensions:[`cod`]},"application/vnd.rn-realmedia":{source:`apache`,extensions:[`rm`]},"application/vnd.rn-realmedia-vbr":{source:`apache`,extensions:[`rmvb`]},"application/vnd.route66.link66+xml":{source:`iana`,compressible:!0,extensions:[`link66`]},"application/vnd.rs-274x":{source:`iana`},"application/vnd.ruckus.download":{source:`iana`},"application/vnd.s3sms":{source:`iana`},"application/vnd.sailingtracker.track":{source:`iana`,extensions:[`st`]},"application/vnd.sar":{source:`iana`},"application/vnd.sbm.cid":{source:`iana`},"application/vnd.sbm.mid2":{source:`iana`},"application/vnd.scribus":{source:`iana`},"application/vnd.sealed.3df":{source:`iana`},"application/vnd.sealed.csf":{source:`iana`},"application/vnd.sealed.doc":{source:`iana`},"application/vnd.sealed.eml":{source:`iana`},"application/vnd.sealed.mht":{source:`iana`},"application/vnd.sealed.net":{source:`iana`},"application/vnd.sealed.ppt":{source:`iana`},"application/vnd.sealed.tiff":{source:`iana`},"application/vnd.sealed.xls":{source:`iana`},"application/vnd.sealedmedia.softseal.html":{source:`iana`},"application/vnd.sealedmedia.softseal.pdf":{source:`iana`},"application/vnd.seemail":{source:`iana`,extensions:[`see`]},"application/vnd.seis+json":{source:`iana`,compressible:!0},"application/vnd.sema":{source:`iana`,extensions:[`sema`]},"application/vnd.semd":{source:`iana`,extensions:[`semd`]},"application/vnd.semf":{source:`iana`,extensions:[`semf`]},"application/vnd.shade-save-file":{source:`iana`},"application/vnd.shana.informed.formdata":{source:`iana`,extensions:[`ifm`]},"application/vnd.shana.informed.formtemplate":{source:`iana`,extensions:[`itp`]},"application/vnd.shana.informed.interchange":{source:`iana`,extensions:[`iif`]},"application/vnd.shana.informed.package":{source:`iana`,extensions:[`ipk`]},"application/vnd.shootproof+json":{source:`iana`,compressible:!0},"application/vnd.shopkick+json":{source:`iana`,compressible:!0},"application/vnd.shp":{source:`iana`},"application/vnd.shx":{source:`iana`},"application/vnd.sigrok.session":{source:`iana`},"application/vnd.simtech-mindmapper":{source:`iana`,extensions:[`twd`,`twds`]},"application/vnd.siren+json":{source:`iana`,compressible:!0},"application/vnd.smaf":{source:`iana`,extensions:[`mmf`]},"application/vnd.smart.notebook":{source:`iana`},"application/vnd.smart.teacher":{source:`iana`,extensions:[`teacher`]},"application/vnd.snesdev-page-table":{source:`iana`},"application/vnd.software602.filler.form+xml":{source:`iana`,compressible:!0,extensions:[`fo`]},"application/vnd.software602.filler.form-xml-zip":{source:`iana`},"application/vnd.solent.sdkm+xml":{source:`iana`,compressible:!0,extensions:[`sdkm`,`sdkd`]},"application/vnd.spotfire.dxp":{source:`iana`,extensions:[`dxp`]},"application/vnd.spotfire.sfs":{source:`iana`,extensions:[`sfs`]},"application/vnd.sqlite3":{source:`iana`},"application/vnd.sss-cod":{source:`iana`},"application/vnd.sss-dtf":{source:`iana`},"application/vnd.sss-ntf":{source:`iana`},"application/vnd.stardivision.calc":{source:`apache`,extensions:[`sdc`]},"application/vnd.stardivision.draw":{source:`apache`,extensions:[`sda`]},"application/vnd.stardivision.impress":{source:`apache`,extensions:[`sdd`]},"application/vnd.stardivision.math":{source:`apache`,extensions:[`smf`]},"application/vnd.stardivision.writer":{source:`apache`,extensions:[`sdw`,`vor`]},"application/vnd.stardivision.writer-global":{source:`apache`,extensions:[`sgl`]},"application/vnd.stepmania.package":{source:`iana`,extensions:[`smzip`]},"application/vnd.stepmania.stepchart":{source:`iana`,extensions:[`sm`]},"application/vnd.street-stream":{source:`iana`},"application/vnd.sun.wadl+xml":{source:`iana`,compressible:!0,extensions:[`wadl`]},"application/vnd.sun.xml.calc":{source:`apache`,extensions:[`sxc`]},"application/vnd.sun.xml.calc.template":{source:`apache`,extensions:[`stc`]},"application/vnd.sun.xml.draw":{source:`apache`,extensions:[`sxd`]},"application/vnd.sun.xml.draw.template":{source:`apache`,extensions:[`std`]},"application/vnd.sun.xml.impress":{source:`apache`,extensions:[`sxi`]},"application/vnd.sun.xml.impress.template":{source:`apache`,extensions:[`sti`]},"application/vnd.sun.xml.math":{source:`apache`,extensions:[`sxm`]},"application/vnd.sun.xml.writer":{source:`apache`,extensions:[`sxw`]},"application/vnd.sun.xml.writer.global":{source:`apache`,extensions:[`sxg`]},"application/vnd.sun.xml.writer.template":{source:`apache`,extensions:[`stw`]},"application/vnd.sus-calendar":{source:`iana`,extensions:[`sus`,`susp`]},"application/vnd.svd":{source:`iana`,extensions:[`svd`]},"application/vnd.swiftview-ics":{source:`iana`},"application/vnd.sycle+xml":{source:`iana`,compressible:!0},"application/vnd.syft+json":{source:`iana`,compressible:!0},"application/vnd.symbian.install":{source:`apache`,extensions:[`sis`,`sisx`]},"application/vnd.syncml+xml":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`xsm`]},"application/vnd.syncml.dm+wbxml":{source:`iana`,charset:`UTF-8`,extensions:[`bdm`]},"application/vnd.syncml.dm+xml":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`xdm`]},"application/vnd.syncml.dm.notification":{source:`iana`},"application/vnd.syncml.dmddf+wbxml":{source:`iana`},"application/vnd.syncml.dmddf+xml":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`ddf`]},"application/vnd.syncml.dmtnds+wbxml":{source:`iana`},"application/vnd.syncml.dmtnds+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.syncml.ds.notification":{source:`iana`},"application/vnd.tableschema+json":{source:`iana`,compressible:!0},"application/vnd.tao.intent-module-archive":{source:`iana`,extensions:[`tao`]},"application/vnd.tcpdump.pcap":{source:`iana`,extensions:[`pcap`,`cap`,`dmp`]},"application/vnd.think-cell.ppttc+json":{source:`iana`,compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:`iana`,compressible:!0},"application/vnd.tml":{source:`iana`},"application/vnd.tmobile-livetv":{source:`iana`,extensions:[`tmo`]},"application/vnd.tri.onesource":{source:`iana`},"application/vnd.trid.tpt":{source:`iana`,extensions:[`tpt`]},"application/vnd.triscape.mxs":{source:`iana`,extensions:[`mxs`]},"application/vnd.trueapp":{source:`iana`,extensions:[`tra`]},"application/vnd.truedoc":{source:`iana`},"application/vnd.ubisoft.webplayer":{source:`iana`},"application/vnd.ufdl":{source:`iana`,extensions:[`ufd`,`ufdl`]},"application/vnd.uiq.theme":{source:`iana`,extensions:[`utz`]},"application/vnd.umajin":{source:`iana`,extensions:[`umj`]},"application/vnd.unity":{source:`iana`,extensions:[`unityweb`]},"application/vnd.uoml+xml":{source:`iana`,compressible:!0,extensions:[`uoml`]},"application/vnd.uplanet.alert":{source:`iana`},"application/vnd.uplanet.alert-wbxml":{source:`iana`},"application/vnd.uplanet.bearer-choice":{source:`iana`},"application/vnd.uplanet.bearer-choice-wbxml":{source:`iana`},"application/vnd.uplanet.cacheop":{source:`iana`},"application/vnd.uplanet.cacheop-wbxml":{source:`iana`},"application/vnd.uplanet.channel":{source:`iana`},"application/vnd.uplanet.channel-wbxml":{source:`iana`},"application/vnd.uplanet.list":{source:`iana`},"application/vnd.uplanet.list-wbxml":{source:`iana`},"application/vnd.uplanet.listcmd":{source:`iana`},"application/vnd.uplanet.listcmd-wbxml":{source:`iana`},"application/vnd.uplanet.signal":{source:`iana`},"application/vnd.uri-map":{source:`iana`},"application/vnd.valve.source.material":{source:`iana`},"application/vnd.vcx":{source:`iana`,extensions:[`vcx`]},"application/vnd.vd-study":{source:`iana`},"application/vnd.vectorworks":{source:`iana`},"application/vnd.vel+json":{source:`iana`,compressible:!0},"application/vnd.verimatrix.vcas":{source:`iana`},"application/vnd.veritone.aion+json":{source:`iana`,compressible:!0},"application/vnd.veryant.thin":{source:`iana`},"application/vnd.ves.encrypted":{source:`iana`},"application/vnd.vidsoft.vidconference":{source:`iana`},"application/vnd.visio":{source:`iana`,extensions:[`vsd`,`vst`,`vss`,`vsw`]},"application/vnd.visionary":{source:`iana`,extensions:[`vis`]},"application/vnd.vividence.scriptfile":{source:`iana`},"application/vnd.vsf":{source:`iana`,extensions:[`vsf`]},"application/vnd.wap.sic":{source:`iana`},"application/vnd.wap.slc":{source:`iana`},"application/vnd.wap.wbxml":{source:`iana`,charset:`UTF-8`,extensions:[`wbxml`]},"application/vnd.wap.wmlc":{source:`iana`,extensions:[`wmlc`]},"application/vnd.wap.wmlscriptc":{source:`iana`,extensions:[`wmlsc`]},"application/vnd.webturbo":{source:`iana`,extensions:[`wtb`]},"application/vnd.wfa.dpp":{source:`iana`},"application/vnd.wfa.p2p":{source:`iana`},"application/vnd.wfa.wsc":{source:`iana`},"application/vnd.windows.devicepairing":{source:`iana`},"application/vnd.wmc":{source:`iana`},"application/vnd.wmf.bootstrap":{source:`iana`},"application/vnd.wolfram.mathematica":{source:`iana`},"application/vnd.wolfram.mathematica.package":{source:`iana`},"application/vnd.wolfram.player":{source:`iana`,extensions:[`nbp`]},"application/vnd.wordperfect":{source:`iana`,extensions:[`wpd`]},"application/vnd.wqd":{source:`iana`,extensions:[`wqd`]},"application/vnd.wrq-hp3000-labelled":{source:`iana`},"application/vnd.wt.stf":{source:`iana`,extensions:[`stf`]},"application/vnd.wv.csp+wbxml":{source:`iana`},"application/vnd.wv.csp+xml":{source:`iana`,compressible:!0},"application/vnd.wv.ssp+xml":{source:`iana`,compressible:!0},"application/vnd.xacml+json":{source:`iana`,compressible:!0},"application/vnd.xara":{source:`iana`,extensions:[`xar`]},"application/vnd.xfdl":{source:`iana`,extensions:[`xfdl`]},"application/vnd.xfdl.webform":{source:`iana`},"application/vnd.xmi+xml":{source:`iana`,compressible:!0},"application/vnd.xmpie.cpkg":{source:`iana`},"application/vnd.xmpie.dpkg":{source:`iana`},"application/vnd.xmpie.plan":{source:`iana`},"application/vnd.xmpie.ppkg":{source:`iana`},"application/vnd.xmpie.xlim":{source:`iana`},"application/vnd.yamaha.hv-dic":{source:`iana`,extensions:[`hvd`]},"application/vnd.yamaha.hv-script":{source:`iana`,extensions:[`hvs`]},"application/vnd.yamaha.hv-voice":{source:`iana`,extensions:[`hvp`]},"application/vnd.yamaha.openscoreformat":{source:`iana`,extensions:[`osf`]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:`iana`,compressible:!0,extensions:[`osfpvg`]},"application/vnd.yamaha.remote-setup":{source:`iana`},"application/vnd.yamaha.smaf-audio":{source:`iana`,extensions:[`saf`]},"application/vnd.yamaha.smaf-phrase":{source:`iana`,extensions:[`spf`]},"application/vnd.yamaha.through-ngn":{source:`iana`},"application/vnd.yamaha.tunnel-udpencap":{source:`iana`},"application/vnd.yaoweme":{source:`iana`},"application/vnd.yellowriver-custom-menu":{source:`iana`,extensions:[`cmp`]},"application/vnd.youtube.yt":{source:`iana`},"application/vnd.zul":{source:`iana`,extensions:[`zir`,`zirz`]},"application/vnd.zzazz.deck+xml":{source:`iana`,compressible:!0,extensions:[`zaz`]},"application/voicexml+xml":{source:`iana`,compressible:!0,extensions:[`vxml`]},"application/voucher-cms+json":{source:`iana`,compressible:!0},"application/vq-rtcpxr":{source:`iana`},"application/wasm":{source:`iana`,compressible:!0,extensions:[`wasm`]},"application/watcherinfo+xml":{source:`iana`,compressible:!0,extensions:[`wif`]},"application/webpush-options+json":{source:`iana`,compressible:!0},"application/whoispp-query":{source:`iana`},"application/whoispp-response":{source:`iana`},"application/widget":{source:`iana`,extensions:[`wgt`]},"application/winhlp":{source:`apache`,extensions:[`hlp`]},"application/wita":{source:`iana`},"application/wordperfect5.1":{source:`iana`},"application/wsdl+xml":{source:`iana`,compressible:!0,extensions:[`wsdl`]},"application/wspolicy+xml":{source:`iana`,compressible:!0,extensions:[`wspolicy`]},"application/x-7z-compressed":{source:`apache`,compressible:!1,extensions:[`7z`]},"application/x-abiword":{source:`apache`,extensions:[`abw`]},"application/x-ace-compressed":{source:`apache`,extensions:[`ace`]},"application/x-amf":{source:`apache`},"application/x-apple-diskimage":{source:`apache`,extensions:[`dmg`]},"application/x-arj":{compressible:!1,extensions:[`arj`]},"application/x-authorware-bin":{source:`apache`,extensions:[`aab`,`x32`,`u32`,`vox`]},"application/x-authorware-map":{source:`apache`,extensions:[`aam`]},"application/x-authorware-seg":{source:`apache`,extensions:[`aas`]},"application/x-bcpio":{source:`apache`,extensions:[`bcpio`]},"application/x-bdoc":{compressible:!1,extensions:[`bdoc`]},"application/x-bittorrent":{source:`apache`,extensions:[`torrent`]},"application/x-blorb":{source:`apache`,extensions:[`blb`,`blorb`]},"application/x-bzip":{source:`apache`,compressible:!1,extensions:[`bz`]},"application/x-bzip2":{source:`apache`,compressible:!1,extensions:[`bz2`,`boz`]},"application/x-cbr":{source:`apache`,extensions:[`cbr`,`cba`,`cbt`,`cbz`,`cb7`]},"application/x-cdlink":{source:`apache`,extensions:[`vcd`]},"application/x-cfs-compressed":{source:`apache`,extensions:[`cfs`]},"application/x-chat":{source:`apache`,extensions:[`chat`]},"application/x-chess-pgn":{source:`apache`,extensions:[`pgn`]},"application/x-chrome-extension":{extensions:[`crx`]},"application/x-cocoa":{source:`nginx`,extensions:[`cco`]},"application/x-compress":{source:`apache`},"application/x-conference":{source:`apache`,extensions:[`nsc`]},"application/x-cpio":{source:`apache`,extensions:[`cpio`]},"application/x-csh":{source:`apache`,extensions:[`csh`]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:`apache`,extensions:[`deb`,`udeb`]},"application/x-dgc-compressed":{source:`apache`,extensions:[`dgc`]},"application/x-director":{source:`apache`,extensions:[`dir`,`dcr`,`dxr`,`cst`,`cct`,`cxt`,`w3d`,`fgd`,`swa`]},"application/x-doom":{source:`apache`,extensions:[`wad`]},"application/x-dtbncx+xml":{source:`apache`,compressible:!0,extensions:[`ncx`]},"application/x-dtbook+xml":{source:`apache`,compressible:!0,extensions:[`dtb`]},"application/x-dtbresource+xml":{source:`apache`,compressible:!0,extensions:[`res`]},"application/x-dvi":{source:`apache`,compressible:!1,extensions:[`dvi`]},"application/x-envoy":{source:`apache`,extensions:[`evy`]},"application/x-eva":{source:`apache`,extensions:[`eva`]},"application/x-font-bdf":{source:`apache`,extensions:[`bdf`]},"application/x-font-dos":{source:`apache`},"application/x-font-framemaker":{source:`apache`},"application/x-font-ghostscript":{source:`apache`,extensions:[`gsf`]},"application/x-font-libgrx":{source:`apache`},"application/x-font-linux-psf":{source:`apache`,extensions:[`psf`]},"application/x-font-pcf":{source:`apache`,extensions:[`pcf`]},"application/x-font-snf":{source:`apache`,extensions:[`snf`]},"application/x-font-speedo":{source:`apache`},"application/x-font-sunos-news":{source:`apache`},"application/x-font-type1":{source:`apache`,extensions:[`pfa`,`pfb`,`pfm`,`afm`]},"application/x-font-vfont":{source:`apache`},"application/x-freearc":{source:`apache`,extensions:[`arc`]},"application/x-futuresplash":{source:`apache`,extensions:[`spl`]},"application/x-gca-compressed":{source:`apache`,extensions:[`gca`]},"application/x-glulx":{source:`apache`,extensions:[`ulx`]},"application/x-gnumeric":{source:`apache`,extensions:[`gnumeric`]},"application/x-gramps-xml":{source:`apache`,extensions:[`gramps`]},"application/x-gtar":{source:`apache`,extensions:[`gtar`]},"application/x-gzip":{source:`apache`},"application/x-hdf":{source:`apache`,extensions:[`hdf`]},"application/x-httpd-php":{compressible:!0,extensions:[`php`]},"application/x-install-instructions":{source:`apache`,extensions:[`install`]},"application/x-iso9660-image":{source:`apache`,extensions:[`iso`]},"application/x-iwork-keynote-sffkey":{extensions:[`key`]},"application/x-iwork-numbers-sffnumbers":{extensions:[`numbers`]},"application/x-iwork-pages-sffpages":{extensions:[`pages`]},"application/x-java-archive-diff":{source:`nginx`,extensions:[`jardiff`]},"application/x-java-jnlp-file":{source:`apache`,compressible:!1,extensions:[`jnlp`]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:[`kdbx`]},"application/x-latex":{source:`apache`,compressible:!1,extensions:[`latex`]},"application/x-lua-bytecode":{extensions:[`luac`]},"application/x-lzh-compressed":{source:`apache`,extensions:[`lzh`,`lha`]},"application/x-makeself":{source:`nginx`,extensions:[`run`]},"application/x-mie":{source:`apache`,extensions:[`mie`]},"application/x-mobipocket-ebook":{source:`apache`,extensions:[`prc`,`mobi`]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:`apache`,extensions:[`application`]},"application/x-ms-shortcut":{source:`apache`,extensions:[`lnk`]},"application/x-ms-wmd":{source:`apache`,extensions:[`wmd`]},"application/x-ms-wmz":{source:`apache`,extensions:[`wmz`]},"application/x-ms-xbap":{source:`apache`,extensions:[`xbap`]},"application/x-msaccess":{source:`apache`,extensions:[`mdb`]},"application/x-msbinder":{source:`apache`,extensions:[`obd`]},"application/x-mscardfile":{source:`apache`,extensions:[`crd`]},"application/x-msclip":{source:`apache`,extensions:[`clp`]},"application/x-msdos-program":{extensions:[`exe`]},"application/x-msdownload":{source:`apache`,extensions:[`exe`,`dll`,`com`,`bat`,`msi`]},"application/x-msmediaview":{source:`apache`,extensions:[`mvb`,`m13`,`m14`]},"application/x-msmetafile":{source:`apache`,extensions:[`wmf`,`wmz`,`emf`,`emz`]},"application/x-msmoney":{source:`apache`,extensions:[`mny`]},"application/x-mspublisher":{source:`apache`,extensions:[`pub`]},"application/x-msschedule":{source:`apache`,extensions:[`scd`]},"application/x-msterminal":{source:`apache`,extensions:[`trm`]},"application/x-mswrite":{source:`apache`,extensions:[`wri`]},"application/x-netcdf":{source:`apache`,extensions:[`nc`,`cdf`]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:[`pac`]},"application/x-nzb":{source:`apache`,extensions:[`nzb`]},"application/x-perl":{source:`nginx`,extensions:[`pl`,`pm`]},"application/x-pilot":{source:`nginx`,extensions:[`prc`,`pdb`]},"application/x-pkcs12":{source:`apache`,compressible:!1,extensions:[`p12`,`pfx`]},"application/x-pkcs7-certificates":{source:`apache`,extensions:[`p7b`,`spc`]},"application/x-pkcs7-certreqresp":{source:`apache`,extensions:[`p7r`]},"application/x-pki-message":{source:`iana`},"application/x-rar-compressed":{source:`apache`,compressible:!1,extensions:[`rar`]},"application/x-redhat-package-manager":{source:`nginx`,extensions:[`rpm`]},"application/x-research-info-systems":{source:`apache`,extensions:[`ris`]},"application/x-sea":{source:`nginx`,extensions:[`sea`]},"application/x-sh":{source:`apache`,compressible:!0,extensions:[`sh`]},"application/x-shar":{source:`apache`,extensions:[`shar`]},"application/x-shockwave-flash":{source:`apache`,compressible:!1,extensions:[`swf`]},"application/x-silverlight-app":{source:`apache`,extensions:[`xap`]},"application/x-sql":{source:`apache`,extensions:[`sql`]},"application/x-stuffit":{source:`apache`,compressible:!1,extensions:[`sit`]},"application/x-stuffitx":{source:`apache`,extensions:[`sitx`]},"application/x-subrip":{source:`apache`,extensions:[`srt`]},"application/x-sv4cpio":{source:`apache`,extensions:[`sv4cpio`]},"application/x-sv4crc":{source:`apache`,extensions:[`sv4crc`]},"application/x-t3vm-image":{source:`apache`,extensions:[`t3`]},"application/x-tads":{source:`apache`,extensions:[`gam`]},"application/x-tar":{source:`apache`,compressible:!0,extensions:[`tar`]},"application/x-tcl":{source:`apache`,extensions:[`tcl`,`tk`]},"application/x-tex":{source:`apache`,extensions:[`tex`]},"application/x-tex-tfm":{source:`apache`,extensions:[`tfm`]},"application/x-texinfo":{source:`apache`,extensions:[`texinfo`,`texi`]},"application/x-tgif":{source:`apache`,extensions:[`obj`]},"application/x-ustar":{source:`apache`,extensions:[`ustar`]},"application/x-virtualbox-hdd":{compressible:!0,extensions:[`hdd`]},"application/x-virtualbox-ova":{compressible:!0,extensions:[`ova`]},"application/x-virtualbox-ovf":{compressible:!0,extensions:[`ovf`]},"application/x-virtualbox-vbox":{compressible:!0,extensions:[`vbox`]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:[`vbox-extpack`]},"application/x-virtualbox-vdi":{compressible:!0,extensions:[`vdi`]},"application/x-virtualbox-vhd":{compressible:!0,extensions:[`vhd`]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:[`vmdk`]},"application/x-wais-source":{source:`apache`,extensions:[`src`]},"application/x-web-app-manifest+json":{compressible:!0,extensions:[`webapp`]},"application/x-www-form-urlencoded":{source:`iana`,compressible:!0},"application/x-x509-ca-cert":{source:`iana`,extensions:[`der`,`crt`,`pem`]},"application/x-x509-ca-ra-cert":{source:`iana`},"application/x-x509-next-ca-cert":{source:`iana`},"application/x-xfig":{source:`apache`,extensions:[`fig`]},"application/x-xliff+xml":{source:`apache`,compressible:!0,extensions:[`xlf`]},"application/x-xpinstall":{source:`apache`,compressible:!1,extensions:[`xpi`]},"application/x-xz":{source:`apache`,extensions:[`xz`]},"application/x-zmachine":{source:`apache`,extensions:[`z1`,`z2`,`z3`,`z4`,`z5`,`z6`,`z7`,`z8`]},"application/x400-bp":{source:`iana`},"application/xacml+xml":{source:`iana`,compressible:!0},"application/xaml+xml":{source:`apache`,compressible:!0,extensions:[`xaml`]},"application/xcap-att+xml":{source:`iana`,compressible:!0,extensions:[`xav`]},"application/xcap-caps+xml":{source:`iana`,compressible:!0,extensions:[`xca`]},"application/xcap-diff+xml":{source:`iana`,compressible:!0,extensions:[`xdf`]},"application/xcap-el+xml":{source:`iana`,compressible:!0,extensions:[`xel`]},"application/xcap-error+xml":{source:`iana`,compressible:!0},"application/xcap-ns+xml":{source:`iana`,compressible:!0,extensions:[`xns`]},"application/xcon-conference-info+xml":{source:`iana`,compressible:!0},"application/xcon-conference-info-diff+xml":{source:`iana`,compressible:!0},"application/xenc+xml":{source:`iana`,compressible:!0,extensions:[`xenc`]},"application/xhtml+xml":{source:`iana`,compressible:!0,extensions:[`xhtml`,`xht`]},"application/xhtml-voice+xml":{source:`apache`,compressible:!0},"application/xliff+xml":{source:`iana`,compressible:!0,extensions:[`xlf`]},"application/xml":{source:`iana`,compressible:!0,extensions:[`xml`,`xsl`,`xsd`,`rng`]},"application/xml-dtd":{source:`iana`,compressible:!0,extensions:[`dtd`]},"application/xml-external-parsed-entity":{source:`iana`},"application/xml-patch+xml":{source:`iana`,compressible:!0},"application/xmpp+xml":{source:`iana`,compressible:!0},"application/xop+xml":{source:`iana`,compressible:!0,extensions:[`xop`]},"application/xproc+xml":{source:`apache`,compressible:!0,extensions:[`xpl`]},"application/xslt+xml":{source:`iana`,compressible:!0,extensions:[`xsl`,`xslt`]},"application/xspf+xml":{source:`apache`,compressible:!0,extensions:[`xspf`]},"application/xv+xml":{source:`iana`,compressible:!0,extensions:[`mxml`,`xhvml`,`xvml`,`xvm`]},"application/yang":{source:`iana`,extensions:[`yang`]},"application/yang-data+json":{source:`iana`,compressible:!0},"application/yang-data+xml":{source:`iana`,compressible:!0},"application/yang-patch+json":{source:`iana`,compressible:!0},"application/yang-patch+xml":{source:`iana`,compressible:!0},"application/yin+xml":{source:`iana`,compressible:!0,extensions:[`yin`]},"application/zip":{source:`iana`,compressible:!1,extensions:[`zip`]},"application/zlib":{source:`iana`},"application/zstd":{source:`iana`},"audio/1d-interleaved-parityfec":{source:`iana`},"audio/32kadpcm":{source:`iana`},"audio/3gpp":{source:`iana`,compressible:!1,extensions:[`3gpp`]},"audio/3gpp2":{source:`iana`},"audio/aac":{source:`iana`},"audio/ac3":{source:`iana`},"audio/adpcm":{source:`apache`,extensions:[`adp`]},"audio/amr":{source:`iana`,extensions:[`amr`]},"audio/amr-wb":{source:`iana`},"audio/amr-wb+":{source:`iana`},"audio/aptx":{source:`iana`},"audio/asc":{source:`iana`},"audio/atrac-advanced-lossless":{source:`iana`},"audio/atrac-x":{source:`iana`},"audio/atrac3":{source:`iana`},"audio/basic":{source:`iana`,compressible:!1,extensions:[`au`,`snd`]},"audio/bv16":{source:`iana`},"audio/bv32":{source:`iana`},"audio/clearmode":{source:`iana`},"audio/cn":{source:`iana`},"audio/dat12":{source:`iana`},"audio/dls":{source:`iana`},"audio/dsr-es201108":{source:`iana`},"audio/dsr-es202050":{source:`iana`},"audio/dsr-es202211":{source:`iana`},"audio/dsr-es202212":{source:`iana`},"audio/dv":{source:`iana`},"audio/dvi4":{source:`iana`},"audio/eac3":{source:`iana`},"audio/encaprtp":{source:`iana`},"audio/evrc":{source:`iana`},"audio/evrc-qcp":{source:`iana`},"audio/evrc0":{source:`iana`},"audio/evrc1":{source:`iana`},"audio/evrcb":{source:`iana`},"audio/evrcb0":{source:`iana`},"audio/evrcb1":{source:`iana`},"audio/evrcnw":{source:`iana`},"audio/evrcnw0":{source:`iana`},"audio/evrcnw1":{source:`iana`},"audio/evrcwb":{source:`iana`},"audio/evrcwb0":{source:`iana`},"audio/evrcwb1":{source:`iana`},"audio/evs":{source:`iana`},"audio/flexfec":{source:`iana`},"audio/fwdred":{source:`iana`},"audio/g711-0":{source:`iana`},"audio/g719":{source:`iana`},"audio/g722":{source:`iana`},"audio/g7221":{source:`iana`},"audio/g723":{source:`iana`},"audio/g726-16":{source:`iana`},"audio/g726-24":{source:`iana`},"audio/g726-32":{source:`iana`},"audio/g726-40":{source:`iana`},"audio/g728":{source:`iana`},"audio/g729":{source:`iana`},"audio/g7291":{source:`iana`},"audio/g729d":{source:`iana`},"audio/g729e":{source:`iana`},"audio/gsm":{source:`iana`},"audio/gsm-efr":{source:`iana`},"audio/gsm-hr-08":{source:`iana`},"audio/ilbc":{source:`iana`},"audio/ip-mr_v2.5":{source:`iana`},"audio/isac":{source:`apache`},"audio/l16":{source:`iana`},"audio/l20":{source:`iana`},"audio/l24":{source:`iana`,compressible:!1},"audio/l8":{source:`iana`},"audio/lpc":{source:`iana`},"audio/melp":{source:`iana`},"audio/melp1200":{source:`iana`},"audio/melp2400":{source:`iana`},"audio/melp600":{source:`iana`},"audio/mhas":{source:`iana`},"audio/midi":{source:`apache`,extensions:[`mid`,`midi`,`kar`,`rmi`]},"audio/mobile-xmf":{source:`iana`,extensions:[`mxmf`]},"audio/mp3":{compressible:!1,extensions:[`mp3`]},"audio/mp4":{source:`iana`,compressible:!1,extensions:[`m4a`,`mp4a`]},"audio/mp4a-latm":{source:`iana`},"audio/mpa":{source:`iana`},"audio/mpa-robust":{source:`iana`},"audio/mpeg":{source:`iana`,compressible:!1,extensions:[`mpga`,`mp2`,`mp2a`,`mp3`,`m2a`,`m3a`]},"audio/mpeg4-generic":{source:`iana`},"audio/musepack":{source:`apache`},"audio/ogg":{source:`iana`,compressible:!1,extensions:[`oga`,`ogg`,`spx`,`opus`]},"audio/opus":{source:`iana`},"audio/parityfec":{source:`iana`},"audio/pcma":{source:`iana`},"audio/pcma-wb":{source:`iana`},"audio/pcmu":{source:`iana`},"audio/pcmu-wb":{source:`iana`},"audio/prs.sid":{source:`iana`},"audio/qcelp":{source:`iana`},"audio/raptorfec":{source:`iana`},"audio/red":{source:`iana`},"audio/rtp-enc-aescm128":{source:`iana`},"audio/rtp-midi":{source:`iana`},"audio/rtploopback":{source:`iana`},"audio/rtx":{source:`iana`},"audio/s3m":{source:`apache`,extensions:[`s3m`]},"audio/scip":{source:`iana`},"audio/silk":{source:`apache`,extensions:[`sil`]},"audio/smv":{source:`iana`},"audio/smv-qcp":{source:`iana`},"audio/smv0":{source:`iana`},"audio/sofa":{source:`iana`},"audio/sp-midi":{source:`iana`},"audio/speex":{source:`iana`},"audio/t140c":{source:`iana`},"audio/t38":{source:`iana`},"audio/telephone-event":{source:`iana`},"audio/tetra_acelp":{source:`iana`},"audio/tetra_acelp_bb":{source:`iana`},"audio/tone":{source:`iana`},"audio/tsvcis":{source:`iana`},"audio/uemclip":{source:`iana`},"audio/ulpfec":{source:`iana`},"audio/usac":{source:`iana`},"audio/vdvi":{source:`iana`},"audio/vmr-wb":{source:`iana`},"audio/vnd.3gpp.iufp":{source:`iana`},"audio/vnd.4sb":{source:`iana`},"audio/vnd.audiokoz":{source:`iana`},"audio/vnd.celp":{source:`iana`},"audio/vnd.cisco.nse":{source:`iana`},"audio/vnd.cmles.radio-events":{source:`iana`},"audio/vnd.cns.anp1":{source:`iana`},"audio/vnd.cns.inf1":{source:`iana`},"audio/vnd.dece.audio":{source:`iana`,extensions:[`uva`,`uvva`]},"audio/vnd.digital-winds":{source:`iana`,extensions:[`eol`]},"audio/vnd.dlna.adts":{source:`iana`},"audio/vnd.dolby.heaac.1":{source:`iana`},"audio/vnd.dolby.heaac.2":{source:`iana`},"audio/vnd.dolby.mlp":{source:`iana`},"audio/vnd.dolby.mps":{source:`iana`},"audio/vnd.dolby.pl2":{source:`iana`},"audio/vnd.dolby.pl2x":{source:`iana`},"audio/vnd.dolby.pl2z":{source:`iana`},"audio/vnd.dolby.pulse.1":{source:`iana`},"audio/vnd.dra":{source:`iana`,extensions:[`dra`]},"audio/vnd.dts":{source:`iana`,extensions:[`dts`]},"audio/vnd.dts.hd":{source:`iana`,extensions:[`dtshd`]},"audio/vnd.dts.uhd":{source:`iana`},"audio/vnd.dvb.file":{source:`iana`},"audio/vnd.everad.plj":{source:`iana`},"audio/vnd.hns.audio":{source:`iana`},"audio/vnd.lucent.voice":{source:`iana`,extensions:[`lvp`]},"audio/vnd.ms-playready.media.pya":{source:`iana`,extensions:[`pya`]},"audio/vnd.nokia.mobile-xmf":{source:`iana`},"audio/vnd.nortel.vbk":{source:`iana`},"audio/vnd.nuera.ecelp4800":{source:`iana`,extensions:[`ecelp4800`]},"audio/vnd.nuera.ecelp7470":{source:`iana`,extensions:[`ecelp7470`]},"audio/vnd.nuera.ecelp9600":{source:`iana`,extensions:[`ecelp9600`]},"audio/vnd.octel.sbc":{source:`iana`},"audio/vnd.presonus.multitrack":{source:`iana`},"audio/vnd.qcelp":{source:`iana`},"audio/vnd.rhetorex.32kadpcm":{source:`iana`},"audio/vnd.rip":{source:`iana`,extensions:[`rip`]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:`iana`},"audio/vnd.vmx.cvsd":{source:`iana`},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:`iana`,compressible:!1},"audio/vorbis-config":{source:`iana`},"audio/wav":{compressible:!1,extensions:[`wav`]},"audio/wave":{compressible:!1,extensions:[`wav`]},"audio/webm":{source:`apache`,compressible:!1,extensions:[`weba`]},"audio/x-aac":{source:`apache`,compressible:!1,extensions:[`aac`]},"audio/x-aiff":{source:`apache`,extensions:[`aif`,`aiff`,`aifc`]},"audio/x-caf":{source:`apache`,compressible:!1,extensions:[`caf`]},"audio/x-flac":{source:`apache`,extensions:[`flac`]},"audio/x-m4a":{source:`nginx`,extensions:[`m4a`]},"audio/x-matroska":{source:`apache`,extensions:[`mka`]},"audio/x-mpegurl":{source:`apache`,extensions:[`m3u`]},"audio/x-ms-wax":{source:`apache`,extensions:[`wax`]},"audio/x-ms-wma":{source:`apache`,extensions:[`wma`]},"audio/x-pn-realaudio":{source:`apache`,extensions:[`ram`,`ra`]},"audio/x-pn-realaudio-plugin":{source:`apache`,extensions:[`rmp`]},"audio/x-realaudio":{source:`nginx`,extensions:[`ra`]},"audio/x-tta":{source:`apache`},"audio/x-wav":{source:`apache`,extensions:[`wav`]},"audio/xm":{source:`apache`,extensions:[`xm`]},"chemical/x-cdx":{source:`apache`,extensions:[`cdx`]},"chemical/x-cif":{source:`apache`,extensions:[`cif`]},"chemical/x-cmdf":{source:`apache`,extensions:[`cmdf`]},"chemical/x-cml":{source:`apache`,extensions:[`cml`]},"chemical/x-csml":{source:`apache`,extensions:[`csml`]},"chemical/x-pdb":{source:`apache`},"chemical/x-xyz":{source:`apache`,extensions:[`xyz`]},"font/collection":{source:`iana`,extensions:[`ttc`]},"font/otf":{source:`iana`,compressible:!0,extensions:[`otf`]},"font/sfnt":{source:`iana`},"font/ttf":{source:`iana`,compressible:!0,extensions:[`ttf`]},"font/woff":{source:`iana`,extensions:[`woff`]},"font/woff2":{source:`iana`,extensions:[`woff2`]},"image/aces":{source:`iana`,extensions:[`exr`]},"image/apng":{compressible:!1,extensions:[`apng`]},"image/avci":{source:`iana`,extensions:[`avci`]},"image/avcs":{source:`iana`,extensions:[`avcs`]},"image/avif":{source:`iana`,compressible:!1,extensions:[`avif`]},"image/bmp":{source:`iana`,compressible:!0,extensions:[`bmp`]},"image/cgm":{source:`iana`,extensions:[`cgm`]},"image/dicom-rle":{source:`iana`,extensions:[`drle`]},"image/emf":{source:`iana`,extensions:[`emf`]},"image/fits":{source:`iana`,extensions:[`fits`]},"image/g3fax":{source:`iana`,extensions:[`g3`]},"image/gif":{source:`iana`,compressible:!1,extensions:[`gif`]},"image/heic":{source:`iana`,extensions:[`heic`]},"image/heic-sequence":{source:`iana`,extensions:[`heics`]},"image/heif":{source:`iana`,extensions:[`heif`]},"image/heif-sequence":{source:`iana`,extensions:[`heifs`]},"image/hej2k":{source:`iana`,extensions:[`hej2`]},"image/hsj2":{source:`iana`,extensions:[`hsj2`]},"image/ief":{source:`iana`,extensions:[`ief`]},"image/jls":{source:`iana`,extensions:[`jls`]},"image/jp2":{source:`iana`,compressible:!1,extensions:[`jp2`,`jpg2`]},"image/jpeg":{source:`iana`,compressible:!1,extensions:[`jpeg`,`jpg`,`jpe`]},"image/jph":{source:`iana`,extensions:[`jph`]},"image/jphc":{source:`iana`,extensions:[`jhc`]},"image/jpm":{source:`iana`,compressible:!1,extensions:[`jpm`]},"image/jpx":{source:`iana`,compressible:!1,extensions:[`jpx`,`jpf`]},"image/jxr":{source:`iana`,extensions:[`jxr`]},"image/jxra":{source:`iana`,extensions:[`jxra`]},"image/jxrs":{source:`iana`,extensions:[`jxrs`]},"image/jxs":{source:`iana`,extensions:[`jxs`]},"image/jxsc":{source:`iana`,extensions:[`jxsc`]},"image/jxsi":{source:`iana`,extensions:[`jxsi`]},"image/jxss":{source:`iana`,extensions:[`jxss`]},"image/ktx":{source:`iana`,extensions:[`ktx`]},"image/ktx2":{source:`iana`,extensions:[`ktx2`]},"image/naplps":{source:`iana`},"image/pjpeg":{compressible:!1},"image/png":{source:`iana`,compressible:!1,extensions:[`png`]},"image/prs.btif":{source:`iana`,extensions:[`btif`]},"image/prs.pti":{source:`iana`,extensions:[`pti`]},"image/pwg-raster":{source:`iana`},"image/sgi":{source:`apache`,extensions:[`sgi`]},"image/svg+xml":{source:`iana`,compressible:!0,extensions:[`svg`,`svgz`]},"image/t38":{source:`iana`,extensions:[`t38`]},"image/tiff":{source:`iana`,compressible:!1,extensions:[`tif`,`tiff`]},"image/tiff-fx":{source:`iana`,extensions:[`tfx`]},"image/vnd.adobe.photoshop":{source:`iana`,compressible:!0,extensions:[`psd`]},"image/vnd.airzip.accelerator.azv":{source:`iana`,extensions:[`azv`]},"image/vnd.cns.inf2":{source:`iana`},"image/vnd.dece.graphic":{source:`iana`,extensions:[`uvi`,`uvvi`,`uvg`,`uvvg`]},"image/vnd.djvu":{source:`iana`,extensions:[`djvu`,`djv`]},"image/vnd.dvb.subtitle":{source:`iana`,extensions:[`sub`]},"image/vnd.dwg":{source:`iana`,extensions:[`dwg`]},"image/vnd.dxf":{source:`iana`,extensions:[`dxf`]},"image/vnd.fastbidsheet":{source:`iana`,extensions:[`fbs`]},"image/vnd.fpx":{source:`iana`,extensions:[`fpx`]},"image/vnd.fst":{source:`iana`,extensions:[`fst`]},"image/vnd.fujixerox.edmics-mmr":{source:`iana`,extensions:[`mmr`]},"image/vnd.fujixerox.edmics-rlc":{source:`iana`,extensions:[`rlc`]},"image/vnd.globalgraphics.pgb":{source:`iana`},"image/vnd.microsoft.icon":{source:`iana`,compressible:!0,extensions:[`ico`]},"image/vnd.mix":{source:`iana`},"image/vnd.mozilla.apng":{source:`iana`},"image/vnd.ms-dds":{compressible:!0,extensions:[`dds`]},"image/vnd.ms-modi":{source:`iana`,extensions:[`mdi`]},"image/vnd.ms-photo":{source:`apache`,extensions:[`wdp`]},"image/vnd.net-fpx":{source:`iana`,extensions:[`npx`]},"image/vnd.pco.b16":{source:`iana`,extensions:[`b16`]},"image/vnd.radiance":{source:`iana`},"image/vnd.sealed.png":{source:`iana`},"image/vnd.sealedmedia.softseal.gif":{source:`iana`},"image/vnd.sealedmedia.softseal.jpg":{source:`iana`},"image/vnd.svf":{source:`iana`},"image/vnd.tencent.tap":{source:`iana`,extensions:[`tap`]},"image/vnd.valve.source.texture":{source:`iana`,extensions:[`vtf`]},"image/vnd.wap.wbmp":{source:`iana`,extensions:[`wbmp`]},"image/vnd.xiff":{source:`iana`,extensions:[`xif`]},"image/vnd.zbrush.pcx":{source:`iana`,extensions:[`pcx`]},"image/webp":{source:`apache`,extensions:[`webp`]},"image/wmf":{source:`iana`,extensions:[`wmf`]},"image/x-3ds":{source:`apache`,extensions:[`3ds`]},"image/x-cmu-raster":{source:`apache`,extensions:[`ras`]},"image/x-cmx":{source:`apache`,extensions:[`cmx`]},"image/x-freehand":{source:`apache`,extensions:[`fh`,`fhc`,`fh4`,`fh5`,`fh7`]},"image/x-icon":{source:`apache`,compressible:!0,extensions:[`ico`]},"image/x-jng":{source:`nginx`,extensions:[`jng`]},"image/x-mrsid-image":{source:`apache`,extensions:[`sid`]},"image/x-ms-bmp":{source:`nginx`,compressible:!0,extensions:[`bmp`]},"image/x-pcx":{source:`apache`,extensions:[`pcx`]},"image/x-pict":{source:`apache`,extensions:[`pic`,`pct`]},"image/x-portable-anymap":{source:`apache`,extensions:[`pnm`]},"image/x-portable-bitmap":{source:`apache`,extensions:[`pbm`]},"image/x-portable-graymap":{source:`apache`,extensions:[`pgm`]},"image/x-portable-pixmap":{source:`apache`,extensions:[`ppm`]},"image/x-rgb":{source:`apache`,extensions:[`rgb`]},"image/x-tga":{source:`apache`,extensions:[`tga`]},"image/x-xbitmap":{source:`apache`,extensions:[`xbm`]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:`apache`,extensions:[`xpm`]},"image/x-xwindowdump":{source:`apache`,extensions:[`xwd`]},"message/cpim":{source:`iana`},"message/delivery-status":{source:`iana`},"message/disposition-notification":{source:`iana`,extensions:[`disposition-notification`]},"message/external-body":{source:`iana`},"message/feedback-report":{source:`iana`},"message/global":{source:`iana`,extensions:[`u8msg`]},"message/global-delivery-status":{source:`iana`,extensions:[`u8dsn`]},"message/global-disposition-notification":{source:`iana`,extensions:[`u8mdn`]},"message/global-headers":{source:`iana`,extensions:[`u8hdr`]},"message/http":{source:`iana`,compressible:!1},"message/imdn+xml":{source:`iana`,compressible:!0},"message/news":{source:`iana`},"message/partial":{source:`iana`,compressible:!1},"message/rfc822":{source:`iana`,compressible:!0,extensions:[`eml`,`mime`]},"message/s-http":{source:`iana`},"message/sip":{source:`iana`},"message/sipfrag":{source:`iana`},"message/tracking-status":{source:`iana`},"message/vnd.si.simp":{source:`iana`},"message/vnd.wfa.wsc":{source:`iana`,extensions:[`wsc`]},"model/3mf":{source:`iana`,extensions:[`3mf`]},"model/e57":{source:`iana`},"model/gltf+json":{source:`iana`,compressible:!0,extensions:[`gltf`]},"model/gltf-binary":{source:`iana`,compressible:!0,extensions:[`glb`]},"model/iges":{source:`iana`,compressible:!1,extensions:[`igs`,`iges`]},"model/mesh":{source:`iana`,compressible:!1,extensions:[`msh`,`mesh`,`silo`]},"model/mtl":{source:`iana`,extensions:[`mtl`]},"model/obj":{source:`iana`,extensions:[`obj`]},"model/step":{source:`iana`},"model/step+xml":{source:`iana`,compressible:!0,extensions:[`stpx`]},"model/step+zip":{source:`iana`,compressible:!1,extensions:[`stpz`]},"model/step-xml+zip":{source:`iana`,compressible:!1,extensions:[`stpxz`]},"model/stl":{source:`iana`,extensions:[`stl`]},"model/vnd.collada+xml":{source:`iana`,compressible:!0,extensions:[`dae`]},"model/vnd.dwf":{source:`iana`,extensions:[`dwf`]},"model/vnd.flatland.3dml":{source:`iana`},"model/vnd.gdl":{source:`iana`,extensions:[`gdl`]},"model/vnd.gs-gdl":{source:`apache`},"model/vnd.gs.gdl":{source:`iana`},"model/vnd.gtw":{source:`iana`,extensions:[`gtw`]},"model/vnd.moml+xml":{source:`iana`,compressible:!0},"model/vnd.mts":{source:`iana`,extensions:[`mts`]},"model/vnd.opengex":{source:`iana`,extensions:[`ogex`]},"model/vnd.parasolid.transmit.binary":{source:`iana`,extensions:[`x_b`]},"model/vnd.parasolid.transmit.text":{source:`iana`,extensions:[`x_t`]},"model/vnd.pytha.pyox":{source:`iana`},"model/vnd.rosette.annotated-data-model":{source:`iana`},"model/vnd.sap.vds":{source:`iana`,extensions:[`vds`]},"model/vnd.usdz+zip":{source:`iana`,compressible:!1,extensions:[`usdz`]},"model/vnd.valve.source.compiled-map":{source:`iana`,extensions:[`bsp`]},"model/vnd.vtu":{source:`iana`,extensions:[`vtu`]},"model/vrml":{source:`iana`,compressible:!1,extensions:[`wrl`,`vrml`]},"model/x3d+binary":{source:`apache`,compressible:!1,extensions:[`x3db`,`x3dbz`]},"model/x3d+fastinfoset":{source:`iana`,extensions:[`x3db`]},"model/x3d+vrml":{source:`apache`,compressible:!1,extensions:[`x3dv`,`x3dvz`]},"model/x3d+xml":{source:`iana`,compressible:!0,extensions:[`x3d`,`x3dz`]},"model/x3d-vrml":{source:`iana`,extensions:[`x3dv`]},"multipart/alternative":{source:`iana`,compressible:!1},"multipart/appledouble":{source:`iana`},"multipart/byteranges":{source:`iana`},"multipart/digest":{source:`iana`},"multipart/encrypted":{source:`iana`,compressible:!1},"multipart/form-data":{source:`iana`,compressible:!1},"multipart/header-set":{source:`iana`},"multipart/mixed":{source:`iana`},"multipart/multilingual":{source:`iana`},"multipart/parallel":{source:`iana`},"multipart/related":{source:`iana`,compressible:!1},"multipart/report":{source:`iana`},"multipart/signed":{source:`iana`,compressible:!1},"multipart/vnd.bint.med-plus":{source:`iana`},"multipart/voice-message":{source:`iana`},"multipart/x-mixed-replace":{source:`iana`},"text/1d-interleaved-parityfec":{source:`iana`},"text/cache-manifest":{source:`iana`,compressible:!0,extensions:[`appcache`,`manifest`]},"text/calendar":{source:`iana`,extensions:[`ics`,`ifb`]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:[`coffee`,`litcoffee`]},"text/cql":{source:`iana`},"text/cql-expression":{source:`iana`},"text/cql-identifier":{source:`iana`},"text/css":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`css`]},"text/csv":{source:`iana`,compressible:!0,extensions:[`csv`]},"text/csv-schema":{source:`iana`},"text/directory":{source:`iana`},"text/dns":{source:`iana`},"text/ecmascript":{source:`iana`},"text/encaprtp":{source:`iana`},"text/enriched":{source:`iana`},"text/fhirpath":{source:`iana`},"text/flexfec":{source:`iana`},"text/fwdred":{source:`iana`},"text/gff3":{source:`iana`},"text/grammar-ref-list":{source:`iana`},"text/html":{source:`iana`,compressible:!0,extensions:[`html`,`htm`,`shtml`]},"text/jade":{extensions:[`jade`]},"text/javascript":{source:`iana`,compressible:!0},"text/jcr-cnd":{source:`iana`},"text/jsx":{compressible:!0,extensions:[`jsx`]},"text/less":{compressible:!0,extensions:[`less`]},"text/markdown":{source:`iana`,compressible:!0,extensions:[`markdown`,`md`]},"text/mathml":{source:`nginx`,extensions:[`mml`]},"text/mdx":{compressible:!0,extensions:[`mdx`]},"text/mizar":{source:`iana`},"text/n3":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`n3`]},"text/parameters":{source:`iana`,charset:`UTF-8`},"text/parityfec":{source:`iana`},"text/plain":{source:`iana`,compressible:!0,extensions:[`txt`,`text`,`conf`,`def`,`list`,`log`,`in`,`ini`]},"text/provenance-notation":{source:`iana`,charset:`UTF-8`},"text/prs.fallenstein.rst":{source:`iana`},"text/prs.lines.tag":{source:`iana`,extensions:[`dsc`]},"text/prs.prop.logic":{source:`iana`},"text/raptorfec":{source:`iana`},"text/red":{source:`iana`},"text/rfc822-headers":{source:`iana`},"text/richtext":{source:`iana`,compressible:!0,extensions:[`rtx`]},"text/rtf":{source:`iana`,compressible:!0,extensions:[`rtf`]},"text/rtp-enc-aescm128":{source:`iana`},"text/rtploopback":{source:`iana`},"text/rtx":{source:`iana`},"text/sgml":{source:`iana`,extensions:[`sgml`,`sgm`]},"text/shaclc":{source:`iana`},"text/shex":{source:`iana`,extensions:[`shex`]},"text/slim":{extensions:[`slim`,`slm`]},"text/spdx":{source:`iana`,extensions:[`spdx`]},"text/strings":{source:`iana`},"text/stylus":{extensions:[`stylus`,`styl`]},"text/t140":{source:`iana`},"text/tab-separated-values":{source:`iana`,compressible:!0,extensions:[`tsv`]},"text/troff":{source:`iana`,extensions:[`t`,`tr`,`roff`,`man`,`me`,`ms`]},"text/turtle":{source:`iana`,charset:`UTF-8`,extensions:[`ttl`]},"text/ulpfec":{source:`iana`},"text/uri-list":{source:`iana`,compressible:!0,extensions:[`uri`,`uris`,`urls`]},"text/vcard":{source:`iana`,compressible:!0,extensions:[`vcard`]},"text/vnd.a":{source:`iana`},"text/vnd.abc":{source:`iana`},"text/vnd.ascii-art":{source:`iana`},"text/vnd.curl":{source:`iana`,extensions:[`curl`]},"text/vnd.curl.dcurl":{source:`apache`,extensions:[`dcurl`]},"text/vnd.curl.mcurl":{source:`apache`,extensions:[`mcurl`]},"text/vnd.curl.scurl":{source:`apache`,extensions:[`scurl`]},"text/vnd.debian.copyright":{source:`iana`,charset:`UTF-8`},"text/vnd.dmclientscript":{source:`iana`},"text/vnd.dvb.subtitle":{source:`iana`,extensions:[`sub`]},"text/vnd.esmertec.theme-descriptor":{source:`iana`,charset:`UTF-8`},"text/vnd.familysearch.gedcom":{source:`iana`,extensions:[`ged`]},"text/vnd.ficlab.flt":{source:`iana`},"text/vnd.fly":{source:`iana`,extensions:[`fly`]},"text/vnd.fmi.flexstor":{source:`iana`,extensions:[`flx`]},"text/vnd.gml":{source:`iana`},"text/vnd.graphviz":{source:`iana`,extensions:[`gv`]},"text/vnd.hans":{source:`iana`},"text/vnd.hgl":{source:`iana`},"text/vnd.in3d.3dml":{source:`iana`,extensions:[`3dml`]},"text/vnd.in3d.spot":{source:`iana`,extensions:[`spot`]},"text/vnd.iptc.newsml":{source:`iana`},"text/vnd.iptc.nitf":{source:`iana`},"text/vnd.latex-z":{source:`iana`},"text/vnd.motorola.reflex":{source:`iana`},"text/vnd.ms-mediapackage":{source:`iana`},"text/vnd.net2phone.commcenter.command":{source:`iana`},"text/vnd.radisys.msml-basic-layout":{source:`iana`},"text/vnd.senx.warpscript":{source:`iana`},"text/vnd.si.uricatalogue":{source:`iana`},"text/vnd.sosi":{source:`iana`},"text/vnd.sun.j2me.app-descriptor":{source:`iana`,charset:`UTF-8`,extensions:[`jad`]},"text/vnd.trolltech.linguist":{source:`iana`,charset:`UTF-8`},"text/vnd.wap.si":{source:`iana`},"text/vnd.wap.sl":{source:`iana`},"text/vnd.wap.wml":{source:`iana`,extensions:[`wml`]},"text/vnd.wap.wmlscript":{source:`iana`,extensions:[`wmls`]},"text/vtt":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`vtt`]},"text/x-asm":{source:`apache`,extensions:[`s`,`asm`]},"text/x-c":{source:`apache`,extensions:[`c`,`cc`,`cxx`,`cpp`,`h`,`hh`,`dic`]},"text/x-component":{source:`nginx`,extensions:[`htc`]},"text/x-fortran":{source:`apache`,extensions:[`f`,`for`,`f77`,`f90`]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:[`hbs`]},"text/x-java-source":{source:`apache`,extensions:[`java`]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:[`lua`]},"text/x-markdown":{compressible:!0,extensions:[`mkd`]},"text/x-nfo":{source:`apache`,extensions:[`nfo`]},"text/x-opml":{source:`apache`,extensions:[`opml`]},"text/x-org":{compressible:!0,extensions:[`org`]},"text/x-pascal":{source:`apache`,extensions:[`p`,`pas`]},"text/x-processing":{compressible:!0,extensions:[`pde`]},"text/x-sass":{extensions:[`sass`]},"text/x-scss":{extensions:[`scss`]},"text/x-setext":{source:`apache`,extensions:[`etx`]},"text/x-sfv":{source:`apache`,extensions:[`sfv`]},"text/x-suse-ymp":{compressible:!0,extensions:[`ymp`]},"text/x-uuencode":{source:`apache`,extensions:[`uu`]},"text/x-vcalendar":{source:`apache`,extensions:[`vcs`]},"text/x-vcard":{source:`apache`,extensions:[`vcf`]},"text/xml":{source:`iana`,compressible:!0,extensions:[`xml`]},"text/xml-external-parsed-entity":{source:`iana`},"text/yaml":{compressible:!0,extensions:[`yaml`,`yml`]},"video/1d-interleaved-parityfec":{source:`iana`},"video/3gpp":{source:`iana`,extensions:[`3gp`,`3gpp`]},"video/3gpp-tt":{source:`iana`},"video/3gpp2":{source:`iana`,extensions:[`3g2`]},"video/av1":{source:`iana`},"video/bmpeg":{source:`iana`},"video/bt656":{source:`iana`},"video/celb":{source:`iana`},"video/dv":{source:`iana`},"video/encaprtp":{source:`iana`},"video/ffv1":{source:`iana`},"video/flexfec":{source:`iana`},"video/h261":{source:`iana`,extensions:[`h261`]},"video/h263":{source:`iana`,extensions:[`h263`]},"video/h263-1998":{source:`iana`},"video/h263-2000":{source:`iana`},"video/h264":{source:`iana`,extensions:[`h264`]},"video/h264-rcdo":{source:`iana`},"video/h264-svc":{source:`iana`},"video/h265":{source:`iana`},"video/iso.segment":{source:`iana`,extensions:[`m4s`]},"video/jpeg":{source:`iana`,extensions:[`jpgv`]},"video/jpeg2000":{source:`iana`},"video/jpm":{source:`apache`,extensions:[`jpm`,`jpgm`]},"video/jxsv":{source:`iana`},"video/mj2":{source:`iana`,extensions:[`mj2`,`mjp2`]},"video/mp1s":{source:`iana`},"video/mp2p":{source:`iana`},"video/mp2t":{source:`iana`,extensions:[`ts`]},"video/mp4":{source:`iana`,compressible:!1,extensions:[`mp4`,`mp4v`,`mpg4`]},"video/mp4v-es":{source:`iana`},"video/mpeg":{source:`iana`,compressible:!1,extensions:[`mpeg`,`mpg`,`mpe`,`m1v`,`m2v`]},"video/mpeg4-generic":{source:`iana`},"video/mpv":{source:`iana`},"video/nv":{source:`iana`},"video/ogg":{source:`iana`,compressible:!1,extensions:[`ogv`]},"video/parityfec":{source:`iana`},"video/pointer":{source:`iana`},"video/quicktime":{source:`iana`,compressible:!1,extensions:[`qt`,`mov`]},"video/raptorfec":{source:`iana`},"video/raw":{source:`iana`},"video/rtp-enc-aescm128":{source:`iana`},"video/rtploopback":{source:`iana`},"video/rtx":{source:`iana`},"video/scip":{source:`iana`},"video/smpte291":{source:`iana`},"video/smpte292m":{source:`iana`},"video/ulpfec":{source:`iana`},"video/vc1":{source:`iana`},"video/vc2":{source:`iana`},"video/vnd.cctv":{source:`iana`},"video/vnd.dece.hd":{source:`iana`,extensions:[`uvh`,`uvvh`]},"video/vnd.dece.mobile":{source:`iana`,extensions:[`uvm`,`uvvm`]},"video/vnd.dece.mp4":{source:`iana`},"video/vnd.dece.pd":{source:`iana`,extensions:[`uvp`,`uvvp`]},"video/vnd.dece.sd":{source:`iana`,extensions:[`uvs`,`uvvs`]},"video/vnd.dece.video":{source:`iana`,extensions:[`uvv`,`uvvv`]},"video/vnd.directv.mpeg":{source:`iana`},"video/vnd.directv.mpeg-tts":{source:`iana`},"video/vnd.dlna.mpeg-tts":{source:`iana`},"video/vnd.dvb.file":{source:`iana`,extensions:[`dvb`]},"video/vnd.fvt":{source:`iana`,extensions:[`fvt`]},"video/vnd.hns.video":{source:`iana`},"video/vnd.iptvforum.1dparityfec-1010":{source:`iana`},"video/vnd.iptvforum.1dparityfec-2005":{source:`iana`},"video/vnd.iptvforum.2dparityfec-1010":{source:`iana`},"video/vnd.iptvforum.2dparityfec-2005":{source:`iana`},"video/vnd.iptvforum.ttsavc":{source:`iana`},"video/vnd.iptvforum.ttsmpeg2":{source:`iana`},"video/vnd.motorola.video":{source:`iana`},"video/vnd.motorola.videop":{source:`iana`},"video/vnd.mpegurl":{source:`iana`,extensions:[`mxu`,`m4u`]},"video/vnd.ms-playready.media.pyv":{source:`iana`,extensions:[`pyv`]},"video/vnd.nokia.interleaved-multimedia":{source:`iana`},"video/vnd.nokia.mp4vr":{source:`iana`},"video/vnd.nokia.videovoip":{source:`iana`},"video/vnd.objectvideo":{source:`iana`},"video/vnd.radgamettools.bink":{source:`iana`},"video/vnd.radgamettools.smacker":{source:`iana`},"video/vnd.sealed.mpeg1":{source:`iana`},"video/vnd.sealed.mpeg4":{source:`iana`},"video/vnd.sealed.swf":{source:`iana`},"video/vnd.sealedmedia.softseal.mov":{source:`iana`},"video/vnd.uvvu.mp4":{source:`iana`,extensions:[`uvu`,`uvvu`]},"video/vnd.vivo":{source:`iana`,extensions:[`viv`]},"video/vnd.youtube.yt":{source:`iana`},"video/vp8":{source:`iana`},"video/vp9":{source:`iana`},"video/webm":{source:`apache`,compressible:!1,extensions:[`webm`]},"video/x-f4v":{source:`apache`,extensions:[`f4v`]},"video/x-fli":{source:`apache`,extensions:[`fli`]},"video/x-flv":{source:`apache`,compressible:!1,extensions:[`flv`]},"video/x-m4v":{source:`apache`,extensions:[`m4v`]},"video/x-matroska":{source:`apache`,compressible:!1,extensions:[`mkv`,`mk3d`,`mks`]},"video/x-mng":{source:`apache`,extensions:[`mng`]},"video/x-ms-asf":{source:`apache`,extensions:[`asf`,`asx`]},"video/x-ms-vob":{source:`apache`,extensions:[`vob`]},"video/x-ms-wm":{source:`apache`,extensions:[`wm`]},"video/x-ms-wmv":{source:`apache`,compressible:!1,extensions:[`wmv`]},"video/x-ms-wmx":{source:`apache`,extensions:[`wmx`]},"video/x-ms-wvx":{source:`apache`,extensions:[`wvx`]},"video/x-msvideo":{source:`apache`,extensions:[`avi`]},"video/x-sgi-movie":{source:`apache`,extensions:[`movie`]},"video/x-smv":{source:`apache`,extensions:[`smv`]},"x-conference/x-cooltalk":{source:`apache`,extensions:[`ice`]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}})),De=i(((e,t)=>{t.exports=Ee()})),Oe=i((e=>{var t=De(),n=r(`path`).extname,i=/^\s*([^;\s]*)(?:;|\s|$)/,a=/^text\//i;e.charset=o,e.charsets={lookup:o},e.contentType=s,e.extension=c,e.extensions=Object.create(null),e.lookup=l,e.types=Object.create(null),u(e.extensions,e.types);function o(e){if(!e||typeof e!=`string`)return!1;var n=i.exec(e),r=n&&t[n[1].toLowerCase()];return r&&r.charset?r.charset:n&&a.test(n[1])?`UTF-8`:!1}function s(t){if(!t||typeof t!=`string`)return!1;var n=t.indexOf(`/`)===-1?e.lookup(t):t;if(!n)return!1;if(n.indexOf(`charset`)===-1){var r=e.charset(n);r&&(n+=`; charset=`+r.toLowerCase())}return n}function c(t){if(!t||typeof t!=`string`)return!1;var n=i.exec(t),r=n&&e.extensions[n[1].toLowerCase()];return!r||!r.length?!1:r[0]}function l(t){if(!t||typeof t!=`string`)return!1;var r=n(`x.`+t).toLowerCase().substr(1);return r&&e.types[r]||!1}function u(e,n){var r=[`nginx`,`apache`,void 0,`iana`];Object.keys(t).forEach(function(i){var a=t[i],o=a.extensions;if(!(!o||!o.length)){e[i]=o;for(var s=0;s<o.length;s++){var c=o[s];if(n[c]){var l=r.indexOf(t[n[c]].source),u=r.indexOf(a.source);if(n[c]!==`application/octet-stream`&&(l>u||l===u&&n[c].substr(0,12)===`application/`))continue}n[c]=i}}})}})),ke=i(((e,t)=>{t.exports=n;function n(e){var t=typeof setImmediate==`function`?setImmediate:typeof process==`object`&&typeof process.nextTick==`function`?process.nextTick:null;t?t(e):setTimeout(e,0)}})),Ae=i(((e,t)=>{var n=ke();t.exports=r;function r(e){var t=!1;return n(function(){t=!0}),function(r,i){t?e(r,i):n(function(){e(r,i)})}}})),je=i(((e,t)=>{t.exports=n;function n(e){Object.keys(e.jobs).forEach(r.bind(e)),e.jobs={}}function r(e){typeof this.jobs[e]==`function`&&this.jobs[e]()}})),Me=i(((e,t)=>{var n=Ae(),r=je();t.exports=i;function i(e,t,n,i){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=a(t,o,e[o],function(e,t){o in n.jobs&&(delete n.jobs[o],e?r(n):n.results[o]=t,i(e,n.results))})}function a(e,t,r,i){return e.length==2?e(r,n(i)):e(r,t,n(i))}})),Ne=i(((e,t)=>{t.exports=n;function n(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])}),r}})),q=i(((e,t)=>{var n=je(),r=Ae();t.exports=i;function i(e){Object.keys(this.jobs).length&&(this.index=this.size,n(this),r(e)(null,this.results))}})),Pe=i(((e,t)=>{var n=Me(),r=Ne(),i=q();t.exports=a;function a(e,t,a){for(var o=r(e);o.index<(o.keyedList||e).length;)n(e,t,o,function(e,t){if(e){a(e,t);return}if(Object.keys(o.jobs).length===0){a(null,o.results);return}}),o.index++;return i.bind(o,a)}})),Fe=i(((e,t)=>{var n=Me(),r=Ne(),i=q();t.exports=a,t.exports.ascending=o,t.exports.descending=s;function a(e,t,a,o){var s=r(e,a);return n(e,t,s,function r(i,a){if(i){o(i,a);return}if(s.index++,s.index<(s.keyedList||e).length){n(e,t,s,r);return}o(null,s.results)}),i.bind(s,o)}function o(e,t){return e<t?-1:+(e>t)}function s(e,t){return-1*o(e,t)}})),Ie=i(((e,t)=>{var n=Fe();t.exports=r;function r(e,t,r){return n(e,t,null,r)}})),Le=i(((e,t)=>{t.exports={parallel:Pe(),serial:Ie(),serialOrdered:Fe()}})),Re=i(((e,t)=>{t.exports=Object})),ze=i(((e,t)=>{t.exports=Error})),Be=i(((e,t)=>{t.exports=EvalError})),Ve=i(((e,t)=>{t.exports=RangeError})),He=i(((e,t)=>{t.exports=ReferenceError})),Ue=i(((e,t)=>{t.exports=SyntaxError})),We=i(((e,t)=>{t.exports=TypeError})),Ge=i(((e,t)=>{t.exports=URIError})),Ke=i(((e,t)=>{t.exports=Math.abs})),qe=i(((e,t)=>{t.exports=Math.floor})),Je=i(((e,t)=>{t.exports=Math.max})),Ye=i(((e,t)=>{t.exports=Math.min})),Xe=i(((e,t)=>{t.exports=Math.pow})),J=i(((e,t)=>{t.exports=Math.round})),Ze=i(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),Qe=i(((e,t)=>{var n=Ze();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Y=i(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),$e=i(((e,t)=>{var n=Y();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),et=i(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),tt=i(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),nt=i(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=tt();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),rt=i(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),it=i(((e,t)=>{t.exports=Re().getPrototypeOf||null})),at=i(((e,t)=>{var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}})),ot=i(((e,t)=>{var n=at();t.exports=Function.prototype.bind||n})),st=i(((e,t)=>{t.exports=Function.prototype.call})),ct=i(((e,t)=>{t.exports=Function.prototype.apply})),lt=i(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),ut=i(((e,t)=>{var n=ot(),r=ct(),i=st();t.exports=lt()||n.call(i,r)})),dt=i(((e,t)=>{var n=ot(),r=We(),i=st(),a=ut();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),ft=i(((e,t)=>{var n=dt(),r=$e(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1})),pt=i(((e,t)=>{var n=rt(),r=it(),i=ft();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),mt=i(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=ot().call(n,r)})),ht=i(((e,t)=>{var n,r=Re(),i=ze(),a=Be(),o=Ve(),s=He(),c=Ue(),l=We(),u=Ge(),d=Ke(),f=qe(),p=Je(),m=Ye(),h=Xe(),g=J(),_=Qe(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=$e(),x=et(),S=function(){throw new l},C=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,w=nt()(),T=pt(),E=it(),D=rt(),O=ct(),k=st(),A={},j=typeof Uint8Array>`u`||!T?n:T(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":j,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){M[`%Error.prototype%`]=T(T(e))}var N=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return M[t]=n,n},P={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},F=ot(),I=mt(),L=F.call(k,Array.prototype.concat),R=F.call(O,Array.prototype.splice),z=F.call(k,String.prototype.replace),B=F.call(k,String.prototype.slice),V=F.call(k,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,U=function(e){var t=B(e,0,1),n=B(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return z(e,ee,function(e,t,n,i){r[r.length]=n?z(i,H,`$1`):t||e}),r},W=function(e,t){var n=e,r;if(I(P,n)&&(r=P[n],n=`%`+r[0]+`%`),I(M,n)){var i=M[n];if(i===A&&(i=N(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(V(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=U(e),r=n.length>0?n[0]:``,i=W(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],R(n,L([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=B(p,0,1),h=B(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,I(M,a))o=M[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=I(o,p),o=o[p];f&&!s&&(M[a]=o)}}return o}})),gt=i(((e,t)=>{var n=tt();t.exports=function(){return n()&&!!Symbol.toStringTag}})),_t=i(((e,t)=>{var n=ht()(`%Object.defineProperty%`,!0),r=gt()(),i=mt(),a=We(),o=r?Symbol.toStringTag:null;t.exports=function(e,t){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,s=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(r!==void 0&&typeof r!=`boolean`||s!==void 0&&typeof s!=`boolean`)throw new a("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");o&&(r||!i(e,o))&&(n?n(e,o,{configurable:!s,enumerable:!1,value:t,writable:!1}):e[o]=t)}})),vt=i(((e,t)=>{t.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}})),yt=i(((e,t)=>{var n=Te(),i=r(`util`),a=r(`path`),o=r(`http`),s=r(`https`),c=r(`url`).parse,l=r(`fs`),u=r(`stream`).Stream,d=r(`crypto`),f=Oe(),p=Le(),m=_t(),h=mt(),g=vt();function _(e){if(!(this instanceof _))return new _(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],n.call(this),e||={},e)this[t]=e[t]}i.inherits(_,n),_.LINE_BREAK=`\r
|
|
5
|
+
`,_.DEFAULT_CONTENT_TYPE=`application/octet-stream`,_.prototype.append=function(e,t,r){r||={},typeof r==`string`&&(r={filename:r});var i=n.prototype.append.bind(this);if((typeof t==`number`||t==null)&&(t=String(t)),Array.isArray(t)){this._error(Error(`Arrays are not supported.`));return}var a=this._multiPartHeader(e,t,r),o=this._multiPartFooter();i(a),i(t),i(o),this._trackLength(a,t,r)},_.prototype._trackLength=function(e,t,n){var r=0;n.knownLength==null?Buffer.isBuffer(t)?r=t.length:typeof t==`string`&&(r=Buffer.byteLength(t)):r+=Number(n.knownLength),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+_.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&h(t,`httpVersion`))&&!(t instanceof u))&&(n.knownLength||this._valuesToMeasure.push(t))},_.prototype._lengthRetriever=function(e,t){h(e,`fd`)?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):l.stat(e.path,function(n,r){if(n){t(n);return}t(null,r.size-(e.start?e.start:0))}):h(e,`httpVersion`)?t(null,Number(e.headers[`content-length`])):h(e,`httpModule`)?(e.on(`response`,function(n){e.pause(),t(null,Number(n.headers[`content-length`]))}),e.resume()):t(`Unknown stream`)},_.prototype._multiPartHeader=function(e,t,n){if(typeof n.header==`string`)return n.header;var r=this._getContentDisposition(t,n),i=this._getContentType(t,n),a=``,o={"Content-Disposition":[`form-data`,`name="`+e+`"`].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header==`object`&&g(o,n.header);var s;for(var c in o)if(h(o,c)){if(s=o[c],s==null)continue;Array.isArray(s)||(s=[s]),s.length&&(a+=c+`: `+s.join(`; `)+_.LINE_BREAK)}return`--`+this.getBoundary()+_.LINE_BREAK+a+_.LINE_BREAK},_.prototype._getContentDisposition=function(e,t){var n;if(typeof t.filepath==`string`?n=a.normalize(t.filepath).replace(/\\/g,`/`):t.filename||e&&(e.name||e.path)?n=a.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&h(e,`httpVersion`)&&(n=a.basename(e.client._httpMessage.path||``)),n)return`filename="`+n+`"`},_.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=f.lookup(e.name)),!n&&e&&e.path&&(n=f.lookup(e.path)),!n&&e&&e.readable&&h(e,`httpVersion`)&&(n=e.headers[`content-type`]),!n&&(t.filepath||t.filename)&&(n=f.lookup(t.filepath||t.filename)),!n&&e&&typeof e==`object`&&(n=_.DEFAULT_CONTENT_TYPE),n},_.prototype._multiPartFooter=function(){return function(e){var t=_.LINE_BREAK;this._streams.length===0&&(t+=this._lastBoundary()),e(t)}.bind(this)},_.prototype._lastBoundary=function(){return`--`+this.getBoundary()+`--`+_.LINE_BREAK},_.prototype.getHeaders=function(e){var t,n={"content-type":`multipart/form-data; boundary=`+this.getBoundary()};for(t in e)h(e,t)&&(n[t.toLowerCase()]=e[t]);return n},_.prototype.setBoundary=function(e){if(typeof e!=`string`)throw TypeError(`FormData boundary must be a string`);this._boundary=e},_.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},_.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!=`function`&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),(typeof this._streams[n]!=`string`||this._streams[n].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(_.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},_.prototype._generateBoundary=function(){this._boundary=`--------------------------`+d.randomBytes(12).toString(`hex`)},_.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(Error(`Cannot calculate proper length in synchronous way.`)),e},_.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},_.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}p.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){e(n);return}r.forEach(function(e){t+=e}),e(null,t)})},_.prototype.submit=function(e,t){var n,r,i={method:`post`};return typeof e==`string`?(e=c(e),r=g({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(r=g(e,i),r.port||=r.protocol===`https:`?443:80),r.headers=this.getHeaders(e.headers),n=r.protocol===`https:`?s.request(r):o.request(r),this.getLength(function(e,r){if(e&&e!==`Unknown stream`){this._error(e);return}if(r&&n.setHeader(`Content-Length`,r),this.pipe(n),t){var i,a=function(e,r){return n.removeListener(`error`,a),n.removeListener(`response`,i),t.call(this,e,r)};i=a.bind(this,null),n.on(`error`,a),n.on(`response`,i)}}.bind(this)),n},_.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit(`error`,e))},_.prototype.toString=function(){return`[object FormData]`},m(_.prototype,`FormData`),t.exports=_})),bt=i(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=N(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),X=i(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=bt()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),xt=i(((e,t)=>{let n=r(`tty`),i=r(`util`);e.init=d,e.log=c,e.formatArgs=o,e.save=l,e.load=u,e.useColors=a,e.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=r(`supports-color`);t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:n.isatty(process.stderr.fd)}function o(e){let{namespace:n,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${n} \u001B[0m`;e[0]=a+e[0].split(`
|
|
6
6
|
`).join(`
|
|
7
|
-
`+a),e.push(i+`m+`+
|
|
8
|
-
`)}function l(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function u(){return process.env.DEBUG}function d(t){t.inspectOpts={};let n=Object.keys(e.inspectOpts);for(let r=0;r<n.length;r++)t.inspectOpts[n[r]]=e.inspectOpts[n[r]]}
|
|
9
|
-
`).map(e=>e.trim()).join(` `)},f.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}})),Tt=a(((e,t)=>{typeof process>`u`||process.type===`renderer`||process.browser===!0||process.__nwjs?t.exports=xt():t.exports=wt()})),Et=a(((e,t)=>{var n;t.exports=function(){if(!n){try{n=Tt()(`follow-redirects`)}catch{}typeof n!=`function`&&(n=function(){})}n.apply(null,arguments)}})),Dt=a(((e,n)=>{var r=t(`url`),i=r.URL,a=t(`http`),o=t(`https`),s=t(`stream`).Writable,c=t(`assert`),l=Et();(function(){var e=typeof process<`u`,t=typeof window<`u`&&typeof document<`u`,n=P(Error.captureStackTrace);!e&&(t||!n)&&console.warn(`The follow-redirects package should be excluded from browser builds.`)})();var u=!1;try{c(new i(``))}catch(e){u=e.code===`ERR_INVALID_URL`}var d=[`Authorization`,`Proxy-Authorization`,`Cookie`],f=[`auth`,`host`,`hostname`,`href`,`path`,`pathname`,`port`,`protocol`,`query`,`search`,`hash`],p=[`abort`,`aborted`,`connect`,`error`,`socket`,`timeout`],m=Object.create(null);p.forEach(function(e){m[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}});var h=k(`ERR_INVALID_URL`,`Invalid URL`,TypeError),g=k(`ERR_FR_REDIRECTION_FAILURE`,`Redirected request failed`),_=k(`ERR_FR_TOO_MANY_REDIRECTS`,`Maximum number of redirects exceeded`,g),v=k(`ERR_FR_MAX_BODY_LENGTH_EXCEEDED`,`Request body larger than maxBodyLength limit`),y=k(`ERR_STREAM_WRITE_AFTER_END`,`write after end`),b=s.prototype.destroy||C;function x(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on(`response`,t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit(`error`,e instanceof g?e:new g({cause:e}))}},this._headerFilter=RegExp(`^(?:`+d.concat(e.sensitiveHeaders).map(L).join(`|`)+`)$`,`i`),this._performRequest()}x.prototype=Object.create(s.prototype),x.prototype.abort=function(){A(this._currentRequest),this._currentRequest.abort(),this.emit(`abort`)},x.prototype.destroy=function(e){return A(this._currentRequest,e),b.call(this,e),this},x.prototype.write=function(e,t,n){if(this._ending)throw new y;if(!N(e)&&!F(e))throw TypeError(`data should be a string, Buffer or Uint8Array`);if(P(t)&&(n=t,t=null),e.length===0){n&&n();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit(`error`,new v),this.abort())},x.prototype.end=function(e,t,n){if(P(e)?(n=e,e=t=null):P(t)&&(n=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var r=this,i=this._currentRequest;this.write(e,t,function(){r._ended=!0,i.end(null,null,n)}),this._ending=!0}},x.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},x.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},x.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener(`timeout`,t.destroy),t.addListener(`timeout`,t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit(`timeout`),a()},e),r(t)}function a(){n._timeout&&=(clearTimeout(n._timeout),null),n.removeListener(`abort`,a),n.removeListener(`error`,a),n.removeListener(`response`,a),n.removeListener(`close`,a),t&&n.removeListener(`timeout`,t),n.socket||n._currentRequest.removeListener(`socket`,i)}return t&&this.on(`timeout`,t),this.socket?i(this.socket):this._currentRequest.once(`socket`,i),this.on(`socket`,r),this.on(`abort`,a),this.on(`error`,a),this.on(`response`,a),this.on(`close`,a),this},[`flushHeaders`,`getHeader`,`setNoDelay`,`setSocketKeepAlive`].forEach(function(e){x.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}),[`aborted`,`connection`,`socket`].forEach(function(e){Object.defineProperty(x.prototype,e,{get:function(){return this._currentRequest[e]}})}),x.prototype._sanitizeOptions=function(e){if(e.headers||={},M(e.sensitiveHeaders)||(e.sensitiveHeaders=[]),e.host&&(e.hostname||=e.host,delete e.host),!e.pathname&&e.path){var t=e.path.indexOf(`?`);t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},x.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw TypeError(`Unsupported protocol `+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var a of p)i.on(a,m[a]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,c=this._requestBodyBuffers;(function e(t){if(i===s._currentRequest)if(t)s.emit(`error`,t);else if(o<c.length){var n=c[o++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()})()}},x.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n=e.headers.location;if(!n||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit(`response`,e),this._requestBodyBuffers=[];return}if(A(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new _;var i,a=this._options.beforeRedirect;a&&(i=Object.assign({Host:e.req.getHeader(`host`)},this._options.headers));var o=this._options.method;((t===301||t===302)&&this._options.method===`POST`||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method=`GET`,this._requestBodyBuffers=[],O(/^content-/i,this._options.headers));var s=O(/^host$/i,this._options.headers),c=w(this._currentUrl),u=s||c.host,d=/^\w+:/.test(n)?this._currentUrl:r.format(Object.assign(c,{host:u})),f=T(n,d);if(l(`redirecting to`,f.href),this._isRedirect=!0,D(f,this._options),(f.protocol!==c.protocol&&f.protocol!==`https:`||f.host!==u&&!j(f.host,u))&&O(this._headerFilter,this._options.headers),P(a)){var p={headers:e.headers,statusCode:t},m={url:d,method:o,headers:i};a(this._options,p,m),this._sanitizeOptions(this._options)}this._performRequest()};function S(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024},n={};return Object.keys(e).forEach(function(r){var i=r+`:`,a=n[i]=e[r],o=t[r]=Object.create(a);function s(e,r,a){return I(e)?e=D(e):N(e)?e=D(w(e)):(a=r,r=E(e),e={protocol:i}),P(r)&&(a=r,r=null),r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r),r.nativeProtocols=n,!N(r.host)&&!N(r.hostname)&&(r.hostname=`::1`),c.equal(r.protocol,i,`protocol mismatch`),l(`options`,r),new x(r,a)}function u(e,t,n){var r=o.request(e,t,n);return r.end(),r}Object.defineProperties(o,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function C(){}function w(e){var t;if(u)t=new i(e);else if(t=E(r.parse(e)),!N(t.protocol))throw new h({input:e});return t}function T(e,t){return u?new i(e,t):w(r.resolve(t,e))}function E(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname)||/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new h({input:e.href||e});return e}function D(e,t){var n=t||{};for(var r of f)n[r]=e[r];return n.hostname.startsWith(`[`)&&(n.hostname=n.hostname.slice(1,-1)),n.port!==``&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function O(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return n==null?void 0:String(n).trim()}function k(e,t,n){function r(n){P(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+`: `+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:`Error [`+e+`]`,enumerable:!1}}),r}function A(e,t){for(var n of p)e.removeListener(n,m[n]);e.on(`error`,C),e.destroy(t)}function j(e,t){c(N(e)&&N(t));var n=e.length-t.length-1;return n>0&&e[n]===`.`&&e.endsWith(t)}function M(e){return e instanceof Array}function N(e){return typeof e==`string`||e instanceof String}function P(e){return typeof e==`function`}function F(e){return typeof e==`object`&&`length`in e}function I(e){return i&&e instanceof i}function L(e){return e.replace(/[\]\\/()*+?.$]/g,`\\$&`)}n.exports=S({http:a,https:o}),n.exports.wrap=S})),Ot=a(((e,n)=>{var r=yt(),i=t(`crypto`),a=t(`url`),o=t(`http`),s=t(`https`),c=t(`http2`),l=t(`util`),u=t(`path`),d=Dt(),f=t(`zlib`),p=t(`stream`),m=t(`events`);function h(e,t){return function(){return e.apply(t,arguments)}}let{toString:g}=Object.prototype,{getPrototypeOf:_}=Object,{iterator:v,toStringTag:y}=Symbol,b=(e=>t=>{let n=g.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),x=e=>(e=e.toLowerCase(),t=>b(t)===e),S=e=>t=>typeof t===e,{isArray:C}=Array,w=S(`undefined`);function T(e){return e!==null&&!w(e)&&e.constructor!==null&&!w(e.constructor)&&k(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let E=x(`ArrayBuffer`);function D(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&E(e.buffer),t}let O=S(`string`),k=S(`function`),A=S(`number`),j=e=>typeof e==`object`&&!!e,M=e=>e===!0||e===!1,N=e=>{if(b(e)!==`object`)return!1;let t=_(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(y in e)&&!(v in e)},P=e=>{if(!j(e)||T(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},F=x(`Date`),I=x(`File`),L=e=>!!(e&&e.uri!==void 0),R=e=>e&&e.getParts!==void 0,z=x(`Blob`),B=x(`FileList`),V=e=>j(e)&&k(e.pipe);function ee(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}let H=ee(),U=H.FormData===void 0?void 0:H.FormData,W=e=>{if(!e)return!1;if(U&&e instanceof U)return!0;let t=_(e);if(!t||t===Object.prototype||!k(e.append))return!1;let n=b(e);return n===`formdata`||n===`object`&&k(e.toString)&&e.toString()===`[object FormData]`},te=x(`URLSearchParams`),[ne,re,ie,ae]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(x),oe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function se(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),C(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(T(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function ce(e,t){if(T(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}let G=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,le=e=>!w(e)&&e!==G;function ue(...e){let{caseless:t,skipUndefined:n}=le(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&ce(r,i)||i,o=Se(r,a)?r[a]:void 0;N(o)&&N(e)?r[a]=ue(o,e):N(e)?r[a]=ue({},e):C(e)?r[a]=e.slice():(!n||!w(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++)e[t]&&se(e[t],i);return r}let de=(e,t,n,{allOwnKeys:r}={})=>(se(t,(t,r)=>{n&&k(t)?Object.defineProperty(e,r,{__proto__:null,value:h(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),fe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},me=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},he=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},ge=e=>{if(!e)return null;if(C(e))return e;let t=e.length;if(!A(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},_e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&_(Uint8Array)),ve=(e,t)=>{let n=(e&&e[v]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},ye=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},be=x(`HTMLFormElement`),xe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Se=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ce=x(`RegExp`),we=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};se(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Te=e=>{we(e,(t,n)=>{if(k(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(k(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Ee=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return C(e)?r(e):r(String(e).split(t)),n},De=()=>{},Oe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ke(e){return!!(e&&k(e.append)&&e[y]===`FormData`&&e[v])}let Ae=e=>{let t=Array(10),n=(e,r)=>{if(j(e)){if(t.indexOf(e)>=0)return;if(T(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=C(e)?[]:{};return se(e,(e,t)=>{let a=n(e,r+1);!w(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},je=x(`AsyncFunction`),Me=e=>e&&(j(e)||k(e))&&k(e.then)&&k(e.catch),Ne=((e,t)=>e?setImmediate:t?((e,t)=>(G.addEventListener(`message`,({source:n,data:r})=>{n===G&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),G.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,k(G.postMessage));var K={isArray:C,isArrayBuffer:E,isBuffer:T,isFormData:W,isArrayBufferView:D,isString:O,isNumber:A,isBoolean:M,isObject:j,isPlainObject:N,isEmptyObject:P,isReadableStream:ne,isRequest:re,isResponse:ie,isHeaders:ae,isUndefined:w,isDate:F,isFile:I,isReactNativeBlob:L,isReactNative:R,isBlob:z,isRegExp:Ce,isFunction:k,isStream:V,isURLSearchParams:te,isTypedArray:_e,isFileList:B,forEach:se,merge:ue,extend:de,trim:oe,stripBOM:fe,inherits:pe,toFlatObject:me,kindOf:b,kindOfTest:x,endsWith:he,toArray:ge,forEachEntry:ve,matchAll:ye,isHTMLForm:be,hasOwnProperty:Se,hasOwnProp:Se,reduceDescriptors:we,freezeMethods:Te,toObjectSet:Ee,toCamelCase:xe,noop:De,toFiniteNumber:Oe,findKey:ce,global:G,isContextDefined:le,isSpecCompliantForm:ke,toJSONObject:Ae,isAsyncFn:je,isThenable:Me,setImmediate:Ne,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(G):typeof process<`u`&&process.nextTick||Ne,isIterable:e=>e!=null&&k(e[v])};let Pe=K.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]);var Fe=e=>{let t={},n,r,i;return e&&e.split(`
|
|
10
|
-
`).
|
|
11
|
-
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Ie]=this[Ie]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=ze(e);t[r]||(Ke(n,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}};q.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),K.reduceDescriptors(q.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),K.freezeMethods(q);function qe(e){if(K.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(K.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function Je(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||K.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof q&&(e=e.toJSON()),r.push(e);let t;if(K.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);K.isUndefined(r)||(t[n]=r)});else{if(!K.isPlainObject(e)&&qe(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?`[REDACTED ****]`:i(a);K.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var J=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&K.hasOwnProp(e,`redact`)?e.redact:void 0,n=K.isArray(t)&&t.length>0?Je(e,t):K.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};J.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,J.ERR_BAD_OPTION=`ERR_BAD_OPTION`,J.ECONNABORTED=`ECONNABORTED`,J.ETIMEDOUT=`ETIMEDOUT`,J.ECONNREFUSED=`ECONNREFUSED`,J.ERR_NETWORK=`ERR_NETWORK`,J.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,J.ERR_DEPRECATED=`ERR_DEPRECATED`,J.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,J.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,J.ERR_CANCELED=`ERR_CANCELED`,J.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,J.ERR_INVALID_URL=`ERR_INVALID_URL`,J.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function Ye(e){return K.isPlainObject(e)||K.isArray(e)}function Xe(e){return K.endsWith(e,`[]`)?e.slice(0,-2):e}function Ze(e,t,n){return e?e.concat(t).map(function(e,t){return e=Xe(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Qe(e){return K.isArray(e)&&!e.some(Ye)}let $e=K.toFlatObject(K,{},null,function(e){return/^is[A-Z]/.test(e)});function et(e,t,n){if(!K.isObject(e))throw TypeError(`target must be an object`);t||=new(r||FormData),n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!K.isUndefined(t[e])});let i=n.metaTokens,a=n.visitor||f,o=n.dots,s=n.indexes,c=n.Blob||typeof Blob<`u`&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,u=c&&K.isSpecCompliantForm(t);if(!K.isFunction(a))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(K.isDate(e))return e.toISOString();if(K.isBoolean(e))return e.toString();if(!u&&K.isBlob(e))throw new J(`Blob is not supported. Use a Buffer instead.`);return K.isArrayBuffer(e)||K.isTypedArray(e)?u&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function f(e,n,r){let a=e;if(K.isReactNative(t)&&K.isReactNativeBlob(e))return t.append(Ze(r,n,o),d(e)),!1;if(e&&!r&&typeof e==`object`){if(K.endsWith(n,`{}`))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&Qe(e)||(K.isFileList(e)||K.endsWith(n,`[]`))&&(a=K.toArray(e)))return n=Xe(n),a.forEach(function(e,r){!(K.isUndefined(e)||e===null)&&t.append(s===!0?Ze([n],r,o):s===null?n:n+`[]`,d(e))}),!1}return Ye(e)?!0:(t.append(Ze(r,n,o),d(e)),!1)}let p=[],m=Object.assign($e,{defaultVisitor:f,convertValue:d,isVisitable:Ye});function h(e,n,r=0){if(!K.isUndefined(e)){if(r>l)throw new J(`Object is too deeply nested (`+r+` levels). Max depth: `+l,J.ERR_FORM_DATA_DEPTH_EXCEEDED);if(p.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));p.push(e),K.forEach(e,function(e,i){(!(K.isUndefined(e)||e===null)&&a.call(t,e,K.isString(i)?i.trim():i,n,m))===!0&&h(e,n?n.concat(i):[i],r+1)}),p.pop()}}if(!K.isObject(e))throw TypeError(`data must be an object`);return h(e),t}function tt(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function nt(e,t){this._pairs=[],e&&et(e,this,t)}let rt=nt.prototype;rt.append=function(e,t){this._pairs.push([e,t])},rt.toString=function(e){let t=e?function(t){return e.call(this,t,tt)}:tt;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function it(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function at(e,t,n){if(!t)return e;let r=n&&n.encode||it,i=K.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):K.isURLSearchParams(t)?t.toString():new nt(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var ot=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){K.forEach(this.handlers,function(t){t!==null&&e(t)})}},st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ct=a.URLSearchParams;let lt=`abcdefghijklmnopqrstuvwxyz`,ut={DIGIT:`0123456789`,ALPHA:lt,ALPHA_DIGIT:lt+`ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`};var dt={isNode:!0,classes:{URLSearchParams:ct,FormData:r,Blob:typeof Blob<`u`&&Blob||null},ALPHABET:ut,generateString:(e=16,t=ut.ALPHA_DIGIT)=>{let n=``,{length:r}=t,a=new Uint32Array(e);i.randomFillSync(a);for(let i=0;i<e;i++)n+=t[a[i]%r];return n},protocols:[`http`,`https`,`file`,`data`]};let ft=typeof window<`u`&&typeof document<`u`,pt=typeof navigator==`object`&&navigator||void 0,mt=ft&&(!pt||[`ReactNative`,`NativeScript`,`NS`].indexOf(pt.product)<0),ht=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,gt=ft&&window.location.href||`http://localhost`;var Y={...Object.freeze({__proto__:null,hasBrowserEnv:ft,hasStandardBrowserEnv:mt,hasStandardBrowserWebWorkerEnv:ht,navigator:pt,origin:gt}),...dt};function _t(e,t){return et(e,new Y.classes.URLSearchParams,{visitor:function(e,t,n,r){return Y.isNode&&K.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function vt(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function bt(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function xt(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&K.isArray(r)?r.length:a,s?(K.hasOwnProp(r,a)?r[a]=K.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!r[a]||!K.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&K.isArray(r[a])&&(r[a]=bt(r[a])),!o)}if(K.isFormData(e)&&K.isFunction(e.entries)){let n={};return K.forEachEntry(e,(e,r)=>{t(vt(e),r,n,0)}),n}return null}let St=(e,t)=>e!=null&&K.hasOwnProp(e,t)?e[t]:void 0;function Ct(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}let wt={transitional:st,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=K.isObject(e);if(i&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return r?JSON.stringify(xt(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=St(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return _t(e,t).toString();if((a=K.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=St(this,`env`),r=n&&n.FormData;return et(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Ct(e)):e}],transformResponse:[function(e){let t=St(this,`transitional`)||wt.transitional,n=t&&t.forcedJSONParsing,r=St(this,`responseType`),i=r===`json`;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,St(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?J.from(e,J.ERR_BAD_RESPONSE,this,null,St(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:Y.classes.FormData,Blob:Y.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};K.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{wt.headers[e]={}});function Tt(e,t){let n=this||wt,r=t||n,i=q.from(r.headers),a=r.data;return K.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Et(e){return!!(e&&e.__CANCEL__)}var Ot=class extends J{constructor(e,t,n){super(e??`canceled`,J.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function kt(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new J(`Request failed with status code `+n.status,n.status>=400&&n.status<500?J.ERR_BAD_REQUEST:J.ERR_BAD_RESPONSE,n.config,n.request,n))}function At(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function jt(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function Mt(e,t,n){let r=!At(t);return e&&(r||n===!1)?jt(e,t):t}var Nt={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Pt(e){try{return new URL(e)}catch{return null}}function Ft(e){var t=(typeof e==`string`?Pt(e):e)||{},n=t.protocol,r=t.host,i=t.port;if(typeof r!=`string`||!r||typeof n!=`string`||(n=n.split(`:`,1)[0],r=r.replace(/:\d*$/,``),i=parseInt(i)||Nt[n]||0,!It(r,i)))return``;var a=Lt(n+`_proxy`)||Lt(`all_proxy`);return a&&a.indexOf(`://`)===-1&&(a=n+`://`+a),a}function It(e,t){var n=Lt(`no_proxy`).toLowerCase();return n?n===`*`?!1:n.split(/[,\s]/).every(function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),i=r?r[1]:n,a=r?parseInt(r[2]):0;return a&&a!==t?!0:/^[.*]/.test(i)?(i.charAt(0)===`*`&&(i=i.slice(1)),!e.endsWith(i)):e!==i}):!0}function Lt(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||``}let Rt=`1.16.0`;function zt(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}let Bt=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Vt(e,t,n){let r=n&&n.Blob||Y.classes.Blob,i=zt(e);if(t===void 0&&r&&(t=!0),i===`data`){e=i.length?e.slice(i.length+1):e;let n=Bt.exec(e);if(!n)throw new J(`Invalid URL`,J.ERR_INVALID_URL);let a=n[1],o=n[2],s=n[3],c=Buffer.from(decodeURIComponent(s),o?`base64`:`utf8`);if(t){if(!r)throw new J(`Blob is not supported`,J.ERR_NOT_SUPPORT);return new r([c],{type:a})}return c}throw new J(`Unsupported protocol `+i,J.ERR_NOT_SUPPORT)}let Ht=Symbol(`internals`);var Ut=class extends p.Transform{constructor(e){e=K.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(e,t)=>!K.isUndefined(t[e])),super({readableHighWaterMark:e.chunkSize});let t=this[Ht]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on(`newListener`,e=>{e===`progress`&&(t.isCaptured||=!0)})}_read(e){let t=this[Ht];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let r=this[Ht],i=r.maxRate,a=this.readableHighWaterMark,o=r.timeWindow,s=i/(1e3/o),c=r.minChunkSize===!1?0:Math.max(r.minChunkSize,s*.01),l=(e,t)=>{let n=Buffer.byteLength(e);r.bytesSeen+=n,r.bytes+=n,r.isCaptured&&this.emit(`progress`,r.bytesSeen),this.push(e)?process.nextTick(t):r.onReadCallback=()=>{r.onReadCallback=null,process.nextTick(t)}},u=(e,t)=>{let n=Buffer.byteLength(e),u=null,d=a,f,p=0;if(i){let e=Date.now();(!r.ts||(p=e-r.ts)>=o)&&(r.ts=e,f=s-r.bytes,r.bytes=f<0?-f:0,p=0),f=s-r.bytes}if(i){if(f<=0)return setTimeout(()=>{t(null,e)},o-p);f<d&&(d=f)}d&&n>d&&n-d>c&&(u=e.subarray(d),e=e.subarray(0,d)),l(e,u?()=>{process.nextTick(t,null,u)}:t)};u(e,function e(t,r){if(t)return n(t);r?u(r,e):n(null)})}};let{asyncIterator:Wt}=Symbol,Gt=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Wt]?yield*e[Wt]():yield e},Kt=Y.ALPHABET.ALPHA_DIGIT+`-_`,qt=typeof TextEncoder==`function`?new TextEncoder:new l.TextEncoder,Jt=qt.encode(`\r
|
|
12
|
-
`)
|
|
13
|
-
`;if(r)t=qt.encode(String(t).replace(/\r?\n|\r\n?/g,`\r
|
|
7
|
+
`+a),e.push(i+`m+`+t.exports.humanize(this.diff)+`\x1B[0m`)}else e[0]=s()+n+` `+e[0]}function s(){return e.inspectOpts.hideDate?``:new Date().toISOString()+` `}function c(...t){return process.stderr.write(i.formatWithOptions(e.inspectOpts,...t)+`
|
|
8
|
+
`)}function l(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function u(){return process.env.DEBUG}function d(t){t.inspectOpts={};let n=Object.keys(e.inspectOpts);for(let r=0;r<n.length;r++)t.inspectOpts[n[r]]=e.inspectOpts[n[r]]}t.exports=bt()(e);let{formatters:f}=t.exports;f.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split(`
|
|
9
|
+
`).map(e=>e.trim()).join(` `)},f.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}})),St=i(((e,t)=>{typeof process>`u`||process.type===`renderer`||process.browser===!0||process.__nwjs?t.exports=X():t.exports=xt()})),Ct=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){return function(t,n){return new Promise((r,i)=>{e.call(this,t,n,(e,t)=>{e?i(e):r(t)})})}}e.default=t})),wt=i(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let i=r(`events`),a=n(St()),o=n(Ct()),s=a.default(`agent-base`);function c(e){return!!e&&typeof e.addRequest==`function`}function l(){let{stack:e}=Error();return typeof e==`string`?e.split(`
|
|
10
|
+
`).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1):!1}function u(e,t){return new u.Agent(e,t)}(function(e){class t extends i.EventEmitter{constructor(e,t){super();let n=t;typeof e==`function`?this.callback=e:e&&(n=e),this.timeout=null,n&&typeof n.timeout==`number`&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort==`number`?this.explicitDefaultPort:l()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return typeof this.explicitProtocol==`string`?this.explicitProtocol:l()?`https:`:`http:`}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){let n=Object.assign({},t);typeof n.secureEndpoint!=`boolean`&&(n.secureEndpoint=l()),n.host??=`localhost`,n.port??=n.secureEndpoint?443:80,n.protocol??=n.secureEndpoint?`https:`:`http:`,n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,i=null,a=n.timeout||this.timeout,u=t=>{e._hadError||=(e.emit(`error`,t),!0)},d=()=>{i=null,r=!0;let e=Error(`A "socket" was not created for HTTP request before ${a}ms`);e.code=`ETIMEOUT`,u(e)},f=e=>{r||(i!==null&&(clearTimeout(i),i=null),u(e))},p=t=>{if(!r){if(i!=null&&(clearTimeout(i),i=null),c(t)){s(`Callback returned another Agent instance %o`,t.constructor.name),t.addRequest(e,n);return}if(t){t.once(`free`,()=>{this.freeSocket(t,n)}),e.onSocket(t);return}u(Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``))}};if(typeof this.callback!=`function`){u(Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(s(`Converting legacy callback function to promise`),this.promisifiedCallback=o.default(this.callback)):this.promisifiedCallback=this.callback),typeof a==`number`&&a>0&&(i=setTimeout(d,a)),`port`in n&&typeof n.port!=`number`&&(n.port=Number(n.port));try{s(`Resolving socket for %o request: %o`,n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(p,f)}catch(e){Promise.reject(e).catch(f)}}freeSocket(e,t){s(`Freeing socket %o %o`,e.constructor.name,t),e.destroy()}destroy(){s(`Destroying agent %o`,this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype})(u||={}),t.exports=u})),Tt=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});let n=t(St()).default(`https-proxy-agent:parse-proxy-response`);function r(e){return new Promise((t,r)=>{let i=0,a=[];function o(){let t=e.read();t?d(t):e.once(`readable`,o)}function s(){e.removeListener(`end`,l),e.removeListener(`error`,u),e.removeListener(`close`,c),e.removeListener(`readable`,o)}function c(e){n(`onclose had error %o`,e)}function l(){n(`onend`)}function u(e){s(),n(`onerror %o`,e),r(e)}function d(e){a.push(e),i+=e.length;let r=Buffer.concat(a,i);if(r.indexOf(`\r
|
|
11
|
+
\r
|
|
12
|
+
`)===-1){n(`have not received end of HTTP headers yet...`),o();return}let s=r.toString(`ascii`,0,r.indexOf(`\r
|
|
13
|
+
`)),c=+s.split(` `)[1];n(`got proxy server response: %o`,s),t({statusCode:c,buffered:r})}e.on(`error`,u),e.on(`close`,c),e.on(`end`,l),o()})}e.default=r})),Et=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});let i=n(r(`net`)),a=n(r(`tls`)),o=n(r(`url`)),s=n(r(`assert`)),c=n(St()),l=wt(),u=n(Tt()),d=c.default(`https-proxy-agent:agent`);e.default=class extends l.Agent{constructor(e){let t;if(t=typeof e==`string`?o.default.parse(e):e,!t)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");d(`creating new HttpsProxyAgent instance: %o`,t),super(t);let n=Object.assign({},t);this.secureProxy=t.secureProxy||m(n.protocol),n.host=n.hostname||n.host,typeof n.port==`string`&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!(`ALPNProtocols`in n)&&(n.ALPNProtocols=[`http 1.1`]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,n){return t(this,void 0,void 0,function*(){let{proxy:t,secureProxy:r}=this,o;r?(d("Creating `tls.Socket`: %o",t),o=a.default.connect(t)):(d("Creating `net.Socket`: %o",t),o=i.default.connect(t));let c=Object.assign({},t.headers),l=`CONNECT ${`${n.host}:${n.port}`} HTTP/1.1\r\n`;t.auth&&(c[`Proxy-Authorization`]=`Basic ${Buffer.from(t.auth).toString(`base64`)}`);let{host:m,port:g,secureEndpoint:_}=n;p(g,_)||(m+=`:${g}`),c.Host=m,c.Connection=`close`;for(let e of Object.keys(c))l+=`${e}: ${c[e]}\r\n`;let v=u.default(o);o.write(`${l}\r\n`);let{statusCode:y,buffered:b}=yield v;if(y===200){if(e.once(`socket`,f),n.secureEndpoint){d(`Upgrading socket connection to TLS`);let e=n.servername||n.host;return a.default.connect(Object.assign(Object.assign({},h(n,`host`,`hostname`,`path`,`port`)),{socket:o,servername:e}))}return o}o.destroy();let x=new i.default.Socket({writable:!1});return x.readable=!0,e.once(`socket`,e=>{d(`replaying proxy buffer for failed request`),s.default(e.listenerCount(`data`)>0),e.push(b),e.push(null)}),x})}};function f(e){e.resume()}function p(e,t){return!!(!t&&e===80||t&&e===443)}function m(e){return typeof e==`string`?/^https:?$/i.test(e):!1}function h(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}})),Dt=i(((e,t)=>{let n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Et());function r(e){return new n.default(e)}(function(e){e.HttpsProxyAgent=n.default,e.prototype=n.default.prototype})(r||={}),t.exports=r})),Ot=i(((e,t)=>{var n;t.exports=function(){if(!n){try{n=St()(`follow-redirects`)}catch{}typeof n!=`function`&&(n=function(){})}n.apply(null,arguments)}})),kt=i(((e,t)=>{var n=r(`url`),i=n.URL,a=r(`http`),o=r(`https`),s=r(`stream`).Writable,c=r(`assert`),l=Ot();(function(){var e=typeof process<`u`,t=typeof window<`u`&&typeof document<`u`,n=P(Error.captureStackTrace);!e&&(t||!n)&&console.warn(`The follow-redirects package should be excluded from browser builds.`)})();var u=!1;try{c(new i(``))}catch(e){u=e.code===`ERR_INVALID_URL`}var d=[`Authorization`,`Proxy-Authorization`,`Cookie`],f=[`auth`,`host`,`hostname`,`href`,`path`,`pathname`,`port`,`protocol`,`query`,`search`,`hash`],p=[`abort`,`aborted`,`connect`,`error`,`socket`,`timeout`],m=Object.create(null);p.forEach(function(e){m[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}});var h=k(`ERR_INVALID_URL`,`Invalid URL`,TypeError),g=k(`ERR_FR_REDIRECTION_FAILURE`,`Redirected request failed`),_=k(`ERR_FR_TOO_MANY_REDIRECTS`,`Maximum number of redirects exceeded`,g),v=k(`ERR_FR_MAX_BODY_LENGTH_EXCEEDED`,`Request body larger than maxBodyLength limit`),y=k(`ERR_STREAM_WRITE_AFTER_END`,`write after end`),b=s.prototype.destroy||C;function x(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on(`response`,t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit(`error`,e instanceof g?e:new g({cause:e}))}},this._headerFilter=RegExp(`^(?:`+d.concat(e.sensitiveHeaders).map(L).join(`|`)+`)$`,`i`),this._performRequest()}x.prototype=Object.create(s.prototype),x.prototype.abort=function(){A(this._currentRequest),this._currentRequest.abort(),this.emit(`abort`)},x.prototype.destroy=function(e){return A(this._currentRequest,e),b.call(this,e),this},x.prototype.write=function(e,t,n){if(this._ending)throw new y;if(!N(e)&&!F(e))throw TypeError(`data should be a string, Buffer or Uint8Array`);if(P(t)&&(n=t,t=null),e.length===0){n&&n();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit(`error`,new v),this.abort())},x.prototype.end=function(e,t,n){if(P(e)?(n=e,e=t=null):P(t)&&(n=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var r=this,i=this._currentRequest;this.write(e,t,function(){r._ended=!0,i.end(null,null,n)}),this._ending=!0}},x.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},x.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},x.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener(`timeout`,t.destroy),t.addListener(`timeout`,t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit(`timeout`),a()},e),r(t)}function a(){n._timeout&&=(clearTimeout(n._timeout),null),n.removeListener(`abort`,a),n.removeListener(`error`,a),n.removeListener(`response`,a),n.removeListener(`close`,a),t&&n.removeListener(`timeout`,t),n.socket||n._currentRequest.removeListener(`socket`,i)}return t&&this.on(`timeout`,t),this.socket?i(this.socket):this._currentRequest.once(`socket`,i),this.on(`socket`,r),this.on(`abort`,a),this.on(`error`,a),this.on(`response`,a),this.on(`close`,a),this},[`flushHeaders`,`getHeader`,`setNoDelay`,`setSocketKeepAlive`].forEach(function(e){x.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}),[`aborted`,`connection`,`socket`].forEach(function(e){Object.defineProperty(x.prototype,e,{get:function(){return this._currentRequest[e]}})}),x.prototype._sanitizeOptions=function(e){if(e.headers||={},M(e.sensitiveHeaders)||(e.sensitiveHeaders=[]),e.host&&(e.hostname||=e.host,delete e.host),!e.pathname&&e.path){var t=e.path.indexOf(`?`);t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},x.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw TypeError(`Unsupported protocol `+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var a of p)i.on(a,m[a]);if(this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,c=this._requestBodyBuffers;(function e(t){if(i===s._currentRequest)if(t)s.emit(`error`,t);else if(o<c.length){var n=c[o++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()})()}},x.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit(`response`,e),this._requestBodyBuffers=[];return}if(A(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new _;var i,a=this._options.beforeRedirect;a&&(i=Object.assign({Host:e.req.getHeader(`host`)},this._options.headers));var o=this._options.method;((t===301||t===302)&&this._options.method===`POST`||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method=`GET`,this._requestBodyBuffers=[],O(/^content-/i,this._options.headers));var s=O(/^host$/i,this._options.headers),c=w(this._currentUrl),u=s||c.host,d=/^\w+:/.test(r)?this._currentUrl:n.format(Object.assign(c,{host:u})),f=T(r,d);if(l(`redirecting to`,f.href),this._isRedirect=!0,D(f,this._options),(f.protocol!==c.protocol&&f.protocol!==`https:`||f.host!==u&&!j(f.host,u))&&O(this._headerFilter,this._options.headers),P(a)){var p={headers:e.headers,statusCode:t},m={url:d,method:o,headers:i};a(this._options,p,m),this._sanitizeOptions(this._options)}this._performRequest()};function S(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024},n={};return Object.keys(e).forEach(function(r){var i=r+`:`,a=n[i]=e[r],o=t[r]=Object.create(a);function s(e,r,a){return I(e)?e=D(e):N(e)?e=D(w(e)):(a=r,r=E(e),e={protocol:i}),P(r)&&(a=r,r=null),r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r),r.nativeProtocols=n,!N(r.host)&&!N(r.hostname)&&(r.hostname=`::1`),c.equal(r.protocol,i,`protocol mismatch`),l(`options`,r),new x(r,a)}function u(e,t,n){var r=o.request(e,t,n);return r.end(),r}Object.defineProperties(o,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function C(){}function w(e){var t;if(u)t=new i(e);else if(t=E(n.parse(e)),!N(t.protocol))throw new h({input:e});return t}function T(e,t){return u?new i(e,t):w(n.resolve(t,e))}function E(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname)||/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new h({input:e.href||e});return e}function D(e,t){var n=t||{};for(var r of f)n[r]=e[r];return n.hostname.startsWith(`[`)&&(n.hostname=n.hostname.slice(1,-1)),n.port!==``&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function O(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return n==null?void 0:String(n).trim()}function k(e,t,n){function r(n){P(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+`: `+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:`Error [`+e+`]`,enumerable:!1}}),r}function A(e,t){for(var n of p)e.removeListener(n,m[n]);e.on(`error`,C),e.destroy(t)}function j(e,t){c(N(e)&&N(t));var n=e.length-t.length-1;return n>0&&e[n]===`.`&&e.endsWith(t)}function M(e){return e instanceof Array}function N(e){return typeof e==`string`||e instanceof String}function P(e){return typeof e==`function`}function F(e){return typeof e==`object`&&`length`in e}function I(e){return i&&e instanceof i}function L(e){return e.replace(/[\]\\/()*+?.$]/g,`\\$&`)}t.exports=S({http:a,https:o}),t.exports.wrap=S})),At=i(((e,t)=>{var n=yt(),i=r(`crypto`),a=r(`url`),o=Dt(),s=r(`http`),c=r(`https`),l=r(`http2`),u=r(`util`),d=r(`path`),f=kt(),p=r(`zlib`),m=r(`stream`),h=r(`events`);function g(e,t){return function(){return e.apply(t,arguments)}}let{toString:_}=Object.prototype,{getPrototypeOf:v}=Object,{iterator:y,toStringTag:b}=Symbol,x=(e=>t=>{let n=_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),S=e=>(e=e.toLowerCase(),t=>x(t)===e),C=e=>t=>typeof t===e,{isArray:w}=Array,T=C(`undefined`);function E(e){return e!==null&&!T(e)&&e.constructor!==null&&!T(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let D=S(`ArrayBuffer`);function O(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&D(e.buffer),t}let k=C(`string`),A=C(`function`),j=C(`number`),M=e=>typeof e==`object`&&!!e,N=e=>e===!0||e===!1,P=e=>{if(x(e)!==`object`)return!1;let t=v(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(b in e)&&!(y in e)},F=e=>{if(!M(e)||E(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},I=S(`Date`),L=S(`File`),R=e=>!!(e&&e.uri!==void 0),z=e=>e&&e.getParts!==void 0,B=S(`Blob`),V=S(`FileList`),ee=e=>M(e)&&A(e.pipe);function H(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}let U=H(),W=U.FormData===void 0?void 0:U.FormData,te=e=>{if(!e)return!1;if(W&&e instanceof W)return!0;let t=v(e);if(!t||t===Object.prototype||!A(e.append))return!1;let n=x(e);return n===`formdata`||n===`object`&&A(e.toString)&&e.toString()===`[object FormData]`},ne=S(`URLSearchParams`),[re,ie,ae,oe]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(S),se=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function G(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),w(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(E(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function ce(e,t){if(E(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}let K=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,le=e=>!T(e)&&e!==K;function ue(...e){let{caseless:t,skipUndefined:n}=le(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&ce(r,i)||i,o=Se(r,a)?r[a]:void 0;P(o)&&P(e)?r[a]=ue(o,e):P(e)?r[a]=ue({},e):w(e)?r[a]=e.slice():(!n||!T(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++)e[t]&&G(e[t],i);return r}let de=(e,t,n,{allOwnKeys:r}={})=>(G(t,(t,r)=>{n&&A(t)?Object.defineProperty(e,r,{__proto__:null,value:g(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),fe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},me=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&v(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},he=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},ge=e=>{if(!e)return null;if(w(e))return e;let t=e.length;if(!j(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},_e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&v(Uint8Array)),ve=(e,t)=>{let n=(e&&e[y]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},ye=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},be=S(`HTMLFormElement`),xe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Se=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ce=S(`RegExp`),we=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};G(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Te=e=>{we(e,(t,n)=>{if(A(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(A(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Ee=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return w(e)?r(e):r(String(e).split(t)),n},De=()=>{},Oe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ke(e){return!!(e&&A(e.append)&&e[b]===`FormData`&&e[y])}let Ae=e=>{let t=new WeakSet,n=e=>{if(M(e)){if(t.has(e))return;if(E(e))return e;if(!(`toJSON`in e)){t.add(e);let r=w(e)?[]:{};return G(e,(e,t)=>{let i=n(e);!T(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},je=S(`AsyncFunction`),Me=e=>e&&(M(e)||A(e))&&A(e.then)&&A(e.catch),Ne=((e,t)=>e?setImmediate:t?((e,t)=>(K.addEventListener(`message`,({source:n,data:r})=>{n===K&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),K.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,A(K.postMessage));var q={isArray:w,isArrayBuffer:D,isBuffer:E,isFormData:te,isArrayBufferView:O,isString:k,isNumber:j,isBoolean:N,isObject:M,isPlainObject:P,isEmptyObject:F,isReadableStream:re,isRequest:ie,isResponse:ae,isHeaders:oe,isUndefined:T,isDate:I,isFile:L,isReactNativeBlob:R,isReactNative:z,isBlob:B,isRegExp:Ce,isFunction:A,isStream:ee,isURLSearchParams:ne,isTypedArray:_e,isFileList:V,forEach:G,merge:ue,extend:de,trim:se,stripBOM:fe,inherits:pe,toFlatObject:me,kindOf:x,kindOfTest:S,endsWith:he,toArray:ge,forEachEntry:ve,matchAll:ye,isHTMLForm:be,hasOwnProperty:Se,hasOwnProp:Se,reduceDescriptors:we,freezeMethods:Te,toObjectSet:Ee,toCamelCase:xe,noop:De,toFiniteNumber:Oe,findKey:ce,global:K,isContextDefined:le,isSpecCompliantForm:ke,toJSONObject:Ae,isAsyncFn:je,isThenable:Me,setImmediate:Ne,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(K):typeof process<`u`&&process.nextTick||Ne,isIterable:e=>e!=null&&A(e[y])};let Pe=q.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]);var Fe=e=>{let t={},n,r,i;return e&&e.split(`
|
|
14
|
+
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Pe[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function Ie(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}let Le=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Re=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function ze(e,t){return q.isArray(e)?e.map(e=>ze(e,t)):Ie(String(e).replace(t,``))}let Be=e=>ze(e,Le),Ve=e=>ze(e,Re);function He(e){let t=Object.create(null);return q.forEach(e.toJSON(),(e,n)=>{t[n]=Ve(e)}),t}let Ue=Symbol(`internals`);function We(e){return e&&String(e).trim().toLowerCase()}function Ge(e){return e===!1||e==null?e:q.isArray(e)?e.map(Ge):Be(String(e))}function Ke(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}let qe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Je(e,t,n,r,i){if(q.isFunction(r))return r.call(this,t,n);if(i&&(t=n),q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function Ye(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Xe(e,t){let n=q.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var J=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=We(t);if(!i)throw Error(`header name must be a non-empty string`);let a=q.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=Ge(e))}let a=(e,t)=>q.forEach(e,(e,n)=>i(e,n,t));if(q.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(q.isString(e)&&(e=e.trim())&&!qe(e))a(Fe(e),t);else if(q.isObject(e)&&q.isIterable(e)){let n={},r,i;for(let t of e){if(!q.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?q.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=We(e),e){let n=q.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return Ke(e);if(q.isFunction(t))return t.call(this,e,n);if(q.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=We(e),e){let n=q.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Je(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=We(e),e){let i=q.findKey(n,e);i&&(!t||Je(n,n[i],i,t))&&(delete n[i],r=!0)}}return q.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||Je(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return q.forEach(this,(r,i)=>{let a=q.findKey(n,i);if(a){t[a]=Ge(r),delete t[i];return}let o=e?Ye(i):String(i).trim();o!==i&&delete t[i],t[o]=Ge(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return q.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&q.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
|
15
|
+
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Ue]=this[Ue]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=We(e);t[r]||(Xe(n,e),t[r]=!0)}return q.isArray(e)?e.forEach(r):r(e),this}};J.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),q.reduceDescriptors(J.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),q.freezeMethods(J);function Ze(e){if(q.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(q.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function Qe(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||q.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof J&&(e=e.toJSON()),r.push(e);let t;if(q.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);q.isUndefined(r)||(t[n]=r)});else{if(!q.isPlainObject(e)&&Ze(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?`[REDACTED ****]`:i(a);q.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var Y=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&q.hasOwnProp(e,`redact`)?e.redact:void 0,n=q.isArray(t)&&t.length>0?Qe(e,t):q.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,Y.ERR_BAD_OPTION=`ERR_BAD_OPTION`,Y.ECONNABORTED=`ECONNABORTED`,Y.ETIMEDOUT=`ETIMEDOUT`,Y.ECONNREFUSED=`ECONNREFUSED`,Y.ERR_NETWORK=`ERR_NETWORK`,Y.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,Y.ERR_DEPRECATED=`ERR_DEPRECATED`,Y.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,Y.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,Y.ERR_CANCELED=`ERR_CANCELED`,Y.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,Y.ERR_INVALID_URL=`ERR_INVALID_URL`,Y.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function $e(e){return q.isPlainObject(e)||q.isArray(e)}function et(e){return q.endsWith(e,`[]`)?e.slice(0,-2):e}function tt(e,t,n){return e?e.concat(t).map(function(e,t){return e=et(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function nt(e){return q.isArray(e)&&!e.some($e)}let rt=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function it(e,t,r){if(!q.isObject(e))throw TypeError(`target must be an object`);t||=new(n||FormData),r=q.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!q.isUndefined(t[e])});let i=r.metaTokens,a=r.visitor||f,o=r.dots,s=r.indexes,c=r.Blob||typeof Blob<`u`&&Blob,l=r.maxDepth===void 0?100:r.maxDepth,u=c&&q.isSpecCompliantForm(t);if(!q.isFunction(a))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(q.isDate(e))return e.toISOString();if(q.isBoolean(e))return e.toString();if(!u&&q.isBlob(e))throw new Y(`Blob is not supported. Use a Buffer instead.`);return q.isArrayBuffer(e)||q.isTypedArray(e)?u&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function f(e,n,r){let a=e;if(q.isReactNative(t)&&q.isReactNativeBlob(e))return t.append(tt(r,n,o),d(e)),!1;if(e&&!r&&typeof e==`object`){if(q.endsWith(n,`{}`))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(q.isArray(e)&&nt(e)||(q.isFileList(e)||q.endsWith(n,`[]`))&&(a=q.toArray(e)))return n=et(n),a.forEach(function(e,r){!(q.isUndefined(e)||e===null)&&t.append(s===!0?tt([n],r,o):s===null?n:n+`[]`,d(e))}),!1}return $e(e)?!0:(t.append(tt(r,n,o),d(e)),!1)}let p=[],m=Object.assign(rt,{defaultVisitor:f,convertValue:d,isVisitable:$e});function h(e,n,r=0){if(!q.isUndefined(e)){if(r>l)throw new Y(`Object is too deeply nested (`+r+` levels). Max depth: `+l,Y.ERR_FORM_DATA_DEPTH_EXCEEDED);if(p.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));p.push(e),q.forEach(e,function(e,i){(!(q.isUndefined(e)||e===null)&&a.call(t,e,q.isString(i)?i.trim():i,n,m))===!0&&h(e,n?n.concat(i):[i],r+1)}),p.pop()}}if(!q.isObject(e))throw TypeError(`data must be an object`);return h(e),t}function at(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function ot(e,t){this._pairs=[],e&&it(e,this,t)}let st=ot.prototype;st.append=function(e,t){this._pairs.push([e,t])},st.toString=function(e){let t=e?function(t){return e.call(this,t,at)}:at;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function ct(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function lt(e,t,n){if(!t)return e;let r=n&&n.encode||ct,i=q.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):q.isURLSearchParams(t)?t.toString():new ot(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var ut=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){q.forEach(this.handlers,function(t){t!==null&&e(t)})}},dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ft=a.URLSearchParams;let pt={DIGIT:`0123456789`,ALPHA:`abcdefghijklmnopqrstuvwxyz`,ALPHA_DIGIT:`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`};var mt={isNode:!0,classes:{URLSearchParams:ft,FormData:n,Blob:typeof Blob<`u`&&Blob||null},ALPHABET:pt,generateString:(e=16,t=pt.ALPHA_DIGIT)=>{let n=``,{length:r}=t,a=new Uint32Array(e);i.randomFillSync(a);for(let i=0;i<e;i++)n+=t[a[i]%r];return n},protocols:[`http`,`https`,`file`,`data`]};let ht=typeof window<`u`&&typeof document<`u`,gt=typeof navigator==`object`&&navigator||void 0,_t=ht&&(!gt||[`ReactNative`,`NativeScript`,`NS`].indexOf(gt.product)<0),vt=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,bt=ht&&window.location.href||`http://localhost`;var X={...Object.freeze({__proto__:null,hasBrowserEnv:ht,hasStandardBrowserEnv:_t,hasStandardBrowserWebWorkerEnv:vt,navigator:gt,origin:bt}),...mt};function xt(e,t){return it(e,new X.classes.URLSearchParams,{visitor:function(e,t,n,r){return X.isNode&&q.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function St(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function Ct(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function wt(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&q.isArray(r)?r.length:a,s?(q.hasOwnProp(r,a)?r[a]=q.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!q.hasOwnProp(r,a)||!q.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&q.isArray(r[a])&&(r[a]=Ct(r[a])),!o)}if(q.isFormData(e)&&q.isFunction(e.entries)){let n={};return q.forEachEntry(e,(e,r)=>{t(St(e),r,n,0)}),n}return null}let Tt=(e,t)=>e!=null&&q.hasOwnProp(e,t)?e[t]:void 0;function Et(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}let Ot={transitional:dt,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=q.isObject(e);if(i&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return r?JSON.stringify(wt(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Tt(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return xt(e,t).toString();if((a=q.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Tt(this,`env`),r=n&&n.FormData;return it(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Et(e)):e}],transformResponse:[function(e){let t=Tt(this,`transitional`)||Ot.transitional,n=t&&t.forcedJSONParsing,r=Tt(this,`responseType`),i=r===`json`;if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Tt(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?Y.from(e,Y.ERR_BAD_RESPONSE,this,null,Tt(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:X.classes.FormData,Blob:X.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{Ot.headers[e]={}});function At(e,t){let n=this||Ot,r=t||n,i=J.from(r.headers),a=r.data;return q.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function jt(e){return!!(e&&e.__CANCEL__)}var Mt=class extends Y{constructor(e,t,n){super(e??`canceled`,Y.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Nt(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Y(`Request failed with status code `+n.status,n.status>=400&&n.status<500?Y.ERR_BAD_REQUEST:Y.ERR_BAD_RESPONSE,n.config,n.request,n))}function Pt(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Ft(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function It(e,t,n){let r=!Pt(t);return e&&(r||n===!1)?Ft(e,t):t}var Lt={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Rt(e){try{return new URL(e)}catch{return null}}function zt(e){var t=(typeof e==`string`?Rt(e):e)||{},n=t.protocol,r=t.host,i=t.port;if(typeof r!=`string`||!r||typeof n!=`string`||(n=n.split(`:`,1)[0],r=r.replace(/:\d*$/,``),i=parseInt(i)||Lt[n]||0,!Bt(r,i)))return``;var a=Vt(n+`_proxy`)||Vt(`all_proxy`);return a&&a.indexOf(`://`)===-1&&(a=n+`://`+a),a}function Bt(e,t){var n=Vt(`no_proxy`).toLowerCase();return n?n===`*`?!1:n.split(/[,\s]/).every(function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),i=r?r[1]:n,a=r?parseInt(r[2]):0;return a&&a!==t?!0:/^[.*]/.test(i)?(i.charAt(0)===`*`&&(i=i.slice(1)),!e.endsWith(i)):e!==i}):!0}function Vt(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||``}let Ht=`1.16.1`;function Ut(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}let Wt=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function Gt(e,t,n){let r=n&&n.Blob||X.classes.Blob,i=Ut(e);if(t===void 0&&r&&(t=!0),i===`data`){e=i.length?e.slice(i.length+1):e;let n=Wt.exec(e);if(!n)throw new Y(`Invalid URL`,Y.ERR_INVALID_URL);let a=n[1],o=n[2],s=n[3]?`base64`:`utf8`,c=n[4],l;a?l=o?a+o:a:o&&(l=`text/plain`+o);let u=Buffer.from(decodeURIComponent(c),s);if(t){if(!r)throw new Y(`Blob is not supported`,Y.ERR_NOT_SUPPORT);return new r([u],{type:l})}return u}throw new Y(`Unsupported protocol `+i,Y.ERR_NOT_SUPPORT)}let Kt=Symbol(`internals`);var qt=class extends m.Transform{constructor(e){e=q.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(e,t)=>!q.isUndefined(t[e])),super({readableHighWaterMark:e.chunkSize});let t=this[Kt]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on(`newListener`,e=>{e===`progress`&&(t.isCaptured||=!0)})}_read(e){let t=this[Kt];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let r=this[Kt],i=r.maxRate,a=this.readableHighWaterMark,o=r.timeWindow,s=i/(1e3/o),c=r.minChunkSize===!1?0:Math.max(r.minChunkSize,s*.01),l=(e,t)=>{let n=Buffer.byteLength(e);r.bytesSeen+=n,r.bytes+=n,r.isCaptured&&this.emit(`progress`,r.bytesSeen),this.push(e)?process.nextTick(t):r.onReadCallback=()=>{r.onReadCallback=null,process.nextTick(t)}},u=(e,t)=>{let n=Buffer.byteLength(e),u=null,d=a,f,p=0;if(i){let e=Date.now();(!r.ts||(p=e-r.ts)>=o)&&(r.ts=e,f=s-r.bytes,r.bytes=f<0?-f:0,p=0),f=s-r.bytes}if(i){if(f<=0)return setTimeout(()=>{t(null,e)},o-p);f<d&&(d=f)}d&&n>d&&n-d>c&&(u=e.subarray(d),e=e.subarray(0,d)),l(e,u?()=>{process.nextTick(t,null,u)}:t)};u(e,function e(t,r){if(t)return n(t);r?u(r,e):n(null)})}};let{asyncIterator:Jt}=Symbol,Yt=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Jt]?yield*e[Jt]():yield e},Xt=X.ALPHABET.ALPHA_DIGIT+`-_`,Zt=typeof TextEncoder==`function`?new TextEncoder:new u.TextEncoder,Qt=Zt.encode(`\r
|
|
16
|
+
`);var $t=class{constructor(e,t){let{escapeName:n}=this.constructor,r=q.isString(t),i=`Content-Disposition: form-data; name="${n(e)}"${!r&&t.name?`; filename="${n(t.name)}"`:``}\r
|
|
17
|
+
`;if(r)t=Zt.encode(String(t).replace(/\r?\n|\r\n?/g,`\r
|
|
14
18
|
`));else{let e=String(t.type||`application/octet-stream`).replace(/[\r\n]/g,``);i+=`Content-Type: ${e}\r
|
|
15
|
-
`}this.headers=
|
|
16
|
-
`),this.contentLength=r?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;
|
|
17
|
-
`),s=
|
|
18
|
-
`),c=s.byteLength,l=Array.from(e.entries()).map(([e,t])=>{let n=new Yt(e,t);return c+=n.size,n});c+=o.byteLength*l.length,c=K.toFiniteNumber(c);let u={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(c)&&(u[`Content-Length`]=c),t&&t(u),p.Readable.from(async function*(){for(let e of l)yield o,yield*e.encode();yield s}())};var Zt=class extends p.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,n)}};let Qt=(e,t)=>K.isAsyncFn(e)?function(...n){let r=n.pop();e.apply(this,n).then(e=>{try{t?r(null,...t(e)):r(null,e)}catch(e){r(e)}},r)}:e,$t=new Set([`localhost`]),en=e=>{let t=e.split(`.`);return t.length!==4||t[0]!==`127`?!1:t.every(e=>/^\d+$/.test(e)&&Number(e)>=0&&Number(e)<=255)},tn=e=>{if(e===`::1`)return!0;let t=e.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return en(t[1]);let n=e.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(n){let e=parseInt(n[1],16);return e>=32512&&e<=32767}let r=e.split(`:`);if(r.length===8){for(let e=0;e<7;e++)if(!/^0+$/.test(r[e]))return!1;return/^0*1$/.test(r[7])}return!1},nn=e=>e?$t.has(e)||en(e)?!0:tn(e):!1,rn={http:80,https:443,ws:80,wss:443,ftp:21},an=e=>{let t=e,n=0;if(t.charAt(0)===`[`){let e=t.indexOf(`]`);if(e!==-1){let r=t.slice(1,e),i=t.slice(e+1);return i.charAt(0)===`:`&&/^\d+$/.test(i.slice(1))&&(n=Number.parseInt(i.slice(1),10)),[r,n]}}let r=t.indexOf(`:`),i=t.lastIndexOf(`:`);return r!==-1&&r===i&&/^\d+$/.test(t.slice(i+1))&&(n=Number.parseInt(t.slice(i+1),10),t=t.slice(0,i)),[t,n]},on=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,sn=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,cn=e=>{if(typeof e!=`string`||e.indexOf(`:`)===-1)return e;let t=e.match(on);if(t)return t[1];let n=e.match(sn);if(n){let e=parseInt(n[1],16),t=parseInt(n[2],16);return`${e>>8}.${e&255}.${t>>8}.${t&255}`}return e},ln=e=>e&&(e.charAt(0)===`[`&&e.charAt(e.length-1)===`]`&&(e=e.slice(1,-1)),cn(e.replace(/\.+$/,``)));function un(e){let t;try{t=new URL(e)}catch{return!1}let n=(process.env.no_proxy||process.env.NO_PROXY||``).toLowerCase();if(!n)return!1;if(n===`*`)return!0;let r=Number.parseInt(t.port,10)||rn[t.protocol.split(`:`,1)[0]]||0,i=ln(t.hostname.toLowerCase());return n.split(/[\s,]+/).some(e=>{if(!e)return!1;let[t,n]=an(e);return t=ln(t),!t||n&&n!==r?!1:(t.charAt(0)===`*`&&(t=t.slice(1)),t.charAt(0)===`.`?i.endsWith(t):i===t||nn(i)&&nn(t))})}function dn(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function fn(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}let pn=(e,t,n=3)=>{let r=0,i=dn(50,250);return fn(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},mn=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},hn=e=>(...t)=>K.asap(()=>e(...t));function gn(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}if(typeof Buffer<`u`&&typeof Buffer.byteLength==`function`)return Buffer.byteLength(r,`utf8`);let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}let _n={flush:f.constants.Z_SYNC_FLUSH,finishFlush:f.constants.Z_SYNC_FLUSH},vn={flush:f.constants.BROTLI_OPERATION_FLUSH,finishFlush:f.constants.BROTLI_OPERATION_FLUSH},yn=K.isFunction(f.createBrotliDecompress),{http:bn,https:xn}=d,Sn=/https:?/,Cn=[`content-type`,`content-length`];function wn(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{Cn.includes(t.toLowerCase())&&e.set(t,n)})}let Tn=Symbol(`axios.http.socketListener`),En=Symbol(`axios.http.currentReq`),Dn=Y.protocols.map(e=>e+`:`),On=e=>{if(!K.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},kn=(e,[t,n])=>(e.on(`end`,n).on(`error`,n),t),An=new class{constructor(){this.sessions=Object.create(null)}getSession(e,t){t=Object.assign({sessionTimeout:1e3},t);let n=this.sessions[e];if(n){let e=n.length;for(let r=0;r<e;r++){let[e,i]=n[r];if(!e.destroyed&&!e.closed&&l.isDeepStrictEqual(i,t))return e}}let r=c.connect(e,t),i,a=()=>{if(i)return;i=!0;let t=n,a=t.length,o=a;for(;o--;)if(t[o][0]===r){a===1?delete this.sessions[e]:t.splice(o,1),r.closed||r.close();return}},o=r.request,{sessionTimeout:s}=t;if(s!=null){let e,t=0;r.request=function(){let n=o.apply(this,arguments);return t++,e&&=(clearTimeout(e),null),n.once(`close`,()=>{--t||(e=setTimeout(()=>{e=null,a()},s))}),n}}r.once(`close`,a);let u=[r,t];return n?n.push(u):n=this.sessions[e]=[u],r}};function jn(e,t,n){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t,n)}function Mn(e,t,n,r){let i=t;if(!i&&i!==!1){let e=Ft(n);e&&(un(n)||(i=new URL(e)))}if(r&&e.headers)for(let t of Object.keys(e.headers))t.toLowerCase()===`proxy-authorization`&&delete e.headers[t];if(i){let t=i instanceof URL,r=e=>t||K.hasOwnProp(i,e)?i[e]:void 0,a=r(`username`),o=r(`password`),s=K.hasOwnProp(i,`auth`)?i.auth:void 0;if(a&&(s=(a||``)+`:`+(o||``)),s){let t=typeof s==`object`,n=t&&K.hasOwnProp(s,`username`)?s.username:void 0,r=t&&K.hasOwnProp(s,`password`)?s.password:void 0;if(n||r)s=(n||``)+`:`+(r||``);else if(t)throw new J(`Invalid proxy authorization`,J.ERR_BAD_OPTION,{proxy:i});let a=Buffer.from(s,`utf8`).toString(`base64`);e.headers[`Proxy-Authorization`]=`Basic `+a}let c=!1;for(let t of Object.keys(e.headers))if(t.toLowerCase()===`host`){c=!0;break}c||(e.headers.host=e.hostname+(e.port?`:`+e.port:``));let l=r(`hostname`)||r(`host`);e.hostname=l,e.host=l,e.port=r(`port`),e.path=n;let u=r(`protocol`);u&&(e.protocol=u.includes(`:`)?u:`${u}:`)}e.beforeRedirects.proxy=function(e){Mn(e,t,e.href,!0)}}let Nn=typeof process<`u`&&K.kindOf(process)===`process`,Pn=e=>new Promise((t,n)=>{let r,i,a=(e,t)=>{i||(i=!0,r&&r(e,t))},o=e=>{a(e),t(e)},s=e=>{a(e,!0),n(e)};e(o,s,e=>r=e).catch(s)}),Fn=({address:e,family:t})=>{if(!K.isString(e))throw TypeError(`address must be a string`);return{address:e,family:t||(e.indexOf(`.`)<0?6:4)}},In=(e,t)=>Fn(K.isObject(e)?e:{address:e,family:t}),Ln={request(e,t){let n=e.protocol+`//`+e.hostname+`:`+(e.port||(e.protocol===`https:`?443:80)),{http2Options:r,headers:i}=e,a=An.getSession(n,r),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:s,HTTP2_HEADER_PATH:l,HTTP2_HEADER_STATUS:u}=c.constants,d={[o]:e.protocol.replace(`:`,``),[s]:e.method,[l]:e.path};K.forEach(i,(e,t)=>{t.charAt(0)!==`:`&&(d[t]=e)});let f=a.request(d);return f.once(`response`,e=>{let n=f;e=Object.assign({},e);let r=e[u];delete e[u],n.headers=e,n.statusCode=+r,t(n)}),f}};var Rn=Nn&&function(e){return Pn(async function(t,n,r){let i=t=>K.hasOwnProp(e,t)?e[t]:void 0,a=i(`data`),c=i(`lookup`),d=i(`family`),h=i(`httpVersion`);h===void 0&&(h=1);let g=i(`http2Options`),_=i(`responseType`),v=i(`responseEncoding`),y=e.method.toUpperCase(),b,x=!1,S,C;if(h=+h,Number.isNaN(h))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(h!==1&&h!==2)throw TypeError(`Unsupported protocol version '${h}'`);let w=h===2;if(c){let e=Qt(c,e=>K.isArray(e)?e:[e]);c=(t,n,r)=>{e(t,n,(e,t,i)=>{if(e)return r(e);let a=K.isArray(t)?t.map(e=>In(e)):[In(t,i)];n.all?r(e,a):r(e,a[0].address,a[0].family)})}}let T=new m.EventEmitter;function E(t){try{T.emit(`abort`,!t||t.type?new Ot(null,e,S):t)}catch(e){console.warn(`emit error`,e)}}function D(){C&&=(clearTimeout(C),null)}function O(){let t=e.timeout?`timeout of `+e.timeout+`ms exceeded`:`timeout exceeded`,n=e.transitional||st;return e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),new J(t,n.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,S)}T.once(`abort`,n);let k=()=>{D(),e.cancelToken&&e.cancelToken.unsubscribe(E),e.signal&&e.signal.removeEventListener(`abort`,E),T.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(E),e.signal&&(e.signal.aborted?E():e.signal.addEventListener(`abort`,E))),r((e,t)=>{if(b=!0,D(),t){x=!0,k();return}let{data:n}=e;if(n instanceof p.Readable||n instanceof p.Duplex){let e=p.finished(n,()=>{e(),k()})}else k()});let A=Mt(e.baseURL,e.url,e.allowAbsoluteUrls),j=new URL(A,Y.hasBrowserEnv?Y.origin:void 0),M=j.protocol||Dn[0];if(M===`data:`){if(e.maxContentLength>-1&&gn(String(e.url||A||``))>e.maxContentLength)return n(new J(`maxContentLength size of `+e.maxContentLength+` exceeded`,J.ERR_BAD_RESPONSE,e));let r;if(y!==`GET`)return kt(t,n,{status:405,statusText:`method not allowed`,headers:{},config:e});try{r=Vt(e.url,_===`blob`,{Blob:e.env&&e.env.Blob})}catch(t){throw J.from(t,J.ERR_BAD_REQUEST,e)}return _===`text`?(r=r.toString(v),(!v||v===`utf8`)&&(r=K.stripBOM(r))):_===`stream`&&(r=p.Readable.from(r)),kt(t,n,{data:r,status:200,statusText:`OK`,headers:new q,config:e})}if(Dn.indexOf(M)===-1)return n(new J(`Unsupported protocol `+M,J.ERR_BAD_REQUEST,e));let N=q.from(e.headers).normalize();N.set(`User-Agent`,`axios/`+Rt,!1);let{onUploadProgress:P,onDownloadProgress:F}=e,I=e.maxRate,L,R;if(K.isSpecCompliantForm(a)){let e=N.getContentType(/boundary=([-_\w\d]{10,70})/i);a=Xt(a,e=>{N.set(e)},{tag:`axios-${Rt}-boundary`,boundary:e&&e[1]||void 0})}else if(K.isFormData(a)&&K.isFunction(a.getHeaders)&&a.getHeaders!==Object.prototype.getHeaders){if(wn(N,a.getHeaders(),i(`formDataHeaderPolicy`)),!N.hasContentLength())try{let e=await l.promisify(a.getLength).call(a);Number.isFinite(e)&&e>=0&&N.setContentLength(e)}catch{}}else if(K.isBlob(a)||K.isFile(a))a.size&&N.setContentType(a.type||`application/octet-stream`),N.setContentLength(a.size||0),a=p.Readable.from(Gt(a));else if(a&&!K.isStream(a)){if(!Buffer.isBuffer(a))if(K.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(K.isString(a))a=Buffer.from(a,`utf-8`);else return n(new J(`Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream`,J.ERR_BAD_REQUEST,e));if(N.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return n(new J(`Request body larger than maxBodyLength limit`,J.ERR_BAD_REQUEST,e))}let z=K.toFiniteNumber(N.getContentLength());K.isArray(I)?(L=I[0],R=I[1]):L=R=I,a&&(P||L)&&(K.isStream(a)||(a=p.Readable.from(a,{objectMode:!1})),a=p.pipeline([a,new Ut({maxRate:K.toFiniteNumber(L)})],K.noop),P&&a.on(`progress`,kn(a,mn(z,pn(hn(P),!1,3)))));let B,V=i(`auth`);if(V){let e=V.username||``,t=V.password||``;B=e+`:`+t}if(!B&&j.username){let e=On(j.username),t=On(j.password);B=e+`:`+t}B&&N.delete(`authorization`);let ee;try{ee=at(j.pathname+j.search,e.params,e.paramsSerializer).replace(/^\?/,``)}catch(t){let r=Error(t.message);return r.config=e,r.url=e.url,r.exists=!0,n(r)}N.set(`Accept-Encoding`,`gzip, compress, deflate`+(yn?`, br`:``),!1);let H=Object.assign(Object.create(null),{path:ee,method:y,headers:N.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:B,protocol:M,family:d,beforeRedirect:jn,beforeRedirects:Object.create(null),http2Options:g});if(!K.isUndefined(c)&&(H.lookup=c),e.socketPath){if(typeof e.socketPath!=`string`)return n(new J(`socketPath must be a string`,J.ERR_BAD_OPTION_VALUE,e));if(e.allowedSocketPaths!=null){let t=Array.isArray(e.allowedSocketPaths)?e.allowedSocketPaths:[e.allowedSocketPaths],r=u.resolve(e.socketPath);if(!t.some(e=>typeof e==`string`&&u.resolve(e)===r))return n(new J(`socketPath "${e.socketPath}" is not permitted by allowedSocketPaths`,J.ERR_BAD_OPTION_VALUE,e))}H.socketPath=e.socketPath}else H.hostname=j.hostname.startsWith(`[`)?j.hostname.slice(1,-1):j.hostname,H.port=j.port,Mn(H,e.proxy,M+`//`+j.hostname+(j.port?`:`+j.port:``)+H.path);let U,W=!1,te=Sn.test(H.protocol);if(H.agent=te?e.httpsAgent:e.httpAgent,w)U=Ln;else{let t=i(`transport`);if(t)U=t;else if(e.maxRedirects===0)U=te?s:o,W=!0;else{e.maxRedirects&&(H.maxRedirects=e.maxRedirects);let t=i(`beforeRedirect`);t&&(H.beforeRedirects.config=t),U=te?xn:bn}}e.maxBodyLength>-1?H.maxBodyLength=e.maxBodyLength:H.maxBodyLength=1/0,H.insecureHTTPParser=!!i(`insecureHTTPParser`),S=U.request(H,function(r){if(D(),S.destroyed)return;let i=[r],a=K.toFiniteNumber(r.headers[`content-length`]);if(F||R){let e=new Ut({maxRate:K.toFiniteNumber(R)});F&&e.on(`progress`,kn(e,mn(a,pn(hn(F),!0,3)))),i.push(e)}let o=r,s=r.req||S;if(e.decompress!==!1&&r.headers[`content-encoding`])switch((y===`HEAD`||r.statusCode===204)&&delete r.headers[`content-encoding`],(r.headers[`content-encoding`]||``).toLowerCase()){case`gzip`:case`x-gzip`:case`compress`:case`x-compress`:i.push(f.createUnzip(_n)),delete r.headers[`content-encoding`];break;case`deflate`:i.push(new Zt),i.push(f.createUnzip(_n)),delete r.headers[`content-encoding`];break;case`br`:yn&&(i.push(f.createBrotliDecompress(vn)),delete r.headers[`content-encoding`])}o=i.length>1?p.pipeline(i,K.noop):i[0];let c={status:r.statusCode,statusText:r.statusMessage,headers:new q(r.headers),config:e,request:s};if(_===`stream`){if(e.maxContentLength>-1){let t=e.maxContentLength,n=o;async function*r(){let r=0;for await(let i of n){if(r+=i.length,r>t)throw new J(`maxContentLength size of `+t+` exceeded`,J.ERR_BAD_RESPONSE,e,s);yield i}}o=p.Readable.from(r(),{objectMode:!1})}c.data=o,kt(t,n,c)}else{let r=[],i=0;o.on(`data`,function(t){r.push(t),i+=t.length,e.maxContentLength>-1&&i>e.maxContentLength&&(x=!0,o.destroy(),E(new J(`maxContentLength size of `+e.maxContentLength+` exceeded`,J.ERR_BAD_RESPONSE,e,s)))}),o.on(`aborted`,function(){if(x)return;let t=new J(`stream has been aborted`,J.ERR_BAD_RESPONSE,e,s,c);o.destroy(t),n(t)}),o.on(`error`,function(t){x||n(J.from(t,null,e,s,c))}),o.on(`end`,function(){try{let e=r.length===1?r[0]:Buffer.concat(r);_!==`arraybuffer`&&(e=e.toString(v),(!v||v===`utf8`)&&(e=K.stripBOM(e))),c.data=e}catch(t){return n(J.from(t,null,e,c.request,c))}kt(t,n,c)})}T.once(`abort`,e=>{o.destroyed||(o.emit(`error`,e),o.destroy())})}),T.once(`abort`,e=>{S.close?S.close():S.destroy(e)}),S.on(`error`,function(t){n(J.from(t,null,e,S))});let ne=new Set;if(S.on(`socket`,function(e){e.setKeepAlive(!0,1e3*60),e[Tn]||(e.on(`error`,function(t){let n=e[En];n&&!n.destroyed&&n.destroy(t)}),e[Tn]=!0),e[En]=S,ne.add(e)}),S.once(`close`,function(){D();for(let e of ne)e[En]===S&&(e[En]=null);ne.clear()}),e.timeout){let t=parseInt(e.timeout,10);if(Number.isNaN(t)){E(new J("error trying to parse `config.timeout` to int",J.ERR_BAD_OPTION_VALUE,e,S));return}let n=function(){b||E(O())};W&&t>0&&(C=setTimeout(n,t)),S.setTimeout(t,n)}else S.setTimeout(0);if(K.isStream(a)){let t=!1,n=!1;a.on(`end`,()=>{t=!0}),a.once(`error`,e=>{n=!0,S.destroy(e)}),a.on(`close`,()=>{!t&&!n&&E(new Ot(`Request stream has been aborted`,e,S))});let r=a;if(e.maxBodyLength>-1&&e.maxRedirects===0){let t=e.maxBodyLength,n=0;r=p.pipeline([a,new p.Transform({transform(r,i,a){if(n+=r.length,n>t)return a(new J(`Request body larger than maxBodyLength limit`,J.ERR_BAD_REQUEST,e,S));a(null,r)}})],K.noop),r.on(`error`,e=>{S.destroyed||S.destroy(e)})}r.pipe(S)}else a&&S.write(a),S.end()})},zn=Y.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Y.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Y.origin),Y.navigator&&/(msie|trident)/i.test(Y.navigator.userAgent)):()=>!0,Bn=Y.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];K.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),K.isString(r)&&s.push(`path=${r}`),K.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),K.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};let Vn=e=>e instanceof q?{...e}:e;function X(e,t){t||={};let n=Object.create(null);Object.defineProperty(n,`hasOwnProperty`,{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:r},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function i(e,t,n,i){if(!K.isUndefined(t))return r(e,t,n,i);if(!K.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!K.isUndefined(t))return r(void 0,t)}function o(e,t){if(!K.isUndefined(t))return r(void 0,t);if(!K.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(K.hasOwnProp(t,a))return r(n,i);if(K.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(Vn(e),Vn(t),n,!0)};return K.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=K.hasOwnProp(c,r)?c[r]:i,o=a(K.hasOwnProp(e,r)?e[r]:void 0,K.hasOwnProp(t,r)?t[r]:void 0,r);K.isUndefined(o)&&a!==s||(n[r]=o)}),n}let Hn=[`content-type`,`content-length`];function Un(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{Hn.includes(t.toLowerCase())&&e.set(t,n)})}let Wn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));var Gn=e=>{let t=X({},e),n=e=>K.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=q.from(s),t.url=at(Mt(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?Wn(c.password):``))),K.isFormData(r)&&(Y.hasStandardBrowserEnv||Y.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):K.isFunction(r.getHeaders)&&Un(s,r.getHeaders(),n(`formDataHeaderPolicy`))),Y.hasStandardBrowserEnv&&(K.isFunction(i)&&(i=i(t)),i===!0||i==null&&zn(t.url))){let e=a&&o&&Bn.read(o);e&&s.set(a,e)}return t},Kn=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=Gn(e),i=r.data,a=q.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=q.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());kt(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new J(`Request aborted`,J.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new J(t&&t.message?t.message:`Network Error`,J.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||st;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new J(t,i.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&K.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),K.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=pn(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=pn(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new Ot(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=zt(r.url);if(_&&!Y.protocols.includes(_)){n(new J(`Unsupported protocol `+_+`:`,J.ERR_BAD_REQUEST,e));return}h.send(i||null)})};let qn=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof J?t:new Ot(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new J(`timeout of ${t}ms exceeded`,J.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>K.asap(o),s}},Jn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Yn=async function*(e,t){for await(let n of Xn(e))yield*Jn(n,t)},Xn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Zn=(e,t,n,r)=>{let i=Yn(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},Qn=64*1024,{isFunction:$n}=K,er=(e,...t)=>{try{return!!e(...t)}catch{return!1}},tr=e=>{let t=K.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=K.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?$n(i):typeof fetch==`function`,c=$n(a),l=$n(o);if(!s)return!1;let u=s&&$n(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&er(()=>{let e=!1,t=new a(Y.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&er(()=>K.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e))return(await new a(Y.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(K.isArrayBufferView(e)||K.isArrayBuffer(e))return e.byteLength;if(K.isURLSearchParams(e)&&(e+=``),K.isString(e))return(await d(e)).byteLength},g=async(e,t)=>K.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:u,timeout:d,onDownloadProgress:h,onUploadProgress:_,responseType:v,headers:y,withCredentials:b=`same-origin`,fetchOptions:x,maxContentLength:S,maxBodyLength:C}=Gn(e),w=K.isNumber(S)&&S>-1,T=K.isNumber(C)&&C>-1,E=i||fetch;v=v?(v+``).toLowerCase():`text`;let D=qn([l,u&&u.toAbortSignal()],d),O=null,k=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),A;try{if(w&&typeof t==`string`&&t.startsWith(`data:`)&&gn(t)>S)throw new J(`maxContentLength size of `+S+` exceeded`,J.ERR_BAD_RESPONSE,e,O);if(T&&n!==`get`&&n!==`head`){let t=await g(y,s);if(typeof t==`number`&&isFinite(t)&&t>C)throw new J(`Request body larger than maxBodyLength limit`,J.ERR_BAD_REQUEST,e,O)}if(_&&f&&n!==`get`&&n!==`head`&&(A=await g(y,s))!==0){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(K.isFormData(s)&&(n=e.headers.get(`content-type`))&&y.setContentType(n),e.body){let[t,n]=mn(A,pn(hn(_)));s=Zn(e.body,Qn,t,n)}}K.isString(b)||(b=b?`include`:`omit`);let i=c&&`credentials`in a.prototype;if(K.isFormData(s)){let e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete(`content-type`)}y.set(`User-Agent`,`axios/`+Rt,!1);let l={...x,signal:D,method:n.toUpperCase(),headers:y.normalize().toJSON(),body:s,duplex:`half`,credentials:i?b:void 0};O=c&&new a(t,l);let u=await(c?E(O,x):E(t,l));if(w){let t=K.toFiniteNumber(u.headers.get(`content-length`));if(t!=null&&t>S)throw new J(`maxContentLength size of `+S+` exceeded`,J.ERR_BAD_RESPONSE,e,O)}let d=p&&(v===`stream`||v===`response`);if(p&&u.body&&(h||w||d&&k)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=u[e]});let n=K.toFiniteNumber(u.headers.get(`content-length`)),[r,i]=h&&mn(n,pn(hn(h),!0))||[],a=0;u=new o(Zn(u.body,Qn,t=>{if(w&&(a=t,a>S))throw new J(`maxContentLength size of `+S+` exceeded`,J.ERR_BAD_RESPONSE,e,O);r&&r(t)},()=>{i&&i(),k&&k()}),t)}v||=`text`;let j=await m[K.findKey(m,v)||`text`](u,e);if(w&&!p&&!d){let t;if(j!=null&&(typeof j.byteLength==`number`?t=j.byteLength:typeof j.size==`number`?t=j.size:typeof j==`string`&&(t=typeof r==`function`?new r().encode(j).byteLength:j.length)),typeof t==`number`&&t>S)throw new J(`maxContentLength size of `+S+` exceeded`,J.ERR_BAD_RESPONSE,e,O)}return!d&&k&&k(),await new Promise((t,n)=>{kt(t,n,{data:j,headers:q.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(k&&k(),D&&D.aborted&&D.reason instanceof J){let n=D.reason;throw n.config=e,O&&(n.request=O),t!==n&&(n.cause=t),n}throw t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new J(`Network Error`,J.ERR_NETWORK,e,O,t&&t.response),{cause:t.cause||t}):J.from(t,t&&t.code,e,O,t&&t.response)}}},nr=new Map,rr=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=nr;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:tr(t)),l=c;return c};rr();let ir={http:Rn,xhr:Kn,fetch:{get:rr}};K.forEach(ir,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{__proto__:null,value:t})}catch{}Object.defineProperty(e,`adapterName`,{__proto__:null,value:t})}});let ar=e=>`- ${e}`,or=e=>K.isFunction(e)||e===null||e===!1;function sr(e,t){e=K.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!or(r)&&(i=ir[(n=String(r)).toLowerCase()],i===void 0))throw new J(`Unknown adapter '${n}'`);if(i&&(K.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new J(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
19
|
-
`+e.map(
|
|
20
|
-
`):` `+
|
|
19
|
+
`}this.headers=Zt.encode(i+`\r
|
|
20
|
+
`),this.contentLength=r?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;q.isTypedArray(e)?yield e:yield*Yt(e),yield Qt}static escapeName(e){return String(e).replace(/[\r\n"]/g,e=>({"\r":`%0D`,"\n":`%0A`,'"':`%22`})[e])}};let en=(e,t,n)=>{let{tag:r=`form-data-boundary`,size:i=25,boundary:a=r+`-`+X.generateString(i,Xt)}=n||{};if(!q.isFormData(e))throw TypeError(`FormData instance required`);if(a.length<1||a.length>70)throw Error(`boundary must be 1-70 characters long`);let o=Zt.encode(`--`+a+`\r
|
|
21
|
+
`),s=Zt.encode(`--`+a+`--\r
|
|
22
|
+
`),c=s.byteLength,l=Array.from(e.entries()).map(([e,t])=>{let n=new $t(e,t);return c+=n.size,n});c+=o.byteLength*l.length,c=q.toFiniteNumber(c);let u={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(c)&&(u[`Content-Length`]=c),t&&t(u),m.Readable.from(async function*(){for(let e of l)yield o,yield*e.encode();yield s}())};var tn=class extends m.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,n)}};let nn=(e,t)=>q.isAsyncFn(e)?function(...n){let r=n.pop();e.apply(this,n).then(e=>{try{t?r(null,...t(e)):r(null,e)}catch(e){r(e)}},r)}:e,rn=new Set([`localhost`]),an=e=>{let t=e.split(`.`);return t.length!==4||t[0]!==`127`?!1:t.every(e=>/^\d+$/.test(e)&&Number(e)>=0&&Number(e)<=255)},on=e=>{if(e===`::1`)return!0;let t=e.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return an(t[1]);let n=e.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(n){let e=parseInt(n[1],16);return e>=32512&&e<=32767}let r=e.split(`:`);if(r.length===8){for(let e=0;e<7;e++)if(!/^0+$/.test(r[e]))return!1;return/^0*1$/.test(r[7])}return!1},sn=e=>e?rn.has(e)||an(e)?!0:on(e):!1,cn={http:80,https:443,ws:80,wss:443,ftp:21},ln=e=>{let t=e,n=0;if(t.charAt(0)===`[`){let e=t.indexOf(`]`);if(e!==-1){let r=t.slice(1,e),i=t.slice(e+1);return i.charAt(0)===`:`&&/^\d+$/.test(i.slice(1))&&(n=Number.parseInt(i.slice(1),10)),[r,n]}}let r=t.indexOf(`:`),i=t.lastIndexOf(`:`);return r!==-1&&r===i&&/^\d+$/.test(t.slice(i+1))&&(n=Number.parseInt(t.slice(i+1),10),t=t.slice(0,i)),[t,n]},un=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,dn=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,fn=e=>{if(typeof e!=`string`||e.indexOf(`:`)===-1)return e;let t=e.match(un);if(t)return t[1];let n=e.match(dn);if(n){let e=parseInt(n[1],16),t=parseInt(n[2],16);return`${e>>8}.${e&255}.${t>>8}.${t&255}`}return e},pn=e=>e&&(e.charAt(0)===`[`&&e.charAt(e.length-1)===`]`&&(e=e.slice(1,-1)),fn(e.replace(/\.+$/,``)));function mn(e){let t;try{t=new URL(e)}catch{return!1}let n=(process.env.no_proxy||process.env.NO_PROXY||``).toLowerCase();if(!n)return!1;if(n===`*`)return!0;let r=Number.parseInt(t.port,10)||cn[t.protocol.split(`:`,1)[0]]||0,i=pn(t.hostname.toLowerCase());return n.split(/[\s,]+/).some(e=>{if(!e)return!1;let[t,n]=ln(e);return t=pn(t),!t||n&&n!==r?!1:(t.charAt(0)===`*`&&(t=t.slice(1)),t.charAt(0)===`.`?i.endsWith(t):i===t||sn(i)&&sn(t))})}function hn(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function gn(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}let _n=(e,t,n=3)=>{let r=0,i=hn(50,250);return gn(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},vn=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},yn=e=>(...t)=>q.asap(()=>e(...t));function bn(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}if(typeof Buffer<`u`&&typeof Buffer.byteLength==`function`)return Buffer.byteLength(r,`utf8`);let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}let xn={flush:p.constants.Z_SYNC_FLUSH,finishFlush:p.constants.Z_SYNC_FLUSH},Sn={flush:p.constants.BROTLI_OPERATION_FLUSH,finishFlush:p.constants.BROTLI_OPERATION_FLUSH},Cn=q.isFunction(p.createBrotliDecompress),{http:wn,https:Tn}=f,En=/https:?/,Dn=[`content-type`,`content-length`];function On(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{Dn.includes(t.toLowerCase())&&e.set(t,n)})}let kn=Symbol(`axios.http.socketListener`),An=Symbol(`axios.http.currentReq`),jn=Symbol(`axios.http.installedTunnel`),Mn=new Map,Nn=new WeakMap;function Pn(e,t){let n=e.protocol+`//`+e.hostname+`:`+(e.port||``)+`#`+(e.auth||``),r=t?Nn.get(t)||Nn.set(t,new Map).get(t):Mn,i=r.get(n);return i||(i=new o(t&&t.options?{...t.options,...e}:e),i[jn]=!0,r.set(n,i),i)}let Fn=X.protocols.map(e=>e+`:`),In=e=>{if(!q.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Ln=(e,[t,n])=>(e.on(`end`,n).on(`error`,n),t),Rn=new class{constructor(){this.sessions=Object.create(null)}getSession(e,t){t=Object.assign({sessionTimeout:1e3},t);let n=this.sessions[e];if(n){let e=n.length;for(let r=0;r<e;r++){let[e,i]=n[r];if(!e.destroyed&&!e.closed&&u.isDeepStrictEqual(i,t))return e}}let r=l.connect(e,t),i,a=()=>{if(i)return;i=!0;let t=n,a=t.length,o=a;for(;o--;)if(t[o][0]===r){a===1?delete this.sessions[e]:t.splice(o,1),r.closed||r.close();return}},o=r.request,{sessionTimeout:s}=t;if(s!=null){let e,t=0;r.request=function(){let n=o.apply(this,arguments);return t++,e&&=(clearTimeout(e),null),n.once(`close`,()=>{--t||(e=setTimeout(()=>{e=null,a()},s))}),n}}r.once(`close`,a);let c=[r,t];return n?n.push(c):n=this.sessions[e]=[c],r}};function zn(e,t,n){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t,n)}function Bn(e,t,n,r,i){let a=t;if(!a&&a!==!1){let e=zt(n);e&&(mn(n)||(a=new URL(e)))}if(r&&e.headers)for(let t of Object.keys(e.headers))t.toLowerCase()===`proxy-authorization`&&delete e.headers[t];if(r&&e.agent&&e.agent[jn]&&(e.agent=void 0),a){let t=a instanceof URL,r=e=>t||q.hasOwnProp(a,e)?a[e]:void 0,s=r(`username`),c=r(`password`),l=q.hasOwnProp(a,`auth`)?a.auth:void 0;if(s&&(l=(s||``)+`:`+(c||``)),l){let e=typeof l==`object`,t=e&&q.hasOwnProp(l,`username`)?l.username:void 0,n=e&&q.hasOwnProp(l,`password`)?l.password:void 0;if(t||n)l=(t||``)+`:`+(n||``);else if(e)throw new Y(`Invalid proxy authorization`,Y.ERR_BAD_OPTION,{proxy:a})}if(En.test(e.protocol)){if(!(i instanceof o)){let t=r(`hostname`)||r(`host`),n=r(`port`),a=r(`protocol`),o=a?a.includes(`:`)?a:`${a}:`:`http:`,s=t&&t.includes(`:`)&&!t.startsWith(`[`)?`[${t}]`:t,c=new URL(`${o}//${s}${n?`:`+n:``}`),u={protocol:c.protocol,hostname:c.hostname.replace(/^\[|\]$/g,``),port:c.port,auth:l&&typeof l==`string`?l:void 0};c.protocol===`https:`&&(u.ALPNProtocols=[`http/1.1`]);let d=Pn(u,i);e.agent=d,e.agents&&(e.agents.https=d)}}else{if(l){let t=Buffer.from(l,`utf8`).toString(`base64`);e.headers[`Proxy-Authorization`]=`Basic `+t}let t=!1;for(let n of Object.keys(e.headers))if(n.toLowerCase()===`host`){t=!0;break}t||(e.headers.host=e.hostname+(e.port?`:`+e.port:``));let i=r(`hostname`)||r(`host`);e.hostname=i,e.host=i,e.port=r(`port`),e.path=n;let a=r(`protocol`);a&&(e.protocol=a.includes(`:`)?a:`${a}:`)}}e.beforeRedirects.proxy=function(e){Bn(e,t,e.href,!0,i)}}let Vn=typeof process<`u`&&q.kindOf(process)===`process`,Hn=e=>new Promise((t,n)=>{let r,i,a=(e,t)=>{i||(i=!0,r&&r(e,t))},o=e=>{a(e),t(e)},s=e=>{a(e,!0),n(e)};e(o,s,e=>r=e).catch(s)}),Un=({address:e,family:t})=>{if(!q.isString(e))throw TypeError(`address must be a string`);return{address:e,family:t||(e.indexOf(`.`)<0?6:4)}},Wn=(e,t)=>Un(q.isObject(e)?e:{address:e,family:t}),Gn={request(e,t){let n=e.protocol+`//`+e.hostname+`:`+(e.port||(e.protocol===`https:`?443:80)),{http2Options:r,headers:i}=e,a=Rn.getSession(n,r),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:s,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=l.constants,d={[o]:e.protocol.replace(`:`,``),[s]:e.method,[c]:e.path};q.forEach(i,(e,t)=>{t.charAt(0)!==`:`&&(d[t]=e)});let f=a.request(d);return f.once(`response`,e=>{let n=f;e=Object.assign({},e);let r=e[u];delete e[u],n.headers=e,n.statusCode=+r,t(n)}),f}};var Kn=Vn&&function(e){return Hn(async function(t,n,r){let i=t=>q.hasOwnProp(e,t)?e[t]:void 0,a=i(`data`),o=i(`lookup`),l=i(`family`),f=i(`httpVersion`);f===void 0&&(f=1);let g=i(`http2Options`),_=i(`responseType`),v=i(`responseEncoding`),y=e.method.toUpperCase(),b,x=!1,S,C;if(f=+f,Number.isNaN(f))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(f!==1&&f!==2)throw TypeError(`Unsupported protocol version '${f}'`);let w=f===2;if(o){let e=nn(o,e=>q.isArray(e)?e:[e]);o=(t,n,r)=>{e(t,n,(e,t,i)=>{if(e)return r(e);let a=q.isArray(t)?t.map(e=>Wn(e)):[Wn(t,i)];n.all?r(e,a):r(e,a[0].address,a[0].family)})}}let T=new h.EventEmitter;function E(t){try{T.emit(`abort`,!t||t.type?new Mt(null,e,S):t)}catch(e){console.warn(`emit error`,e)}}function D(){C&&=(clearTimeout(C),null)}function O(){let t=e.timeout?`timeout of `+e.timeout+`ms exceeded`:`timeout exceeded`,n=e.transitional||dt;return e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),new Y(t,n.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,S)}T.once(`abort`,n);let k=()=>{D(),e.cancelToken&&e.cancelToken.unsubscribe(E),e.signal&&e.signal.removeEventListener(`abort`,E),T.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(E),e.signal&&(e.signal.aborted?E():e.signal.addEventListener(`abort`,E))),r((e,t)=>{if(b=!0,D(),t){x=!0,k();return}let{data:n}=e;if(n instanceof m.Readable||n instanceof m.Duplex){let e=m.finished(n,()=>{e(),k()})}else k()});let A=It(e.baseURL,e.url,e.allowAbsoluteUrls),j=new URL(A,X.hasBrowserEnv?X.origin:void 0),M=j.protocol||Fn[0];if(M===`data:`){if(e.maxContentLength>-1&&bn(String(e.url||A||``))>e.maxContentLength)return n(new Y(`maxContentLength size of `+e.maxContentLength+` exceeded`,Y.ERR_BAD_RESPONSE,e));let r;if(y!==`GET`)return Nt(t,n,{status:405,statusText:`method not allowed`,headers:{},config:e});try{r=Gt(e.url,_===`blob`,{Blob:e.env&&e.env.Blob})}catch(t){throw Y.from(t,Y.ERR_BAD_REQUEST,e)}return _===`text`?(r=r.toString(v),(!v||v===`utf8`)&&(r=q.stripBOM(r))):_===`stream`&&(r=m.Readable.from(r)),Nt(t,n,{data:r,status:200,statusText:`OK`,headers:new J,config:e})}if(Fn.indexOf(M)===-1)return n(new Y(`Unsupported protocol `+M,Y.ERR_BAD_REQUEST,e));let N=J.from(e.headers).normalize();N.set(`User-Agent`,`axios/1.16.1`,!1);let{onUploadProgress:P,onDownloadProgress:F}=e,I=e.maxRate,L,R;if(q.isSpecCompliantForm(a)){let e=N.getContentType(/boundary=([-_\w\d]{10,70})/i);a=en(a,e=>{N.set(e)},{tag:`axios-${Ht}-boundary`,boundary:e&&e[1]||void 0})}else if(q.isFormData(a)&&q.isFunction(a.getHeaders)&&a.getHeaders!==Object.prototype.getHeaders){if(On(N,a.getHeaders(),i(`formDataHeaderPolicy`)),!N.hasContentLength())try{let e=await u.promisify(a.getLength).call(a);Number.isFinite(e)&&e>=0&&N.setContentLength(e)}catch{}}else if(q.isBlob(a)||q.isFile(a))a.size&&N.setContentType(a.type||`application/octet-stream`),N.setContentLength(a.size||0),a=m.Readable.from(Yt(a));else if(a&&!q.isStream(a)){if(!Buffer.isBuffer(a))if(q.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(q.isString(a))a=Buffer.from(a,`utf-8`);else return n(new Y(`Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream`,Y.ERR_BAD_REQUEST,e));if(N.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return n(new Y(`Request body larger than maxBodyLength limit`,Y.ERR_BAD_REQUEST,e))}let z=q.toFiniteNumber(N.getContentLength());q.isArray(I)?(L=I[0],R=I[1]):L=R=I,a&&(P||L)&&(q.isStream(a)||(a=m.Readable.from(a,{objectMode:!1})),a=m.pipeline([a,new qt({maxRate:q.toFiniteNumber(L)})],q.noop),P&&a.on(`progress`,Ln(a,vn(z,_n(yn(P),!1,3)))));let B,V=i(`auth`);if(V){let e=V.username||``,t=V.password||``;B=e+`:`+t}if(!B&&j.username){let e=In(j.username),t=In(j.password);B=e+`:`+t}B&&N.delete(`authorization`);let ee;try{ee=lt(j.pathname+j.search,e.params,e.paramsSerializer).replace(/^\?/,``)}catch(t){let r=Error(t.message);return r.config=e,r.url=e.url,r.exists=!0,n(r)}N.set(`Accept-Encoding`,`gzip, compress, deflate`+(Cn?`, br`:``),!1);let H=Object.assign(Object.create(null),{path:ee,method:y,headers:He(N),agents:{http:e.httpAgent,https:e.httpsAgent},auth:B,protocol:M,family:l,beforeRedirect:zn,beforeRedirects:Object.create(null),http2Options:g});if(!q.isUndefined(o)&&(H.lookup=o),e.socketPath){if(typeof e.socketPath!=`string`)return n(new Y(`socketPath must be a string`,Y.ERR_BAD_OPTION_VALUE,e));if(e.allowedSocketPaths!=null){let t=Array.isArray(e.allowedSocketPaths)?e.allowedSocketPaths:[e.allowedSocketPaths],r=d.resolve(e.socketPath);if(!t.some(e=>typeof e==`string`&&d.resolve(e)===r))return n(new Y(`socketPath "${e.socketPath}" is not permitted by allowedSocketPaths`,Y.ERR_BAD_OPTION_VALUE,e))}H.socketPath=e.socketPath}else H.hostname=j.hostname.startsWith(`[`)?j.hostname.slice(1,-1):j.hostname,H.port=j.port,Bn(H,e.proxy,M+`//`+j.hostname+(j.port?`:`+j.port:``)+H.path,!1,e.httpsAgent);let U,W=!1,te=En.test(H.protocol);if(H.agent??=te?e.httpsAgent:e.httpAgent,w)U=Gn;else{let t=i(`transport`);if(t)U=t;else if(e.maxRedirects===0)U=te?c:s,W=!0;else{e.maxRedirects&&(H.maxRedirects=e.maxRedirects);let t=i(`beforeRedirect`);t&&(H.beforeRedirects.config=t),U=te?Tn:wn}}e.maxBodyLength>-1?H.maxBodyLength=e.maxBodyLength:H.maxBodyLength=1/0,H.insecureHTTPParser=!!i(`insecureHTTPParser`),S=U.request(H,function(r){if(D(),S.destroyed)return;let i=[r],a=q.toFiniteNumber(r.headers[`content-length`]);if(F||R){let e=new qt({maxRate:q.toFiniteNumber(R)});F&&e.on(`progress`,Ln(e,vn(a,_n(yn(F),!0,3)))),i.push(e)}let o=r,s=r.req||S;if(e.decompress!==!1&&r.headers[`content-encoding`])switch((y===`HEAD`||r.statusCode===204)&&delete r.headers[`content-encoding`],(r.headers[`content-encoding`]||``).toLowerCase()){case`gzip`:case`x-gzip`:case`compress`:case`x-compress`:i.push(p.createUnzip(xn)),delete r.headers[`content-encoding`];break;case`deflate`:i.push(new tn),i.push(p.createUnzip(xn)),delete r.headers[`content-encoding`];break;case`br`:Cn&&(i.push(p.createBrotliDecompress(Sn)),delete r.headers[`content-encoding`])}o=i.length>1?m.pipeline(i,q.noop):i[0];let c={status:r.statusCode,statusText:r.statusMessage,headers:new J(r.headers),config:e,request:s};if(_===`stream`){if(e.maxContentLength>-1){let t=e.maxContentLength,n=o;async function*r(){let r=0;for await(let i of n){if(r+=i.length,r>t)throw new Y(`maxContentLength size of `+t+` exceeded`,Y.ERR_BAD_RESPONSE,e,s);yield i}}o=m.Readable.from(r(),{objectMode:!1})}c.data=o,Nt(t,n,c)}else{let r=[],i=0;o.on(`data`,function(t){r.push(t),i+=t.length,e.maxContentLength>-1&&i>e.maxContentLength&&(x=!0,o.destroy(),E(new Y(`maxContentLength size of `+e.maxContentLength+` exceeded`,Y.ERR_BAD_RESPONSE,e,s)))}),o.on(`aborted`,function(){if(x)return;let t=new Y(`stream has been aborted`,Y.ERR_BAD_RESPONSE,e,s,c);o.destroy(t),n(t)}),o.on(`error`,function(t){x||n(Y.from(t,null,e,s,c))}),o.on(`end`,function(){try{let e=r.length===1?r[0]:Buffer.concat(r);_!==`arraybuffer`&&(e=e.toString(v),(!v||v===`utf8`)&&(e=q.stripBOM(e))),c.data=e}catch(t){return n(Y.from(t,null,e,c.request,c))}Nt(t,n,c)})}T.once(`abort`,e=>{o.destroyed||(o.emit(`error`,e),o.destroy())})}),T.once(`abort`,e=>{S.close?S.close():S.destroy(e)}),S.on(`error`,function(t){n(Y.from(t,null,e,S))});let ne=new Set;if(S.on(`socket`,function(e){e.setKeepAlive(!0,1e3*60),e[kn]||(e.on(`error`,function(t){let n=e[An];n&&!n.destroyed&&n.destroy(t)}),e[kn]=!0),e[An]=S,ne.add(e)}),S.once(`close`,function(){D();for(let e of ne)e[An]===S&&(e[An]=null);ne.clear()}),e.timeout){let t=parseInt(e.timeout,10);if(Number.isNaN(t)){E(new Y("error trying to parse `config.timeout` to int",Y.ERR_BAD_OPTION_VALUE,e,S));return}let n=function(){b||E(O())};W&&t>0&&(C=setTimeout(n,t)),S.setTimeout(t,n)}else S.setTimeout(0);if(q.isStream(a)){let t=!1,n=!1;a.on(`end`,()=>{t=!0}),a.once(`error`,e=>{n=!0,S.destroy(e)}),a.on(`close`,()=>{!t&&!n&&E(new Mt(`Request stream has been aborted`,e,S))});let r=a;if(e.maxBodyLength>-1&&e.maxRedirects===0){let t=e.maxBodyLength,n=0;r=m.pipeline([a,new m.Transform({transform(r,i,a){if(n+=r.length,n>t)return a(new Y(`Request body larger than maxBodyLength limit`,Y.ERR_BAD_REQUEST,e,S));a(null,r)}})],q.noop),r.on(`error`,e=>{S.destroyed||S.destroy(e)})}r.pipe(S)}else a&&S.write(a),S.end()})},qn=X.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,X.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(X.origin),X.navigator&&/(msie|trident)/i.test(X.navigator.userAgent)):()=>!0,Jn=X.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];q.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),q.isString(r)&&s.push(`path=${r}`),q.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),q.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};let Yn=e=>e instanceof J?{...e}:e;function Xn(e,t){t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return q.isPlainObject(e)&&q.isPlainObject(t)?q.merge.call({caseless:r},e,t):q.isPlainObject(t)?q.merge({},t):q.isArray(t)?t.slice():t}function i(e,t,n,i){if(!q.isUndefined(t))return r(e,t,n,i);if(!q.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!q.isUndefined(t))return r(void 0,t)}function o(e,t){if(!q.isUndefined(t))return r(void 0,t);if(!q.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(q.hasOwnProp(t,a))return r(n,i);if(q.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(Yn(e),Yn(t),n,!0)};return q.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=q.hasOwnProp(c,r)?c[r]:i,o=a(q.hasOwnProp(e,r)?e[r]:void 0,q.hasOwnProp(t,r)?t[r]:void 0,r);q.isUndefined(o)&&a!==s||(n[r]=o)}),n}let Zn=[`content-type`,`content-length`];function Qn(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{Zn.includes(t.toLowerCase())&&e.set(t,n)})}let $n=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));var er=e=>{let t=Xn({},e),n=e=>q.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=J.from(s),t.url=lt(It(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?$n(c.password):``))),q.isFormData(r)&&(X.hasStandardBrowserEnv||X.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):q.isFunction(r.getHeaders)&&Qn(s,r.getHeaders(),n(`formDataHeaderPolicy`))),X.hasStandardBrowserEnv&&(q.isFunction(i)&&(i=i(t)),i===!0||i==null&&qn(t.url))){let e=a&&o&&Jn.read(o);e&&s.set(a,e)}return t},tr=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=er(e),i=r.data,a=J.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=J.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Nt(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new Y(`Request aborted`,Y.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new Y(t&&t.message?t.message:`Network Error`,Y.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||dt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Y(t,i.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&q.forEach(He(a),function(e,t){h.setRequestHeader(t,e)}),q.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=_n(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=_n(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new Mt(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Ut(r.url);if(_&&!X.protocols.includes(_)){n(new Y(`Unsupported protocol `+_+`:`,Y.ERR_BAD_REQUEST,e));return}h.send(i||null)})};let nr=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Y?t:new Mt(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>q.asap(o),s},rr=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},ir=async function*(e,t){for await(let n of ar(e))yield*rr(n,t)},ar=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},or=(e,t,n,r)=>{let i=ir(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},sr=64*1024,{isFunction:cr}=q,lr=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ur=e=>{let t=q.global!==void 0&&q.global!==null?q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?cr(i):typeof fetch==`function`,c=cr(a),l=cr(o);if(!s)return!1;let u=s&&cr(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&lr(()=>{let e=!1,t=new a(X.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&lr(()=>q.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e))return(await new a(X.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e+=``),q.isString(e))return(await d(e)).byteLength},g=async(e,t)=>q.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:u,timeout:d,onDownloadProgress:h,onUploadProgress:_,responseType:v,headers:y,withCredentials:b=`same-origin`,fetchOptions:x,maxContentLength:S,maxBodyLength:C}=er(e),w=q.isNumber(S)&&S>-1,T=q.isNumber(C)&&C>-1,E=i||fetch;v=v?(v+``).toLowerCase():`text`;let D=nr([l,u&&u.toAbortSignal()],d),O=null,k=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),A;try{if(w&&typeof t==`string`&&t.startsWith(`data:`)&&bn(t)>S)throw new Y(`maxContentLength size of `+S+` exceeded`,Y.ERR_BAD_RESPONSE,e,O);if(T&&n!==`get`&&n!==`head`){let t=await g(y,s);if(typeof t==`number`&&isFinite(t)&&t>C)throw new Y(`Request body larger than maxBodyLength limit`,Y.ERR_BAD_REQUEST,e,O)}if(_&&f&&n!==`get`&&n!==`head`&&(A=await g(y,s))!==0){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(q.isFormData(s)&&(n=e.headers.get(`content-type`))&&y.setContentType(n),e.body){let[t,n]=vn(A,_n(yn(_)));s=or(e.body,sr,t,n)}}q.isString(b)||(b=b?`include`:`omit`);let i=c&&`credentials`in a.prototype;if(q.isFormData(s)){let e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete(`content-type`)}y.set(`User-Agent`,`axios/1.16.1`,!1);let l={...x,signal:D,method:n.toUpperCase(),headers:He(y.normalize()),body:s,duplex:`half`,credentials:i?b:void 0};O=c&&new a(t,l);let u=await(c?E(O,x):E(t,l));if(w){let t=q.toFiniteNumber(u.headers.get(`content-length`));if(t!=null&&t>S)throw new Y(`maxContentLength size of `+S+` exceeded`,Y.ERR_BAD_RESPONSE,e,O)}let d=p&&(v===`stream`||v===`response`);if(p&&u.body&&(h||w||d&&k)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=u[e]});let n=q.toFiniteNumber(u.headers.get(`content-length`)),[r,i]=h&&vn(n,_n(yn(h),!0))||[],a=0;u=new o(or(u.body,sr,t=>{if(w&&(a=t,a>S))throw new Y(`maxContentLength size of `+S+` exceeded`,Y.ERR_BAD_RESPONSE,e,O);r&&r(t)},()=>{i&&i(),k&&k()}),t)}v||=`text`;let j=await m[q.findKey(m,v)||`text`](u,e);if(w&&!p&&!d){let t;if(j!=null&&(typeof j.byteLength==`number`?t=j.byteLength:typeof j.size==`number`?t=j.size:typeof j==`string`&&(t=typeof r==`function`?new r().encode(j).byteLength:j.length)),typeof t==`number`&&t>S)throw new Y(`maxContentLength size of `+S+` exceeded`,Y.ERR_BAD_RESPONSE,e,O)}return!d&&k&&k(),await new Promise((t,n)=>{Nt(t,n,{data:j,headers:J.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(k&&k(),D&&D.aborted&&D.reason instanceof Y){let n=D.reason;throw n.config=e,O&&(n.request=O),t!==n&&(n.cause=t),n}throw t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new Y(`Network Error`,Y.ERR_NETWORK,e,O,t&&t.response),{cause:t.cause||t}):Y.from(t,t&&t.code,e,O,t&&t.response)}}},dr=new Map,fr=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=dr;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:ur(t)),l=c;return c};fr();let pr={http:Kn,xhr:tr,fetch:{get:fr}};q.forEach(pr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});let mr=e=>`- ${e}`,Z=e=>q.isFunction(e)||e===null||e===!1;function hr(e,t){e=q.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Z(r)&&(i=pr[(n=String(r)).toLowerCase()],i===void 0))throw new Y(`Unknown adapter '${n}'`);if(i&&(q.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new Y(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
23
|
+
`+e.map(mr).join(`
|
|
24
|
+
`):` `+mr(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var gr={getAdapter:hr,adapters:pr};function _r(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mt(null,e)}function vr(e){return _r(e),e.headers=J.from(e.headers),e.data=At.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),gr.getAdapter(e.adapter||Ot.adapter,e)(e).then(function(t){_r(e),e.response=t;try{t.data=At.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=J.from(t.headers),t},function(t){if(!jt(t)&&(_r(e),t&&t.response)){e.response=t.response;try{t.response.data=At.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=J.from(t.response.headers)}return Promise.reject(t)})}let yr={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{yr[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});let br={};yr.transitional=function(e,t,n){function r(e,t){return`[Axios v1.16.1] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new Y(r(i,` has been removed`+(t?` in `+t:``)),Y.ERR_DEPRECATED);return t&&!br[i]&&(br[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},yr.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function xr(e,t,n){if(typeof e!=`object`)throw new Y(`options must be an object`,Y.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new Y(`option `+a+` must be `+n,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y(`Unknown option `+a,Y.ERR_BAD_OPTION)}}var Sr={assertOptions:xr,validators:yr};let Q=Sr.validators;var Cr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ut,response:new ut}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
|
|
21
25
|
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
|
|
22
26
|
`),r=t===-1?-1:n.indexOf(`
|
|
23
27
|
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
|
|
24
|
-
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=X(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&pr.assertOptions(n,{silentJSONParsing:Q.transitional(Q.boolean),forcedJSONParsing:Q.transitional(Q.boolean),clarifyTimeoutError:Q.transitional(Q.boolean),legacyInterceptorReqResOrdering:Q.transitional(Q.boolean)},!1),r!=null&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:pr.assertOptions(r,{encode:Q.function,serialize:Q.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),pr.assertOptions(t,{baseUrl:Q.spelling(`baseURL`),withXsrfToken:Q.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&K.merge(i.common,i[t.method]);i&&K.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=q.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||st;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[ur.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=ur.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=X(this.defaults,e),at(Mt(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};K.forEach([`delete`,`get`,`head`,`options`],function(e){mr.prototype[e]=function(t,n){return this.request(X(n||{},{method:e,url:t,data:(n||{}).data}))}}),K.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(X(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}mr.prototype[e]=t(),e!==`query`&&(mr.prototype[e+`Form`]=t(!0))});var hr=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Ot(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function gr(e){return function(t){return e.apply(null,t)}}function _r(e){return K.isObject(e)&&e.isAxiosError===!0}let vr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(vr).forEach(([e,t])=>{vr[t]=e});function yr(e){let t=new mr(e),n=h(mr.prototype.request,t);return K.extend(n,mr.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return yr(X(e,t))},n}let $=yr(wt);$.Axios=mr,$.CanceledError=Ot,$.CancelToken=hr,$.isCancel=Et,$.VERSION=Rt,$.toFormData=et,$.AxiosError=J,$.Cancel=$.CanceledError,$.all=function(e){return Promise.all(e)},$.spread=gr,$.isAxiosError=_r,$.mergeConfig=X,$.AxiosHeaders=q,$.formToJSON=e=>xt(K.isHTMLForm(e)?new FormData(e):e),$.getAdapter=cr.getAdapter,$.HttpStatusCode=vr,$.default=$,n.exports=$})),kt=a(((e,t)=>{function n(){return!!(typeof window<`u`&&typeof window.process==`object`&&window.process.type===`renderer`||typeof process<`u`&&typeof process.versions==`object`&&process.versions.electron||typeof navigator==`object`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Electron`)>=0)}t.exports=n})),At=a(((e,t)=>{let n=e=>typeof e==`object`&&!!e&&typeof e.pipe==`function`;n.writable=e=>n(e)&&e.writable!==!1&&typeof e._write==`function`&&typeof e._writableState==`object`,n.readable=e=>n(e)&&e.readable!==!1&&typeof e._read==`function`&&typeof e._readableState==`object`,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&typeof e._transform==`function`,t.exports=n})),jt=a(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)})),Mt=a(((e,t)=>{t.exports=(e,t)=>(t||=(()=>{}),e.then(e=>new Promise(e=>{e(t())}).then(()=>e),e=>new Promise(e=>{e(t())}).then(()=>{throw e})))})),Nt=a(((e,t)=>{let n=Mt();var r=class extends Error{constructor(e){super(e),this.name=`TimeoutError`}};let i=(e,t,i)=>new Promise((a,o)=>{if(typeof t!=`number`||t<0)throw TypeError("Expected `milliseconds` to be a positive number");if(t===1/0){a(e);return}let s=setTimeout(()=>{if(typeof i==`function`){try{a(i())}catch(e){o(e)}return}let n=typeof i==`string`?i:`Promise timed out after ${t} milliseconds`,s=i instanceof Error?i:new r(n);typeof e.cancel==`function`&&e.cancel(),o(s)},t);n(e.then(a,o),()=>{clearTimeout(s)})});t.exports=i,t.exports.default=i,t.exports.TimeoutError=r})),Pt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t,n){let r=0,i=e.length;for(;i>0;){let a=i/2|0,o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}e.default=t})),Ft=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=Pt();e.default=class{constructor(){this._queue=[]}enqueue(e,n){n=Object.assign({priority:0},n);let r={priority:n.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=n.priority){this._queue.push(r);return}let i=t.default(this._queue,r,(e,t)=>t.priority-e.priority);this._queue.splice(i,0,r)}dequeue(){return this._queue.shift()?.run}filter(e){return this._queue.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this._queue.length}}})),It=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=jt(),n=Nt(),r=Ft(),i=()=>{},a=new n.TimeoutError;e.default=class extends t{constructor(e){if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=i,this._resolveIdle=i,e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:r.default},e),!(typeof e.intervalCap==`number`&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??``}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??``}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||e.interval===0,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=e.throwOnTimeout===!0,this._isPaused=e.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit(`next`)}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=i,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=i,this.emit(`idle`))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){let e=Date.now();if(this._intervalId===void 0){let t=this._intervalEnd-e;if(t<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},t)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let t=this._queue.dequeue();return t?(this.emit(`active`),t(),e&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==`number`&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise((r,i)=>{this._queue.enqueue(async()=>{this._pendingCount++,this._intervalCount++;try{r(await(this._timeout===void 0&&t.timeout===void 0?e():n.default(Promise.resolve(e()),t.timeout===void 0?this._timeout:t.timeout,()=>{(t.throwOnTimeout===void 0?this._throwOnTimeout:t.throwOnTimeout)&&i(a)})))}catch(e){i(e)}this._next()},t),this._tryToStartAnother(),this.emit(`add`)})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(e=>{let t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(e=>{let t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}})),Lt=a(((e,t)=>{let n=P(),r=[`Failed to fetch`,`NetworkError when attempting to fetch resource.`,`The Internet connection appears to be offline.`,`Network request failed`];var i=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=Error(e),this.originalError.stack=this.stack),this.name=`AbortError`,this.message=e}};let a=(e,t,n)=>{let r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e},o=e=>r.includes(e),s=(e,t)=>new Promise((r,s)=>{t={onFailedAttempt:()=>{},retries:10,...t};let c=n.operation(t);c.attempt(async n=>{try{r(await e(n))}catch(e){if(!(e instanceof Error)){s(TypeError(`Non-error was thrown: "${e}". You should only throw errors.`));return}if(e instanceof i)c.stop(),s(e.originalError);else if(e instanceof TypeError&&!o(e.message))c.stop(),s(e);else{a(e,n,t);try{await t.onFailedAttempt(e)}catch(e){s(e);return}c.retry(e)||s(c.mainError())}}})});t.exports=s,t.exports.default=s,t.exports.AbortError=i})),Rt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getFileUploadJob=a,e.getMultipleFileUploadJobs=o,e.getFileData=s,e.getFileDataLength=c,e.getFileDataAsStream=l,e.getAllFileUploadsToComplete=u,e.warnIfNotUsingFilesUploadV2=d,e.warnIfChannels=f,e.errorIfChannelsCsv=p,e.errorIfInvalidOrMissingFileData=m,e.warnIfMissingOrInvalidFileNameAndDefault=h,e.warnIfLegacyFileType=g,e.buildMissingFileIdError=_,e.buildFileSizeErrorMsg=v,e.buildLegacyFileTypeWarning=y,e.buildMissingFileNameWarning=b,e.buildMissingExtensionWarning=x,e.buildLegacyMethodWarning=S,e.buildGeneralFilesUploadWarning=C,e.buildFilesUploadMissingMessage=w,e.buildChannelsWarning=T,e.buildMultipleChannelsErrorMsg=E,e.buildInvalidFilesUploadParamError=D;let n=t(`node:fs`),r=t(`node:stream`),i=_e();async function a(e,t){g(e,t),f(e,t),p(e);let n=h(e,t),r=await s(e),a=c(r),o={alt_text:e.alt_text,blocks:e.blocks,channel_id:e.channels??e.channel_id,filename:e.filename??n,initial_comment:e.initial_comment,snippet_type:e.snippet_type,title:e.title??e.filename??n,data:r,length:a};if(`thread_ts`in e&&(o.thread_ts=e.thread_ts),`token`in e&&(o.token=e.token),`content`in e)return Object.assign({content:e.content},o);if(`file`in e)return Object.assign({file:e.file},o);throw(0,i.errorWithCode)(Error(`Either a file or content field is required for valid file upload. You must supply one`),i.ErrorCode.FileUploadInvalidArgumentsError)}async function o(e,t){if(`file_uploads`in e)return Promise.all(e.file_uploads.map(n=>{let{blocks:r,channel_id:o,channels:s,initial_comment:c,thread_ts:l}=n;if(r||o||s||c||l)throw(0,i.errorWithCode)(Error(D()),i.ErrorCode.FileUploadInvalidArgumentsError);let u=Object.assign(Object.assign({},n),{blocks:e.blocks,channels:e.channels,channel_id:e.channel_id,initial_comment:e.initial_comment});if(`thread_ts`in e&&(u.thread_ts=e.thread_ts),`token`in e&&(u.token=e.token),`content`in n)return a(Object.assign({content:n.content},u),t);if(`file`in n)return a(Object.assign({file:n.file},u),t);throw(0,i.errorWithCode)(Error(`Either a file or content field is required for valid file upload. You must supply one`),i.ErrorCode.FileUploadInvalidArgumentsError)}));throw Error(w())}async function s(e){if(m(e),`file`in e){let{file:t}=e;if(Buffer.isBuffer(t))return t;if(typeof t==`string`)try{return(0,n.readFileSync)(t)}catch{throw(0,i.errorWithCode)(Error(`Unable to resolve file data for ${t}. Please supply a filepath string, or binary data Buffer or String directly.`),i.ErrorCode.FileUploadInvalidArgumentsError)}let r=await l(t);if(r)return r}if(`content`in e)return Buffer.from(e.content);throw(0,i.errorWithCode)(Error(`There was an issue getting the file data for the file or content supplied`),i.ErrorCode.FileUploadReadFileDataError)}function c(e){if(e)return Buffer.byteLength(e,`utf8`);throw(0,i.errorWithCode)(Error(v()),i.ErrorCode.FileUploadReadFileDataError)}async function l(e){let t=[];return new Promise((n,r)=>{e.on(`readable`,()=>{let n=e.read();for(;n!==null;)t.push(n),n=e.read()}),e.on(`end`,()=>{t.length>0?n(Buffer.concat(t)):r(Error(`No data in supplied file`))})})}function u(e){let t={};for(let n of e){let{blocks:e,channel_id:r,thread_ts:i,initial_comment:a,file_id:o,title:s}=n;if(o){let c=`:::${r}:::${i}:::${a}:::${JSON.stringify(e)}`;if(Object.prototype.hasOwnProperty.call(t,c))t[c].files.push({id:o,title:s});else{if(t[c]={files:[{id:o,title:s}],channel_id:r,blocks:e,initial_comment:a},i&&r){let e={channel_id:r,thread_ts:i};t[c]=Object.assign(Object.assign({},t[c]),e)}`token`in n&&(t[c].token=n.token)}}else throw Error(_())}return t}function d(e,t){let n=[`files.upload`].includes(e);e===`files.upload`&&t.warn(S(e)),n&&t.info(C())}function f(e,t){e.channels&&t.warn(T())}function p(e){if((e.channels?e.channels.split(`,`):[]).length>1)throw(0,i.errorWithCode)(Error(E()),i.ErrorCode.FileUploadInvalidArgumentsError)}function m(e){let t=`file`in e,n=`content`in e;if(!(t||n)||t&&n)throw(0,i.errorWithCode)(Error(`Either a file or content field is required for valid file upload. You cannot supply both`),i.ErrorCode.FileUploadInvalidArgumentsError);if(`file`in e){let{file:t}=e;if(t&&!(typeof t==`string`||Buffer.isBuffer(t)||t instanceof r.Readable))throw(0,i.errorWithCode)(Error(`file must be a valid string path, buffer or Readable`),i.ErrorCode.FileUploadInvalidArgumentsError)}if(`content`in e&&e.content&&typeof e.content!=`string`)throw(0,i.errorWithCode)(Error(`content must be a string`),i.ErrorCode.FileUploadInvalidArgumentsError)}function h(e,t){let n=`file.${e.filetype??`txt`}`,{filename:r}=e;return r?(r.split(`.`).length<2&&t.warn(x(r)),r):(t.warn(b()),n)}function g(e,t){e.filetype&&t.warn(y())}function _(){return`Missing required file id for file upload completion`}function v(){return`There was an issue calculating the size of your file`}function y(){return`filetype is no longer a supported field in files.uploadV2.
|
|
28
|
+
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=Xn(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Sr.assertOptions(n,{silentJSONParsing:Q.transitional(Q.boolean),forcedJSONParsing:Q.transitional(Q.boolean),clarifyTimeoutError:Q.transitional(Q.boolean),legacyInterceptorReqResOrdering:Q.transitional(Q.boolean)},!1),r!=null&&(q.isFunction(r)?t.paramsSerializer={serialize:r}:Sr.assertOptions(r,{encode:Q.function,serialize:Q.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Sr.assertOptions(t,{baseUrl:Q.spelling(`baseURL`),withXsrfToken:Q.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&q.merge(i.common,i[t.method]);i&&q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=J.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||dt;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[vr.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=vr.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=Xn(this.defaults,e),lt(It(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};q.forEach([`delete`,`get`,`head`,`options`],function(e){Cr.prototype[e]=function(t,n){return this.request(Xn(n||{},{method:e,url:t,data:(n||{}).data}))}}),q.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(Xn(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Cr.prototype[e]=t(),e!==`query`&&(Cr.prototype[e+`Form`]=t(!0))});var wr=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Mt(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Tr(e){return function(t){return e.apply(null,t)}}function Er(e){return q.isObject(e)&&e.isAxiosError===!0}let Dr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Dr).forEach(([e,t])=>{Dr[t]=e});function Or(e){let t=new Cr(e),n=g(Cr.prototype.request,t);return q.extend(n,Cr.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Or(Xn(e,t))},n}let $=Or(Ot);$.Axios=Cr,$.CanceledError=Mt,$.CancelToken=wr,$.isCancel=jt,$.VERSION=Ht,$.toFormData=it,$.AxiosError=Y,$.Cancel=$.CanceledError,$.all=function(e){return Promise.all(e)},$.spread=Tr,$.isAxiosError=Er,$.mergeConfig=Xn,$.AxiosHeaders=J,$.formToJSON=e=>wt(q.isHTMLForm(e)?new FormData(e):e),$.getAdapter=gr.getAdapter,$.HttpStatusCode=Dr,$.default=$,t.exports=$})),jt=i(((e,t)=>{function n(){return!!(typeof window<`u`&&typeof window.process==`object`&&window.process.type===`renderer`||typeof process<`u`&&typeof process.versions==`object`&&process.versions.electron||typeof navigator==`object`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Electron`)>=0)}t.exports=n})),Mt=i(((e,t)=>{let n=e=>typeof e==`object`&&!!e&&typeof e.pipe==`function`;n.writable=e=>n(e)&&e.writable!==!1&&typeof e._write==`function`&&typeof e._writableState==`object`,n.readable=e=>n(e)&&e.readable!==!1&&typeof e._read==`function`&&typeof e._readableState==`object`,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&typeof e._transform==`function`,t.exports=n})),Nt=i(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)})),Pt=i(((e,t)=>{t.exports=(e,t)=>(t||=(()=>{}),e.then(e=>new Promise(e=>{e(t())}).then(()=>e),e=>new Promise(e=>{e(t())}).then(()=>{throw e})))})),Ft=i(((e,t)=>{let n=Pt();var r=class extends Error{constructor(e){super(e),this.name=`TimeoutError`}};let i=(e,t,i)=>new Promise((a,o)=>{if(typeof t!=`number`||t<0)throw TypeError("Expected `milliseconds` to be a positive number");if(t===1/0){a(e);return}let s=setTimeout(()=>{if(typeof i==`function`){try{a(i())}catch(e){o(e)}return}let n=typeof i==`string`?i:`Promise timed out after ${t} milliseconds`,s=i instanceof Error?i:new r(n);typeof e.cancel==`function`&&e.cancel(),o(s)},t);n(e.then(a,o),()=>{clearTimeout(s)})});t.exports=i,t.exports.default=i,t.exports.TimeoutError=r})),It=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t,n){let r=0,i=e.length;for(;i>0;){let a=i/2|0,o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}e.default=t})),Lt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=It();e.default=class{constructor(){this._queue=[]}enqueue(e,n){n=Object.assign({priority:0},n);let r={priority:n.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=n.priority){this._queue.push(r);return}let i=t.default(this._queue,r,(e,t)=>t.priority-e.priority);this._queue.splice(i,0,r)}dequeue(){return this._queue.shift()?.run}filter(e){return this._queue.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this._queue.length}}})),Rt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Nt(),n=Ft(),r=Lt(),i=()=>{},a=new n.TimeoutError;e.default=class extends t{constructor(e){if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=i,this._resolveIdle=i,e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:r.default},e),!(typeof e.intervalCap==`number`&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??``}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??``}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||e.interval===0,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=e.throwOnTimeout===!0,this._isPaused=e.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit(`next`)}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=i,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=i,this.emit(`idle`))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){let e=Date.now();if(this._intervalId===void 0){let t=this._intervalEnd-e;if(t<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},t)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let t=this._queue.dequeue();return t?(this.emit(`active`),t(),e&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==`number`&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise((r,i)=>{this._queue.enqueue(async()=>{this._pendingCount++,this._intervalCount++;try{r(await(this._timeout===void 0&&t.timeout===void 0?e():n.default(Promise.resolve(e()),t.timeout===void 0?this._timeout:t.timeout,()=>{(t.throwOnTimeout===void 0?this._throwOnTimeout:t.throwOnTimeout)&&i(a)})))}catch(e){i(e)}this._next()},t),this._tryToStartAnother(),this.emit(`add`)})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(e=>{let t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(e=>{let t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}})),zt=i(((e,t)=>{let n=P(),r=[`Failed to fetch`,`NetworkError when attempting to fetch resource.`,`The Internet connection appears to be offline.`,`Network request failed`];var i=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=Error(e),this.originalError.stack=this.stack),this.name=`AbortError`,this.message=e}};let a=(e,t,n)=>{let r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e},o=e=>r.includes(e),s=(e,t)=>new Promise((r,s)=>{t={onFailedAttempt:()=>{},retries:10,...t};let c=n.operation(t);c.attempt(async n=>{try{r(await e(n))}catch(e){if(!(e instanceof Error)){s(TypeError(`Non-error was thrown: "${e}". You should only throw errors.`));return}if(e instanceof i)c.stop(),s(e.originalError);else if(e instanceof TypeError&&!o(e.message))c.stop(),s(e);else{a(e,n,t);try{await t.onFailedAttempt(e)}catch(e){s(e);return}c.retry(e)||s(c.mainError())}}})});t.exports=s,t.exports.default=s,t.exports.AbortError=i})),Bt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getFileUploadJob=a,e.getMultipleFileUploadJobs=o,e.getFileData=s,e.getFileDataLength=c,e.getFileDataAsStream=l,e.getAllFileUploadsToComplete=u,e.warnIfNotUsingFilesUploadV2=d,e.warnIfChannels=f,e.errorIfChannelsCsv=p,e.errorIfInvalidOrMissingFileData=m,e.warnIfMissingOrInvalidFileNameAndDefault=h,e.warnIfLegacyFileType=g,e.buildMissingFileIdError=_,e.buildFileSizeErrorMsg=v,e.buildLegacyFileTypeWarning=y,e.buildMissingFileNameWarning=b,e.buildMissingExtensionWarning=x,e.buildLegacyMethodWarning=S,e.buildGeneralFilesUploadWarning=C,e.buildFilesUploadMissingMessage=w,e.buildChannelsWarning=T,e.buildMultipleChannelsErrorMsg=E,e.buildInvalidFilesUploadParamError=D;let t=r(`node:fs`),n=r(`node:stream`),i=ge();async function a(e,t){g(e,t),f(e,t),p(e);let n=h(e,t),r=await s(e),a=c(r),o={alt_text:e.alt_text,blocks:e.blocks,channel_id:e.channels??e.channel_id,filename:e.filename??n,highlight_type:e.highlight_type,initial_comment:e.initial_comment,snippet_type:e.snippet_type,title:e.title??e.filename??n,data:r,length:a};if(`thread_ts`in e&&(o.thread_ts=e.thread_ts),`token`in e&&(o.token=e.token),`content`in e)return Object.assign({content:e.content},o);if(`file`in e)return Object.assign({file:e.file},o);throw(0,i.errorWithCode)(Error(`Either a file or content field is required for valid file upload. You must supply one`),i.ErrorCode.FileUploadInvalidArgumentsError)}async function o(e,t){if(`file_uploads`in e)return Promise.all(e.file_uploads.map(n=>{let{blocks:r,channel_id:o,channels:s,initial_comment:c,thread_ts:l}=n;if(r||o||s||c||l)throw(0,i.errorWithCode)(Error(D()),i.ErrorCode.FileUploadInvalidArgumentsError);let u=Object.assign(Object.assign({},n),{blocks:e.blocks,channels:e.channels,channel_id:e.channel_id,initial_comment:e.initial_comment});if(`thread_ts`in e&&(u.thread_ts=e.thread_ts),`token`in e&&(u.token=e.token),`content`in n)return a(Object.assign({content:n.content},u),t);if(`file`in n)return a(Object.assign({file:n.file},u),t);throw(0,i.errorWithCode)(Error(`Either a file or content field is required for valid file upload. You must supply one`),i.ErrorCode.FileUploadInvalidArgumentsError)}));throw Error(w())}async function s(e){if(m(e),`file`in e){let{file:n}=e;if(Buffer.isBuffer(n))return n;if(typeof n==`string`)try{return(0,t.readFileSync)(n)}catch{throw(0,i.errorWithCode)(Error(`Unable to resolve file data for ${n}. Please supply a filepath string, or binary data Buffer or String directly.`),i.ErrorCode.FileUploadInvalidArgumentsError)}let r=await l(n);if(r)return r}if(`content`in e)return Buffer.from(e.content);throw(0,i.errorWithCode)(Error(`There was an issue getting the file data for the file or content supplied`),i.ErrorCode.FileUploadReadFileDataError)}function c(e){if(e)return Buffer.byteLength(e,`utf8`);throw(0,i.errorWithCode)(Error(v()),i.ErrorCode.FileUploadReadFileDataError)}async function l(e){let t=[];return new Promise((n,r)=>{e.on(`readable`,()=>{let n=e.read();for(;n!==null;)t.push(n),n=e.read()}),e.on(`end`,()=>{t.length>0?n(Buffer.concat(t)):r(Error(`No data in supplied file`))})})}function u(e){let t={};for(let n of e){let{blocks:e,channel_id:r,thread_ts:i,highlight_type:a,initial_comment:o,file_id:s,title:c}=n;if(s){let l=`:::${r}:::${i}:::${o}:::${JSON.stringify(e)}`;if(Object.prototype.hasOwnProperty.call(t,l))t[l].files.push({id:s,title:c,highlight_type:a});else{if(t[l]={files:[{id:s,title:c,highlight_type:a}],channel_id:r,blocks:e,initial_comment:o},i&&r){let e={channel_id:r,thread_ts:i};t[l]=Object.assign(Object.assign({},t[l]),e)}`token`in n&&(t[l].token=n.token)}}else throw Error(_())}return t}function d(e,t){let n=[`files.upload`].includes(e);e===`files.upload`&&t.warn(S(e)),n&&t.info(C())}function f(e,t){e.channels&&t.warn(T())}function p(e){if((e.channels?e.channels.split(`,`):[]).length>1)throw(0,i.errorWithCode)(Error(E()),i.ErrorCode.FileUploadInvalidArgumentsError)}function m(e){let t=`file`in e,r=`content`in e;if(!(t||r)||t&&r)throw(0,i.errorWithCode)(Error(`Either a file or content field is required for valid file upload. You cannot supply both`),i.ErrorCode.FileUploadInvalidArgumentsError);if(`file`in e){let{file:t}=e;if(t&&!(typeof t==`string`||Buffer.isBuffer(t)||t instanceof n.Readable))throw(0,i.errorWithCode)(Error(`file must be a valid string path, buffer or Readable`),i.ErrorCode.FileUploadInvalidArgumentsError)}if(`content`in e&&e.content&&typeof e.content!=`string`)throw(0,i.errorWithCode)(Error(`content must be a string`),i.ErrorCode.FileUploadInvalidArgumentsError)}function h(e,t){let n=`file.${e.filetype??`txt`}`,{filename:r}=e;return r?(r.split(`.`).length<2&&t.warn(x(r)),r):(t.warn(b()),n)}function g(e,t){e.filetype&&t.warn(y())}function _(){return`Missing required file id for file upload completion`}function v(){return`There was an issue calculating the size of your file`}function y(){return`filetype is no longer a supported field in files.uploadV2.
|
|
25
29
|
Please remove this field. To indicate file type, please do so via the required filename property using the appropriate file extension, e.g. image.png, text.txt`}function b(){return`filename is a required field for files.uploadV2.
|
|
26
|
-
For backwards compatibility and ease of migration, defaulting the filename. For best experience and consistent unfurl behavior, you should set the filename property with correct file extension, e.g. image.png, text.txt`}function x(e){return`filename supplied '${e}' may be missing a proper extension. Missing extenions may result in unexpected unfurl behavior when shared`}function S(e){return`${e} may cause some issues like timeouts for relatively large files.`}function C(){return`Our latest recommendation is to use client.files.uploadV2() method, which is mostly compatible and much stabler, instead.`}function w(){return`Something went wrong with processing file_uploads`}function T(){return`Although the 'channels' parameter is still supported for smoother migration from legacy files.upload, we recommend using the new channel_id parameter with a single str value instead (e.g. 'C12345').`}function E(){return`Sharing files with multiple channels is no longer supported in v2. Share files in each channel separately instead.`}function D(){return`You may supply file_uploads only for a single channel, message, or thread respectively. Therefore, please supply any channel_id, initial_comment or blocks, or thread_ts in the top-layer.`}})),zt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(e){return new Promise(t=>{setTimeout(t,e)})}})),Bt=a(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)})),Vt=i({EventEmitter:()=>Ht.default,default:()=>Ut}),Ht,Ut,Wt=n((()=>{Ht=r(Bt(),1),Ut=Ht.default})),Gt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Kt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),qt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Jt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Yt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Xt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Zt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Qt=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),$t=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),en=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),tn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),nn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),rn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),an=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),on=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),sn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),cn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ln=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),un=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),dn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),fn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),pn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),mn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),hn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),gn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),_n=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),vn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),yn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),bn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),xn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Sn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Cn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),wn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Tn=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Qt(),e),n($t(),e),n(en(),e),n(tn(),e),n(nn(),e),n(rn(),e),n(an(),e),n(on(),e),n(sn(),e),n(cn(),e),n(ln(),e),n(un(),e),n(dn(),e),n(fn(),e),n(pn(),e),n(mn(),e),n(hn(),e),n(gn(),e),n(_n(),e),n(vn(),e),n(yn(),e),n(bn(),e),n(xn(),e),n(Sn(),e),n(Cn(),e),n(wn(),e)})),En=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Dn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CustomFieldType=e.EntityType=void 0;var t;(function(e){e.Task=`slack#/entities/task`,e.File=`slack#/entities/file`,e.Item=`slack#/entities/item`,e.Incident=`slack#/entities/incident`,e.ContentItem=`slack#/entities/content_item`})(t||(e.EntityType=t={}));var n;(function(e){e.Integer=`integer`,e.String=`string`,e.Array=`array`,e.Date=`slack#/types/date`,e.Timestamp=`slack#/types/timestamp`,e.Image=`slack#/types/image`,e.ChannelId=`slack#/types/channel_id`,e.User=`slack#/types/user`,e.EntityRef=`slack#/types/entity_ref`,e.Boolean=`boolean`,e.Link=`slack#/types/link`,e.Email=`slack#/types/email`})(n||(e.CustomFieldType=n={}))})),On=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),kn=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Gt(),e),n(Kt(),e),n(qt(),e),n(Jt(),e),n(Yt(),e),n(Xt(),e),n(Zt(),e),n(Tn(),e),n(En(),e),n(Dn(),e),n(On(),e)})),An=a((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__exportStar||function(e,t){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(t,`__esModule`,{value:!0}),t.Methods=void 0;let i=(Wt(),e(Vt)),a=jn();function o(e,t){return e.apiCall.bind(e,t)}function s(e,t){return e.apiCall.bind(e,t)}function c(e){return e.filesUploadV2.bind(e)}t.Methods=class extends i.EventEmitter{constructor(){if(super(),this.admin={analytics:{getFile:o(this,`admin.analytics.getFile`)},apps:{activities:{list:s(this,`admin.apps.activities.list`)},approve:o(this,`admin.apps.approve`),approved:{list:o(this,`admin.apps.approved.list`)},clearResolution:o(this,`admin.apps.clearResolution`),config:{lookup:o(this,`admin.apps.config.lookup`),set:o(this,`admin.apps.config.set`)},requests:{cancel:o(this,`admin.apps.requests.cancel`),list:o(this,`admin.apps.requests.list`)},restrict:o(this,`admin.apps.restrict`),restricted:{list:o(this,`admin.apps.restricted.list`)},uninstall:o(this,`admin.apps.uninstall`)},auth:{policy:{assignEntities:o(this,`admin.auth.policy.assignEntities`),getEntities:o(this,`admin.auth.policy.getEntities`),removeEntities:o(this,`admin.auth.policy.removeEntities`)}},barriers:{create:o(this,`admin.barriers.create`),delete:o(this,`admin.barriers.delete`),list:s(this,`admin.barriers.list`),update:o(this,`admin.barriers.update`)},conversations:{archive:o(this,`admin.conversations.archive`),bulkArchive:o(this,`admin.conversations.bulkArchive`),bulkDelete:o(this,`admin.conversations.bulkDelete`),bulkMove:o(this,`admin.conversations.bulkMove`),convertToPrivate:o(this,`admin.conversations.convertToPrivate`),convertToPublic:o(this,`admin.conversations.convertToPublic`),create:o(this,`admin.conversations.create`),delete:o(this,`admin.conversations.delete`),disconnectShared:o(this,`admin.conversations.disconnectShared`),ekm:{listOriginalConnectedChannelInfo:s(this,`admin.conversations.ekm.listOriginalConnectedChannelInfo`)},getConversationPrefs:o(this,`admin.conversations.getConversationPrefs`),getCustomRetention:o(this,`admin.conversations.getCustomRetention`),getTeams:o(this,`admin.conversations.getTeams`),invite:o(this,`admin.conversations.invite`),lookup:o(this,`admin.conversations.lookup`),removeCustomRetention:o(this,`admin.conversations.removeCustomRetention`),rename:o(this,`admin.conversations.rename`),restrictAccess:{addGroup:o(this,`admin.conversations.restrictAccess.addGroup`),listGroups:o(this,`admin.conversations.restrictAccess.listGroups`),removeGroup:o(this,`admin.conversations.restrictAccess.removeGroup`)},search:s(this,`admin.conversations.search`),setConversationPrefs:o(this,`admin.conversations.setConversationPrefs`),setCustomRetention:o(this,`admin.conversations.setCustomRetention`),setTeams:o(this,`admin.conversations.setTeams`),unarchive:o(this,`admin.conversations.unarchive`)},emoji:{add:o(this,`admin.emoji.add`),addAlias:o(this,`admin.emoji.addAlias`),list:s(this,`admin.emoji.list`),remove:o(this,`admin.emoji.remove`),rename:o(this,`admin.emoji.rename`)},functions:{list:o(this,`admin.functions.list`),permissions:{lookup:o(this,`admin.functions.permissions.lookup`),set:o(this,`admin.functions.permissions.set`)}},inviteRequests:{approve:o(this,`admin.inviteRequests.approve`),approved:{list:o(this,`admin.inviteRequests.approved.list`)},denied:{list:o(this,`admin.inviteRequests.denied.list`)},deny:o(this,`admin.inviteRequests.deny`),list:o(this,`admin.inviteRequests.list`)},roles:{addAssignments:o(this,`admin.roles.addAssignments`),listAssignments:s(this,`admin.roles.listAssignments`),removeAssignments:o(this,`admin.roles.removeAssignments`)},teams:{admins:{list:o(this,`admin.teams.admins.list`)},create:o(this,`admin.teams.create`),list:s(this,`admin.teams.list`),owners:{list:o(this,`admin.teams.owners.list`)},settings:{info:o(this,`admin.teams.settings.info`),setDefaultChannels:o(this,`admin.teams.settings.setDefaultChannels`),setDescription:o(this,`admin.teams.settings.setDescription`),setDiscoverability:o(this,`admin.teams.settings.setDiscoverability`),setIcon:o(this,`admin.teams.settings.setIcon`),setName:o(this,`admin.teams.settings.setName`)}},usergroups:{addChannels:o(this,`admin.usergroups.addChannels`),addTeams:o(this,`admin.usergroups.addTeams`),listChannels:o(this,`admin.usergroups.listChannels`),removeChannels:o(this,`admin.usergroups.removeChannels`)},users:{assign:o(this,`admin.users.assign`),invite:o(this,`admin.users.invite`),list:s(this,`admin.users.list`),remove:o(this,`admin.users.remove`),session:{clearSettings:o(this,`admin.users.session.clearSettings`),getSettings:o(this,`admin.users.session.getSettings`),invalidate:o(this,`admin.users.session.invalidate`),list:s(this,`admin.users.session.list`),reset:o(this,`admin.users.session.reset`),resetBulk:o(this,`admin.users.session.resetBulk`),setSettings:o(this,`admin.users.session.setSettings`)},setAdmin:o(this,`admin.users.setAdmin`),setExpiration:o(this,`admin.users.setExpiration`),setOwner:o(this,`admin.users.setOwner`),setRegular:o(this,`admin.users.setRegular`),unsupportedVersions:{export:o(this,`admin.users.unsupportedVersions.export`)}},workflows:{collaborators:{add:o(this,`admin.workflows.collaborators.add`),remove:o(this,`admin.workflows.collaborators.remove`)},permissions:{lookup:o(this,`admin.workflows.permissions.lookup`)},search:s(this,`admin.workflows.search`),unpublish:o(this,`admin.workflows.unpublish`)}},this.api={test:s(this,`api.test`)},this.assistant={threads:{setStatus:o(this,`assistant.threads.setStatus`),setSuggestedPrompts:o(this,`assistant.threads.setSuggestedPrompts`),setTitle:o(this,`assistant.threads.setTitle`)}},this.apps={connections:{open:s(this,`apps.connections.open`)},event:{authorizations:{list:o(this,`apps.event.authorizations.list`)}},manifest:{create:o(this,`apps.manifest.create`),delete:o(this,`apps.manifest.delete`),export:o(this,`apps.manifest.export`),update:o(this,`apps.manifest.update`),validate:o(this,`apps.manifest.validate`)},uninstall:o(this,`apps.uninstall`),user:{connection:{update:o(this,`apps.user.connection.update`)}}},this.auth={revoke:s(this,`auth.revoke`),teams:{list:s(this,`auth.teams.list`)},test:s(this,`auth.test`)},this.bookmarks={add:o(this,`bookmarks.add`),edit:o(this,`bookmarks.edit`),list:o(this,`bookmarks.list`),remove:o(this,`bookmarks.remove`)},this.bots={info:s(this,`bots.info`)},this.calls={add:o(this,`calls.add`),end:o(this,`calls.end`),info:o(this,`calls.info`),update:o(this,`calls.update`),participants:{add:o(this,`calls.participants.add`),remove:o(this,`calls.participants.remove`)}},this.canvases={access:{delete:o(this,`canvases.access.delete`),set:o(this,`canvases.access.set`)},create:s(this,`canvases.create`),delete:o(this,`canvases.delete`),edit:o(this,`canvases.edit`),sections:{lookup:o(this,`canvases.sections.lookup`)}},this.chat={appendStream:o(this,`chat.appendStream`),delete:o(this,`chat.delete`),deleteScheduledMessage:o(this,`chat.deleteScheduledMessage`),getPermalink:o(this,`chat.getPermalink`),meMessage:o(this,`chat.meMessage`),postEphemeral:o(this,`chat.postEphemeral`),postMessage:o(this,`chat.postMessage`),scheduleMessage:o(this,`chat.scheduleMessage`),scheduledMessages:{list:s(this,`chat.scheduledMessages.list`)},startStream:o(this,`chat.startStream`),stopStream:o(this,`chat.stopStream`),unfurl:o(this,`chat.unfurl`),update:o(this,`chat.update`)},this.conversations={acceptSharedInvite:o(this,`conversations.acceptSharedInvite`),approveSharedInvite:o(this,`conversations.approveSharedInvite`),archive:o(this,`conversations.archive`),canvases:{create:o(this,`conversations.canvases.create`)},close:o(this,`conversations.close`),create:o(this,`conversations.create`),declineSharedInvite:o(this,`conversations.declineSharedInvite`),externalInvitePermissions:{set:o(this,`conversations.externalInvitePermissions.set`)},history:o(this,`conversations.history`),info:o(this,`conversations.info`),invite:o(this,`conversations.invite`),inviteShared:o(this,`conversations.inviteShared`),join:o(this,`conversations.join`),kick:o(this,`conversations.kick`),leave:o(this,`conversations.leave`),list:s(this,`conversations.list`),listConnectInvites:s(this,`conversations.listConnectInvites`),mark:o(this,`conversations.mark`),members:o(this,`conversations.members`),open:o(this,`conversations.open`),rename:o(this,`conversations.rename`),replies:o(this,`conversations.replies`),requestSharedInvite:{approve:o(this,`conversations.requestSharedInvite.approve`),deny:o(this,`conversations.requestSharedInvite.deny`),list:s(this,`conversations.requestSharedInvite.list`)},setPurpose:o(this,`conversations.setPurpose`),setTopic:o(this,`conversations.setTopic`),unarchive:o(this,`conversations.unarchive`)},this.dialog={open:o(this,`dialog.open`)},this.dnd={endDnd:s(this,`dnd.endDnd`),endSnooze:s(this,`dnd.endSnooze`),info:s(this,`dnd.info`),setSnooze:o(this,`dnd.setSnooze`),teamInfo:o(this,`dnd.teamInfo`)},this.emoji={list:s(this,`emoji.list`)},this.entity={presentDetails:o(this,`entity.presentDetails`)},this.files={completeUploadExternal:o(this,`files.completeUploadExternal`),delete:o(this,`files.delete`),getUploadURLExternal:o(this,`files.getUploadURLExternal`),info:o(this,`files.info`),list:o(this,`files.list`),revokePublicURL:o(this,`files.revokePublicURL`),sharedPublicURL:o(this,`files.sharedPublicURL`),upload:o(this,`files.upload`),uploadV2:c(this),comments:{delete:o(this,`files.comments.delete`)},remote:{add:o(this,`files.remote.add`),info:o(this,`files.remote.info`),list:o(this,`files.remote.list`),remove:o(this,`files.remote.remove`),share:o(this,`files.remote.share`),update:o(this,`files.remote.update`)}},this.functions={completeError:o(this,`functions.completeError`),completeSuccess:o(this,`functions.completeSuccess`)},this.migration={exchange:o(this,`migration.exchange`)},this.oauth={access:o(this,`oauth.access`),v2:{access:o(this,`oauth.v2.access`),exchange:o(this,`oauth.v2.exchange`)}},this.openid={connect:{token:o(this,`openid.connect.token`),userInfo:s(this,`openid.connect.userInfo`)}},this.pins={add:o(this,`pins.add`),list:o(this,`pins.list`),remove:o(this,`pins.remove`)},this.reactions={add:o(this,`reactions.add`),get:o(this,`reactions.get`),list:s(this,`reactions.list`),remove:o(this,`reactions.remove`)},this.reminders={add:o(this,`reminders.add`),complete:o(this,`reminders.complete`),delete:o(this,`reminders.delete`),info:o(this,`reminders.info`),list:s(this,`reminders.list`)},this.rtm={connect:s(this,`rtm.connect`),start:s(this,`rtm.start`)},this.search={all:o(this,`search.all`),files:o(this,`search.files`),messages:o(this,`search.messages`)},this.slackLists={access:{delete:o(this,`slackLists.access.delete`),set:o(this,`slackLists.access.set`)},create:o(this,`slackLists.create`),download:{get:o(this,`slackLists.download.get`),start:o(this,`slackLists.download.start`)},items:{create:o(this,`slackLists.items.create`),delete:o(this,`slackLists.items.delete`),deleteMultiple:o(this,`slackLists.items.deleteMultiple`),info:o(this,`slackLists.items.info`),list:o(this,`slackLists.items.list`),update:o(this,`slackLists.items.update`)},update:o(this,`slackLists.update`)},this.team={accessLogs:s(this,`team.accessLogs`),billableInfo:s(this,`team.billableInfo`),billing:{info:o(this,`team.billing.info`)},externalTeams:{disconnect:o(this,`team.externalTeams.disconnect`),list:o(this,`team.externalTeams.list`)},info:s(this,`team.info`),integrationLogs:s(this,`team.integrationLogs`),preferences:{list:s(this,`team.preferences.list`)},profile:{get:s(this,`team.profile.get`)}},this.tooling={tokens:{rotate:o(this,`tooling.tokens.rotate`)}},this.usergroups={create:o(this,`usergroups.create`),disable:o(this,`usergroups.disable`),enable:o(this,`usergroups.enable`),list:s(this,`usergroups.list`),update:o(this,`usergroups.update`),users:{list:o(this,`usergroups.users.list`),update:o(this,`usergroups.users.update`)}},this.users={conversations:o(this,`users.conversations`),deletePhoto:o(this,`users.deletePhoto`),discoverableContacts:{lookup:o(this,`users.discoverableContacts.lookup`)},getPresence:o(this,`users.getPresence`),identity:o(this,`users.identity`),info:o(this,`users.info`),list:o(this,`users.list`),lookupByEmail:o(this,`users.lookupByEmail`),setPhoto:o(this,`users.setPhoto`),setPresence:o(this,`users.setPresence`),profile:{get:o(this,`users.profile.get`),set:o(this,`users.profile.set`)}},this.views={open:o(this,`views.open`),publish:o(this,`views.publish`),push:o(this,`views.push`),update:o(this,`views.update`)},this.stars={add:o(this,`stars.add`),list:o(this,`stars.list`),remove:o(this,`stars.remove`)},this.workflows={featured:{add:o(this,`workflows.featured.add`),list:o(this,`workflows.featured.list`),remove:o(this,`workflows.featured.remove`),set:o(this,`workflows.featured.set`)},stepCompleted:o(this,`workflows.stepCompleted`),stepFailed:o(this,`workflows.stepFailed`),updateStep:o(this,`workflows.updateStep`)},new.target!==a.WebClient&&!(new.target.prototype instanceof a.WebClient))throw Error(`Attempt to inherit from WebClient methods without inheriting from WebClient`)}},r(kn(),t)})),jn=a((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;o<a.length;o++)a[o]!==`default`&&n(i,t,a[o]);return r(i,t),i}})(),a=e&&e.__await||function(e){return this instanceof a?(this.v=e,this):new a(e)},o=e&&e.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),c(`next`),c(`throw`),c(`return`,s),i[Symbol.asyncIterator]=function(){return this},i;function s(e){return function(t){return Promise.resolve(t).then(e,f)}}function c(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||l(e,t)})},t&&(i[e]=t(i[e])))}function l(e,t){try{u(r[e](t))}catch(e){p(o[0][3],e)}}function u(e){e.value instanceof a?Promise.resolve(e.value.v).then(d,f):p(o[0][2],e)}function d(e){l(`next`,e)}function f(e){l(`throw`,e)}function p(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}},s=e&&e.__asyncValues||function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values==`function`?__values(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}},c=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},l=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.WebClient=e.WebClientEvent=void 0,e.buildThreadTsWarningMessage=L;let u=t(`node:path`),d=t(`node:querystring`),f=t(`node:util`),p=l(t(`node:zlib`)),m=l(Ot()),h=l(yt()),g=l(kt()),_=l(At()),v=l(It()),y=i(Lt()),b=we(),x=_e(),S=Rt(),C=l(zt()),w=ye(),T=be(),E=An(),D=xe(),O=[`delete`,`common`,`get`,`put`,`head`,`post`,`link`,`patch`,`purge`,`unlink`,`options`],k=()=>void 0;var A;(function(e){e.RATE_LIMITED=`rate_limited`})(A||(e.WebClientEvent=A={}));var j=class e extends E.Methods{constructor(t,{slackApiUrl:n=`https://slack.com/api/`,logger:r=void 0,logLevel:i=void 0,maxRequestConcurrency:a=100,retryConfig:o=D.tenRetriesInAboutThirtyMinutes,agent:s=void 0,tls:c=void 0,timeout:l=0,rejectRateLimitedCalls:u=!1,headers:d={},teamId:f=void 0,allowAbsoluteUrls:p=!0,attachOriginalToWebAPIRequestError:h=!0,requestInterceptor:_=void 0,adapter:y=void 0}={}){super(),this.token=t,this.slackApiUrl=n,this.slackApiUrl.endsWith(`/`)||(this.slackApiUrl+=`/`),this.retryConfig=o,this.requestQueue=new v.default({concurrency:a}),this.tlsConfig=c===void 0?{}:c,this.rejectRateLimitedCalls=u,this.teamId=f,this.allowAbsoluteUrls=p,this.attachOriginalToWebAPIRequestError=h,r===void 0?this.logger=(0,T.getLogger)(e.loggerName,i??T.LogLevel.INFO,r):(this.logger=r,i!==void 0&&this.logger.debug(`The logLevel given to WebClient was ignored as you also gave logger`)),this.token&&!d.Authorization&&(d.Authorization=`Bearer ${this.token}`),this.axios=m.default.create({adapter:y?e=>y(Object.assign(Object.assign({},e),{adapter:void 0})):void 0,timeout:l,baseURL:this.slackApiUrl,headers:(0,g.default)()?d:Object.assign({"User-Agent":(0,w.getUserAgent)()},d),httpAgent:s,httpsAgent:s,validateStatus:()=>!0,maxRedirects:0,proxy:!1}),this.axios.defaults.headers.post[`Content-Type`]=void 0,_&&this.axios.interceptors.request.use(_,null),this.axios.interceptors.request.use(this.serializeApiCallData.bind(this),null),this.logger.debug(`initialized`)}async apiCall(e,t={}){if(this.logger.debug(`apiCall('${e}') start`),P(e,this.logger),F(e,this.logger,t),I(e,this.logger,t),typeof t==`string`||typeof t==`number`||typeof t==`boolean`)throw TypeError(`Expected an options argument but instead received a ${typeof t}`);if((0,S.warnIfNotUsingFilesUploadV2)(e,this.logger),e===`files.uploadV2`)return this.filesUploadV2(t);let n={};t.token&&(n.Authorization=`Bearer ${t.token}`);let r=this.deriveRequestUrl(e),i=await this.makeRequest(r,Object.assign({team_id:this.teamId},t),n),a=await this.buildResult(i);if(this.logger.debug(`http request result: ${JSON.stringify(a)}`),a.response_metadata!==void 0&&a.response_metadata.warnings!==void 0&&a.response_metadata.warnings.forEach(this.logger.warn.bind(this.logger)),a.response_metadata!==void 0&&a.response_metadata.messages!==void 0)for(let e of a.response_metadata.messages){let t=/\[ERROR\](.*)/,n=/\[WARN\](.*)/;if(t.test(e)){let n=e.match(t);n!=null&&this.logger.error(n[1].trim())}else if(n.test(e)){let t=e.match(n);t!=null&&this.logger.warn(t[1].trim())}}if(!a.ok&&i.headers[`content-type`]!==`application/gzip`||`ok`in a&&a.ok===!1)throw(0,x.platformErrorFromResult)(a);return this.logger.debug(`apiCall('${e}') end`),a}paginate(e,t,n,r){let i=(()=>{if(t!==void 0&&typeof t.limit==`number`){let{limit:e}=t;return t.limit=void 0,e}return 200})();function c(){return o(this,arguments,function*(){let n,r={limit:i};for(t!==void 0&&t.cursor!==void 0&&(r.cursor=t.cursor);n===void 0||r!==void 0;)n=yield a(this.apiCall(e,Object.assign(t===void 0?{}:t,r))),yield yield a(n),r=M(n,i)})}if(n===void 0)return c.call(this);let l=r===void 0?k:r,u=0;return(async()=>{var e,t,r,i;let a=c.call(this),o=(await a.next(void 0)).value,d=l(void 0,o,u);if(u+=1,n(o))return d;try{for(var f=!0,p=s(a),m;m=await p.next(),e=m.done,!e;f=!0){i=m.value,f=!1;let e=i;if(d=l(d,e,u),n(e))return d;u+=1}}catch(e){t={error:e}}finally{try{!f&&!e&&(r=p.return)&&await r.call(p)}finally{if(t)throw t.error}}return d})()}chatStream(e){let{buffer_size:t}=e,n=c(e,[`buffer_size`]),r={buffer_size:t};return new b.ChatStreamer(this,this.logger,n,r)}async filesUploadV2(e){this.logger.debug(`files.uploadV2() start`);let t=await this.getAllFileUploads(e);return(await this.fetchAllUploadURLExternal(t)).forEach((e,n)=>{t[n].upload_url=e.upload_url,t[n].file_id=e.file_id}),await this.postFileUploadsToExternalURL(t,e),{ok:!0,files:await this.completeFileUploads(t)}}async fetchAllUploadURLExternal(e){return Promise.all(e.map(e=>{let t={filename:e.filename,length:e.length,alt_text:e.alt_text,snippet_type:e.snippet_type};return`token`in e&&(t.token=e.token),this.files.getUploadURLExternal(t)}))}async completeFileUploads(e){let t=Object.values((0,S.getAllFileUploadsToComplete)(e));return Promise.all(t.map(e=>this.files.completeUploadExternal(e)))}async postFileUploadsToExternalURL(e,t){return Promise.all(e.map(async e=>{let{upload_url:n,file_id:r,filename:i,data:a}=e,o=a;if(n){let e={};t.token&&(e.Authorization=`Bearer ${t.token}`);let a=await this.makeRequest(n,{body:o},e);if(a.status!==200)return Promise.reject(Error(`Failed to upload file (id:${r}, filename: ${i})`));let s={ok:!0,body:a.data};return Promise.resolve(s)}return Promise.reject(Error(`No upload url found for file (id: ${r}, filename: ${i}`))}))}async getAllFileUploads(e){let t=[];return(`file`in e||`content`in e)&&t.push(await(0,S.getFileUploadJob)(e,this.logger)),`file_uploads`in e&&(t=t.concat(await(0,S.getMultipleFileUploadJobs)(e,this.logger))),t}async makeRequest(e,t,n={}){return(0,y.default)(()=>this.requestQueue.add(async()=>{try{let r=Object.assign({headers:n},this.tlsConfig);e.endsWith(`admin.analytics.getFile`)&&(r.responseType=`arraybuffer`),e.endsWith(`apps.event.authorizations.list`)&&(t.token=void 0),this.logger.debug(`http request url: ${e}`),this.logger.debug(`http request body: ${JSON.stringify(R(t))}`);let i=Object.keys(this.axios.defaults.headers).reduce((e,t)=>(O.includes(t)||(e[t]=this.axios.defaults.headers[t]),e),{});i=Object.assign(Object.assign(Object.assign({},this.axios.defaults.headers.common),i),n),this.logger.debug(`http request headers: ${JSON.stringify(R(i))}`);let a=await this.axios.post(e,t,r);if(this.logger.debug(`http response received`),a.status===429){let n=N(a);throw n===void 0?new y.AbortError(Error(`Retry header did not contain a valid timeout (url: ${e}, retry-after header: ${a.headers[`retry-after`]})`)):(this.emit(A.RATE_LIMITED,n,{url:e,body:t}),this.rejectRateLimitedCalls?new y.AbortError((0,x.rateLimitedErrorWithDelay)(n)):(this.logger.info(`API Call failed due to rate limiting. Will retry in ${n} seconds.`),this.requestQueue.pause(),await(0,C.default)(n*1e3),this.requestQueue.start(),Error(`A rate limit was exceeded (url: ${e}, retry-after: ${n})`)))}if(a.status!==200)throw(0,x.httpErrorFromResponse)(a);return a}catch(e){let t=e;throw this.logger.warn(`http request failed`,t.message),t.request?(0,x.requestErrorWithOriginal)(t,this.attachOriginalToWebAPIRequestError):e}}),this.retryConfig)}deriveRequestUrl(e){return(e.startsWith(`https://`)||e.startsWith(`http://`))&&this.allowAbsoluteUrls?e:`${this.axios.getUri()+e}`}serializeApiCallData(e){let{data:t,headers:n}=e,r=!1,i=Object.entries(t).map(([e,t])=>{if(t==null)return[];let n=t;return Buffer.isBuffer(t)||(0,_.default)(t)?r=!0:typeof t!=`string`&&typeof t!=`number`&&typeof t!=`boolean`&&(n=JSON.stringify(t)),[e,n]});if(r){this.logger.debug(`Request arguments contain binary data`);let t=i.reduce((e,[t,n])=>{if(Buffer.isBuffer(n)||(0,_.default)(n)){let r={};r.filename=(()=>{let e=n;return typeof e.name==`string`?(0,u.basename)(e.name):typeof e.path==`string`?(0,u.basename)(e.path):`Untitled`})(),e.append(t,n,r)}else t!==void 0&&n!==void 0&&e.append(t,n);return e},new h.default);if(n)for(let[e,r]of Object.entries(t.getHeaders()))n[e]=r;return e.data=t,e.headers=n,e}return n&&(n[`Content-Type`]=`application/x-www-form-urlencoded`),e.data=(0,d.stringify)(i.reduce((e,[t,n])=>(t!==void 0&&n!==void 0&&(e[t]=n),e),{})),e.headers=n,e}async buildResult(e){let{data:t}=e,n=e.headers[`content-type`]===`application/gzip`;if(n)try{let e=await new Promise((e,n)=>{p.default.unzip(t,(t,r)=>t?n(t):e(r.toString().split(`
|
|
27
|
-
`)))}).then(e=>e).catch(e=>{throw e}),n=[];if(Array.isArray(e))for(let t of e)t&&t.length>0&&n.push(JSON.parse(t));t={file_data:n}}catch(e){t={ok:!1,error:e}}else !n&&e.request.path===`/api/admin.analytics.getFile`&&(t=JSON.parse(new f.TextDecoder().decode(t)));if(typeof t==`string`)try{t=JSON.parse(t)}catch{t={ok:!1,error:t}}t.response_metadata===void 0&&(t.response_metadata={}),e.headers[`x-oauth-scopes`]!==void 0&&(t.response_metadata.scopes=e.headers[`x-oauth-scopes`].trim().split(/\s*,\s*/)),e.headers[`x-accepted-oauth-scopes`]!==void 0&&(t.response_metadata.acceptedScopes=e.headers[`x-accepted-oauth-scopes`].trim().split(/\s*,\s*/));let r=N(e);return r!==void 0&&(t.response_metadata.retryAfter=r),t}};e.WebClient=j,j.loggerName=`WebClient`,e.default=j;function M(e,t){if(e!==void 0&&e.response_metadata!==void 0&&e.response_metadata.next_cursor!==void 0&&e.response_metadata.next_cursor!==``)return{limit:t,cursor:e.response_metadata.next_cursor}}function N(e){if(e.headers[`retry-after`]!==void 0){let t=Number.parseInt(e.headers[`retry-after`],10);if(!Number.isNaN(t))return t}}function P(e,t){[`workflows.stepCompleted`,`workflows.stepFailed`,`workflows.updateStep`].some(t=>RegExp(`^${t}`).test(e))&&t.warn(`${e} is deprecated. Please check on https://docs.slack.dev/reference/methods for an alternative.`)}function F(e,t,n){let r=[`chat.postEphemeral`,`chat.postMessage`,`chat.scheduleMessage`].includes(e),i=e=>Array.isArray(e.attachments)&&e.attachments.length,a=e=>Array.isArray(e.attachments)&&e.attachments.some(e=>!e.fallback||e.fallback.trim()===``),o=e=>(e.text===void 0||e.text===null||e.text===``)&&(e.markdown_text===void 0||e.markdown===null||e.markdown_text===``),s=()=>`The top-level \`text\` argument is missing in the request payload for a ${e} call - It's a best practice to always provide a \`text\` argument when posting a message. The \`text\` is used in places where the content cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc.`;r&&typeof n==`object`&&(i(n)?a(n)&&o(n)&&(t.warn(s()),t.warn(`Additionally, the attachment-level \`fallback\` argument is missing in the request payload for a ${e} call - To avoid this warning, it is recommended to always provide a top-level \`text\` argument when posting a message. Alternatively, you can provide an attachment-level \`fallback\` argument, though this is now considered a legacy field (see https://docs.slack.dev/legacy/legacy-messaging/legacy-secondary-message-attachments for more details).`)):o(n)&&t.warn(s()))}function I(e,t,n){[`chat.postEphemeral`,`chat.postMessage`,`chat.scheduleMessage`,`files.upload`].includes(e)&&n?.thread_ts!==void 0&&typeof n?.thread_ts!=`string`&&t.warn(L(e))}function L(e){return`The given thread_ts value in the request payload for a ${e} call is a float value. We highly recommend using a string value instead.`}function R(e){return Object.entries(e).map(([e,t])=>{if(t==null)return[];let n=t;return(e.match(/.*token.*/)!==null||e.match(/[Aa]uthorization/))&&(n=`[[REDACTED]]`),Buffer.isBuffer(t)||(0,_.default)(t)?n=`[[BINARY VALUE OMITTED]]`:typeof t!=`string`&&typeof t!=`number`&&typeof t!=`boolean`&&(n=JSON.stringify(t)),[e,n]}).reduce((e,[t,n])=>(t!==void 0&&n!==void 0&&(e[t]=n),e),{})}})),Mn=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.WebClientEvent=e.WebClient=e.ChatStreamer=e.retryPolicies=e.LogLevel=e.addAppMetadata=e.ErrorCode=void 0;var i=_e();Object.defineProperty(e,`ErrorCode`,{enumerable:!0,get:function(){return i.ErrorCode}});var a=ye();Object.defineProperty(e,`addAppMetadata`,{enumerable:!0,get:function(){return a.addAppMetadata}});var o=be();Object.defineProperty(e,`LogLevel`,{enumerable:!0,get:function(){return o.LogLevel}});var s=xe();Object.defineProperty(e,`retryPolicies`,{enumerable:!0,get:function(){return r(s).default}}),n(Se(),e),n(Ce(),e);var c=we();Object.defineProperty(e,`ChatStreamer`,{enumerable:!0,get:function(){return c.ChatStreamer}});var l=jn();Object.defineProperty(e,`WebClient`,{enumerable:!0,get:function(){return l.WebClient}}),Object.defineProperty(e,`WebClientEvent`,{enumerable:!0,get:function(){return l.WebClientEvent}}),n(An(),e)})),Nn=a(((e,t)=>{t.exports={name:`@slack/socket-mode`,version:`2.0.7`,description:`Official library for using the Slack Platform's Socket Mode API`,author:`Slack Technologies, LLC`,license:`MIT`,keywords:[`slack`,`socket`,`websocket`,`firewall`,`bot`,`client`,`http`,`websocket`,`api`,`proxy`,`state`,`connection`],main:`dist/src/index.js`,types:`./dist/src/index.d.ts`,files:[`dist/**/*`],engines:{node:`>= 18`,npm:`>= 8.6.0`},repository:{type:`git`,url:`git+https://github.com/slackapi/node-slack-sdk.git`},homepage:`https://docs.slack.dev/tools/node-slack-sdk/socket-mode/`,publishConfig:{access:`public`},bugs:{url:`https://github.com/slackapi/node-slack-sdk/issues`},scripts:{build:`npm run build:clean && tsc`,"build:clean":`shx rm -rf ./dist`,docs:`npx typedoc --plugin typedoc-plugin-markdown`,prepack:`npm run build`,test:`npm run test:unit && npm run test:integration`,"test:node18":`npm run build && bash -c 'node --test --test-reporter=spec --import tsx src/*.test.ts' && npm run test:integration`,"test:integration":`npm run build && node --import tsx --test test/integration.test.js`,"test:unit":`npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts`,watch:`npx nodemon --watch 'src' --ext 'ts' --exec npm test`},dependencies:{"@slack/logger":`^4.0.1`,"@slack/web-api":`^7.15.0`,"@types/node":`>=18`,"@types/ws":`^8`,eventemitter3:`^5`,ws:`^8`},devDependencies:{"@types/proxyquire":`^1.3.31`,"@types/sinon":`^21`,nodemon:`^3.1.0`,proxyquire:`^2.1.3`,sinon:`^21`}}})),Pn=a(((e,t)=>{let n=[`nodebuffer`,`arraybuffer`,`fragments`],r=typeof Blob<`u`;r&&n.push(`blob`),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,hasBlob:r,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:()=>{}}})),Fn=i({}),In=n((()=>{throw Error(`Optional native dependency "bufferutil" is not bundled in this vendored module.`)})),Ln=a(((t,n)=>{let{EMPTY_BUFFER:r}=Pn(),i=Buffer[Symbol.species];function a(e,t){if(e.length===0)return r;if(e.length===1)return e[0];let n=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let r=e[t];n.set(r,a),a+=r.length}return a<t?new i(n.buffer,n.byteOffset,a):n}function o(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}function s(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}function c(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function l(e){if(l.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new i(e):ArrayBuffer.isView(e)?t=new i(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),l.readOnly=!1),t}if(n.exports={concat:a,mask:o,toArrayBuffer:c,toBuffer:l,unmask:s},!process.env.WS_NO_BUFFER_UTIL)try{let t=(In(),e(Fn));n.exports.mask=function(e,n,r,i,a){a<48?o(e,n,r,i,a):t.mask(e,n,r,i,a)},n.exports.unmask=function(e,n){e.length<32?s(e,n):t.unmask(e,n)}}catch{}})),Rn=a(((e,t)=>{let n=Symbol(`kDone`),r=Symbol(`kRun`);t.exports=class{constructor(e){this[n]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[n])}}}})),zn=a(((e,n)=>{let r=t(`zlib`),i=Ln(),a=Rn(),{kStatusCode:o}=Pn(),s=Buffer[Symbol.species],c=Buffer.from([0,0,255,255]),l=Symbol(`permessage-deflate`),u=Symbol(`total-length`),d=Symbol(`callback`),f=Symbol(`buffers`),p=Symbol(`error`),m;n.exports=class{constructor(e){this._options=e||{},this._threshold=this._options.threshold===void 0?1024:this._options.threshold,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,m||=new a(this._options.concurrencyLimit===void 0?10:this._options.concurrencyLimit)}static get extensionName(){return`permessage-deflate`}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits??(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&=(this._inflate.close(),null),this._deflate){let e=this._deflate[d];this._deflate.close(),this._deflate=null,e&&e(Error(`The deflate stream was closed while data was being processed`))}}acceptAsServer(e){let t=this._options,n=e.find(e=>!(t.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits==`number`&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==`number`&&!e.client_max_window_bits));if(!n)throw Error(`None of the extension offers can be accepted`);return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits==`number`&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits==`number`?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw Error(`Unexpected parameter "client_no_context_takeover"`);if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits==`number`&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==`number`&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error(`Unexpected or invalid parameter "client_max_window_bits"`);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(n=n[0],t===`client_max_window_bits`){if(n!==!0){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else if(t===`server_max_window_bits`){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(t===`client_no_context_takeover`||t===`server_no_context_takeover`){if(n!==!0)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=n})}),e}decompress(e,t,n){m.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){m.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,n){let a=this._isServer?`client`:`server`;if(!this._inflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._inflate=r.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[l]=this,this._inflate[u]=0,this._inflate[f]=[],this._inflate.on(`error`,_),this._inflate.on(`data`,g)}this._inflate[d]=n,this._inflate.write(e),t&&this._inflate.write(c),this._inflate.flush(()=>{let e=this._inflate[p];if(e){this._inflate.close(),this._inflate=null,n(e);return}let r=i.concat(this._inflate[f],this._inflate[u]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[u]=0,this._inflate[f]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),n(null,r)})}_compress(e,t,n){let a=this._isServer?`server`:`client`;if(!this._deflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._deflate=r.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[u]=0,this._deflate[f]=[],this._deflate.on(`data`,h)}this._deflate[d]=n,this._deflate.write(e),this._deflate.flush(r.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=i.concat(this._deflate[f],this._deflate[u]);t&&(e=new s(e.buffer,e.byteOffset,e.length-4)),this._deflate[d]=null,this._deflate[u]=0,this._deflate[f]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),n(null,e)})}};function h(e){this[f].push(e),this[u]+=e.length}function g(e){if(this[u]+=e.length,this[l]._maxPayload<1||this[u]<=this[l]._maxPayload){this[f].push(e);return}this[p]=RangeError(`Max payload size exceeded`),this[p].code=`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`,this[p][o]=1009,this.removeListener(`data`,g),this.reset()}function _(e){if(this[l]._inflate=null,this[p]){this[d](this[p]);return}e[o]=1007,this[d](e)}})),Bn=i({}),Vn=n((()=>{throw Error(`Optional native dependency "utf-8-validate" is not bundled in this vendored module.`)})),X=a(((n,r)=>{let{isUtf8:i}=t(`buffer`),{hasBlob:a}=Pn(),o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function s(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function c(e){let t=e.length,n=0;for(;n<t;)if(!(e[n]&128))n++;else if((e[n]&224)==192){if(n+1===t||(e[n+1]&192)!=128||(e[n]&254)==192)return!1;n+=2}else if((e[n]&240)==224){if(n+2>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||e[n]===224&&(e[n+1]&224)==128||e[n]===237&&(e[n+1]&224)==160)return!1;n+=3}else if((e[n]&248)==240){if(n+3>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||(e[n+3]&192)!=128||e[n]===240&&(e[n+1]&240)==128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}function l(e){return a&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&(e[Symbol.toStringTag]===`Blob`||e[Symbol.toStringTag]===`File`)}if(r.exports={isBlob:l,isValidStatusCode:s,isValidUTF8:c,tokenChars:o},i)r.exports.isValidUTF8=function(e){return e.length<24?c(e):i(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=(Vn(),e(Bn));r.exports.isValidUTF8=function(e){return e.length<32?c(e):t(e)}}catch{}})),Hn=a(((e,n)=>{let{Writable:r}=t(`stream`),i=zn(),{BINARY_TYPES:a,EMPTY_BUFFER:o,kStatusCode:s,kWebSocket:c}=Pn(),{concat:l,toArrayBuffer:u,unmask:d}=Ln(),{isValidStatusCode:f,isValidUTF8:p}=X(),m=Buffer[Symbol.species];n.exports=class extends r{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents===void 0?!0:e.allowSynchronousEvents,this._binaryType=e.binaryType||a[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[c]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,n){if(this._opcode===8&&this._state==0)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new m(t.buffer,t.byteOffset+e,t.length-e),new m(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new m(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){e(this.createError(RangeError,`RSV2 and RSV3 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_2_3`));return}let n=(t[0]&64)==64;if(n&&!this._extensions[i.extensionName]){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._fin=(t[0]&128)==128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(!this._fragmented){e(this.createError(RangeError,`invalid opcode 0`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){e(this.createError(RangeError,`FIN must be set`,!0,1002,`WS_ERR_EXPECTED_FIN`));return}if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,`WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`));return}}else{e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)==128,this._isServer){if(!this._masked){e(this.createError(RangeError,`MASK must be set`,!0,1002,`WS_ERR_EXPECTED_MASK`));return}}else if(this._masked){e(this.createError(RangeError,`MASK must be clear`,!0,1002,`WS_ERR_UNEXPECTED_MASK`));return}this._payloadLength===126?this._state=1:this._payloadLength===127?this._state=2:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);if(n>2**21-1){e(this.createError(RangeError,`Unsupported WebSocket frame: payload length > 2^53 - 1`,!1,1009,`WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`));return}this._payloadLength=n*2**32+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._masked?this._state=3:this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(e){let t=o;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&d(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=5,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){t(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._fragments.push(n)}this.dataMessage(t),this._state===0&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=0;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;r=this._binaryType===`nodebuffer`?l(n,t):this._binaryType===`arraybuffer`?u(l(n,t)):this._binaryType===`blob`?new Blob(n):n,this._allowSynchronousEvents?(this.emit(`message`,r,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit(`message`,r,!0),this._state=0,this.startLoop(e)}))}else{let r=l(n,t);if(!this._skipUTF8Validation&&!p(r)){e(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._state===5||this._allowSynchronousEvents?(this.emit(`message`,r,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit(`message`,r,!1),this._state=0,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit(`conclude`,1005,o),this.end();else{let n=e.readUInt16BE(0);if(!f(n)){t(this.createError(RangeError,`invalid status code ${n}`,!0,1002,`WS_ERR_INVALID_CLOSE_CODE`));return}let r=new m(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!p(r)){t(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._loop=!1,this.emit(`conclude`,n,r),this.end()}this._state=0;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?`ping`:`pong`,e),this._state=0):(this._state=6,setImmediate(()=>{this.emit(this._opcode===9?`ping`:`pong`,e),this._state=0,this.startLoop(t)}))}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=i,a[s]=r,a}}})),Un=a(((e,n)=>{let{Duplex:r}=t(`stream`),{randomFillSync:i}=t(`crypto`),a=zn(),{EMPTY_BUFFER:o,kWebSocket:s,NOOP:c}=Pn(),{isBlob:l,isValidStatusCode:u}=X(),{mask:d,toBuffer:f}=Ln(),p=Symbol(`kByteLength`),m=Buffer.alloc(4),h=8*1024,g,_=h;n.exports=class e{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=c,this[s]=void 0}static frame(e,t){let n,r=!1,a=2,o=!1;t.mask&&(n=t.maskBuffer||m,t.generateMask?t.generateMask(n):(_===h&&(g===void 0&&(g=Buffer.alloc(h)),i(g,0,h),_=0),n[0]=g[_++],n[1]=g[_++],n[2]=g[_++],n[3]=g[_++]),o=(n[0]|n[1]|n[2]|n[3])===0,a=6);let s;typeof e==`string`?(!t.mask||o)&&t[p]!==void 0?s=t[p]:(e=Buffer.from(e),s=e.length):(s=e.length,r=t.mask&&t.readOnly&&!o);let c=s;s>=65536?(a+=8,c=127):s>125&&(a+=2,c=126);let l=Buffer.allocUnsafe(r?s+a:a);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(s,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(s,4,6)),!t.mask||(l[1]|=128,l[a-4]=n[0],l[a-3]=n[1],l[a-2]=n[2],l[a-1]=n[3],o)?[l,e]:r?(d(e,n,l,a,s),[l]):(d(e,n,e,0,s),[l,e])}close(t,n,r,i){let a;if(t===void 0)a=o;else if(typeof t!=`number`||!u(t))throw TypeError(`First argument must be a valid error code number`);else if(n===void 0||!n.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let e=Buffer.byteLength(n);if(e>123)throw RangeError(`The message must not be greater than 123 bytes`);a=Buffer.allocUnsafe(2+e),a.writeUInt16BE(t,0),typeof n==`string`?a.write(n,2):a.set(n,2)}let s={[p]:a.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state===0?this.sendFrame(e.frame(a,s),i):this.enqueue([this.dispatch,a,!1,s,i])}ping(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):l(t)?(i=t.size,a=!1):(t=f(t),i=t.length,a=f.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[p]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};l(t)?this._state===0?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===0?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}pong(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):l(t)?(i=t.size,a=!1):(t=f(t),i=t.length,a=f.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[p]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};l(t)?this._state===0?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===0?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}send(e,t,n){let r=this._extensions[a.extensionName],i=t.binary?2:1,o=t.compress,s,c;typeof e==`string`?(s=Buffer.byteLength(e),c=!1):l(e)?(s=e.size,c=!1):(e=f(e),s=e.length,c=f.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?`server_no_context_takeover`:`client_no_context_takeover`]&&(o=s>=r._threshold),this._compress=o):(o=!1,i=0),t.fin&&(this._firstFragment=!0);let u={[p]:s,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:c,rsv1:o};l(e)?this._state===0?this.getBlobData(e,this._compress,u,n):this.enqueue([this.getBlobData,e,this._compress,u,n]):this._state===0?this.dispatch(e,this._compress,u,n):this.enqueue([this.dispatch,e,this._compress,u,n])}getBlobData(t,n,r,i){this._bufferedBytes+=r[p],this._state=2,t.arrayBuffer().then(t=>{if(this._socket.destroyed){let e=Error(`The socket was closed while the blob was being read`);process.nextTick(v,this,e,i);return}this._bufferedBytes-=r[p];let a=f(t);n?this.dispatch(a,n,r,i):(this._state=0,this.sendFrame(e.frame(a,r),i),this.dequeue())}).catch(e=>{process.nextTick(y,this,e,i)})}dispatch(t,n,r,i){if(!n){this.sendFrame(e.frame(t,r),i);return}let o=this._extensions[a.extensionName];this._bufferedBytes+=r[p],this._state=1,o.compress(t,r.fin,(t,n)=>{if(this._socket.destroyed){let e=Error(`The socket was closed while data was being compressed`);v(this,e,i);return}this._bufferedBytes-=r[p],this._state=0,r.readOnly=!1,this.sendFrame(e.frame(n,r),i),this.dequeue()})}dequeue(){for(;this._state===0&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][p],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][p],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};function v(e,t,n){typeof n==`function`&&n(t);for(let n=0;n<e._queue.length;n++){let r=e._queue[n],i=r[r.length-1];typeof i==`function`&&i(t)}}function y(e,t,n){v(e,t,n),e.onerror(t)}})),Wn=a(((e,t)=>{let{kForOnEventAttribute:n,kListener:r}=Pn(),i=Symbol(`kCode`),a=Symbol(`kData`),o=Symbol(`kError`),s=Symbol(`kMessage`),c=Symbol(`kReason`),l=Symbol(`kTarget`),u=Symbol(`kType`),d=Symbol(`kWasClean`);var f=class{constructor(e){this[l]=null,this[u]=e}get target(){return this[l]}get type(){return this[u]}};Object.defineProperty(f.prototype,`target`,{enumerable:!0}),Object.defineProperty(f.prototype,`type`,{enumerable:!0});var p=class extends f{constructor(e,t={}){super(e),this[i]=t.code===void 0?0:t.code,this[c]=t.reason===void 0?``:t.reason,this[d]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[i]}get reason(){return this[c]}get wasClean(){return this[d]}};Object.defineProperty(p.prototype,`code`,{enumerable:!0}),Object.defineProperty(p.prototype,`reason`,{enumerable:!0}),Object.defineProperty(p.prototype,`wasClean`,{enumerable:!0});var m=class extends f{constructor(e,t={}){super(e),this[o]=t.error===void 0?null:t.error,this[s]=t.message===void 0?``:t.message}get error(){return this[o]}get message(){return this[s]}};Object.defineProperty(m.prototype,`error`,{enumerable:!0}),Object.defineProperty(m.prototype,`message`,{enumerable:!0});var h=class extends f{constructor(e,t={}){super(e),this[a]=t.data===void 0?null:t.data}get data(){return this[a]}};Object.defineProperty(h.prototype,`data`,{enumerable:!0}),t.exports={CloseEvent:p,ErrorEvent:m,Event:f,EventTarget:{addEventListener(e,t,i={}){for(let a of this.listeners(e))if(!i[n]&&a[r]===t&&!a[n])return;let a;if(e===`message`)a=function(e,n){let r=new h(`message`,{data:n?e:e.toString()});r[l]=this,g(t,this,r)};else if(e===`close`)a=function(e,n){let r=new p(`close`,{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[l]=this,g(t,this,r)};else if(e===`error`)a=function(e){let n=new m(`error`,{error:e,message:e.message});n[l]=this,g(t,this,n)};else if(e===`open`)a=function(){let e=new f(`open`);e[l]=this,g(t,this,e)};else return;a[n]=!!i[n],a[r]=t,i.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(let i of this.listeners(e))if(i[r]===t&&!i[n]){this.removeListener(e,i);break}}},MessageEvent:h};function g(e,t,n){typeof e==`object`&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}})),Gn=a(((e,t)=>{let{tokenChars:n}=X();function r(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}function i(e){let t=Object.create(null),i=Object.create(null),a=!1,o=!1,s=!1,c,l,u=-1,d=-1,f=-1,p=0;for(;p<e.length;p++)if(d=e.charCodeAt(p),c===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(p!==0&&(d===32||d===9))f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);d===44?(r(t,n,i),i=Object.create(null)):c=n,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);else if(l===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(d===32||d===9)f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p),r(i,e.slice(u,f),!0),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),u=f=-1}else if(d===61&&u!==-1&&f===-1)l=e.slice(u,p),u=f=-1;else throw SyntaxError(`Unexpected character at index ${p}`);else if(o){if(n[d]!==1)throw SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:a||=!0,o=!1}else if(s)if(n[d]===1)u===-1&&(u=p);else if(d===34&&u!==-1)s=!1,f=p;else if(d===92)o=!0;else throw SyntaxError(`Unexpected character at index ${p}`);else if(d===34&&e.charCodeAt(p-1)===61)s=!0;else if(f===-1&&n[d]===1)u===-1&&(u=p);else if(u!==-1&&(d===32||d===9))f===-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);a&&=(n=n.replace(/\\/g,``),!1),r(i,l,n),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),l=void 0,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||d===32||d===9)throw SyntaxError(`Unexpected end of input`);f===-1&&(f=p);let m=e.slice(u,f);return c===void 0?r(t,m,i):(l===void 0?r(i,m,!0):a?r(i,l,m.replace(/\\/g,``)):r(i,l,m),r(t,c,i)),t}function a(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>[t].concat(Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>e===!0?t:`${t}=${e}`).join(`; `)})).join(`; `)).join(`, `)}).join(`, `)}t.exports={format:a,parse:i}})),Kn=a(((e,n)=>{let r=t(`events`),i=t(`https`),a=t(`http`),o=t(`net`),s=t(`tls`),{randomBytes:c,createHash:l}=t(`crypto`),{Duplex:u,Readable:d}=t(`stream`),{URL:f}=t(`url`),p=zn(),m=Hn(),h=Un(),{isBlob:g}=X(),{BINARY_TYPES:_,CLOSE_TIMEOUT:v,EMPTY_BUFFER:y,GUID:b,kForOnEventAttribute:x,kListener:S,kStatusCode:C,kWebSocket:w,NOOP:T}=Pn(),{EventTarget:{addEventListener:E,removeEventListener:D}}=Wn(),{format:O,parse:k}=Gn(),{toBuffer:A}=Ln(),j=Symbol(`kAborted`),M=[8,13],N=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`],P=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;var F=class e extends r{constructor(t,n,r){super(),this._binaryType=_[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=y,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol=``,this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t===null?(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0):(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n==`object`&&n?(r=n,n=[]):n=[n]),I(this,t,n,r))}get binaryType(){return this._binaryType}set binaryType(e){_.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){let i=new m({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),a=new h(t,this._extensions,r.generateMask);this._receiver=i,this._sender=a,this._socket=t,i[w]=this,a[w]=this,t[w]=this,i.on(`conclude`,ee),i.on(`drain`,H),i.on(`error`,U),i.on(`message`,te),i.on(`ping`,ne),i.on(`pong`,re),a.onerror=ae,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on(`close`,se),t.on(`data`,ce),t.on(`end`,G),t.on(`error`,le),this._readyState=e.OPEN,this.emit(`open`)}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage);return}this._extensions[p.extensionName]&&this._extensions[p.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage)}close(t,n){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){B(this,this._req,`WebSocket was closed before the connection was established`);return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),oe(this)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){V(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.ping(t||y,n,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){V(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.pong(t||y,n,r)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof n==`function`&&(r=n,n={}),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){V(this,t,r);return}let i={binary:typeof t!=`string`,mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[p.extensionName]||(i.compress=!1),this._sender.send(t||y,i,r)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){B(this,this._req,`WebSocket was closed before the connection was established`);return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(F,`CONNECTING`,{enumerable:!0,value:N.indexOf(`CONNECTING`)}),Object.defineProperty(F.prototype,`CONNECTING`,{enumerable:!0,value:N.indexOf(`CONNECTING`)}),Object.defineProperty(F,`OPEN`,{enumerable:!0,value:N.indexOf(`OPEN`)}),Object.defineProperty(F.prototype,`OPEN`,{enumerable:!0,value:N.indexOf(`OPEN`)}),Object.defineProperty(F,`CLOSING`,{enumerable:!0,value:N.indexOf(`CLOSING`)}),Object.defineProperty(F.prototype,`CLOSING`,{enumerable:!0,value:N.indexOf(`CLOSING`)}),Object.defineProperty(F,`CLOSED`,{enumerable:!0,value:N.indexOf(`CLOSED`)}),Object.defineProperty(F.prototype,`CLOSED`,{enumerable:!0,value:N.indexOf(`CLOSED`)}),[`binaryType`,`bufferedAmount`,`extensions`,`isPaused`,`protocol`,`readyState`,`url`].forEach(e=>{Object.defineProperty(F.prototype,e,{enumerable:!0})}),[`open`,`error`,`close`,`message`].forEach(e=>{Object.defineProperty(F.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[x])return t[S];return null},set(t){for(let t of this.listeners(e))if(t[x]){this.removeListener(e,t);break}typeof t==`function`&&this.addEventListener(e,t,{[x]:!0})}})}),F.prototype.addEventListener=E,F.prototype.removeEventListener=D,n.exports=F;function I(e,t,n,r){let o={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:v,protocolVersion:M[1],maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:`GET`,host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,e._closeTimeout=o.closeTimeout,!M.includes(o.protocolVersion))throw RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${M.join(`, `)})`);let s;if(t instanceof f)s=t;else try{s=new f(t)}catch{throw SyntaxError(`Invalid URL: ${t}`)}s.protocol===`http:`?s.protocol=`ws:`:s.protocol===`https:`&&(s.protocol=`wss:`),e._url=s.href;let u=s.protocol===`wss:`,d=s.protocol===`ws+unix:`,m;if(s.protocol!==`ws:`&&!u&&!d?m=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:d&&!s.pathname?m=`The URL's pathname is empty`:s.hash&&(m=`The URL contains a fragment identifier`),m){let t=SyntaxError(m);if(e._redirects===0)throw t;L(e,t);return}let h=u?443:80,g=c(16).toString(`base64`),_=u?i.request:a.request,y=new Set,x;if(o.createConnection=o.createConnection||(u?z:R),o.defaultPort=o.defaultPort||h,o.port=s.port||h,o.host=s.hostname.startsWith(`[`)?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":g,Connection:`Upgrade`,Upgrade:`websocket`},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(x=new p({...o.perMessageDeflate,isServer:!1,maxPayload:o.maxPayload}),o.headers[`Sec-WebSocket-Extensions`]=O({[p.extensionName]:x.offer()})),n.length){for(let e of n){if(typeof e!=`string`||!P.test(e)||y.has(e))throw SyntaxError(`An invalid or duplicated subprotocol was specified`);y.add(e)}o.headers[`Sec-WebSocket-Protocol`]=n.join(`,`)}if(o.origin&&(o.protocolVersion<13?o.headers[`Sec-WebSocket-Origin`]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),d){let e=o.path.split(`:`);o.socketPath=e[0],o.path=e[1]}let S;if(o.followRedirects){if(e._redirects===0){e._originalIpc=d,e._originalSecure=u,e._originalHostOrSocketPath=d?o.socketPath:s.host;let t=r&&r.headers;if(r={...r,headers:{}},t)for(let[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(e.listenerCount(`redirect`)===0){let t=d?e._originalIpc?o.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!u)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization=`Basic `+Buffer.from(o.auth).toString(`base64`)),S=e._req=_(o),e._redirects&&e.emit(`redirect`,e.url,S)}else S=e._req=_(o);o.timeout&&S.on(`timeout`,()=>{B(e,S,`Opening handshake has timed out`)}),S.on(`error`,t=>{S===null||S[j]||(S=e._req=null,L(e,t))}),S.on(`response`,i=>{let a=i.headers.location,s=i.statusCode;if(a&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects){B(e,S,`Maximum redirects exceeded`);return}S.abort();let i;try{i=new f(a,t)}catch{L(e,SyntaxError(`Invalid URL: ${a}`));return}I(e,i,n,r)}else e.emit(`unexpected-response`,S,i)||B(e,S,`Unexpected server response: ${i.statusCode}`)}),S.on(`upgrade`,(t,n,r)=>{if(e.emit(`upgrade`,t),e.readyState!==F.CONNECTING)return;S=e._req=null;let i=t.headers.upgrade;if(i===void 0||i.toLowerCase()!==`websocket`){B(e,n,`Invalid Upgrade header`);return}let a=l(`sha1`).update(g+b).digest(`base64`);if(t.headers[`sec-websocket-accept`]!==a){B(e,n,`Invalid Sec-WebSocket-Accept header`);return}let s=t.headers[`sec-websocket-protocol`],c;if(s===void 0?y.size&&(c=`Server sent no subprotocol`):y.size?y.has(s)||(c=`Server sent an invalid subprotocol`):c=`Server sent a subprotocol but none was requested`,c){B(e,n,c);return}s&&(e._protocol=s);let u=t.headers[`sec-websocket-extensions`];if(u!==void 0){if(!x){B(e,n,`Server sent a Sec-WebSocket-Extensions header but no extension was requested`);return}let t;try{t=k(u)}catch{B(e,n,`Invalid Sec-WebSocket-Extensions header`);return}let r=Object.keys(t);if(r.length!==1||r[0]!==p.extensionName){B(e,n,`Server indicated an extension that was not requested`);return}try{x.accept(t[p.extensionName])}catch{B(e,n,`Invalid Sec-WebSocket-Extensions header`);return}e._extensions[p.extensionName]=x}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}),o.finishRequest?o.finishRequest(S,e):S.end()}function L(e,t){e._readyState=F.CLOSING,e._errorEmitted=!0,e.emit(`error`,t),e.emitClose()}function R(e){return e.path=e.socketPath,o.connect(e)}function z(e){return e.path=void 0,!e.servername&&e.servername!==``&&(e.servername=o.isIP(e.host)?``:e.host),s.connect(e)}function B(e,t,n){e._readyState=F.CLOSING;let r=Error(n);Error.captureStackTrace(r,B),t.setHeader?(t[j]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(L,e,r)):(t.destroy(r),t.once(`error`,e.emit.bind(e,`error`)),t.once(`close`,e.emitClose.bind(e)))}function V(e,t,n){if(t){let n=g(t)?t.size:A(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${N[e.readyState]})`);process.nextTick(n,t)}}function ee(e,t){let n=this[w];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,n._socket[w]!==void 0&&(n._socket.removeListener(`data`,ce),process.nextTick(ie,n._socket),e===1005?n.close():n.close(e,t))}function H(){let e=this[w];e.isPaused||e._socket.resume()}function U(e){let t=this[w];t._socket[w]!==void 0&&(t._socket.removeListener(`data`,ce),process.nextTick(ie,t._socket),t.close(e[C])),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e))}function W(){this[w].emitClose()}function te(e,t){this[w].emit(`message`,e,t)}function ne(e){let t=this[w];t._autoPong&&t.pong(e,!this._isServer,T),t.emit(`ping`,e)}function re(e){this[w].emit(`pong`,e)}function ie(e){e.resume()}function ae(e){let t=this[w];t.readyState!==F.CLOSED&&(t.readyState===F.OPEN&&(t._readyState=F.CLOSING,oe(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e)))}function oe(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function se(){let e=this[w];if(this.removeListener(`close`,se),this.removeListener(`data`,ce),this.removeListener(`end`,G),e._readyState=F.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[w]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on(`error`,W),e._receiver.on(`finish`,W))}function ce(e){this[w]._receiver.write(e)||this.pause()}function G(){let e=this[w];e._readyState=F.CLOSING,e._receiver.end(),this.end()}function le(){let e=this[w];this.removeListener(`error`,le),this.on(`error`,T),e&&(e._readyState=F.CLOSING,this.destroy())}})),qn=a(((e,n)=>{Kn();let{Duplex:r}=t(`stream`);function i(e){e.emit(`close`)}function a(){!this.destroyed&&this._writableState.finished&&this.destroy()}function o(e){this.removeListener(`error`,o),this.destroy(),this.listenerCount(`error`)===0&&this.emit(`error`,e)}function s(e,t){let n=!0,s=new r({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on(`message`,function(t,n){let r=!n&&s._readableState.objectMode?t.toString():t;s.push(r)||e.pause()}),e.once(`error`,function(e){s.destroyed||(n=!1,s.destroy(e))}),e.once(`close`,function(){s.destroyed||s.push(null)}),s._destroy=function(t,r){if(e.readyState===e.CLOSED){r(t),process.nextTick(i,s);return}let a=!1;e.once(`error`,function(e){a=!0,r(e)}),e.once(`close`,function(){a||r(t),process.nextTick(i,s)}),n&&e.terminate()},s._final=function(t){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._final(t)});return}e._socket!==null&&(e._socket._writableState.finished?(t(),s._readableState.endEmitted&&s.destroy()):(e._socket.once(`finish`,function(){t()}),e.close()))},s._read=function(){e.isPaused&&e.resume()},s._write=function(t,n,r){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._write(t,n,r)});return}e.send(t,r)},s.on(`end`,a),s.on(`error`,o),s}n.exports=s})),Jn=a(((e,t)=>{let{tokenChars:n}=X();function r(e){let t=new Set,r=-1,i=-1,a=0;for(;a<e.length;a++){let o=e.charCodeAt(a);if(i===-1&&n[o]===1)r===-1&&(r=a);else if(a!==0&&(o===32||o===9))i===-1&&r!==-1&&(i=a);else if(o===44){if(r===-1)throw SyntaxError(`Unexpected character at index ${a}`);i===-1&&(i=a);let n=e.slice(r,i);if(t.has(n))throw SyntaxError(`The "${n}" subprotocol is duplicated`);t.add(n),r=i=-1}else throw SyntaxError(`Unexpected character at index ${a}`)}if(r===-1||i!==-1)throw SyntaxError(`Unexpected end of input`);let o=e.slice(r,a);if(t.has(o))throw SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}t.exports={parse:r}})),Yn=a(((e,n)=>{let r=t(`events`),i=t(`http`),{Duplex:a}=t(`stream`),{createHash:o}=t(`crypto`),s=Gn(),c=zn(),l=Jn(),u=Kn(),{CLOSE_TIMEOUT:d,GUID:f,kWebSocket:p}=Pn(),m=/^[+/0-9A-Za-z]{22}==$/;n.exports=class extends r{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:d,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:u,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError(`One and only one of the "port", "server", or "noServer" options must be specified`);if(e.port==null?e.server&&(this._server=e.server):(this._server=i.createServer((e,t)=>{let n=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":`text/plain`}),t.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)),this._server){let e=this.emit.bind(this,`connection`);this._removeListeners=h(this._server,{listening:this.emit.bind(this,`listening`),error:this.emit.bind(this,`error`),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=0}address(){if(this.options.noServer)throw Error(`The server is operating in "noServer" mode`);return this._server?this._server.address():null}close(e){if(this._state===2){e&&this.once(`close`,()=>{e(Error(`The server is not running`))}),process.nextTick(g,this);return}if(e&&this.once(`close`,e),this._state!==1)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(g,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{g(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf(`?`);if((t===-1?e.url:e.url.slice(0,t))!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on(`error`,_);let i=e.headers[`sec-websocket-key`],a=e.headers.upgrade,o=+e.headers[`sec-websocket-version`];if(e.method!==`GET`){y(this,e,t,405,`Invalid HTTP method`);return}if(a===void 0||a.toLowerCase()!==`websocket`){y(this,e,t,400,`Invalid Upgrade header`);return}if(i===void 0||!m.test(i)){y(this,e,t,400,`Missing or invalid Sec-WebSocket-Key header`);return}if(o!==13&&o!==8){y(this,e,t,400,`Missing or invalid Sec-WebSocket-Version header`,{"Sec-WebSocket-Version":`13, 8`});return}if(!this.shouldHandle(e)){v(t,400);return}let u=e.headers[`sec-websocket-protocol`],d=new Set;if(u!==void 0)try{d=l.parse(u)}catch{y(this,e,t,400,`Invalid Sec-WebSocket-Protocol header`);return}let f=e.headers[`sec-websocket-extensions`],p={};if(this.options.perMessageDeflate&&f!==void 0){let n=new c({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=s.parse(f);e[c.extensionName]&&(n.accept(e[c.extensionName]),p[c.extensionName]=n)}catch{y(this,e,t,400,`Invalid or unacceptable Sec-WebSocket-Extensions header`);return}}if(this.options.verifyClient){let a={origin:e.headers[`${o===8?`sec-websocket-origin`:`origin`}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(a,(a,o,s,c)=>{if(!a)return v(t,o||401,s,c);this.completeUpgrade(p,i,d,e,t,n,r)});return}if(!this.options.verifyClient(a))return v(t,401)}this.completeUpgrade(p,i,d,e,t,n,r)}completeUpgrade(e,t,n,r,i,a,l){if(!i.readable||!i.writable)return i.destroy();if(i[p])throw Error(`server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration`);if(this._state>0)return v(i,503);let u=[`HTTP/1.1 101 Switching Protocols`,`Upgrade: websocket`,`Connection: Upgrade`,`Sec-WebSocket-Accept: ${o(`sha1`).update(t+f).digest(`base64`)}`],d=new this.options.WebSocket(null,void 0,this.options);if(n.size){let e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(u.push(`Sec-WebSocket-Protocol: ${e}`),d._protocol=e)}if(e[c.extensionName]){let t=e[c.extensionName].params,n=s.format({[c.extensionName]:[t]});u.push(`Sec-WebSocket-Extensions: ${n}`),d._extensions=e}this.emit(`headers`,u,r),i.write(u.concat(`\r
|
|
30
|
+
For backwards compatibility and ease of migration, defaulting the filename. For best experience and consistent unfurl behavior, you should set the filename property with correct file extension, e.g. image.png, text.txt`}function x(e){return`filename supplied '${e}' may be missing a proper extension. Missing extenions may result in unexpected unfurl behavior when shared`}function S(e){return`${e} may cause some issues like timeouts for relatively large files.`}function C(){return`Our latest recommendation is to use client.files.uploadV2() method, which is mostly compatible and much stabler, instead.`}function w(){return`Something went wrong with processing file_uploads`}function T(){return`Although the 'channels' parameter is still supported for smoother migration from legacy files.upload, we recommend using the new channel_id parameter with a single str value instead (e.g. 'C12345').`}function E(){return`Sharing files with multiple channels is no longer supported in v2. Share files in each channel separately instead.`}function D(){return`You may supply file_uploads only for a single channel, message, or thread respectively. Therefore, please supply any channel_id, initial_comment or blocks, or thread_ts in the top-layer.`}})),Vt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){return new Promise(t=>{setTimeout(t,e)})}})),Ht=i(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)})),Ut=e({EventEmitter:()=>Wt.default,default:()=>Gt}),Wt,Gt,Kt=n((()=>{Wt=t(Ht(),1),Gt=Wt.default})),qt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Jt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Yt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Xt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Zt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Qt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),$t=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),en=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),tn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),nn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),rn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),an=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),on=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),sn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),cn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),ln=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),un=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),dn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),fn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),pn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),mn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),hn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),gn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),_n=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),vn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),yn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),bn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),xn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Sn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Cn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),wn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Tn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),En=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Dn=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(en(),e),n(tn(),e),n(nn(),e),n(rn(),e),n(an(),e),n(on(),e),n(sn(),e),n(cn(),e),n(ln(),e),n(un(),e),n(dn(),e),n(fn(),e),n(pn(),e),n(mn(),e),n(hn(),e),n(gn(),e),n(_n(),e),n(vn(),e),n(yn(),e),n(bn(),e),n(xn(),e),n(Sn(),e),n(Cn(),e),n(wn(),e),n(Tn(),e),n(En(),e)})),On=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),kn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomFieldType=e.EntityType=void 0;var t;(function(e){e.Task=`slack#/entities/task`,e.File=`slack#/entities/file`,e.Item=`slack#/entities/item`,e.Incident=`slack#/entities/incident`,e.ContentItem=`slack#/entities/content_item`})(t||(e.EntityType=t={}));var n;(function(e){e.Integer=`integer`,e.String=`string`,e.Array=`array`,e.Date=`slack#/types/date`,e.Timestamp=`slack#/types/timestamp`,e.Image=`slack#/types/image`,e.ChannelId=`slack#/types/channel_id`,e.User=`slack#/types/user`,e.EntityRef=`slack#/types/entity_ref`,e.Boolean=`boolean`,e.Link=`slack#/types/link`,e.Email=`slack#/types/email`})(n||(e.CustomFieldType=n={}))})),An=i((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),jn=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(qt(),e),n(Jt(),e),n(Yt(),e),n(Xt(),e),n(Zt(),e),n(Qt(),e),n($t(),e),n(Dn(),e),n(On(),e),n(kn(),e),n(An(),e)})),Mn=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.Methods=void 0;let r=(Kt(),a(Ut)),i=Nn();function o(e,t){return e.apiCall.bind(e,t)}function s(e,t){return e.apiCall.bind(e,t)}function c(e){return e.filesUploadV2.bind(e)}e.Methods=class extends r.EventEmitter{constructor(){if(super(),this.admin={analytics:{getFile:o(this,`admin.analytics.getFile`)},apps:{activities:{list:s(this,`admin.apps.activities.list`)},approve:o(this,`admin.apps.approve`),approved:{list:o(this,`admin.apps.approved.list`)},clearResolution:o(this,`admin.apps.clearResolution`),config:{lookup:o(this,`admin.apps.config.lookup`),set:o(this,`admin.apps.config.set`)},requests:{cancel:o(this,`admin.apps.requests.cancel`),list:o(this,`admin.apps.requests.list`)},restrict:o(this,`admin.apps.restrict`),restricted:{list:o(this,`admin.apps.restricted.list`)},uninstall:o(this,`admin.apps.uninstall`)},auth:{policy:{assignEntities:o(this,`admin.auth.policy.assignEntities`),getEntities:o(this,`admin.auth.policy.getEntities`),removeEntities:o(this,`admin.auth.policy.removeEntities`)}},barriers:{create:o(this,`admin.barriers.create`),delete:o(this,`admin.barriers.delete`),list:s(this,`admin.barriers.list`),update:o(this,`admin.barriers.update`)},conversations:{archive:o(this,`admin.conversations.archive`),bulkArchive:o(this,`admin.conversations.bulkArchive`),bulkDelete:o(this,`admin.conversations.bulkDelete`),bulkMove:o(this,`admin.conversations.bulkMove`),convertToPrivate:o(this,`admin.conversations.convertToPrivate`),convertToPublic:o(this,`admin.conversations.convertToPublic`),create:o(this,`admin.conversations.create`),delete:o(this,`admin.conversations.delete`),disconnectShared:o(this,`admin.conversations.disconnectShared`),ekm:{listOriginalConnectedChannelInfo:s(this,`admin.conversations.ekm.listOriginalConnectedChannelInfo`)},getConversationPrefs:o(this,`admin.conversations.getConversationPrefs`),getCustomRetention:o(this,`admin.conversations.getCustomRetention`),getTeams:o(this,`admin.conversations.getTeams`),invite:o(this,`admin.conversations.invite`),lookup:o(this,`admin.conversations.lookup`),removeCustomRetention:o(this,`admin.conversations.removeCustomRetention`),rename:o(this,`admin.conversations.rename`),restrictAccess:{addGroup:o(this,`admin.conversations.restrictAccess.addGroup`),listGroups:o(this,`admin.conversations.restrictAccess.listGroups`),removeGroup:o(this,`admin.conversations.restrictAccess.removeGroup`)},search:s(this,`admin.conversations.search`),setConversationPrefs:o(this,`admin.conversations.setConversationPrefs`),setCustomRetention:o(this,`admin.conversations.setCustomRetention`),setTeams:o(this,`admin.conversations.setTeams`),unarchive:o(this,`admin.conversations.unarchive`)},emoji:{add:o(this,`admin.emoji.add`),addAlias:o(this,`admin.emoji.addAlias`),list:s(this,`admin.emoji.list`),remove:o(this,`admin.emoji.remove`),rename:o(this,`admin.emoji.rename`)},functions:{list:o(this,`admin.functions.list`),permissions:{lookup:o(this,`admin.functions.permissions.lookup`),set:o(this,`admin.functions.permissions.set`)}},inviteRequests:{approve:o(this,`admin.inviteRequests.approve`),approved:{list:o(this,`admin.inviteRequests.approved.list`)},denied:{list:o(this,`admin.inviteRequests.denied.list`)},deny:o(this,`admin.inviteRequests.deny`),list:o(this,`admin.inviteRequests.list`)},roles:{addAssignments:o(this,`admin.roles.addAssignments`),listAssignments:s(this,`admin.roles.listAssignments`),removeAssignments:o(this,`admin.roles.removeAssignments`)},teams:{admins:{list:o(this,`admin.teams.admins.list`)},create:o(this,`admin.teams.create`),list:s(this,`admin.teams.list`),owners:{list:o(this,`admin.teams.owners.list`)},settings:{info:o(this,`admin.teams.settings.info`),setDefaultChannels:o(this,`admin.teams.settings.setDefaultChannels`),setDescription:o(this,`admin.teams.settings.setDescription`),setDiscoverability:o(this,`admin.teams.settings.setDiscoverability`),setIcon:o(this,`admin.teams.settings.setIcon`),setName:o(this,`admin.teams.settings.setName`)}},usergroups:{addChannels:o(this,`admin.usergroups.addChannels`),addTeams:o(this,`admin.usergroups.addTeams`),listChannels:o(this,`admin.usergroups.listChannels`),removeChannels:o(this,`admin.usergroups.removeChannels`)},users:{assign:o(this,`admin.users.assign`),invite:o(this,`admin.users.invite`),list:s(this,`admin.users.list`),remove:o(this,`admin.users.remove`),session:{clearSettings:o(this,`admin.users.session.clearSettings`),getSettings:o(this,`admin.users.session.getSettings`),invalidate:o(this,`admin.users.session.invalidate`),list:s(this,`admin.users.session.list`),reset:o(this,`admin.users.session.reset`),resetBulk:o(this,`admin.users.session.resetBulk`),setSettings:o(this,`admin.users.session.setSettings`)},setAdmin:o(this,`admin.users.setAdmin`),setExpiration:o(this,`admin.users.setExpiration`),setOwner:o(this,`admin.users.setOwner`),setRegular:o(this,`admin.users.setRegular`),unsupportedVersions:{export:o(this,`admin.users.unsupportedVersions.export`)}},workflows:{collaborators:{add:o(this,`admin.workflows.collaborators.add`),remove:o(this,`admin.workflows.collaborators.remove`)},permissions:{lookup:o(this,`admin.workflows.permissions.lookup`)},search:s(this,`admin.workflows.search`),unpublish:o(this,`admin.workflows.unpublish`)}},this.api={test:s(this,`api.test`)},this.assistant={threads:{setStatus:o(this,`assistant.threads.setStatus`),setSuggestedPrompts:o(this,`assistant.threads.setSuggestedPrompts`),setTitle:o(this,`assistant.threads.setTitle`)}},this.apps={connections:{open:s(this,`apps.connections.open`)},event:{authorizations:{list:o(this,`apps.event.authorizations.list`)}},manifest:{create:o(this,`apps.manifest.create`),delete:o(this,`apps.manifest.delete`),export:o(this,`apps.manifest.export`),update:o(this,`apps.manifest.update`),validate:o(this,`apps.manifest.validate`)},uninstall:o(this,`apps.uninstall`),user:{connection:{update:o(this,`apps.user.connection.update`)}}},this.auth={revoke:s(this,`auth.revoke`),teams:{list:s(this,`auth.teams.list`)},test:s(this,`auth.test`)},this.bookmarks={add:o(this,`bookmarks.add`),edit:o(this,`bookmarks.edit`),list:o(this,`bookmarks.list`),remove:o(this,`bookmarks.remove`)},this.bots={info:s(this,`bots.info`)},this.calls={add:o(this,`calls.add`),end:o(this,`calls.end`),info:o(this,`calls.info`),update:o(this,`calls.update`),participants:{add:o(this,`calls.participants.add`),remove:o(this,`calls.participants.remove`)}},this.canvases={access:{delete:o(this,`canvases.access.delete`),set:o(this,`canvases.access.set`)},create:s(this,`canvases.create`),delete:o(this,`canvases.delete`),edit:o(this,`canvases.edit`),sections:{lookup:o(this,`canvases.sections.lookup`)}},this.chat={appendStream:o(this,`chat.appendStream`),delete:o(this,`chat.delete`),deleteScheduledMessage:o(this,`chat.deleteScheduledMessage`),getPermalink:o(this,`chat.getPermalink`),meMessage:o(this,`chat.meMessage`),postEphemeral:o(this,`chat.postEphemeral`),postMessage:o(this,`chat.postMessage`),scheduleMessage:o(this,`chat.scheduleMessage`),scheduledMessages:{list:s(this,`chat.scheduledMessages.list`)},startStream:o(this,`chat.startStream`),stopStream:o(this,`chat.stopStream`),unfurl:o(this,`chat.unfurl`),update:o(this,`chat.update`)},this.conversations={acceptSharedInvite:o(this,`conversations.acceptSharedInvite`),approveSharedInvite:o(this,`conversations.approveSharedInvite`),archive:o(this,`conversations.archive`),canvases:{create:o(this,`conversations.canvases.create`)},close:o(this,`conversations.close`),create:o(this,`conversations.create`),declineSharedInvite:o(this,`conversations.declineSharedInvite`),externalInvitePermissions:{set:o(this,`conversations.externalInvitePermissions.set`)},history:o(this,`conversations.history`),info:o(this,`conversations.info`),invite:o(this,`conversations.invite`),inviteShared:o(this,`conversations.inviteShared`),join:o(this,`conversations.join`),kick:o(this,`conversations.kick`),leave:o(this,`conversations.leave`),list:s(this,`conversations.list`),listConnectInvites:s(this,`conversations.listConnectInvites`),mark:o(this,`conversations.mark`),members:o(this,`conversations.members`),open:o(this,`conversations.open`),rename:o(this,`conversations.rename`),replies:o(this,`conversations.replies`),requestSharedInvite:{approve:o(this,`conversations.requestSharedInvite.approve`),deny:o(this,`conversations.requestSharedInvite.deny`),list:s(this,`conversations.requestSharedInvite.list`)},setPurpose:o(this,`conversations.setPurpose`),setTopic:o(this,`conversations.setTopic`),unarchive:o(this,`conversations.unarchive`)},this.dialog={open:o(this,`dialog.open`)},this.dnd={endDnd:s(this,`dnd.endDnd`),endSnooze:s(this,`dnd.endSnooze`),info:s(this,`dnd.info`),setSnooze:o(this,`dnd.setSnooze`),teamInfo:o(this,`dnd.teamInfo`)},this.emoji={list:s(this,`emoji.list`)},this.entity={presentDetails:o(this,`entity.presentDetails`)},this.files={completeUploadExternal:o(this,`files.completeUploadExternal`),delete:o(this,`files.delete`),getUploadURLExternal:o(this,`files.getUploadURLExternal`),info:o(this,`files.info`),list:o(this,`files.list`),revokePublicURL:o(this,`files.revokePublicURL`),sharedPublicURL:o(this,`files.sharedPublicURL`),upload:o(this,`files.upload`),uploadV2:c(this),comments:{delete:o(this,`files.comments.delete`)},remote:{add:o(this,`files.remote.add`),info:o(this,`files.remote.info`),list:o(this,`files.remote.list`),remove:o(this,`files.remote.remove`),share:o(this,`files.remote.share`),update:o(this,`files.remote.update`)}},this.functions={completeError:o(this,`functions.completeError`),completeSuccess:o(this,`functions.completeSuccess`)},this.migration={exchange:o(this,`migration.exchange`)},this.oauth={access:o(this,`oauth.access`),v2:{access:o(this,`oauth.v2.access`),exchange:o(this,`oauth.v2.exchange`)}},this.openid={connect:{token:o(this,`openid.connect.token`),userInfo:s(this,`openid.connect.userInfo`)}},this.pins={add:o(this,`pins.add`),list:o(this,`pins.list`),remove:o(this,`pins.remove`)},this.reactions={add:o(this,`reactions.add`),get:o(this,`reactions.get`),list:s(this,`reactions.list`),remove:o(this,`reactions.remove`)},this.reminders={add:o(this,`reminders.add`),complete:o(this,`reminders.complete`),delete:o(this,`reminders.delete`),info:o(this,`reminders.info`),list:s(this,`reminders.list`)},this.rtm={connect:s(this,`rtm.connect`),start:s(this,`rtm.start`)},this.search={all:o(this,`search.all`),files:o(this,`search.files`),messages:o(this,`search.messages`)},this.slackLists={access:{delete:o(this,`slackLists.access.delete`),set:o(this,`slackLists.access.set`)},create:o(this,`slackLists.create`),download:{get:o(this,`slackLists.download.get`),start:o(this,`slackLists.download.start`)},items:{create:o(this,`slackLists.items.create`),delete:o(this,`slackLists.items.delete`),deleteMultiple:o(this,`slackLists.items.deleteMultiple`),info:o(this,`slackLists.items.info`),list:o(this,`slackLists.items.list`),update:o(this,`slackLists.items.update`)},update:o(this,`slackLists.update`)},this.team={accessLogs:s(this,`team.accessLogs`),billableInfo:s(this,`team.billableInfo`),billing:{info:o(this,`team.billing.info`)},externalTeams:{disconnect:o(this,`team.externalTeams.disconnect`),list:o(this,`team.externalTeams.list`)},info:s(this,`team.info`),integrationLogs:s(this,`team.integrationLogs`),preferences:{list:s(this,`team.preferences.list`)},profile:{get:s(this,`team.profile.get`)}},this.tooling={tokens:{rotate:o(this,`tooling.tokens.rotate`)}},this.usergroups={create:o(this,`usergroups.create`),disable:o(this,`usergroups.disable`),enable:o(this,`usergroups.enable`),list:s(this,`usergroups.list`),update:o(this,`usergroups.update`),users:{list:o(this,`usergroups.users.list`),update:o(this,`usergroups.users.update`)}},this.users={conversations:o(this,`users.conversations`),deletePhoto:o(this,`users.deletePhoto`),discoverableContacts:{lookup:o(this,`users.discoverableContacts.lookup`)},getPresence:o(this,`users.getPresence`),identity:o(this,`users.identity`),info:o(this,`users.info`),list:o(this,`users.list`),lookupByEmail:o(this,`users.lookupByEmail`),setPhoto:o(this,`users.setPhoto`),setPresence:o(this,`users.setPresence`),profile:{get:o(this,`users.profile.get`),set:o(this,`users.profile.set`)}},this.views={open:o(this,`views.open`),publish:o(this,`views.publish`),push:o(this,`views.push`),update:o(this,`views.update`)},this.stars={add:o(this,`stars.add`),list:o(this,`stars.list`),remove:o(this,`stars.remove`)},this.workflows={featured:{add:o(this,`workflows.featured.add`),list:o(this,`workflows.featured.list`),remove:o(this,`workflows.featured.remove`),set:o(this,`workflows.featured.set`)},stepCompleted:o(this,`workflows.stepCompleted`),stepFailed:o(this,`workflows.stepFailed`),updateStep:o(this,`workflows.updateStep`)},new.target!==i.WebClient&&!(new.target.prototype instanceof i.WebClient))throw Error(`Attempt to inherit from WebClient methods without inheriting from WebClient`)}},n(jn(),e)})),Nn=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!==`default`&&t(i,r,a[o]);return n(i,r),i}})(),a=e&&e.__await||function(e){return this instanceof a?(this.v=e,this):new a(e)},o=e&&e.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),c(`next`),c(`throw`),c(`return`,s),i[Symbol.asyncIterator]=function(){return this},i;function s(e){return function(t){return Promise.resolve(t).then(e,f)}}function c(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||l(e,t)})},t&&(i[e]=t(i[e])))}function l(e,t){try{u(r[e](t))}catch(e){p(o[0][3],e)}}function u(e){e.value instanceof a?Promise.resolve(e.value.v).then(d,f):p(o[0][2],e)}function d(e){l(`next`,e)}function f(e){l(`throw`,e)}function p(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}},s=e&&e.__asyncValues||function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values==`function`?__values(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}},c=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},l=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.WebClient=e.WebClientEvent=void 0,e.buildThreadTsWarningMessage=L;let u=r(`node:path`),d=r(`node:querystring`),f=r(`node:util`),p=l(r(`node:zlib`)),m=l(At()),h=l(yt()),g=l(jt()),_=l(Mt()),v=l(Rt()),y=i(zt()),b=Ce(),x=ge(),S=Bt(),C=l(Vt()),w=ve(),T=ye(),E=Mn(),D=be(),O=[`delete`,`common`,`get`,`put`,`head`,`post`,`link`,`patch`,`purge`,`unlink`,`options`],k=()=>void 0;var A;(function(e){e.RATE_LIMITED=`rate_limited`})(A||(e.WebClientEvent=A={}));var j=class e extends E.Methods{constructor(t,{slackApiUrl:n=`https://slack.com/api/`,logger:r=void 0,logLevel:i=void 0,maxRequestConcurrency:a=100,retryConfig:o=D.tenRetriesInAboutThirtyMinutes,agent:s=void 0,tls:c=void 0,timeout:l=0,rejectRateLimitedCalls:u=!1,headers:d={},teamId:f=void 0,allowAbsoluteUrls:p=!0,attachOriginalToWebAPIRequestError:h=!0,requestInterceptor:_=void 0,adapter:y=void 0}={}){super(),this.token=t,this.slackApiUrl=n,this.slackApiUrl.endsWith(`/`)||(this.slackApiUrl+=`/`),this.retryConfig=o,this.requestQueue=new v.default({concurrency:a}),this.tlsConfig=c===void 0?{}:c,this.rejectRateLimitedCalls=u,this.teamId=f,this.allowAbsoluteUrls=p,this.attachOriginalToWebAPIRequestError=h,r===void 0?this.logger=(0,T.getLogger)(e.loggerName,i??T.LogLevel.INFO,r):(this.logger=r,i!==void 0&&this.logger.debug(`The logLevel given to WebClient was ignored as you also gave logger`)),this.token&&!d.Authorization&&(d.Authorization=`Bearer ${this.token}`),this.axios=m.default.create({adapter:y?e=>y(Object.assign(Object.assign({},e),{adapter:void 0})):void 0,timeout:l,baseURL:this.slackApiUrl,headers:(0,g.default)()?d:Object.assign({"User-Agent":(0,w.getUserAgent)()},d),httpAgent:s,httpsAgent:s,validateStatus:()=>!0,maxRedirects:0,proxy:!1}),this.axios.defaults.headers.post[`Content-Type`]=void 0,_&&this.axios.interceptors.request.use(_,null),this.axios.interceptors.request.use(this.serializeApiCallData.bind(this),null),this.logger.debug(`initialized`)}async apiCall(e,t={}){if(this.logger.debug(`apiCall('${e}') start`),P(e,this.logger),F(e,this.logger,t),I(e,this.logger,t),typeof t==`string`||typeof t==`number`||typeof t==`boolean`)throw TypeError(`Expected an options argument but instead received a ${typeof t}`);if((0,S.warnIfNotUsingFilesUploadV2)(e,this.logger),e===`files.uploadV2`)return this.filesUploadV2(t);let n={};t.token&&(n.Authorization=`Bearer ${t.token}`);let r=this.deriveRequestUrl(e),i=await this.makeRequest(r,Object.assign({team_id:this.teamId},t),n),a=await this.buildResult(i);if(this.logger.debug(`http request result: ${JSON.stringify(a)}`),a.response_metadata!==void 0&&a.response_metadata.warnings!==void 0&&a.response_metadata.warnings.forEach(this.logger.warn.bind(this.logger)),a.response_metadata!==void 0&&a.response_metadata.messages!==void 0)for(let e of a.response_metadata.messages){let t=/\[ERROR\](.*)/,n=/\[WARN\](.*)/;if(t.test(e)){let n=e.match(t);n!=null&&this.logger.error(n[1].trim())}else if(n.test(e)){let t=e.match(n);t!=null&&this.logger.warn(t[1].trim())}}if(!a.ok&&i.headers[`content-type`]!==`application/gzip`||`ok`in a&&a.ok===!1)throw(0,x.platformErrorFromResult)(a);return this.logger.debug(`apiCall('${e}') end`),a}paginate(e,t,n,r){let i=(()=>{if(t!==void 0&&typeof t.limit==`number`){let{limit:e}=t;return t.limit=void 0,e}return 200})();function c(){return o(this,arguments,function*(){let n,r={limit:i};for(t!==void 0&&t.cursor!==void 0&&(r.cursor=t.cursor);n===void 0||r!==void 0;)n=yield a(this.apiCall(e,Object.assign(t===void 0?{}:t,r))),yield yield a(n),r=M(n,i)})}if(n===void 0)return c.call(this);let l=r===void 0?k:r,u=0;return(async()=>{var e,t,r,i;let a=c.call(this),o=(await a.next(void 0)).value,d=l(void 0,o,u);if(u+=1,n(o))return d;try{for(var f=!0,p=s(a),m;m=await p.next(),e=m.done,!e;f=!0){i=m.value,f=!1;let e=i;if(d=l(d,e,u),n(e))return d;u+=1}}catch(e){t={error:e}}finally{try{!f&&!e&&(r=p.return)&&await r.call(p)}finally{if(t)throw t.error}}return d})()}chatStream(e){let{buffer_size:t}=e,n=c(e,[`buffer_size`]),r={buffer_size:t};return new b.ChatStreamer(this,this.logger,n,r)}async filesUploadV2(e){this.logger.debug(`files.uploadV2() start`);let t=await this.getAllFileUploads(e);return(await this.fetchAllUploadURLExternal(t)).forEach((e,n)=>{t[n].upload_url=e.upload_url,t[n].file_id=e.file_id}),await this.postFileUploadsToExternalURL(t,e),{ok:!0,files:await this.completeFileUploads(t)}}async fetchAllUploadURLExternal(e){return Promise.all(e.map(e=>{let t={filename:e.filename,length:e.length,alt_text:e.alt_text,snippet_type:e.snippet_type};return`token`in e&&(t.token=e.token),this.files.getUploadURLExternal(t)}))}async completeFileUploads(e){let t=Object.values((0,S.getAllFileUploadsToComplete)(e));return Promise.all(t.map(e=>this.files.completeUploadExternal(e)))}async postFileUploadsToExternalURL(e,t){return Promise.all(e.map(async e=>{let{upload_url:n,file_id:r,filename:i,data:a}=e,o=a;if(n){let e={};t.token&&(e.Authorization=`Bearer ${t.token}`);let a=await this.makeRequest(n,{body:o},e);if(a.status!==200)return Promise.reject(Error(`Failed to upload file (id:${r}, filename: ${i})`));let s={ok:!0,body:a.data};return Promise.resolve(s)}return Promise.reject(Error(`No upload url found for file (id: ${r}, filename: ${i}`))}))}async getAllFileUploads(e){let t=[];return(`file`in e||`content`in e)&&t.push(await(0,S.getFileUploadJob)(e,this.logger)),`file_uploads`in e&&(t=t.concat(await(0,S.getMultipleFileUploadJobs)(e,this.logger))),t}async makeRequest(e,t,n={}){return(0,y.default)(()=>this.requestQueue.add(async()=>{try{let r=Object.assign({headers:n},this.tlsConfig);e.endsWith(`admin.analytics.getFile`)&&(r.responseType=`arraybuffer`),e.endsWith(`apps.event.authorizations.list`)&&(t.token=void 0),this.logger.debug(`http request url: ${e}`),this.logger.debug(`http request body: ${JSON.stringify(R(t))}`);let i=Object.keys(this.axios.defaults.headers).reduce((e,t)=>(O.includes(t)||(e[t]=this.axios.defaults.headers[t]),e),{});i=Object.assign(Object.assign(Object.assign({},this.axios.defaults.headers.common),i),n),this.logger.debug(`http request headers: ${JSON.stringify(R(i))}`);let a=await this.axios.post(e,t,r);if(this.logger.debug(`http response received`),a.status===429){let n=N(a);throw n===void 0?new y.AbortError(Error(`Retry header did not contain a valid timeout (url: ${e}, retry-after header: ${a.headers[`retry-after`]})`)):(this.emit(A.RATE_LIMITED,n,{url:e,body:t}),this.rejectRateLimitedCalls?new y.AbortError((0,x.rateLimitedErrorWithDelay)(n)):(this.logger.info(`API Call failed due to rate limiting. Will retry in ${n} seconds.`),this.requestQueue.pause(),await(0,C.default)(n*1e3),this.requestQueue.start(),Error(`A rate limit was exceeded (url: ${e}, retry-after: ${n})`)))}if(a.status!==200)throw(0,x.httpErrorFromResponse)(a);return a}catch(e){let t=e;throw this.logger.warn(`http request failed`,t.message),t.request?(0,x.requestErrorWithOriginal)(t,this.attachOriginalToWebAPIRequestError):e}}),this.retryConfig)}deriveRequestUrl(e){return(e.startsWith(`https://`)||e.startsWith(`http://`))&&this.allowAbsoluteUrls?e:`${this.axios.getUri()+e}`}serializeApiCallData(e){let{data:t,headers:n}=e,r=!1,i=Object.entries(t).map(([e,t])=>{if(t==null)return[];let n=t;return Buffer.isBuffer(t)||(0,_.default)(t)?r=!0:typeof t!=`string`&&typeof t!=`number`&&typeof t!=`boolean`&&(n=JSON.stringify(t)),[e,n]});if(r){this.logger.debug(`Request arguments contain binary data`);let t=i.reduce((e,[t,n])=>{if(Buffer.isBuffer(n)||(0,_.default)(n)){let r={};r.filename=(()=>{let e=n;return typeof e.name==`string`?(0,u.basename)(e.name):typeof e.path==`string`?(0,u.basename)(e.path):`Untitled`})(),e.append(t,n,r)}else t!==void 0&&n!==void 0&&e.append(t,n);return e},new h.default);if(n)for(let[e,r]of Object.entries(t.getHeaders()))n[e]=r;return e.data=t,e.headers=n,e}return n&&(n[`Content-Type`]=`application/x-www-form-urlencoded`),e.data=(0,d.stringify)(i.reduce((e,[t,n])=>(t!==void 0&&n!==void 0&&(e[t]=n),e),{})),e.headers=n,e}async buildResult(e){let{data:t}=e,n=e.headers[`content-type`]===`application/gzip`;if(n)try{let e=await new Promise((e,n)=>{p.default.unzip(t,(t,r)=>t?n(t):e(r.toString().split(`
|
|
31
|
+
`)))}).then(e=>e).catch(e=>{throw e}),n=[];if(Array.isArray(e))for(let t of e)t&&t.length>0&&n.push(JSON.parse(t));t={file_data:n}}catch(e){t={ok:!1,error:e}}else !n&&e.request.path===`/api/admin.analytics.getFile`&&(t=JSON.parse(new f.TextDecoder().decode(t)));if(typeof t==`string`)try{t=JSON.parse(t)}catch{t={ok:!1,error:t}}t.response_metadata===void 0&&(t.response_metadata={}),e.headers[`x-oauth-scopes`]!==void 0&&(t.response_metadata.scopes=e.headers[`x-oauth-scopes`].trim().split(/\s*,\s*/)),e.headers[`x-accepted-oauth-scopes`]!==void 0&&(t.response_metadata.acceptedScopes=e.headers[`x-accepted-oauth-scopes`].trim().split(/\s*,\s*/));let r=N(e);return r!==void 0&&(t.response_metadata.retryAfter=r),t}};e.WebClient=j,j.loggerName=`WebClient`,e.default=j;function M(e,t){if(e!==void 0&&e.response_metadata!==void 0&&e.response_metadata.next_cursor!==void 0&&e.response_metadata.next_cursor!==``)return{limit:t,cursor:e.response_metadata.next_cursor}}function N(e){if(e.headers[`retry-after`]!==void 0){let t=Number.parseInt(e.headers[`retry-after`],10);if(!Number.isNaN(t))return t}}function P(e,t){[`workflows.stepCompleted`,`workflows.stepFailed`,`workflows.updateStep`].some(t=>RegExp(`^${t}`).test(e))&&t.warn(`${e} is deprecated. Please check on https://docs.slack.dev/reference/methods for an alternative.`)}function F(e,t,n){let r=[`chat.postEphemeral`,`chat.postMessage`,`chat.scheduleMessage`].includes(e),i=e=>Array.isArray(e.attachments)&&e.attachments.length,a=e=>Array.isArray(e.attachments)&&e.attachments.some(e=>!e.fallback||e.fallback.trim()===``),o=e=>(e.text===void 0||e.text===null||e.text===``)&&(e.markdown_text===void 0||e.markdown===null||e.markdown_text===``),s=()=>`The top-level \`text\` argument is missing in the request payload for a ${e} call - It's a best practice to always provide a \`text\` argument when posting a message. The \`text\` is used in places where the content cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc.`;r&&typeof n==`object`&&(i(n)?a(n)&&o(n)&&(t.warn(s()),t.warn(`Additionally, the attachment-level \`fallback\` argument is missing in the request payload for a ${e} call - To avoid this warning, it is recommended to always provide a top-level \`text\` argument when posting a message. Alternatively, you can provide an attachment-level \`fallback\` argument, though this is now considered a legacy field (see https://docs.slack.dev/legacy/legacy-messaging/legacy-secondary-message-attachments for more details).`)):o(n)&&t.warn(s()))}function I(e,t,n){[`chat.postEphemeral`,`chat.postMessage`,`chat.scheduleMessage`,`files.upload`].includes(e)&&n?.thread_ts!==void 0&&typeof n?.thread_ts!=`string`&&t.warn(L(e))}function L(e){return`The given thread_ts value in the request payload for a ${e} call is a float value. We highly recommend using a string value instead.`}function R(e){return Object.entries(e).map(([e,t])=>{if(t==null)return[];let n=t;return(e.match(/.*token.*/)!==null||e.match(/[Aa]uthorization/))&&(n=`[[REDACTED]]`),Buffer.isBuffer(t)||(0,_.default)(t)?n=`[[BINARY VALUE OMITTED]]`:typeof t!=`string`&&typeof t!=`number`&&typeof t!=`boolean`&&(n=JSON.stringify(t)),[e,n]}).reduce((e,[t,n])=>(t!==void 0&&n!==void 0&&(e[t]=n),e),{})}})),Pn=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.WebClientEvent=e.WebClient=e.ChatStreamer=e.retryPolicies=e.LogLevel=e.addAppMetadata=e.ErrorCode=void 0;var i=ge();Object.defineProperty(e,"ErrorCode",{enumerable:!0,get:function(){return i.ErrorCode}});var a=ve();Object.defineProperty(e,"addAppMetadata",{enumerable:!0,get:function(){return a.addAppMetadata}});var o=ye();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return o.LogLevel}});var s=be();Object.defineProperty(e,"retryPolicies",{enumerable:!0,get:function(){return r(s).default}}),n(xe(),e),n(Se(),e);var c=Ce();Object.defineProperty(e,"ChatStreamer",{enumerable:!0,get:function(){return c.ChatStreamer}});var l=Nn();Object.defineProperty(e,"WebClient",{enumerable:!0,get:function(){return l.WebClient}}),Object.defineProperty(e,"WebClientEvent",{enumerable:!0,get:function(){return l.WebClientEvent}}),n(Mn(),e)})),Fn=i(((e,t)=>{t.exports={name:`@slack/socket-mode`,version:`2.0.7`,description:`Official library for using the Slack Platform's Socket Mode API`,author:`Slack Technologies, LLC`,license:`MIT`,keywords:[`slack`,`socket`,`websocket`,`firewall`,`bot`,`client`,`http`,`websocket`,`api`,`proxy`,`state`,`connection`],main:`dist/src/index.js`,types:`./dist/src/index.d.ts`,files:[`dist/**/*`],engines:{node:`>= 18`,npm:`>= 8.6.0`},repository:{type:`git`,url:`git+https://github.com/slackapi/node-slack-sdk.git`},homepage:`https://docs.slack.dev/tools/node-slack-sdk/socket-mode/`,publishConfig:{access:`public`},bugs:{url:`https://github.com/slackapi/node-slack-sdk/issues`},scripts:{build:`npm run build:clean && tsc`,"build:clean":`shx rm -rf ./dist`,docs:`npx typedoc --plugin typedoc-plugin-markdown`,prepack:`npm run build`,test:`npm run test:unit && npm run test:integration`,"test:node18":`npm run build && bash -c 'node --test --test-reporter=spec --import tsx src/*.test.ts' && npm run test:integration`,"test:integration":`npm run build && node --import tsx --test test/integration.test.js`,"test:unit":`npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts`,watch:`npx nodemon --watch 'src' --ext 'ts' --exec npm test`},dependencies:{"@slack/logger":`^4.0.1`,"@slack/web-api":`^7.15.0`,"@types/node":`>=18`,"@types/ws":`^8`,eventemitter3:`^5`,ws:`^8`},devDependencies:{"@types/proxyquire":`^1.3.31`,"@types/sinon":`^21`,nodemon:`^3.1.0`,proxyquire:`^2.1.3`,sinon:`^21`}}})),In=i(((e,t)=>{let n=[`nodebuffer`,`arraybuffer`,`fragments`],r=typeof Blob<`u`;r&&n.push(`blob`),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,hasBlob:r,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:()=>{}}})),Ln=e({}),Rn=n((()=>{throw Error(`Optional native dependency "bufferutil" is not bundled in this vendored module.`)})),zn=i(((e,t)=>{let{EMPTY_BUFFER:n}=In(),r=Buffer[Symbol.species];function i(e,t){if(e.length===0)return n;if(e.length===1)return e[0];let i=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let n=e[t];i.set(n,a),a+=n.length}return a<t?new r(i.buffer,i.byteOffset,a):i}function o(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}function s(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}function c(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function l(e){if(l.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new r(e):ArrayBuffer.isView(e)?t=new r(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),l.readOnly=!1),t}if(t.exports={concat:i,mask:o,toArrayBuffer:c,toBuffer:l,unmask:s},!process.env.WS_NO_BUFFER_UTIL)try{let e=(Rn(),a(Ln));t.exports.mask=function(t,n,r,i,a){a<48?o(t,n,r,i,a):e.mask(t,n,r,i,a)},t.exports.unmask=function(t,n){t.length<32?s(t,n):e.unmask(t,n)}}catch{}})),Bn=i(((e,t)=>{let n=Symbol(`kDone`),r=Symbol(`kRun`);t.exports=class{constructor(e){this[n]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[n])}}}})),Vn=i(((e,t)=>{let n=r(`zlib`),i=zn(),a=Bn(),{kStatusCode:o}=In(),s=Buffer[Symbol.species],c=Buffer.from([0,0,255,255]),l=Symbol(`permessage-deflate`),u=Symbol(`total-length`),d=Symbol(`callback`),f=Symbol(`buffers`),p=Symbol(`error`),m;t.exports=class{constructor(e){this._options=e||{},this._threshold=this._options.threshold===void 0?1024:this._options.threshold,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,m||=new a(this._options.concurrencyLimit===void 0?10:this._options.concurrencyLimit)}static get extensionName(){return`permessage-deflate`}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits??(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&=(this._inflate.close(),null),this._deflate){let e=this._deflate[d];this._deflate.close(),this._deflate=null,e&&e(Error(`The deflate stream was closed while data was being processed`))}}acceptAsServer(e){let t=this._options,n=e.find(e=>!(t.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits==`number`&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==`number`&&!e.client_max_window_bits));if(!n)throw Error(`None of the extension offers can be accepted`);return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits==`number`&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits==`number`?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw Error(`Unexpected parameter "client_no_context_takeover"`);if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits==`number`&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==`number`&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error(`Unexpected or invalid parameter "client_max_window_bits"`);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(n=n[0],t===`client_max_window_bits`){if(n!==!0){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else if(t===`server_max_window_bits`){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(t===`client_no_context_takeover`||t===`server_no_context_takeover`){if(n!==!0)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=n})}),e}decompress(e,t,n){m.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){m.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,r){let a=this._isServer?`client`:`server`;if(!this._inflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:n.Z_DEFAULT_WINDOWBITS;this._inflate=n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[l]=this,this._inflate[u]=0,this._inflate[f]=[],this._inflate.on(`error`,_),this._inflate.on(`data`,g)}this._inflate[d]=r,this._inflate.write(e),t&&this._inflate.write(c),this._inflate.flush(()=>{let e=this._inflate[p];if(e){this._inflate.close(),this._inflate=null,r(e);return}let n=i.concat(this._inflate[f],this._inflate[u]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[u]=0,this._inflate[f]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),r(null,n)})}_compress(e,t,r){let a=this._isServer?`server`:`client`;if(!this._deflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:n.Z_DEFAULT_WINDOWBITS;this._deflate=n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[u]=0,this._deflate[f]=[],this._deflate.on(`data`,h)}this._deflate[d]=r,this._deflate.write(e),this._deflate.flush(n.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=i.concat(this._deflate[f],this._deflate[u]);t&&(e=new s(e.buffer,e.byteOffset,e.length-4)),this._deflate[d]=null,this._deflate[u]=0,this._deflate[f]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),r(null,e)})}};function h(e){this[f].push(e),this[u]+=e.length}function g(e){if(this[u]+=e.length,this[l]._maxPayload<1||this[u]<=this[l]._maxPayload){this[f].push(e);return}this[p]=RangeError(`Max payload size exceeded`),this[p].code=`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`,this[p][o]=1009,this.removeListener(`data`,g),this.reset()}function _(e){if(this[l]._inflate=null,this[p]){this[d](this[p]);return}e[o]=1007,this[d](e)}})),Hn=e({}),Un=n((()=>{throw Error(`Optional native dependency "utf-8-validate" is not bundled in this vendored module.`)})),Wn=i(((e,t)=>{let{isUtf8:n}=r(`buffer`),{hasBlob:i}=In(),o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function s(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function c(e){let t=e.length,n=0;for(;n<t;)if(!(e[n]&128))n++;else if((e[n]&224)==192){if(n+1===t||(e[n+1]&192)!=128||(e[n]&254)==192)return!1;n+=2}else if((e[n]&240)==224){if(n+2>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||e[n]===224&&(e[n+1]&224)==128||e[n]===237&&(e[n+1]&224)==160)return!1;n+=3}else if((e[n]&248)==240){if(n+3>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||(e[n+3]&192)!=128||e[n]===240&&(e[n+1]&240)==128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}function l(e){return i&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&(e[Symbol.toStringTag]===`Blob`||e[Symbol.toStringTag]===`File`)}if(t.exports={isBlob:l,isValidStatusCode:s,isValidUTF8:c,tokenChars:o},n)t.exports.isValidUTF8=function(e){return e.length<24?c(e):n(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=(Un(),a(Hn));t.exports.isValidUTF8=function(t){return t.length<32?c(t):e(t)}}catch{}})),Gn=i(((e,t)=>{let{Writable:n}=r(`stream`),i=Vn(),{BINARY_TYPES:a,EMPTY_BUFFER:o,kStatusCode:s,kWebSocket:c}=In(),{concat:l,toArrayBuffer:u,unmask:d}=zn(),{isValidStatusCode:f,isValidUTF8:p}=Wn(),m=Buffer[Symbol.species];t.exports=class extends n{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents===void 0?!0:e.allowSynchronousEvents,this._binaryType=e.binaryType||a[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[c]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,n){if(this._opcode===8&&this._state==0)return n();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){n(this.createError(RangeError,`Too many buffered chunks`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new m(t.buffer,t.byteOffset+e,t.length-e),new m(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new m(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){e(this.createError(RangeError,`RSV2 and RSV3 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_2_3`));return}let n=(t[0]&64)==64;if(n&&!this._extensions[i.extensionName]){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._fin=(t[0]&128)==128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(!this._fragmented){e(this.createError(RangeError,`invalid opcode 0`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){e(this.createError(RangeError,`FIN must be set`,!0,1002,`WS_ERR_EXPECTED_FIN`));return}if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,`WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`));return}}else{e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)==128,this._isServer){if(!this._masked){e(this.createError(RangeError,`MASK must be set`,!0,1002,`WS_ERR_EXPECTED_MASK`));return}}else if(this._masked){e(this.createError(RangeError,`MASK must be clear`,!0,1002,`WS_ERR_UNEXPECTED_MASK`));return}this._payloadLength===126?this._state=1:this._payloadLength===127?this._state=2:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);if(n>2**21-1){e(this.createError(RangeError,`Unsupported WebSocket frame: payload length > 2^53 - 1`,!1,1009,`WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`));return}this._payloadLength=n*2**32+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._masked?this._state=3:this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(e){let t=o;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&d(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=5,this.decompress(t,e);return}if(t.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){e(this.createError(RangeError,`Too many message fragments`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._messageLength=this._totalPayloadLength,this._fragments.push(t)}this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){t(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){t(this.createError(RangeError,`Too many message fragments`,!1,1008,`WS_ERR_TOO_MANY_BUFFERED_PARTS`));return}this._fragments.push(n)}this.dataMessage(t),this._state===0&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=0;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;r=this._binaryType===`nodebuffer`?l(n,t):this._binaryType===`arraybuffer`?u(l(n,t)):this._binaryType===`blob`?new Blob(n):n,this._allowSynchronousEvents?(this.emit(`message`,r,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit(`message`,r,!0),this._state=0,this.startLoop(e)}))}else{let r=l(n,t);if(!this._skipUTF8Validation&&!p(r)){e(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._state===5||this._allowSynchronousEvents?(this.emit(`message`,r,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit(`message`,r,!1),this._state=0,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit(`conclude`,1005,o),this.end();else{let n=e.readUInt16BE(0);if(!f(n)){t(this.createError(RangeError,`invalid status code ${n}`,!0,1002,`WS_ERR_INVALID_CLOSE_CODE`));return}let r=new m(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!p(r)){t(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._loop=!1,this.emit(`conclude`,n,r),this.end()}this._state=0;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?`ping`:`pong`,e),this._state=0):(this._state=6,setImmediate(()=>{this.emit(this._opcode===9?`ping`:`pong`,e),this._state=0,this.startLoop(t)}))}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=i,a[s]=r,a}}})),Kn=i(((e,t)=>{let{Duplex:n}=r(`stream`),{randomFillSync:i}=r(`crypto`),{types:{isUint8Array:a}}=r(`util`),o=Vn(),{EMPTY_BUFFER:s,kWebSocket:c,NOOP:l}=In(),{isBlob:u,isValidStatusCode:d}=Wn(),{mask:f,toBuffer:p}=zn(),m=Symbol(`kByteLength`),h=Buffer.alloc(4),g=8*1024,_,v=g;t.exports=class e{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=l,this[c]=void 0}static frame(e,t){let n,r=!1,a=2,o=!1;t.mask&&(n=t.maskBuffer||h,t.generateMask?t.generateMask(n):(v===g&&(_===void 0&&(_=Buffer.alloc(g)),i(_,0,g),v=0),n[0]=_[v++],n[1]=_[v++],n[2]=_[v++],n[3]=_[v++]),o=(n[0]|n[1]|n[2]|n[3])===0,a=6);let s;typeof e==`string`?(!t.mask||o)&&t[m]!==void 0?s=t[m]:(e=Buffer.from(e),s=e.length):(s=e.length,r=t.mask&&t.readOnly&&!o);let c=s;s>=65536?(a+=8,c=127):s>125&&(a+=2,c=126);let l=Buffer.allocUnsafe(r?s+a:a);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(s,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(s,4,6)),!t.mask||(l[1]|=128,l[a-4]=n[0],l[a-3]=n[1],l[a-2]=n[2],l[a-1]=n[3],o)?[l,e]:r?(f(e,n,l,a,s),[l]):(f(e,n,e,0,s),[l,e])}close(t,n,r,i){let o;if(t===void 0)o=s;else if(typeof t!=`number`||!d(t))throw TypeError(`First argument must be a valid error code number`);else if(n===void 0||!n.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(t,0);else{let e=Buffer.byteLength(n);if(e>123)throw RangeError(`The message must not be greater than 123 bytes`);if(o=Buffer.allocUnsafe(2+e),o.writeUInt16BE(t,0),typeof n==`string`)o.write(n,2);else if(a(n))o.set(n,2);else throw TypeError(`Second argument must be a string or a Uint8Array`)}let c={[m]:o.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state===0?this.sendFrame(e.frame(o,c),i):this.enqueue([this.dispatch,o,!1,c,i])}ping(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):u(t)?(i=t.size,a=!1):(t=p(t),i=t.length,a=p.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[m]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};u(t)?this._state===0?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===0?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}pong(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):u(t)?(i=t.size,a=!1):(t=p(t),i=t.length,a=p.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[m]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};u(t)?this._state===0?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===0?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}send(e,t,n){let r=this._extensions[o.extensionName],i=t.binary?2:1,a=t.compress,s,c;typeof e==`string`?(s=Buffer.byteLength(e),c=!1):u(e)?(s=e.size,c=!1):(e=p(e),s=e.length,c=p.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?`server_no_context_takeover`:`client_no_context_takeover`]&&(a=s>=r._threshold),this._compress=a):(a=!1,i=0),t.fin&&(this._firstFragment=!0);let l={[m]:s,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:c,rsv1:a};u(e)?this._state===0?this.getBlobData(e,this._compress,l,n):this.enqueue([this.getBlobData,e,this._compress,l,n]):this._state===0?this.dispatch(e,this._compress,l,n):this.enqueue([this.dispatch,e,this._compress,l,n])}getBlobData(t,n,r,i){this._bufferedBytes+=r[m],this._state=2,t.arrayBuffer().then(t=>{if(this._socket.destroyed){let e=Error(`The socket was closed while the blob was being read`);process.nextTick(y,this,e,i);return}this._bufferedBytes-=r[m];let a=p(t);n?this.dispatch(a,n,r,i):(this._state=0,this.sendFrame(e.frame(a,r),i),this.dequeue())}).catch(e=>{process.nextTick(b,this,e,i)})}dispatch(t,n,r,i){if(!n){this.sendFrame(e.frame(t,r),i);return}let a=this._extensions[o.extensionName];this._bufferedBytes+=r[m],this._state=1,a.compress(t,r.fin,(t,n)=>{if(this._socket.destroyed){let e=Error(`The socket was closed while data was being compressed`);y(this,e,i);return}this._bufferedBytes-=r[m],this._state=0,r.readOnly=!1,this.sendFrame(e.frame(n,r),i),this.dequeue()})}dequeue(){for(;this._state===0&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][m],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][m],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};function y(e,t,n){typeof n==`function`&&n(t);for(let n=0;n<e._queue.length;n++){let r=e._queue[n],i=r[r.length-1];typeof i==`function`&&i(t)}}function b(e,t,n){y(e,t,n),e.onerror(t)}})),qn=i(((e,t)=>{let{kForOnEventAttribute:n,kListener:r}=In(),i=Symbol(`kCode`),a=Symbol(`kData`),o=Symbol(`kError`),s=Symbol(`kMessage`),c=Symbol(`kReason`),l=Symbol(`kTarget`),u=Symbol(`kType`),d=Symbol(`kWasClean`);var f=class{constructor(e){this[l]=null,this[u]=e}get target(){return this[l]}get type(){return this[u]}};Object.defineProperty(f.prototype,"target",{enumerable:!0}),Object.defineProperty(f.prototype,"type",{enumerable:!0});var p=class extends f{constructor(e,t={}){super(e),this[i]=t.code===void 0?0:t.code,this[c]=t.reason===void 0?``:t.reason,this[d]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[i]}get reason(){return this[c]}get wasClean(){return this[d]}};Object.defineProperty(p.prototype,"code",{enumerable:!0}),Object.defineProperty(p.prototype,"reason",{enumerable:!0}),Object.defineProperty(p.prototype,"wasClean",{enumerable:!0});var m=class extends f{constructor(e,t={}){super(e),this[o]=t.error===void 0?null:t.error,this[s]=t.message===void 0?``:t.message}get error(){return this[o]}get message(){return this[s]}};Object.defineProperty(m.prototype,"error",{enumerable:!0}),Object.defineProperty(m.prototype,"message",{enumerable:!0});var h=class extends f{constructor(e,t={}){super(e),this[a]=t.data===void 0?null:t.data}get data(){return this[a]}};Object.defineProperty(h.prototype,"data",{enumerable:!0}),t.exports={CloseEvent:p,ErrorEvent:m,Event:f,EventTarget:{addEventListener(e,t,i={}){for(let a of this.listeners(e))if(!i[n]&&a[r]===t&&!a[n])return;let a;if(e===`message`)a=function(e,n){let r=new h(`message`,{data:n?e:e.toString()});r[l]=this,g(t,this,r)};else if(e===`close`)a=function(e,n){let r=new p(`close`,{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[l]=this,g(t,this,r)};else if(e===`error`)a=function(e){let n=new m(`error`,{error:e,message:e.message});n[l]=this,g(t,this,n)};else if(e===`open`)a=function(){let e=new f(`open`);e[l]=this,g(t,this,e)};else return;a[n]=!!i[n],a[r]=t,i.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(let i of this.listeners(e))if(i[r]===t&&!i[n]){this.removeListener(e,i);break}}},MessageEvent:h};function g(e,t,n){typeof e==`object`&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}})),Jn=i(((e,t)=>{let{tokenChars:n}=Wn();function r(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}function i(e){let t=Object.create(null),i=Object.create(null),a=!1,o=!1,s=!1,c,l,u=-1,d=-1,f=-1,p=0;for(;p<e.length;p++)if(d=e.charCodeAt(p),c===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(p!==0&&(d===32||d===9))f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);d===44?(r(t,n,i),i=Object.create(null)):c=n,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);else if(l===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(d===32||d===9)f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p),r(i,e.slice(u,f),!0),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),u=f=-1}else if(d===61&&u!==-1&&f===-1)l=e.slice(u,p),u=f=-1;else throw SyntaxError(`Unexpected character at index ${p}`);else if(o){if(n[d]!==1)throw SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:a||=!0,o=!1}else if(s)if(n[d]===1)u===-1&&(u=p);else if(d===34&&u!==-1)s=!1,f=p;else if(d===92)o=!0;else throw SyntaxError(`Unexpected character at index ${p}`);else if(d===34&&e.charCodeAt(p-1)===61)s=!0;else if(f===-1&&n[d]===1)u===-1&&(u=p);else if(u!==-1&&(d===32||d===9))f===-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);a&&=(n=n.replace(/\\/g,``),!1),r(i,l,n),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),l=void 0,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||d===32||d===9)throw SyntaxError(`Unexpected end of input`);f===-1&&(f=p);let m=e.slice(u,f);return c===void 0?r(t,m,i):(l===void 0?r(i,m,!0):a?r(i,l,m.replace(/\\/g,``)):r(i,l,m),r(t,c,i)),t}function a(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>[t].concat(Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>e===!0?t:`${t}=${e}`).join(`; `)})).join(`; `)).join(`, `)}).join(`, `)}t.exports={format:a,parse:i}})),Yn=i(((e,t)=>{let n=r(`events`),i=r(`https`),a=r(`http`),o=r(`net`),s=r(`tls`),{randomBytes:c,createHash:l}=r(`crypto`),{Duplex:u,Readable:d}=r(`stream`),{URL:f}=r(`url`),p=Vn(),m=Gn(),h=Kn(),{isBlob:g}=Wn(),{BINARY_TYPES:_,CLOSE_TIMEOUT:v,EMPTY_BUFFER:y,GUID:b,kForOnEventAttribute:x,kListener:S,kStatusCode:C,kWebSocket:w,NOOP:T}=In(),{EventTarget:{addEventListener:E,removeEventListener:D}}=qn(),{format:O,parse:k}=Jn(),{toBuffer:A}=zn(),j=Symbol(`kAborted`),M=[8,13],N=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`],P=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;var F=class e extends n{constructor(t,n,r){super(),this._binaryType=_[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=y,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol=``,this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t===null?(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0):(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n==`object`&&n?(r=n,n=[]):n=[n]),I(this,t,n,r))}get binaryType(){return this._binaryType}set binaryType(e){_.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){let i=new m({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),a=new h(t,this._extensions,r.generateMask);this._receiver=i,this._sender=a,this._socket=t,i[w]=this,a[w]=this,t[w]=this,i.on(`conclude`,ee),i.on(`drain`,H),i.on(`error`,U),i.on(`message`,te),i.on(`ping`,ne),i.on(`pong`,re),a.onerror=ae,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on(`close`,se),t.on(`data`,G),t.on(`end`,ce),t.on(`error`,K),this._readyState=e.OPEN,this.emit(`open`)}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage);return}this._extensions[p.extensionName]&&this._extensions[p.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage)}close(t,n){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){B(this,this._req,`WebSocket was closed before the connection was established`);return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),oe(this)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){V(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.ping(t||y,n,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){V(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.pong(t||y,n,r)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof n==`function`&&(r=n,n={}),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){V(this,t,r);return}let i={binary:typeof t!=`string`,mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[p.extensionName]||(i.compress=!1),this._sender.send(t||y,i,r)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){B(this,this._req,`WebSocket was closed before the connection was established`);return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(F,"CONNECTING",{enumerable:!0,value:N.indexOf(`CONNECTING`)}),Object.defineProperty(F.prototype,"CONNECTING",{enumerable:!0,value:N.indexOf(`CONNECTING`)}),Object.defineProperty(F,"OPEN",{enumerable:!0,value:N.indexOf(`OPEN`)}),Object.defineProperty(F.prototype,"OPEN",{enumerable:!0,value:N.indexOf(`OPEN`)}),Object.defineProperty(F,"CLOSING",{enumerable:!0,value:N.indexOf(`CLOSING`)}),Object.defineProperty(F.prototype,"CLOSING",{enumerable:!0,value:N.indexOf(`CLOSING`)}),Object.defineProperty(F,"CLOSED",{enumerable:!0,value:N.indexOf(`CLOSED`)}),Object.defineProperty(F.prototype,"CLOSED",{enumerable:!0,value:N.indexOf(`CLOSED`)}),[`binaryType`,`bufferedAmount`,`extensions`,`isPaused`,`protocol`,`readyState`,`url`].forEach(e=>{Object.defineProperty(F.prototype,e,{enumerable:!0})}),[`open`,`error`,`close`,`message`].forEach(e=>{Object.defineProperty(F.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[x])return t[S];return null},set(t){for(let t of this.listeners(e))if(t[x]){this.removeListener(e,t);break}typeof t==`function`&&this.addEventListener(e,t,{[x]:!0})}})}),F.prototype.addEventListener=E,F.prototype.removeEventListener=D,t.exports=F;function I(e,t,n,r){let o={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:v,protocolVersion:M[1],maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:`GET`,host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,e._closeTimeout=o.closeTimeout,!M.includes(o.protocolVersion))throw RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${M.join(`, `)})`);let s;if(t instanceof f)s=t;else try{s=new f(t)}catch{throw SyntaxError(`Invalid URL: ${t}`)}s.protocol===`http:`?s.protocol=`ws:`:s.protocol===`https:`&&(s.protocol=`wss:`),e._url=s.href;let u=s.protocol===`wss:`,d=s.protocol===`ws+unix:`,m;if(s.protocol!==`ws:`&&!u&&!d?m=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:d&&!s.pathname?m=`The URL's pathname is empty`:s.hash&&(m=`The URL contains a fragment identifier`),m){let t=SyntaxError(m);if(e._redirects===0)throw t;L(e,t);return}let h=u?443:80,g=c(16).toString(`base64`),_=u?i.request:a.request,y=new Set,x;if(o.createConnection=o.createConnection||(u?z:R),o.defaultPort=o.defaultPort||h,o.port=s.port||h,o.host=s.hostname.startsWith(`[`)?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":g,Connection:`Upgrade`,Upgrade:`websocket`},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(x=new p({...o.perMessageDeflate,isServer:!1,maxPayload:o.maxPayload}),o.headers[`Sec-WebSocket-Extensions`]=O({[p.extensionName]:x.offer()})),n.length){for(let e of n){if(typeof e!=`string`||!P.test(e)||y.has(e))throw SyntaxError(`An invalid or duplicated subprotocol was specified`);y.add(e)}o.headers[`Sec-WebSocket-Protocol`]=n.join(`,`)}if(o.origin&&(o.protocolVersion<13?o.headers[`Sec-WebSocket-Origin`]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),d){let e=o.path.split(`:`);o.socketPath=e[0],o.path=e[1]}let S;if(o.followRedirects){if(e._redirects===0){e._originalIpc=d,e._originalSecure=u,e._originalHostOrSocketPath=d?o.socketPath:s.host;let t=r&&r.headers;if(r={...r,headers:{}},t)for(let[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(e.listenerCount(`redirect`)===0){let t=d?e._originalIpc?o.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!u)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization=`Basic `+Buffer.from(o.auth).toString(`base64`)),S=e._req=_(o),e._redirects&&e.emit(`redirect`,e.url,S)}else S=e._req=_(o);o.timeout&&S.on(`timeout`,()=>{B(e,S,`Opening handshake has timed out`)}),S.on(`error`,t=>{S===null||S[j]||(S=e._req=null,L(e,t))}),S.on(`response`,i=>{let a=i.headers.location,s=i.statusCode;if(a&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects){B(e,S,`Maximum redirects exceeded`);return}S.abort();let i;try{i=new f(a,t)}catch{L(e,SyntaxError(`Invalid URL: ${a}`));return}I(e,i,n,r)}else e.emit(`unexpected-response`,S,i)||B(e,S,`Unexpected server response: ${i.statusCode}`)}),S.on(`upgrade`,(t,n,r)=>{if(e.emit(`upgrade`,t),e.readyState!==F.CONNECTING)return;S=e._req=null;let i=t.headers.upgrade;if(i===void 0||i.toLowerCase()!==`websocket`){B(e,n,`Invalid Upgrade header`);return}let a=l(`sha1`).update(g+b).digest(`base64`);if(t.headers[`sec-websocket-accept`]!==a){B(e,n,`Invalid Sec-WebSocket-Accept header`);return}let s=t.headers[`sec-websocket-protocol`],c;if(s===void 0?y.size&&(c=`Server sent no subprotocol`):y.size?y.has(s)||(c=`Server sent an invalid subprotocol`):c=`Server sent a subprotocol but none was requested`,c){B(e,n,c);return}s&&(e._protocol=s);let u=t.headers[`sec-websocket-extensions`];if(u!==void 0){if(!x){B(e,n,`Server sent a Sec-WebSocket-Extensions header but no extension was requested`);return}let t;try{t=k(u)}catch{B(e,n,`Invalid Sec-WebSocket-Extensions header`);return}let r=Object.keys(t);if(r.length!==1||r[0]!==p.extensionName){B(e,n,`Server indicated an extension that was not requested`);return}try{x.accept(t[p.extensionName])}catch{B(e,n,`Invalid Sec-WebSocket-Extensions header`);return}e._extensions[p.extensionName]=x}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxBufferedChunks:o.maxBufferedChunks,maxFragments:o.maxFragments,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}),o.finishRequest?o.finishRequest(S,e):S.end()}function L(e,t){e._readyState=F.CLOSING,e._errorEmitted=!0,e.emit(`error`,t),e.emitClose()}function R(e){return e.path=e.socketPath,o.connect(e)}function z(e){return e.path=void 0,!e.servername&&e.servername!==``&&(e.servername=o.isIP(e.host)?``:e.host),s.connect(e)}function B(e,t,n){e._readyState=F.CLOSING;let r=Error(n);Error.captureStackTrace(r,B),t.setHeader?(t[j]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(L,e,r)):(t.destroy(r),t.once(`error`,e.emit.bind(e,`error`)),t.once(`close`,e.emitClose.bind(e)))}function V(e,t,n){if(t){let n=g(t)?t.size:A(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${N[e.readyState]})`);process.nextTick(n,t)}}function ee(e,t){let n=this[w];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,n._socket[w]!==void 0&&(n._socket.removeListener(`data`,G),process.nextTick(ie,n._socket),e===1005?n.close():n.close(e,t))}function H(){let e=this[w];e.isPaused||e._socket.resume()}function U(e){let t=this[w];t._socket[w]!==void 0&&(t._socket.removeListener(`data`,G),process.nextTick(ie,t._socket),t.close(e[C])),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e))}function W(){this[w].emitClose()}function te(e,t){this[w].emit(`message`,e,t)}function ne(e){let t=this[w];t._autoPong&&t.pong(e,!this._isServer,T),t.emit(`ping`,e)}function re(e){this[w].emit(`pong`,e)}function ie(e){e.resume()}function ae(e){let t=this[w];t.readyState!==F.CLOSED&&(t.readyState===F.OPEN&&(t._readyState=F.CLOSING,oe(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e)))}function oe(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function se(){let e=this[w];if(this.removeListener(`close`,se),this.removeListener(`data`,G),this.removeListener(`end`,ce),e._readyState=F.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[w]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on(`error`,W),e._receiver.on(`finish`,W))}function G(e){this[w]._receiver.write(e)||this.pause()}function ce(){let e=this[w];e._readyState=F.CLOSING,e._receiver.end(),this.end()}function K(){let e=this[w];this.removeListener(`error`,K),this.on(`error`,T),e&&(e._readyState=F.CLOSING,this.destroy())}})),Xn=i(((e,t)=>{Yn();let{Duplex:n}=r(`stream`);function i(e){e.emit(`close`)}function a(){!this.destroyed&&this._writableState.finished&&this.destroy()}function o(e){this.removeListener(`error`,o),this.destroy(),this.listenerCount(`error`)===0&&this.emit(`error`,e)}function s(e,t){let r=!0,s=new n({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on(`message`,function(t,n){let r=!n&&s._readableState.objectMode?t.toString():t;s.push(r)||e.pause()}),e.once(`error`,function(e){s.destroyed||(r=!1,s.destroy(e))}),e.once(`close`,function(){s.destroyed||s.push(null)}),s._destroy=function(t,n){if(e.readyState===e.CLOSED){n(t),process.nextTick(i,s);return}let a=!1;e.once(`error`,function(e){a=!0,n(e)}),e.once(`close`,function(){a||n(t),process.nextTick(i,s)}),r&&e.terminate()},s._final=function(t){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._final(t)});return}e._socket!==null&&(e._socket._writableState.finished?(t(),s._readableState.endEmitted&&s.destroy()):(e._socket.once(`finish`,function(){t()}),e.close()))},s._read=function(){e.isPaused&&e.resume()},s._write=function(t,n,r){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._write(t,n,r)});return}e.send(t,r)},s.on(`end`,a),s.on(`error`,o),s}t.exports=s})),Zn=i(((e,t)=>{let{tokenChars:n}=Wn();function r(e){let t=new Set,r=-1,i=-1,a=0;for(;a<e.length;a++){let o=e.charCodeAt(a);if(i===-1&&n[o]===1)r===-1&&(r=a);else if(a!==0&&(o===32||o===9))i===-1&&r!==-1&&(i=a);else if(o===44){if(r===-1)throw SyntaxError(`Unexpected character at index ${a}`);i===-1&&(i=a);let n=e.slice(r,i);if(t.has(n))throw SyntaxError(`The "${n}" subprotocol is duplicated`);t.add(n),r=i=-1}else throw SyntaxError(`Unexpected character at index ${a}`)}if(r===-1||i!==-1)throw SyntaxError(`Unexpected end of input`);let o=e.slice(r,a);if(t.has(o))throw SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}t.exports={parse:r}})),Qn=i(((e,t)=>{let n=r(`events`),i=r(`http`),{Duplex:a}=r(`stream`),{createHash:o}=r(`crypto`),s=Jn(),c=Vn(),l=Zn(),u=Yn(),{CLOSE_TIMEOUT:d,GUID:f,kWebSocket:p}=In(),m=/^[+/0-9A-Za-z]{22}==$/;t.exports=class extends n{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:d,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:u,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError(`One and only one of the "port", "server", or "noServer" options must be specified`);if(e.port==null?e.server&&(this._server=e.server):(this._server=i.createServer((e,t)=>{let n=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":`text/plain`}),t.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)),this._server){let e=this.emit.bind(this,`connection`);this._removeListeners=h(this._server,{listening:this.emit.bind(this,`listening`),error:this.emit.bind(this,`error`),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=0}address(){if(this.options.noServer)throw Error(`The server is operating in "noServer" mode`);return this._server?this._server.address():null}close(e){if(this._state===2){e&&this.once(`close`,()=>{e(Error(`The server is not running`))}),process.nextTick(g,this);return}if(e&&this.once(`close`,e),this._state!==1)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(g,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{g(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf(`?`);if((t===-1?e.url:e.url.slice(0,t))!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on(`error`,_);let i=e.headers[`sec-websocket-key`],a=e.headers.upgrade,o=+e.headers[`sec-websocket-version`];if(e.method!==`GET`){y(this,e,t,405,`Invalid HTTP method`);return}if(a===void 0||a.toLowerCase()!==`websocket`){y(this,e,t,400,`Invalid Upgrade header`);return}if(i===void 0||!m.test(i)){y(this,e,t,400,`Missing or invalid Sec-WebSocket-Key header`);return}if(o!==13&&o!==8){y(this,e,t,400,`Missing or invalid Sec-WebSocket-Version header`,{"Sec-WebSocket-Version":`13, 8`});return}if(!this.shouldHandle(e)){v(t,400);return}let u=e.headers[`sec-websocket-protocol`],d=new Set;if(u!==void 0)try{d=l.parse(u)}catch{y(this,e,t,400,`Invalid Sec-WebSocket-Protocol header`);return}let f=e.headers[`sec-websocket-extensions`],p={};if(this.options.perMessageDeflate&&f!==void 0){let n=new c({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=s.parse(f);e[c.extensionName]&&(n.accept(e[c.extensionName]),p[c.extensionName]=n)}catch{y(this,e,t,400,`Invalid or unacceptable Sec-WebSocket-Extensions header`);return}}if(this.options.verifyClient){let a={origin:e.headers[`${o===8?`sec-websocket-origin`:`origin`}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(a,(a,o,s,c)=>{if(!a)return v(t,o||401,s,c);this.completeUpgrade(p,i,d,e,t,n,r)});return}if(!this.options.verifyClient(a))return v(t,401)}this.completeUpgrade(p,i,d,e,t,n,r)}completeUpgrade(e,t,n,r,i,a,l){if(!i.readable||!i.writable)return i.destroy();if(i[p])throw Error(`server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration`);if(this._state>0)return v(i,503);let u=[`HTTP/1.1 101 Switching Protocols`,`Upgrade: websocket`,`Connection: Upgrade`,`Sec-WebSocket-Accept: ${o(`sha1`).update(t+f).digest(`base64`)}`],d=new this.options.WebSocket(null,void 0,this.options);if(n.size){let e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(u.push(`Sec-WebSocket-Protocol: ${e}`),d._protocol=e)}if(e[c.extensionName]){let t=e[c.extensionName].params,n=s.format({[c.extensionName]:[t]});u.push(`Sec-WebSocket-Extensions: ${n}`),d._extensions=e}this.emit(`headers`,u,r),i.write(u.concat(`\r
|
|
28
32
|
`).join(`\r
|
|
29
|
-
`)),i.removeListener(`error`,_),d.setSocket(i,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(d),d.on(`close`,()=>{this.clients.delete(d),this._shouldEmitClose&&!this.clients.size&&process.nextTick(g,this)})),l(d,r)}};function h(e,t){for(let n of Object.keys(t))e.on(n,t[n]);return function(){for(let n of Object.keys(t))e.removeListener(n,t[n])}}function g(e){e._state=2,e.emit(`close`)}function _(){this.destroy()}function v(e,t,n,r){n||=i.STATUS_CODES[t],r={Connection:`close`,"Content-Type":`text/html`,"Content-Length":Buffer.byteLength(n),...r},e.once(`finish`,e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r\n`+Object.keys(r).map(e=>`${e}: ${r[e]}`).join(`\r
|
|
33
|
+
`)),i.removeListener(`error`,_),d.setSocket(i,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(d),d.on(`close`,()=>{this.clients.delete(d),this._shouldEmitClose&&!this.clients.size&&process.nextTick(g,this)})),l(d,r)}};function h(e,t){for(let n of Object.keys(t))e.on(n,t[n]);return function(){for(let n of Object.keys(t))e.removeListener(n,t[n])}}function g(e){e._state=2,e.emit(`close`)}function _(){this.destroy()}function v(e,t,n,r){n||=i.STATUS_CODES[t],r={Connection:`close`,"Content-Type":`text/html`,"Content-Length":Buffer.byteLength(n),...r},e.once(`finish`,e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r\n`+Object.keys(r).map(e=>`${e}: ${r[e]}`).join(`\r
|
|
30
34
|
`)+`\r
|
|
31
35
|
\r
|
|
32
|
-
`+n)}function y(e,t,n,r,i,a){if(e.listenerCount(`wsClientError`)){let r=Error(i);Error.captureStackTrace(r,y),e.emit(`wsClientError`,r,n,t)}else v(n,r,i,a)}})),Xn=i({PerMessageDeflate:()=>$n.default,Receiver:()=>er.default,Sender:()=>tr.default,WebSocket:()=>rr.default,WebSocketServer:()=>ir.default,createWebSocketStream:()=>Zn.default,default:()=>ar,extension:()=>Qn.default,subprotocol:()=>nr.default}),Zn,Qn,$n,er,tr,nr,rr,ir,ar,or=n((()=>{Zn=r(qn(),1),Qn=r(Gn(),1),$n=r(zn(),1),er=r(Hn(),1),tr=r(Un(),1),nr=r(Jn(),1),rr=r(Kn(),1),ir=r(Yn(),1),ar=rr.default})),sr=a((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=t&&t.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;o<a.length;o++)a[o]!==`default`&&n(i,t,a[o]);return r(i,t),i}})();Object.defineProperty(t,`__esModule`,{value:!0}),t.SlackWebSocket=t.WS_READY_STATES=void 0;let a=(or(),e(Xn)),o=me(),s=i(ge());t.WS_READY_STATES=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`];var c=class e{constructor({url:t,client:n,httpAgent:r,logger:i,logLevel:a=s.LogLevel.INFO,pingInterval:o=5e3,pingPongLoggingEnabled:c=!1,serverPingTimeoutMS:l=3e4,clientPingTimeoutMS:u=5e3}){this.options={url:t,client:n,httpAgent:r,logLevel:a,pingInterval:o,pingPongLoggingEnabled:c,serverPingTimeoutMS:l,clientPingTimeoutMS:u},i?this.logger=i:this.logger=s.default.getLogger(e.loggerName,a),this.websocket=null,this.closeFrameReceived=!1}connect(){this.logger.debug(`Initiating new WebSocket connection.`);let e={perMessageDeflate:!1,agent:this.options.httpAgent};this.websocket=new a.WebSocket(this.options.url,e),this.websocket.addEventListener(`open`,e=>{this.logger.debug(`WebSocket open event received (connection established)!`),this.monitorPingToSlack()}),this.websocket.addEventListener(`error`,e=>{this.logger.error(`WebSocket error occurred: ${e.message}`),this.disconnect(),this.options.client.emit(`error`,(0,o.websocketErrorWithOriginal)(e.error))}),this.websocket.on(`message`,(e,t)=>{this.options.client.emit(`ws_message`,e,t)}),this.websocket.on(`close`,(e,t)=>{this.logger.debug(`WebSocket close frame received (code: ${e}, reason: ${t.toString()})`),this.closeFrameReceived=!0,this.disconnect()}),this.websocket.on(`ping`,e=>{this.options.pingPongLoggingEnabled&&this.logger.debug(`WebSocket received ping from Slack server (data: ${e.toString()})`),this.monitorPingFromSlack()}),this.websocket.on(`pong`,e=>{this.options.pingPongLoggingEnabled&&this.logger.debug(`WebSocket received pong from Slack server (data: ${e.toString()})`),this.lastPongReceivedTimestamp=Date.now()})}disconnect(){this.websocket?this.closeFrameReceived?(this.logger.debug(`Terminating WebSocket (close frame received).`),this.terminate()):this.websocket.readyState===a.WebSocket.CLOSING?(this.logger.debug(`Terminating WebSocket (close frame sent but no response, force-terminating).`),this.terminate()):(this.logger.debug(`Sending close frame (status=1000).`),this.websocket.close(1e3)):(this.logger.debug(`WebSocket already disconnected, flushing remainder.`),this.terminate())}terminate(){var e,t;(e=this.websocket)==null||e.removeAllListeners(),(t=this.websocket)==null||t.terminate(),this.websocket=null,clearTimeout(this.serverPingTimeout),clearInterval(this.clientPingTimeout),this.options.client.emit(`close`)}isActive(){return this.websocket?(this.logger.debug(`isActive(): websocket ready state is ${t.WS_READY_STATES[this.websocket.readyState]}`),this.websocket.readyState===1):(this.logger.debug(`isActive(): websocket not instantiated!`),!1)}get readyState(){return this.websocket?.readyState}send(e,t){var n;(n=this.websocket)==null||n.send(e,t)}monitorPingFromSlack(){clearTimeout(this.serverPingTimeout),this.serverPingTimeout=setTimeout(()=>{this.logger.warn(`A ping wasn't received from the server before the timeout of ${this.options.serverPingTimeoutMS}ms!`),this.disconnect()},this.options.serverPingTimeoutMS)}monitorPingToSlack(){this.lastPongReceivedTimestamp=void 0;let e=0;clearInterval(this.clientPingTimeout),this.clientPingTimeout=setInterval(()=>{var t;let n=Date.now();try{let r=`Ping from client (${n})`;(t=this.websocket)==null||t.ping(r),this.lastPongReceivedTimestamp===void 0?e+=1:e=0,this.options.pingPongLoggingEnabled&&this.logger.debug(`Sent ping to Slack: ${r}`)}catch(e){this.logger.error(`Failed to send ping to Slack (error: ${e})`),this.disconnect();return}let r=e>3;this.lastPongReceivedTimestamp!==void 0&&(r=n-this.lastPongReceivedTimestamp>this.options.clientPingTimeoutMS),r&&(this.logger.warn(`A pong wasn't received from the server before the timeout of ${this.options.clientPingTimeoutMS}ms!`),this.disconnect())},this.options.clientPingTimeoutMS/3),this.logger.debug(`Started monitoring pings to and pongs from Slack.`)}};t.SlackWebSocket=c,c.loggerName=`SlackWebSocket`})),cr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.UnrecoverableSocketModeStartError=void 0;var t;(function(e){e.NotAuthed=`not_authed`,e.InvalidAuth=`invalid_auth`,e.AccountInactive=`account_inactive`,e.UserRemovedFromTeam=`user_removed_from_team`,e.TeamDisabled=`team_disabled`})(t||(e.UnrecoverableSocketModeStartError=t={}))})),lr=a((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=t&&t.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;o<a.length;o++)a[o]!==`default`&&n(i,t,a[o]);return r(i,t),i}})(),a=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.SocketModeClient=void 0;let o=Mn(),s=(Wt(),e(Vt)),c=a(Nn()),l=me(),u=i(ge()),d=sr(),f=cr();var p;(function(e){e.Connecting=`connecting`,e.Connected=`connected`,e.Reconnecting=`reconnecting`,e.Disconnecting=`disconnecting`,e.Disconnected=`disconnected`,e.Authenticated=`authenticated`})(p||={});var m=class e extends s.EventEmitter{constructor({logger:t=void 0,logLevel:n=void 0,autoReconnectEnabled:r=!0,pingPongLoggingEnabled:i=!1,clientPingTimeout:a=5e3,serverPingTimeout:s=3e4,appToken:c=``,clientOptions:l={}}={appToken:``}){if(super(),this.numOfConsecutiveReconnectionFailures=0,this.customLoggerProvided=!1,this.shuttingDown=!1,!c)throw Error(`Must provide an App-Level Token when initializing a Socket Mode Client`);this.pingPongLoggingEnabled=i,this.clientPingTimeoutMS=a,this.serverPingTimeoutMS=s,t===void 0?this.logger=u.default.getLogger(e.loggerName,n??u.LogLevel.INFO,t):(this.customLoggerProvided=!0,this.logger=t,n!==void 0&&this.logger.debug(`The logLevel given to Socket Mode was ignored as you also gave logger`)),this.webClientOptions=l,this.webClientOptions.retryConfig===void 0&&(this.webClientOptions.retryConfig={retries:100,factor:1.3}),this.webClient=new o.WebClient(``,Object.assign({logger:t,logLevel:this.logger.getLevel(),headers:{Authorization:`Bearer ${c}`}},l)),this.autoReconnectEnabled=r,this.on(`error`,e=>{this.logger.error(`WebSocket error! ${e}`)}),this.on(`close`,()=>{!this.shuttingDown&&this.autoReconnectEnabled?this.delayReconnectAttempt(this.start):this.emit(p.Disconnected)}),this.on(`ws_message`,this.onWebSocketMessage.bind(this)),this.logger.debug(`The Socket Mode client has successfully initialized`)}async start(){return this.shuttingDown=!1,this.logger.debug(`Starting Socket Mode session ...`),this.websocket=new d.SlackWebSocket({url:await this.retrieveWSSURL(),client:this,logLevel:this.logger.getLevel(),logger:this.customLoggerProvided?this.logger:void 0,httpAgent:this.webClientOptions.agent,clientPingTimeoutMS:this.clientPingTimeoutMS,serverPingTimeoutMS:this.serverPingTimeoutMS,pingPongLoggingEnabled:this.pingPongLoggingEnabled}),new Promise((e,t)=>{var n;let r=e=>{},i=e=>{};r=t=>{this.removeListener(p.Disconnected,i),e(t)},i=e=>{this.removeListener(p.Connected,r),t(e)},this.once(p.Connected,r),this.once(p.Disconnected,i),this.emit(p.Connecting),(n=this.websocket)==null||n.connect()})}disconnect(){return this.shuttingDown=!0,this.logger.debug(`Manually disconnecting this Socket Mode client`),this.emit(p.Disconnecting),new Promise((e,t)=>{var n;this.websocket?(this.once(p.Disconnected,e),(n=this.websocket)==null||n.disconnect()):(this.emit(p.Disconnected),e())})}delayReconnectAttempt(e){this.numOfConsecutiveReconnectionFailures+=1;let t=this.clientPingTimeoutMS*this.numOfConsecutiveReconnectionFailures;return this.logger.debug(`Before trying to reconnect, this client will wait for ${t} milliseconds`),new Promise((n,r)=>{setTimeout(()=>{this.shuttingDown?this.logger.debug(`Client shutting down, will not attempt reconnect.`):(this.logger.debug(`Continuing with reconnect...`),this.emit(p.Reconnecting),e.apply(this).then(n))},t)})}async retrieveWSSURL(){try{this.logger.debug(`Going to retrieve a new WSS URL ...`);let e=await this.webClient.apps.connections.open({});if(!e.url){let t=`apps.connections.open did not return a URL! (response: ${e})`;throw this.logger.error(t),Error(t)}return this.numOfConsecutiveReconnectionFailures=0,this.emit(p.Authenticated,e),e.url}catch(e){this.logger.error(`Failed to retrieve a new WSS URL (error: ${e})`);let t=e,n=!0;if((t.code===o.ErrorCode.PlatformError&&Object.values(f.UnrecoverableSocketModeStartError).includes(t.data.error)||t.code===o.ErrorCode.RequestError||t.code===o.ErrorCode.HTTPError)&&(n=!1),this.autoReconnectEnabled&&n)return await this.delayReconnectAttempt(this.retrieveWSSURL);throw e}}async onWebSocketMessage(e,t){var n;if(t){this.logger.debug(`Unexpected binary message received, ignoring.`);return}let r=e.toString();this.logger.debug(`Received a message on the WebSocket: ${r}`);let i;try{i=JSON.parse(r)}catch(e){this.logger.debug(`Unable to parse an incoming WebSocket message (will ignore): ${e}, ${r}`);return}if(i.type===`hello`){this.emit(p.Connected);return}if(i.type===`disconnect`){this.logger.debug(`Received "${i.type}" (${i.reason}) message - disconnecting.${this.autoReconnectEnabled?` Will reconnect.`:``}`),(n=this.websocket)==null||n.disconnect();return}let a=async e=>{this.logger.getLevel()===u.LogLevel.DEBUG&&this.logger.debug(`Calling ack() - type: ${i.type}, envelope_id: ${i.envelope_id}, data: ${JSON.stringify(e)}`),await this.send(i.envelope_id,e)};i.type===`events_api`?this.emit(i.payload.event.type,{ack:a,envelope_id:i.envelope_id,body:i.payload,event:i.payload.event,retry_num:i.retry_attempt,retry_reason:i.retry_reason,accepts_response_payload:i.accepts_response_payload}):this.emit(i.type,{ack:a,envelope_id:i.envelope_id,body:i.payload,accepts_response_payload:i.accepts_response_payload}),this.emit(`slack_event`,{ack:a,envelope_id:i.envelope_id,type:i.type,body:i.payload,retry_num:i.retry_attempt,retry_reason:i.retry_reason,accepts_response_payload:i.accepts_response_payload})}send(e,t={}){let n={envelope_id:e,payload:Object.assign({},typeof t==`string`?{text:t}:t)};return new Promise((e,t)=>{let r=this.websocket?.readyState;if(this.logger.debug(`send() method was called (WebSocket state: ${r?d.WS_READY_STATES[r]:`uninitialized`})`),this.websocket===void 0)this.logger.error(`Failed to send a message as the client is not connected`),t((0,l.sendWhileDisconnectedError)());else if(!this.websocket.isActive())this.logger.error(`Failed to send a message as the client has no active connection`),t((0,l.sendWhileNotReadyError)());else{this.emit(`outgoing_message`,n);let r=JSON.stringify(n);this.logger.debug(`Sending a WebSocket message: ${r}`),this.websocket.send(r,n=>n?(this.logger.error(`Failed to send a WebSocket message (error: ${n})`),t((0,l.websocketErrorWithOriginal)(n))):e())}})}};t.SocketModeClient=m,m.loggerName=`SocketModeClient`,(0,o.addAppMetadata)({name:c.default.name,version:c.default.version}),t.default=m})),ur=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.UnrecoverableSocketModeStartError=e.SocketModeClient=e.LogLevel=e.ErrorCode=void 0;var t=me();Object.defineProperty(e,`ErrorCode`,{enumerable:!0,get:function(){return t.ErrorCode}});var n=ge();Object.defineProperty(e,`LogLevel`,{enumerable:!0,get:function(){return n.LogLevel}});var r=lr();Object.defineProperty(e,`SocketModeClient`,{enumerable:!0,get:function(){return r.SocketModeClient}});var i=cr();Object.defineProperty(e,`UnrecoverableSocketModeStartError`,{enumerable:!0,get:function(){return i.UnrecoverableSocketModeStartError}})}))(),dr=Mn(),Z=re(`slack`);function fr(e){let t=[];e.title&&t.push({type:`header`,text:{type:`plain_text`,text:Z(e.title),emoji:!0}}),e.subtitle&&t.push({type:`context`,elements:[{type:`mrkdwn`,text:Z(e.subtitle)}]}),e.imageUrl&&t.push({type:`image`,image_url:e.imageUrl,alt_text:e.title||`Card image`});let n={usedNativeTable:!1};for(let r of e.children){let e=pr(r,n);t.push(...e)}return t}function pr(e,t){switch(e.type){case`text`:return[mr(e)];case`image`:return[gr(e)];case`divider`:return[_r(e)];case`actions`:return[vr(e)];case`section`:return Cr(e,t);case`fields`:return[wr(e)];case`link`:return[hr(e)];case`table`:return Sr(e,t);default:{let t=l(e);return t?[{type:`section`,text:{type:`mrkdwn`,text:t}}]:[]}}}function Q(e){return e.replace(/\*\*(.+?)\*\*/g,`*$1*`)}function mr(e){let t=Q(Z(e.content)),n=t;if(e.style===`bold`)n=`*${t}*`;else if(e.style===`muted`)return{type:`context`,elements:[{type:`mrkdwn`,text:t}]};return{type:`section`,text:{type:`mrkdwn`,text:n}}}function hr(e){return{type:`section`,text:{type:`mrkdwn`,text:`<${e.url}|${Z(e.label)}>`}}}function gr(e){return{type:`image`,image_url:e.url,alt_text:e.alt||`Image`}}function _r(e){return{type:`divider`}}function vr(e){return{type:`actions`,elements:e.children.map(e=>e.type===`link-button`?$(e):e.type===`select`?br(e):e.type===`radio_select`?xr(e):yr(e))}}function yr(e){let t={type:`button`,text:{type:`plain_text`,text:Z(e.label),emoji:!0},action_id:e.id};e.value&&(t.value=e.value);let n=ie(e.style,`slack`);return n&&(t.style=n),t}function $(e){let t={type:`button`,text:{type:`plain_text`,text:Z(e.label),emoji:!0},action_id:`link-${e.url.slice(0,200)}`,url:e.url},n=ie(e.style,`slack`);return n&&(t.style=n),t}function br(e){let t=e.options.map(e=>{let t={text:{type:`plain_text`,text:Z(e.label)},value:e.value};return e.description&&(t.description={type:`plain_text`,text:Z(e.description)}),t}),n={type:`static_select`,action_id:e.id,options:t};if(e.placeholder&&(n.placeholder={type:`plain_text`,text:Z(e.placeholder)}),e.initialOption){let r=t.find(t=>t.value===e.initialOption);r&&(n.initial_option=r)}return n}function xr(e){let t=e.options.slice(0,10).map(e=>{let t={text:{type:`mrkdwn`,text:Z(e.label)},value:e.value};return e.description&&(t.description={type:`mrkdwn`,text:Z(e.description)}),t}),n={type:`radio_buttons`,action_id:e.id,options:t};if(e.initialOption){let r=t.find(t=>t.value===e.initialOption);r&&(n.initial_option=r)}return n}function Sr(e,t){return t.usedNativeTable||e.rows.length>100||e.headers.length>20?[{type:`section`,text:{type:`mrkdwn`,text:`\`\`\`
|
|
36
|
+
`+n)}function y(e,t,n,r,i,a){if(e.listenerCount(`wsClientError`)){let r=Error(i);Error.captureStackTrace(r,y),e.emit(`wsClientError`,r,n,t)}else v(n,r,i,a)}})),$n=e({PerMessageDeflate:()=>nr.default,Receiver:()=>rr.default,Sender:()=>ir.default,WebSocket:()=>or.default,WebSocketServer:()=>sr.default,createWebSocketStream:()=>er.default,default:()=>cr,extension:()=>tr.default,subprotocol:()=>ar.default}),er,tr,nr,rr,ir,ar,or,sr,cr,lr=n((()=>{er=t(Xn(),1),tr=t(Jn(),1),nr=t(Vn(),1),rr=t(Gn(),1),ir=t(Kn(),1),ar=t(Zn(),1),or=t(Yn(),1),sr=t(Qn(),1),cr=or.default})),ur=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!==`default`&&t(i,r,a[o]);return n(i,r),i}})();Object.defineProperty(e,"__esModule",{value:!0}),e.SlackWebSocket=e.WS_READY_STATES=void 0;let i=(lr(),a($n)),o=pe(),s=r(he());e.WS_READY_STATES=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`];var c=class t{constructor({url:e,client:n,httpAgent:r,logger:i,logLevel:a=s.LogLevel.INFO,pingInterval:o=5e3,pingPongLoggingEnabled:c=!1,serverPingTimeoutMS:l=3e4,clientPingTimeoutMS:u=5e3}){this.options={url:e,client:n,httpAgent:r,logLevel:a,pingInterval:o,pingPongLoggingEnabled:c,serverPingTimeoutMS:l,clientPingTimeoutMS:u},i?this.logger=i:this.logger=s.default.getLogger(t.loggerName,a),this.websocket=null,this.closeFrameReceived=!1}connect(){this.logger.debug(`Initiating new WebSocket connection.`);let e={perMessageDeflate:!1,agent:this.options.httpAgent};this.websocket=new i.WebSocket(this.options.url,e),this.websocket.addEventListener(`open`,e=>{this.logger.debug(`WebSocket open event received (connection established)!`),this.monitorPingToSlack()}),this.websocket.addEventListener(`error`,e=>{this.logger.error(`WebSocket error occurred: ${e.message}`),this.disconnect(),this.options.client.emit(`error`,(0,o.websocketErrorWithOriginal)(e.error))}),this.websocket.on(`message`,(e,t)=>{this.options.client.emit(`ws_message`,e,t)}),this.websocket.on(`close`,(e,t)=>{this.logger.debug(`WebSocket close frame received (code: ${e}, reason: ${t.toString()})`),this.closeFrameReceived=!0,this.disconnect()}),this.websocket.on(`ping`,e=>{this.options.pingPongLoggingEnabled&&this.logger.debug(`WebSocket received ping from Slack server (data: ${e.toString()})`),this.monitorPingFromSlack()}),this.websocket.on(`pong`,e=>{this.options.pingPongLoggingEnabled&&this.logger.debug(`WebSocket received pong from Slack server (data: ${e.toString()})`),this.lastPongReceivedTimestamp=Date.now()})}disconnect(){this.websocket?this.closeFrameReceived?(this.logger.debug(`Terminating WebSocket (close frame received).`),this.terminate()):this.websocket.readyState===i.WebSocket.CLOSING?(this.logger.debug(`Terminating WebSocket (close frame sent but no response, force-terminating).`),this.terminate()):(this.logger.debug(`Sending close frame (status=1000).`),this.websocket.close(1e3)):(this.logger.debug(`WebSocket already disconnected, flushing remainder.`),this.terminate())}terminate(){var e,t;(e=this.websocket)==null||e.removeAllListeners(),(t=this.websocket)==null||t.terminate(),this.websocket=null,clearTimeout(this.serverPingTimeout),clearInterval(this.clientPingTimeout),this.options.client.emit(`close`)}isActive(){return this.websocket?(this.logger.debug(`isActive(): websocket ready state is ${e.WS_READY_STATES[this.websocket.readyState]}`),this.websocket.readyState===1):(this.logger.debug(`isActive(): websocket not instantiated!`),!1)}get readyState(){return this.websocket?.readyState}send(e,t){var n;(n=this.websocket)==null||n.send(e,t)}monitorPingFromSlack(){clearTimeout(this.serverPingTimeout),this.serverPingTimeout=setTimeout(()=>{this.logger.warn(`A ping wasn't received from the server before the timeout of ${this.options.serverPingTimeoutMS}ms!`),this.disconnect()},this.options.serverPingTimeoutMS)}monitorPingToSlack(){this.lastPongReceivedTimestamp=void 0;let e=0;clearInterval(this.clientPingTimeout),this.clientPingTimeout=setInterval(()=>{var t;let n=Date.now();try{let r=`Ping from client (${n})`;(t=this.websocket)==null||t.ping(r),this.lastPongReceivedTimestamp===void 0?e+=1:e=0,this.options.pingPongLoggingEnabled&&this.logger.debug(`Sent ping to Slack: ${r}`)}catch(e){this.logger.error(`Failed to send ping to Slack (error: ${e})`),this.disconnect();return}let r=e>3;this.lastPongReceivedTimestamp!==void 0&&(r=n-this.lastPongReceivedTimestamp>this.options.clientPingTimeoutMS),r&&(this.logger.warn(`A pong wasn't received from the server before the timeout of ${this.options.clientPingTimeoutMS}ms!`),this.disconnect())},this.options.clientPingTimeoutMS/3),this.logger.debug(`Started monitoring pings to and pongs from Slack.`)}};e.SlackWebSocket=c,c.loggerName=`SlackWebSocket`})),dr=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UnrecoverableSocketModeStartError=void 0;var t;(function(e){e.NotAuthed=`not_authed`,e.InvalidAuth=`invalid_auth`,e.AccountInactive=`account_inactive`,e.UserRemovedFromTeam=`user_removed_from_team`,e.TeamDisabled=`team_disabled`})(t||(e.UnrecoverableSocketModeStartError=t={}))})),fr=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!==`default`&&t(i,r,a[o]);return n(i,r),i}})(),i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketModeClient=void 0;let o=Pn(),s=(Kt(),a(Ut)),c=i(Fn()),l=pe(),u=r(he()),d=ur(),f=dr();var p;(function(e){e.Connecting=`connecting`,e.Connected=`connected`,e.Reconnecting=`reconnecting`,e.Disconnecting=`disconnecting`,e.Disconnected=`disconnected`,e.Authenticated=`authenticated`})(p||={});var m=class e extends s.EventEmitter{constructor({logger:t=void 0,logLevel:n=void 0,autoReconnectEnabled:r=!0,pingPongLoggingEnabled:i=!1,clientPingTimeout:a=5e3,serverPingTimeout:s=3e4,appToken:c=``,clientOptions:l={}}={appToken:``}){if(super(),this.numOfConsecutiveReconnectionFailures=0,this.customLoggerProvided=!1,this.shuttingDown=!1,!c)throw Error(`Must provide an App-Level Token when initializing a Socket Mode Client`);this.pingPongLoggingEnabled=i,this.clientPingTimeoutMS=a,this.serverPingTimeoutMS=s,t===void 0?this.logger=u.default.getLogger(e.loggerName,n??u.LogLevel.INFO,t):(this.customLoggerProvided=!0,this.logger=t,n!==void 0&&this.logger.debug(`The logLevel given to Socket Mode was ignored as you also gave logger`)),this.webClientOptions=l,this.webClientOptions.retryConfig===void 0&&(this.webClientOptions.retryConfig={retries:100,factor:1.3}),this.webClient=new o.WebClient(``,Object.assign({logger:t,logLevel:this.logger.getLevel(),headers:{Authorization:`Bearer ${c}`}},l)),this.autoReconnectEnabled=r,this.on(`error`,e=>{this.logger.error(`WebSocket error! ${e}`)}),this.on(`close`,()=>{!this.shuttingDown&&this.autoReconnectEnabled?this.delayReconnectAttempt(this.start):this.emit(p.Disconnected)}),this.on(`ws_message`,this.onWebSocketMessage.bind(this)),this.logger.debug(`The Socket Mode client has successfully initialized`)}async start(){return this.shuttingDown=!1,this.logger.debug(`Starting Socket Mode session ...`),this.websocket=new d.SlackWebSocket({url:await this.retrieveWSSURL(),client:this,logLevel:this.logger.getLevel(),logger:this.customLoggerProvided?this.logger:void 0,httpAgent:this.webClientOptions.agent,clientPingTimeoutMS:this.clientPingTimeoutMS,serverPingTimeoutMS:this.serverPingTimeoutMS,pingPongLoggingEnabled:this.pingPongLoggingEnabled}),new Promise((e,t)=>{var n;let r=e=>{},i=e=>{};r=t=>{this.removeListener(p.Disconnected,i),e(t)},i=e=>{this.removeListener(p.Connected,r),t(e)},this.once(p.Connected,r),this.once(p.Disconnected,i),this.emit(p.Connecting),(n=this.websocket)==null||n.connect()})}disconnect(){return this.shuttingDown=!0,this.logger.debug(`Manually disconnecting this Socket Mode client`),this.emit(p.Disconnecting),new Promise((e,t)=>{var n;this.websocket?(this.once(p.Disconnected,e),(n=this.websocket)==null||n.disconnect()):(this.emit(p.Disconnected),e())})}delayReconnectAttempt(e){this.numOfConsecutiveReconnectionFailures+=1;let t=this.clientPingTimeoutMS*this.numOfConsecutiveReconnectionFailures;return this.logger.debug(`Before trying to reconnect, this client will wait for ${t} milliseconds`),new Promise((n,r)=>{setTimeout(()=>{this.shuttingDown?this.logger.debug(`Client shutting down, will not attempt reconnect.`):(this.logger.debug(`Continuing with reconnect...`),this.emit(p.Reconnecting),e.apply(this).then(n))},t)})}async retrieveWSSURL(){try{this.logger.debug(`Going to retrieve a new WSS URL ...`);let e=await this.webClient.apps.connections.open({});if(!e.url){let t=`apps.connections.open did not return a URL! (response: ${e})`;throw this.logger.error(t),Error(t)}return this.numOfConsecutiveReconnectionFailures=0,this.emit(p.Authenticated,e),e.url}catch(e){this.logger.error(`Failed to retrieve a new WSS URL (error: ${e})`);let t=e,n=!0;if((t.code===o.ErrorCode.PlatformError&&Object.values(f.UnrecoverableSocketModeStartError).includes(t.data.error)||t.code===o.ErrorCode.RequestError||t.code===o.ErrorCode.HTTPError)&&(n=!1),this.autoReconnectEnabled&&n)return await this.delayReconnectAttempt(this.retrieveWSSURL);throw e}}async onWebSocketMessage(e,t){var n;if(t){this.logger.debug(`Unexpected binary message received, ignoring.`);return}let r=e.toString();this.logger.debug(`Received a message on the WebSocket: ${r}`);let i;try{i=JSON.parse(r)}catch(e){this.logger.debug(`Unable to parse an incoming WebSocket message (will ignore): ${e}, ${r}`);return}if(i.type===`hello`){this.emit(p.Connected);return}if(i.type===`disconnect`){this.logger.debug(`Received "${i.type}" (${i.reason}) message - disconnecting.${this.autoReconnectEnabled?` Will reconnect.`:``}`),(n=this.websocket)==null||n.disconnect();return}let a=async e=>{this.logger.getLevel()===u.LogLevel.DEBUG&&this.logger.debug(`Calling ack() - type: ${i.type}, envelope_id: ${i.envelope_id}, data: ${JSON.stringify(e)}`),await this.send(i.envelope_id,e)};i.type===`events_api`?this.emit(i.payload.event.type,{ack:a,envelope_id:i.envelope_id,body:i.payload,event:i.payload.event,retry_num:i.retry_attempt,retry_reason:i.retry_reason,accepts_response_payload:i.accepts_response_payload}):this.emit(i.type,{ack:a,envelope_id:i.envelope_id,body:i.payload,accepts_response_payload:i.accepts_response_payload}),this.emit(`slack_event`,{ack:a,envelope_id:i.envelope_id,type:i.type,body:i.payload,retry_num:i.retry_attempt,retry_reason:i.retry_reason,accepts_response_payload:i.accepts_response_payload})}send(e,t={}){let n={envelope_id:e,payload:Object.assign({},typeof t==`string`?{text:t}:t)};return new Promise((e,t)=>{let r=this.websocket?.readyState;if(this.logger.debug(`send() method was called (WebSocket state: ${r?d.WS_READY_STATES[r]:`uninitialized`})`),this.websocket===void 0)this.logger.error(`Failed to send a message as the client is not connected`),t((0,l.sendWhileDisconnectedError)());else if(!this.websocket.isActive())this.logger.error(`Failed to send a message as the client has no active connection`),t((0,l.sendWhileNotReadyError)());else{this.emit(`outgoing_message`,n);let r=JSON.stringify(n);this.logger.debug(`Sending a WebSocket message: ${r}`),this.websocket.send(r,n=>n?(this.logger.error(`Failed to send a WebSocket message (error: ${n})`),t((0,l.websocketErrorWithOriginal)(n))):e())}})}};e.SocketModeClient=m,m.loggerName=`SocketModeClient`,(0,o.addAppMetadata)({name:c.default.name,version:c.default.version}),e.default=m})),pr=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UnrecoverableSocketModeStartError=e.SocketModeClient=e.LogLevel=e.ErrorCode=void 0;var t=pe();Object.defineProperty(e,"ErrorCode",{enumerable:!0,get:function(){return t.ErrorCode}});var n=he();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return n.LogLevel}});var r=fr();Object.defineProperty(e,"SocketModeClient",{enumerable:!0,get:function(){return r.SocketModeClient}});var i=dr();Object.defineProperty(e,"UnrecoverableSocketModeStartError",{enumerable:!0,get:function(){return i.UnrecoverableSocketModeStartError}})}))(),mr=Pn(),Z=re(`slack`);function hr(e){let t=[];e.title&&t.push({type:`header`,text:{type:`plain_text`,text:Z(e.title),emoji:!0}}),e.subtitle&&t.push({type:`context`,elements:[{type:`mrkdwn`,text:Z(e.subtitle)}]}),e.imageUrl&&t.push({type:`image`,image_url:e.imageUrl,alt_text:e.title||`Card image`});let n={usedNativeTable:!1};for(let r of e.children){let e=gr(r,n);t.push(...e)}return t}function gr(e,t){switch(e.type){case`text`:return[vr(e)];case`image`:return[br(e)];case`divider`:return[xr(e)];case`actions`:return[Sr(e)];case`section`:return Dr(e,t);case`fields`:return[Or(e)];case`link`:return[yr(e)];case`table`:return Er(e,t);default:{let t=c(e);return t?[{type:`section`,text:{type:`mrkdwn`,text:t}}]:[]}}}function _r(e){return e.replace(/\*\*(.+?)\*\*/g,`*$1*`)}function vr(e){let t=_r(Z(e.content)),n=t;if(e.style===`bold`)n=`*${t}*`;else if(e.style===`muted`)return{type:`context`,elements:[{type:`mrkdwn`,text:t}]};return{type:`section`,text:{type:`mrkdwn`,text:n}}}function yr(e){return{type:`section`,text:{type:`mrkdwn`,text:`<${e.url}|${Z(e.label)}>`}}}function br(e){return{type:`image`,image_url:e.url,alt_text:e.alt||`Image`}}function xr(e){return{type:`divider`}}function Sr(e){return{type:`actions`,elements:e.children.map(e=>e.type===`link-button`?Cr(e):e.type===`select`?wr(e):e.type===`radio_select`?Tr(e):Q(e))}}function Q(e){let t={type:`button`,text:{type:`plain_text`,text:Z(e.label),emoji:!0},action_id:e.id};e.value&&(t.value=e.value);let n=ie(e.style,`slack`);return n&&(t.style=n),t}function Cr(e){let t={type:`button`,text:{type:`plain_text`,text:Z(e.label),emoji:!0},action_id:`link-${e.url.slice(0,200)}`,url:e.url},n=ie(e.style,`slack`);return n&&(t.style=n),t}function wr(e){let t=e.options.map(e=>{let t={text:{type:`plain_text`,text:Z(e.label)},value:e.value};return e.description&&(t.description={type:`plain_text`,text:Z(e.description)}),t}),n={type:`static_select`,action_id:e.id,options:t};if(e.placeholder&&(n.placeholder={type:`plain_text`,text:Z(e.placeholder)}),e.initialOption){let r=t.find(t=>t.value===e.initialOption);r&&(n.initial_option=r)}return n}function Tr(e){let t=e.options.slice(0,10).map(e=>{let t={text:{type:`mrkdwn`,text:Z(e.label)},value:e.value};return e.description&&(t.description={type:`mrkdwn`,text:Z(e.description)}),t}),n={type:`radio_buttons`,action_id:e.id,options:t};if(e.initialOption){let r=t.find(t=>t.value===e.initialOption);r&&(n.initial_option=r)}return n}function Er(e,t){return t.usedNativeTable||e.rows.length>100||e.headers.length>20?[{type:`section`,text:{type:`mrkdwn`,text:`\`\`\`
|
|
33
37
|
${S(e.headers,e.rows)}
|
|
34
|
-
\`\`\``}}]:(t.usedNativeTable=!0,[{type:`table`,rows:[e.headers.map(e=>({type:`raw_text`,text:Z(e)||` `})),...e.rows.map(e=>e.map(e=>({type:`raw_text`,text:Z(e)||` `})))]}])}function
|
|
35
|
-
${
|
|
36
|
-
`,platform:`slack`})}var
|
|
38
|
+
\`\`\``}}]:(t.usedNativeTable=!0,[{type:`table`,rows:[e.headers.map(e=>({type:`raw_text`,text:Z(e)||` `})),...e.rows.map(e=>e.map(e=>({type:`raw_text`,text:Z(e)||` `})))]}])}function Dr(e,t){let n=[];for(let r of e.children)n.push(...gr(r,t));return n}function Or(e){let t=[];for(let n of e.children)t.push({type:`mrkdwn`,text:`*${_r(Z(n.label))}*
|
|
39
|
+
${_r(Z(n.value))}`});return{type:`section`,fields:t}}function $(e){return ae(e,{boldFormat:`*`,lineBreak:`
|
|
40
|
+
`,platform:`slack`})}var kr=/(?<![<\w])@(\w+)/g,Ar=class extends g{fromAst(e){return s(e)}toAst(e){let t=e;return t=t.replace(/<@([A-Z0-9_]+)\|([^<>]+)>/g,`@$2`),t=t.replace(/<@([A-Z0-9_]+)>/g,`@$1`),t=t.replace(/<#[A-Z0-9_]+\|([^<>]+)>/g,`#$1`),t=t.replace(/<#([A-Z0-9_]+)>/g,`#$1`),t=t.replace(/<(https?:\/\/[^|<>]+)\|([^<>]+)>/g,`[$2]($1)`),t=t.replace(/<(https?:\/\/[^<>]+)>/g,`$1`),t=t.replace(/(?<![_*\\])\*([^*\n]+)\*(?![_*])/g,`**$1**`),t=t.replace(/(?<!~)~([^~\n]+)~(?!~)/g,`~~$1~~`),A(t)}toSlackPayload(e){return typeof e==`string`?{text:this.finalize(e)}:`raw`in e?{text:this.finalize(e.raw)}:`markdown`in e?{markdown_text:this.finalize(e.markdown)}:`ast`in e?{markdown_text:this.finalize(s(e.ast))}:{text:``}}toResponseUrlText(e){return typeof e==`string`?this.finalize(e):`raw`in e?this.finalize(e.raw):`markdown`in e?u(this.astToMrkdwn(A(e.markdown)),`slack`):`ast`in e?u(this.astToMrkdwn(e.ast),`slack`):``}finalize(e){return u(e.replace(kr,`<@$1>`),`slack`)}astToMrkdwn(e){return this.fromAstWithNodeConverter(e,e=>this.nodeToMrkdwn(e))}nodeToMrkdwn(e){if(y(e))return b(e).map(e=>this.nodeToMrkdwn(e)).join(``);if(p(e))return e.value.replace(kr,`<@$1>`);if(v(e))return`*${b(e).map(e=>this.nodeToMrkdwn(e)).join(``)}*`;if(O(e))return`_${b(e).map(e=>this.nodeToMrkdwn(e)).join(``)}_`;if(w(e))return`~${b(e).map(e=>this.nodeToMrkdwn(e)).join(``)}~`;if(h(e))return`\`${e.value}\``;if(m(e))return`\`\`\`${e.lang||``}
|
|
37
41
|
${e.value}
|
|
38
42
|
\`\`\``;if(_(e)){let t=b(e).map(e=>this.nodeToMrkdwn(e)).join(``);return`<${e.url}|${t}>`}return D(e)?b(e).map(e=>`> ${this.nodeToMrkdwn(e)}`).join(`
|
|
39
43
|
`):T(e)?this.renderList(e,0,e=>this.nodeToMrkdwn(e),`•`):e.type===`break`?`
|
|
40
44
|
`:e.type===`thematicBreak`?`---`:k(e)?`\`\`\`
|
|
41
|
-
${
|
|
42
|
-
\`\`\``:this.defaultNodeToText(e,e=>this.nodeToMrkdwn(e))}};function Or(e){if(e.contextId||e.privateMetadata)return JSON.stringify({c:e.contextId,m:e.privateMetadata})}function kr(e){if(!e)return{};try{let t=JSON.parse(e);if(typeof t==`object`&&t&&(`c`in t||`m`in t))return{contextId:t.c||void 0,privateMetadata:t.m||void 0}}catch{}return{contextId:e}}function Ar(e,t){return{type:`modal`,callback_id:e.callbackId,title:{type:`plain_text`,text:e.title.slice(0,24)},submit:e.submitLabel?{type:`plain_text`,text:e.submitLabel}:{type:`plain_text`,text:`Submit`},close:e.closeLabel?{type:`plain_text`,text:e.closeLabel}:{type:`plain_text`,text:`Cancel`},notify_on_close:e.notifyOnClose,private_metadata:t,blocks:e.children.map(jr)}}function jr(e){switch(e.type){case`text_input`:return Nr(e);case`select`:return Pr(e);case`external_select`:return Fr(e);case`radio_select`:return Ir(e);case`text`:return mr(e);case`fields`:return wr(e);default:throw Error(`Unknown modal child type: ${e.type}`)}}function Mr(e){return{text:{type:`plain_text`,text:e.label},value:e.value,...e.description?{description:{type:`plain_text`,text:e.description}}:{}}}function Nr(e){let t={type:`plain_text_input`,action_id:e.id,multiline:e.multiline??!1};return e.placeholder&&(t.placeholder={type:`plain_text`,text:e.placeholder}),e.initialValue&&(t.initial_value=e.initialValue),e.maxLength&&(t.max_length=e.maxLength),{type:`input`,block_id:e.id,optional:e.optional??!1,label:{type:`plain_text`,text:e.label},element:t}}function Pr(e){let t=e.options.map(Mr),n={type:`static_select`,action_id:e.id,options:t};if(e.placeholder&&(n.placeholder={type:`plain_text`,text:e.placeholder}),e.initialOption){let r=t.find(t=>t.value===e.initialOption);r&&(n.initial_option=r)}return{type:`input`,block_id:e.id,optional:e.optional??!1,label:{type:`plain_text`,text:e.label},element:n}}function Fr(e){let t={type:`external_select`,action_id:e.id};return e.placeholder&&(t.placeholder={type:`plain_text`,text:e.placeholder}),e.minQueryLength!==void 0&&(t.min_query_length=e.minQueryLength),e.initialOption&&(t.initial_option=Mr(e.initialOption)),{type:`input`,block_id:e.id,optional:e.optional??!1,label:{type:`plain_text`,text:e.label},element:t}}function Ir(e){let t=e.options.slice(0,10).map(e=>{let t={text:{type:`mrkdwn`,text:e.label},value:e.value};return e.description&&(t.description={type:`mrkdwn`,text:e.description}),t}),n={type:`radio_buttons`,action_id:e.id,options:t};if(e.initialOption){let r=t.find(t=>t.value===e.initialOption);r&&(n.initial_option=r)}return{type:`input`,block_id:e.id,optional:e.optional??!1,label:{type:`plain_text`,text:e.label},element:n}}var Lr=/^[A-Z0-9_]+$/,Rr=/^U[A-Z0-9]+$/,zr=2500;function Br(e,t){let n=Buffer.from(e,`utf8`),r=Buffer.from(t,`utf8`);return n.length===r.length?R(n,r):!1}function Vr(e){let t=e.indexOf(`<@`),n=e.indexOf(`<#`);return t===-1?n:n===-1?t:Math.min(t,n)}var Hr=/\/$/,Ur=2e3,Wr=150,Gr=/^https?:\/\/[^/]+\.slack\.com\/archives\/([A-Z0-9]+)\/p(\d+)(?:\?.*)?$/;function Kr(e){if(e!==void 0)return typeof e==`function`?e:()=>e}var qr=class e{name=`slack`;userName;client;signingSecret;webhookVerifier;defaultBotTokenProvider;chat=null;logger;_botUserId=null;_botId=null;formatConverter=new Dr;static USER_CACHE_TTL_MS=11520*60*1e3;static CHANNEL_CACHE_TTL_MS=11520*60*1e3;static REVERSE_INDEX_TTL_MS=11520*60*1e3;_externalChannels=new Set;appToken;mode;socketForwardingSecret;socketClient=null;clientId;clientSecret;encryptionKey;installationKeyPrefix;requestContext=new F;get botUserId(){let e=this.requestContext.getStore();return e?.botUserId?e.botUserId:this._botUserId||void 0}get isSocketMode(){return this.mode===`socket`}constructor(e={}){let t=e.webhookVerifier,n=e.signingSecret??(t?void 0:process.env.SLACK_SIGNING_SECRET);if(!(n||t)&&(e.mode??`webhook`)===`webhook`)throw new U(`slack`,`signingSecret or webhookVerifier is required for webhook mode. Set SLACK_SIGNING_SECRET, provide signingSecret in config, or provide a webhookVerifier.`);let r=!(e.signingSecret||e.botToken||e.clientId||e.clientSecret),i=Kr(e.botToken??(r?process.env.SLACK_BOT_TOKEN:void 0)),a=e.apiUrl??process.env.SLACK_API_URL;this.client=new dr.WebClient(void 0,{...a?{slackApiUrl:a}:{}}),this.signingSecret=n,this.webhookVerifier=n?void 0:t,this.defaultBotTokenProvider=i,this.logger=e.logger??new C(`info`).child(`slack`),this.userName=e.userName||`bot`,this._botUserId=e.botUserId||null,this.appToken=e.appToken,this.mode=e.mode??`webhook`,this.socketForwardingSecret=e.socketForwardingSecret??e.appToken,this.clientId=e.clientId??(r?process.env.SLACK_CLIENT_ID:void 0),this.clientSecret=e.clientSecret??(r?process.env.SLACK_CLIENT_SECRET:void 0),this.installationKeyPrefix=e.installationKeyPrefix??`slack:installation`;let o=e.encryptionKey??process.env.SLACK_ENCRYPTION_KEY;o&&(this.encryptionKey=pe(o))}async getToken(){let e=this.requestContext.getStore();if(e?.token)return e.token;if(this.defaultBotTokenProvider)return await this.defaultBotTokenProvider();throw new H(`slack`,`No bot token available. In multi-workspace mode, ensure the webhook is being processed.`)}async withToken(e){return{...e,token:await this.getToken()}}async initialize(e){if(this.chat=e,this.defaultBotTokenProvider&&!this._botUserId)try{let e=await this.client.auth.test(await this.withToken({}));this._botUserId=e.user_id,this._botId=e.bot_id||null,e.user&&(this.userName=e.user),this.logger.info(`Slack auth completed`,{botUserId:this._botUserId,botId:this._botId})}catch(e){this.logger.warn(`Could not fetch bot user ID`,{error:e})}this.defaultBotTokenProvider||this.logger.info(`Slack adapter initialized in multi-workspace mode`),this.mode===`socket`&&await this.startSocketMode()}installationKey(e){return`${this.installationKeyPrefix}:${e}`}async setInstallation(e,t){if(!this.chat)throw new U(`slack`,`Adapter not initialized. Ensure chat.initialize() has been called first.`);let n=this.chat.getState(),r=this.installationKey(e),i=this.encryptionKey?{...t,botToken:ue(t.botToken,this.encryptionKey)}:t;await n.set(r,i),this.logger.info(`Slack installation saved`,{teamId:e,teamName:t.teamName})}async getInstallation(e){if(!this.chat)throw new U(`slack`,`Adapter not initialized. Ensure chat.initialize() has been called first.`);let t=this.chat.getState(),n=this.installationKey(e),r=await t.get(n);return r?this.encryptionKey&&fe(r.botToken)?{...r,botToken:de(r.botToken,this.encryptionKey)}:r:null}async handleOAuthCallback(e,t){if(!(this.clientId&&this.clientSecret))throw new U(`slack`,`clientId and clientSecret are required for OAuth. Pass them in createSlackAdapter().`);let n=new URL(e.url),r=n.searchParams.get(`code`);if(!r)throw new U(`slack`,`Missing 'code' query parameter in OAuth callback request.`);let i=t?.redirectUri??n.searchParams.get(`redirect_uri`)??void 0,a=await this.client.oauth.v2.access({client_id:this.clientId,client_secret:this.clientSecret,code:r,...i?{redirect_uri:i}:{}});if(!(a.ok&&a.access_token&&a.team?.id))throw new H(`slack`,`Slack OAuth failed: ${a.error||`missing access_token or team.id`}`);let o=a.team.id,s={botToken:a.access_token,botUserId:a.bot_user_id,teamName:a.team.name};return await this.setInstallation(o,s),{teamId:o,installation:s}}async deleteInstallation(e){if(!this.chat)throw new U(`slack`,`Adapter not initialized. Ensure chat.initialize() has been called first.`);await this.chat.getState().delete(this.installationKey(e)),this.logger.info(`Slack installation deleted`,{teamId:e})}withBotToken(e,t){return this.requestContext.run({token:e},t)}async resolveTokenForTeam(e){try{let t=await this.getInstallation(e);return t?{token:t.botToken,botUserId:t.botUserId}:(this.logger.warn(`No installation found for team`,{teamId:e}),null)}catch(t){return this.logger.error(`Failed to resolve token for team`,{teamId:e,error:t}),null}}extractTeamIdFromInteractive(e){try{let t=new URLSearchParams(e).get(`payload`);if(!t)return null;let n=JSON.parse(t);return n.team?.id||n.team_id||null}catch{return null}}async lookupUser(t){let n=`slack:user:${t}`;if(this.chat){let e=await this.chat.getState().get(n);if(e)return e}try{let r=(await this.client.users.info(await this.withToken({user:t}))).user,i=r?.profile?.display_name||r?.profile?.real_name||r?.real_name||r?.name||t,a=r?.real_name||r?.profile?.real_name||i,o={avatarUrl:r?.profile?.image_192,displayName:i,email:r?.profile?.email,isBot:r?.is_bot,realName:a};if(this.chat){await this.chat.getState().set(n,o,e.USER_CACHE_TTL_MS);let r=`slack:user-by-name:${i.toLowerCase()}`;(await this.chat.getState().getList(r)).includes(t)||await this.chat.getState().appendToList(r,t,{maxLength:50,ttlMs:e.REVERSE_INDEX_TTL_MS})}return this.logger.debug(`Fetched user info`,{userId:t,displayName:i,realName:a}),o}catch(e){return this.logger.warn(`Could not fetch user info`,{userId:t,error:e}),null}}async lookupChannel(t){let n=`slack:channel:${t}`;if(this.chat){let e=await this.chat.getState().get(n);if(e)return e.name}try{let r=(await this.client.conversations.info(await this.withToken({channel:t}))).channel?.name||t;return this.chat&&await this.chat.getState().set(n,{name:r},e.CHANNEL_CACHE_TTL_MS),this.logger.debug(`Fetched channel info`,{channelId:t,name:r}),r}catch(e){return this.logger.warn(`Could not fetch channel info`,{channelId:t,error:e}),t}}async getUser(e){try{let t=await this.lookupUser(e);return t?{avatarUrl:t.avatarUrl,email:t.email,fullName:t.realName,isBot:t.isBot??!1,userId:e,userName:t.displayName}:null}catch{return null}}async handleWebhook(e,t){let n=e.headers.get(`x-slack-socket-token`);if(n){if(!(this.socketForwardingSecret&&Br(n,this.socketForwardingSecret)))return this.logger.warn(`Invalid socket forwarding token`),new Response(`Invalid socket token`,{status:401});this.logger.info(`Slack forwarded socket event received`);try{let n=await e.text(),r=JSON.parse(n);return await this.routeSocketEvent(r.body,r.eventType,async()=>{},t),new Response(`ok`,{status:200})}catch{return new Response(`Invalid JSON`,{status:400})}}if(this.mode===`socket`)return new Response(`Webhooks are disabled in socket mode`,{status:405});let r=await e.text();if(this.logger.debug(`Slack webhook raw body`,{body:r}),this.webhookVerifier)try{let t=await this.webhookVerifier(e,r);if(!t)return this.logger.warn(`Webhook verifier rejected request`),new Response(`Invalid signature`,{status:401});typeof t==`string`&&(r=t)}catch(e){return this.logger.warn(`Webhook verifier rejected request`,{error:e}),new Response(`Invalid signature`,{status:401})}else{let t=e.headers.get(`x-slack-request-timestamp`),n=e.headers.get(`x-slack-signature`);if(!this.verifySignature(r,t,n))return new Response(`Invalid signature`,{status:401})}if((e.headers.get(`content-type`)||``).includes(`application/x-www-form-urlencoded`)){let e=new URLSearchParams(r);if(e.has(`command`)&&!e.has(`payload`)){let n=e.get(`team_id`);if(!this.defaultBotTokenProvider&&n){let r=await this.resolveTokenForTeam(n);if(r)return this.requestContext.run(r,()=>this.handleSlashCommand(e,t));this.logger.warn(`Could not resolve token for slash command`)}return this.handleSlashCommand(e,t)}if(!this.defaultBotTokenProvider){let e=this.extractTeamIdFromInteractive(r);if(e){let n=await this.resolveTokenForTeam(e);if(n)return this.requestContext.run(n,()=>this.handleInteractivePayload(r,t))}this.logger.warn(`Could not resolve token for interactive payload`)}return this.handleInteractivePayload(r,t)}let i;try{i=JSON.parse(r)}catch{return new Response(`Invalid JSON`,{status:400})}if(i.type===`url_verification`&&i.challenge)return Response.json({challenge:i.challenge});if(!this.defaultBotTokenProvider&&i.type===`event_callback`){let e=i.team_id;if(e){let n=await this.resolveTokenForTeam(e);return n?this.requestContext.run(n,()=>(this.processEventPayload(i,t),new Response(`ok`,{status:200}))):(this.logger.warn(`Could not resolve token for team`,{teamId:e}),new Response(`ok`,{status:200}))}}return this.processEventPayload(i,t),new Response(`ok`,{status:200})}processEventPayload(e,t){if(e.type===`event_callback`&&e.event){let n=e.event;if(e.is_ext_shared_channel){let e;`channel`in n?e=n.channel:`item`in n&&(e=n.item.channel),e&&this._externalChannels.add(e)}if(n.type===`message`||n.type===`app_mention`){let r=n;!(r.team||r.team_id)&&e.team_id&&(r.team_id=e.team_id),this.handleMessageEvent(r,t)}else if(n.type===`reaction_added`||n.type===`reaction_removed`){let e=this.handleReactionEvent(n,t);t?.waitUntil?.(e)}else n.type===`assistant_thread_started`?this.handleAssistantThreadStarted(n,t):n.type===`assistant_thread_context_changed`?this.handleAssistantContextChanged(n,t):n.type===`app_home_opened`&&n.tab===`home`?this.handleAppHomeOpened(n,t):n.type===`member_joined_channel`?this.handleMemberJoinedChannel(n,t):n.type===`user_change`&&this.handleUserChange(n)}}handleInteractivePayload(e,t){let n=new URLSearchParams(e).get(`payload`);if(!n)return new Response(`Missing payload`,{status:400});let r;try{r=JSON.parse(n)}catch{return new Response(`Invalid payload JSON`,{status:400})}return this.dispatchInteractivePayload(r,t)}dispatchInteractivePayload(e,t){switch(e.type){case`block_actions`:return this.handleBlockActions(e,t),new Response(``,{status:200});case`block_suggestion`:return this.handleBlockSuggestion(e,t);case`view_submission`:return this.handleViewSubmission(e,t);case`view_closed`:return this.handleViewClosed(e,t),new Response(``,{status:200});default:return new Response(``,{status:200})}}async handleSlashCommand(e,t){if(!this.chat)return this.logger.warn(`Chat instance not initialized, ignoring slash command`),new Response(``,{status:200});let n=e.get(`command`)||``,r=e.get(`text`)||``,i=e.get(`user_id`)||``,a=e.get(`channel_id`)||``,o=e.get(`trigger_id`)||void 0;this.logger.debug(`Processing Slack slash command`,{command:n,text:r,userId:i,channelId:a,triggerId:o});let s=await this.lookupUser(i),c={command:n,text:r,user:{userId:i,userName:s?.displayName??i,fullName:s?.realName??i,isBot:!1,isMe:!1},adapter:this,raw:Object.fromEntries(e),triggerId:o,channelId:a?`slack:${a}`:``};return this.chat.processSlashCommand(c,t),new Response(``,{status:200})}handleBlockActions(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring action`);return}let n=e.channel?.id||e.container?.channel_id,r=e.message?.ts||e.container?.message_ts,i=e.message?.thread_ts||e.container?.thread_ts||r;if(!(e.container?.type===`view`||n)){this.logger.warn(`Missing channel in block_actions`,{channel:n});return}let a=n&&(i||r)?this.encodeThreadId({channel:n,threadTs:i||r||``}):``,o=e.container?.is_ephemeral===!0,s=e.response_url,c=o&&s&&r?this.encodeEphemeralMessageId(r,s,e.user.id):r||``;for(let n of e.actions){let i=n.selected_option?.value??n.value,o={actionId:n.action_id,value:i,user:{userId:e.user.id,userName:e.user.username||e.user.name||`unknown`,fullName:e.user.name||e.user.username||`unknown`,isBot:!1,isMe:!1},messageId:c,threadId:a,adapter:this,raw:e,triggerId:e.trigger_id};this.logger.debug(`Processing Slack block action`,{actionId:n.action_id,value:n.value,messageId:r,threadId:a,triggerId:e.trigger_id}),this.chat.processAction(o,t)}}async handleBlockSuggestion(e,t){if(!this.chat)return this.logger.warn(`Chat instance not initialized, ignoring block suggestion`),this.optionsLoadResponse([]);let n=this.chat.processOptionsLoad({actionId:e.action_id,query:e.value??``,user:{userId:e.user.id,userName:e.user.username||e.user.name||e.user.id,fullName:e.user.name||e.user.username||e.user.id,isBot:!1,isMe:!1},adapter:this,raw:e},t),r=Symbol(`options_load_timeout`),i,a=new Promise(e=>{i=setTimeout(()=>e(r),zr)}),o=await Promise.race([n,a]);return i&&clearTimeout(i),o===r?(this.logger.warn(`Options load handler timed out`,{actionId:e.action_id,timeoutMs:zr}),n.catch(t=>this.logger.error(`Options load handler error after timeout`,{error:t,actionId:e.action_id})),this.optionsLoadResponse([])):this.optionsLoadResponse(o??[])}optionsLoadResponse(e){if(e.length>0&&`options`in e[0]&&Array.isArray(e[0].options)){let t=e.slice(0,100).map(e=>({label:{type:`plain_text`,text:e.label.slice(0,75)},options:e.options.slice(0,100).map(Mr)}));return new Response(JSON.stringify({option_groups:t}),{status:200,headers:{"Content-Type":`application/json`}})}let t=e.slice(0,100).map(Mr);return new Response(JSON.stringify({options:t}),{status:200,headers:{"Content-Type":`application/json`}})}async handleViewSubmission(e,t){if(!this.chat)return this.logger.warn(`Chat instance not initialized, ignoring view submission`),new Response(``,{status:200});let n={};for(let t of Object.values(e.view.state.values))for(let[e,r]of Object.entries(t))n[e]=r.value??r.selected_option?.value??``;let{contextId:r,privateMetadata:i}=kr(e.view.private_metadata||void 0),a={callbackId:e.view.callback_id,viewId:e.view.id,values:n,privateMetadata:i,user:{userId:e.user.id,userName:e.user.username||e.user.name||`unknown`,fullName:e.user.name||e.user.username||`unknown`,isBot:!1,isMe:!1},adapter:this,raw:e},o=await this.chat.processModalSubmit(a,r,t);if(o){let e=this.modalResponseToSlack(o,r);return new Response(JSON.stringify(e),{status:200,headers:{"Content-Type":`application/json`}})}return new Response(``,{status:200})}handleViewClosed(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring view closed`);return}let{contextId:n,privateMetadata:r}=kr(e.view.private_metadata||void 0),i={callbackId:e.view.callback_id,viewId:e.view.id,privateMetadata:r,user:{userId:e.user.id,userName:e.user.username||e.user.name||`unknown`,fullName:e.user.name||e.user.username||`unknown`,isBot:!1,isMe:!1},adapter:this,raw:e};this.chat.processModalClose(i,n,t)}modalResponseToSlack(e,t){switch(e.action){case`close`:return{};case`clear`:return{response_action:`clear`};case`errors`:return{response_action:`errors`,errors:e.errors};case`update`:{let n=this.convertModalJSX(e.modal);return{response_action:`update`,view:Ar(n,Or({contextId:t,privateMetadata:n.privateMetadata}))}}case`push`:{let n=this.convertModalJSX(e.modal);return{response_action:`push`,view:Ar(n,Or({contextId:t,privateMetadata:n.privateMetadata}))}}default:return{}}}convertModalJSX(e){if(E(e)){let t=o(e);if(!t)throw new U(`slack`,`Invalid JSX element: must be a Modal element`);return t}return e}async startSocketMode(){if(!this.appToken)throw new U(`slack`,`appToken is required for socket mode. Set SLACK_APP_TOKEN or provide it in config.`);this.socketClient=new ur.SocketModeClient({appToken:this.appToken}),this.socketClient.on(`slack_event`,async({ack:e,body:t,type:n,retry_num:r})=>{if(r&&r>0){await e(),this.logger.debug(`Skipping socket mode retry`,{retry_num:r});return}await this.routeSocketEvent(t,n,e)}),await this.socketClient.start(),this.logger.info(`Slack socket mode connected`)}async routeSocketEvent(e,t,n,r){let i=e=>{r?.waitUntil?r.waitUntil(e):e.catch(e=>{this.logger.error(`Error in socket mode async handler`,{error:e})})};switch(t){case`events_api`:{if(await n(),!e.event||typeof e.event!=`object`){this.logger.warn(`Socket mode events_api missing event field`,{body:e});break}let t={type:`event_callback`,event:e.event,team_id:e.team_id,event_id:e.event_id,event_time:e.event_time};try{this.processEventPayload(t,r)}catch(e){this.logger.error(`Error processing socket mode events_api`,{error:e})}break}case`slash_commands`:{await n();let t=new URLSearchParams;for(let[n,r]of Object.entries(e))typeof r==`string`&&t.set(n,r);i(this.handleSlashCommand(t,r));break}case`interactive`:{let t=e,i=this.dispatchInteractivePayload(t,r),a=i instanceof Promise?await i:i;await n(a.headers.get(`content-type`)?.includes(`application/json`)?await a.json():void 0);break}default:await n(),this.logger.debug(`Unhandled socket mode event type`,{type:t})}}async startSocketModeListener(e,t=18e4,n,r){if(!this.appToken)return new Response(`appToken is required for socket mode listener`,{status:500});if(!e.waitUntil)return new Response(`waitUntil not provided`,{status:500});this.logger.info(`Starting Slack socket mode listener`,{durationMs:t,webhookUrl:r?`configured`:`not configured`});let i=this.runSocketModeListener(t,n,r,e);return e.waitUntil(i),new Response(JSON.stringify({status:`listening`,durationMs:t,message:`Socket mode listener started, will run for ${t/1e3} seconds`}),{status:200,headers:{"Content-Type":`application/json`}})}async runSocketModeListener(e,t,n,r){let i=this.appToken,a=new ur.SocketModeClient({appToken:i}),o=!1;a.on(`slack_event`,async({ack:e,body:t,type:i,retry_num:a})=>{if(o)return;if(a&&a>0){await e(),this.logger.debug(`Skipping socket mode retry`,{retry_num:a});return}let s=i;n?(await e(),await this.forwardSocketEvent(n,{type:`socket_event`,eventType:s,body:t,timestamp:Date.now()})):await this.routeSocketEvent(t,s,e,r)});try{await a.start(),this.logger.info(`Slack socket mode listener connected`),await new Promise(n=>{let r=setTimeout(n,e);if(t){if(t.aborted){clearTimeout(r),n();return}t.addEventListener(`abort`,()=>{this.logger.info(`Slack socket mode listener received abort signal`),clearTimeout(r),n()},{once:!0})}}),this.logger.info(`Slack socket mode listener duration elapsed, disconnecting`)}catch(e){this.logger.error(`Slack socket mode listener error`,{error:String(e)})}finally{o=!0,await a.disconnect(),this.logger.info(`Slack socket mode listener stopped`)}}async forwardSocketEvent(e,t){try{this.logger.debug(`Forwarding socket event to webhook`,{type:t.body.type||`unknown`,webhookUrl:e});let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`,"x-slack-socket-token":this.socketForwardingSecret},body:JSON.stringify(t)});if(n.ok)this.logger.debug(`Socket event forwarded successfully`,{type:t.body.type||`unknown`});else{let e=await n.text();this.logger.error(`Failed to forward socket event`,{type:t.body.type||`unknown`,status:n.status,error:e})}}catch(e){this.logger.error(`Error forwarding socket event`,{type:t.body.type||`unknown`,error:String(e)})}}async disconnect(){this.socketClient&&(await this.socketClient.disconnect(),this.socketClient=null,this.logger.info(`Slack socket mode disconnected`))}verifySignature(e,t,n){if(!(t&&n&&this.signingSecret))return!1;let r=Math.floor(Date.now()/1e3);if(Math.abs(r-Number.parseInt(t,10))>300)return!1;let i=`v0:${t}:${e}`,a=`v0=`+L(`sha256`,this.signingSecret).update(i).digest(`hex`);try{return R(Buffer.from(n),Buffer.from(a))}catch{return!1}}handleMessageEvent(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring event`);return}let n=new Set([`message_deleted`,`message_replied`,`channel_join`,`channel_leave`,`channel_topic`,`channel_purpose`,`channel_name`,`channel_archive`,`channel_unarchive`,`group_join`,`group_leave`,`group_topic`,`group_purpose`,`group_name`,`group_archive`,`group_unarchive`,`ekm_access_denied`,`tombstone`]);if(e.subtype===`message_changed`){this.handleMessageChanged(e,t);return}if(e.subtype&&n.has(e.subtype)){this.logger.debug(`Ignoring message subtype`,{subtype:e.subtype});return}if(!(e.channel&&e.ts)){this.logger.debug(`Ignoring event without channel or ts`,{channel:e.channel,ts:e.ts});return}let r=e.channel_type===`im`?e.thread_ts||``:e.thread_ts||e.ts,i=this.encodeThreadId({channel:e.channel,threadTs:r}),a=e.type===`app_mention`;this.chat.processMessage(this,i,async()=>{let t=await this.parseSlackMessage(e,i);return a&&(t.isMention=!0),t},t)}handleMessageChanged(e,t){let n=e.message;if(!(n&&e.channel))return;if(!n.attachments?.some(e=>e.from_url||e.original_url)){this.logger.debug(`Ignoring message_changed without unfurl data`);return}if(this.logger.debug(`Processing message_changed for link unfurls`,{channel:e.channel,ts:n.ts,attachmentCount:n.attachments?.length}),!(this.chat&&n.ts&&n.attachments))return;let r={};for(let e of n.attachments){let t=e.from_url||e.original_url;t&&(e.title||e.text)&&(r[t]={title:e.title,description:e.text,imageUrl:e.image_url||e.thumb_url,siteName:e.service_name})}Object.keys(r).length>0&&this.chat.getState().set(`slack:unfurls:${n.ts}`,r,3600*1e3).catch(e=>{this.logger.error(`Failed to cache unfurl metadata`,{error:e})})}async handleReactionEvent(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring reaction`);return}if(e.item.type!==`message`){this.logger.debug(`Ignoring reaction to non-message item`,{itemType:e.item.type});return}let n=e.item.ts;try{let t=(await this.client.conversations.replies(await this.withToken({channel:e.item.channel,ts:e.item.ts,limit:1}))).messages?.[0];t?.thread_ts&&(n=t.thread_ts)}catch(t){this.logger.warn(`Failed to resolve parent thread for reaction, using message ts`,{error:String(t),channel:e.item.channel,ts:e.item.ts})}let r=this.encodeThreadId({channel:e.item.channel,threadTs:n}),i=e.item.ts,a=e.reaction,o=M.fromSlack(a),s=this.requestContext.getStore(),c=s?.botUserId&&e.user===s.botUserId||this._botUserId!==null&&e.user===this._botUserId||this._botId!==null&&e.user===this._botId,l={emoji:o,rawEmoji:a,added:e.type===`reaction_added`,user:{userId:e.user,userName:e.user,fullName:e.user,isBot:!1,isMe:c},messageId:i,threadId:r,raw:e};this.chat.processReaction({...l,adapter:this},t)}handleAssistantThreadStarted(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring assistant_thread_started`);return}if(!e.assistant_thread){this.logger.warn(`Malformed assistant_thread_started: missing assistant_thread`);return}let{channel_id:n,thread_ts:r,user_id:i,context:a}=e.assistant_thread,o=this.encodeThreadId({channel:n,threadTs:r});this.chat.processAssistantThreadStarted({threadId:o,userId:i,channelId:n,threadTs:r,context:{channelId:a.channel_id,teamId:a.team_id,enterpriseId:a.enterprise_id,threadEntryPoint:a.thread_entry_point,forceSearch:a.force_search},adapter:this},t)}handleAssistantContextChanged(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring assistant_thread_context_changed`);return}if(!e.assistant_thread){this.logger.warn(`Malformed assistant_thread_context_changed: missing assistant_thread`);return}let{channel_id:n,thread_ts:r,user_id:i,context:a}=e.assistant_thread,o=this.encodeThreadId({channel:n,threadTs:r});this.chat.processAssistantContextChanged({threadId:o,userId:i,channelId:n,threadTs:r,context:{channelId:a.channel_id,teamId:a.team_id,enterpriseId:a.enterprise_id,threadEntryPoint:a.thread_entry_point,forceSearch:a.force_search},adapter:this},t)}handleAppHomeOpened(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring app_home_opened`);return}this.chat.processAppHomeOpened({userId:e.user,channelId:e.channel,adapter:this},t)}handleMemberJoinedChannel(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring member_joined_channel`);return}this.chat.processMemberJoinedChannel({userId:e.user,channelId:this.encodeThreadId({channel:e.channel,threadTs:``}),inviterId:e.inviter,adapter:this},t)}async handleUserChange(e){if(this.chat)try{await this.chat.getState().delete(`slack:user:${e.user.id}`)}catch(t){this.logger.warn(`Failed to invalidate user cache`,{userId:e.user.id,error:t})}}async publishHomeView(e,t){await this.client.views.publish(await this.withToken({user_id:e,view:t}))}async setSuggestedPrompts(e,t,n,r){await this.client.assistant.threads.setSuggestedPrompts(await this.withToken({channel_id:e,thread_ts:t,prompts:n,title:r}))}async setAssistantStatus(e,t,n,r){await this.client.assistant.threads.setStatus(await this.withToken({channel_id:e,thread_ts:t,status:n,...r&&{loading_messages:r}}))}async setAssistantTitle(e,t,n){await this.client.assistant.threads.setTitle(await this.withToken({channel_id:e,thread_ts:t,title:n}))}async resolveInlineMentions(e,t){let n=new Set,r=new Set;for(let t of e.split(`<`)){let e=t.indexOf(`>`);if(e===-1)continue;let i=t.slice(0,e);if(i.startsWith(`@`)){let e=i.slice(1),t=e.indexOf(`|`),r=t>=0?e.slice(0,t):e;Lr.test(r)&&n.add(r)}else if(i.startsWith(`#`)){let e=i.slice(1);e.indexOf(`|`)===-1&&Lr.test(e)&&r.add(e)}}if(n.size===0&&r.size===0)return e;let i=this.botUserId;if(t&&i&&n.delete(i),n.size===0&&r.size===0)return e;let[a,o]=await Promise.all([Promise.all([...n].map(async e=>[e,(await this.lookupUser(e))?.displayName??e])),Promise.all([...r].map(async e=>[e,await this.lookupChannel(e)]))]),s=new Map(a),c=new Map(o),l=``,u=e,d=Vr(u);for(;d!==-1;){l+=u.slice(0,d),u=u.slice(d);let e=u.indexOf(`>`);if(e===-1)break;let t=u[1],n=u.slice(2,e),r=n.indexOf(`|`),i=r>=0?n.slice(0,r):n;if(t===`@`&&Lr.test(i)){let e=s.get(i);l+=e?`<@${i}|${e}>`:`<@${i}>`}else if(t===`#`&&r===-1&&c.has(i)){let e=c.get(i);l+=`<#${i}|${e}>`}else l+=u.slice(0,e+1);u=u.slice(e+1),d=Vr(u)}return l+u}extractLinks(e){let t=new Set;if(e.blocks){for(let n of e.blocks)if(n.type===`rich_text`&&n.elements){for(let e of n.elements)if(e.elements)for(let n of e.elements)n.type===`link`&&n.url&&t.add(n.url)}}if(t.size===0&&e.text)for(let n of e.text.matchAll(/<(https?:\/\/[^>]+)>/g)){let e=n[1],r=e.indexOf(`|`);t.add(r>=0?e.slice(0,r):e)}let n=new Map;if(e.attachments)for(let r of e.attachments){let e=r.from_url||r.original_url;e&&(r.title||r.text)&&(n.set(e,{title:r.title,description:r.text,imageUrl:r.image_url||r.thumb_url,siteName:r.service_name}),t.add(e))}return[...t].map(e=>{let t=this.createLinkPreview(e),r=n.get(e)||n.get(e.replace(Hr,``))||n.get(`${e}/`);return r?{...t,...r}:t})}createLinkPreview(e){let t=Gr.exec(e);if(!t)return{url:e};let n=t[1],r=t[2],i=`${r.slice(0,r.length-6)}.${r.slice(r.length-6)}`,a=this.encodeThreadId({channel:n,threadTs:i});return{url:e,fetchMessage:async()=>{let t=((await this.client.conversations.history(await this.withToken({channel:n,latest:i,inclusive:!0,limit:1}))).messages||[]).find(e=>e.ts===i);if(!t)throw Error(`Message not found: ${e}`);return this.parseSlackMessage(t,a)}}}async parseSlackMessage(t,n,r){let i=this.isMessageFromSelf(t),a=r?.skipSelfMention??!0,o=t.text||``,s=t.username||`unknown`,c=t.username||`unknown`;if(t.user&&!t.username){let e=await this.lookupUser(t.user);s=e?.displayName??t.user,c=e?.realName??s}if(t.user&&this.chat)try{let r=`slack:thread-participants:${n}`;(await this.chat.getState().getList(r)).includes(t.user)||await this.chat.getState().appendToList(r,t.user,{maxLength:100,ttlMs:e.REVERSE_INDEX_TTL_MS})}catch(e){this.logger.warn(`Failed to track thread participant`,{threadId:n,userId:t.user,error:e})}let l=await this.resolveInlineMentions(o,a);return new j({id:t.ts||``,threadId:n,text:this.formatConverter.extractPlainText(l),formatted:this.formatConverter.toAst(l),raw:t,author:{userId:t.user||t.bot_id||`unknown`,userName:s,fullName:c,isBot:!!t.bot_id,isMe:i},metadata:{dateSent:new Date(Number.parseFloat(t.ts||`0`)*1e3),edited:!!t.edited,editedAt:t.edited?new Date(Number.parseFloat(t.edited.ts)*1e3):void 0},attachments:(t.files||[]).map(e=>this.createAttachment(e,t.team_id??t.team)),links:await this.enrichLinks(this.extractLinks(t),t.ts)})}async enrichLinks(e,t){if(!(this.chat&&t)||e.length===0||e.every(e=>e.title||e.fetchMessage))return e;let n=Date.now()+Ur,r=this.chat.getState(),i=null;for(;;){try{i=await r.get(`slack:unfurls:${t}`)}catch{return e}if(i||Date.now()>=n)break;await new Promise(e=>setTimeout(e,Wr))}return i?e.map(e=>{if(e.title)return e;let t=i[e.url]||i[e.url.replace(Hr,``)]||i[`${e.url}/`];return t?{...e,...t}:e}):e}createAttachment(e,t){let n=e.url_private,r=this.requestContext.getStore()?.token,i=`file`;e.mimetype?.startsWith(`image/`)?i=`image`:e.mimetype?.startsWith(`video/`)?i=`video`:e.mimetype?.startsWith(`audio/`)&&(i=`audio`);let a={};return n&&(a.url=n),t&&(a.teamId=t),{type:i,url:n,name:e.name,mimeType:e.mimetype,size:e.size,width:e.original_w,height:e.original_h,fetchMetadata:Object.keys(a).length>0?a:void 0,fetchData:n?async()=>this.fetchSlackFile(n,r??await this.getToken()):void 0}}async fetchSlackFile(e,t){let n=await fetch(e,{headers:{Authorization:`Bearer ${t}`}});if(!n.ok)throw new W(`slack`,`Failed to fetch file: ${n.status} ${n.statusText}`);if((n.headers.get(`content-type`)??``).includes(`text/html`))throw new W(`slack`,`Failed to download file from Slack: received HTML login page instead of file data. Ensure your Slack app has the "files:read" OAuth scope. URL: ${e}`);let r=await n.arrayBuffer();return Buffer.from(r)}rehydrateAttachment(e){let t=e.fetchMetadata?.url??e.url,n=e.fetchMetadata?.teamId;return t?{...e,fetchData:async()=>{let e;if(n){let t=await this.getInstallation(n);if(!t)throw new H(`slack`,`Installation not found for team ${n}`);e=t.botToken}else e=await this.getToken();return this.fetchSlackFile(t,e)}}:e}async resolveOutgoingMentions(e,t){if(!this.chat)return e;let n=this.chat.getState(),r=/@(\w+)/g,i=new Map;for(let t of e.matchAll(r)){let n=t[1];if(Rr.test(n))continue;let r=t.index;r>0&&e[r-1]===`<`||i.has(n.toLowerCase())||i.set(n.toLowerCase(),[])}if(i.size===0)return e;for(let e of i.keys()){let t=await n.getList(`slack:user-by-name:${e}`),r=[...new Set(t)];i.set(e,r)}let a=null;if([...i.values()].some(e=>e.length>1)){let e=await n.getList(`slack:thread-participants:${t}`);a=new Set(e)}return e.replace(r,(t,n,r)=>{if(r>0&&e[r-1]===`<`||Rr.test(n))return t;let o=i.get(n.toLowerCase());if(!o||o.length===0)return t;if(o.length===1)return`<@${o[0]}>`;if(a){let e=o.filter(e=>a.has(e));if(e.length===1)return`<@${e[0]}>`}return t})}async resolveMessageMentions(e,t){if(!this.chat)return e;if(typeof e==`string`)return this.resolveOutgoingMentions(e,t);if(typeof e==`object`&&e){if(`raw`in e&&typeof e.raw==`string`)return{...e,raw:await this.resolveOutgoingMentions(e.raw,t)};if(`markdown`in e&&typeof e.markdown==`string`)return{...e,markdown:await this.resolveOutgoingMentions(e.markdown,t)}}return e}async postMessage(e,t){let n=await this.resolveMessageMentions(t,e),{channel:r,threadTs:i}=this.decodeThreadId(e),a=i||void 0;try{let t=B(n);if(t.length>0){await this.uploadFiles(t,r,a);let i=typeof n==`string`||typeof n==`object`&&!!n&&(`raw`in n&&n.raw||`markdown`in n&&n.markdown||`ast`in n&&n.ast),o=z(n);if(!(i||o))return{id:`file-${Date.now()}`,threadId:e,raw:{files:t}}}let i=z(n);if(i){let t=fr(i),n=Tr(i);this.logger.debug(`Slack API: chat.postMessage (blocks)`,{channel:r,threadTs:a,blockCount:t.length});let o=await this.client.chat.postMessage(await this.withToken({channel:r,thread_ts:a,text:n,blocks:t,unfurl_links:!1,unfurl_media:!1}));return this.logger.debug(`Slack API: chat.postMessage response`,{messageId:o.ts,ok:o.ok}),{id:o.ts,threadId:e,raw:o}}let o=this.formatConverter.toSlackPayload(n);this.logger.debug(`Slack API: chat.postMessage`,{channel:r,threadTs:a,payloadKey:`markdown_text`in o?`markdown_text`:`text`});let s=await this.client.chat.postMessage(await this.withToken({channel:r,thread_ts:a,...o,unfurl_links:!1,unfurl_media:!1}));return this.logger.debug(`Slack API: chat.postMessage response`,{messageId:s.ts,ok:s.ok}),{id:s.ts,threadId:e,raw:s}}catch(e){this.handleSlackError(e)}}async postEphemeral(e,t,n){let r=await this.resolveMessageMentions(n,e),{channel:i,threadTs:a}=this.decodeThreadId(e),o=a||void 0;try{let n=z(r);if(n){let r=fr(n),a=Tr(n);this.logger.debug(`Slack API: chat.postEphemeral (blocks)`,{channel:i,threadTs:o,userId:t,blockCount:r.length});let s=await this.client.chat.postEphemeral(await this.withToken({channel:i,thread_ts:o,user:t,text:a,blocks:r}));return this.logger.debug(`Slack API: chat.postEphemeral response`,{messageTs:s.message_ts,ok:s.ok}),{id:s.message_ts||``,threadId:e,usedFallback:!1,raw:s}}let a=this.formatConverter.toSlackPayload(r);this.logger.debug(`Slack API: chat.postEphemeral`,{channel:i,threadTs:o,userId:t,payloadKey:`markdown_text`in a?`markdown_text`:`text`});let s=await this.client.chat.postEphemeral(await this.withToken({channel:i,thread_ts:o,user:t,...a}));return this.logger.debug(`Slack API: chat.postEphemeral response`,{messageTs:s.message_ts,ok:s.ok}),{id:s.message_ts||``,threadId:e,usedFallback:!1,raw:s}}catch(e){this.handleSlackError(e)}}async scheduleMessage(e,t,n){let r=await this.resolveMessageMentions(t,e),{channel:i,threadTs:a}=this.decodeThreadId(e),o=a||void 0,s=Math.floor(n.postAt.getTime()/1e3);if(s<=Math.floor(Date.now()/1e3))throw new U(`slack`,`postAt must be in the future`);if(B(r).length>0)throw new U(`slack`,`File uploads are not supported in scheduled messages`);let c=this.requestContext.getStore()?.token,l=c?()=>Promise.resolve(c):()=>this.getToken(),u=c??await this.getToken();try{let e=z(r);if(e){let t=fr(e),r=Tr(e);this.logger.debug(`Slack API: chat.scheduleMessage (blocks)`,{channel:i,threadTs:o,postAt:s,blockCount:t.length});let a=await this.client.chat.scheduleMessage({token:u,channel:i,thread_ts:o,post_at:s,text:r,blocks:t,unfurl_links:!1,unfurl_media:!1}),c=a.scheduled_message_id,d=this;return{scheduledMessageId:c,channelId:i,postAt:n.postAt,raw:a,async cancel(){await d.client.chat.deleteScheduledMessage({token:await l(),channel:i,scheduled_message_id:c})}}}let t=this.formatConverter.toSlackPayload(r);this.logger.debug(`Slack API: chat.scheduleMessage`,{channel:i,threadTs:o,postAt:s,payloadKey:`markdown_text`in t?`markdown_text`:`text`});let a=await this.client.chat.scheduleMessage({token:u,channel:i,thread_ts:o,post_at:s,...t,unfurl_links:!1,unfurl_media:!1}),c=a.scheduled_message_id,d=this;return{scheduledMessageId:c,channelId:i,postAt:n.postAt,raw:a,async cancel(){await d.client.chat.deleteScheduledMessage({token:await l(),channel:i,scheduled_message_id:c})}}}catch(e){this.handleSlackError(e)}}async openModal(e,t,n){let r=Ar(t,Or({contextId:n,privateMetadata:t.privateMetadata}));this.logger.debug(`Slack API: views.open`,{triggerId:e,callbackId:t.callbackId});try{let t=await this.client.views.open(await this.withToken({trigger_id:e,view:r}));return this.logger.debug(`Slack API: views.open response`,{viewId:t.view?.id,ok:t.ok}),{viewId:t.view?.id}}catch(e){this.handleSlackError(e)}}async updateModal(e,t){let n=Ar(t);this.logger.debug(`Slack API: views.update`,{viewId:e,callbackId:t.callbackId});try{let t=await this.client.views.update(await this.withToken({view_id:e,view:n}));return this.logger.debug(`Slack API: views.update response`,{viewId:t.view?.id,ok:t.ok}),{viewId:t.view?.id}}catch(e){this.handleSlackError(e)}}async uploadFiles(e,t,n){let r=(await Promise.all(e.map(async e=>{try{let t=await te(e.data,{platform:`slack`});return t?{file:t,filename:e.filename}:null}catch(t){return this.logger.error(`Failed to convert file to buffer`,{filename:e.filename,error:t}),null}}))).filter(e=>e!==null);if(r.length===0)return[];this.logger.debug(`Slack API: files.uploadV2 (batch)`,{fileCount:r.length,filenames:r.map(e=>e.filename)});let i={channel_id:t,file_uploads:r};n&&(i.thread_ts=n),i.token=await this.getToken();let a=await this.client.files.uploadV2(i);this.logger.debug(`Slack API: files.uploadV2 response`,{ok:a.ok});let o=[];if(a.files?.[0]?.files)for(let e of a.files[0].files)e.id&&o.push(e.id);return o}async editMessage(e,t,n){let r=await this.resolveMessageMentions(n,e),i=this.decodeEphemeralMessageId(t);if(i){let{threadTs:t}=this.decodeThreadId(e),n=await this.sendToResponseUrl(i.responseUrl,`replace`,{message:r,threadTs:t});return{id:i.messageTs,threadId:e,raw:{ephemeral:!0,...n}}}let{channel:a}=this.decodeThreadId(e);try{let n=z(r);if(n){let r=fr(n),i=Tr(n);this.logger.debug(`Slack API: chat.update (blocks)`,{channel:a,messageId:t,blockCount:r.length});let o=await this.client.chat.update(await this.withToken({channel:a,ts:t,text:i,blocks:r}));return this.logger.debug(`Slack API: chat.update response`,{messageId:o.ts,ok:o.ok}),{id:o.ts,threadId:e,raw:o}}let i=this.formatConverter.toSlackPayload(r);this.logger.debug(`Slack API: chat.update`,{channel:a,messageId:t,payloadKey:`markdown_text`in i?`markdown_text`:`text`});let o=await this.client.chat.update(await this.withToken({channel:a,ts:t,...i}));return this.logger.debug(`Slack API: chat.update response`,{messageId:o.ts,ok:o.ok}),{id:o.ts,threadId:e,raw:o}}catch(e){this.handleSlackError(e)}}async postObject(e,t,n){if(t!==`plan`)return this.postMessage(e,`[${t}]`);let r=n,{channel:i,threadTs:a}=this.decodeThreadId(e),o=this.renderPlanFallbackText(r),s=this.planToBlockKit(r);try{this.logger.debug(`Slack API: chat.postMessage (plan)`,{channel:i,threadTs:a,blockCount:s.length});let t=await this.client.chat.postMessage(await this.withToken({channel:i,thread_ts:a,text:o,blocks:s,unfurl_links:!1,unfurl_media:!1}));return{id:t.ts,threadId:e,raw:t}}catch(e){this.handleSlackError(e)}}async editObject(e,t,n,r){if(n!==`plan`)return this.editMessage(e,t,`[${n}]`);let i=r,{channel:a}=this.decodeThreadId(e),o=this.renderPlanFallbackText(i),s=this.planToBlockKit(i);try{this.logger.debug(`Slack API: chat.update (plan)`,{channel:a,messageId:t,blockCount:s.length});let n=await this.client.chat.update(await this.withToken({channel:a,ts:t,text:o,blocks:s}));return{id:n.ts,threadId:e,raw:n}}catch(e){this.handleSlackError(e)}}renderPlanFallbackText(e){let t=[];t.push(e.title||`Plan`);for(let n of e.tasks)t.push(`- (${n.status}) ${n.title}`);return t.join(`
|
|
45
|
+
${o(e)}
|
|
46
|
+
\`\`\``:this.defaultNodeToText(e,e=>this.nodeToMrkdwn(e))}};function jr(e){if(e.contextId||e.privateMetadata)return JSON.stringify({c:e.contextId,m:e.privateMetadata})}function Mr(e){if(!e)return{};try{let t=JSON.parse(e);if(typeof t==`object`&&t&&(`c`in t||`m`in t))return{contextId:t.c||void 0,privateMetadata:t.m||void 0}}catch{}return{contextId:e}}function Nr(e,t){return{type:`modal`,callback_id:e.callbackId,title:{type:`plain_text`,text:e.title.slice(0,24)},submit:e.submitLabel?{type:`plain_text`,text:e.submitLabel}:{type:`plain_text`,text:`Submit`},close:e.closeLabel?{type:`plain_text`,text:e.closeLabel}:{type:`plain_text`,text:`Cancel`},notify_on_close:e.notifyOnClose,private_metadata:t,blocks:e.children.map(Pr)}}function Pr(e){switch(e.type){case`text_input`:return Ir(e);case`select`:return Lr(e);case`external_select`:return Rr(e);case`radio_select`:return zr(e);case`text`:return vr(e);case`fields`:return Or(e);default:throw Error(`Unknown modal child type: ${e.type}`)}}function Fr(e){return{text:{type:`plain_text`,text:e.label},value:e.value,...e.description?{description:{type:`plain_text`,text:e.description}}:{}}}function Ir(e){let t={type:`plain_text_input`,action_id:e.id,multiline:e.multiline??!1};return e.placeholder&&(t.placeholder={type:`plain_text`,text:e.placeholder}),e.initialValue&&(t.initial_value=e.initialValue),e.maxLength&&(t.max_length=e.maxLength),{type:`input`,block_id:e.id,optional:e.optional??!1,label:{type:`plain_text`,text:e.label},element:t}}function Lr(e){let t=e.options.map(Fr),n={type:`static_select`,action_id:e.id,options:t};if(e.placeholder&&(n.placeholder={type:`plain_text`,text:e.placeholder}),e.initialOption){let r=t.find(t=>t.value===e.initialOption);r&&(n.initial_option=r)}return{type:`input`,block_id:e.id,optional:e.optional??!1,label:{type:`plain_text`,text:e.label},element:n}}function Rr(e){let t={type:`external_select`,action_id:e.id};return e.placeholder&&(t.placeholder={type:`plain_text`,text:e.placeholder}),e.minQueryLength!==void 0&&(t.min_query_length=e.minQueryLength),e.initialOption&&(t.initial_option=Fr(e.initialOption)),{type:`input`,block_id:e.id,optional:e.optional??!1,label:{type:`plain_text`,text:e.label},element:t}}function zr(e){let t=e.options.slice(0,10).map(e=>{let t={text:{type:`mrkdwn`,text:e.label},value:e.value};return e.description&&(t.description={type:`mrkdwn`,text:e.description}),t}),n={type:`radio_buttons`,action_id:e.id,options:t};if(e.initialOption){let r=t.find(t=>t.value===e.initialOption);r&&(n.initial_option=r)}return{type:`input`,block_id:e.id,optional:e.optional??!1,label:{type:`plain_text`,text:e.label},element:n}}var Br=/^[A-Z0-9_]+$/,Vr=/^U[A-Z0-9]+$/,Hr=2500;function Ur(e,t){let n=Buffer.from(e,`utf8`),r=Buffer.from(t,`utf8`);return n.length===r.length?R(n,r):!1}function Wr(e){let t=e.indexOf(`<@`),n=e.indexOf(`<#`);return t===-1?n:n===-1?t:Math.min(t,n)}var Gr=/\/$/,Kr=2e3,qr=150,Jr=/^https?:\/\/[^/]+\.slack\.com\/archives\/([A-Z0-9]+)\/p(\d+)(?:\?.*)?$/;function Yr(e){if(e!==void 0)return typeof e==`function`?e:()=>e}var Xr=class e{name=`slack`;userName;_client;tokenClientCache=new Map;slackApiUrl;signingSecret;webhookVerifier;defaultBotTokenProvider;chat=null;logger;_botUserId=null;_botId=null;formatConverter=new Ar;static USER_CACHE_TTL_MS=11520*60*1e3;static CHANNEL_CACHE_TTL_MS=11520*60*1e3;static REVERSE_INDEX_TTL_MS=11520*60*1e3;_externalChannels=new Set;appToken;mode;socketForwardingSecret;socketClient=null;clientId;clientSecret;encryptionKey;installationKeyPrefix;installationProvider;requestContext=new F;get botUserId(){let e=this.requestContext.getStore();return e?.botUserId?e.botUserId:this._botUserId||void 0}get isSocketMode(){return this.mode===`socket`}get webClient(){let e=this.requestContext.getStore();if(e?.token)return this.getClientForToken(e.token);if(this.defaultBotTokenProvider){let e=this.defaultBotTokenProvider();if(typeof e==`string`)return this.getClientForToken(e);throw new H(`slack`,"botToken is configured as an async resolver and cannot be resolved synchronously for `.webClient`. Wrap the work in `adapter.withBotToken(token, () => adapter.webClient...)` after awaiting the token.")}throw new H(`slack`,"No bot token available. In multi-workspace mode, ensure the webhook is being processed or use `adapter.withBotToken(token, fn)` to bind a token explicitly.")}get client(){return this.webClient}getClientForToken(e){let t=this.tokenClientCache.get(e);return t||(t=new mr.WebClient(e,{...this.slackApiUrl?{slackApiUrl:this.slackApiUrl}:{}}),this.tokenClientCache.set(e,t)),t}constructor(e={}){let t=e.webhookVerifier,n=t?void 0:e.signingSecret??process.env.SLACK_SIGNING_SECRET;if(!(n||t)&&(e.mode??`webhook`)===`webhook`)throw new U(`slack`,`signingSecret or webhookVerifier is required for webhook mode. Set SLACK_SIGNING_SECRET, provide signingSecret in config, or provide a webhookVerifier.`);let r=!(e.signingSecret||e.botToken||e.clientId||e.clientSecret),i=Yr(e.botToken??(r?process.env.SLACK_BOT_TOKEN:void 0));this.slackApiUrl=e.apiUrl??process.env.SLACK_API_URL,this._client=new mr.WebClient(void 0,{...this.slackApiUrl?{slackApiUrl:this.slackApiUrl}:{}}),this.signingSecret=n,this.webhookVerifier=t,this.defaultBotTokenProvider=i,this.logger=e.logger??new C(`info`).child(`slack`),this.userName=e.userName||`bot`,this._botUserId=e.botUserId||null,this.appToken=e.appToken,this.mode=e.mode??`webhook`,this.socketForwardingSecret=e.socketForwardingSecret??e.appToken,this.clientId=e.clientId??(r?process.env.SLACK_CLIENT_ID:void 0),this.clientSecret=e.clientSecret??(r?process.env.SLACK_CLIENT_SECRET:void 0),this.installationKeyPrefix=e.installationKeyPrefix??`slack:installation`;let a=e.encryptionKey??process.env.SLACK_ENCRYPTION_KEY;a&&(this.encryptionKey=fe(a)),this.installationProvider=e.installationProvider}async getToken(){let e=this.requestContext.getStore();if(e?.token)return e.token;if(this.defaultBotTokenProvider)return await this.defaultBotTokenProvider();throw new H(`slack`,`No bot token available. In multi-workspace mode, ensure the webhook is being processed.`)}async withToken(e){return{...e,token:await this.getToken()}}async initialize(e){if(this.chat=e,this.defaultBotTokenProvider&&!this._botUserId)try{let e=await this._client.auth.test(await this.withToken({}));this._botUserId=e.user_id,this._botId=e.bot_id||null,e.user&&(this.userName=e.user),this.logger.info(`Slack auth completed`,{botUserId:this._botUserId,botId:this._botId})}catch(e){this.logger.warn(`Could not fetch bot user ID`,{error:e})}this.defaultBotTokenProvider||this.logger.info(`Slack adapter initialized in multi-workspace mode`),this.mode===`socket`&&await this.startSocketMode()}installationKey(e){return`${this.installationKeyPrefix}:${e}`}async setInstallation(e,t){if(!this.chat)throw new U(`slack`,`Adapter not initialized. Ensure chat.initialize() has been called first.`);let n=this.chat.getState(),r=this.installationKey(e),i=this.encryptionKey?{...t,botToken:le(t.botToken,this.encryptionKey)}:t;await n.set(r,i),this.logger.info(`Slack installation saved`,{teamId:e,teamName:t.teamName})}async getInstallation(e){if(!this.chat)throw new U(`slack`,`Adapter not initialized. Ensure chat.initialize() has been called first.`);let t=this.chat.getState(),n=this.installationKey(e),r=await t.get(n);return r?this.encryptionKey&&de(r.botToken)?{...r,botToken:ue(r.botToken,this.encryptionKey)}:r:null}async handleOAuthCallback(e,t){if(!(this.clientId&&this.clientSecret))throw new U(`slack`,`clientId and clientSecret are required for OAuth. Pass them in createSlackAdapter().`);let n=new URL(e.url),r=n.searchParams.get(`code`);if(!r)throw new U(`slack`,`Missing 'code' query parameter in OAuth callback request.`);let i=t?.redirectUri??n.searchParams.get(`redirect_uri`)??void 0,a=await this._client.oauth.v2.access({client_id:this.clientId,client_secret:this.clientSecret,code:r,...i?{redirect_uri:i}:{}});if(!(a.ok&&a.access_token&&a.team?.id))throw new H(`slack`,`Slack OAuth failed: ${a.error||`missing access_token or team.id`}`);let o=a.team.id,s={botToken:a.access_token,botUserId:a.bot_user_id,teamName:a.team.name};return await this.setInstallation(o,s),{teamId:o,installation:s}}async deleteInstallation(e){if(!this.chat)throw new U(`slack`,`Adapter not initialized. Ensure chat.initialize() has been called first.`);await this.chat.getState().delete(this.installationKey(e)),this.logger.info(`Slack installation deleted`,{teamId:e})}withBotToken(e,t){return this.requestContext.run({token:e},t)}async resolveTokenForTeam(e,t=!1){try{if(this.installationProvider){let n=await this.installationProvider.getInstallation(e,t);return n?{token:n.botToken,botUserId:n.botUserId}:(this.logger.warn(`No installation found from provider`,{installationId:e,isEnterpriseInstall:t}),null)}let n=await this.getInstallation(e);return n?{token:n.botToken,botUserId:n.botUserId}:(this.logger.warn(`No installation found for team`,{installationId:e,isEnterpriseInstall:t}),null)}catch(n){return this.logger.error(`Failed to resolve token for team`,{installationId:e,isEnterpriseInstall:t,error:n}),null}}extractInstallationFromInteractive(e){try{let t=new URLSearchParams(e).get(`payload`);if(!t)return null;let n=JSON.parse(t),r=!!n.is_enterprise_install,i=n.enterprise?.id||n.enterprise_id||void 0,a=n.team?.id||n.team_id||void 0,o=r?i:a;return o?{installationId:o,isEnterpriseInstall:r,enterpriseId:i}:null}catch{return null}}async lookupUser(t){let n=`slack:user:${t}`;if(this.chat){let e=await this.chat.getState().get(n);if(e)return e}try{let r=(await this._client.users.info(await this.withToken({user:t}))).user,i=r?.profile?.display_name||r?.profile?.real_name||r?.real_name||r?.name||t,a=r?.real_name||r?.profile?.real_name||i,o={avatarUrl:r?.profile?.image_192,displayName:i,email:r?.profile?.email,isBot:r?.is_bot,realName:a};if(this.chat){await this.chat.getState().set(n,o,e.USER_CACHE_TTL_MS);let r=`slack:user-by-name:${i.toLowerCase()}`;(await this.chat.getState().getList(r)).includes(t)||await this.chat.getState().appendToList(r,t,{maxLength:50,ttlMs:e.REVERSE_INDEX_TTL_MS})}return this.logger.debug(`Fetched user info`,{userId:t,displayName:i,realName:a}),o}catch(e){return this.logger.warn(`Could not fetch user info`,{userId:t,error:e}),null}}async lookupChannel(t){let n=`slack:channel:${t}`;if(this.chat){let e=await this.chat.getState().get(n);if(e)return e.name}try{let r=(await this._client.conversations.info(await this.withToken({channel:t}))).channel?.name||t;return this.chat&&await this.chat.getState().set(n,{name:r},e.CHANNEL_CACHE_TTL_MS),this.logger.debug(`Fetched channel info`,{channelId:t,name:r}),r}catch(e){return this.logger.warn(`Could not fetch channel info`,{channelId:t,error:e}),t}}async getUser(e){try{let t=await this.lookupUser(e);return t?{avatarUrl:t.avatarUrl,email:t.email,fullName:t.realName,isBot:t.isBot??!1,userId:e,userName:t.displayName}:null}catch{return null}}async handleWebhook(e,t){let n=e.headers.get(`x-slack-socket-token`);if(n){if(!(this.socketForwardingSecret&&Ur(n,this.socketForwardingSecret)))return this.logger.warn(`Invalid socket forwarding token`),new Response(`Invalid socket token`,{status:401});this.logger.info(`Slack forwarded socket event received`);try{let n=await e.text(),r=JSON.parse(n);return await this.routeSocketEvent(r.body,r.eventType,async()=>{},t),new Response(`ok`,{status:200})}catch{return new Response(`Invalid JSON`,{status:400})}}if(this.mode===`socket`)return new Response(`Webhooks are disabled in socket mode`,{status:405});let r=await e.text();if(this.logger.debug(`Slack webhook raw body`,{body:r}),this.webhookVerifier)try{let t=await this.webhookVerifier(e,r);if(!t)return this.logger.warn(`Webhook verifier rejected request`),new Response(`Invalid signature`,{status:401});typeof t==`string`&&(r=t)}catch(e){return this.logger.warn(`Webhook verifier rejected request`,{error:e}),new Response(`Invalid signature`,{status:401})}else{let t=e.headers.get(`x-slack-request-timestamp`),n=e.headers.get(`x-slack-signature`);if(!this.verifySignature(r,t,n))return new Response(`Invalid signature`,{status:401})}if((e.headers.get(`content-type`)||``).includes(`application/x-www-form-urlencoded`)){let e=new URLSearchParams(r);if(e.has(`command`)&&!e.has(`payload`)){if(!this.defaultBotTokenProvider){let n=e.get(`is_enterprise_install`)===`true`,r=n?e.get(`enterprise_id`):e.get(`team_id`);if(r){let i=await this.resolveTokenForTeam(r,n);if(i)return this.requestContext.run({...i,enterpriseId:e.get(`enterprise_id`)??void 0,isEnterpriseInstall:n},()=>this.handleSlashCommand(e,t));this.logger.warn(`Could not resolve token for slash command`,{installationId:r,isEnterpriseInstall:n})}}return this.handleSlashCommand(e,t)}if(!this.defaultBotTokenProvider){let e=this.extractInstallationFromInteractive(r);if(e){let n=await this.resolveTokenForTeam(e.installationId,e.isEnterpriseInstall);if(n)return this.requestContext.run({...n,enterpriseId:e.enterpriseId,isEnterpriseInstall:e.isEnterpriseInstall},()=>this.handleInteractivePayload(r,t))}this.logger.warn(`Could not resolve token for interactive payload`)}return this.handleInteractivePayload(r,t)}let i;try{i=JSON.parse(r)}catch{return new Response(`Invalid JSON`,{status:400})}if(i.type===`url_verification`&&i.challenge)return Response.json({challenge:i.challenge});if(!this.defaultBotTokenProvider&&i.type===`event_callback`){let e=!!i.is_enterprise_install,n=e?i.enterprise_id:i.team_id;if(n){let r=await this.resolveTokenForTeam(n,e);return r?this.requestContext.run({...r,enterpriseId:i.enterprise_id,isEnterpriseInstall:e},()=>(this.processEventPayload(i,t),new Response(`ok`,{status:200}))):(this.logger.warn(`Could not resolve token for installation`,{installationId:n,isEnterpriseInstall:e}),new Response(`ok`,{status:200}))}}return this.processEventPayload(i,t),new Response(`ok`,{status:200})}processEventPayload(e,t){if(e.type===`event_callback`&&e.event){let n=e.event;if(e.is_ext_shared_channel){let e;`channel`in n?e=n.channel:`item`in n&&(e=n.item.channel),e&&this._externalChannels.add(e)}if(n.type===`message`||n.type===`app_mention`){let r=n;!(r.team||r.team_id)&&e.team_id&&(r.team_id=e.team_id),this.handleMessageEvent(r,t)}else if(n.type===`reaction_added`||n.type===`reaction_removed`){let e=this.handleReactionEvent(n,t);t?.waitUntil?.(e)}else n.type===`assistant_thread_started`?this.handleAssistantThreadStarted(n,t):n.type===`assistant_thread_context_changed`?this.handleAssistantContextChanged(n,t):n.type===`app_home_opened`&&n.tab===`home`?this.handleAppHomeOpened(n,t):n.type===`member_joined_channel`?this.handleMemberJoinedChannel(n,t):n.type===`user_change`&&this.handleUserChange(n)}}handleInteractivePayload(e,t){let n=new URLSearchParams(e).get(`payload`);if(!n)return new Response(`Missing payload`,{status:400});let r;try{r=JSON.parse(n)}catch{return new Response(`Invalid payload JSON`,{status:400})}return this.dispatchInteractivePayload(r,t)}dispatchInteractivePayload(e,t){switch(e.type){case`block_actions`:return this.handleBlockActions(e,t),new Response(``,{status:200});case`block_suggestion`:return this.handleBlockSuggestion(e,t);case`view_submission`:return this.handleViewSubmission(e,t);case`view_closed`:return this.handleViewClosed(e,t),new Response(``,{status:200});default:return new Response(``,{status:200})}}async handleSlashCommand(e,t){if(!this.chat)return this.logger.warn(`Chat instance not initialized, ignoring slash command`),new Response(``,{status:200});let n=e.get(`command`)||``,r=e.get(`text`)||``,i=e.get(`user_id`)||``,a=e.get(`channel_id`)||``,o=e.get(`trigger_id`)||void 0;this.logger.debug(`Processing Slack slash command`,{command:n,text:r,userId:i,channelId:a,triggerId:o});let s=await this.lookupUser(i),c={command:n,text:r,user:{userId:i,userName:s?.displayName??i,fullName:s?.realName??i,isBot:!1,isMe:!1},adapter:this,raw:Object.fromEntries(e),triggerId:o,channelId:a?`slack:${a}`:``};return this.chat.processSlashCommand(c,t),new Response(``,{status:200})}handleBlockActions(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring action`);return}let n=e.channel?.id||e.container?.channel_id,r=e.message?.ts||e.container?.message_ts,i=e.message?.thread_ts||e.container?.thread_ts||r;if(!(e.container?.type===`view`||n)){this.logger.warn(`Missing channel in block_actions`,{channel:n});return}let a=n&&(i||r)?this.encodeThreadId({channel:n,threadTs:i||r||``}):``,o=e.container?.is_ephemeral===!0,s=e.response_url,c=o&&s&&r?this.encodeEphemeralMessageId(r,s,e.user.id):r||``;for(let n of e.actions){let i=n.selected_option?.value??n.value,o={actionId:n.action_id,value:i,user:{userId:e.user.id,userName:e.user.username||e.user.name||`unknown`,fullName:e.user.name||e.user.username||`unknown`,isBot:!1,isMe:!1},messageId:c,threadId:a,adapter:this,raw:e,triggerId:e.trigger_id};this.logger.debug(`Processing Slack block action`,{actionId:n.action_id,value:n.value,messageId:r,threadId:a,triggerId:e.trigger_id}),this.chat.processAction(o,t)}}async handleBlockSuggestion(e,t){if(!this.chat)return this.logger.warn(`Chat instance not initialized, ignoring block suggestion`),this.optionsLoadResponse([]);let n=this.chat.processOptionsLoad({actionId:e.action_id,query:e.value??``,user:{userId:e.user.id,userName:e.user.username||e.user.name||e.user.id,fullName:e.user.name||e.user.username||e.user.id,isBot:!1,isMe:!1},adapter:this,raw:e},t),r=Symbol(`options_load_timeout`),i,a=new Promise(e=>{i=setTimeout(()=>e(r),Hr)}),o=await Promise.race([n,a]);return i&&clearTimeout(i),o===r?(this.logger.warn(`Options load handler timed out`,{actionId:e.action_id,timeoutMs:Hr}),n.catch(t=>this.logger.error(`Options load handler error after timeout`,{error:t,actionId:e.action_id})),this.optionsLoadResponse([])):this.optionsLoadResponse(o??[])}optionsLoadResponse(e){if(e.length>0&&`options`in e[0]&&Array.isArray(e[0].options)){let t=e.slice(0,100).map(e=>({label:{type:`plain_text`,text:e.label.slice(0,75)},options:e.options.slice(0,100).map(Fr)}));return new Response(JSON.stringify({option_groups:t}),{status:200,headers:{"Content-Type":`application/json`}})}let t=e.slice(0,100).map(Fr);return new Response(JSON.stringify({options:t}),{status:200,headers:{"Content-Type":`application/json`}})}async handleViewSubmission(e,t){if(!this.chat)return this.logger.warn(`Chat instance not initialized, ignoring view submission`),new Response(``,{status:200});let n={};for(let t of Object.values(e.view.state.values))for(let[e,r]of Object.entries(t))n[e]=r.value??r.selected_option?.value??``;let{contextId:r,privateMetadata:i}=Mr(e.view.private_metadata||void 0),a={callbackId:e.view.callback_id,viewId:e.view.id,values:n,privateMetadata:i,user:{userId:e.user.id,userName:e.user.username||e.user.name||`unknown`,fullName:e.user.name||e.user.username||`unknown`,isBot:!1,isMe:!1},adapter:this,raw:e},o=await this.chat.processModalSubmit(a,r,t);if(o){let e=this.modalResponseToSlack(o,r);return new Response(JSON.stringify(e),{status:200,headers:{"Content-Type":`application/json`}})}return new Response(``,{status:200})}handleViewClosed(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring view closed`);return}let{contextId:n,privateMetadata:r}=Mr(e.view.private_metadata||void 0),i={callbackId:e.view.callback_id,viewId:e.view.id,privateMetadata:r,user:{userId:e.user.id,userName:e.user.username||e.user.name||`unknown`,fullName:e.user.name||e.user.username||`unknown`,isBot:!1,isMe:!1},adapter:this,raw:e};this.chat.processModalClose(i,n,t)}modalResponseToSlack(e,t){switch(e.action){case`close`:return{};case`clear`:return{response_action:`clear`};case`errors`:return{response_action:`errors`,errors:e.errors};case`update`:{let n=this.convertModalJSX(e.modal);return{response_action:`update`,view:Nr(n,jr({contextId:t,privateMetadata:n.privateMetadata}))}}case`push`:{let n=this.convertModalJSX(e.modal);return{response_action:`push`,view:Nr(n,jr({contextId:t,privateMetadata:n.privateMetadata}))}}default:return{}}}convertModalJSX(e){if(E(e)){let t=f(e);if(!t)throw new U(`slack`,`Invalid JSX element: must be a Modal element`);return t}return e}async startSocketMode(){if(!this.appToken)throw new U(`slack`,`appToken is required for socket mode. Set SLACK_APP_TOKEN or provide it in config.`);this.socketClient=new pr.SocketModeClient({appToken:this.appToken}),this.socketClient.on(`slack_event`,async({ack:e,body:t,type:n,retry_num:r})=>{if(r&&r>0){await e(),this.logger.debug(`Skipping socket mode retry`,{retry_num:r});return}await this.routeSocketEvent(t,n,e)}),await this.socketClient.start(),this.logger.info(`Slack socket mode connected`)}async routeSocketEvent(e,t,n,r){let i=e=>{r?.waitUntil?r.waitUntil(e):e.catch(e=>{this.logger.error(`Error in socket mode async handler`,{error:e})})};switch(t){case`events_api`:{if(await n(),!e.event||typeof e.event!=`object`){this.logger.warn(`Socket mode events_api missing event field`,{body:e});break}let t={type:`event_callback`,event:e.event,team_id:e.team_id,event_id:e.event_id,event_time:e.event_time};try{this.processEventPayload(t,r)}catch(e){this.logger.error(`Error processing socket mode events_api`,{error:e})}break}case`slash_commands`:{await n();let t=new URLSearchParams;for(let[n,r]of Object.entries(e))typeof r==`string`&&t.set(n,r);i(this.handleSlashCommand(t,r));break}case`interactive`:{let t=e,i=this.dispatchInteractivePayload(t,r),a=i instanceof Promise?await i:i;await n(a.headers.get(`content-type`)?.includes(`application/json`)?await a.json():void 0);break}default:await n(),this.logger.debug(`Unhandled socket mode event type`,{type:t})}}async startSocketModeListener(e,t=18e4,n,r){if(!this.appToken)return new Response(`appToken is required for socket mode listener`,{status:500});if(!e.waitUntil)return new Response(`waitUntil not provided`,{status:500});this.logger.info(`Starting Slack socket mode listener`,{durationMs:t,webhookUrl:r?`configured`:`not configured`});let i=this.runSocketModeListener(t,n,r,e);return e.waitUntil(i),new Response(JSON.stringify({status:`listening`,durationMs:t,message:`Socket mode listener started, will run for ${t/1e3} seconds`}),{status:200,headers:{"Content-Type":`application/json`}})}async runSocketModeListener(e,t,n,r){let i=this.appToken,a=new pr.SocketModeClient({appToken:i}),o=!1;a.on(`slack_event`,async({ack:e,body:t,type:i,retry_num:a})=>{if(o)return;if(a&&a>0){await e(),this.logger.debug(`Skipping socket mode retry`,{retry_num:a});return}let s=i;n?(await e(),await this.forwardSocketEvent(n,{type:`socket_event`,eventType:s,body:t,timestamp:Date.now()})):await this.routeSocketEvent(t,s,e,r)});try{await a.start(),this.logger.info(`Slack socket mode listener connected`),await new Promise(n=>{let r=setTimeout(n,e);if(t){if(t.aborted){clearTimeout(r),n();return}t.addEventListener(`abort`,()=>{this.logger.info(`Slack socket mode listener received abort signal`),clearTimeout(r),n()},{once:!0})}}),this.logger.info(`Slack socket mode listener duration elapsed, disconnecting`)}catch(e){this.logger.error(`Slack socket mode listener error`,{error:String(e)})}finally{o=!0,await a.disconnect(),this.logger.info(`Slack socket mode listener stopped`)}}async forwardSocketEvent(e,t){try{this.logger.debug(`Forwarding socket event to webhook`,{type:t.body.type||`unknown`,webhookUrl:e});let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`,"x-slack-socket-token":this.socketForwardingSecret},body:JSON.stringify(t)});if(n.ok)this.logger.debug(`Socket event forwarded successfully`,{type:t.body.type||`unknown`});else{let e=await n.text();this.logger.error(`Failed to forward socket event`,{type:t.body.type||`unknown`,status:n.status,error:e})}}catch(e){this.logger.error(`Error forwarding socket event`,{type:t.body.type||`unknown`,error:String(e)})}}async disconnect(){this.socketClient&&(await this.socketClient.disconnect(),this.socketClient=null,this.logger.info(`Slack socket mode disconnected`))}verifySignature(e,t,n){if(!(t&&n&&this.signingSecret))return!1;let r=Math.floor(Date.now()/1e3);if(Math.abs(r-Number.parseInt(t,10))>300)return!1;let i=`v0:${t}:${e}`,a=`v0=`+L(`sha256`,this.signingSecret).update(i).digest(`hex`);try{return R(Buffer.from(n),Buffer.from(a))}catch{return!1}}handleMessageEvent(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring event`);return}let n=new Set([`message_deleted`,`message_replied`,`channel_join`,`channel_leave`,`channel_topic`,`channel_purpose`,`channel_name`,`channel_archive`,`channel_unarchive`,`group_join`,`group_leave`,`group_topic`,`group_purpose`,`group_name`,`group_archive`,`group_unarchive`,`ekm_access_denied`,`tombstone`]);if(e.subtype===`message_changed`){this.handleMessageChanged(e,t);return}if(e.subtype&&n.has(e.subtype)){this.logger.debug(`Ignoring message subtype`,{subtype:e.subtype});return}if(!(e.channel&&e.ts)){this.logger.debug(`Ignoring event without channel or ts`,{channel:e.channel,ts:e.ts});return}let r=e.channel_type===`im`?e.thread_ts||``:e.thread_ts||e.ts,i=this.encodeThreadId({channel:e.channel,threadTs:r}),a=e.type===`app_mention`;this.chat.processMessage(this,i,async()=>{let t=await this.parseSlackMessage(e,i);return a&&(t.isMention=!0),t},t)}handleMessageChanged(e,t){let n=e.message;if(!(n&&e.channel))return;if(!n.attachments?.some(e=>e.from_url||e.original_url)){this.logger.debug(`Ignoring message_changed without unfurl data`);return}if(this.logger.debug(`Processing message_changed for link unfurls`,{channel:e.channel,ts:n.ts,attachmentCount:n.attachments?.length}),!(this.chat&&n.ts&&n.attachments))return;let r={};for(let e of n.attachments){let t=e.from_url||e.original_url;t&&(e.title||e.text)&&(r[t]={title:e.title,description:e.text,imageUrl:e.image_url||e.thumb_url,siteName:e.service_name})}Object.keys(r).length>0&&this.chat.getState().set(`slack:unfurls:${n.ts}`,r,3600*1e3).catch(e=>{this.logger.error(`Failed to cache unfurl metadata`,{error:e})})}async handleReactionEvent(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring reaction`);return}if(e.item.type!==`message`){this.logger.debug(`Ignoring reaction to non-message item`,{itemType:e.item.type});return}let n=e.item.ts;try{let t=(await this._client.conversations.replies(await this.withToken({channel:e.item.channel,ts:e.item.ts,limit:1}))).messages?.[0];t?.thread_ts&&(n=t.thread_ts)}catch(t){this.logger.warn(`Failed to resolve parent thread for reaction, using message ts`,{error:String(t),channel:e.item.channel,ts:e.item.ts})}let r=this.encodeThreadId({channel:e.item.channel,threadTs:n}),i=e.item.ts,a=e.reaction,o=M.fromSlack(a),s=this.requestContext.getStore(),c=s?.botUserId&&e.user===s.botUserId||this._botUserId!==null&&e.user===this._botUserId||this._botId!==null&&e.user===this._botId,l={emoji:o,rawEmoji:a,added:e.type===`reaction_added`,user:{userId:e.user,userName:e.user,fullName:e.user,isBot:!1,isMe:c},messageId:i,threadId:r,raw:e};this.chat.processReaction({...l,adapter:this},t)}handleAssistantThreadStarted(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring assistant_thread_started`);return}if(!e.assistant_thread){this.logger.warn(`Malformed assistant_thread_started: missing assistant_thread`);return}let{channel_id:n,thread_ts:r,user_id:i,context:a}=e.assistant_thread,o=this.encodeThreadId({channel:n,threadTs:r});this.chat.processAssistantThreadStarted({threadId:o,userId:i,channelId:n,threadTs:r,context:{channelId:a.channel_id,teamId:a.team_id,enterpriseId:a.enterprise_id,threadEntryPoint:a.thread_entry_point,forceSearch:a.force_search},adapter:this},t)}handleAssistantContextChanged(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring assistant_thread_context_changed`);return}if(!e.assistant_thread){this.logger.warn(`Malformed assistant_thread_context_changed: missing assistant_thread`);return}let{channel_id:n,thread_ts:r,user_id:i,context:a}=e.assistant_thread,o=this.encodeThreadId({channel:n,threadTs:r});this.chat.processAssistantContextChanged({threadId:o,userId:i,channelId:n,threadTs:r,context:{channelId:a.channel_id,teamId:a.team_id,enterpriseId:a.enterprise_id,threadEntryPoint:a.thread_entry_point,forceSearch:a.force_search},adapter:this},t)}handleAppHomeOpened(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring app_home_opened`);return}this.chat.processAppHomeOpened({userId:e.user,channelId:e.channel,adapter:this},t)}handleMemberJoinedChannel(e,t){if(!this.chat){this.logger.warn(`Chat instance not initialized, ignoring member_joined_channel`);return}this.chat.processMemberJoinedChannel({userId:e.user,channelId:this.encodeThreadId({channel:e.channel,threadTs:``}),inviterId:e.inviter,adapter:this},t)}async handleUserChange(e){if(this.chat)try{await this.chat.getState().delete(`slack:user:${e.user.id}`)}catch(t){this.logger.warn(`Failed to invalidate user cache`,{userId:e.user.id,error:t})}}async publishHomeView(e,t){await this._client.views.publish(await this.withToken({user_id:e,view:t}))}async setSuggestedPrompts(e,t,n,r){await this._client.assistant.threads.setSuggestedPrompts(await this.withToken({channel_id:e,thread_ts:t,prompts:n,title:r}))}async setAssistantStatus(e,t,n,r){await this._client.assistant.threads.setStatus(await this.withToken({channel_id:e,thread_ts:t,status:n,...r&&{loading_messages:r}}))}async setAssistantTitle(e,t,n){await this._client.assistant.threads.setTitle(await this.withToken({channel_id:e,thread_ts:t,title:n}))}async resolveInlineMentions(e,t){let n=new Set,r=new Set;for(let t of e.split(`<`)){let e=t.indexOf(`>`);if(e===-1)continue;let i=t.slice(0,e);if(i.startsWith(`@`)){let e=i.slice(1),t=e.indexOf(`|`),r=t>=0?e.slice(0,t):e;Br.test(r)&&n.add(r)}else if(i.startsWith(`#`)){let e=i.slice(1);e.indexOf(`|`)===-1&&Br.test(e)&&r.add(e)}}if(n.size===0&&r.size===0)return e;let i=this.botUserId;if(t&&i&&n.delete(i),n.size===0&&r.size===0)return e;let[a,o]=await Promise.all([Promise.all([...n].map(async e=>[e,(await this.lookupUser(e))?.displayName??e])),Promise.all([...r].map(async e=>[e,await this.lookupChannel(e)]))]),s=new Map(a),c=new Map(o),l=``,u=e,d=Wr(u);for(;d!==-1;){l+=u.slice(0,d),u=u.slice(d);let e=u.indexOf(`>`);if(e===-1)break;let t=u[1],n=u.slice(2,e),r=n.indexOf(`|`),i=r>=0?n.slice(0,r):n;if(t===`@`&&Br.test(i)){let e=s.get(i);l+=e?`<@${i}|${e}>`:`<@${i}>`}else if(t===`#`&&r===-1&&c.has(i)){let e=c.get(i);l+=`<#${i}|${e}>`}else l+=u.slice(0,e+1);u=u.slice(e+1),d=Wr(u)}return l+u}extractLinks(e){let t=new Set;if(e.blocks){for(let n of e.blocks)if(n.type===`rich_text`&&n.elements){for(let e of n.elements)if(e.elements)for(let n of e.elements)n.type===`link`&&n.url&&t.add(n.url)}}if(t.size===0&&e.text)for(let n of e.text.matchAll(/<(https?:\/\/[^>]+)>/g)){let e=n[1],r=e.indexOf(`|`);t.add(r>=0?e.slice(0,r):e)}let n=new Map;if(e.attachments)for(let r of e.attachments){let e=r.from_url||r.original_url;e&&(r.title||r.text)&&(n.set(e,{title:r.title,description:r.text,imageUrl:r.image_url||r.thumb_url,siteName:r.service_name}),t.add(e))}return[...t].map(e=>{let t=this.createLinkPreview(e),r=n.get(e)||n.get(e.replace(Gr,``))||n.get(`${e}/`);return r?{...t,...r}:t})}createLinkPreview(e){let t=Jr.exec(e);if(!t)return{url:e};let n=t[1],r=t[2],i=`${r.slice(0,r.length-6)}.${r.slice(r.length-6)}`,a=this.encodeThreadId({channel:n,threadTs:i});return{url:e,fetchMessage:async()=>{let t=((await this._client.conversations.history(await this.withToken({channel:n,latest:i,inclusive:!0,limit:1}))).messages||[]).find(e=>e.ts===i);if(!t)throw Error(`Message not found: ${e}`);return this.parseSlackMessage(t,a)}}}async parseSlackMessage(t,n,r){let i=this.isMessageFromSelf(t),a=r?.skipSelfMention??!0,o=t.text||``,s=t.username||`unknown`,c=t.username||`unknown`;if(t.user&&!t.username){let e=await this.lookupUser(t.user);s=e?.displayName??t.user,c=e?.realName??s}if(t.user&&this.chat)try{let r=`slack:thread-participants:${n}`;(await this.chat.getState().getList(r)).includes(t.user)||await this.chat.getState().appendToList(r,t.user,{maxLength:100,ttlMs:e.REVERSE_INDEX_TTL_MS})}catch(e){this.logger.warn(`Failed to track thread participant`,{threadId:n,userId:t.user,error:e})}let l=await this.resolveInlineMentions(o,a);return new j({id:t.ts||``,threadId:n,text:this.formatConverter.extractPlainText(l),formatted:this.formatConverter.toAst(l),raw:t,author:{userId:t.user||t.bot_id||`unknown`,userName:s,fullName:c,isBot:!!t.bot_id,isMe:i},metadata:{dateSent:new Date(Number.parseFloat(t.ts||`0`)*1e3),edited:!!t.edited,editedAt:t.edited?new Date(Number.parseFloat(t.edited.ts)*1e3):void 0},attachments:(t.files||[]).map(e=>this.createAttachment(e,t.team_id??t.team)),links:await this.enrichLinks(this.extractLinks(t),t.ts)})}async enrichLinks(e,t){if(!(this.chat&&t)||e.length===0||e.every(e=>e.title||e.fetchMessage))return e;let n=Date.now()+Kr,r=this.chat.getState(),i=null;for(;;){try{i=await r.get(`slack:unfurls:${t}`)}catch{return e}if(i||Date.now()>=n)break;await new Promise(e=>setTimeout(e,qr))}return i?e.map(e=>{if(e.title)return e;let t=i[e.url]||i[e.url.replace(Gr,``)]||i[`${e.url}/`];return t?{...e,...t}:e}):e}createAttachment(e,t){let n=e.url_private,r=this.requestContext.getStore(),i=r?.token,a=r?.enterpriseId,o=r?.isEnterpriseInstall,s=`file`;e.mimetype?.startsWith(`image/`)?s=`image`:e.mimetype?.startsWith(`video/`)?s=`video`:e.mimetype?.startsWith(`audio/`)&&(s=`audio`);let c={};return n&&(c.url=n),t&&(c.teamId=t),a&&(c.enterpriseId=a),o&&(c.isEnterpriseInstall=`true`),{type:s,url:n,name:e.name,mimeType:e.mimetype,size:e.size,width:e.original_w,height:e.original_h,fetchMetadata:Object.keys(c).length>0?c:void 0,fetchData:n?async()=>this.fetchSlackFile(n,i??await this.getToken()):void 0}}async fetchSlackFile(e,t){let n=await fetch(e,{headers:{Authorization:`Bearer ${t}`}});if(!n.ok)throw new W(`slack`,`Failed to fetch file: ${n.status} ${n.statusText}`);if((n.headers.get(`content-type`)??``).includes(`text/html`))throw new W(`slack`,`Failed to download file from Slack: received HTML login page instead of file data. Ensure your Slack app has the "files:read" OAuth scope. URL: ${e}`);let r=await n.arrayBuffer();return Buffer.from(r)}rehydrateAttachment(e){let t=e.fetchMetadata?.url??e.url,n=e.fetchMetadata?.teamId,r=e.fetchMetadata?.enterpriseId,i=e.fetchMetadata?.isEnterpriseInstall===`true`;return t?{...e,fetchData:async()=>{let e,a=i?r:n;if(a){let t=await this.resolveTokenForTeam(a,i);if(!t)throw new H(`slack`,`Installation not found for ${i?`enterprise`:`team`} ${a}`);e=t.token}else e=await this.getToken();return this.fetchSlackFile(t,e)}}:e}async resolveOutgoingMentions(e,t){if(!this.chat)return e;let n=this.chat.getState(),r=/@(\w+)/g,i=new Map;for(let t of e.matchAll(r)){let n=t[1];if(Vr.test(n))continue;let r=t.index;r>0&&e[r-1]===`<`||i.has(n.toLowerCase())||i.set(n.toLowerCase(),[])}if(i.size===0)return e;for(let e of i.keys()){let t=await n.getList(`slack:user-by-name:${e}`),r=[...new Set(t)];i.set(e,r)}let a=null;if([...i.values()].some(e=>e.length>1)){let e=await n.getList(`slack:thread-participants:${t}`);a=new Set(e)}return e.replace(r,(t,n,r)=>{if(r>0&&e[r-1]===`<`||Vr.test(n))return t;let o=i.get(n.toLowerCase());if(!o||o.length===0)return t;if(o.length===1)return`<@${o[0]}>`;if(a){let e=o.filter(e=>a.has(e));if(e.length===1)return`<@${e[0]}>`}return t})}async resolveMessageMentions(e,t){if(!this.chat)return e;if(typeof e==`string`)return this.resolveOutgoingMentions(e,t);if(typeof e==`object`&&e){if(`raw`in e&&typeof e.raw==`string`)return{...e,raw:await this.resolveOutgoingMentions(e.raw,t)};if(`markdown`in e&&typeof e.markdown==`string`)return{...e,markdown:await this.resolveOutgoingMentions(e.markdown,t)}}return e}async postMessage(e,t){let n=await this.resolveMessageMentions(t,e),{channel:r,threadTs:i}=this.decodeThreadId(e),a=i||void 0;try{let t=B(n);if(t.length>0){await this.uploadFiles(t,r,a);let i=typeof n==`string`||typeof n==`object`&&!!n&&(`raw`in n&&n.raw||`markdown`in n&&n.markdown||`ast`in n&&n.ast),o=z(n);if(!(i||o))return{id:`file-${Date.now()}`,threadId:e,raw:{files:t}}}let i=z(n);if(i){let t=hr(i),n=$(i);this.logger.debug(`Slack API: chat.postMessage (blocks)`,{channel:r,threadTs:a,blockCount:t.length});let o=await this._client.chat.postMessage(await this.withToken({channel:r,thread_ts:a,text:n,blocks:t,unfurl_links:!1,unfurl_media:!1}));return this.logger.debug(`Slack API: chat.postMessage response`,{messageId:o.ts,ok:o.ok}),{id:o.ts,threadId:e,raw:o}}let o=this.formatConverter.toSlackPayload(n);this.logger.debug(`Slack API: chat.postMessage`,{channel:r,threadTs:a,payloadKey:`markdown_text`in o?`markdown_text`:`text`});let s=await this._client.chat.postMessage(await this.withToken({channel:r,thread_ts:a,...o,unfurl_links:!1,unfurl_media:!1}));return this.logger.debug(`Slack API: chat.postMessage response`,{messageId:s.ts,ok:s.ok}),{id:s.ts,threadId:e,raw:s}}catch(e){this.handleSlackError(e)}}async postEphemeral(e,t,n){let r=await this.resolveMessageMentions(n,e),{channel:i,threadTs:a}=this.decodeThreadId(e),o=a||void 0;try{let n=z(r);if(n){let r=hr(n),a=$(n);this.logger.debug(`Slack API: chat.postEphemeral (blocks)`,{channel:i,threadTs:o,userId:t,blockCount:r.length});let s=await this._client.chat.postEphemeral(await this.withToken({channel:i,thread_ts:o,user:t,text:a,blocks:r}));return this.logger.debug(`Slack API: chat.postEphemeral response`,{messageTs:s.message_ts,ok:s.ok}),{id:s.message_ts||``,threadId:e,usedFallback:!1,raw:s}}let a=this.formatConverter.toSlackPayload(r);this.logger.debug(`Slack API: chat.postEphemeral`,{channel:i,threadTs:o,userId:t,payloadKey:`markdown_text`in a?`markdown_text`:`text`});let s=await this._client.chat.postEphemeral(await this.withToken({channel:i,thread_ts:o,user:t,...a}));return this.logger.debug(`Slack API: chat.postEphemeral response`,{messageTs:s.message_ts,ok:s.ok}),{id:s.message_ts||``,threadId:e,usedFallback:!1,raw:s}}catch(e){this.handleSlackError(e)}}async scheduleMessage(e,t,n){let r=await this.resolveMessageMentions(t,e),{channel:i,threadTs:a}=this.decodeThreadId(e),o=a||void 0,s=Math.floor(n.postAt.getTime()/1e3);if(s<=Math.floor(Date.now()/1e3))throw new U(`slack`,`postAt must be in the future`);if(B(r).length>0)throw new U(`slack`,`File uploads are not supported in scheduled messages`);let c=this.requestContext.getStore()?.token,l=c?()=>Promise.resolve(c):()=>this.getToken(),u=c??await this.getToken();try{let e=z(r);if(e){let t=hr(e),r=$(e);this.logger.debug(`Slack API: chat.scheduleMessage (blocks)`,{channel:i,threadTs:o,postAt:s,blockCount:t.length});let a=await this._client.chat.scheduleMessage({token:u,channel:i,thread_ts:o,post_at:s,text:r,blocks:t,unfurl_links:!1,unfurl_media:!1}),c=a.scheduled_message_id,d=this;return{scheduledMessageId:c,channelId:i,postAt:n.postAt,raw:a,async cancel(){await d._client.chat.deleteScheduledMessage({token:await l(),channel:i,scheduled_message_id:c})}}}let t=this.formatConverter.toSlackPayload(r);this.logger.debug(`Slack API: chat.scheduleMessage`,{channel:i,threadTs:o,postAt:s,payloadKey:`markdown_text`in t?`markdown_text`:`text`});let a=await this._client.chat.scheduleMessage({token:u,channel:i,thread_ts:o,post_at:s,...t,unfurl_links:!1,unfurl_media:!1}),c=a.scheduled_message_id,d=this;return{scheduledMessageId:c,channelId:i,postAt:n.postAt,raw:a,async cancel(){await d._client.chat.deleteScheduledMessage({token:await l(),channel:i,scheduled_message_id:c})}}}catch(e){this.handleSlackError(e)}}async openModal(e,t,n){let r=Nr(t,jr({contextId:n,privateMetadata:t.privateMetadata}));this.logger.debug(`Slack API: views.open`,{triggerId:e,callbackId:t.callbackId});try{let t=await this._client.views.open(await this.withToken({trigger_id:e,view:r}));return this.logger.debug(`Slack API: views.open response`,{viewId:t.view?.id,ok:t.ok}),{viewId:t.view?.id}}catch(e){this.handleSlackError(e)}}async updateModal(e,t){let n=Nr(t);this.logger.debug(`Slack API: views.update`,{viewId:e,callbackId:t.callbackId});try{let t=await this._client.views.update(await this.withToken({view_id:e,view:n}));return this.logger.debug(`Slack API: views.update response`,{viewId:t.view?.id,ok:t.ok}),{viewId:t.view?.id}}catch(e){this.handleSlackError(e)}}async uploadFiles(e,t,n){let r=(await Promise.all(e.map(async e=>{try{let t=await te(e.data,{platform:`slack`});return t?{file:t,filename:e.filename}:null}catch(t){return this.logger.error(`Failed to convert file to buffer`,{filename:e.filename,error:t}),null}}))).filter(e=>e!==null);if(r.length===0)return[];this.logger.debug(`Slack API: files.uploadV2 (batch)`,{fileCount:r.length,filenames:r.map(e=>e.filename)});let i={channel_id:t,file_uploads:r};n&&(i.thread_ts=n),i.token=await this.getToken();let a=await this._client.files.uploadV2(i);this.logger.debug(`Slack API: files.uploadV2 response`,{ok:a.ok});let o=[];if(a.files?.[0]?.files)for(let e of a.files[0].files)e.id&&o.push(e.id);return o}async editMessage(e,t,n){let r=await this.resolveMessageMentions(n,e),i=this.decodeEphemeralMessageId(t);if(i){let{threadTs:t}=this.decodeThreadId(e),n=await this.sendToResponseUrl(i.responseUrl,`replace`,{message:r,threadTs:t});return{id:i.messageTs,threadId:e,raw:{ephemeral:!0,...n}}}let{channel:a}=this.decodeThreadId(e);try{let n=z(r);if(n){let r=hr(n),i=$(n);this.logger.debug(`Slack API: chat.update (blocks)`,{channel:a,messageId:t,blockCount:r.length});let o=await this._client.chat.update(await this.withToken({channel:a,ts:t,text:i,blocks:r}));return this.logger.debug(`Slack API: chat.update response`,{messageId:o.ts,ok:o.ok}),{id:o.ts,threadId:e,raw:o}}let i=this.formatConverter.toSlackPayload(r);this.logger.debug(`Slack API: chat.update`,{channel:a,messageId:t,payloadKey:`markdown_text`in i?`markdown_text`:`text`});let o=await this._client.chat.update(await this.withToken({channel:a,ts:t,...i}));return this.logger.debug(`Slack API: chat.update response`,{messageId:o.ts,ok:o.ok}),{id:o.ts,threadId:e,raw:o}}catch(e){this.handleSlackError(e)}}async postObject(e,t,n){if(t!==`plan`)return this.postMessage(e,`[${t}]`);let r=n,{channel:i,threadTs:a}=this.decodeThreadId(e),o=this.renderPlanFallbackText(r),s=this.planToBlockKit(r);try{this.logger.debug(`Slack API: chat.postMessage (plan)`,{channel:i,threadTs:a,blockCount:s.length});let t=await this._client.chat.postMessage(await this.withToken({channel:i,thread_ts:a,text:o,blocks:s,unfurl_links:!1,unfurl_media:!1}));return{id:t.ts,threadId:e,raw:t}}catch(e){this.handleSlackError(e)}}async editObject(e,t,n,r){if(n!==`plan`)return this.editMessage(e,t,`[${n}]`);let i=r,{channel:a}=this.decodeThreadId(e),o=this.renderPlanFallbackText(i),s=this.planToBlockKit(i);try{this.logger.debug(`Slack API: chat.update (plan)`,{channel:a,messageId:t,blockCount:s.length});let n=await this._client.chat.update(await this.withToken({channel:a,ts:t,text:o,blocks:s}));return{id:n.ts,threadId:e,raw:n}}catch(e){this.handleSlackError(e)}}renderPlanFallbackText(e){let t=[];t.push(e.title||`Plan`);for(let n of e.tasks)t.push(`- (${n.status}) ${n.title}`);return t.join(`
|
|
43
47
|
`)}planToBlockKit(e){let t=e.tasks.map(e=>{let t=this.planContentToRichText(e.details),n=this.planContentToRichText(e.output);return{type:`task_card`,task_id:e.id,title:e.title,status:e.status,...t?{details:t}:null,...n?{output:n}:null}});return[{type:`plan`,title:e.title||`Plan`,tasks:t}]}planContentToPlainText(e){return e?Array.isArray(e)?e.join(`
|
|
44
|
-
`):typeof e==`string`?e:`markdown`in e?f(A(e.markdown)):`ast`in e?f(e.ast):``:``}planContentToRichText(e){if(!e)return;if(Array.isArray(e))return{type:`rich_text`,elements:[{type:`rich_text_list`,style:`bullet`,elements:e.map(e=>({type:`rich_text_section`,elements:[{type:`text`,text:String(e)}]}))}]};let t=this.planContentToPlainText(e);if(t)return{type:`rich_text`,elements:[{type:`rich_text_section`,elements:[{type:`text`,text:t}]}]}}async deleteMessage(e,t){let n=this.decodeEphemeralMessageId(t);if(n){await this.sendToResponseUrl(n.responseUrl,`delete`);return}let{channel:r}=this.decodeThreadId(e);try{this.logger.debug(`Slack API: chat.delete`,{channel:r,messageId:t}),await this.client.chat.delete(await this.withToken({channel:r,ts:t})),this.logger.debug(`Slack API: chat.delete response`,{ok:!0})}catch(e){this.handleSlackError(e)}}async addReaction(e,t,n){let{channel:r}=this.decodeThreadId(e),i=M.toSlack(n).replace(/:/g,``);try{this.logger.debug(`Slack API: reactions.add`,{channel:r,messageId:t,emoji:i}),await this.client.reactions.add(await this.withToken({channel:r,timestamp:t,name:i})),this.logger.debug(`Slack API: reactions.add response`,{ok:!0})}catch(e){this.handleSlackError(e)}}async removeReaction(e,t,n){let{channel:r}=this.decodeThreadId(e),i=M.toSlack(n).replace(/:/g,``);try{this.logger.debug(`Slack API: reactions.remove`,{channel:r,messageId:t,emoji:i}),await this.client.reactions.remove(await this.withToken({channel:r,timestamp:t,name:i})),this.logger.debug(`Slack API: reactions.remove response`,{ok:!0})}catch(e){this.handleSlackError(e)}}async startTyping(e,t){let{channel:n,threadTs:r}=this.decodeThreadId(e);if(!r){this.logger.debug(`Slack: startTyping skipped - no thread context`);return}this.logger.debug(`Slack API: assistant.threads.setStatus`,{channel:n,threadTs:r,status:t});try{await this.client.assistant.threads.setStatus(await this.withToken({channel_id:n,thread_ts:r,status:t??`Typing...`,loading_messages:[t??`Typing...`]}))}catch(e){this.logger.warn(`Slack API: assistant.threads.setStatus failed`,{channel:n,threadTs:r,error:e})}}async stream(e,t,n){if(!(n?.recipientUserId&&n?.recipientTeamId))throw new U(`slack`,`Slack streaming requires recipientUserId and recipientTeamId in options`);let{channel:r,threadTs:i}=this.decodeThreadId(e),a=i||void 0;if(!a)throw this.logger.debug(`Slack: stream skipped - no thread context`),new U(`slack`,`Slack streaming requires a valid thread context (non-empty threadTs)`);this.logger.debug(`Slack: starting stream`,{channel:r,threadTs:a});let o=await this.getToken(),s=this.client.chatStream({channel:r,thread_ts:a,recipient_user_id:n.recipientUserId,recipient_team_id:n.recipientTeamId,...n.taskDisplayMode&&{task_display_mode:n.taskDisplayMode}}),c=!0,l=``,u=new x({wrapTablesForAppend:!1}),d=async e=>{e.length!==0&&(c?(await s.append({markdown_text:e,token:o}),c=!1):await s.append({markdown_text:e}))},f=!0,p=async e=>{if(!f)return;let t=u.getCommittableText();await d(t.slice(l.length)),l=t;try{c?(await s.append({chunks:[e],token:o}),c=!1):await s.append({chunks:[e]})}catch(t){f=!1,this.logger.warn(`Structured streaming chunk failed, falling back to text-only streaming. Ensure your Slack app manifest includes assistant_view, assistant:write scope, and @slack/web-api >= 7.14.0`,{chunkType:e.type,error:t})}},m=async e=>{u.push(e);let t=u.getCommittableText();await d(t.slice(l.length)),l=t};for await(let e of t)typeof e==`string`?await m(e):e.type===`markdown_text`?await m(e.text):await p(e);u.finish(),await d(u.getCommittableText().slice(l.length));let h=await s.stop(n?.stopBlocks?{blocks:n.stopBlocks}:void 0),g=h.message?.ts??h.ts;return this.logger.debug(`Slack: stream complete`,{messageId:g}),{id:g,threadId:e,raw:h}}async openDM(e){try{this.logger.debug(`Slack API: conversations.open`,{userId:e});let t=await this.client.conversations.open(await this.withToken({users:e}));if(!t.channel?.id)throw new W(`slack`,`Failed to open DM - no channel returned`);let n=t.channel.id;return this.logger.debug(`Slack API: conversations.open response`,{channelId:n,ok:t.ok}),this.encodeThreadId({channel:n,threadTs:``})}catch(e){this.handleSlackError(e)}}async fetchMessages(e,t={}){let{channel:n,threadTs:r}=this.decodeThreadId(e),i=t.direction??`backward`,a=t.limit||100;try{return i===`forward`?await this.fetchMessagesForward(n,r,e,a,t.cursor):await this.fetchMessagesBackward(n,r,e,a,t.cursor)}catch(e){this.handleSlackError(e)}}async fetchMessagesForward(e,t,n,r,i){this.logger.debug(`Slack API: conversations.replies (forward)`,{channel:e,threadTs:t,limit:r,cursor:i});let a=await this.client.conversations.replies(await this.withToken({channel:e,ts:t,limit:r,cursor:i})),o=a.messages||[],s=a.response_metadata?.next_cursor;return this.logger.debug(`Slack API: conversations.replies response`,{messageCount:o.length,ok:a.ok,hasNextCursor:!!s}),{messages:await Promise.all(o.map(e=>this.parseSlackMessage(e,n))),nextCursor:s||void 0}}async fetchMessagesBackward(e,t,n,r,i){let a=i||void 0;this.logger.debug(`Slack API: conversations.replies (backward)`,{channel:e,threadTs:t,limit:r,latest:a});let o=Math.min(1e3,Math.max(r*2,200)),s=await this.client.conversations.replies(await this.withToken({channel:e,ts:t,limit:o,latest:a,inclusive:!1})),c=s.messages||[];this.logger.debug(`Slack API: conversations.replies response (backward)`,{messageCount:c.length,ok:s.ok,hasMore:s.has_more});let l=Math.max(0,c.length-r),u=c.slice(l),d=await Promise.all(u.map(e=>this.parseSlackMessage(e,n))),f;if(l>0||s.has_more){let e=u[0];e?.ts&&(f=e.ts)}return{messages:d,nextCursor:f}}async fetchThread(e){let{channel:t,threadTs:n}=this.decodeThreadId(e);try{this.logger.debug(`Slack API: conversations.info`,{channel:t});let r=await this.client.conversations.info(await this.withToken({channel:t})),i=r.channel;i?.is_ext_shared&&this._externalChannels.add(t),this.logger.debug(`Slack API: conversations.info response`,{channelName:i?.name,ok:r.ok});let a=`unknown`;return i?.is_ext_shared?a=`external`:i?.is_private||t.startsWith(`D`)?a=`private`:t.startsWith(`C`)&&(a=`workspace`),{id:e,channelId:t,channelName:i?.name,channelVisibility:a,metadata:{threadTs:n,channel:r.channel}}}catch(e){this.handleSlackError(e)}}async fetchMessage(e,t){let{channel:n,threadTs:r}=this.decodeThreadId(e);try{let i=((await this.client.conversations.replies(await this.withToken({channel:n,ts:r,oldest:t,inclusive:!0,limit:1}))).messages||[]).find(e=>e.ts===t);return i?this.parseSlackMessage(i,e):null}catch(e){this.handleSlackError(e)}}encodeThreadId(e){return`slack:${e.channel}:${e.threadTs}`}isDM(e){let{channel:t}=this.decodeThreadId(e);return t.startsWith(`D`)}getChannelVisibility(e){let{channel:t}=this.decodeThreadId(e);return this._externalChannels.has(t)?`external`:t.startsWith(`G`)||t.startsWith(`D`)?`private`:t.startsWith(`C`)?`workspace`:`unknown`}decodeThreadId(e){let t=e.split(`:`);if(t.length<2||t.length>3||t[0]!==`slack`)throw new U(`slack`,`Invalid Slack thread ID: ${e}`);return{channel:t[1],threadTs:t.length===3?t[2]:``}}parseMessage(e){let t=e,n=t.thread_ts||t.ts||``,r=this.encodeThreadId({channel:t.channel||``,threadTs:n});return this.parseSlackMessageSync(t,r)}parseSlackMessageSync(e,t){let n=this.isMessageFromSelf(e),r=e.text||``,i=e.username||e.user||`unknown`,a=e.username||e.user||`unknown`;return new j({id:e.ts||``,threadId:t,text:this.formatConverter.extractPlainText(r),formatted:this.formatConverter.toAst(r),raw:e,author:{userId:e.user||e.bot_id||`unknown`,userName:i,fullName:a,isBot:!!e.bot_id,isMe:n},metadata:{dateSent:new Date(Number.parseFloat(e.ts||`0`)*1e3),edited:!!e.edited,editedAt:e.edited?new Date(Number.parseFloat(e.edited.ts)*1e3):void 0},attachments:(e.files||[]).map(t=>this.createAttachment(t,e.team_id??e.team)),links:this.extractLinks(e)})}channelIdFromThreadId(e){let{channel:t}=this.decodeThreadId(e);return`slack:${t}`}async fetchChannelMessages(e,t={}){let n=e.split(`:`)[1];if(!n)throw new U(`slack`,`Invalid Slack channel ID: ${e}`);let r=t.direction??`backward`,i=t.limit||100;try{return r===`forward`?await this.fetchChannelMessagesForward(n,i,t.cursor):await this.fetchChannelMessagesBackward(n,i,t.cursor)}catch(e){this.handleSlackError(e)}}async fetchChannelMessagesForward(e,t,n){this.logger.debug(`Slack API: conversations.history (forward)`,{channel:e,limit:t,cursor:n});let r=await this.client.conversations.history(await this.withToken({channel:e,limit:t,oldest:n,inclusive:n?!1:void 0})),i=(r.messages||[]).reverse(),a=await Promise.all(i.map(t=>{let n=`slack:${e}:${t.thread_ts||t.ts||``}`;return this.parseSlackMessage(t,n,{skipSelfMention:!1})})),o;if(r.has_more&&i.length>0){let e=i.at(-1);e?.ts&&(o=e.ts)}return{messages:a,nextCursor:o}}async fetchChannelMessagesBackward(e,t,n){this.logger.debug(`Slack API: conversations.history (backward)`,{channel:e,limit:t,cursor:n});let r=await this.client.conversations.history(await this.withToken({channel:e,limit:t,latest:n,inclusive:n?!1:void 0})),i=[...r.messages||[]].reverse(),a=await Promise.all(i.map(t=>{let n=`slack:${e}:${t.thread_ts||t.ts||``}`;return this.parseSlackMessage(t,n,{skipSelfMention:!1})})),o;if(r.has_more&&i.length>0){let e=i[0];e?.ts&&(o=e.ts)}return{messages:a,nextCursor:o}}async listThreads(e,t={}){let n=e.split(`:`)[1];if(!n)throw new U(`slack`,`Invalid Slack channel ID: ${e}`);let r=t.limit||50;try{this.logger.debug(`Slack API: conversations.history (listThreads)`,{channel:n,limit:r,cursor:t.cursor});let e=await this.client.conversations.history(await this.withToken({channel:n,limit:Math.min(r*3,200),cursor:t.cursor})),i=(e.messages||[]).filter(e=>(e.reply_count??0)>0).slice(0,r);return{threads:await Promise.all(i.map(async e=>{let t=`slack:${n}:${e.ts||``}`;return{id:t,rootMessage:await this.parseSlackMessage(e,t,{skipSelfMention:!1}),replyCount:e.reply_count,lastReplyAt:e.latest_reply?new Date(Number.parseFloat(e.latest_reply)*1e3):void 0}})),nextCursor:e.response_metadata?.next_cursor||void 0}}catch(e){this.handleSlackError(e)}}async fetchChannelInfo(e){let t=e.split(`:`)[1];if(!t)throw new U(`slack`,`Invalid Slack channel ID: ${e}`);try{this.logger.debug(`Slack API: conversations.info (channel)`,{channel:t});let n=(await this.client.conversations.info(await this.withToken({channel:t}))).channel;n?.is_ext_shared&&this._externalChannels.add(t);let r=`unknown`;return n?.is_ext_shared?r=`external`:n?.is_im||n?.is_mpim||n?.is_private||t.startsWith(`D`)?r=`private`:t.startsWith(`C`)&&(r=`workspace`),{id:e,name:n?.name?`#${n.name}`:void 0,isDM:!!(n?.is_im||n?.is_mpim),channelVisibility:r,memberCount:n?.num_members,metadata:{purpose:n?.purpose?.value,topic:n?.topic?.value}}}catch(e){this.handleSlackError(e)}}async postChannelMessage(e,t){let n=e.split(`:`)[1];if(!n)throw new U(`slack`,`Invalid Slack channel ID: ${e}`);let r=`slack:${n}:`;return await this.postMessage(r,t)}renderFormatted(e){return this.formatConverter.fromAst(e)}isMessageFromSelf(e){let t=this.requestContext.getStore();return!!(t?.botUserId&&e.user===t.botUserId||this._botUserId&&e.user===this._botUserId||this._botId&&e.bot_id===this._botId)}handleSlackError(e){let t=e;throw t.code===`slack_webapi_platform_error`&&t.data?.error===`ratelimited`?new ee(`slack`):e}encodeEphemeralMessageId(e,t,n){let r=JSON.stringify({responseUrl:t,userId:n});return`ephemeral:${e}:${btoa(r)}`}decodeEphemeralMessageId(e){if(!e.startsWith(`ephemeral:`))return null;let t=e.split(`:`);if(t.length<3)return null;let n=t[1],r=t.slice(2).join(`:`);try{let e=atob(r);try{let t=JSON.parse(e);if(t.responseUrl&&t.userId)return{messageTs:n,responseUrl:t.responseUrl,userId:t.userId}}catch{return{messageTs:n,responseUrl:e,userId:``}}return null}catch{return this.logger.warn(`Failed to decode ephemeral messageId`,{messageId:e}),null}}async sendToResponseUrl(e,t,n){let r;if(t===`delete`)r={delete_original:!0};else{let e=n?.message;if(!e)throw new U(`slack`,`Message required for replace action`);let t=z(e);r=t?{replace_original:!0,text:Tr(t),blocks:fr(t)}:{replace_original:!0,text:this.formatConverter.toResponseUrlText(e)},n?.threadTs&&(r.thread_ts=n.threadTs)}this.logger.debug(`Slack response_url request`,{action:t,threadTs:n?.threadTs});let i=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)});if(!i.ok){let e=await i.text();throw this.logger.error(`Slack response_url failed`,{action:t,status:i.status,body:e}),new W(`slack`,`Failed to ${t} via response_url: ${e}`)}let a=await i.text();if(a)try{return JSON.parse(a)}catch{return{raw:a}}return{}}};function Jr(e){let t=e?.mode??`webhook`,n=e?.appToken??process.env.SLACK_APP_TOKEN;if(t===`socket`){if(!n)throw new U(`slack`,`appToken is required for socket mode. Set SLACK_APP_TOKEN or provide it in config.`);if(e?.clientId||e?.clientSecret)throw new U(`slack`,`Multi-workspace (clientId/clientSecret) is not supported in socket mode.`)}let r=e?.webhookVerifier,i=e?.signingSecret??(r?void 0:process.env.SLACK_SIGNING_SECRET);if(t===`webhook`&&!(i||r))throw new U(`slack`,`signingSecret or webhookVerifier is required. Set SLACK_SIGNING_SECRET, provide signingSecret in config, or provide a webhookVerifier.`);let a=!e;return new qr({appToken:n,mode:t,signingSecret:i,botToken:e?.botToken??(a?process.env.SLACK_BOT_TOKEN:void 0),clientId:e?.clientId??(a?process.env.SLACK_CLIENT_ID:void 0),clientSecret:e?.clientSecret??(a?process.env.SLACK_CLIENT_SECRET:void 0),encryptionKey:e?.encryptionKey??process.env.SLACK_ENCRYPTION_KEY,installationKeyPrefix:e?.installationKeyPrefix,logger:e?.logger??new C(`info`).child(`slack`),socketForwardingSecret:e?.socketForwardingSecret??process.env.SLACK_SOCKET_FORWARDING_SECRET,userName:e?.userName,botUserId:e?.botUserId,webhookVerifier:r})}export{qr as SlackAdapter,Dr as SlackFormatConverter,Dr as SlackMarkdownConverter,fr as cardToBlockKit,Tr as cardToFallbackText,Jr as createSlackAdapter,pe as decodeKey};
|
|
48
|
+
`):typeof e==`string`?e:`markdown`in e?d(A(e.markdown)):`ast`in e?d(e.ast):``:``}planContentToRichText(e){if(!e)return;if(Array.isArray(e))return{type:`rich_text`,elements:[{type:`rich_text_list`,style:`bullet`,elements:e.map(e=>({type:`rich_text_section`,elements:[{type:`text`,text:String(e)}]}))}]};let t=this.planContentToPlainText(e);if(t)return{type:`rich_text`,elements:[{type:`rich_text_section`,elements:[{type:`text`,text:t}]}]}}async deleteMessage(e,t){let n=this.decodeEphemeralMessageId(t);if(n){await this.sendToResponseUrl(n.responseUrl,`delete`);return}let{channel:r}=this.decodeThreadId(e);try{this.logger.debug(`Slack API: chat.delete`,{channel:r,messageId:t}),await this._client.chat.delete(await this.withToken({channel:r,ts:t})),this.logger.debug(`Slack API: chat.delete response`,{ok:!0})}catch(e){this.handleSlackError(e)}}async addReaction(e,t,n){let{channel:r}=this.decodeThreadId(e),i=M.toSlack(n).replace(/:/g,``);try{this.logger.debug(`Slack API: reactions.add`,{channel:r,messageId:t,emoji:i}),await this._client.reactions.add(await this.withToken({channel:r,timestamp:t,name:i})),this.logger.debug(`Slack API: reactions.add response`,{ok:!0})}catch(e){this.handleSlackError(e)}}async removeReaction(e,t,n){let{channel:r}=this.decodeThreadId(e),i=M.toSlack(n).replace(/:/g,``);try{this.logger.debug(`Slack API: reactions.remove`,{channel:r,messageId:t,emoji:i}),await this._client.reactions.remove(await this.withToken({channel:r,timestamp:t,name:i})),this.logger.debug(`Slack API: reactions.remove response`,{ok:!0})}catch(e){this.handleSlackError(e)}}async startTyping(e,t){let{channel:n,threadTs:r}=this.decodeThreadId(e);if(!r){this.logger.debug(`Slack: startTyping skipped - no thread context`);return}this.logger.debug(`Slack API: assistant.threads.setStatus`,{channel:n,threadTs:r,status:t});try{await this._client.assistant.threads.setStatus(await this.withToken({channel_id:n,thread_ts:r,status:t??`Typing...`,loading_messages:[t??`Typing...`]}))}catch(e){this.logger.warn(`Slack API: assistant.threads.setStatus failed`,{channel:n,threadTs:r,error:e})}}async stream(e,t,n){if(!(n?.recipientUserId&&n?.recipientTeamId))throw new U(`slack`,`Slack streaming requires recipientUserId and recipientTeamId in options`);let{channel:r,threadTs:i}=this.decodeThreadId(e),a=i||void 0;if(!a)throw this.logger.debug(`Slack: stream skipped - no thread context`),new U(`slack`,`Slack streaming requires a valid thread context (non-empty threadTs)`);this.logger.debug(`Slack: starting stream`,{channel:r,threadTs:a});let o=await this.getToken(),s=this._client.chatStream({channel:r,thread_ts:a,recipient_user_id:n.recipientUserId,recipient_team_id:n.recipientTeamId,...n.taskDisplayMode&&{task_display_mode:n.taskDisplayMode}}),c=!0,l=``,u=new x({wrapTablesForAppend:!1}),d=async e=>{e.length!==0&&(c?(await s.append({markdown_text:e,token:o}),c=!1):await s.append({markdown_text:e}))},f=!0,p=async e=>{if(!f)return;let t=u.getCommittableText();await d(t.slice(l.length)),l=t;try{c?(await s.append({chunks:[e],token:o}),c=!1):await s.append({chunks:[e]})}catch(t){f=!1,this.logger.warn(`Structured streaming chunk failed, falling back to text-only streaming. Ensure your Slack app manifest includes assistant_view, assistant:write scope, and @slack/web-api >= 7.14.0`,{chunkType:e.type,error:t})}},m=async e=>{u.push(e);let t=u.getCommittableText();await d(t.slice(l.length)),l=t};for await(let e of t)typeof e==`string`?await m(e):e.type===`markdown_text`?await m(e.text):await p(e);u.finish(),await d(u.getCommittableText().slice(l.length));let h=await s.stop(n?.stopBlocks?{blocks:n.stopBlocks}:void 0),g=h.message?.ts??h.ts;return this.logger.debug(`Slack: stream complete`,{messageId:g}),{id:g,threadId:e,raw:h}}async openDM(e){try{this.logger.debug(`Slack API: conversations.open`,{userId:e});let t=await this._client.conversations.open(await this.withToken({users:e}));if(!t.channel?.id)throw new W(`slack`,`Failed to open DM - no channel returned`);let n=t.channel.id;return this.logger.debug(`Slack API: conversations.open response`,{channelId:n,ok:t.ok}),this.encodeThreadId({channel:n,threadTs:``})}catch(e){this.handleSlackError(e)}}async fetchMessages(e,t={}){let{channel:n,threadTs:r}=this.decodeThreadId(e),i=t.direction??`backward`,a=t.limit||100;try{return i===`forward`?await this.fetchMessagesForward(n,r,e,a,t.cursor):await this.fetchMessagesBackward(n,r,e,a,t.cursor)}catch(e){this.handleSlackError(e)}}async fetchMessagesForward(e,t,n,r,i){this.logger.debug(`Slack API: conversations.replies (forward)`,{channel:e,threadTs:t,limit:r,cursor:i});let a=await this._client.conversations.replies(await this.withToken({channel:e,ts:t,limit:r,cursor:i})),o=a.messages||[],s=a.response_metadata?.next_cursor;return this.logger.debug(`Slack API: conversations.replies response`,{messageCount:o.length,ok:a.ok,hasNextCursor:!!s}),{messages:await Promise.all(o.map(e=>this.parseSlackMessage(e,n))),nextCursor:s||void 0}}async fetchMessagesBackward(e,t,n,r,i){let a=i||void 0;this.logger.debug(`Slack API: conversations.replies (backward)`,{channel:e,threadTs:t,limit:r,latest:a});let o=Math.min(1e3,Math.max(r*2,200)),s=await this._client.conversations.replies(await this.withToken({channel:e,ts:t,limit:o,latest:a,inclusive:!1})),c=s.messages||[];this.logger.debug(`Slack API: conversations.replies response (backward)`,{messageCount:c.length,ok:s.ok,hasMore:s.has_more});let l=Math.max(0,c.length-r),u=c.slice(l),d=await Promise.all(u.map(e=>this.parseSlackMessage(e,n))),f;if(l>0||s.has_more){let e=u[0];e?.ts&&(f=e.ts)}return{messages:d,nextCursor:f}}async fetchThread(e){let{channel:t,threadTs:n}=this.decodeThreadId(e);try{this.logger.debug(`Slack API: conversations.info`,{channel:t});let r=await this._client.conversations.info(await this.withToken({channel:t})),i=r.channel;i?.is_ext_shared&&this._externalChannels.add(t),this.logger.debug(`Slack API: conversations.info response`,{channelName:i?.name,ok:r.ok});let a=`unknown`;return i?.is_ext_shared?a=`external`:i?.is_private||t.startsWith(`D`)?a=`private`:t.startsWith(`C`)&&(a=`workspace`),{id:e,channelId:t,channelName:i?.name,channelVisibility:a,metadata:{threadTs:n,channel:r.channel}}}catch(e){this.handleSlackError(e)}}async fetchMessage(e,t){let{channel:n,threadTs:r}=this.decodeThreadId(e);try{let i=((await this._client.conversations.replies(await this.withToken({channel:n,ts:r,oldest:t,inclusive:!0,limit:1}))).messages||[]).find(e=>e.ts===t);return i?this.parseSlackMessage(i,e):null}catch(e){this.handleSlackError(e)}}encodeThreadId(e){return`slack:${e.channel}:${e.threadTs}`}isDM(e){let{channel:t}=this.decodeThreadId(e);return t.startsWith(`D`)}getChannelVisibility(e){let{channel:t}=this.decodeThreadId(e);return this._externalChannels.has(t)?`external`:t.startsWith(`G`)||t.startsWith(`D`)?`private`:t.startsWith(`C`)?`workspace`:`unknown`}decodeThreadId(e){let t=e.split(`:`);if(t.length<2||t.length>3||t[0]!==`slack`)throw new U(`slack`,`Invalid Slack thread ID: ${e}`);return{channel:t[1],threadTs:t.length===3?t[2]:``}}parseMessage(e){let t=e,n=t.thread_ts||t.ts||``,r=this.encodeThreadId({channel:t.channel||``,threadTs:n});return this.parseSlackMessageSync(t,r)}parseSlackMessageSync(e,t){let n=this.isMessageFromSelf(e),r=e.text||``,i=e.username||e.user||`unknown`,a=e.username||e.user||`unknown`;return new j({id:e.ts||``,threadId:t,text:this.formatConverter.extractPlainText(r),formatted:this.formatConverter.toAst(r),raw:e,author:{userId:e.user||e.bot_id||`unknown`,userName:i,fullName:a,isBot:!!e.bot_id,isMe:n},metadata:{dateSent:new Date(Number.parseFloat(e.ts||`0`)*1e3),edited:!!e.edited,editedAt:e.edited?new Date(Number.parseFloat(e.edited.ts)*1e3):void 0},attachments:(e.files||[]).map(t=>this.createAttachment(t,e.team_id??e.team)),links:this.extractLinks(e)})}channelIdFromThreadId(e){let{channel:t}=this.decodeThreadId(e);return`slack:${t}`}async fetchChannelMessages(e,t={}){let n=e.split(`:`)[1];if(!n)throw new U(`slack`,`Invalid Slack channel ID: ${e}`);let r=t.direction??`backward`,i=t.limit||100;try{return r===`forward`?await this.fetchChannelMessagesForward(n,i,t.cursor):await this.fetchChannelMessagesBackward(n,i,t.cursor)}catch(e){this.handleSlackError(e)}}async fetchChannelMessagesForward(e,t,n){this.logger.debug(`Slack API: conversations.history (forward)`,{channel:e,limit:t,cursor:n});let r=await this._client.conversations.history(await this.withToken({channel:e,limit:t,oldest:n,inclusive:n?!1:void 0})),i=(r.messages||[]).reverse(),a=await Promise.all(i.map(t=>{let n=`slack:${e}:${t.thread_ts||t.ts||``}`;return this.parseSlackMessage(t,n,{skipSelfMention:!1})})),o;if(r.has_more&&i.length>0){let e=i.at(-1);e?.ts&&(o=e.ts)}return{messages:a,nextCursor:o}}async fetchChannelMessagesBackward(e,t,n){this.logger.debug(`Slack API: conversations.history (backward)`,{channel:e,limit:t,cursor:n});let r=await this._client.conversations.history(await this.withToken({channel:e,limit:t,latest:n,inclusive:n?!1:void 0})),i=[...r.messages||[]].reverse(),a=await Promise.all(i.map(t=>{let n=`slack:${e}:${t.thread_ts||t.ts||``}`;return this.parseSlackMessage(t,n,{skipSelfMention:!1})})),o;if(r.has_more&&i.length>0){let e=i[0];e?.ts&&(o=e.ts)}return{messages:a,nextCursor:o}}async listThreads(e,t={}){let n=e.split(`:`)[1];if(!n)throw new U(`slack`,`Invalid Slack channel ID: ${e}`);let r=t.limit||50;try{this.logger.debug(`Slack API: conversations.history (listThreads)`,{channel:n,limit:r,cursor:t.cursor});let e=await this._client.conversations.history(await this.withToken({channel:n,limit:Math.min(r*3,200),cursor:t.cursor})),i=(e.messages||[]).filter(e=>(e.reply_count??0)>0).slice(0,r);return{threads:await Promise.all(i.map(async e=>{let t=`slack:${n}:${e.ts||``}`;return{id:t,rootMessage:await this.parseSlackMessage(e,t,{skipSelfMention:!1}),replyCount:e.reply_count,lastReplyAt:e.latest_reply?new Date(Number.parseFloat(e.latest_reply)*1e3):void 0}})),nextCursor:e.response_metadata?.next_cursor||void 0}}catch(e){this.handleSlackError(e)}}async fetchChannelInfo(e){let t=e.split(`:`)[1];if(!t)throw new U(`slack`,`Invalid Slack channel ID: ${e}`);try{this.logger.debug(`Slack API: conversations.info (channel)`,{channel:t});let n=(await this._client.conversations.info(await this.withToken({channel:t}))).channel;n?.is_ext_shared&&this._externalChannels.add(t);let r=`unknown`;return n?.is_ext_shared?r=`external`:n?.is_im||n?.is_mpim||n?.is_private||t.startsWith(`D`)?r=`private`:t.startsWith(`C`)&&(r=`workspace`),{id:e,name:n?.name?`#${n.name}`:void 0,isDM:!!(n?.is_im||n?.is_mpim),channelVisibility:r,memberCount:n?.num_members,metadata:{purpose:n?.purpose?.value,topic:n?.topic?.value}}}catch(e){this.handleSlackError(e)}}async postChannelMessage(e,t){let n=e.split(`:`)[1];if(!n)throw new U(`slack`,`Invalid Slack channel ID: ${e}`);let r=`slack:${n}:`;return await this.postMessage(r,t)}renderFormatted(e){return this.formatConverter.fromAst(e)}isMessageFromSelf(e){let t=this.requestContext.getStore();return!!(t?.botUserId&&e.user===t.botUserId||this._botUserId&&e.user===this._botUserId||this._botId&&e.bot_id===this._botId)}handleSlackError(e){let t=e;throw t.code===`slack_webapi_platform_error`&&t.data?.error===`ratelimited`?new ee(`slack`):e}encodeEphemeralMessageId(e,t,n){let r=JSON.stringify({responseUrl:t,userId:n});return`ephemeral:${e}:${btoa(r)}`}decodeEphemeralMessageId(e){if(!e.startsWith(`ephemeral:`))return null;let t=e.split(`:`);if(t.length<3)return null;let n=t[1],r=t.slice(2).join(`:`);try{let e=atob(r);try{let t=JSON.parse(e);if(t.responseUrl&&t.userId)return{messageTs:n,responseUrl:t.responseUrl,userId:t.userId}}catch{return{messageTs:n,responseUrl:e,userId:``}}return null}catch{return this.logger.warn(`Failed to decode ephemeral messageId`,{messageId:e}),null}}async sendToResponseUrl(e,t,n){let r;if(t===`delete`)r={delete_original:!0};else{let e=n?.message;if(!e)throw new U(`slack`,`Message required for replace action`);let t=z(e);r=t?{replace_original:!0,text:$(t),blocks:hr(t)}:{replace_original:!0,text:this.formatConverter.toResponseUrlText(e)},n?.threadTs&&(r.thread_ts=n.threadTs)}this.logger.debug(`Slack response_url request`,{action:t,threadTs:n?.threadTs});let i=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)});if(!i.ok){let e=await i.text();throw this.logger.error(`Slack response_url failed`,{action:t,status:i.status,body:e}),new W(`slack`,`Failed to ${t} via response_url: ${e}`)}let a=await i.text();if(a)try{return JSON.parse(a)}catch{return{raw:a}}return{}}};function Zr(e){let t=e?.mode??`webhook`,n=e?.appToken??process.env.SLACK_APP_TOKEN;if(t===`socket`){if(!n)throw new U(`slack`,`appToken is required for socket mode. Set SLACK_APP_TOKEN or provide it in config.`);if(e?.clientId||e?.clientSecret)throw new U(`slack`,`Multi-workspace (clientId/clientSecret) is not supported in socket mode.`)}let r=e?.webhookVerifier,i=r?void 0:e?.signingSecret??process.env.SLACK_SIGNING_SECRET;if(t===`webhook`&&!(i||r))throw new U(`slack`,`signingSecret or webhookVerifier is required. Set SLACK_SIGNING_SECRET, provide signingSecret in config, or provide a webhookVerifier.`);let a=!e;return new Xr({apiUrl:e?.apiUrl,appToken:n,mode:t,signingSecret:i,botToken:e?.botToken??(a?process.env.SLACK_BOT_TOKEN:void 0),clientId:e?.clientId??(a?process.env.SLACK_CLIENT_ID:void 0),clientSecret:e?.clientSecret??(a?process.env.SLACK_CLIENT_SECRET:void 0),encryptionKey:e?.encryptionKey??process.env.SLACK_ENCRYPTION_KEY,installationKeyPrefix:e?.installationKeyPrefix,installationProvider:e?.installationProvider,logger:e?.logger??new C(`info`).child(`slack`),socketForwardingSecret:e?.socketForwardingSecret??process.env.SLACK_SOCKET_FORWARDING_SECRET,userName:e?.userName,botUserId:e?.botUserId,webhookVerifier:r})}export{Xr as SlackAdapter,Ar as SlackFormatConverter,Ar as SlackMarkdownConverter,hr as cardToBlockKit,$ as cardToFallbackText,Zr as createSlackAdapter,fe as decodeKey};
|