agentroam-runtime-darwin-arm64 0.2.0-preview.79 → 0.2.0-preview.80
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/manifest.json +2 -2
- package/package.json +1 -1
- package/runtime/.next/BUILD_ID +1 -1
- package/runtime/.next/app-build-manifest.json +8 -8
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +3 -3
- package/runtime/.next/prerender-manifest.json +1 -1
- package/runtime/.next/required-server-files.json +1 -1
- package/runtime/.next/server/app/_not-found/page.js +1 -1
- package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app/_not-found.html +1 -1
- package/runtime/.next/server/app/_not-found.rsc +2 -2
- package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/codex-sharing/route.js +1 -1
- package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js +1 -1
- package/runtime/.next/server/app/api/agent/models/route.js +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js +1 -1
- package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/stream/route.js +3 -3
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
- package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
- package/runtime/.next/server/app/api/business/route.js +1 -1
- package/runtime/.next/server/app/api/calendar/route.js +2 -2
- package/runtime/.next/server/app/api/client-logs/route.js +1 -1
- package/runtime/.next/server/app/api/collaboration/route.js +2 -2
- package/runtime/.next/server/app/api/engine-threads/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +2 -2
- package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
- package/runtime/.next/server/app/api/flow-studio/config/route.js +1 -1
- package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js +1 -1
- package/runtime/.next/server/app/api/internal/todo-mcp/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
- package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
- package/runtime/.next/server/app/api/memory/route.js +1 -1
- package/runtime/.next/server/app/api/messaging/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/ack/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/stream/route.js +2 -2
- package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
- package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/projects/check/route.js +1 -1
- package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
- package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
- package/runtime/.next/server/app/api/projects/route.js +1 -1
- package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
- package/runtime/.next/server/app/api/push/unsubscribe/route.js +3 -3
- package/runtime/.next/server/app/api/push/vapid/route.js +2 -2
- package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
- package/runtime/.next/server/app/api/session-images/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/session-views/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +2 -2
- package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/parallel/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/settings/route.js +1 -1
- package/runtime/.next/server/app/api/skills/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/commands/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/executions/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/todos/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
- package/runtime/.next/server/app/api/tools/route.js +1 -1
- package/runtime/.next/server/app/api/update/check/route.js +1 -1
- package/runtime/.next/server/app/api/update/install/route.js +1 -1
- package/runtime/.next/server/app/api/update/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computer-settings/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computers/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
- package/runtime/.next/server/app/api/workspace-changes/route.js +1 -1
- package/runtime/.next/server/app/web/page.js +4 -4
- package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app-paths-manifest.json +33 -33
- package/runtime/.next/server/chunks/1298.js +1 -1
- package/runtime/.next/server/chunks/5303.js +1 -1
- package/runtime/.next/server/chunks/6703.js +1 -1
- package/runtime/.next/server/chunks/9119.js +2 -2
- package/runtime/.next/server/chunks/9457.js +1 -1
- package/runtime/.next/server/middleware-build-manifest.js +1 -1
- package/runtime/.next/server/pages/404.html +1 -1
- package/runtime/.next/server/pages/500.html +1 -1
- package/runtime/.next/server/server-reference-manifest.json +1 -1
- package/runtime/.next/static/chunks/app/web/{error-fac7681c6397fcd7.js → error-f313c4014e78cef5.js} +1 -1
- package/runtime/.next/static/chunks/app/web/layout-80fa1b5f4c96b0b5.js +1 -0
- package/runtime/.next/static/chunks/app/web/page-2e962377e57d3383.js +1 -0
- package/runtime/.next/static/chunks/{main-app-0c7cccb2825ad747.js → main-app-ea4c5663714943e2.js} +1 -1
- package/runtime/lib/device-pairing-gateway.mjs +1 -1
- package/runtime/lib/pairing-page.mjs +5 -4
- package/runtime/lib/pwa-assets.mjs +3 -0
- package/runtime/lib/tunnel-control.mjs +38 -3
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/MacOS/agentroam-remote-desktop +0 -0
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/Resources/agentroam-component.json +1 -1
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/_CodeSignature/CodeResources +2 -2
- package/runtime/node_modules/.package-lock.json +129 -129
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +79 -75
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +52 -52
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0e6mn0ck.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0ssqfy51.mjs +18 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-82ghff97.mjs +39 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-82yhcz2x.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-b8jr1m8m.mjs +23 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-cj0jh226.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ebtbxtjf.mjs +28 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-pb4erfqh.mjs +42 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-664d5mmy.mjs → core-q4cwy1ja.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-rs058s2g.mjs +16 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-w6pv4szb.mjs +18 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-wjeh40nr.mjs +20 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-70sfhqm6.mjs → core-zn1abzvs.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +12 -12
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +22 -22
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +26 -26
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +23 -22
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +83 -84
- package/runtime/node_modules/caniuse-lite/package.json +1 -1
- package/runtime/node_modules/mediabunny/README.md +0 -4
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +127 -185
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +11 -11
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +12 -12
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +127 -185
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +127 -185
- package/runtime/node_modules/mediabunny/dist/modules/src/adts/adts-demuxer.js +0 -4
- package/runtime/node_modules/mediabunny/dist/modules/src/aes.js +4 -6
- package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-demuxer.js +0 -6
- package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-segmented-input.js +5 -17
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-boxes.js +1 -2
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-demuxer.js +1 -12
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-muxer.js +18 -34
- package/runtime/node_modules/mediabunny/dist/modules/src/matroska/matroska-demuxer.js +0 -3
- package/runtime/node_modules/mediabunny/dist/modules/src/media-sink.js +8 -3
- package/runtime/node_modules/mediabunny/dist/modules/src/media-source.js +12 -5
- package/runtime/node_modules/mediabunny/dist/modules/src/misc.js +5 -19
- package/runtime/node_modules/mediabunny/dist/modules/src/mp3/mp3-demuxer.js +0 -4
- package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-demuxer.js +13 -22
- package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-muxer.js +2 -2
- package/runtime/node_modules/mediabunny/dist/modules/src/segmented-input.js +65 -70
- package/runtime/node_modules/mediabunny/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/version.js +1 -1
- package/runtime/node_modules/mediabunny/package.json +1 -1
- package/runtime/node_modules/mediabunny/src/adts/adts-demuxer.ts +0 -5
- package/runtime/node_modules/mediabunny/src/aes.ts +4 -7
- package/runtime/node_modules/mediabunny/src/hls/hls-demuxer.ts +0 -7
- package/runtime/node_modules/mediabunny/src/hls/hls-segmented-input.ts +6 -19
- package/runtime/node_modules/mediabunny/src/isobmff/isobmff-boxes.ts +1 -2
- package/runtime/node_modules/mediabunny/src/isobmff/isobmff-demuxer.ts +1 -15
- package/runtime/node_modules/mediabunny/src/isobmff/isobmff-muxer.ts +19 -37
- package/runtime/node_modules/mediabunny/src/matroska/matroska-demuxer.ts +0 -4
- package/runtime/node_modules/mediabunny/src/media-sink.ts +12 -3
- package/runtime/node_modules/mediabunny/src/media-source.ts +20 -5
- package/runtime/node_modules/mediabunny/src/misc.ts +5 -26
- package/runtime/node_modules/mediabunny/src/mp3/mp3-demuxer.ts +0 -5
- package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-demuxer.ts +19 -30
- package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-muxer.ts +2 -2
- package/runtime/node_modules/mediabunny/src/segmented-input.ts +79 -76
- package/runtime/node_modules/mediabunny/src/version.ts +1 -1
- package/runtime/package-lock.json +162 -162
- package/runtime/public/pwa/apple-touch-icon.png +0 -0
- package/runtime/public/pwa/icon-maskable-512.png +0 -0
- package/runtime/public/pwa/manifest.webmanifest +2 -1
- package/runtime/public/pwa/pairing-scan.js +32 -14
- package/runtime/server.js +1 -1
- package/runtime/webapp/dist/apple-touch-icon.png +0 -0
- package/runtime/webapp/dist/assets/{AIHubView-4kqTaPjO.js → AIHubView-CM6ugXG3.js} +1 -1
- package/runtime/webapp/dist/assets/{AgentManager-CDgiLqF_.js → AgentManager-dXI31b0a.js} +1 -1
- package/runtime/webapp/dist/assets/{AiHubPane-C070jRHe.js → AiHubPane-DFzC3nbd.js} +1 -1
- package/runtime/webapp/dist/assets/{App-iZlxRHaL.js → App-mF6ELC07.js} +4 -4
- package/runtime/webapp/dist/assets/{BrowserLivePanel-DxjgVXXK.js → BrowserLivePanel-CamAULwS.js} +1 -1
- package/runtime/webapp/dist/assets/{CalendarPage-CxPVBlzd.js → CalendarPage-BbYdGYWn.js} +1 -1
- package/runtime/webapp/dist/assets/{CalendarView-CS-OG-13.js → CalendarView-QfbrlL9X.js} +1 -1
- package/runtime/webapp/dist/assets/{CollaborationCreateDialog-tI6S1cha.js → CollaborationCreateDialog-CWhmFQtA.js} +1 -1
- package/runtime/webapp/dist/assets/{CollaborationDashboard-DSZa3Cns.js → CollaborationDashboard-XL5SnFOu.js} +1 -1
- package/runtime/webapp/dist/assets/{CollaborationPage-COyvllTJ.js → CollaborationPage-B1tiqgnG.js} +1 -1
- package/runtime/webapp/dist/assets/{FilePreview-CcJXlLge.js → FilePreview-CPY6dP8Q.js} +3 -3
- package/runtime/webapp/dist/assets/{FileTree-BuhW-pqR.js → FileTree-BBgrOian.js} +1 -1
- package/runtime/webapp/dist/assets/{FileWorkspaceDrawer-ByWXnJ0B.js → FileWorkspaceDrawer-BXDuKlrL.js} +1 -1
- package/runtime/webapp/dist/assets/{FlowStudioPane-CxQ-QIOf.js → FlowStudioPane-lnjLcd9c.js} +1 -1
- package/runtime/webapp/dist/assets/{HostProjectPicker--J4_JpSW.js → HostProjectPicker-DN_vGqQb.js} +1 -1
- package/runtime/webapp/dist/assets/{LSPServerList-fkagcDVv.js → LSPServerList-B-R7HDSP.js} +1 -1
- package/runtime/webapp/dist/assets/{MCPServerList-w7tetX3J.js → MCPServerList-CTc0iAwT.js} +1 -1
- package/runtime/webapp/dist/assets/{MemoryViewer-Xac9EeaV.js → MemoryViewer-Dzh_miRv.js} +1 -1
- package/runtime/webapp/dist/assets/{NewSessionWindow-C460-gxX.js → NewSessionWindow-zjqAUfKb.js} +1 -1
- package/runtime/webapp/dist/assets/{RemoteDesktopPage-BniHztmt.js → RemoteDesktopPage-9AhztqA2.js} +1 -1
- package/runtime/webapp/dist/assets/{RemoteDesktopTabBridge-BF1dFltY.js → RemoteDesktopTabBridge-BA_HQv3V.js} +1 -1
- package/runtime/webapp/dist/assets/{RunningSessionsIcon-D6rY-IzV.js → RunningSessionsIcon-BvFSI9OF.js} +1 -1
- package/runtime/webapp/dist/assets/{SessionDashboard-D868NjZ_.js → SessionDashboard-DcPPoXe2.js} +1 -1
- package/runtime/webapp/dist/assets/{SessionDashboardBridge-AhmhQ1Xn.js → SessionDashboardBridge-CjoeUy-v.js} +1 -1
- package/runtime/webapp/dist/assets/{SettingsPanel-DoDRBreZ.js → SettingsPanel-DmdXDQUm.js} +1 -1
- package/runtime/webapp/dist/assets/{SkillManager-Da7bpT-s.js → SkillManager-CS_skFZj.js} +1 -1
- package/runtime/webapp/dist/assets/{TaskPaneTerminal-DTDU88Rr.js → TaskPaneTerminal-BFHDRCb9.js} +1 -1
- package/runtime/webapp/dist/assets/{TerminalPane-_dVVs00I.js → TerminalPane-Dr_nY9pI.js} +1 -1
- package/runtime/webapp/dist/assets/TodoPage-guIvBCW0.js +1 -0
- package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-D3GW7M1R.js → abnfDiagram-VCTEODGH-FEEApB15.js} +1 -1
- package/runtime/webapp/dist/assets/{arc-CkEemU1L.js → arc-CycwMc2c.js} +1 -1
- package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-GYQtcFLY.js → architectureDiagram-5GKGNRK7-BFq9JapX.js} +1 -1
- package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-D5_bj13P.js → blockDiagram-I7D4REHJ-DkOJ55Ag.js} +1 -1
- package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-Cyg1YunN.js → c4Diagram-7LVT6UL2-CRvi_3RM.js} +1 -1
- package/runtime/webapp/dist/assets/{calendar-days-B1Mn3x8A.js → calendar-days-CLwKstxM.js} +1 -1
- package/runtime/webapp/dist/assets/channel-BwDuyJO4.js +1 -0
- package/runtime/webapp/dist/assets/{check-D-yTByNl.js → check-8EVJMrTV.js} +1 -1
- package/runtime/webapp/dist/assets/{chevron-down-hiPnZS_M.js → chevron-down-ChNxfI2x.js} +1 -1
- package/runtime/webapp/dist/assets/{chevron-right-DKsui_wS.js → chevron-right-Cbkc_d70.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-ZYdmLJUM.js → chunk-2Q5K7J3B-Cklzvs8u.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-C-zA5MxE.js → chunk-5VM5RSS4-NxozE5UP.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-F27PBJKO-cWERJSPb.js → chunk-F27PBJKO-Dyb8E7YM.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-BDqkH2_j.js → chunk-IMKFNOWR-BqbMMc1n.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-D0hOf4wm.js → chunk-JWPE2WC7-do0R2H6U.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-bGKHqXLU.js → chunk-POPQ4Y6H-B2HIaynf.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-SVP7TREG-DbzwWcno.js → chunk-SVP7TREG-C_zmjkwn.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-TICWLB2K-CmCx8YTb.js → chunk-TICWLB2K-Dh2bZgM1.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-COAufrJq.js → chunk-XXDRQBXY-CnqciVDz.js} +1 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-BfyV8P0w.js +1 -0
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-BfyV8P0w.js +1 -0
- package/runtime/webapp/dist/assets/{client-5Hu1eVTX.js → client-I0ZVCjOI.js} +1 -1
- package/runtime/webapp/dist/assets/{codeSyntax-Jy5nWtHv.js → codeSyntax-C8n4_KZS.js} +1 -1
- package/runtime/webapp/dist/assets/{collaboration-DRFqpcAz.js → collaboration-lVxWL5ce.js} +1 -1
- package/runtime/webapp/dist/assets/{composer-file-routing-BtvXnu_o.js → composer-file-routing-qSvJpT-v.js} +1 -1
- package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-BU8MmGqT.js → cose-bilkent-JH36ORCC-CulKVUkj.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-BHXgPQGq.js → cynefin-OW5HDTMX-C1LUI1_G.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-DSJJ_PpM.js → cynefinDiagram-5FMLGOSQ-D3Ymzw_P.js} +1 -1
- package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-pJr8jDyF.js → dagre-GXQ25YYZ-DRaL0cGu.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-BZ_7PPQn.js → diagram-S7CK7UJ4-D8gLHoZo.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-c8pu5Rp4.js → diagram-UQ7AKVKN-CaVU0aQT.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-D1xao_j-.js → diagram-VSXAHHWV-LFAKRvZz.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VX7I27RA-CnBWGCHa.js → diagram-VX7I27RA-DXpxUERc.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-D-TCo4OF.js → diagram-Z3DM3KII-vAiik55G.js} +1 -1
- package/runtime/webapp/dist/assets/{download-B2jLl85N.js → download-BE31-Qm0.js} +1 -1
- package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-BGBuf1T3.js → ebnfDiagram-PWID7BFC-MaFL7Kgb.js} +1 -1
- package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-D8rCYH4y.js → erDiagram-RLTQ6QDP-DuEu79B3.js} +1 -1
- package/runtime/webapp/dist/assets/{file-types-BZ8YZAV-.js → file-types-ZVLWtslN.js} +1 -1
- package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-BJGQL6in.js → flowDiagram-HODETNUW-BAQ6nP2D.js} +1 -1
- package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-K9o-Kk2M.js → ganttDiagram-EL5Y4UJY-C48VBnPy.js} +1 -1
- package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-BC2r8pLT.js → gitGraphDiagram-WWUBYQGX-BfWAh9Kr.js} +1 -1
- package/runtime/webapp/dist/assets/{history-Ci0s2eVL.js → history-D4E3D_aM.js} +1 -1
- package/runtime/webapp/dist/assets/{image-plus-Cx4LQVvj.js → image-plus-DQV_EEAN.js} +1 -1
- package/runtime/webapp/dist/assets/{index-D1AQffdA.js → index-DSgLFE4Q.js} +3 -3
- package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-bFnrh7W7.js → infoDiagram-27XIBGKW-BM7P_-u_.js} +1 -1
- package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-Qun77xRt.js → ishikawaDiagram-5VMMS53U-Cwd8XR-p.js} +1 -1
- package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-DjCfoBNX.js → journeyDiagram-3NMN7TZE-MOgiksTh.js} +1 -1
- package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-BJGlhVsx.js → kanban-definition-UXKFOSKX-DulC5OLL.js} +1 -1
- package/runtime/webapp/dist/assets/{layout-CYTxygXU.js → layout-Dku9sXQ7.js} +1 -1
- package/runtime/webapp/dist/assets/{linear-CzJGOwUm.js → linear-B3-dddD7.js} +1 -1
- package/runtime/webapp/dist/assets/{list-todo-CP9DqU2D.js → list-todo-Bik5IY2r.js} +1 -1
- package/runtime/webapp/dist/assets/{loader-circle-xEKTnlp3.js → loader-circle-C5C-IzGK.js} +1 -1
- package/runtime/webapp/dist/assets/{locate-fixed-CfEojGOl.js → locate-fixed-CHkezEEh.js} +1 -1
- package/runtime/webapp/dist/assets/{mermaid.core-BTbaaIjb.js → mermaid.core-CRRXKysA.js} +5 -5
- package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-eiKdbp4J.js → mindmap-definition-YA3MSWOX-CaaP-nEb.js} +1 -1
- package/runtime/webapp/dist/assets/{mobileViewport-DF1R6qR2.js → mobileViewport-CekmYKqS.js} +1 -1
- package/runtime/webapp/dist/assets/{new-session-window-BtGAiW4A.css → new-session-window-BfDMd-h3.css} +1 -1
- package/runtime/webapp/dist/assets/{new-session-window-BFILhYAe.js → new-session-window-Dgl7UWPR.js} +26 -26
- package/runtime/webapp/dist/assets/page-_fFyRId-.js +86 -0
- package/runtime/webapp/dist/assets/{pause-C-ecDo3W.js → pause-BsmUCuwZ.js} +1 -1
- package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-BuvePvoF.js → pegDiagram-XKGWAZYB-BqybPEwk.js} +1 -1
- package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-Csgh2lYE.js → pieDiagram-E7YTZNPT-BX1H2lh2.js} +1 -1
- package/runtime/webapp/dist/assets/{pin-CjmuX5Tq.js → pin-BsEEYq8M.js} +1 -1
- package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-8Bbl_RHv.js → quadrantDiagram-AXDQQJYC-Btnywv1k.js} +1 -1
- package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-CvYQkIeK.js → railroadDiagram-O6MQD6OU-Da_TV1ER.js} +1 -1
- package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-CytOuQX4.js → requirementDiagram-BXWQKSXE-5V1Aow9h.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-ccw-HY6j6nBt.js → rotate-ccw-BbSby0GQ.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-cw-CyYR2IEw.js → rotate-cw-BMdX-ln4.js} +1 -1
- package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-BoyI7ZhF.js → sankeyDiagram-P5KCCOFB-D_OIVihV.js} +1 -1
- package/runtime/webapp/dist/assets/{send-jSK0YaRl.js → send-Cb7EWSJF.js} +1 -1
- package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-Ckvtmn2N.js → sequenceDiagram-WJ2MYXX4-LKeF5Mri.js} +1 -1
- package/runtime/webapp/dist/assets/{session-dashboard-B4lyuZYF.js → session-dashboard-BFqNDCc8.js} +1 -1
- package/runtime/webapp/dist/assets/{session-tree-CEy-pW8A.js → session-tree-BK_qaCnb.js} +1 -1
- package/runtime/webapp/dist/assets/{shield-check-CFebh9do.js → shield-check-C-r87aMq.js} +1 -1
- package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-yUQjHNrI.js → sizeCapture-INFHLROL-B6j7Q_MN.js} +1 -1
- package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-Dj8oPHDB.js → stateDiagram-D77RDMKH-zhPFqHdQ.js} +1 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DWnBZAiI.js +1 -0
- package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-GDjg8QNS.js → swimlanes-42K2YHIH-C_FCENx1.js} +1 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-DOZCbCJP.js +8 -0
- package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-DFDHsxzp.js → timeline-definition-24CTP7MA-C3DBXjDU.js} +1 -1
- package/runtime/webapp/dist/assets/{trash-2-BF9eI5Bh.js → trash-2-DjggJGbw.js} +1 -1
- package/runtime/webapp/dist/assets/{types-BuPq0iQM.js → types-BQCEWNQz.js} +1 -1
- package/runtime/webapp/dist/assets/{use-session-activity-Ceb8OBjB.js → use-session-activity-BbTXGW7Z.js} +1 -1
- package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-DR5HBqo1.js → vennDiagram-4TSXK5OY-CssdTIB0.js} +1 -1
- package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-Bb6pROnE.js → wardleyDiagram-VM6X3IG4-C58K2vVU.js} +1 -1
- package/runtime/webapp/dist/assets/{web-BV7fxnr4.js → web-B4y8vdRZ.js} +1 -1
- package/runtime/webapp/dist/assets/{web-C8kCU9om.js → web-D9rJZXHW.js} +1 -1
- package/runtime/webapp/dist/assets/{x-uSekqXJV.js → x-BYUglEo9.js} +1 -1
- package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-CrpaVklx.js → xychartDiagram-S5SC5T6Z-CQi8bD6A.js} +1 -1
- package/runtime/webapp/dist/assets/{zoom-out-B59mGU6c.js → zoom-out-iMMWRXJs.js} +1 -1
- package/runtime/webapp/dist/index.html +2 -2
- package/runtime/.next/static/chunks/app/web/layout-79492e587e5930cf.js +0 -1
- package/runtime/.next/static/chunks/app/web/page-0f06deb6eb4d49e0.js +0 -1
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-2g5j09ba.mjs +0 -16
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-59ydwk0g.mjs +0 -17
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-95gcz3n1.mjs +0 -38
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ew5sfvfe.mjs +0 -39
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-gjhs7gf6.mjs +0 -20
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-kvdt1szx.mjs +0 -18
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-p654hjkr.mjs +0 -22
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-q9bjbxkv.mjs +0 -19
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-samdvsjh.mjs +0 -33
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-x6bt758j.mjs +0 -17
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.worker.js +0 -8
- package/runtime/node_modules/mediabunny/dist/modules/src/worker.js +0 -26
- package/runtime/node_modules/mediabunny/src/worker.ts +0 -28
- package/runtime/webapp/dist/assets/TodoPage-Bqu8bqNk.js +0 -1
- package/runtime/webapp/dist/assets/channel-CnNsi-lz.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-DVRTvUTS.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-DVRTvUTS.js +0 -1
- package/runtime/webapp/dist/assets/page-B-CkpInM.js +0 -86
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-Csg946NK.js +0 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-BUnuRfXp.js +0 -8
- /package/runtime/.next/static/{Ra6nQooMsDWN9-yjPL93f → 57IUKkg-db8mOGDMma8be}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{Ra6nQooMsDWN9-yjPL93f → 57IUKkg-db8mOGDMma8be}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./page-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./page-_fFyRId-.js","./RunningSessionsIcon-BvFSI9OF.js","./x-BYUglEo9.js","./chevron-down-ChNxfI2x.js","./check-8EVJMrTV.js","./trash-2-DjggJGbw.js","./RemoteDesktopTabBridge-BA_HQv3V.js","./chevron-right-Cbkc_d70.js","./calendar-days-CLwKstxM.js","./artifact-links-B0ApmgK6.js","./mobileViewport-CekmYKqS.js","./pin-BsEEYq8M.js","./CollaborationTabBridge-Dxq4G1Uk.js","./SessionDashboardBridge-CjoeUy-v.js","./NewSessionWindow-zjqAUfKb.js","./new-session-window-Dgl7UWPR.js","./composer-file-routing-qSvJpT-v.js","./loader-circle-C5C-IzGK.js","./download-BE31-Qm0.js","./file-types-ZVLWtslN.js","./list-todo-Bik5IY2r.js","./session-tree-BK_qaCnb.js","./zoom-out-iMMWRXJs.js","./rotate-ccw-BbSby0GQ.js","./use-session-activity-BbTXGW7Z.js","./client-I0ZVCjOI.js","./HostProjectPicker-DN_vGqQb.js","./new-session-window-BfDMd-h3.css","./NewSessionWindow-DOLG1XEp.css","./CollaborationPage-B1tiqgnG.js","./shield-check-C-r87aMq.js","./collaboration-lVxWL5ce.js","./collaboration-B0IRHmY_.css","./types-BQCEWNQz.js","./history-D4E3D_aM.js","./image-plus-DQV_EEAN.js","./CollaborationDashboard-XL5SnFOu.js","./CollaborationCreateDialog-CWhmFQtA.js","./CollaborationDashboard-CCXC6JuQ.css","./SessionDashboard-DcPPoXe2.js","./session-dashboard-BFqNDCc8.js","./session-dashboard-BZIyuFTU.css","./pause-BsmUCuwZ.js","./SessionDashboard-CAYVDT8Z.css","./RemoteDesktopPage-9AhztqA2.js","./BrowserLivePanel-CamAULwS.js","./CalendarPage-BbYdGYWn.js","./CalendarView-QfbrlL9X.js","./locate-fixed-CHkezEEh.js","./CalendarView-BjjC_t12.css","./TodoPage-guIvBCW0.js","./App-mF6ELC07.js","./rotate-cw-BMdX-ln4.js","./App-C0CP5N5K.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const h of u.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function n(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(c){if(c.ep)return;c.ep=!0;const u=n(c);fetch(c.href,u)}})();const F3="modulepreload",U3=function(e,t){return new URL(e,t).href},fh={},Br=function(t,n,o){let c=Promise.resolve();if(n&&n.length>0){const h=document.getElementsByTagName("link"),x=document.querySelector("meta[property=csp-nonce]"),w=(x==null?void 0:x.nonce)||(x==null?void 0:x.getAttribute("nonce"));c=Promise.allSettled(n.map(m=>{if(m=U3(m,o),m in fh)return;fh[m]=!0;const A=m.endsWith(".css"),C=A?'[rel="stylesheet"]':"";if(o)for(let T=h.length-1;T>=0;T--){const k=h[T];if(k.href===m&&(!A||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${C}`))return;const b=document.createElement("link");if(b.rel=A?"stylesheet":F3,A||(b.as="script"),b.crossOrigin="",b.href=m,w&&b.setAttribute("nonce",w),document.head.appendChild(b),A)return new Promise((T,k)=>{b.addEventListener("load",T),b.addEventListener("error",()=>k(Error(`Unable to preload CSS for ${m}`)))})}))}function u(h){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=h,window.dispatchEvent(x),!x.defaultPrevented)throw h}return c.then(h=>{for(const x of h||[])x.status==="rejected"&&u(x.reason);return t().catch(u)})};var pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function T2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var R2={exports:{}},xc={},_2={exports:{}},Ce={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -477,7 +477,7 @@ Error generating stack: `+u.message+`
|
|
|
477
477
|
`),r.append(`>>
|
|
478
478
|
`),r.toString()}setMode(r){this.mode=r}setECLevel(r){this.ecLevel=r}setVersion(r){this.version=r}setMaskPattern(r){this.maskPattern=r}setMatrix(r){this.matrix=r}static isValidMaskPattern(r){return r>=0&&r<fi.NUM_MASK_PATTERNS}}fi.NUM_MASK_PATTERNS=8;class Fe extends m{}Fe.kind="WriterException";class de{constructor(){}static clearMatrix(r){r.clear(255)}static buildMatrix(r,i,s,a,l){de.clearMatrix(l),de.embedBasicPatterns(s,l),de.embedTypeInfo(i,a,l),de.maybeEmbedVersionInfo(s,l),de.embedDataBits(r,a,l)}static embedBasicPatterns(r,i){de.embedPositionDetectionPatternsAndSeparators(i),de.embedDarkDotAtLeftBottomCorner(i),de.maybeEmbedPositionAdjustmentPatterns(r,i),de.embedTimingPatterns(i)}static embedTypeInfo(r,i,s){const a=new B;de.makeTypeInfoBits(r,i,a);for(let l=0,f=a.getSize();l<f;++l){const d=a.get(a.getSize()-1-l),g=de.TYPE_INFO_COORDINATES[l],p=g[0],v=g[1];if(s.setBoolean(p,v,d),l<8){const E=s.getWidth()-l-1;s.setBoolean(E,8,d)}else{const S=s.getHeight()-7+(l-8);s.setBoolean(8,S,d)}}}static maybeEmbedVersionInfo(r,i){if(r.getVersionNumber()<7)return;const s=new B;de.makeVersionInfoBits(r,s);let a=6*3-1;for(let l=0;l<6;++l)for(let f=0;f<3;++f){const d=s.get(a);a--,i.setBoolean(l,i.getHeight()-11+f,d),i.setBoolean(i.getHeight()-11+f,l,d)}}static embedDataBits(r,i,s){let a=0,l=-1,f=s.getWidth()-1,d=s.getHeight()-1;for(;f>0;){for(f===6&&(f-=1);d>=0&&d<s.getHeight();){for(let g=0;g<2;++g){const p=f-g;if(!de.isEmpty(s.get(p,d)))continue;let v;a<r.getSize()?(v=r.get(a),++a):v=!1,i!==255&&st.getDataMaskBit(i,p,d)&&(v=!v),s.setBoolean(p,d,v)}d+=l}l=-l,d+=l,f-=2}if(a!==r.getSize())throw new Fe("Not all bits consumed: "+a+"/"+r.getSize())}static findMSBSet(r){return 32-_.numberOfLeadingZeros(r)}static calculateBCHCode(r,i){if(i===0)throw new C("0 polynomial");const s=de.findMSBSet(i);for(r<<=s-1;de.findMSBSet(r)>=s;)r^=i<<de.findMSBSet(r)-s;return r}static makeTypeInfoBits(r,i,s){if(!fi.isValidMaskPattern(i))throw new Fe("Invalid mask pattern");const a=r.getBits()<<3|i;s.appendBits(a,5);const l=de.calculateBCHCode(a,de.TYPE_INFO_POLY);s.appendBits(l,10);const f=new B;if(f.appendBits(de.TYPE_INFO_MASK_PATTERN,15),s.xor(f),s.getSize()!==15)throw new Fe("should not happen but we got: "+s.getSize())}static makeVersionInfoBits(r,i){i.appendBits(r.getVersionNumber(),6);const s=de.calculateBCHCode(r.getVersionNumber(),de.VERSION_INFO_POLY);if(i.appendBits(s,12),i.getSize()!==18)throw new Fe("should not happen but we got: "+i.getSize())}static isEmpty(r){return r===255}static embedTimingPatterns(r){for(let i=8;i<r.getWidth()-8;++i){const s=(i+1)%2;de.isEmpty(r.get(i,6))&&r.setNumber(i,6,s),de.isEmpty(r.get(6,i))&&r.setNumber(6,i,s)}}static embedDarkDotAtLeftBottomCorner(r){if(r.get(8,r.getHeight()-8)===0)throw new Fe;r.setNumber(8,r.getHeight()-8,1)}static embedHorizontalSeparationPattern(r,i,s){for(let a=0;a<8;++a){if(!de.isEmpty(s.get(r+a,i)))throw new Fe;s.setNumber(r+a,i,0)}}static embedVerticalSeparationPattern(r,i,s){for(let a=0;a<7;++a){if(!de.isEmpty(s.get(r,i+a)))throw new Fe;s.setNumber(r,i+a,0)}}static embedPositionAdjustmentPattern(r,i,s){for(let a=0;a<5;++a){const l=de.POSITION_ADJUSTMENT_PATTERN[a];for(let f=0;f<5;++f)s.setNumber(r+f,i+a,l[f])}}static embedPositionDetectionPattern(r,i,s){for(let a=0;a<7;++a){const l=de.POSITION_DETECTION_PATTERN[a];for(let f=0;f<7;++f)s.setNumber(r+f,i+a,l[f])}}static embedPositionDetectionPatternsAndSeparators(r){const i=de.POSITION_DETECTION_PATTERN[0].length;de.embedPositionDetectionPattern(0,0,r),de.embedPositionDetectionPattern(r.getWidth()-i,0,r),de.embedPositionDetectionPattern(0,r.getWidth()-i,r);const s=8;de.embedHorizontalSeparationPattern(0,s-1,r),de.embedHorizontalSeparationPattern(r.getWidth()-s,s-1,r),de.embedHorizontalSeparationPattern(0,r.getWidth()-s,r);const a=7;de.embedVerticalSeparationPattern(a,0,r),de.embedVerticalSeparationPattern(r.getHeight()-a-1,0,r),de.embedVerticalSeparationPattern(a,r.getHeight()-a,r)}static maybeEmbedPositionAdjustmentPatterns(r,i){if(r.getVersionNumber()<2)return;const s=r.getVersionNumber()-1,a=de.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[s];for(let l=0,f=a.length;l!==f;l++){const d=a[l];if(d>=0)for(let g=0;g!==f;g++){const p=a[g];p>=0&&de.isEmpty(i.get(p,d))&&de.embedPositionAdjustmentPattern(p-2,d-2,i)}}}}de.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),de.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),de.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),de.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),de.VERSION_INFO_POLY=7973,de.TYPE_INFO_POLY=1335,de.TYPE_INFO_MASK_PATTERN=21522;class R3{constructor(r,i){this.dataBytes=r,this.errorCorrectionBytes=i}getDataBytes(){return this.dataBytes}getErrorCorrectionBytes(){return this.errorCorrectionBytes}}class Ve{constructor(){}static calculateMaskPenalty(r){return st.applyMaskPenaltyRule1(r)+st.applyMaskPenaltyRule2(r)+st.applyMaskPenaltyRule3(r)+st.applyMaskPenaltyRule4(r)}static encode(r,i,s=null){let a=Ve.DEFAULT_BYTE_MODE_ENCODING;const l=s!==null&&s.get(wt.CHARACTER_SET)!==void 0;l&&(a=s.get(wt.CHARACTER_SET).toString());const f=this.chooseMode(r,a),d=new B;if(f===fe.BYTE&&(l||Ve.DEFAULT_BYTE_MODE_ENCODING!==a)){const J=V.getCharacterSetECIByName(a);J!==void 0&&this.appendECI(J,d)}this.appendModeInfo(f,d);const g=new B;this.appendBytes(r,f,g,a);let p;if(s!==null&&s.get(wt.QR_VERSION)!==void 0){const J=Number.parseInt(s.get(wt.QR_VERSION).toString(),10);p=ue.getVersionForNumber(J);const Z=this.calculateBitsNeeded(f,d,g,p);if(!this.willFit(Z,p,i))throw new Fe("Data too big for requested version")}else p=this.recommendVersion(i,f,d,g);const v=new B;v.appendBitArray(d);const E=f===fe.BYTE?g.getSizeInBytes():r.length;this.appendLengthInfo(E,p,f,v),v.appendBitArray(g);const S=p.getECBlocksForLevel(i),N=p.getTotalCodewords()-S.getTotalECCodewords();this.terminateBits(N,v);const D=this.interleaveWithECBytes(v,p.getTotalCodewords(),N,S.getNumBlocks()),P=new fi;P.setECLevel(i),P.setMode(f),P.setVersion(p);const W=p.getDimensionForVersion(),G=new Ia(W,W),q=this.chooseMaskPattern(D,i,p,G);return P.setMaskPattern(q),de.buildMatrix(D,i,p,q,G),P.setMatrix(G),P}static recommendVersion(r,i,s,a){const l=this.calculateBitsNeeded(i,s,a,ue.getVersionForNumber(1)),f=this.chooseVersion(l,r),d=this.calculateBitsNeeded(i,s,a,f);return this.chooseVersion(d,r)}static calculateBitsNeeded(r,i,s,a){return i.getSize()+r.getCharacterCountBits(a)+s.getSize()}static getAlphanumericCode(r){return r<Ve.ALPHANUMERIC_TABLE.length?Ve.ALPHANUMERIC_TABLE[r]:-1}static chooseMode(r,i=null){if(V.SJIS.getName()===i&&this.isOnlyDoubleByteKanji(r))return fe.KANJI;let s=!1,a=!1;for(let l=0,f=r.length;l<f;++l){const d=r.charAt(l);if(Ve.isDigit(d))s=!0;else if(this.getAlphanumericCode(d.charCodeAt(0))!==-1)a=!0;else return fe.BYTE}return a?fe.ALPHANUMERIC:s?fe.NUMERIC:fe.BYTE}static isOnlyDoubleByteKanji(r){let i;try{i=ve.encode(r,V.SJIS)}catch{return!1}const s=i.length;if(s%2!==0)return!1;for(let a=0;a<s;a+=2){const l=i[a]&255;if((l<129||l>159)&&(l<224||l>235))return!1}return!0}static chooseMaskPattern(r,i,s,a){let l=Number.MAX_SAFE_INTEGER,f=-1;for(let d=0;d<fi.NUM_MASK_PATTERNS;d++){de.buildMatrix(r,i,s,d,a);let g=this.calculateMaskPenalty(a);g<l&&(l=g,f=d)}return f}static chooseVersion(r,i){for(let s=1;s<=40;s++){const a=ue.getVersionForNumber(s);if(Ve.willFit(r,a,i))return a}throw new Fe("Data too big")}static willFit(r,i,s){const a=i.getTotalCodewords(),f=i.getECBlocksForLevel(s).getTotalECCodewords(),d=a-f,g=(r+7)/8;return d>=g}static terminateBits(r,i){const s=r*8;if(i.getSize()>s)throw new Fe("data bits cannot fit in the QR Code"+i.getSize()+" > "+s);for(let f=0;f<4&&i.getSize()<s;++f)i.appendBit(!1);const a=i.getSize()&7;if(a>0)for(let f=a;f<8;f++)i.appendBit(!1);const l=r-i.getSizeInBytes();for(let f=0;f<l;++f)i.appendBits(f&1?17:236,8);if(i.getSize()!==s)throw new Fe("Bits size does not equal capacity")}static getNumDataBytesAndNumECBytesForBlockID(r,i,s,a,l,f){if(a>=s)throw new Fe("Block ID too large");const d=r%s,g=s-d,p=Math.floor(r/s),v=p+1,E=Math.floor(i/s),S=E+1,N=p-E,D=v-S;if(N!==D)throw new Fe("EC bytes mismatch");if(s!==g+d)throw new Fe("RS blocks mismatch");if(r!==(E+N)*g+(S+D)*d)throw new Fe("Total bytes mismatch");a<g?(l[0]=E,f[0]=N):(l[0]=S,f[0]=D)}static interleaveWithECBytes(r,i,s,a){if(r.getSizeInBytes()!==s)throw new Fe("Number of bits and data bytes does not match");let l=0,f=0,d=0;const g=new Array;for(let v=0;v<a;++v){const E=new Int32Array(1),S=new Int32Array(1);Ve.getNumDataBytesAndNumECBytesForBlockID(i,s,a,v,E,S);const N=E[0],D=new Uint8Array(N);r.toBytes(8*l,D,0,N);const P=Ve.generateECBytes(D,S[0]);g.push(new R3(D,P)),f=Math.max(f,N),d=Math.max(d,P.length),l+=E[0]}if(s!==l)throw new Fe("Data bytes does not match offset");const p=new B;for(let v=0;v<f;++v)for(const E of g){const S=E.getDataBytes();v<S.length&&p.appendBits(S[v],8)}for(let v=0;v<d;++v)for(const E of g){const S=E.getErrorCorrectionBytes();v<S.length&&p.appendBits(S[v],8)}if(i!==p.getSizeInBytes())throw new Fe("Interleaving error: "+i+" and "+p.getSizeInBytes()+" differ.");return p}static generateECBytes(r,i){const s=r.length,a=new Int32Array(s+i);for(let f=0;f<s;f++)a[f]=r[f]&255;new gu(Oe.QR_CODE_FIELD_256).encode(a,i);const l=new Uint8Array(i);for(let f=0;f<i;f++)l[f]=a[s+f];return l}static appendModeInfo(r,i){i.appendBits(r.getBits(),4)}static appendLengthInfo(r,i,s,a){const l=s.getCharacterCountBits(i);if(r>=1<<l)throw new Fe(r+" is bigger than "+((1<<l)-1));a.appendBits(r,l)}static appendBytes(r,i,s,a){switch(i){case fe.NUMERIC:Ve.appendNumericBytes(r,s);break;case fe.ALPHANUMERIC:Ve.appendAlphanumericBytes(r,s);break;case fe.BYTE:Ve.append8BitBytes(r,s,a);break;case fe.KANJI:Ve.appendKanjiBytes(r,s);break;default:throw new Fe("Invalid mode: "+i)}}static getDigit(r){return r.charCodeAt(0)-48}static isDigit(r){const i=Ve.getDigit(r);return i>=0&&i<=9}static appendNumericBytes(r,i){const s=r.length;let a=0;for(;a<s;){const l=Ve.getDigit(r.charAt(a));if(a+2<s){const f=Ve.getDigit(r.charAt(a+1)),d=Ve.getDigit(r.charAt(a+2));i.appendBits(l*100+f*10+d,10),a+=3}else if(a+1<s){const f=Ve.getDigit(r.charAt(a+1));i.appendBits(l*10+f,7),a+=2}else i.appendBits(l,4),a++}}static appendAlphanumericBytes(r,i){const s=r.length;let a=0;for(;a<s;){const l=Ve.getAlphanumericCode(r.charCodeAt(a));if(l===-1)throw new Fe;if(a+1<s){const f=Ve.getAlphanumericCode(r.charCodeAt(a+1));if(f===-1)throw new Fe;i.appendBits(l*45+f,11),a+=2}else i.appendBits(l,6),a++}}static append8BitBytes(r,i,s){let a;try{a=ve.encode(r,s)}catch(l){throw new Fe(l)}for(let l=0,f=a.length;l!==f;l++){const d=a[l];i.appendBits(d,8)}}static appendKanjiBytes(r,i){let s;try{s=ve.encode(r,V.SJIS)}catch(l){throw new Fe(l)}const a=s.length;for(let l=0;l<a;l+=2){const f=s[l]&255,d=s[l+1]&255,g=f<<8&4294967295|d;let p=-1;if(g>=33088&&g<=40956?p=g-33088:g>=57408&&g<=60351&&(p=g-49472),p===-1)throw new Fe("Invalid byte sequence");const v=(p>>8)*192+(p&255);i.appendBits(v,13)}}static appendECI(r,i){i.appendBits(fe.ECI.getBits(),4),i.appendBits(r.getValue(),8)}}Ve.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),Ve.DEFAULT_BYTE_MODE_ENCODING=V.UTF8.getName();class di{write(r,i,s,a=null){if(r.length===0)throw new C("Found empty contents");if(i<0||s<0)throw new C("Requested dimensions are too small: "+i+"x"+s);let l=We.L,f=di.QUIET_ZONE_SIZE;a!==null&&(a.get(wt.ERROR_CORRECTION)!==void 0&&(l=We.fromString(a.get(wt.ERROR_CORRECTION).toString())),a.get(wt.MARGIN)!==void 0&&(f=Number.parseInt(a.get(wt.MARGIN).toString(),10)));const d=Ve.encode(r,l,a);return this.renderResult(d,i,s,f)}writeToDom(r,i,s,a,l=null){typeof r=="string"&&(r=document.querySelector(r));const f=this.write(i,s,a,l);r&&r.appendChild(f)}renderResult(r,i,s,a){const l=r.getMatrix();if(l===null)throw new Xr;const f=l.getWidth(),d=l.getHeight(),g=f+a*2,p=d+a*2,v=Math.max(i,g),E=Math.max(s,p),S=Math.min(Math.floor(v/g),Math.floor(E/p)),N=Math.floor((v-f*S)/2),D=Math.floor((E-d*S)/2),P=this.createSVGElement(v,E);for(let W=0,G=D;W<d;W++,G+=S)for(let q=0,J=N;q<f;q++,J+=S)if(l.get(q,W)===1){const Z=this.createSvgRectElement(J,G,S,S);P.appendChild(Z)}return P}createSVGElement(r,i){const s=document.createElementNS(di.SVG_NS,"svg");return s.setAttributeNS(null,"height",r.toString()),s.setAttributeNS(null,"width",i.toString()),s}createSvgRectElement(r,i,s,a){const l=document.createElementNS(di.SVG_NS,"rect");return l.setAttributeNS(null,"x",r.toString()),l.setAttributeNS(null,"y",i.toString()),l.setAttributeNS(null,"height",s.toString()),l.setAttributeNS(null,"width",a.toString()),l.setAttributeNS(null,"fill","#000000"),l}}di.QUIET_ZONE_SIZE=4,di.SVG_NS="http://www.w3.org/2000/svg";class zi{encode(r,i,s,a,l){if(r.length===0)throw new C("Found empty contents");if(i!==le.QR_CODE)throw new C("Can only encode QR_CODE, but got "+i);if(s<0||a<0)throw new C(`Requested dimensions are too small: ${s}x${a}`);let f=We.L,d=zi.QUIET_ZONE_SIZE;l!==null&&(l.get(wt.ERROR_CORRECTION)!==void 0&&(f=We.fromString(l.get(wt.ERROR_CORRECTION).toString())),l.get(wt.MARGIN)!==void 0&&(d=Number.parseInt(l.get(wt.MARGIN).toString(),10)));const g=Ve.encode(r,f,l);return zi.renderResult(g,s,a,d)}static renderResult(r,i,s,a){const l=r.getMatrix();if(l===null)throw new Xr;const f=l.getWidth(),d=l.getHeight(),g=f+a*2,p=d+a*2,v=Math.max(i,g),E=Math.max(s,p),S=Math.min(Math.floor(v/g),Math.floor(E/p)),N=Math.floor((v-f*S)/2),D=Math.floor((E-d*S)/2),P=new Te(v,E);for(let W=0,G=D;W<d;W++,G+=S)for(let q=0,J=N;q<f;q++,J+=S)l.get(q,W)===1&&P.setRegion(J,G,S,S);return P}}zi.QUIET_ZONE_SIZE=4;class _3{encode(r,i,s,a,l){let f;switch(i){case le.QR_CODE:f=new zi;break;default:throw new C("No encoder available for format "+i)}return f.encode(r,i,s,a,l)}}class Qr extends te{constructor(r,i,s,a,l,f,d,g){if(super(f,d),this.yuvData=r,this.dataWidth=i,this.dataHeight=s,this.left=a,this.top=l,a+f>i||l+d>s)throw new C("Crop rectangle does not fit within image data.");g&&this.reverseHorizontal(f,d)}getRow(r,i){if(r<0||r>=this.getHeight())throw new C("Requested row is outside the image: "+r);const s=this.getWidth();(i==null||i.length<s)&&(i=new Uint8ClampedArray(s));const a=(r+this.top)*this.dataWidth+this.left;return M.arraycopy(this.yuvData,a,i,0,s),i}getMatrix(){const r=this.getWidth(),i=this.getHeight();if(r===this.dataWidth&&i===this.dataHeight)return this.yuvData;const s=r*i,a=new Uint8ClampedArray(s);let l=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return M.arraycopy(this.yuvData,l,a,0,s),a;for(let f=0;f<i;f++){const d=f*r;M.arraycopy(this.yuvData,l,a,d,r),l+=this.dataWidth}return a}isCropSupported(){return!0}crop(r,i,s,a){return new Qr(this.yuvData,this.dataWidth,this.dataHeight,this.left+r,this.top+i,s,a,!1)}renderThumbnail(){const r=this.getWidth()/Qr.THUMBNAIL_SCALE_FACTOR,i=this.getHeight()/Qr.THUMBNAIL_SCALE_FACTOR,s=new Int32Array(r*i),a=this.yuvData;let l=this.top*this.dataWidth+this.left;for(let f=0;f<i;f++){const d=f*r;for(let g=0;g<r;g++){const p=a[l+g*Qr.THUMBNAIL_SCALE_FACTOR]&255;s[d+g]=4278190080|p*65793}l+=this.dataWidth*Qr.THUMBNAIL_SCALE_FACTOR}return s}getThumbnailWidth(){return this.getWidth()/Qr.THUMBNAIL_SCALE_FACTOR}getThumbnailHeight(){return this.getHeight()/Qr.THUMBNAIL_SCALE_FACTOR}reverseHorizontal(r,i){const s=this.yuvData;for(let a=0,l=this.top*this.dataWidth+this.left;a<i;a++,l+=this.dataWidth){const f=l+r/2;for(let d=l,g=l+r-1;d<f;d++,g--){const p=s[d];s[d]=s[g],s[g]=p}}}invert(){return new he(this)}}Qr.THUMBNAIL_SCALE_FACTOR=2;class pu extends te{constructor(r,i,s,a,l,f,d){if(super(i,s),this.dataWidth=a,this.dataHeight=l,this.left=f,this.top=d,r.BYTES_PER_ELEMENT===4){const g=i*s,p=new Uint8ClampedArray(g);for(let v=0;v<g;v++){const E=r[v],S=E>>16&255,N=E>>7&510,D=E&255;p[v]=(S+N+D)/4&255}this.luminances=p}else this.luminances=r;if(a===void 0&&(this.dataWidth=i),l===void 0&&(this.dataHeight=s),f===void 0&&(this.left=0),d===void 0&&(this.top=0),this.left+i>this.dataWidth||this.top+s>this.dataHeight)throw new C("Crop rectangle does not fit within image data.")}getRow(r,i){if(r<0||r>=this.getHeight())throw new C("Requested row is outside the image: "+r);const s=this.getWidth();(i==null||i.length<s)&&(i=new Uint8ClampedArray(s));const a=(r+this.top)*this.dataWidth+this.left;return M.arraycopy(this.luminances,a,i,0,s),i}getMatrix(){const r=this.getWidth(),i=this.getHeight();if(r===this.dataWidth&&i===this.dataHeight)return this.luminances;const s=r*i,a=new Uint8ClampedArray(s);let l=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return M.arraycopy(this.luminances,l,a,0,s),a;for(let f=0;f<i;f++){const d=f*r;M.arraycopy(this.luminances,l,a,d,r),l+=this.dataWidth}return a}isCropSupported(){return!0}crop(r,i,s,a){return new pu(this.luminances,s,a,this.dataWidth,this.dataHeight,this.left+r,this.top+i)}invert(){return new he(this)}}class oh extends V{static forName(r){return this.getCharacterSetECIByName(r)}}class mu{}mu.ISO_8859_1=V.ISO8859_1;class ah{isCompact(){return this.compact}setCompact(r){this.compact=r}getSize(){return this.size}setSize(r){this.size=r}getLayers(){return this.layers}setLayers(r){this.layers=r}getCodeWords(){return this.codeWords}setCodeWords(r){this.codeWords=r}getMatrix(){return this.matrix}setMatrix(r){this.matrix=r}}class lh{static singletonList(r){return[r]}static min(r,i){return r.sort(i)[0]}}class N3{constructor(r){this.previous=r}getPrevious(){return this.previous}}class Vi extends N3{constructor(r,i,s){super(r),this.value=i,this.bitCount=s}appendTo(r,i){r.appendBits(this.value,this.bitCount)}add(r,i){return new Vi(this,r,i)}addBinaryShift(r,i){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new Vi(this,r,i)}toString(){let r=this.value&(1<<this.bitCount)-1;return r|=1<<this.bitCount,"<"+_.toBinaryString(r|1<<this.bitCount).substring(1)+">"}}class xu extends Vi{constructor(r,i,s){super(r,0,0),this.binaryShiftStart=i,this.binaryShiftByteCount=s}appendTo(r,i){for(let s=0;s<this.binaryShiftByteCount;s++)(s===0||s===31&&this.binaryShiftByteCount<=62)&&(r.appendBits(31,5),this.binaryShiftByteCount>62?r.appendBits(this.binaryShiftByteCount-31,16):s===0?r.appendBits(Math.min(this.binaryShiftByteCount,31),5):r.appendBits(this.binaryShiftByteCount-31,5)),r.appendBits(i[this.binaryShiftStart+s],8)}addBinaryShift(r,i){return new xu(this,r,i)}toString(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}function O3(y,r,i){return new xu(y,r,i)}function Xs(y,r,i){return new Vi(y,r,i)}const k3=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],Pn=0,Ta=1,Sr=2,ch=3,qr=4,D3=new Vi(null,0,0),wu=[Int32Array.from([0,(5<<16)+28,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(9<<16)+480+14,0,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(4<<16)+14,(9<<16)+448+28,0,(9<<16)+448+29,932798]),Int32Array.from([(5<<16)+29,(5<<16)+28,656318,0,(5<<16)+30]),Int32Array.from([(5<<16)+31,656380,656382,656381,0])];function M3(y){for(let r of y)I.fill(r,-1);return y[Pn][qr]=0,y[Ta][qr]=0,y[Ta][Pn]=28,y[ch][qr]=0,y[Sr][qr]=0,y[Sr][Pn]=15,y}const uh=M3(I.createInt32Array(6,6));class Jr{constructor(r,i,s,a){this.token=r,this.mode=i,this.binaryShiftByteCount=s,this.bitCount=a}getMode(){return this.mode}getToken(){return this.token}getBinaryShiftByteCount(){return this.binaryShiftByteCount}getBitCount(){return this.bitCount}latchAndAppend(r,i){let s=this.bitCount,a=this.token;if(r!==this.mode){let f=wu[this.mode][r];a=Xs(a,f&65535,f>>16),s+=f>>16}let l=r===Sr?4:5;return a=Xs(a,i,l),new Jr(a,r,0,s+l)}shiftAndAppend(r,i){let s=this.token,a=this.mode===Sr?4:5;return s=Xs(s,uh[this.mode][r],a),s=Xs(s,i,5),new Jr(s,this.mode,0,this.bitCount+a+5)}addBinaryShiftChar(r){let i=this.token,s=this.mode,a=this.bitCount;if(this.mode===qr||this.mode===Sr){let d=wu[s][Pn];i=Xs(i,d&65535,d>>16),a+=d>>16,s=Pn}let l=this.binaryShiftByteCount===0||this.binaryShiftByteCount===31?18:this.binaryShiftByteCount===62?9:8,f=new Jr(i,s,this.binaryShiftByteCount+1,a+l);return f.binaryShiftByteCount===2078&&(f=f.endBinaryShift(r+1)),f}endBinaryShift(r){if(this.binaryShiftByteCount===0)return this;let i=this.token;return i=O3(i,r-this.binaryShiftByteCount,this.binaryShiftByteCount),new Jr(i,this.mode,0,this.bitCount)}isBetterThanOrEqualTo(r){let i=this.bitCount+(wu[this.mode][r.mode]>>16);return this.binaryShiftByteCount<r.binaryShiftByteCount?i+=Jr.calculateBinaryShiftCost(r)-Jr.calculateBinaryShiftCost(this):this.binaryShiftByteCount>r.binaryShiftByteCount&&r.binaryShiftByteCount>0&&(i+=10),i<=r.bitCount}toBitArray(r){let i=[];for(let a=this.endBinaryShift(r.length).token;a!==null;a=a.getPrevious())i.unshift(a);let s=new B;for(const a of i)a.appendTo(s,r);return s}toString(){return ie.format("%s bits=%d bytes=%d",k3[this.mode],this.bitCount,this.binaryShiftByteCount)}static calculateBinaryShiftCost(r){return r.binaryShiftByteCount>62?21:r.binaryShiftByteCount>31?20:r.binaryShiftByteCount>0?10:0}}Jr.INITIAL_STATE=new Jr(D3,Pn,0,0);function P3(y){const r=ie.getCharCode(" "),i=ie.getCharCode("."),s=ie.getCharCode(",");y[Pn][r]=1;const a=ie.getCharCode("Z"),l=ie.getCharCode("A");for(let S=l;S<=a;S++)y[Pn][S]=S-l+2;y[Ta][r]=1;const f=ie.getCharCode("z"),d=ie.getCharCode("a");for(let S=d;S<=f;S++)y[Ta][S]=S-d+2;y[Sr][r]=1;const g=ie.getCharCode("9"),p=ie.getCharCode("0");for(let S=p;S<=g;S++)y[Sr][S]=S-p+2;y[Sr][s]=12,y[Sr][i]=13;const v=["\0"," ","","","","","","","\x07","\b"," ",`
|
|
479
479
|
`,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~",""];for(let S=0;S<v.length;S++)y[ch][ie.getCharCode(v[S])]=S;const E=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(let S=0;S<E.length;S++)ie.getCharCode(E[S])>0&&(y[qr][ie.getCharCode(E[S])]=S);return y}const vu=P3(I.createInt32Array(5,256));class Ys{constructor(r){this.text=r}encode(){const r=ie.getCharCode(" "),i=ie.getCharCode(`
|
|
480
|
-
`);let s=lh.singletonList(Jr.INITIAL_STATE);for(let l=0;l<this.text.length;l++){let f,d=l+1<this.text.length?this.text[l+1]:0;switch(this.text[l]){case ie.getCharCode("\r"):f=d===i?2:0;break;case ie.getCharCode("."):f=d===r?3:0;break;case ie.getCharCode(","):f=d===r?4:0;break;case ie.getCharCode(":"):f=d===r?5:0;break;default:f=0}f>0?(s=Ys.updateStateListForPair(s,l,f),l++):s=this.updateStateListForChar(s,l)}return lh.min(s,(l,f)=>l.getBitCount()-f.getBitCount()).toBitArray(this.text)}updateStateListForChar(r,i){const s=[];for(let a of r)this.updateStateForChar(a,i,s);return Ys.simplifyStates(s)}updateStateForChar(r,i,s){let a=this.text[i]&255,l=vu[r.getMode()][a]>0,f=null;for(let d=0;d<=qr;d++){let g=vu[d][a];if(g>0){if(f==null&&(f=r.endBinaryShift(i)),!l||d===r.getMode()||d===Sr){const p=f.latchAndAppend(d,g);s.push(p)}if(!l&&uh[r.getMode()][d]>=0){const p=f.shiftAndAppend(d,g);s.push(p)}}}if(r.getBinaryShiftByteCount()>0||vu[r.getMode()][a]===0){let d=r.addBinaryShiftChar(i);s.push(d)}}static updateStateListForPair(r,i,s){const a=[];for(let l of r)this.updateStateForPair(l,i,s,a);return this.simplifyStates(a)}static updateStateForPair(r,i,s,a){let l=r.endBinaryShift(i);if(a.push(l.latchAndAppend(qr,s)),r.getMode()!==qr&&a.push(l.shiftAndAppend(qr,s)),s===3||s===4){let f=l.latchAndAppend(Sr,16-s).latchAndAppend(Sr,1);a.push(f)}if(r.getBinaryShiftByteCount()>0){let f=r.addBinaryShiftChar(i).addBinaryShiftChar(i+1);a.push(f)}}static simplifyStates(r){let i=[];for(const s of r){let a=!0;for(const l of i){if(l.isBetterThanOrEqualTo(s)){a=!1;break}s.isBetterThanOrEqualTo(l)&&(i=i.filter(f=>f!==l))}a&&i.push(s)}return i}}class _e{constructor(){}static encodeBytes(r){return _e.encode(r,_e.DEFAULT_EC_PERCENT,_e.DEFAULT_AZTEC_LAYERS)}static encode(r,i,s){let a=new Ys(r).encode(),l=_.truncDivision(a.getSize()*i,100)+11,f=a.getSize()+l,d,g,p,v,E;if(s!==_e.DEFAULT_AZTEC_LAYERS){if(d=s<0,g=Math.abs(s),g>(d?_e.MAX_NB_BITS_COMPACT:_e.MAX_NB_BITS))throw new C(ie.format("Illegal value %s for layers",s));p=_e.totalBitsInLayer(g,d),v=_e.WORD_SIZE[g];let Z=p-p%v;if(E=_e.stuffBits(a,v),E.getSize()+l>Z)throw new C("Data to large for user specified layer");if(d&&E.getSize()>v*64)throw new C("Data to large for user specified layer")}else{v=0,E=null;for(let Z=0;;Z++){if(Z>_e.MAX_NB_BITS)throw new C("Data too large for an Aztec code");if(d=Z<=3,g=d?Z+1:Z,p=_e.totalBitsInLayer(g,d),f>p)continue;(E==null||v!==_e.WORD_SIZE[g])&&(v=_e.WORD_SIZE[g],E=_e.stuffBits(a,v));let be=p-p%v;if(!(d&&E.getSize()>v*64)&&E.getSize()+l<=be)break}}let S=_e.generateCheckWords(E,p,v),N=E.getSize()/v,D=_e.generateModeMessage(d,g,N),P=(d?11:14)+g*4,W=new Int32Array(P),G;if(d){G=P;for(let Z=0;Z<W.length;Z++)W[Z]=Z}else{G=P+1+2*_.truncDivision(_.truncDivision(P,2)-1,15);let Z=_.truncDivision(P,2),be=_.truncDivision(G,2);for(let we=0;we<Z;we++){let tr=we+_.truncDivision(we,15);W[Z-we-1]=be-tr-1,W[Z+we]=be+tr+1}}let q=new Te(G);for(let Z=0,be=0;Z<g;Z++){let we=(g-Z)*4+(d?9:12);for(let tr=0;tr<we;tr++){let Mr=tr*2;for(let rr=0;rr<2;rr++)S.get(be+Mr+rr)&&q.set(W[Z*2+rr],W[Z*2+tr]),S.get(be+we*2+Mr+rr)&&q.set(W[Z*2+tr],W[P-1-Z*2-rr]),S.get(be+we*4+Mr+rr)&&q.set(W[P-1-Z*2-rr],W[P-1-Z*2-tr]),S.get(be+we*6+Mr+rr)&&q.set(W[P-1-Z*2-tr],W[Z*2+rr])}be+=we*8}if(_e.drawModeMessage(q,d,G,D),d)_e.drawBullsEye(q,_.truncDivision(G,2),5);else{_e.drawBullsEye(q,_.truncDivision(G,2),7);for(let Z=0,be=0;Z<_.truncDivision(P,2)-1;Z+=15,be+=16)for(let we=_.truncDivision(G,2)&1;we<G;we+=2)q.set(_.truncDivision(G,2)-be,we),q.set(_.truncDivision(G,2)+be,we),q.set(we,_.truncDivision(G,2)-be),q.set(we,_.truncDivision(G,2)+be)}let J=new ah;return J.setCompact(d),J.setSize(G),J.setLayers(g),J.setCodeWords(N),J.setMatrix(q),J}static drawBullsEye(r,i,s){for(let a=0;a<s;a+=2)for(let l=i-a;l<=i+a;l++)r.set(l,i-a),r.set(l,i+a),r.set(i-a,l),r.set(i+a,l);r.set(i-s,i-s),r.set(i-s+1,i-s),r.set(i-s,i-s+1),r.set(i+s,i-s),r.set(i+s,i-s+1),r.set(i+s,i+s-1)}static generateModeMessage(r,i,s){let a=new B;return r?(a.appendBits(i-1,2),a.appendBits(s-1,6),a=_e.generateCheckWords(a,28,4)):(a.appendBits(i-1,5),a.appendBits(s-1,11),a=_e.generateCheckWords(a,40,4)),a}static drawModeMessage(r,i,s,a){let l=_.truncDivision(s,2);if(i)for(let f=0;f<7;f++){let d=l-3+f;a.get(f)&&r.set(d,l-5),a.get(f+7)&&r.set(l+5,d),a.get(20-f)&&r.set(d,l+5),a.get(27-f)&&r.set(l-5,d)}else for(let f=0;f<10;f++){let d=l-5+f+_.truncDivision(f,5);a.get(f)&&r.set(d,l-7),a.get(f+10)&&r.set(l+7,d),a.get(29-f)&&r.set(d,l+7),a.get(39-f)&&r.set(l-7,d)}}static generateCheckWords(r,i,s){let a=r.getSize()/s,l=new gu(_e.getGF(s)),f=_.truncDivision(i,s),d=_e.bitsToWords(r,s,f);l.encode(d,f-a);let g=i%s,p=new B;p.appendBits(0,g);for(const v of Array.from(d))p.appendBits(v,s);return p}static bitsToWords(r,i,s){let a=new Int32Array(s),l,f;for(l=0,f=r.getSize()/i;l<f;l++){let d=0;for(let g=0;g<i;g++)d|=r.get(l*i+g)?1<<i-g-1:0;a[l]=d}return a}static getGF(r){switch(r){case 4:return Oe.AZTEC_PARAM;case 6:return Oe.AZTEC_DATA_6;case 8:return Oe.AZTEC_DATA_8;case 10:return Oe.AZTEC_DATA_10;case 12:return Oe.AZTEC_DATA_12;default:throw new C("Unsupported word size "+r)}}static stuffBits(r,i){let s=new B,a=r.getSize(),l=(1<<i)-2;for(let f=0;f<a;f+=i){let d=0;for(let g=0;g<i;g++)(f+g>=a||r.get(f+g))&&(d|=1<<i-1-g);(d&l)===l?(s.appendBits(d&l,i),f--):d&l?s.appendBits(d,i):(s.appendBits(d|1,i),f--)}return s}static totalBitsInLayer(r,i){return((i?88:112)+16*r)*r}}_e.DEFAULT_EC_PERCENT=33,_e.DEFAULT_AZTEC_LAYERS=0,_e.MAX_NB_BITS=32,_e.MAX_NB_BITS_COMPACT=4,_e.WORD_SIZE=Int32Array.from([4,6,6,8,8,8,8,8,8,10,10,10,10,10,10,10,10,10,10,10,10,10,10,12,12,12,12,12,12,12,12,12,12]);class Ra{encode(r,i,s,a){return this.encodeWithHints(r,i,s,a,null)}encodeWithHints(r,i,s,a,l){let f=mu.ISO_8859_1,d=_e.DEFAULT_EC_PERCENT,g=_e.DEFAULT_AZTEC_LAYERS;return l!=null&&(l.has(wt.CHARACTER_SET)&&(f=oh.forName(l.get(wt.CHARACTER_SET).toString())),l.has(wt.ERROR_CORRECTION)&&(d=_.parseInt(l.get(wt.ERROR_CORRECTION).toString())),l.has(wt.AZTEC_LAYERS)&&(g=_.parseInt(l.get(wt.AZTEC_LAYERS).toString()))),Ra.encodeLayers(r,i,s,a,f,d,g)}static encodeLayers(r,i,s,a,l,f,d){if(i!==le.AZTEC)throw new C("Can only encode AZTEC, but got "+i);let g=_e.encode(ie.getBytes(r,l),f,d);return Ra.renderResult(g,s,a)}static renderResult(r,i,s){let a=r.getMatrix();if(a==null)throw new Xr;let l=a.getWidth(),f=a.getHeight(),d=Math.max(i,l),g=Math.max(s,f),p=Math.min(d/l,g/f),v=(d-l*p)/2,E=(g-f*p)/2,S=new Te(d,g);for(let N=0,D=E;N<f;N++,D+=p)for(let P=0,W=v;P<l;P++,W+=p)a.get(P,N)&&S.setRegion(W,D,p,p);return S}}n.AbstractExpandedDecoder=iu,n.ArgumentException=A,n.ArithmeticException=ma,n.AztecCode=ah,n.AztecCodeReader=va,n.AztecCodeWriter=Ra,n.AztecDecoder=je,n.AztecDetector=X0,n.AztecDetectorResult=G0,n.AztecEncoder=_e,n.AztecHighLevelEncoder=Ys,n.AztecPoint=$t,n.BarcodeFormat=le,n.Binarizer=k,n.BinaryBitmap=b,n.BitArray=B,n.BitMatrix=Te,n.BitSource=lu,n.BrowserAztecCodeReader=a3,n.BrowserBarcodeReader=d3,n.BrowserCodeReader=Er,n.BrowserDatamatrixCodeReader=g3,n.BrowserMultiFormatReader=S3,n.BrowserPDF417Reader=I3,n.BrowserQRCodeReader=T3,n.BrowserQRCodeSvgWriter=di,n.CharacterSetECI=V,n.ChecksumException=T,n.Code128Reader=ee,n.Code39Reader=mt,n.DataMatrixDecodedBitStreamParser=On,n.DataMatrixReader=kn,n.DecodeHintType=U,n.DecoderResult=Bs,n.DefaultGridSampler=H0,n.DetectorResult=wa,n.EAN13Reader=ai,n.EncodeHintType=wt,n.Exception=m,n.FormatException=F,n.GenericGF=Oe,n.GenericGFPoly=Qt,n.GlobalHistogramBinarizer=rt,n.GridSampler=eu,n.GridSamplerInstance=_n,n.HTMLCanvasElementLuminanceSource=me,n.HybridBinarizer=xe,n.ITFReader=Be,n.IllegalArgumentException=C,n.IllegalStateException=Xr,n.InvertedLuminanceSource=he,n.LuminanceSource=te,n.MathUtils=Re,n.MultiFormatOneDReader=ji,n.MultiFormatReader=sh,n.MultiFormatWriter=_3,n.NotFoundException=H,n.OneDReader=ht,n.PDF417DecodedBitStreamParser=$,n.PDF417DecoderErrorCorrection=J0,n.PDF417Reader=Ot,n.PDF417ResultMetadata=th,n.PerspectiveTransform=kr,n.PlanarYUVLuminanceSource=Qr,n.QRCodeByteMatrix=Ia,n.QRCodeDataMask=Cr,n.QRCodeDecodedBitStreamParser=Qe,n.QRCodeDecoderErrorCorrectionLevel=We,n.QRCodeDecoderFormatInformation=Ut,n.QRCodeEncoder=Ve,n.QRCodeEncoderQRCode=fi,n.QRCodeMaskUtil=st,n.QRCodeMatrixUtil=de,n.QRCodeMode=fe,n.QRCodeReader=Dn,n.QRCodeVersion=ue,n.QRCodeWriter=zi,n.RGBLuminanceSource=pu,n.RSS14Reader=it,n.RSSExpandedReader=K,n.ReaderException=Sa,n.ReedSolomonDecoder=Us,n.ReedSolomonEncoder=gu,n.ReedSolomonException=Li,n.Result=Ze,n.ResultMetadataType=Ct,n.ResultPoint=ae,n.StringUtils=ie,n.UnsupportedOperationException=oe,n.VideoInputDevice=He,n.WhiteRectangleDetector=un,n.WriterException=Fe,n.ZXingArrays=I,n.ZXingCharset=oh,n.ZXingInteger=_,n.ZXingStandardCharsets=mu,n.ZXingStringBuilder=pe,n.ZXingStringEncoding=ve,n.ZXingSystem=M,n.createAbstractExpandedDecoder=Q0,Object.defineProperty(n,"__esModule",{value:!0})})})(K1,K1.exports);var qe=K1.exports;const YR=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var c2=function(){function e(t,n,o){if(this.formatMap=new Map([[re.QR_CODE,qe.BarcodeFormat.QR_CODE],[re.AZTEC,qe.BarcodeFormat.AZTEC],[re.CODABAR,qe.BarcodeFormat.CODABAR],[re.CODE_39,qe.BarcodeFormat.CODE_39],[re.CODE_93,qe.BarcodeFormat.CODE_93],[re.CODE_128,qe.BarcodeFormat.CODE_128],[re.DATA_MATRIX,qe.BarcodeFormat.DATA_MATRIX],[re.MAXICODE,qe.BarcodeFormat.MAXICODE],[re.ITF,qe.BarcodeFormat.ITF],[re.EAN_13,qe.BarcodeFormat.EAN_13],[re.EAN_8,qe.BarcodeFormat.EAN_8],[re.PDF_417,qe.BarcodeFormat.PDF_417],[re.RSS_14,qe.BarcodeFormat.RSS_14],[re.RSS_EXPANDED,qe.BarcodeFormat.RSS_EXPANDED],[re.UPC_A,qe.BarcodeFormat.UPC_A],[re.UPC_E,qe.BarcodeFormat.UPC_E],[re.UPC_EAN_EXTENSION,qe.BarcodeFormat.UPC_EAN_EXTENSION]]),this.reverseFormatMap=this.createReverseFormatMap(),!YR)throw"Use html5qrcode.min.js without edit, ZXing not found.";this.verbose=n,this.logger=o;var c=this.createZXingFormats(t),u=new Map;u.set(qe.DecodeHintType.POSSIBLE_FORMATS,c),u.set(qe.DecodeHintType.TRY_HARDER,!1),this.hints=u}return e.prototype.decodeAsync=function(t){var n=this;return new Promise(function(o,c){try{o(n.decode(t))}catch(u){c(u)}})},e.prototype.decode=function(t){var n=new qe.MultiFormatReader(this.verbose,this.hints),o=new qe.HTMLCanvasElementLuminanceSource(t),c=new qe.BinaryBitmap(new qe.HybridBinarizer(o)),u=n.decode(c);return{text:u.text,format:qv.create(this.toHtml5QrcodeSupportedFormats(u.format)),debugData:this.createDebugData()}},e.prototype.createReverseFormatMap=function(){var t=new Map;return this.formatMap.forEach(function(n,o,c){t.set(n,o)}),t},e.prototype.toHtml5QrcodeSupportedFormats=function(t){if(!this.reverseFormatMap.has(t))throw"reverseFormatMap doesn't have ".concat(t);return this.reverseFormatMap.get(t)},e.prototype.createZXingFormats=function(t){for(var n=[],o=0,c=t;o<c.length;o++){var u=c[o];this.formatMap.has(u)?n.push(this.formatMap.get(u)):this.logger.logError("".concat(u," is not supported by")+"ZXingHtml5QrcodeShim")}return n},e.prototype.createDebugData=function(){return{decoderName:"zxing-js"}},e}(),KR=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},ZR=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},u2=function(){function e(t,n,o){if(this.formatMap=new Map([[re.QR_CODE,"qr_code"],[re.AZTEC,"aztec"],[re.CODABAR,"codabar"],[re.CODE_39,"code_39"],[re.CODE_93,"code_93"],[re.CODE_128,"code_128"],[re.DATA_MATRIX,"data_matrix"],[re.ITF,"itf"],[re.EAN_13,"ean_13"],[re.EAN_8,"ean_8"],[re.PDF_417,"pdf417"],[re.UPC_A,"upc_a"],[re.UPC_E,"upc_e"]]),this.reverseFormatMap=this.createReverseFormatMap(),!e.isSupported())throw"Use html5qrcode.min.js without edit, Use BarcodeDetectorDelegate only if it isSupported();";this.verbose=n,this.logger=o;var c=this.createBarcodeDetectorFormats(t);if(this.detector=new BarcodeDetector(c),!this.detector)throw"BarcodeDetector detector not supported"}return e.isSupported=function(){if(!("BarcodeDetector"in window))return!1;var t=new BarcodeDetector({formats:["qr_code"]});return typeof t<"u"},e.prototype.decodeAsync=function(t){return KR(this,void 0,void 0,function(){var n,o;return ZR(this,function(c){switch(c.label){case 0:return[4,this.detector.detect(t)];case 1:if(n=c.sent(),!n||n.length===0)throw"No barcode or QR code detected.";return o=this.selectLargestBarcode(n),[2,{text:o.rawValue,format:qv.create(this.toHtml5QrcodeSupportedFormats(o.format)),debugData:this.createDebugData()}]}})})},e.prototype.selectLargestBarcode=function(t){for(var n=null,o=0,c=0,u=t;c<u.length;c++){var h=u[c],x=h.boundingBox.width*h.boundingBox.height;x>o&&(o=x,n=h)}if(!n)throw"No largest barcode found";return n},e.prototype.createBarcodeDetectorFormats=function(t){for(var n=[],o=0,c=t;o<c.length;o++){var u=c[o];this.formatMap.has(u)?n.push(this.formatMap.get(u)):this.logger.warn("".concat(u," is not supported by")+"BarcodeDetectorDelegate")}return{formats:n}},e.prototype.toHtml5QrcodeSupportedFormats=function(t){if(!this.reverseFormatMap.has(t))throw"reverseFormatMap doesn't have ".concat(t);return this.reverseFormatMap.get(t)},e.prototype.createReverseFormatMap=function(){var t=new Map;return this.formatMap.forEach(function(n,o,c){t.set(n,o)}),t},e.prototype.createDebugData=function(){return{decoderName:"BarcodeDetector"}},e}(),f2=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},d2=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},QR=function(){function e(t,n,o,c){this.EXECUTIONS_TO_REPORT_PERFORMANCE=100,this.executions=0,this.executionResults=[],this.wasPrimaryDecoderUsedInLastDecode=!1,this.verbose=o,n&&u2.isSupported()?(this.primaryDecoder=new u2(t,o,c),this.secondaryDecoder=new c2(t,o,c)):this.primaryDecoder=new c2(t,o,c)}return e.prototype.decodeAsync=function(t){return f2(this,void 0,void 0,function(){var n;return d2(this,function(o){switch(o.label){case 0:n=performance.now(),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,this.getDecoder().decodeAsync(t)];case 2:return[2,o.sent()];case 3:return this.possiblyLogPerformance(n),[7];case 4:return[2]}})})},e.prototype.decodeRobustlyAsync=function(t){return f2(this,void 0,void 0,function(){var n,o;return d2(this,function(c){switch(c.label){case 0:n=performance.now(),c.label=1;case 1:return c.trys.push([1,3,4,5]),[4,this.primaryDecoder.decodeAsync(t)];case 2:return[2,c.sent()];case 3:if(o=c.sent(),this.secondaryDecoder)return[2,this.secondaryDecoder.decodeAsync(t)];throw o;case 4:return this.possiblyLogPerformance(n),[7];case 5:return[2]}})})},e.prototype.getDecoder=function(){return this.secondaryDecoder?this.wasPrimaryDecoderUsedInLastDecode===!1?(this.wasPrimaryDecoderUsedInLastDecode=!0,this.primaryDecoder):(this.wasPrimaryDecoderUsedInLastDecode=!1,this.secondaryDecoder):this.primaryDecoder},e.prototype.possiblyLogPerformance=function(t){if(this.verbose){var n=performance.now()-t;this.executionResults.push(n),this.executions++,this.possiblyFlushPerformanceReport()}},e.prototype.possiblyFlushPerformanceReport=function(){if(!(this.executions<this.EXECUTIONS_TO_REPORT_PERFORMANCE)){for(var t=0,n=0,o=this.executionResults;n<o.length;n++){var c=o[n];t+=c}var u=t/this.executionResults.length;console.log("".concat(u," ms for ").concat(this.executionResults.length," last runs.")),this.executions=0,this.executionResults=[]}},e}(),V0=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(o[u]=c[u])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}}(),hc=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},gc=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},e3=function(){function e(t,n){this.name=t,this.track=n}return e.prototype.isSupported=function(){return this.track.getCapabilities?this.name in this.track.getCapabilities():!1},e.prototype.apply=function(t){var n={};n[this.name]=t;var o={advanced:[n]};return this.track.applyConstraints(o)},e.prototype.value=function(){var t=this.track.getSettings();if(this.name in t){var n=t[this.name];return n}return null},e}(),qR=function(e){V0(t,e);function t(n,o){return e.call(this,n,o)||this}return t.prototype.min=function(){return this.getCapabilities().min},t.prototype.max=function(){return this.getCapabilities().max},t.prototype.step=function(){return this.getCapabilities().step},t.prototype.apply=function(n){var o={};o[this.name]=n;var c={advanced:[o]};return this.track.applyConstraints(c)},t.prototype.getCapabilities=function(){this.failIfNotSupported();var n=this.track.getCapabilities(),o=n[this.name];return{min:o.min,max:o.max,step:o.step}},t.prototype.failIfNotSupported=function(){if(!this.isSupported())throw new Error("".concat(this.name," capability not supported"))},t}(e3),JR=function(e){V0(t,e);function t(n){return e.call(this,"zoom",n)||this}return t}(qR),e_=function(e){V0(t,e);function t(n){return e.call(this,"torch",n)||this}return t}(e3),t_=function(){function e(t){this.track=t}return e.prototype.zoomFeature=function(){return new JR(this.track)},e.prototype.torchFeature=function(){return new e_(this.track)},e}(),r_=function(){function e(t,n,o){this.isClosed=!1,this.parentElement=t,this.mediaStream=n,this.callbacks=o,this.surface=this.createVideoElement(this.parentElement.clientWidth),t.append(this.surface)}return e.prototype.createVideoElement=function(t){var n=document.createElement("video");return n.style.width="".concat(t,"px"),n.style.display="block",n.muted=!0,n.setAttribute("muted","true"),n.playsInline=!0,n},e.prototype.setupSurface=function(){var t=this;this.surface.onabort=function(){throw"RenderedCameraImpl video surface onabort() called"},this.surface.onerror=function(){throw"RenderedCameraImpl video surface onerror() called"};var n=function(){var o=t.surface.clientWidth,c=t.surface.clientHeight;t.callbacks.onRenderSurfaceReady(o,c),t.surface.removeEventListener("playing",n)};this.surface.addEventListener("playing",n),this.surface.srcObject=this.mediaStream,this.surface.play()},e.create=function(t,n,o,c){return hc(this,void 0,void 0,function(){var u,h;return gc(this,function(x){switch(x.label){case 0:return u=new e(t,n,c),o.aspectRatio?(h={aspectRatio:o.aspectRatio},[4,u.getFirstTrackOrFail().applyConstraints(h)]):[3,2];case 1:x.sent(),x.label=2;case 2:return u.setupSurface(),[2,u]}})})},e.prototype.failIfClosed=function(){if(this.isClosed)throw"The RenderedCamera has already been closed."},e.prototype.getFirstTrackOrFail=function(){if(this.failIfClosed(),this.mediaStream.getVideoTracks().length===0)throw"No video tracks found";return this.mediaStream.getVideoTracks()[0]},e.prototype.pause=function(){this.failIfClosed(),this.surface.pause()},e.prototype.resume=function(t){this.failIfClosed();var n=this,o=function(){setTimeout(t,200),n.surface.removeEventListener("playing",o)};this.surface.addEventListener("playing",o),this.surface.play()},e.prototype.isPaused=function(){return this.failIfClosed(),this.surface.paused},e.prototype.getSurface=function(){return this.failIfClosed(),this.surface},e.prototype.getRunningTrackCapabilities=function(){return this.getFirstTrackOrFail().getCapabilities()},e.prototype.getRunningTrackSettings=function(){return this.getFirstTrackOrFail().getSettings()},e.prototype.applyVideoConstraints=function(t){return hc(this,void 0,void 0,function(){return gc(this,function(n){if("aspectRatio"in t)throw"Changing 'aspectRatio' in run-time is not yet supported.";return[2,this.getFirstTrackOrFail().applyConstraints(t)]})})},e.prototype.close=function(){if(this.isClosed)return Promise.resolve();var t=this;return new Promise(function(n,o){var c=t.mediaStream.getVideoTracks(),u=c.length,h=0;t.mediaStream.getVideoTracks().forEach(function(x){t.mediaStream.removeTrack(x),x.stop(),++h,h>=u&&(t.isClosed=!0,t.parentElement.removeChild(t.surface),n())})})},e.prototype.getCapabilities=function(){return new t_(this.getFirstTrackOrFail())},e}(),n_=function(){function e(t){this.mediaStream=t}return e.prototype.render=function(t,n,o){return hc(this,void 0,void 0,function(){return gc(this,function(c){return[2,r_.create(t,this.mediaStream,n,o)]})})},e.create=function(t){return hc(this,void 0,void 0,function(){var n,o;return gc(this,function(c){switch(c.label){case 0:if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return n={audio:!1,video:t},[4,navigator.mediaDevices.getUserMedia(n)];case 1:return o=c.sent(),[2,new e(o)]}})})},e}(),h2=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},g2=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},i_=function(){function e(){}return e.failIfNotSupported=function(){return h2(this,void 0,void 0,function(){return g2(this,function(t){if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return[2,new e]})})},e.prototype.create=function(t){return h2(this,void 0,void 0,function(){return g2(this,function(n){return[2,n_.create(t)]})})},e}(),s_=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},o_=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},a_=function(){function e(){}return e.retrieve=function(){if(navigator.mediaDevices)return e.getCamerasFromMediaDevices();var t=MediaStreamTrack;return MediaStreamTrack&&t.getSources?e.getCamerasFromMediaStreamTrack():e.rejectWithError()},e.rejectWithError=function(){var t=us.unableToQuerySupportedDevices();return e.isHttpsOrLocalhost()||(t=us.insecureContextCameraQueryError()),Promise.reject(t)},e.isHttpsOrLocalhost=function(){if(location.protocol==="https:")return!0;var t=location.host.split(":")[0];return t==="127.0.0.1"||t==="localhost"},e.getCamerasFromMediaDevices=function(){return s_(this,void 0,void 0,function(){var t,n,o,c,u,h,x;return o_(this,function(w){switch(w.label){case 0:return t=function(m){for(var A=m.getVideoTracks(),C=0,b=A;C<b.length;C++){var T=b[C];T.enabled=!1,T.stop(),m.removeTrack(T)}},[4,navigator.mediaDevices.getUserMedia({audio:!1,video:!0})];case 1:return n=w.sent(),[4,navigator.mediaDevices.enumerateDevices()];case 2:for(o=w.sent(),c=[],u=0,h=o;u<h.length;u++)x=h[u],x.kind==="videoinput"&&c.push({id:x.deviceId,label:x.label});return t(n),[2,c]}})})},e.getCamerasFromMediaStreamTrack=function(){return new Promise(function(t,n){var o=function(u){for(var h=[],x=0,w=u;x<w.length;x++){var m=w[x];m.kind==="video"&&h.push({id:m.id,label:m.label})}t(h)},c=MediaStreamTrack;c.getSources(o)})},e}(),ot;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.NOT_STARTED=1]="NOT_STARTED",e[e.SCANNING=2]="SCANNING",e[e.PAUSED=3]="PAUSED"})(ot||(ot={}));var l_=function(){function e(){this.state=ot.NOT_STARTED,this.onGoingTransactionNewState=ot.UNKNOWN}return e.prototype.directTransition=function(t){this.failIfTransitionOngoing(),this.validateTransition(t),this.state=t},e.prototype.startTransition=function(t){return this.failIfTransitionOngoing(),this.validateTransition(t),this.onGoingTransactionNewState=t,this},e.prototype.execute=function(){if(this.onGoingTransactionNewState===ot.UNKNOWN)throw"Transaction is already cancelled, cannot execute().";var t=this.onGoingTransactionNewState;this.onGoingTransactionNewState=ot.UNKNOWN,this.directTransition(t)},e.prototype.cancel=function(){if(this.onGoingTransactionNewState===ot.UNKNOWN)throw"Transaction is already cancelled, cannot cancel().";this.onGoingTransactionNewState=ot.UNKNOWN},e.prototype.getState=function(){return this.state},e.prototype.failIfTransitionOngoing=function(){if(this.onGoingTransactionNewState!==ot.UNKNOWN)throw"Cannot transition to a new state, already under transition"},e.prototype.validateTransition=function(t){switch(this.state){case ot.UNKNOWN:throw"Transition from unknown is not allowed";case ot.NOT_STARTED:this.failIfNewStateIs(t,[ot.PAUSED]);break;case ot.SCANNING:break;case ot.PAUSED:break}},e.prototype.failIfNewStateIs=function(t,n){for(var o=0,c=n;o<c.length;o++){var u=c[o];if(t===u)throw"Cannot transition from ".concat(this.state," to ").concat(t)}},e}(),c_=function(){function e(t){this.stateManager=t}return e.prototype.startTransition=function(t){return this.stateManager.startTransition(t)},e.prototype.directTransition=function(t){this.stateManager.directTransition(t)},e.prototype.getState=function(){return this.stateManager.getState()},e.prototype.canScanFile=function(){return this.stateManager.getState()===ot.NOT_STARTED},e.prototype.isScanning=function(){return this.stateManager.getState()!==ot.NOT_STARTED},e.prototype.isStrictlyScanning=function(){return this.stateManager.getState()===ot.SCANNING},e.prototype.isPaused=function(){return this.stateManager.getState()===ot.PAUSED},e}(),u_=function(){function e(){}return e.create=function(){return new c_(new l_)},e}(),f_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(o[u]=c[u])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}}(),dr=function(e){f_(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.DEFAULT_WIDTH=300,t.DEFAULT_WIDTH_OFFSET=2,t.FILE_SCAN_MIN_HEIGHT=300,t.FILE_SCAN_HIDDEN_CANVAS_PADDING=100,t.MIN_QR_BOX_SIZE=50,t.SHADED_LEFT=1,t.SHADED_RIGHT=2,t.SHADED_TOP=3,t.SHADED_BOTTOM=4,t.SHADED_REGION_ELEMENT_ID="qr-shaded-region",t.VERBOSE=!1,t.BORDER_SHADER_DEFAULT_COLOR="#ffffff",t.BORDER_SHADER_MATCH_COLOR="rgb(90, 193, 56)",t}(GR),d_=function(){function e(t,n){this.logger=n,this.fps=dr.SCAN_DEFAULT_FPS,t?(t.fps&&(this.fps=t.fps),this.disableFlip=t.disableFlip===!0,this.qrbox=t.qrbox,this.aspectRatio=t.aspectRatio,this.videoConstraints=t.videoConstraints):this.disableFlip=dr.DEFAULT_DISABLE_FLIP}return e.prototype.isMediaStreamConstraintsValid=function(){return this.videoConstraints?Jv.isMediaStreamConstraintsValid(this.videoConstraints,this.logger):(this.logger.logError("Empty videoConstraints",!0),!1)},e.prototype.isShadedBoxEnabled=function(){return!fn(this.qrbox)},e.create=function(t,n){return new e(t,n)},e}(),nN=function(){function e(t,n){if(this.element=null,this.canvasElement=null,this.scannerPausedUiElement=null,this.hasBorderShaders=null,this.borderShaders=null,this.qrMatch=null,this.renderedCamera=null,this.qrRegion=null,this.context=null,this.lastScanImageFile=null,this.isScanning=!1,!document.getElementById(t))throw"HTML Element with id=".concat(t," not found");this.elementId=t,this.verbose=!1;var o;typeof n=="boolean"?this.verbose=n===!0:n&&(o=n,this.verbose=o.verbose===!0,o.experimentalFeatures),this.logger=new XR(this.verbose),this.qrcode=new QR(this.getSupportedFormats(n),this.getUseBarCodeDetectorIfSupported(o),this.verbose,this.logger),this.foreverScanTimeout,this.shouldScan=!0,this.stateManagerProxy=u_.create()}return e.prototype.start=function(t,n,o,c){var u=this;if(!t)throw"cameraIdOrConfig is required";if(!o||typeof o!="function")throw"qrCodeSuccessCallback is required and should be a function.";var h;c?h=c:h=this.verbose?this.logger.log:function(){};var x=d_.create(n,this.logger);this.clearElement();var w=!1;x.videoConstraints&&(x.isMediaStreamConstraintsValid()?w=!0:this.logger.logError("'videoConstraints' is not valid 'MediaStreamConstraints, it will be ignored.'",!0));var m=w,A=document.getElementById(this.elementId);A.clientWidth?A.clientWidth:dr.DEFAULT_WIDTH,A.style.position="relative",this.shouldScan=!0,this.element=A;var C=this,b=this.stateManagerProxy.startTransition(ot.SCANNING);return new Promise(function(T,k){var M=m?x.videoConstraints:C.createVideoConstraints(t);if(!M){b.cancel(),k("videoConstraints should be defined");return}var X={};(!m||x.aspectRatio)&&(X.aspectRatio=x.aspectRatio);var O={onRenderSurfaceReady:function(I,_){C.setupUi(I,_,x),C.isScanning=!0,C.foreverScan(x,o,h)}};i_.failIfNotSupported().then(function(I){I.create(M).then(function(_){return _.render(u.element,X,O).then(function(B){C.renderedCamera=B,b.execute(),T(null)}).catch(function(B){b.cancel(),k(B)})}).catch(function(_){b.cancel(),k(us.errorGettingUserMedia(_))})}).catch(function(I){b.cancel(),k(us.cameraStreamingNotSupported())})})},e.prototype.pause=function(t){if(!this.stateManagerProxy.isStrictlyScanning())throw"Cannot pause, scanner is not scanning.";this.stateManagerProxy.directTransition(ot.PAUSED),this.showPausedState(),(fn(t)||t!==!0)&&(t=!1),t&&this.renderedCamera&&this.renderedCamera.pause()},e.prototype.resume=function(){if(!this.stateManagerProxy.isPaused())throw"Cannot result, scanner is not paused.";if(!this.renderedCamera)throw"renderedCamera doesn't exist while trying resume()";var t=this,n=function(){t.stateManagerProxy.directTransition(ot.SCANNING),t.hidePausedState()};if(!this.renderedCamera.isPaused()){n();return}this.renderedCamera.resume(function(){n()})},e.prototype.getState=function(){return this.stateManagerProxy.getState()},e.prototype.stop=function(){var t=this;if(!this.stateManagerProxy.isScanning())throw"Cannot stop, scanner is not running or paused.";var n=this.stateManagerProxy.startTransition(ot.NOT_STARTED);this.shouldScan=!1,this.foreverScanTimeout&&clearTimeout(this.foreverScanTimeout);var o=function(){if(t.element){var u=document.getElementById(dr.SHADED_REGION_ELEMENT_ID);u&&t.element.removeChild(u)}},c=this;return this.renderedCamera.close().then(function(){return c.renderedCamera=null,c.element&&(c.element.removeChild(c.canvasElement),c.canvasElement=null),o(),c.qrRegion&&(c.qrRegion=null),c.context&&(c.context=null),n.execute(),c.hidePausedState(),c.isScanning=!1,Promise.resolve()})},e.prototype.scanFile=function(t,n){return this.scanFileV2(t,n).then(function(o){return o.decodedText})},e.prototype.scanFileV2=function(t,n){var o=this;if(!t||!(t instanceof File))throw"imageFile argument is mandatory and should be instance of File. Use 'event.target.files[0]'.";if(fn(n)&&(n=!0),!this.stateManagerProxy.canScanFile())throw"Cannot start file scan - ongoing camera scan";return new Promise(function(c,u){o.possiblyCloseLastScanImageFile(),o.clearElement(),o.lastScanImageFile=URL.createObjectURL(t);var h=new Image;h.onload=function(){var x=h.width,w=h.height,m=document.getElementById(o.elementId),A=m.clientWidth?m.clientWidth:dr.DEFAULT_WIDTH,C=Math.max(m.clientHeight?m.clientHeight:w,dr.FILE_SCAN_MIN_HEIGHT),b=o.computeCanvasDrawConfig(x,w,A,C);if(n){var T=o.createCanvasElement(A,C,"qr-canvas-visible");T.style.display="inline-block",m.appendChild(T);var k=T.getContext("2d");if(!k)throw"Unable to get 2d context from canvas";k.canvas.width=A,k.canvas.height=C,k.drawImage(h,0,0,x,w,b.x,b.y,b.width,b.height)}var M=dr.FILE_SCAN_HIDDEN_CANVAS_PADDING,X=Math.max(h.width,b.width),O=Math.max(h.height,b.height),I=X+2*M,_=O+2*M,B=o.createCanvasElement(I,_);m.appendChild(B);var j=B.getContext("2d");if(!j)throw"Unable to get 2d context from canvas";j.canvas.width=I,j.canvas.height=_,j.drawImage(h,0,0,x,w,M,M,X,O);try{o.qrcode.decodeRobustlyAsync(B).then(function(U){c(l2.createFromQrcodeResult(U))}).catch(u)}catch(U){u("QR code parse error, error = ".concat(U))}},h.onerror=u,h.onabort=u,h.onstalled=u,h.onsuspend=u,h.src=URL.createObjectURL(t)})},e.prototype.clear=function(){this.clearElement()},e.getCameras=function(){return a_.retrieve()},e.prototype.getRunningTrackCapabilities=function(){return this.getRenderedCameraOrFail().getRunningTrackCapabilities()},e.prototype.getRunningTrackSettings=function(){return this.getRenderedCameraOrFail().getRunningTrackSettings()},e.prototype.getRunningTrackCameraCapabilities=function(){return this.getRenderedCameraOrFail().getCapabilities()},e.prototype.applyVideoConstraints=function(t){if(t){if(!Jv.isMediaStreamConstraintsValid(t,this.logger))throw"invalid videoConstaints passed, check logs for more details"}else throw"videoConstaints is required argument.";return this.getRenderedCameraOrFail().applyVideoConstraints(t)},e.prototype.getRenderedCameraOrFail=function(){if(this.renderedCamera==null)throw"Scanning is not in running state, call this API only when QR code scanning using camera is in running state.";return this.renderedCamera},e.prototype.getSupportedFormats=function(t){var n=[re.QR_CODE,re.AZTEC,re.CODABAR,re.CODE_39,re.CODE_93,re.CODE_128,re.DATA_MATRIX,re.MAXICODE,re.ITF,re.EAN_13,re.EAN_8,re.PDF_417,re.RSS_14,re.RSS_EXPANDED,re.UPC_A,re.UPC_E,re.UPC_EAN_EXTENSION];if(!t||typeof t=="boolean"||!t.formatsToSupport)return n;if(!Array.isArray(t.formatsToSupport))throw"configOrVerbosityFlag.formatsToSupport should be undefined or an array.";if(t.formatsToSupport.length===0)throw"Atleast 1 formatsToSupport is needed.";for(var o=[],c=0,u=t.formatsToSupport;c<u.length;c++){var h=u[c];$R(h)?o.push(h):this.logger.warn("Invalid format: ".concat(h," passed in config, ignoring."))}if(o.length===0)throw"None of formatsToSupport match supported values.";return o},e.prototype.getUseBarCodeDetectorIfSupported=function(t){if(fn(t))return!0;if(!fn(t.useBarCodeDetectorIfSupported))return t.useBarCodeDetectorIfSupported!==!1;if(fn(t.experimentalFeatures))return!0;var n=t.experimentalFeatures;return fn(n.useBarCodeDetectorIfSupported)?!0:n.useBarCodeDetectorIfSupported!==!1},e.prototype.validateQrboxSize=function(t,n,o){var c=this,u=o.qrbox;this.validateQrboxConfig(u);var h=this.toQrdimensions(t,n,u),x=function(m){if(m<dr.MIN_QR_BOX_SIZE)throw"minimum size of 'config.qrbox' dimension value is"+" ".concat(dr.MIN_QR_BOX_SIZE,"px.")},w=function(m){return m>t&&(c.logger.warn("`qrbox.width` or `qrbox` is larger than the width of the root element. The width will be truncated to the width of root element."),m=t),m};x(h.width),x(h.height),h.width=w(h.width)},e.prototype.validateQrboxConfig=function(t){if(typeof t!="number"&&typeof t!="function"&&(t.width===void 0||t.height===void 0))throw"Invalid instance of QrDimensions passed for 'config.qrbox'. Both 'width' and 'height' should be set."},e.prototype.toQrdimensions=function(t,n,o){if(typeof o=="number")return{width:o,height:o};if(typeof o=="function")try{return o(t,n)}catch(c){throw new Error("qrbox config was passed as a function but it failed with unknown error"+c)}return o},e.prototype.setupUi=function(t,n,o){o.isShadedBoxEnabled()&&this.validateQrboxSize(t,n,o);var c=fn(o.qrbox)?{width:t,height:n}:o.qrbox;this.validateQrboxConfig(c);var u=this.toQrdimensions(t,n,c);u.height>n&&this.logger.warn("[Html5Qrcode] config.qrbox has height that isgreater than the height of the video stream. Shading will be ignored");var h=o.isShadedBoxEnabled()&&u.height<=n,x={x:0,y:0,width:t,height:n},w=h?this.getShadedRegionBounds(t,n,u):x,m=this.createCanvasElement(w.width,w.height),A={willReadFrequently:!0},C=m.getContext("2d",A);C.canvas.width=w.width,C.canvas.height=w.height,this.element.append(m),h&&this.possiblyInsertShadingElement(this.element,t,n,u),this.createScannerPausedUiElement(this.element),this.qrRegion=w,this.context=C,this.canvasElement=m},e.prototype.createScannerPausedUiElement=function(t){var n=document.createElement("div");n.innerText=us.scannerPaused(),n.style.display="none",n.style.position="absolute",n.style.top="0px",n.style.zIndex="1",n.style.background="rgba(9, 9, 9, 0.46)",n.style.color="#FFECEC",n.style.textAlign="center",n.style.width="100%",t.appendChild(n),this.scannerPausedUiElement=n},e.prototype.scanContext=function(t,n){var o=this;return this.stateManagerProxy.isPaused()?Promise.resolve(!1):this.qrcode.decodeAsync(this.canvasElement).then(function(c){return t(c.text,l2.createFromQrcodeResult(c)),o.possiblyUpdateShaders(!0),!0}).catch(function(c){o.possiblyUpdateShaders(!1);var u=us.codeParseError(c);return n(u,HR.createFrom(u)),!1})},e.prototype.foreverScan=function(t,n,o){var c=this;if(this.shouldScan&&this.renderedCamera){var u=this.renderedCamera.getSurface(),h=u.videoWidth/u.clientWidth,x=u.videoHeight/u.clientHeight;if(!this.qrRegion)throw"qrRegion undefined when localMediaStream is ready.";var w=this.qrRegion.width*h,m=this.qrRegion.height*x,A=this.qrRegion.x*h,C=this.qrRegion.y*x;this.context.drawImage(u,A,C,w,m,0,0,this.qrRegion.width,this.qrRegion.height);var b=function(){c.foreverScanTimeout=setTimeout(function(){c.foreverScan(t,n,o)},c.getTimeoutFps(t.fps))};this.scanContext(n,o).then(function(T){!T&&t.disableFlip!==!0?(c.context.translate(c.context.canvas.width,0),c.context.scale(-1,1),c.scanContext(n,o).finally(function(){b()})):b()}).catch(function(T){c.logger.logError("Error happend while scanning context",T),b()})}},e.prototype.createVideoConstraints=function(t){if(typeof t=="string")return{deviceId:{exact:t}};if(typeof t=="object"){var n="facingMode",o="deviceId",c={user:!0,environment:!0},u="exact",h=function(k){if(k in c)return!0;throw"config has invalid 'facingMode' value = "+"'".concat(k,"'")},x=Object.keys(t);if(x.length!==1)throw"'cameraIdOrConfig' object should have exactly 1 key,"+" if passed as an object, found ".concat(x.length," keys");var w=Object.keys(t)[0];if(w!==n&&w!==o)throw"Only '".concat(n,"' and '").concat(o,"' ")+" are supported for 'cameraIdOrConfig'";if(w===n){var m=t.facingMode;if(typeof m=="string"){if(h(m))return{facingMode:m}}else if(typeof m=="object")if(u in m){if(h(m["".concat(u)]))return{facingMode:{exact:m["".concat(u)]}}}else throw"'facingMode' should be string or object with"+" ".concat(u," as key.");else{var A=typeof m;throw"Invalid type of 'facingMode' = ".concat(A)}}else{var C=t.deviceId;if(typeof C=="string")return{deviceId:C};if(typeof C=="object"){if(u in C)return{deviceId:{exact:C["".concat(u)]}};throw"'deviceId' should be string or object with"+" ".concat(u," as key.")}else{var b=typeof C;throw"Invalid type of 'deviceId' = ".concat(b)}}}var T=typeof t;throw"Invalid type of 'cameraIdOrConfig' = ".concat(T)},e.prototype.computeCanvasDrawConfig=function(t,n,o,c){if(t<=o&&n<=c){var u=(o-t)/2,h=(c-n)/2;return{x:u,y:h,width:t,height:n}}else{var x=t,w=n;return t>o&&(n=o/t*n,t=o),n>c&&(t=c/n*t,n=c),this.logger.log("Image downsampled from "+"".concat(x,"X").concat(w)+" to ".concat(t,"X").concat(n,".")),this.computeCanvasDrawConfig(t,n,o,c)}},e.prototype.clearElement=function(){if(this.stateManagerProxy.isScanning())throw"Cannot clear while scan is ongoing, close it first.";var t=document.getElementById(this.elementId);t&&(t.innerHTML="")},e.prototype.possiblyUpdateShaders=function(t){this.qrMatch!==t&&(this.hasBorderShaders&&this.borderShaders&&this.borderShaders.length&&this.borderShaders.forEach(function(n){n.style.backgroundColor=t?dr.BORDER_SHADER_MATCH_COLOR:dr.BORDER_SHADER_DEFAULT_COLOR}),this.qrMatch=t)},e.prototype.possiblyCloseLastScanImageFile=function(){this.lastScanImageFile&&(URL.revokeObjectURL(this.lastScanImageFile),this.lastScanImageFile=null)},e.prototype.createCanvasElement=function(t,n,o){var c=t,u=n,h=document.createElement("canvas");return h.style.width="".concat(c,"px"),h.style.height="".concat(u,"px"),h.style.display="none",h.id=fn(o)?"qr-canvas":o,h},e.prototype.getShadedRegionBounds=function(t,n,o){if(o.width>t||o.height>n)throw"'config.qrbox' dimensions should not be greater than the dimensions of the root HTML element.";return{x:(t-o.width)/2,y:(n-o.height)/2,width:o.width,height:o.height}},e.prototype.possiblyInsertShadingElement=function(t,n,o,c){if(!(n-c.width<1||o-c.height<1)){var u=document.createElement("div");u.style.position="absolute";var h=(n-c.width)/2,x=(o-c.height)/2;if(u.style.borderLeft="".concat(h,"px solid rgba(0, 0, 0, 0.48)"),u.style.borderRight="".concat(h,"px solid rgba(0, 0, 0, 0.48)"),u.style.borderTop="".concat(x,"px solid rgba(0, 0, 0, 0.48)"),u.style.borderBottom="".concat(x,"px solid rgba(0, 0, 0, 0.48)"),u.style.boxSizing="border-box",u.style.top="0px",u.style.bottom="0px",u.style.left="0px",u.style.right="0px",u.id="".concat(dr.SHADED_REGION_ELEMENT_ID),n-c.width<11||o-c.height<11)this.hasBorderShaders=!1;else{var w=5,m=40;this.insertShaderBorders(u,m,w,-w,null,0,!0),this.insertShaderBorders(u,m,w,-w,null,0,!1),this.insertShaderBorders(u,m,w,null,-w,0,!0),this.insertShaderBorders(u,m,w,null,-w,0,!1),this.insertShaderBorders(u,w,m+w,-w,null,-w,!0),this.insertShaderBorders(u,w,m+w,null,-w,-w,!0),this.insertShaderBorders(u,w,m+w,-w,null,-w,!1),this.insertShaderBorders(u,w,m+w,null,-w,-w,!1),this.hasBorderShaders=!0}t.append(u)}},e.prototype.insertShaderBorders=function(t,n,o,c,u,h,x){var w=document.createElement("div");w.style.position="absolute",w.style.backgroundColor=dr.BORDER_SHADER_DEFAULT_COLOR,w.style.width="".concat(n,"px"),w.style.height="".concat(o,"px"),c!==null&&(w.style.top="".concat(c,"px")),u!==null&&(w.style.bottom="".concat(u,"px")),x?w.style.left="".concat(h,"px"):w.style.right="".concat(h,"px"),this.borderShaders||(this.borderShaders=[]),this.borderShaders.push(w),t.appendChild(w)},e.prototype.showPausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="block"},e.prototype.hidePausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="none"},e.prototype.getTimeoutFps=function(t){return 1e3/t},e}(),p2;(function(e){e[e.STATUS_DEFAULT=0]="STATUS_DEFAULT",e[e.STATUS_SUCCESS=1]="STATUS_SUCCESS",e[e.STATUS_WARNING=2]="STATUS_WARNING",e[e.STATUS_REQUESTING_PERMISSION=3]="STATUS_REQUESTING_PERMISSION"})(p2||(p2={}));var Z1;(function(e){e[e.BACK=1]="BACK",e[e.FRONT=2]="FRONT"})(Z1||(Z1={}));var Q1;(function(e){e[e.PORTRAIT=1]="PORTRAIT",e[e.LANDSCAPE=2]="LANDSCAPE",e[e.ADAPTIVE=3]="ADAPTIVE"})(Q1||(Q1={}));var q1;(function(e){e[e.ALL=17]="ALL"})(q1||(q1={}));const h_=Object.assign(Object.assign({},re),q1);var m2;(function(e){e.ZXING="zxing",e.MLKIT="mlkit"})(m2||(m2={}));const g_=[{selector:".scanner-container-display",css:"display: block;"},{selector:".scanner-dialog",css:"display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4);"},{selector:".scanner-dialog-inner",css:"background-color: #fefefe; margin: 2% auto; padding: 20px; border: 1px solid #888; width: 96%;"},{selector:".close-button",css:"color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer;"},{selector:".close-button:hover",css:"color: #222;"},{selector:".scanner-container-full-width",css:"width: 100%;"}];function p_(e){const t="custom-style-os-cap-barcode";let n=document.getElementById(t);if(n||(n=document.createElement("style"),n.type="text/css",n.id=t,document.head.appendChild(n)),n.sheet){for(;n.sheet.cssRules.length;)n.sheet.deleteRule(0);for(const{selector:o,css:c}of e)n.sheet.insertRule(`${o} { ${c} }`)}else{n.textContent="";for(const{selector:o,css:c}of e)n.textContent+=`${o} { ${c} }`}}const m_=pa("CapacitorBarcodeScanner",{web:()=>(p_(g_),Br(()=>import("./web-C8kCU9om.js"),[],import.meta.url).then(e=>new e.CapacitorBarcodeScannerWeb))});class x_{static async scanBarcode(t){return t.scanInstructions=t.scanInstructions||" ",t.scanButton=t.scanButton||!1,t.scanText=t.scanText||" ",t.cameraDirection=t.cameraDirection||Z1.BACK,t.scanOrientation=t.scanOrientation||Q1.ADAPTIVE,m_.scanBarcode(t)}}const Df=pa("SecureStoragePlugin",{web:()=>Br(()=>import("./web-BV7fxnr4.js"),[],import.meta.url).then(e=>new e.SecureStoragePluginWeb)});function w_(e){try{if(e.length>2048)throw new Error;if(!e.startsWith("{")){const c=new URL(e);if(!["http:","https:"].includes(c.protocol)||c.username||c.password||c.pathname!=="/pair"||c.search||!/^#pair=[A-Za-z0-9_-]{43}$/.test(c.hash))throw new Error;const u=ln.parse(c.origin);if(!u)throw new Error;return{endpoint:u,grant:c.hash.slice(6)}}const t=JSON.parse(e);if(t.type!=="agentroam-pair"||t.version!==1||typeof t.server!="string"||typeof t.grant!="string"||!/^[A-Za-z0-9_-]{43}$/.test(t.grant))throw new Error;const n=new URL(t.server);if(n.username||n.password||n.search||n.hash||n.pathname!=="/")throw new Error;const o=ln.parse(t.server);if(!o)throw new Error;return{endpoint:o,grant:t.grant}}catch{throw new Error("这不是 AgentRoam 授权二维码,请扫描电脑终端上新生成的二维码。")}}class t3{ready(){if(!Os.isNativePlatform())throw new Error("请在 AgentRoam App 中扫码连接。")}async get(t){this.ready();try{return(await Df.get({key:`agentroam-device:${t}`})).value}catch(n){if(String(n).includes("does not exist"))return null;throw new Error("无法读取设备凭证,请重试。")}}async set(t,n){this.ready(),await Df.set({key:`agentroam-device:${t}`,value:n})}async remove(t){this.ready();try{await Df.remove({key:`agentroam-device:${t}`})}catch(n){if(!String(n).includes("does not exist"))throw n}}}async function r3(){if(!Os.isNativePlatform())throw new Error("请在 AgentRoam App 中使用相机扫码。");try{return(await x_.scanBarcode({hint:h_.QR_CODE,scanInstructions:"扫描电脑上的 AgentRoam 授权二维码",cameraDirection:1})).ScanResult||null}catch(e){if(/cancel/i.test(String(e)))return null;throw new Error("无法打开相机,请在系统设置中允许 AgentRoam 使用相机后重试。")}}class n3{constructor(t,n=(...c)=>fetch(...c),o=()=>window.dispatchEvent(new CustomEvent("webapp:unauthorized"))){this.storage=t,this.transport=n,this.onRevoked=o,this.session=null,this.fetch=async(c,u={})=>{const h=this.session,x=new URL(typeof c=="string"?c:c instanceof URL?c.href:c.url),w=new Headers(u.headers??(c instanceof Request?c.headers:void 0));h&&x.origin===h.origin&&w.set("authorization",`Bearer ${h.token}`);const m=await this.transport(c,{...u,headers:w,credentials:"omit",redirect:"error"});if(h&&this.session===h&&x.origin===h.origin&&(m.status===401||m.status===423)){this.session=null;try{await this.storage.remove(h.origin)}finally{this.onRevoked()}}return m}}async resume(t){const n=await this.storage.get(t.url);this.session=n?{origin:t.url,token:n}:null}async pair(t){const{endpoint:n,grant:o}=w_(t),c=new AbortController,u=setTimeout(()=>c.abort(),3e4);let h=null;try{let x;try{x=await this.transport(n.api("/api/pairing/qr-exchange"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant:o,name:"我的 App"}),credentials:"omit",redirect:"error",signal:c.signal}),x.ok&&(h=await x.json())}catch(w){if(w instanceof SyntaxError)throw new Error("服务器返回了无效的设备凭证。");const m=c.signal.aborted||w instanceof Error&&(w.name==="TimeoutError"||w.name==="AbortError"),A=n.url.startsWith("http://")?"请确认手机与电脑在同一网络,并检查电脑防火墙是否允许 AgentRoam 连接。":"请检查手机网络和电脑的远程连接是否可用。";throw new Error(`${m?"连接电脑超时":"无法连接电脑"}(${n.url})。${A}请在电脑上刷新二维码后重新扫码。`)}if(!x.ok)throw new Error(x.status===423?"电脑已锁定远程访问,请先在电脑上解锁。":x.status===410?"二维码已使用或已过期,请在电脑上重新生成。":"扫码连接失败,请检查服务器地址和网络后重试。")}finally{clearTimeout(u)}if(!h||typeof h.token!="string"||!/^[A-Za-z0-9_-]{43}$/.test(h.token))throw new Error("服务器返回了无效的设备凭证。");try{await this.storage.set(n.url,h.token)}catch{throw await this.transport(n.api("/api/pairing/logout"),{method:"POST",headers:{authorization:`Bearer ${h.token}`},credentials:"omit",redirect:"error",signal:AbortSignal.timeout(5e3)}).catch(()=>{}),new Error("无法安全保存设备凭证,请在电脑上重新生成二维码后重试。")}return this.session={origin:n.url,token:h.token},n}async checkAuthorization(){const t=this.session;if(!t)return;const n=await this.fetch(`${t.origin}/api/web-auth/status`,{signal:AbortSignal.timeout(5e3)});if(!n.ok)return;const o=await n.json();if(this.session===t&&(o.locked||o.authenticated===!1)){this.session=null;try{await this.storage.remove(t.origin)}finally{this.onRevoked()}}}}function i3(e,t,n,o){const c=new URL(t);return(u,h)=>{const x=typeof u=="string"?u:u instanceof URL?u.href:u.url,w=new URL(x,c),m=w.protocol===c.protocol&&w.host===c.host;if(w.pathname.startsWith("/api/")&&(m||w.origin===e)){const A=new URL(w.pathname+w.search,e);return n.fetch(u instanceof Request?new Request(A,u):A,h)}return o(u,h)}}function v_(e,t){const n=new URL(e,"https://agentroam.local");if(n.pathname!=="/app/")throw new Error("Invalid workspace frame path");const o=new URL(t);return o.search=n.search,o.searchParams.set("workspace","1"),o.hash="",o.href}function J1(e){kR(DR(e.url,void 0,Kv())),new Gv().save(e)}async function y_(e,t,n,o){e.render(L.jsx(W0,{})),window.__agentroamNativeFrame={origin:t.url,fetch:n.fetch},globalThis.fetch=i3(t.url,location.href,n,o);const c=async h=>{const x=await n.pair(h);J1(x),location.reload()};TR({origin:t.url,frameUrl:h=>v_(h,location.href),pair:c,scan:async()=>{const h=await r3();h&&await c(h)},switchComputer:async h=>{const x=ln.parse(h);if(!x)throw new Error("电脑地址无效,请重新扫码。");const w=new n3(new t3,o,()=>{});await w.resume(x);const m=await w.fetch(x.api("/api/web-auth/status"),{signal:AbortSignal.timeout(5e3)}),A=m.ok?await m.json():null;if(!(A!=null&&A.authenticated)||A.locked)throw new Error("这台电脑需要重新授权,请点击扫码添加电脑。");J1(x),location.reload()}});const{default:u}=await Br(async()=>{const{default:h}=await import("./page-B-CkpInM.js").then(x=>x.p);return{default:h}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url);e.render(L.jsx(ce.StrictMode,{children:L.jsx(u,{})}))}function E_(){if(window.parent===window||new URLSearchParams(location.search).get("workspace")!=="1")return null;try{const e=new URL(window.parent.location.href);return e.protocol!==location.protocol||e.host!==location.host?null:window.parent.__agentroamNativeFrame??null}catch{return null}}function A_(e){return async(t,n)=>{const o=new Request(t,n);return e.fetch(o.url,{method:o.method,headers:Object.fromEntries(o.headers),body:o.method==="GET"||o.method==="HEAD"?void 0:await o.arrayBuffer(),signal:o.signal,cache:o.cache})}}var pc;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(pc||(pc={}));var x2;(function(e){e.None="NONE",e.Slide="SLIDE",e.Fade="FADE"})(x2||(x2={}));const Mf=pa("StatusBar");function C_(e){const t=/^#([a-f\d]{6})$/i.exec(e.trim());if(!t)return null;const n=[0,2,4].map(c=>{const u=parseInt(t[1].slice(c,c+2),16)/255;return u<=.04045?u/12.92:((u+.055)/1.055)**2.4}),o=.2126*n[0]+.7152*n[1]+.0722*n[2];return{color:`#${t[1]}`,style:o>.179?pc.Light:pc.Dark}}function b_(){if(Os.getPlatform()!=="android")return()=>{};const e=document.documentElement;e.dataset.skin=Ai.getState().skin;let t=!1,n=Mf.setOverlaysWebView({overlay:!1}).catch(()=>{});const o=()=>{const h=C_(getComputedStyle(e).getPropertyValue("--bg-deepest"));h&&(n=n.then(async()=>{t||(await Mf.setBackgroundColor({color:h.color}),await Mf.setStyle({style:h.style}))}).catch(()=>{console.warn("Unable to update the Android status bar.")}))},c=new MutationObserver(o);c.observe(e,{attributes:!0,attributeFilter:["data-skin"]});const u=()=>{document.hidden||o()};return document.addEventListener("visibilitychange",u),window.addEventListener("focus",o),o(),()=>{t=!0,c.disconnect(),document.removeEventListener("visibilitychange",u),window.removeEventListener("focus",o)}}const S_="/service-worker.js";function I_(){return typeof window<"u"&&window.isSecureContext===!0&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}function T_(e){const t="=".repeat((4-e.length%4)%4),n=`${e}${t}`.replace(/-/g,"+").replace(/_/g,"/"),o=atob(n),c=new Uint8Array(new ArrayBuffer(o.length));for(let u=0;u<o.length;u+=1)c[u]=o.charCodeAt(u);return c}async function w2(e){const{publicKey:t}=await e.get("/api/push/vapid");if(!t)return;const n=await navigator.serviceWorker.register(S_),c=await n.pushManager.getSubscription()??await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:T_(t)});await e.post("/api/push/subscribe",c.toJSON())}function R_(e){I_()&&(async()=>{try{if(Notification.permission==="granted"){await w2(e);return}if(Notification.permission!=="default")return;const t=()=>{(async()=>{try{await Notification.requestPermission()==="granted"&&await w2(e)}catch{}})()};document.addEventListener("pointerdown",t,{once:!0})}catch{}})()}class Pf extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}const v2=10,__=13,gi=32;function Lf(e){}function N_(e){if(typeof e=="function")throw new TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");const{onEvent:t=Lf,onError:n=Lf,onRetry:o=Lf,onComment:c,maxBufferSize:u}=e,h=[];let x=0,w=!0,m,A="",C=0,b,T=!1;function k(j){if(T)throw new Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(w&&(w=!1,j.charCodeAt(0)===239&&j.charCodeAt(1)===187&&j.charCodeAt(2)===191&&(j=j.slice(3))),h.length===0){const Y=X(j);Y!==""&&(h.push(Y),x=Y.length),M();return}if(j.indexOf(`
|
|
480
|
+
`);let s=lh.singletonList(Jr.INITIAL_STATE);for(let l=0;l<this.text.length;l++){let f,d=l+1<this.text.length?this.text[l+1]:0;switch(this.text[l]){case ie.getCharCode("\r"):f=d===i?2:0;break;case ie.getCharCode("."):f=d===r?3:0;break;case ie.getCharCode(","):f=d===r?4:0;break;case ie.getCharCode(":"):f=d===r?5:0;break;default:f=0}f>0?(s=Ys.updateStateListForPair(s,l,f),l++):s=this.updateStateListForChar(s,l)}return lh.min(s,(l,f)=>l.getBitCount()-f.getBitCount()).toBitArray(this.text)}updateStateListForChar(r,i){const s=[];for(let a of r)this.updateStateForChar(a,i,s);return Ys.simplifyStates(s)}updateStateForChar(r,i,s){let a=this.text[i]&255,l=vu[r.getMode()][a]>0,f=null;for(let d=0;d<=qr;d++){let g=vu[d][a];if(g>0){if(f==null&&(f=r.endBinaryShift(i)),!l||d===r.getMode()||d===Sr){const p=f.latchAndAppend(d,g);s.push(p)}if(!l&&uh[r.getMode()][d]>=0){const p=f.shiftAndAppend(d,g);s.push(p)}}}if(r.getBinaryShiftByteCount()>0||vu[r.getMode()][a]===0){let d=r.addBinaryShiftChar(i);s.push(d)}}static updateStateListForPair(r,i,s){const a=[];for(let l of r)this.updateStateForPair(l,i,s,a);return this.simplifyStates(a)}static updateStateForPair(r,i,s,a){let l=r.endBinaryShift(i);if(a.push(l.latchAndAppend(qr,s)),r.getMode()!==qr&&a.push(l.shiftAndAppend(qr,s)),s===3||s===4){let f=l.latchAndAppend(Sr,16-s).latchAndAppend(Sr,1);a.push(f)}if(r.getBinaryShiftByteCount()>0){let f=r.addBinaryShiftChar(i).addBinaryShiftChar(i+1);a.push(f)}}static simplifyStates(r){let i=[];for(const s of r){let a=!0;for(const l of i){if(l.isBetterThanOrEqualTo(s)){a=!1;break}s.isBetterThanOrEqualTo(l)&&(i=i.filter(f=>f!==l))}a&&i.push(s)}return i}}class _e{constructor(){}static encodeBytes(r){return _e.encode(r,_e.DEFAULT_EC_PERCENT,_e.DEFAULT_AZTEC_LAYERS)}static encode(r,i,s){let a=new Ys(r).encode(),l=_.truncDivision(a.getSize()*i,100)+11,f=a.getSize()+l,d,g,p,v,E;if(s!==_e.DEFAULT_AZTEC_LAYERS){if(d=s<0,g=Math.abs(s),g>(d?_e.MAX_NB_BITS_COMPACT:_e.MAX_NB_BITS))throw new C(ie.format("Illegal value %s for layers",s));p=_e.totalBitsInLayer(g,d),v=_e.WORD_SIZE[g];let Z=p-p%v;if(E=_e.stuffBits(a,v),E.getSize()+l>Z)throw new C("Data to large for user specified layer");if(d&&E.getSize()>v*64)throw new C("Data to large for user specified layer")}else{v=0,E=null;for(let Z=0;;Z++){if(Z>_e.MAX_NB_BITS)throw new C("Data too large for an Aztec code");if(d=Z<=3,g=d?Z+1:Z,p=_e.totalBitsInLayer(g,d),f>p)continue;(E==null||v!==_e.WORD_SIZE[g])&&(v=_e.WORD_SIZE[g],E=_e.stuffBits(a,v));let be=p-p%v;if(!(d&&E.getSize()>v*64)&&E.getSize()+l<=be)break}}let S=_e.generateCheckWords(E,p,v),N=E.getSize()/v,D=_e.generateModeMessage(d,g,N),P=(d?11:14)+g*4,W=new Int32Array(P),G;if(d){G=P;for(let Z=0;Z<W.length;Z++)W[Z]=Z}else{G=P+1+2*_.truncDivision(_.truncDivision(P,2)-1,15);let Z=_.truncDivision(P,2),be=_.truncDivision(G,2);for(let we=0;we<Z;we++){let tr=we+_.truncDivision(we,15);W[Z-we-1]=be-tr-1,W[Z+we]=be+tr+1}}let q=new Te(G);for(let Z=0,be=0;Z<g;Z++){let we=(g-Z)*4+(d?9:12);for(let tr=0;tr<we;tr++){let Mr=tr*2;for(let rr=0;rr<2;rr++)S.get(be+Mr+rr)&&q.set(W[Z*2+rr],W[Z*2+tr]),S.get(be+we*2+Mr+rr)&&q.set(W[Z*2+tr],W[P-1-Z*2-rr]),S.get(be+we*4+Mr+rr)&&q.set(W[P-1-Z*2-rr],W[P-1-Z*2-tr]),S.get(be+we*6+Mr+rr)&&q.set(W[P-1-Z*2-tr],W[Z*2+rr])}be+=we*8}if(_e.drawModeMessage(q,d,G,D),d)_e.drawBullsEye(q,_.truncDivision(G,2),5);else{_e.drawBullsEye(q,_.truncDivision(G,2),7);for(let Z=0,be=0;Z<_.truncDivision(P,2)-1;Z+=15,be+=16)for(let we=_.truncDivision(G,2)&1;we<G;we+=2)q.set(_.truncDivision(G,2)-be,we),q.set(_.truncDivision(G,2)+be,we),q.set(we,_.truncDivision(G,2)-be),q.set(we,_.truncDivision(G,2)+be)}let J=new ah;return J.setCompact(d),J.setSize(G),J.setLayers(g),J.setCodeWords(N),J.setMatrix(q),J}static drawBullsEye(r,i,s){for(let a=0;a<s;a+=2)for(let l=i-a;l<=i+a;l++)r.set(l,i-a),r.set(l,i+a),r.set(i-a,l),r.set(i+a,l);r.set(i-s,i-s),r.set(i-s+1,i-s),r.set(i-s,i-s+1),r.set(i+s,i-s),r.set(i+s,i-s+1),r.set(i+s,i+s-1)}static generateModeMessage(r,i,s){let a=new B;return r?(a.appendBits(i-1,2),a.appendBits(s-1,6),a=_e.generateCheckWords(a,28,4)):(a.appendBits(i-1,5),a.appendBits(s-1,11),a=_e.generateCheckWords(a,40,4)),a}static drawModeMessage(r,i,s,a){let l=_.truncDivision(s,2);if(i)for(let f=0;f<7;f++){let d=l-3+f;a.get(f)&&r.set(d,l-5),a.get(f+7)&&r.set(l+5,d),a.get(20-f)&&r.set(d,l+5),a.get(27-f)&&r.set(l-5,d)}else for(let f=0;f<10;f++){let d=l-5+f+_.truncDivision(f,5);a.get(f)&&r.set(d,l-7),a.get(f+10)&&r.set(l+7,d),a.get(29-f)&&r.set(d,l+7),a.get(39-f)&&r.set(l-7,d)}}static generateCheckWords(r,i,s){let a=r.getSize()/s,l=new gu(_e.getGF(s)),f=_.truncDivision(i,s),d=_e.bitsToWords(r,s,f);l.encode(d,f-a);let g=i%s,p=new B;p.appendBits(0,g);for(const v of Array.from(d))p.appendBits(v,s);return p}static bitsToWords(r,i,s){let a=new Int32Array(s),l,f;for(l=0,f=r.getSize()/i;l<f;l++){let d=0;for(let g=0;g<i;g++)d|=r.get(l*i+g)?1<<i-g-1:0;a[l]=d}return a}static getGF(r){switch(r){case 4:return Oe.AZTEC_PARAM;case 6:return Oe.AZTEC_DATA_6;case 8:return Oe.AZTEC_DATA_8;case 10:return Oe.AZTEC_DATA_10;case 12:return Oe.AZTEC_DATA_12;default:throw new C("Unsupported word size "+r)}}static stuffBits(r,i){let s=new B,a=r.getSize(),l=(1<<i)-2;for(let f=0;f<a;f+=i){let d=0;for(let g=0;g<i;g++)(f+g>=a||r.get(f+g))&&(d|=1<<i-1-g);(d&l)===l?(s.appendBits(d&l,i),f--):d&l?s.appendBits(d,i):(s.appendBits(d|1,i),f--)}return s}static totalBitsInLayer(r,i){return((i?88:112)+16*r)*r}}_e.DEFAULT_EC_PERCENT=33,_e.DEFAULT_AZTEC_LAYERS=0,_e.MAX_NB_BITS=32,_e.MAX_NB_BITS_COMPACT=4,_e.WORD_SIZE=Int32Array.from([4,6,6,8,8,8,8,8,8,10,10,10,10,10,10,10,10,10,10,10,10,10,10,12,12,12,12,12,12,12,12,12,12]);class Ra{encode(r,i,s,a){return this.encodeWithHints(r,i,s,a,null)}encodeWithHints(r,i,s,a,l){let f=mu.ISO_8859_1,d=_e.DEFAULT_EC_PERCENT,g=_e.DEFAULT_AZTEC_LAYERS;return l!=null&&(l.has(wt.CHARACTER_SET)&&(f=oh.forName(l.get(wt.CHARACTER_SET).toString())),l.has(wt.ERROR_CORRECTION)&&(d=_.parseInt(l.get(wt.ERROR_CORRECTION).toString())),l.has(wt.AZTEC_LAYERS)&&(g=_.parseInt(l.get(wt.AZTEC_LAYERS).toString()))),Ra.encodeLayers(r,i,s,a,f,d,g)}static encodeLayers(r,i,s,a,l,f,d){if(i!==le.AZTEC)throw new C("Can only encode AZTEC, but got "+i);let g=_e.encode(ie.getBytes(r,l),f,d);return Ra.renderResult(g,s,a)}static renderResult(r,i,s){let a=r.getMatrix();if(a==null)throw new Xr;let l=a.getWidth(),f=a.getHeight(),d=Math.max(i,l),g=Math.max(s,f),p=Math.min(d/l,g/f),v=(d-l*p)/2,E=(g-f*p)/2,S=new Te(d,g);for(let N=0,D=E;N<f;N++,D+=p)for(let P=0,W=v;P<l;P++,W+=p)a.get(P,N)&&S.setRegion(W,D,p,p);return S}}n.AbstractExpandedDecoder=iu,n.ArgumentException=A,n.ArithmeticException=ma,n.AztecCode=ah,n.AztecCodeReader=va,n.AztecCodeWriter=Ra,n.AztecDecoder=je,n.AztecDetector=X0,n.AztecDetectorResult=G0,n.AztecEncoder=_e,n.AztecHighLevelEncoder=Ys,n.AztecPoint=$t,n.BarcodeFormat=le,n.Binarizer=k,n.BinaryBitmap=b,n.BitArray=B,n.BitMatrix=Te,n.BitSource=lu,n.BrowserAztecCodeReader=a3,n.BrowserBarcodeReader=d3,n.BrowserCodeReader=Er,n.BrowserDatamatrixCodeReader=g3,n.BrowserMultiFormatReader=S3,n.BrowserPDF417Reader=I3,n.BrowserQRCodeReader=T3,n.BrowserQRCodeSvgWriter=di,n.CharacterSetECI=V,n.ChecksumException=T,n.Code128Reader=ee,n.Code39Reader=mt,n.DataMatrixDecodedBitStreamParser=On,n.DataMatrixReader=kn,n.DecodeHintType=U,n.DecoderResult=Bs,n.DefaultGridSampler=H0,n.DetectorResult=wa,n.EAN13Reader=ai,n.EncodeHintType=wt,n.Exception=m,n.FormatException=F,n.GenericGF=Oe,n.GenericGFPoly=Qt,n.GlobalHistogramBinarizer=rt,n.GridSampler=eu,n.GridSamplerInstance=_n,n.HTMLCanvasElementLuminanceSource=me,n.HybridBinarizer=xe,n.ITFReader=Be,n.IllegalArgumentException=C,n.IllegalStateException=Xr,n.InvertedLuminanceSource=he,n.LuminanceSource=te,n.MathUtils=Re,n.MultiFormatOneDReader=ji,n.MultiFormatReader=sh,n.MultiFormatWriter=_3,n.NotFoundException=H,n.OneDReader=ht,n.PDF417DecodedBitStreamParser=$,n.PDF417DecoderErrorCorrection=J0,n.PDF417Reader=Ot,n.PDF417ResultMetadata=th,n.PerspectiveTransform=kr,n.PlanarYUVLuminanceSource=Qr,n.QRCodeByteMatrix=Ia,n.QRCodeDataMask=Cr,n.QRCodeDecodedBitStreamParser=Qe,n.QRCodeDecoderErrorCorrectionLevel=We,n.QRCodeDecoderFormatInformation=Ut,n.QRCodeEncoder=Ve,n.QRCodeEncoderQRCode=fi,n.QRCodeMaskUtil=st,n.QRCodeMatrixUtil=de,n.QRCodeMode=fe,n.QRCodeReader=Dn,n.QRCodeVersion=ue,n.QRCodeWriter=zi,n.RGBLuminanceSource=pu,n.RSS14Reader=it,n.RSSExpandedReader=K,n.ReaderException=Sa,n.ReedSolomonDecoder=Us,n.ReedSolomonEncoder=gu,n.ReedSolomonException=Li,n.Result=Ze,n.ResultMetadataType=Ct,n.ResultPoint=ae,n.StringUtils=ie,n.UnsupportedOperationException=oe,n.VideoInputDevice=He,n.WhiteRectangleDetector=un,n.WriterException=Fe,n.ZXingArrays=I,n.ZXingCharset=oh,n.ZXingInteger=_,n.ZXingStandardCharsets=mu,n.ZXingStringBuilder=pe,n.ZXingStringEncoding=ve,n.ZXingSystem=M,n.createAbstractExpandedDecoder=Q0,Object.defineProperty(n,"__esModule",{value:!0})})})(K1,K1.exports);var qe=K1.exports;const YR=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var c2=function(){function e(t,n,o){if(this.formatMap=new Map([[re.QR_CODE,qe.BarcodeFormat.QR_CODE],[re.AZTEC,qe.BarcodeFormat.AZTEC],[re.CODABAR,qe.BarcodeFormat.CODABAR],[re.CODE_39,qe.BarcodeFormat.CODE_39],[re.CODE_93,qe.BarcodeFormat.CODE_93],[re.CODE_128,qe.BarcodeFormat.CODE_128],[re.DATA_MATRIX,qe.BarcodeFormat.DATA_MATRIX],[re.MAXICODE,qe.BarcodeFormat.MAXICODE],[re.ITF,qe.BarcodeFormat.ITF],[re.EAN_13,qe.BarcodeFormat.EAN_13],[re.EAN_8,qe.BarcodeFormat.EAN_8],[re.PDF_417,qe.BarcodeFormat.PDF_417],[re.RSS_14,qe.BarcodeFormat.RSS_14],[re.RSS_EXPANDED,qe.BarcodeFormat.RSS_EXPANDED],[re.UPC_A,qe.BarcodeFormat.UPC_A],[re.UPC_E,qe.BarcodeFormat.UPC_E],[re.UPC_EAN_EXTENSION,qe.BarcodeFormat.UPC_EAN_EXTENSION]]),this.reverseFormatMap=this.createReverseFormatMap(),!YR)throw"Use html5qrcode.min.js without edit, ZXing not found.";this.verbose=n,this.logger=o;var c=this.createZXingFormats(t),u=new Map;u.set(qe.DecodeHintType.POSSIBLE_FORMATS,c),u.set(qe.DecodeHintType.TRY_HARDER,!1),this.hints=u}return e.prototype.decodeAsync=function(t){var n=this;return new Promise(function(o,c){try{o(n.decode(t))}catch(u){c(u)}})},e.prototype.decode=function(t){var n=new qe.MultiFormatReader(this.verbose,this.hints),o=new qe.HTMLCanvasElementLuminanceSource(t),c=new qe.BinaryBitmap(new qe.HybridBinarizer(o)),u=n.decode(c);return{text:u.text,format:qv.create(this.toHtml5QrcodeSupportedFormats(u.format)),debugData:this.createDebugData()}},e.prototype.createReverseFormatMap=function(){var t=new Map;return this.formatMap.forEach(function(n,o,c){t.set(n,o)}),t},e.prototype.toHtml5QrcodeSupportedFormats=function(t){if(!this.reverseFormatMap.has(t))throw"reverseFormatMap doesn't have ".concat(t);return this.reverseFormatMap.get(t)},e.prototype.createZXingFormats=function(t){for(var n=[],o=0,c=t;o<c.length;o++){var u=c[o];this.formatMap.has(u)?n.push(this.formatMap.get(u)):this.logger.logError("".concat(u," is not supported by")+"ZXingHtml5QrcodeShim")}return n},e.prototype.createDebugData=function(){return{decoderName:"zxing-js"}},e}(),KR=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},ZR=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},u2=function(){function e(t,n,o){if(this.formatMap=new Map([[re.QR_CODE,"qr_code"],[re.AZTEC,"aztec"],[re.CODABAR,"codabar"],[re.CODE_39,"code_39"],[re.CODE_93,"code_93"],[re.CODE_128,"code_128"],[re.DATA_MATRIX,"data_matrix"],[re.ITF,"itf"],[re.EAN_13,"ean_13"],[re.EAN_8,"ean_8"],[re.PDF_417,"pdf417"],[re.UPC_A,"upc_a"],[re.UPC_E,"upc_e"]]),this.reverseFormatMap=this.createReverseFormatMap(),!e.isSupported())throw"Use html5qrcode.min.js without edit, Use BarcodeDetectorDelegate only if it isSupported();";this.verbose=n,this.logger=o;var c=this.createBarcodeDetectorFormats(t);if(this.detector=new BarcodeDetector(c),!this.detector)throw"BarcodeDetector detector not supported"}return e.isSupported=function(){if(!("BarcodeDetector"in window))return!1;var t=new BarcodeDetector({formats:["qr_code"]});return typeof t<"u"},e.prototype.decodeAsync=function(t){return KR(this,void 0,void 0,function(){var n,o;return ZR(this,function(c){switch(c.label){case 0:return[4,this.detector.detect(t)];case 1:if(n=c.sent(),!n||n.length===0)throw"No barcode or QR code detected.";return o=this.selectLargestBarcode(n),[2,{text:o.rawValue,format:qv.create(this.toHtml5QrcodeSupportedFormats(o.format)),debugData:this.createDebugData()}]}})})},e.prototype.selectLargestBarcode=function(t){for(var n=null,o=0,c=0,u=t;c<u.length;c++){var h=u[c],x=h.boundingBox.width*h.boundingBox.height;x>o&&(o=x,n=h)}if(!n)throw"No largest barcode found";return n},e.prototype.createBarcodeDetectorFormats=function(t){for(var n=[],o=0,c=t;o<c.length;o++){var u=c[o];this.formatMap.has(u)?n.push(this.formatMap.get(u)):this.logger.warn("".concat(u," is not supported by")+"BarcodeDetectorDelegate")}return{formats:n}},e.prototype.toHtml5QrcodeSupportedFormats=function(t){if(!this.reverseFormatMap.has(t))throw"reverseFormatMap doesn't have ".concat(t);return this.reverseFormatMap.get(t)},e.prototype.createReverseFormatMap=function(){var t=new Map;return this.formatMap.forEach(function(n,o,c){t.set(n,o)}),t},e.prototype.createDebugData=function(){return{decoderName:"BarcodeDetector"}},e}(),f2=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},d2=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},QR=function(){function e(t,n,o,c){this.EXECUTIONS_TO_REPORT_PERFORMANCE=100,this.executions=0,this.executionResults=[],this.wasPrimaryDecoderUsedInLastDecode=!1,this.verbose=o,n&&u2.isSupported()?(this.primaryDecoder=new u2(t,o,c),this.secondaryDecoder=new c2(t,o,c)):this.primaryDecoder=new c2(t,o,c)}return e.prototype.decodeAsync=function(t){return f2(this,void 0,void 0,function(){var n;return d2(this,function(o){switch(o.label){case 0:n=performance.now(),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,this.getDecoder().decodeAsync(t)];case 2:return[2,o.sent()];case 3:return this.possiblyLogPerformance(n),[7];case 4:return[2]}})})},e.prototype.decodeRobustlyAsync=function(t){return f2(this,void 0,void 0,function(){var n,o;return d2(this,function(c){switch(c.label){case 0:n=performance.now(),c.label=1;case 1:return c.trys.push([1,3,4,5]),[4,this.primaryDecoder.decodeAsync(t)];case 2:return[2,c.sent()];case 3:if(o=c.sent(),this.secondaryDecoder)return[2,this.secondaryDecoder.decodeAsync(t)];throw o;case 4:return this.possiblyLogPerformance(n),[7];case 5:return[2]}})})},e.prototype.getDecoder=function(){return this.secondaryDecoder?this.wasPrimaryDecoderUsedInLastDecode===!1?(this.wasPrimaryDecoderUsedInLastDecode=!0,this.primaryDecoder):(this.wasPrimaryDecoderUsedInLastDecode=!1,this.secondaryDecoder):this.primaryDecoder},e.prototype.possiblyLogPerformance=function(t){if(this.verbose){var n=performance.now()-t;this.executionResults.push(n),this.executions++,this.possiblyFlushPerformanceReport()}},e.prototype.possiblyFlushPerformanceReport=function(){if(!(this.executions<this.EXECUTIONS_TO_REPORT_PERFORMANCE)){for(var t=0,n=0,o=this.executionResults;n<o.length;n++){var c=o[n];t+=c}var u=t/this.executionResults.length;console.log("".concat(u," ms for ").concat(this.executionResults.length," last runs.")),this.executions=0,this.executionResults=[]}},e}(),V0=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(o[u]=c[u])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}}(),hc=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},gc=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},e3=function(){function e(t,n){this.name=t,this.track=n}return e.prototype.isSupported=function(){return this.track.getCapabilities?this.name in this.track.getCapabilities():!1},e.prototype.apply=function(t){var n={};n[this.name]=t;var o={advanced:[n]};return this.track.applyConstraints(o)},e.prototype.value=function(){var t=this.track.getSettings();if(this.name in t){var n=t[this.name];return n}return null},e}(),qR=function(e){V0(t,e);function t(n,o){return e.call(this,n,o)||this}return t.prototype.min=function(){return this.getCapabilities().min},t.prototype.max=function(){return this.getCapabilities().max},t.prototype.step=function(){return this.getCapabilities().step},t.prototype.apply=function(n){var o={};o[this.name]=n;var c={advanced:[o]};return this.track.applyConstraints(c)},t.prototype.getCapabilities=function(){this.failIfNotSupported();var n=this.track.getCapabilities(),o=n[this.name];return{min:o.min,max:o.max,step:o.step}},t.prototype.failIfNotSupported=function(){if(!this.isSupported())throw new Error("".concat(this.name," capability not supported"))},t}(e3),JR=function(e){V0(t,e);function t(n){return e.call(this,"zoom",n)||this}return t}(qR),e_=function(e){V0(t,e);function t(n){return e.call(this,"torch",n)||this}return t}(e3),t_=function(){function e(t){this.track=t}return e.prototype.zoomFeature=function(){return new JR(this.track)},e.prototype.torchFeature=function(){return new e_(this.track)},e}(),r_=function(){function e(t,n,o){this.isClosed=!1,this.parentElement=t,this.mediaStream=n,this.callbacks=o,this.surface=this.createVideoElement(this.parentElement.clientWidth),t.append(this.surface)}return e.prototype.createVideoElement=function(t){var n=document.createElement("video");return n.style.width="".concat(t,"px"),n.style.display="block",n.muted=!0,n.setAttribute("muted","true"),n.playsInline=!0,n},e.prototype.setupSurface=function(){var t=this;this.surface.onabort=function(){throw"RenderedCameraImpl video surface onabort() called"},this.surface.onerror=function(){throw"RenderedCameraImpl video surface onerror() called"};var n=function(){var o=t.surface.clientWidth,c=t.surface.clientHeight;t.callbacks.onRenderSurfaceReady(o,c),t.surface.removeEventListener("playing",n)};this.surface.addEventListener("playing",n),this.surface.srcObject=this.mediaStream,this.surface.play()},e.create=function(t,n,o,c){return hc(this,void 0,void 0,function(){var u,h;return gc(this,function(x){switch(x.label){case 0:return u=new e(t,n,c),o.aspectRatio?(h={aspectRatio:o.aspectRatio},[4,u.getFirstTrackOrFail().applyConstraints(h)]):[3,2];case 1:x.sent(),x.label=2;case 2:return u.setupSurface(),[2,u]}})})},e.prototype.failIfClosed=function(){if(this.isClosed)throw"The RenderedCamera has already been closed."},e.prototype.getFirstTrackOrFail=function(){if(this.failIfClosed(),this.mediaStream.getVideoTracks().length===0)throw"No video tracks found";return this.mediaStream.getVideoTracks()[0]},e.prototype.pause=function(){this.failIfClosed(),this.surface.pause()},e.prototype.resume=function(t){this.failIfClosed();var n=this,o=function(){setTimeout(t,200),n.surface.removeEventListener("playing",o)};this.surface.addEventListener("playing",o),this.surface.play()},e.prototype.isPaused=function(){return this.failIfClosed(),this.surface.paused},e.prototype.getSurface=function(){return this.failIfClosed(),this.surface},e.prototype.getRunningTrackCapabilities=function(){return this.getFirstTrackOrFail().getCapabilities()},e.prototype.getRunningTrackSettings=function(){return this.getFirstTrackOrFail().getSettings()},e.prototype.applyVideoConstraints=function(t){return hc(this,void 0,void 0,function(){return gc(this,function(n){if("aspectRatio"in t)throw"Changing 'aspectRatio' in run-time is not yet supported.";return[2,this.getFirstTrackOrFail().applyConstraints(t)]})})},e.prototype.close=function(){if(this.isClosed)return Promise.resolve();var t=this;return new Promise(function(n,o){var c=t.mediaStream.getVideoTracks(),u=c.length,h=0;t.mediaStream.getVideoTracks().forEach(function(x){t.mediaStream.removeTrack(x),x.stop(),++h,h>=u&&(t.isClosed=!0,t.parentElement.removeChild(t.surface),n())})})},e.prototype.getCapabilities=function(){return new t_(this.getFirstTrackOrFail())},e}(),n_=function(){function e(t){this.mediaStream=t}return e.prototype.render=function(t,n,o){return hc(this,void 0,void 0,function(){return gc(this,function(c){return[2,r_.create(t,this.mediaStream,n,o)]})})},e.create=function(t){return hc(this,void 0,void 0,function(){var n,o;return gc(this,function(c){switch(c.label){case 0:if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return n={audio:!1,video:t},[4,navigator.mediaDevices.getUserMedia(n)];case 1:return o=c.sent(),[2,new e(o)]}})})},e}(),h2=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},g2=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},i_=function(){function e(){}return e.failIfNotSupported=function(){return h2(this,void 0,void 0,function(){return g2(this,function(t){if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return[2,new e]})})},e.prototype.create=function(t){return h2(this,void 0,void 0,function(){return g2(this,function(n){return[2,n_.create(t)]})})},e}(),s_=function(e,t,n,o){function c(u){return u instanceof n?u:new n(function(h){h(u)})}return new(n||(n=Promise))(function(u,h){function x(A){try{m(o.next(A))}catch(C){h(C)}}function w(A){try{m(o.throw(A))}catch(C){h(C)}}function m(A){A.done?u(A.value):c(A.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},o_=function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,c,u,h;return h={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function x(m){return function(A){return w([m,A])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;h&&(h=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(u=m[0]&2?c.return:m[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,m[1])).done)return u;switch(c=0,u&&(m=[m[0]&2,u.value]),m[0]){case 0:case 1:u=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,c=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){n.label=m[1];break}if(m[0]===6&&n.label<u[1]){n.label=u[1],u=m;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(m);break}u[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(A){m=[6,A],c=0}finally{o=u=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},a_=function(){function e(){}return e.retrieve=function(){if(navigator.mediaDevices)return e.getCamerasFromMediaDevices();var t=MediaStreamTrack;return MediaStreamTrack&&t.getSources?e.getCamerasFromMediaStreamTrack():e.rejectWithError()},e.rejectWithError=function(){var t=us.unableToQuerySupportedDevices();return e.isHttpsOrLocalhost()||(t=us.insecureContextCameraQueryError()),Promise.reject(t)},e.isHttpsOrLocalhost=function(){if(location.protocol==="https:")return!0;var t=location.host.split(":")[0];return t==="127.0.0.1"||t==="localhost"},e.getCamerasFromMediaDevices=function(){return s_(this,void 0,void 0,function(){var t,n,o,c,u,h,x;return o_(this,function(w){switch(w.label){case 0:return t=function(m){for(var A=m.getVideoTracks(),C=0,b=A;C<b.length;C++){var T=b[C];T.enabled=!1,T.stop(),m.removeTrack(T)}},[4,navigator.mediaDevices.getUserMedia({audio:!1,video:!0})];case 1:return n=w.sent(),[4,navigator.mediaDevices.enumerateDevices()];case 2:for(o=w.sent(),c=[],u=0,h=o;u<h.length;u++)x=h[u],x.kind==="videoinput"&&c.push({id:x.deviceId,label:x.label});return t(n),[2,c]}})})},e.getCamerasFromMediaStreamTrack=function(){return new Promise(function(t,n){var o=function(u){for(var h=[],x=0,w=u;x<w.length;x++){var m=w[x];m.kind==="video"&&h.push({id:m.id,label:m.label})}t(h)},c=MediaStreamTrack;c.getSources(o)})},e}(),ot;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.NOT_STARTED=1]="NOT_STARTED",e[e.SCANNING=2]="SCANNING",e[e.PAUSED=3]="PAUSED"})(ot||(ot={}));var l_=function(){function e(){this.state=ot.NOT_STARTED,this.onGoingTransactionNewState=ot.UNKNOWN}return e.prototype.directTransition=function(t){this.failIfTransitionOngoing(),this.validateTransition(t),this.state=t},e.prototype.startTransition=function(t){return this.failIfTransitionOngoing(),this.validateTransition(t),this.onGoingTransactionNewState=t,this},e.prototype.execute=function(){if(this.onGoingTransactionNewState===ot.UNKNOWN)throw"Transaction is already cancelled, cannot execute().";var t=this.onGoingTransactionNewState;this.onGoingTransactionNewState=ot.UNKNOWN,this.directTransition(t)},e.prototype.cancel=function(){if(this.onGoingTransactionNewState===ot.UNKNOWN)throw"Transaction is already cancelled, cannot cancel().";this.onGoingTransactionNewState=ot.UNKNOWN},e.prototype.getState=function(){return this.state},e.prototype.failIfTransitionOngoing=function(){if(this.onGoingTransactionNewState!==ot.UNKNOWN)throw"Cannot transition to a new state, already under transition"},e.prototype.validateTransition=function(t){switch(this.state){case ot.UNKNOWN:throw"Transition from unknown is not allowed";case ot.NOT_STARTED:this.failIfNewStateIs(t,[ot.PAUSED]);break;case ot.SCANNING:break;case ot.PAUSED:break}},e.prototype.failIfNewStateIs=function(t,n){for(var o=0,c=n;o<c.length;o++){var u=c[o];if(t===u)throw"Cannot transition from ".concat(this.state," to ").concat(t)}},e}(),c_=function(){function e(t){this.stateManager=t}return e.prototype.startTransition=function(t){return this.stateManager.startTransition(t)},e.prototype.directTransition=function(t){this.stateManager.directTransition(t)},e.prototype.getState=function(){return this.stateManager.getState()},e.prototype.canScanFile=function(){return this.stateManager.getState()===ot.NOT_STARTED},e.prototype.isScanning=function(){return this.stateManager.getState()!==ot.NOT_STARTED},e.prototype.isStrictlyScanning=function(){return this.stateManager.getState()===ot.SCANNING},e.prototype.isPaused=function(){return this.stateManager.getState()===ot.PAUSED},e}(),u_=function(){function e(){}return e.create=function(){return new c_(new l_)},e}(),f_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(o[u]=c[u])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}}(),dr=function(e){f_(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.DEFAULT_WIDTH=300,t.DEFAULT_WIDTH_OFFSET=2,t.FILE_SCAN_MIN_HEIGHT=300,t.FILE_SCAN_HIDDEN_CANVAS_PADDING=100,t.MIN_QR_BOX_SIZE=50,t.SHADED_LEFT=1,t.SHADED_RIGHT=2,t.SHADED_TOP=3,t.SHADED_BOTTOM=4,t.SHADED_REGION_ELEMENT_ID="qr-shaded-region",t.VERBOSE=!1,t.BORDER_SHADER_DEFAULT_COLOR="#ffffff",t.BORDER_SHADER_MATCH_COLOR="rgb(90, 193, 56)",t}(GR),d_=function(){function e(t,n){this.logger=n,this.fps=dr.SCAN_DEFAULT_FPS,t?(t.fps&&(this.fps=t.fps),this.disableFlip=t.disableFlip===!0,this.qrbox=t.qrbox,this.aspectRatio=t.aspectRatio,this.videoConstraints=t.videoConstraints):this.disableFlip=dr.DEFAULT_DISABLE_FLIP}return e.prototype.isMediaStreamConstraintsValid=function(){return this.videoConstraints?Jv.isMediaStreamConstraintsValid(this.videoConstraints,this.logger):(this.logger.logError("Empty videoConstraints",!0),!1)},e.prototype.isShadedBoxEnabled=function(){return!fn(this.qrbox)},e.create=function(t,n){return new e(t,n)},e}(),nN=function(){function e(t,n){if(this.element=null,this.canvasElement=null,this.scannerPausedUiElement=null,this.hasBorderShaders=null,this.borderShaders=null,this.qrMatch=null,this.renderedCamera=null,this.qrRegion=null,this.context=null,this.lastScanImageFile=null,this.isScanning=!1,!document.getElementById(t))throw"HTML Element with id=".concat(t," not found");this.elementId=t,this.verbose=!1;var o;typeof n=="boolean"?this.verbose=n===!0:n&&(o=n,this.verbose=o.verbose===!0,o.experimentalFeatures),this.logger=new XR(this.verbose),this.qrcode=new QR(this.getSupportedFormats(n),this.getUseBarCodeDetectorIfSupported(o),this.verbose,this.logger),this.foreverScanTimeout,this.shouldScan=!0,this.stateManagerProxy=u_.create()}return e.prototype.start=function(t,n,o,c){var u=this;if(!t)throw"cameraIdOrConfig is required";if(!o||typeof o!="function")throw"qrCodeSuccessCallback is required and should be a function.";var h;c?h=c:h=this.verbose?this.logger.log:function(){};var x=d_.create(n,this.logger);this.clearElement();var w=!1;x.videoConstraints&&(x.isMediaStreamConstraintsValid()?w=!0:this.logger.logError("'videoConstraints' is not valid 'MediaStreamConstraints, it will be ignored.'",!0));var m=w,A=document.getElementById(this.elementId);A.clientWidth?A.clientWidth:dr.DEFAULT_WIDTH,A.style.position="relative",this.shouldScan=!0,this.element=A;var C=this,b=this.stateManagerProxy.startTransition(ot.SCANNING);return new Promise(function(T,k){var M=m?x.videoConstraints:C.createVideoConstraints(t);if(!M){b.cancel(),k("videoConstraints should be defined");return}var X={};(!m||x.aspectRatio)&&(X.aspectRatio=x.aspectRatio);var O={onRenderSurfaceReady:function(I,_){C.setupUi(I,_,x),C.isScanning=!0,C.foreverScan(x,o,h)}};i_.failIfNotSupported().then(function(I){I.create(M).then(function(_){return _.render(u.element,X,O).then(function(B){C.renderedCamera=B,b.execute(),T(null)}).catch(function(B){b.cancel(),k(B)})}).catch(function(_){b.cancel(),k(us.errorGettingUserMedia(_))})}).catch(function(I){b.cancel(),k(us.cameraStreamingNotSupported())})})},e.prototype.pause=function(t){if(!this.stateManagerProxy.isStrictlyScanning())throw"Cannot pause, scanner is not scanning.";this.stateManagerProxy.directTransition(ot.PAUSED),this.showPausedState(),(fn(t)||t!==!0)&&(t=!1),t&&this.renderedCamera&&this.renderedCamera.pause()},e.prototype.resume=function(){if(!this.stateManagerProxy.isPaused())throw"Cannot result, scanner is not paused.";if(!this.renderedCamera)throw"renderedCamera doesn't exist while trying resume()";var t=this,n=function(){t.stateManagerProxy.directTransition(ot.SCANNING),t.hidePausedState()};if(!this.renderedCamera.isPaused()){n();return}this.renderedCamera.resume(function(){n()})},e.prototype.getState=function(){return this.stateManagerProxy.getState()},e.prototype.stop=function(){var t=this;if(!this.stateManagerProxy.isScanning())throw"Cannot stop, scanner is not running or paused.";var n=this.stateManagerProxy.startTransition(ot.NOT_STARTED);this.shouldScan=!1,this.foreverScanTimeout&&clearTimeout(this.foreverScanTimeout);var o=function(){if(t.element){var u=document.getElementById(dr.SHADED_REGION_ELEMENT_ID);u&&t.element.removeChild(u)}},c=this;return this.renderedCamera.close().then(function(){return c.renderedCamera=null,c.element&&(c.element.removeChild(c.canvasElement),c.canvasElement=null),o(),c.qrRegion&&(c.qrRegion=null),c.context&&(c.context=null),n.execute(),c.hidePausedState(),c.isScanning=!1,Promise.resolve()})},e.prototype.scanFile=function(t,n){return this.scanFileV2(t,n).then(function(o){return o.decodedText})},e.prototype.scanFileV2=function(t,n){var o=this;if(!t||!(t instanceof File))throw"imageFile argument is mandatory and should be instance of File. Use 'event.target.files[0]'.";if(fn(n)&&(n=!0),!this.stateManagerProxy.canScanFile())throw"Cannot start file scan - ongoing camera scan";return new Promise(function(c,u){o.possiblyCloseLastScanImageFile(),o.clearElement(),o.lastScanImageFile=URL.createObjectURL(t);var h=new Image;h.onload=function(){var x=h.width,w=h.height,m=document.getElementById(o.elementId),A=m.clientWidth?m.clientWidth:dr.DEFAULT_WIDTH,C=Math.max(m.clientHeight?m.clientHeight:w,dr.FILE_SCAN_MIN_HEIGHT),b=o.computeCanvasDrawConfig(x,w,A,C);if(n){var T=o.createCanvasElement(A,C,"qr-canvas-visible");T.style.display="inline-block",m.appendChild(T);var k=T.getContext("2d");if(!k)throw"Unable to get 2d context from canvas";k.canvas.width=A,k.canvas.height=C,k.drawImage(h,0,0,x,w,b.x,b.y,b.width,b.height)}var M=dr.FILE_SCAN_HIDDEN_CANVAS_PADDING,X=Math.max(h.width,b.width),O=Math.max(h.height,b.height),I=X+2*M,_=O+2*M,B=o.createCanvasElement(I,_);m.appendChild(B);var j=B.getContext("2d");if(!j)throw"Unable to get 2d context from canvas";j.canvas.width=I,j.canvas.height=_,j.drawImage(h,0,0,x,w,M,M,X,O);try{o.qrcode.decodeRobustlyAsync(B).then(function(U){c(l2.createFromQrcodeResult(U))}).catch(u)}catch(U){u("QR code parse error, error = ".concat(U))}},h.onerror=u,h.onabort=u,h.onstalled=u,h.onsuspend=u,h.src=URL.createObjectURL(t)})},e.prototype.clear=function(){this.clearElement()},e.getCameras=function(){return a_.retrieve()},e.prototype.getRunningTrackCapabilities=function(){return this.getRenderedCameraOrFail().getRunningTrackCapabilities()},e.prototype.getRunningTrackSettings=function(){return this.getRenderedCameraOrFail().getRunningTrackSettings()},e.prototype.getRunningTrackCameraCapabilities=function(){return this.getRenderedCameraOrFail().getCapabilities()},e.prototype.applyVideoConstraints=function(t){if(t){if(!Jv.isMediaStreamConstraintsValid(t,this.logger))throw"invalid videoConstaints passed, check logs for more details"}else throw"videoConstaints is required argument.";return this.getRenderedCameraOrFail().applyVideoConstraints(t)},e.prototype.getRenderedCameraOrFail=function(){if(this.renderedCamera==null)throw"Scanning is not in running state, call this API only when QR code scanning using camera is in running state.";return this.renderedCamera},e.prototype.getSupportedFormats=function(t){var n=[re.QR_CODE,re.AZTEC,re.CODABAR,re.CODE_39,re.CODE_93,re.CODE_128,re.DATA_MATRIX,re.MAXICODE,re.ITF,re.EAN_13,re.EAN_8,re.PDF_417,re.RSS_14,re.RSS_EXPANDED,re.UPC_A,re.UPC_E,re.UPC_EAN_EXTENSION];if(!t||typeof t=="boolean"||!t.formatsToSupport)return n;if(!Array.isArray(t.formatsToSupport))throw"configOrVerbosityFlag.formatsToSupport should be undefined or an array.";if(t.formatsToSupport.length===0)throw"Atleast 1 formatsToSupport is needed.";for(var o=[],c=0,u=t.formatsToSupport;c<u.length;c++){var h=u[c];$R(h)?o.push(h):this.logger.warn("Invalid format: ".concat(h," passed in config, ignoring."))}if(o.length===0)throw"None of formatsToSupport match supported values.";return o},e.prototype.getUseBarCodeDetectorIfSupported=function(t){if(fn(t))return!0;if(!fn(t.useBarCodeDetectorIfSupported))return t.useBarCodeDetectorIfSupported!==!1;if(fn(t.experimentalFeatures))return!0;var n=t.experimentalFeatures;return fn(n.useBarCodeDetectorIfSupported)?!0:n.useBarCodeDetectorIfSupported!==!1},e.prototype.validateQrboxSize=function(t,n,o){var c=this,u=o.qrbox;this.validateQrboxConfig(u);var h=this.toQrdimensions(t,n,u),x=function(m){if(m<dr.MIN_QR_BOX_SIZE)throw"minimum size of 'config.qrbox' dimension value is"+" ".concat(dr.MIN_QR_BOX_SIZE,"px.")},w=function(m){return m>t&&(c.logger.warn("`qrbox.width` or `qrbox` is larger than the width of the root element. The width will be truncated to the width of root element."),m=t),m};x(h.width),x(h.height),h.width=w(h.width)},e.prototype.validateQrboxConfig=function(t){if(typeof t!="number"&&typeof t!="function"&&(t.width===void 0||t.height===void 0))throw"Invalid instance of QrDimensions passed for 'config.qrbox'. Both 'width' and 'height' should be set."},e.prototype.toQrdimensions=function(t,n,o){if(typeof o=="number")return{width:o,height:o};if(typeof o=="function")try{return o(t,n)}catch(c){throw new Error("qrbox config was passed as a function but it failed with unknown error"+c)}return o},e.prototype.setupUi=function(t,n,o){o.isShadedBoxEnabled()&&this.validateQrboxSize(t,n,o);var c=fn(o.qrbox)?{width:t,height:n}:o.qrbox;this.validateQrboxConfig(c);var u=this.toQrdimensions(t,n,c);u.height>n&&this.logger.warn("[Html5Qrcode] config.qrbox has height that isgreater than the height of the video stream. Shading will be ignored");var h=o.isShadedBoxEnabled()&&u.height<=n,x={x:0,y:0,width:t,height:n},w=h?this.getShadedRegionBounds(t,n,u):x,m=this.createCanvasElement(w.width,w.height),A={willReadFrequently:!0},C=m.getContext("2d",A);C.canvas.width=w.width,C.canvas.height=w.height,this.element.append(m),h&&this.possiblyInsertShadingElement(this.element,t,n,u),this.createScannerPausedUiElement(this.element),this.qrRegion=w,this.context=C,this.canvasElement=m},e.prototype.createScannerPausedUiElement=function(t){var n=document.createElement("div");n.innerText=us.scannerPaused(),n.style.display="none",n.style.position="absolute",n.style.top="0px",n.style.zIndex="1",n.style.background="rgba(9, 9, 9, 0.46)",n.style.color="#FFECEC",n.style.textAlign="center",n.style.width="100%",t.appendChild(n),this.scannerPausedUiElement=n},e.prototype.scanContext=function(t,n){var o=this;return this.stateManagerProxy.isPaused()?Promise.resolve(!1):this.qrcode.decodeAsync(this.canvasElement).then(function(c){return t(c.text,l2.createFromQrcodeResult(c)),o.possiblyUpdateShaders(!0),!0}).catch(function(c){o.possiblyUpdateShaders(!1);var u=us.codeParseError(c);return n(u,HR.createFrom(u)),!1})},e.prototype.foreverScan=function(t,n,o){var c=this;if(this.shouldScan&&this.renderedCamera){var u=this.renderedCamera.getSurface(),h=u.videoWidth/u.clientWidth,x=u.videoHeight/u.clientHeight;if(!this.qrRegion)throw"qrRegion undefined when localMediaStream is ready.";var w=this.qrRegion.width*h,m=this.qrRegion.height*x,A=this.qrRegion.x*h,C=this.qrRegion.y*x;this.context.drawImage(u,A,C,w,m,0,0,this.qrRegion.width,this.qrRegion.height);var b=function(){c.foreverScanTimeout=setTimeout(function(){c.foreverScan(t,n,o)},c.getTimeoutFps(t.fps))};this.scanContext(n,o).then(function(T){!T&&t.disableFlip!==!0?(c.context.translate(c.context.canvas.width,0),c.context.scale(-1,1),c.scanContext(n,o).finally(function(){b()})):b()}).catch(function(T){c.logger.logError("Error happend while scanning context",T),b()})}},e.prototype.createVideoConstraints=function(t){if(typeof t=="string")return{deviceId:{exact:t}};if(typeof t=="object"){var n="facingMode",o="deviceId",c={user:!0,environment:!0},u="exact",h=function(k){if(k in c)return!0;throw"config has invalid 'facingMode' value = "+"'".concat(k,"'")},x=Object.keys(t);if(x.length!==1)throw"'cameraIdOrConfig' object should have exactly 1 key,"+" if passed as an object, found ".concat(x.length," keys");var w=Object.keys(t)[0];if(w!==n&&w!==o)throw"Only '".concat(n,"' and '").concat(o,"' ")+" are supported for 'cameraIdOrConfig'";if(w===n){var m=t.facingMode;if(typeof m=="string"){if(h(m))return{facingMode:m}}else if(typeof m=="object")if(u in m){if(h(m["".concat(u)]))return{facingMode:{exact:m["".concat(u)]}}}else throw"'facingMode' should be string or object with"+" ".concat(u," as key.");else{var A=typeof m;throw"Invalid type of 'facingMode' = ".concat(A)}}else{var C=t.deviceId;if(typeof C=="string")return{deviceId:C};if(typeof C=="object"){if(u in C)return{deviceId:{exact:C["".concat(u)]}};throw"'deviceId' should be string or object with"+" ".concat(u," as key.")}else{var b=typeof C;throw"Invalid type of 'deviceId' = ".concat(b)}}}var T=typeof t;throw"Invalid type of 'cameraIdOrConfig' = ".concat(T)},e.prototype.computeCanvasDrawConfig=function(t,n,o,c){if(t<=o&&n<=c){var u=(o-t)/2,h=(c-n)/2;return{x:u,y:h,width:t,height:n}}else{var x=t,w=n;return t>o&&(n=o/t*n,t=o),n>c&&(t=c/n*t,n=c),this.logger.log("Image downsampled from "+"".concat(x,"X").concat(w)+" to ".concat(t,"X").concat(n,".")),this.computeCanvasDrawConfig(t,n,o,c)}},e.prototype.clearElement=function(){if(this.stateManagerProxy.isScanning())throw"Cannot clear while scan is ongoing, close it first.";var t=document.getElementById(this.elementId);t&&(t.innerHTML="")},e.prototype.possiblyUpdateShaders=function(t){this.qrMatch!==t&&(this.hasBorderShaders&&this.borderShaders&&this.borderShaders.length&&this.borderShaders.forEach(function(n){n.style.backgroundColor=t?dr.BORDER_SHADER_MATCH_COLOR:dr.BORDER_SHADER_DEFAULT_COLOR}),this.qrMatch=t)},e.prototype.possiblyCloseLastScanImageFile=function(){this.lastScanImageFile&&(URL.revokeObjectURL(this.lastScanImageFile),this.lastScanImageFile=null)},e.prototype.createCanvasElement=function(t,n,o){var c=t,u=n,h=document.createElement("canvas");return h.style.width="".concat(c,"px"),h.style.height="".concat(u,"px"),h.style.display="none",h.id=fn(o)?"qr-canvas":o,h},e.prototype.getShadedRegionBounds=function(t,n,o){if(o.width>t||o.height>n)throw"'config.qrbox' dimensions should not be greater than the dimensions of the root HTML element.";return{x:(t-o.width)/2,y:(n-o.height)/2,width:o.width,height:o.height}},e.prototype.possiblyInsertShadingElement=function(t,n,o,c){if(!(n-c.width<1||o-c.height<1)){var u=document.createElement("div");u.style.position="absolute";var h=(n-c.width)/2,x=(o-c.height)/2;if(u.style.borderLeft="".concat(h,"px solid rgba(0, 0, 0, 0.48)"),u.style.borderRight="".concat(h,"px solid rgba(0, 0, 0, 0.48)"),u.style.borderTop="".concat(x,"px solid rgba(0, 0, 0, 0.48)"),u.style.borderBottom="".concat(x,"px solid rgba(0, 0, 0, 0.48)"),u.style.boxSizing="border-box",u.style.top="0px",u.style.bottom="0px",u.style.left="0px",u.style.right="0px",u.id="".concat(dr.SHADED_REGION_ELEMENT_ID),n-c.width<11||o-c.height<11)this.hasBorderShaders=!1;else{var w=5,m=40;this.insertShaderBorders(u,m,w,-w,null,0,!0),this.insertShaderBorders(u,m,w,-w,null,0,!1),this.insertShaderBorders(u,m,w,null,-w,0,!0),this.insertShaderBorders(u,m,w,null,-w,0,!1),this.insertShaderBorders(u,w,m+w,-w,null,-w,!0),this.insertShaderBorders(u,w,m+w,null,-w,-w,!0),this.insertShaderBorders(u,w,m+w,-w,null,-w,!1),this.insertShaderBorders(u,w,m+w,null,-w,-w,!1),this.hasBorderShaders=!0}t.append(u)}},e.prototype.insertShaderBorders=function(t,n,o,c,u,h,x){var w=document.createElement("div");w.style.position="absolute",w.style.backgroundColor=dr.BORDER_SHADER_DEFAULT_COLOR,w.style.width="".concat(n,"px"),w.style.height="".concat(o,"px"),c!==null&&(w.style.top="".concat(c,"px")),u!==null&&(w.style.bottom="".concat(u,"px")),x?w.style.left="".concat(h,"px"):w.style.right="".concat(h,"px"),this.borderShaders||(this.borderShaders=[]),this.borderShaders.push(w),t.appendChild(w)},e.prototype.showPausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="block"},e.prototype.hidePausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="none"},e.prototype.getTimeoutFps=function(t){return 1e3/t},e}(),p2;(function(e){e[e.STATUS_DEFAULT=0]="STATUS_DEFAULT",e[e.STATUS_SUCCESS=1]="STATUS_SUCCESS",e[e.STATUS_WARNING=2]="STATUS_WARNING",e[e.STATUS_REQUESTING_PERMISSION=3]="STATUS_REQUESTING_PERMISSION"})(p2||(p2={}));var Z1;(function(e){e[e.BACK=1]="BACK",e[e.FRONT=2]="FRONT"})(Z1||(Z1={}));var Q1;(function(e){e[e.PORTRAIT=1]="PORTRAIT",e[e.LANDSCAPE=2]="LANDSCAPE",e[e.ADAPTIVE=3]="ADAPTIVE"})(Q1||(Q1={}));var q1;(function(e){e[e.ALL=17]="ALL"})(q1||(q1={}));const h_=Object.assign(Object.assign({},re),q1);var m2;(function(e){e.ZXING="zxing",e.MLKIT="mlkit"})(m2||(m2={}));const g_=[{selector:".scanner-container-display",css:"display: block;"},{selector:".scanner-dialog",css:"display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4);"},{selector:".scanner-dialog-inner",css:"background-color: #fefefe; margin: 2% auto; padding: 20px; border: 1px solid #888; width: 96%;"},{selector:".close-button",css:"color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer;"},{selector:".close-button:hover",css:"color: #222;"},{selector:".scanner-container-full-width",css:"width: 100%;"}];function p_(e){const t="custom-style-os-cap-barcode";let n=document.getElementById(t);if(n||(n=document.createElement("style"),n.type="text/css",n.id=t,document.head.appendChild(n)),n.sheet){for(;n.sheet.cssRules.length;)n.sheet.deleteRule(0);for(const{selector:o,css:c}of e)n.sheet.insertRule(`${o} { ${c} }`)}else{n.textContent="";for(const{selector:o,css:c}of e)n.textContent+=`${o} { ${c} }`}}const m_=pa("CapacitorBarcodeScanner",{web:()=>(p_(g_),Br(()=>import("./web-D9rJZXHW.js"),[],import.meta.url).then(e=>new e.CapacitorBarcodeScannerWeb))});class x_{static async scanBarcode(t){return t.scanInstructions=t.scanInstructions||" ",t.scanButton=t.scanButton||!1,t.scanText=t.scanText||" ",t.cameraDirection=t.cameraDirection||Z1.BACK,t.scanOrientation=t.scanOrientation||Q1.ADAPTIVE,m_.scanBarcode(t)}}const Df=pa("SecureStoragePlugin",{web:()=>Br(()=>import("./web-B4y8vdRZ.js"),[],import.meta.url).then(e=>new e.SecureStoragePluginWeb)});function w_(e){try{if(e.length>2048)throw new Error;if(!e.startsWith("{")){const c=new URL(e);if(!["http:","https:"].includes(c.protocol)||c.username||c.password||c.pathname!=="/pair"||c.search||!/^#pair=[A-Za-z0-9_-]{43}$/.test(c.hash))throw new Error;const u=ln.parse(c.origin);if(!u)throw new Error;return{endpoint:u,grant:c.hash.slice(6)}}const t=JSON.parse(e);if(t.type!=="agentroam-pair"||t.version!==1||typeof t.server!="string"||typeof t.grant!="string"||!/^[A-Za-z0-9_-]{43}$/.test(t.grant))throw new Error;const n=new URL(t.server);if(n.username||n.password||n.search||n.hash||n.pathname!=="/")throw new Error;const o=ln.parse(t.server);if(!o)throw new Error;return{endpoint:o,grant:t.grant}}catch{throw new Error("这不是 AgentRoam 授权二维码,请扫描电脑终端上新生成的二维码。")}}class t3{ready(){if(!Os.isNativePlatform())throw new Error("请在 AgentRoam App 中扫码连接。")}async get(t){this.ready();try{return(await Df.get({key:`agentroam-device:${t}`})).value}catch(n){if(String(n).includes("does not exist"))return null;throw new Error("无法读取设备凭证,请重试。")}}async set(t,n){this.ready(),await Df.set({key:`agentroam-device:${t}`,value:n})}async remove(t){this.ready();try{await Df.remove({key:`agentroam-device:${t}`})}catch(n){if(!String(n).includes("does not exist"))throw n}}}async function r3(){if(!Os.isNativePlatform())throw new Error("请在 AgentRoam App 中使用相机扫码。");try{return(await x_.scanBarcode({hint:h_.QR_CODE,scanInstructions:"扫描电脑上的 AgentRoam 授权二维码",cameraDirection:1})).ScanResult||null}catch(e){if(/cancel/i.test(String(e)))return null;throw new Error("无法打开相机,请在系统设置中允许 AgentRoam 使用相机后重试。")}}class n3{constructor(t,n=(...c)=>fetch(...c),o=()=>window.dispatchEvent(new CustomEvent("webapp:unauthorized"))){this.storage=t,this.transport=n,this.onRevoked=o,this.session=null,this.fetch=async(c,u={})=>{const h=this.session,x=new URL(typeof c=="string"?c:c instanceof URL?c.href:c.url),w=new Headers(u.headers??(c instanceof Request?c.headers:void 0));h&&x.origin===h.origin&&w.set("authorization",`Bearer ${h.token}`);const m=await this.transport(c,{...u,headers:w,credentials:"omit",redirect:"error"});if(h&&this.session===h&&x.origin===h.origin&&(m.status===401||m.status===423)){this.session=null;try{await this.storage.remove(h.origin)}finally{this.onRevoked()}}return m}}async resume(t){const n=await this.storage.get(t.url);this.session=n?{origin:t.url,token:n}:null}async pair(t){const{endpoint:n,grant:o}=w_(t),c=new AbortController,u=setTimeout(()=>c.abort(),3e4);let h=null;try{let x;try{x=await this.transport(n.api("/api/pairing/qr-exchange"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant:o,name:"我的 App"}),credentials:"omit",redirect:"error",signal:c.signal}),x.ok&&(h=await x.json())}catch(w){if(w instanceof SyntaxError)throw new Error("服务器返回了无效的设备凭证。");const m=c.signal.aborted||w instanceof Error&&(w.name==="TimeoutError"||w.name==="AbortError"),A=n.url.startsWith("http://")?"请确认手机与电脑在同一网络,并检查电脑防火墙是否允许 AgentRoam 连接。":"请检查手机网络和电脑的远程连接是否可用。";throw new Error(`${m?"连接电脑超时":"无法连接电脑"}(${n.url})。${A}请在电脑上刷新二维码后重新扫码。`)}if(!x.ok)throw new Error(x.status===423?"电脑已锁定远程访问,请先在电脑上解锁。":x.status===410?"二维码已使用或已过期,请在电脑上重新生成。":"扫码连接失败,请检查服务器地址和网络后重试。")}finally{clearTimeout(u)}if(!h||typeof h.token!="string"||!/^[A-Za-z0-9_-]{43}$/.test(h.token))throw new Error("服务器返回了无效的设备凭证。");try{await this.storage.set(n.url,h.token)}catch{throw await this.transport(n.api("/api/pairing/logout"),{method:"POST",headers:{authorization:`Bearer ${h.token}`},credentials:"omit",redirect:"error",signal:AbortSignal.timeout(5e3)}).catch(()=>{}),new Error("无法安全保存设备凭证,请在电脑上重新生成二维码后重试。")}return this.session={origin:n.url,token:h.token},n}async checkAuthorization(){const t=this.session;if(!t)return;const n=await this.fetch(`${t.origin}/api/web-auth/status`,{signal:AbortSignal.timeout(5e3)});if(!n.ok)return;const o=await n.json();if(this.session===t&&(o.locked||o.authenticated===!1)){this.session=null;try{await this.storage.remove(t.origin)}finally{this.onRevoked()}}}}function i3(e,t,n,o){const c=new URL(t);return(u,h)=>{const x=typeof u=="string"?u:u instanceof URL?u.href:u.url,w=new URL(x,c),m=w.protocol===c.protocol&&w.host===c.host;if(w.pathname.startsWith("/api/")&&(m||w.origin===e)){const A=new URL(w.pathname+w.search,e);return n.fetch(u instanceof Request?new Request(A,u):A,h)}return o(u,h)}}function v_(e,t){const n=new URL(e,"https://agentroam.local");if(n.pathname!=="/app/")throw new Error("Invalid workspace frame path");const o=new URL(t);return o.search=n.search,o.searchParams.set("workspace","1"),o.hash="",o.href}function J1(e){kR(DR(e.url,void 0,Kv())),new Gv().save(e)}async function y_(e,t,n,o){e.render(L.jsx(W0,{})),window.__agentroamNativeFrame={origin:t.url,fetch:n.fetch},globalThis.fetch=i3(t.url,location.href,n,o);const c=async h=>{const x=await n.pair(h);J1(x),location.reload()};TR({origin:t.url,frameUrl:h=>v_(h,location.href),pair:c,scan:async()=>{const h=await r3();h&&await c(h)},switchComputer:async h=>{const x=ln.parse(h);if(!x)throw new Error("电脑地址无效,请重新扫码。");const w=new n3(new t3,o,()=>{});await w.resume(x);const m=await w.fetch(x.api("/api/web-auth/status"),{signal:AbortSignal.timeout(5e3)}),A=m.ok?await m.json():null;if(!(A!=null&&A.authenticated)||A.locked)throw new Error("这台电脑需要重新授权,请点击扫码添加电脑。");J1(x),location.reload()}});const{default:u}=await Br(async()=>{const{default:h}=await import("./page-_fFyRId-.js").then(x=>x.p);return{default:h}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url);e.render(L.jsx(ce.StrictMode,{children:L.jsx(u,{})}))}function E_(){if(window.parent===window||new URLSearchParams(location.search).get("workspace")!=="1")return null;try{const e=new URL(window.parent.location.href);return e.protocol!==location.protocol||e.host!==location.host?null:window.parent.__agentroamNativeFrame??null}catch{return null}}function A_(e){return async(t,n)=>{const o=new Request(t,n);return e.fetch(o.url,{method:o.method,headers:Object.fromEntries(o.headers),body:o.method==="GET"||o.method==="HEAD"?void 0:await o.arrayBuffer(),signal:o.signal,cache:o.cache})}}var pc;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(pc||(pc={}));var x2;(function(e){e.None="NONE",e.Slide="SLIDE",e.Fade="FADE"})(x2||(x2={}));const Mf=pa("StatusBar");function C_(e){const t=/^#([a-f\d]{6})$/i.exec(e.trim());if(!t)return null;const n=[0,2,4].map(c=>{const u=parseInt(t[1].slice(c,c+2),16)/255;return u<=.04045?u/12.92:((u+.055)/1.055)**2.4}),o=.2126*n[0]+.7152*n[1]+.0722*n[2];return{color:`#${t[1]}`,style:o>.179?pc.Light:pc.Dark}}function b_(){if(Os.getPlatform()!=="android")return()=>{};const e=document.documentElement;e.dataset.skin=Ai.getState().skin;let t=!1,n=Mf.setOverlaysWebView({overlay:!1}).catch(()=>{});const o=()=>{const h=C_(getComputedStyle(e).getPropertyValue("--bg-deepest"));h&&(n=n.then(async()=>{t||(await Mf.setBackgroundColor({color:h.color}),await Mf.setStyle({style:h.style}))}).catch(()=>{console.warn("Unable to update the Android status bar.")}))},c=new MutationObserver(o);c.observe(e,{attributes:!0,attributeFilter:["data-skin"]});const u=()=>{document.hidden||o()};return document.addEventListener("visibilitychange",u),window.addEventListener("focus",o),o(),()=>{t=!0,c.disconnect(),document.removeEventListener("visibilitychange",u),window.removeEventListener("focus",o)}}const S_="/service-worker.js";function I_(){return typeof window<"u"&&window.isSecureContext===!0&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}function T_(e){const t="=".repeat((4-e.length%4)%4),n=`${e}${t}`.replace(/-/g,"+").replace(/_/g,"/"),o=atob(n),c=new Uint8Array(new ArrayBuffer(o.length));for(let u=0;u<o.length;u+=1)c[u]=o.charCodeAt(u);return c}async function w2(e){const{publicKey:t}=await e.get("/api/push/vapid");if(!t)return;const n=await navigator.serviceWorker.register(S_),c=await n.pushManager.getSubscription()??await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:T_(t)});await e.post("/api/push/subscribe",c.toJSON())}function R_(e){I_()&&(async()=>{try{if(Notification.permission==="granted"){await w2(e);return}if(Notification.permission!=="default")return;const t=()=>{(async()=>{try{await Notification.requestPermission()==="granted"&&await w2(e)}catch{}})()};document.addEventListener("pointerdown",t,{once:!0})}catch{}})()}class Pf extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}const v2=10,__=13,gi=32;function Lf(e){}function N_(e){if(typeof e=="function")throw new TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");const{onEvent:t=Lf,onError:n=Lf,onRetry:o=Lf,onComment:c,maxBufferSize:u}=e,h=[];let x=0,w=!0,m,A="",C=0,b,T=!1;function k(j){if(T)throw new Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(w&&(w=!1,j.charCodeAt(0)===239&&j.charCodeAt(1)===187&&j.charCodeAt(2)===191&&(j=j.slice(3))),h.length===0){const Y=X(j);Y!==""&&(h.push(Y),x=Y.length),M();return}if(j.indexOf(`
|
|
481
481
|
`)===-1&&j.indexOf("\r")===-1){h.push(j),x+=j.length,M();return}h.push(j);const U=h.join("");h.length=0,x=0;const F=X(U);F!==""&&(h.push(F),x=F.length),M()}function M(){u!==void 0&&(x+A.length<=u||(T=!0,h.length=0,x=0,m=void 0,A="",C=0,b=void 0,n(new Pf(`Buffered data exceeded max buffer size of ${u} characters`,{type:"max-buffer-size-exceeded"}))))}function X(j){let U=0;if(j.indexOf("\r")===-1){let F=j.indexOf(`
|
|
482
482
|
`,U);for(;F!==-1;){if(U===F){C>0&&t({id:m,event:b,data:A}),m=void 0,A="",C=0,b=void 0,U=F+1,F=j.indexOf(`
|
|
483
483
|
`,U);continue}const Y=j.charCodeAt(U);if(y2(j,U,Y)){const V=j.charCodeAt(U+5)===gi?U+6:U+5,oe=j.slice(V,F);if(C===0&&j.charCodeAt(F+1)===v2){t({id:m,event:b,data:oe}),m=void 0,A="",b=void 0,U=F+2,F=j.indexOf(`
|
|
@@ -486,4 +486,4 @@ ${oe}`,C++}else E2(j,U,Y)?b=j.slice(j.charCodeAt(U+6)===gi?U+7:U+6,F)||void 0:O(
|
|
|
486
486
|
`,U)}return j.slice(U)}for(;U<j.length;){const F=j.indexOf("\r",U),Y=j.indexOf(`
|
|
487
487
|
`,U);let V=-1;if(F!==-1&&Y!==-1?V=F<Y?F:Y:F!==-1?F===j.length-1?V=-1:V=F:Y!==-1&&(V=Y),V===-1)break;O(j,U,V),U=V+1,j.charCodeAt(U-1)===__&&j.charCodeAt(U)===v2&&U++}return j.slice(U)}function O(j,U,F){if(U===F){_();return}const Y=j.charCodeAt(U);if(y2(j,U,Y)){const Te=j.charCodeAt(U+5)===gi?U+6:U+5,H=j.slice(Te,F);A=C===0?H:`${A}
|
|
488
488
|
${H}`,C++;return}if(E2(j,U,Y)){b=j.slice(j.charCodeAt(U+6)===gi?U+7:U+6,F)||void 0;return}if(Y===105&&j.charCodeAt(U+1)===100&&j.charCodeAt(U+2)===58){const Te=j.slice(j.charCodeAt(U+3)===gi?U+4:U+3,F);Te.includes("\0")||(m=Te);return}if(Y===58){if(c){const Te=j.slice(U,F);c(Te.slice(j.charCodeAt(U+1)===gi?2:1))}return}const V=j.slice(U,F),oe=V.indexOf(":");if(oe===-1){I(V,"",V);return}const ve=V.slice(0,oe),ie=V.charCodeAt(oe+1)===gi?2:1,pe=V.slice(oe+ie);I(ve,pe,V)}function I(j,U,F){switch(j){case"event":b=U||void 0;break;case"data":A=C===0?U:`${A}
|
|
489
|
-
${U}`,C++;break;case"id":U.includes("\0")||(m=U);break;case"retry":/^\d+$/.test(U)?o(parseInt(U,10)):n(new Pf(`Invalid \`retry\` value: "${U}"`,{type:"invalid-retry",value:U,line:F}));break;default:n(new Pf(`Unknown field "${j.length>20?`${j.slice(0,20)}…`:j}"`,{type:"unknown-field",field:j,value:U,line:F}));break}}function _(){C>0&&t({id:m,event:b,data:A}),m=void 0,A="",C=0,b=void 0}function B(j={}){if(j.consume&&h.length>0){const U=h.join("");O(U,0,U.length)}w=!0,m=void 0,A="",C=0,b=void 0,h.length=0,x=0,T=!1}return{feed:k,reset:B}}function y2(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function E2(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class A2 extends Event{constructor(t,n){var o,c;super(t),this.code=(o=n==null?void 0:n.code)!=null?o:void 0,this.message=(c=n==null?void 0:n.message)!=null?c:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,o){return o(C2(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(C2(this),n)}}function O_(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ed(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ed).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ed(e.cause)}`:e.message:`${e}`}function C2(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var s3=e=>{throw TypeError(e)},$0=(e,t,n)=>t.has(e)||s3("Cannot "+n),Ae=(e,t,n)=>($0(e,t,"read from private field"),n?n.call(e):t.get(e)),vt=(e,t,n)=>t.has(e)?s3("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ye=(e,t,n,o)=>($0(e,t,"write to private field"),t.set(e,n),n),dn=(e,t,n)=>($0(e,t,"access private method"),n),nr,xi,Yi,Ol,mc,No,fs,Oo,Wn,Ki,vs,Zi,xo,Lr,td,rd,nd,b2,id,sd,wo,od,ad;let kl=class extends EventTarget{constructor(t,n){var o,c;super(),vt(this,Lr),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,vt(this,nr),vt(this,xi),vt(this,Yi),vt(this,Ol),vt(this,mc),vt(this,No),vt(this,fs),vt(this,Oo,null),vt(this,Wn),vt(this,Ki),vt(this,vs,null),vt(this,Zi,null),vt(this,xo,null),vt(this,rd,async u=>{var h;Ae(this,Ki).reset();const{body:x,redirected:w,status:m,headers:A}=u;if(m===204){dn(this,Lr,wo).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(w?Ye(this,Yi,new URL(u.url)):Ye(this,Yi,void 0),m!==200){dn(this,Lr,wo).call(this,`Non-200 status code (${m})`,m);return}if(!(A.get("content-type")||"").startsWith("text/event-stream")){dn(this,Lr,wo).call(this,'Invalid content type, expected "text/event-stream"',m);return}if(Ae(this,nr)===this.CLOSED)return;Ye(this,nr,this.OPEN);const C=new Event("open");if((h=Ae(this,xo))==null||h.call(this,C),this.dispatchEvent(C),typeof x!="object"||!x||!("getReader"in x)){dn(this,Lr,wo).call(this,"Invalid response body, expected a web ReadableStream",m),this.close();return}const b=new TextDecoder,T=x.getReader();let k=!0;do{const{done:M,value:X}=await T.read();X&&Ae(this,Ki).feed(b.decode(X,{stream:!M})),M&&(k=!1,Ae(this,Ki).reset(),dn(this,Lr,od).call(this))}while(k)}),vt(this,nd,u=>{Ye(this,Wn,void 0),!(u.name==="AbortError"||u.type==="aborted")&&dn(this,Lr,od).call(this,ed(u))}),vt(this,id,u=>{typeof u.id=="string"&&Ye(this,Oo,u.id);const h=new MessageEvent(u.event||"message",{data:u.data,origin:Ae(this,Yi)?Ae(this,Yi).origin:Ae(this,xi).origin,lastEventId:u.id||""});Ae(this,Zi)&&(!u.event||u.event==="message")&&Ae(this,Zi).call(this,h),this.dispatchEvent(h)}),vt(this,sd,u=>{Ye(this,No,u)}),vt(this,ad,()=>{Ye(this,fs,void 0),Ae(this,nr)===this.CONNECTING&&dn(this,Lr,td).call(this)});try{if(t instanceof URL)Ye(this,xi,t);else if(typeof t=="string")Ye(this,xi,new URL(t,k_()));else throw new Error("Invalid URL")}catch{throw O_("An invalid or illegal string was specified")}Ye(this,Ki,N_({onEvent:Ae(this,id),onRetry:Ae(this,sd)})),Ye(this,nr,this.CONNECTING),Ye(this,No,3e3),Ye(this,mc,(o=n==null?void 0:n.fetch)!=null?o:globalThis.fetch),Ye(this,Ol,(c=n==null?void 0:n.withCredentials)!=null?c:!1),dn(this,Lr,td).call(this)}get readyState(){return Ae(this,nr)}get url(){return Ae(this,xi).href}get withCredentials(){return Ae(this,Ol)}get onerror(){return Ae(this,vs)}set onerror(t){Ye(this,vs,t)}get onmessage(){return Ae(this,Zi)}set onmessage(t){Ye(this,Zi,t)}get onopen(){return Ae(this,xo)}set onopen(t){Ye(this,xo,t)}addEventListener(t,n,o){const c=n;super.addEventListener(t,c,o)}removeEventListener(t,n,o){const c=n;super.removeEventListener(t,c,o)}close(){Ae(this,fs)&&clearTimeout(Ae(this,fs)),Ae(this,nr)!==this.CLOSED&&(Ae(this,Wn)&&Ae(this,Wn).abort(),Ye(this,nr,this.CLOSED),Ye(this,Wn,void 0))}};nr=new WeakMap,xi=new WeakMap,Yi=new WeakMap,Ol=new WeakMap,mc=new WeakMap,No=new WeakMap,fs=new WeakMap,Oo=new WeakMap,Wn=new WeakMap,Ki=new WeakMap,vs=new WeakMap,Zi=new WeakMap,xo=new WeakMap,Lr=new WeakSet,td=function(){Ye(this,nr,this.CONNECTING),Ye(this,Wn,new AbortController),Ae(this,mc)(Ae(this,xi),dn(this,Lr,b2).call(this)).then(Ae(this,rd)).catch(Ae(this,nd))},rd=new WeakMap,nd=new WeakMap,b2=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Ae(this,Oo)?{"Last-Event-ID":Ae(this,Oo)}:void 0},cache:"no-store",signal:(e=Ae(this,Wn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},id=new WeakMap,sd=new WeakMap,wo=function(e,t){var n;Ae(this,nr)!==this.CLOSED&&Ye(this,nr,this.CLOSED);const o=new A2("error",{code:t,message:e});(n=Ae(this,vs))==null||n.call(this,o),this.dispatchEvent(o)},od=function(e,t){var n;if(Ae(this,nr)===this.CLOSED)return;Ye(this,nr,this.CONNECTING);const o=new A2("error",{code:t,message:e});(n=Ae(this,vs))==null||n.call(this,o),this.dispatchEvent(o),Ye(this,fs,setTimeout(Ae(this,ad),Ae(this,No)))},ad=new WeakMap,kl.CONNECTING=0,kl.OPEN=1,kl.CLOSED=2;function k_(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}LI();ET();ST();RT();_T();kT();J9({baseUrl:()=>na,source:"webapp"});document.body.dataset.webShell="1";const qc=new JT,ti=E_(),ea=qc.isNativeApp()||!!ti;ea&&(document.body.dataset.nativeApp="1");b_();if(!qc.isNativeApp()&&window.parent===window){const e=document.createElement("link");e.rel="manifest",e.href="/manifest.webmanifest",document.head.append(e);const t=document.querySelector('link[rel="apple-touch-icon"]');t&&(t.href="/pwa/icon-192.png");const n=document.createElement("script");n.src="/pwa/install.js",document.head.append(n)}if(window.parent===window){const e=()=>{const t=Vg.find(o=>o.id===Ai.getState().skin)??Vg[0];document.body.style.background=t.preview[0];let n=document.querySelector('meta[name="theme-color"]');n||(n=document.createElement("meta"),n.name="theme-color",document.head.append(n)),n.content=t.preview[0]};e(),Ai.subscribe(e)}const Jc=globalThis.fetch.bind(globalThis),gt=qc.isNativeApp()&&!ti?new n3(new t3,Jc):null,ta=ti?A_(ti):gt==null?void 0:gt.fetch;ti&&ta&&(globalThis.fetch=i3(ti.origin,location.href,{fetch:ta},Jc));const ra=new K9(ta),D_=window.parent===window?void 0:new WT,M_=window.parent===window?void 0:new QT,P_=zv({width:900,userAgent:navigator.userAgent,coarsePointer:window.matchMedia("(pointer: coarse)").matches,nativeApp:ea}),S2=ea?null:pT(),ld=new Set;window.addEventListener("pagehide",e=>{if(!e.persisted)for(const t of ld)t.close()});let na="";async function L_(e){const{wsNonce:t}=await ra.get("/api/web-console/bootstrap"),n=new URL(e,na||location.href);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("nonce",t),new WebSocket(n)}const I2=new fT(ra,new wT,D_,e=>{if(!S2||!e.startsWith("/api/agent/stream?"))return ta?new kl(na+e,{fetch:ta}):new EventSource(na+e);const t=S2.open(e,()=>dT(e,o=>ra.get(`/api/sessions/${encodeURIComponent(o)}?limit=1&view=core`)));ld.add(t);const n=t.close.bind(t);return t.close=()=>{ld.delete(t),n()},t},new xT({openSocket:()=>L_("/ws/voice")}),{historyObservation:P_?"polling":"sse"});window.browserLiveApi=M_;const o3=document.getElementById("root");if(!o3)throw new Error("#root missing");const ko=Pv(o3);gt&&window.parent===window&&ko.render(L.jsx(W0,{}));function B_(){return ce.useEffect(()=>{MT()},[]),null}(async()=>{gt&&window.addEventListener("webapp:unauthorized",()=>location.reload());const e=new qT(qc,new Gv,new tR(gt?async(n,o)=>{const c=ln.parse(String(n));return c&&await gt.resume(c),gt.fetch(n,o)}:void 0));if(ti){await ud(ln.parse(ti.origin));return}const t=await e.planStartup();if(t.mode==="setup"){cd(t.failure);return}await ud(t.mode==="ready"?t.endpoint:null)})().catch(e=>{gt&&cd(e instanceof Error?e.message:"连接失败,请重新扫码。")});function cd(e=""){globalThis.fetch=Jc,delete window.__agentroamNativeFrame,ko.render(L.jsx(IR,{initialFailure:e,onScan:async()=>{const t=await r3();if(!t||!gt)return;const n=await gt.pair(t);J1(n),await ud(n)}}))}async function ud(e){try{if(e&&(await(gt==null?void 0:gt.resume(e)),ra.setBaseUrl(e.url),na=e.url),gt&&e&&window.parent===window){await y_(ko,e,gt,Jc),setInterval(()=>{gt.checkAuthorization().catch(()=>{})},1e4);return}window.agentApi=I2;const t=new URLSearchParams(location.search).get("view"),n=new URLSearchParams(location.search).get("newSessionWindow")==="1",o=n?Br(()=>import("./NewSessionWindow-C460-gxX.js"),__vite__mapDeps([14,15,9,16,17,2,6,4,1,5,18,19,20,7,3,21,22,23,24,25,26,27,28]),import.meta.url):t==="collaboration"?Br(()=>import("./CollaborationPage-COyvllTJ.js"),__vite__mapDeps([29,9,16,17,2,13,30,25,31,32,33,12,34,35,4]),import.meta.url):t==="collaboration-dashboard"?Br(()=>import("./CollaborationDashboard-DSZa3Cns.js"),__vite__mapDeps([36,12,37,33,26,19,2,5,7,25,21,31,32,3,13,38]),import.meta.url):t==="session-dashboard"?Br(()=>import("./SessionDashboard-D868NjZ_.js"),__vite__mapDeps([39,13,40,41,21,25,24,31,32,2,3,30,42,43]),import.meta.url):t==="remote-desktop"?Br(()=>import("./RemoteDesktopPage-BniHztmt.js"),__vite__mapDeps([44,45,17,3,6,22,23,2]),import.meta.url):t==="calendar"?Br(()=>import("./CalendarPage-CxPVBlzd.js"),__vite__mapDeps([46,47,8,2,7,48,20,3,4,42,49]),import.meta.url):t==="todo"?Br(()=>import("./TodoPage-Bqu8bqNk.js"),__vite__mapDeps([50,46,47,8,2,7,48,20,3,4,42,49]),import.meta.url):Br(()=>import("./App-iZlxRHaL.js").then(u=>u.a),__vite__mapDeps([51,15,9,16,17,2,6,4,1,5,18,19,20,7,3,21,22,23,24,25,26,27,37,33,31,32,40,13,41,8,52,11,12,34,53]),import.meta.url),[,{default:c}]=await Promise.all([I2.refreshServerModel(),o]);!n&&!ea&&window.parent===window&&R_(ra),ko.render(L.jsxs(ce.StrictMode,{children:[L.jsx(FI.Provider,{value:L.jsx(Y9,{}),children:L.jsx(BI.Provider,{value:L.jsx(_9,{}),children:L.jsx(c,{})})}),L.jsx(B_,{})]})),gt&&setInterval(()=>{gt.checkAuthorization().catch(()=>{})},1e4),e||(window.addEventListener("webapp:unauthorized",()=>location.reload()),F_())}catch(t){if(t instanceof Lv&&!ea&&window.parent===window){location.replace("/pair");return}if(gt&&window.parent===window){cd(t instanceof Error?t.message:"连接失败,请重新扫码。");return}ko.render(L.jsx("div",{style:{minHeight:"100dvh",display:"flex",alignItems:"center",justifyContent:"center",padding:24,background:"#f5f6fa",boxSizing:"border-box"},children:L.jsxs("div",{style:{maxWidth:560,background:"#fff",borderRadius:12,padding:20,boxShadow:"0 4px 16px rgba(0,0,0,0.08)"},children:[L.jsx("h2",{style:{margin:"0 0 8px",fontSize:16,color:"#dc2626"},children:"界面启动失败"}),L.jsx("p",{style:{margin:"0 0 12px",fontSize:13,color:"#374151",wordBreak:"break-all"},children:t instanceof Error?`${t.name}: ${t.message}`:String(t)}),L.jsx("button",{type:"button",onClick:()=>location.reload(),style:{padding:"8px 20px",fontSize:14,borderRadius:8,border:"1px solid #d6d9e0",background:"#fff",cursor:"pointer"},children:"重试"})]})}))}}function F_(){const e=[...document.scripts].map(n=>n.src).join(",").match(/index-([^/]+)\.js/),t=e?e[1]:null;t&&setInterval(async()=>{if(hy())try{const n=await fetch("/api/agent/model",{credentials:"same-origin",cache:"no-store"});if(n.status===401||n.status===423){location.reload();return}const c=((await n.json()).buildId||"").replace(/^index-|\.js$/g,"");c&&c!==t&&PT()}catch{}},6e4)}export{ly as $,z0 as A,BI as B,Q1 as C,eN as D,Yv as E,Kv as F,kR as G,nN as H,DR as I,Z_ as J,MR as K,tN as L,W9 as M,V_ as N,OR as O,V9 as P,rN as Q,Mv as R,$9 as S,U9 as T,H9 as U,Dv as V,Qv as W,P9 as X,X_ as Y,LT as Z,cy as _,fc as a,W0 as a0,uR as a1,w7 as a2,_x as a3,Q_ as a4,$T as a5,v7 as a6,VT as a7,cR as a8,aR as a9,fR as aa,H_ as ab,Y_ as ac,zT as ad,Br as ae,ty as af,W_ as ag,AR as ah,CR as ai,j_ as aj,G_ as ak,K_ as al,Rx as am,Vg as an,z_ as ao,X9 as ap,Kp as aq,FI as ar,NT as as,mR as at,X1 as au,iT as av,h_ as b,Rt as c,hR as d,RR as e,q_ as f,J_ as g,G9 as h,Uv as i,L as j,ER as k,Tx as l,j0 as m,U_ as n,f7 as o,x7 as p,pn as q,ce as r,T2 as s,hy as t,Ai as u,$_ as v,L9 as w,nT as x,D9 as y,z9 as z};
|
|
489
|
+
${U}`,C++;break;case"id":U.includes("\0")||(m=U);break;case"retry":/^\d+$/.test(U)?o(parseInt(U,10)):n(new Pf(`Invalid \`retry\` value: "${U}"`,{type:"invalid-retry",value:U,line:F}));break;default:n(new Pf(`Unknown field "${j.length>20?`${j.slice(0,20)}…`:j}"`,{type:"unknown-field",field:j,value:U,line:F}));break}}function _(){C>0&&t({id:m,event:b,data:A}),m=void 0,A="",C=0,b=void 0}function B(j={}){if(j.consume&&h.length>0){const U=h.join("");O(U,0,U.length)}w=!0,m=void 0,A="",C=0,b=void 0,h.length=0,x=0,T=!1}return{feed:k,reset:B}}function y2(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function E2(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class A2 extends Event{constructor(t,n){var o,c;super(t),this.code=(o=n==null?void 0:n.code)!=null?o:void 0,this.message=(c=n==null?void 0:n.message)!=null?c:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,o){return o(C2(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(C2(this),n)}}function O_(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ed(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ed).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ed(e.cause)}`:e.message:`${e}`}function C2(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var s3=e=>{throw TypeError(e)},$0=(e,t,n)=>t.has(e)||s3("Cannot "+n),Ae=(e,t,n)=>($0(e,t,"read from private field"),n?n.call(e):t.get(e)),vt=(e,t,n)=>t.has(e)?s3("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ye=(e,t,n,o)=>($0(e,t,"write to private field"),t.set(e,n),n),dn=(e,t,n)=>($0(e,t,"access private method"),n),nr,xi,Yi,Ol,mc,No,fs,Oo,Wn,Ki,vs,Zi,xo,Lr,td,rd,nd,b2,id,sd,wo,od,ad;let kl=class extends EventTarget{constructor(t,n){var o,c;super(),vt(this,Lr),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,vt(this,nr),vt(this,xi),vt(this,Yi),vt(this,Ol),vt(this,mc),vt(this,No),vt(this,fs),vt(this,Oo,null),vt(this,Wn),vt(this,Ki),vt(this,vs,null),vt(this,Zi,null),vt(this,xo,null),vt(this,rd,async u=>{var h;Ae(this,Ki).reset();const{body:x,redirected:w,status:m,headers:A}=u;if(m===204){dn(this,Lr,wo).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(w?Ye(this,Yi,new URL(u.url)):Ye(this,Yi,void 0),m!==200){dn(this,Lr,wo).call(this,`Non-200 status code (${m})`,m);return}if(!(A.get("content-type")||"").startsWith("text/event-stream")){dn(this,Lr,wo).call(this,'Invalid content type, expected "text/event-stream"',m);return}if(Ae(this,nr)===this.CLOSED)return;Ye(this,nr,this.OPEN);const C=new Event("open");if((h=Ae(this,xo))==null||h.call(this,C),this.dispatchEvent(C),typeof x!="object"||!x||!("getReader"in x)){dn(this,Lr,wo).call(this,"Invalid response body, expected a web ReadableStream",m),this.close();return}const b=new TextDecoder,T=x.getReader();let k=!0;do{const{done:M,value:X}=await T.read();X&&Ae(this,Ki).feed(b.decode(X,{stream:!M})),M&&(k=!1,Ae(this,Ki).reset(),dn(this,Lr,od).call(this))}while(k)}),vt(this,nd,u=>{Ye(this,Wn,void 0),!(u.name==="AbortError"||u.type==="aborted")&&dn(this,Lr,od).call(this,ed(u))}),vt(this,id,u=>{typeof u.id=="string"&&Ye(this,Oo,u.id);const h=new MessageEvent(u.event||"message",{data:u.data,origin:Ae(this,Yi)?Ae(this,Yi).origin:Ae(this,xi).origin,lastEventId:u.id||""});Ae(this,Zi)&&(!u.event||u.event==="message")&&Ae(this,Zi).call(this,h),this.dispatchEvent(h)}),vt(this,sd,u=>{Ye(this,No,u)}),vt(this,ad,()=>{Ye(this,fs,void 0),Ae(this,nr)===this.CONNECTING&&dn(this,Lr,td).call(this)});try{if(t instanceof URL)Ye(this,xi,t);else if(typeof t=="string")Ye(this,xi,new URL(t,k_()));else throw new Error("Invalid URL")}catch{throw O_("An invalid or illegal string was specified")}Ye(this,Ki,N_({onEvent:Ae(this,id),onRetry:Ae(this,sd)})),Ye(this,nr,this.CONNECTING),Ye(this,No,3e3),Ye(this,mc,(o=n==null?void 0:n.fetch)!=null?o:globalThis.fetch),Ye(this,Ol,(c=n==null?void 0:n.withCredentials)!=null?c:!1),dn(this,Lr,td).call(this)}get readyState(){return Ae(this,nr)}get url(){return Ae(this,xi).href}get withCredentials(){return Ae(this,Ol)}get onerror(){return Ae(this,vs)}set onerror(t){Ye(this,vs,t)}get onmessage(){return Ae(this,Zi)}set onmessage(t){Ye(this,Zi,t)}get onopen(){return Ae(this,xo)}set onopen(t){Ye(this,xo,t)}addEventListener(t,n,o){const c=n;super.addEventListener(t,c,o)}removeEventListener(t,n,o){const c=n;super.removeEventListener(t,c,o)}close(){Ae(this,fs)&&clearTimeout(Ae(this,fs)),Ae(this,nr)!==this.CLOSED&&(Ae(this,Wn)&&Ae(this,Wn).abort(),Ye(this,nr,this.CLOSED),Ye(this,Wn,void 0))}};nr=new WeakMap,xi=new WeakMap,Yi=new WeakMap,Ol=new WeakMap,mc=new WeakMap,No=new WeakMap,fs=new WeakMap,Oo=new WeakMap,Wn=new WeakMap,Ki=new WeakMap,vs=new WeakMap,Zi=new WeakMap,xo=new WeakMap,Lr=new WeakSet,td=function(){Ye(this,nr,this.CONNECTING),Ye(this,Wn,new AbortController),Ae(this,mc)(Ae(this,xi),dn(this,Lr,b2).call(this)).then(Ae(this,rd)).catch(Ae(this,nd))},rd=new WeakMap,nd=new WeakMap,b2=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Ae(this,Oo)?{"Last-Event-ID":Ae(this,Oo)}:void 0},cache:"no-store",signal:(e=Ae(this,Wn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},id=new WeakMap,sd=new WeakMap,wo=function(e,t){var n;Ae(this,nr)!==this.CLOSED&&Ye(this,nr,this.CLOSED);const o=new A2("error",{code:t,message:e});(n=Ae(this,vs))==null||n.call(this,o),this.dispatchEvent(o)},od=function(e,t){var n;if(Ae(this,nr)===this.CLOSED)return;Ye(this,nr,this.CONNECTING);const o=new A2("error",{code:t,message:e});(n=Ae(this,vs))==null||n.call(this,o),this.dispatchEvent(o),Ye(this,fs,setTimeout(Ae(this,ad),Ae(this,No)))},ad=new WeakMap,kl.CONNECTING=0,kl.OPEN=1,kl.CLOSED=2;function k_(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}LI();ET();ST();RT();_T();kT();J9({baseUrl:()=>na,source:"webapp"});document.body.dataset.webShell="1";const qc=new JT,ti=E_(),ea=qc.isNativeApp()||!!ti;ea&&(document.body.dataset.nativeApp="1");b_();if(!qc.isNativeApp()&&window.parent===window){const e=document.createElement("link");e.rel="manifest",e.href="/manifest.webmanifest",document.head.append(e);const t=document.querySelector('link[rel="apple-touch-icon"]');t&&(t.href="/pwa/apple-touch-icon.png");const n=document.createElement("script");n.src="/pwa/install.js",document.head.append(n)}if(window.parent===window){const e=()=>{const t=Vg.find(o=>o.id===Ai.getState().skin)??Vg[0];document.body.style.background=t.preview[0];let n=document.querySelector('meta[name="theme-color"]');n||(n=document.createElement("meta"),n.name="theme-color",document.head.append(n)),n.content=t.preview[0]};e(),Ai.subscribe(e)}const Jc=globalThis.fetch.bind(globalThis),gt=qc.isNativeApp()&&!ti?new n3(new t3,Jc):null,ta=ti?A_(ti):gt==null?void 0:gt.fetch;ti&&ta&&(globalThis.fetch=i3(ti.origin,location.href,{fetch:ta},Jc));const ra=new K9(ta),D_=window.parent===window?void 0:new WT,M_=window.parent===window?void 0:new QT,P_=zv({width:900,userAgent:navigator.userAgent,coarsePointer:window.matchMedia("(pointer: coarse)").matches,nativeApp:ea}),S2=ea?null:pT(),ld=new Set;window.addEventListener("pagehide",e=>{if(!e.persisted)for(const t of ld)t.close()});let na="";async function L_(e){const{wsNonce:t}=await ra.get("/api/web-console/bootstrap"),n=new URL(e,na||location.href);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("nonce",t),new WebSocket(n)}const I2=new fT(ra,new wT,D_,e=>{if(!S2||!e.startsWith("/api/agent/stream?"))return ta?new kl(na+e,{fetch:ta}):new EventSource(na+e);const t=S2.open(e,()=>dT(e,o=>ra.get(`/api/sessions/${encodeURIComponent(o)}?limit=1&view=core`)));ld.add(t);const n=t.close.bind(t);return t.close=()=>{ld.delete(t),n()},t},new xT({openSocket:()=>L_("/ws/voice")}),{historyObservation:P_?"polling":"sse"});window.browserLiveApi=M_;const o3=document.getElementById("root");if(!o3)throw new Error("#root missing");const ko=Pv(o3);gt&&window.parent===window&&ko.render(L.jsx(W0,{}));function B_(){return ce.useEffect(()=>{MT()},[]),null}(async()=>{gt&&window.addEventListener("webapp:unauthorized",()=>location.reload());const e=new qT(qc,new Gv,new tR(gt?async(n,o)=>{const c=ln.parse(String(n));return c&&await gt.resume(c),gt.fetch(n,o)}:void 0));if(ti){await ud(ln.parse(ti.origin));return}const t=await e.planStartup();if(t.mode==="setup"){cd(t.failure);return}await ud(t.mode==="ready"?t.endpoint:null)})().catch(e=>{gt&&cd(e instanceof Error?e.message:"连接失败,请重新扫码。")});function cd(e=""){globalThis.fetch=Jc,delete window.__agentroamNativeFrame,ko.render(L.jsx(IR,{initialFailure:e,onScan:async()=>{const t=await r3();if(!t||!gt)return;const n=await gt.pair(t);J1(n),await ud(n)}}))}async function ud(e){try{if(e&&(await(gt==null?void 0:gt.resume(e)),ra.setBaseUrl(e.url),na=e.url),gt&&e&&window.parent===window){await y_(ko,e,gt,Jc),setInterval(()=>{gt.checkAuthorization().catch(()=>{})},1e4);return}window.agentApi=I2;const t=new URLSearchParams(location.search).get("view"),n=new URLSearchParams(location.search).get("newSessionWindow")==="1",o=n?Br(()=>import("./NewSessionWindow-zjqAUfKb.js"),__vite__mapDeps([14,15,9,16,17,2,6,4,1,5,18,19,20,7,3,21,22,23,24,25,26,27,28]),import.meta.url):t==="collaboration"?Br(()=>import("./CollaborationPage-B1tiqgnG.js"),__vite__mapDeps([29,9,16,17,2,13,30,25,31,32,33,12,34,35,4]),import.meta.url):t==="collaboration-dashboard"?Br(()=>import("./CollaborationDashboard-XL5SnFOu.js"),__vite__mapDeps([36,12,37,33,26,19,2,5,7,25,21,31,32,3,13,38]),import.meta.url):t==="session-dashboard"?Br(()=>import("./SessionDashboard-DcPPoXe2.js"),__vite__mapDeps([39,13,40,41,21,25,24,31,32,2,3,30,42,43]),import.meta.url):t==="remote-desktop"?Br(()=>import("./RemoteDesktopPage-9AhztqA2.js"),__vite__mapDeps([44,45,17,3,6,22,23,2]),import.meta.url):t==="calendar"?Br(()=>import("./CalendarPage-BbYdGYWn.js"),__vite__mapDeps([46,47,8,2,7,48,20,3,4,42,49]),import.meta.url):t==="todo"?Br(()=>import("./TodoPage-guIvBCW0.js"),__vite__mapDeps([50,46,47,8,2,7,48,20,3,4,42,49]),import.meta.url):Br(()=>import("./App-mF6ELC07.js").then(u=>u.a),__vite__mapDeps([51,15,9,16,17,2,6,4,1,5,18,19,20,7,3,21,22,23,24,25,26,27,37,33,31,32,40,13,41,8,52,11,12,34,53]),import.meta.url),[,{default:c}]=await Promise.all([I2.refreshServerModel(),o]);!n&&!ea&&window.parent===window&&R_(ra),ko.render(L.jsxs(ce.StrictMode,{children:[L.jsx(FI.Provider,{value:L.jsx(Y9,{}),children:L.jsx(BI.Provider,{value:L.jsx(_9,{}),children:L.jsx(c,{})})}),L.jsx(B_,{})]})),gt&&setInterval(()=>{gt.checkAuthorization().catch(()=>{})},1e4),e||(window.addEventListener("webapp:unauthorized",()=>location.reload()),F_())}catch(t){if(t instanceof Lv&&!ea&&window.parent===window){location.replace("/pair");return}if(gt&&window.parent===window){cd(t instanceof Error?t.message:"连接失败,请重新扫码。");return}ko.render(L.jsx("div",{style:{minHeight:"100dvh",display:"flex",alignItems:"center",justifyContent:"center",padding:24,background:"#f5f6fa",boxSizing:"border-box"},children:L.jsxs("div",{style:{maxWidth:560,background:"#fff",borderRadius:12,padding:20,boxShadow:"0 4px 16px rgba(0,0,0,0.08)"},children:[L.jsx("h2",{style:{margin:"0 0 8px",fontSize:16,color:"#dc2626"},children:"界面启动失败"}),L.jsx("p",{style:{margin:"0 0 12px",fontSize:13,color:"#374151",wordBreak:"break-all"},children:t instanceof Error?`${t.name}: ${t.message}`:String(t)}),L.jsx("button",{type:"button",onClick:()=>location.reload(),style:{padding:"8px 20px",fontSize:14,borderRadius:8,border:"1px solid #d6d9e0",background:"#fff",cursor:"pointer"},children:"重试"})]})}))}}function F_(){const e=[...document.scripts].map(n=>n.src).join(",").match(/index-([^/]+)\.js/),t=e?e[1]:null;t&&setInterval(async()=>{if(hy())try{const n=await fetch("/api/agent/model",{credentials:"same-origin",cache:"no-store"});if(n.status===401||n.status===423){location.reload();return}const c=((await n.json()).buildId||"").replace(/^index-|\.js$/g,"");c&&c!==t&&PT()}catch{}},6e4)}export{ly as $,z0 as A,BI as B,Q1 as C,eN as D,Yv as E,Kv as F,kR as G,nN as H,DR as I,Z_ as J,MR as K,tN as L,W9 as M,V_ as N,OR as O,V9 as P,rN as Q,Mv as R,$9 as S,U9 as T,H9 as U,Dv as V,Qv as W,P9 as X,X_ as Y,LT as Z,cy as _,fc as a,W0 as a0,uR as a1,w7 as a2,_x as a3,Q_ as a4,$T as a5,v7 as a6,VT as a7,cR as a8,aR as a9,fR as aa,H_ as ab,Y_ as ac,zT as ad,Br as ae,ty as af,W_ as ag,AR as ah,CR as ai,j_ as aj,G_ as ak,K_ as al,Rx as am,Vg as an,z_ as ao,X9 as ap,Kp as aq,FI as ar,NT as as,mR as at,X1 as au,iT as av,h_ as b,Rt as c,hR as d,RR as e,q_ as f,J_ as g,G9 as h,Uv as i,L as j,ER as k,Tx as l,j0 as m,U_ as n,f7 as o,x7 as p,pn as q,ce as r,T2 as s,hy as t,Ai as u,$_ as v,L9 as w,nT as x,D9 as y,z9 as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,l as s,G as o,d as i}from"./mermaid.core-
|
|
1
|
+
import{_ as e,l as s,G as o,d as i}from"./mermaid.core-CRRXKysA.js";import{p as g}from"./cynefin-OW5HDTMX-C1LUI1_G.js";import"./index-DSgLFE4Q.js";var p={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},d={version:"11.17.2"},v=e(()=>d.version,"getVersion"),m={getVersion:v},c=e((r,a,n)=>{s.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=o(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),l={draw:c},b={parser:p,db:m,renderer:l};export{b as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as o,c as ot,a2 as ut,G as dt,an as yt,r as ft,k as pt,p as it,a as gt,b as kt,g as mt,s as wt,q as _t,d as bt}from"./mermaid.core-
|
|
1
|
+
import{_ as o,c as ot,a2 as ut,G as dt,an as yt,r as ft,k as pt,p as it,a as gt,b as kt,g as mt,s as wt,q as _t,d as bt}from"./mermaid.core-CRRXKysA.js";import"./index-DSgLFE4Q.js";var tt=function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],N={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,u,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],p=[null],n=[],v=this.table,w="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),b=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);b.setInput(t,C.yy),C.yy.lexer=b,C.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var T=b.yylloc;n.push(T);var D=b.options&&b.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(j,"popStack");function z(){var P;return P=u.pop()||b.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(z,"lex");for(var A,W,B,K,H={},X,V,et,Y;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=z()),B=v[W]&&v[W][A]),typeof B>"u"||!B.length||!B[0]){var Q="";Y=[];for(X in v[W])this.terminals_[X]&&X>L&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Q="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+Y.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(I+1)+": Unexpected "+(A==E?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:T,expected:Y})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(B[0]){case 1:i.push(A),p.push(b.yytext),n.push(b.yylloc),i.push(B[1]),A=null,S=b.yyleng,w=b.yytext,I=b.yylineno,T=b.yylloc;break;case 2:if(V=this.productions_[B[1]][1],H.$=p[p.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},D&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),K=this.performAction.apply(H,[w,S,I,C.yy,B[1],p,n].concat(R)),typeof K<"u")return K;V&&(i=i.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V)),i.push(this.productions_[B[1]][0]),p.push(H.$),n.push(H._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=function(){var M={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as gt}from"./chunk-5VM5RSS4-
|
|
1
|
+
import{g as gt}from"./chunk-5VM5RSS4-NxozE5UP.js";import{a as mt,b as lt,h as xt,d as kt}from"./chunk-F27PBJKO-Dyb8E7YM.js";import{g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,_ as s,c as R,j as G,d as $t,r as Mt}from"./mermaid.core-CRRXKysA.js";import{d as it}from"./arc-CycwMc2c.js";import"./index-DSgLFE4Q.js";var U=function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var X="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?X="Parse error on line "+(C+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as c,l as te,c as W,G as fe,ah as ye,ai as be,aj as me,af as Ee,E as Y,i as F,Z as _e,$ as ke,ac as Se,ad as le,ae as ce}from"./mermaid.core-
|
|
1
|
+
import{_ as c,l as te,c as W,G as fe,ah as ye,ai as be,aj as me,af as Ee,E as Y,i as F,Z as _e,$ as ke,ac as Se,ad as le,ae as ce}from"./mermaid.core-CRRXKysA.js";import{g as Ne}from"./chunk-5VM5RSS4-NxozE5UP.js";import"./index-DSgLFE4Q.js";var $=function(){var t=c(function(E,s,n,a){for(n=n||{},a=E.length;a--;n[E[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],_=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],j=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],M=[1,35],U=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:j}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},t(P,[2,14],{7:M,11:U}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:j}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:M,11:U}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Z=m.yylloc;e.push(Z);var de=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||m.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var k,R,v,q,G={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((k===null||typeof k>"u")&&(k=ae()),v=B[R]&&B[R][k]),typeof v>"u"||!v.length||!v[0]){var Q="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");m.showPosition?Q="Parse error on line "+(z+1)+`:
|
|
2
2
|
`+m.showPosition()+`
|
|
3
3
|
Expecting `+K.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Q="Parse error on line "+(z+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Q,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:Z,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+k);switch(v[0]){case 1:a.push(k),u.push(m.yytext),e.push(m.yylloc),a.push(v[1]),k=null,ie=m.yyleng,l=m.yytext,z=m.yylineno,Z=m.yylloc;break;case 2:if(I=this.productions_[v[1]][1],G.$=u[u.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),q=this.performAction.apply(G,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof q<"u")return q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(G.$),e.push(G._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},y=function(){var E={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|