agor-live 0.21.2 → 0.22.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/dist/cli/commands/branch/env/restart.js +1 -1
- package/dist/cli/commands/branch/env/start.js +1 -1
- package/dist/cli/commands/branch/env/stop.js +1 -1
- package/dist/core/api/index.cjs +5 -1
- package/dist/core/api/index.d.ts +6 -1
- package/dist/core/api/index.d.ts.map +1 -1
- package/dist/core/api/index.js +5 -1
- package/dist/core/claude/index.cjs +162 -14
- package/dist/core/claude/index.js +166 -18
- package/dist/core/client/index.cjs +43 -3
- package/dist/core/client/index.js +37 -3
- package/dist/core/config/browser.cjs +2 -2
- package/dist/core/config/browser.js +2 -2
- package/dist/core/config/config-manager.d.ts.map +1 -1
- package/dist/core/config/constants.d.ts +1 -1
- package/dist/core/config/index.cjs +174 -20
- package/dist/core/config/index.js +178 -24
- package/dist/core/config/types.d.ts +8 -0
- package/dist/core/config/types.d.ts.map +1 -1
- package/dist/core/db/index.cjs +495 -86
- package/dist/core/db/index.js +482 -75
- package/dist/core/db/repositories/artifacts.d.ts.map +1 -1
- package/dist/core/db/repositories/branches.d.ts +13 -1
- package/dist/core/db/repositories/branches.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-channels.d.ts.map +1 -1
- package/dist/core/db/repositories/index.d.ts +1 -0
- package/dist/core/db/repositories/index.d.ts.map +1 -1
- package/dist/core/db/repositories/session-relationships.d.ts +30 -0
- package/dist/core/db/repositories/session-relationships.d.ts.map +1 -0
- package/dist/core/db/repositories/users.d.ts +11 -0
- package/dist/core/db/repositories/users.d.ts.map +1 -1
- package/dist/core/db/schema.d.ts +421 -4
- package/dist/core/db/schema.d.ts.map +1 -1
- package/dist/core/db/schema.postgres.d.ts +226 -2
- package/dist/core/db/schema.postgres.d.ts.map +1 -1
- package/dist/core/db/schema.sqlite.d.ts +228 -2
- package/dist/core/db/schema.sqlite.d.ts.map +1 -1
- package/dist/core/drizzle/postgres/0050_artifact_source_session.sql +3 -0
- package/dist/core/drizzle/postgres/0051_session_relationships.sql +26 -0
- package/dist/core/drizzle/postgres/meta/_journal.json +14 -0
- package/dist/core/drizzle/sqlite/0059_artifact_source_session.sql +2 -0
- package/dist/core/drizzle/sqlite/0060_session_relationships.sql +23 -0
- package/dist/core/drizzle/sqlite/meta/_journal.json +14 -0
- package/dist/core/gateway/connector-registry.d.ts.map +1 -1
- package/dist/core/gateway/connector.d.ts +22 -0
- package/dist/core/gateway/connector.d.ts.map +1 -1
- package/dist/core/gateway/connectors/slack.d.ts +35 -3
- package/dist/core/gateway/connectors/slack.d.ts.map +1 -1
- package/dist/core/gateway/connectors/teams.d.ts +107 -0
- package/dist/core/gateway/connectors/teams.d.ts.map +1 -0
- package/dist/core/gateway/context.d.ts.map +1 -1
- package/dist/core/gateway/index.cjs +552 -52
- package/dist/core/gateway/index.d.ts +3 -2
- package/dist/core/gateway/index.d.ts.map +1 -1
- package/dist/core/gateway/index.js +544 -52
- package/dist/core/gateway/system-message.d.ts +21 -0
- package/dist/core/gateway/system-message.d.ts.map +1 -1
- package/dist/core/index.cjs +616 -127
- package/dist/core/index.js +597 -116
- package/dist/core/mcp/index.cjs +146 -9
- package/dist/core/mcp/index.js +146 -9
- package/dist/core/mcp/template-resolver.d.ts.map +1 -1
- package/dist/core/seed/index.cjs +375 -59
- package/dist/core/seed/index.js +378 -62
- package/dist/core/sessions/index.cjs +19 -0
- package/dist/core/sessions/index.js +19 -0
- package/dist/core/templates/agor-system-prompt.md +21 -53
- package/dist/core/templates/session-context.cjs +2 -73
- package/dist/core/templates/session-context.d.ts +9 -53
- package/dist/core/templates/session-context.d.ts.map +1 -1
- package/dist/core/templates/session-context.js +2 -72
- package/dist/core/tools/mcp/jwt-auth.cjs +2 -20
- package/dist/core/tools/mcp/jwt-auth.d.ts.map +1 -1
- package/dist/core/tools/mcp/jwt-auth.js +2 -20
- package/dist/core/tools/mcp/oauth-mcp-transport.cjs +2 -15
- package/dist/core/tools/mcp/oauth-mcp-transport.d.ts.map +1 -1
- package/dist/core/tools/mcp/oauth-mcp-transport.js +2 -15
- package/dist/core/tools/mcp/oauth-refresh.cjs +167 -19
- package/dist/core/tools/mcp/oauth-refresh.js +167 -19
- package/dist/core/types/artifact.d.ts +5 -1
- package/dist/core/types/artifact.d.ts.map +1 -1
- package/dist/core/types/branch.d.ts +14 -0
- package/dist/core/types/branch.d.ts.map +1 -1
- package/dist/core/types/gateway.d.ts +1 -1
- package/dist/core/types/gateway.d.ts.map +1 -1
- package/dist/core/types/id.d.ts +1 -0
- package/dist/core/types/id.d.ts.map +1 -1
- package/dist/core/types/index.cjs +36 -0
- package/dist/core/types/index.js +30 -0
- package/dist/core/types/session.d.ts +65 -1
- package/dist/core/types/session.d.ts.map +1 -1
- package/dist/core/types/task.d.ts +9 -0
- package/dist/core/types/task.d.ts.map +1 -1
- package/dist/core/unix/index.cjs +371 -55
- package/dist/core/unix/index.js +374 -58
- package/dist/core/unix/unix-integration-service.d.ts +10 -7
- package/dist/core/unix/unix-integration-service.d.ts.map +1 -1
- package/dist/core/utils/permission-mode-mapper.cjs +19 -0
- package/dist/core/utils/permission-mode-mapper.js +19 -0
- package/dist/daemon/declarations.d.ts +7 -0
- package/dist/daemon/declarations.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.js +53 -1
- package/dist/daemon/index.js +3760 -2107
- package/dist/daemon/main.js +3760 -2107
- package/dist/daemon/mcp/server.js +155 -17
- package/dist/daemon/mcp/tools/analytics.js +6 -7
- package/dist/daemon/mcp/tools/artifacts.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/artifacts.js +7 -7
- package/dist/daemon/mcp/tools/boards.js +6 -7
- package/dist/daemon/mcp/tools/branches.js +6 -7
- package/dist/daemon/mcp/tools/card-types.js +6 -7
- package/dist/daemon/mcp/tools/cards.js +6 -7
- package/dist/daemon/mcp/tools/environment.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/environment.js +19 -12
- package/dist/daemon/mcp/tools/knowledge.js +6 -7
- package/dist/daemon/mcp/tools/mcp-servers.js +6 -7
- package/dist/daemon/mcp/tools/messages.js +6 -7
- package/dist/daemon/mcp/tools/proxies.js +6 -7
- package/dist/daemon/mcp/tools/repos.js +6 -7
- package/dist/daemon/mcp/tools/schedules.js +6 -7
- package/dist/daemon/mcp/tools/search.js +6 -7
- package/dist/daemon/mcp/tools/sessions.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/sessions.js +140 -11
- package/dist/daemon/mcp/tools/tasks.js +6 -7
- package/dist/daemon/mcp/tools/users.js +6 -7
- package/dist/daemon/mcp/tools/widgets.js +7 -8
- package/dist/daemon/register-hooks.d.ts +5 -1
- package/dist/daemon/register-hooks.d.ts.map +1 -1
- package/dist/daemon/register-hooks.js +404 -179
- package/dist/daemon/register-routes.d.ts.map +1 -1
- package/dist/daemon/register-routes.js +360 -162
- package/dist/daemon/register-services.d.ts.map +1 -1
- package/dist/daemon/register-services.js +1928 -671
- package/dist/daemon/services/artifacts.d.ts +10 -1
- package/dist/daemon/services/artifacts.d.ts.map +1 -1
- package/dist/daemon/services/artifacts.js +25 -1
- package/dist/daemon/services/branches.d.ts +11 -1
- package/dist/daemon/services/branches.d.ts.map +1 -1
- package/dist/daemon/services/branches.js +470 -184
- package/dist/daemon/services/claude-models.js +879 -339
- package/dist/daemon/services/gateway.d.ts +58 -2
- package/dist/daemon/services/gateway.d.ts.map +1 -1
- package/dist/daemon/services/gateway.js +590 -47
- package/dist/daemon/services/groups.d.ts +2 -0
- package/dist/daemon/services/groups.d.ts.map +1 -1
- package/dist/daemon/services/groups.js +56 -0
- package/dist/daemon/services/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/services/mcp-servers.js +0 -6
- package/dist/daemon/services/scheduler.d.ts.map +1 -1
- package/dist/daemon/services/scheduler.js +6 -2
- package/dist/daemon/services/sessions.d.ts +11 -3
- package/dist/daemon/services/sessions.d.ts.map +1 -1
- package/dist/daemon/services/sessions.js +68 -7
- package/dist/daemon/services/tasks.d.ts +13 -2
- package/dist/daemon/services/tasks.d.ts.map +1 -1
- package/dist/daemon/services/tasks.js +42 -26
- package/dist/daemon/startup.js +6 -2
- package/dist/daemon/utils/session-stop.d.ts +43 -0
- package/dist/daemon/utils/session-stop.d.ts.map +1 -0
- package/dist/daemon/utils/session-stop.js +102 -0
- package/dist/daemon/utils/session-task-state.d.ts +7 -2
- package/dist/daemon/utils/session-task-state.d.ts.map +1 -1
- package/dist/daemon/utils/session-task-state.js +9 -3
- package/dist/daemon/utils/session-tasks.d.ts +4 -4
- package/dist/daemon/utils/session-tasks.d.ts.map +1 -1
- package/dist/daemon/utils/session-tasks.js +4 -8
- package/dist/executor/commands/environment.d.ts +13 -0
- package/dist/executor/commands/environment.d.ts.map +1 -0
- package/dist/executor/commands/environment.js +287 -0
- package/dist/executor/commands/index.d.ts.map +1 -1
- package/dist/executor/commands/index.js +5 -1
- package/dist/executor/commands/unix.d.ts +8 -1
- package/dist/executor/commands/unix.d.ts.map +1 -1
- package/dist/executor/commands/unix.js +157 -2
- package/dist/executor/payload-types.d.ts +201 -5
- package/dist/executor/payload-types.d.ts.map +1 -1
- package/dist/executor/payload-types.js +98 -0
- package/dist/executor/sdk-handlers/base/mcp-scoping.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/base/mcp-scoping.js +14 -0
- package/dist/executor/sdk-handlers/claude/message-processor.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/message-processor.js +0 -1
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts +1 -0
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/query-builder.js +91 -39
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts +12 -5
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +72 -30
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts +2 -4
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/prompt-service.js +4 -13
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts +2 -4
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/prompt-service.js +4 -13
- package/dist/ui/assets/App-DcEY8Ota.js +3 -0
- package/dist/ui/assets/App-DcEY8Ota.js.gz +0 -0
- package/dist/ui/assets/{ArtifactConsentModal-ParNk5kW.js → ArtifactConsentModal-CiCbK9iv.js} +1 -1
- package/dist/ui/assets/ArtifactConsentModal-CiCbK9iv.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js +9 -0
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js +18 -0
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js +34 -0
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js.gz +0 -0
- package/dist/ui/assets/{CodeEditor.inner-D51Z_CLQ.js → CodeEditor.inner-DBgsP4tn.js} +2 -2
- package/dist/ui/assets/CodeEditor.inner-DBgsP4tn.js.gz +0 -0
- package/dist/ui/assets/ConversationView-CUWR0gR6.js +1 -0
- package/dist/ui/assets/ConversationView-CUWR0gR6.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js +24 -0
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js.gz +0 -0
- package/dist/ui/assets/MarketingScreenshotPage-9Qd7eZsm.css +1 -0
- package/dist/ui/assets/MarketingScreenshotPage-zv5RUCuV.js +143 -0
- package/dist/ui/assets/MarketingScreenshotPage-zv5RUCuV.js.gz +0 -0
- package/dist/ui/assets/MobileApp-VgVnsnsN.js +1 -0
- package/dist/ui/assets/MobileApp-VgVnsnsN.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js +20 -0
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js.gz +0 -0
- package/dist/ui/assets/{App-BAdBsEnV.css → SessionCanvas-mEmYGZhC.css} +1 -1
- package/dist/ui/assets/SessionCanvas-mEmYGZhC.css.gz +0 -0
- package/dist/ui/assets/{StreamdownDemoPage-B9wbgp2s.js → StreamdownDemoPage-wzWaqWwr.js} +1 -1
- package/dist/ui/assets/StreamdownDemoPage-wzWaqWwr.js.gz +0 -0
- package/dist/ui/assets/{ThemeSwitcher-ubn6IOz9.js → ThemeSwitcher-Dly2y9pi.js} +1 -1
- package/dist/ui/assets/ThemeSwitcher-Dly2y9pi.js.gz +0 -0
- package/dist/ui/assets/antd-CfbbHJOz.js +401 -0
- package/dist/ui/assets/antd-CfbbHJOz.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-CykGFbQU.js +1 -0
- package/dist/ui/assets/{architectureDiagram-VXUJARFQ-ChmZt3zk.js → architectureDiagram-VXUJARFQ-C8HXAenz.js} +1 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-C8HXAenz.js.gz +0 -0
- package/dist/ui/assets/{blockDiagram-VD42YOAC-CzGHAHao.js → blockDiagram-VD42YOAC-BhZaEN19.js} +1 -1
- package/dist/ui/assets/blockDiagram-VD42YOAC-BhZaEN19.js.gz +0 -0
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-DscJyaWN.js → c4Diagram-YG6GDRKO-Dk_UH-sY.js} +1 -1
- package/dist/ui/assets/c4Diagram-YG6GDRKO-Dk_UH-sY.js.gz +0 -0
- package/dist/ui/assets/channel-D6_nUWlW.js +1 -0
- package/dist/ui/assets/{chunk-4BX2VUAB-DoWpTvP8.js → chunk-4BX2VUAB-XprbG2TG.js} +1 -1
- package/dist/ui/assets/chunk-55IACEB6-ByzqIgSb.js +1 -0
- package/dist/ui/assets/{chunk-ABZYJK2D-RzDCrjE6.js → chunk-ABZYJK2D-BJcrryHK.js} +1 -1
- package/dist/ui/assets/chunk-ABZYJK2D-BJcrryHK.js.gz +0 -0
- package/dist/ui/assets/{chunk-AGHRB4JF-jidCS5Of.js → chunk-AGHRB4JF-DvxmfbM0.js} +1 -1
- package/dist/ui/assets/chunk-AGHRB4JF-DvxmfbM0.js.gz +0 -0
- package/dist/ui/assets/{chunk-ATLVNIR6-BEIIfJtC.js → chunk-ATLVNIR6-DbeJ0OrR.js} +1 -1
- package/dist/ui/assets/chunk-ATLVNIR6-DbeJ0OrR.js.gz +0 -0
- package/dist/ui/assets/{chunk-B4BG7PRW-B8b6dQQ2.js → chunk-B4BG7PRW-C53q2ggf.js} +1 -1
- package/dist/ui/assets/chunk-B4BG7PRW-C53q2ggf.js.gz +0 -0
- package/dist/ui/assets/{chunk-CVBHYZKI-D-mQAfrk.js → chunk-CVBHYZKI-B3EBSlb3.js} +1 -1
- package/dist/ui/assets/{chunk-DI55MBZ5-BfATX3V8.js → chunk-DI55MBZ5-vIyNEQN-.js} +1 -1
- package/dist/ui/assets/chunk-DI55MBZ5-vIyNEQN-.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-B3ObkuOm.js +1 -0
- package/dist/ui/assets/{chunk-FMBD7UC4-fqXscNvc.js → chunk-FMBD7UC4-rddmfK-Z.js} +1 -1
- package/dist/ui/assets/{chunk-HN2XXSSU-BCHvD80g.js → chunk-HN2XXSSU-Dttqcg3b.js} +1 -1
- package/dist/ui/assets/chunk-HN2XXSSU-Dttqcg3b.js.gz +0 -0
- package/dist/ui/assets/{chunk-JA3XYJ7Z-Cp6dqHnY.js → chunk-JA3XYJ7Z-DbNDev3D.js} +1 -1
- package/dist/ui/assets/chunk-JA3XYJ7Z-DbNDev3D.js.gz +0 -0
- package/dist/ui/assets/{chunk-JZLCHNYA-cKMooY3y.js → chunk-JZLCHNYA-EUmx2y4H.js} +1 -1
- package/dist/ui/assets/chunk-JZLCHNYA-EUmx2y4H.js.gz +0 -0
- package/dist/ui/assets/{chunk-MI3HLSF2-BlzO5wOE.js → chunk-MI3HLSF2-65n9Mkyc.js} +1 -1
- package/dist/ui/assets/chunk-MI3HLSF2-65n9Mkyc.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js +2 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js.gz +0 -0
- package/dist/ui/assets/{chunk-QN33PNHL-DIHGQ_pd.js → chunk-QN33PNHL-DsRKK6NR.js} +1 -1
- package/dist/ui/assets/{chunk-QXUST7PY-C9l0muI0.js → chunk-QXUST7PY-BCYnMiS3.js} +1 -1
- package/dist/ui/assets/chunk-QXUST7PY-BCYnMiS3.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-HucAw4xW.js +1 -0
- package/dist/ui/assets/{chunk-S3R3BYOJ-VJiLzt2o.js → chunk-S3R3BYOJ-CWMEa9Dc.js} +1 -1
- package/dist/ui/assets/chunk-S3R3BYOJ-CWMEa9Dc.js.gz +0 -0
- package/dist/ui/assets/{chunk-TZMSLE5B-DZwI0C_2.js → chunk-TZMSLE5B-BuQUQcTr.js} +1 -1
- package/dist/ui/assets/chunk-TZMSLE5B-BuQUQcTr.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-CUT3rPTB.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-CUT3rPTB.js +1 -0
- package/dist/ui/assets/{cose-bilkent-S5V4N54A-Ipik-oSD.js → cose-bilkent-S5V4N54A-CnPB3ARO.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-CnPB3ARO.js.gz +0 -0
- package/dist/ui/assets/cursor-QEb7m-rN.png +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-BDpyWQnh.js → dagre-6UL2VRFP-DhS-k_Se.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-DhS-k_Se.js.gz +0 -0
- package/dist/ui/assets/{dagre-CgA4KhUX.js → dagre-KgLoHEuy.js} +1 -1
- package/dist/ui/assets/dagre-KgLoHEuy.js.gz +0 -0
- package/dist/ui/assets/{diagram-PSM6KHXK-B4GRzxLJ.js → diagram-PSM6KHXK-BZg3MJmb.js} +1 -1
- package/dist/ui/assets/diagram-PSM6KHXK-BZg3MJmb.js.gz +0 -0
- package/dist/ui/assets/{diagram-QEK2KX5R-BWPW28XI.js → diagram-QEK2KX5R-BPCitvbo.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-BPCitvbo.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-BIHhcGoV.js → diagram-S2PKOQOG-NW4uK6sx.js} +1 -1
- package/dist/ui/assets/diagram-S2PKOQOG-NW4uK6sx.js.gz +0 -0
- package/dist/ui/assets/{editor-C-HJ7Yw0.js → editor-CzFWIUw2.js} +1 -1
- package/dist/ui/assets/editor-CzFWIUw2.js.gz +0 -0
- package/dist/ui/assets/{emoji-D8F6B62m.js → emoji-Dkz4Zzv_.js} +1 -1
- package/dist/ui/assets/emoji-Dkz4Zzv_.js.gz +0 -0
- package/dist/ui/assets/{erDiagram-Q2GNP2WA-ubTaAFcK.js → erDiagram-Q2GNP2WA-me1fboaf.js} +1 -1
- package/dist/ui/assets/erDiagram-Q2GNP2WA-me1fboaf.js.gz +0 -0
- package/dist/ui/assets/{flowDiagram-NV44I4VS-BHLCTYjI.js → flowDiagram-NV44I4VS-DzE8dGsh.js} +1 -1
- package/dist/ui/assets/flowDiagram-NV44I4VS-DzE8dGsh.js.gz +0 -0
- package/dist/ui/assets/{ganttDiagram-LVOFAZNH-ClC3pay1.js → ganttDiagram-LVOFAZNH-CFQD09Mi.js} +2 -2
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CFQD09Mi.js.gz +0 -0
- package/dist/ui/assets/{gitGraph-F6HP7TQM-DghoobE6.js → gitGraph-F6HP7TQM-CfFE_uAC.js} +1 -1
- package/dist/ui/assets/{gitGraphDiagram-NY62KEGX-Clqpiswu.js → gitGraphDiagram-NY62KEGX-CaVoxU4C.js} +1 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CaVoxU4C.js.gz +0 -0
- package/dist/ui/assets/index-BN5_Qq7R.js +324 -0
- package/dist/ui/assets/index-BN5_Qq7R.js.gz +0 -0
- package/dist/ui/assets/index-DxuPq13l.css +1 -0
- package/dist/ui/assets/index-DxuPq13l.css.gz +0 -0
- package/dist/ui/assets/{info-NVLQJR56-0ZldEXPQ.js → info-NVLQJR56-i_xHYg3f.js} +1 -1
- package/dist/ui/assets/{infoDiagram-ER5ION4S-DMmPX-il.js → infoDiagram-ER5ION4S-2NL93b78.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-CrVickA2.js → journeyDiagram-XKPGCS4Q-CZF-2DHU.js} +1 -1
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CZF-2DHU.js.gz +0 -0
- package/dist/ui/assets/{kanban-definition-3W4ZIXB7-C_BsdHYL.js → kanban-definition-3W4ZIXB7-CfvJIOny.js} +1 -1
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-CfvJIOny.js.gz +0 -0
- package/dist/ui/assets/{line-CfBP7Yic.js → line-DDv8kOJk.js} +1 -1
- package/dist/ui/assets/{linear-BsjageUB.js → linear-Daef-l29.js} +1 -1
- package/dist/ui/assets/linear-Daef-l29.js.gz +0 -0
- package/dist/ui/assets/{mermaid-parser.core-DZdP-NFq.js → mermaid-parser.core-CdK9QgYV.js} +2 -2
- package/dist/ui/assets/mermaid-parser.core-CdK9QgYV.js.gz +0 -0
- package/dist/ui/assets/{mermaid.core-TNrI0pHG.js → mermaid.core-D6GS9mU-.js} +3 -3
- package/dist/ui/assets/mermaid.core-D6GS9mU-.js.gz +0 -0
- package/dist/ui/assets/message-SqLqNYcv.js +36 -0
- package/dist/ui/assets/message-SqLqNYcv.js.gz +0 -0
- package/dist/ui/assets/{mindmap-definition-VGOIOE7T-BbmaUjMY.js → mindmap-definition-VGOIOE7T-Cb3QMflX.js} +1 -1
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-Cb3QMflX.js.gz +0 -0
- package/dist/ui/assets/{packet-BFZMPI3H-D_ZhkXuT.js → packet-BFZMPI3H-Bm2uwz4i.js} +1 -1
- package/dist/ui/assets/{particles-Dv28pjOd.js → particles-DsJFOarW.js} +1 -1
- package/dist/ui/assets/particles-DsJFOarW.js.gz +0 -0
- package/dist/ui/assets/{pie-7BOR55EZ-Dn0Q3qNx.js → pie-7BOR55EZ-5i17tVnF.js} +1 -1
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-BbyjfYu8.js → pieDiagram-ADFJNKIX-BxIwQWvw.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-BxIwQWvw.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-Bc3GqMKz.js → quadrantDiagram-AYHSOK5B-B5HPe4ga.js} +1 -1
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-B5HPe4ga.js.gz +0 -0
- package/dist/ui/assets/{radar-NHE76QYJ-BHwoAy1q.js → radar-NHE76QYJ-BTn-tq0k.js} +1 -1
- package/dist/ui/assets/{reactflow-BVYPxNhc.js → reactflow-Bf74ngoo.js} +2 -2
- package/dist/ui/assets/reactflow-Bf74ngoo.js.gz +0 -0
- package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-BQaKKL09.js → requirementDiagram-UZGBJVZJ-YfI6llkX.js} +1 -1
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-YfI6llkX.js.gz +0 -0
- package/dist/ui/assets/{sandpack-BQW_FQ7G.js → sandpack-D7koO5op.js} +1 -1
- package/dist/ui/assets/sandpack-D7koO5op.js.gz +0 -0
- package/dist/ui/assets/{sankeyDiagram-TZEHDZUN-DiJvDvhb.js → sankeyDiagram-TZEHDZUN-DOk_B10B.js} +1 -1
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DOk_B10B.js.gz +0 -0
- package/dist/ui/assets/{sequenceDiagram-WL72ISMW-Dw32824o.js → sequenceDiagram-WL72ISMW-DAe4Um17.js} +1 -1
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DAe4Um17.js.gz +0 -0
- package/dist/ui/assets/{stateDiagram-FKZM4ZOC-BCOpNdHV.js → stateDiagram-FKZM4ZOC-CCesDu_C.js} +1 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-CCesDu_C.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-CMlIrsoO.js +1 -0
- package/dist/ui/assets/{syntax-VJrU5BEu.js → syntax-C-M-8jOU.js} +1 -1
- package/dist/ui/assets/syntax-C-M-8jOU.js.gz +0 -0
- package/dist/ui/assets/{theme-DZtFA8b4.js → theme-BQZdiqwv.js} +1 -1
- package/dist/ui/assets/{timeline-definition-IT6M3QCI-Jh_WZzXv.js → timeline-definition-IT6M3QCI-D6P5txjT.js} +1 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-D6P5txjT.js.gz +0 -0
- package/dist/ui/assets/{treemap-KMMF4GRG-CPYIgjxE.js → treemap-KMMF4GRG-Bitm3gy4.js} +1 -1
- package/dist/ui/assets/{knowledgeRoutes-CivaUqha.js → useUserLocalStorage-Ckb8HsIw.js} +1 -1
- package/dist/ui/assets/useUserLocalStorage-Ckb8HsIw.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-CERc7Rdb.js → xychartDiagram-PRI3JC2R-CsybjUbd.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-CsybjUbd.js.gz +0 -0
- package/dist/ui/index.html +13 -11
- package/dist/ui/index.html.gz +0 -0
- package/package.json +10 -9
- package/dist/ui/assets/App-9s2WHM6S.js +0 -22
- package/dist/ui/assets/App-9s2WHM6S.js.gz +0 -0
- package/dist/ui/assets/App-BAdBsEnV.css.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-ParNk5kW.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-VQxLMCiN.js +0 -9
- package/dist/ui/assets/ArtifactFullscreenPage-VQxLMCiN.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-3RchrIgk.js +0 -18
- package/dist/ui/assets/AutocompleteTextarea-3RchrIgk.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-D51Z_CLQ.js.gz +0 -0
- package/dist/ui/assets/ConversationView-Dyddw2b1.js +0 -34
- package/dist/ui/assets/ConversationView-Dyddw2b1.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-CdftslnF.js +0 -24
- package/dist/ui/assets/KnowledgePage-CdftslnF.js.gz +0 -0
- package/dist/ui/assets/MobileApp-BdBMpnJ1.js +0 -1
- package/dist/ui/assets/MobileApp-BdBMpnJ1.js.gz +0 -0
- package/dist/ui/assets/StreamdownDemoPage-B9wbgp2s.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-ubn6IOz9.js.gz +0 -0
- package/dist/ui/assets/antd-C-HfEC4E.js +0 -400
- package/dist/ui/assets/antd-C-HfEC4E.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-dkBewUpN.js +0 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-ChmZt3zk.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-CzGHAHao.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-DscJyaWN.js.gz +0 -0
- package/dist/ui/assets/channel-DvRQqEqC.js +0 -1
- package/dist/ui/assets/chunk-55IACEB6-DojF2pZN.js +0 -1
- package/dist/ui/assets/chunk-ABZYJK2D-RzDCrjE6.js.gz +0 -0
- package/dist/ui/assets/chunk-AGHRB4JF-jidCS5Of.js.gz +0 -0
- package/dist/ui/assets/chunk-ATLVNIR6-BEIIfJtC.js.gz +0 -0
- package/dist/ui/assets/chunk-B4BG7PRW-B8b6dQQ2.js.gz +0 -0
- package/dist/ui/assets/chunk-DI55MBZ5-BfATX3V8.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-BKt6lPJM.js +0 -1
- package/dist/ui/assets/chunk-HN2XXSSU-BCHvD80g.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-Cp6dqHnY.js.gz +0 -0
- package/dist/ui/assets/chunk-JZLCHNYA-cKMooY3y.js.gz +0 -0
- package/dist/ui/assets/chunk-MI3HLSF2-BlzO5wOE.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-pASDorUx.js +0 -2
- package/dist/ui/assets/chunk-N4CR4FBY-pASDorUx.js.gz +0 -0
- package/dist/ui/assets/chunk-QXUST7PY-C9l0muI0.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-CZskCFCf.js +0 -1
- package/dist/ui/assets/chunk-S3R3BYOJ-VJiLzt2o.js.gz +0 -0
- package/dist/ui/assets/chunk-TZMSLE5B-DZwI0C_2.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-BFASUbmZ.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-BFASUbmZ.js +0 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-Ipik-oSD.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-BDpyWQnh.js.gz +0 -0
- package/dist/ui/assets/dagre-CgA4KhUX.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-B4GRzxLJ.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-BWPW28XI.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-BIHhcGoV.js.gz +0 -0
- package/dist/ui/assets/editor-C-HJ7Yw0.js.gz +0 -0
- package/dist/ui/assets/emoji-D8F6B62m.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-ubTaAFcK.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-BHLCTYjI.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-ClC3pay1.js.gz +0 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-Clqpiswu.js.gz +0 -0
- package/dist/ui/assets/index-D9OElx9A.css +0 -1
- package/dist/ui/assets/index-D9OElx9A.css.gz +0 -0
- package/dist/ui/assets/index-DxPuzG7E.js +0 -350
- package/dist/ui/assets/index-DxPuzG7E.js.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CrVickA2.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-C_BsdHYL.js.gz +0 -0
- package/dist/ui/assets/knowledgeRoutes-CivaUqha.js.gz +0 -0
- package/dist/ui/assets/linear-BsjageUB.js.gz +0 -0
- package/dist/ui/assets/mermaid-parser.core-DZdP-NFq.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-TNrI0pHG.js.gz +0 -0
- package/dist/ui/assets/message-BtWWJ9Af.js +0 -36
- package/dist/ui/assets/message-BtWWJ9Af.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-BbmaUjMY.js.gz +0 -0
- package/dist/ui/assets/particles-Dv28pjOd.js.gz +0 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-BbyjfYu8.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-Bc3GqMKz.js.gz +0 -0
- package/dist/ui/assets/reactflow-BVYPxNhc.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-BQaKKL09.js.gz +0 -0
- package/dist/ui/assets/sandpack-BQW_FQ7G.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DiJvDvhb.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-Dw32824o.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BCOpNdHV.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-Cuqwvgfg.js +0 -1
- package/dist/ui/assets/syntax-VJrU5BEu.js.gz +0 -0
- package/dist/ui/assets/timeline-definition-IT6M3QCI-Jh_WZzXv.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-CERc7Rdb.js.gz +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lib-Bxexpjv9.js","assets/rolldown-runtime--c01j_DQ.js","assets/__vite-browser-external-BBPYNvOp.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e,r as t,t as n}from"./rolldown-runtime--c01j_DQ.js";import{Fn as r,Ln as i,Pt as a,Xn as o,jt as s,mt as c,on as l}from"./antd-C-HfEC4E.js";import{i as u,n as d,r as f,t as p}from"./__vite-browser-external-BBPYNvOp.js";import{c as m}from"./sandpack-BQW_FQ7G.js";import{N as h}from"./editor-C-HJ7Yw0.js";var g=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StorageWrapper=e.MemoryStorage=void 0,e.MemoryStorage=class{constructor(){this.store={}}getItem(e){return Promise.resolve(this.store[e])}setItem(e,t){return Promise.resolve(this.store[e]=t)}removeItem(e){let t=this.store[e];return delete this.store[e],Promise.resolve(t)}},e.StorageWrapper=class{constructor(e){this.storage=e}getItem(e){return Promise.resolve(this.storage?.getItem(e))}setItem(e,t){return Promise.resolve(this.storage?.setItem(e,t))}removeItem(e){return Promise.resolve(this.storage?.removeItem(e))}}})),_=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationClient=void 0;var t=u(),n=g(),r=class extends t.FeathersError{constructor(e,t){super(e,`OauthError`,401,`oauth-error`,t)}},i=(e,t)=>{let n=RegExp(`(?:\&?)${t}=([^&]*)`),r=e.hash?e.hash.match(n):null;if(r!==null){let[,e]=r;return[e,n]}return[null,n]};e.AuthenticationClient=class{constructor(e,t){let r=e.io,i=new n.StorageWrapper(e.get(`storage`)||t.storage);this.app=e,this.options=t,this.authenticated=!1,this.app.set(`storage`,i),r&&this.handleSocket(r)}get service(){return this.app.service(this.options.path)}get storage(){return this.app.get(`storage`)}handleSocket(e){e.on(`disconnect`,()=>{this.authenticated&&this.reAuthenticate(!0)})}getFromLocation(e){let[t,n]=i(e,this.options.locationKey);if(t!==null)return e.hash=e.hash.replace(n,``),Promise.resolve(t);let[a,o]=i(e,this.options.locationErrorKey);return a===null?Promise.resolve(null):(e.hash=e.hash.replace(o,``),Promise.reject(new r(decodeURIComponent(a))))}setAccessToken(e){return this.storage.setItem(this.options.storageKey,e)}getAccessToken(){return this.storage.getItem(this.options.storageKey).then(e=>!e&&typeof window<`u`&&window.location?this.getFromLocation(window.location):e||null)}removeAccessToken(){return this.storage.removeItem(this.options.storageKey)}reset(){return this.app.set(`authentication`,null),this.authenticated=!1,Promise.resolve(null)}handleError(e,t){if(e.code>400&&e.code<408){let n=this.removeAccessToken().then(()=>this.reset());return t===`logout`?n:n.then(()=>Promise.reject(e))}return this.reset().then(()=>Promise.reject(e))}reAuthenticate(e=!1,n,r){let i=this.app.get(`authentication`);return(!i||e===!0)&&(i=this.getAccessToken().then(e=>e?this.authenticate({strategy:n||this.options.jwtStrategy,accessToken:e},r):this.handleError(new t.NotAuthenticated(`No accessToken found in storage`),`authenticate`)),this.app.set(`authentication`,i)),i}authenticate(e,t){if(!e)return this.reAuthenticate();let n=this.service.create(e,t).then(e=>{let{accessToken:t}=e;return this.authenticated=!0,this.app.emit(`login`,e),this.app.emit(`authenticated`,e),this.setAccessToken(t).then(()=>e)}).catch(e=>this.handleError(e,`authenticate`));return this.app.set(`authentication`,n),n}logout(){return Promise.resolve(this.app.get(`authentication`)).then(()=>this.service.remove(null).then(e=>this.removeAccessToken().then(()=>this.reset()).then(()=>(this.app.emit(`logout`,e),e)))).catch(e=>this.handleError(e,`logout`))}}})),v=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.authentication=void 0;var t=f();e.authentication=()=>(e,n)=>{let{app:r,params:i,path:a,method:o,app:{authentication:s}}=e;return(0,t.stripSlashes)(s.options.path)===a&&o===`create`?n():Promise.resolve(r.get(`authentication`)).then(t=>{t&&(e.params=Object.assign({},t,i))}).then(n)}})),y=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.populateHeader=void 0,e.populateHeader=()=>(e,t)=>{let{app:n,params:{accessToken:r}}=e,i=n.authentication;if(n.rest&&r){let{scheme:t,header:n}=i.options,a=`${t} ${r}`;e.params.headers=Object.assign({},{[n]:a},e.params.headers)}return t()}})),b=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.populateHeader=e.authentication=void 0;var t=v();Object.defineProperty(e,"authentication",{enumerable:!0,get:function(){return t.authentication}});var n=y();Object.defineProperty(e,"populateHeader",{enumerable:!0,get:function(){return n.populateHeader}})})),x=n(((e,t)=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;o<a.length;o++)a[o]!=="default"&&n(i,t,a[o]);return r(i,t),i}})();Object.defineProperty(e,"__esModule",{value:!0}),e.defaults=e.defaultStorage=e.hooks=e.MemoryStorage=e.AuthenticationClient=e.getDefaultStorage=void 0;var a=_();Object.defineProperty(e,"AuthenticationClient",{enumerable:!0,get:function(){return a.AuthenticationClient}});var o=i(b());e.hooks=o;var s=g();Object.defineProperty(e,"MemoryStorage",{enumerable:!0,get:function(){return s.MemoryStorage}}),e.getDefaultStorage=()=>{try{return new s.StorageWrapper(window.localStorage)}catch{}return new s.MemoryStorage},e.defaultStorage=(0,e.getDefaultStorage)(),e.defaults={header:`Authorization`,scheme:`Bearer`,storageKey:`feathers-jwt`,locationKey:`access_token`,locationErrorKey:`error`,jwtStrategy:`jwt`,path:`/authentication`,Authentication:a.AuthenticationClient,storage:e.defaultStorage};var c=(t={})=>{let n=Object.assign({},e.defaults,t),{Authentication:r}=n;return e=>{let t=new r(e,n);e.authentication=t,e.authenticate=t.authenticate.bind(t),e.reAuthenticate=t.reAuthenticate.bind(t),e.logout=t.logout.bind(t),e.hooks([o.authentication(),o.populateHeader()])}};e.default=c,t!==void 0&&(t.exports=Object.assign(c,t.exports))})),S=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Service=void 0;var t=u(),n=(0,f().createDebug)(`@feathersjs/transport-commons/client`),r=[`addListener`,`addEventListener`,`emit`,`listenerCount`,`listeners`,`on`,`once`,`prependListener`,`prependOnceListener`,`removeAllListeners`,`removeEventListener`,`removeListener`],i=[`eventNames`,`getMaxListeners`,`setMaxListeners`],a=e=>{i.forEach(t=>{e[t]=function(...e){if(typeof this.connection[t]!=`function`)throw Error(`Can not call '${t}' on the client service connection`);return this.connection[t](...e)}}),r.forEach(t=>{e[t]=function(e,...r){if(typeof this.connection[t]!=`function`)throw Error(`Can not call '${t}' on the client service connection`);let i=`${this.path} ${e}`;n(`Calling emitter method ${t} with namespaced event '${i}'`);let a=this.connection[t](i,...r);return a===this.connection?this:a}})};e.Service=class{constructor(e){this.events=e.events,this.path=e.name,this.connection=e.connection,this.method=e.method,a(this)}send(e,...r){return new Promise((i,a)=>{let o=r.pop(),s=this.path;o&&Object.keys(o).forEach(e=>{s=s.replace(`:${e}`,o[e])}),r.unshift(e,s),(this.connection.flags?.timeout||this.connection._opts?.ackTimeout)===void 0?r.push(function(e,n){return e?a((0,t.convert)(e)):i(n)}):r.push(function(e,n,r){return e||n?a((0,t.convert)(e||n)):i(r)}),n(`Sending socket.${this.method}`,r),this.connection[this.method](...r)})}methods(...e){return e.forEach(e=>{let t=`_${e}`;this[t]=function(t,n={}){return this.send(e,t,n.query||{},n.route||{})},this[e]=function(e,n={}){return this[t](e,n,n.route||{})}}),this}_find(e={}){return this.send(`find`,e.query||{},e.route||{})}find(e={}){return this._find(e)}_get(e,n={}){return e===void 0||e===``?Promise.reject(new t.BadRequest(`id for .get is required`)):this.send(`get`,e,n.query||{},n.route||{})}get(e,t={}){return this._get(e,t)}_create(e,t={}){return this.send(`create`,e,t.query||{},t.route||{})}create(e,t={}){return this._create(e,t)}_update(e,n,r={}){return e===void 0||e===``?Promise.reject(new t.BadRequest(`id for .update is required`)):this.send(`update`,e,n,r.query||{},r.route||{})}update(e,n,r={}){return e===void 0||e===``?Promise.reject(new t.BadRequest(`id for .update is required`)):this._update(e,n,r)}_patch(e,n,r={}){return e===void 0||e===``?Promise.reject(new t.BadRequest(`id for .patch is required`)):this.send(`patch`,e,n,r.query||{},r.route||{})}patch(e,t,n={}){return this._patch(e,t,n)}_remove(e,n={}){return e===void 0||e===``?Promise.reject(new t.BadRequest(`id for .remove is required`)):this.send(`remove`,e,n.query||{},n.route||{})}remove(e,t={}){return this._remove(e,t)}off(e,...t){if(typeof this.connection.off==`function`){let n=this.connection.off(`${this.path} ${e}`,...t);return n===this.connection?this:n}else if(t.length===0)return this.removeAllListeners(e);return this.removeListener(e,...t)}}})),C=n(((e,t)=>{t.exports=S()})),w=n(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=C(),r=d();function i(e,t){if(!e)throw Error(`Socket.io connection needs to be provided`);let i=function(i){let a=Object.values(r.defaultEventMap),o=Object.assign({},t,{events:a,name:i,connection:e,method:`emit`});return new n.Service(o)},a=function(t){if(t.io!==void 0)throw Error(`Only one default client provider can be configured`);t.io=e,t.defaultService=i,t.mixins.unshift((e,t,i)=>{if(i&&i.methods&&e instanceof n.Service){let t=i.methods.filter(e=>!r.defaultServiceMethods.includes(e));e.methods(...t)}})};return a.Service=n.Service,a.service=i,a}t!==void 0&&(t.exports=Object.assign(i,t.exports))})),ee=e(x(),1),te=d(),ne=e(w(),1),T=Object.create(null);T.open=`0`,T.close=`1`,T.ping=`2`,T.pong=`3`,T.message=`4`,T.upgrade=`5`,T.noop=`6`;var re=Object.create(null);Object.keys(T).forEach(e=>{re[T[e]]=e});var ie={type:`error`,data:`parser error`},ae=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,E=typeof ArrayBuffer==`function`,oe=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,D=({type:e,data:t},n,r)=>ae&&t instanceof Blob?n?r(t):se(t,r):E&&(t instanceof ArrayBuffer||oe(t))?n?r(t):se(new Blob([t]),r):r(T[e]+(t||``)),se=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function O(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var ce;function le(e,t){if(ae&&e.data instanceof Blob)return e.data.arrayBuffer().then(O).then(t);if(E&&(e.data instanceof ArrayBuffer||oe(e.data)))return t(O(e.data));D(e,!1,e=>{ce||=new TextEncoder,t(ce.encode(e))})}var ue=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,de=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)de[ue.charCodeAt(e)]=e;var fe=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=de[e.charCodeAt(r)],o=de[e.charCodeAt(r+1)],s=de[e.charCodeAt(r+2)],c=de[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},pe=typeof ArrayBuffer==`function`,k=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:he(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:me(e.substring(1),t)}:re[n]?e.length>1?{type:re[n],data:e.substring(1)}:{type:re[n]}:ie},me=(e,t)=>pe?he(fe(e),t):{base64:!0,data:e},he=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},ge=``,A=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{D(e,!1,e=>{r[a]=e,++i===n&&t(r.join(ge))})})},_e=(e,t)=>{let n=e.split(ge),r=[];for(let e=0;e<n.length;e++){let i=k(n[e],t);if(r.push(i),i.type===`error`)break}return r};function ve(){return new TransformStream({transform(e,t){le(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var ye;function be(e){return e.reduce((e,t)=>e+t.length,0)}function j(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function xe(e,t){ye||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(be(n)<1)break;let e=j(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(be(n)<2)break;let e=j(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(be(n)<8)break;let e=j(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(ie);break}i=a*2**32+t.getUint32(4),r=3}else{if(be(n)<i)break;let e=j(n,i);s.enqueue(k(a?e:ye.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(ie);break}}}})}function M(e){if(e)return Se(e)}function Se(e){for(var t in M.prototype)e[t]=M.prototype[t];return e}M.prototype.on=M.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},M.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},M.prototype.off=M.prototype.removeListener=M.prototype.removeAllListeners=M.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},M.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},M.prototype.emitReserved=M.prototype.emit,M.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},M.prototype.hasListeners=function(e){return!!this.listeners(e).length};var Ce=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),N=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),we=`arraybuffer`;function Te(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var Ee=N.setTimeout,De=N.clearTimeout;function Oe(e,t){t.useNativeTimers?(e.setTimeoutFn=Ee.bind(N),e.clearTimeoutFn=De.bind(N)):(e.setTimeoutFn=N.setTimeout.bind(N),e.clearTimeoutFn=N.clearTimeout.bind(N))}var ke=1.33;function Ae(e){return typeof e==`string`?je(e):Math.ceil((e.byteLength||e.size)*ke)}function je(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Me(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ne(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function P(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var Pe=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},F=class extends M{constructor(e){super(),this.writable=!1,Oe(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new Pe(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=k(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=Ne(e);return t.length?`?`+t:``}},Fe=class extends F{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){_e(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,A(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Me()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},Ie=!1;try{Ie=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var Le=Ie;function Re(){}var ze=class extends Fe{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},Be=class e extends M{constructor(e,t,n){super(),this.createRequest=e,Oe(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=Te(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=Re,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(Be.requestsCount=0,Be.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,Ve);else if(typeof addEventListener==`function`){let e=`onpagehide`in N?`pagehide`:`unload`;addEventListener(e,Ve,!1)}}function Ve(){for(let e in Be.requests)Be.requests.hasOwnProperty(e)&&Be.requests[e].abort()}var He=(function(){let e=We({xdomain:!1});return e&&e.responseType!==null})(),Ue=class extends ze{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=He&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Be(We,this.uri(),e)}};function We(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||Le))return new XMLHttpRequest}catch{}if(!t)try{return new N[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var Ge=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,Ke=class extends F{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=Ge?{}:Te(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;D(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&Ce(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Me()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},qe=N.WebSocket||N.MozWebSocket,Je={websocket:class extends Ke{createSocket(e,t,n){return Ge?new qe(e,t,n):t?new qe(e,t):new qe(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends F{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=xe(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=ve();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&Ce(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:Ue},Ye=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Xe=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function Ze(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=Ye.exec(e||``),a={},o=14;for(;o--;)a[Xe[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=I(a,a.path),a.queryKey=Qe(a,a.query),a}function I(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function Qe(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var $e=typeof addEventListener==`function`&&typeof removeEventListener==`function`,et=[];$e&&addEventListener(`offline`,()=>{et.forEach(e=>e())},!1);var L=class e extends M{constructor(e,t){if(super(),this.binaryType=we,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=Ze(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=Ze(t.host).host);Oe(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=P(this.opts.query)),$e&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},et.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=Ae(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Ce(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),$e&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=et.indexOf(this._offlineEventListener);e!==-1&&et.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};L.protocol=4;var tt=class extends L{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;L.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;L.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},nt=class extends tt{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>Je[e]).filter(e=>!!e)),super(e,n)}};nt.protocol;function rt(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=Ze(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var it=typeof ArrayBuffer==`function`,at=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ot=Object.prototype.toString,st=typeof Blob==`function`||typeof Blob<`u`&&ot.call(Blob)===`[object BlobConstructor]`,ct=typeof File==`function`||typeof File<`u`&&ot.call(File)===`[object FileConstructor]`;function lt(e){return it&&(e instanceof ArrayBuffer||at(e))||st&&e instanceof Blob||ct&&e instanceof File}function ut(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(ut(e[t]))return!0;return!1}if(lt(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return ut(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&ut(e[t]))return!0;return!1}function dt(e){let t=[],n=e.data,r=e;return r.data=ft(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ft(e,t){if(!e)return e;if(lt(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=ft(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=ft(e[r],t));return n}return e}function pt(e,t){return e.data=R(e.data,t),delete e.attachments,e}function R(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=R(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=R(e[n],t));return e}var mt=t({Decoder:()=>_t,Encoder:()=>gt,PacketType:()=>z,isPacketValid:()=>B,protocol:()=>5}),ht=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],z;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(z||={});var gt=class{constructor(e){this.replacer=e}encode(e){return(e.type===z.EVENT||e.type===z.ACK)&&ut(e)?this.encodeAsBinary({type:e.type===z.EVENT?z.BINARY_EVENT:z.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===z.BINARY_EVENT||e.type===z.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=dt(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},_t=class e extends M{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===z.BINARY_EVENT;n||t.type===z.BINARY_ACK?(t.type=n?z.EVENT:z.ACK,this.reconstructor=new vt(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(lt(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(z[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===z.BINARY_EVENT||r.type===z.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!bt(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case z.CONNECT:return St(t);case z.DISCONNECT:return t===void 0;case z.CONNECT_ERROR:return typeof t==`string`||St(t);case z.EVENT:case z.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&ht.indexOf(t[0])===-1);case z.ACK:case z.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},vt=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=pt(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function yt(e){return typeof e==`string`}var bt=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function xt(e){return e===void 0||bt(e)}function St(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ct(e,t){switch(e){case z.CONNECT:return t===void 0||St(t);case z.DISCONNECT:return t===void 0;case z.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&ht.indexOf(t[0])===-1);case z.ACK:return Array.isArray(t);case z.CONNECT_ERROR:return typeof t==`string`||St(t);default:return!1}}function B(e){return yt(e.nsp)&&xt(e.id)&&Ct(e.type,e.data)}function wt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var V=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Tt=class extends M{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[wt(e,`open`,this.onopen.bind(this)),wt(e,`packet`,this.onpacket.bind(this)),wt(e,`error`,this.onerror.bind(this)),wt(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(V.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:z.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case z.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case z.EVENT:case z.BINARY_EVENT:this.onevent(e);break;case z.ACK:case z.BINARY_ACK:this.onack(e);break;case z.DISCONNECT:this.ondisconnect();break;case z.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:z.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:z.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function H(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}H.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},H.prototype.reset=function(){this.attempts=0},H.prototype.setMin=function(e){this.ms=e},H.prototype.setMax=function(e){this.max=e},H.prototype.setJitter=function(e){this.jitter=e};var Et=class extends M{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,Oe(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new H({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||mt;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new nt(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=wt(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=wt(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(wt(e,`ping`,this.onping.bind(this)),wt(e,`data`,this.ondata.bind(this)),wt(e,`error`,this.onerror.bind(this)),wt(e,`close`,this.onclose.bind(this)),wt(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){Ce(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Tt(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},Dt={};function Ot(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=rt(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=Dt[i]&&a in Dt[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new Et(r,t):(Dt[i]||(Dt[i]=new Et(r,t)),c=Dt[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Ot,{Manager:Et,Socket:Tt,io:Ot,connect:Ot});var kt={DEFAULT_PORT:3030,DEFAULT_HOST:`localhost`},At={DEFAULT_LIMIT:1e4,MAX_LIMIT:1e4,CLI_DEFAULT_LIMIT:50},jt=`http://${kt.DEFAULT_HOST}:${kt.DEFAULT_PORT}`,Mt=Symbol(`agor.boardsServiceExtended`),Nt=Symbol(`agor.usersServiceExtended`),Pt=Symbol(`agor.reposServiceExtended`),Ft=Symbol(`agor.branchesServiceExtended`),It=Symbol(`agor.serviceFindAllExtended`),Lt=Symbol(`agor.clientServiceFactoryExtended`),Rt=Symbol(`agor.clientSessionsHelpersExtended`),zt=Symbol(`agor.clientTasksHelpersExtended`);function Bt(e){let t=e.service(`boards`);if(t[Mt])return;(e=>{let t=e.methods;typeof t==`function`&&t.call(e,`toBlob`,`fromBlob`,`toYaml`,`fromYaml`,`clone`,`setPrimaryAssistant`,`clearPrimaryAssistant`,`ensureAssistantWelcomeNote`)})(t);let n=t.toBlob?.bind(t);n&&(t.toBlob=(e,t)=>n(typeof e==`string`?{boardId:e}:e,t));let r=t.fromBlob?.bind(t);r&&(t.fromBlob=(e,t)=>r(e,t));let i=t.toYaml?.bind(t);i&&(t.toYaml=(e,t)=>i(typeof e==`string`?{boardId:e}:e,t));let a=t.fromYaml?.bind(t);a&&(t.fromYaml=(e,t)=>a(typeof e==`string`?{yaml:e}:e,t));let o=t.clone?.bind(t);o&&(t.clone=(e,t,n)=>{if(typeof e==`string`){if(typeof t!=`string`)throw Error(`Board name required`);return o({boardId:e,name:t},n)}return o(e,(typeof t==`object`?t:void 0)??n)}),t[Mt]=!0}function Vt(e){return!Array.isArray(e)&&typeof e==`object`&&!!e&&Array.isArray(e.data)}function Ht(e){let t=e;t[It]||(t.findAll=async t=>{let n=await e.find(t);if(!Vt(n))return n;let r=[...n.data],i=n.total,a=n.skip+n.data.length,o=typeof n.limit==`number`&&n.limit>0?n.limit:n.data.length;if(!Number.isFinite(i)||o<=0)return r;let s=t?.query&&typeof t.query==`object`?{...t.query}:void 0;for(;r.length<i;){let n={...t??{},query:{...s??{},$skip:a,$limit:o}},c=await e.find(n);if(!Vt(c)){r.push(...c);break}if(c.data.length===0)break;r.push(...c.data),a=c.skip+c.data.length,i=c.total}return r},t[It]=!0)}function Ut(e){let t=e.service(`users`);t[Nt]||(typeof t.methods==`function`&&t.methods(`getGitEnvironment`),t[Nt]=!0)}function Wt(e){let t=e.service(`repos`);t[Pt]||(typeof t.methods==`function`&&t.methods(`initializeUnixGroup`),t[Pt]=!0)}function Gt(e){let t=e.service(`branches`);t[Ft]||(typeof t.methods==`function`&&t.methods(`initializeUnixGroup`,`ensureAssistantKnowledgeNamespace`),t[Ft]=!0)}function Kt(e){let t=e;if(t[Lt])return;let n=e.service.bind(e);t.service=(e=>{let t=n(e);return Ht(t),t}),t[Lt]=!0}function qt(e){let t=e;t[Rt]||(e.sessions={prompt:async(t,n,r)=>{let{params:i,...a}=r??{};return await e.service(`sessions/${t}/prompt`).create({prompt:n,...a},i)}},t[Rt]=!0)}function Jt(e){let t=e;t[zt]||(e.tasks={run:async(t,n)=>{let{params:r,...i}=n??{};return await e.service(`tasks/${t}/run`).create(i,r)}},t[zt]=!0)}async function Yt(t=jt,n){let r=(0,te.feathers)(),i=globalThis.fetch.bind(globalThis),{default:a}=await m(async()=>{let{default:t}=await import(`./lib-Bxexpjv9.js`).then(t=>e(t.default,1));return{default:t}},__vite__mapDeps([0,1,2])),o=n?(e,t)=>{let r=new Headers(t?.headers);return r.set(`Authorization`,`Bearer ${n}`),i(e,{...t,headers:r})}:i;return r.configure(a(t).fetch(o)),r.configure((0,ee.default)({storage:void 0})),r.io={close:()=>{},removeAllListeners:()=>{},io:{opts:{}}},Kt(r),Bt(r),Ut(r),Wt(r),Gt(r),qt(r),Jt(r),r}function Xt(e=jt,t=!0,n){let r=typeof globalThis<`u`&&`window`in globalThis,i=Ot(e,{autoConnect:t,reconnection:!0,reconnectionDelay:1e3,reconnectionDelayMax:5e3,reconnectionAttempts:n?.reconnectionAttempts??(r?1/0:2),timeout:2e4,transports:[`websocket`,`polling`],closeOnBeforeunload:!0});if(n?.verbose){let t=0,a=n?.reconnectionAttempts??(r?1/0:2);i.on(`connect_error`,n=>{t++,t===1?(console.error(`✗ Daemon not running at ${e}`),console.error(` Retrying connection (${t}/${a})...`)):console.error(` Retry ${t}/${a} failed`)}),i.on(`connect`,()=>{t>0&&console.log(`✓ Connected to daemon`)})}let a=(0,te.feathers)();a.configure((0,ne.default)(i));let o=globalThis.localStorage,s=o&&typeof o.setItem==`function`?o:void 0;return a.configure((0,ee.default)({storage:s})),a.io=i,Kt(a),Bt(a),Ut(a),Wt(a),Gt(a),qt(a),Jt(a),a}function Zt(e,t=[]){let n=[],r=new Map(e.map(e=>[e.repo_id,e]));for(let t of e)n.push({label:t.slug,value:t.repo_id,type:`managed`,slug:t.slug,description:`${t.name} (bare repo)`});for(let e of t){let t=r.get(e.repo_id);if(!t)continue;let i=`${t.slug}:${e.name}`;n.push({label:i,value:e.branch_id,type:`managed-branch`,slug:t.slug,branch:e.name,description:`${t.name} - ${e.name} (${e.ref})`})}return n}function Qt(e){let t=e.endsWith(`.git`)?e.slice(0,-4):e;if(t.includes(`@`)){let e=t.match(/:([^/]+\/[^/]+)$/);if(e)return e[1]}let n=t.match(/[:/]([^/]+\/[^/]+)$/);if(n)return n[1];let r=t.split(`/`).filter(Boolean);if(r.length>=2)return`${r[r.length-2]}/${r[r.length-1]}`;throw Error(`Could not extract slug from URL: ${e}`)}var $t=/^[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+$/;function en(e){return $t.test(e)}function tn(e){return e.replace(/\/+$/,``).replace(/\.git$/,``)}var nn=[`worktree`,`clone`],rn=`worktree`,an=Object.create,on=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,cn=Object.getOwnPropertyNames,ln=Object.getPrototypeOf,un=Object.prototype.hasOwnProperty,U=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),dn=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=cn(t),a=0,o=i.length,s;a<o;a++)s=i[a],!un.call(e,s)&&s!==n&&on(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=sn(t,s))||r.enumerable});return e},fn=(e,t,n)=>(n=e==null?{}:an(ln(e)),dn(t||!e||!e.__esModule?on(n,`default`,{value:e,enumerable:!0}):n,e)),pn=U(((e,t)=>{function n(e){return e==null}function r(e){return typeof e==`object`&&!!e}function i(e){return Array.isArray(e)?e:n(e)?[]:[e]}function a(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}function o(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}function s(e){return e===0&&1/e==-1/0}t.exports.isNothing=n,t.exports.isObject=r,t.exports.toArray=i,t.exports.repeat=o,t.exports.isNegativeZero=s,t.exports.extend=a})),mn=U(((e,t)=>{function n(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
|
|
3
|
-
|
|
4
|
-
`+e.mark.snippet),r+` `+n):r}function r(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=n(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){return this.name+`: `+n(this,e)},t.exports=r})),hn=U(((e,t)=>{var n=pn();function r(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function i(e,t){return n.repeat(` `,t-e.length)+e}function a(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],c,l=-1;for(;c=a.exec(e.buffer);)s.push(c.index),o.push(c.index+c[0].length),e.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u=``,d=Math.min(e.line+t.linesAfter,s.length).toString().length,f=t.maxLength-(t.indent+d+3);for(let a=1;a<=t.linesBefore&&!(l-a<0);a++){let c=r(e.buffer,o[l-a],s[l-a],e.position-(o[l]-o[l-a]),f);u=n.repeat(` `,t.indent)+i((e.line-a+1).toString(),d)+` | `+c.str+`
|
|
5
|
-
`+u}let p=r(e.buffer,o[l],s[l],e.position,f);u+=n.repeat(` `,t.indent)+i((e.line+1).toString(),d)+` | `+p.str+`
|
|
6
|
-
`,u+=n.repeat(`-`,t.indent+d+3+p.pos)+`^
|
|
7
|
-
`;for(let a=1;a<=t.linesAfter&&!(l+a>=s.length);a++){let c=r(e.buffer,o[l+a],s[l+a],e.position-(o[l]-o[l+a]),f);u+=n.repeat(` `,t.indent)+i((e.line+a+1).toString(),d)+` | `+c.str+`
|
|
8
|
-
`}return u.replace(/\n$/,``)}t.exports=a})),W=U(((e,t)=>{var n=mn(),r=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],i=[`scalar`,`sequence`,`mapping`];function a(e){let t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function o(e,t){if(t||={},Object.keys(t).forEach(function(t){if(r.indexOf(t)===-1)throw new n(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=a(t.styleAliases||null),i.indexOf(this.kind)===-1)throw new n(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}t.exports=o})),gn=U(((e,t)=>{var n=mn(),r=W();function i(e,t){let n=[];return e[t].forEach(function(e){let t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}function a(){let e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function t(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(let e=0,n=arguments.length;e<n;e+=1)arguments[e].forEach(t);return e}function o(e){return this.extend(e)}o.prototype.extend=function(e){let t=[],s=[];if(e instanceof r)s.push(e);else if(Array.isArray(e))s=s.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(s=s.concat(e.explicit));else throw new n(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);t.forEach(function(e){if(!(e instanceof r))throw new n(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(e.loadKind&&e.loadKind!==`scalar`)throw new n(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(e.multi)throw new n(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),s.forEach(function(e){if(!(e instanceof r))throw new n(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});let c=Object.create(o.prototype);return c.implicit=(this.implicit||[]).concat(t),c.explicit=(this.explicit||[]).concat(s),c.compiledImplicit=i(c,`implicit`),c.compiledExplicit=i(c,`explicit`),c.compiledTypeMap=a(c.compiledImplicit,c.compiledExplicit),c},t.exports=o})),_n=U(((e,t)=>{t.exports=new(W())(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:function(e){return e===null?``:e}})})),vn=U(((e,t)=>{t.exports=new(W())(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:function(e){return e===null?[]:e}})})),yn=U(((e,t)=>{t.exports=new(W())(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:function(e){return e===null?{}:e}})})),bn=U(((e,t)=>{t.exports=new(gn())({explicit:[_n(),vn(),yn()]})})),xn=U(((e,t)=>{var n=W();function r(e){if(e===null)return!0;let t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}function i(){return null}function a(e){return e===null}t.exports=new n(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:r,construct:i,predicate:a,represent:{canonical:function(){return`~`},lowercase:function(){return`null`},uppercase:function(){return`NULL`},camelcase:function(){return`Null`},empty:function(){return``}},defaultStyle:`lowercase`})})),Sn=U(((e,t)=>{var n=W();function r(e){if(e===null)return!1;let t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}function i(e){return e===`true`||e===`True`||e===`TRUE`}function a(e){return Object.prototype.toString.call(e)===`[object Boolean]`}t.exports=new n(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:r,construct:i,predicate:a,represent:{lowercase:function(e){return e?`true`:`false`},uppercase:function(e){return e?`TRUE`:`FALSE`},camelcase:function(e){return e?`True`:`False`}},defaultStyle:`lowercase`})})),Cn=U(((e,t)=>{var n=pn(),r=W();function i(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function a(e){return e>=48&&e<=55}function o(e){return e>=48&&e<=57}function s(e){if(e===null)return!1;let t=e.length,n=0,r=!1;if(!t)return!1;let s=e[n];if((s===`-`||s===`+`)&&(s=e[++n]),s===`0`){if(n+1===t)return!0;if(s=e[++n],s===`b`){for(n++;n<t;n++){if(s=e[n],s!==`0`&&s!==`1`)return!1;r=!0}return r&&Number.isFinite(c(e))}if(s===`x`){for(n++;n<t;n++){if(!i(e.charCodeAt(n)))return!1;r=!0}return r&&Number.isFinite(c(e))}if(s===`o`){for(n++;n<t;n++){if(!a(e.charCodeAt(n)))return!1;r=!0}return r&&Number.isFinite(c(e))}}for(;n<t;n++){if(!o(e.charCodeAt(n)))return!1;r=!0}return r?Number.isFinite(c(e)):!1}function c(e){let t=e,n=1,r=t[0];if((r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function l(e){return c(e)}function u(e){return Object.prototype.toString.call(e)===`[object Number]`&&e%1==0&&!n.isNegativeZero(e)}t.exports=new r(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:s,construct:l,predicate:u,represent:{binary:function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},octal:function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)}},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}})})),wn=U(((e,t)=>{var n=pn(),r=W(),i=RegExp(`^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),a=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function o(e){return e===null||!i.test(e)?!1:Number.isFinite(parseFloat(e,10))?!0:a.test(e)}function s(e){let t=e.toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}var c=/^[-+]?[0-9]+e/;function l(e,t){if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(n.isNegativeZero(e))return`-0.0`;let r=e.toString(10);return c.test(r)?r.replace(`e`,`.e`):r}function u(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||n.isNegativeZero(e))}t.exports=new r(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:o,construct:s,predicate:u,represent:l,defaultStyle:`lowercase`})})),Tn=U(((e,t)=>{t.exports=bn().extend({implicit:[xn(),Sn(),Cn(),wn()]})})),En=U(((e,t)=>{t.exports=Tn()})),Dn=U(((e,t)=>{var n=W(),r=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),i=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function a(e){return e===null?!1:r.exec(e)!==null||i.exec(e)!==null}function o(e){let t=0,n=null,a=r.exec(e);if(a===null&&(a=i.exec(e)),a===null)throw Error(`Date resolve error`);let o=+a[1],s=a[2]-1,c=+a[3];if(!a[4])return new Date(Date.UTC(o,s,c));let l=+a[4],u=+a[5],d=+a[6];if(a[7]){for(t=a[7].slice(0,3);t.length<3;)t+=`0`;t=+t}if(a[9]){let e=+a[10],t=+(a[11]||0);n=(e*60+t)*6e4,a[9]===`-`&&(n=-n)}let f=new Date(Date.UTC(o,s,c,l,u,d,t));return n&&f.setTime(f.getTime()-n),f}function s(e){return e.toISOString()}t.exports=new n(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:a,construct:o,instanceOf:Date,represent:s})})),On=U(((e,t)=>{var n=W();function r(e){return e===`<<`||e===null}t.exports=new n(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:r})})),kn=U(((e,t)=>{var n=W(),r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
9
|
-
\r`;function i(e){if(e===null)return!1;let t=0,n=e.length,i=r;for(let r=0;r<n;r++){let n=i.indexOf(e.charAt(r));if(!(n>64)){if(n<0)return!1;t+=6}}return t%8==0}function a(e){let t=e.replace(/[\r\n=]/g,``),n=t.length,i=r,a=0,o=[];for(let e=0;e<n;e++)e%4==0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|i.indexOf(t.charAt(e));let s=n%4*6;return s===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):s===18?(o.push(a>>10&255),o.push(a>>2&255)):s===12&&o.push(a>>4&255),new Uint8Array(o)}function o(e){let t=``,n=0,i=e.length,a=r;for(let r=0;r<i;r++)r%3==0&&r&&(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]),n=(n<<8)+e[r];let o=i%3;return o===0?(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]):o===2?(t+=a[n>>10&63],t+=a[n>>4&63],t+=a[n<<2&63],t+=a[64]):o===1&&(t+=a[n>>2&63],t+=a[n<<4&63],t+=a[64],t+=a[64]),t}function s(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}t.exports=new n(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:i,construct:a,predicate:s,represent:o})})),An=U(((e,t)=>{var n=W(),r=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function a(e){if(e===null)return!0;let t=[],n=e;for(let e=0,a=n.length;e<a;e+=1){let a=n[e],o=!1;if(i.call(a)!==`[object Object]`)return!1;let s;for(s in a)if(r.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function o(e){return e===null?[]:e}t.exports=new n(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:a,construct:o})})),jn=U(((e,t)=>{var n=W(),r=Object.prototype.toString;function i(e){if(e===null)return!0;let t=e,n=Array(t.length);for(let e=0,i=t.length;e<i;e+=1){let i=t[e];if(r.call(i)!==`[object Object]`)return!1;let a=Object.keys(i);if(a.length!==1)return!1;n[e]=[a[0],i[a[0]]]}return!0}function a(e){if(e===null)return[];let t=e,n=Array(t.length);for(let e=0,r=t.length;e<r;e+=1){let r=t[e],i=Object.keys(r);n[e]=[i[0],r[i[0]]]}return n}t.exports=new n(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:i,construct:a})})),Mn=U(((e,t)=>{var n=W(),r=Object.prototype.hasOwnProperty;function i(e){if(e===null)return!0;let t=e;for(let e in t)if(r.call(t,e)&&t[e]!==null)return!1;return!0}function a(e){return e===null?{}:e}t.exports=new n(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:i,construct:a})})),Nn=U(((e,t)=>{t.exports=En().extend({implicit:[Dn(),On()],explicit:[kn(),An(),jn(),Mn()]})})),Pn=U(((e,t)=>{var n=pn(),r=mn(),i=hn(),a=Nn(),o=Object.prototype.hasOwnProperty,s=1,c=2,l=3,u=4,d=1,f=2,p=3,m=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=/[\x85\u2028\u2029]/,g=/[,\[\]{}]/,_=/^(?:!|!!|![0-9A-Za-z-]+!)$/,v=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function y(e){return Object.prototype.toString.call(e)}function b(e){return e===10||e===13}function x(e){return e===9||e===32}function S(e){return e===9||e===32||e===10||e===13}function C(e){return e===44||e===91||e===93||e===123||e===125}function w(e){if(e>=48&&e<=57)return e-48;let t=e|32;return t>=97&&t<=102?t-97+10:-1}function ee(e){return e===120?2:e===117?4:e===85?8:0}function te(e){return e>=48&&e<=57?e-48:-1}function ne(e){switch(e){case 48:return`\0`;case 97:return`\x07`;case 98:return`\b`;case 116:return` `;case 9:return` `;case 110:return`
|
|
10
|
-
`;case 118:return`\v`;case 102:return`\f`;case 114:return`\r`;case 101:return`\x1B`;case 32:return` `;case 34:return`"`;case 47:return`/`;case 92:return`\\`;case 78:return`
`;case 95:return`\xA0`;case 76:return`\u2028`;case 80:return`\u2029`;default:return``}}function T(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function re(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}var ie=Array(256),ae=Array(256);for(let e=0;e<256;e++)ie[e]=+!!ne(e),ae[e]=ne(e);function E(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:100,this.maxMergeSeqLength=typeof t.maxMergeSeqLength==`number`?t.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function oe(e,t){let n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=i(n),new r(t,n)}function D(e,t){throw oe(e,t)}function se(e,t){e.onWarning&&e.onWarning.call(null,oe(e,t))}function O(e,t,n){let r=e.anchorMapTransactions;if(r.length!==0){let n=r[r.length-1];o.call(n,t)||(n[t]={existed:o.call(e.anchorMap,t),value:e.anchorMap[t]})}e.anchorMap[t]=n}function ce(e){e.anchorMapTransactions.push(Object.create(null))}function le(e){let t=e.anchorMapTransactions.pop(),n=e.anchorMapTransactions;if(n.length===0)return;let r=n[n.length-1],i=Object.keys(t);for(let e=0,n=i.length;e<n;e+=1){let n=i[e];o.call(r,n)||(r[n]=t[n])}}function ue(e){let t=e.anchorMapTransactions.pop(),n=Object.keys(t);for(let r=n.length-1;r>=0;--r){let i=t[n[r]];i.existed?e.anchorMap[n[r]]=i.value:delete e.anchorMap[n[r]]}}function de(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}function fe(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.tag=t.tag,e.anchor=t.anchor,e.kind=t.kind,e.result=t.result}var pe={YAML:function(e,t,n){e.version!==null&&D(e,`duplication of %YAML directive`),n.length!==1&&D(e,`YAML directive accepts exactly one argument`);let r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);r===null&&D(e,`ill-formed argument of the YAML directive`);let i=parseInt(r[1],10),a=parseInt(r[2],10);i!==1&&D(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&se(e,`unsupported YAML version of the document`)},TAG:function(e,t,n){let r;n.length!==2&&D(e,`TAG directive accepts exactly two arguments`);let i=n[0];r=n[1],_.test(i)||D(e,`ill-formed tag handle (first argument) of the TAG directive`),o.call(e.tagMap,i)&&D(e,`there is a previously declared suffix for "`+i+`" tag handle`),v.test(r)||D(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{r=decodeURIComponent(r)}catch{D(e,`tag prefix is malformed: `+r)}e.tagMap[i]=r}};function k(e,t,n,r){if(t<n){let i=e.input.slice(t,n);if(r)for(let t=0,n=i.length;t<n;t+=1){let n=i.charCodeAt(t);n===9||n>=32&&n<=1114111||D(e,`expected valid JSON character`)}else m.test(i)&&D(e,`the stream contains non-printable characters`);e.result+=i}}function me(e,t,r,i){n.isObject(r)||D(e,`cannot merge mappings; the provided source object is unacceptable`);let a=Object.keys(r);for(let e=0,n=a.length;e<n;e+=1){let n=a[e];o.call(t,n)||(re(t,n,r[n]),i[n]=!0)}}function he(e,t,n,r,i,a,s,c,l){if(Array.isArray(i)){i=Array.prototype.slice.call(i);for(let t=0,n=i.length;t<n;t+=1)Array.isArray(i[t])&&D(e,`nested arrays are not supported inside keys`),typeof i==`object`&&y(i[t])===`[object Object]`&&(i[t]=`[object Object]`)}if(typeof i==`object`&&y(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(a)){a.length>e.maxMergeSeqLength&&D(e,`merge sequence length exceeded maxMergeSeqLength (`+e.maxMergeSeqLength+`)`);let r=new Set;for(let i=0,o=a.length;i<o;i+=1){let o=a[i];r.has(o)||(r.add(o),me(e,t,o,n))}}else me(e,t,a,n);else !e.json&&!o.call(n,i)&&o.call(t,i)&&(e.line=s||e.line,e.lineStart=c||e.lineStart,e.position=l||e.position,D(e,`duplicated mapping key`)),re(t,i,a),delete n[i];return t}function ge(e){let t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):D(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function A(e,t,n){let r=0,i=e.input.charCodeAt(e.position);for(;i!==0;){for(;x(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(b(i))for(ge(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&se(e,`deficient indentation`),r}function _e(e){let t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||S(n)))}function ve(e,t){t===1?e.result+=` `:t>1&&(e.result+=n.repeat(`
|
|
11
|
-
`,t-1))}function ye(e,t,n){let r,i,a,o,s,c,l=e.kind,u=e.result,d=e.input.charCodeAt(e.position);if(S(d)||C(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96)return!1;if(d===63||d===45){let t=e.input.charCodeAt(e.position+1);if(S(t)||n&&C(t))return!1}for(e.kind=`scalar`,e.result=``,r=i=e.position,a=!1;d!==0;){if(d===58){let t=e.input.charCodeAt(e.position+1);if(S(t)||n&&C(t))break}else if(d===35){if(S(e.input.charCodeAt(e.position-1)))break}else if(e.position===e.lineStart&&_e(e)||n&&C(d))break;else if(b(d))if(o=e.line,s=e.lineStart,c=e.lineIndent,A(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=i,e.line=o,e.lineStart=s,e.lineIndent=c;break}a&&=(k(e,r,i,!1),ve(e,e.line-o),r=i=e.position,!1),x(d)||(i=e.position+1),d=e.input.charCodeAt(++e.position)}return k(e,r,i,!1),e.result?!0:(e.kind=l,e.result=u,!1)}function be(e,t){let n,r,i=e.input.charCodeAt(e.position);if(i!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(k(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,r=e.position;else return!0;else b(i)?(k(e,n,r,!0),ve(e,A(e,!1,t)),n=r=e.position):e.position===e.lineStart&&_e(e)?D(e,`unexpected end of the document within a single quoted scalar`):(e.position++,x(i)||(r=e.position));D(e,`unexpected end of the stream within a single quoted scalar`)}function j(e,t){let n,r,i,a=e.input.charCodeAt(e.position);if(a!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;)if(a===34)return k(e,n,e.position,!0),e.position++,!0;else if(a===92){if(k(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),b(a))A(e,!1,t);else if(a<256&&ie[a])e.result+=ae[a],e.position++;else if((i=ee(a))>0){let t=i,n=0;for(;t>0;t--)a=e.input.charCodeAt(++e.position),(i=w(a))>=0?n=(n<<4)+i:D(e,`expected hexadecimal character`);e.result+=T(n),e.position++}else D(e,`unknown escape sequence`);n=r=e.position}else b(a)?(k(e,n,r,!0),ve(e,A(e,!1,t)),n=r=e.position):e.position===e.lineStart&&_e(e)?D(e,`unexpected end of the document within a double quoted scalar`):(e.position++,x(a)||(r=e.position));D(e,`unexpected end of the stream within a double quoted scalar`)}function xe(e,t){let n=!0,r,i,a,o=e.tag,c,l=e.anchor,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,c=[];else if(v===123)u=125,p=!0,c={};else return!1;for(e.anchor!==null&&O(e,e.anchor,c),v=e.input.charCodeAt(++e.position);v!==0;){if(A(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=l,e.kind=p?`mapping`:`sequence`,e.result=c,!0;n?v===44&&D(e,`expected the node content, but found ','`):D(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&S(e.input.charCodeAt(e.position+1))&&(d=f=!0,e.position++,A(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,De(e,t,s,!1,!0),g=e.tag,h=e.result,A(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),A(e,!0,t),De(e,t,s,!1,!0),_=e.result),p?he(e,c,m,g,h,_,r,i,a):d?c.push(he(e,null,m,g,h,_,r,i,a)):c.push(h),A(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}D(e,`unexpected end of the stream within a flow collection`)}function M(e,t){let r,i=d,a=!1,o=!1,s=t,c=0,l=!1,u,m=e.input.charCodeAt(e.position);if(m===124)r=!1;else if(m===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;m!==0;)if(m=e.input.charCodeAt(++e.position),m===43||m===45)d===i?i=m===43?p:f:D(e,`repeat of a chomping mode identifier`);else if((u=te(m))>=0)u===0?D(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?D(e,`repeat of an indentation width identifier`):(s=t+u-1,o=!0);else break;if(x(m)){do m=e.input.charCodeAt(++e.position);while(x(m));if(m===35)do m=e.input.charCodeAt(++e.position);while(!b(m)&&m!==0)}for(;m!==0;){for(ge(e),e.lineIndent=0,m=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&m===32;)e.lineIndent++,m=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),b(m)){c++;continue}if(!o&&s===0&&D(e,`missing indentation for block scalar`),e.lineIndent<s){i===p?e.result+=n.repeat(`
|
|
12
|
-
`,a?1+c:c):i===d&&a&&(e.result+=`
|
|
13
|
-
`);break}r?x(m)?(l=!0,e.result+=n.repeat(`
|
|
14
|
-
`,a?1+c:c)):l?(l=!1,e.result+=n.repeat(`
|
|
15
|
-
`,c+1)):c===0?a&&(e.result+=` `):e.result+=n.repeat(`
|
|
16
|
-
`,c):e.result+=n.repeat(`
|
|
17
|
-
`,a?1+c:c),a=!0,o=!0,c=0;let t=e.position;for(;!b(m)&&m!==0;)m=e.input.charCodeAt(++e.position);k(e,t,e.position,!1)}return!0}function Se(e,t){let n=e.tag,r=e.anchor,i=[],a=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&O(e,e.anchor,i);let o=e.input.charCodeAt(e.position);for(;o!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,D(e,`tab characters must not be used in indentation`)),!(o!==45||!S(e.input.charCodeAt(e.position+1))));){if(a=!0,e.position++,A(e,!0,-1)&&e.lineIndent<=t){i.push(null),o=e.input.charCodeAt(e.position);continue}let n=e.line;if(De(e,t,l,!1,!0),i.push(e.result),A(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&o!==0)D(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=r,e.kind=`sequence`,e.result=i,!0):!1}function Ce(e,t,n){let r,i,a,o,s=e.tag,l=e.anchor,d={},f=Object.create(null),p=null,m=null,h=null,g=!1,_=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&O(e,e.anchor,d);let v=e.input.charCodeAt(e.position);for(;v!==0;){!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,D(e,`tab characters must not be used in indentation`));let y=e.input.charCodeAt(e.position+1),b=e.line;if((v===63||v===58)&&S(y))v===63?(g&&(he(e,d,f,p,m,null,i,a,o),p=m=h=null),_=!0,g=!0,r=!0):g?(g=!1,r=!0):D(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=y;else{if(i=e.line,a=e.lineStart,o=e.position,!De(e,n,c,!1,!0))break;if(e.line===b){for(v=e.input.charCodeAt(e.position);x(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),S(v)||D(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(he(e,d,f,p,m,null,i,a,o),p=m=h=null),_=!0,g=!1,r=!1,p=e.tag,m=e.result;else if(_)D(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=s,e.anchor=l,!0}else if(_)D(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=s,e.anchor=l,!0}if((e.line===b||e.lineIndent>t)&&(g&&(i=e.line,a=e.lineStart,o=e.position),De(e,t,u,!0,r)&&(g?m=e.result:h=e.result),g||(he(e,d,f,p,m,h,i,a,o),p=m=h=null),A(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===b||e.lineIndent>t)&&v!==0)D(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&he(e,d,f,p,m,null,i,a,o),_&&(e.tag=s,e.anchor=l,e.kind=`mapping`,e.result=d),_}function N(e){let t=!1,n=!1,r,i,a=e.input.charCodeAt(e.position);if(a!==33)return!1;e.tag!==null&&D(e,`duplication of a tag property`),a=e.input.charCodeAt(++e.position),a===60?(t=!0,a=e.input.charCodeAt(++e.position)):a===33?(n=!0,r=`!!`,a=e.input.charCodeAt(++e.position)):r=`!`;let s=e.position;if(t){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(s,e.position),a=e.input.charCodeAt(++e.position)):D(e,`unexpected end of the stream within a verbatim tag`)}else{for(;a!==0&&!S(a);)a===33&&(n?D(e,`tag suffix cannot contain exclamation marks`):(r=e.input.slice(s-1,e.position+1),_.test(r)||D(e,`named tag handle cannot contain such characters`),n=!0,s=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(s,e.position),g.test(i)&&D(e,`tag suffix cannot contain flow indicator characters`)}i&&!v.test(i)&&D(e,`tag name cannot contain such characters: `+i);try{i=decodeURIComponent(i)}catch{D(e,`tag name is malformed: `+i)}return t?e.tag=i:o.call(e.tagMap,r)?e.tag=e.tagMap[r]+i:r===`!`?e.tag=`!`+i:r===`!!`?e.tag=`tag:yaml.org,2002:`+i:D(e,`undeclared tag handle "`+r+`"`),!0}function we(e){let t=e.input.charCodeAt(e.position);if(t!==38)return!1;e.anchor!==null&&D(e,`duplication of an anchor property`),t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!S(t)&&!C(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&D(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(n,e.position),!0}function Te(e){let t=e.input.charCodeAt(e.position);if(t!==42)return!1;t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!S(t)&&!C(t);)t=e.input.charCodeAt(++e.position);e.position===n&&D(e,`name of an alias node must contain at least one character`);let r=e.input.slice(n,e.position);return o.call(e.anchorMap,r)||D(e,`unidentified alias "`+r+`"`),e.result=e.anchorMap[r],A(e,!0,-1),!0}function Ee(e,t,n,r){let i=de(e);return ce(e),fe(e,t),e.tag=null,e.anchor=null,e.kind=null,e.result=null,Ce(e,n,r)&&e.kind===`mapping`?(le(e),!0):(ue(e),fe(e,i),!1)}function De(e,t,n,r,i){let a,d,f=1,p=!1,m=!1,h=null,g,_,v;e.depth>=e.maxDepth&&D(e,`nesting exceeded maxDepth (`+e.maxDepth+`)`),e.depth+=1,e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;let y=a=d=u===n||l===n;if(r&&A(e,!0,-1)&&(p=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),f===1)for(;;){let n=e.input.charCodeAt(e.position),r=de(e);if(p&&(n===33&&e.tag!==null||n===38&&e.anchor!==null)||!N(e)&&!we(e))break;h===null&&(h=r),A(e,!0,-1)?(p=!0,d=y,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):d=!1}if(d&&=p||i,f===1||u===n)if(_=s===n||c===n?t:t+1,v=e.position-e.lineStart,f===1)if(d&&(Se(e,v)||Ce(e,v,_))||xe(e,_))m=!0;else{let t=e.input.charCodeAt(e.position);h!==null&&y&&!d&&t!==124&&t!==62&&Ee(e,h,h.position-h.lineStart,_)||a&&M(e,_)||be(e,_)||j(e,_)?m=!0:Te(e)?(m=!0,(e.tag!==null||e.anchor!==null)&&D(e,`alias node should not have any properties`)):ye(e,_,s===n)&&(m=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&O(e,e.anchor,e.result)}else f===0&&(m=d&&Se(e,v));if(e.tag===null)e.anchor!==null&&O(e,e.anchor,e.result);else if(e.tag===`?`){e.result!==null&&e.kind!==`scalar`&&D(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`);for(let t=0,n=e.implicitTypes.length;t<n;t+=1)if(g=e.implicitTypes[t],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&O(e,e.anchor,e.result);break}}else if(e.tag!==`!`){if(o.call(e.typeMap[e.kind||`fallback`],e.tag))g=e.typeMap[e.kind||`fallback`][e.tag];else{g=null;let t=e.typeMap.multi[e.kind||`fallback`];for(let n=0,r=t.length;n<r;n+=1)if(e.tag.slice(0,t[n].tag.length)===t[n].tag){g=t[n];break}}g||D(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&g.kind!==e.kind&&D(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+g.kind+`", not "`+e.kind+`"`),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&O(e,e.anchor,e.result)):D(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),--e.depth,e.tag!==null||e.anchor!==null||m}function Oe(e){let t=e.position,n=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(r=e.input.charCodeAt(e.position))!==0&&(A(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){n=!0,r=e.input.charCodeAt(++e.position);let t=e.position;for(;r!==0&&!S(r);)r=e.input.charCodeAt(++e.position);let i=e.input.slice(t,e.position),a=[];for(i.length<1&&D(e,`directive name must not be less than one character in length`);r!==0;){for(;x(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!b(r));break}if(b(r))break;for(t=e.position;r!==0&&!S(r);)r=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}r!==0&&ge(e),o.call(pe,i)?pe[i](e,i,a):se(e,`unknown document directive "`+i+`"`)}if(A(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,A(e,!0,-1)):n&&D(e,`directives end mark is expected`),De(e,e.lineIndent-1,u,!1,!0),A(e,!0,-1),e.checkLineBreaks&&h.test(e.input.slice(t,e.position))&&se(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&_e(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,A(e,!0,-1));return}e.position<e.length-1&&D(e,`end of the stream or a document separator is expected`)}function ke(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
18
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));let n=new E(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,D(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Oe(n);return n.documents}function Ae(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);let r=ke(e,n);if(typeof t!=`function`)return r;for(let e=0,n=r.length;e<n;e+=1)t(r[e])}function je(e,t){let n=ke(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new r(`expected a single document in the stream, but found more`)}}t.exports.loadAll=Ae,t.exports.load=je})),Fn=U(((e,t)=>{var n=pn(),r=mn(),i=Nn(),a=Object.prototype.toString,o=Object.prototype.hasOwnProperty,s=65279,c=9,l=10,u=13,d=32,f=33,p=34,m=35,h=37,g=38,_=39,v=42,y=44,b=45,x=58,S=61,C=62,w=63,ee=64,te=91,ne=93,T=96,re=123,ie=124,ae=125,E={};E[0]=`\\0`,E[7]=`\\a`,E[8]=`\\b`,E[9]=`\\t`,E[10]=`\\n`,E[11]=`\\v`,E[12]=`\\f`,E[13]=`\\r`,E[27]=`\\e`,E[34]=`\\"`,E[92]=`\\\\`,E[133]=`\\N`,E[160]=`\\_`,E[8232]=`\\L`,E[8233]=`\\P`;var oe=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function se(e,t){if(t===null)return{};let n={},r=Object.keys(t);for(let i=0,a=r.length;i<a;i+=1){let a=r[i],s=String(t[a]);a.slice(0,2)===`!!`&&(a=`tag:yaml.org,2002:`+a.slice(2));let c=e.compiledTypeMap.fallback[a];c&&o.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s}return n}function O(e){let t,i,a=e.toString(16).toUpperCase();if(e<=255)t=`x`,i=2;else if(e<=65535)t=`u`,i=4;else if(e<=4294967295)t=`U`,i=8;else throw new r(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+t+n.repeat(`0`,i-a.length)+a}var ce=1,le=2;function ue(e){this.schema=e.schema||i,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=n.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=se(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===`"`?le:ce,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==`function`?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}function de(e,t){let r=n.repeat(` `,t),i=0,a=``,o=e.length;for(;i<o;){let t,n=e.indexOf(`
|
|
19
|
-
`,i);n===-1?(t=e.slice(i),i=o):(t=e.slice(i,n+1),i=n+1),t.length&&t!==`
|
|
20
|
-
`&&(a+=r),a+=t}return a}function fe(e,t){return`
|
|
21
|
-
`+n.repeat(` `,e.indent*t)}function pe(e,t){for(let n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}function k(e){return e===d||e===c}function me(e){return e>=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==s||e>=65536&&e<=1114111}function he(e){return me(e)&&e!==s&&e!==u&&e!==l}function ge(e,t,n){let r=he(e),i=r&&!k(e);return(n?r:r&&e!==y&&e!==te&&e!==ne&&e!==re&&e!==ae)&&e!==m&&!(t===x&&!i)||he(t)&&!k(t)&&e===m||t===x&&i}function A(e){return me(e)&&e!==s&&!k(e)&&e!==b&&e!==w&&e!==x&&e!==y&&e!==te&&e!==ne&&e!==re&&e!==ae&&e!==m&&e!==g&&e!==v&&e!==f&&e!==ie&&e!==S&&e!==C&&e!==_&&e!==p&&e!==h&&e!==ee&&e!==T}function _e(e){return!k(e)&&e!==x}function ve(e,t){let n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function ye(e){return/^\n* /.test(e)}var be=1,j=2,xe=3,M=4,Se=5;function Ce(e,t,n,r,i,a,o,s){let c,u=0,d=null,f=!1,p=!1,m=r!==-1,h=-1,g=A(ve(e,0))&&_e(ve(e,e.length-1));if(t||o)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=ve(e,c),!me(u))return Se;g&&=ge(u,d,s),d=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=ve(e,c),u===l)f=!0,m&&(p||=c-h-1>r&&e[h+1]!==` `,h=c);else if(!me(u))return Se;g&&=ge(u,d,s),d=u}p||=m&&c-h-1>r&&e[h+1]!==` `}return!f&&!p?g&&!o&&!i(e)?be:a===le?Se:j:n>9&&ye(e)?Se:o?a===le?Se:j:p?M:xe}function N(e,t,n,i,a){e.dump=function(){if(t.length===0)return e.quotingType===le?`""`:`''`;if(!e.noCompatMode&&(oe.indexOf(t)!==-1||D.test(t)))return e.quotingType===le?`"`+t+`"`:`'`+t+`'`;let o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),c=i||e.flowLevel>-1&&n>=e.flowLevel;function l(t){return pe(e,t)}switch(Ce(t,c,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,a)){case be:return t;case j:return`'`+t.replace(/'/g,`''`)+`'`;case xe:return`|`+we(t,e.indent)+Te(de(t,o));case M:return`>`+we(t,e.indent)+Te(de(Ee(t,s),o));case Se:return`"`+Oe(t,s)+`"`;default:throw new r(`impossible error: invalid scalar style`)}}()}function we(e,t){let n=ye(e)?String(t):``,r=e[e.length-1]===`
|
|
22
|
-
`;return n+(r&&(e[e.length-2]===`
|
|
23
|
-
`||e===`
|
|
24
|
-
`)?`+`:r?``:`-`)+`
|
|
25
|
-
`}function Te(e){return e[e.length-1]===`
|
|
26
|
-
`?e.slice(0,-1):e}function Ee(e,t){let n=/(\n+)([^\n]*)/g,r=function(){let r=e.indexOf(`
|
|
27
|
-
`);return r=r===-1?e.length:r,n.lastIndex=r,De(e.slice(0,r),t)}(),i=e[0]===`
|
|
28
|
-
`||e[0]===` `,a,o;for(;o=n.exec(e);){let e=o[1],n=o[2];a=n[0]===` `,r+=e+(!i&&!a&&n!==``?`
|
|
29
|
-
`:``)+De(n,t),i=a}return r}function De(e,t){if(e===``||e[0]===` `)return e;let n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;for(;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
|
|
30
|
-
`+e.slice(i,a),i=a+1),o=s;return c+=`
|
|
31
|
-
`,e.length-i>t&&o>i?c+=e.slice(i,o)+`
|
|
32
|
-
`+e.slice(o+1):c+=e.slice(i),c.slice(1)}function Oe(e){let t=``,n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=ve(e,r);let i=E[n];!i&&me(n)?(t+=e[r],n>=65536&&(t+=e[r+1])):t+=i||O(n)}return t}function ke(e,t,n){let r=``,i=e.tag;for(let i=0,a=n.length;i<a;i+=1){let a=n[i];e.replacer&&(a=e.replacer.call(n,String(i),a)),(P(e,t,a,!1,!1)||a===void 0&&P(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump)}e.tag=i,e.dump=`[`+r+`]`}function Ae(e,t,n,r){let i=``,a=e.tag;for(let a=0,o=n.length;a<o;a+=1){let o=n[a];e.replacer&&(o=e.replacer.call(n,String(a),o)),(P(e,t+1,o,!0,!0,!1,!0)||o===void 0&&P(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=fe(e,t)),e.dump&&l===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump)}e.tag=a,e.dump=i||`[]`}function je(e,t,n){let r=``,i=e.tag,a=Object.keys(n);for(let i=0,o=a.length;i<o;i+=1){let o=``;r!==``&&(o+=`, `),e.condenseFlow&&(o+=`"`);let s=a[i],c=n[s];e.replacer&&(c=e.replacer.call(n,s,c)),P(e,t,s,!1,!1)&&(e.dump.length>1024&&(o+=`? `),o+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),P(e,t,c,!1,!1)&&(o+=e.dump,r+=o))}e.tag=i,e.dump=`{`+r+`}`}function Me(e,t,n,i){let a=``,o=e.tag,s=Object.keys(n);if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys==`function`)s.sort(e.sortKeys);else if(e.sortKeys)throw new r(`sortKeys must be a boolean or a function`);for(let r=0,o=s.length;r<o;r+=1){let o=``;(!i||a!==``)&&(o+=fe(e,t));let c=s[r],u=n[c];if(e.replacer&&(u=e.replacer.call(n,c,u)),!P(e,t+1,c,!0,!0,!0))continue;let d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024;d&&(e.dump&&l===e.dump.charCodeAt(0)?o+=`?`:o+=`? `),o+=e.dump,d&&(o+=fe(e,t)),P(e,t+1,u,!0,d)&&(e.dump&&l===e.dump.charCodeAt(0)?o+=`:`:o+=`: `,o+=e.dump,a+=o)}e.tag=o,e.dump=a||`{}`}function Ne(e,t,n){let i=n?e.explicitTypes:e.implicitTypes;for(let s=0,c=i.length;s<c;s+=1){let c=i[s];if((c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t==`object`&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(n?c.multi&&c.representName?e.tag=c.representName(t):e.tag=c.tag:e.tag=`?`,c.represent){let n=e.styleMap[c.tag]||c.defaultStyle,i;if(a.call(c.represent)===`[object Function]`)i=c.represent(t,n);else if(o.call(c.represent,n))i=c.represent[n](t,n);else throw new r(`!<`+c.tag+`> tag resolver accepts not "`+n+`" style`);e.dump=i}return!0}}return!1}function P(e,t,n,i,o,s,c){e.tag=null,e.dump=n,Ne(e,n,!1)||Ne(e,n,!0);let l=a.call(e.dump),u=i;i&&=e.flowLevel<0||e.flowLevel>t;let d=l===`[object Object]`||l===`[object Array]`,f,p;if(d&&(f=e.duplicates.indexOf(n),p=f!==-1),(e.tag!==null&&e.tag!==`?`||p||e.indent!==2&&t>0)&&(o=!1),p&&e.usedDuplicates[f])e.dump=`*ref_`+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),l===`[object Object]`)i&&Object.keys(e.dump).length!==0?(Me(e,t,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(je(e,t,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object Array]`)i&&e.dump.length!==0?(e.noArrayIndent&&!c&&t>0?Ae(e,t-1,e.dump,o):Ae(e,t,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(ke(e,t,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object String]`)e.tag!==`?`&&N(e,e.dump,t,s,u);else if(l===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new r(`unacceptable kind of an object to dump `+l)}if(e.tag!==null&&e.tag!==`?`){let t=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`);t=e.tag[0]===`!`?`!`+t:t.slice(0,18)===`tag:yaml.org,2002:`?`!!`+t.slice(18):`!<`+t+`>`,e.dump=t+` `+e.dump}}return!0}function Pe(e,t){let n=[],r=[];F(e,n,r);let i=r.length;for(let e=0;e<i;e+=1)t.duplicates.push(n[r[e]]);t.usedDuplicates=Array(i)}function F(e,t,n){if(typeof e==`object`&&e){let r=t.indexOf(e);if(r!==-1)n.indexOf(r)===-1&&n.push(r);else if(t.push(e),Array.isArray(e))for(let r=0,i=e.length;r<i;r+=1)F(e[r],t,n);else{let r=Object.keys(e);for(let i=0,a=r.length;i<a;i+=1)F(e[r[i]],t,n)}}}function Fe(e,t){t||={};let n=new ue(t);n.noRefs||Pe(e,n);let r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),P(n,0,r,!0,!0)?n.dump+`
|
|
33
|
-
`:``}t.exports.dump=Fe})),In=fn(U(((e,t)=>{var n=Pn(),r=Fn();function i(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}t.exports.Type=W(),t.exports.Schema=gn(),t.exports.FAILSAFE_SCHEMA=bn(),t.exports.JSON_SCHEMA=Tn(),t.exports.CORE_SCHEMA=En(),t.exports.DEFAULT_SCHEMA=Nn(),t.exports.load=n.load,t.exports.loadAll=n.loadAll,t.exports.dump=r.dump,t.exports.YAMLException=mn(),t.exports.types={binary:kn(),float:wn(),map:yn(),null:xn(),pairs:jn(),set:Mn(),timestamp:Dn(),bool:Sn(),int:Cn(),merge:On(),omap:An(),seq:vn(),str:_n()},t.exports.safeLoad=i(`safeLoad`,`load`),t.exports.safeLoadAll=i(`safeLoadAll`,`loadAll`),t.exports.safeDump=i(`safeDump`,`dump`)}))(),1),{Type:Ln,Schema:Rn,FAILSAFE_SCHEMA:zn,JSON_SCHEMA:Bn,CORE_SCHEMA:Vn,DEFAULT_SCHEMA:Hn,load:Un,loadAll:Wn,dump:Gn,YAMLException:Kn,types:qn,safeLoad:Jn,safeLoadAll:Yn,safeDump:Xn}=In.default,Zn=In.default,Qn=Zn.load,$n=Zn.dump;Zn.YAMLException;function er(e,t){if(!(typeof t.extends==`string`&&t.extends.length>0)){if(!t.start||typeof t.start!=`string`)throw Error(`.agor.yml: variant "${e}" is missing required "start" command`);if(!t.stop||typeof t.stop!=`string`)throw Error(`.agor.yml: variant "${e}" is missing required "stop" command`)}let n={};return typeof t.start==`string`&&(n.start=t.start),typeof t.stop==`string`&&(n.stop=t.stop),t.description&&(n.description=t.description),t.extends&&(n.extends=t.extends),t.nuke&&(n.nuke=t.nuke),t.logs&&(n.logs=t.logs),t.health&&(n.health=t.health),t.app&&(n.app=t.app),n}function tr(e){for(let[t,n]of Object.entries(e.variants)){let r=n.extends;if(!r)continue;if(r===t)throw Error(`.agor.yml: variant "${t}" cannot extend itself`);let i=e.variants[r];if(!i)throw Error(`.agor.yml: variant "${t}" extends unknown variant "${r}"`);if(i.extends)throw Error(`.agor.yml: variant "${t}" extends "${r}" which also extends "${i.extends}" — only single-level extends is supported`);if(!(n.start??i.start))throw Error(`.agor.yml: variant "${t}" extends "${r}" but neither defines required "start" command`);if(!(n.stop??i.stop))throw Error(`.agor.yml: variant "${t}" extends "${r}" but neither defines required "stop" command`)}}function nr(e,t){let n=e.variants[t];if(!n)return null;if(!n.extends){let{extends:e,...t}=n;return t}let r=e.variants[n.extends];if(!r)return null;let i={start:n.start??r.start,stop:n.stop??r.stop};return(n.description??r.description)&&(i.description=n.description??r.description),(n.nuke??r.nuke)&&(i.nuke=n.nuke??r.nuke),(n.logs??r.logs)&&(i.logs=n.logs??r.logs),(n.health??r.health)&&(i.health=n.health??r.health),(n.app??r.app)&&(i.app=n.app??r.app),i}function rr(e){if(typeof e!=`object`||!e)throw Error(`Expected a mapping (object)`);let t=e;if(t.version!==2)throw Error("`version` must be 2");if(!t.default||typeof t.default!=`string`)throw Error("`default` must be a variant name string");if(!t.variants||typeof t.variants!=`object`)throw Error("`variants` must be a map of variant-name → object");if(!(t.default in t.variants))throw Error(`\`default\` "${t.default}" is not defined in \`variants\``);let n={};for(let[e,r]of Object.entries(t.variants)){if(typeof r!=`object`||!r)throw Error(`variant "${e}" must be an object`);n[e]=er(e,r)}let r={version:2,default:t.default,variants:n};if(t.template_overrides!==void 0){if(typeof t.template_overrides!=`object`||t.template_overrides===null||Array.isArray(t.template_overrides))throw Error("`template_overrides` must be a mapping (object)");r.template_overrides=t.template_overrides}return tr(r),r}function ir(e){let t=e.custom_context?.assistant??e.custom_context?.agent;return typeof t==`object`&&!!t&&(t.kind===`assistant`||t.kind===`persisted-agent`)}function ar(e){return ir(e)?e.custom_context.assistant??e.custom_context.agent:null}function or(e){let{branch:t,board:n,zone:r,session:i}=e,a=t?.custom_context??{},o=n?.custom_context??{},s=i?.custom_context??{},c={name:t?.name??``,ref:t?.ref??``,issue_url:t?.issue_url??``,pull_request_url:t?.pull_request_url??``,notes:t?.notes??``,path:t?.path??``,context:a,custom_context:a};return{branch:c,worktree:c,board:{name:n?.name??``,description:n?.description??``,context:o,custom_context:o},zone:{label:r?.label??``,status:r?.status??``},session:{description:i?.description??``,context:s,custom_context:s}}}var sr={"claude-code":`ANTHROPIC_API_KEY`,codex:`OPENAI_API_KEY`,gemini:`GEMINI_API_KEY`,copilot:`COPILOT_GITHUB_TOKEN`,cursor:`CURSOR_API_KEY`},cr={"claude-code":{supportsSessionFork:!0,supportsChildSpawn:!0,supportsSessionImport:!0,supportsStatelessFsMode:!0},"claude-code-cli":{supportsSessionFork:!0,supportsChildSpawn:!0,supportsSessionImport:!1,supportsStatelessFsMode:!1},codex:{supportsSessionFork:!0,supportsChildSpawn:!0,supportsSessionImport:!1,supportsStatelessFsMode:!0},gemini:{supportsSessionFork:!1,supportsChildSpawn:!0,supportsSessionImport:!1,supportsStatelessFsMode:!1},opencode:{supportsSessionFork:!1,supportsChildSpawn:!0,supportsSessionImport:!1,supportsStatelessFsMode:!1},copilot:{supportsSessionFork:!1,supportsChildSpawn:!0,supportsSessionImport:!1,supportsStatelessFsMode:!1},cursor:{supportsSessionFork:!1,supportsChildSpawn:!0,supportsSessionImport:!1,supportsStatelessFsMode:!1}};function lr(e){return!e.parent_comment_id}function G(e){let t={};for(let{emoji:n,user_id:r}of e)t[n]||(t[n]=[]),t[n].push(r);return t}var ur={off:0,internal:1,readonly:2,on:3};function dr(e,t){return e?.[t]??`on`}function fr(e,t){return dr(e,t)!==`off`}function pr(e,t){return ur[dr(e,t)]>=ur.readonly}function mr(e,t=24){return e.replace(/-/g,``).slice(0,Math.min(t,32))}function hr(e){return mr(e,24)}function gr(e,t){let n=e.replace(/-/g,``).toLowerCase();if(n.length===0||!/^[0-9a-f]+$/.test(n))return[];let r=[];for(let e of t)e.id.replace(/-/g,``).toLowerCase().startsWith(n)&&r.push(e);return r}var _r=[`doc`,`memory`,`skill`,`prompt`,`guide`,`decision`,`bundle`,`external`];function K(e){if(typeof e!=`string`)return null;let t=e.trim();return t?[...t].slice(0,32).join(``):null}var vr=`agor://kb/document/`;function yr(e){return`${vr}${e}`}var br=new Set([`<`,`>`,`:`,`"`,`\\`,`|`,`?`,`*`]),xr=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\..*)?$/i,Sr=e=>[...e].some(e=>br.has(e)||e.charCodeAt(0)<32);function Cr(e){let t=e.trim().replace(/^\/+/,``).replace(/\/+/g,`/`);if(!t)throw Error(`Knowledge document path is required`);for(let e of t.split(`/`)){if(!e||e===`.`||e===`..`)throw Error(`Knowledge document path must not contain empty, "." or ".." segments`);if(Sr(e))throw Error(`Knowledge document path segments cannot contain < > : " \\\\ | ? * or control characters`);if(e.endsWith(` `)||e.endsWith(`.`))throw Error(`Knowledge document path segments cannot end with a space or period`);if(xr.test(e))throw Error(`Knowledge document path segment "${e}" is reserved on some filesystems`)}return t}function wr(e){let t=(e??``).trim().replace(/^\/+|\/+$/g,``).replace(/\/+/g,`/`);return t?Cr(t):``}function Tr(e,t={}){try{return t.allowEmpty&&!e.trim()||Cr(e),null}catch(e){return e instanceof Error?e.message:String(e)}}function q(e,t=`Untitled`){let n=e.split(/\r?\n/).map(e=>e.trim()).find(Boolean);return n&&n.replace(/^#{1,6}\s+/,``).replace(/\s+#+\s*$/,``).replace(/^\s*[-*+]\s+/,``).replace(/[*_`~]/g,``).trim()||t}var Er=function(e){return e.USER=`user`,e.ASSISTANT=`assistant`,e.SYSTEM=`system`,e}({}),Dr=function(e){return e.ONCE=`once`,e.PROJECT=`project`,e.USER=`user`,e.LOCAL=`local`,e}({}),Or=function(e){return e.PENDING=`pending`,e.APPROVED=`approved`,e.DENIED=`denied`,e.TIMED_OUT=`timed_out`,e}({}),kr={IDLE:`idle`,RUNNING:`running`,STOPPING:`stopping`,AWAITING_PERMISSION:`awaiting_permission`,AWAITING_INPUT:`awaiting_input`,TIMED_OUT:`timed_out`,COMPLETED:`completed`,FAILED:`failed`};function Ar(e){switch(e){case`gemini`:return`autoEdit`;case`codex`:return`allow-all`;case`opencode`:return`autoEdit`;case`copilot`:return`acceptEdits`;case`cursor`:return`bypassPermissions`;default:return`auto`}}function jr(e){return!!e.custom_context?.gateway_source}function Mr(e){let t=e.custom_context?.gateway_source;if(!t||typeof t!=`object`)return null;let n=t;return!n.channel_id||!n.channel_name||!n.channel_type||!n.thread_id?null:t}var Nr={QUEUED:`queued`,CREATED:`created`,RUNNING:`running`,STOPPING:`stopping`,AWAITING_PERMISSION:`awaiting_permission`,AWAITING_INPUT:`awaiting_input`,TIMED_OUT:`timed_out`,COMPLETED:`completed`,FAILED:`failed`,STOPPED:`stopped`};function Pr(e){return e===Nr.COMPLETED||e===Nr.FAILED}new Set([Nr.COMPLETED,Nr.FAILED,Nr.STOPPED,Nr.TIMED_OUT]);var Fr={SUPERADMIN:`superadmin`,ADMIN:`admin`,MEMBER:`member`,VIEWER:`viewer`},Ir=[{value:Fr.SUPERADMIN,label:`Superadmin`,description:`Full system access + branch RBAC bypass`},{value:Fr.ADMIN,label:`Admin`,description:`Manage resources (users, MCP servers, config)`},{value:Fr.MEMBER,label:`Member`,description:`Standard user`},{value:Fr.VIEWER,label:`Viewer`,description:`Read-only access`}],Lr={[Fr.VIEWER]:0,[Fr.MEMBER]:1,[Fr.ADMIN]:2,[Fr.SUPERADMIN]:3,owner:3};function Rr(e){return e===`owner`?Fr.SUPERADMIN:e||Fr.MEMBER}function zr(e,t){return(Lr[Rr(e)]??0)>=Lr[t]}var Br=[`global`,`session`],Vr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Hr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronField=void 0,e.CronField=class e{#e=!1;#t=!1;#n=!1;#r=[];options={rawValue:``};static get min(){throw Error(`min must be overridden`)}static get max(){throw Error(`max must be overridden`)}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(t,n={rawValue:``}){if(!Array.isArray(t))throw Error(`${this.constructor.name} Validation error, values is not an array`);if(!(t.length>0))throw Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...n,rawValue:n.rawValue??``},this.#r=t.sort(e.sorter),this.#n=this.options.wildcard===void 0?this.#i():this.options.wildcard,this.#e=this.options.rawValue.includes(`L`)||t.includes(`L`),this.#t=this.options.rawValue.includes(`?`)||t.includes(`?`)}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#t}get isWildcard(){return this.#n}get values(){return this.#r}static sorter(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?e-t:!n&&!r?e.localeCompare(t):n?-1:1}static findNearestValueInList(e,t,n=!1){if(n){for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null}for(let n=0;n<e.length;n++)if(e[n]>t)return e[n];return null}findNearestValue(e,t=!1){return this.constructor.findNearestValueInList(this.values,e,t)}serialize(){return{wildcard:this.#n,values:this.#r}}validate(){let e,t=this.chars.length>0?` or chars ${this.chars.join(``)}`:``,n=e=>t=>RegExp(`^\\d{0,2}${t}$`).test(e);if(!this.#r.every(t=>(e=t,typeof t==`number`?t>=this.min&&t<=this.max:this.chars.some(n(t)))))throw Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${t}`);let r=this.#r.find((e,t)=>this.#r.indexOf(e)!==t);if(r)throw Error(`${this.constructor.name} Validation error, duplicate values found: ${r}`)}#i(){return this.options.rawValue.length>0?[`*`,`?`].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).every(e=>this.#r.includes(e))}}})),Ur=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfMonth=void 0;var t=Hr(),n=1,r=31,i=Object.freeze([`L`]);e.CronDayOfMonth=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Wr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfWeek=void 0;var t=Hr(),n=0,r=7,i=Object.freeze([`L`]);e.CronDayOfWeek=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}}})),Gr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronHour=void 0;var t=Hr(),n=0,r=23,i=Object.freeze([]);e.CronHour=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Kr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMinute=void 0;var t=Hr(),n=0,r=59,i=Object.freeze([]);e.CronMinute=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),qr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{},n=class extends t{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},r=class extends t{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},i=class extends t{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},a=class extends t{},o=class extends t{constructor(e){super(`Invalid unit ${e}`)}},s=class extends t{},c=class extends t{constructor(){super(`Zone is an abstract class`)}},l=`numeric`,u=`short`,d=`long`,f={year:l,month:l,day:l},p={year:l,month:u,day:l},m={year:l,month:u,day:l,weekday:u},h={year:l,month:d,day:l},g={year:l,month:d,day:l,weekday:d},_={hour:l,minute:l},v={hour:l,minute:l,second:l},y={hour:l,minute:l,second:l,timeZoneName:u},b={hour:l,minute:l,second:l,timeZoneName:d},x={hour:l,minute:l,hourCycle:`h23`},S={hour:l,minute:l,second:l,hourCycle:`h23`},C={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:u},w={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:d},ee={year:l,month:l,day:l,hour:l,minute:l},te={year:l,month:l,day:l,hour:l,minute:l,second:l},ne={year:l,month:u,day:l,hour:l,minute:l},T={year:l,month:u,day:l,hour:l,minute:l,second:l},re={year:l,month:u,day:l,weekday:u,hour:l,minute:l},ie={year:l,month:d,day:l,hour:l,minute:l,timeZoneName:u},ae={year:l,month:d,day:l,hour:l,minute:l,second:l,timeZoneName:u},E={year:l,month:d,day:l,weekday:d,hour:l,minute:l,timeZoneName:d},oe={year:l,month:d,day:l,weekday:d,hour:l,minute:l,second:l,timeZoneName:d},D=class{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}},se=null,O=class e extends D{static get instance(){return se===null&&(se=new e),se}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Ft(e,t,n)}formatOffset(e,t){return zt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},ce=new Map;function le(e){let t=ce.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,era:`short`}),ce.set(e,t)),t}var ue={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function de(e,t){let n=e.format(t).replace(/\u200E/g,``),[,r,i,a,o,s,c,l]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[a,r,i,o,s,c,l]}function fe(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=ue[t];t===`era`?r[a]=i:R(a)||(r[a]=parseInt(i,10))}return r}var pe=new Map,k=class e extends D{static create(t){let n=pe.get(t);return n===void 0&&pe.set(t,n=new e(t)),n}static resetCache(){pe.clear(),ce.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return`iana`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Ft(e,t,n,this.name)}formatOffset(e,t){return zt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=le(this.name),[r,i,a,o,s,c,l]=n.formatToParts?fe(n,t):de(n,t);o===`BC`&&(r=-Math.abs(r)+1);let u=jt({year:r,month:i,day:a,hour:s===24?0:s,minute:c,second:l,millisecond:0}),d=+t,f=d%1e3;return d-=f>=0?f:1e3+f,(u-d)/(60*1e3)}equals(e){return e.type===`iana`&&e.name===this.name}get isValid(){return this.valid}},me={};function he(e,t={}){let n=JSON.stringify([e,t]),r=me[n];return r||(r=new Intl.ListFormat(e,t),me[n]=r),r}var ge=new Map;function A(e,t={}){let n=JSON.stringify([e,t]),r=ge.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),ge.set(n,r)),r}var _e=new Map;function ve(e,t={}){let n=JSON.stringify([e,t]),r=_e.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),_e.set(n,r)),r}var ye=new Map;function be(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=ye.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),ye.set(i,a)),a}var j=null;function xe(){return j||(j=new Intl.DateTimeFormat().resolvedOptions().locale,j)}var M=new Map;function Se(e){let t=M.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),M.set(e,t)),t}var Ce=new Map;function N(e){let t=Ce.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...Ne,...t}),Ce.set(e,t)}return t}function we(e){let t=e.indexOf(`-x-`);t!==-1&&(e=e.substring(0,t));let n=e.indexOf(`-u-`);if(n===-1)return[e];{let t,r;try{t=A(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=A(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function Te(e,t,n){return n||t?(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}function Ee(e){let t=[];for(let n=1;n<=12;n++){let r=J.utc(2009,n,1);t.push(e(r))}return t}function De(e){let t=[];for(let n=1;n<=7;n++){let r=J.utc(2016,11,13+n);t.push(e(r))}return t}function Oe(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function ke(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||Se(e.locale).numberingSystem===`latn`}var Ae=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:r,floor:i,...a}=n;if(!t||Object.keys(a).length>0){let t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=ve(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else return V(this.floor?Math.floor(e):Dt(e,3),this.padTo)}},je=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type===`fixed`){let t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;e.offset!==0&&k.create(n).valid?(r=n,this.dt=e):(r=`UTC`,this.dt=e.offset===0?e:e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type===`system`?this.dt=e:e.zone.type===`iana`?(this.dt=e,r=e.zone.name):(r=`UTC`,this.dt=e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=A(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(``):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if(e.type===`timeZoneName`){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}else return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},Me=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&_t()&&(this.rtf=be(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):an(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},Ne={firstDay:1,minimalDays:4,weekend:[6,7]},P=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,i,a=!1){let o=t||I.defaultLocale;return new e(o||(a?`en-US`:xe()),n||I.defaultNumberingSystem,r||I.defaultOutputCalendar,Ct(i)||I.defaultWeekSettings,o)}static resetCache(){j=null,ge.clear(),_e.clear(),ye.clear(),M.clear(),Ce.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return e.create(t,n,r,i)}constructor(e,t,n,r,i){let[a,o,s]=we(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=Te(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached??=ke(this),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem===`latn`)&&(this.outputCalendar===null||this.outputCalendar===`gregory`);return e&&t?`en`:`intl`}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Ct(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Oe(this,e,Wt,()=>{let n=this.intl===`ja`||this.intl.startsWith(`ja-`);t&=!n;let r=t?{month:e,day:`numeric`}:{month:e},i=t?`format`:`standalone`;if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,`month`);this.monthsCache[i][e]=Ee(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Oe(this,e,Jt,()=>{let n=t?{weekday:e,year:`numeric`,month:`long`,day:`numeric`}:{weekday:e},r=t?`format`:`standalone`;return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=De(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return Oe(this,void 0,()=>Yt,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[J.utc(2016,11,13,9),J.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return Oe(this,e,$t,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[J.utc(-40,1,1),J.utc(2017,1,1)].map(e=>this.extract(e,t,`era`))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Ae(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new je(e,this.intl,t)}relFormatter(e={}){return new Me(this.intl,this.isEnglish(),e)}listFormatter(e={}){return he(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||Se(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:vt()?N(this.locale):Ne}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},Pe=null,F=class e extends D{static get utcInstance(){return Pe===null&&(Pe=new e(0)),Pe}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(It(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${zt(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${zt(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return zt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type===`fixed`&&e.fixed===this.fixed}get isValid(){return!0}},Fe=class extends D{constructor(e){super(),this.zoneName=e}get type(){return`invalid`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return``}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Ie(e,t){if(R(e)||e===null)return t;if(e instanceof D)return e;if(z(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?O.instance:n===`utc`||n===`gmt`?F.utcInstance:F.parseSpecifier(n)||k.create(e)}else if(mt(e))return F.instance(e);else if(typeof e==`object`&&`offset`in e&&typeof e.offset==`function`)return e;else return new Fe(e)}var Le={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},Re={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ze=Le.hanidec.replace(/[\[|\]]/g,``).split(``);function Be(e){let t=parseInt(e,10);if(isNaN(t)){t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(e[n].search(Le.hanidec)!==-1)t+=ze.indexOf(e[n]);else for(let e in Re){let[n,i]=Re[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}else return t}var Ve=new Map;function He(){Ve.clear()}function Ue({numberingSystem:e},t=``){let n=e||`latn`,r=Ve.get(n);r===void 0&&(r=new Map,Ve.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${Le[n]}${t}`),r.set(t,i)),i}var We=()=>Date.now(),Ge=`system`,Ke=null,qe=null,Je=null,Ye=60,Xe,Ze=null,I=class{static get now(){return We}static set now(e){We=e}static set defaultZone(e){Ge=e}static get defaultZone(){return Ie(Ge,O.instance)}static get defaultLocale(){return Ke}static set defaultLocale(e){Ke=e}static get defaultNumberingSystem(){return qe}static set defaultNumberingSystem(e){qe=e}static get defaultOutputCalendar(){return Je}static set defaultOutputCalendar(e){Je=e}static get defaultWeekSettings(){return Ze}static set defaultWeekSettings(e){Ze=Ct(e)}static get twoDigitCutoffYear(){return Ye}static set twoDigitCutoffYear(e){Ye=e%100}static get throwOnInvalid(){return Xe}static set throwOnInvalid(e){Xe=e}static resetCaches(){P.resetCache(),k.resetCache(),J.resetCache(),He()}},Qe=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},$e=[0,31,59,90,120,151,181,212,243,273,304,334],et=[0,31,60,91,121,152,182,213,244,274,305,335];function L(e,t){return new Qe(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function tt(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function nt(e,t,n){return n+(Ot(e)?et:$e)[t-1]}function rt(e,t){let n=Ot(e)?et:$e,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function it(e,t){return(e-t+7)%7+1}function at(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=nt(r,i,a),s=it(tt(r,i,a),n),c=Math.floor((o-s+14-t)/7),l;return c<1?(l=r-1,c=Nt(l,t,n)):c>Nt(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:s,...Bt(e)}}function ot(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=it(tt(r,1,t),n),s=kt(r),c=i*7+a-o-7+t,l;c<1?(l=r-1,c+=kt(l)):c>s?(l=r+1,c-=kt(r)):l=r;let{month:u,day:d}=rt(l,c);return{year:l,month:u,day:d,...Bt(e)}}function st(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:nt(t,n,r),...Bt(e)}}function ct(e){let{year:t,ordinal:n}=e,{month:r,day:i}=rt(t,n);return{year:t,month:r,day:i,...Bt(e)}}function lt(e,t){if(!R(e.localWeekday)||!R(e.localWeekNumber)||!R(e.localWeekYear)){if(!R(e.weekday)||!R(e.weekNumber)||!R(e.weekYear))throw new a(`Cannot mix locale-based week fields with ISO-based week fields`);return R(e.localWeekday)||(e.weekday=e.localWeekday),R(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),R(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function ut(e,t=4,n=1){let r=ht(e.weekYear),i=B(e.weekNumber,1,Nt(e.weekYear,t,n)),a=B(e.weekday,1,7);return r?i?a?!1:L(`weekday`,e.weekday):L(`week`,e.weekNumber):L(`weekYear`,e.weekYear)}function dt(e){let t=ht(e.year),n=B(e.ordinal,1,kt(e.year));return t?n?!1:L(`ordinal`,e.ordinal):L(`year`,e.year)}function ft(e){let t=ht(e.year),n=B(e.month,1,12),r=B(e.day,1,At(e.year,e.month));return t?n?r?!1:L(`day`,e.day):L(`month`,e.month):L(`year`,e.year)}function pt(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=B(t,0,23)||t===24&&n===0&&r===0&&i===0,o=B(n,0,59),s=B(r,0,59),c=B(i,0,999);return a?o?s?c?!1:L(`millisecond`,i):L(`second`,r):L(`minute`,n):L(`hour`,t)}function R(e){return e===void 0}function mt(e){return typeof e==`number`}function ht(e){return typeof e==`number`&&e%1==0}function z(e){return typeof e==`string`}function gt(e){return Object.prototype.toString.call(e)===`[object Date]`}function _t(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function vt(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function yt(e){return Array.isArray(e)?e:[e]}function bt(e,t,n){if(e.length!==0)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function xt(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function St(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ct(e){if(e==null)return null;if(typeof e!=`object`)throw new s(`Week settings must be an object`);if(!B(e.firstDay,1,7)||!B(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!B(e,1,7)))throw new s(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function B(e,t,n){return ht(e)&&e>=t&&e<=n}function wt(e,t){return e-t*Math.floor(e/t)}function V(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function Tt(e){if(!(R(e)||e===null||e===``))return parseInt(e,10)}function H(e){if(!(R(e)||e===null||e===``))return parseFloat(e)}function Et(e){if(!(R(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function Dt(e,t,n=`round`){let r=10**t;switch(n){case`expand`:return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case`trunc`:return Math.trunc(e*r)/r;case`round`:return Math.round(e*r)/r;case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function Ot(e){return e%4==0&&(e%100!=0||e%400==0)}function kt(e){return Ot(e)?366:365}function At(e,t){let n=wt(t-1,12)+1,r=e+(t-n)/12;return n===2?Ot(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function jt(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Mt(e,t,n){return-it(tt(e,1,t),n)+t-1}function Nt(e,t=4,n=1){let r=Mt(e,t,n),i=Mt(e+1,t,n);return(kt(e)-r+i)/7}function Pt(e){return e>99?e:e>I.twoDigitCutoffYear?1900+e:2e3+e}function Ft(e,t,n,r=null){let i=new Date(e),a={hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`};r&&(a.timeZone=r);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(e=>e.type.toLowerCase()===`timezonename`);return s?s.value:null}function It(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Lt(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new s(`Invalid unit value ${e}`);return t}function Rt(e,t){let n={};for(let r in e)if(St(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=Lt(i)}return n}function zt(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?`+`:`-`;switch(t){case`short`:return`${i}${V(n,2)}:${V(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${V(n,2)}${V(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function Bt(e){return xt(e,[`hour`,`minute`,`second`,`millisecond`])}var Vt=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Ht=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Ut=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`];function Wt(e){switch(e){case`narrow`:return[...Ut];case`short`:return[...Ht];case`long`:return[...Vt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`];case`2-digit`:return[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`];default:return null}}var Gt=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],Kt=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],qt=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];function Jt(e){switch(e){case`narrow`:return[...qt];case`short`:return[...Kt];case`long`:return[...Gt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}var Yt=[`AM`,`PM`],Xt=[`Before Christ`,`Anno Domini`],Zt=[`BC`,`AD`],Qt=[`B`,`A`];function $t(e){switch(e){case`narrow`:return[...Qt];case`short`:return[...Zt];case`long`:return[...Xt];default:return null}}function en(e){return Yt[e.hour<12?0:1]}function tn(e,t){return Jt(t)[e.weekday-1]}function nn(e,t){return Wt(t)[e.month-1]}function rn(e,t){return $t(t)[e.year<0?0:1]}function an(e,t,n=`always`,r=!1){let i={years:[`year`,`yr.`],quarters:[`quarter`,`qtr.`],months:[`month`,`mo.`],weeks:[`week`,`wk.`],days:[`day`,`day`,`days`],hours:[`hour`,`hr.`],minutes:[`minute`,`min.`],seconds:[`second`,`sec.`]},a=[`hours`,`minutes`,`seconds`].indexOf(e)===-1;if(n===`auto`&&a){let n=e===`days`;switch(t){case 1:return n?`tomorrow`:`next ${i[e][0]}`;case-1:return n?`yesterday`:`last ${i[e][0]}`;case 0:return n?`today`:`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),c=s===1,l=i[e],u=r?c?l[1]:l[2]||l[1]:c?i[e][0]:e;return o?`${s} ${u} ago`:`in ${s} ${u}`}function on(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}var sn={D:f,DD:p,DDD:h,DDDD:g,t:_,tt:v,ttt:y,tttt:b,T:x,TT:S,TTT:C,TTTT:w,f:ee,ff:ne,fff:ie,ffff:E,F:te,FF:T,FFF:ae,FFFF:oe},cn=class e{static create(t,n={}){return new e(t,n)}static parseFormat(e){let t=null,n=``,r=!1,i=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o===`'`?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:n===``?`'`:n}),t=null,n=``,r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return sn[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return V(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(t,n){let r=this.loc.listingMode()===`en`,i=this.loc.outputCalendar&&this.loc.outputCalendar!==`gregory`,a=(e,n)=>this.loc.extract(t,e,n),o=e=>t.isOffsetFixed&&t.offset===0&&e.allowZ?`Z`:t.isValid?t.zone.formatOffset(t.ts,e.format):``,s=()=>r?en(t):a({hour:`numeric`,hourCycle:`h12`},`dayperiod`),c=(e,n)=>r?nn(t,e):a(n?{month:e}:{month:e,day:`numeric`},`month`),l=(e,n)=>r?tn(t,e):a(n?{weekday:e}:{weekday:e,month:`long`,day:`numeric`},`weekday`),u=n=>{let r=e.macroTokenToFormatOpts(n);return r?this.formatWithSystemDefault(t,r):n},d=e=>r?rn(t,e):a({era:e},`era`);return on(e.parseFormat(n),e=>{switch(e){case`S`:return this.num(t.millisecond);case`u`:case`SSS`:return this.num(t.millisecond,3);case`s`:return this.num(t.second);case`ss`:return this.num(t.second,2);case`uu`:return this.num(Math.floor(t.millisecond/10),2);case`uuu`:return this.num(Math.floor(t.millisecond/100));case`m`:return this.num(t.minute);case`mm`:return this.num(t.minute,2);case`h`:return this.num(t.hour%12==0?12:t.hour%12);case`hh`:return this.num(t.hour%12==0?12:t.hour%12,2);case`H`:return this.num(t.hour);case`HH`:return this.num(t.hour,2);case`Z`:return o({format:`narrow`,allowZ:this.opts.allowZ});case`ZZ`:return o({format:`short`,allowZ:this.opts.allowZ});case`ZZZ`:return o({format:`techie`,allowZ:this.opts.allowZ});case`ZZZZ`:return t.zone.offsetName(t.ts,{format:`short`,locale:this.loc.locale});case`ZZZZZ`:return t.zone.offsetName(t.ts,{format:`long`,locale:this.loc.locale});case`z`:return t.zoneName;case`a`:return s();case`d`:return i?a({day:`numeric`},`day`):this.num(t.day);case`dd`:return i?a({day:`2-digit`},`day`):this.num(t.day,2);case`c`:return this.num(t.weekday);case`ccc`:return l(`short`,!0);case`cccc`:return l(`long`,!0);case`ccccc`:return l(`narrow`,!0);case`E`:return this.num(t.weekday);case`EEE`:return l(`short`,!1);case`EEEE`:return l(`long`,!1);case`EEEEE`:return l(`narrow`,!1);case`L`:return i?a({month:`numeric`,day:`numeric`},`month`):this.num(t.month);case`LL`:return i?a({month:`2-digit`,day:`numeric`},`month`):this.num(t.month,2);case`LLL`:return c(`short`,!0);case`LLLL`:return c(`long`,!0);case`LLLLL`:return c(`narrow`,!0);case`M`:return i?a({month:`numeric`},`month`):this.num(t.month);case`MM`:return i?a({month:`2-digit`},`month`):this.num(t.month,2);case`MMM`:return c(`short`,!1);case`MMMM`:return c(`long`,!1);case`MMMMM`:return c(`narrow`,!1);case`y`:return i?a({year:`numeric`},`year`):this.num(t.year);case`yy`:return i?a({year:`2-digit`},`year`):this.num(t.year.toString().slice(-2),2);case`yyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,4);case`yyyyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,6);case`G`:return d(`short`);case`GG`:return d(`long`);case`GGGGG`:return d(`narrow`);case`kk`:return this.num(t.weekYear.toString().slice(-2),2);case`kkkk`:return this.num(t.weekYear,4);case`W`:return this.num(t.weekNumber);case`WW`:return this.num(t.weekNumber,2);case`n`:return this.num(t.localWeekNumber);case`nn`:return this.num(t.localWeekNumber,2);case`ii`:return this.num(t.localWeekYear.toString().slice(-2),2);case`iiii`:return this.num(t.localWeekYear,4);case`o`:return this.num(t.ordinal);case`ooo`:return this.num(t.ordinal,3);case`q`:return this.num(t.quarter);case`qq`:return this.num(t.quarter,2);case`X`:return this.num(Math.floor(t.ts/1e3));case`x`:return this.num(t.ts);default:return u(e)}})}formatDurationFromString(t,n){let r=this.opts.signMode===`negativeLargestOnly`?-1:1,i=e=>{switch(e[0]){case`S`:return`milliseconds`;case`s`:return`seconds`;case`m`:return`minutes`;case`h`:return`hours`;case`d`:return`days`;case`w`:return`weeks`;case`M`:return`months`;case`y`:return`years`;default:return null}},a=(e,t)=>n=>{let a=i(n);if(a){let i=t.isNegativeDuration&&a!==t.largestUnit?r:1,o;return o=this.opts.signMode===`negativeLargestOnly`&&a!==t.largestUnit?`never`:this.opts.signMode===`all`?`always`:`auto`,this.num(e.get(a)*i,n.length,o)}else return n},o=e.parseFormat(n),s=o.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),c=t.shiftTo(...s.map(i).filter(e=>e));return on(o,a(c,{isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]}))}},ln=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function un(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function U(...e){return t=>e.reduce(([e,n,r],i)=>{let[a,o,s]=i(t,r);return[{...e,...a},o||n,s]},[{},null,1]).slice(0,2)}function dn(e,...t){if(e==null)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function fn(...e){return(t,n)=>{let r={},i;for(i=0;i<e.length;i++)r[e[i]]=Tt(t[n+i]);return[r,null,n+i]}}var pn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,mn=`(?:${pn.source}?(?:\\[(${ln.source})\\])?)?`,hn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,W=RegExp(`${hn.source}${mn}`),gn=RegExp(`(?:[Tt]${W.source})?`),_n=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,vn=/(\d{4})-?W(\d\d)(?:-?(\d))?/,yn=/(\d{4})-?(\d{3})/,bn=fn(`weekYear`,`weekNumber`,`weekDay`),xn=fn(`year`,`ordinal`),Sn=/(\d{4})-(\d\d)-(\d\d)/,Cn=RegExp(`${hn.source} ?(?:${pn.source}|(${ln.source}))?`),wn=RegExp(`(?: ${Cn.source})?`);function Tn(e,t,n){let r=e[t];return R(r)?n:Tt(r)}function En(e,t){return[{year:Tn(e,t),month:Tn(e,t+1,1),day:Tn(e,t+2,1)},null,t+3]}function Dn(e,t){return[{hours:Tn(e,t,0),minutes:Tn(e,t+1,0),seconds:Tn(e,t+2,0),milliseconds:Et(e[t+3])},null,t+4]}function On(e,t){let n=!e[t]&&!e[t+1],r=It(e[t+1],e[t+2]);return[{},n?null:F.instance(r),t+3]}function kn(e,t){return[{},e[t]?k.create(e[t]):null,t+1]}var An=RegExp(`^T?${hn.source}$`),jn=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Mn(e){let[t,n,r,i,a,o,s,c,l]=e,u=t[0]===`-`,d=c&&c[0]===`-`,f=(e,t=!1)=>e!==void 0&&(t||e&&u)?-e:e;return[{years:f(H(n)),months:f(H(r)),weeks:f(H(i)),days:f(H(a)),hours:f(H(o)),minutes:f(H(s)),seconds:f(H(c),c===`-0`),milliseconds:f(Et(l),d)}]}var Nn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pn(e,t,n,r,i,a,o){let s={year:t.length===2?Pt(Tt(t)):Tt(t),month:Ht.indexOf(n)+1,day:Tt(r),hour:Tt(i),minute:Tt(a)};return o&&(s.second=Tt(o)),e&&(s.weekday=e.length>3?Gt.indexOf(e)+1:Kt.indexOf(e)+1),s}var Fn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function In(e){let[,t,n,r,i,a,o,s,c,l,u,d]=e,f=Pn(t,i,r,n,a,o,s),p;return p=c?Nn[c]:l?0:It(u,d),[f,new F(p)]}function Ln(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}var Rn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,zn=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Bn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Vn(e){let[,t,n,r,i,a,o,s]=e;return[Pn(t,i,r,n,a,o,s),F.utcInstance]}function Hn(e){let[,t,n,r,i,a,o,s]=e;return[Pn(t,s,n,r,i,a,o),F.utcInstance]}var Un=un(_n,gn),Wn=un(vn,gn),Gn=un(yn,gn),Kn=un(W),qn=U(En,Dn,On,kn),Jn=U(bn,Dn,On,kn),Yn=U(xn,Dn,On,kn),Xn=U(Dn,On,kn);function Zn(e){return dn(e,[Un,qn],[Wn,Jn],[Gn,Yn],[Kn,Xn])}function Qn(e){return dn(Ln(e),[Fn,In])}function $n(e){return dn(e,[Rn,Vn],[zn,Vn],[Bn,Hn])}function er(e){return dn(e,[jn,Mn])}var tr=U(Dn);function nr(e){return dn(e,[An,tr])}var rr=un(Sn,wn),ir=un(Cn),ar=U(Dn,On,kn);function or(e){return dn(e,[rr,qn],[ir,ar])}var sr=`Invalid Duration`,cr={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},lr={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...cr},G=146097/400,ur=146097/4800,dr={years:{quarters:4,months:12,weeks:G/7,days:G,hours:G*24,minutes:G*24*60,seconds:G*24*60*60,milliseconds:G*24*60*60*1e3},quarters:{months:3,weeks:G/28,days:G/4,hours:G*24/4,minutes:G*24*60/4,seconds:G*24*60*60/4,milliseconds:G*24*60*60*1e3/4},months:{weeks:ur/7,days:ur,hours:ur*24,minutes:ur*24*60,seconds:ur*24*60*60,milliseconds:ur*24*60*60*1e3},...cr},fr=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],pr=fr.slice(0).reverse();function mr(e,t,n=!1){return new K({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function hr(e,t){let n=t.milliseconds??0;for(let r of pr.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function gr(e,t){let n=hr(e,t)<0?-1:1;fr.reduceRight((r,i)=>{if(R(t[i]))return r;if(r){let a=t[r]*n,o=e[i][r],s=Math.floor(a/o);t[i]+=s*n,t[r]-=s*o*n}return i},null),fr.reduce((n,r)=>{if(R(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function _r(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}var K=class e{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?dr:lr;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||P.create(),this.conversionAccuracy=t?`longterm`:`casual`,this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,n){return e.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(typeof t!=`object`||!t)throw new s(`Duration.fromObject: argument expected to be an object, got ${t===null?`null`:typeof t}`);return new e({values:Rt(t,e.normalizeUnit),loc:P.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(mt(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t==`object`)return e.fromObject(t);throw new s(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){let[r]=er(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){let[r]=nr(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Duration is invalid`);let r=t instanceof Qe?t:new Qe(t,n);if(I.throwOnInvalid)throw new i(r);return new e({invalid:r})}static normalizeUnit(e){let t={year:`years`,years:`years`,quarter:`quarters`,quarters:`quarters`,month:`months`,months:`months`,week:`weeks`,weeks:`weeks`,day:`days`,days:`days`,hour:`hours`,hours:`hours`,minute:`minutes`,minutes:`minutes`,second:`seconds`,seconds:`seconds`,millisecond:`milliseconds`,milliseconds:`milliseconds`}[e&&e.toLowerCase()];if(!t)throw new o(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?cn.create(this.loc,n).formatDurationFromString(this,e):sr}toHuman(e={}){if(!this.isValid)return sr;let t=e.showZeros!==!1,n=fr.map(n=>{let r=this.values[n];return R(r)||r===0&&!t?null:this.loc.numberFormatter({style:`unit`,unitDisplay:`long`,...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:`conjunction`,style:e.listStyle||`narrow`,...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e=`P`;return this.years!==0&&(e+=this.years+`Y`),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+`M`),this.weeks!==0&&(e+=this.weeks+`W`),this.days!==0&&(e+=this.days+`D`),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+=`T`),this.hours!==0&&(e+=this.hours+`H`),this.minutes!==0&&(e+=this.minutes+`M`),(this.seconds!==0||this.milliseconds!==0)&&(e+=Dt(this.seconds+this.milliseconds/1e3,3)+`S`),e===`P`&&(e+=`T0S`),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:`extended`,...e,includeOffset:!1},J.fromMillis(t,{zone:`UTC`}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t),r={};for(let e of fr)(St(n.values,e)||St(this.values,e))&&(r[e]=n.get(e)+this.get(e));return mr(this,{values:r},!0)}minus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=Lt(e(this.values[n],n));return mr(this,{values:t},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let n={...this.values,...Rt(t,e.normalizeUnit)};return mr(this,{values:n})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){let i={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n};return mr(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return gr(this.matrix,e),mr(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=_r(this.normalize().shiftToAll().toObject());return mr(this,{values:e},!0)}shiftTo(...t){if(!this.isValid||t.length===0)return this;t=t.map(t=>e.normalizeUnit(t));let n={},r={},i=this.toObject(),a;for(let e of fr)if(t.indexOf(e)>=0){a=e;let t=0;for(let n in r)t+=this.matrix[n][e]*r[n],r[n]=0;mt(i[e])&&(t+=i[e]);let o=Math.trunc(t);n[e]=o,r[e]=(t*1e3-o*1e3)/1e3}else mt(i[e])&&(r[e]=i[e]);for(let e in r)r[e]!==0&&(n[a]+=e===a?r[e]:r[e]/this.matrix[a][e]);return gr(this.matrix,n),mr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo(`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return mr(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=_r(this.values);return mr(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(e,t){return e===void 0||e===0?t===void 0||t===0:e===t}for(let n of fr)if(!t(this.values[n],e.values[n]))return!1;return!0}},vr=`Invalid Interval`;function yr(e,t){return!e||!e.isValid?br.invalid(`missing or invalid start`):!t||!t.isValid?br.invalid(`missing or invalid end`):t<e?br.invalid(`end before start`,`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var br=class e{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Interval is invalid`);let i=t instanceof Qe?t:new Qe(t,n);if(I.throwOnInvalid)throw new r(i);return new e({invalid:i})}static fromDateTimes(t,n){let r=Si(t),i=Si(n);return yr(r,i)??new e({start:r,end:i})}static after(t,n){let r=K.fromDurationLike(n),i=Si(t);return e.fromDateTimes(i,i.plus(r))}static before(t,n){let r=K.fromDurationLike(n),i=Si(t);return e.fromDateTimes(i.minus(r),i)}static fromISO(t,n){let[r,i]=(t||``).split(`/`,2);if(r&&i){let t,a;try{t=J.fromISO(r,n),a=t.isValid}catch{a=!1}let o,s;try{o=J.fromISO(i,n),s=o.isValid}catch{s=!1}if(a&&s)return e.fromDateTimes(t,o);if(a){let r=K.fromISO(i,n);if(r.isValid)return e.after(t,r)}else if(s){let t=K.fromISO(r,n);if(t.isValid)return e.before(o,t)}}return e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e=`milliseconds`){return this.isValid?this.toDuration(e).get(e):NaN}count(e=`milliseconds`,t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),r;return r=t!=null&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:t,end:n}={}){return this.isValid?e.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];let n=t.map(Si).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[],{s:i}=this,a=0;for(;i<this.e;){let t=n[a]||this.e,o=+t>+this.e?this.e:t;r.push(e.fromDateTimes(i,o)),i=o,a+=1}return r}splitBy(t){let n=K.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as(`milliseconds`)===0)return[];let{s:r}=this,i=1,a,o=[];for(;r<this.e;){let t=this.start.plus(n.mapUnits(e=>e*i));a=+t>+this.e?this.e:t,o.push(e.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(t){if(!this.isValid)return this;let n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:e.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;let n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(t){let n=null,r=0,i=[],a=t.map(e=>[{time:e.s,type:`s`},{time:e.e,type:`e`}]),o=Array.prototype.concat(...a).sort((e,t)=>e.time-t.time);for(let t of o)r+=t.type===`s`?1:-1,r===1?n=t.time:(n&&+n!=+t.time&&i.push(e.fromDateTimes(n,t.time)),n=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:vr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?cn.create(this.s.loc.clone(t),e).formatInterval(this):vr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:vr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:vr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:vr}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:vr}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):K.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},xr=class{static hasDST(e=I.defaultZone){let t=J.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return k.isValidZone(e)}static normalizeZone(e){return Ie(e,I.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||P.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||P.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||P.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||P.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||P.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||P.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||P.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return P.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return P.create(t,null,`gregory`).eras(e)}static features(){return{relative:_t(),localeWeek:vt()}}};function Sr(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),r=n(t)-n(e);return Math.floor(K.fromMillis(r).as(`days`))}function Cr(e,t,n){let r=[[`years`,(e,t)=>t.year-e.year],[`quarters`,(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],[`months`,(e,t)=>t.month-e.month+(t.year-e.year)*12],[`weeks`,(e,t)=>{let n=Sr(e,t);return(n-n%7)/7}],[`days`,Sr]],i={},a=e,o,s;for(let[c,l]of r)n.indexOf(c)>=0&&(o=c,i[c]=l(e,t),s=a.plus(i),s>t?(i[c]--,e=a.plus(i),e>t&&(s=e,i[c]--,e=a.plus(i))):e=s);return[e,i,s,o]}function wr(e,t,n,r){let[i,a,o,s]=Cr(e,t,n),c=t-i,l=n.filter(e=>[`hours`,`minutes`,`seconds`,`milliseconds`].indexOf(e)>=0);l.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+c/(o-i)));let u=K.fromObject(a,r);return l.length>0?K.fromMillis(c,r).shiftTo(...l).plus(u):u}var Tr=`missing Intl.DateTimeFormat.formatToParts support`;function q(e,t=e=>e){return{regex:e,deser:([e])=>t(Be(e))}}var Er=`[ \xA0]`,Dr=new RegExp(Er,`g`);function Or(e){return e.replace(/\./g,`\\.?`).replace(Dr,Er)}function kr(e){return e.replace(/\./g,``).replace(Dr,` `).toLowerCase()}function Ar(e,t){return e===null?null:{regex:RegExp(e.map(Or).join(`|`)),deser:([n])=>e.findIndex(e=>kr(n)===kr(e))+t}}function jr(e,t){return{regex:e,deser:([,e,t])=>It(e,t),groups:t}}function Mr(e){return{regex:e,deser:([e])=>e}}function Nr(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function Pr(e,t){let n=Ue(t),r=Ue(t,`{2}`),i=Ue(t,`{3}`),a=Ue(t,`{4}`),o=Ue(t,`{6}`),s=Ue(t,`{1,2}`),c=Ue(t,`{1,3}`),l=Ue(t,`{1,6}`),u=Ue(t,`{1,9}`),d=Ue(t,`{2,4}`),f=Ue(t,`{4,6}`),p=e=>({regex:RegExp(Nr(e.val)),deser:([e])=>e,literal:!0}),m=(m=>{if(e.literal)return p(m);switch(m.val){case`G`:return Ar(t.eras(`short`),0);case`GG`:return Ar(t.eras(`long`),0);case`y`:return q(l);case`yy`:return q(d,Pt);case`yyyy`:return q(a);case`yyyyy`:return q(f);case`yyyyyy`:return q(o);case`M`:return q(s);case`MM`:return q(r);case`MMM`:return Ar(t.months(`short`,!0),1);case`MMMM`:return Ar(t.months(`long`,!0),1);case`L`:return q(s);case`LL`:return q(r);case`LLL`:return Ar(t.months(`short`,!1),1);case`LLLL`:return Ar(t.months(`long`,!1),1);case`d`:return q(s);case`dd`:return q(r);case`o`:return q(c);case`ooo`:return q(i);case`HH`:return q(r);case`H`:return q(s);case`hh`:return q(r);case`h`:return q(s);case`mm`:return q(r);case`m`:return q(s);case`q`:return q(s);case`qq`:return q(r);case`s`:return q(s);case`ss`:return q(r);case`S`:return q(c);case`SSS`:return q(i);case`u`:return Mr(u);case`uu`:return Mr(s);case`uuu`:return q(n);case`a`:return Ar(t.meridiems(),0);case`kkkk`:return q(a);case`kk`:return q(d,Pt);case`W`:return q(s);case`WW`:return q(r);case`E`:case`c`:return q(n);case`EEE`:return Ar(t.weekdays(`short`,!1),1);case`EEEE`:return Ar(t.weekdays(`long`,!1),1);case`ccc`:return Ar(t.weekdays(`short`,!0),1);case`cccc`:return Ar(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return jr(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return jr(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return Mr(/[a-z_+-/]{1,256}?/i);case` `:return Mr(/[^\S\n\r]/);default:return p(m)}})(e)||{invalidReason:Tr};return m.token=e,m}var Fr={year:{"2-digit":`yy`,numeric:`yyyyy`},month:{numeric:`M`,"2-digit":`MM`,short:`MMM`,long:`MMMM`},day:{numeric:`d`,"2-digit":`dd`},weekday:{short:`EEE`,long:`EEEE`},dayperiod:`a`,dayPeriod:`a`,hour12:{numeric:`h`,"2-digit":`hh`},hour24:{numeric:`H`,"2-digit":`HH`},minute:{numeric:`m`,"2-digit":`mm`},second:{numeric:`s`,"2-digit":`ss`},timeZoneName:{long:`ZZZZZ`,short:`ZZZ`}};function Ir(e,t,n){let{type:r,value:i}=e;if(r===`literal`){let e=/^\s+$/.test(i);return{literal:!e,val:e?` `:i}}let a=t[r],o=r;r===`hour`&&(o=t.hour12==null?t.hourCycle==null?n.hour12?`hour12`:`hour24`:t.hourCycle===`h11`||t.hourCycle===`h12`?`hour12`:`hour24`:t.hour12?`hour12`:`hour24`);let s=Fr[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function Lr(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function Rr(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(St(n,i)){let a=n[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+o))),t+=o}return[r,e]}else return[r,{}]}function zr(e){let t=e=>{switch(e){case`S`:return`millisecond`;case`s`:return`second`;case`m`:return`minute`;case`h`:case`H`:return`hour`;case`d`:return`day`;case`o`:return`ordinal`;case`L`:case`M`:return`month`;case`y`:return`year`;case`E`:case`c`:return`weekday`;case`W`:return`weekNumber`;case`k`:return`weekYear`;case`q`:return`quarter`;default:return null}},n=null,r;return R(e.z)||(n=k.create(e.z)),R(e.Z)||(n||=new F(e.Z),r=e.Z),R(e.q)||(e.M=(e.q-1)*3+1),R(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),R(e.u)||(e.S=Et(e.u)),[Object.keys(e).reduce((n,r)=>{let i=t(r);return i&&(n[i]=e[r]),n},{}),n,r]}var Br=null;function Vr(){return Br||=J.fromMillis(1555555555555),Br}function Hr(e,t){if(e.literal)return e;let n=qr(cn.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function Ur(e,t){return Array.prototype.concat(...e.map(e=>Hr(e,t)))}var Wr=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Ur(cn.parseFormat(t),e),this.units=this.tokens.map(t=>Pr(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=Lr(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=Rr(e,this.regex,this.handlers),[r,i,o]=n?zr(n):[null,null,void 0];if(St(n,`a`)&&St(n,`H`))throw new a(`Can't include meridiem when specifying 24-hour format`);return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function Gr(e,t,n){return new Wr(e,n).explainFromTokens(t)}function Kr(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=Gr(e,t,n);return[r,i,a,o]}function qr(e,t){if(!e)return null;let n=cn.create(t,e).dtFormatter(Vr()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>Ir(t,e,i))}var Jr=`Invalid DateTime`,Yr=864e13;function Xr(e){return new Qe(`unsupported zone`,`the zone "${e.name}" is not supported`)}function Zr(e){return e.weekData===null&&(e.weekData=at(e.c)),e.weekData}function Qr(e){return e.localWeekData===null&&(e.localWeekData=at(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function $r(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new J({...n,...t,old:n})}function ei(e,t,n){let r=e-t*60*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;let a=n.offset(r);return i===a?[r,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function ti(e,t){e+=t*60*1e3;let n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ni(e,t,n){return ei(jt(e),t,n)}function ri(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:r,month:i,day:Math.min(e.c.day,At(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=K.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(`milliseconds`),[s,c]=ei(jt(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function ii(e,t,n,r,i,a){let{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){let r=t||s,i=J.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}else return J.invalid(new Qe(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function ai(e,t,n=!0){return e.isValid?cn.create(P.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function oi(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=V(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=V(e.c.month),n===`month`)return i;i+=`-`}else if(i+=V(e.c.month),n===`month`)return i;return i+=V(e.c.day),i}function si(e,t,n,r,i,a,o){let s=!n||e.c.millisecond!==0||e.c.second!==0,c=``;switch(o){case`day`:case`month`:case`year`:break;default:if(c+=V(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=V(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=V(e.c.second))}else{if(c+=V(e.c.minute),o===`minute`)break;s&&(c+=V(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=V(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=V(Math.trunc(-e.o/60)),c+=`:`,c+=V(Math.trunc(-e.o%60))):(c+=`+`,c+=V(Math.trunc(e.o/60)),c+=`:`,c+=V(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}var ci={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},li={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ui={ordinal:1,hour:0,minute:0,second:0,millisecond:0},di=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],fi=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],pi=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`];function mi(e){let t={year:`year`,years:`year`,month:`month`,months:`month`,day:`day`,days:`day`,hour:`hour`,hours:`hour`,minute:`minute`,minutes:`minute`,quarter:`quarter`,quarters:`quarter`,second:`second`,seconds:`second`,millisecond:`millisecond`,milliseconds:`millisecond`,weekday:`weekday`,weekdays:`weekday`,weeknumber:`weekNumber`,weeksnumber:`weekNumber`,weeknumbers:`weekNumber`,weekyear:`weekYear`,weekyears:`weekYear`,ordinal:`ordinal`}[e.toLowerCase()];if(!t)throw new o(e);return t}function hi(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return mi(e)}}function gi(e){if(bi===void 0&&(bi=I.now()),e.type!==`iana`)return e.offset(bi);let t=e.name,n=xi.get(t);return n===void 0&&(n=e.offset(bi),xi.set(t,n)),n}function _i(e,t){let n=Ie(t.zone,I.defaultZone);if(!n.isValid)return J.invalid(Xr(n));let r=P.fromObject(t),i,a;if(R(e.year))i=I.now();else{for(let t of di)R(e[t])&&(e[t]=ci[t]);let t=ft(e)||pt(e);if(t)return J.invalid(t);let r=gi(n);[i,a]=ni(e,r,n)}return new J({ts:i,zone:n,loc:r,o:a})}function vi(e,t,n){let r=R(n.round)?!0:n.round,i=R(n.rounding)?`trunc`:n.rounding,a=(e,a)=>(e=Dt(e,r||n.calendary?0:2,n.calendary?`round`:i),t.loc.clone(n).relFormatter(n).format(e,a)),o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(o(n.unit),n.unit);for(let e of n.units){let t=o(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function yi(e){let t={},n;return e.length>0&&typeof e[e.length-1]==`object`?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}var bi,xi=new Map,J=class e{constructor(e){let t=e.zone||I.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Qe(`invalid input`):null)||(t.isValid?null:Xr(t));this.ts=R(e.ts)?I.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{let a=mt(e.o)&&!e.old?e.o:t.offset(this.ts);r=ti(this.ts,a),n=Number.isNaN(r.year)?new Qe(`invalid input`):null,r=n?null:r,i=n?null:a}this._zone=t,this.loc=e.loc||P.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[e,t]=yi(arguments),[n,r,i,a,o,s,c]=t;return _i({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=yi(arguments),[n,r,i,a,o,s,c]=t;return e.zone=F.utcInstance,_i({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(t,n={}){let r=gt(t)?t.valueOf():NaN;if(Number.isNaN(r))return e.invalid(`invalid input`);let i=Ie(n.zone,I.defaultZone);return i.isValid?new e({ts:r,zone:i,loc:P.fromObject(n)}):e.invalid(Xr(i))}static fromMillis(t,n={}){if(!mt(t))throw new s(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);return t<-864e13||t>Yr?e.invalid(`Timestamp out of range`):new e({ts:t,zone:Ie(n.zone,I.defaultZone),loc:P.fromObject(n)})}static fromSeconds(t,n={}){if(mt(t))return new e({ts:t*1e3,zone:Ie(n.zone,I.defaultZone),loc:P.fromObject(n)});throw new s(`fromSeconds requires a numerical input`)}static fromObject(t,n={}){t||={};let r=Ie(n.zone,I.defaultZone);if(!r.isValid)return e.invalid(Xr(r));let i=P.fromObject(n),o=Rt(t,hi),{minDaysInFirstWeek:s,startOfWeek:c}=lt(o,i),l=I.now(),u=R(n.specificOffset)?r.offset(l):n.specificOffset,d=!R(o.ordinal),f=!R(o.year),p=!R(o.month)||!R(o.day),m=f||p,h=o.weekYear||o.weekNumber;if((m||d)&&h)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(p&&d)throw new a(`Can't mix ordinal dates with month/day`);let g=h||o.weekday&&!m,_,v,y=ti(l,u);g?(_=fi,v=li,y=at(y,s,c)):d?(_=pi,v=ui,y=st(y)):(_=di,v=ci);let b=!1;for(let e of _){let t=o[e];R(t)?b?o[e]=v[e]:o[e]=y[e]:b=!0}let x=(g?ut(o,s,c):d?dt(o):ft(o))||pt(o);if(x)return e.invalid(x);let[S,C]=ni(g?ot(o,s,c):d?ct(o):o,u,r),w=new e({ts:S,zone:r,o:C,loc:i});return o.weekday&&m&&t.weekday!==w.weekday?e.invalid(`mismatched weekday`,`you can't specify both a weekday of ${o.weekday} and a date of ${w.toISO()}`):w.isValid?w:e.invalid(w.invalid)}static fromISO(e,t={}){let[n,r]=Zn(e);return ii(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=Qn(e);return ii(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=$n(e);return ii(n,r,t,`HTTP`,t)}static fromFormat(t,n,r={}){if(R(t)||R(n))throw new s(`fromFormat requires an input string and a format`);let{locale:i=null,numberingSystem:a=null}=r,[o,c,l,u]=Kr(P.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),t,n);return u?e.invalid(u):ii(o,c,r,`format ${n}`,t,l)}static fromString(t,n,r={}){return e.fromFormat(t,n,r)}static fromSQL(e,t={}){let[n,r]=or(e);return ii(n,r,t,`SQL`,e)}static invalid(t,r=null){if(!t)throw new s(`need to specify a reason the DateTime is invalid`);let i=t instanceof Qe?t:new Qe(t,r);if(I.throwOnInvalid)throw new n(i);return new e({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=qr(e,P.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return Ur(cn.parseFormat(e),P.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){bi=void 0,xi.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Zr(this).weekYear:NaN}get weekNumber(){return this.isValid?Zr(this).weekNumber:NaN}get weekday(){return this.isValid?Zr(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Qr(this).weekday:NaN}get localWeekNumber(){return this.isValid?Qr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Qr(this).weekYear:NaN}get ordinal(){return this.isValid?st(this.c).ordinal:NaN}get monthShort(){return this.isValid?xr.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?xr.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?xr.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?xr.weekdays(`long`,{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:`short`,locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:`long`,locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=jt(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(a===o)return[this];let s=n-a*t,c=n-o*t,l=ti(s,a),u=ti(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[$r(this,{ts:s}),$r(this,{ts:c})]:[this]}get isInLeapYear(){return Ot(this.year)}get daysInMonth(){return At(this.year,this.month)}get daysInYear(){return this.isValid?kt(this.year):NaN}get weeksInWeekYear(){return this.isValid?Nt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Nt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=cn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(F.instance(e),t)}toLocal(){return this.setZone(I.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Ie(t,I.defaultZone),t.equals(this.zone))return this;if(t.isValid){let e=this.ts;if(n||r){let n=t.offset(this.ts),r=this.toObject();[e]=ni(r,n,t)}return $r(this,{ts:e,zone:t})}else return e.invalid(Xr(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return $r(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Rt(e,hi),{minDaysInFirstWeek:n,startOfWeek:r}=lt(t,this.loc),i=!R(t.weekYear)||!R(t.weekNumber)||!R(t.weekday),o=!R(t.ordinal),s=!R(t.year),c=!R(t.month)||!R(t.day),l=s||c,u=t.weekYear||t.weekNumber;if((l||o)&&u)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(c&&o)throw new a(`Can't mix ordinal dates with month/day`);let d;i?d=ot({...at(this.c,n,r),...t},n,r):R(t.ordinal)?(d={...this.toObject(),...t},R(t.day)&&(d.day=Math.min(At(d.year,d.month),d.day))):d=ct({...st(this.c),...t});let[f,p]=ni(d,this.o,this.zone);return $r(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let t=K.fromDurationLike(e);return $r(this,ri(this,t))}minus(e){if(!this.isValid)return this;let t=K.fromDurationLike(e).negate();return $r(this,ri(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=K.normalizeUnit(e);switch(r){case`years`:n.month=1;case`quarters`:case`months`:n.day=1;case`weeks`:case`days`:n.hour=0;case`hours`:n.minute=0;case`minutes`:n.second=0;case`seconds`:n.millisecond=0;break}if(r===`weeks`)if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;return r===`quarters`&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?cn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Jr}toLocaleString(e=f,t={}){return this.isValid?cn.create(this.loc.clone(t),e).formatDateTime(this):Jr}toLocaleParts(e={}){return this.isValid?cn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e=`extended`,suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a=`milliseconds`}={}){if(!this.isValid)return null;a=mi(a);let o=e===`extended`,s=oi(this,o,a);return di.indexOf(a)>=3&&(s+=`T`),s+=si(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?oi(this,e===`extended`,mi(t)):null}toISOWeekDate(){return ai(this,`kkkk-'W'WW-c`)}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:a=`extended`,precision:o=`milliseconds`}={}){return this.isValid?(o=mi(o),(r&&di.indexOf(o)>=3?`T`:``)+si(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return ai(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return ai(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?oi(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r=`HH:mm:ss.SSS`;return(t||e)&&(n&&(r+=` `),t?r+=`z`:e&&(r+=`ZZ`)),ai(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Jr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t=`milliseconds`,n={}){if(!this.isValid||!e.isValid)return K.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=yt(t).map(K.normalizeUnit),a=e.valueOf()>this.valueOf(),o=wr(a?this:e,a?e:this,i,r);return a?o.negate():o}diffNow(t=`milliseconds`,n={}){return this.diff(e.now(),t,n)}until(e){return this.isValid?br.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(t={}){if(!this.isValid)return null;let n=t.base||e.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0,i=[`years`,`months`,`days`,`hours`,`minutes`,`seconds`],a=t.unit;return Array.isArray(t.unit)&&(i=t.unit,a=void 0),vi(n,this.plus(r),{...t,numeric:`always`,units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?vi(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:`auto`,units:[`years`,`months`,`days`],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new s(`min requires all arguments be DateTimes`);return bt(t,e=>e.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new s(`max requires all arguments be DateTimes`);return bt(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return Gr(P.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(t,n,r={}){return e.fromFormatExplain(t,n,r)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new Wr(P.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(t,n,r={}){if(R(t)||R(n))throw new s(`fromFormatParser requires an input string and a format parser`);let{locale:i=null,numberingSystem:a=null}=r,o=P.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new s(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:c,zone:l,specificOffset:u,invalidReason:d}=n.explainFromTokens(t);return d?e.invalid(d):ii(c,l,r,`format ${n.format}`,t,u)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return h}static get DATE_HUGE(){return g}static get TIME_SIMPLE(){return _}static get TIME_WITH_SECONDS(){return v}static get TIME_WITH_SHORT_OFFSET(){return y}static get TIME_WITH_LONG_OFFSET(){return b}static get TIME_24_SIMPLE(){return x}static get TIME_24_WITH_SECONDS(){return S}static get TIME_24_WITH_SHORT_OFFSET(){return C}static get TIME_24_WITH_LONG_OFFSET(){return w}static get DATETIME_SHORT(){return ee}static get DATETIME_SHORT_WITH_SECONDS(){return te}static get DATETIME_MED(){return ne}static get DATETIME_MED_WITH_SECONDS(){return T}static get DATETIME_MED_WITH_WEEKDAY(){return re}static get DATETIME_FULL(){return ie}static get DATETIME_FULL_WITH_SECONDS(){return ae}static get DATETIME_HUGE(){return E}static get DATETIME_HUGE_WITH_SECONDS(){return oe}};function Si(e){if(J.isDateTime(e))return e;if(e&&e.valueOf&&mt(e.valueOf()))return J.fromJSDate(e);if(e&&typeof e==`object`)return J.fromObject(e);throw new s(`Unknown datetime argument: ${e}, of type ${typeof e}`)}e.DateTime=J,e.Duration=K,e.FixedOffsetZone=F,e.IANAZone=k,e.Info=xr,e.Interval=br,e.InvalidZone=Fe,e.Settings=I,e.SystemZone=O,e.VERSION=`3.7.2`,e.Zone=D})),Jr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDate=e.DAYS_IN_MONTH=e.DateMathOp=e.TimeUnit=void 0;var t=qr(),n;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.Day=`Day`,e.Month=`Month`,e.Year=`Year`})(n||(e.TimeUnit=n={}));var r;(function(e){e.Add=`Add`,e.Subtract=`Subtract`})(r||(e.DateMathOp=r={})),e.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var i=class i{#e;#t=null;#n=null;#r={add:{[n.Year]:this.addYear.bind(this),[n.Month]:this.addMonth.bind(this),[n.Day]:this.addDay.bind(this),[n.Hour]:this.addHour.bind(this),[n.Minute]:this.addMinute.bind(this),[n.Second]:this.addSecond.bind(this)},subtract:{[n.Year]:this.subtractYear.bind(this),[n.Month]:this.subtractMonth.bind(this),[n.Day]:this.subtractDay.bind(this),[n.Hour]:this.subtractHour.bind(this),[n.Minute]:this.subtractMinute.bind(this),[n.Second]:this.subtractSecond.bind(this)}};constructor(e,n){let r={zone:n};if(e?e instanceof i?(this.#e=e.#e,this.#t=e.#t,this.#n=e.#n):e instanceof Date?this.#e=t.DateTime.fromJSDate(e,r):typeof e==`number`?this.#e=t.DateTime.fromMillis(e,r):(this.#e=t.DateTime.fromISO(e,r),this.#e.isValid||(this.#e=t.DateTime.fromRFC2822(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromSQL(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromFormat(e,`EEE, d MMM yyyy HH:mm:ss`,r))):this.#e=t.DateTime.local(),!this.#e.isValid)throw Error(`CronDate: unhandled timestamp: ${e}`);n&&n!==this.#e.zoneName&&(this.#e=this.#e.setZone(n))}static#i(e){return e%4==0&&e%100!=0||e%400==0}get dstStart(){return this.#t}set dstStart(e){this.#t=e}get dstEnd(){return this.#n}set dstEnd(e){this.#n=e}addYear(){this.#e=this.#e.plus({years:1})}addMonth(){this.#e=this.#e.plus({months:1}).startOf(`month`)}addDay(){this.#e=this.#e.plus({days:1}).startOf(`day`)}addHour(){this.#e=this.#e.plus({hours:1}).startOf(`hour`)}addMinute(){this.#e=this.#e.plus({minutes:1}).startOf(`minute`)}addSecond(){this.#e=this.#e.plus({seconds:1})}subtractYear(){this.#e=this.#e.minus({years:1})}subtractMonth(){this.#e=this.#e.minus({months:1}).endOf(`month`).startOf(`second`)}subtractDay(){this.#e=this.#e.minus({days:1}).endOf(`day`).startOf(`second`)}subtractHour(){this.#e=this.#e.minus({hours:1}).endOf(`hour`).startOf(`second`)}subtractMinute(){this.#e=this.#e.minus({minutes:1}).endOf(`minute`).startOf(`second`)}subtractSecond(){this.#e=this.#e.minus({seconds:1})}addUnit(e){this.#r.add[e]()}subtractUnit(e){this.#r.subtract[e]()}invokeDateOperation(e,t){if(e===r.Add){this.addUnit(t);return}if(e===r.Subtract){this.subtractUnit(t);return}throw Error(`Invalid verb: ${e}`)}getDate(){return this.#e.day}getFullYear(){return this.#e.year}getDay(){let e=this.#e.weekday;return e===7?0:e}getMonth(){return this.#e.month-1}getHours(){return this.#e.hour}getMinutes(){return this.#e.minute}getSeconds(){return this.#e.second}getMilliseconds(){return this.#e.millisecond}getUTCOffset(){return this.#e.offset}setStartOfDay(){this.#e=this.#e.startOf(`day`)}setEndOfDay(){this.#e=this.#e.endOf(`day`)}getTime(){return this.#e.valueOf()}getUTCDate(){return this.#a().day}getUTCFullYear(){return this.#a().year}getUTCDay(){let e=this.#a().weekday;return e===7?0:e}getUTCMonth(){return this.#a().month-1}getUTCHours(){return this.#a().hour}getUTCMinutes(){return this.#a().minute}getUTCSeconds(){return this.#a().second}toISOString(){return this.#e.toUTC().toISO()}toJSON(){return this.#e.toJSON()}setDate(e){this.#e=this.#e.set({day:e})}setFullYear(e){this.#e=this.#e.set({year:e})}setDay(e){this.#e=this.#e.set({weekday:e})}setMonth(e){this.#e=this.#e.set({month:e+1})}setHours(e){this.#e=this.#e.set({hour:e})}setMinutes(e){this.#e=this.#e.set({minute:e})}setSeconds(e){this.#e=this.#e.set({second:e})}setMilliseconds(e){this.#e=this.#e.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#e.toJSDate()}isLastDayOfMonth(){let{day:t,month:n}=this.#e;if(n===2){let r=i.#i(this.#e.year);return t===e.DAYS_IN_MONTH[n-1]-+!r}return t===e.DAYS_IN_MONTH[n-1]}isLastWeekdayOfMonth(){let{day:t,month:n}=this.#e,r;return r=n===2?e.DAYS_IN_MONTH[n-1]-+!i.#i(this.#e.year):e.DAYS_IN_MONTH[n-1],t>r-7}applyDateOperation(e,t,r){if(t===n.Month||t===n.Day){this.invokeDateOperation(e,t);return}let i=this.getHours();this.invokeDateOperation(e,t);let a=this.getHours(),o=a-i;o===2?r!==24&&(this.dstStart=a):o===0&&this.getMinutes()===0&&this.getSeconds()===0&&r!==24&&(this.dstEnd=a)}#a(){return this.#e.toUTC()}};e.CronDate=i,e.default=i})),Yr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMonth=void 0;var t=Jr(),n=Hr(),r=1,i=12,a=Object.freeze([]);e.CronMonth=class extends n.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}static get daysInMonth(){return t.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Xr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronSecond=void 0;var t=Hr(),n=0,r=59,i=Object.freeze([]);e.CronSecond=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Zr=n((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Vr(),e),n(Ur(),e),n(Wr(),e),n(Hr(),e),n(Gr(),e),n(Kr(),e),n(Yr(),e),n(Xr(),e)})),Qr=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFieldCollection=void 0;var t=Zr();e.CronFieldCollection=class e{#e;#t;#n;#r;#i;#a;static from(n,r){return new e({second:this.resolveField(t.CronSecond,n.second,r.second),minute:this.resolveField(t.CronMinute,n.minute,r.minute),hour:this.resolveField(t.CronHour,n.hour,r.hour),dayOfMonth:this.resolveField(t.CronDayOfMonth,n.dayOfMonth,r.dayOfMonth),month:this.resolveField(t.CronMonth,n.month,r.month),dayOfWeek:this.resolveField(t.CronDayOfWeek,n.dayOfWeek,r.dayOfWeek)})}static resolveField(e,n,r){return r?r instanceof t.CronField?r:new e(r):n}constructor({second:e,minute:n,hour:r,dayOfMonth:i,month:a,dayOfWeek:o}){if(!e)throw Error(`Validation error, Field second is missing`);if(!n)throw Error(`Validation error, Field minute is missing`);if(!r)throw Error(`Validation error, Field hour is missing`);if(!i)throw Error(`Validation error, Field dayOfMonth is missing`);if(!a)throw Error(`Validation error, Field month is missing`);if(!o)throw Error(`Validation error, Field dayOfWeek is missing`);if(a.values.length===1&&!i.hasLastChar&&!(parseInt(i.values[0],10)<=t.CronMonth.daysInMonth[a.values[0]-1]))throw Error(`Invalid explicit day of month definition`);this.#e=e,this.#t=n,this.#n=r,this.#i=a,this.#a=o,this.#r=i}get second(){return this.#e}get minute(){return this.#t}get hour(){return this.#n}get dayOfMonth(){return this.#r}get month(){return this.#i}get dayOfWeek(){return this.#a}static compactField(e){if(e.length===0)return[];let t=[],n;return e.forEach((e,r,i)=>{if(n===void 0){n={start:e,count:1};return}let a=i[r-1]||n.start,o=i[r+1];if(e===`L`||e===`W`){t.push(n),t.push({start:e,count:1}),n=void 0;return}if(n.step===void 0&&o!==void 0){let t=e-a;if(t<=o-e){n={...n,count:2,end:e,step:t};return}n.step=1}e-(n.end??0)===n.step?(n.count++,n.end=e):(n.count===1?t.push({start:n.start,count:1}):n.count===2?(t.push({start:n.start,count:1}),t.push({start:n.end??a,count:1})):t.push(n),n={start:e,count:1})}),n&&t.push(n),t}static#o(e,t,n){let r=t.step;return r?r===1&&t.start===e.min&&t.end&&t.end>=n?e.hasQuestionMarkChar?`?`:`*`:r!==1&&t.start===e.min&&t.end&&t.end>=n-r+1?`*/${r}`:null:null}static#s(e,t){let n=e.step;if(n===1)return`${e.start}-${e.end}`;let r=e.start===0?e.count-1:e.count;if(!n)throw Error(`Unexpected range step`);if(!e.end)throw Error(`Unexpected range end`);if(n*r>e.end){let t=(t,r)=>{if(typeof e.start!=`number`)throw Error(`Unexpected range start`);return r%n===0?e.start+r:null};if(typeof e.start!=`number`)throw Error(`Unexpected range start`);let r={length:e.end-e.start+1};return Array.from(r,t).filter(e=>e!==null).join(`,`)}return e.end===t-n+1?`${e.start}/${n}`:`${e.start}-${e.end}/${n}`}stringifyField(n){let r=n.max,i=n.values;if(n instanceof t.CronDayOfWeek){r=6;let e=this.#a.values;i=e[e.length-1]===7?e.slice(0,-1):e}n instanceof t.CronDayOfMonth&&(r=this.#i.values.length===1?t.CronMonth.daysInMonth[this.#i.values[0]-1]:n.max);let a=e.compactField(i);if(a.length===1){let t=e.#o(n,a[0],r);if(t)return t}return a.map(i=>{let a=i.count===1?i.start.toString():e.#s(i,r);return n instanceof t.CronDayOfWeek&&n.nthDay>0?`${a}#${n.nthDay}`:a}).join(`,`)}stringify(e=!1){let t=[];return e&&t.push(this.stringifyField(this.#e)),t.push(this.stringifyField(this.#t),this.stringifyField(this.#n),this.stringifyField(this.#r),this.stringifyField(this.#i),this.stringifyField(this.#a)),t.join(` `)}serialize(){return{second:this.#e.serialize(),minute:this.#t.serialize(),hour:this.#n.serialize(),dayOfMonth:this.#r.serialize(),month:this.#i.serialize(),dayOfWeek:this.#a.serialize()}}}})),$r=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpression=e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var t=Jr();e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=`Out of the time span range`,e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=`Invalid expression, loop limit exceeded`;var n=1e4,r=class r{#e;#t;#n;#r;#i;#a;#o=null;#s=!1;constructor(e,n){this.#e=n,this.#t=n.tz,this.#r=n.startDate?new t.CronDate(n.startDate,this.#t):null,this.#i=n.endDate?new t.CronDate(n.endDate,this.#t):null;let r=n.currentDate??n.startDate;if(r){let e=new t.CronDate(r,this.#t);this.#r&&e.getTime()<this.#r.getTime()?r=this.#r:this.#i&&e.getTime()>this.#i.getTime()&&(r=this.#i)}this.#n=new t.CronDate(r,this.#t),this.#a=e}get fields(){return this.#a}static fieldsToExpression(e,t){return new r(e,t||{})}static#c(e,t){return t.some(t=>t===e)}#l(e,t){return e[t?e.length-1:0]}#u(e){let n=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#o===n)return this.#s;let r=new t.CronDate(e);r.setStartOfDay();let i=new t.CronDate(e);return i.setEndOfDay(),this.#o=n,this.#s=r.getUTCOffset()!==i.getUTCOffset(),this.#s}#d(e,n,r){let i=this.#a.second.values,a=e.getSeconds(),o=this.#a.second.findNearestValue(a,r);if(o!==null){e.setSeconds(o);return}e.applyDateOperation(n,t.TimeUnit.Minute,this.#a.hour.values.length),e.setSeconds(this.#l(i,r))}#f(e,n,r){let i=this.#a.minute.values,a=this.#a.second.values,o=e.getMinutes(),s=this.#a.minute.findNearestValue(o,r);if(s!==null){e.setMinutes(s),e.setSeconds(this.#l(a,r));return}e.applyDateOperation(n,t.TimeUnit.Hour,this.#a.hour.values.length),e.setMinutes(this.#l(i,r)),e.setSeconds(this.#l(a,r))}static#p(e,t){let n=t.isLastWeekdayOfMonth();return e.some(e=>{let r=parseInt(e.toString().charAt(0),10)%7;if(Number.isNaN(r))throw Error(`Invalid last weekday of the month expression: ${e}`);return t.getDay()===r&&n})}next(){return this.#_()}prev(){return this.#_(!0)}hasNext(){let e=this.#n;try{return this.#_(),!0}catch{return!1}finally{this.#n=e}}hasPrev(){let e=this.#n;try{return this.#_(!0),!0}catch{return!1}finally{this.#n=e}}take(e){let t=[];if(e>=0)for(let n=0;n<e;n++)try{t.push(this.next())}catch{return t}else for(let n=0;n>e;n--)try{t.push(this.prev())}catch{return t}return t}reset(e){this.#n=new t.CronDate(e||this.#e.currentDate)}stringify(e=!1){return this.#a.stringify(e)}includesDate(e){let{second:n,minute:r,hour:i,month:a}=this.#a,o=new t.CronDate(e,this.#t);return!(!n.values.includes(o.getSeconds())||!r.values.includes(o.getMinutes())||!i.values.includes(o.getHours())||!a.values.includes(o.getMonth()+1)||!this.#m(o)||this.#a.dayOfWeek.nthDay>0&&Math.ceil(o.getDate()/7)!==this.#a.dayOfWeek.nthDay)}toString(){return this.#e.expression||this.stringify(!0)}#m(e){let t=this.#a.dayOfMonth.isWildcard,n=!t,i=this.#a.dayOfWeek.isWildcard,a=!i,o=r.#c(e.getDate(),this.#a.dayOfMonth.values)||this.#a.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),s=r.#c(e.getDay(),this.#a.dayOfWeek.values)||this.#a.dayOfWeek.hasLastChar&&r.#p(this.#a.dayOfWeek.values,e);return!!(n&&a&&(o||s)||o&&!a||t&&!i&&s)}#h(e,n,i){let a=this.#a.hour.values,o=a,s=e.getHours(),c=r.#c(s,a),l=e.dstStart===s,u=e.dstEnd===s;if(l)return r.#c(s-1,a)?!0:(e.invokeDateOperation(n,t.TimeUnit.Hour),!1);if(u&&!i)return e.dstEnd=null,e.applyDateOperation(t.DateMathOp.Add,t.TimeUnit.Hour,o.length),!1;if(c)return!0;e.dstStart=null;let d=this.#a.hour.findNearestValue(s,i);if(d===null)return e.applyDateOperation(n,t.TimeUnit.Day,o.length),!1;if(this.#u(e)){let r=i?s-d:d-s;for(let i=0;i<r;i++)e.applyDateOperation(n,t.TimeUnit.Hour,o.length)}else e.setHours(d);return e.setMinutes(this.#l(this.#a.minute.values,i)),e.setSeconds(this.#l(this.#a.second.values,i)),!1}#g(t){if(!this.#r&&!this.#i)return;let n=t.getTime();if(this.#r&&n<this.#r.getTime()||this.#i&&n>this.#i.getTime())throw Error(e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#_(i=!1){let a=i?t.DateMathOp.Subtract:t.DateMathOp.Add,o=new t.CronDate(this.#n),s=o.getTime(),c=0;for(;++c<n;){if(this.#g(o),!this.#m(o)){o.applyDateOperation(a,t.TimeUnit.Day,this.#a.hour.values.length);continue}if(!(this.#a.dayOfWeek.nthDay<=0||Math.ceil(o.getDate()/7)===this.#a.dayOfWeek.nthDay)){o.applyDateOperation(a,t.TimeUnit.Day,this.#a.hour.values.length);continue}if(!r.#c(o.getMonth()+1,this.#a.month.values)){o.applyDateOperation(a,t.TimeUnit.Month,this.#a.hour.values.length);continue}if(this.#h(o,a,i)){if(!r.#c(o.getMinutes(),this.#a.minute.values)){this.#f(o,a,i);continue}if(!r.#c(o.getSeconds(),this.#a.second.values)){this.#d(o,a,i);continue}if(s===o.getTime()){(a===`Add`||o.getMilliseconds()===0)&&o.applyDateOperation(a,t.TimeUnit.Second,this.#a.hour.values.length);continue}break}}if(c>n)throw Error(e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return o.getMilliseconds()!==0&&o.setMilliseconds(0),this.#n=o,o}[Symbol.iterator](){return{next:()=>({value:this.#_(),done:!this.hasNext()})}}};e.CronExpression=r,e.default=r})),ei=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.seededRandom=r;function t(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return()=>t>>>0}function n(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function r(e){return n(e?t(e)():Math.floor(Math.random()*1e10))}})),ti=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpressionParser=e.DayOfWeek=e.Months=e.CronUnit=e.PredefinedExpressions=void 0;var t=Qr(),n=$r(),r=ei(),i=Zr(),a;(function(e){e[`@yearly`]=`0 0 0 1 1 *`,e[`@annually`]=`0 0 0 1 1 *`,e[`@monthly`]=`0 0 0 1 * *`,e[`@weekly`]=`0 0 0 * * 0`,e[`@daily`]=`0 0 0 * * *`,e[`@hourly`]=`0 0 * * * *`,e[`@minutely`]=`0 * * * * *`,e[`@secondly`]=`* * * * * *`,e[`@weekdays`]=`0 0 0 * * 1-5`,e[`@weekends`]=`0 0 0 * * 0,6`})(a||(e.PredefinedExpressions=a={}));var o;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.DayOfMonth=`DayOfMonth`,e.Month=`Month`,e.DayOfWeek=`DayOfWeek`})(o||(e.CronUnit=o={}));var s;(function(e){e[e.jan=1]=`jan`,e[e.feb=2]=`feb`,e[e.mar=3]=`mar`,e[e.apr=4]=`apr`,e[e.may=5]=`may`,e[e.jun=6]=`jun`,e[e.jul=7]=`jul`,e[e.aug=8]=`aug`,e[e.sep=9]=`sep`,e[e.oct=10]=`oct`,e[e.nov=11]=`nov`,e[e.dec=12]=`dec`})(s||(e.Months=s={}));var c;(function(e){e[e.sun=0]=`sun`,e[e.mon=1]=`mon`,e[e.tue=2]=`tue`,e[e.wed=3]=`wed`,e[e.thu=4]=`thu`,e[e.fri=5]=`fri`,e[e.sat=6]=`sat`})(c||(e.DayOfWeek=c={})),e.CronExpressionParser=class e{static parse(s,c={}){let{strict:l=!1,hashSeed:u}=c,d=(0,r.seededRandom)(u);s=a[s]||s;let f=e.#e(s,l);if(!(f.dayOfMonth===`*`||f.dayOfWeek===`*`||!l))throw Error(`Cannot use both dayOfMonth and dayOfWeek together in strict mode!`);let p=e.#t(o.Second,f.second,i.CronSecond.constraints,d),m=e.#t(o.Minute,f.minute,i.CronMinute.constraints,d),h=e.#t(o.Hour,f.hour,i.CronHour.constraints,d),g=e.#t(o.Month,f.month,i.CronMonth.constraints,d),_=e.#t(o.DayOfMonth,f.dayOfMonth,i.CronDayOfMonth.constraints,d),{dayOfWeek:v,nthDayOfWeek:y}=e.#u(f.dayOfWeek),b=e.#t(o.DayOfWeek,v,i.CronDayOfWeek.constraints,d),x=new t.CronFieldCollection({second:new i.CronSecond(p,{rawValue:f.second}),minute:new i.CronMinute(m,{rawValue:f.minute}),hour:new i.CronHour(h,{rawValue:f.hour}),dayOfMonth:new i.CronDayOfMonth(_,{rawValue:f.dayOfMonth}),month:new i.CronMonth(g,{rawValue:f.month}),dayOfWeek:new i.CronDayOfWeek(b,{rawValue:f.dayOfWeek,nthDayOfWeek:y})});return new n.CronExpression(x,{...c,expression:s})}static#e(e,t){if(t&&!e.length)throw Error(`Invalid cron expression`);e||=`0 * * * * *`;let n=e.trim().split(/\s+/);if(t&&n.length<6)throw Error(`Invalid cron expression, expected 6 fields`);if(n.length>6)throw Error(`Invalid cron expression, too many fields`);let r=[`*`,`*`,`*`,`*`,`*`,`0`];n.length<r.length&&n.unshift(...r.slice(n.length));let[i,a,o,s,c,l]=n;return{second:i,minute:a,hour:o,dayOfMonth:s,month:c,dayOfWeek:l}}static#t(e,t,n,r){if((e===o.Month||e===o.DayOfWeek)&&(t=t.replace(/[a-z]{3}/gi,e=>{e=e.toLowerCase();let t=s[e]||c[e];if(t===void 0)throw Error(`Validation error, cannot resolve alias "${e}"`);return t.toString()})),!n.validChars.test(t))throw Error(`Invalid characters, got value: ${t}`);return t=this.#n(t,n),t=this.#r(t,n,r),this.#i(e,t,n)}static#n(e,t){return e.replace(/[*?]/g,t.min+`-`+t.max)}static#r(e,t,n){let r=n();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(e,n,i,a)=>{if(n&&i&&a){let e=parseInt(n,10),o=parseInt(i,10),s=parseInt(a,10);if(e>o)throw Error(`Invalid range: ${e}-${o}, min > max`);if(s<=0)throw Error(`Invalid step: ${s}, must be positive`);let c=Math.max(e,t.min),l=Math.floor(r*s),u=[];for(let e=Math.floor(c/s)*s+l;e<=o;e+=s)e>=c&&u.push(e);return u.join(`,`)}else if(n&&i){let e=parseInt(n,10),t=parseInt(i,10);if(e>t)throw Error(`Invalid range: ${e}-${t}, min > max`);return String(Math.floor(r*(t-e+1))+e)}else if(a){let e=parseInt(a,10);if(e<=0)throw Error(`Invalid step: ${e}, must be positive`);let n=Math.floor(r*e),i=[];for(let r=Math.floor(t.min/e)*e+n;r<=t.max;r+=e)r>=t.min&&i.push(r);return i.join(`,`)}else return String(Math.floor(r*(t.max-t.min+1)+t.min))})}static#i(t,n,r){let i=[];function a(n,r){if(Array.isArray(n))i.push(...n);else if(e.#d(r,n))i.push(n);else{let e=parseInt(n.toString(),10);if(!(e>=r.min&&e<=r.max))throw Error(`Constraint error, got value ${n} expected range ${r.min}-${r.max}`);i.push(t===o.DayOfWeek?e%7:n)}}return n.split(`,`).forEach(n=>{if(!(n.length>0))throw Error(`Invalid list value format`);a(e.#a(t,n,r),r)}),i}static#a(t,n,r){let i=n.split(`/`);if(i.length>2)throw Error(`Invalid repeat: ${n}`);return i.length===2?(isNaN(parseInt(i[0],10))||(i[0]=`${i[0]}-${r.max}`),e.#l(t,i[0],parseInt(i[1],10),r)):e.#l(t,n,1,r)}static#o(e,t,n){if(!(!isNaN(e)&&!isNaN(t)&&e>=n.min&&t<=n.max))throw Error(`Constraint error, got range ${e}-${t} expected range ${n.min}-${n.max}`);if(e>t)throw Error(`Invalid range: ${e}-${t}, min(${e}) > max(${t})`)}static#s(e){if(!(!isNaN(e)&&e>0))throw Error(`Constraint error, cannot repeat at every ${e} time.`)}static#c(e,t,n,r){let i=[];e===o.DayOfWeek&&n%7==0&&i.push(0);for(let e=t;e<=n;e+=r)i.indexOf(e)===-1&&i.push(e);return i}static#l(e,t,n,r){let i=t.split(`-`);if(i.length<=1)return isNaN(+t)?t:+t;let[a,o]=i.map(e=>parseInt(e,10));return this.#o(a,o,r),this.#s(n),this.#c(e,a,o,n)}static#u(e){let t=e.split(`#`);if(t.length<=1)return{dayOfWeek:t[0]};let n=+t[t.length-1],r=e.match(/([,-/])/);if(r!==null)throw Error(`Constraint error, invalid dayOfWeek \`#\` and \`${r?.[0]}\` special characters are incompatible`);if(!(t.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw Error(`Constraint error, invalid dayOfWeek occurrence number (#)`);return{dayOfWeek:t[0],nthDayOfWeek:n}}static#d(e,t){return e.chars.some(e=>t.toString().includes(e))}}})),ni=n((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!=="default"&&t(i,r,a[o]);return n(i,r),i}})();Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=void 0;var i=ti();e.CronFileParser=class e{static async parseFile(t){let{readFile:n}=await Promise.resolve().then(()=>r(p())),i=await n(t,`utf8`);return e.#e(i)}static parseFileSync(t){let{readFileSync:n}=p(),r=n(t,`utf8`);return e.#e(r)}static#e(t){let n=t.split(`
|
|
34
|
-
`),r={variables:{},expressions:[],errors:{}};for(let t of n){let n=t.trim();if(n.length===0||n.startsWith(`#`))continue;let i=n.match(/^(.*)=(.*)$/);if(i){let[,e,t]=i;r.variables[e]=t.replace(/["']/g,``);continue}try{let t=e.#t(n);r.expressions.push(t.interval)}catch(e){r.errors[n]=e}}return r}static#t(e){let t=e.split(` `);return{interval:i.CronExpressionParser.parse(t.slice(0,5).join(` `)),command:t.slice(5,t.length)}}}})),ri=n((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=e.CronExpressionParser=e.CronExpression=e.CronFieldCollection=e.CronDate=void 0;var r=ti(),i=Jr();Object.defineProperty(e,"CronDate",{enumerable:!0,get:function(){return i.CronDate}});var a=Qr();Object.defineProperty(e,"CronFieldCollection",{enumerable:!0,get:function(){return a.CronFieldCollection}});var o=$r();Object.defineProperty(e,"CronExpression",{enumerable:!0,get:function(){return o.CronExpression}});var s=ti();Object.defineProperty(e,"CronExpressionParser",{enumerable:!0,get:function(){return s.CronExpressionParser}});var c=ni();Object.defineProperty(e,"CronFileParser",{enumerable:!0,get:function(){return c.CronFileParser}}),n(Zr(),e),e.default=r.CronExpressionParser})),ii=n(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`cronstrue`,[],r):typeof e==`object`?e.cronstrue=r():n.cronstrue=r()})(globalThis,()=>(()=>{var e={949(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CronParser=void 0;var r=n(515);t.CronParser=function(){function e(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=n}return e.prototype.parse=function(){var e,t=this.expression??``;if(t===`@reboot`)return e=[`@reboot`,``,``,``,``,``,``],e;if(t.startsWith(`@`)){var n=this.parseSpecial(this.expression);e=this.extractParts(n)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},e.prototype.parseSpecial=function(e){var t={"@yearly":`0 0 1 1 *`,"@annually":`0 0 1 1 *`,"@monthly":`0 0 1 * *`,"@weekly":`0 0 * * 0`,"@daily":`0 0 * * *`,"@midnight":`0 0 * * *`,"@hourly":`0 * * * *`,"@reboot":`@reboot`}[e];if(!t)throw Error(`Unknown special expression.`);return t},e.prototype.extractParts=function(e){if(!this.expression)throw Error(`cron expression is empty`);for(var t=e.trim().split(/[ ]+/),n=0;n<t.length;n++)if(t[n].includes(`,`)){var r=t[n].split(`,`).map(function(e){return e.trim()}).filter(function(e){return e!==``}).map(function(e){return isNaN(Number(e))?e:Number(e)}).filter(function(e){return e!==null&&e!==``});r.length===0&&r.push(`*`),r.sort(function(e,t){return e!==null&&t!==null?e-t:0}),t[n]=r.map(function(e){return e===null?``:e.toString()}).join(`,`)}if(t.length<5)throw Error(`Expression has only ${t.length} part${t.length==1?``:`s`}. At least 5 parts are required.`);if(t.length==5)t.unshift(``),t.push(``);else if(t.length==6)/\d{4}$/.test(t[5])||t[4]==`?`||t[2]==`?`?t.unshift(``):t.push(``);else if(t.length>7)throw Error(`Expression has ${t.length} parts; too many!`);return t},e.prototype.normalize=function(e){var t=this;if(e[3]=e[3].replace(`?`,`*`),e[5]=e[5].replace(`?`,`*`),e[2]=e[2].replace(`?`,`*`),e[0].indexOf(`0/`)==0&&(e[0]=e[0].replace(`0/`,`*/`)),e[1].indexOf(`0/`)==0&&(e[1]=e[1].replace(`0/`,`*/`)),e[2].indexOf(`0/`)==0&&(e[2]=e[2].replace(`0/`,`*/`)),e[3].indexOf(`1/`)==0&&(e[3]=e[3].replace(`1/`,`*/`)),e[4].indexOf(`1/`)==0&&(e[4]=e[4].replace(`1/`,`*/`)),e[6].indexOf(`1/`)==0&&(e[6]=e[6].replace(`1/`,`*/`)),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,function(e){var n=e.replace(/\D/,``),r=n;return t.dayOfWeekStartIndexZero?n==`7`&&(r=`0`):r=(parseInt(n)-1).toString(),e.replace(n,r)}),e[5]==`L`&&(e[5]=`6`),e[3]==`?`&&(e[3]=`*`),e[3].indexOf(`W`)>-1&&(e[3].indexOf(`,`)>-1||e[3].indexOf(`-`)>-1))throw Error(`The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.`);var n={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in n)e[5]=e[5].replace(new RegExp(r,`gi`),n[r].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(e){var n=e.replace(/\D/,``),r=n;return t.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),e.replace(n,r)});var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in i)e[4]=e[4].replace(new RegExp(a,`gi`),i[a].toString());e[0]==`0`&&(e[0]=``),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+=`-${e[2]}`);for(var o=0;o<e.length;o++)if(e[o].indexOf(`,`)!=-1&&(e[o]=e[o].split(`,`).filter(function(e){return e!==``}).join(`,`)||`*`),e[o]==`*/1`&&(e[o]=`*`),e[o].indexOf(`/`)>-1&&!/^\*|\-|\,/.test(e[o])){var s=null;switch(o){case 4:s=`12`;break;case 5:s=`6`;break;case 6:s=`9999`;break;default:s=null;break}if(s!==null){var c=e[o].split(`/`);e[o]=`${c[0]}-${s}/${c[1]}`}}},e.prototype.validate=function(e){var t=`0-9,\\-*/`;this.validateOnlyExpectedCharactersFound(e[0],t),this.validateOnlyExpectedCharactersFound(e[1],t),this.validateOnlyExpectedCharactersFound(e[2],t),this.validateOnlyExpectedCharactersFound(e[3],`0-9,\\-*/LW`),this.validateOnlyExpectedCharactersFound(e[4],t),this.validateOnlyExpectedCharactersFound(e[5],`0-9,\\-*/L#`),this.validateOnlyExpectedCharactersFound(e[6],t),this.validateAnyRanges(e)},e.prototype.validateAnyRanges=function(e){r.default.secondRange(e[0]),r.default.minuteRange(e[1]),r.default.hourRange(e[2]),r.default.dayOfMonthRange(e[3]),r.default.monthRange(e[4],this.monthStartIndexZero),r.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},e.prototype.validateOnlyExpectedCharactersFound=function(e,t){var n=e.match(RegExp(`[^${t}]+`,`gi`));if(n&&n.length)throw Error(`Expression contains invalid values: '${n.toString()}'`)},e}()},333(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionDescriptor=void 0;var r=n(823),i=n(949);t.ExpressionDescriptor=function(){function e(t,n){if(this.expression=t,this.options=n,this.expressionParts=[,,,,,],!this.options.locale&&e.defaultLocale&&(this.options.locale=e.defaultLocale),!e.locales[this.options.locale]){var r=Object.keys(e.locales)[0];console.warn(`Locale '${this.options.locale}' could not be found; falling back to '${r}'.`),this.options.locale=r}this.i18n=e.locales[this.options.locale],n.use24HourTimeFormat===void 0&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return e.toString=function(t,n){var r=n===void 0?{}:n,i=r.throwExceptionOnParseError,a=i===void 0?!0:i,o=r.verbose,s=o===void 0?!1:o,c=r.dayOfWeekStartIndexZero,l=c===void 0?!0:c,u=r.monthStartIndexZero,d=u===void 0?!1:u,f=r.use24HourTimeFormat,p=r.trimHoursLeadingZero,m=p===void 0?!1:p,h=r.locale,g=h===void 0?null:h,_=r.logicalAndDayFields,v={throwExceptionOnParseError:a,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:f,trimHoursLeadingZero:m,locale:g,logicalAndDayFields:_===void 0?!1:_};return v.tzOffset&&console.warn(`'tzOffset' option has been deprecated and is no longer supported.`),new e(t,v).getFullDescription()},e.initialize=function(t,n){n===void 0&&(n=`en`),e.specialCharacters=[`/`,`-`,`,`,`*`],e.defaultLocale=n,t.load(e.locales)},e.prototype.getFullDescription=function(){var e,t=``;try{var n=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]===`@reboot`)return(e=this.i18n).atReboot?.call(e)||`Run once, at startup`;var r=this.getTimeOfDayDescription(),a=this.getDayOfMonthDescription(),o=this.getMonthDescription(),s=this.getDayOfWeekDescription(),c=this.getYearDescription();t+=r+a+s+o+c,t=this.transformVerbosity(t,!!this.options.verbose),t=t.charAt(0).toLocaleUpperCase()+t.substr(1)}catch(e){if(!this.options.throwExceptionOnParseError)t=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw`${e}`}return t},e.prototype.getTimeOfDayDescription=function(){var t=this.expressionParts[0],n=this.expressionParts[1],i=this.expressionParts[2],a=``;if(!r.StringUtilities.containsAny(n,e.specialCharacters)&&!r.StringUtilities.containsAny(i,e.specialCharacters)&&!r.StringUtilities.containsAny(t,e.specialCharacters))a+=this.i18n.atSpace()+this.formatTime(i,n,t);else if(!t&&n.indexOf(`-`)>-1&&!(n.indexOf(`,`)>-1)&&!(n.indexOf(`/`)>-1)&&!r.StringUtilities.containsAny(i,e.specialCharacters)){var o=n.split(`-`);a+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(i,o[0],``),this.formatTime(i,o[1],``))}else if(!t&&i.indexOf(`,`)>-1&&i.indexOf(`-`)==-1&&i.indexOf(`/`)==-1&&!r.StringUtilities.containsAny(n,e.specialCharacters)){var s=i.split(`,`);a+=this.i18n.at();for(var c=0;c<s.length;c++)a+=` `,a+=this.formatTime(s[c],n,``),c<s.length-2&&(a+=`,`),c==s.length-2&&(a+=this.i18n.spaceAnd())}else{var l=this.getSecondsDescription(),u=this.getMinutesDescription(),d=this.getHoursDescription();if(a+=l,a&&u&&(a+=`, `),a+=u,u===d)return a;a&&d&&(a+=`, `),a+=d}return a},e.prototype.getSecondsDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Seconds(t),t)},function(t){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(t){return t==`0`?``:parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(t)})},e.prototype.getMinutesDescription=function(){var e=this,t=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Minutes(t),t)},function(t){return e.i18n.minutesX0ThroughX1PastTheHour()},function(r){var i;try{return r==`0`&&n.indexOf(`/`)==-1&&t==``?e.i18n.everyHour():r==`0`?(i=e.i18n).onTheHour?.call(i)||e.i18n.atX0MinutesPastTheHour(r):parseInt(r)<20?e.i18n.atX0MinutesPastTheHour(r):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(r)}catch{return e.i18n.atX0MinutesPastTheHour(r)}})},e.prototype.getHoursDescription=function(){var e=this,t=this.expressionParts[2],n=0,i=[];t.split(`/`)[0].split(`,`).forEach(function(e){var t=e.split(`-`);t.length===2&&i.push({value:t[1],index:n+1}),n+=t.length});var a=0;return this.getSegmentDescription(t,this.i18n.everyHour(),function(t){var n=i.find(function(e){return e.value===t&&e.index===a})&&e.expressionParts[1]!==`0`;return a++,n?e.formatTime(t,`59`,``):e.formatTime(t,`0`,``)},function(t){return r.StringUtilities.format(e.i18n.everyX0Hours(t),t)},function(t){return e.i18n.betweenX0AndX1()},function(t){return e.i18n.atX0()})},e.prototype.getDayOfWeekDescription=function(){var e=this,t=this.i18n.daysOfTheWeek(),n=null;return n=this.expressionParts[5]==`*`?``:this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,r){var i=n;n.indexOf(`#`)>-1?i=n.substring(0,n.indexOf(`#`)):n.indexOf(`L`)>-1&&(i=i.replace(`L`,``));var a=parseInt(i),o=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(r)[a]:t[a];if(n.indexOf(`#`)>-1){var s=null,c=n.substring(n.indexOf(`#`)+1),l=n.substring(0,n.indexOf(`#`));switch(c){case`1`:s=e.i18n.first(l);break;case`2`:s=e.i18n.second(l);break;case`3`:s=e.i18n.third(l);break;case`4`:s=e.i18n.fourth(l);break;case`5`:s=e.i18n.fifth(l);break}o=s+` `+o}return o},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)},function(t){var n=t.substring(0,t.indexOf(`-`));return e.expressionParts[3]==`*`?e.i18n.commaX0ThroughX1(n):e.i18n.commaAndX0ThroughX1(n)},function(t){var n=null;if(t.indexOf(`#`)>-1){var r=t.substring(t.indexOf(`#`)+1),i=t.substring(0,t.indexOf(`#`));n=e.i18n.commaOnThe(r,i).trim()+e.i18n.spaceX0OfTheMonth()}else n=t.indexOf(`L`)>-1?e.i18n.commaOnTheLastX0OfTheMonth(t.replace(`L`,``)):e.expressionParts[3]==`*`||e.options.logicalAndDayFields?e.i18n.commaOnlyOnX0(t):e.i18n.commaAndOnX0();return n}),n},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],``,function(n,r){return r&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:t[parseInt(n)-1]},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)},function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()})},e.prototype.getDayOfMonthDescription=function(){var e=this,t=null,n=this.expressionParts[3];switch(n){case`L`:t=this.i18n.commaOnTheLastDayOfTheMonth();break;case`WL`:case`LW`:t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var a=parseInt(i[0].replace(`W`,``)),o=a==1?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());t=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),o);break}else{var s=n.match(/L-(\d{1,2})/);if(s){var c=s[1];t=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(c),c);break}else if(n==`*`&&this.expressionParts[5]!=`*`)return``;else t=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(t){return t==`L`?e.i18n.lastDay():e.i18n.dayX0?r.StringUtilities.format(e.i18n.dayX0(),t):t},function(t){return t==`1`?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)},function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)},function(t){return e.i18n.commaOnDayX0OfTheMonth(t)});break}}return t},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],``,function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},function(t){return r.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)},function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()})},e.prototype.getSegmentDescription=function(e,t,n,i,a,o){var s=null,c=e.indexOf(`/`)>-1,l=e.indexOf(`-`)>-1,u=e.indexOf(`,`)>-1;if(!e)s=``;else if(e===`*`)s=t;else if(!c&&!l&&!u)s=r.StringUtilities.format(o(e),n(e));else if(u){for(var d=e.split(`,`),f=``,p=0;p<d.length;p++)if(p>0&&d.length>2&&(f+=`,`,p<d.length-1&&(f+=` `)),p>0&&d.length>1&&(p==d.length-1||d.length==2)&&(f+=`${this.i18n.spaceAnd()} `),d[p].indexOf(`/`)>-1||d[p].indexOf(`-`)>-1){var m=d[p].indexOf(`-`)>-1&&d[p].indexOf(`/`)==-1,h=this.getSegmentDescription(d[p],t,n,i,m?this.i18n.commaX0ThroughX1:a,o);m&&(h=h.replace(`, `,``)),f+=h}else if(!c)f+=n(d[p]);else{var g=this.getSegmentDescription(d[p],t,n,i,a,o);g&&g.startsWith(`, `)&&(g=g.substring(2)),f+=g}s=c?f:r.StringUtilities.format(o(e),f)}else if(c){var d=e.split(`/`);if(s=r.StringUtilities.format(i(d[1]),d[1]),d[0].indexOf(`-`)>-1){var _=this.generateRangeSegmentDescription(d[0],a,n);_.indexOf(`, `)!=0&&(s+=`, `),s+=_}else if(d[0].indexOf(`*`)==-1){var v=r.StringUtilities.format(o(d[0]),n(d[0]));v=v.replace(`, `,``),s+=r.StringUtilities.format(this.i18n.commaStartingX0(),v)}}else l&&(s=this.generateRangeSegmentDescription(e,a,n));return s},e.prototype.generateRangeSegmentDescription=function(e,t,n){var i=``,a=e.split(`-`),o=n(a[0],1),s=n(a[1],2),c=t(e);return i+=r.StringUtilities.format(c,o,s),i},e.prototype.formatTime=function(e,t,n){var r=0,i=0,a=parseInt(e)+r,o=parseInt(t)+i;o>=60?(o-=60,a+=1):o<0&&(o+=60,--a),a>=24?a-=24:a<0&&(a=24+a);var s=``,c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),s=c?`${this.getPeriod(a)} `:` ${this.getPeriod(a)}`,a>12&&(a-=12),a===0&&(a=12));var l=``;n&&(l=`:${(`00`+n).substring(n.length)}`);var u=a.toString(),d=(`00`+u).substring(u.length),f=o.toString(),p=(`00`+f).substring(f.length),m=this.options.trimHoursLeadingZero?u:d;return`${c?s:``}${m}:${p}${l}${c?``:s}`},e.prototype.transformVerbosity=function(e,t){if(!t&&(e=e.replace(RegExp(`, ${this.i18n.everyMinute()}`,`g`),``),e=e.replace(RegExp(`, ${this.i18n.everyHour()}`,`g`),``),e=e.replace(new RegExp(this.i18n.commaEveryDay(),`g`),``),e=e.replace(/\, ?$/,``),this.i18n.conciseVerbosityReplacements))for(var n=0,r=Object.entries(this.i18n.conciseVerbosityReplacements());n<r.length;n++){var i=r[n],a=i[0],o=i[1];e=e.replace(new RegExp(a,`g`),o)}return e},e.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||`PM`:this.i18n.am&&this.i18n.am()||`AM`},e.locales={},e}()},747(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.enLocaleLoader=void 0;var r=n(486);t.enLocaleLoader=function(){function e(){}return e.prototype.load=function(e){e.en=new r.en},e}()},486(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.en=void 0,t.en=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!1},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return`An error occurred when generating the expression description. Check the cron expression syntax.`},e.prototype.everyMinute=function(){return`every minute`},e.prototype.everyHour=function(){return`every hour`},e.prototype.atSpace=function(){return`At `},e.prototype.everyMinuteBetweenX0AndX1=function(){return`Every minute between %s and %s`},e.prototype.at=function(){return`At`},e.prototype.spaceAnd=function(){return` and`},e.prototype.everySecond=function(){return`every second`},e.prototype.everyX0Seconds=function(){return`every %s seconds`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconds %s through %s past the minute`},e.prototype.atX0SecondsPastTheMinute=function(){return`at %s seconds past the minute`},e.prototype.everyX0Minutes=function(){return`every %s minutes`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minutes %s through %s past the hour`},e.prototype.atX0MinutesPastTheHour=function(){return`at %s minutes past the hour`},e.prototype.everyX0Hours=function(){return`every %s hours`},e.prototype.betweenX0AndX1=function(){return`between %s and %s`},e.prototype.atX0=function(){return`at %s`},e.prototype.commaEveryDay=function(){return`, every day`},e.prototype.commaEveryX0DaysOfTheWeek=function(){return`, every %s days of the week`},e.prototype.commaX0ThroughX1=function(){return`, %s through %s`},e.prototype.commaAndX0ThroughX1=function(){return`, %s through %s`},e.prototype.first=function(){return`first`},e.prototype.second=function(){return`second`},e.prototype.third=function(){return`third`},e.prototype.fourth=function(){return`fourth`},e.prototype.fifth=function(){return`fifth`},e.prototype.commaOnThe=function(){return`, on the `},e.prototype.spaceX0OfTheMonth=function(){return` %s of the month`},e.prototype.lastDay=function(){return`the last day`},e.prototype.commaOnTheLastX0OfTheMonth=function(){return`, on the last %s of the month`},e.prototype.commaOnlyOnX0=function(){return`, only on %s`},e.prototype.commaAndOnX0=function(){return`, and on %s`},e.prototype.commaEveryX0Months=function(){return`, every %s months`},e.prototype.commaOnlyInX0=function(){return`, only in %s`},e.prototype.commaOnTheLastDayOfTheMonth=function(){return`, on the last day of the month`},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return`, on the last weekday of the month`},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return`, %s days before the last day of the month`},e.prototype.firstWeekday=function(){return`first weekday`},e.prototype.weekdayNearestDayX0=function(){return`weekday nearest day %s`},e.prototype.commaOnTheX0OfTheMonth=function(){return`, on the %s of the month`},e.prototype.commaEveryX0Days=function(){return`, every %s days in a month`},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return`, between day %s and %s of the month`},e.prototype.commaOnDayX0OfTheMonth=function(){return`, on day %s of the month`},e.prototype.commaEveryHour=function(){return`, every hour`},e.prototype.commaEveryX0Years=function(){return`, every %s years`},e.prototype.commaStartingX0=function(){return`, starting %s`},e.prototype.daysOfTheWeek=function(){return[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},e.prototype.monthsOfTheYear=function(){return[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},e.prototype.atReboot=function(){return`Run once, at startup`},e.prototype.onTheHour=function(){return`on the hour`},e}()},515(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(e,t){if(!e)throw Error(t)}t.default=function(){function e(){}return e.secondRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`seconds part must be >= 0 and <= 59`)}},e.minuteRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`minutes part must be >= 0 and <= 59`)}},e.hourRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=23,`hours part must be >= 0 and <= 23`)}},e.dayOfMonthRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=1&&i<=31,`DOM part must be >= 1 and <= 31`)}},e.monthRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=1&&a<=12,t?`month part must be >= 0 and <= 11`:`month part must be >= 1 and <= 12`)}},e.dayOfWeekRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=0&&a<=6,t?`DOW part must be >= 0 and <= 6`:`DOW part must be >= 1 and <= 7`)}},e}()},823(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtilities=void 0,t.StringUtilities=function(){function e(){}return e.format=function(e){var t=[...arguments].slice(1);return e.replace(/%s/g,function(e){return t.shift()})},e.containsAny=function(e,t){return t.some(function(t){return e.indexOf(t)>-1})},e}()}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.toString=void 0;var t=n(333),i=n(747);t.ExpressionDescriptor.initialize(new i.enLocaleLoader),e.default=t.ExpressionDescriptor,e.toString=t.ExpressionDescriptor.toString})(),r})())}));ri();var ai=e(ii(),1);function oi(e){try{return ai.default.toString(e,{use24HourTimeFormat:!0,throwExceptionOnParseError:!0})}catch{return e}}function si(e,t){switch(t){case`claude-code`:case`copilot`:case`cursor`:switch(e){case`default`:case`acceptEdits`:case`bypassPermissions`:case`plan`:case`dontAsk`:return e;case`auto`:return t===`claude-code`?`auto`:`acceptEdits`;case`autoEdit`:return`acceptEdits`;case`yolo`:return`bypassPermissions`;case`ask`:return`default`;case`on-failure`:return`acceptEdits`;case`allow-all`:return`bypassPermissions`;default:return`acceptEdits`}case`gemini`:case`opencode`:switch(e){case`default`:case`autoEdit`:case`yolo`:return e;case`acceptEdits`:return`autoEdit`;case`bypassPermissions`:case`dontAsk`:return`yolo`;case`plan`:return`default`;case`ask`:return`default`;case`auto`:return`autoEdit`;case`on-failure`:return`autoEdit`;case`allow-all`:return`yolo`;default:return`autoEdit`}case`codex`:switch(e){case`ask`:case`auto`:case`on-failure`:case`allow-all`:return e;case`default`:return`ask`;case`acceptEdits`:return`auto`;case`bypassPermissions`:case`dontAsk`:return`allow-all`;case`plan`:return`ask`;case`autoEdit`:return`auto`;case`yolo`:return`allow-all`;default:return`auto`}default:return e}}function ci(e){switch(si(e,`codex`)){case`ask`:return{sandboxMode:`read-only`,approvalPolicy:`untrusted`,networkAccess:!1};case`auto`:return{sandboxMode:`workspace-write`,approvalPolicy:`on-request`,networkAccess:!1};case`on-failure`:return{sandboxMode:`workspace-write`,approvalPolicy:`on-failure`,networkAccess:!1};case`allow-all`:return{sandboxMode:`workspace-write`,approvalPolicy:`never`,networkAccess:!0};default:return{sandboxMode:`read-only`,approvalPolicy:`untrusted`,networkAccess:!1}}}var li={board:`b`,session:`s`,branch:`w`,artifact:`a`,knowledge:`kb`};function ui(e,t){return`/${li.board}/${t||hr(e)}/`}function di(e){return`/${li.session}/${hr(e)}/`}function fi(e){return`/${li.branch}/${hr(e)}/`}function pi(e){return`/${li.artifact}/${hr(e)}/`}function mi(e){return`/${li.artifact}/${hr(e)}/fullscreen`}function hi(e,t=`value`){if(e==null)return;if(typeof e!=`string`)throw Error(`${t} must be a string`);let n=e.trim();if(n.length!==0)try{let e=new URL(n);if(e.protocol!==`http:`&&e.protocol!==`https:`)throw Error(`${t} must use http or https`);return e.toString()}catch(e){throw e instanceof Error&&e.message.startsWith(t)?e:Error(`${t} must be a valid http(s) URL`)}}var gi=class{client;options;listeners=new Set;disposeCallbacks=[];readyPromise;disposed=!1;stateSnapshot;constructor(e,t,n){this.client=e,this.options={taskHydration:n?.taskHydration??`lazy`},this.stateSnapshot={sessionId:t,session:null,tasks:[],messagesByTask:new Map,queuedTasks:[],streamingMessages:new Map,toolsByTask:new Map,loadedTaskIds:new Set,connected:!!e.io?.connected,loading:!0,error:null,terminal:!1,lastSyncedAt:null},this.attachListeners(),this.readyPromise=this.bootstrap()}get sessionId(){return this.stateSnapshot.sessionId}get state(){return this.stateSnapshot}getTask(e){return this.stateSnapshot.tasks.find(t=>t.task_id===e)}getTaskMessages(e){return this.stateSnapshot.messagesByTask.get(e)||[]}isTaskLoaded(e){return this.stateSnapshot.loadedTaskIds.has(e)}getTaskTools(e){return this.stateSnapshot.toolsByTask.get(e)||[]}getStreamingMessage(e){return this.stateSnapshot.streamingMessages.get(e)}getStreamingMessages(e){let t=Array.from(this.stateSnapshot.streamingMessages.values());return e?t.filter(t=>t.task_id===e):t}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}async ready(){await this.readyPromise}async prompt(e,t){return this.client.sessions.prompt(this.sessionId,e,t)}async loadTaskMessages(e){this.assertNotDisposed();let t=await this.client.service(`messages`).findAll({query:{task_id:e,$sort:{index:1}}});return this.updateState(n=>{let r=new Map(n.messagesByTask);r.set(e,Ci(t));let i=new Set(n.loadedTaskIds);return i.add(e),{...n,messagesByTask:r,loadedTaskIds:i,lastSyncedAt:new Date().toISOString()}}),t}unloadTaskMessages(e){this.assertNotDisposed(),this.updateState(t=>{if(!t.loadedTaskIds.has(e)&&!t.messagesByTask.has(e))return t;let n=new Map(t.messagesByTask);n.delete(e);let r=new Set(t.loadedTaskIds);return r.delete(e),{...t,messagesByTask:n,loadedTaskIds:r}})}dispose(){if(!this.disposed){this.disposed=!0;for(let e of this.disposeCallbacks)e();this.disposeCallbacks.length=0,this.listeners.clear()}}assertNotDisposed(){if(this.disposed)throw Error(`Reactive session ${this.sessionId} is disposed`)}notify(){for(let e of this.listeners)e()}updateState(e){let t=e(this.stateSnapshot);return this.stateSnapshot=t,this.notify(),t}async bootstrap(){try{let[e,t,n]=await Promise.all([this.client.service(`sessions`).get(this.sessionId),this.client.service(`tasks`).findAll({query:{session_id:this.sessionId,$sort:{created_at:1}}}),this.client.service(`/sessions/${this.sessionId}/tasks/queue`).find().catch(()=>({data:[]}))]),r=new Map,i=new Set;this.options.taskHydration===`eager`&&(r=Ti(await this.client.service(`messages`).findAll({query:{session_id:this.sessionId,$sort:{index:1}}})),i=new Set(r.keys())),this.updateState(a=>({...a,session:e,tasks:t,messagesByTask:r,loadedTaskIds:i,queuedTasks:wi(n.data||[]),loading:!1,error:null,lastSyncedAt:new Date().toISOString()}))}catch(e){let t=_i(e),n=t===403||t===404;this.updateState(t=>({...t,loading:!1,error:e instanceof Error?e.message:`Failed to bootstrap reactive session`,terminal:t.terminal||n}))}}attachListeners(){let e=this.client.service(`sessions`),t=this.client.service(`tasks`),n=this.client.service(`messages`),r=()=>{this.disposed||(this.updateState(e=>({...e,connected:!0})),this.readyPromise=this.resync())},i=()=>{this.disposed||this.updateState(e=>({...e,connected:!1}))};this.client.io.on(`connect`,r),this.client.io.on(`disconnect`,i),this.disposeCallbacks.push(()=>this.client.io.off(`connect`,r)),this.disposeCallbacks.push(()=>this.client.io.off(`disconnect`,i));let a=e=>{e.session_id===this.sessionId&&this.updateState(t=>({...t,session:e,lastSyncedAt:new Date().toISOString()}))},o=e=>{e.session_id===this.sessionId&&this.updateState(e=>({...e,session:null,error:`Session was removed`,terminal:!0,lastSyncedAt:new Date().toISOString()}))};e.on(`patched`,a),e.on(`updated`,a),e.on(`removed`,o),this.disposeCallbacks.push(()=>e.removeListener(`patched`,a)),this.disposeCallbacks.push(()=>e.removeListener(`updated`,a)),this.disposeCallbacks.push(()=>e.removeListener(`removed`,o));let s=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=t.tasks.some(t=>t.task_id===e.task_id)?t.tasks:[...t.tasks,e],r=e.status===`queued`&&!t.queuedTasks.some(t=>t.task_id===e.task_id)?wi([...t.queuedTasks,e]):t.queuedTasks;return{...t,tasks:n,queuedTasks:r,lastSyncedAt:new Date().toISOString()}})},c=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=t.tasks.findIndex(t=>t.task_id===e.task_id),r=n===-1?[...t.tasks,e]:[...t.tasks];n!==-1&&(r[n]=e);let i=e.status===`queued`,a=t.queuedTasks.some(t=>t.task_id===e.task_id),o=t.queuedTasks;return i?o=wi(a?t.queuedTasks.map(t=>t.task_id===e.task_id?e:t):[...t.queuedTasks,e]):a&&(o=t.queuedTasks.filter(t=>t.task_id!==e.task_id)),{...t,tasks:r,queuedTasks:o,lastSyncedAt:new Date().toISOString()}})},l=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=new Map(t.messagesByTask);n.delete(e.task_id);let r=new Set(t.loadedTaskIds);r.delete(e.task_id);let i=new Map(t.toolsByTask);return i.delete(e.task_id),{...t,tasks:t.tasks.filter(t=>t.task_id!==e.task_id),queuedTasks:t.queuedTasks.filter(t=>t.task_id!==e.task_id),messagesByTask:n,loadedTaskIds:r,toolsByTask:i,lastSyncedAt:new Date().toISOString()}})},u=e=>s(e);t.on(`created`,s),t.on(`patched`,c),t.on(`updated`,c),t.on(`removed`,l),t.on(`queued`,u),this.disposeCallbacks.push(()=>t.removeListener(`created`,s)),this.disposeCallbacks.push(()=>t.removeListener(`patched`,c)),this.disposeCallbacks.push(()=>t.removeListener(`updated`,c)),this.disposeCallbacks.push(()=>t.removeListener(`removed`,l)),this.disposeCallbacks.push(()=>t.removeListener(`queued`,u));let d=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=t.toolsByTask.get(e.task_id)||[];if(n.some(t=>t.toolUseId===e.tool_use_id))return t;let r=new Map(t.toolsByTask);return r.set(e.task_id,[...n,{toolUseId:e.tool_use_id,toolName:e.tool_name,status:`executing`}]),{...t,toolsByTask:r}})},f=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=t.toolsByTask.get(e.task_id)||[];if(n.length===0)return t;let r=new Map(t.toolsByTask);return r.set(e.task_id,n.map(t=>t.toolUseId===e.tool_use_id?{...t,status:`complete`}:t)),{...t,toolsByTask:r}})};t.on(`tool:start`,d),t.on(`tool:complete`,f),this.disposeCallbacks.push(()=>t.removeListener(`tool:start`,d)),this.disposeCallbacks.push(()=>t.removeListener(`tool:complete`,f));let p=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=new Map(t.streamingMessages);if(n.delete(e.message_id),!e.task_id||!(this.options.taskHydration===`eager`||t.loadedTaskIds.has(e.task_id)))return{...t,streamingMessages:n,lastSyncedAt:new Date().toISOString()};let r=new Map(t.messagesByTask),i=r.get(e.task_id)||[];return i.some(t=>t.message_id===e.message_id)||r.set(e.task_id,Ci([...i,e])),{...t,messagesByTask:r,streamingMessages:n,lastSyncedAt:new Date().toISOString()}})},m=e=>{let t=e.task_id;e.session_id!==this.sessionId||!t||this.updateState(n=>{let r=n.messagesByTask.get(t);if(!r)return n;let i=r.findIndex(t=>t.message_id===e.message_id);if(i===-1)return n;let a=new Map(n.messagesByTask),o=[...r];return o[i]=e,a.set(t,o),{...n,messagesByTask:a,lastSyncedAt:new Date().toISOString()}})},h=e=>{if(e.session_id!==this.sessionId)return;let t=e.task_id;this.updateState(n=>{let r=new Map(n.streamingMessages);if(r.delete(e.message_id),!t)return{...n,streamingMessages:r,lastSyncedAt:new Date().toISOString()};let i=n.messagesByTask.get(t)||[],a=new Map(n.messagesByTask);return a.set(t,i.filter(t=>t.message_id!==e.message_id)),{...n,streamingMessages:r,messagesByTask:a,lastSyncedAt:new Date().toISOString()}})},g=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=new Map(t.streamingMessages);return n.set(e.message_id,{message_id:e.message_id,session_id:e.session_id,task_id:e.task_id,role:e.role,content:``,thinkingContent:``,timestamp:e.timestamp,isStreaming:!0}),{...t,streamingMessages:n}})},_=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=t.streamingMessages.get(e.message_id);if(!n)return t;let r=new Map(t.streamingMessages);return r.set(e.message_id,{...n,content:n.content+e.chunk}),{...t,streamingMessages:r}})},v=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=t.streamingMessages.get(e.message_id);if(!n)return t;let r=new Map(t.streamingMessages);return r.set(e.message_id,{...n,isStreaming:!1}),{...t,streamingMessages:r}})},y=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=t.streamingMessages.get(e.message_id);if(!n)return t;let r=new Map(t.streamingMessages);return r.set(e.message_id,{...n,error:e.error,isStreaming:!1}),{...t,streamingMessages:r}})},b=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=new Map(t.streamingMessages),r=n.get(e.message_id);return n.set(e.message_id,{message_id:e.message_id,session_id:e.session_id,task_id:e.task_id??r?.task_id,role:`assistant`,content:r?.content||``,thinkingContent:r?.thinkingContent||``,timestamp:r?.timestamp||e.timestamp,isStreaming:!0,isThinking:!0}),{...t,streamingMessages:n}})},x=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=t.streamingMessages.get(e.message_id);if(!n)return t;let r=new Map(t.streamingMessages);return r.set(e.message_id,{...n,isThinking:!0,thinkingContent:(n.thinkingContent||``)+e.chunk}),{...t,streamingMessages:r}})},S=e=>{e.session_id===this.sessionId&&this.updateState(t=>{let n=t.streamingMessages.get(e.message_id);if(!n)return t;let r=new Map(t.streamingMessages);return r.set(e.message_id,{...n,isThinking:!1}),{...t,streamingMessages:r}})};n.on(`created`,p),n.on(`patched`,m),n.on(`updated`,m),n.on(`removed`,h),n.on(`streaming:start`,g),n.on(`streaming:chunk`,_),n.on(`streaming:end`,v),n.on(`streaming:error`,y),n.on(`thinking:start`,b),n.on(`thinking:chunk`,x),n.on(`thinking:end`,S),this.disposeCallbacks.push(()=>n.removeListener(`created`,p)),this.disposeCallbacks.push(()=>n.removeListener(`patched`,m)),this.disposeCallbacks.push(()=>n.removeListener(`updated`,m)),this.disposeCallbacks.push(()=>n.removeListener(`removed`,h)),this.disposeCallbacks.push(()=>n.removeListener(`streaming:start`,g)),this.disposeCallbacks.push(()=>n.removeListener(`streaming:chunk`,_)),this.disposeCallbacks.push(()=>n.removeListener(`streaming:end`,v)),this.disposeCallbacks.push(()=>n.removeListener(`streaming:error`,y)),this.disposeCallbacks.push(()=>n.removeListener(`thinking:start`,b)),this.disposeCallbacks.push(()=>n.removeListener(`thinking:chunk`,x)),this.disposeCallbacks.push(()=>n.removeListener(`thinking:end`,S))}resyncInflight=null;async resync(){if(this.disposed)return;if(this.resyncInflight)return this.resyncInflight;let e=this.doResync();this.resyncInflight=e;try{await e}finally{this.resyncInflight===e&&(this.resyncInflight=null)}}async doResync(){try{let[e,t,n]=await Promise.all([this.client.service(`sessions`).get(this.sessionId),this.client.service(`tasks`).findAll({query:{session_id:this.sessionId,$sort:{created_at:1}}}),this.client.service(`/sessions/${this.sessionId}/tasks/queue`).find().catch(()=>({data:[]}))]),r=this.stateSnapshot.messagesByTask,i=this.stateSnapshot.loadedTaskIds;if(this.options.taskHydration===`eager`)r=Ti(await this.client.service(`messages`).findAll({query:{session_id:this.sessionId,$sort:{index:1}}})),i=new Set(r.keys());else if(this.stateSnapshot.loadedTaskIds.size>0){let e=new Map;for(let t of this.stateSnapshot.loadedTaskIds){let n=await this.client.service(`messages`).findAll({query:{task_id:t,$sort:{index:1}}});e.set(t,Ci(n))}r=e,i=new Set(e.keys())}if(this.disposed)return;this.updateState(a=>({...a,session:e,tasks:t,queuedTasks:wi(n.data||[]),messagesByTask:r,loadedTaskIds:i,error:null,terminal:!1,lastSyncedAt:new Date().toISOString()}))}catch(e){if(this.disposed)return;let t=_i(e),n=t===403||t===404;this.updateState(t=>({...t,error:e instanceof Error?e.message:`Failed to resync reactive session`,terminal:t.terminal||n}))}}};function _i(e){if(!e||typeof e!=`object`)return;let t=e;if(typeof t.code==`number`)return t.code;if(typeof t.statusCode==`number`)return t.statusCode;if(typeof t.status==`number`)return t.status}function vi(e){let t=e,n=t;return typeof n.session==`function`||(n.session=(t,n)=>new gi(e,t,n)),t}var yi=new WeakMap;function bi(e){return{taskHydration:e?.taskHydration??`lazy`}}function xi(e,t){return`${e}:${t.taskHydration}`}function J(e,t,n){let r=bi(n),i=xi(t,r),a=yi.get(e);a||(a=new Map,yi.set(e,a));let o=a.get(i);if(o)return o.refCount+=1,o.handle;let s=new gi(e,t,r);return a.set(i,{handle:s,refCount:1}),s}function Si(e,t,n){let r=xi(t,bi(n)),i=yi.get(e);if(!i)return;let a=i.get(r);a&&(--a.refCount,a.refCount<=0&&(a.handle.dispose(),i.delete(r)),i.size===0&&yi.delete(e))}function Ci(e){return[...e].sort((e,t)=>e.index-t.index)}function wi(e){return[...e].sort((e,t)=>(e.queue_position||0)-(t.queue_position||0))}function Ti(e){let t=new Map;for(let n of e){if(!n.task_id)continue;let e=t.get(n.task_id)||[];e.push(n),t.set(n.task_id,e)}for(let[e,n]of t.entries())t.set(e,Ci(n));return t}var Ei=[{id:`claude-opus-4-8`,displayName:`Claude Opus 4.8`,family:`claude-4`,description:`Most capable model for complex reasoning, long-horizon agentic coding, and high-autonomy work`},{id:`claude-opus-4-7`,displayName:`Claude Opus 4.7`,family:`claude-4`,description:`Previous generation Opus model for agents and coding`},{id:`claude-opus-4-7[1m]`,displayName:`Claude Opus 4.7 (1M context)`,family:`claude-4`,description:`Opus 4.7 with extended 1M token context window`},{id:`claude-sonnet-4-6`,displayName:`Claude Sonnet 4.6`,family:`claude-4`,description:`Best combination of speed and intelligence`},{id:`claude-sonnet-4-6[1m]`,displayName:`Claude Sonnet 4.6 (1M context)`,family:`claude-4`,description:`Sonnet 4.6 with extended 1M token context window`},{id:`claude-opus-4-6`,displayName:`Claude Opus 4.6`,family:`claude-4`,description:`Previous generation Opus`},{id:`claude-opus-4-6[1m]`,displayName:`Claude Opus 4.6 (1M context)`,family:`claude-4`,description:`Opus 4.6 with extended 1M token context window`},{id:`claude-sonnet-4-5`,displayName:`Claude Sonnet 4.5`,family:`claude-4`,description:`Fast and capable`},{id:`claude-sonnet-4-5[1m]`,displayName:`Claude Sonnet 4.5 (1M context)`,family:`claude-4`,description:`Sonnet 4.5 with extended 1M token context window`},{id:`claude-opus-4-5`,displayName:`Claude Opus 4.5`,family:`claude-4`,description:`High-performance reasoning`},{id:`claude-haiku-4-5`,displayName:`Claude Haiku 4.5`,family:`claude-4`,description:`Fastest with near-frontier intelligence`},{id:`claude-opus-4-1`,displayName:`Claude Opus 4.1`,family:`claude-4`,description:`Legacy reasoning model`},{id:`claude-sonnet-4-0`,displayName:`Claude Sonnet 4.0`,family:`claude-4`,description:`Deprecated legacy balanced model; prefer Sonnet 4.6`}],Di=`claude-sonnet-4-6`,Oi=`gpt-5.5`,ki={"gpt-5.5":{name:`GPT-5.5 (Recommended)`,description:`OpenAI's newest frontier model for complex coding, computer use, knowledge work, and research workflows in Codex.`},"gpt-5.5-pro":{name:`GPT-5.5 Pro`,description:`Higher-compute GPT-5.5 variant for the toughest professional work`},"gpt-5.4":{name:`GPT-5.4`,description:`Frontier model for professional work with strong coding and agentic workflows`},"gpt-5.4-pro":{name:`GPT-5.4 Pro`,description:`Higher-compute GPT-5.4 variant for difficult reasoning tasks`},"gpt-5.4-mini":{name:`GPT-5.4 Mini`,description:`Fast, efficient model for responsive coding tasks and subagents`},"gpt-5.4-nano":{name:`GPT-5.4 Nano`,description:`Lowest-cost GPT-5.4-class model for simple high-volume tasks and subagents`},"gpt-5.3-codex":{name:`GPT-5.3 Codex`,description:`Strong agentic coding model - stronger reasoning, 25% faster`},"gpt-5.3-codex-spark":{name:`GPT-5.3 Codex Spark`,description:`Real-time coding model, 1000+ tokens/sec (Pro users)`},"gpt-5.2-codex":{name:`GPT-5.2 Codex`,description:`Deprecated coding model optimized for agentic tasks - 400k context`},"gpt-5.2":{name:`GPT-5.2`,description:`Previous frontier model for complex tasks - 400k context, thinking mode`},"gpt-5.2-pro":{name:`GPT-5.2 Pro`,description:`Highest accuracy, xhigh reasoning for difficult problems`},"gpt-5.2-instant":{name:`GPT-5.2 Instant`,description:`Faster model for writing and information seeking`},"gpt-5.1-codex-max":{name:`GPT-5.1 Codex Max`,description:`Deprecated model optimized for long-horizon agentic coding`},"gpt-5.1-codex":{name:`GPT-5.1 Codex`,description:`Deprecated model optimized for agentic coding tasks`},"gpt-5.1-codex-mini":{name:`GPT-5.1 Codex Mini`,description:`Deprecated cost-effective Codex variant`},"gpt-5.1":{name:`GPT-5.1`,description:`General purpose GPT-5.1 model`},"gpt-5-codex":{name:`GPT-5 Codex`,description:`Legacy model for software engineering`},"gpt-5-codex-mini":{name:`GPT-5 Codex Mini`,description:`Legacy faster, lighter model`},"gpt-5":{name:`GPT-5`,description:`Legacy general purpose model`},"gpt-4o":{name:`GPT-4o`,description:`General purpose model`},"gpt-4o-mini":{name:`GPT-4o Mini`,description:`Smaller, faster model`}};Object.fromEntries(Object.keys(ki).map(e=>[e,e]));var Ai=`claude-sonnet-4.6`,ji={"claude-sonnet-4.6":{name:`Claude Sonnet 4.6`,description:`Anthropic Sonnet 4.6 — balanced default for most tasks`,provider:`Anthropic`},"claude-opus-4.6":{name:`Claude Opus 4.6`,description:`Anthropic Opus 4.6 — strongest model, slower`,provider:`Anthropic`},"gpt-5.3-codex":{name:`GPT-5.3 Codex`,description:`OpenAI agentic-coding model — strong tool use, faster`,provider:`OpenAI`},"gemini-3-pro":{name:`Gemini 3 Pro`,description:`Google Gemini 3 Pro`,provider:`Google`},"gpt-4o":{name:`GPT-4o`,description:`OpenAI general-purpose multimodal model (legacy)`,provider:`OpenAI`},"gpt-4o-mini":{name:`GPT-4o Mini`,description:`Smaller, faster GPT-4o variant (legacy)`,provider:`OpenAI`},"claude-sonnet-4-20250514":{name:`Claude Sonnet 4 (2025-05-14)`,description:`Date-stamped Sonnet 4 snapshot (legacy)`,provider:`Anthropic`},"o3-mini":{name:`o3 Mini`,description:`OpenAI reasoning model, smaller variant`,provider:`OpenAI`},"o4-mini":{name:`o4 Mini`,description:`OpenAI reasoning model, smaller variant`,provider:`OpenAI`}},Mi=`composer-latest`,Ni={[Mi]:{displayName:`Composer Latest`,description:`Cursor SDK default model alias (experimental)`}},Pi=`gemini-2.0-flash`,Fi={"gemini-3-flash":{name:`Gemini 3 Flash`,description:`Latest Flash model - fast responses with strong capabilities`,inputPrice:`TBD`,outputPrice:`TBD`,useCase:`General coding tasks, fast iteration, great price-to-performance`},"gemini-3-pro":{name:`Gemini 3 Pro`,description:`Latest and most intelligent model (requires Ultra subscription or waitlist)`,inputPrice:`Premium`,outputPrice:`Premium`,useCase:`Most complex tasks, advanced reasoning, state-of-the-art performance`},"gemini-2.5-pro":{name:`Gemini 2.5 Pro`,description:`Most capable 2.5 model for complex reasoning and multi-step tasks`,inputPrice:`Higher`,outputPrice:`Higher`,useCase:`Complex refactoring, architecture decisions, advanced debugging`},"gemini-2.5-flash":{name:`Gemini 2.5 Flash`,description:`Balanced performance and cost for most agentic coding tasks`,inputPrice:`$0.30`,outputPrice:`$2.50`,useCase:`Feature development, bug fixes, code reviews, testing`},"gemini-2.5-flash-lite":{name:`Gemini 2.5 Flash-Lite`,description:`Ultra-fast, low-cost model for simple tasks`,inputPrice:`$0.10`,outputPrice:`$0.40`,useCase:`File search, summaries, simple edits, code formatting`},"gemini-2.0-flash":{name:`Gemini 2.0 Flash`,description:`Google's default model (Jan 2025) - next-gen features with superior speed`,inputPrice:`$0.15`,outputPrice:`$0.60`,useCase:`General purpose coding, native tool use, 1M token context`},"gemini-2.0-flash-lite":{name:`Gemini 2.0 Flash-Lite`,description:`Ultra-efficient for simple, high-frequency tasks`,inputPrice:`$0.075`,outputPrice:`$0.30`,useCase:`Simple edits, quick queries, high-volume operations`},"gemini-2.0-pro":{name:`Gemini 2.0 Pro`,description:`Advanced reasoning and complex problem solving`,inputPrice:`$1.25`,outputPrice:`$5.00`,useCase:`Complex architecture, advanced algorithms, deep refactoring`},"gemini-2.0-flash-thinking-experimental":{name:`Gemini 2.0 Flash Thinking (Experimental)`,description:`Shows detailed reasoning process when responding`,inputPrice:`$0.15`,outputPrice:`$0.60`,useCase:`Learning, debugging reasoning, understanding AI decision-making`}};function Ii(e){switch(e){case`claude-code`:case`claude-code-cli`:return Di;case`codex`:return Oi;case`gemini`:return Pi;case`copilot`:return Ai;default:return}}function Li(...e){return vi(Xt(...e))}async function Ri(...e){return Yt(...e)}var Y=e(o(),1),zi=`popstate`;function Bi(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Vi(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Wi(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:Gi(t)}return qi(t,n,null,e)}function X(e,t){if(e===!1||e==null)throw Error(t)}function Z(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Hi(){return Math.random().toString(36).substring(2,10)}function Ui(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Wi(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Ki(t):t,state:n,key:t&&t.key||r||Hi(),mask:i}}function Gi({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Ki(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function qi(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Bi(e)?e:Wi(h.location,e,t);n&&n(r,e),l=u()+1;let d=Ui(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Bi(e)?e:Wi(h.location,e,t);n&&n(r,e),l=u();let i=Ui(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Ji(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(zi,d),c=e,()=>{i.removeEventListener(zi,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function Ji(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),X(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Gi(t);return i=i.replace(/ $/,`%20`),!n&&i.startsWith(`//`)&&(i=r+i),new URL(i,r)}function Yi(e,t,n=`/`){return Xi(e,t,n,!1)}function Xi(e,t,n,r,i){let a=ha((typeof t==`string`?Ki(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Qi(e),s=null,c=ma(a);for(let e=0;s==null&&e<o.length;++e)s=da(o[e],c,r);return s}function Zi(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function Qi(e){let t=$i(e);return ta(t),t}function $i(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;X(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=wa([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(X(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),$i(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:la(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ea(e.path))a(e,t,!0,n)}),t}function ea(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ea(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ta(e){e.sort((e,t)=>e.score===t.score?ua(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var na=/^:[\w-]+$/,ra=3,ia=2,aa=1,oa=10,sa=-2,ca=e=>e===`*`;function la(e,t){let n=e.split(`/`),r=n.length;return n.some(ca)&&(r+=sa),t&&(r+=ia),n.filter(e=>!ca(e)).reduce((e,t)=>e+(na.test(t)?ra:t===``?aa:oa),r)}function ua(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function da(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=fa({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=fa({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:wa([a,u.pathname]),pathnameBase:Ea(wa([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=wa([a,u.pathnameBase]))}return o}function fa(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pa(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function pa(e,t=!1,n=!0){Z(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ma(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Z(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ha(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var ga=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function _a(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Ki(e):e,a;return n?(n=Ca(n),a=n.startsWith(`/`)?va(n.substring(1),`/`):va(n,t)):a=t,{pathname:a,search:Da(r),hash:Oa(i)}}function va(e,t){let n=Ta(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ya(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ba(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function xa(e){let t=ba(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Sa(e,t,n,r=!1){let i;typeof e==`string`?i=Ki(e):(i={...e},X(!i.pathname||!i.pathname.includes(`?`),ya(`?`,`pathname`,`search`,i)),X(!i.pathname||!i.pathname.includes(`#`),ya(`#`,`pathname`,`hash`,i)),X(!i.search||!i.search.includes(`#`),ya(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=_a(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ca=e=>e.replace(/\/\/+/g,`/`),wa=e=>Ca(e.join(`/`)),Ta=e=>e.replace(/\/+$/,``),Ea=e=>Ta(e).replace(/^\/*/,`/`),Da=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Oa=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ka=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Aa(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ja(e){return wa(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ma=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Na(e,t){let n=e;if(typeof n!=`string`||!ga.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ma)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=ha(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Z(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Pa=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Pa);var Fa=[`GET`,...Pa];new Set(Fa);var Ia=Y.createContext(null);Ia.displayName=`DataRouter`;var La=Y.createContext(null);La.displayName=`DataRouterState`;var Ra=Y.createContext(!1);function za(){return Y.useContext(Ra)}var Ba=Y.createContext({isTransitioning:!1});Ba.displayName=`ViewTransition`;var Va=Y.createContext(new Map);Va.displayName=`Fetchers`;var Ha=Y.createContext(null);Ha.displayName=`Await`;var Q=Y.createContext(null);Q.displayName=`Navigation`;var Ua=Y.createContext(null);Ua.displayName=`Location`;var Wa=Y.createContext({outlet:null,matches:[],isDataRoute:!1});Wa.displayName=`Route`;var Ga=Y.createContext(null);Ga.displayName=`RouteError`;var Ka=`REACT_ROUTER_ERROR`,qa=`REDIRECT`,Ja=`ROUTE_ERROR_RESPONSE`;function Ya(e){if(e.startsWith(`${Ka}:${qa}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Xa(e){if(e.startsWith(`${Ka}:${Ja}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ka(t.status,t.statusText,t.data)}catch{}}function Za(e,{relative:t}={}){X(Qa(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=Y.useContext(Q),{hash:i,pathname:a,search:o}=io(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:wa([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Qa(){return Y.useContext(Ua)!=null}function $(){return X(Qa(),`useLocation() may be used only in the context of a <Router> component.`),Y.useContext(Ua).location}var $a=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function eo(e){Y.useContext(Q).static||Y.useLayoutEffect(e)}function to(){let{isDataRoute:e}=Y.useContext(Wa);return e?wo():no()}function no(){X(Qa(),`useNavigate() may be used only in the context of a <Router> component.`);let e=Y.useContext(Ia),{basename:t,navigator:n}=Y.useContext(Q),{matches:r}=Y.useContext(Wa),{pathname:i}=$(),a=JSON.stringify(xa(r)),o=Y.useRef(!1);return eo(()=>{o.current=!0}),Y.useCallback((r,s={})=>{if(Z(o.current,$a),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Sa(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:wa([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}Y.createContext(null);function ro(){let{matches:e}=Y.useContext(Wa);return e[e.length-1]?.params??{}}function io(e,{relative:t}={}){let{matches:n}=Y.useContext(Wa),{pathname:r}=$(),i=JSON.stringify(xa(n));return Y.useMemo(()=>Sa(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ao(e,t){return oo(e,t)}function oo(e,t,n){X(Qa(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=Y.useContext(Q),{matches:i}=Y.useContext(Wa),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Eo(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
35
|
-
|
|
36
|
-
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=$(),d;if(t){let e=typeof t==`string`?Ki(t):t;X(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Yi(e,{pathname:p});Z(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Z(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=mo(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:wa([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:wa([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?Y.createElement(Ua.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function so(){let e=Co(),t=Aa(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=Y.createElement(Y.Fragment,null,Y.createElement(`p`,null,`💿 Hey developer 👋`),Y.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,Y.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,Y.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),Y.createElement(Y.Fragment,null,Y.createElement(`h2`,null,`Unexpected Application Error!`),Y.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?Y.createElement(`pre`,{style:i},n):null,o)}var co=Y.createElement(so,null),lo=class extends Y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Xa(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:Y.createElement(Wa.Provider,{value:this.props.routeContext},Y.createElement(Ga.Provider,{value:e,children:this.props.component}));return this.context?Y.createElement(fo,{error:e},t):t}};lo.contextType=Ra;var uo=new WeakMap;function fo({children:e,error:t}){let{basename:n}=Y.useContext(Q);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ya(t.digest);if(e){let r=uo.get(t);if(r)throw r;let i=Na(e.location,n);if(Ma&&!uo.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw uo.set(t,n),n}return Y.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function po({routeContext:e,match:t,children:n}){let r=Y.useContext(Ia);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),Y.createElement(Wa.Provider,{value:e},n)}function mo(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);X(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ja(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||co,o&&(s<0&&c===0?(Eo(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?Y.createElement(n.route.Component,null):n.route.element?n.route.element:e,Y.createElement(po,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?Y.createElement(lo,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function ho(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function go(e){let t=Y.useContext(Ia);return X(t,ho(e)),t}function _o(e){let t=Y.useContext(La);return X(t,ho(e)),t}function vo(e){let t=Y.useContext(Wa);return X(t,ho(e)),t}function yo(e){let t=vo(e),n=t.matches[t.matches.length-1];return X(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function bo(){return yo(`useRouteId`)}function xo(){let e=_o(`useNavigation`);return Y.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function So(){let{matches:e,loaderData:t}=_o(`useMatches`);return Y.useMemo(()=>e.map(e=>Zi(e,t)),[e,t])}function Co(){let e=Y.useContext(Ga),t=_o(`useRouteError`),n=yo(`useRouteError`);return e===void 0?t.errors?.[n]:e}function wo(){let{router:e}=go(`useNavigate`),t=yo(`useNavigate`),n=Y.useRef(!1);return eo(()=>{n.current=!0}),Y.useCallback(async(r,i={})=>{Z(n.current,$a),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var To={};function Eo(e,t,n){!t&&!To[e]&&(To[e]=!0,Z(!1,n))}Y.memo(Do);function Do({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return oo(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Oo(e){X(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function ko({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){X(!Qa(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=Y.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Ki(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=Y.useMemo(()=>{let e=ha(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Z(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:Y.createElement(Q.Provider,{value:c},Y.createElement(Ua.Provider,{children:t,value:h}))}function Ao({children:e,location:t}){return ao(jo(e),t)}Y.Component;function jo(e,t=[]){let n=[];return Y.Children.forEach(e,(e,r)=>{if(!Y.isValidElement(e))return;let i=[...t,r];if(e.type===Y.Fragment){n.push.apply(n,jo(e.props.children,i));return}X(e.type===Oo,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),X(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=jo(e.props.children,i)),n.push(a)}),n}var Mo=`get`,No=`application/x-www-form-urlencoded`;function Po(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Fo(e){return Po(e)&&e.tagName.toLowerCase()===`button`}function Io(e){return Po(e)&&e.tagName.toLowerCase()===`form`}function Lo(e){return Po(e)&&e.tagName.toLowerCase()===`input`}function Ro(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zo(e,t){return e.button===0&&(!t||t===`_self`)&&!Ro(e)}function Bo(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Vo(e,t){let n=Bo(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Ho=null;function Uo(){if(Ho===null)try{new FormData(document.createElement(`form`),0),Ho=!1}catch{Ho=!0}return Ho}var Wo=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Go(e){return e!=null&&!Wo.has(e)?(Z(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${No}"`),null):e}function Ko(e,t){let n,r,i,a,o;if(Io(e)){let o=e.getAttribute(`action`);r=o?ha(o,t):null,n=e.getAttribute(`method`)||Mo,i=Go(e.getAttribute(`enctype`))||No,a=new FormData(e)}else if(Fo(e)||Lo(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ha(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Mo,i=Go(e.getAttribute(`formenctype`))||Go(o.getAttribute(`enctype`))||No,a=new FormData(o,e),!Uo()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Po(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Mo,r=null,i=No,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var qo={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Jo=/[&><\u2028\u2029]/g;function Yo(e){return e.replace(Jo,e=>qo[e])}function Xo(e,t){if(e===!1||e==null)throw Error(t)}function Zo(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&ha(i.pathname,t)===`/`?i.pathname=`${Ta(t)}/_root.${r}`:i.pathname=`${Ta(i.pathname)}.${r}`,i}async function Qo(e,t){if(e.id in t)return t[e.id];try{let n=await m(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $o(e){return e!=null&&typeof e.page==`string`}function es(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ts(e,t,n){return os((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Qo(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(es).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ns(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function rs(e,t,{includeHydrateFallback:n}={}){return is(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function is(e){return[...new Set(e)]}function as(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function os(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!$o(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(as(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function ss(){let e=Y.useContext(Ia);return Xo(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function cs(){let e=Y.useContext(La);return Xo(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ls=Y.createContext(void 0);ls.displayName=`FrameworkContext`;function us(){let e=Y.useContext(ls);return Xo(e,`You must render this element inside a <HydratedRouter> element`),e}function ds(e,t){let n=Y.useContext(ls),[r,i]=Y.useState(!1),[a,o]=Y.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=Y.useRef(null);Y.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),Y.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:fs(s,p),onBlur:fs(c,m),onMouseEnter:fs(l,p),onMouseLeave:fs(u,m),onTouchStart:fs(d,p)}]:[a,f,{}]:[!1,f,{}]}function fs(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ps({page:e,...t}){let n=za(),{router:r}=ss(),i=Y.useMemo(()=>Yi(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?Y.createElement(hs,{page:e,matches:i,...t}):Y.createElement(gs,{page:e,matches:i,...t}):null}function ms(e){let{manifest:t,routeModules:n}=us(),[r,i]=Y.useState([]);return Y.useEffect(()=>{let r=!1;return ts(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function hs({page:e,matches:t,...n}){let r=$(),{future:i}=us(),{basename:a}=ss(),o=Y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Zo(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return Y.createElement(Y.Fragment,null,o.map(e=>Y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function gs({page:e,matches:t,...n}){let r=$(),{future:i,manifest:a,routeModules:o}=us(),{basename:s}=ss(),{loaderData:c,matches:l}=cs(),u=Y.useMemo(()=>ns(e,t,l,a,r,`data`),[e,t,l,a,r]),d=Y.useMemo(()=>ns(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=Y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Zo(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=Y.useMemo(()=>rs(d,a),[d,a]),m=ms(d);return Y.createElement(Y.Fragment,null,f.map(e=>Y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>Y.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>Y.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function _s(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}Y.Component;var vs=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{vs&&(window.__reactRouterVersion=`7.17.0`)}catch{}function ys({basename:e,children:t,useTransitions:n,window:r}){let i=Y.useRef();i.current??=Vi({window:r,v5Compat:!0});let a=i.current,[o,s]=Y.useState({action:a.action,location:a.location}),c=Y.useCallback(e=>{n===!1?s(e):Y.startTransition(()=>s(e))},[n]);return Y.useLayoutEffect(()=>a.listen(c),[a,c]),Y.createElement(ko,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function bs({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=Y.useState({action:n.action,location:n.location}),o=Y.useCallback(e=>{r===!1?a(e):Y.startTransition(()=>a(e))},[r]);return Y.useLayoutEffect(()=>n.listen(o),[n,o]),Y.createElement(ko,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}bs.displayName=`unstable_HistoryRouter`;var xs=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ss=Y.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=Y.useContext(Q),v=typeof l==`string`&&xs.test(l),y=Na(l,h);l=y.to;let b=Za(l,{relative:r}),x=$(),S=null;if(o){let e=Sa(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:wa([h,e.pathname])),S=g.createHref(e)}let[C,w,ee]=ds(n,p),te=ks(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function ne(t){e&&e(t),t.defaultPrevented||te(t)}let T=!(y.isExternal||i),re=Y.createElement(`a`,{...p,...ee,href:(T?S:void 0)||y.absoluteURL||b,onClick:T?ne:e,ref:_s(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?Y.createElement(Y.Fragment,null,re,Y.createElement(ps,{page:b})):re});Ss.displayName=`Link`;var Cs=Y.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=io(a,{relative:c.relative}),d=$(),f=Y.useContext(La),{navigator:p,basename:m}=Y.useContext(Q),h=f!=null&&Bs(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=ha(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let ee=typeof i==`function`?i(S):i;return Y.createElement(Ss,{...c,"aria-current":C,className:w,ref:l,style:ee,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Cs.displayName=`NavLink`;var ws=Y.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Mo,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=Y.useContext(Q),g=Ns(),_=Ps(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&xs.test(s);return Y.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?Y.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});ws.displayName=`Form`;function Ts({getKey:e,storageKey:t,...n}){let r=Y.useContext(ls),{basename:i}=Y.useContext(Q),a=$(),o=So();Rs({getKey:e,storageKey:t});let s=Y.useMemo(()=>{if(!r||!e)return null;let t=Ls(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return Y.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Yo(JSON.stringify(t||Fs))}, ${Yo(JSON.stringify(s))})`}})}Ts.displayName=`ScrollRestoration`;function Es(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ds(e){let t=Y.useContext(Ia);return X(t,Es(e)),t}function Os(e){let t=Y.useContext(La);return X(t,Es(e)),t}function ks(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=to(),d=$(),f=io(e,{relative:o});return Y.useCallback(p=>{if(zo(p,t)){p.preventDefault();let t=n===void 0?Gi(d)===Gi(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?Y.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function As(e){Z(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=Y.useRef(Bo(e)),n=Y.useRef(!1),r=$(),i=Y.useMemo(()=>Vo(r.search,n.current?null:t.current),[r.search]),a=to();return[i,Y.useCallback((e,t)=>{let r=Bo(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var js=0,Ms=()=>`__${String(++js)}__`;function Ns(){let{router:e}=Ds(`useSubmit`),{basename:t}=Y.useContext(Q),n=bo(),r=e.fetch,i=e.navigate;return Y.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Ko(e,t);a.navigate===!1?await r(a.fetcherKey||Ms(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Ps(e,{relative:t}={}){let{basename:n}=Y.useContext(Q),r=Y.useContext(Wa);X(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...io(e||`.`,{relative:t})},o=$();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:wa([n,a.pathname])),Gi(a)}var Fs=`react-router-scroll-positions`,Is={};function Ls(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:ha(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Rs({getKey:e,storageKey:t}={}){let{router:n}=Ds(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Os(`useScrollRestoration`),{basename:a}=Y.useContext(Q),o=$(),s=So(),c=xo();Y.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),zs(Y.useCallback(()=>{if(c.state===`idle`){let t=Ls(o,s,a,e);Is[t]=window.scrollY}try{sessionStorage.setItem(t||Fs,JSON.stringify(Is))}catch(e){Z(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(Y.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Fs);e&&(Is=JSON.parse(e))}catch{}},[t]),Y.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Is,()=>window.scrollY,e?(t,n)=>Ls(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),Y.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{Z(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function zs(e,t){let{capture:n}=t||{};Y.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Bs(e,{relative:t}={}){let n=Y.useContext(Ba);X(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ds(`useViewTransitionState`),i=io(e,{relative:t});if(!n.isTransitioning)return!1;let a=ha(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ha(n.nextLocation.pathname,r)||n.nextLocation.pathname;return fa(i.pathname,o)!=null||fa(i.pathname,a)!=null}async function Vs(e){if(globalThis.isSecureContext===!1&&Hs(e))return!0;if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}return Hs(e)}function Hs(e){let t;try{if(t=document.createElement(`textarea`),t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,document.body.appendChild(t),t.focus(),t.select(),document.execCommand(`copy`))return!0}catch(e){console.error(`Failed to copy to clipboard:`,e)}finally{t?.remove()}return!1}function Us(e=2e3){let[t,n]=Y.useState(!1),r=Y.useRef();return Y.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),[t,async t=>{r.current&&clearTimeout(r.current);let i=await Vs(t);return i&&(n(!0),r.current=setTimeout(()=>{n(!1)},e)),i}]}var Ws=h(),Gs=({children:e,textContent:t})=>{let{token:n}=a.useToken(),[i,o]=Y.useState(`idle`),u=Y.useRef();Y.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);let d=async e=>{e.stopPropagation(),o(await Vs(t)?`copied`:`failed`),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>o(`idle`),1500)},f={cursor:`pointer`,marginLeft:n.marginSM,transition:`opacity 0.2s`,fontSize:n.fontSizeSM},p;return p=i===`copied`?(0,Ws.jsx)(r,{style:{...f,color:n.colorSuccess,opacity:1},title:`Copied!`}):i===`failed`?(0,Ws.jsx)(c,{style:{...f,color:n.colorError,opacity:1},title:`Copy failed`}):(0,Ws.jsx)(s,{onClick:d,style:{...f,opacity:.65},onMouseEnter:e=>{e.currentTarget.style.opacity=`1`},onMouseLeave:e=>{e.currentTarget.style.opacity=`0.65`},title:`Copy to clipboard`}),(0,Ws.jsxs)(l,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`},children:[(0,Ws.jsx)(`span`,{style:{flex:1},children:e}),p]})};function Ks(e){return typeof e==`string`?e:typeof e==`number`?String(e):Y.isValidElement(e)&&e.props.children?Ks(e.props.children):Array.isArray(e)?e.map(Ks).join(` `):String(e)}function qs(){let{message:e}=i.useApp(),t=(0,Y.useCallback)((t,n)=>e.success({content:(0,Ws.jsx)(Gs,{textContent:Ks(t),children:t}),duration:n?.duration??3,key:n?.key,onClose:n?.onClose}),[e]),n=(0,Y.useCallback)((t,n)=>e.error({content:(0,Ws.jsx)(Gs,{textContent:Ks(t),children:t}),duration:n?.duration??6,key:n?.key,onClose:n?.onClose}),[e]),r=(0,Y.useCallback)((t,n)=>e.warning({content:(0,Ws.jsx)(Gs,{textContent:Ks(t),children:t}),duration:n?.duration??4,key:n?.key,onClose:n?.onClose}),[e]),a=(0,Y.useCallback)((t,n)=>e.info({content:(0,Ws.jsx)(Gs,{textContent:Ks(t),children:t}),duration:n?.duration??3,key:n?.key,onClose:n?.onClose}),[e]),o=(0,Y.useCallback)((t,n)=>e.loading({content:(0,Ws.jsx)(Gs,{textContent:Ks(t),children:t}),duration:n?.duration??0,key:n?.key,onClose:n?.onClose}),[e]),s=(0,Y.useCallback)(t=>e.destroy(t),[e]);return(0,Y.useMemo)(()=>({showSuccess:t,showError:n,showWarning:r,showInfo:a,showLoading:o,destroy:s}),[t,n,r,a,o,s])}export{K as $,pi as A,zr as B,Oi as C,Zt as Ct,J as D,Si as E,ci as F,Mr as G,Pr as H,oi as I,Dr as J,jr as K,Br as L,fi as M,hi as N,li as O,di as P,yr as Q,Fr as R,ki as S,tn as St,Di as T,At as Tt,kr as U,Nr as V,Ar as W,_r as X,Or as Y,vr as Z,Fi as _,Qn as _t,Ss as a,fr as at,ji as b,Qt as bt,fa as c,lr as ct,to as d,or as dt,wr as et,ro as f,ar as ft,Ii as g,$n as gt,Ri as h,rr as ht,ys as i,hr as it,ui as j,mi as k,Za as l,cr as lt,Li as m,nr as mt,Vs as n,Tr as nt,Oo as o,pr as ot,As as p,ir as pt,Er as q,Us as r,gr as rt,Ao as s,G as st,qs as t,q as tt,$ as u,sr as ut,Ni as v,nn as vt,Ei as w,kt as wt,Ai as x,en as xt,Mi as y,rn as yt,Ir as z};
|