@cartanova/qgrid-cli 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/bundle/dist/_virtual/{_@oxc-project_runtime@0.140.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/decorate.js +1 -1
- package/bundle/dist/_virtual/{_@oxc-project_runtime@0.140.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/decorateMetadata.js +1 -1
- package/bundle/dist/_virtual/_rolldown/runtime.js +2 -2
- package/bundle/dist/application/monit/monit.frame.js +2 -2
- package/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +3 -3
- package/bundle/dist/application/qgrid/qgrid.dispatcher.js +1 -1
- package/bundle/dist/application/qgrid/qgrid.frame.js +11 -7
- package/bundle/dist/application/qgrid/qgrid.types.js +8 -8
- package/bundle/dist/application/qgrid/token-death.js +3 -2
- package/bundle/dist/application/qgrid/token-subscriber.js +2 -2
- package/bundle/dist/application/qgrid/token-window-keepalive.js +2 -2
- package/bundle/dist/application/qgrid/tool-emulation-schema.js +5 -3
- package/bundle/dist/application/qgrid/tool-emulation.js +2 -2
- package/bundle/dist/application/request-log/request-log.model.js +9 -7
- package/bundle/dist/application/request-log-step/request-log-step.model.js +11 -7
- package/bundle/dist/application/setting/setting.model.js +11 -7
- package/bundle/dist/application/token/token.model.js +15 -11
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js +7 -5
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +15 -11
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +1 -1
- package/bundle/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +1 -1
- package/bundle/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +1 -1
- package/bundle/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +18 -12
- package/bundle/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +1 -1
- package/bundle/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +16 -13
- package/bundle/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +1 -1
- package/bundle/dist/sonamu.config.js +11 -11
- package/bundle/dist/startup-migrations.js +1 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-dispatcher.js +3 -2
- package/bundle/dist/utils/providers/anthropic/anthropic-quota.js +3 -3
- package/bundle/dist/utils/providers/anthropic/anthropic-thinking.js +5 -2
- package/bundle/dist/utils/providers/anthropic/stream-json-adapter.js +9 -7
- package/bundle/dist/utils/providers/common/model-cost.js +37 -11
- package/bundle/dist/utils/providers/common/schema-validation.js +3 -3
- package/bundle/dist/utils/providers/grok/grok-constants.js +2 -2
- package/bundle/dist/utils/providers/grok/grok-dispatcher.js +5 -3
- package/bundle/dist/utils/providers/grok/grok-media-client.js +5 -5
- package/bundle/dist/utils/providers/grok/grok-oauth.js +2 -2
- package/bundle/dist/utils/providers/openai/openai-dispatcher.js +8 -6
- package/bundle/dist/utils/providers/openai/openai-image-generation.js +4 -4
- package/bundle/src/application/qgrid/qgrid.frame.test.ts +25 -10
- package/bundle/src/application/qgrid/qgrid.frame.ts +6 -1
- package/bundle/src/application/qgrid/qgrid.types.ts +5 -5
- package/bundle/src/application/request-log/request-log.model.ts +1 -1
- package/bundle/src/sonamu.config.ts +14 -14
- package/bundle/src/utils/providers/anthropic/anthropic-quota.test.ts +20 -1
- package/bundle/src/utils/providers/anthropic/anthropic-quota.ts +2 -2
- package/bundle/src/utils/providers/common/model-cost.test.ts +26 -4
- package/bundle/src/utils/providers/common/model-cost.ts +52 -17
- package/bundle/src/utils/providers/grok/grok-constants.ts +9 -10
- package/bundle/src/utils/providers/grok/grok-media-client.test.ts +6 -6
- package/bundle/src/utils/providers/grok/grok-types.test.ts +4 -4
- package/bundle/web-dist/client/assets/clsx-DB0hHKMi.js +1 -0
- package/bundle/web-dist/client/assets/cost-CZzlCFS2.js +1 -0
- package/bundle/web-dist/client/assets/index-Cj7ZXipM.js +104 -0
- package/bundle/web-dist/client/assets/index-DLo1QCw7.css +1 -0
- package/bundle/web-dist/client/assets/logs-DSuoyKRh.js +1 -0
- package/bundle/web-dist/client/assets/monit-BwLPgwHG.js +1 -0
- package/bundle/web-dist/client/assets/plus-Bab0ACnC.js +1 -0
- package/bundle/web-dist/client/assets/refresh-cw-BtYoFHVw.js +1 -0
- package/bundle/web-dist/client/assets/request-model-Dl31cZdf.js +1 -0
- package/bundle/web-dist/client/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/bundle/web-dist/client/assets/routes-_R4-gxLV.js +5 -0
- package/bundle/web-dist/client/assets/settings-ZBCgAZaZ.js +1 -0
- package/bundle/web-dist/client/assets/show-DFFBtBqe.js +2 -0
- package/bundle/web-dist/client/assets/tokens-DYSfYz8A.js +1 -0
- package/bundle/web-dist/client/assets/use-oauth-login-flow-CN8nxeAR.js +1 -0
- package/bundle/web-dist/client/assets/use-update-token-mutation-B-N8fFUm.js +1 -0
- package/bundle/web-dist/client/assets/vendor-react-8xo7RSum.js +9 -0
- package/bundle/web-dist/client/assets/vendor-tanstack-6B86itGS.js +2 -0
- package/bundle/web-dist/client/index.html +5 -7
- package/bundle/web-dist/server/assets/{logs-B5M5B7pN.js → logs-C0md5rmp.js} +48 -36
- package/bundle/web-dist/server/assets/monit-YVvwJuAF.js +479 -0
- package/bundle/web-dist/server/assets/plus-z5Hy__3C.js +26 -0
- package/bundle/web-dist/server/assets/refresh-cw-CNm0CERy.js +30 -0
- package/bundle/web-dist/server/assets/{request-model-Cp6h5EuP.js → request-model-DIuPZZwu.js} +14 -7
- package/bundle/web-dist/server/assets/{routes-rIXpkI-t.js → routes-CjWxvHAO.js} +1741 -1101
- package/bundle/web-dist/server/assets/{services.generated-CMJ8AHbO.js → services.generated-CqS8DCjT.js} +11973 -6081
- package/bundle/web-dist/server/assets/{settings-_MoaFGxj.js → settings-CXwnKiMG.js} +40 -19
- package/bundle/web-dist/server/assets/{show-Cfm9UeDr.js → show-G1t8dOEh.js} +268 -213
- package/bundle/web-dist/server/assets/{tokens-DMSHDg9D.js → tokens-C4D67FBX.js} +41 -18
- package/bundle/web-dist/server/assets/{use-oauth-login-flow-jkAkT3X6.js → use-oauth-login-flow-CFzShQtp.js} +1569 -38
- package/bundle/web-dist/server/assets/{use-update-token-mutation-Sm6kh02m.js → use-update-token-mutation-oH0O0n-g.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +11595 -5045
- package/dist/cli.js +20 -11
- package/package.json +24 -24
- package/skills/qgrid/references/ai-sdk-provider-contract.md +4 -4
- package/skills/qgrid/references/anthropic-claude-code-runtime.md +2 -2
- package/skills/qgrid/references/decision-rationale.md +6 -2
- package/skills/qgrid/references/grok-runtime.md +6 -0
- package/skills/qgrid/references/repo-map.md +1 -1
- package/skills/qgrid/references/request-log-run-lifecycle.md +1 -1
- package/skills/qgrid/references/token-auth-quota-lifecycle.md +3 -2
- package/skills/qgrid/references/tool-calling-and-multiturn.md +2 -2
- package/bundle/web-dist/client/assets/clsx-5XM_pHvN.js +0 -1
- package/bundle/web-dist/client/assets/cost-DB3HbU7T.js +0 -1
- package/bundle/web-dist/client/assets/index-Be2qCZmI.css +0 -1
- package/bundle/web-dist/client/assets/index-CK9LwGNV.js +0 -32
- package/bundle/web-dist/client/assets/logs-DjQcEivP.js +0 -1
- package/bundle/web-dist/client/assets/monit-RTxpU7oZ.js +0 -1
- package/bundle/web-dist/client/assets/plus-DDvVTvQP.js +0 -1
- package/bundle/web-dist/client/assets/preload-helper-DWTEM3RW.js +0 -1
- package/bundle/web-dist/client/assets/refresh-cw-CTQsNddA.js +0 -1
- package/bundle/web-dist/client/assets/request-model-DliRuPcw.js +0 -1
- package/bundle/web-dist/client/assets/rolldown-runtime-Dw2cE7zH.js +0 -1
- package/bundle/web-dist/client/assets/routes-DVHoo-YF.js +0 -5
- package/bundle/web-dist/client/assets/services.generated-B5lc3aIC.js +0 -51
- package/bundle/web-dist/client/assets/settings-BQUz6UFr.js +0 -1
- package/bundle/web-dist/client/assets/show-CalQG1Ew.js +0 -2
- package/bundle/web-dist/client/assets/tokens-DU4fWXI9.js +0 -1
- package/bundle/web-dist/client/assets/use-oauth-login-flow-BfxYI4Oh.js +0 -1
- package/bundle/web-dist/client/assets/use-update-token-mutation-qKBC2sn7.js +0 -1
- package/bundle/web-dist/client/assets/vendor-react-DH4kUfK2.js +0 -9
- package/bundle/web-dist/client/assets/vendor-tanstack-DRPs09ai.js +0 -1
- package/bundle/web-dist/server/assets/lazyRouteComponent-AKiHfZWp.js +0 -1983
- package/bundle/web-dist/server/assets/monit-p6JM8MMl.js +0 -1652
- package/bundle/web-dist/server/assets/plus-I0FfLVgU.js +0 -19
- package/bundle/web-dist/server/assets/react-dom-Cv23mm1K.js +0 -335
- package/bundle/web-dist/server/assets/refresh-cw-DYsnffRC.js +0 -23
- /package/bundle/web-dist/server/assets/{clsx-D_N5PN_2.js → clsx-DgIEfj3H.js} +0 -0
- /package/bundle/web-dist/server/assets/{cost-BC9yzyA9.js → cost-oNK0T4Jo.js} +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-_R4-gxLV.js","assets/rolldown-runtime-XKyaHtl9.js","assets/vendor-react-8xo7RSum.js","assets/vendor-tanstack-6B86itGS.js","assets/use-oauth-login-flow-CN8nxeAR.js","assets/clsx-DB0hHKMi.js","assets/cost-CZzlCFS2.js","assets/use-update-token-mutation-B-N8fFUm.js","assets/logs-DSuoyKRh.js","assets/refresh-cw-BtYoFHVw.js","assets/request-model-Dl31cZdf.js","assets/monit-BwLPgwHG.js","assets/settings-ZBCgAZaZ.js","assets/plus-Bab0ACnC.js","assets/tokens-DYSfYz8A.js","assets/show-DFFBtBqe.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{i as r,n as i,r as a,t as o}from"./vendor-react-8xo7RSum.js";import{A as s,C as c,D as l,E as u,M as d,O as f,S as p,T as m,_ as h,a as g,b as _,c as v,f as y,g as b,h as x,i as S,j as C,k as w,l as T,m as E,n as D,o as O,p as k,r as A,s as ee,t as j,u as M,v as te,w as N,x as ne,y as re}from"./vendor-tanstack-6B86itGS.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function ie(e){let t;if(e.then(e=>(t=e,e),f)?.catch?.(f),t!==void 0)return{data:t}}function ae(e,t,n){let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData;t.mutations?.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),t.queries?.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l,queryType:u})=>{let d=c?ie(c):void 0,p=r.data===void 0?d?.data:r.data,m=p===void 0?p:a?a(p):p,h=i.get(o),g=h?.state.status===`pending`,_=h?.state.fetchStatus===`fetching`;if(h){let e=d&&l>h.state.dataUpdatedAt;if(r.dataUpdatedAt>h.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;h.setState({...t,data:m,...r.status===`pending`&&m!==void 0&&{status:`success`,dataUpdatedAt:l,...!_&&{fetchStatus:`idle`}}})}}else h=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s,_type:u},{...r,data:m,fetchStatus:`idle`,status:r.status===`pending`&&m!==void 0?`success`:r.status,...r.status===`pending`&&m!==void 0&&{dataUpdatedAt:l}});c&&!d&&!g&&!_&&l>h.state.dataUpdatedAt&&h.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(f)})}var oe=class extends p{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new h({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=P(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=P(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=P(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=P(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){_.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>u(t,e))}findAll(e={}){return this.getAll().filter(t=>u(e,t))}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return _.batch(()=>Promise.all(e.map(e=>e.continue().catch(f))))}};function P(e){return e.options.scope?.id}var se=class extends p{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??m(r,t),a=this.get(i);return a||(a=new te({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){_.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>l(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>l(e,t)):t}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){_.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ce=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new se,this.#t=e.mutationCache||new oe,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=ne.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=re.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(s(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=c(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return _.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;_.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return _.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=_.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(f).catch(f)}invalidateQueries(e,t={}){return _.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=_.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(f)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(f)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(s(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(s(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(f).catch(f)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(f).catch(f)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return re.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(N(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{w(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(N(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{w(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=m(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===C&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},le=t(o(),1),F=t(r()),I=a(),ue=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,I.jsx)(`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}),(0,I.jsx)(`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8`})]})]})),de=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,I.jsx)(`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}),(0,I.jsx)(`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`})]})]})),fe=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,I.jsx)(`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`}),(0,I.jsx)(`circle`,{cx:16.5,cy:7.5,r:.5,fill:`currentColor`})]})]})),pe=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,I.jsx)(`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}),(0,I.jsx)(`circle`,{cx:12,cy:12,r:3})]})]})),me=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 19h8M4 17l6-6l-6-6`})]})),he=[{label:`Overview`,items:[{title:`Dashboard`,path:`/`,icon:de}]},{label:`Manage`,items:[{title:`Tokens`,path:`/tokens`,icon:fe},{title:`Request Logs`,shortTitle:`Logs`,path:`/logs`,icon:ue},{title:`Server Logs`,shortTitle:`Server`,path:`/monit`,icon:me},{title:`Settings`,path:`/settings`,icon:pe}]}],ge=he.flatMap(e=>e.items);function _e(e,t){return e===`/`?t===`/`||t===``:t.startsWith(e)}function ve(){let e=A({select:e=>e.location.pathname});return(0,I.jsx)(`nav`,{className:`md:hidden shrink-0 border-t border-sand-200/60 bg-sand-50/95 backdrop-blur-sm pb-[env(safe-area-inset-bottom)]`,children:(0,I.jsx)(`div`,{className:`flex`,children:ge.map(t=>{let n=_e(t.path,e);return(0,I.jsxs)(M,{to:t.path,className:`flex-1 flex flex-col items-center gap-0.5 py-2 no-underline transition-colors duration-150 ${n?`text-sienna-600`:`text-sand-500`}`,children:[(0,I.jsx)(t.icon,{className:`size-5 ${n?`text-sienna-500`:`text-sand-400`}`}),(0,I.jsx)(`span`,{className:`text-[10px] ${n?`font-medium`:``}`,children:t.shortTitle??t.title})]},t.path)})})})}function ye(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var be=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Se={};function Ce(e,t){return((t||Se).jsx?xe:be).test(e)}var we=/[ \t\n\f\r]/g;function Te(e){return typeof e==`object`?e.type===`text`&&Ee(e.value):Ee(e)}function Ee(e){return e.replace(we,``)===``}var De=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};De.prototype.normal={},De.prototype.property={},De.prototype.space=void 0;function Oe(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new De(n,r,t)}function ke(e){return e.toLowerCase()}var Ae=class{constructor(e,t){this.attribute=t,this.property=e}};Ae.prototype.attribute=``,Ae.prototype.booleanish=!1,Ae.prototype.boolean=!1,Ae.prototype.commaOrSpaceSeparated=!1,Ae.prototype.commaSeparated=!1,Ae.prototype.defined=!1,Ae.prototype.mustUseProperty=!1,Ae.prototype.number=!1,Ae.prototype.overloadedBoolean=!1,Ae.prototype.property=``,Ae.prototype.spaceSeparated=!1,Ae.prototype.space=void 0;var je=e({boolean:()=>L,booleanish:()=>Ne,commaOrSpaceSeparated:()=>Ie,commaSeparated:()=>Fe,number:()=>R,overloadedBoolean:()=>Pe,spaceSeparated:()=>z}),Me=0,L=Le(),Ne=Le(),Pe=Le(),R=Le(),z=Le(),Fe=Le(),Ie=Le();function Le(){return 2**++Me}var Re=Object.keys(je),ze=class extends Ae{constructor(e,t,n,r){let i=-1;if(super(e,t),Be(this,`space`,r),typeof n==`number`)for(;++i<Re.length;){let e=Re[i];Be(this,Re[i],(n&je[e])===je[e])}}};ze.prototype.defined=!0;function Be(e,t,n){n&&(e[t]=n)}function Ve(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ze(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ke(r)]=r,n[ke(a.attribute)]=r}return new De(t,n,e.space)}var He=Ve({properties:{ariaActiveDescendant:null,ariaAtomic:Ne,ariaAutoComplete:null,ariaBusy:Ne,ariaChecked:Ne,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:z,ariaCurrent:null,ariaDescribedBy:z,ariaDetails:null,ariaDisabled:Ne,ariaDropEffect:z,ariaErrorMessage:null,ariaExpanded:Ne,ariaFlowTo:z,ariaGrabbed:Ne,ariaHasPopup:null,ariaHidden:Ne,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:z,ariaLevel:R,ariaLive:null,ariaModal:Ne,ariaMultiLine:Ne,ariaMultiSelectable:Ne,ariaOrientation:null,ariaOwns:z,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:Ne,ariaReadOnly:Ne,ariaRelevant:null,ariaRequired:Ne,ariaRoleDescription:z,ariaRowCount:R,ariaRowIndex:R,ariaRowSpan:R,ariaSelected:Ne,ariaSetSize:R,ariaSort:null,ariaValueMax:R,ariaValueMin:R,ariaValueNow:R,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ue(e,t){return t in e?e[t]:t}function We(e,t){return Ue(e,t.toLowerCase())}var Ge=Ve({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Fe,acceptCharset:z,accessKey:z,action:null,allow:null,allowFullScreen:L,allowPaymentRequest:L,allowUserMedia:L,alt:null,as:null,async:L,autoCapitalize:null,autoComplete:z,autoFocus:L,autoPlay:L,blocking:z,capture:null,charSet:null,checked:L,cite:null,className:z,cols:R,colSpan:null,content:null,contentEditable:Ne,controls:L,controlsList:z,coords:R|Fe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:L,defer:L,dir:null,dirName:null,disabled:L,download:Pe,draggable:Ne,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:L,formTarget:null,headers:z,height:R,hidden:Pe,high:R,href:null,hrefLang:null,htmlFor:z,httpEquiv:z,id:null,imageSizes:null,imageSrcSet:null,inert:L,inputMode:null,integrity:null,is:null,isMap:L,itemId:null,itemProp:z,itemRef:z,itemScope:L,itemType:z,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:L,low:R,manifest:null,max:null,maxLength:R,media:null,method:null,min:null,minLength:R,multiple:L,muted:L,name:null,nonce:null,noModule:L,noValidate:L,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:L,optimum:R,pattern:null,ping:z,placeholder:null,playsInline:L,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:L,referrerPolicy:null,rel:z,required:L,reversed:L,rows:R,rowSpan:R,sandbox:z,scope:null,scoped:L,seamless:L,selected:L,shadowRootClonable:L,shadowRootDelegatesFocus:L,shadowRootMode:null,shape:null,size:R,sizes:null,slot:null,span:R,spellCheck:Ne,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R,step:null,style:null,tabIndex:R,target:null,title:null,translate:null,type:null,typeMustMatch:L,useMap:null,value:Ne,width:R,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:z,axis:null,background:null,bgColor:null,border:R,borderColor:null,bottomMargin:R,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:L,declare:L,event:null,face:null,frame:null,frameBorder:null,hSpace:R,leftMargin:R,link:null,longDesc:null,lowSrc:null,marginHeight:R,marginWidth:R,noResize:L,noHref:L,noShade:L,noWrap:L,object:null,profile:null,prompt:null,rev:null,rightMargin:R,rules:null,scheme:null,scrolling:Ne,standby:null,summary:null,text:null,topMargin:R,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:L,disableRemotePlayback:L,prefix:null,property:null,results:R,security:null,unselectable:null},space:`html`,transform:We}),Ke=Ve({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ie,accentHeight:R,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R,amplitude:R,arabicForm:null,ascent:R,attributeName:null,attributeType:null,azimuth:R,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R,by:null,calcMode:null,capHeight:R,className:z,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:R,diffuseConstant:R,direction:null,display:null,dur:null,divisor:R,dominantBaseline:null,download:L,dx:null,dy:null,edgeMode:null,editable:null,elevation:R,enableBackground:null,end:null,event:null,exponent:R,externalResourcesRequired:null,fill:null,fillOpacity:R,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Fe,g2:Fe,glyphName:Fe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R,horizOriginX:R,horizOriginY:R,id:null,ideographic:R,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R,k:R,k1:R,k2:R,k3:R,k4:R,kernelMatrix:Ie,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:R,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:R,overlineThickness:R,paintOrder:null,panose1:null,path:null,pathLength:R,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:z,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R,pointsAtY:R,pointsAtZ:R,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ie,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ie,rev:Ie,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ie,requiredFeatures:Ie,requiredFonts:Ie,requiredFormats:Ie,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:R,specularExponent:R,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R,strikethroughThickness:R,string:null,stroke:null,strokeDashArray:Ie,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R,strokeOpacity:R,strokeWidth:null,style:null,surfaceScale:R,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ie,tabIndex:R,tableValues:null,target:null,targetX:R,targetY:R,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ie,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R,underlineThickness:R,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R,values:null,vAlphabetic:R,vMathematical:R,vectorEffect:null,vHanging:R,vIdeographic:R,version:null,vertAdvY:R,vertOriginX:R,vertOriginY:R,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ue}),qe=Ve({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Je=Ve({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:We}),Ye=Ve({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Xe={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Ze=/[A-Z]/g,Qe=/-[a-z]/g,$e=/^data[-\w.:]+$/i;function et(e,t){let n=ke(t),r=t,i=Ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&$e.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Qe,nt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Qe.test(e)){let n=e.replace(Ze,tt);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ze}return new i(r,t)}function tt(e){return`-`+e.toLowerCase()}function nt(e){return e.charAt(1).toUpperCase()}var rt=Oe([He,Ge,qe,Je,Ye],`html`),it=Oe([He,Ke,qe,Je,Ye],`svg`);function at(e){return e.join(` `).trim()}var ot=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
3
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),st=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(ot());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),ct=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),lt=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(st()),i=ct();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),ut=ft(`end`),dt=ft(`start`);function ft(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function pt(e){let t=dt(e),n=ut(e);if(t&&n)return{start:t,end:n}}function mt(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?gt(e.position):`start`in e||`end`in e?gt(e):`line`in e||`column`in e?ht(e):``}function ht(e){return _t(e&&e.line)+`:`+_t(e&&e.column)}function gt(e){return ht(e&&e.start)+`-`+ht(e&&e.end)}function _t(e){return e&&typeof e==`number`?e:1}var vt=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=mt(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};vt.prototype.file=``,vt.prototype.name=``,vt.prototype.reason=``,vt.prototype.message=``,vt.prototype.stack=``,vt.prototype.column=void 0,vt.prototype.line=void 0,vt.prototype.ancestors=void 0,vt.prototype.cause=void 0,vt.prototype.fatal=void 0,vt.prototype.place=void 0,vt.prototype.ruleId=void 0,vt.prototype.source=void 0;var yt=t(lt(),1),bt={}.hasOwnProperty,xt=new Map,St=/[A-Z]/g,Ct=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),wt=new Set([`td`,`th`]),Tt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Et(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Lt(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=It(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?it:rt,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Dt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Dt(e,t,n){if(t.type===`element`)return Ot(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return kt(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return jt(e,t,n);if(t.type===`mdxjsEsm`)return At(e,t);if(t.type===`root`)return Mt(e,t,n);if(t.type===`text`)return Nt(e,t)}function Ot(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=it,e.schema=i),e.ancestors.push(t);let a=Ut(e,t.tagName,!1),o=Rt(e,t),s=Bt(e,t);return Ct.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Te(e)})),Pt(e,o,a,t),Ft(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function kt(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Wt(e,t.position)}function At(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wt(e,t.position)}function jt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=it,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Ut(e,t.name,!0),o=zt(e,t),s=Bt(e,t);return Pt(e,o,a,t),Ft(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Mt(e,t,n){let r={};return Ft(r,Bt(e,t)),e.create(t,e.Fragment,r,n)}function Nt(e,t){return t.value}function Pt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ft(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function It(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Lt(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=dt(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Rt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&bt.call(t.properties,i)){let a=Vt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&wt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function zt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Wt(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Wt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Bt(e,t){let n=[],r=-1,i=e.passKeys?new Map:xt;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Dt(e,a,o);s!==void 0&&n.push(s)}return n}function Vt(e,t,n){let r=et(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ye(n):at(n)),r.property===`style`){let t=typeof n==`object`?n:Ht(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Gt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Xe[r.property]||r.property:r.attribute,n]}}function Ht(e,t){try{return(0,yt.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new vt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Tt+`#cannot-parse-style-attribute`,r}}function Ut(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Ce(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Ce(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return bt.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wt(e)}function Wt(e,t){let n=new vt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Tt+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Gt(e){let t={},n;for(n in e)bt.call(e,n)&&(t[Kt(n)]=e[n]);return t}function Kt(e){let t=e.replace(St,qt);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function qt(e){return`-`+e.toLowerCase()}var Jt={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Yt={};function Xt(e,t){let n=t||Yt;return Zt(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Zt(e,t,n){if($t(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Qt(e.children,t,n)}return Array.isArray(e)?Qt(e,t,n):``}function Qt(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Zt(e[i],t,n);return r.join(``)}function $t(e){return!!(e&&typeof e==`object`)}var en=document.createElement(`i`);function tn(e){let t=`&`+e+`;`;en.innerHTML=t;let n=en.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function nn(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function rn(e,t){return e.length>0?(nn(e,e.length,0,t),e):t}var an={}.hasOwnProperty;function on(e){let t={},n=-1;for(;++n<e.length;)sn(t,e[n]);return t}function sn(e,t){let n;for(n in t){let r=(an.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){an.call(r,a)||(r[a]=[]);let e=i[a];cn(r[a],Array.isArray(e)?e:e?[e]:[])}}}function cn(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);nn(e,0,0,r)}function ln(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function un(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var dn=bn(/[A-Za-z]/),fn=bn(/[\dA-Za-z]/),pn=bn(/[#-'*+\--9=?A-Z^-~]/);function mn(e){return e!==null&&(e<32||e===127)}var hn=bn(/\d/),gn=bn(/[\dA-Fa-f]/),_n=bn(/[!-/:-@[-`{-~]/);function B(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}var vn=bn(/\p{P}|\p{S}/u),yn=bn(/\s/);function bn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function xn(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&fn(e.charCodeAt(n+1))&&fn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function U(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return H(r)?(e.enter(n),s(r)):t(r)}function s(r){return H(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Sn={tokenize:Cn};function Cn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),U(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return B(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var wn={tokenize:En},Tn={tokenize:Dn};function En(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return nn(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Tn,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Tn,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return B(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;nn(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Dn(e,t,n){return U(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function On(e){if(e===null||V(e)||yn(e))return 1;if(vn(e))return 2}function kn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var An={name:`attention`,resolveAll:jn,tokenize:Mn};function jn(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Nn(d,-c),Nn(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=rn(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=rn(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=rn(l,kn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=rn(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=rn(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,nn(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Mn(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=On(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=On(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Nn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Pn={name:`autolink`,tokenize:Fn};function Fn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return dn(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||fn(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||fn(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||mn(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):pn(t)?(e.consume(t),l):n(t)}function u(e){return fn(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||fn(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var In={partial:!0,tokenize:Ln};function Ln(e,t,n){return r;function r(t){return H(t)?U(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||B(e)?t(e):n(e)}}var Rn={continuation:{tokenize:Bn},exit:Vn,name:`blockQuote`,tokenize:zn};function zn(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return H(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Bn(e,t,n){let r=this;return i;function i(t){return H(t)?U(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Rn,t,n)(r)}}function Vn(e){e.exit(`blockQuote`)}var Hn={name:`characterEscape`,tokenize:Un};function Un(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return _n(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Wn={name:`characterReference`,tokenize:Gn};function Gn(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=fn,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=gn,u):(e.enter(`characterReferenceValue`),a=7,o=hn,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===fn&&!tn(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Kn={partial:!0,tokenize:Yn},qn={concrete:!0,name:`codeFenced`,tokenize:Jn};function Jn(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),H(t)?U(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||B(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Kn,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||B(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),U(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||B(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||B(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&H(t)?U(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||B(t)?e.check(Kn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||B(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),H(t)?U(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),H(t)?U(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||B(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Yn(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Xn={name:`codeIndented`,tokenize:Qn},Zn={partial:!0,tokenize:$n};function Qn(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),U(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):B(t)?e.attempt(Zn,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||B(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function $n(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):U(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):B(e)?i(e):n(e)}}var er={name:`codeText`,previous:nr,resolve:tr,tokenize:rr};function tr(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function nr(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function rr(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||B(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var ir=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ar(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ar(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ar(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);ar(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ar(this.left,t.reverse())}}}};function ar(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function or(e){let t={},n=-1,r,i,a,o,s,c,l,u=new ir(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,sr(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return nn(e,0,1/0,u.slice(0)),!l}function sr(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var cr={resolve:ur,tokenize:dr},lr={partial:!0,tokenize:fr};function ur(e){return or(e),e}function dr(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):B(t)?e.check(lr,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function fr(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),U(e,a,`linePrefix`)}function a(i){if(i===null||B(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function pr(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||mn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||B(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||V(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||mn(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function mr(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):B(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||B(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!H(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function hr(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),U(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||B(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function gr(e,t){let n;return r;function r(i){return B(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):H(i)?U(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var _r={name:`definition`,tokenize:yr},vr={partial:!0,tokenize:br};function yr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return mr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=un(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return V(t)?gr(e,l)(t):l(t)}function l(t){return pr(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(vr,d,d)(t)}function d(t){return H(t)?U(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||B(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function br(e,t,n){return r;function r(t){return V(t)?gr(e,i)(t):n(t)}function i(t){return hr(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return H(t)?U(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||B(e)?t(e):n(e)}}var xr={name:`hardBreakEscape`,tokenize:Sr};function Sr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return B(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Cr={name:`headingAtx`,resolve:wr,tokenize:Tr};function wr(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},nn(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Tr(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||V(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||B(n)?(e.exit(`atxHeading`),t(n)):H(n)?U(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||V(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Er=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Dr=[`pre`,`script`,`style`,`textarea`],Or={concrete:!0,name:`htmlFlow`,resolveTo:jr,tokenize:Mr},kr={partial:!0,tokenize:Pr},Ar={partial:!0,tokenize:Nr};function jr(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Mr(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ne):dn(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):dn(a)?(e.consume(a),i=4,r.interrupt?t:ne):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ne):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return dn(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||V(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Dr.includes(l)?(i=1,r.interrupt?t(s):O(s)):Er.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||fn(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return H(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||dn(t)?(e.consume(t),b):H(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||fn(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):H(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):H(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||B(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||V(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||H(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||B(t)?O(t):H(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),re):t===63&&i===3?(e.consume(t),ne):t===93&&i===5?(e.consume(t),N):B(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(kr,ie,k)(t)):t===null||B(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Ar,A,ie)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||B(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),ne):O(t)}function M(t){return t===47?(e.consume(t),o=``,te):O(t)}function te(t){if(t===62){let n=o.toLowerCase();return Dr.includes(n)?(e.consume(t),re):O(t)}return dn(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),te):O(t)}function N(t){return t===93?(e.consume(t),ne):O(t)}function ne(t){return t===62?(e.consume(t),re):t===45&&i===2?(e.consume(t),ne):O(t)}function re(t){return t===null||B(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function Nr(e,t,n){let r=this;return i;function i(t){return B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Pr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(In,t,n)}}var Fr={name:`htmlText`,tokenize:Ir};function Ir(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):dn(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):dn(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):B(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):B(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):B(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):B(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return dn(t)?(e.consume(t),S):n(t)}function S(t){return t===45||fn(t)?(e.consume(t),S):C(t)}function C(t){return B(t)?(o=C,M(t)):H(t)?(e.consume(t),C):j(t)}function w(t){return t===45||fn(t)?(e.consume(t),w):t===47||t===62||V(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||dn(t)?(e.consume(t),E):B(t)?(o=T,M(t)):H(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||fn(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):B(t)?(o=D,M(t)):H(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):B(t)?(o=O,M(t)):H(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):B(t)?(o=k,M(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||V(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||V(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return H(t)?U(e,N,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):N(t)}function N(t){return e.enter(`htmlTextData`),o(t)}}var Lr={name:`labelEnd`,resolveAll:Vr,resolveTo:Hr,tokenize:Ur},Rr={tokenize:Wr},zr={tokenize:Gr},Br={tokenize:Kr};function Vr(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&nn(e,0,e.length,n),e}function Hr(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=rn(s,e.slice(a+1,a+r+3)),s=rn(s,[[`enter`,u,t]]),s=rn(s,kn(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=rn(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=rn(s,e.slice(o+1)),s=rn(s,[[`exit`,c,t]]),nn(e,a,e.length,s),e}function Ur(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(un(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Rr,u,o?u:d)(t):t===91?e.attempt(zr,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Br,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Wr(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return V(t)?gr(e,a)(t):a(t)}function a(t){return t===41?u(t):pr(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return V(t)?gr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?hr(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return V(t)?gr(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Gr(e,t,n){let r=this;return i;function i(t){return mr.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(un(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Kr(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var qr={name:`labelStartImage`,resolveAll:Lr.resolveAll,tokenize:Jr};function Jr(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Yr={name:`labelStartLink`,resolveAll:Lr.resolveAll,tokenize:Xr};function Xr(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Zr={name:`lineEnding`,tokenize:Qr};function Qr(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),U(e,t,`linePrefix`)}}var $r={name:`thematicBreak`,tokenize:ei};function ei(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||B(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),H(t)?U(e,s,`whitespace`)(t):s(t))}}var ti={continuation:{tokenize:ai},exit:si,name:`list`,tokenize:ii},ni={partial:!0,tokenize:ci},ri={partial:!0,tokenize:oi};function ii(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:hn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check($r,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return hn(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(In,r.interrupt?n:u,e.attempt(ni,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return H(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ai(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(In,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!H(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ri,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(ti,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function oi(e,t,n){let r=this;return U(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function si(e){e.exit(this.containerState.type)}function ci(e,t,n){let r=this;return U(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!H(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var li={name:`setextUnderline`,resolveTo:ui,tokenize:di};function ui(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function di(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),H(t)?U(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||B(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var fi={tokenize:pi};function pi(e){let t=this,n=e.attempt(In,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(cr,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var mi={resolveAll:vi()},hi=_i(`string`),gi=_i(`text`);function _i(e){return{resolveAll:vi(e===`text`?yi:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function vi(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function yi(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var bi=e({attentionMarkers:()=>Oi,contentInitial:()=>Si,disable:()=>ki,document:()=>xi,flow:()=>wi,flowInitial:()=>Ci,insideSpan:()=>Di,string:()=>Ti,text:()=>Ei}),xi={42:ti,43:ti,45:ti,48:ti,49:ti,50:ti,51:ti,52:ti,53:ti,54:ti,55:ti,56:ti,57:ti,62:Rn},Si={91:_r},Ci={[-2]:Xn,[-1]:Xn,32:Xn},wi={35:Cr,42:$r,45:[li,$r],60:Or,61:li,95:$r,96:qn,126:qn},Ti={38:Wn,92:Hn},Ei={[-5]:Zr,[-4]:Zr,[-3]:Zr,33:qr,38:Wn,42:An,60:[Pn,Fr],91:Yr,92:[xr,Hn],93:Lr,95:An,96:er},Di={null:[An,mi]},Oi={null:[42,95]},ki={null:[]};function Ai(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=rn(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=kn(a,l.events,l),l.events):[]}function f(e,t){return Mi(p(e),t)}function p(e){return ji(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){B(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&nn(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ji(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Mi(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
4
|
+
`;break;case-3:o=`\r
|
|
5
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Ni(e){let t={constructs:on([bi,...(e||{}).extensions||[]]),content:n(Sn),defined:[],document:n(wn),flow:n(fi),lazy:{},string:n(hi),text:n(gi)};return t;function n(e){return n;function n(n){return Ai(t,e,n)}}}function Pi(e){for(;!or(e););return e}var Fi=/[\0\t\n\r]/g;function Ii(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Fi.lastIndex=u,c=Fi.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Li=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ri(e){return e.replace(Li,zi)}function zi(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return ln(n.slice(t?2:1),t?16:10)}return tn(n)||e}var Bi={}.hasOwnProperty;function Vi(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Hi(n)(Pi(Ni(n).document().write(Ii()(e,t,!0))))}function Hi(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ve),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(I),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(ve),listItem:a(be),listItemValue:f,listOrdered:a(ye,d),listUnordered:a(ye),paragraph:a(xe),reference:ae,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(Se),thematicBreak:a(we)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:F,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:P,characterReferenceMarkerNumeric:P,characterReferenceValue:se,characterReference:ce,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ee),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(M),label:N,labelText:te,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:oe,resourceDestinationString:ne,resourceTitleString:re,resource:ie,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Wi(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Bi.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Ki).call(a,void 0,e[0])}for(r.position={start:Ui(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ui(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Ui(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Ki).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+mt({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Ui(e.end)}function u(){return Xt(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=un(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ce(),n.position={start:Ui(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ui(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Ui(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Ri(t),n.identifier=un(t).toLowerCase()}function N(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ie(){this.data.inReference=void 0}function ae(){this.data.referenceType=`collapsed`}function oe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=un(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function P(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=ln(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=tn(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=Ui(e.end)}function le(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function F(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function I(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function ve(){return{type:`link`,title:null,url:``,children:[]}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function xe(){return{type:`paragraph`,children:[]}}function Se(){return{type:`strong`,children:[]}}function Ce(){return{type:`text`,value:``}}function we(){return{type:`thematicBreak`}}}function Ui(e){return{line:e.line,column:e.column,offset:e.offset}}function Wi(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Wi(e,r):Gi(e,r)}}function Gi(e,t){let n;for(n in t)if(Bi.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Ki(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+mt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+mt({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+mt({start:t.start,end:t.end})+`) is still open`)}function qi(e){let t=this;t.parser=n;function n(n){return Vi(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Ji(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Yi(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
6
|
+
`}]}function Xi(e,t){let n=t.value?t.value+`
|
|
7
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Zi(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qi(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $i(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=xn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function ea(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ta(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function na(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function ra(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return na(e,t);let i={src:xn(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function ia(e,t){let n={src:xn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function aa(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function oa(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return na(e,t);let i={href:xn(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function sa(e,t){let n={href:xn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ca(e,t,n){let r=e.all(t),i=n?la(n):ua(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
8
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
9
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function la(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=ua(n[r])}return t}function ua(e){return e.spread??e.children.length>1}function da(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function fa(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pa(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ma(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ha(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=dt(t.children[1]),o=ut(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function ga(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function _a(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var va=9,ya=32;function ba(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(xa(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(xa(t.slice(i),i>0,!1)),a.join(``)}function xa(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===va||t===ya;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===va||t===ya;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Sa(e,t){let n={type:`text`,value:ba(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ca(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var wa={blockquote:Ji,break:Yi,code:Xi,delete:Zi,emphasis:Qi,footnoteReference:$i,heading:ea,html:ta,imageReference:ra,image:ia,inlineCode:aa,linkReference:oa,link:sa,listItem:ca,list:da,paragraph:fa,root:pa,strong:ma,table:ha,tableCell:_a,tableRow:ga,text:Sa,thematicBreak:Ca,toml:Ta,yaml:Ta,definition:Ta,footnoteDefinition:Ta};function Ta(){}var Ea=typeof self==`object`?self:globalThis,Da=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Ea[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Ea[a](o),i)};return r},Oa=e=>Da(new Map,e)(0),ka=``,{toString:Aa}={},{keys:ja}=Object,Ma=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Aa.call(e).slice(8,-1);switch(n){case`Array`:return[1,ka];case`Object`:return[2,ka];case`Date`:return[3,ka];case`RegExp`:return[4,ka];case`Map`:return[5,ka];case`Set`:return[6,ka];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Na=([e,t])=>e===0&&(t===`function`||t===`symbol`),Pa=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Ma(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of ja(r))(e||!Na(Ma(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Na(Ma(n))||Na(Ma(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Na(Ma(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Fa=(e,{json:t,lossy:n}={})=>{let r=[];return Pa(!(t||n),!!t,new Map,r)(e),r},Ia=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Oa(Fa(e,t)):structuredClone(e):(e,t)=>Oa(Fa(e,t));function La(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Ra(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function za(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||La,r=e.options.footnoteBackLabel||Ra,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=xn(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Ia(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
10
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
11
|
+
`}]}}var Ba=(function(e){if(e==null)return Ga;if(typeof e==`function`)return Wa(e);if(typeof e==`object`)return Array.isArray(e)?Va(e):Ha(e);if(typeof e==`string`)return Ua(e);throw Error(`Expected function, string, or object as test`)});function Va(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Ba(e[n]);return Wa(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Ha(e){let t=e;return Wa(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Ua(e){return Wa(t);function t(t){return t&&t.type===e}}function Wa(e){return t;function t(t,n,r){return!!(Ka(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Ga(){return!0}function Ka(e){return typeof e==`object`&&!!e&&`type`in e}function qa(e){return e}var Ja=[];function Ya(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Ba(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+qa(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Ja,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Xa(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Xa(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Ja:[e]}function Za(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Ya(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Qa={}.hasOwnProperty,$a={};function eo(e,t){let n=t||$a,r=new Map,i=new Map,a={all:s,applyData:no,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...wa,...n.handlers},one:o,options:n,patch:to,wrap:io};return Za(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Qa.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Ia(n);return r.children=a.all(e),r}return Ia(e)}return(a.options.unknownHandler||ro)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=ao(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=ao(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function to(e,t){e.position&&(t.position=pt(e))}function no(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Ia(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function ro(e,t){let n=t.data||{},r=`value`in t&&!(Qa.call(n,`hProperties`)||Qa.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function io(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
12
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
13
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
14
|
+
`}),n}function ao(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function oo(e,t){let n=eo(e,t),r=n.one(e,void 0),i=za(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
15
|
+
`},i)),a}function so(e,t){return e&&`run`in e?async function(n,r){let i=oo(n,{file:r,...t});await e.run(i,r)}:function(n,r){return oo(n,{file:r,...e||t})}}function co(e){if(e)throw e}var lo=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function uo(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function fo(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?po(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function po(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var mo={basename:ho,dirname:go,extname:_o,join:vo,sep:`/`};function ho(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);xo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function go(e){if(xo(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function _o(e){xo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function vo(...e){let t=-1,n;for(;++t<e.length;)xo(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:yo(n)}function yo(e){xo(e);let t=e.codePointAt(0)===47,n=bo(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function bo(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function xo(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var So={cwd:Co};function Co(){return`/`}function wo(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function To(e){if(typeof e==`string`)e=new URL(e);else if(!wo(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Eo(e)}function Eo(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Do=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Oo=class{constructor(e){let t;t=e?wo(e)?{path:e}:typeof e==`string`||Mo(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:So.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Do.length;){let e=Do[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Do.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?mo.basename(this.path):void 0}set basename(e){Ao(e,`basename`),ko(e,`basename`),this.path=mo.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?mo.dirname(this.path):void 0}set dirname(e){jo(this.basename,`dirname`),this.path=mo.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?mo.extname(this.path):void 0}set extname(e){if(ko(e,`extname`),jo(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=mo.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){wo(e)&&(e=To(e)),Ao(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?mo.basename(this.path,this.extname):void 0}set stem(e){Ao(e,`stem`),ko(e,`stem`),this.path=mo.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new vt(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ko(e,t){if(e&&e.includes(mo.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+mo.sep+"`")}function Ao(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function jo(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Mo(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var No=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Po=t(lo(),1),Fo={}.hasOwnProperty,Io=new class e extends No{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=fo()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Po.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(zo(`data`,this.frozen),this.namespace[e]=t,this):Fo.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zo(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Ho(e),n=this.parser||this.Parser;return Lo(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Lo(`process`,this.parser||this.Parser),Ro(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Ho(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Wo(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Lo(`processSync`,this.parser||this.Parser),Ro(`processSync`,this.compiler||this.Compiler),this.process(e,r),Vo(`processSync`,`process`,t),n;function r(e,r){t=!0,co(e),n=r}}run(e,t,n){Bo(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Ho(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Vo(`runSync`,`run`,n),r;function i(e,t){co(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Ho(t),r=this.compiler||this.Compiler;return Ro(`stringify`,r),Bo(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(zo(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Po.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];uo(o)&&uo(r)&&(r=(0,Po.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Lo(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Ro(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function zo(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Bo(e){if(!uo(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Vo(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ho(e){return Uo(e)?e:new Oo(e)}function Uo(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Wo(e){return typeof e==`string`||Go(e)}function Go(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ko=[],qo={allowDangerousHtml:!0},Jo=/^(https?|ircs?|mailto|xmpp)$/i,Yo=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Xo(e){let t=Zo(e),n=Qo(e);return $o(t.runSync(t.parse(n),n),e)}function Zo(e){let t=e.rehypePlugins||Ko,n=e.remarkPlugins||Ko,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qo}:qo;return Io().use(qi).use(n).use(so,r).use(t)}function Qo(e){let t=e.children||``,n=new Oo;return typeof t==`string`?n.value=t:``+t,n}function $o(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||es;for(let e of Yo)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Za(e,l),Et(e,{Fragment:I.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Jt)if(Object.hasOwn(Jt,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Jt[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function es(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Jo.test(e.slice(0,t))?e:``}function ts(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ns(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function rs(e,t,n){let r=Ba((n||{}).ignore||[]),i=is(t),a=-1;for(;++a<i.length;)Ya(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function is(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([as(e[0]),os(e[1])])}return t}function as(e){return typeof e==`string`?new RegExp(ns(e),`g`):e}function os(e){return typeof e==`function`?e:function(){return e}}var ss=`phrasing`,cs=[`autolink`,`link`,`image`,`label`];function ls(){return{transforms:[_s],enter:{literalAutolink:ds,literalAutolinkEmail:fs,literalAutolinkHttp:fs,literalAutolinkWww:fs},exit:{literalAutolink:gs,literalAutolinkEmail:hs,literalAutolinkHttp:ps,literalAutolinkWww:ms}}}function us(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:ss,notInConstruct:cs},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:ss,notInConstruct:cs},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:ss,notInConstruct:cs}]}}function ds(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function fs(e){this.config.enter.autolinkProtocol.call(this,e)}function ps(e){this.config.exit.autolinkProtocol.call(this,e)}function ms(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function hs(e){this.config.exit.autolinkEmail.call(this,e)}function gs(e){this.exit(e)}function _s(e){rs(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vs],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ys]],{ignore:[`link`,`linkReference`]})}function vs(e,t,n,r,i){let a=``;if(!Ss(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!bs(n)))return!1;let o=xs(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function ys(e,t,n,r){return!Ss(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function bs(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function xs(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=ts(e,`(`),a=ts(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Ss(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||yn(n)||vn(n))&&(!t||n!==47)}Ms.peek=js;function Cs(){this.buffer()}function ws(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Ts(){this.buffer()}function Es(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Ds(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=un(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Os(e){this.exit(e)}function ks(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=un(this.sliceSerialize(e)).toLowerCase(),n.label=t}function As(e){this.exit(e)}function js(){return`[`}function Ms(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Ns(){return{enter:{gfmFootnoteCallString:Cs,gfmFootnoteCall:ws,gfmFootnoteDefinitionLabelString:Ts,gfmFootnoteDefinition:Es},exit:{gfmFootnoteCallString:Ds,gfmFootnoteCall:Os,gfmFootnoteDefinitionLabelString:ks,gfmFootnoteDefinition:As}}}function Ps(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ms},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
16
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Is:Fs))),s(),o}}function Fs(e,t,n){return t===0?e:Is(e,t,n)}function Is(e,t,n){return(n?``:` `)+e}var Ls=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Hs.peek=Us;function Rs(){return{canContainEols:[`delete`],enter:{strikethrough:Bs},exit:{strikethrough:Vs}}}function zs(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Ls}],handlers:{delete:Hs}}}function Bs(e){this.enter({type:`delete`,children:[]},e)}function Vs(e){this.exit(e)}function Hs(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Us(){return`~`}function Ws(e){return e.length}function Gs(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ws,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Ks(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=qs(r[d]);else{let e=qs(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
17
|
+
`)}function Ks(e){return e==null?``:String(e)}function qs(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Js(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Ys);return i(),o}function Ys(e,t,n){return`>`+(n?``:` `)+e}function Xs(e,t){return Zs(e,t.inConstruct,!0)&&!Zs(e,t.notInConstruct,!1)}function Zs(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Qs(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
18
|
+
`&&Xs(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
19
|
+
`}function $s(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function ec(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function tc(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function nc(e,t,n,r){let i=tc(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(ec(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,rc);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max($s(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
20
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
21
|
+
`),a&&(u+=s.move(a+`
|
|
22
|
+
`)),u+=s.move(c),l(),u}function rc(e,t,n){return(n?``:` `)+e}function ic(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ac(e,t,n,r){let i=ic(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
23
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function oc(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function sc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function cc(e,t,n){let r=On(e),i=On(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}lc.peek=uc;function lc(e,t,n,r){let i=oc(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=cc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=sc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=cc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+sc(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function uc(e,t,n){return n.options.emphasis||`*`}function dc(e,t){let n=!1;return Za(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Xt(e)&&(t.options.setext||n))}function fc(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(dc(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
24
|
+
`,after:`
|
|
25
|
+
`});return r(),t(),o+`
|
|
26
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
27
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
28
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=sc(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}pc.peek=mc;function pc(e){return e.value||``}function mc(){return`<`}hc.peek=gc;function hc(e,t,n,r){let i=ic(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function gc(){return`!`}_c.peek=vc;function _c(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function vc(){return`!`}yc.peek=bc;function yc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function bc(){return"`"}function xc(e,t){let n=Xt(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][a-z+.-]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}Sc.peek=Cc;function Sc(e,t,n,r){let i=ic(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(xc(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Cc(e,t,n){return xc(e,n)?`<`:`[`}wc.peek=Tc;function wc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Tc(){return`[`}function Ec(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Dc(e){let t=Ec(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Oc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function kc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ac(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Oc(n):Ec(n),s=e.ordered?o===`.`?`)`:`.`:Dc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),kc(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function jc(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Mc(e,t,n,r){let i=jc(n),a=n.bulletCurrent||Ec(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Nc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Pc=Ba([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Fc(e,t,n,r){return(e.children.some(function(e){return Pc(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ic(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Lc.peek=Rc;function Lc(e,t,n,r){let i=Ic(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=cc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=sc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=cc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+sc(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Rc(e,t,n){return n.options.strong||`*`}function zc(e,t,n,r){return n.safe(e.value,r)}function Bc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Vc(e,t,n){let r=(kc(n)+(n.options.ruleSpaces?` `:``)).repeat(Bc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Hc={blockquote:Js,break:Qs,code:nc,definition:ac,emphasis:lc,hardBreak:Qs,heading:fc,html:pc,image:hc,imageReference:_c,inlineCode:yc,link:Sc,linkReference:wc,list:Ac,listItem:Mc,paragraph:Nc,root:Fc,strong:Lc,text:zc,thematicBreak:Vc};function Uc(){return{enter:{table:Wc,tableData:Jc,tableHeader:Jc,tableRow:Kc},exit:{codeText:Yc,table:Gc,tableData:qc,tableHeader:qc,tableRow:qc}}}function Wc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Gc(e){this.exit(e),this.data.inTable=void 0}function Kc(e){this.enter({type:`tableRow`,children:[]},e)}function qc(e){this.exit(e)}function Jc(e){this.enter({type:`tableCell`,children:[]},e)}function Yc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Xc));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Xc(e,t){return t===`|`?t:e}function Zc(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
29
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
30
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Gs(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Hc.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Qc(){return{exit:{taskListCheckValueChecked:el,taskListCheckValueUnchecked:el,paragraph:tl}}}function $c(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:nl}}}function el(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function tl(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function nl(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Hc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function rl(){return[ls(),Ns(),Rs(),Uc(),Qc()]}function il(e){return{extensions:[us(),Ps(e),zs(),Zc(e),$c()]}}var al={tokenize:yl,partial:!0},ol={tokenize:bl,partial:!0},sl={tokenize:xl,partial:!0},cl={tokenize:Sl,partial:!0},ll={tokenize:Cl,partial:!0},ul={name:`wwwAutolink`,tokenize:_l,previous:wl},dl={name:`protocolAutolink`,tokenize:vl,previous:Tl},fl={name:`emailAutolink`,tokenize:gl,previous:El},pl={};function ml(){return{text:pl}}for(var hl=48;hl<123;)pl[hl]=fl,hl++,hl===58?hl=65:hl===91&&(hl=97);pl[43]=fl,pl[45]=fl,pl[46]=fl,pl[95]=fl,pl[72]=[fl,dl],pl[104]=[fl,dl],pl[87]=[fl,ul],pl[119]=[fl,ul];function gl(e,t,n){let r=this,i,a;return o;function o(t){return!Dl(t)||!El.call(r,r.previous)||Ol(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Dl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(ll,u,l)(t):t===45||t===95||fn(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&dn(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function _l(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!wl.call(r,r.previous)||Ol(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(al,e.attempt(ol,e.attempt(sl,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function vl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Tl.call(r,r.previous)&&!Ol(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(dn(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||mn(t)||V(t)||yn(t)||vn(t)?n(t):e.attempt(ol,e.attempt(sl,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function yl(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function bl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(cl,c,s)(t):t===null||V(t)||yn(t)||t!==45&&vn(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function xl(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(cl,t,a)(o):o===null||V(o)||yn(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Sl(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||V(o)||yn(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||V(e)||yn(e)?t(e):r(e)}function a(e){return dn(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):dn(t)?(e.consume(t),o):n(t)}}function Cl(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return fn(e)?n(e):t(e)}}function wl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function Tl(e){return!dn(e)}function El(e){return!(e===47||Dl(e))}function Dl(e){return e===43||e===45||e===46||e===95||fn(e)}function Ol(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var kl={tokenize:Ll,partial:!0};function Al(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Pl,continuation:{tokenize:Fl},exit:Il}},text:{91:{name:`gfmFootnoteCall`,tokenize:Nl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:jl,resolveTo:Ml}}}}function jl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=un(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Ml(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Nl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||V(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(un(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return V(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Pl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||V(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=un(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return V(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),U(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Fl(e,t,n){return e.check(In,t,e.attempt(kl,t,n))}function Il(e){e.exit(`gfmFootnoteDefinition`)}function Ll(e,t,n){let r=this;return U(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Rl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&nn(o,o.length,0,kn(s,e.slice(r+1,n),t)),nn(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),nn(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=On(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=On(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var zl=class{constructor(){this.map=[]}add(e,t,n){Bl(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Bl(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Vl(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Hl(){return{flow:{null:{name:`table`,tokenize:Ul,resolveAll:Wl}}}}function Ul(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):B(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):H(t)?U(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||V(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,H(t)?U(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return H(t)?U(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||B(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return H(t)?U(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||B(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||B(n)?(e.exit(`tableRow`),t(n)):H(n)?U(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||V(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Wl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new zl;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Kl(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Gl(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Gl(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Gl(f,t,o,i,n,d)):(o[0]=o[1],d=Gl(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Kl(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Vl(t.events,n))}return e}function Gl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},ql(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=ql(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=ql(t.events,n[2]),a=ql(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},ql(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Kl(e,t,n,r,i){let a=[],o=ql(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function ql(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Jl={name:`tasklistCheck`,tokenize:Xl};function Yl(){return{text:{91:Jl}}}function Xl(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return V(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return B(r)?t(r):H(r)?e.check({tokenize:Zl},t,n)(r):n(r)}}function Zl(e,t,n){return U(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Ql(e){return on([ml(),Al(),Rl(e),Hl(),Yl()])}var $l={};function eu(e){let t=this,n=e||$l,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Ql(n)),a.push(rl()),o.push(il(n))}var tu=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m5 12l7-7l7 7m-7 7V5`})]})),nu=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,I.jsx)(`rect`,{width:18,height:18,x:3,y:3,rx:2,ry:2}),(0,I.jsx)(`circle`,{cx:9,cy:9,r:2}),(0,I.jsx)(`path`,{d:`m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21`})]})]})),ru=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,I.jsx)(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),(0,I.jsx)(`path`,{d:`M3 3v5h5`})]})]})),iu=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M10 5H3m9 14H3M14 3v4m2 10v4m5-9h-9m9 7h-5m5-14h-7m-6 5v4m0-2H3`})]})),au=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsx)(`rect`,{width:18,height:18,x:3,y:3,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,rx:2})]})),ou=(0,F.forwardRef)(({title:e,titleId:t,...n},r)=>(0,I.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,I.jsx)(`title`,{id:t,children:e}):null,(0,I.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M18 6L6 18M6 6l12 12`})]})),su=`/assets/chat-icon-JYfue7fB.png`,cu=n(((e,t)=>{t.exports=TypeError})),lu=n(((e,t)=>{t.exports={}})),uu=n(((e,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype?WeakMap.prototype.has:null,d=typeof WeakSet==`function`&&WeakSet.prototype?WeakSet.prototype.has:null,f=typeof WeakRef==`function`&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,h=Function.prototype.toString,g=String.prototype.match,_=String.prototype.slice,v=String.prototype.replace,y=String.prototype.toUpperCase,b=String.prototype.toLowerCase,x=RegExp.prototype.test,S=Array.prototype.concat,C=Array.prototype.join,w=Array.prototype.slice,T=Math.floor,E=typeof BigInt==`function`?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,O=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,k=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,A=typeof Symbol==`function`&&Symbol.toStringTag?Symbol.toStringTag:null,ee=Object.prototype.propertyIsEnumerable,j=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-T(-e):T(e);if(r!==e){var i=String(r),a=_.call(t,i.length+1);return v.call(i,n,`$&_`)+`.`+v.call(v.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return v.call(t,n,`$&_`)}var te=lu(),N=te.custom,ne=fe(N)?N:null,re={__proto__:null,double:`"`,single:`'`},ie={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(he(s,`quoteStyle`)&&!he(re,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(he(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!he(s,`customInspect`)||s.customInspect;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(he(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(he(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return Te(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?M(t,f):f}if(typeof t==`bigint`){var m=String(t)+`n`;return d?M(t,m):m}var h=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=h&&h>0&&typeof t==`object`)return se(t)?`[Array]`:`[Object]`;var g=je(s,r);if(o===void 0)o=[];else if(ve(o,t)>=0)return`[Circular]`;function y(t,n,i){if(n&&(o=w.call(o),o.push(n)),i){var a={depth:s.depth};return he(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!le(t)){var x=_e(t),T=L(t,y);return`[Function`+(x?`: `+x:` (anonymous)`)+`]`+(T.length>0?` { `+C.call(T,`, `)+` }`:``)}if(fe(t)){var D=k?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):O.call(t);return typeof t==`object`&&!k?De(D):D}if(we(t)){for(var N=`<`+b.call(String(t.nodeName)),ie=t.attributes||[],P=0;P<ie.length;P++)N+=` `+ie[P].name+`=`+ae(oe(ie[P].value),`double`,s);return N+=`>`,t.childNodes&&t.childNodes.length&&(N+=`...`),N+=`</`+b.call(String(t.nodeName))+`>`,N}if(se(t)){if(t.length===0)return`[]`;var me=L(t,y);return g&&!Ae(me)?`[`+Me(me,g)+`]`:`[ `+C.call(me,`, `)+` ]`}if(F(t)){var Ee=L(t,y);return!(`cause`in Error.prototype)&&`cause`in t&&!ee.call(t,`cause`)?`{ [`+String(t)+`] `+C.call(S.call(`[cause]: `+y(t.cause),Ee),`, `)+` }`:Ee.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+C.call(Ee,`, `)+` }`}if(typeof t==`object`&&u){if(ne&&typeof t[ne]==`function`&&te)return te(t,{depth:h-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(ye(t)){var Ne=[];return a&&a.call(t,function(e,n){Ne.push(y(n,t,!0)+` => `+y(e,t))}),ke(`Map`,i.call(t),Ne,g)}if(Se(t)){var Pe=[];return l&&l.call(t,function(e){Pe.push(y(e,t))}),ke(`Set`,c.call(t),Pe,g)}if(be(t))return Oe(`WeakMap`);if(Ce(t))return Oe(`WeakSet`);if(xe(t))return Oe(`WeakRef`);if(ue(t))return De(y(Number(t)));if(pe(t))return De(y(E.call(t)));if(de(t))return De(p.call(t));if(I(t))return De(y(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!ce(t)&&!le(t)){var R=L(t,y),z=j?j(t)===Object.prototype:t instanceof Object||t.constructor===Object,Fe=t instanceof Object?``:`null prototype`,Ie=!z&&A&&Object(t)===t&&A in t?_.call(ge(t),8,-1):Fe?`Object`:``,Le=(z||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``)+(Ie||Fe?`[`+C.call(S.call([],Ie||[],Fe||[]),`: `)+`] `:``);return R.length===0?Le+`{}`:g?Le+`{`+Me(R,g)+`}`:Le+`{ `+C.call(R,`, `)+` }`}return String(t)};function ae(e,t,n){var r=re[n.quoteStyle||t];return r+e+r}function oe(e){return v.call(String(e),/"/g,`"`)}function P(e){return!A||!(typeof e==`object`&&(A in e||e[A]!==void 0))}function se(e){return ge(e)===`[object Array]`&&P(e)}function ce(e){return ge(e)===`[object Date]`&&P(e)}function le(e){return ge(e)===`[object RegExp]`&&P(e)}function F(e){return ge(e)===`[object Error]`&&P(e)}function I(e){return ge(e)===`[object String]`&&P(e)}function ue(e){return ge(e)===`[object Number]`&&P(e)}function de(e){return ge(e)===`[object Boolean]`&&P(e)}function fe(e){if(k)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!O)return!1;try{return O.call(e),!0}catch{}return!1}function pe(e){if(!e||typeof e!=`object`||!E)return!1;try{return E.call(e),!0}catch{}return!1}var me=Object.prototype.hasOwnProperty||function(e){return e in this};function he(e,t){return me.call(e,t)}function ge(e){return m.call(e)}function _e(e){if(e.name)return e.name;var t=g.call(h.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function ve(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function ye(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function be(e){if(!u||!e||typeof e!=`object`)return!1;try{u.call(e,u);try{d.call(e,d)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function xe(e){if(!f||!e||typeof e!=`object`)return!1;try{return f.call(e),!0}catch{}return!1}function Se(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Ce(e){if(!d||!e||typeof e!=`object`)return!1;try{d.call(e,d);try{u.call(e,u)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function we(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement||typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function Te(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return Te(_.call(e,0,t.maxStringLength),t)+r}var i=ie[t.quoteStyle||`single`];return i.lastIndex=0,ae(v.call(v.call(e,i,`\\$1`),/[\x00-\x1f]/g,Ee),`single`,t)}function Ee(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+y.call(t.toString(16))}function De(e){return`Object(`+e+`)`}function Oe(e){return e+` { ? }`}function ke(e,t,n,r){var i=r?Me(n,r):C.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function Ae(e){for(var t=0;t<e.length;t++)if(ve(e[t],`
|
|
31
|
+
`)>=0)return!1;return!0}function je(e,t){var n;if(e.indent===` `)n=` `;else if(typeof e.indent==`number`&&e.indent>0)n=C.call(Array(e.indent+1),` `);else return null;return{base:n,prev:C.call(Array(t+1),n)}}function Me(e,t){if(e.length===0)return``;var n=`
|
|
32
|
+
`+t.prev+t.base;return n+C.call(e,`,`+n)+`
|
|
33
|
+
`+t.prev}function L(e,t){var n=se(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=he(e,i)?t(e[i],e):``}var a=typeof D==`function`?D(e):[],o;if(k){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e)he(e,c)&&(n&&String(Number(c))===c&&c<e.length||k&&o[`$`+c]instanceof Symbol||(x.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))));if(typeof D==`function`)for(var l=0;l<a.length;l++)ee.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}})),du=n(((e,t)=>{var n=uu(),r=cu(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=c(e,t);return n&&e&&!e.next&&(e=void 0),!!n},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}})),fu=n(((e,t)=>{t.exports=Object})),pu=n(((e,t)=>{t.exports=Error})),mu=n(((e,t)=>{t.exports=EvalError})),hu=n(((e,t)=>{t.exports=RangeError})),gu=n(((e,t)=>{t.exports=ReferenceError})),_u=n(((e,t)=>{t.exports=SyntaxError})),vu=n(((e,t)=>{t.exports=URIError})),yu=n(((e,t)=>{t.exports=Math.abs})),bu=n(((e,t)=>{t.exports=Math.floor})),xu=n(((e,t)=>{t.exports=Math.max})),Su=n(((e,t)=>{t.exports=Math.min})),Cu=n(((e,t)=>{t.exports=Math.pow})),wu=n(((e,t)=>{t.exports=Math.round})),Tu=n(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),Eu=n(((e,t)=>{var n=Tu();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Du=n(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),Ou=n(((e,t)=>{var n=Du();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),ku=n(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),Au=n(((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}})),ju=n(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=Au();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),Mu=n(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),Nu=n(((e,t)=>{t.exports=fu().getPrototypeOf||null})),Pu=n(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=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},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=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`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),Fu=n(((e,t)=>{var n=Pu();t.exports=Function.prototype.bind||n})),Iu=n(((e,t)=>{t.exports=Function.prototype.call})),Lu=n(((e,t)=>{t.exports=Function.prototype.apply})),Ru=n(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),zu=n(((e,t)=>{var n=Fu(),r=Lu(),i=Iu();t.exports=Ru()||n.call(i,r)})),Bu=n(((e,t)=>{var n=Fu(),r=cu(),i=Iu(),a=zu();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),Vu=n(((e,t)=>{var n=Bu(),r=Ou(),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))}})),Hu=n(((e,t)=>{var n=Mu(),r=Nu(),i=Vu();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})),Uu=n(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=Fu().call(n,r)})),Wu=n(((e,t)=>{var n,r=fu(),i=pu(),a=mu(),o=hu(),s=gu(),c=_u(),l=cu(),u=vu(),d=yu(),f=bu(),p=xu(),m=Su(),h=Cu(),g=wu(),_=Eu(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Ou(),x=ku(),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=ju()(),T=Hu(),E=Nu(),D=Mu(),O=Lu(),k=Iu(),A={},ee=typeof Uint8Array>`u`||!T?n:T(Uint8Array),j={__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%":ee,"%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){j[`%Error.prototype%`]=T(T(e))}var M=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 j[t]=n,n},te={__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`]},N=Fu(),ne=Uu(),re=N.call(k,Array.prototype.concat),ie=N.call(O,Array.prototype.splice),ae=N.call(k,String.prototype.replace),oe=N.call(k,String.prototype.slice),P=N.call(k,RegExp.prototype.exec),se=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ce=/\\(\\)?/g,le=function(e){var t=oe(e,0,1),n=oe(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 ae(e,se,function(e,t,n,i){r[r.length]=n?ae(i,ce,`$1`):t||e}),r},F=function(e,t){var n=e,r;if(ne(te,n)&&(r=te[n],n=`%`+r[0]+`%`),ne(j,n)){var i=j[n];if(i===A&&(i=M(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(P(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=le(e),r=n.length>0?n[0]:``,i=F(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],ie(n,re([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=oe(p,0,1),h=oe(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+`%`,ne(j,a))o=j[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=ne(o,p),o=o[p];f&&!s&&(j[a]=o)}}return o}})),Gu=n(((e,t)=>{var n=Wu(),r=Bu(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),Ku=n(((e,t)=>{var n=Wu(),r=Gu(),i=uu(),a=cu(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}})),qu=n(((e,t)=>{var n=Wu(),r=Gu(),i=uu(),a=Ku(),o=cu(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a})),Ju=n(((e,t)=>{var n=cu(),r=uu(),i=du(),a=Ku(),o=qu()||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+(e&&Object(e)===e?`the given object key`:r(e)))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=o(),e.set(t,n)}};return t}})),Yu=n(((e,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}})),Xu=n(((e,t)=>{var n=Yu(),r=Ju(),i=ku(),a=Object.prototype.hasOwnProperty,o=Array.isArray,s=r(),c=function(e,t){return s.set(e,t),e},l=function(e){return s.has(e)},u=function(e){return s.get(e)},d=function(e,t){s.set(e,t)},f=r(),p=function(e,t){return f.set(e,t),e},m=function(e){return f.has(e)},h=function(e){return f.get(e)},g=function(){for(var e=[],t=0;t<256;++t)e[e.length]=`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase();return e}(),_=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)n[i]!==void 0&&(r[r.length]=n[i]);t.obj[t.prop]=r}}},v=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},y=function(e,t,n){t===`__proto__`&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},b=function(e,t){for(var n=t,r=Object.keys(e),i=0;i<r.length;++i){var a=parseInt(r[i],10);String(a)===r[i]&&a>n&&(n=a)}return n},x=function(e,t,n){var r=[e,t];if(n&&typeof n.arrayLimit==`number`&&r.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+n.arrayLimit+` element`+(n.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(r,n),1)}return r},S=function e(t,n,r){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(o(t)){var i=t.length;if(r&&typeof r.arrayLimit==`number`&&i>=r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(t.concat(n),r),i)}t[i]=n}else if(t&&typeof t==`object`){if(l(t)){var s=u(t)+1;t[s]=n,d(t,s)}else if(r&&r.strictMerge&&m(t)){var f=h(t)+1;if(r.throwOnLimitExceeded&&typeof r.arrayLimit==`number`&&f>=r.arrayLimit)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);t[f]=n,p(t,f)}else if(r&&r.strictMerge){var g=x(t,n,r);return o(g)?p(g,1):g}else(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(t[n]=!0)}else return x(t,n,r);return t}if(!t||typeof t!=`object`){if(l(n)){for(var _=Object.keys(n),S=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},C=0;C<_.length;C++){var w=parseInt(_[C],10);S[w+1]=n[_[C]]}return c(S,u(n)+1)}var T=[t].concat(n);if(r&&typeof r.arrayLimit==`number`&&T.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(T,r),T.length-1)}return T}var E=t;if(o(t)&&!o(n)&&(E=v(t,r),m(t)&&p(E,t.length-1)),o(t)&&o(n)){if(n.forEach(function(n,i){if(a.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,r):t[t.length]=n}else t[i]=n}),r&&typeof r.arrayLimit==`number`&&t.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(t,r),t.length-1)}return t}return Object.keys(n).reduce(function(t,i){var o=n[i];if(a.call(t,i)?y(t,i,e(t[i],o,r)):y(t,i,o),l(n)&&!l(t)&&c(t,b(t,u(n))),l(t)){var s=parseInt(i,10);String(s)===i&&s>=0&&s>u(t)&&d(t,s)}if(m(t)){var f=parseInt(i,10);String(f)===i&&f>h(t)&&p(t,f)}return t},E)},C=function(e,t){return Object.keys(t).reduce(function(e,n){return y(e,n,t[n]),e},e)},w=function(e,t,n){if(typeof e==`string`&&e.indexOf(`%`)===-1)return e.indexOf(`+`)===-1?e:e.replace(/\+/g,` `);var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},T=typeof Symbol==`function`&&typeof Symbol.toPrimitive==`symbol`,E=Array.prototype.join,D=Array.prototype.toString,O=Object.prototype.toString,k=function e(t,n){if(!t||typeof t!=`object`&&typeof t!=`function`||T&&t[Symbol.toPrimitive]!=null)return t;if(o(t)&&t.toString===D&&t.join===E){var i=n||r();if(i.has(t))return``;i.set(t,!0);for(var a,s=0;s<t.length;s+=1){var c=t[s],l=e(c,i);if(!a&&l!==c){a=[];for(var u=0;u<s;u+=1)a[u]=t[u]}a&&(a[s]=l)}return i.delete(t),a||t}if(typeof t.toString==`function`)return t;var d=t.valueOf;if(typeof d==`function`){var f=d.call(t);if(!f||typeof f!=`object`&&typeof f!=`function`)return String(f)}return O.call(t)},A=1024;t.exports={arrayToObject:v,assign:C,combine:function(e,t,n,r,i){if(l(e)){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);for(var a=o(t)?t:[t],s=u(e),f=0;f<a.length;++f)s+=1,e[s]=a[f];return d(e,s),e}var p=[].concat(e,t);if(p.length>n){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);return c(v(p,{plainObjects:r}),p.length-1)}return p},compact:function(e){for(var t=[{obj:{o:e},prop:`o`}],n=r(),i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],s=Object.keys(o),c=0;c<s.length;++c){var l=s[c],u=o[l];typeof u==`object`&&u&&!n.has(u)&&(t[t.length]={obj:o,prop:l},n.set(u,!0))}return _(t),e},decode:w,encode:function(e,t,r,i,a){if(e.length===0)return e;var o=e;if(typeof e==`symbol`?o=Symbol.prototype.toString.call(e):typeof e!=`string`&&(o=String(k(e))),r===`iso-8859-1`)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`}).replace(/\+/g,`%2B`);for(var s=``,c=0;c<o.length;c+=A){var l=o.length>=A?o.slice(c,c+A):o;if(c+A<o.length){var u=l.charCodeAt(l.length-1);u>=55296&&u<=56319&&(l=l.slice(0,-1),--c)}for(var d=[],f=0;f<l.length;++f){var p=l.charCodeAt(f);p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||a===n.RFC1738&&(p===40||p===41)?d[d.length]=l.charAt(f):p<128?d[d.length]=g[p]:p<2048?d[d.length]=g[192|p>>6]+g[128|p&63]:p<55296||p>=57344?d[d.length]=g[224|p>>12]+g[128|p>>6&63]+g[128|p&63]:(f+=1,p=65536+((p&1023)<<10|l.charCodeAt(f)&1023),d[d.length]=g[240|p>>18]+g[128|p>>12&63]+g[128|p>>6&63]+g[128|p&63])}s+=d.join(``)}return s},isBuffer:function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))},isOverflow:l,isRegExp:function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},markOverflow:c,maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n[n.length]=t(e[r]);return n}return t(e)},merge:S,toCoercible:k}})),Zu=n(((e,t)=>{var n=Ju(),r=Xu(),i=Yu(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,depth:1/0,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T,E,D){var O=t;if(D>E)throw RangeError(`Input depth exceeded depth option of `+E);for(var k=T,A=0,ee=!1;(k=k.get(m))!==void 0&&!ee;){var j=k.get(t);if(A+=1,j!==void 0){if(j===A)throw RangeError(`Cyclic object value`);ee=!0}k.get(m)===void 0&&(A=0)}if(O=typeof _==`function`?_(i,O):O,O instanceof Date?O=b(O):a===`comma`&&s(O)&&(O=r.maybeMap(O,function(e){return e instanceof Date?b(e):e})),O===null){if(u)return S(g&&!C?g(i,f.encoder,w,`key`,x):i);O=``}if(p(O)||r.isBuffer(O))return g?[S(C?i:g(i,f.encoder,w,`key`,x))+`=`+S(g(O,f.encoder,w,`value`,x))]:[S(i)+`=`+S(String(O))];var M=[];if(O===void 0)return M;var te;if(a===`comma`&&s(O))C&&g&&(O=r.maybeMap(O,function(e){return e==null?e:g(e,f.encoder,w,`value`,x)})),te=[{value:O.length>0?r.toCoercible(O).join(`,`)||null:void 0}];else if(s(_))te=_;else{var N=Object.keys(O);te=v?N.sort(v):N}var ne=String(i),re=o&&s(O)&&O.length===1?ne+`[]`:ne;if(c&&s(O)&&O.length===0&&Object.keys(O).length===0)return re+`[]`;for(var ie=0;ie<te.length;++ie){var ae=te[ie],oe=typeof ae==`object`&&ae&&ae.value!==void 0?ae.value:O[ae];if(!(d&&oe===null)){var P=y&&h?String(ae).replace(/\./g,`%2E`):String(ae),se=s(O)?typeof a==`function`?a(re,P):re:re+(y?`.`+P:`[`+P+`]`);T.set(t,A);var ce=n();ce.set(m,T),l(M,e(oe,se,a,o,c,u,d,h,a===`comma`&&C&&s(O)?null:g,_,v,y,b,x,S,C,w,ce,E,D+1))}}return M},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l=a.call(o,e.arrayFormat)?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat;if(`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0||f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,depth:typeof e.depth==`number`?e.depth:f.depth,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m];if(_!=null){var v=r[_];i.skipNulls&&v===null||l(u,h(v,i.encodeDotInKeys?String(_).replace(/\./g,`%2E`):String(_),d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p,i.depth,0))}}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B`+i.delimiter:b+=`utf8=%E2%9C%93`+i.delimiter),y.length>0?b+y:``}})),Qu=n(((e,t)=>{var n=Ju(),r=Xu(),i=Object.prototype.hasOwnProperty,a=Array.isArray,o=Object.getPrototypeOf,s=function(e){if(!e||typeof e!=`object`)return!1;if(a(e))return!0;var t=o(e);return t===Object.prototype||t===null},c=function(e){if(a(e)){var t=[];return t.length=e.length,t}return o(e)===null?{__proto__:null}:{}},l=function(e){for(var t=n(),r={},i=[{source:e,target:r}],a=0;a<i.length;++a)for(var o=i[a].source,l=i[a].target,u=Object.keys(o),d=0;d<u.length;++d){var f=o[u[d]];if(s(f)){if(!t.has(f)){var p=c(f);t.set(f,p),i[i.length]={source:f,target:p}}l[u[d]]=t.get(f)}else l[u[d]]=f}return r},u={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},d=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},f=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1){if(t.throwOnLimitExceeded)for(var r=0,i=e.indexOf(`,`);i>-1;){if(r+=1,r>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);i=e.indexOf(`,`,i+1)}return e.split(`,`)}if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},p=`utf8=%26%2310003%3B`,m=`utf8=%E2%9C%93`,h=function(e,t){var n={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;o=o.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var s=t.parameterLimit===1/0?void 0:t.parameterLimit,c=o.split(t.delimiter,t.throwOnLimitExceeded&&s!==void 0?s+1:s);if(t.throwOnLimitExceeded&&s!==void 0&&c.length>s)throw RangeError(`Parameter limit exceeded. Only `+s+` parameter`+(s===1?``:`s`)+` allowed.`);var l=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<c.length;++h)c[h].indexOf(`utf8=`)===0&&(c[h]===m?g=`utf-8`:c[h]===p&&(g=`iso-8859-1`),l=h,h=c.length);for(h=0;h<c.length;++h)if(h!==l){var _=c[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b=y>1&&_.slice(y-2,y)===`[]`,x,S;if(y===-1?(x=t.decoder(_,u.decoder,g,`key`),S=t.strictNullHandling?null:``):(x=t.decoder(_.slice(0,y),u.decoder,g,`key`),x!==null&&(S=r.maybeMap(f(_.slice(y+1),t,a(n[x])?n[x].length:0),function(e){return t.decoder(e,u.decoder,g,`value`)}))),S&&t.interpretNumericEntities&&g===`iso-8859-1`&&(S=d(String(S))),b&&(S=a(S)?[S]:S),t.comma&&a(S)&&S.length>t.arrayLimit&&(S=r.combine([],S,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded)),x!==null){var C=i.call(n,x);C&&(t.duplicates===`combine`||b)?n[x]=r.combine(n[x],S,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded):(!C||t.duplicates===`last`)&&(n[x]=S)}}return n},g=function(e,t,n,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var s=i?t:f(t,n,a),c=e.length-1;c>=0;--c){var l,u=e[c];if(u===`[]`&&n.parseArrays)l=r.isOverflow(s)?s:n.allowEmptyArrays&&(s===``||n.strictNullHandling&&s===null)?[]:r.combine([],s,n.arrayLimit,n.plainObjects,n.throwOnLimitExceeded);else{l=n.plainObjects?{__proto__:null}:{};var d=u.charAt(0)===`[`&&u.charAt(u.length-1)===`]`?u.slice(1,-1):u,p=n.decodeDotInKeys?d.replace(/%2E/g,`.`):d,m=parseInt(p,10),h=!isNaN(m)&&u!==p&&String(m)===p&&m>=0&&n.parseArrays;if(!n.parseArrays&&p===``)l={0:s};else if(h&&m<n.arrayLimit)l=[],l[m]=s;else if(h&&n.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+n.arrayLimit+` element`+(n.arrayLimit===1?``:`s`)+` allowed in an array.`);else h?(l[m]=s,r.markOverflow(l,m)):p!==`__proto__`&&(l[p]=s)}s=l}return s},_=function(e){for(var t=``,n=0,r=0;r<e.length;r+=1){var i=e.charCodeAt(r);if(i===91)n+=1,t+=`[`;else if(i===93)n>0&&--n,t+=`]`;else if(i===46&&n===0&&r+1<e.length&&e.charCodeAt(r+1)!==46&&e.charCodeAt(r+1)!==91){for(var a=r+1,o=a;o<e.length&&e.charCodeAt(o)!==46&&e.charCodeAt(o)!==91;)o+=1;t+=`[`+e.slice(a,o)+`]`,r=o-1}else t+=e.charAt(r)}return t},v=function(e,t){var n=t.allowDots?_(e):e;if(t.depth<=0)return!t.plainObjects&&i.call(Object.prototype,n)&&!t.allowPrototypes?void 0:[n];var r=[],a=n.indexOf(`[`),o=a>=0?n.slice(0,a):n;if(o){if(!t.plainObjects&&i.call(Object.prototype,o)&&!t.allowPrototypes)return;r[r.length]=o}for(var s=n.length,c=a,l=0;c>=0&&l<t.depth;){for(var u=1,d=c+1,f=-1;d<s&&f<0;){var p=n.charCodeAt(d);p===91?u+=1:p===93&&(--u,u===0&&(f=d)),d+=1}if(f<0)return r[r.length]=`[`+n.slice(c)+`]`,r;var m=n.slice(c,f+1),h=m.slice(1,-1);if(!t.plainObjects&&i.call(Object.prototype,h)&&!t.allowPrototypes)return;r[r.length]=m,l+=1,c=n.indexOf(`[`,f+1)}if(c>=0){if(t.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+t.depth+` and strictDepth is true`);r[r.length]=`[`+n.slice(c)+`]`}return r},y=function(e,t,n,r){if(e){var i=v(e,n);if(i)return g(i,t,n,r)}},b=function(e){if(!e)return u;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?u.charset:e.charset,n=e.duplicates===void 0?u.duplicates:e.duplicates;if(n!==`combine`&&n!==`first`&&n!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);return{allowDots:e.allowDots===void 0?e.decodeDotInKeys===!0||u.allowDots:!!e.allowDots,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:u.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:u.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:u.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:u.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:u.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:u.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:u.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:u.decoder,delimiter:typeof e.delimiter==`string`||r.isRegExp(e.delimiter)?e.delimiter:u.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:u.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:u.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:u.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:u.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:u.strictDepth,strictMerge:typeof e.strictMerge==`boolean`?!!e.strictMerge:u.strictMerge,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:u.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`&&e.throwOnLimitExceeded}};t.exports=function(e,t){var n=b(t);if(e===``||e==null)return n.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?h(e,n):l(e),a=n.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],u=y(c,i[c],n,typeof e==`string`);a=r.merge(a,u,n)}return n.allowSparse===!0?a:r.compact(a)}})),$u=n(((e,t)=>{var n=Zu(),r=Qu();t.exports={formats:Yu(),parse:r,stringify:n}}));function ed(e,t){return function(){return e.apply(t,arguments)}}var{toString:td}=Object.prototype,{getPrototypeOf:nd}=Object,{iterator:rd,toStringTag:id}=Symbol,ad=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),od=e=>typeof e==`string`&&(e===`__proto__`||e===`constructor`||e===`prototype`),sd=(e,t,n)=>e===Object.prototype||!n&&t===null,cd=e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(od(t))return!1;let n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&n.writable===!0})},ld=(e,t)=>{let n=e,r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);let i=nd(n);if(sd(n,i,n===e))return!1;if(ad(n,t))return!0;n=i}return!1},ud=(e,t)=>e!=null&&ld(e,t)?e[t]:void 0,dd=e=>{if(e==null||typeof e!=`object`&&typeof e!=`function`)return e;let t=nd(e);if(t===null&&cd(e))return e;let n=Object.create(null),r=Object.create(null),i=[],a=e;for(;a!=null&&i.indexOf(a)===-1;){i.push(a);let o=a===e?t:nd(a);if(sd(a,o,a===e))break;let s=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(a));for(let t of s)od(t)||ad(r,t)||(n[t]=e[t],r[t]=!0);a=o}return n},fd=(e=>t=>{let n=td.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pd=e=>(e=e.toLowerCase(),t=>fd(t)===e),md=e=>t=>typeof t===e,{isArray:hd}=Array,gd=md(`undefined`);function _d(e){return e!==null&&!gd(e)&&e.constructor!==null&&!gd(e.constructor)&&xd(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var vd=pd(`ArrayBuffer`);function yd(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&vd(e.buffer),t}var bd=md(`string`),xd=md(`function`),Sd=md(`number`),Cd=e=>typeof e==`object`&&!!e,wd=e=>e===!0||e===!1,Td=e=>{if(!Cd(e))return!1;let t=nd(e);return(t===null||t===Object.prototype||nd(t)===null)&&!ld(e,id)&&!ld(e,rd)},Ed=e=>{if(!Cd(e)||_d(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Dd=pd(`Date`),Od=pd(`File`),kd=e=>!!(e&&e.uri!==void 0),Ad=e=>e&&e.getParts!==void 0,jd=pd(`Blob`),Md=pd(`FileList`),Nd=pd(`Set`),Pd=e=>Cd(e)&&xd(e.pipe);function Fd(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var Id=Fd(),Ld=Id.FormData===void 0?void 0:Id.FormData,Rd=e=>{if(!e)return!1;if(Ld&&e instanceof Ld)return!0;let t=nd(e);if(!t||t===Object.prototype||!xd(e.append))return!1;let n=fd(e);return n===`formdata`||n===`object`&&xd(e.toString)&&e.toString()===`[object FormData]`},zd=pd(`URLSearchParams`),[Bd,Vd,Hd,Ud]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(pd),Wd=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function Gd(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),hd(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(_d(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 Kd(e,t){if(_d(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}var qd=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Jd=e=>!gd(e)&&e!==qd;function Yd(...e){let{caseless:t,skipUndefined:n}=Jd(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&Kd(r,i)||i,o=ad(r,a)?r[a]:void 0;Td(o)&&Td(e)?r[a]=Yd(o,e):Td(e)?r[a]=Yd({},e):hd(e)?r[a]=e.slice():(!n||!gd(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||_d(n)||(Gd(n,i),typeof n!=`object`||hd(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];cf.call(n,t)&&i(n[t],t)}}return r}var Xd=(e,t,n,{allOwnKeys:r}={})=>(Gd(t,(t,r)=>{n&&xd(t)?Object.defineProperty(e,r,{__proto__:null,value:ed(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),Zd=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qd=(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)},$d=(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&&nd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ef=(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},tf=e=>{if(!e)return null;if(hd(e))return e;let t=e.length;if(!Sd(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},nf=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&nd(Uint8Array)),rf=(e,t)=>{let n=(e&&e[rd]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},af=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},of=pd(`HTMLFormElement`),sf=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:cf}=Object.prototype,lf=pd(`RegExp`),uf=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Gd(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},df=e=>{uf(e,(t,n)=>{if(xd(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];xd(r)&&(t.enumerable=!1,`writable`in t?t.writable=!1:t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)})})},ff=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return hd(e)?r(e):r(String(e).split(t)),n},pf=()=>{},mf=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function hf(e){return!!(e&&xd(e.append)&&e[id]===`FormData`&&e[rd])}var gf=e=>{let t=new WeakSet,n=e=>{if(Cd(e)){if(t.has(e))return;if(_d(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(Nd(e)){r=[];for(let t of e){let e=n(t);!gd(e)&&r.push(e)}}else r=hd(e)?[]:{},Gd(e,(e,t)=>{let i=n(e);!gd(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},_f=pd(`AsyncFunction`),vf=e=>e&&(Cd(e)||xd(e))&&xd(e.then)&&xd(e.catch),yf=((e,t)=>e?setImmediate:t?((e,t)=>(qd.addEventListener(`message`,({source:n,data:r})=>{n===qd&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),qd.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,xd(qd.postMessage)),bf=typeof queueMicrotask<`u`?queueMicrotask.bind(qd):typeof process<`u`&&process.nextTick||yf,xf=e=>e!=null&&xd(e[rd]),W={isArray:hd,isArrayBuffer:vd,isBuffer:_d,isFormData:Rd,isArrayBufferView:yd,isString:bd,isNumber:Sd,isBoolean:wd,isObject:Cd,isPlainObject:Td,isEmptyObject:Ed,isReadableStream:Bd,isRequest:Vd,isResponse:Hd,isHeaders:Ud,isUndefined:gd,isDate:Dd,isFile:Od,isReactNativeBlob:kd,isReactNative:Ad,isBlob:jd,isRegExp:lf,isFunction:xd,isStream:Pd,isURLSearchParams:zd,isTypedArray:nf,isFileList:Md,forEach:Gd,merge:Yd,extend:Xd,trim:Wd,stripBOM:Zd,inherits:Qd,toFlatObject:$d,kindOf:fd,kindOfTest:pd,endsWith:ef,toArray:tf,forEachEntry:rf,matchAll:af,isHTMLForm:of,hasOwnProperty:ad,hasOwnProp:ad,hasOwnInPrototypeChain:ld,getSafeProp:ud,toSafeFlatObject:dd,reduceDescriptors:uf,freezeMethods:df,toObjectSet:ff,toCamelCase:sf,noop:pf,toFiniteNumber:mf,findKey:Kd,global:qd,isContextDefined:Jd,isSpecCompliantForm:hf,toJSONObject:gf,isAsyncFn:_f,isThenable:vf,setImmediate:yf,asap:bf,isIterable:xf,isSafeIterable:e=>e!=null&&ld(e,rd)&&xf(e)},Sf=W.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`]),Cf=e=>{let t={},n,r,i;return e&&e.split(`
|
|
34
|
+
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=W.hasOwnProp(t,n);!n||a&&W.hasOwnProp(Sf,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function wf(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)}var Tf=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Ef=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Df(e,t){return W.isArray(e)?e.map(e=>Df(e,t)):wf(String(e).replace(t,``))}var Of=e=>Df(e,Tf),kf=e=>Df(e,Ef);function Af(e){let t=Object.create(null);return W.forEach(e.toJSON(),(e,n)=>{t[n]=kf(e)}),t}var jf=Symbol(`internals`);function Mf(e){return e&&String(e).trim().toLowerCase()}function Nf(e){return e===!1||e==null?e:W.isArray(e)?e.map(Nf):Of(String(e))}function Pf(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var Ff=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function If(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)}function Lf(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r<t;r++){let i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function Rf(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=If(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=If(i.slice(0,a));if(!Ff.test(o))return;let s=o.toLowerCase();if(s===`__proto__`||s===`constructor`||s===`prototype`)return;let c=If(i.slice(a+1));t[s]=Lf(c)}for(let e=0;e<n.length;e++){let t=n.charCodeAt(e);i?a?a=!1:t===92?a=!0:t===34&&(i=!1):t===34?i=!0:(t===44||t===59)&&(o(e),r=e+1)}return o(n.length),t}var zf=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Bf(e,t,n,r,i){if(W.isFunction(r))return r.call(this,t,n);if(i&&(t=n),W.isString(t)){if(W.isString(r))return t.indexOf(r)!==-1;if(W.isRegExp(r))return r.test(t)}}function Vf(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Hf(e,t){let n=W.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 Uf=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=Mf(t);if(!i)return;let a=W.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=Nf(e))}let a=(e,t)=>W.forEach(e,(e,n)=>i(e,n,t));if(W.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(W.isString(e)&&(e=e.trim())&&!zf(e))a(Cf(e),t);else if(W.isObject(e)&&W.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!W.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],W.hasOwnProp(n,i)?(r=n[i],n[i]=W.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Mf(e),e){let n=W.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return Pf(e);if(W.isFunction(t))return t.call(this,e,n);if(W.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=Mf(e),e){let n=W.findKey(this,e);return!(!n||this[n]===void 0||t&&!Bf(this,this[n],n,t))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=Mf(e),e){let i=W.findKey(n,e);i&&(!t||Bf(n,n[i],i,t))&&(delete n[i],r=!0)}}return W.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||Bf(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return W.forEach(this,(r,i)=>{let a=W.findKey(n,i);if(a){t[a]=Nf(r),delete t[i];return}let o=e?Vf(i):String(i).trim();o!==i&&delete t[i],t[o]=Nf(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return W.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&W.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(`
|
|
35
|
+
`)}getSetCookie(){let e=this.get(`set-cookie`);return W.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return Rf(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[jf]=this[jf]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=Mf(e);t[r]||(Hf(n,e),t[r]=!0)}return W.isArray(e)?e.forEach(r):r(e),this}};Uf.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),W.reduceDescriptors(Uf.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),W.freezeMethods(Uf);var Wf=`[REDACTED ****]`;function Gf(e){if(W.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(W.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function Kf(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||W.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof Uf&&(e=e.toJSON()),r.push(e);let t;if(W.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);W.isUndefined(r)||(t[n]=r)});else{if(!W.isPlainObject(e)&&Gf(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?Wf:i(a);W.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function qf(e){try{return String(e)}catch{return``}}function Jf(e){return e.errors.map(e=>{try{return e&&e.message?qf(e.message):qf(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var G=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&W.isArray(t.errors)&&t.errors.length&&(s=Jf(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}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&&W.hasOwnProp(e,`redact`)?e.redact:void 0,n=W.isArray(t)&&t.length>0?Kf(e,t):W.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}}};G.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,G.ERR_BAD_OPTION=`ERR_BAD_OPTION`,G.ECONNABORTED=`ECONNABORTED`,G.ETIMEDOUT=`ETIMEDOUT`,G.ECONNREFUSED=`ECONNREFUSED`,G.ERR_NETWORK=`ERR_NETWORK`,G.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,G.ERR_DEPRECATED=`ERR_DEPRECATED`,G.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,G.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,G.ERR_CANCELED=`ERR_CANCELED`,G.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,G.ERR_INVALID_URL=`ERR_INVALID_URL`,G.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function Yf(e){return W.isPlainObject(e)||W.isArray(e)}function Xf(e){return W.endsWith(e,`[]`)?e.slice(0,-2):e}function Zf(e,t,n){return e?e.concat(t).map(function(e,t){return e=Xf(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Qf(e){return W.isArray(e)&&!e.some(Yf)}var $f=W.toFlatObject(W,{},null,function(e){return/^is[A-Z]/.test(e)});function ep(e,t,n){if(!W.isObject(e))throw TypeError(`target must be an object`);t||=new FormData;let r=(e,t)=>{let r=W.getSafeProp(n,e);return W.isUndefined(r)?t:r},i=r(`metaTokens`,!0),a=r(`visitor`)||h,o=r(`dots`,!1),s=r(`indexes`,!1),c=r(`Blob`)||typeof Blob<`u`&&Blob,l=r(`maxDepth`,100),u=c&&W.isSpecCompliantForm(t),d=[];if(!W.isFunction(a))throw TypeError(`visitor must be a function`);function f(e){if(e===null)return``;if(W.isDate(e))return e.toISOString();if(W.isBoolean(e))return e.toString();if(!u&&W.isBlob(e))throw new G(`Blob is not supported. Use a Buffer instead.`);if(W.isArrayBuffer(e)||W.isTypedArray(e)){if(u&&typeof c==`function`)return new c([e]);throw new G(`Blob is not supported. Use a Buffer instead.`,G.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new G(`Object is too deeply nested (`+e+` levels). Max depth: `+l,G.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(e,t){if(l===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!W.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}function h(e,n,r){let a=e;if(W.isReactNative(t)&&W.isReactNativeBlob(e))return t.append(Zf(r,n,o),f(e)),!1;if(e&&!r&&typeof e==`object`){if(W.endsWith(n,`{}`))n=i?n:n.slice(0,-2),e=m(e,1);else if(W.isArray(e)&&Qf(e)||(W.isFileList(e)||W.endsWith(n,`[]`))&&(a=W.toArray(e)))return n=Xf(n),a.forEach(function(e,r){!(W.isUndefined(e)||e===null)&&t.append(s===!0?Zf([n],r,o):s===null?n:n+`[]`,f(e))}),!1}return Yf(e)?!0:(t.append(Zf(r,n,o),f(e)),!1)}let g=Object.assign($f,{defaultVisitor:h,convertValue:f,isVisitable:Yf});function _(e,n,r=0){if(!W.isUndefined(e)){if(p(r),d.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));d.push(e),W.forEach(e,function(e,i){(!(W.isUndefined(e)||e===null)&&a.call(t,e,W.isString(i)?i.trim():i,n,g))===!0&&_(e,n?n.concat(i):[i],r+1)}),d.pop()}}if(!W.isObject(e))throw TypeError(`data must be an object`);return _(e),t}function tp(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function np(e,t){this._pairs=[],e&&ep(e,this,t)}var rp=np.prototype;rp.append=function(e,t){this._pairs.push([e,t])},rp.toString=function(e){let t=e?t=>e.call(this,t,tp):tp;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function ip(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function ap(e,t,n){if(!t)return e;e||=``;let r=W.isFunction(n)?{serialize:n}:n,i=W.getSafeProp(r,`encode`)||ip,a=W.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):W.isURLSearchParams(t)?t.toString():new np(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var op=Symbol(`internals`);function sp(e){return e?e.length:0}function cp(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function lp(e,t){let n=e.handlers,r=sp(n);n===t.handlersRef?r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()):(t.handlersRef=n,t.handlerEntries.clear()),t.handlersLength=r}var up=class{constructor(){this.handlers=[],this[op]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){let r={fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},i=this[op];this.handlers??=[],lp(this,i);let a=i.nextId++;return this.handlers.push(r),i.handlerEntries.set(a,{handler:r,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,a}eject(e){let t=this[op];lp(this,t);let n=t.handlerEntries.get(e);if(n){if(t.handlerEntries.delete(e),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(cp(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],lp(this,this[op]))}forEach(e){let t=this[op];lp(this,t),t.iterationDepth++;try{W.forEach(this.handlers,function(t){t!==null&&e(t)})}finally{--t.iterationDepth||(lp(this,t),cp(this.handlers),t.handlersLength=sp(this.handlers))}}},dp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},fp={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:np,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},pp=e({hasBrowserEnv:()=>mp,hasStandardBrowserEnv:()=>gp,hasStandardBrowserWebWorkerEnv:()=>_p,navigator:()=>hp,origin:()=>vp}),mp=typeof window<`u`&&typeof document<`u`,hp=typeof navigator==`object`&&navigator||void 0,gp=mp&&(!hp||[`ReactNative`,`NativeScript`,`NS`].indexOf(hp.product)<0),_p=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,vp=mp&&window.location.href||`http://localhost`,yp={...pp,...fp};function bp(e,t){return ep(e,new yp.classes.URLSearchParams,{visitor:function(e,t,n,r){return yp.isNode&&W.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var xp=100;function Sp(e){if(e>xp)throw new G(`FormData field is too deeply nested (`+e+` levels). Max depth: `+xp,G.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Cp(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)Sp(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function wp(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 Tp(e){function t(e,n,r,i){Sp(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&W.isArray(r)?r.length:a,s?(W.hasOwnProp(r,a)?r[a]=W.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!W.hasOwnProp(r,a)||!W.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&W.isArray(r[a])&&(r[a]=wp(r[a])),!o)}if(W.isFormData(e)&&W.isFunction(e.entries)){let n={};return W.forEachEntry(e,(e,r)=>{t(Cp(e),r,n,0)}),n}return null}var Ep=Object.freeze([`get`,`delete`,`head`,`options`,`post`,`put`,`patch`,`purge`,`link`,`unlink`,`query`]),Dp=(e,t)=>e!=null&&W.hasOwnProp(e,t)?e[t]:void 0;function Op(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var kp={transitional:dp,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=W.isObject(e);if(i&&W.isHTMLForm(e)&&(e=new FormData(e)),W.isFormData(e))return r?JSON.stringify(Tp(e)):e;if(W.isArrayBuffer(e)||W.isBuffer(e)||W.isStream(e)||W.isFile(e)||W.isBlob(e)||W.isReadableStream(e))return e;if(W.isArrayBufferView(e))return e.buffer;if(W.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Dp(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return bp(e,t).toString();if((a=W.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Dp(this,`env`),r=n&&n.FormData;return ep(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Op(e)):e}],transformResponse:[function(e){let t=Dp(this,`transitional`)||kp.transitional,n=t&&t.forcedJSONParsing,r=Dp(this,`responseType`),i=r===`json`;if(W.isResponse(e)||W.isReadableStream(e))return e;if(e&&W.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Dp(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?G.from(e,G.ERR_BAD_RESPONSE,this,null,Dp(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:yp.classes.FormData,Blob:yp.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};W.forEach(Ep,e=>{kp.headers[e]={}});function Ap(e,t){let n=this||kp,r=t||n,i=Uf.from(r.headers),a=r.data;return W.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function jp(e){return!!(e&&e.__CANCEL__)}var Mp=class extends G{constructor(e,t,n){super(e??`canceled`,G.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Np(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new G(`Request failed with status code `+n.status,n.status>=400&&n.status<500?G.ERR_BAD_REQUEST:G.ERR_BAD_RESPONSE,n.config,n.request,n))}var Pp=/[\t\n\r]/g;function Fp(e){if(typeof e!=`string`)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(Pp,``)}function Ip(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function Lp(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 Rp(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),(...e)=>o(e)]}var zp=(e,t,n=3)=>{let r=0,i=Lp(50,250);return Rp(n=>{if(!n||!W.isNumber(n.loaded))return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,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)},Bp=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Vp=(e,t=W.asap)=>(...n)=>t(()=>e(...n)),Hp=yp.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,yp.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(yp.origin),yp.navigator&&/(msie|trident)/i.test(yp.navigator.userAgent)):()=>!0,Up=yp.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];W.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),W.isString(r)&&s.push(`path=${r}`),W.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),W.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)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Wp(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gp(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var Kp=/^https?:(?!\/\/)/i;function qp(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${Wf}`)}function Jp(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Wf}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Wf}`);return n===-1?r:`${r}#${qp(t.slice(n+1))}`}function Yp(e,t){if(typeof e==`string`){let n=Fp(e);if(Kp.test(n))throw new G(`Invalid URL ${JSON.stringify(Jp(n))}: missing "//" after protocol`,G.ERR_INVALID_URL,t)}}function Xp(e,t,n,r){Yp(t,r);let i=!Wp(t);return e&&(i||n===!1)?(Yp(e,r),Gp(e,t)):t}var Zp=e=>e instanceof Uf?{...e}:e,Qp=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function $p(e,t){e||={},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 W.isPlainObject(e)&&W.isPlainObject(t)?W.merge.call({caseless:r},e,t):W.isPlainObject(t)?W.merge({},t):W.isArray(t)?t.slice():t}function i(e,t,n,i){if(!W.isUndefined(t))return r(e,t,n,i);if(!W.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!W.isUndefined(t))return r(void 0,t)}function o(e,t){if(!W.isUndefined(t))return r(void 0,t);if(!W.isUndefined(e))return r(void 0,e)}function s(n){let r=W.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!W.isUndefined(r)){if(W.isPlainObject(r)){if(W.hasOwnProp(r,n))return r[n]}else return}let i=W.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(W.isPlainObject(i)&&W.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(W.hasOwnProp(t,a))return r(n,i);if(W.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage: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:c,headers:(e,t,n)=>i(Zp(e),Zp(t),n,!0)};return W.forEach(Qp({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=W.hasOwnProp(l,r)?l[r]:i,o=a(W.hasOwnProp(e,r)?e[r]:void 0,W.hasOwnProp(t,r)?t[r]:void 0,r);W.isUndefined(o)&&a!==c||(n[r]=o)}),W.hasOwnProp(t,`validateStatus`)&&W.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(W.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var em=[`content-type`,`content-length`];function tm(e,t,n){n===`content-only`?Object.entries(t||{}).forEach(([t,n])=>{em.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}var nm=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function rm(e){let t=$p({},e),n=e=>W.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=Uf.from(s),t.url=ap(Xp(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=W.getSafeProp(c,`username`)||``,n=W.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?nm(n):``)))}catch(t){throw G.from(t,G.ERR_BAD_OPTION_VALUE,e)}}if(W.isFormData(r)){let e=W.getSafeProp(r,`getHeaders`);yp.hasStandardBrowserEnv||yp.hasStandardBrowserWebWorkerEnv||W.isReactNative(r)?s.setContentType(void 0):W.isFunction(e)&&tm(s,e.call(r),n(`formDataHeaderPolicy`))}if(yp.hasStandardBrowserEnv&&(W.isFunction(i)&&(i=i(t)),i===!0||i==null&&Hp(t.url))){let e=a&&o&&Up.read(o);e&&s.set(a,e)}return t}var im=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=rm(e),i=r.data,a=Uf.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p,m;function h(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let g=new XMLHttpRequest;g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout;function _(i){if(!g)return;if(g.status===0&&(Ip(Fp(r.url))||Ip(yp.origin))!==`file`&&!(g.responseURL&&g.responseURL.startsWith(`file:`))){n(new G(`Request aborted`,G.ECONNABORTED,e,g)),h(),g=null;return}try{i?m&&m(i):p&&p()}catch(e){setTimeout(()=>{throw e})}if(!g)return;let a=Uf.from(`getAllResponseHeaders`in g&&g.getAllResponseHeaders());Np(function(e){t(e),h()},function(e){n(e),h()},{data:!o||o===`text`||o===`json`?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:a,config:e,request:g}),g=null}`onloadend`in g?g.onloadend=_:g.onreadystatechange=function(){g&&g.readyState===4&&(g.status!==0||g.responseURL&&g.responseURL.startsWith(`file:`))&&setTimeout(_)},g.onabort=function(){g&&=(n(new G(`Request aborted`,G.ECONNABORTED,e,g)),h(),null)},g.onerror=function(t){let r=new G(t&&t.message?t.message:`Network Error`,G.ERR_NETWORK,e,g);r.event=t||null,n(r),h(),g=null},g.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||dp;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new G(t,i.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,g)),h(),g=null},i===void 0&&a.setContentType(null),`setRequestHeader`in g&&W.forEach(Af(a),function(e,t){g.setRequestHeader(t,e)}),W.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),o&&o!==`json`&&(g.responseType=r.responseType),c&&([d,p,m]=zp(c,!0),g.addEventListener(`progress`,d)),s&&g.upload&&([u,f]=zp(s),g.upload.addEventListener(`progress`,u),g.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{g&&=(n(!t||t.type?new Mp(null,e,g):t),g.abort(),h(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let v=Ip(r.url);v&&!yp.protocols.includes(v)?(n(new G(`Unsupported protocol `+v+`:`,G.ERR_BAD_REQUEST,e)),h()):g.send(i||null)})},am=(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 G?t:new Mp(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new G(`timeout of ${t}ms exceeded`,G.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=>{r||(e.aborted?i.call(e):e.addEventListener(`abort`,i,{once:!0}))});let{signal:s}=n;return s.unsubscribe=()=>W.asap(o),s},om=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},sm=async function*(e,t){for await(let n of cm(e))yield*om(n,t)},cm=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()}},lm=(e,t,n,r)=>{let i=sm(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})},um=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,dm=(e,t,n)=>t+2<n&&um(e.charCodeAt(t+1))&&um(e.charCodeAt(t+2)),fm=e=>e<=57?e-48:(e&223)-55,pm=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,mm=e=>e===9||e===10||e===12||e===13||e===32,hm=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},gm=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},_m=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);o===37&&dm(e,a,t)&&(o=fm(e.charCodeAt(a+1))*16+fm(e.charCodeAt(a+2)),a+=2),!mm(o)&&(o===61?r++:!pm(o)||r>0?i=!0:n++)}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?gm(e):hm(n)},vm=(e,t)=>{if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let n=e.indexOf(`,`);if(n<0)return 0;let r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let e=0,t=i.length;e<t;e++){let n=i.charCodeAt(e);if(n===37&&dm(i,e,t))a+=1,e+=2;else if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=i.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};function ym(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return vm(t===-1?e:e.slice(0,t),_m)}var bm=`1.20.0`,xm=65536,Sm={cache:`default`,redirect:`follow`,referrer:`about:client`,referrerPolicy:``,mode:`cors`,integrity:``,keepalive:!1,priority:`auto`,window:null},{isFunction:Cm}=W,wm=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Tm=e=>{if(!W.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Em=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Dm=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Om=e=>{let t=W.global!==void 0&&W.global!==null?W.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=W.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?Cm(i):typeof fetch==`function`,c=Cm(a),l=Cm(o);if(!s)return!1;let u=s&&Cm(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&&Em(()=>{let e=!1,t=new a(yp.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&&Em(()=>W.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 G(`Response type '${e}' is not supported`,G.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new a(yp.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(W.isArrayBufferView(e)||W.isArrayBuffer(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e+=``),W.isString(e))return(await d(e)).byteLength},g=async(e,t)=>W.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:T,maxRedirects:E}=rm(e),D=W.isNumber(w)&&w>-1,O=W.isNumber(T)&&T>-1,k=t=>W.hasOwnProp(e,t)?e[t]:void 0,A=i||fetch;b=b?(b+``).toLowerCase():`text`;let ee=am([l,d&&d.toAbortSignal()],_),j=null,M=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()}),te,N=null,ne=()=>new G(`Request body larger than maxBodyLength limit`,G.ERR_BAD_REQUEST,e,j);try{let i,l=k(`auth`);if(l&&(i={username:W.getSafeProp(l,`username`)||``,password:W.getSafeProp(l,`password`)||``}),Dm(t)){let e=new URL(t,yp.origin);!i&&(e.username||e.password)&&(i={username:Tm(e.username),password:Tm(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(wm((i.username||``)+`:`+(i.password||``))))),D&&typeof t==`string`&&t.startsWith(`data:`)&&ym(t)>w)throw new G(`maxContentLength size of `+w+` exceeded`,G.ERR_BAD_RESPONSE,e,j);if(O&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(te=e,e>T))throw ne()}let d=O&&(W.isReadableStream(s)||W.isStream(s)),_=(e,t,n)=>lm(e,xm,e=>{if(O&&e>T)throw N=ne();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(te??=await g(x,s),te!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(W.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&Bp(te,zp(Vp(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new G(`Stream request bodies are not supported by the current fetch implementation`,G.ERR_NOT_SUPPORT,e,j);W.isString(S)||(S=S?`include`:`omit`);let re=c&&`credentials`in a.prototype;if(W.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+bm,!1);let ie=C==null?C:Object.assign(Object.create(null),C);ie&&(delete ie.body,delete ie.headers,delete ie.method,delete ie.signal,delete ie.duplex,delete ie.credentials);let ae=Object.assign(Object.create(null),ie,{signal:ee,method:n.toUpperCase(),headers:Af(x.normalize()),body:s,duplex:`half`,credentials:re?S:void 0});c&&(W.forEach(Sm,(e,t)=>{ae[t]===void 0&&(ae[t]=e)}),ae.signal===void 0&&(ae.signal=null),ae.body===void 0&&(ae.body=null)),E===0&&(ae.redirect=`manual`,ie&&(ie.redirect=`manual`)),j=c&&new a(t,ae);let oe=await(c?A(j,ie):A(t,ae)),P=Uf.from(oe.headers);if(D){let t=W.toFiniteNumber(P.getContentLength());if(t!=null&&t>w)throw new G(`maxContentLength size of `+w+` exceeded`,G.ERR_BAD_RESPONSE,e,j)}let se=p&&(b===`stream`||b===`response`);if(p&&oe.body&&(v||D||se&&M)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=oe[e]});let n=W.toFiniteNumber(P.getContentLength()),[r,i]=v&&Bp(n,zp(Vp(v),!0))||[],a=0;oe=new o(lm(oe.body,xm,t=>{if(D&&(a=t,a>w))throw new G(`maxContentLength size of `+w+` exceeded`,G.ERR_BAD_RESPONSE,e,j);r&&r(t)},()=>{i&&i(),M&&M()}),t)}b||=`text`;let ce=await m[W.findKey(m,b)||`text`](oe,e);if(D&&!p&&!se){let t;if(ce!=null&&(typeof ce.byteLength==`number`?t=ce.byteLength:typeof ce.size==`number`?t=ce.size:typeof ce==`string`&&(t=typeof r==`function`?new r().encode(ce).byteLength:ce.length)),typeof t==`number`&&t>w)throw new G(`maxContentLength size of `+w+` exceeded`,G.ERR_BAD_RESPONSE,e,j)}return!se&&M&&M(),await new Promise((t,n)=>{Np(t,n,{data:ce,headers:Uf.from(oe.headers),status:oe.status,statusText:oe.statusText,config:e,request:j})})}catch(t){if(M&&M(),ee&&ee.aborted&&ee.reason instanceof G){let n=ee.reason;throw n.config=e,j&&(n.request=j),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(N)throw j&&!N.request&&(N.request=j),N;if(t instanceof G)throw j&&!t.request&&(t.request=j),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new G(`Network Error`,G.ERR_NETWORK,e,j,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw G.from(t,t&&t.code,e,j,t&&t.response)}}},km=new Map,Am=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=km;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Om(t)),l=c;return c};Am();var jm={http:null,xhr:im,fetch:{get:Am}};W.forEach(jm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Mm=e=>`- ${e}`,Nm=e=>W.isFunction(e)||e===null||e===!1;function Pm(e,t){e=W.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,!Nm(r)&&(i=jm[(n=String(r)).toLowerCase()],i===void 0))throw new G(`Unknown adapter '${n}'`);if(i&&(W.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 G(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
36
|
+
`+e.map(Mm).join(`
|
|
37
|
+
`):` `+Mm(e[0]):`as no adapter specified`),G.ERR_NOT_SUPPORT)}return i}var Fm={getAdapter:Pm,adapters:jm};function Im(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mp(null,e)}function Lm(e){let t=W.toSafeFlatObject(e);return Im(t),t.headers=Uf.from(W.getSafeProp(t,`headers`)),t.data=Ap.call(t,t.transformRequest),[`post`,`put`,`patch`].indexOf(t.method)!==-1&&t.headers.setContentType(`application/x-www-form-urlencoded`,!1),Fm.getAdapter(t.adapter||kp.adapter,t)(t).then(function(e){Im(t),t.response=e;try{e.data=Ap.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=Uf.from(e.headers),e},function(e){if(!jp(e)&&(Im(t),e&&e.response)){t.response=e.response;try{e.response.data=Ap.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=Uf.from(e.response.headers)}return Promise.reject(e)})}var Rm={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Rm[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var zm={};Rm.transitional=function(e,t,n){function r(e,t){return`[Axios v`+bm+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new G(r(i,` has been removed`+(t?` in `+t:``)),G.ERR_DEPRECATED);return t&&!zm[i]&&(zm[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)}},Rm.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Bm(e,t,n){if(typeof e!=`object`||!e)throw new G(`options must be an object`,G.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 G(`option `+a+` must be `+n,G.ERR_BAD_OPTION_VALUE)}else if(n!==!0)throw new G(`Unknown option `+a,G.ERR_BAD_OPTION)}}var Vm={assertOptions:Bm,validators:Rm},Hm=Vm.validators,Um=class{constructor(e){this.defaults=e||{},this.interceptors={request:new up,response:new up}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack,r=``;if(typeof n==`string`){let e=n.indexOf(`
|
|
38
|
+
`);r=e===-1?``:n.slice(e+1)}if(!e.stack)e.stack=r;else if(r){let t=r.indexOf(`
|
|
39
|
+
`),n=t===-1?-1:r.indexOf(`
|
|
40
|
+
`,t+1),i=n===-1?``:r.slice(n+1);String(e.stack).endsWith(i)||(e.stack+=`
|
|
41
|
+
`+r)}}catch{}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=$p(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Vm.assertOptions(n,{silentJSONParsing:Hm.transitional(Hm.boolean),forcedJSONParsing:Hm.transitional(Hm.boolean),clarifyTimeoutError:Hm.transitional(Hm.boolean),legacyInterceptorReqResOrdering:Hm.transitional(Hm.boolean),advertiseZstdAcceptEncoding:Hm.transitional(Hm.boolean),validateStatusUndefinedResolves:Hm.transitional(Hm.boolean)},!1),r!=null&&(W.isFunction(r)?t.paramsSerializer={serialize:r}:Vm.assertOptions(r,{encode:Hm.function,serialize:Hm.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Vm.assertOptions(t,{baseUrl:Hm.spelling(`baseURL`),withXsrfToken:Hm.spelling(`withXSRFToken`)},!0),t.method=(W.getSafeProp(t,`method`)||W.getSafeProp(this.defaults,`method`)||`get`).toLowerCase();let a=i&&W.merge(i.common,i[t.method]);i&&W.forEach(Ep.concat(`common`),e=>{delete i[e]}),t.headers=Uf.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||dp;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=[Lm.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?e(f):f}catch(e){if(!t){l=Promise.reject(e);break}try{let n=t.call(this,e);W.isThenable(n)&&(l=Promise.resolve(n).then(()=>Lm.call(this,f)))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=Lm.call(this,f)}catch(e){l=Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=$p(this.defaults,e),ap(Xp(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};W.forEach([`delete`,`get`,`head`,`options`],function(e){Um.prototype[e]=function(t,n){return this.request($p(n||{},{method:e,url:t,data:n&&W.hasOwnProp(n,`data`)?n.data:void 0}))}}),W.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request($p(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Um.prototype[e]=t(),e!==`query`&&(Um.prototype[e+`Form`]=t(!0))});var Wm=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 Mp(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):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 Gm(e){return function(t){return e.apply(null,t)}}function Km(e){return W.isObject(e)&&e.isAxiosError===!0}var qm={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(qm).forEach(([e,t])=>{qm[t]===void 0&&(qm[t]=e)});function Jm(e){let t=new Um(e),n=ed(Um.prototype.request,t);return W.extend(n,Um.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Jm($p(e,t))},n}var Ym=Jm(kp);Ym.Axios=Um,Ym.CanceledError=Mp,Ym.CancelToken=Wm,Ym.isCancel=jp,Ym.VERSION=bm,Ym.toFormData=ep,Ym.AxiosError=G,Ym.Cancel=Ym.CanceledError,Ym.all=function(e){return Promise.all(e)},Ym.spread=Gm,Ym.isAxiosError=Km,Ym.mergeConfig=$p,Ym.AxiosHeaders=Uf,Ym.formToJSON=e=>Tp(W.isHTMLForm(e)?new FormData(e):e),Ym.getAdapter=Fm.getAdapter,Ym.HttpStatusCode=qm,Ym.default=Ym;var Xm=class extends Event{code;message;constructor(e,t){super(e),this.code=t?.code??void 0,this.message=t?.message??void 0}[Symbol.for(`nodejs.util.inspect.custom`)](e,t,n){return n($m(this),t)}[Symbol.for(`Deno.customInspect`)](e,t){return e($m(this),t)}};function Zm(e){let t=globalThis.DOMException;return typeof t==`function`?new t(e,`SyntaxError`):SyntaxError(e)}function Qm(e){return e instanceof Error?`errors`in e&&Array.isArray(e.errors)?e.errors.map(Qm).join(`, `):`cause`in e&&e.cause instanceof Error?`${e}: ${Qm(e.cause)}`:e.message:`${e}`}function $m(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var eh=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},th=10,nh=13,rh=32,ih=6;function ah(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{maxBufferSize:t,onComment:n,onError:r,onEvent:i,onId:a,onRetry:o}=e,s=[],c=0,l=``,u,d=``,f=0,p,m=!1,h=!1,g=!1;function _(e){if(m)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(l!==void 0){if(e=l+e,e===``||e===`ï`||e===`ï»`){l=e;return}l=void 0,e=e.replace(/^(?:\uFEFF|\xEF\xBB\xBF)/,``)}if((h||g)&&(e=v(e),!e))return;if(!s.length){let t=S(e);t!==``&&y(t),x();return}if(e.indexOf(`
|
|
42
|
+
`)===-1&&e.indexOf(`\r`)===-1){if(c<ih&&!b(s.join(``)+e.slice(0,ih-c))){s.length=0,c=0,h=!0;return}s.push(e),c+=e.length,x();return}s.push(e);let t=s.join(``);s.length=0,c=0,y(S(t)),x()}function v(e){if(e.length===0)return e;if(g)return g=!1,e.charCodeAt(0)===th?e.slice(1):e;let t=e.indexOf(`\r`),n=e.indexOf(`
|
|
43
|
+
`),r=t===-1?n:n===-1||t<n?t:n;return r===-1?``:r===e.length-1&&e.charCodeAt(r)===nh?(h=!1,g=!0,``):(h=!1,e.slice(r+(e.charCodeAt(r)===nh&&e.charCodeAt(r+1)===th?2:1)))}function y(e){if(e){if(e.charCodeAt(e.length-1)===nh){if(C(e,0,e.length-1),x())return;g=!0}else b(e)?(s.push(e),c=e.length):h=!0}}function b(e){let t=e.charCodeAt(0);return t===58&&!!n||t===100&&ch(e,`data`)||t===101&&ch(e,`event`)||t===105&&ch(e,`id`)||t===114&&ch(e,`retry`)}function x(){return m?!0:t===void 0||c+d.length<=t?!1:(m=!0,s.length=0,c=0,u=void 0,d=``,f=0,p=void 0,h=!1,g=!1,r?.(new eh(`Buffered data exceeded max buffer size of ${t} characters`,{type:`max-buffer-size-exceeded`})),!0)}function S(e){let t=0;if(e.indexOf(`\r`)===-1){let n=e.indexOf(`
|
|
44
|
+
`,t);for(;n!==-1;){if(t===n){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0,t=n+1,n=e.indexOf(`
|
|
45
|
+
`,t);continue}let r=e.charCodeAt(t);if(oh(e,t,r)){let r=e.charCodeAt(t+5)===rh?t+6:t+5,o=e.slice(r,n);if(f===0&&e.charCodeAt(n+1)===th){u!==void 0&&a?.(u),i?.({id:u,event:p,data:o}),u=void 0,d=``,p=void 0,t=n+2,n=e.indexOf(`
|
|
46
|
+
`,t);continue}d=f===0?o:`${d}\n${o}`,f++}else sh(e,t,r)?p=e.slice(e.charCodeAt(t+6)===rh?t+7:t+6,n)||void 0:C(e,t,n);if(x())return``;t=n+1,n=e.indexOf(`
|
|
47
|
+
`,t)}return e.slice(t)}for(;t<e.length;){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
48
|
+
`,t),i=-1;if(n!==-1&&r!==-1?i=n<r?n:r:n===-1?r!==-1&&(i=r):i=n===e.length-1?-1:n,i===-1)break;if(C(e,t,i),x())return``;t=i+1,e.charCodeAt(t-1)===nh&&e.charCodeAt(t)===th&&t++}return e.slice(t)}function C(e,t,r){if(t===r){T();return}let i=e.charCodeAt(t);if(oh(e,t,i)){let n=e.charCodeAt(t+5)===rh?t+6:t+5,i=e.slice(n,r);d=f===0?i:`${d}\n${i}`,f++;return}if(sh(e,t,i)){p=e.slice(e.charCodeAt(t+6)===rh?t+7:t+6,r)||void 0;return}if(i===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let n=e.slice(e.charCodeAt(t+3)===rh?t+4:t+3,r);n.includes(`\0`)||(u=n);return}if(i===58){if(n){let i=e.slice(t,r);n(i.slice(e.charCodeAt(t+1)===rh?2:1))}return}let a=e.slice(t,r),o=a.indexOf(`:`);if(o===-1){w(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===rh?2:1;w(s,a.slice(o+c),a)}function w(e,t,n){switch(e){case`event`:p=t||void 0;break;case`data`:d=f===0?t:`${d}\n${t}`,f++;break;case`id`:t.includes(`\0`)||(u=t);break;case`retry`:/^\d+$/.test(t)?o?.(parseInt(t,10)):r?.(new eh(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:n}));break;default:r?.(new eh(`Unknown field "${e.length>20?`${e.slice(0,20)}…`:e}"`,{type:`unknown-field`,field:e,value:t,line:n}))}}function T(){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0}function E(e={}){if(e.consume&&s.length>0){let e=s.join(``);C(e,0,e.length)}l=``,u=void 0,d=``,f=0,p=void 0,s.length=0,c=0,m=!1,h=!1,g=!1}return{feed:_,reset:E}}function oh(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function sh(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}function ch(e,t){let n=1;for(;n<e.length&&n<t.length;){if(e.charCodeAt(n)!==t.charCodeAt(n))return!1;n++}return e.length<=t.length||e.charCodeAt(t.length)===58}var lh=104857600,uh=class extends EventTarget{static CONNECTING=0;static OPEN=1;static CLOSED=2;CONNECTING=0;OPEN=1;CLOSED=2;get readyState(){return this.#e}get url(){return this.#t.href}get withCredentials(){return this.#r}get onerror(){return this.#u}set onerror(e){this.#u&&this.removeEventListener(`error`,this.#u),this.#u=e,e&&this.addEventListener(`error`,e)}get onmessage(){return this.#d}set onmessage(e){this.#d&&this.removeEventListener(`message`,this.#d),this.#d=e,e&&this.addEventListener(`message`,e)}get onopen(){return this.#f}set onopen(e){this.#f&&this.removeEventListener(`open`,this.#f),this.#f=e,e&&this.addEventListener(`open`,e)}addEventListener(e,t,n){let r=t;super.addEventListener(e,r,n)}removeEventListener(e,t,n){let r=t;super.removeEventListener(e,r,n)}constructor(e,t){super();try{if(e instanceof URL)this.#t=e;else if(typeof e==`string`)this.#t=new URL(e,fh());else throw Error(`Invalid URL`)}catch{throw Zm(`An invalid or illegal string was specified`)}this.#l=ah({maxBufferSize:t?.maxBufferSize??lh,onEvent:this.#v,onError:this.#b,onId:this.#_,onRetry:this.#y}),this.#e=this.CONNECTING,this.#a=3e3,this.#i=t?.fetch??globalThis.fetch,this.#r=t?.withCredentials??!1,this.#p()}close(){this.#o&&clearTimeout(this.#o),this.#e!==this.CLOSED&&(this.#c&&this.#c.abort(),this.#e=this.CLOSED,this.#c=void 0)}#e;#t;#n;#r;#i;#a;#o;#s=null;#c;#l;#u=null;#d=null;#f=null;#p(){this.#e=this.CONNECTING,this.#c=new AbortController;let e=this.#i;e(this.#t,this.#g()).then(this.#m).catch(this.#h)}#m=async e=>{this.#l.reset();let{body:t,redirected:n,status:r,headers:i}=e;if(r===204){this.#x(`Server sent HTTP 204, not reconnecting`,204),this.close();return}if(this.#n=n?new URL(e.url):void 0,r!==200){this.#x(`Non-200 status code (${r})`,r);return}let a=i.get(`content-type`)||``;if(!/^[\t\n\r ]*text\/event-stream[\t\n\r ]*(?:;|$)/i.test(a)){this.#x(`Invalid content type, expected "text/event-stream"`,r);return}if(this.#e===this.CLOSED)return;this.#e=this.OPEN;let o=new Event(`open`);if(this.dispatchEvent(o),typeof t!=`object`||!t||!(`getReader`in t)){this.#x(`Invalid response body, expected a web ReadableStream`,r),this.close();return}let s=new TextDecoder,c=t.getReader(),l=!0;do{let{done:e,value:t}=await c.read();if(this.#e===this.CLOSED){l=!1;break}t&&this.#l.feed(s.decode(t,{stream:!e})),e&&(l=!1,this.#l.reset(),this.#S())}while(l)};#h=e=>{this.#c=void 0,e.name!==`AbortError`&&e.type!==`aborted`&&this.#S(Qm(e))};#g(){let e={mode:`cors`,redirect:`follow`,headers:{Accept:`text/event-stream`,...this.#s?{"Last-Event-ID":this.#i===globalThis.fetch&&globalThis.navigator?.userAgent===`Cloudflare-Workers`?this.#s:mh(this.#s)}:void 0},cache:`no-store`,signal:this.#c?.signal};return`window`in globalThis&&(e.credentials=this.withCredentials?`include`:`same-origin`),e}#_=e=>{this.#s=e};#v=e=>{if(this.#e===this.CLOSED)return;let t=this.#n?this.#n.origin:this.#t.origin,n=this.#s??``,r=new MessageEvent(e.event||`message`,{data:e.data,origin:t,lastEventId:n});r.origin!==t&&ph(r,`origin`,t),r.lastEventId!==n&&ph(r,`lastEventId`,n),this.dispatchEvent(r)};#y=e=>{this.#a=e};#b=e=>{e.type===`max-buffer-size-exceeded`&&(this.close(),this.#x(e.message))};#x(e,t){this.close();let n=new Xm(`error`,{code:t,message:e});this.dispatchEvent(n)}#S(e,t){if(this.#e===this.CLOSED)return;this.#e=this.CONNECTING;let n=new Xm(`error`,{code:t,message:e});this.dispatchEvent(n);let r=setTimeout(this.#C,this.#a);typeof r==`object`&&r&&`unref`in r&&r.unref(),this.#o=r}#C=()=>{this.#o=void 0,this.#e===this.CONNECTING&&this.#p()}};Object.defineProperty(uh,"name",{value:`EventSource`}),Object.defineProperty(uh,Symbol.for(`eventsource.supports-fetch-override`),{value:!0,writable:!1,configurable:!1,enumerable:!1});var dh=uh;function fh(){let e=`document`in globalThis?globalThis.document:void 0;return e&&typeof e==`object`&&`baseURI`in e&&typeof e.baseURI==`string`?e.baseURI:void 0}function ph(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0})}function mh(e){let t=``;for(let n of new TextEncoder().encode(e))t+=String.fromCharCode(n);return t}function hh(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function gh(e,t=`|`){return e.map(e=>Uh(e)).join(t)}function _h(e,t){return typeof t==`bigint`?t.toString():t}var vh=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function yh(e){return new vh(e)}function bh(e){return e==null}function xh(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Sh(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Ch=Symbol(`evaluating`);function wh(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ch)return r===void 0&&(r=Ch,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Th(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Eh(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function Dh(e){return Eh(e._zod.def)??e._zod.def.shape}function Oh(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Th(this,t,e),e},enumerable:!0,configurable:!0})}function kh(e,t,n){t in e?Th(e,t,n):e[t]=n}function Ah(e,t,n,r){let i=Dh(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Oh(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):kh(e,a,r?r(n.value,a):n.value))}}function jh(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Oh(e,n,()=>t[n]):kh(e,n,r.value))}}function Mh(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Nh(e){return JSON.stringify(e)}function Ph(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Fh=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ih(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Lh=yh(()=>{if(Mg.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Rh(e){if(Ih(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Ih(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function zh(e){return Rh(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Bh=new Set([`string`,`number`,`symbol`]);function Vh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Hh(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function K(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Uh(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Wh(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Gh={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Kh={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function qh(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return Ah(i,e,Jh(e,t)),Hh(e,Mh(n,{shape:i,checks:[]}))}function Jh(e,t){let n=Dh(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Yh(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Jh(e,t)),a={};return Ah(a,e,Reflect.ownKeys(Dh(e)).filter(e=>!i.has(e))),Hh(e,Mh(n,{shape:a,checks:[]}))}function Xh(e,t){if(!Rh(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=Dh(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Hh(e,Mh(e._zod.def,{shape:Zh(e,t)}))}function Zh(e,t){let n={};return Ah(n,e,Reflect.ownKeys(Dh(e))),jh(n,t),n}function Qh(e,t){if(!Rh(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Hh(e,Mh(e._zod.def,{shape:Zh(e,t)}))}function $h(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return Ah(n,e,Reflect.ownKeys(Dh(e))),Ah(n,t,Reflect.ownKeys(Dh(t))),Hh(e,Mh(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function eg(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Jh(t,n)):void 0,o={};return Ah(o,t,Reflect.ownKeys(Dh(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),Hh(t,Mh(t._zod.def,{shape:o,checks:[]}))}function tg(e,t,n){let r=n?new Set(Jh(t,n)):void 0,i={};return Ah(i,t,Reflect.ownKeys(Dh(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),Hh(t,Mh(t._zod.def,{shape:i}))}function ng(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function rg(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ig(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ag(e){return typeof e==`string`?e:e?.message}function og(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function sg(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function cg(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:ag(e.inst?._zod.def?.error?.(e))??ag(a?.(e))??ag(t?.error?.(e))??ag(n.customError?.(e))??ag(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var lg=/[\uD800-\uDBFF]/;function ug(e){let t=e.length;if(!lg.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function dg(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function fg(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function pg(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function mg(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):vg(e,n,r.value)}}function hg(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function gg(e,t,n){return hg(e,t,n,!1)}function _g(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return hg(this,n,r(this))},set(e){hg(this,n,e)}})}return t}function vg(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:hg(this,t,n.bind(this))},set(e){hg(this,t,e)}})}function yg(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var bg,xg=!1,Sg={configurable:!0,get(){xg=!0}};function q(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&bg!==e._zod?bg=void 0:(bg=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Sg);let e=xg;xg=!1;try{let r=n(this);return xg?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),xg||=e,r}catch(n){throw delete this[t],xg||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Cg(e,t,n,r){let i=yg(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var wg=`~constantCatch`;function Tg(e){let t=()=>e;return t[wg]=!0,t}var Eg,Dg={value:void 0,enumerable:!1},Og=`captureStackTrace`in Error?Error:null;function kg(e){let t=Og;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Og=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function J(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Dg.value=new a(r);try{Object.defineProperty(n,"_zod",Dg)}finally{Dg.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),mg(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?kg(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Ag=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},jg=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Eg=globalThis).__zod_globalConfig??(Eg.__zod_globalConfig={});var Mg=globalThis.__zod_globalConfig;function Ng(e){return e&&Object.assign(Mg,e),Mg}function Pg(){let e=this._zod;return e.message??=JSON.stringify(e.def,_h,2),e.message}function Fg(e){this._zod.message=e}var Ig={get:Pg,set:Fg,enumerable:!0,configurable:!0},Lg={value:void 0,enumerable:!1},Rg=new WeakSet([Object.prototype,Error.prototype]),zg=J(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Lg.value=t,Object.defineProperty(e,"issues",Lg),Lg.value=void 0,Object.defineProperty(e,"message",Ig);let n=Object.getPrototypeOf(e);Rg.has(n)||(Rg.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function Bg(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Vg(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Bg(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Hg(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Ug(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Wg=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Ag;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>cg(e,o,Ng())));throw Fh(n,a?.callee??t),n}return s.value};return t},Gg=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>cg(e,o,Ng())));throw Fh(n,a?.callee??t),n}return s.value};return t},Kg=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Ag;return a.issues.length?qg(e,a.issues,i):{success:!0,data:a.value}};function qg(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>cg(e,n,Ng()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Jg=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?qg(e,a.issues,i):{success:!0,data:a.value}},Yg=Symbol.for(`zod.compile.invalid`),Xg=Symbol.for(`zod.compile.fallback`),Zg=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Yg)return!0;if(r.definite===!0&&n===void 0)return!1}return Qg(e,t,n)});function Qg(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Xg]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Ag;return a.issues.length===0}var $g=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},e_=e=>{let t=Wg(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Ug(n,a))};return n},t_=e=>{let t=Wg(e),n=(e,r,i,a)=>t(e,r,i,Ug(n,a));return n},n_=e=>{let t=Gg(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Ug(n,a))};return n},r_=e=>{let t=Gg(e),n=async(e,r,i,a)=>await t(e,r,i,Ug(n,a));return n},i_=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Kg(e)(t,n,i)},a_=e=>(t,n,r)=>Kg(e)(t,n,r),o_=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Jg(e)(t,n,i)},s_=e=>async(t,n,r)=>Jg(e)(t,n,r),c_=/^[cC][0-9a-z]{6,}$/,l_=/^[0-9a-z]+$/,u_=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,d_=/^[0-9a-vA-V]{20}$/,f_=/^[A-Za-z0-9]{27}$/,p_=/^[a-zA-Z0-9_-]{21}$/;function m_(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var h_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,g_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,__=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,v_=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,y_=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function b_(){return new RegExp(y_,`u`)}var x_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,S_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,C_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,w_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,T_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,E_=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,D_=/^https?$/,O_=/^\+[1-9]\d{6,14}$/,k_=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function A_(e){return RegExp(`^${e}$`)}var j_=A_(k_);function M_(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function N_(e){return RegExp(`^${M_(e)}$`)}function P_(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${M_({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${M_({precision:e.precision})}`:n;return RegExp(`^${k_}T(?:${r})$`)}var F_=/^[\s\S]{0,}$/,I_=/^-?\d+$/,L_=/^-?\d+(?:\.\d+)?$/,R_=/^(?:true|false)$/i,z_=/^null$/i,B_=/^[^A-Z]*$/,V_=/^[^a-z]*$/,H_=J(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),U_=e=>{let t=e.value;return!bh(t)&&t.length!==void 0},W_={number:`number`,bigint:`bigint`,object:`date`},G_=J(`$ZodCheckLessThan`,(e,t)=>{H_.init(e,t);let n=W_[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:W_[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),K_=J(`$ZodCheckGreaterThan`,(e,t)=>{H_.init(e,t);let n=W_[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:W_[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),q_=J(`$ZodCheckMultipleOf`,(e,t)=>{H_.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Sh(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),J_=J(`$ZodCheckNumberFormat`,(e,t)=>{H_.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Gh[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Y_=J(`$ZodCheckMaxLength`,(e,t)=>{var n;H_.init(e,t),(n=e._zod.def).when??(n.when=U_),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?ug(r):i)<=t.maximum)return;let a=dg(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),X_=J(`$ZodCheckMinLength`,(e,t)=>{var n;H_.init(e,t),(n=e._zod.def).when??(n.when=U_),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?ug(r):i)>=t.minimum)return;let a=dg(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Z_=J(`$ZodCheckLengthEquals`,(e,t)=>{var n;H_.init(e,t),(n=e._zod.def).when??(n.when=U_),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?ug(r):i;if(a===t.length)return;let o=dg(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Q_=J(`$ZodCheckStringFormat`,(e,t)=>{var n,r;H_.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),$_=J(`$ZodCheckRegex`,(e,t)=>{Q_.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ev=J(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=B_,Q_.init(e,t)}),tv=J(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=V_,Q_.init(e,t)}),nv=J(`$ZodCheckIncludes`,(e,t)=>{H_.init(e,t);let n=Vh(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),rv=J(`$ZodCheckStartsWith`,(e,t)=>{H_.init(e,t);let n=RegExp(`^${Vh(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),iv=J(`$ZodCheckEndsWith`,(e,t)=>{H_.init(e,t);let n=RegExp(`.*${Vh(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),av=J(`$ZodCheckOverwrite`,(e,t)=>{H_.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ov=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
49
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
50
|
+
`)}\n};`)(...Object.values(this.closed))}},sv={major:4,minor:6,patch:7},cv=J(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sv;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=ng(t),a;for(let o of n){if(o._zod.def.when){if(rg(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Ag;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(sg(t.issues,n,e),i||=ng(t,n))});else{if(t.issues.length===n)continue;sg(t.issues,n,e),i||=ng(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(ng(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Ag;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Ag;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return gg(this,`~standard`,dv(this))},set"~standard"(e){hg(this,`~standard`,e)}}),lv=(e,t)=>e.issues.length?{issues:e.issues.map(e=>cg(e,t,Ng()))}:{value:e.value};async function uv(e,t){let n={async:!0};return lv(await e._zod.run({value:t,issues:[]},n),n)}function dv(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return lv(r,n)}catch{}return uv(e,t)},vendor:`zod`,version:1}}var fv=J(`$ZodString`,(e,t)=>{cv.init(e,t),e._zod.pattern=t.pattern??F_,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),pv=J(`$ZodStringFormat`,(e,t)=>{Q_.init(e,t),fv.init(e,t)}),mv=J(`$ZodGUID`,(e,t)=>{t.pattern??=g_,pv.init(e,t)}),hv=J(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=__(e)}else t.pattern??=__();pv.init(e,t)}),gv=J(`$ZodEmail`,(e,t)=>{t.pattern??=v_,pv.init(e,t)});function _v(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function vv(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?_v(e)||2:yv(e,t)}function yv(e,t){if(!t.normalize&&t.protocol?.source===D_.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var bv=/[\t\n\r]/g;function xv(e){return e.replace(bv,``)}function Sv(e,t){return t.lastIndex=0,t.test(e.hostname)}function Cv(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var wv=J(`$ZodURL`,(e,t)=>{pv.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=vv(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=xv(r);return}t.hostname&&!Sv(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Cv(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:xv(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Tv=J(`$ZodEmoji`,(e,t)=>{t.pattern??=b_(),pv.init(e,t)}),Ev=J(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?p_:m_(t.length),pv.init(e,t)}),Dv=J(`$ZodCUID`,(e,t)=>{t.pattern??=c_,pv.init(e,t)}),Ov=J(`$ZodCUID2`,(e,t)=>{t.pattern??=l_,pv.init(e,t)}),kv=J(`$ZodULID`,(e,t)=>{t.pattern??=u_,pv.init(e,t)}),Av=J(`$ZodXID`,(e,t)=>{t.pattern??=d_,pv.init(e,t)}),jv=J(`$ZodKSUID`,(e,t)=>{t.pattern??=f_,pv.init(e,t)}),Mv=J(`$ZodISODateTime`,(e,t)=>{t.pattern??=P_(t),pv.init(e,t)}),Nv=J(`$ZodISODate`,(e,t)=>{t.pattern??=j_,pv.init(e,t)}),Pv=J(`$ZodISOTime`,(e,t)=>{t.pattern??=N_(t),pv.init(e,t)}),Fv=J(`$ZodISODuration`,(e,t)=>{t.pattern??=h_,pv.init(e,t)}),Iv=J(`$ZodIPv4`,(e,t)=>{t.pattern??=x_,pv.init(e,t)}),Lv=/^[0-9a-fA-F:.]+$/;function Rv(e){return Lv.test(e)?_v(`http://[${e}]`):!1}var zv=J(`$ZodIPv6`,(e,t)=>{t.pattern??=S_,pv.init(e,t),e._zod.check=n=>{Rv(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Bv=J(`$ZodCIDRv4`,(e,t)=>{t.pattern??=C_,pv.init(e,t)});function Vv(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Rv(n)}var Hv=J(`$ZodCIDRv6`,(e,t)=>{t.pattern??=w_,pv.init(e,t),e._zod.check=n=>{Vv(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Uv(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Wv=/^[0-9a-zA-Z+/]*={0,2}$/,Gv=J(`$ZodBase64`,(e,t)=>{t.pattern??=Wv,pv.init(e,t),e._zod.check=n=>{Uv(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Kv=/^[A-Za-z0-9_-]*$/;function qv(e){if(!Kv.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Uv(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Jv=J(`$ZodBase64URL`,(e,t)=>{t.pattern??=Kv,pv.init(e,t),e._zod.check=n=>{qv(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Yv=J(`$ZodE164`,(e,t)=>{t.pattern??=O_,pv.init(e,t)});function Xv(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Zv=J(`$ZodJWT`,(e,t)=>{pv.init(e,t),e._zod.check=n=>{Xv(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Qv=J(`$ZodNumber`,(e,t)=>{cv.init(e,t),e._zod.pattern=L_,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),$v=J(`$ZodNumberFormat`,(e,t)=>{J_.init(e,t),Qv.init(e,t)}),ey=J(`$ZodBoolean`,(e,t)=>{cv.init(e,t),e._zod.pattern=R_,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ty=J(`$ZodNull`,(e,t)=>{cv.init(e,t),e._zod.pattern=z_,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),ny=J(`$ZodUnknown`,(e,t)=>{cv.init(e,t),e._zod.parse=e=>e}),ry=J(`$ZodNever`,(e,t)=>{cv.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),iy=J(`$ZodDate`,(e,t)=>{cv.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function ay(e,t){let n=og(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of og(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,sg(n.issues,t,e),n}}return i(n,a)}}var oy=e=>Array.isArray(e)?e.length:-1;function sy(e,t,n){e.issues.length&&t.issues.push(...ig(n,e.issues)),t.value[n]=e.value}var cy=J(`$ZodArray`,(e,t)=>{cv.init(e,t);let n=Mg.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>sy(t,r,e)));else if(sy(c,r,e),s&&c.issues.length!==0&&ng(c))break}return o.length?Promise.all(o).then(()=>r):r},ay(e,oy)});function ly(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...ig(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var uy=[];function dy(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:uy,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Wh(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function fy(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(ng(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>ly(e,n,i,t,d,f))):ly(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var py=J(`$ZodObject`,(e,t)=>{cv.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=yh(()=>dy(t));q(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||Th(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Ih,o=t.catchall,s,c=Mg.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(ng(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>ly(n,t,e,r,a,o))):ly(s,t,e,r,a,o)}return o?fy(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),my=J(`$ZodObjectJIT`,(e,t)=>{py.init(e,t);let n=e._zod.parse,r=yh(()=>dy(t)),i=Mg.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new ov([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
51
|
+
let ${e}_ab = false;
|
|
52
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
53
|
+
const iss = ${e}.issues[i];
|
|
54
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
55
|
+
payload.issues.push(iss);
|
|
56
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
57
|
+
}
|
|
58
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
59
|
+
payload.value = newResult;
|
|
60
|
+
return payload;
|
|
61
|
+
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Nh(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
62
|
+
const ${n}_present = ${i};
|
|
63
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
64
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (${e}) {
|
|
68
|
+
newResult[${r}] = ${n}.value;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
`)}else f?(o.write(`
|
|
73
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
74
|
+
}
|
|
75
|
+
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
76
|
+
if (${n}.value !== undefined || ${i}) {
|
|
77
|
+
newResult[${r}] = ${n}.value;
|
|
78
|
+
}
|
|
79
|
+
`)):o.write(`
|
|
80
|
+
const ${n}_present = ${i};
|
|
81
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
82
|
+
}
|
|
83
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
84
|
+
payload.issues.push({
|
|
85
|
+
code: "invalid_type",
|
|
86
|
+
expected: "nonoptional",
|
|
87
|
+
input: undefined,
|
|
88
|
+
path: [${r}]
|
|
89
|
+
});
|
|
90
|
+
if (ctx && ctx.abortEarly) {
|
|
91
|
+
payload.value = newResult;
|
|
92
|
+
return payload;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (${n}_present) {
|
|
97
|
+
newResult[${r}] = ${n}.value;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Ih,c=!Mg.jitless,l=c&&Lh.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?fy([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function hy(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ng(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>cg(e,r,Ng())))}),t)}var gy=J(`$ZodUnion`,(e,t)=>{cv.init(e,t),q(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),q(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),q(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),q(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>xh(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>hy(t,r,e,i)):hy(o,r,e,i)}}),_y=J(`$ZodIntersection`,(e,t)=>{cv.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>yy(e,t,n)):yy(e,i,a)}});function vy(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Rh(e)&&Rh(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=vy(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=vy(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function yy(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=vy(t.value,n.value);if(!c.valid){if(ng(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var by=J(`$ZodRecord`,(e,t)=>{cv.init(e,t);let n=Mg.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Rh(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>cg(e,i,Ng())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...ig(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...ig(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&L_.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>cg(e,i,Ng())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...ig(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...ig(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),xy=J(`$ZodEnum`,(e,t)=>{cv.init(e,t);let n=hh(t.entries),r=new Set(n);e._zod.values=r,q(e,`pattern`,e=>{let t=hh(e.def.entries).filter(e=>Bh.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Vh(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Sy=J(`$ZodLiteral`,(e,t)=>{cv.init(e,t);let n=new Set(t.values);e._zod.values=n,q(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Vh(e):e?Vh(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Cy=J(`$ZodTransform`,(e,t)=>{cv.init(e,t),e._zod.optin=`optional`,Mg.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new jg(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Ag;return n.value=i,n}});function wy(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ty=J(`$ZodOptional`,(e,t)=>{cv.init(e,t),q(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,q(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),q(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${xh(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>wy(e,t)):wy(e,r)}return t.innerType._zod.run(e,n)}}),Ey=J(`$ZodExactOptional`,(e,t)=>{Ty.init(e,t),q(e,`values`,e=>e.def.innerType._zod.values),q(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Dy=J(`$ZodNullable`,(e,t)=>{cv.init(e,t),q(e,`optin`,e=>e.def.innerType._zod.optin),q(e,`optout`,e=>e.def.innerType._zod.optout),q(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${xh(t.source)}|null)$`):void 0}),q(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Oy=J(`$ZodDefault`,(e,t)=>{cv.init(e,t),e._zod.optin=`defaulted`,q(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ky(e,t)):ky(r,t)}});function ky(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ay=J(`$ZodPrefault`,(e,t)=>{cv.init(e,t),e._zod.optin=`defaulted`,q(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),jy=J(`$ZodNonOptional`,(e,t)=>{cv.init(e,t),q(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>My(t,e)):My(i,e)}});function My(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ny(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>cg(e,r,Ng()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Py=J(`$ZodCatch`,(e,t)=>{cv.init(e,t),q(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),q(e,`optout`,e=>e.def.innerType._zod.optout),q(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Ny(e,r,t,n)):Ny(e,r,t,n)}}),Fy=J(`$ZodPipe`,(e,t)=>{cv.init(e,t),q(e,`values`,e=>e.def.in._zod.values),q(e,`optin`,e=>e.def.in._zod.optin),q(e,`optout`,e=>e.def.out._zod.optout),q(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Iy(e,t.in,n)):Iy(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Iy(e,t.out,n)):Iy(r,t.out,n)}});function Iy(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Ly=J(`$ZodReadonly`,(e,t)=>{cv.init(e,t),q(e,`propValues`,e=>e.def.innerType._zod.propValues),q(e,`values`,e=>e.def.innerType._zod.values),q(e,`optin`,e=>e.def.innerType?._zod?.optin),q(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ry):Ry(r)}});function Ry(e){return e.memo||(e.value=Object.freeze(e.value)),e}var zy=J(`$ZodLazy`,(e,t)=>{cv.init(e,t),wh(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),q(e,`pattern`,e=>e.innerType?._zod?.pattern),q(e,`propValues`,e=>e.innerType?._zod?.propValues),q(e,`optin`,e=>e.innerType?._zod?.optin??void 0),q(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),By=J(`$ZodCustom`,(e,t)=>{H_.init(e,t),cv.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Vy(t,n,r,e));Vy(i,n,r,e)}});function Vy(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(pg(e))}}var Hy=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Uy=`~memo`,Wy=[];function Gy(e){return typeof e==`object`&&!!e}function Ky(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var qy=new WeakMap,Jy=0,Yy=1,Xy=2;function Zy(e,t,n){let r=qy.get(e);if(r!==void 0)return r?Xy:Jy;if(t.has(e))return Xy;t.add(e);let i=Jy,a=e=>{if(i!==Xy&&e?._zod){let r=Zy(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Jy;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Yy:o.value?._zod?Zy(o.value,t,n):Jy;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Eh(c);s(e?o(e,!0):Yy),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Zy(r,t,!1):Yy);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Qy(e,i)}function Qy(e,t){return t!==Yy&&qy.set(e,t===Xy),t}function $y(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var eb,tb=[],nb={alloc(e,t,n){let r=eb;if(!r)return n;eb=void 0;let i={value:n,issues:null};return r.set(t.value,i),tb.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&ib(n,e.value))throw new Hy;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Zy(e,new Set,!1);if(i===Jy)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Xy||r?n=!0:r=!0}let l=s.value;if(!Gy(l))return t(s,c);let u=c[Uy];u||(u={buckets:new WeakMap,backEdges:void 0},c[Uy]=u);let d;i===c?d=a:(d=$y(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Ky(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;eb=d;let p=tb.length,m=t(s,c);eb=void 0;let h=tb.length>p?tb.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Ky(e.issues):Wy),e)):(h&&(h.issues=m.issues.length?Ky(m.issues):Wy),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function rb(){return nb}function ib(e,t){let n=e[Uy]?.backEdges;return n!==void 0&&Gy(t)&&n.has(t)}var ab=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(fg(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Uh(e.values[0])}`:`Invalid option: expected one of ${gh(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${gh(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function ob(){return{localeError:ab()}}var sb,cb=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function lb(){return new cb}(sb=globalThis).__zod_globalRegistry??(sb.__zod_globalRegistry=lb());var ub=globalThis.__zod_globalRegistry;function db(e){return e.checks&&=[...e.checks],e}function fb(e,t){return new e(db({type:`string`,...K(t)}))}function pb(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...K(t)})}function mb(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...K(t)})}function hb(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...K(t)})}function gb(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...K(t)})}function _b(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...K(t)})}function vb(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...K(t)})}function yb(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...K(t)})}function bb(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...K(t)})}function xb(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...K(t)})}function Sb(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...K(t)})}function Cb(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...K(t)})}function wb(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...K(t)})}function Tb(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...K(t)})}function Eb(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...K(t)})}function Db(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...K(t)})}function Ob(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...K(t)})}function kb(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...K(t)})}function Ab(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...K(t)})}function jb(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...K(t)})}function Mb(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...K(t)})}function Nb(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...K(t)})}function Pb(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...K(t)})}function Fb(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...K(t)})}function Ib(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...K(t)})}function Lb(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...K(t)})}function Rb(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...K(t)})}function zb(e,t){return new e(db({type:`number`,checks:[],...K(t)}))}function Bb(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...K(t)})}function Vb(e,t){return new e({type:`boolean`,...K(t)})}function Hb(e,t){return new e({type:`null`,...K(t)})}function Ub(e){return new e({type:`unknown`})}function Wb(e,t){return new e({type:`never`,...K(t)})}function Gb(e,t){return new e({type:`date`,...K(t)})}function Kb(e,t){return new G_({check:`less_than`,...K(t),value:e,inclusive:!1})}function qb(e,t){return new G_({check:`less_than`,...K(t),value:e,inclusive:!0})}function Jb(e,t){return new K_({check:`greater_than`,...K(t),value:e,inclusive:!1})}function Yb(e,t){return new K_({check:`greater_than`,...K(t),value:e,inclusive:!0})}function Xb(e,t){return new q_({check:`multiple_of`,...K(t),value:e})}function Zb(e,t){return new Y_({check:`max_length`,...K(t),maximum:e})}function Qb(e,t){return new X_({check:`min_length`,...K(t),minimum:e})}function $b(e,t){return new Z_({check:`length_equals`,...K(t),length:e})}function ex(e,t){return new $_({check:`string_format`,format:`regex`,...K(t),pattern:e})}function tx(e){return new ev({check:`string_format`,format:`lowercase`,...K(e)})}function nx(e){return new tv({check:`string_format`,format:`uppercase`,...K(e)})}function rx(e,t){return new nv({check:`string_format`,format:`includes`,...K(t),includes:e})}function ix(e,t){return new rv({check:`string_format`,format:`starts_with`,...K(t),prefix:e})}function ax(e,t){return new iv({check:`string_format`,format:`ends_with`,...K(t),suffix:e})}function ox(e){return new av({check:`overwrite`,tx:e})}function sx(e){return ox(t=>t.normalize(e))}function cx(){return ox(e=>e.trim())}function lx(){return ox(e=>e.toLowerCase())}function ux(){return ox(e=>e.toUpperCase())}function dx(){return ox(e=>Ph(e))}function fx(e,t,n){return new e({type:`array`,element:t,...K(n)})}function px(e,t,n){let r=K(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function mx(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...K(n)})}function hx(e,t){let n=gx(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(pg(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(pg(r))}},e(t.value,t)),t);return n}function gx(e,t){let n=new H_({check:`custom`,...K(t)});return n._zod.check=e,n}function _x(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Th(e,t,n[t]);return e}function vx(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??ub,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function yx(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function bx(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,bx(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&_x(o.schema,c),t.io===`input`&&Ax(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function xx(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Sx(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${xx(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+xx(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
101
|
+
|
|
102
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Cx(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Cx(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var wx=new Set([`type`,`properties`,`required`,`additionalProperties`]),Tx=[`oneOf`,`anyOf`];function Ex(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Dx(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!wx.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Ex(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Th(n,r,e.length===1?e[0]:Dx(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Ex(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Ox(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of wx)if(t in e)return;let n=t.filter(e=>Tx.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Dx(t);else{let e=n[0],i=Tx.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Dx([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,_x(e,r))}function kx(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):_x(i,s),_x(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Cx(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Ox(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}_x(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Th(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Mx(t,`input`,e.processors),output:Mx(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Ax(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Ax(r.element,n);if(r.type===`set`)return Ax(r.valueType,n);if(r.type===`lazy`)return Ax(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return Ax(r.innerType,n);if(r.type===`intersection`)return Ax(r.left,n)||Ax(r.right,n);if(r.type===`record`||r.type===`map`)return Ax(r.keyType,n)||Ax(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Ax(r.in,n)||Ax(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Ax(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Ax(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Ax(e,n))return!0;return!!(r.rest&&Ax(r.rest,n))}return!1}var jx=(e,t={})=>n=>{let r=vx({...n,processors:t});return bx(e,r),Sx(r,e),kx(r,e)},Mx=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=vx({...i??{},target:a,io:t,processors:n});return bx(e,o),Sx(o,e),kx(o,e)},Nx=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Px=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Fx=(e,t)=>{Nx(e,`minimum`,t),Px(e,`maximum`,t)},Ix=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Lx=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Rx=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},zx=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Bx=(e,t)=>Nx(e,`minimum`,t.minimum),Vx=(e,t)=>Px(e,`maximum`,t.maximum),Hx=e=>(t,n)=>{zx(t,n.format);let[r,i]=e[n.format];Nx(t,`minimum`,r),Px(t,`maximum`,i)},Ux={greater_than:(e,t)=>Nx(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Px(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ix(e,t.value),number_format:Hx(Gh),bigint_format:Hx(Kh),min_length:Bx,max_length:Vx,length_equals:(e,t)=>Fx(e,t.length),min_size:Bx,max_size:Vx,size_equals:(e,t)=>Fx(e,t.size),string_format:(e,t)=>{zx(e,t.format),t.pattern&&Lx(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Rx(e,t.mime)};function Wx(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Ux[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Nx(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Nx(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Px(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Px(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ix(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Rx(t,i.mime);for(let e of i.patterns??[])Lx(t,e);return t}var Gx={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Kx=new Map([[Wv,T_],[Kv,E_]]),qx=e=>Kx.get(e)??e,Jx=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Wx(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Gx[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(qx);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Yx=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Wx(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):yx(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Xx=(e,t,n,r)=>{n.type=`boolean`},Zx=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Qx=(e,t,n,r)=>{n.not={}},$x=(e,t,n,r)=>{yx(e,t,n,r,`Date cannot be represented in JSON Schema`)},eS=(e,t,n,r)=>{let i=e._zod.def,a=hh(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},tS=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(yx(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(yx(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},nS=(e,t,n,r)=>{yx(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},rS=(e,t,n,r)=>{yx(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},iS=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Wx(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=bx(a.element,t,{...r,path:[...r.path,`items`]})};function aS(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?aS(t.out):t.type===`catch`?aS(t.innerType):e._zod.optin}var oS=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&yx(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Th(i.properties,e,bx(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?aS(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=bx(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},sS=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>bx(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},cS=(e,t,n,r)=>{let i=e._zod.def,a=bx(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=bx(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function lS(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=lS(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>lS(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?L_:I_).source)),p}var uS=new WeakMap;function dS(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of uS.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=lS(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var fS=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Wx(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=bx(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)Th(i.patternProperties,qx(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=bx(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=uS.get(t);n||(n=[],uS.set(t,n),t.deferred.push(()=>dS(t))),n.push(e)}i.additionalProperties=bx(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&aS(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},pS=(e,t,n,r)=>{let i=e._zod.def,a=bx(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},mS=(e,t,n,r)=>{let i=e._zod.def;bx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},hS=Symbol();function gS(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(yx(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),hS):JSON.parse(o)}var _S=(e,t,n,r)=>{let i=e._zod.def;bx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=gS(i.defaultValue,e,t,n,r);o!==hS&&(n.default=o)},vS=(e,t,n,r)=>{let i=e._zod.def;bx(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=gS(i.defaultValue,e,t,n,r);o!==hS&&(n._prefault=o)},yS=(e,t,n,r)=>{let i=e._zod.def;bx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{yx(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},bS=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;bx(o,t,r);let s=t.seen.get(e);s.ref=o},xS=(e,t,n,r)=>{let i=e._zod.def;bx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},SS=(e,t,n,r)=>{let i=e._zod.def;bx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},CS=(e,t,n,r)=>{let i=e._zod.innerType;bx(i,t,r);let a=t.seen.get(e);a.ref=i},wS=new WeakSet([Object.prototype,Error.prototype]);function TS(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var ES=J(`ZodError`,(e,t)=>{zg.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);wS.has(n)||(wS.add(n),TS(n,`format`,e=>t=>Hg(e,t)),TS(n,`flatten`,e=>t=>Vg(e,t)),TS(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,_h,2)}),TS(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,_h,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),DS=Wg(ES),OS=Gg(ES),kS=Kg(ES),AS=Jg(ES),jS=e_(ES),MS=t_(ES),NS=n_(ES),PS=r_(ES),FS=i_(ES),IS=a_(ES),LS=o_(ES),RS=s_(ES);function zS(){Mg.localeError||Ng(ob())}function BS(){Mg.memoizer||Ng({memoizer:rb()})}var VS=J(`ZodType`,(e,t)=>(zS(),cv.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Mh(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Hh(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(dw(e,t))},superRefine(e,t){return this.check(fw(e,t))},overwrite(e){return this.check(ox(e))},optional(){return WC(this)},exactOptional(){return KC(this)},nullable(){return JC(this)},nullish(){return WC(JC(this))},nonoptional(e){return ew(this,e)},array(){return OC(this)},or(e){return MC([this,e])},and(e){return PC(this,e)},transform(e){return iw(this,HC(e))},default(e){return XC(this,e)},prefault(e){return QC(this,e)},catch(e){return nw(this,e)},pipe(e){return iw(this,e)},readonly(){return ow(this)},describe(e){let t=this.clone();return ub.add(t,{description:e}),t},meta(...e){if(e.length===0)return ub.get(this);let t=this.clone();return ub.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return gg(this,`~standard`,{...dv(this),jsonSchema:{input:Mx(this,`input`),output:Mx(this,`output`)}})},set"~standard"(e){hg(this,`~standard`,e)},parse:function e(t,n){return DS(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await OS(this,t,n,{callee:e})},safeParse(e,t){return kS(this,e,t)},async safeParseAsync(e,t){return AS(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){hg(this,`spa`,e)},validate(e,t){return Zg(this,e,t)},validateAsync(e,t){return $g(this,e,t)},encode:function e(t,n){return jS(this,t,n,{callee:e})},decode:function e(t,n){return MS(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await NS(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await PS(this,t,n,{callee:e})},safeEncode(e,t){return FS(this,e,t)},safeDecode(e,t){return IS(this,e,t)},async safeEncodeAsync(e,t){return LS(this,e,t)},async safeDecodeAsync(e,t){return RS(this,e,t)},toJSONSchema(e){return jx(this,{})(e)},get description(){return ub.get(this)?.description},get _def(){return this._zod.def}}),HS=J(`_ZodString`,(e,t)=>{fv.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jx(e,t,n,r)},_g({format:e=>Wx(e).format??null,minLength:e=>Wx(e).minimum??null,maxLength:e=>Wx(e).maximum??null},{regex(...e){return this.check(ex(...e))},includes(...e){return this.check(rx(...e))},startsWith(...e){return this.check(ix(...e))},endsWith(...e){return this.check(ax(...e))},min(...e){return this.check(Qb(...e))},max(...e){return this.check(Zb(...e))},length(...e){return this.check($b(...e))},nonempty(...e){return this.check(Qb(1,...e))},lowercase(e){return this.check(tx(e))},uppercase(e){return this.check(nx(e))},trim(){return this.check(cx())},normalize(...e){return this.check(sx(...e))},toLowerCase(){return this.check(lx())},toUpperCase(){return this.check(ux())},slugify(){return this.check(dx())}})),US=J(`ZodString`,(e,t)=>{fv.init(e,t),HS.init(e,t)},{email(e){return this.check(pb(YS,e))},url(e){return this.check(yb(QS,e))},jwt(e){return this.check(Pb(pC,e))},emoji(e){return this.check(bb($S,e))},guid(e){return this.check(mb(XS,e))},uuid(e){return this.check(hb(ZS,e))},uuidv4(e){return this.check(gb(ZS,e))},uuidv6(e){return this.check(_b(ZS,e))},uuidv7(e){return this.check(vb(ZS,e))},nanoid(e){return this.check(xb(eC,e))},cuid(e){return this.check(Sb(tC,e))},cuid2(e){return this.check(Cb(nC,e))},ulid(e){return this.check(wb(rC,e))},base64(e){return this.check(jb(uC,e))},base64url(e){return this.check(Mb(dC,e))},xid(e){return this.check(Tb(iC,e))},ksuid(e){return this.check(Eb(aC,e))},ipv4(e){return this.check(Db(oC,e))},ipv6(e){return this.check(Ob(sC,e))},cidrv4(e){return this.check(kb(cC,e))},cidrv6(e){return this.check(Ab(lC,e))},e164(e){return this.check(Nb(fC,e))},datetime(e){return this.check(Fb(GS,e))},date(e){return this.check(Ib(KS,e))},time(e){return this.check(Lb(qS,e))},duration(e){return this.check(Rb(JS,e))}});function Y(e){return fb(US,e)}var WS=J(`ZodStringFormat`,(e,t)=>{pv.init(e,t),HS.init(e,t)}),GS=J(`ZodISODateTime`,(e,t)=>{Mv.init(e,t),WS.init(e,t)}),KS=J(`ZodISODate`,(e,t)=>{Nv.init(e,t),WS.init(e,t)}),qS=J(`ZodISOTime`,(e,t)=>{Pv.init(e,t),WS.init(e,t)}),JS=J(`ZodISODuration`,(e,t)=>{Fv.init(e,t),WS.init(e,t)}),YS=J(`ZodEmail`,(e,t)=>{gv.init(e,t),WS.init(e,t)}),XS=J(`ZodGUID`,(e,t)=>{mv.init(e,t),WS.init(e,t)}),ZS=J(`ZodUUID`,(e,t)=>{hv.init(e,t),WS.init(e,t)}),QS=J(`ZodURL`,(e,t)=>{wv.init(e,t),WS.init(e,t)}),$S=J(`ZodEmoji`,(e,t)=>{Tv.init(e,t),WS.init(e,t)}),eC=J(`ZodNanoID`,(e,t)=>{Ev.init(e,t),WS.init(e,t)}),tC=J(`ZodCUID`,(e,t)=>{Dv.init(e,t),WS.init(e,t)}),nC=J(`ZodCUID2`,(e,t)=>{Ov.init(e,t),WS.init(e,t)}),rC=J(`ZodULID`,(e,t)=>{kv.init(e,t),WS.init(e,t)}),iC=J(`ZodXID`,(e,t)=>{Av.init(e,t),WS.init(e,t)}),aC=J(`ZodKSUID`,(e,t)=>{jv.init(e,t),WS.init(e,t)}),oC=J(`ZodIPv4`,(e,t)=>{Iv.init(e,t),WS.init(e,t)}),sC=J(`ZodIPv6`,(e,t)=>{zv.init(e,t),WS.init(e,t)}),cC=J(`ZodCIDRv4`,(e,t)=>{Bv.init(e,t),WS.init(e,t)}),lC=J(`ZodCIDRv6`,(e,t)=>{Hv.init(e,t),WS.init(e,t)}),uC=J(`ZodBase64`,(e,t)=>{Gv.init(e,t),WS.init(e,t)}),dC=J(`ZodBase64URL`,(e,t)=>{Jv.init(e,t),WS.init(e,t)}),fC=J(`ZodE164`,(e,t)=>{Yv.init(e,t),WS.init(e,t)}),pC=J(`ZodJWT`,(e,t)=>{Zv.init(e,t),WS.init(e,t)}),mC=J(`ZodNumber`,(e,t)=>{Qv.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yx(e,t,n,r),e.isFinite=!0},_g({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Wx(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Wx(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Wx(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Wx(e).format??null},{gt(e,t){return this.check(Jb(e,t))},gte(e,t){return this.check(Yb(e,t))},min(e,t){return this.check(Yb(e,t))},lt(e,t){return this.check(Kb(e,t))},lte(e,t){return this.check(qb(e,t))},max(e,t){return this.check(qb(e,t))},int(e){return this.check(X(e))},safe(e){return this.check(X(e))},positive(e){return this.check(Jb(0,e))},nonnegative(e){return this.check(Yb(0,e))},negative(e){return this.check(Kb(0,e))},nonpositive(e){return this.check(qb(0,e))},multipleOf(e,t){return this.check(Xb(e,t))},step(e,t){return this.check(Xb(e,t))},finite(){return this}}));function hC(e){return zb(mC,e)}var gC=J(`ZodNumberFormat`,(e,t)=>{$v.init(e,t),mC.init(e,t)});function X(e){return Bb(gC,e)}var _C=J(`ZodBoolean`,(e,t)=>{ey.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xx(e,t,n,r)});function vC(e){return Vb(_C,e)}var yC=J(`ZodNull`,(e,t)=>{ty.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zx(e,t,n,r)});function bC(e){return Hb(yC,e)}var xC=J(`ZodUnknown`,(e,t)=>{ny.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function SC(){return Ub(xC)}var CC=J(`ZodNever`,(e,t)=>{ry.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qx(e,t,n,r)});function wC(e){return Wb(CC,e)}var TC=J(`ZodDate`,(e,t)=>{iy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$x(e,t,n,r),e.min=(t,n)=>e.check(Yb(t,n)),e.max=(t,n)=>e.check(qb(t,n))},_g({minDate:e=>{let{minimum:t}=Wx(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Wx(e);return t?new Date(t):null}},{}));function EC(e){return Gb(TC,e)}var DC=J(`ZodArray`,(e,t)=>{BS(),cy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iS(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Qb(e,t))},nonempty(e){return this.check(Qb(1,e))},max(e,t){return this.check(Zb(e,t))},length(e,t){return this.check($b(e,t))},unwrap(){return this.element}});function OC(e,t){return fx(DC,e,t)}var kC=J(`ZodObject`,(e,t)=>{BS(),my.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oS(e,t,n,r),Cg(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return RC(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Mh(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Mh(this._zod.def,{catchall:SC()}))},loose(){return this.clone(Mh(this._zod.def,{catchall:SC()}))},strict(){return this.clone(Mh(this._zod.def,{catchall:wC()}))},strip(){return this.clone(Mh(this._zod.def,{catchall:void 0}))},extend(e){return Xh(this,e)},safeExtend(e){return Qh(this,e)},merge(e){return $h(this,e)},pick(e){return qh(this,e)},omit(e){return Yh(this,e)},partial(...e){return eg(UC,this,e[0])},exactPartial(...e){return eg(GC,this,e[0],`exactPartial`)},required(...e){return tg($C,this,e[0])}});function Z(e,t){return new kC({type:`object`,shape:e??{},...K(t)})}function AC(e,t){return new kC({type:`object`,shape:e,catchall:SC(),...K(t)})}var jC=J(`ZodUnion`,(e,t)=>{gy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sS(e,t,n,r),e.options=t.options});function MC(e,t){return new jC({type:`union`,options:e,...K(t)})}var NC=J(`ZodIntersection`,(e,t)=>{_y.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cS(e,t,n,r)});function PC(e,t){return new NC({type:`intersection`,left:e,right:t})}var FC=J(`ZodRecord`,(e,t)=>{BS(),by.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fS(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function IC(e,t,n){return!t||!t._zod?new FC({type:`record`,keyType:Y(),valueType:e,...K(t)}):new FC({type:`record`,keyType:e,valueType:t,...K(n)})}var LC=J(`ZodEnum`,(e,t)=>{xy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eS(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new LC({...t,checks:[],...K(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new LC({...t,checks:[],...K(r),entries:i})}});function RC(e,t){return new LC({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...K(t)})}var zC=J(`ZodLiteral`,(e,t)=>{Sy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tS(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function BC(e,t){return new zC({type:`literal`,values:Array.isArray(e)?e:[e],...K(t)})}var VC=J(`ZodTransform`,(e,t)=>{BS(),Cy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rS(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new jg(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(pg(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(pg(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function HC(e){return new VC({type:`transform`,transform:e})}var UC=J(`ZodOptional`,(e,t)=>{Ty.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function WC(e){return new UC({type:`optional`,innerType:e})}var GC=J(`ZodExactOptional`,(e,t)=>{Ey.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function KC(e){return new GC({type:`optional`,innerType:e})}var qC=J(`ZodNullable`,(e,t)=>{Dy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function JC(e){return new qC({type:`nullable`,innerType:e})}var YC=J(`ZodDefault`,(e,t)=>{Oy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_S(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function XC(e,t){return new YC({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():zh(t)}})}var ZC=J(`ZodPrefault`,(e,t)=>{Ay.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function QC(e,t){return new ZC({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():zh(t)}})}var $C=J(`ZodNonOptional`,(e,t)=>{jy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ew(e,t){return new $C({type:`nonoptional`,innerType:e,...K(t)})}var tw=J(`ZodCatch`,(e,t)=>{Py.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nw(e,t){return new tw({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Tg(t)})}var rw=J(`ZodPipe`,(e,t)=>{Fy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bS(e,t,n,r),e.in=t.in,e.out=t.out});function iw(e,t){return new rw({type:`pipe`,in:e,out:t})}var aw=J(`ZodReadonly`,(e,t)=>{Ly.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ow(e){return new aw({type:`readonly`,innerType:e})}var sw=J(`ZodLazy`,(e,t)=>{zy.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CS(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function cw(e){return new sw({type:`lazy`,getter:e})}var lw=J(`ZodCustom`,(e,t)=>{By.init(e,t),VS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nS(e,t,n,r)});function uw(e,t){return px(lw,e??(()=>!0),t)}function dw(e,t={}){return mx(lw,e,t)}function fw(e,t){return hx(e,t)}function pw(e){let t=cw(()=>MC([Y(e),hC(),vC(),bC(),OC(t),IC(Y(),t)]));return t}var mw=t($u(),1),hw={"common.all":`All`,"common.backToList":`Back to List`,"common.cancel":`Cancel`,"common.close":`Close`,"common.confirm":`Confirm`,"common.create":`Create`,"common.createdAt":`Created At`,"common.delete":`Delete`,"common.edit":`Edit`,"common.login":`Login`,"common.logout":`Logout`,"common.manage":`Manage`,"common.results":e=>Pw(e,{one:`${e} result`,other:`${e} results`}),"common.save":`Save`,"common.search":`Search`,"common.searchPlaceholder":`Search...`,"common.searchType":`Search Type`,"common.sort":`Sort`,"confirm.delete":`Are you sure you want to delete?`,"confirm.save":`Do you want to save?`,"dashboard.adminMenu":`Admin Menu`,"dashboard.createdAt":`Joined`,"dashboard.email":`Email`,"dashboard.loginRequired":`Please login to continue.`,"dashboard.name":`Name`,"dashboard.role":`Role`,"dashboard.title":`Admin Dashboard`,"dashboard.welcome":`Welcome!`,"delete.confirm.description":`This action cannot be undone. This will permanently delete this item.`,"delete.confirm.title":`Are you sure?`,"entity.create":e=>`Create ${e}`,"entity.edit":(e,t)=>`Edit ${e} (#${t})`,"entity.list":e=>`${e} List`,"entity.listManage":e=>`Manage ${e} List`,"error.alreadyProcessed":`Already processed`,"error.badRequest":`Bad request`,"error.detail":e=>e,"error.duplicateRow":`Duplicate data`,"error.forbidden":`Forbidden`,"error.internalServerError":`Internal server error`,"error.notFound":`Not found`,"error.serviceUnavailable":`Service unavailable`,"setting.invalidValue":e=>`Invalid setting value: ${e}`,"setting.unknownKey":e=>`Unknown setting key ${e}`,"qgrid.dispatcherFailed":e=>`${e} dispatcher failed to initialize`,"qgrid.dispatcherStarting":e=>`${e} dispatcher is starting up. Please retry shortly`,"qgrid.grokCapabilityUnavailable":e=>`Grok capability unavailable: ${e}`,"qgrid.grokCapacity":`All Grok tokens are at their in-flight request cap. Please retry shortly`,"qgrid.grokContentPolicy":e=>`Grok generation blocked by content policy: ${e}`,"qgrid.grokInvalidRequest":e=>`Invalid Grok request: ${e}`,"qgrid.grokLoginFailed":e=>`Grok login failed: ${e}`,"qgrid.grokNotOAuthToken":`Grok login returned credentials that are not an xAI OAuth token`,"qgrid.grokNoWorkers":e=>`No Grok token is available: ${e}`,"qgrid.grokRateLimited":e=>`All Grok tokens are rate limited. Retry after ${e} seconds`,"qgrid.grokOnDemandExcluded":e=>`All Grok tokens are excluded because on-demand billing is enabled at xAI: ${e}. Turn off on-demand billing, or add another account`,"qgrid.grokZdrVideoUnavailable":e=>`Grok video is unavailable because Zero Data Retention is on for: ${e}. Turn off the data-retention opt-out at xAI, or use a non-ZDR account`,"qgrid.invalidInput":e=>`qgrid: invalid input: ${e}`,"qgrid.requestBodyTooLarge":e=>`Request body exceeds the ${e} MiB limit`,"qgrid.videoJobNotFound":`video job not found`,"error.unauthorized":`Unauthorized`,notFound:(e,t)=>`${e} ID ${t} not found`,"validation.email":`Invalid email format`,"validation.maxLength":(e,t)=>`${e} must be at most ${t} characters`,"validation.minLength":(e,t)=>`${e} must be at least ${t} characters`,"validation.required":e=>`${e} is required`,"validation.url":`Invalid URL format`},gw={"common.all":`전체`,"common.backToList":`목록으로`,"common.cancel":`취소`,"common.close":`닫기`,"common.confirm":`확인`,"common.create":`생성`,"common.createdAt":`등록`,"common.delete":`삭제`,"common.edit":`수정`,"common.login":`로그인`,"common.logout":`로그아웃`,"common.manage":`관리`,"common.results":e=>`${e}개 결과`,"common.save":`저장`,"common.search":`검색`,"common.searchPlaceholder":`검색...`,"common.searchType":`검색 유형`,"common.sort":`정렬`,"confirm.delete":`정말 삭제하시겠습니까?`,"confirm.save":`저장하시겠습니까?`,"dashboard.adminMenu":`관리 메뉴`,"dashboard.createdAt":`가입일`,"dashboard.email":`이메일`,"dashboard.loginRequired":`로그인이 필요합니다.`,"dashboard.name":`이름`,"dashboard.role":`역할`,"dashboard.title":`관리자 대시보드`,"dashboard.welcome":`환영합니다!`,"delete.confirm.description":`이 작업은 취소할 수 없습니다. 항목이 영구적으로 삭제됩니다.`,"delete.confirm.title":`정말 삭제하시겠습니까?`,"entity.create":e=>`${e} 생성`,"entity.edit":(e,t)=>`${e} 수정 (#${t})`,"entity.list":e=>`${e} 목록`,"entity.listManage":e=>`${e} 목록 관리`,"error.alreadyProcessed":`이미 처리되었습니다`,"error.badRequest":`잘못된 요청입니다`,"error.detail":e=>e,"error.duplicateRow":`중복된 데이터입니다`,"error.entityNotFound":(e,t)=>`존재하지 않는 ${e} ID ${t}`,"error.forbidden":`권한이 없습니다`,"error.internalServerError":`서버 오류가 발생했습니다`,"error.notFound":`찾을 수 없습니다`,"error.serviceUnavailable":`서비스를 사용할 수 없습니다`,"setting.invalidValue":e=>`설정 값이 올바르지 않습니다: ${e}`,"setting.unknownKey":e=>`알 수 없는 설정 키 ${e}`,"qgrid.dispatcherFailed":e=>`${e} dispatcher 초기화에 실패했습니다`,"qgrid.dispatcherStarting":e=>`${e} dispatcher 기동 중입니다. 잠시 후 다시 시도해주세요`,"qgrid.grokCapabilityUnavailable":e=>`Grok 기능을 사용할 수 없습니다: ${e}`,"qgrid.grokCapacity":`모든 Grok 토큰이 동시 요청 한도에 도달했습니다. 잠시 후 다시 시도해주세요`,"qgrid.grokContentPolicy":e=>`콘텐츠 정책 위반으로 Grok 생성이 차단되었습니다: ${e}`,"qgrid.grokInvalidRequest":e=>`잘못된 Grok 요청입니다: ${e}`,"qgrid.grokLoginFailed":e=>`Grok 로그인에 실패했습니다: ${e}`,"qgrid.grokNotOAuthToken":`Grok 로그인 결과가 xAI OAuth 토큰이 아닙니다`,"qgrid.grokNoWorkers":e=>`사용 가능한 Grok 토큰이 없습니다: ${e}`,"qgrid.grokRateLimited":e=>`모든 Grok 토큰이 요청 한도에 걸렸습니다. ${e}초 후 다시 시도해주세요`,"qgrid.grokOnDemandExcluded":e=>`xAI에서 on-demand 과금이 켜져 있어 모든 Grok 토큰이 제외되었습니다: ${e}. on-demand 과금을 끄거나 다른 계정을 추가해주세요`,"qgrid.grokZdrVideoUnavailable":e=>`Zero Data Retention이 켜져 있어 Grok 비디오를 사용할 수 없습니다: ${e}. xAI에서 data-retention opt-out을 끄거나 ZDR이 아닌 계정을 사용해주세요`,"qgrid.invalidInput":e=>`qgrid: 잘못된 입력입니다: ${e}`,"qgrid.requestBodyTooLarge":e=>`요청 본문이 ${e} MiB 제한을 초과했습니다`,"qgrid.videoJobNotFound":`비디오 작업을 찾을 수 없습니다`,"error.unauthorized":`인증이 필요합니다`,"error.unknownSearchField":e=>`구현되지 않은 검색 필드 ${e}`,notFound:(e,t)=>`존재하지 않는 ${e} ID ${t}`,"validation.email":`올바른 이메일 형식이 아닙니다`,"validation.maxLength":(e,t)=>`${e}${Fw(e,`은는`)} 최대 ${t}자까지 입력할 수 있습니다`,"validation.minLength":(e,t)=>`${e}${Fw(e,`은는`)} 최소 ${t}자 이상이어야 합니다`,"validation.required":e=>`${Fw(e,`은는`)} 필수입니다`,"validation.url":`올바른 URL 형식이 아닙니다`},_w=`ko`,vw=[`ko`,`en`],yw=_w;function bw(e){yw=e}function xw(){return yw}var Sw={"rc.asyncSelect.loading":`로딩 중...`,"rc.asyncSelect.noOptions":`옵션이 없습니다`,"rc.asyncSelect.noResults":`검색 결과가 없습니다`,"rc.asyncSelect.selectPlaceholder":`선택하세요...`,"rc.combobox.noResults":`검색 결과가 없습니다`,"rc.combobox.selectPlaceholder":`선택하세요...`,"rc.datePicker.pickDate":`날짜 선택`,"rc.datePicker.placeholder":`날짜 선택`,"rc.datePicker.selectDate":`날짜 선택`,"rc.dateSelectorMultiple.addDate":`날짜 추가`,"rc.dateSelectorMultiple.dateRange":`기간`,"rc.dateSelectorMultiple.placeholder":`날짜 선택`,"rc.dateSelectorMultiple.singleDate":`단일`,"rc.fileInput.browseFiles":`파일 찾기`,"rc.fileInput.dropZone":`파일을 드래그하거나 클릭하여 업로드`,"rc.fileInput.filePlaceholder":`파일`,"rc.fileInput.imagePlaceholder":`이미지`,"rc.fileInput.maxFilesExceeded":e=>`최대 ${e}개 파일만 업로드 가능합니다`,"rc.fileInput.pending":`대기 중`,"rc.fileInput.remove":`제거`,"rc.fileInput.uploadFailed":`업로드 실패`,"rc.fileInput.uploading":`업로드 중...`,"rc.monthPickerMultiple.addMonth":`월 추가`,"rc.monthPickerMultiple.dateRange":`기간`,"rc.monthPickerMultiple.endDate":`종료일`,"rc.monthPickerMultiple.placeholder":`월 선택`,"rc.monthPickerMultiple.singleDate":`단일`,"rc.monthPickerMultiple.startDate":`시작일`,"rc.multiSelect.clear":`전체 해제`,"rc.multiSelect.close":`닫기`,"rc.multiSelect.moreItems":e=>`+${e}개 더보기`,"rc.multiSelect.noOptions":`옵션이 없습니다`,"rc.multiSelect.noOptionsSelected":`선택된 옵션이 없습니다`,"rc.multiSelect.noResults":`검색 결과가 없습니다`,"rc.multiSelect.optionsCount":e=>`${e}개 옵션`,"rc.multiSelect.selectAll":`전체 선택`,"rc.multiSelect.selectPlaceholder":`선택하세요...`,"rc.pagination.next":`다음`,"rc.pagination.previous":`이전`,"rc.pagination.showing":(e,t,n)=>`${n}개 중 ${e}-${t}`,"rc.calendar.month.0":`1월`,"rc.calendar.month.1":`2월`,"rc.calendar.month.2":`3월`,"rc.calendar.month.3":`4월`,"rc.calendar.month.4":`5월`,"rc.calendar.month.5":`6월`,"rc.calendar.month.6":`7월`,"rc.calendar.month.7":`8월`,"rc.calendar.month.8":`9월`,"rc.calendar.month.9":`10월`,"rc.calendar.month.10":`11월`,"rc.calendar.month.11":`12월`,"rc.sonamuFilter.title":`소나무 필터`,"rc.sonamuFilter.apply":`적용`,"rc.sonamuFilter.reset":`초기화`,"rc.sonamuFilter.addRule":`규칙 추가`,"rc.sonamuFilter.noRulesYet":`아직 규칙이 없습니다. "+ 규칙 추가"를 클릭하여 시작하세요.`,"rc.sonamuFilter.selectField":`필드 선택`,"rc.sonamuFilter.selectOperator":`연산자 선택`,"rc.sonamuFilter.selectOperatorFirst":`먼저 연산자를 선택하세요`,"rc.sonamuFilter.enterValue":`값 입력`,"rc.sonamuFilter.enterNumber":`숫자 입력`,"rc.sonamuFilter.notSupported":`지원하지 않음`,"rc.sonamuFilter.startDate":`시작일`,"rc.sonamuFilter.endDate":`종료일`,"rc.sonamuFilter.appliedFilters":`🌲 적용된 소나무 필터`,"rc.common.cancel":`취소`,"rc.common.save":`저장`},Cw={"rc.asyncSelect.loading":`Loading...`,"rc.asyncSelect.noOptions":`No options`,"rc.asyncSelect.noResults":`No results`,"rc.asyncSelect.selectPlaceholder":`Select...`,"rc.combobox.noResults":`No results`,"rc.combobox.selectPlaceholder":`Select...`,"rc.datePicker.pickDate":`Pick date`,"rc.datePicker.placeholder":`Pick date`,"rc.datePicker.selectDate":`Select date`,"rc.dateSelectorMultiple.addDate":`Add date`,"rc.dateSelectorMultiple.dateRange":`Range`,"rc.dateSelectorMultiple.placeholder":`Pick date`,"rc.dateSelectorMultiple.singleDate":`Single`,"rc.fileInput.browseFiles":`Browse files`,"rc.fileInput.dropZone":`Drag files here or click to upload`,"rc.fileInput.filePlaceholder":`File`,"rc.fileInput.imagePlaceholder":`Image`,"rc.fileInput.maxFilesExceeded":e=>`Maximum ${e} files allowed`,"rc.fileInput.pending":`Pending`,"rc.fileInput.remove":`Remove`,"rc.fileInput.uploadFailed":`Upload failed`,"rc.fileInput.uploading":`Uploading...`,"rc.monthPickerMultiple.addMonth":`Add month`,"rc.monthPickerMultiple.dateRange":`Range`,"rc.monthPickerMultiple.endDate":`End date`,"rc.monthPickerMultiple.placeholder":`Pick month`,"rc.monthPickerMultiple.singleDate":`Single`,"rc.monthPickerMultiple.startDate":`Start date`,"rc.multiSelect.clear":`Clear all`,"rc.multiSelect.close":`Close`,"rc.multiSelect.moreItems":e=>`+${e} more`,"rc.multiSelect.noOptions":`No options`,"rc.multiSelect.noOptionsSelected":`No options selected`,"rc.multiSelect.noResults":`No results`,"rc.multiSelect.optionsCount":e=>`${e} options`,"rc.multiSelect.selectAll":`Select all`,"rc.multiSelect.selectPlaceholder":`Select...`,"rc.pagination.next":`Next`,"rc.pagination.previous":`Previous`,"rc.pagination.showing":(e,t,n)=>`Showing ${e}-${t} of ${n}`,"rc.calendar.month.0":`January`,"rc.calendar.month.1":`February`,"rc.calendar.month.2":`March`,"rc.calendar.month.3":`April`,"rc.calendar.month.4":`May`,"rc.calendar.month.5":`June`,"rc.calendar.month.6":`July`,"rc.calendar.month.7":`August`,"rc.calendar.month.8":`September`,"rc.calendar.month.9":`October`,"rc.calendar.month.10":`November`,"rc.calendar.month.11":`December`,"rc.sonamuFilter.title":`Sonamu Filter`,"rc.sonamuFilter.apply":`Apply`,"rc.sonamuFilter.reset":`Reset`,"rc.sonamuFilter.addRule":`Add Rule`,"rc.sonamuFilter.noRulesYet":`No rules yet. Click "+ Add Rule" to start.`,"rc.sonamuFilter.selectField":`Select field`,"rc.sonamuFilter.selectOperator":`Operator`,"rc.sonamuFilter.selectOperatorFirst":`Select operator first`,"rc.sonamuFilter.enterValue":`Enter value`,"rc.sonamuFilter.enterNumber":`Enter number`,"rc.sonamuFilter.notSupported":`Not supported`,"rc.sonamuFilter.startDate":`Start date`,"rc.sonamuFilter.endDate":`End date`,"rc.sonamuFilter.appliedFilters":`🌲 Applied SonamuFilters`,"rc.common.cancel":`Cancel`,"rc.common.save":`Save`},ww={"entity.RequestLog":`RequestLog`,"entity.RequestLog.id":`ID`,"entity.RequestLog.created_at":`등록일시`,"entity.RequestLog.token_name":`토큰 이름`,"entity.RequestLog.project_name":`프로젝트 이름`,"entity.RequestLog.model_name":`모델 이름`,"entity.RequestLog.requested_model_name":`요청 모델 이름 (fallback 전)`,"entity.RequestLog.fallback_count":`모델 fallback 횟수`,"entity.RequestLog.user_prompt":`사용자 프롬프트`,"entity.RequestLog.system_prompt":`시스템 프롬프트`,"entity.RequestLog.response":`llm 응답 전문`,"entity.RequestLog.input_tokens":`입력 토큰`,"entity.RequestLog.output_tokens":`출력 토큰`,"entity.RequestLog.cache_read_tokens":`캐시 읽기 토큰`,"entity.RequestLog.cache_creation_tokens":`캐시 생성 토큰`,"entity.RequestLog.cache_creation_5m_tokens":`5분 TTL 캐시 생성 토큰`,"entity.RequestLog.cache_creation_1h_tokens":`1시간 TTL 캐시 생성 토큰`,"entity.RequestLog.duration_ms":`응답 소요시간(ms)`,"entity.RequestLog.ttft_ms":`first gen TTFT(ms)`,"entity.RequestLog.cost_usd":`API 비용`,"entity.RequestLog.cost_source":`비용 출처(provider/pricing_table/mixed)`,"entity.RequestLog.image_cost_usd":`이미지 생성 비용`,"entity.RequestLog.image_cost_method":`이미지 비용 계산 방식`,"entity.RequestLog.service_tier":`Requested OpenAI service tier`,"entity.RequestLog.effort":`effort level`,"entity.RequestLog.history":`inject_items 히스토리`,"entity.RequestLog.input_images":`현재 user turn 입력 이미지`,"entity.RequestLog.tools":`요청에 장착된 tool 정의 목록`,"entity.RequestLog.json_schema":`structured output 요청의 JSON Schema 원문 (detail 의 response 타입 표시용)`,"entity.RequestLog.status":`실행 상태`,"entity.RequestLog.error_message":`에러 메시지`,"entity.RequestLog.response_json_ok":`structured(jsonSchema) 요청의 응답 JSON 파싱 성공 여부. 비structured 요청은 null`,"entity.RequestLog.tool_call_count":`tool call 횟수`,"entity.RequestLog.is_image_generation":`이미지 생성 turn 여부 (quota 귀속용)`,"entity.RequestLog.is_structured":`structured output(jsonSchema) 요청 여부 (목록 구분 표시용)`,"enum.RequestLogOrderBy.id-desc":`ID최신순`,"enum.RequestLogOrderBy.id-asc":`ID오래된순`,"enum.RequestLogOrderBy.created_at-desc":`등록일시최신순`,"enum.RequestLogOrderBy.created_at-asc":`등록일시오래된순`,"enum.RequestLogOrderBy.ttft_ms-desc":`TTFT긴순`,"enum.RequestLogOrderBy.ttft_ms-asc":`TTFT짧은순`,"enum.RequestLogOrderBy.duration_ms-desc":`소요시간긴순`,"enum.RequestLogOrderBy.duration_ms-asc":`소요시간짧은순`,"enum.RequestLogOrderBy.input_tokens-desc":`입력토큰많은순`,"enum.RequestLogOrderBy.input_tokens-asc":`입력토큰적은순`,"enum.RequestLogOrderBy.output_tokens-desc":`출력토큰많은순`,"enum.RequestLogOrderBy.output_tokens-asc":`출력토큰적은순`,"enum.RequestLogOrderBy.cache_read_tokens-desc":`캐시읽기많은순`,"enum.RequestLogOrderBy.cache_read_tokens-asc":`캐시읽기적은순`,"enum.RequestLogOrderBy.cache_creation_tokens-desc":`캐시생성많은순`,"enum.RequestLogOrderBy.cache_creation_tokens-asc":`캐시생성적은순`,"enum.RequestLogOrderBy.cost_usd-desc":`비용높은순`,"enum.RequestLogOrderBy.cost_usd-asc":`비용낮은순`,"enum.RequestLogSearchField.id":`ID`,"enum.RequestLogSearchField.token_name":`토큰이름`,"enum.RequestLogSearchField.user_prompt":`사용자 프롬프트`,"enum.RequestLogStatus.running":`실행 중`,"enum.RequestLogStatus.succeeded":`성공`,"enum.RequestLogStatus.error":`에러`,"enum.RequestLogStatus.aborted":`중단`,"entity.RequestLogStep":`RequestLogStep`,"entity.RequestLogStep.id":`ID`,"entity.RequestLogStep.created_at":`등록일시`,"entity.RequestLogStep.request_log":`부모 request log ID`,"entity.RequestLogStep.step_index":`ai-sdk step number (0-based)`,"entity.RequestLogStep.type":`step 타입`,"entity.RequestLogStep.model_name":`실제 serving 모델`,"entity.RequestLogStep.requested_model_name":`요청 모델 (fallback 전)`,"entity.RequestLogStep.fallback_count":`모델 fallback 횟수`,"entity.RequestLogStep.input_tokens":`입력 토큰 (generate)`,"entity.RequestLogStep.output_tokens":`출력 토큰 (generate)`,"entity.RequestLogStep.cache_read_tokens":`캐시 읽기 토큰`,"entity.RequestLogStep.cache_creation_tokens":`캐시 생성 토큰`,"entity.RequestLogStep.cache_creation_5m_tokens":`5분 TTL 캐시 생성 토큰`,"entity.RequestLogStep.cache_creation_1h_tokens":`1시간 TTL 캐시 생성 토큰`,"entity.RequestLogStep.cost_usd":`step 비용 (micro-USD)`,"entity.RequestLogStep.cost_source":`비용 출처(provider/pricing_table)`,"entity.RequestLogStep.duration_ms":`소요시간(ms)`,"entity.RequestLogStep.ttft_ms":`Gen TTFT(ms)`,"entity.RequestLogStep.finish_reason":`완료 사유`,"entity.RequestLogStep.reasoning_text":`reasoning 텍스트`,"entity.RequestLogStep.reasoning_tokens":`reasoning 토큰 수`,"entity.RequestLogStep.tool_call_index":`같은 step 내 tool call 순서`,"entity.RequestLogStep.tool_call_id":`tool call ID`,"entity.RequestLogStep.tool_name":`tool 이름`,"entity.RequestLogStep.tool_args":`tool 인자 (JSON string)`,"entity.RequestLogStep.tool_result":`tool 결과 (JSON string)`,"entity.RequestLogStep.tool_duration_ms":`tool 실행 소요시간(ms)`,"entity.RequestLogStep.error":`step 에러 메시지`,"enum.RequestLogStepType.generate":`LLM 생성`,"enum.RequestLogStepType.tool_call":`Tool 호출`,"enum.RequestLogStepOrderBy.id-asc":`ID순`,"enum.RequestLogStepSearchField.id":`ID`,"entity.Setting":`Setting`,"entity.Setting.id":`ID`,"entity.Setting.created_at":`등록일시`,"entity.Setting.key":`설정 키 (예: slack.enabled)`,"entity.Setting.value":`설정 값 (문자열 저장, 앱에서 파싱·검증)`,"entity.Setting.updated_at":`최종 수정일시`,"enum.SettingOrderBy.key-asc":`키순`,"enum.SettingSearchField.key":`키`,"entity.Token":`Token`,"entity.Token.id":`ID`,"entity.Token.created_at":`등록일시`,"entity.Token.provider":`프로바이더`,"entity.Token.credentials":`인증 정보 (JSONB)`,"entity.Token.name":`토큰 이름`,"entity.Token.active":`활성 여부`,"entity.Token.reauth_required":`인증 만료로 재로그인이 필요한지 여부`,"entity.Token.ord":`정렬 순서`,"entity.Token.quota_threshold":`quota 사용률 임계치(%). null이면 미설정`,"entity.Token.weight":`가중 라운드로빈 라우팅 가중치 (1..100)`,"entity.Token.keepalive_enabled":`Anthropic 5시간 토큰 윈도우 keepalive 사용 여부`,"enum.TokenOrderBy.id-desc":`ID최신순`,"enum.TokenOrderBy.ord-asc":`순서순`,"enum.TokenSearchField.id":`ID`,"enum.TokenSearchField.name":`이름`},Tw={ko:{...Sw,...ww,...gw},en:{...Cw,...hw}};function Ew(e,t){let n=Tw[t];if(n?.[e]!==void 0)return n[e];if(t!==_w&&Tw[_w]?.[e]!==void 0)return Tw[_w][e];for(let n of vw)if(n!==t&&n!==_w&&Tw[n]?.[e]!==void 0)return Tw[n][e];return e}function Dw(e){return Ew(e,xw())}Dw.locale=e=>t=>Ew(t,e),Dw.enumLabels=e=>new Proxy({},{get(t,n){if(typeof n!=`symbol`)return Ew(`enum.${e}.${n}`,xw())}});function Ow(e,t){return typeof t==`string`&&(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/.test(t)||/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2}$/.test(t))&&new Date(t).toString()!==`Invalid Date`?new Date(t):t}Ym.defaults.transformResponse=[e=>{if(typeof e==`string`)try{return JSON.parse(e,Ow)}catch{return e}return e}],Ym.interceptors.request.use(e=>(e.headers[`Accept-Language`]=xw(),e));async function Q(e){try{return(await Ym({...e})).data}catch(e){if(Ym.isAxiosError(e)&&e.response?.data){let t=e.response.data;throw new kw(e.response.status,t.message,t.issues)}throw e}}var kw=class extends Error{code;message;issues;isSonamuError;constructor(e,t,n){super(t),this.code=e,this.message=t,this.issues=n,this.isSonamuError=!0}};function Aw(e){return e&&e.isSonamuError===!0}var jw=RC([`both`,`list`,`count`]);Z({semanticQuery:Z({embedding:OC(hC()).min(1024).max(1024),threshold:hC().optional(),method:RC([`cosine`,`l2`,`inner_product`]).optional()})});function Mw(e){return MC([e,e.array()])}Y().regex(/([0-9]{4}-[0-9]{2}-[0-9]{2}( [0-9]{2}:[0-9]{2}:[0-9]{2})*)$/,{message:`잘못된 SQLDate 타입`}).min(10).max(19).describe(`SQLDateTimeString`),Z({name:Y(),url:Y(),mime_type:Y(),size:hC()});function Nw(e,t,n,r={}){let{enabled:i=!0,retry:a=3,retryInterval:o=3e3}=r,[s,c]=(0,F.useState)({isConnected:!1,error:null,retryCount:0,isEnded:!1}),l=(0,F.useRef)(null),u=(0,F.useRef)(null),d=(0,F.useRef)(n);(0,F.useEffect)(()=>{d.current=n},[n]);let f=()=>{if(i)try{l.current&&=(l.current.close(),null),u.current&&=(clearTimeout(u.current),null);let n=mw.default.stringify(t),r=new dh(n?`${e}?${n}`:e,{fetch:(e,t)=>globalThis.fetch(e,{...t,headers:{...t?.headers,"Accept-Language":xw()}})});l.current=r,c(e=>({...e,isConnected:!1,error:null,isEnded:!1})),r.onopen=()=>{c(e=>({...e,isConnected:!0,error:null,retryCount:0,isEnded:!1}))},r.onerror=e=>{l.current===r&&(r.close(),c(e=>({...e,isConnected:!1,error:`Connection failed`,isEnded:!1})),c(e=>e.retryCount<a?(u.current=setTimeout(()=>{u.current!==null&&(c(e=>({...e,retryCount:e.retryCount+1,isEnded:!1})),f())},o),e):(l.current=null,{...e,error:`Connection failed after ${a} attempts`})))},r.addEventListener(`end`,()=>{if(l.current===r&&(r.close(),l.current=null,c(e=>({...e,isConnected:!1,error:null,isEnded:!0})),d.current.end)){let e=d.current.end;e(`end`)}}),Object.keys(d.current).forEach(e=>{let t=d.current[e];t&&r.addEventListener(e,n=>{if(l.current===r){try{let e=JSON.parse(n.data,Ow);t(e)}catch(t){console.error(`Failed to parse SSE data for event ${e}:`,t)}c(e=>({...e,isEnded:!1}))}})}),r.onmessage=e=>{if(l.current===r)try{let t=JSON.parse(e.data,Ow),n=d.current.message;n&&n(t)}catch(e){console.error(`Failed to parse SSE message:`,e)}}}catch(e){c(t=>({...t,error:e instanceof Error?e.message:`Unknown error`,isConnected:!1,isEnded:!1}))}};return(0,F.useEffect)(()=>(i&&(c({isConnected:!1,error:null,retryCount:0,isEnded:!1}),f()),()=>{l.current&&=(l.current.close(),null),u.current&&=(clearTimeout(u.current),null)}),[e,JSON.stringify(t),i]),s}function Pw(e,t){let n=e===0&&t.zero||e===1&&t.one||t.other;return typeof n==`function`?n(e):n??e.toString()}function Fw(e,t){let n=(()=>{let t=e.charCodeAt(e.length-1);return t<44032||t>55203?!1:(t-44032)%28!=0})();return e+{은는:n?`은`:`는`,이가:n?`이`:`가`,을를:n?`을`:`를`,과와:n?`과`:`와`,으로:n?`으로`:`로`}[t]}function Iw(e){let t=new Set,n=[];for(let r of e.pages)for(let e of r?.rows??[]){let r=e?.id;if(r!==null){if(t.has(r))continue;t.add(r)}n.push(e)}let r=e.pages[0]?.total??0;return{pages:e.pages,pageParams:e.pageParams,rows:n,total:r}}function Lw(e){let[t,n]=(0,F.useState)(!1),r=(0,F.useCallback)(async()=>{n(!0);try{await e.refetch()}finally{n(!1)}},[e]);return{...e,refresh:r,isRefreshing:t}}var Rw;(function(e){async function t(e,t){return Q({method:`GET`,url:`/api/token/findById?${mw.default.stringify({subset:e,id:t})}`})}e.getToken=t;let n=e.getTokenQueryOptions=(e,n)=>x({queryKey:[`Token`,`getToken`,e,n],queryFn:()=>t(e,n)});e.useToken=(e,t,r)=>Lw(b({...n(e,t),...r}));async function r(e,t){return Q({method:`GET`,url:`/api/token/findMany?${mw.default.stringify({subset:e,rawParams:t})}`})}e.getTokens=r;let i=e.getTokensQueryOptions=(e,t)=>x({queryKey:[`Token`,`getTokens`,e,t],queryFn:()=>r(e,t)});e.useTokens=(e,t,n)=>Lw(b({...i(e,t),...n}));let a=e.getTokensInfiniteQueryOptions=(e,t)=>E({queryKey:[`Token`,`getTokens`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:Iw});e.useTokensInfinite=(e,t,n)=>Lw(y({...a(e,t),...n}));async function o(e){return Q({method:`POST`,url:`/api/token/reorder`,data:{ids:e}})}e.reorder=o,e.useReorderMutation=()=>k({mutationFn:e=>Rw.reorder(e.ids)});async function s(e){return Q({method:`POST`,url:`/api/token/del`,data:{ids:e}})}e.del=s,e.useDelMutation=()=>k({mutationFn:e=>Rw.del(e.ids)})})(Rw||={});var zw;(function(e){async function t(e,t){return Q({method:`GET`,url:`/api/setting/findById?${mw.default.stringify({subset:e,id:t})}`})}e.getSetting=t;let n=e.getSettingQueryOptions=(e,n)=>x({queryKey:[`Setting`,`getSetting`,e,n],queryFn:()=>t(e,n)});e.useSetting=(e,t,r)=>Lw(b({...n(e,t),...r}));async function r(e,t){return Q({method:`GET`,url:`/api/setting/findMany?${mw.default.stringify({subset:e,rawParams:t})}`})}e.getSettings=r;let i=e.getSettingsQueryOptions=(e,t)=>x({queryKey:[`Setting`,`getSettings`,e,t],queryFn:()=>r(e,t)});e.useSettings=(e,t,n)=>Lw(b({...i(e,t),...n}));let a=e.getSettingsInfiniteQueryOptions=(e,t)=>E({queryKey:[`Setting`,`getSettings`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:Iw});e.useSettingsInfinite=(e,t,n)=>Lw(y({...a(e,t),...n}));async function o(){return Q({method:`GET`,url:`/api/setting/listSettings`})}e.getSettingList=o;let s=e.getSettingListQueryOptions=()=>x({queryKey:[`Setting`,`getSettingList`],queryFn:()=>o()});e.useSettingList=e=>Lw(b({...s(),...e}));async function c(e,t){return Q({method:`POST`,url:`/api/setting/updateSetting`,data:{key:e,value:t}})}e.updateSetting=c,e.useUpdateSettingMutation=()=>k({mutationFn:e=>zw.updateSetting(e.key,e.value)});async function l(e){return Q({method:`POST`,url:`/api/setting/resetSetting`,data:{key:e}})}e.resetSetting=l,e.useResetSettingMutation=()=>k({mutationFn:e=>zw.resetSetting(e.key)});async function u(){return Q({method:`POST`,url:`/api/setting/triggerExpiryReminder`})}e.triggerExpiryReminder=u,e.useTriggerExpiryReminderMutation=()=>k({mutationFn:e=>zw.triggerExpiryReminder()})})(zw||={});var Bw;(function(e){async function t(e,t){return Q({method:`GET`,url:`/api/requestLogStep/findById?${mw.default.stringify({subset:e,id:t})}`})}e.getRequestLogStep=t;let n=e.getRequestLogStepQueryOptions=(e,n)=>x({queryKey:[`RequestLogStep`,`getRequestLogStep`,e,n],queryFn:()=>t(e,n)});e.useRequestLogStep=(e,t,r)=>Lw(b({...n(e,t),...r}));async function r(e,t){return Q({method:`GET`,url:`/api/requestLogStep/findMany?${mw.default.stringify({subset:e,rawParams:t})}`})}e.getRequestLogSteps=r;let i=e.getRequestLogStepsQueryOptions=(e,t)=>x({queryKey:[`RequestLogStep`,`getRequestLogSteps`,e,t],queryFn:()=>r(e,t)});e.useRequestLogSteps=(e,t,n)=>Lw(b({...i(e,t),...n}));let a=e.getRequestLogStepsInfiniteQueryOptions=(e,t)=>E({queryKey:[`RequestLogStep`,`getRequestLogSteps`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:Iw});e.useRequestLogStepsInfinite=(e,t,n)=>Lw(y({...a(e,t),...n}));async function o(e){return Q({method:`POST`,url:`/api/requestLogStep/save`,data:{spa:e}})}e.save=o,e.useSaveMutation=()=>k({mutationFn:e=>Bw.save(e.spa)});async function s(e){return Q({method:`POST`,url:`/api/requestLogStep/del`,data:{ids:e}})}e.del=s,e.useDelMutation=()=>k({mutationFn:e=>Bw.del(e.ids)})})(Bw||={});var Vw;(function(e){async function t(e,t){return Q({method:`GET`,url:`/api/requestLog/findById?${mw.default.stringify({subset:e,id:t})}`})}e.getRequestLog=t;let n=e.getRequestLogQueryOptions=(e,n)=>x({queryKey:[`RequestLog`,`getRequestLog`,e,n],queryFn:()=>t(e,n)});e.useRequestLog=(e,t,r)=>Lw(b({...n(e,t),...r}));async function r(e,t){return Q({method:`GET`,url:`/api/requestLog/findMany?${mw.default.stringify({subset:e,rawParams:t})}`})}e.getRequestLogs=r;let i=e.getRequestLogsQueryOptions=(e,t)=>x({queryKey:[`RequestLog`,`getRequestLogs`,e,t],queryFn:()=>r(e,t)});e.useRequestLogs=(e,t,n)=>Lw(b({...i(e,t),...n}));let a=e.getRequestLogsInfiniteQueryOptions=(e,t)=>E({queryKey:[`RequestLog`,`getRequestLogs`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:Iw});e.useRequestLogsInfinite=(e,t,n)=>Lw(y({...a(e,t),...n}));async function o(e){return Q({method:`POST`,url:`/api/requestLog/save`,data:{spa:e}})}e.save=o,e.useSaveMutation=()=>k({mutationFn:e=>Vw.save(e.spa)});async function s(e){return Q({method:`GET`,url:`/api/requestLog/responseTypeTs?${mw.default.stringify({id:e})}`})}e.responseTypeTs=s;let c=e.responseTypeTsQueryOptions=e=>x({queryKey:[`RequestLog`,`responseTypeTs`,e],queryFn:()=>s(e)});e.useResponseTypeTs=(e,t)=>Lw(b({...c(e),...t}));async function l(e){return Q({method:`GET`,url:`/api/requestLog/toolsView?${mw.default.stringify({id:e})}`})}e.toolsView=l;let u=e.toolsViewQueryOptions=e=>x({queryKey:[`RequestLog`,`toolsView`,e],queryFn:()=>l(e)});e.useToolsView=(e,t)=>Lw(b({...u(e),...t}));async function d(e){return Q({method:`POST`,url:`/api/requestLog/del`,data:{ids:e}})}e.del=d,e.useDelMutation=()=>k({mutationFn:e=>Vw.del(e.ids)})})(Vw||={});var Hw;(function(e){async function t(e){return Q({method:`POST`,url:`/api/qgrid/query`,data:{args:e}})}e.query=t,e.useQueryMutation=()=>k({mutationFn:e=>Hw.query(e.args)});async function n(e){return Q({method:`POST`,url:`/api/qgrid/prepareStream`,data:{args:e}})}e.prepareStream=n,e.usePrepareStreamMutation=()=>k({mutationFn:e=>Hw.prepareStream(e.args)});function r(e,t,n){return Nw(`/api/qgrid/queryStream`,e,t,n)}e.useQueryStream=r;async function i(e){return Q({method:`POST`,url:`/api/qgrid/createRun`,data:{input:e}})}e.createRun=i,e.useCreateRunMutation=()=>k({mutationFn:e=>Hw.createRun(e.input)});async function a(e){return Q({method:`POST`,url:`/api/qgrid/appendStep`,data:{input:e}})}e.appendStep=a,e.useAppendStepMutation=()=>k({mutationFn:e=>Hw.appendStep(e.input)});async function o(e){return Q({method:`POST`,url:`/api/qgrid/finishRun`,data:{input:e}})}e.finishRun=o,e.useFinishRunMutation=()=>k({mutationFn:e=>Hw.finishRun(e.input)});async function s(){return Q({method:`GET`,url:`/api/qgrid/stats`})}e.stats=s;let c=e.statsQueryOptions=()=>x({queryKey:[`Qgrid`,`stats`],queryFn:()=>s()});e.useStats=e=>Lw(b({...c(),...e}));async function l(e){return Q({method:`GET`,url:`/api/qgrid/totalCost?${mw.default.stringify({params:e})}`})}e.totalCost=l;let u=e.totalCostQueryOptions=e=>x({queryKey:[`Qgrid`,`totalCost`,e],queryFn:()=>l(e)});e.useTotalCost=(e,t)=>Lw(b({...u(e),...t}));async function d(){return Q({method:`GET`,url:`/api/qgrid/projectNames`})}e.projectNames=d;let f=e.projectNamesQueryOptions=()=>x({queryKey:[`Qgrid`,`projectNames`],queryFn:()=>d()});e.useProjectNames=e=>Lw(b({...f(),...e}));async function p(){return Q({method:`GET`,url:`/api/qgrid/modelNames`})}e.modelNames=p;let m=e.modelNamesQueryOptions=()=>x({queryKey:[`Qgrid`,`modelNames`],queryFn:()=>p()});e.useModelNames=e=>Lw(b({...m(),...e}));async function h(e,t,n){return Q({method:`POST`,url:`/api/qgrid/addToken`,data:{provider:e,credentials:t,name:n}})}e.addToken=h,e.useAddTokenMutation=()=>k({mutationFn:e=>Hw.addToken(e.provider,e.credentials,e.name)});async function g(e,t,n,r,i){return Q({method:`POST`,url:`/api/qgrid/updateToken`,data:{id:e,name:t,quotaThreshold:n,weight:r,keepaliveEnabled:i}})}e.updateToken=g;async function _(e){return Q({method:`POST`,url:`/api/qgrid/removeToken`,data:{id:e}})}e.removeToken=_,e.useRemoveTokenMutation=()=>k({mutationFn:e=>Hw.removeToken(e.id)});async function v(e){return Q({method:`POST`,url:`/api/qgrid/toggleToken`,data:{id:e}})}e.toggleToken=v,e.useToggleTokenMutation=()=>k({mutationFn:e=>Hw.toggleToken(e.id)});async function y(e){return Q({method:`POST`,url:`/api/qgrid/oauthStart`,data:{name:e}})}e.oauthStart=y,e.useOauthStartMutation=()=>k({mutationFn:e=>Hw.oauthStart(e.name)});async function S(e){return Q({method:`POST`,url:`/api/qgrid/oauthComplete`,data:{pastedCode:e}})}e.oauthComplete=S,e.useOauthCompleteMutation=()=>k({mutationFn:e=>Hw.oauthComplete(e.pastedCode)});async function C(e){return Q({method:`POST`,url:`/api/qgrid/oauthStartOpenAI`,data:{name:e}})}e.oauthStartOpenAI=C,e.useOauthStartOpenAIMutation=()=>k({mutationFn:e=>Hw.oauthStartOpenAI(e.name)});async function w(e){return Q({method:`POST`,url:`/api/qgrid/oauthStartGrok`,data:{name:e}})}e.oauthStartGrok=w,e.useOauthStartGrokMutation=()=>k({mutationFn:e=>Hw.oauthStartGrok(e.name)});async function T(e){return Q({method:`POST`,url:`/api/qgrid/oauthStartGrokDevice`,data:{name:e}})}e.oauthStartGrokDevice=T,e.useOauthStartGrokDeviceMutation=()=>k({mutationFn:e=>Hw.oauthStartGrokDevice(e.name)});async function E(e){return Q({method:`POST`,url:`/api/qgrid/oauthPollGrokDevice`,data:{deviceCode:e}})}e.oauthPollGrokDevice=E,e.useOauthPollGrokDeviceMutation=()=>k({mutationFn:e=>Hw.oauthPollGrokDevice(e.deviceCode)});async function D(e){return Q({method:`POST`,url:`/api/qgrid/generateImages`,data:{params:e}})}e.generateImages=D,e.useGenerateImagesMutation=()=>k({mutationFn:e=>Hw.generateImages(e.params)});async function O(e){return Q({method:`POST`,url:`/api/qgrid/videoStart`,data:{params:e}})}e.videoStart=O,e.useVideoStartMutation=()=>k({mutationFn:e=>Hw.videoStart(e.params)});async function A(e){return Q({method:`POST`,url:`/api/qgrid/videoStatus`,data:{params:e}})}e.videoStatus=A,e.useVideoStatusMutation=()=>k({mutationFn:e=>Hw.videoStatus(e.params)});async function ee(e){return Q({method:`POST`,url:`/api/qgrid/transcribe`,data:{params:e}})}e.transcribe=ee,e.useTranscribeMutation=()=>k({mutationFn:e=>Hw.transcribe(e.params)});async function j(e){return Q({method:`POST`,url:`/api/qgrid/speak`,data:{params:e}})}e.speak=j,e.useSpeakMutation=()=>k({mutationFn:e=>Hw.speak(e.params)});async function M(e){return Q({method:`GET`,url:`/api/qgrid/usage?${mw.default.stringify({tokenId:e})}`})}e.usage=M;let te=e.usageQueryOptions=e=>x({queryKey:[`Qgrid`,`usage`,e],queryFn:()=>M(e)});e.useUsage=(e,t)=>Lw(b({...te(e),...t}));async function N(){return Q({method:`GET`,url:`/api/qgrid/health`})}e.health=N;let ne=e.healthQueryOptions=()=>x({queryKey:[`Qgrid`,`health`],queryFn:()=>N()});e.useHealth=e=>Lw(b({...ne(),...e}))})(Hw||={});var Uw;(function(e){async function t(e){return Q({method:`GET`,url:`/api/monit/monitLogs?${mw.default.stringify({cursor:e})}`})}e.monitLogs=t;let n=e.monitLogsQueryOptions=e=>x({queryKey:[`Monit`,`monitLogs`,e],queryFn:()=>t(e)});e.useMonitLogs=(e,t)=>Lw(b({...n(e),...t}));async function r(){return Q({method:`GET`,url:`/api/monit/monitInfo`})}e.monitInfo=r;let i=e.monitInfoQueryOptions=()=>x({queryKey:[`Monit`,`monitInfo`],queryFn:()=>r()});e.useMonitInfo=e=>Lw(b({...i(),...e}));async function a(){return Q({method:`GET`,url:`/api/monit/monitStats`})}e.monitStats=a;let o=e.monitStatsQueryOptions=()=>x({queryKey:[`Monit`,`monitStats`],queryFn:()=>a()});e.useMonitStats=e=>Lw(b({...o(),...e}))})(Uw||={}),Vw.useRequestLogs,Vw.useRequestLogsInfinite,Bw.useRequestLogSteps,Bw.useRequestLogStepsInfinite,zw.useSettings,zw.useSettingsInfinite,Rw.useTokens,Rw.useTokensInfinite;function Ww(e,t){return e.flatMap(e=>{let n=t?e.images??[]:[];return e.role===`user`?[{type:`message`,role:`user`,content:[{type:`input_text`,text:e.text},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[...e.text?[{type:`message`,role:`assistant`,content:[{type:`output_text`,text:e.text}]}]:[],...n.length?[{type:`message`,role:`user`,content:[{type:`input_text`,text:`Previously generated assistant images (reference for follow-up edits):`},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[]]})}function Gw(e){return e.flatMap(e=>e.type===`image`?[`data:${e.mediaType??`image/png`};base64,${e.data}`]:[])}function Kw(e,t){return e.filter(e=>e.active&&e.provider===t).toSorted((e,t)=>e.ord-t.ord||e.name.localeCompare(t.name))}function qw(e,t){return t!==void 0&&!e.some(e=>e.active&&e.provider===t)}function Jw(e,t,n){return!e||!n||t.some(t=>t.name===e)?e:``}function Yw(e,t){return e.model!==t.model||e.system!==t.system||e.tokenName!==t.tokenName}function Xw(e){return e?{tokenName:e}:{}}var Zw=t(i(),1);function Qw(e){let t=e.indexOf(`,`),n=e.slice(0,t).match(/^data:image\/(png|jpeg|webp);base64$/)?.[1];if(!n)return{extension:`—`,bytes:0};let r=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return{extension:n===`jpeg`?`jpg`:n,bytes:Math.max(0,Math.floor((e.length-t-1)*3/4)-r)}}function $w(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(2)} MB`}function eT({url:e,onClose:t}){let n=(0,F.useRef)(null),[r,i]=(0,F.useState)(null),[a,o]=(0,F.useState)(!1),[s,c]=(0,F.useState)(!1),l=Qw(e);return(0,F.useEffect)(()=>{let e=n.current;return e?.showModal(),()=>e?.close()},[]),(0,Zw.createPortal)((0,I.jsx)(`dialog`,{ref:n,"aria-labelledby":`chat-image-preview-title`,onCancel:e=>{e.preventDefault(),t()},className:`m-0 h-dvh max-h-none w-screen max-w-none overflow-hidden bg-transparent p-0 backdrop:bg-black/65`,children:(0,I.jsx)(`div`,{className:`grid size-full place-items-center p-4`,onClick:e=>{e.target===e.currentTarget&&t()},children:(0,I.jsxs)(`div`,{className:`w-[min(1100px,calc(100vw-2rem))] max-h-[calc(100dvh-2rem)] overflow-hidden rounded-2xl bg-white text-sand-900 shadow-xl`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-sand-100 px-4 py-3`,children:[(0,I.jsx)(`h2`,{id:`chat-image-preview-title`,className:`text-sm font-semibold`,children:`이미지 미리보기`}),(0,I.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`이미지 미리보기 닫기`,className:`grid size-8 place-items-center rounded-full hover:bg-sand-100`,children:(0,I.jsx)(ou,{className:`size-4`})})]}),(0,I.jsx)(`div`,{className:`max-h-[calc(100dvh-13rem)] overflow-auto bg-sand-100 p-3`,style:{backgroundImage:`conic-gradient(#e8e4df 25%, #fff 0 50%, #e8e4df 0 75%, #fff 0)`,backgroundSize:`20px 20px`},children:s?(0,I.jsx)(`p`,{role:`alert`,className:`p-8 text-center text-danger-500`,children:`이미지를 불러올 수 없습니다.`}):(0,I.jsx)(`img`,{src:e,alt:`확대된 채팅 이미지`,onLoad:e=>i({width:e.currentTarget.naturalWidth,height:e.currentTarget.naturalHeight}),onError:()=>c(!0),className:a?`block max-w-none`:`mx-auto block max-h-[calc(100dvh-15rem)] max-w-full object-contain`})}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-sand-100 px-4 py-3`,children:[(0,I.jsxs)(`dl`,{className:`flex flex-wrap gap-x-5 gap-y-1 text-xs tabular-nums`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{className:`text-sand-400`,children:`확장자`}),(0,I.jsx)(`dd`,{className:`mt-1 uppercase`,children:l.extension})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{className:`text-sand-400`,children:`파일 용량`}),(0,I.jsx)(`dd`,{className:`mt-1`,children:$w(l.bytes)})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{className:`text-sand-400`,children:`해상도`}),(0,I.jsx)(`dd`,{className:`mt-1`,children:r?`${r.width} × ${r.height} px`:`—`})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 text-xs`,children:[(0,I.jsx)(`button`,{type:`button`,disabled:!r||s,onClick:()=>o(e=>!e),className:`text-sand-600 hover:underline disabled:opacity-40`,children:a?`화면에 맞추기`:`원본 크기`}),(0,I.jsx)(`a`,{href:e,download:`qgrid-image.${l.extension}`,className:`text-sienna-500 hover:underline`,children:`다운로드`})]})]})]})})}),document.body)}var tT=`qgrid_chat`,nT=`anthropic/claude-fable-5-1`,rT=[{label:`OpenAI`,models:[`openai/gpt-6-astra`,`openai/gpt-6.1-sol`,`openai/gpt-6-sol`,`openai/gpt-6-luna`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-sol`,`openai/gpt-5.6-luna`]},{label:`Anthropic`,models:[`anthropic/claude-fable-5-1`,`anthropic/claude-fable-5`,`anthropic/claude-opus-5-5`,`anthropic/claude-opus-5`,`anthropic/claude-sonnet-5-5`,`anthropic/claude-sonnet-5`,`anthropic/claude-haiku-5-5`,`anthropic/claude-opus-4-8`,`anthropic/claude-opus-4-7`,`anthropic/claude-opus-4-6`,`anthropic/claude-opus-4-5`,`anthropic/claude-sonnet-4-6`,`anthropic/claude-haiku-4-5`]},{label:`Grok`,models:[`grok/grok-4.7`,`grok/grok-4.7-build-fast`,`grok/grok-4.6`,`grok/grok-4.5`]}],iT=[`low`,`medium`,`high`],aT=new Map([[`openai`,`OpenAI`],[`anthropic`,`Anthropic`],[`grok`,`Grok`]]);function oT(e,t,n){let r=n!==void 0&&qw(n,t);return/NO_OPENAI_WORKERS|no ready openai workers|no anthropic tokens available/i.test(e)||r&&/기동 중입니다/.test(e)?`사용 가능한 ${t?aT.get(t)??t:``} 토큰이 없습니다. Tokens 페이지에서 토큰을 추가해주세요.`:e}function sT(e){return e>=.01?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}var cT=4,lT=1536;async function uT(e){let t=await createImageBitmap(e),n=Math.min(1,lT/Math.max(t.width,t.height)),r=document.createElement(`canvas`);return r.width=Math.max(1,Math.round(t.width*n)),r.height=Math.max(1,Math.round(t.height*n)),r.getContext(`2d`).drawImage(t,0,0,r.width,r.height),t.close(),r.toDataURL(`image/jpeg`,.85)}function dT(){let[e,t]=(0,F.useState)(!1),[n,r]=(0,F.useState)(!1),[i,a]=(0,F.useState)([]),[o,s]=(0,F.useState)(``),[c,l]=(0,F.useState)(nT),[u,d]=(0,F.useState)(``),[f,p]=(0,F.useState)(``),[m,h]=(0,F.useState)(``),[g,_]=(0,F.useState)(!1),[v,y]=(0,F.useState)(null),[b,x]=(0,F.useState)(!1),[S,C]=(0,F.useState)([]),[w,T]=(0,F.useState)(null),E=(0,F.useRef)(null);(0,F.useEffect)(()=>()=>E.current?.abort(),[]);let D=(0,F.useRef)(void 0),O=(0,F.useRef)(void 0),k=(0,F.useRef)(null),A=(0,F.useRef)(null),ee=(0,F.useRef)(null),j=c.split(`/`)[0],te=j===`openai`||j===`grok`,{data:N}=Rw.useTokens(`A`,{orderBy:`ord-asc`},{enabled:e}),ne=(0,F.useMemo)(()=>Kw(N?.rows??[],j),[j,N?.rows]),re=N?.rows!==void 0,ie=(0,F.useRef)(void 0);(0,F.useEffect)(()=>{ie.current=N?.rows},[N?.rows]);let ae=N?.rows!==void 0&&qw(N.rows,j);(0,F.useEffect)(()=>{te||C([])},[te]),(0,F.useEffect)(()=>{d(e=>Jw(e,ne,re))},[re,ne]);let oe=async e=>{if(!e)return;let t=cT-S.length,n=await Promise.all([...e].slice(0,t).map(e=>uT(e).catch(()=>null)));C(e=>[...e,...n.filter(e=>e!==null)].slice(0,cT))},P=e=>{a(t=>{let n=t[t.length-1];return!n||n.role!==`assistant`?t:[...t.slice(0,-1),e(n)]})},se=e=>{let t=oT(e,O.current?.model.split(`/`)[0],ie.current);P(e=>e.status===`streaming`?{...e,status:`error`,error:t}:e),y(null),x(!1)},ce=Hw.useQueryStream({streamId:v??``},{delta:({text:e})=>{P(t=>t.status===`streaming`?{...t,text:t.text+e}:t)},toolCall:()=>{se(`tool call 응답은 채팅에서 지원하지 않습니다`)},done:e=>{D.current=e.runContext?.threadCoord,P(t=>({...t,text:e.text||t.text,images:Gw(Array.isArray(e.content)?e.content:[e.content]),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}}))},error:({message:e})=>{se(e)},end:()=>{P(e=>e.status===`streaming`?{...e,status:`error`,error:`응답 완료 전에 스트림이 종료되었습니다`}:e),y(null),x(!1)}},{enabled:v!==null,retry:0});(0,F.useEffect)(()=>{v!==null&&ce.error&&se(ce.error)},[ce.error]),(0,F.useEffect)(()=>{k.current?.scrollTo({top:k.current.scrollHeight})},[i,e]),(0,F.useEffect)(()=>{e&&A.current?.focus()},[e]);let le=async()=>{let e=o.trim();if(!e||b)return;let t=m.trim(),n=Jw(u,ne,re),r={model:c,system:t,tokenName:n};O.current&&Yw(O.current,r)&&(D.current=void 0),O.current=r;let l=te?S:[],d=Ww(i,te),p=new AbortController;E.current=p;let h={role:`user`,text:e};l.length>0&&(h.images=l),a(e=>[...e,h,{role:`assistant`,text:``,status:`streaming`}]),s(``),C([]),x(!0);try{let r={prompt:e,model:c,projectName:tT,...Xw(n)};if(t&&(r.system=t),f&&(r.effort=f),l.length>0&&(r.input=l.map(e=>({type:`image`,url:e}))),d.length>0&&(r.history=JSON.stringify(d)),D.current&&(r.runContext={threadCoord:D.current}),te){let e=await Q({method:`POST`,url:`/api/qgrid/query`,data:{args:{...r,imageGeneration:`auto`}},signal:p.signal});if(E.current!==p||p.signal.aborted)return;D.current=e.runContext?.threadCoord,P(t=>({...t,text:e.text,images:Gw(e.content),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}})),x(!1),E.current=null;return}let{streamId:i}=await Hw.prepareStream(r);if(E.current!==p||p.signal.aborted)return;y(i)}catch(e){if(E.current!==p||p.signal.aborted)return;se(e instanceof Error?e.message:String(e)),E.current=null}},ue=()=>{E.current?.abort(),E.current=null,P(e=>e.status===`streaming`?{...e,status:`aborted`}:e),y(null),x(!1)};return(0,I.jsxs)(`div`,{className:`fixed bottom-5 right-5 z-40`,children:[w&&(0,I.jsx)(eT,{url:w,onClose:()=>T(null)},w),e?(0,I.jsxs)(`div`,{onAnimationEnd:()=>{n&&(t(!1),r(!1))},className:`flex flex-col w-[min(400px,calc(100vw-2.5rem))] h-[min(640px,calc(100dvh-7rem))] bg-white rounded-2xl shadow-[0_16px_48px_rgba(44,36,24,0.18),0_0_0_1px_rgba(227,218,204,0.6)] overflow-hidden origin-bottom-right ${n?`chat-panel-pop-out`:`chat-panel-pop`}`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2.5 px-4 py-2.5 border-b border-sand-100 shrink-0`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`p`,{className:`text-[14px] font-semibold text-sand-900 leading-tight`,children:`채팅`}),(0,I.jsxs)(`p`,{className:`text-[11px] text-sand-400 truncate leading-tight`,children:[c,f?` · ${f}`:``,u?` · ${u}`:``]})]}),(0,I.jsxs)(`div`,{className:`ml-auto flex items-center gap-0.5`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:()=>_(e=>!e),title:`모델·토큰·effort·system prompt 설정`,className:`size-8 grid place-items-center rounded-full transition-colors duration-150 ${g?`text-sienna-500 bg-sienna-50`:`text-sand-500 hover:text-sand-700 hover:bg-sand-100`}`,children:(0,I.jsx)(iu,{className:`size-4`})}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>{b&&ue(),a([]),D.current=void 0,O.current=void 0},disabled:i.length===0,title:`새 대화`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,I.jsx)(ru,{className:`size-4`})}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>{window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?t(!1):r(!0)},title:`닫기`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 transition-colors duration-150`,children:(0,I.jsx)(ou,{className:`size-4.5`})})]})]}),g&&(0,I.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand-100 bg-sand-50/60 shrink-0 flex flex-col gap-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(`select`,{value:c,onChange:e=>l(e.target.value),disabled:b,className:`min-w-0 flex-1 rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-800 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:rT.map(e=>(0,I.jsx)(`optgroup`,{label:e.label,children:e.models.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))},e.label))}),(0,I.jsxs)(`select`,{value:f,onChange:e=>p(e.target.value),disabled:b,className:`rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-600 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,I.jsx)(`option`,{value:``,children:`effort 기본`}),iT.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]}),(0,I.jsxs)(`select`,{value:u,onChange:e=>d(e.target.value),disabled:b,"aria-label":`요청 토큰`,className:`w-full rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-700 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,I.jsx)(`option`,{value:``,children:`토큰 자동 분배`}),ne.map(e=>(0,I.jsx)(`option`,{value:e.name,children:e.name},e.name))]}),(0,I.jsx)(`textarea`,{value:m,onChange:e=>h(e.target.value),disabled:b,placeholder:`system prompt (선택)`,rows:2,className:`w-full resize-none rounded-xl border border-sand-200/80 bg-white px-2.5 py-1.5 text-[12px] text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 disabled:opacity-50`})]}),(0,I.jsx)(`div`,{ref:k,className:`flex-1 overflow-y-auto main-scroll px-3.5 py-3`,children:i.length===0?(0,I.jsx)(`div`,{className:`h-full grid place-items-center`,children:(0,I.jsxs)(`div`,{className:`text-center px-4`,children:[(0,I.jsx)(`img`,{src:su,alt:``,className:`mx-auto mb-2.5 size-14 rounded-[35%] object-cover`}),(0,I.jsx)(`p`,{className:`text-[13px] text-sand-600`,children:`가용 토큰에게 바로 물어보세요.`}),(0,I.jsxs)(`p`,{className:`mt-1 text-[11px] text-sand-400`,children:[`대화는 저장되지 않고, 요청은`,` `,(0,I.jsx)(M,{to:`/logs`,search:{project:tT,page:1},className:`text-sienna-500 hover:underline`,children:`request log`}),`에 기록됩니다.`]})]})}):(0,I.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:i.map((e,t)=>e.role===`user`?(0,I.jsxs)(`div`,{className:`self-end max-w-[80%] flex flex-col items-end gap-1`,children:[e.images&&(0,I.jsx)(`div`,{className:`flex flex-wrap justify-end gap-1`,children:e.images.map((e,t)=>(0,I.jsx)(`button`,{type:`button`,onClick:()=>T(e),"aria-label":`첨부 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,I.jsx)(`img`,{src:e,alt:``,className:`size-24 rounded-xl object-cover`})},t))}),(0,I.jsx)(`div`,{className:`rounded-[18px] rounded-br-[5px] bg-sienna-600 px-3.5 py-2 text-[13px] leading-relaxed text-white whitespace-pre-wrap break-words`,children:e.text})]},t):(0,I.jsxs)(`div`,{className:`self-start max-w-[88%] min-w-0`,children:[(0,I.jsxs)(`div`,{className:`rounded-[18px] rounded-bl-[5px] bg-sand-100 px-3.5 py-2`,children:[e.images?.map((e,t)=>(0,I.jsxs)(`div`,{className:`my-1.5`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:()=>T(e),"aria-label":`생성된 이미지 ${t+1} 크게 보기`,className:`block w-full cursor-zoom-in rounded-xl`,children:(0,I.jsx)(`img`,{src:e,alt:`생성된 이미지 ${t+1}`,onLoad:()=>k.current?.scrollTo({top:k.current.scrollHeight}),className:`w-full rounded-xl object-contain bg-white`})}),(0,I.jsx)(`a`,{href:e,download:`qgrid-image-${t+1}.${e.startsWith(`data:image/jpeg;`)?`jpg`:e.startsWith(`data:image/webp;`)?`webp`:`png`}`,className:`mt-1 inline-block text-[11px] text-sienna-500 hover:underline`,children:`이미지 다운로드`})]},t)),e.text?(0,I.jsx)(`div`,{className:`prose prose-sm prose-qgrid max-w-none text-[13px] leading-relaxed break-words`,children:(0,I.jsx)(Xo,{remarkPlugins:[eu],children:e.text})}):e.status===`streaming`?(0,I.jsxs)(`span`,{className:`inline-flex gap-1 py-1.5 px-0.5`,"aria-label":`응답 대기 중`,children:[(0,I.jsx)(`span`,{className:`chat-typing-dot`}),(0,I.jsx)(`span`,{className:`chat-typing-dot [animation-delay:150ms]`}),(0,I.jsx)(`span`,{className:`chat-typing-dot [animation-delay:300ms]`})]}):null,e.status===`aborted`&&(0,I.jsx)(`p`,{className:`mt-1 text-[10px] text-sand-400`,children:`중단됨`}),e.status===`error`&&(0,I.jsx)(`p`,{className:`mt-1 text-[12px] text-danger-500 break-words`,children:e.error})]}),e.meta&&(0,I.jsxs)(M,{to:e.meta.requestLogId===void 0?`/logs`:`/requests/show`,search:e.meta.requestLogId===void 0?{project:tT,page:1}:{id:e.meta.requestLogId},className:`mt-1 ml-1.5 inline-block text-[10px] tabular-nums text-sand-400 hover:text-sienna-500 transition-colors duration-150`,title:`request log 보기`,children:[e.meta.model,e.meta.fallback&&` (폴백)`,e.meta.tokenName?` · ${e.meta.tokenName}`:``,` · ${(e.meta.durationMs/1e3).toFixed(1)}s · ${sT(e.meta.costUsd)}`]})]},t))})}),ae&&(0,I.jsxs)(`div`,{className:`px-4 py-1.5 border-t border-caution-400/30 bg-caution-400/10 text-[11px] text-caution-500 shrink-0`,children:[aT.get(j)??j,` 토큰이 등록되어 있지 않습니다.`,` `,(0,I.jsx)(M,{to:`/tokens`,className:`font-medium underline hover:text-caution-400`,children:`Tokens 페이지`}),`에서 추가해주세요.`]}),(0,I.jsxs)(`div`,{className:`px-3 py-2.5 border-t border-sand-100 shrink-0`,children:[S.length>0&&(0,I.jsx)(`div`,{className:`flex gap-1.5 pb-2`,children:S.map((e,t)=>(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:()=>T(e),"aria-label":`첨부할 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,I.jsx)(`img`,{src:e,alt:``,className:`size-12 rounded-xl object-cover`})}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>C(e=>e.filter((e,n)=>n!==t)),title:`첨부 제거`,className:`absolute -top-1.5 -right-1.5 size-4.5 grid place-items-center rounded-full bg-sand-800 text-white hover:bg-sand-700`,children:(0,I.jsx)(ou,{className:`size-2.5`})})]},t))}),(0,I.jsxs)(`div`,{className:`flex items-end gap-1.5`,children:[te&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`input`,{ref:ee,type:`file`,accept:`image/*`,multiple:!0,hidden:!0,onChange:e=>{oe(e.target.files),e.target.value=``}}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>ee.current?.click(),disabled:b||S.length>=cT,title:`이미지 첨부`,className:`size-9 shrink-0 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,I.jsx)(nu,{className:`size-4.5`})})]}),(0,I.jsx)(`textarea`,{ref:A,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),le())},placeholder:`메시지 입력...`,rows:1,className:`min-w-0 flex-1 resize-none [field-sizing:content] max-h-28 rounded-[20px] border border-sand-200/80 bg-sand-50/60 px-4 py-2 text-[13px] leading-relaxed text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 focus:bg-white transition-colors duration-150`}),b?(0,I.jsx)(`button`,{type:`button`,onClick:ue,title:`응답 중단`,className:`size-9 shrink-0 grid place-items-center rounded-full border border-sand-200/80 text-sand-600 hover:bg-sand-100 active:scale-[0.96] transition-all duration-150`,children:(0,I.jsx)(au,{className:`size-3.5`})}):(0,I.jsx)(`button`,{type:`button`,onClick:()=>void le(),disabled:!o.trim(),title:`전송`,className:`size-9 shrink-0 grid place-items-center rounded-full bg-sienna-600 text-white hover:bg-sienna-700 disabled:opacity-40 active:scale-[0.96] transition-all duration-150`,children:(0,I.jsx)(tu,{className:`size-4.5`})})]})]})]}):(0,I.jsx)(`button`,{type:`button`,onClick:()=>t(!0),title:`채팅 열기`,"aria-label":`채팅 열기`,className:`block size-15 rounded-[35%] overflow-hidden shadow-[0_6px_20px_rgba(44,36,24,0.25)] hover:scale-105 active:scale-[0.96] transition-transform duration-150`,children:(0,I.jsx)(`img`,{src:su,alt:``,className:`size-full object-cover`})})]})}var fT=`2.14.0`;function pT({className:e}){let t=A({select:e=>e.location.pathname});return(0,I.jsxs)(`aside`,{className:`hidden md:flex w-[200px] bg-sand-50 flex-col shrink-0 border-r border-sand-200/40 ${e??``}`,children:[(0,I.jsx)(`div`,{className:`h-11 flex items-center px-4 border-b border-sand-200/30`,children:(0,I.jsx)(`span`,{className:`text-[13px] font-semibold text-sand-800 tracking-tight`,children:`Qgrid`})}),(0,I.jsx)(`nav`,{className:`flex-1 px-2.5 py-3 space-y-4 overflow-y-auto`,children:he.map(e=>(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`px-2 pb-1.5`,children:(0,I.jsx)(`span`,{className:`text-[10px] uppercase tracking-[0.08em] text-sand-400 font-medium`,children:e.label})}),(0,I.jsx)(`div`,{className:`space-y-0.5`,children:e.items.map(e=>{let n=_e(e.path,t);return(0,I.jsxs)(M,{to:e.path,className:`flex items-center gap-2 px-2 py-[6px] rounded-[7px] text-[13px] no-underline transition-all duration-150 ${n?`bg-sand-200/60 text-sand-900 font-medium`:`text-sand-500 hover:bg-sand-100 hover:text-sand-700`}`,style:n?{boxShadow:`0 0.5px 1px rgba(0,0,0,0.04), inset 0 0.5px 0 rgba(255,255,255,0.6)`}:void 0,children:[(0,I.jsx)(e.icon,{className:`size-[15px] shrink-0 ${n?`text-sienna-500`:`text-sand-400`}`}),(0,I.jsx)(`span`,{children:e.title})]},e.path)})})]},e.label))}),(0,I.jsx)(`div`,{className:`px-4 py-3 border-t border-sand-200/30`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`div`,{className:`size-1.5 rounded-full bg-sage-400`}),(0,I.jsxs)(`span`,{className:`text-[10px] text-sand-400`,children:[`v`,fT]})]})})]})}var mT=new Map(Object.entries({"/":`Dashboard`,"/tokens":`Tokens`,"/logs":`Request Logs`,"/monit":`Server Logs`}));function hT(e){return e.startsWith(`/requests/show`)?{parent:`Request Logs`,parentPath:`/logs`,current:`Detail`}:{current:mT.get(e)??e}}function gT(){let e=hT(A({select:e=>e.location.pathname}));return(0,I.jsx)(`div`,{className:`toolbar-glass h-11 shrink-0 flex items-center px-5`,children:(0,I.jsxs)(`nav`,{className:`flex items-center gap-1.5 text-[13px]`,children:[e.parent&&e.parentPath&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(M,{to:e.parentPath,className:`text-sand-400 hover:text-sand-600 transition-colors no-underline`,children:e.parent}),(0,I.jsx)(`span`,{className:`text-sand-300 select-none`,children:`/`})]}),(0,I.jsx)(`span`,{className:`font-medium text-sand-800`,children:e.current})]})})}var _T=[`/login`,`/signup`];function vT({children:e}){(0,F.useEffect)(()=>{let e=navigator.language.split(`-`)[0],t=vw.find(t=>t===e);t!==void 0&&bw(t)},[]);let t=A({select:e=>e.location.pathname}),n=!_T.includes(t);return(0,I.jsxs)(`div`,{className:`flex h-screen w-full bg-sand-100 overflow-hidden font-sans`,children:[n&&(0,I.jsx)(pT,{}),(0,I.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden min-w-0`,children:[n&&(0,I.jsx)(gT,{}),(0,I.jsx)(`main`,{className:`flex-1 overflow-y-auto main-scroll content-inset`,children:(0,I.jsx)(`div`,{className:`px-3 py-4 sm:px-6 sm:py-5 md:px-8`,children:(0,I.jsx)(F.Suspense,{fallback:(0,I.jsx)(`div`,{className:`text-sand-400 text-center py-8 text-sm`,children:`로딩 중...`}),children:e})})}),n&&(0,I.jsx)(ve,{})]}),n&&(0,I.jsx)(dT,{})]})}var yT={"rc.asyncSelect.loading":`Loading...`,"rc.asyncSelect.noOptions":`No options`,"rc.asyncSelect.noResults":`No results`,"rc.asyncSelect.selectPlaceholder":`Select...`,"rc.combobox.noResults":`No results`,"rc.combobox.selectPlaceholder":`Select...`,"rc.datePicker.pickDate":`Pick date`,"rc.datePicker.placeholder":`Pick date`,"rc.datePicker.selectDate":`Select date`,"rc.dateSelectorMultiple.addDate":`Add date`,"rc.dateSelectorMultiple.dateRange":`Range`,"rc.dateSelectorMultiple.placeholder":`Pick date`,"rc.dateSelectorMultiple.singleDate":`Single`,"rc.fileInput.browseFiles":`Browse files`,"rc.fileInput.dropZone":`Drag files here or click to upload`,"rc.fileInput.filePlaceholder":`File`,"rc.fileInput.imagePlaceholder":`Image`,"rc.fileInput.maxFilesExceeded":e=>`Maximum ${e} files allowed`,"rc.fileInput.pending":`Pending`,"rc.fileInput.remove":`Remove`,"rc.fileInput.uploadFailed":`Upload failed`,"rc.fileInput.uploading":`Uploading...`,"rc.monthPickerMultiple.addMonth":`Add month`,"rc.monthPickerMultiple.dateRange":`Range`,"rc.monthPickerMultiple.endDate":`End date`,"rc.monthPickerMultiple.placeholder":`Pick month`,"rc.monthPickerMultiple.singleDate":`Single`,"rc.monthPickerMultiple.startDate":`Start date`,"rc.multiSelect.clear":`Clear all`,"rc.multiSelect.close":`Close`,"rc.multiSelect.moreItems":e=>`+${e} more`,"rc.multiSelect.noOptions":`No options`,"rc.multiSelect.noOptionsSelected":`No options selected`,"rc.multiSelect.noResults":`No results`,"rc.multiSelect.optionsCount":e=>`${e} options`,"rc.multiSelect.selectAll":`Select all`,"rc.multiSelect.selectPlaceholder":`Select...`,"rc.pagination.next":`Next`,"rc.pagination.previous":`Previous`,"rc.pagination.showing":(e,t,n)=>`Showing ${e}-${t} of ${n}`,"rc.calendar.month.0":`January`,"rc.calendar.month.1":`February`,"rc.calendar.month.2":`March`,"rc.calendar.month.3":`April`,"rc.calendar.month.4":`May`,"rc.calendar.month.5":`June`,"rc.calendar.month.6":`July`,"rc.calendar.month.7":`August`,"rc.calendar.month.8":`September`,"rc.calendar.month.9":`October`,"rc.calendar.month.10":`November`,"rc.calendar.month.11":`December`,"rc.sonamuFilter.title":`Sonamu Filter`,"rc.sonamuFilter.apply":`Apply`,"rc.sonamuFilter.reset":`Reset`,"rc.sonamuFilter.addRule":`Add Rule`,"rc.sonamuFilter.noRulesYet":`No rules yet. Click "+ Add Rule" to start.`,"rc.sonamuFilter.selectField":`Select field`,"rc.sonamuFilter.selectOperator":`Operator`,"rc.sonamuFilter.selectOperatorFirst":`Select operator first`,"rc.sonamuFilter.enterValue":`Enter value`,"rc.sonamuFilter.enterNumber":`Enter number`,"rc.sonamuFilter.notSupported":`Not supported`,"rc.sonamuFilter.startDate":`Start date`,"rc.sonamuFilter.endDate":`End date`,"rc.sonamuFilter.appliedFilters":`🌲 Applied SonamuFilters`,"rc.common.cancel":`Cancel`,"rc.common.save":`Save`},bT=Object.create(null),xT=e=>({}),ST=new Proxy(bT,{get(e,t){return xT()[t]??bT[t]},has(e,t){return t in xT()||t in bT},set(e,t,n){let r=xT(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=xT(!0);return delete n[t],!0},ownKeys(){let e=xT(!0);return Object.keys(e)}});ST.NODE_ENV;function CT(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return CT(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return CT(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return CT(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return CT(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return CT(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return CT(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return CT(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function wT(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function TT(e){let t=e.split(`
|
|
103
|
+
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
104
|
+
at `))}function ET(e,t){class n extends e{#e;constructor(...e){if(wT()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=TT(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),n}var DT={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};ET(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:DT[e]){if(super(t?.message,t&&`cause`in t?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,t&&`cause`in t){let{cause:e,...n}=t;this.body=Object.defineProperty(n,"cause",{value:e,writable:!0,configurable:!0})}else this.body=t}},Error);var OT=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},kT=47;function AT(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===kT;)t--;return t===e.length?e:e.slice(0,t)}function jT(e){try{return(AT(new URL(e).pathname)||`/`)!==`/`}catch{throw new OT(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function MT(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new OT(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof OT?t:new OT(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function NT(e,t=`/api/auth`){if(MT(e),jT(e))return e;let n=AT(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function PT(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function FT(e,t,n,r,i){if(e)return NT(e,t);if(r!==!1){let e=ST.BETTER_AUTH_URL||ST.NEXT_PUBLIC_BETTER_AUTH_URL||ST.PUBLIC_BETTER_AUTH_URL||ST.NUXT_PUBLIC_BETTER_AUTH_URL||ST.NUXT_PUBLIC_AUTH_URL||(ST.BASE_URL===`/`?void 0:ST.BASE_URL);if(e)return NT(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&PT(o,`proto`)&&PT(a,`host`))try{return NT(`${o}://${a}`,t)}catch{}if(n){let e=IT(n.url);if(!e)throw new OT(`Could not get origin from request. Please provide a valid base URL.`);return NT(e,t)}if(typeof window<`u`&&window.location)return NT(window.location.origin,t)}function IT(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var LT={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},RT=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,zT={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},BT=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function VT(e){return e instanceof Date&&!isNaN(e.getTime())}function HT(e){let t=BT.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return VT(f)?f:null}function UT(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim(),s=o.toLowerCase();if(s.length<=9&&s in zT)return zT[s];if(!RT.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(LT).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t)r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);else{if(a&&typeof t==`string`){let e=HT(t);if(e)return e}return i?i(e,t):t}})}catch(t){if(n)throw t;return e}}function WT(e,t={strict:!0}){return UT(e,t)}var GT=[`javascript:`,`data:`,`vbscript:`];function KT(e){let t;try{t=new URL(e)}catch{return!0}return!GT.includes(t.protocol)}var qT={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&KT(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},JT=[],YT=0,XT=null,ZT=4,QT=globalThis.nanostoresGlobal||={epoch:0},$T=()=>{let e,t;for(;YT<JT.length;){t=YT,YT+=ZT;let n=XT?.get(JT[t]);if(n){if(!n.has(JT[t+1]))continue;n.clear()}try{JT[t](JT[t+1].value,JT[t+2],JT[t+3])}catch(t){e=t}}if(JT.length=YT=0,e)throw e},eE=e=>{let t=[],n={eq:Object.is,get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{XT?.get(e)?.delete(n);for(let t=YT;t<JT.length;)JT[t]===e&&JT[t+1]===n?JT.splice(t,ZT):t+=ZT;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){QT.epoch++;let i=!JT.length&&!0;for(let i of t)JT.push(i,n,e,r);i&&$T()},off(){},set(e){let t=n.value;n.eq(t,e)||(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},tE=2,nE=5,rE=6,iE=10,aE=(e,t,n,r)=>(e.events=e.events||{},e.events[n+iE]||(e.events[n+iE]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);~i&&(r.splice(i,1),r.length||(e.events[n+iE](),delete e.events[n+iE]))}),oE=(e,t)=>aE(e,t,tE,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),sE=1e3,cE=(e,t)=>aE(e,n=>{let r=t(n);r&&e.events[rE].push(r)},nE,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[rE]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[rE])t();e.events[rE]=[]}},sE)},()=>{e.listen=n,e.off=r}});function lE(e,t){let n=dE(t),r=e;for(let e of n){if(r==null)return;r=r[e]}return r}var uE=/(.*)\[(\d+)\]/;function dE(e){return e.split(`.`).flatMap(e=>fE(e))}function fE(e){if(uE.test(e)){let[,t,n]=e.match(uE);return[...fE(t),n]}return[e]}function pE(e,t,n){let r=new Set(t);return e.listen((i,a,o)=>{let s=e=>!Object.is(lE(i,e),lE(a,e));(o===void 0?t.some(t=>a===void 0||(e.eqKey?!e.eqKey(a[t],i[t],t):s(t))):r.has(o)||typeof o==`string`&&(r.has(o.split(/\.|\[/)[0])||!e.eqKey&&a!==void 0&&t.some(s)))&&n(i,a,o)})}function mE(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function hE(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!hE(e[n],t[n]))return!1;return!0}if(mE(e)&&mE(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!(r in t)||!hE(e[r],t[r]))return!1;return!0}return!1}function gE(e,t){return oE(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var _E=Symbol.for(`better-auth:auth-query`);function vE(e){return _E in e&&e[_E]===!0}function yE(e){let t=eE(e);return Object.defineProperty(t,_E,{value:!0}),t}var bE=Symbol.for(`better-auth:broadcast-channel`),xE=()=>Math.floor(Date.now()/1e3),SE=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(typeof window<`u`)try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:xE()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event===`session`&&t?.data&&this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function CE(e=`better-auth.message`){return globalThis[bE]||(globalThis[bE]=new SE(e)),globalThis[bE]}var wE=Symbol.for(`better-auth:focus-manager`),TE=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function EE(){return globalThis[wE]||(globalThis[wE]=new TE),globalThis[wE]}var DE=Symbol.for(`better-auth:online-manager`),OE=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function kE(){return globalThis[DE]||(globalThis[DE]=new OE),globalThis[DE]}var AE=()=>Math.floor(Date.now()/1e3),jE=5;function ME(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||kE().isOnline,u=e=>{if(l()){if(e?.event===`storage`)t();else if(e?.event===`poll`)c.lastSessionRequest=AE(),t();else if(e?.event===`visibilitychange`){if(AE()-c.lastSessionRequest<jE)return;c.lastSessionRequest=AE(),t()}else t()}},d=e=>{CE().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=CE().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=EE().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=kE().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=CE().setup(),c.cleanupFocusSetup=EE().setup(),c.cleanupOnlineSetup=kE().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var NE=()=>typeof window>`u`,PE=sE;function FE(e,t){if(typeof window>`u`)return;let n=e.get();n.data===null&&t!==null&&e.set({...n,data:t,error:null,isPending:!1})}function IE(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function LE(e){return!e||e.session===null&&e.user===null?null:e}function RE(e,t){return hE(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function zE(e,t){let n=eE(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=yE({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});gE(s,RE);let c=async(t,n)=>{let r=s.value;if(s.set({...r,isPending:r.data===null,isRefetching:!0,error:null,refetch:o}),t.aborted)return`aborted`;try{let r=await e(`/get-session`,{method:`GET`,query:n?.query,signal:t});if(t.aborted)return`aborted`;let{data:i,error:a}=IE(r),c=`fresh`;if(i?.needsRefresh)try{let n=await e(`/get-session`,{method:`POST`,signal:t});if(t.aborted)return`aborted`;({data:i,error:a}=IE(n))}catch{if(t.aborted)return`aborted`;c=`stale`}if(a){let e=s.value,t=a?.status===401;return s.set({data:t?null:e.data,error:a,isPending:!1,isRefetching:!1,refetch:o}),`failed`}let l=LE(i),u=s.value,d=u.data!=null&&l!=null&&hE(u.data,l)?u.data:l;return s.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:o}),c}catch(e){if(t.aborted)return`aborted`;let n=s.value;return s.set({data:n.data,error:e,isPending:!1,isRefetching:!1,refetch:o}),`failed`}},l=()=>{let e=s.value.data?.session?.expiresAt,t=e instanceof Date?e.getTime():1/0;return Math.min(Date.now()+PE,t)},u=e=>{i=0,r?.cancel();let t=new AbortController,n={cancel:()=>t.abort(),promise:Promise.resolve().then(()=>t.signal.aborted?`aborted`:c(t.signal,e)),revision:a};r=n;let o=e=>{r===n&&(r=void 0,e===`fresh`&&n.revision===a&&(i=l()))};return n.promise.then(o,()=>o(`failed`)),n.promise.then(()=>void 0)},d=()=>r?.revision===a?r.promise.then(()=>void 0):Date.now()<i?Promise.resolve():u(),f=()=>{};return cE(s,()=>{let e;NE()||(e=setTimeout(()=>{d()},0));let r=ME({fetchSession:u,shouldPollSession:()=>s.value.data!=null,sessionSignal:n,options:t});return r.init(),f=r.broadcastSessionUpdate,()=>{e&&clearTimeout(e),r.cleanup()}}),{session:s,$sessionSignal:n,broadcastSessionUpdate:e=>f(e)}}function BE(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function VE(e,t,n=`.`,r){if(!BE(t))return VE(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:BE(a)&&BE(i[t])?VE(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function HE(e){return(...t)=>t.reduce((t,n)=>VE(t,n,``,e),{})}var UE=HE(),WE=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},GE=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let t=await i.init?.call(i,e.toString(),n);n=t.options||n,e=t.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},KE=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},qE=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function JE(e){if(typeof e==`number`)return new KE({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new KE(e);case`exponential`:return new qE(e);default:throw Error(`Invalid retry strategy`)}}var YE=[`get`,`post`,`put`,`patch`,`delete`];function XE(e){if(!e.startsWith(`@`))return{method:void 0,path:e};let t=e.indexOf(`/`),n=e.slice(1,t===-1?void 0:t);return YE.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var ZE=e=>e===`.`||e===`..`,QE=e=>e.split(`:`).map(e=>encodeURIComponent(e)).join(`:`);function $E(e,t){let n=t.get(e);if(n===void 0)return QE(e);if(ZE(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function eD(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``,{path:o}=XE(e);o!==e&&(e=`/${o}`),a.endsWith(`/`)||(a+=`/`);let[s,c]=e.replace(a,``).split(`?`),l=new URLSearchParams(c);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)l.append(e,n);continue}else n=JSON.stringify(t);l.set(e,n)}let u=new Map;if(r){if(Array.isArray(r)){let e=s.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];u.set(n,String(e))}}else for(let[e,t]of Object.entries(r))u.set(`:${e}`,String(t))}s=s.split(`/`).map(e=>$E(e,u)).join(`/`),s=s.replace(/^\/+/,``);let d=l.toString();return d=d.length>0?`?${d}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${s}${d}`,a):`${a}${s}${d}`}var tD=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},nD=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function rD(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return nD.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function iD(e){try{return JSON.parse(e),!0}catch{return!1}}function aD(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function oD(e){try{return JSON.parse(e)}catch{return e}}function sD(e){return typeof e==`function`}function cD(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&sD(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&sD(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function lD(...e){let t={};for(let n of e)if(n){if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}}return t}async function uD(e){let t=new Headers(lD(e?.headers,await tD(e)));if(!t.has(`content-type`)){let n=dD(e?.body);n&&t.set(`content-type`,n)}return t}function dD(e){return aD(e)?`application/json`:null}function fD(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function pD(e,t){let{body:n}=e;return n?!aD(n)||typeof n==`string`?n:fD(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function mD(e,t){if(t?.method)return t.method.toUpperCase();let{method:n}=XE(e);return n?n.toUpperCase():t?.body?`POST`:`GET`}function hD(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var gD=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function _D(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new gD(n.issues);return n.value}function vD(e){"@babel/helpers - typeof";return vD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vD(e)}function yD(e,t){if(vD(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(vD(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function bD(e){var t=yD(e,`string`);return vD(t)==`symbol`?t:t+``}function xD(e,t,n){return(t=bD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?SD(Object(n),!0).forEach(function(t){xD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var CD=async(e,t)=>{var n;let{hooks:r,url:i,options:a}=await GE(e,t),o=cD(a),s=new AbortController,c=a.signal??s.signal,l=eD(i,a),u=await uD(a),d=pD(a,u),f=mD(i,a),p=$($({},a),{},{url:l,headers:u,body:d,method:f,signal:c});for(let e of r.onRequest)if(e){let t=await e(p);typeof t==`object`&&t&&Object.assign(p,t)}(`pipeTo`in p&&typeof p.pipeTo==`function`||typeof(t==null||(n=t.body)==null?void 0:n.pipe)==`function`)&&(`duplex`in p||(p.duplex=`half`));let{clearTimeout:m}=hD(a,s),h=await o(p.url,p);m();let g={response:h,request:p};for(let e of r.onResponse)if(e){var _;let n=await e($($({},g),{},{response:t!=null&&(_=t.hookOptions)!=null&&_.cloneResponse?h.clone():h}));n instanceof Response?h=n:typeof n==`object`&&n&&(h=n.response)}if(h.ok){if(p.method===`HEAD`)return{data:``,error:null};let e=rD(h),n={data:null,response:h,request:p};if(e===`json`||e===`text`){let e=await h.text();n.data=await(p.jsonParser??oD)(e)}else n.data=await h[e]();p?.output&&p.output&&!p.disableValidation&&(n.data=await _D(p.output,n.data));for(let e of r.onSuccess)if(e){var v;await e($($({},n),{},{response:t!=null&&(v=t.hookOptions)!=null&&v.cloneResponse?h.clone():h}))}return t?.throw?n.data:{data:n.data,error:null}}let y=t?.jsonParser??oD,b=await h.text(),x=iD(b),S=x?await y(b):null,C={response:h,responseText:b,request:p,error:$($({},S),{},{status:h.status,statusText:h.statusText})};for(let e of r.onError)if(e){var w;await e($($({},C),{},{response:t!=null&&(w=t.hookOptions)!=null&&w.cloneResponse?h.clone():h}))}if(t?.retry){let n=JE(t.retry),i=t.retryAttempt??0;if(await n.shouldAttemptRetry(i,h)){for(let e of r.onRetry)e&&await e(g);let a=n.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await CD(e,$($({},t),{},{retryAttempt:i+1}))}}if(t?.throw)throw new WE(h.status,h.statusText,x?S:b);return{data:null,error:$($({},S),{},{status:h.status,statusText:h.statusText})}},wD=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){var r;let i=$($({},n),e.query!==void 0&&{query:$($({},e.query),n?.query)}),a=((r=e.plugins)==null||(r=r.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1))==null?void 0:r.schema)||e.schema;if(a){let r=t;a.config?.prefix&&r.startsWith(a.config.prefix)&&(r=r.replace(a.config.prefix,``),a.config.baseURL&&(t=t.replace(a.config.prefix,a.config.baseURL))),a.config?.baseURL&&r.startsWith(a.config.baseURL)&&(r=r.replace(a.config.baseURL,``)),r.startsWith(`/`)&&r.charAt(1)===`@`&&(r=r.substring(1));let o=a.schema[r];if(o){let{method:a,path:s}=XE(r);a&&(t=t.slice(0,t.length-r.length)+s);let c=n?.headers;if(o.headers&&!n?.disableValidation){let e={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((t,n)=>{e[n.toLowerCase()]=t});else if(typeof n.headers==`object`)for(let[t,r]of Object.entries(n.headers))r!=null&&(e[t.toLowerCase()]=r)}let t=await _D(o.headers,e),r={};for(let[e,n]of Object.entries(t))r[e.toLowerCase()]=n;c=r}let l=o.method??a;if(i=$($($($({},i),l!==void 0&&{method:l}),o.output!==void 0&&{output:o.output}),c!==void 0&&{headers:c}),!n?.disableValidation){if(o.query&&(i.query=await _D(o.query,n?.query),i.query!==null&&typeof i.query==`object`)){let t=$({},e.query);for(let e of Object.keys(t))n?.query&&Object.prototype.hasOwnProperty.call(n.query,e)&&(t[e]=n.query[e]);i.query=$($({},t),i.query)}i=$($({},i),{},{body:o.input?await _D(o.input,n?.body):n?.body,params:o.params?await _D(o.params,n?.params):n?.params})}return{url:t,options:i}}}return $({url:t},(n!==void 0||e.query!==void 0)&&{options:i})}}),TD=e=>{async function t(t,n){let r=$($($({},e),n),{},{headers:lD(e?.headers,n?.headers),plugins:[...e?.plugins||[],wD(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await CD(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await CD(t,r)}return t},ED=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},DD=e=>e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`,OD=(e,t)=>{let n=`credentials`in Request.prototype,r=FT(e?.baseURL,e?.basePath,void 0,t)??ED(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=TD({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?WT(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[qT],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=zE(d,e),h=!1,g=e=>{h||e===null||(h=!0,FE(p,e))},_=e?.plugins||[],v={},y={$sessionSignal:f,session:p},b={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},x=[{signal:`$sessionSignal`,matcher:DD,callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of _)e.getAtoms&&Object.assign(y,e.getAtoms?.(d)),e.pathMethods&&Object.assign(b,e.pathMethods),e.atomListeners&&x.push(...e.atomListeners);let S={notify:e=>{y[e].set(!y[e].get())},listen:(e,t)=>{y[e].subscribe(t)},atoms:y};for(let t of _)t.getActions&&(v=UE(t.getActions?.(d,S,e)??{},v));return{get baseURL(){return r},pluginsActions:v,pluginsAtoms:y,pluginPathMethods:b,atomListeners:x,hydrateSession:g,$sessionSignal:f,$fetch:d,$store:S}};function kD(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function AD(e){return e.charAt(0).toUpperCase()+e.slice(1)}var jD=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,MD=/['\u2019]/g;function ND(e){return e.replace(MD,``).match(jD)??[]}function PD(e){return ND(e).map(e=>e.toLowerCase()).join(`-`)}function FD(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function ID(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||kD(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(PD).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=FD(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function LD(e,t={}){let n=(0,F.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,F.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?pE(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,F.useSyncExternalStore)(a,o,vE(e)?()=>e.init:o)}function RD(e){return`use${AD(e)}`}function zD(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,$store:o,atomListeners:s}=OD(e),c={};for(let[e,t]of Object.entries(r))c[RD(e)]=()=>LD(t);return ID({...n,...c,hydrateSession:i,$fetch:a,$store:o},a,t,r,s)}var BD=e=>`[SonamuProvider] ${e} is not configured. Please provide ${e} configuration to SonamuProvider.`,VD=()=>()=>{throw Error(BD(`uploader`))};function HD(){let e=new Map(Object.entries(yT));return t=>e.get(t)??t}var UD=(0,F.createContext)({uploader:VD(),SD:HD()});function WD({children:e,auth:t,...n}){let r={uploader:n.uploader??VD(),auth:t,SD:n.SD??HD()};return(0,I.jsx)(UD.Provider,{value:r,children:e})}function GD({children:e,authOptions:t,...n}){let[r]=(0,F.useState)(()=>zD(t));return(0,I.jsx)(WD,{...n,auth:n.auth??r,children:e})}function KD({children:e,authOptions:t,...n}){return t===void 0?(0,I.jsx)(WD,{...n,children:e}):(0,I.jsx)(GD,{...n,authOptions:t,children:e})}var qD=e=>Dw(e);function JD({children:e}){return(0,I.jsx)(KD,{SD:qD,children:e})}var YD=T()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:XD});function XD(){let{queryClient:e}=YD.useRouteContext();return(0,I.jsxs)(`html`,{lang:`en`,children:[(0,I.jsxs)(`head`,{children:[(0,I.jsx)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`}),(0,I.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.googleapis.com`}),(0,I.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:``}),(0,I.jsx)(`link`,{href:`https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=DM+Mono:wght@400;500&display=swap`,rel:`stylesheet`}),(0,I.jsx)(D,{})]}),(0,I.jsxs)(`body`,{children:[(0,I.jsx)(`div`,{id:`root`,children:(0,I.jsx)(d,{client:e,children:(0,I.jsx)(JD,{children:(0,I.jsx)(vT,{children:(0,I.jsx)(O,{})})})})}),(0,I.jsx)(j,{})]})]})}var ZD=`modulepreload`,QD=function(e){return`/`+e},$D={},eO=function(e){return e.pathname.endsWith(`.css`)},tO=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},nO=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=QD(t,n);let r=s(t),i=eO(r);return tO($D,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:ZD,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},rO=v(`/`)({component:ee(()=>nO(()=>import(`./routes-_R4-gxLV.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`component`)}),iO=OC(Z({type:Y(),role:Y().optional(),content:SC().optional(),name:Y().optional(),arguments:Y().optional(),call_id:Y().optional(),output:Y().optional()})),aO=OC(Z({mediaType:Y().optional(),data:Y().optional(),url:Y().optional(),byteSize:hC().optional()})),oO=MC([Z({accessToken:Y(),refreshToken:Y(),expiresAt:hC(),accountUuid:Y()}),Z({accessToken:Y(),refreshToken:Y(),idToken:Y().optional(),accessTokenExpiresAt:hC(),idTokenExpiresAt:hC().optional(),accountId:Y(),planType:Y().optional()}),Z({authMode:BC(`oauth`),accessToken:Y(),refreshToken:Y(),expiresAt:Y(),issuer:BC(`https://auth.x.ai`),clientId:Y(),scopes:OC(Y()),userId:Y(),sessionId:Y(),agentId:Y(),subscriptionTier:Y().optional()})]),sO=OC(Z({name:Y(),description:Y().optional(),inputSchema:SC()})),cO=RC([`id-desc`,`id-asc`,`created_at-desc`,`created_at-asc`,`ttft_ms-desc`,`ttft_ms-asc`,`duration_ms-desc`,`duration_ms-asc`,`input_tokens-desc`,`input_tokens-asc`,`output_tokens-desc`,`output_tokens-asc`,`cache_read_tokens-desc`,`cache_read_tokens-asc`,`cache_creation_tokens-desc`,`cache_creation_tokens-asc`,`cost_usd-desc`,`cost_usd-asc`]).describe(`RequestLogOrderBy`),lO=RC([`id`,`token_name`,`user_prompt`]).describe(`RequestLogSearchField`),uO=RC([`running`,`succeeded`,`error`,`aborted`]).describe(`RequestLogStatus`),dO=RC([`generate`,`tool_call`]).describe(`RequestLogStepType`),fO=RC([`id-asc`]).describe(`RequestLogStepOrderBy`),pO=RC([`id`]).describe(`RequestLogStepSearchField`),mO=RC([`key-asc`]).describe(`SettingOrderBy`),hO=RC([`key`]).describe(`SettingSearchField`),gO=RC([`id-desc`,`ord-asc`]).describe(`TokenOrderBy`),_O=RC([`id`,`name`]).describe(`TokenSearchField`);Z({id:X(),created_at:EC(),token_name:Y().max(100).nullable(),project_name:Y().max(50).nullable(),model_name:Y().max(255).nullable(),requested_model_name:Y().max(255).nullable(),fallback_count:X().nullable(),user_prompt:Y().nullable(),system_prompt:Y().nullable(),response:Y(),input_tokens:X(),output_tokens:X(),cache_read_tokens:X(),cache_creation_tokens:X(),cache_creation_5m_tokens:X().nullable(),cache_creation_1h_tokens:X().nullable(),duration_ms:X(),ttft_ms:X(),cost_usd:X().nullable(),cost_source:Y().max(20).nullable(),image_cost_usd:X().nullable(),image_cost_method:Y().max(100).nullable(),service_tier:Y().max(20).nullable(),effort:Y().max(10).nullable(),history:iO.nullable(),input_images:aO.nullable(),tools:sO.nullable(),json_schema:Y().nullable(),status:uO,error_message:Y().nullable(),response_json_ok:vC().nullable(),tool_call_count:X(),is_image_generation:vC(),is_structured:vC()}),Z({id:X(),created_at:EC(),request_log_id:X(),step_index:X(),type:dO,model_name:Y().max(255).nullable(),requested_model_name:Y().max(255).nullable(),fallback_count:X().nullable(),input_tokens:X().nullable(),output_tokens:X().nullable(),cache_read_tokens:X().nullable(),cache_creation_tokens:X().nullable(),cache_creation_5m_tokens:X().nullable(),cache_creation_1h_tokens:X().nullable(),cost_usd:X().nullable(),cost_source:Y().max(20).nullable(),duration_ms:X().nullable(),ttft_ms:X().nullable(),finish_reason:Y().max(20).nullable(),reasoning_text:Y().nullable(),reasoning_tokens:X().nullable(),tool_call_index:X().nullable(),tool_call_id:Y().max(100).nullable(),tool_name:Y().max(100).nullable(),tool_args:Y().nullable(),tool_result:Y().nullable(),tool_duration_ms:X().nullable(),error:Y().nullable()}),Z({id:X(),created_at:EC(),key:Y().max(100),value:Y(),updated_at:EC().nullable()}),Z({id:X(),created_at:EC(),provider:Y().max(20),credentials:oO,name:Y(),active:vC(),reauth_required:vC(),ord:X(),quota_threshold:X().nullable(),weight:X(),keepalive_enabled:vC()});var vO=Z({num:hC().int().nonnegative(),page:hC().int().min(1),search:lO,keyword:Y(),orderBy:cO,queryMode:jw,id:Mw(hC().int().positive()),sonamuFilter:uw(),token_name:Y().max(100).nullable(),project_name:Y().max(50).nullable(),model_name:Y().max(255).nullable()}).partial();Z({num:hC().int().nonnegative(),page:hC().int().min(1),search:pO,keyword:Y(),orderBy:fO,queryMode:jw,id:Mw(hC().int().positive()),sonamuFilter:uw(),request_log_id:X()}).partial(),Z({num:hC().int().nonnegative(),page:hC().int().min(1),search:hO,keyword:Y(),orderBy:mO,queryMode:jw,id:Mw(hC().int().positive()),sonamuFilter:uw(),key:Y().max(100)}).partial(),Z({num:hC().int().nonnegative(),page:hC().int().min(1),search:_O,keyword:Y(),orderBy:gO,queryMode:jw,id:Mw(hC().int().positive()),sonamuFilter:uw()}).partial(),Z({id:X(),created_at:EC(),token_name:Y().max(100).nullable(),project_name:Y().max(50).nullable(),model_name:Y().max(255).nullable(),requested_model_name:Y().max(255).nullable(),fallback_count:X().nullable(),user_prompt:Y().nullable(),system_prompt:Y().nullable(),response:Y(),input_tokens:X(),output_tokens:X(),cache_read_tokens:X(),cache_creation_tokens:X(),cache_creation_5m_tokens:X().nullable(),cache_creation_1h_tokens:X().nullable(),duration_ms:X(),ttft_ms:X(),cost_usd:X().nullable(),cost_source:Y().max(20).nullable(),image_cost_usd:X().nullable(),image_cost_method:Y().max(100).nullable(),effort:Y().max(10).nullable(),service_tier:Y().max(20).nullable(),history:iO.nullable(),input_images:aO.nullable(),tools:sO.nullable(),status:uO,response_json_ok:vC().nullable(),error_message:Y().nullable(),tool_call_count:X(),is_image_generation:vC(),is_structured:vC()}),Z({id:X(),created_at:EC(),token_name:Y().max(100).nullable(),project_name:Y().max(50).nullable(),model_name:Y().max(255).nullable(),requested_model_name:Y().max(255).nullable(),fallback_count:X().nullable(),input_tokens:X(),output_tokens:X(),cache_read_tokens:X(),cache_creation_tokens:X(),cache_creation_5m_tokens:X().nullable(),cache_creation_1h_tokens:X().nullable(),duration_ms:X(),ttft_ms:X(),cost_usd:X().nullable(),cost_source:Y().max(20).nullable(),image_cost_usd:X().nullable(),image_cost_method:Y().max(100).nullable(),effort:Y().max(10).nullable(),service_tier:Y().max(20).nullable(),status:uO,response_json_ok:vC().nullable(),tool_call_count:X(),is_image_generation:vC(),is_structured:vC()}),Z({id:X(),token_name:Y().max(100).nullable(),model_name:Y().max(255).nullable(),input_tokens:X(),output_tokens:X(),cache_read_tokens:X(),cache_creation_tokens:X(),cache_creation_5m_tokens:X().nullable(),cache_creation_1h_tokens:X().nullable(),cost_usd:X().nullable(),cost_source:Y().max(20).nullable()}),RC([`A`,`P`,`C`]),Z({id:X(),created_at:EC(),step_index:X(),type:dO,model_name:Y().max(255).nullable(),requested_model_name:Y().max(255).nullable(),fallback_count:X().nullable(),input_tokens:X().nullable(),output_tokens:X().nullable(),cache_read_tokens:X().nullable(),cache_creation_tokens:X().nullable(),cache_creation_5m_tokens:X().nullable(),cache_creation_1h_tokens:X().nullable(),cost_usd:X().nullable(),cost_source:Y().max(20).nullable(),duration_ms:X().nullable(),ttft_ms:X().nullable(),finish_reason:Y().max(20).nullable(),reasoning_text:Y().nullable(),reasoning_tokens:X().nullable(),tool_call_index:X().nullable(),tool_call_id:Y().max(100).nullable(),tool_name:Y().max(100).nullable(),tool_args:Y().nullable(),tool_result:Y().nullable(),tool_duration_ms:X().nullable(),error:Y().nullable()}),Z({id:X(),created_at:EC(),step_index:X(),type:dO,model_name:Y().max(255).nullable(),requested_model_name:Y().max(255).nullable(),fallback_count:X().nullable(),input_tokens:X().nullable(),output_tokens:X().nullable(),cache_read_tokens:X().nullable(),cache_creation_tokens:X().nullable(),cache_creation_5m_tokens:X().nullable(),cache_creation_1h_tokens:X().nullable(),cost_usd:X().nullable(),cost_source:Y().max(20).nullable(),duration_ms:X().nullable(),ttft_ms:X().nullable(),finish_reason:Y().max(20).nullable(),reasoning_tokens:X().nullable(),tool_call_index:X().nullable(),tool_call_id:Y().max(100).nullable(),tool_name:Y().max(100).nullable(),tool_duration_ms:X().nullable(),error:Y().nullable()}),Z({id:X(),tool_args:Y().nullable()}),RC([`A`,`T`,`I`]),Z({id:X(),created_at:EC(),key:Y().max(100),value:Y(),updated_at:EC().nullable()}),RC([`A`]),Z({id:X(),created_at:EC(),provider:Y().max(20),credentials:oO,name:Y(),active:vC(),reauth_required:vC(),ord:X(),quota_threshold:X().nullable(),weight:X(),keepalive_enabled:vC()}),RC([`A`]);var yO=()=>nO(()=>import(`./logs-DSuoyKRh.js`),__vite__mapDeps([8,1,2,3,6,9,10])),bO=Z({token:Y().optional(),project:Y().optional(),model:Y().optional(),sort:cO.optional(),page:vO.shape.page.default(1)}),xO=v(`/logs`)({validateSearch:bO,component:ee(yO,`component`)}),SO=()=>nO(()=>import(`./monit-BwLPgwHG.js`),__vite__mapDeps([11,1,2,3,5,6,9])),CO=Z({level:RC([`all`,`warn`,`error`]).optional().default(`all`).catch(()=>`all`)}),wO=v(`/monit`)({validateSearch:CO,component:ee(SO,`component`)}),TO=v(`/settings`)({component:ee(()=>nO(()=>import(`./settings-ZBCgAZaZ.js`),__vite__mapDeps([12,1,2,3,7,13])),`component`)}),EO=v(`/tokens`)({component:ee(()=>nO(()=>import(`./tokens-DYSfYz8A.js`),__vite__mapDeps([14,1,2,3,4,5,7,13])),`component`)}),DO=()=>nO(()=>import(`./show-DFFBtBqe.js`),__vite__mapDeps([15,1,2,3,6,10])),OO=Z({id:hC()}),kO=v(`/requests/show`)({validateSearch:OO,component:ee(DO,`component`)}),AO=pw();Z({mediaType:Y().optional(),data:Y().optional(),url:Y().optional(),byteSize:hC().optional()});var jO=AC({text:Y()});MC([Y(),OC(MC([jO,AO])),AO]);var MO={IndexRoute:rO.update({id:`/`,path:`/`,getParentRoute:()=>YD}),LogsRoute:xO.update({id:`/logs`,path:`/logs`,getParentRoute:()=>YD}),MonitRoute:wO.update({id:`/monit`,path:`/monit`,getParentRoute:()=>YD}),SettingsRoute:TO.update({id:`/settings`,path:`/settings`,getParentRoute:()=>YD}),TokensRoute:EO.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>YD}),RequestsShowRoute:kO.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>YD})},NO=YD._addFileChildren(MO)._addFileTypes(),PO=new ce({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),FO=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),Ow):void 0;FO&&ae(PO,FO);var IO=window.__SONAMU_SSR_CONFIG__,LO=g({routeTree:NO,context:{queryClient:PO},defaultPreload:`intent`});(async()=>{await LO.load(),document.documentElement.innerHTML&&FO?IO?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),le.createRoot(document).render((0,I.jsx)(S,{router:LO}))):le.hydrateRoot(document,(0,I.jsx)(S,{router:LO})):le.createRoot(document).render((0,I.jsx)(S,{router:LO}))})(),window.__TANSTACK_QUERY_CLIENT__=PO;export{fe as C,Xo as S,Y as _,Uw as a,ru as b,Bw as c,Aw as d,OC as f,Z as g,hC as h,cO as i,zw as l,AC as m,wO as n,Hw as o,pw as p,xO as r,Vw as s,kO as t,Rw as u,MC as v,eu as x,ou as y};
|